summaryrefslogtreecommitdiff
path: root/web-build/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'web-build/static/js')
-rw-r--r--web-build/static/js/2.613df8c6.chunk.js3
-rw-r--r--web-build/static/js/2.613df8c6.chunk.js.LICENSE.txt220
-rw-r--r--web-build/static/js/2.613df8c6.chunk.js.map1
-rw-r--r--web-build/static/js/app.f9550138.chunk.js2
-rw-r--r--web-build/static/js/app.f9550138.chunk.js.map1
5 files changed, 0 insertions, 227 deletions
diff --git a/web-build/static/js/2.613df8c6.chunk.js b/web-build/static/js/2.613df8c6.chunk.js
deleted file mode 100644
index 17415d9..0000000
--- a/web-build/static/js/2.613df8c6.chunk.js
+++ /dev/null
@@ -1,3 +0,0 @@
-/*! For license information please see 2.613df8c6.chunk.js.LICENSE.txt */
-(this.webpackJsonp=this.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(298)},function(e,t,n){e.exports=n(312)()},function(t,n,r){"use strict";r.d(n,"a",(function(){return fs})),r.d(n,"b",(function(){return a})),r.d(n,"c",(function(){return L})),r.d(n,"d",(function(){return nt})),r.d(n,"e",(function(){return pt})),r.d(n,"f",(function(){return Ms})),r.d(n,"g",(function(){return Je})),r.d(n,"h",(function(){return mo})),r.d(n,"i",(function(){return Oo})),r.d(n,"j",(function(){return po})),r.d(n,"k",(function(){return ds})),r.d(n,"l",(function(){return c})),r.d(n,"m",(function(){return ot})),r.d(n,"n",(function(){return si})),r.d(n,"o",(function(){return eo})),r.d(n,"p",(function(){return Yi})),r.d(n,"q",(function(){return s})),r.d(n,"r",(function(){return i})),r.d(n,"s",(function(){return se})),r.d(n,"t",(function(){return Pt})),r.d(n,"u",(function(){return $e})),r.d(n,"v",(function(){return xa})),r.d(n,"w",(function(){return us})),r.d(n,"x",(function(){return zt})),r.d(n,"y",(function(){return Xt})),r.d(n,"z",(function(){return Po})),r.d(n,"A",(function(){return O})),r.d(n,"B",(function(){return l})),r.d(n,"C",(function(){return Hs})),r.d(n,"D",(function(){return mi})),r.d(n,"E",(function(){return Bt})),r.d(n,"F",(function(){return da})),r.d(n,"G",(function(){return da})),r.d(n,"H",(function(){return Gs})),r.d(n,"I",(function(){return Li})),r.d(n,"J",(function(){return bi})),r.d(n,"K",(function(){return o})),r.d(n,"L",(function(){return A})),r.d(n,"M",(function(){return Xa})),r.d(n,"N",(function(){return fa})),r.d(n,"O",(function(){return jt})),r.d(n,"P",(function(){return b})),r.d(n,"Q",(function(){return R})),r.d(n,"R",(function(){return T})),r.d(n,"S",(function(){return di}));const i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},o={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},a=1,s=1006,l=1023;class c{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const u=[];for(let e=0;e<256;e++)u[e]=(e<16?"0":"")+e.toString(16);const h=Math.PI/180,d=180/Math.PI;function f(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(u[255&e]+u[e>>8&255]+u[e>>16&255]+u[e>>24&255]+"-"+u[255&t]+u[t>>8&255]+"-"+u[t>>16&15|64]+u[t>>24&255]+"-"+u[63&n|128]+u[n>>8&255]+"-"+u[n>>16&255]+u[n>>24&255]+u[255&r]+u[r>>8&255]+u[r>>16&255]+u[r>>24&255]).toUpperCase()}function p(e,t,n){return Math.max(t,Math.min(n,e))}function m(e,t){return(e%t+t)%t}function g(e,t,n){return(1-n)*e+n*t}function v(e){return 0===(e&e-1)&&0!==e}function y(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}class b{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}b.prototype.isVector2=!0;class w{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,a,s,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],l=n[1],c=n[4],u=n[7],h=n[2],d=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],w=r[2],x=r[5],_=r[8];return i[0]=o*p+a*v+s*w,i[3]=o*m+a*y+s*x,i[6]=o*g+a*b+s*_,i[1]=l*p+c*v+u*w,i[4]=l*m+c*y+u*x,i[7]=l*g+c*b+u*_,i[2]=h*p+d*v+f*w,i[5]=h*m+d*y+f*x,i[8]=h*g+d*b+f*_,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8];return t*o*c-t*a*l-n*i*c+n*a*s+r*i*l-r*o*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=c*o-a*l,h=a*s-c*i,d=l*i-o*s,f=t*u+n*h+r*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);const p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(a*n-r*o)*p,e[3]=h*p,e[4]=(c*t-r*s)*p,e[5]=(r*i-a*t)*p,e[6]=d*p,e[7]=(n*s-l*t)*p,e[8]=(o*t-n*i)*p,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,o,a){const s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*o+l*a)+o+e,-r*l,r*s,-r*(-l*o+s*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],l=r[4],c=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*l,r[6]=t*a+n*c,r[1]=-n*i+t*s,r[4]=-n*o+t*l,r[7]=-n*a+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}let x;w.prototype.isMatrix3=!0;class _{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===x&&(x=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),x.width=e.width,x.height=e.height;const n=x.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=x}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}}let E=0;class A extends c{constructor(e=A.DEFAULT_IMAGE,t=A.DEFAULT_MAPPING,n=1001,r=1001,i=s,o=1008,a=l,c=1009,u=1,h=3e3){super(),Object.defineProperty(this,"id",{value:E++}),this.uuid=f(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=u,this.format=a,this.internalFormat=null,this.type=c,this.offset=new b(0,0),this.repeat=new b(1,1),this.center=new b(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new w,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=h,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this}toJSON(e){const t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const r=this.image;if(void 0===r.uuid&&(r.uuid=f()),!t&&void 0===e.images[r.uuid]){let t;if(Array.isArray(r)){t=[];for(let e=0,n=r.length;e<n;e++)r[e].isDataTexture?t.push(S(r[e].image)):t.push(S(r[e]))}else t=S(r);e.images[r.uuid]={uuid:r.uuid,url:t}}n.image=r.uuid}return t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&this.version++}}function S(e){return"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?_.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}A.DEFAULT_IMAGE=void 0,A.DEFAULT_MAPPING=300,A.prototype.isTexture=!0;class M{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const o=e.elements,a=o[0],s=o[4],l=o[8],c=o[1],u=o[5],h=o[9],d=o[2],f=o[6],p=o[10];if(Math.abs(s-c)<.01&&Math.abs(l-d)<.01&&Math.abs(h-f)<.01){if(Math.abs(s+c)<.1&&Math.abs(l+d)<.1&&Math.abs(h+f)<.1&&Math.abs(a+u+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const e=(a+1)/2,o=(u+1)/2,m=(p+1)/2,g=(s+c)/4,v=(l+d)/4,y=(h+f)/4;return e>o&&e>m?e<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=g/n,i=v/n):o>m?o<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=g/r,i=y/r):m<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(m),n=v/i,r=y/i),this.set(n,r,i,t),this}let m=Math.sqrt((f-h)*(f-h)+(l-d)*(l-d)+(c-s)*(c-s));return Math.abs(m)<.001&&(m=1),this.x=(f-h)/m,this.y=(l-d)/m,this.z=(c-s)/m,this.w=Math.acos((a+u+p-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}M.prototype.isVector4=!0;class T extends c{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new M(0,0,e,t),this.scissorTest=!1,this.viewport=new M(0,0,e,t),this.texture=new A(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:s,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image={...this.texture.image},this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}T.prototype.isWebGLRenderTarget=!0;(class extends T{constructor(e,t,n){super(e,t);const r=this.texture;this.texture=[];for(let i=0;i<n;i++)this.texture[i]=r.clone()}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}).prototype.isWebGLMultipleRenderTargets=!0;class C extends T{constructor(e,t,n){super(e,t,n),this.samples=4}copy(e){return super.copy.call(this,e),this.samples=e.samples,this}}C.prototype.isWebGLMultisampleRenderTarget=!0;class O{constructor(e=0,t=0,n=0,r=1){this._x=e,this._y=t,this._z=n,this._w=r}static slerp(e,t,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,r)}static slerpFlat(e,t,n,r,i,o,a){let s=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3];const h=i[o+0],d=i[o+1],f=i[o+2],p=i[o+3];if(0===a)return e[t+0]=s,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===a)return e[t+0]=h,e[t+1]=d,e[t+2]=f,void(e[t+3]=p);if(u!==p||s!==h||l!==d||c!==f){let e=1-a;const t=s*h+l*d+c*f+u*p,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,a=Math.sin(a*o)/i}const i=a*n;if(s=s*e+h*i,l=l*e+d*i,c=c*e+f*i,u=u*e+p*i,e===1-a){const e=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=e,l*=e,c*=e,u*=e}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,o){const a=n[r],s=n[r+1],l=n[r+2],c=n[r+3],u=i[o],h=i[o+1],d=i[o+2],f=i[o+3];return e[t]=a*f+c*u+s*d-l*h,e[t+1]=s*f+c*h+l*u-a*d,e[t+2]=l*f+c*d+a*h-s*u,e[t+3]=c*f-a*u-s*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,l=a(n/2),c=a(r/2),u=a(i/2),h=s(n/2),d=s(r/2),f=s(i/2);switch(o){case"XYZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"YXZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"ZXY":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"ZYX":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"YZX":this._x=h*c*u+l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u-h*d*f;break;case"XZY":this._x=h*c*u-l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],l=t[2],c=t[6],u=t[10],h=n+a+u;if(h>0){const e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(c-s)*e,this._y=(i-l)*e,this._z=(o-r)*e}else if(n>a&&n>u){const e=2*Math.sqrt(1+n-a-u);this._w=(c-s)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+l)/e}else if(a>u){const e=2*Math.sqrt(1+a-n-u);this._w=(i-l)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(s+c)/e}else{const e=2*Math.sqrt(1+u-n-a);this._w=(o-r)/e,this._x=(i+l)/e,this._y=(s+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(p(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,l=t._z,c=t._w;return this._x=n*c+o*a+r*l-i*s,this._y=r*c+o*s+i*a-n*l,this._z=i*c+o*l+n*s-r*a,this._w=o*c-n*a-r*s-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const s=1-a*a;if(s<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(s),c=Math.atan2(l,a),u=Math.sin((1-t)*c)/l,h=Math.sin(t*c)/l;return this._w=o*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=i*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}O.prototype.isQuaternion=!0;class R{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(P.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(P.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return k.copy(this).projectOnVector(e),this.sub(k)}reflect(e){return this.sub(k.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(p(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}R.prototype.isVector3=!0;const k=new R,P=new O;class L{constructor(e=new R(1/0,1/0,1/0),t=new R(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,l=e.length;s<l;s+=3){const l=e[s],c=e[s+1],u=e[s+2];l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>a&&(a=u)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,l=e.count;s<l;s++){const l=e.getX(s),c=e.getY(s),u=e.getZ(s);l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>a&&(a=u)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=I.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e){return this.makeEmpty(),this.expandByObject(e)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e){e.updateWorldMatrix(!1,!1);const t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),N.copy(t.boundingBox),N.applyMatrix4(e.matrixWorld),this.union(N));const n=e.children;for(let r=0,i=n.length;r<i;r++)this.expandByObject(n[r]);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,I),I.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(V),G.subVectors(this.max,V),j.subVectors(e.a,V),B.subVectors(e.b,V),F.subVectors(e.c,V),z.subVectors(B,j),H.subVectors(F,B),U.subVectors(j,F);let t=[0,-z.z,z.y,0,-H.z,H.y,0,-U.z,U.y,z.z,0,-z.x,H.z,0,-H.x,U.z,0,-U.x,-z.y,z.x,0,-H.y,H.x,0,-U.y,U.x,0];return!!X(t,j,B,F,G)&&(t=[1,0,0,0,1,0,0,0,1],!!X(t,j,B,F,G)&&(W.crossVectors(z,H),t=[W.x,W.y,W.z],X(t,j,B,F,G)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return I.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(I).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(D[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),D[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),D[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),D[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),D[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),D[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),D[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),D[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(D)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}L.prototype.isBox3=!0;const D=[new R,new R,new R,new R,new R,new R,new R,new R],I=new R,N=new L,j=new R,B=new R,F=new R,z=new R,H=new R,U=new R,V=new R,G=new R,W=new R,q=new R;function X(e,t,n,r,i){for(let o=0,a=e.length-3;o<=a;o+=3){q.fromArray(e,o);const a=i.x*Math.abs(q.x)+i.y*Math.abs(q.y)+i.z*Math.abs(q.z),s=t.dot(q),l=n.dot(q),c=r.dot(q);if(Math.max(-Math.max(s,l,c),Math.min(s,l,c))>a)return!1}return!0}const Y=new L,K=new R,Q=new R,Z=new R;class J{constructor(e=new R,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Y.setFromPoints(e).getCenter(n);let r=0;for(let i=0,o=e.length;i<o;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){Z.subVectors(e,this.center);const t=Z.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(Z.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return Q.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(K.copy(e.center).add(Q)),this.expandByPoint(K.copy(e.center).sub(Q)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const $=new R,ee=new R,te=new R,ne=new R,re=new R,ie=new R,oe=new R;class ae{constructor(e=new R,t=new R(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,$)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=$.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):($.copy(this.direction).multiplyScalar(t).add(this.origin),$.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){ee.copy(e).add(t).multiplyScalar(.5),te.copy(t).sub(e).normalize(),ne.copy(this.origin).sub(ee);const i=.5*e.distanceTo(t),o=-this.direction.dot(te),a=ne.dot(this.direction),s=-ne.dot(te),l=ne.lengthSq(),c=Math.abs(1-o*o);let u,h,d,f;if(c>0)if(u=o*s-a,h=o*a-s,f=i*c,u>=0)if(h>=-f)if(h<=f){const e=1/c;u*=e,h*=e,d=u*(u+o*h+2*a)+h*(o*u+h+2*s)+l}else h=i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;else h=-i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;else h<=-f?(u=Math.max(0,-(-o*i+a)),h=u>0?-i:Math.min(Math.max(-i,-s),i),d=-u*u+h*(h+2*s)+l):h<=f?(u=0,h=Math.min(Math.max(-i,-s),i),d=h*(h+2*s)+l):(u=Math.max(0,-(o*i+a)),h=u>0?i:Math.min(Math.max(-i,-s),i),d=-u*u+h*(h+2*s)+l);else h=o>0?-i:i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(te).multiplyScalar(h).add(ee),d}intersectSphere(e,t){$.subVectors(e.center,this.origin);const n=$.dot(this.direction),r=$.dot($)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,a,s;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),c>=0?(i=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(i=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),u>=0?(a=(e.min.z-h.z)*u,s=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,s=(e.min.z-h.z)*u),n>s||a>r?null:((a>n||n!==n)&&(n=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,$)}intersectTriangle(e,t,n,r,i){re.subVectors(t,e),ie.subVectors(n,e),oe.crossVectors(re,ie);let o,a=this.direction.dot(oe);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}ne.subVectors(this.origin,e);const s=o*this.direction.dot(ie.crossVectors(ne,ie));if(s<0)return null;const l=o*this.direction.dot(re.cross(ne));if(l<0)return null;if(s+l>a)return null;const c=-o*ne.dot(oe);return c<0?null:this.at(c/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class se{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new se).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/le.setFromMatrixColumn(e,0).length(),i=1/le.setFromMatrixColumn(e,1).length(),o=1/le.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=o*c,n=o*u,r=a*c,i=a*u;t[0]=s*c,t[4]=-s*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-a*s,t[2]=i-e*l,t[6]=r+n*l,t[10]=o*s}else if("YXZ"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e+i*a,t[4]=r*a-n,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=o*s}else if("ZXY"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e-i*a,t[4]=-o*u,t[8]=r+n*a,t[1]=n+r*a,t[5]=o*c,t[9]=i-e*a,t[2]=-o*l,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){const e=o*c,n=o*u,r=a*c,i=a*u;t[0]=s*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=s*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){const e=o*s,n=o*l,r=a*s,i=a*l;t[0]=s*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=o*c,t[9]=-a*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=o*s,n=o*l,r=a*s,i=a*l;t[0]=s*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=o*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=a*c,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(ue,e,he)}lookAt(e,t,n){const r=this.elements;return pe.subVectors(e,t),0===pe.lengthSq()&&(pe.z=1),pe.normalize(),de.crossVectors(n,pe),0===de.lengthSq()&&(1===Math.abs(n.z)?pe.x+=1e-4:pe.z+=1e-4,pe.normalize(),de.crossVectors(n,pe)),de.normalize(),fe.crossVectors(pe,de),r[0]=de.x,r[4]=fe.x,r[8]=pe.x,r[1]=de.y,r[5]=fe.y,r[9]=pe.y,r[2]=de.z,r[6]=fe.z,r[10]=pe.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],l=n[12],c=n[1],u=n[5],h=n[9],d=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],w=n[15],x=r[0],_=r[4],E=r[8],A=r[12],S=r[1],M=r[5],T=r[9],C=r[13],O=r[2],R=r[6],k=r[10],P=r[14],L=r[3],D=r[7],I=r[11],N=r[15];return i[0]=o*x+a*S+s*O+l*L,i[4]=o*_+a*M+s*R+l*D,i[8]=o*E+a*T+s*k+l*I,i[12]=o*A+a*C+s*P+l*N,i[1]=c*x+u*S+h*O+d*L,i[5]=c*_+u*M+h*R+d*D,i[9]=c*E+u*T+h*k+d*I,i[13]=c*A+u*C+h*P+d*N,i[2]=f*x+p*S+m*O+g*L,i[6]=f*_+p*M+m*R+g*D,i[10]=f*E+p*T+m*k+g*I,i[14]=f*A+p*C+m*P+g*N,i[3]=v*x+y*S+b*O+w*L,i[7]=v*_+y*M+b*R+w*D,i[11]=v*E+y*T+b*k+w*I,i[15]=v*A+y*C+b*P+w*N,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],l=e[13],c=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*s*u-r*l*u-i*a*h+n*l*h+r*a*d-n*s*d)+e[7]*(+t*s*d-t*l*h+i*o*h-r*o*d+r*l*c-i*s*c)+e[11]*(+t*l*u-t*a*d-i*o*u+n*o*d+i*a*c-n*l*c)+e[15]*(-r*a*c-t*s*u+t*a*h+r*o*u-n*o*h+n*s*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=u*m*l-p*h*l+p*s*d-a*m*d-u*s*g+a*h*g,y=f*h*l-c*m*l-f*s*d+o*m*d+c*s*g-o*h*g,b=c*p*l-f*u*l+f*a*d-o*p*d-c*a*g+o*u*g,w=f*u*s-c*p*s-f*a*h+o*p*h+c*a*m-o*u*m,x=t*v+n*y+r*b+i*w;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const _=1/x;return e[0]=v*_,e[1]=(p*h*i-u*m*i-p*r*d+n*m*d+u*r*g-n*h*g)*_,e[2]=(a*m*i-p*s*i+p*r*l-n*m*l-a*r*g+n*s*g)*_,e[3]=(u*s*i-a*h*i-u*r*l+n*h*l+a*r*d-n*s*d)*_,e[4]=y*_,e[5]=(c*m*i-f*h*i+f*r*d-t*m*d-c*r*g+t*h*g)*_,e[6]=(f*s*i-o*m*i-f*r*l+t*m*l+o*r*g-t*s*g)*_,e[7]=(o*h*i-c*s*i+c*r*l-t*h*l-o*r*d+t*s*d)*_,e[8]=b*_,e[9]=(f*u*i-c*p*i-f*n*d+t*p*d+c*n*g-t*u*g)*_,e[10]=(o*p*i-f*a*i+f*n*l-t*p*l-o*n*g+t*a*g)*_,e[11]=(c*a*i-o*u*i-c*n*l+t*u*l+o*n*d-t*a*d)*_,e[12]=w*_,e[13]=(c*p*r-f*u*r+f*n*h-t*p*h-c*n*m+t*u*m)*_,e[14]=(f*a*r-o*p*r-f*n*s+t*p*s+o*n*m-t*a*m)*_,e[15]=(o*u*r-c*a*r+c*n*s-t*u*s-o*n*h+t*a*h)*_,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,l=i*o,c=i*a;return this.set(l*o+n,l*a-r*s,l*s+r*a,0,l*a+r*s,c*a+n,c*s-r*o,0,l*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,l=i+i,c=o+o,u=a+a,h=i*l,d=i*c,f=i*u,p=o*c,m=o*u,g=a*u,v=s*l,y=s*c,b=s*u,w=n.x,x=n.y,_=n.z;return r[0]=(1-(p+g))*w,r[1]=(d+b)*w,r[2]=(f-y)*w,r[3]=0,r[4]=(d-b)*x,r[5]=(1-(h+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*_,r[9]=(m-v)*_,r[10]=(1-(h+p))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=le.set(r[0],r[1],r[2]).length();const o=le.set(r[4],r[5],r[6]).length(),a=le.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],ce.copy(this);const s=1/i,l=1/o,c=1/a;return ce.elements[0]*=s,ce.elements[1]*=s,ce.elements[2]*=s,ce.elements[4]*=l,ce.elements[5]*=l,ce.elements[6]*=l,ce.elements[8]*=c,ce.elements[9]*=c,ce.elements[10]*=c,t.setFromRotationMatrix(ce),n.x=i,n.y=o,n.z=a,this}makePerspective(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,s=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),u=(n+r)/(n-r),h=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,o){const a=this.elements,s=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*s,h=(n+r)*l,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}se.prototype.isMatrix4=!0;const le=new R,ce=new se,ue=new R(0,0,0),he=new R(1,1,1),de=new R,fe=new R,pe=new R,me=new se,ge=new O;class ve{constructor(e=0,t=0,n=0,r=ve.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],o=r[4],a=r[8],s=r[1],l=r[5],c=r[9],u=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(p(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-p(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(p(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-p(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(p(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-p(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return me.makeRotationFromQuaternion(e),this.setFromRotationMatrix(me,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ge.setFromEuler(this),this.setFromQuaternion(ge,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new R(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}ve.prototype.isEuler=!0,ve.DefaultOrder="XYZ",ve.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class ye{constructor(){this.mask=1}set(e){this.mask=1<<e|0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!==(this.mask&e.mask)}}let be=0;const we=new R,xe=new O,_e=new se,Ee=new R,Ae=new R,Se=new R,Me=new O,Te=new R(1,0,0),Ce=new R(0,1,0),Oe=new R(0,0,1),Re={type:"added"},ke={type:"removed"};class Pe extends c{constructor(){super(),Object.defineProperty(this,"id",{value:be++}),this.uuid=f(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Pe.DefaultUp.clone();const e=new R,t=new ve,n=new O,r=new R(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new se},normalMatrix:{value:new w}}),this.matrix=new se,this.matrixWorld=new se,this.matrixAutoUpdate=Pe.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ye,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return xe.setFromAxisAngle(e,t),this.quaternion.multiply(xe),this}rotateOnWorldAxis(e,t){return xe.setFromAxisAngle(e,t),this.quaternion.premultiply(xe),this}rotateX(e){return this.rotateOnAxis(Te,e)}rotateY(e){return this.rotateOnAxis(Ce,e)}rotateZ(e){return this.rotateOnAxis(Oe,e)}translateOnAxis(e,t){return we.copy(e).applyQuaternion(this.quaternion),this.position.add(we.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Te,e)}translateY(e){return this.translateOnAxis(Ce,e)}translateZ(e){return this.translateOnAxis(Oe,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(_e.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Ee.copy(e):Ee.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),Ae.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?_e.lookAt(Ae,Ee,this.up):_e.lookAt(Ee,Ae,this.up),this.quaternion.setFromRotationMatrix(_e),r&&(_e.extractRotation(r.matrixWorld),xe.setFromRotationMatrix(_e),this.quaternion.premultiply(xe.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(Re)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(ke)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(ke)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),_e.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),_e.multiply(e.parent.matrixWorld)),e.applyMatrix4(_e),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ae,e,Se),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ae,Me,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"===typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),a=o(e.images),s=o(e.shapes),l=o(e.skeletons),c=o(e.animations);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let n=0;n<e.children.length;n++){const t=e.children[n];this.add(t.clone())}return this}}Pe.DefaultUp=new R(0,1,0),Pe.DefaultMatrixAutoUpdate=!0,Pe.prototype.isObject3D=!0;const Le=new R,De=new R,Ie=new R,Ne=new R,je=new R,Be=new R,Fe=new R,ze=new R,He=new R,Ue=new R;class Ve{constructor(e=new R,t=new R,n=new R){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Le.subVectors(e,t),r.cross(Le);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){Le.subVectors(r,t),De.subVectors(n,t),Ie.subVectors(e,t);const o=Le.dot(Le),a=Le.dot(De),s=Le.dot(Ie),l=De.dot(De),c=De.dot(Ie),u=o*l-a*a;if(0===u)return i.set(-2,-1,-1);const h=1/u,d=(l*s-a*c)*h,f=(o*c-a*s)*h;return i.set(1-d-f,f,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Ne),Ne.x>=0&&Ne.y>=0&&Ne.x+Ne.y<=1}static getUV(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,Ne),s.set(0,0),s.addScaledVector(i,Ne.x),s.addScaledVector(o,Ne.y),s.addScaledVector(a,Ne.z),s}static isFrontFacing(e,t,n,r){return Le.subVectors(n,t),De.subVectors(e,t),Le.cross(De).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Le.subVectors(this.c,this.b),De.subVectors(this.a,this.b),.5*Le.cross(De).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ve.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Ve.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return Ve.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return Ve.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ve.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let o,a;je.subVectors(r,n),Be.subVectors(i,n),ze.subVectors(e,n);const s=je.dot(ze),l=Be.dot(ze);if(s<=0&&l<=0)return t.copy(n);He.subVectors(e,r);const c=je.dot(He),u=Be.dot(He);if(c>=0&&u<=c)return t.copy(r);const h=s*u-c*l;if(h<=0&&s>=0&&c<=0)return o=s/(s-c),t.copy(n).addScaledVector(je,o);Ue.subVectors(e,i);const d=je.dot(Ue),f=Be.dot(Ue);if(f>=0&&d<=f)return t.copy(i);const p=d*l-s*f;if(p<=0&&l>=0&&f<=0)return a=l/(l-f),t.copy(n).addScaledVector(Be,a);const m=c*f-d*u;if(m<=0&&u-c>=0&&d-f>=0)return Fe.subVectors(i,r),a=(u-c)/(u-c+(d-f)),t.copy(r).addScaledVector(Fe,a);const g=1/(m+p+h);return o=p*g,a=h*g,t.copy(n).addScaledVector(je,o).addScaledVector(Be,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Ge=0;class We extends c{constructor(){super(),Object.defineProperty(this,"id",{value:Ge++}),this.uuid=f(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}We.prototype.isMaterial=!0;const qe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Xe={h:0,s:0,l:0},Ye={h:0,s:0,l:0};function Ke(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function Qe(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Ze(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class Je{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=m(e,1),t=p(t,0,1),n=p(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Ke(i,r,e+1/3),this.g=Ke(i,r,e),this.b=Ke(i,r,e-1/3)}return this}setStyle(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const r=n[1],i=n[2];switch(r){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,t(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,t(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i)){const n=parseFloat(e[1])/360,r=parseInt(e[2],10)/100,i=parseInt(e[3],10)/100;return t(e[4]),this.setHSL(n,r,i)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=n[1],t=e.length;if(3===t)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===t)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=qe[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){const n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=Qe(e.r),this.g=Qe(e.g),this.b=Qe(e.b),this}copyLinearToSRGB(e){return this.r=Ze(e.r),this.g=Ze(e.g),this.b=Ze(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const t=this.r,n=this.g,r=this.b,i=Math.max(t,n,r),o=Math.min(t,n,r);let a,s;const l=(o+i)/2;if(o===i)a=0,s=0;else{const e=i-o;switch(s=l<=.5?e/(i+o):e/(2-i-o),i){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return e.h=a,e.s=s,e.l=l,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(Xe),Xe.h+=e,Xe.s+=t,Xe.l+=n,this.setHSL(Xe.h,Xe.s,Xe.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Xe),e.getHSL(Ye);const n=g(Xe.h,Ye.h,t),r=g(Xe.s,Ye.s,t),i=g(Xe.l,Ye.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}Je.NAMES=qe,Je.prototype.isColor=!0,Je.prototype.r=1,Je.prototype.g=1,Je.prototype.b=1;class $e extends We{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this}}$e.prototype.isMeshBasicMaterial=!0;const et=new R,tt=new b;class nt{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),i=new Je),t[n++]=i.r,t[n++]=i.g,t[n++]=i.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),i=new b),t[n++]=i.x,t[n++]=i.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),i=new R),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),i=new M),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n++]=i.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)tt.fromBufferAttribute(this,t),tt.applyMatrix3(e),this.setXY(t,tt.x,tt.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)et.fromBufferAttribute(this,t),et.applyMatrix3(e),this.setXYZ(t,et.x,et.y,et.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.applyMatrix4(e),this.setXYZ(t,et.x,et.y,et.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.applyNormalMatrix(e),this.setXYZ(t,et.x,et.y,et.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.transformDirection(e),this.setXYZ(t,et.x,et.y,et.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),35044!==this.usage&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}nt.prototype.isBufferAttribute=!0;class rt extends nt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class it extends nt{constructor(e,t,n){super(new Uint32Array(e),t,n)}}(class extends nt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}).prototype.isFloat16BufferAttribute=!0;class ot extends nt{constructor(e,t,n){super(new Float32Array(e),t,n)}}function at(e){if(0===e.length)return-1/0;let t=e[0];for(let n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;let st=0;const lt=new se,ct=new Pe,ut=new R,ht=new L,dt=new L,ft=new R;class pt extends c{constructor(){super(),Object.defineProperty(this,"id",{value:st++}),this.uuid=f(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(at(e)>65535?it:rt)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new w).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return lt.makeRotationFromQuaternion(e),this.applyMatrix4(lt),this}rotateX(e){return lt.makeRotationX(e),this.applyMatrix4(lt),this}rotateY(e){return lt.makeRotationY(e),this.applyMatrix4(lt),this}rotateZ(e){return lt.makeRotationZ(e),this.applyMatrix4(lt),this}translate(e,t,n){return lt.makeTranslation(e,t,n),this.applyMatrix4(lt),this}scale(e,t,n){return lt.makeScale(e,t,n),this.applyMatrix4(lt),this}lookAt(e){return ct.lookAt(e),ct.updateMatrix(),this.applyMatrix4(ct.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ut).negate(),this.translate(ut.x,ut.y,ut.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new ot(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new L);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new R(-1/0,-1/0,-1/0),new R(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const e=t[n];ht.setFromBufferAttribute(e),this.morphTargetsRelative?(ft.addVectors(this.boundingBox.min,ht.min),this.boundingBox.expandByPoint(ft),ft.addVectors(this.boundingBox.max,ht.max),this.boundingBox.expandByPoint(ft)):(this.boundingBox.expandByPoint(ht.min),this.boundingBox.expandByPoint(ht.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new J);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new R,1/0);if(e){const n=this.boundingSphere.center;if(ht.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){const n=t[e];dt.setFromBufferAttribute(n),this.morphTargetsRelative?(ft.addVectors(ht.min,dt.min),ht.expandByPoint(ft),ft.addVectors(ht.max,dt.max),ht.expandByPoint(ft)):(ht.expandByPoint(dt.min),ht.expandByPoint(dt.max))}ht.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)ft.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(ft));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],a=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)ft.fromBufferAttribute(o,t),a&&(ut.fromBufferAttribute(e,t),ft.add(ut)),r=Math.max(r,n.distanceToSquared(ft))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new nt(new Float32Array(4*a),4));const s=t.tangent.array,l=[],c=[];for(let b=0;b<a;b++)l[b]=new R,c[b]=new R;const u=new R,h=new R,d=new R,f=new b,p=new b,m=new b,g=new R,v=new R;function y(e,t,n){u.fromArray(r,3*e),h.fromArray(r,3*t),d.fromArray(r,3*n),f.fromArray(o,2*e),p.fromArray(o,2*t),m.fromArray(o,2*n),h.sub(u),d.sub(u),p.sub(f),m.sub(f);const i=1/(p.x*m.y-m.x*p.y);isFinite(i)&&(g.copy(h).multiplyScalar(m.y).addScaledVector(d,-p.y).multiplyScalar(i),v.copy(d).multiplyScalar(p.x).addScaledVector(h,-m.x).multiplyScalar(i),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(v),c[t].add(v),c[n].add(v))}let w=this.groups;0===w.length&&(w=[{start:0,count:n.length}]);for(let b=0,M=w.length;b<M;++b){const e=w[b],t=e.start;for(let r=t,i=t+e.count;r<i;r+=3)y(n[r+0],n[r+1],n[r+2])}const x=new R,_=new R,E=new R,A=new R;function S(e){E.fromArray(i,3*e),A.copy(E);const t=l[e];x.copy(t),x.sub(E.multiplyScalar(E.dot(t))).normalize(),_.crossVectors(A,t);const n=_.dot(c[e])<0?-1:1;s[4*e]=x.x,s[4*e+1]=x.y,s[4*e+2]=x.z,s[4*e+3]=n}for(let b=0,M=w.length;b<M;++b){const e=w[b],t=e.start;for(let r=t,i=t+e.count;r<i;r+=3)S(n[r+0]),S(n[r+1]),S(n[r+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new nt(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new R,i=new R,o=new R,a=new R,s=new R,l=new R,c=new R,u=new R;if(e)for(let h=0,d=e.count;h<d;h+=3){const d=e.getX(h+0),f=e.getX(h+1),p=e.getX(h+2);r.fromBufferAttribute(t,d),i.fromBufferAttribute(t,f),o.fromBufferAttribute(t,p),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),a.fromBufferAttribute(n,d),s.fromBufferAttribute(n,f),l.fromBufferAttribute(n,p),a.add(c),s.add(c),l.add(c),n.setXYZ(d,a.x,a.y,a.z),n.setXYZ(f,s.x,s.y,s.z),n.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,h=t.count;e<h;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const r in n){if(void 0===e.attributes[r])continue;const i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,l=Math.min(a.length,i.length-s);for(let e=0,t=s;e<l;e++,t++)i[t]=a[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ft.fromBufferAttribute(e,t),ft.normalize(),e.setXYZ(t,ft.x,ft.y,ft.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let a=0,s=0;for(let l=0,c=t.length;l<c;l++){a=e.isInterleavedBufferAttribute?t[l]*e.data.stride+e.offset:t[l]*r;for(let e=0;e<r;e++)o[s++]=n[a++]}return new nt(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new pt,n=this.index.array,r=this.attributes;for(const a in r){const i=e(r[a],n);t.setAttribute(a,i)}const i=this.morphAttributes;for(const a in i){const r=[],o=i[a];for(let t=0,i=o.length;t<i;t++){const i=e(o[t],n);r.push(i)}t.morphAttributes[a]=r}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,s=o.length;a<s;a++){const e=o[a];t.addGroup(e.start,e.count,e.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const s in n){const t=n[s];e.data.attributes[s]=t.toJSON(e.data)}const r={};let i=!1;for(const s in this.morphAttributes){const t=this.morphAttributes[s],n=[];for(let r=0,i=t.length;r<i;r++){const i=t[r];n.push(i.toJSON(e.data))}n.length>0&&(r[s]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new pt).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r<i;r++)e.push(n[r].clone(t));this.morphAttributes[l]=e}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let l=0,c=o.length;l<c;l++){const e=o[l];this.addGroup(e.start,e.count,e.materialIndex)}const a=e.boundingBox;null!==a&&(this.boundingBox=a.clone());const s=e.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}pt.prototype.isBufferGeometry=!0;const mt=new se,gt=new ae,vt=new J,yt=new R,bt=new R,wt=new R,xt=new R,_t=new R,Et=new R,At=new R,St=new R,Mt=new R,Tt=new b,Ct=new b,Ot=new b,Rt=new R,kt=new R;class Pt extends Pe{constructor(e=new pt,t=new $e){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),vt.copy(n.boundingSphere),vt.applyMatrix4(i),!1===e.ray.intersectsSphere(vt))return;if(mt.copy(i).invert(),gt.copy(e.ray).applyMatrix4(mt),null!==n.boundingBox&&!1===gt.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position,s=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,u=n.attributes.uv2,h=n.groups,d=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,f=h.length;n<f;n++){const f=h[n],p=r[f.materialIndex];for(let n=Math.max(f.start,d.start),r=Math.min(f.start+f.count,d.start+d.count);n<r;n+=3){const r=i.getX(n),h=i.getX(n+1),d=i.getX(n+2);o=Lt(this,p,e,gt,a,s,l,c,u,r,h,d),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=f.materialIndex,t.push(o))}}else{for(let n=Math.max(0,d.start),h=Math.min(i.count,d.start+d.count);n<h;n+=3){const h=i.getX(n),d=i.getX(n+1),f=i.getX(n+2);o=Lt(this,r,e,gt,a,s,l,c,u,h,d,f),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}else if(void 0!==a)if(Array.isArray(r))for(let n=0,f=h.length;n<f;n++){const i=h[n],f=r[i.materialIndex];for(let n=Math.max(i.start,d.start),r=Math.min(i.start+i.count,d.start+d.count);n<r;n+=3){o=Lt(this,f,e,gt,a,s,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,t.push(o))}}else{for(let n=Math.max(0,d.start),i=Math.min(a.count,d.start+d.count);n<i;n+=3){o=Lt(this,r,e,gt,a,s,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function Lt(e,t,n,r,i,o,s,l,c,u,h,d){yt.fromBufferAttribute(i,u),bt.fromBufferAttribute(i,h),wt.fromBufferAttribute(i,d);const f=e.morphTargetInfluences;if(t.morphTargets&&o&&f){At.set(0,0,0),St.set(0,0,0),Mt.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=f[e],n=o[e];0!==t&&(xt.fromBufferAttribute(n,u),_t.fromBufferAttribute(n,h),Et.fromBufferAttribute(n,d),s?(At.addScaledVector(xt,t),St.addScaledVector(_t,t),Mt.addScaledVector(Et,t)):(At.addScaledVector(xt.sub(yt),t),St.addScaledVector(_t.sub(bt),t),Mt.addScaledVector(Et.sub(wt),t)))}yt.add(At),bt.add(St),wt.add(Mt)}e.isSkinnedMesh&&(e.boneTransform(u,yt),e.boneTransform(h,bt),e.boneTransform(d,wt));const p=function(e,t,n,r,i,o,s,l){let c;if(c=t.side===a?r.intersectTriangle(s,o,i,!0,l):r.intersectTriangle(i,o,s,2!==t.side,l),null===c)return null;kt.copy(l),kt.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(kt);return u<n.near||u>n.far?null:{distance:u,point:kt.clone(),object:e}}(e,t,n,r,yt,bt,wt,Rt);if(p){l&&(Tt.fromBufferAttribute(l,u),Ct.fromBufferAttribute(l,h),Ot.fromBufferAttribute(l,d),p.uv=Ve.getUV(Rt,yt,bt,wt,Tt,Ct,Ot,new b)),c&&(Tt.fromBufferAttribute(c,u),Ct.fromBufferAttribute(c,h),Ot.fromBufferAttribute(c,d),p.uv2=Ve.getUV(Rt,yt,bt,wt,Tt,Ct,Ot,new b));const e={a:u,b:h,c:d,normal:new R,materialIndex:0};Ve.getNormal(yt,bt,wt,e.normal),p.face=e}return p}Pt.prototype.isMesh=!0;class Dt extends pt{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const a=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const s=[],l=[],c=[],u=[];let h=0,d=0;function f(e,t,n,r,i,o,f,p,m,g,v){const y=o/m,b=f/g,w=o/2,x=f/2,_=p/2,E=m+1,A=g+1;let S=0,M=0;const T=new R;for(let a=0;a<A;a++){const o=a*b-x;for(let s=0;s<E;s++){const h=s*y-w;T[e]=h*r,T[t]=o*i,T[n]=_,l.push(T.x,T.y,T.z),T[e]=0,T[t]=0,T[n]=p>0?1:-1,c.push(T.x,T.y,T.z),u.push(s/m),u.push(1-a/g),S+=1}}for(let a=0;a<g;a++)for(let e=0;e<m;e++){const t=h+e+E*a,n=h+e+E*(a+1),r=h+(e+1)+E*(a+1),i=h+(e+1)+E*a;s.push(t,n,i),s.push(n,r,i),M+=6}a.addGroup(d,M,v),d+=M,h+=S}f("z","y","x",-1,-1,n,t,e,o,i,0),f("z","y","x",1,-1,n,t,-e,o,i,1),f("x","z","y",1,1,e,n,t,r,o,2),f("x","z","y",1,-1,e,n,-t,r,o,3),f("x","y","z",1,-1,e,t,n,r,i,4),f("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new ot(l,3)),this.setAttribute("normal",new ot(c,3)),this.setAttribute("uv",new ot(u,2))}static fromJSON(e){return new Dt(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function It(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function Nt(e){const t={};for(let n=0;n<e.length;n++){const r=It(e[n]);for(const e in r)t[e]=r[e]}return t}const jt={clone:It,merge:Nt};class Bt extends We{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=It(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}Bt.prototype.isShaderMaterial=!0;class Ft extends Pe{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new se,this.projectionMatrix=new se,this.projectionMatrixInverse=new se}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}Ft.prototype.isCamera=!0;class zt extends Ft{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*d*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*h*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*d*Math.atan(Math.tan(.5*h*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*h*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,a=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/a,r*=o.width/e,n*=o.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}zt.prototype.isPerspectiveCamera=!0;class Ht extends Pe{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new zt(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new R(1,0,0)),this.add(r);const i=new zt(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new R(-1,0,0)),this.add(i);const o=new zt(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new R(0,1,0)),this.add(o);const a=new zt(90,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new R(0,-1,0)),this.add(a);const s=new zt(90,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new R(0,0,1)),this.add(s);const l=new zt(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new R(0,0,-1)),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,a,s,l]=this.children,c=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=c}}class Ut extends A{constructor(e,t,n,r,i,o,a,s,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:301,n,r,i,o,a=void 0!==a?a:1022,s,l,c),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}Ut.prototype.isCubeTexture=!0;class Vt extends T{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new Ut(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:s,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=l,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new Dt(5,5,5),i=new Bt({name:"CubemapFromEquirect",uniforms:It(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:a,blending:0});i.uniforms.tEquirect.value=t;const o=new Pt(r,i),c=t.minFilter;1008===t.minFilter&&(t.minFilter=s);return new Ht(1,10,this).update(e,o),t.minFilter=c,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(i)}}Vt.prototype.isWebGLCubeRenderTarget=!0;const Gt=new R,Wt=new R,qt=new w;class Xt{constructor(e=new R(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=Gt.subVectors(n,t).cross(Wt.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(Gt),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||qt.getNormalMatrix(e),r=this.coplanarPoint(Gt).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}Xt.prototype.isPlane=!0;const Yt=new J,Kt=new R;class Qt{constructor(e=new Xt,t=new Xt,n=new Xt,r=new Xt,i=new Xt,o=new Xt){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(a-r,u-s,p-h,y-m).normalize(),t[1].setComponents(a+r,u+s,p+h,y+m).normalize(),t[2].setComponents(a+i,u+l,p+d,y+g).normalize(),t[3].setComponents(a-i,u-l,p-d,y-g).normalize(),t[4].setComponents(a-o,u-c,p-f,y-v).normalize(),t[5].setComponents(a+o,u+c,p+f,y+v).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Yt.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Yt)}intersectsSprite(e){return Yt.center.set(0,0,0),Yt.radius=.7071067811865476,Yt.applyMatrix4(e.matrixWorld),this.intersectsSphere(Yt)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Kt.x=r.normal.x>0?e.max.x:e.min.x,Kt.y=r.normal.y>0?e.max.y:e.min.y,Kt.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Kt)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Zt(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Jt(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);void 0===o?r.set(t,function(t,r){const i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();let s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:(i instanceof Uint8Array||i instanceof Uint8ClampedArray)&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):o.version<t.version&&(!function(t,r,i){const o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(o.buffer,t,i),o.version=t.version)}}}class $t extends pt{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,a=Math.floor(n),s=Math.floor(r),l=a+1,c=s+1,u=e/a,h=t/s,d=[],f=[],p=[],m=[];for(let g=0;g<c;g++){const e=g*h-o;for(let t=0;t<l;t++){const n=t*u-i;f.push(n,-e,0),p.push(0,0,1),m.push(t/a),m.push(1-g/s)}}for(let g=0;g<s;g++)for(let e=0;e<a;e++){const t=e+l*g,n=e+l*(g+1),r=e+1+l*(g+1),i=e+1+l*g;d.push(t,n,i),d.push(n,r,i)}this.setIndex(d),this.setAttribute("position",new ot(f,3)),this.setAttribute("normal",new ot(p,3)),this.setAttribute("uv",new ot(m,2))}static fromJSON(e){return new $t(e.width,e.height,e.widthSegments,e.heightSegments)}}const en={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSNMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n\tvec3 v = normalize( cameraPosition - pos );\n\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n\tvec3 transmission = transmissionFactor * getIBLVolumeRefraction(\n\t\tnormal, v, roughnessFactor, material.diffuseColor, totalSpecular,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec4 vWorldPosition;\n\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n\t\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\n\t\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\n\t\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\n\t\treturn normalize(refractionVector) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness(float roughness, float ior) {\n\t\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n\t}\n\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n\t\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n\t\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n\t}\n\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n\t\tif (attenuationDistance == 0.0) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n\t\t\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, float attenuationDistance) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n\t\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n\t\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform vec3 attenuationColor;\n\tuniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <transmission_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#ifdef USE_TRANSMISSION\n\tvarying vec4 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition;\n#endif\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},tn={common:{diffuse:{value:new Je(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new w},uv2Transform:{value:new w},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new b(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Je(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Je(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new w}},sprite:{diffuse:{value:new Je(16777215)},opacity:{value:1},center:{value:new b(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new w}}},nn={basic:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.fog]),vertexShader:en.meshbasic_vert,fragmentShader:en.meshbasic_frag},lambert:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.fog,tn.lights,{emissive:{value:new Je(0)}}]),vertexShader:en.meshlambert_vert,fragmentShader:en.meshlambert_frag},phong:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.fog,tn.lights,{emissive:{value:new Je(0)},specular:{value:new Je(1118481)},shininess:{value:30}}]),vertexShader:en.meshphong_vert,fragmentShader:en.meshphong_frag},standard:{uniforms:Nt([tn.common,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.roughnessmap,tn.metalnessmap,tn.fog,tn.lights,{emissive:{value:new Je(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:en.meshphysical_vert,fragmentShader:en.meshphysical_frag},toon:{uniforms:Nt([tn.common,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.gradientmap,tn.fog,tn.lights,{emissive:{value:new Je(0)}}]),vertexShader:en.meshtoon_vert,fragmentShader:en.meshtoon_frag},matcap:{uniforms:Nt([tn.common,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.fog,{matcap:{value:null}}]),vertexShader:en.meshmatcap_vert,fragmentShader:en.meshmatcap_frag},points:{uniforms:Nt([tn.points,tn.fog]),vertexShader:en.points_vert,fragmentShader:en.points_frag},dashed:{uniforms:Nt([tn.common,tn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:en.linedashed_vert,fragmentShader:en.linedashed_frag},depth:{uniforms:Nt([tn.common,tn.displacementmap]),vertexShader:en.depth_vert,fragmentShader:en.depth_frag},normal:{uniforms:Nt([tn.common,tn.bumpmap,tn.normalmap,tn.displacementmap,{opacity:{value:1}}]),vertexShader:en.normal_vert,fragmentShader:en.normal_frag},sprite:{uniforms:Nt([tn.sprite,tn.fog]),vertexShader:en.sprite_vert,fragmentShader:en.sprite_frag},background:{uniforms:{uvTransform:{value:new w},t2D:{value:null}},vertexShader:en.background_vert,fragmentShader:en.background_frag},cube:{uniforms:Nt([tn.envmap,{opacity:{value:1}}]),vertexShader:en.cube_vert,fragmentShader:en.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:en.equirect_vert,fragmentShader:en.equirect_frag},distanceRGBA:{uniforms:Nt([tn.common,tn.displacementmap,{referencePosition:{value:new R},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:en.distanceRGBA_vert,fragmentShader:en.distanceRGBA_frag},shadow:{uniforms:Nt([tn.lights,tn.fog,{color:{value:new Je(0)},opacity:{value:1}}]),vertexShader:en.shadow_vert,fragmentShader:en.shadow_frag}};function rn(e,t,n,r,i){const o=new Je(0);let s,l,c=0,u=null,h=0,d=null;function f(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),c=t,f(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,f(o,c)},render:function(n,i){let p=!1,m=!0===i.isScene?i.background:null;m&&m.isTexture&&(m=t.get(m));const g=e.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?f(o,c):m&&m.isColor&&(f(m,1),p=!0),(e.autoClear||p)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||306===m.mapping)?(void 0===l&&(l=new Pt(new Dt(1,1,1),new Bt({name:"BackgroundCubeMaterial",uniforms:It(nn.cube.uniforms),vertexShader:nn.cube.vertexShader,fragmentShader:nn.cube.fragmentShader,side:a,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),l.material.uniforms.envMap.value=m,l.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m._needsFlipEnvMap?-1:1,u===m&&h===m.version&&d===e.toneMapping||(l.material.needsUpdate=!0,u=m,h=m.version,d=e.toneMapping),n.unshift(l,l.geometry,l.material,0,0,null)):m&&m.isTexture&&(void 0===s&&(s=new Pt(new $t(2,2),new Bt({name:"BackgroundMaterial",uniforms:It(nn.background.uniforms),vertexShader:nn.background.vertexShader,fragmentShader:nn.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),Object.defineProperty(s.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(s)),s.material.uniforms.t2D.value=m,!0===m.matrixAutoUpdate&&m.updateMatrix(),s.material.uniforms.uvTransform.value.copy(m.matrix),u===m&&h===m.version&&d===e.toneMapping||(s.material.needsUpdate=!0,u=m,h=m.version,d=e.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null))}}}function on(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},l=d(null);let c=l;function u(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function d(e){const t=[],n=[],r=[];for(let o=0;o<i;o++)t[o]=0,n[o]=0,r[o]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function p(e){m(e,0)}function m(n,i){const o=c.newAttributes,a=c.enabledAttributes,s=c.attributeDivisors;if(o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i}}function g(){const t=c.newAttributes,n=c.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function y(){b(),c!==l&&(c=l,u(c.object))}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,y,b){let w=!1;if(a){const t=function(t,n,i){const a=!0===i.wireframe;let l=s[t.id];void 0===l&&(l={},s[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[a];void 0===u&&(u=d(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[a]=u);return u}(y,h,l);c!==t&&(c=t,u(c.object)),w=function(e,t){const n=c.attributes,r=e.attributes;let i=0;for(const o in r){const e=n[o],t=r[o];if(void 0===e)return!0;if(e.attribute!==t)return!0;if(e.data!==t.data)return!0;i++}return c.attributesNum!==i||c.index!==t}(y,b),w&&function(e,t){const n={},r=e.attributes;let i=0;for(const o in r){const e=r[o],t={};t.attribute=e,e.data&&(t.data=e.data),n[o]=t,i++}c.attributes=n,c.attributesNum=i,c.index=t}(y,b)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===e||(c.geometry=y.id,c.program=h.id,c.wireframe=e,w=!0)}!0===i.isInstancedMesh&&(w=!0),null!==b&&n.update(b,34963),w&&(!function(i,o,a,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=s.attributes,c=a.getAttributes(),u=o.defaultAttributeValues;for(const t in c){const r=c[t];if(r>=0){const o=l[t];if(void 0!==o){const t=o.normalized,i=o.itemSize,a=n.get(o);if(void 0===a)continue;const l=a.buffer,c=a.type,u=a.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,a=n.stride,h=o.offset;n&&n.isInstancedInterleavedBuffer?(m(r,n.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)):p(r),e.bindBuffer(34962,l),v(r,i,c,t,a*u,h*u)}else o.isInstancedBufferAttribute?(m(r,o.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=o.meshPerAttribute*o.count)):p(r),e.bindBuffer(34962,l),v(r,i,c,t,0,0)}else if("instanceMatrix"===t){const t=n.get(i.instanceMatrix);if(void 0===t)continue;const o=t.buffer,a=t.type;m(r+0,1),m(r+1,1),m(r+2,1),m(r+3,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r+0,4,a,!1,64,0),e.vertexAttribPointer(r+1,4,a,!1,64,16),e.vertexAttribPointer(r+2,4,a,!1,64,32),e.vertexAttribPointer(r+3,4,a,!1,64,48)}else if("instanceColor"===t){const t=n.get(i.instanceColor);if(void 0===t)continue;const o=t.buffer,a=t.type;m(r,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r,3,a,!1,12,0)}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r,n);break;case 3:e.vertexAttrib3fv(r,n);break;case 4:e.vertexAttrib4fv(r,n);break;default:e.vertexAttrib1fv(r,n)}}}}g()}(i,l,h,y),null!==b&&e.bindBuffer(34963,n.get(b).buffer))},reset:y,resetDefaultState:b,dispose:function(){y();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0===s[e.id])return;const t=s[e.id];for(const n in t){const e=t[n];for(const t in e)h(e[t].object),delete e[t];delete t[n]}delete s[e.id]},releaseStatesOfProgram:function(e){for(const t in s){const n=s[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)h(r[e].object),delete r[e];delete n[e.id]}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:g}}function an(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,a,s){if(0===s)return;let l,c;if(i)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](o,r,a,s),n.update(a,o,s)}}function sn(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);const l=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),h=e.getParameter(35660),d=e.getParameter(3379),f=e.getParameter(34076),p=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),v=e.getParameter(36349),y=h>0,b=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:y&&b,maxSamples:o?e.getParameter(36183):0}}function ln(e){const t=this;let n=null,r=0,i=!1,o=!1;const a=new Xt,s=new w,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=l.value,!0!==i||null===c){const t=r+4*o,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let n=0,l=r;n!==o;++n,l+=4)a.copy(e[n]).applyMatrix4(i,s),a.normal.toArray(c,l),c[l+3]=a.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const a=0!==e.length||t||0!==r||i;return i=t,n=u(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,a,s){const h=t.clippingPlanes,d=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===h||0===h.length||o&&!f)o?u(null):c();else{const e=o?0:r,t=4*e;let i=p.clippingState||null;l.value=i,i=u(h,a,t,s);for(let r=0;r!==t;++r)i[r]=n[r];p.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function cn(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping;if(303===o||304===o){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const a=e.getRenderTarget(),s=new Vt(o.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),e.setRenderTarget(a),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}function un(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function hn(e,t,n,r){const i={},o=new WeakMap;function a(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const n in s.attributes)t.remove(s.attributes[n]);s.removeEventListener("dispose",a),delete i[s.id];const l=o.get(s);l&&(t.remove(l),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){const n=[],r=e.index,i=e.attributes.position;let a=0;if(null!==r){const e=r.array;a=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{const e=i.array;a=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const s=new(at(n)>65535?it:rt)(n,1);s.version=a;const l=o.get(e);l&&t.remove(l),o.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const i in n)t.update(n[i],34962);const r=e.morphAttributes;for(const i in r){const e=r[i];for(let n=0,r=e.length;n<r;n++)t.update(e[n],34962)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function dn(e,t,n,r){const i=r.isWebGL2;let o,a,s;this.setMode=function(e){o=e},this.setIndex=function(e){a=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,a,t*s),n.update(r,o,1)},this.renderInstances=function(r,l,c){if(0===c)return;let u,h;if(i)u=e,h="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),h="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[h](o,l,a,r*s,c),n.update(l,o,c)}}function fn(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function pn(e,t){return e[0]-t[0]}function mn(e,t){return Math.abs(t[1])-Math.abs(e[1])}function gn(e){const t={},n=new Float32Array(8),r=[];for(let i=0;i<8;i++)r[i]=[i,0];return{update:function(i,o,a,s){const l=i.morphTargetInfluences,c=void 0===l?0:l.length;let u=t[o.id];if(void 0===u||u.length!==c){u=[];for(let e=0;e<c;e++)u[e]=[e,0];t[o.id]=u}for(let e=0;e<c;e++){const t=u[e];t[0]=e,t[1]=l[e]}u.sort(mn);for(let e=0;e<8;e++)e<c&&u[e][1]?(r[e][0]=u[e][0],r[e][1]=u[e][1]):(r[e][0]=Number.MAX_SAFE_INTEGER,r[e][1]=0);r.sort(pn);const h=a.morphTargets&&o.morphAttributes.position,d=a.morphNormals&&o.morphAttributes.normal;let f=0;for(let e=0;e<8;e++){const t=r[e],i=t[0],a=t[1];i!==Number.MAX_SAFE_INTEGER&&a?(h&&o.getAttribute("morphTarget"+e)!==h[i]&&o.setAttribute("morphTarget"+e,h[i]),d&&o.getAttribute("morphNormal"+e)!==d[i]&&o.setAttribute("morphNormal"+e,d[i]),n[e]=a,f+=a):(h&&!0===o.hasAttribute("morphTarget"+e)&&o.deleteAttribute("morphTarget"+e),d&&!0===o.hasAttribute("morphNormal"+e)&&o.deleteAttribute("morphNormal"+e),n[e]=0)}const p=o.morphTargetsRelative?1:1-f;s.getUniforms().setValue(e,"morphTargetBaseInfluence",p),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function vn(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const a=r.render.frame,s=e.geometry,l=t.get(e,s);return i.get(l)!==a&&(t.update(l),i.set(l,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}nn.physical={uniforms:Nt([nn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new b(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Je(0)},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new b},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Je(0)}}]),vertexShader:en.meshphysical_vert,fragmentShader:en.meshphysical_frag};class yn extends A{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}yn.prototype.isDataTexture2DArray=!0;class bn extends A{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}bn.prototype.isDataTexture3D=!0;const wn=new A,xn=new yn,_n=new bn,En=new Ut,An=[],Sn=[],Mn=new Float32Array(16),Tn=new Float32Array(9),Cn=new Float32Array(4);function On(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=An[i];if(void 0===o&&(o=new Float32Array(i),An[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function Rn(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function kn(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function Pn(e,t){let n=Sn[t];void 0===n&&(n=new Int32Array(t),Sn[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function Ln(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Dn(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(Rn(n,t))return;e.uniform2fv(this.addr,t),kn(n,t)}}function In(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(Rn(n,t))return;e.uniform3fv(this.addr,t),kn(n,t)}}function Nn(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(Rn(n,t))return;e.uniform4fv(this.addr,t),kn(n,t)}}function jn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Cn.set(r),e.uniformMatrix2fv(this.addr,!1,Cn),kn(n,r)}}function Bn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Tn.set(r),e.uniformMatrix3fv(this.addr,!1,Tn),kn(n,r)}}function Fn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Mn.set(r),e.uniformMatrix4fv(this.addr,!1,Mn),kn(n,r)}}function zn(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Hn(e,t){const n=this.cache;Rn(n,t)||(e.uniform2iv(this.addr,t),kn(n,t))}function Un(e,t){const n=this.cache;Rn(n,t)||(e.uniform3iv(this.addr,t),kn(n,t))}function Vn(e,t){const n=this.cache;Rn(n,t)||(e.uniform4iv(this.addr,t),kn(n,t))}function Gn(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function Wn(e,t){const n=this.cache;Rn(n,t)||(e.uniform2uiv(this.addr,t),kn(n,t))}function qn(e,t){const n=this.cache;Rn(n,t)||(e.uniform3uiv(this.addr,t),kn(n,t))}function Xn(e,t){const n=this.cache;Rn(n,t)||(e.uniform4uiv(this.addr,t),kn(n,t))}function Yn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||wn,i)}function Kn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||_n,i)}function Qn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||En,i)}function Zn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||xn,i)}function Jn(e,t){e.uniform1fv(this.addr,t)}function $n(e,t){const n=On(t,this.size,2);e.uniform2fv(this.addr,n)}function er(e,t){const n=On(t,this.size,3);e.uniform3fv(this.addr,n)}function tr(e,t){const n=On(t,this.size,4);e.uniform4fv(this.addr,n)}function nr(e,t){const n=On(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function rr(e,t){const n=On(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function ir(e,t){const n=On(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function or(e,t){e.uniform1iv(this.addr,t)}function ar(e,t){e.uniform2iv(this.addr,t)}function sr(e,t){e.uniform3iv(this.addr,t)}function lr(e,t){e.uniform4iv(this.addr,t)}function cr(e,t){e.uniform1uiv(this.addr,t)}function ur(e,t){e.uniform2uiv(this.addr,t)}function hr(e,t){e.uniform3uiv(this.addr,t)}function dr(e,t){e.uniform4uiv(this.addr,t)}function fr(e,t,n){const r=t.length,i=Pn(n,r);e.uniform1iv(this.addr,i);for(let o=0;o!==r;++o)n.safeSetTexture2D(t[o]||wn,i[o])}function pr(e,t,n){const r=t.length,i=Pn(n,r);e.uniform1iv(this.addr,i);for(let o=0;o!==r;++o)n.safeSetTextureCube(t[o]||En,i[o])}function mr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Ln;case 35664:return Dn;case 35665:return In;case 35666:return Nn;case 35674:return jn;case 35675:return Bn;case 35676:return Fn;case 5124:case 35670:return zn;case 35667:case 35671:return Hn;case 35668:case 35672:return Un;case 35669:case 35673:return Vn;case 5125:return Gn;case 36294:return Wn;case 36295:return qn;case 36296:return Xn;case 35678:case 36198:case 36298:case 36306:case 35682:return Yn;case 35679:case 36299:case 36307:return Kn;case 35680:case 36300:case 36308:case 36293:return Qn;case 36289:case 36303:case 36311:case 36292:return Zn}}(t.type)}function gr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Jn;case 35664:return $n;case 35665:return er;case 35666:return tr;case 35674:return nr;case 35675:return rr;case 35676:return ir;case 5124:case 35670:return or;case 35667:case 35671:return ar;case 35668:case 35672:return sr;case 35669:case 35673:return lr;case 5125:return cr;case 36294:return ur;case 36295:return hr;case 36296:return dr;case 35678:case 36198:case 36298:case 36306:case 35682:return fr;case 35680:case 36300:case 36308:case 36293:return pr}}(t.type)}function vr(e){this.id=e,this.seq=[],this.map={}}gr.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),kn(t,e)},vr.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}};const yr=/(\w+)(\])?(\[|\.)?/g;function br(e,t){e.seq.push(t),e.map[t.id]=t}function wr(e,t,n){const r=e.name,i=r.length;for(yr.lastIndex=0;;){const o=yr.exec(r),a=yr.lastIndex;let s=o[1];const l="]"===o[2],c=o[3];if(l&&(s|=0),void 0===c||"["===c&&a+2===i){br(n,void 0===c?new mr(s,e,t):new gr(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new vr(s),br(n,e)),n=e}}}function xr(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);wr(n,e.getUniformLocation(t,n.name),this)}}function _r(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}xr.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},xr.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},xr.upload=function(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],a=n[o.id];!1!==a.needsUpdate&&o.setValue(e,a.value,r)}},xr.seqWithValue=function(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n};let Er=0;function Ar(e){switch(e){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Sr(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";return"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(e){const t=e.split("\n");for(let n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(e.getShaderSource(t))}function Mr(e,t){const n=Ar(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Tr(e,t){const n=Ar(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Cr(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Or(e){return""!==e}function Rr(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function kr(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Pr=/^[ \t]*#include +<([\w\d./]+)>/gm;function Lr(e){return e.replace(Pr,Dr)}function Dr(e,t){const n=en[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Lr(n)}const Ir=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Nr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function jr(e){return e.replace(Nr,Fr).replace(Ir,Br)}function Br(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Fr(e,t,n,r)}function Fr(e,t,n,r){let i="";for(let o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function zr(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Hr(e,t,n,r){const i=e.getContext(),o=n.defines;let a=n.vertexShader,s=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),u=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case 302:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),h=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),d=e.gammaFactor>0?e.gammaFactor:1,f=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission>0)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Or).join("\n")}(n),p=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),m=i.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=[p].filter(Or).join("\n"),g.length>0&&(g+="\n"),v=[f,p].filter(Or).join("\n"),v.length>0&&(v+="\n")):(g=[zr(n),"#define SHADER_NAME "+n.shaderName,p,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+d,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Or).join("\n"),v=[f,zr(n),"#define SHADER_NAME "+n.shaderName,p,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+d,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?en.tonemapping_pars_fragment:"",0!==n.toneMapping?Cr("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",en.encodings_pars_fragment,n.map?Mr("mapTexelToLinear",n.mapEncoding):"",n.matcap?Mr("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Mr("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Mr("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?Mr("lightMapTexelToLinear",n.lightMapEncoding):"",Tr("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Or).join("\n")),a=Lr(a),a=Rr(a,n),a=kr(a,n),s=Lr(s),s=Rr(s,n),s=kr(s,n),a=jr(a),s=jr(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in","300 es"===n.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+v);const b=y+v+s,w=_r(i,35633,y+g+a),x=_r(i,35632,b);if(i.attachShader(m,w),i.attachShader(m,x),void 0!==n.index0AttributeName?i.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(m).trim(),t=i.getShaderInfoLog(w).trim(),n=i.getShaderInfoLog(x).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(m,35714)){r=!1;const t=Sr(i,w,"vertex"),n=Sr(i,x,"fragment");console.error("THREE.WebGLProgram: shader error: ",i.getError(),"35715",i.getProgramParameter(m,35715),"gl.getProgramInfoLog",e,t,n)}else""!==e?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:g},fragmentShader:{log:n,prefix:v}})}let _,E;return i.deleteShader(w),i.deleteShader(x),this.getUniforms=function(){return void 0===_&&(_=new xr(i,m)),_},this.getAttributes=function(){return void 0===E&&(E=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i).name;n[r]=e.getAttribLocation(t,r)}return n}(i,m)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=Er++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=w,this.fragmentShader=x,this}function Ur(e,t,n,r,i,o){const s=[],l=r.isWebGL2,c=r.logarithmicDepthBuffer,u=r.floatVertexTextures,h=r.maxVertexUniforms,d=r.vertexTextures;let f=r.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmission","transmissionMap","thicknessMap"];function g(e){let t;return e&&e.isTexture?t=e.encoding:e&&e.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=3e3,t}return{getParameters:function(i,s,m,v,y){const b=v.fog,w=i.isMeshStandardMaterial?v.environment:null,x=t.get(i.envMap||w),_=p[i.type],E=y.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(u)return 1024;{const e=h,n=Math.floor((e-20)/4),r=Math.min(n,t.length);return r<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+r+"."),0):r}}(y):0;let A,S;if(null!==i.precision&&(f=r.getMaxPrecision(i.precision),f!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",f,"instead.")),_){const e=nn[_];A=e.vertexShader,S=e.fragmentShader}else A=i.vertexShader,S=i.fragmentShader;const M=e.getRenderTarget();return{isWebGL2:l,shaderID:_,shaderName:i.type,vertexShader:A,fragmentShader:S,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:f,instancing:!0===y.isInstancedMesh,instancingColor:!0===y.isInstancedMesh&&null!==y.instanceColor,supportsVertexTextures:d,outputEncoding:null!==M?g(M.texture):e.outputEncoding,map:!!i.map,mapEncoding:g(i.map),matcap:!!i.matcap,matcapEncoding:g(i.matcap),envMap:!!x,envMapMode:x&&x.mapping,envMapEncoding:g(x),envMapCubeUV:!!x&&(306===x.mapping||307===x.mapping),lightMap:!!i.lightMap,lightMapEncoding:g(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:g(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:1===i.normalMapType,tangentSpaceNormalMap:0===i.normalMapType,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmission:!!i.transmission,transmissionMap:!!i.transmissionMap,thicknessMap:!!i.thicknessMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexAlphas:!0===i.vertexColors&&y.geometry&&y.geometry.attributes.color&&4===y.geometry.attributes.color.itemSize,vertexUvs:!!i.map||!!i.bumpMap||!!i.normalMap||!!i.specularMap||!!i.alphaMap||!!i.emissiveMap||!!i.roughnessMap||!!i.metalnessMap||!!i.clearcoatMap||!!i.clearcoatRoughnessMap||!!i.clearcoatNormalMap||!!i.displacementMap||!!i.transmissionMap||!!i.thicknessMap,uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmission||i.transmissionMap||i.thicknessMap)&&!!i.displacementMap,fog:!!b,useFog:i.fog,fogExp2:b&&b.isFogExp2,flatShading:!!i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:c,skinning:!0===y.isSkinnedMesh&&E>0,maxBones:E,useVertexTexture:u,morphTargets:i.morphTargets,morphNormals:i.morphNormals,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&m.length>0,shadowMapType:e.shadowMap.type,toneMapping:i.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:2===i.side,flipSided:i.side===a,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);if(!1===t.isRawShaderMaterial){for(let e=0;e<m.length;e++)n.push(t[m[e]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=p[e.type];let n;if(t){const e=nn[t];n=jt.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,i=s.length;e<i;e++){const t=s[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Hr(e,n,t,i),s.push(r)),r},releaseProgram:function(e){if(0===--e.usedTimes){const t=s.indexOf(e);s[t]=s[s.length-1],s.pop(),e.destroy()}},programs:s}}function Vr(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Gr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Wr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function qr(e){const t=[];let n=0;const r=[],i=[],o=[],a={id:-1};function s(r,i,o,s,l,c){let u=t[n];const h=e.get(o);return void 0===u?(u={id:r.id,object:r,geometry:i,material:o,program:h.program||a,groupOrder:s,renderOrder:r.renderOrder,z:l,group:c},t[n]=u):(u.id=r.id,u.object=r,u.geometry=i,u.material=o,u.program=h.program||a,u.groupOrder=s,u.renderOrder=r.renderOrder,u.z=l,u.group=c),n++,u}return{opaque:r,transmissive:i,transparent:o,init:function(){n=0,r.length=0,i.length=0,o.length=0},push:function(e,t,n,a,l,c){const u=s(e,t,n,a,l,c);n.transmission>0?i.push(u):!0===n.transparent?o.push(u):r.push(u)},unshift:function(e,t,n,a,l,c){const u=s(e,t,n,a,l,c);n.transmission>0?i.unshift(u):!0===n.transparent?o.unshift(u):r.unshift(u)},finish:function(){for(let e=n,r=t.length;e<r;e++){const n=t[e];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}},sort:function(e,t){r.length>1&&r.sort(e||Gr),i.length>1&&i.sort(t||Wr),o.length>1&&o.sort(t||Wr)}}}function Xr(e){let t=new WeakMap;return{get:function(n,r){let i;return!1===t.has(n)?(i=new qr(e),t.set(n,[i])):r>=t.get(n).length?(i=new qr(e),t.get(n).push(i)):i=t.get(n)[r],i},dispose:function(){t=new WeakMap}}}function Yr(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new R,color:new Je};break;case"SpotLight":n={position:new R,direction:new R,color:new Je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new R,color:new Je,distance:0,decay:0};break;case"HemisphereLight":n={direction:new R,skyColor:new Je,groundColor:new Je};break;case"RectAreaLight":n={color:new Je,position:new R,halfWidth:new R,halfHeight:new R}}return e[t.id]=n,n}}}let Kr=0;function Qr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Zr(e,t){const n=new Yr,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new b};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new b,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let l=0;l<9;l++)i.probe.push(new R);const o=new R,a=new se,s=new se;return{setup:function(o){let a=0,s=0,l=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0;o.sort(Qr);for(let e=0,t=o.length;e<t;e++){const t=o[e],v=t.color,y=t.intensity,b=t.distance,w=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=v.r*y,s+=v.g*y,l+=v.b*y;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],y);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[c]=n,i.directionalShadowMap[c]=w,i.directionalShadowMatrix[c]=t.shadow.matrix,p++}i.directional[c]=e,c++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(v).multiplyScalar(y),e.distance=b,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.spotShadow[h]=n,i.spotShadowMap[h]=w,i.spotShadowMatrix[h]=t.shadow.matrix,g++}i.spot[h]=e,h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(v).multiplyScalar(y),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[d]=e,d++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[u]=n,i.pointShadowMap[u]=w,i.pointShadowMatrix[u]=t.shadow.matrix,m++}i.point[u]=e,u++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(y),e.groundColor.copy(t.groundColor).multiplyScalar(y),i.hemi[f]=e,f++}}d>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=tn.LTC_FLOAT_1,i.rectAreaLTC2=tn.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=tn.LTC_HALF_1,i.rectAreaLTC2=tn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=l;const v=i.hash;v.directionalLength===c&&v.pointLength===u&&v.spotLength===h&&v.rectAreaLength===d&&v.hemiLength===f&&v.numDirectionalShadows===p&&v.numPointShadows===m&&v.numSpotShadows===g||(i.directional.length=c,i.spot.length=h,i.rectArea.length=d,i.point.length=u,i.hemi.length=f,i.directionalShadow.length=p,i.directionalShadowMap.length=p,i.pointShadow.length=m,i.pointShadowMap.length=m,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=p,i.pointShadowMatrix.length=m,i.spotShadowMatrix.length=g,v.directionalLength=c,v.pointLength=u,v.spotLength=h,v.rectAreaLength=d,v.hemiLength=f,v.numDirectionalShadows=p,v.numPointShadows=m,v.numSpotShadows=g,i.version=Kr++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=0;const h=t.matrixWorldInverse;for(let d=0,f=e.length;d<f;d++){const t=e[d];if(t.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(t.matrixWorld),o.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(h),n++}else if(t.isSpotLight){const e=i.spot[l];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),e.direction.setFromMatrixPosition(t.matrixWorld),o.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(h),l++}else if(t.isRectAreaLight){const e=i.rectArea[c];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),s.identity(),a.copy(t.matrixWorld),a.premultiply(h),s.extractRotation(a),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),c++}else if(t.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),r++}else if(t.isHemisphereLight){const e=i.hemi[u];e.direction.setFromMatrixPosition(t.matrixWorld),e.direction.transformDirection(h),e.direction.normalize(),u++}}},state:i}}function Jr(e,t){const n=new Zr(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function $r(e,t){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new Jr(e,t),n.set(r,[o])):i>=n.get(r).length?(o=new Jr(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class ei extends We{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}ei.prototype.isMeshDepthMaterial=!0;class ti extends We{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new R,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}ti.prototype.isMeshDistanceMaterial=!0;function ni(e,t,n){let r=new Qt;const i=new b,o=new b,c=new M,u=[],h=[],d={},f=n.maxTextureSize,p={0:a,1:0,2:2},m=new Bt({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new b},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),g=m.clone();g.defines.HORIZONTAL_PASS=1;const v=new pt;v.setAttribute("position",new nt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Pt(v,m),w=this;function x(n,r){const i=t.update(y);m.uniforms.shadow_pass.value=n.map.texture,m.uniforms.resolution.value=n.mapSize,m.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,m,y,null),g.uniforms.shadow_pass.value=n.mapPass.texture,g.uniforms.resolution.value=n.mapSize,g.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,g,y,null)}function _(e){const t=e<<0;let n=u[t];return void 0===n&&(n=new ei({depthPacking:3201,morphTargets:e}),u[t]=n),n}function E(e){const t=e<<0;let n=h[t];return void 0===n&&(n=new ti({morphTargets:e}),h[t]=n),n}function A(t,n,r,i,o,a,s){let l=null,c=_,u=t.customDepthMaterial;if(!0===i.isPointLight&&(c=E,u=t.customDistanceMaterial),void 0===u){let e=!1;!0===r.morphTargets&&(e=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0),l=c(e)}else l=u;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){const e=l.uuid,t=r.uuid;let n=d[e];void 0===n&&(n={},d[e]=n);let i=n[t];void 0===i&&(i=l.clone(),n[t]=i),l=i}return l.visible=r.visible,l.wireframe=r.wireframe,l.side=3===s?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:p[r.side],l.clipShadows=r.clipShadows,l.clippingPlanes=r.clippingPlanes,l.clipIntersection=r.clipIntersection,l.wireframeLinewidth=r.wireframeLinewidth,l.linewidth=r.linewidth,!0===i.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(i.matrixWorld),l.nearDistance=o,l.farDistance=a),l}function S(n,i,o,a,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,c=t.length;l<c;l++){const c=t[l],u=i[c.materialIndex];if(u&&u.visible){const t=A(n,r,u,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,c)}}}else if(i.visible){const t=A(n,r,i,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)S(l[e],i,o,a,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,a){if(!1===w.enabled)return;if(!1===w.autoUpdate&&!1===w.needsUpdate)return;if(0===t.length)return;const u=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.state;p.setBlending(0),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(let m=0,g=t.length;m<g;m++){const u=t[m],h=u.shadow;if(void 0===h){console.warn("THREE.WebGLShadowMap:",u,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;i.copy(h.mapSize);const d=h.getFrameExtents();if(i.multiply(d),o.copy(h.mapSize),(i.x>f||i.y>f)&&(i.x>f&&(o.x=Math.floor(f/d.x),i.x=o.x*d.x,h.mapSize.x=o.x),i.y>f&&(o.y=Math.floor(f/d.y),i.y=o.y*d.y,h.mapSize.y=o.y)),null===h.map&&!h.isPointLightShadow&&3===this.type){const e={minFilter:s,magFilter:s,format:l};h.map=new T(i.x,i.y,e),h.map.texture.name=u.name+".shadowMap",h.mapPass=new T(i.x,i.y,e),h.camera.updateProjectionMatrix()}if(null===h.map){const e={minFilter:1003,magFilter:1003,format:l};h.map=new T(i.x,i.y,e),h.map.texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()}e.setRenderTarget(h.map),e.clear();const g=h.getViewportCount();for(let e=0;e<g;e++){const t=h.getViewport(e);c.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),p.viewport(c),h.updateMatrices(u,e),r=h.getFrustum(),S(n,a,h.camera,u,this.type)}h.isPointLightShadow||3!==this.type||x(h,a),h.needsUpdate=!1}w.needsUpdate=!1,e.setRenderTarget(u,h,d)}}function ri(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new M;let r=null;const i=new M(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?F(2929):z(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},s=new function(){let t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?F(2960):z(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&l===r||(e.stencilOp(t,n,r),a=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null}}};let l={},c=null,u={},h=null,d=!1,f=null,p=null,m=null,g=null,v=null,y=null,b=null,w=!1,x=null,_=null,E=null,A=null,S=null;const T=e.getParameter(35661);let C=!1,O=0;const R=e.getParameter(7938);-1!==R.indexOf("WebGL")?(O=parseFloat(/^WebGL (\d)/.exec(R)[1]),C=O>=1):-1!==R.indexOf("OpenGL ES")&&(O=parseFloat(/^OpenGL ES (\d)/.exec(R)[1]),C=O>=2);let k=null,P={};const L=e.getParameter(3088),D=e.getParameter(2978),I=(new M).fromArray(L),N=(new M).fromArray(D);function j(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let a=0;a<r;a++)e.texImage2D(n+a,0,6408,1,1,0,6408,5121,i);return o}const B={};function F(t){!0!==l[t]&&(e.enable(t),l[t]=!0)}function z(t){!1!==l[t]&&(e.disable(t),l[t]=!1)}B[3553]=j(3553,3553,1),B[34067]=j(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),s.setClear(0),F(2929),o.setFunc(3),G(!1),W(1),F(2884),V(0);const H={100:32774,101:32778,102:32779};if(r)H[103]=32775,H[104]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(H[103]=e.MIN_EXT,H[104]=e.MAX_EXT)}const U={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function V(t,n,r,i,o,a,s,l){if(0!==t){if(!1===d&&(F(3042),d=!0),5===t)o=o||n,a=a||r,s=s||i,n===p&&o===v||(e.blendEquationSeparate(H[n],H[o]),p=n,v=o),r===m&&i===g&&a===y&&s===b||(e.blendFuncSeparate(U[r],U[i],U[a],U[s]),m=r,g=i,y=a,b=s),f=t,w=null;else if(t!==f||l!==w){if(100===p&&100===v||(e.blendEquation(32774),p=100,v=100),l)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,0,769,771);break;case 4:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFunc(0,769);break;case 4:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}m=null,g=null,y=null,b=null,f=t,w=l}}else!0===d&&(z(3042),d=!1)}function G(t){x!==t&&(t?e.frontFace(2304):e.frontFace(2305),x=t)}function W(t){0!==t?(F(2884),t!==_&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):z(2884),_=t}function q(t,n,r){t?(F(32823),A===n&&S===r||(e.polygonOffset(n,r),A=n,S=r)):z(32823)}function X(t){void 0===t&&(t=33984+T-1),k!==t&&(e.activeTexture(t),k=t)}return{buffers:{color:i,depth:o,stencil:s},enable:F,disable:z,bindFramebuffer:function(t,n){return null===n&&null!==c&&(n=c),u[t]!==n&&(e.bindFramebuffer(t,n),u[t]=n,r&&(36009===t&&(u[36160]=n),36160===t&&(u[36009]=n)),!0)},bindXRFramebuffer:function(t){t!==c&&(e.bindFramebuffer(36160,t),c=t)},useProgram:function(t){return h!==t&&(e.useProgram(t),h=t,!0)},setBlending:V,setMaterial:function(e,t){2===e.side?z(2884):F(2884);let n=e.side===a;t&&(n=!n),G(n),1===e.blending&&!1===e.transparent?V(0):V(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;s.setTest(r),r&&(s.setMask(e.stencilWriteMask),s.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),s.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?F(32926):z(32926)},setFlipSided:G,setCullFace:W,setLineWidth:function(t){t!==E&&(C&&e.lineWidth(t),E=t)},setPolygonOffset:q,setScissorTest:function(e){e?F(3089):z(3089)},activeTexture:X,bindTexture:function(t,n){null===k&&X();let r=P[k];void 0===r&&(r={type:void 0,texture:void 0},P[k]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||B[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=P[k];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===I.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),I.copy(t))},viewport:function(t){!1===N.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),N.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),l={},k=null,P={},c=null,u={},h=null,d=!1,f=null,p=null,m=null,g=null,v=null,y=null,b=null,w=!1,x=null,_=null,E=null,A=null,S=null,I.set(0,0,e.canvas.width,e.canvas.height),N.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),s.reset()}}}function ii(e,t,n,r,i,o,a){const c=i.isWebGL2,u=i.maxTextures,h=i.maxCubemapSize,d=i.maxTextureSize,f=i.maxSamples,p=new WeakMap;let m,g=!1;try{g="undefined"!==typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(U){}function b(e,t){return g?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function w(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?y:Math.floor,o=r(i*e.width),a=r(i*e.height);void 0===m&&(m=b(o,a));const s=n?b(o,a):m;s.width=o,s.height=a;return s.getContext("2d").drawImage(e,0,0,o,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+a+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function x(e){return v(e.width)&&v(e.height)}function _(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&e.minFilter!==s}function E(t,n,i,o,a=1){e.generateMipmap(t);r.get(n).__maxMipLevel=Math.log2(Math.max(i,o,a))}function A(n,r,i){if(!1===c)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function S(e){return 1003===e||1004===e||1005===e?9728:9729}function M(t){const n=t.target;n.removeEventListener("dispose",M),function(t){const n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&p.delete(n),a.memory.textures--}function T(t){const n=t.target;n.removeEventListener("dispose",T),function(t){const n=t.texture,i=r.get(t),o=r.get(n);if(!t)return;void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),a.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let r=0;r<6;r++)e.deleteFramebuffer(i.__webglFramebuffer[r]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[r]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let s=0,l=n.length;s<l;s++){const t=r.get(n[s]);t.__webglTexture&&(e.deleteTexture(t.__webglTexture),a.memory.textures--),r.remove(n[s])}r.remove(n),r.remove(t)}(n)}let C=0;function O(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=a.render.frame;p.get(e)!==t&&(p.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){const n=e.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void I(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function R(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;D(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),s=r.image[0]&&r.image[0].isDataTexture,u=[];for(let e=0;e<6;e++)u[e]=a||s?s?r.image[e].image:r.image[e]:w(r.image[e],!1,!0,h);const d=u[0],f=x(d)||c,p=o.convert(r.format),m=o.convert(r.type),g=A(r.internalFormat,p,m);let v;if(L(34067,r,f),a){for(let e=0;e<6;e++){v=u[e].mipmaps;for(let t=0;t<v.length;t++){const i=v[t];r.format!==l&&1022!==r.format?null!==p?n.compressedTexImage2D(34069+e,t,g,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+e,t,g,i.width,i.height,0,p,m,i.data)}}t.__maxMipLevel=v.length-1}else{v=r.mipmaps;for(let e=0;e<6;e++)if(s){n.texImage2D(34069+e,0,g,u[e].width,u[e].height,0,p,m,u[e].data);for(let t=0;t<v.length;t++){const r=v[t].image[e].image;n.texImage2D(34069+e,t+1,g,r.width,r.height,0,p,m,r.data)}}else{n.texImage2D(34069+e,0,g,p,m,u[e]);for(let t=0;t<v.length;t++){const r=v[t];n.texImage2D(34069+e,t+1,g,p,m,r.image[e])}}t.__maxMipLevel=v.length}_(r,f)&&E(34067,r,d.width,d.height);t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}const k={1e3:10497,1001:33071,1002:33648},P={1003:9728,1004:9984,1005:9986,[s]:9729,1007:9985,1008:9987};function L(n,o,a){if(a?(e.texParameteri(n,10242,k[o.wrapS]),e.texParameteri(n,10243,k[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,k[o.wrapR]),e.texParameteri(n,10240,P[o.magFilter]),e.texParameteri(n,10241,P[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,S(o.magFilter)),e.texParameteri(n,10241,S(o.minFilter)),1003!==o.minFilter&&o.minFilter!==s&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(1015===o.type&&!1===t.has("OES_texture_float_linear"))return;if(!1===c&&1016===o.type&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function D(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",M),t.__webglTexture=e.createTexture(),a.memory.textures++)}function I(t,r,i){let a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),D(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const u=function(e){return!c&&(1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&e.minFilter!==s)}(r)&&!1===x(r.image),h=w(r.image,u,!1,d),f=x(h)||c,p=o.convert(r.format);let m,g=o.convert(r.type),v=A(r.internalFormat,p,g);L(a,r,f);const y=r.mipmaps;if(r.isDepthTexture)v=6402,c?v=1015===r.type?36012:1014===r.type?33190:1020===r.type?35056:33189:1015===r.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===r.format&&6402===v&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,g=o.convert(r.type)),1027===r.format&&6402===v&&(v=34041,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,g=o.convert(r.type))),n.texImage2D(3553,0,v,h.width,h.height,0,p,g,null);else if(r.isDataTexture)if(y.length>0&&f){for(let e=0,t=y.length;e<t;e++)m=y[e],n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data);r.generateMipmaps=!1,t.__maxMipLevel=y.length-1}else n.texImage2D(3553,0,v,h.width,h.height,0,p,g,h.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(let e=0,t=y.length;e<t;e++)m=y[e],r.format!==l&&1022!==r.format?null!==p?n.compressedTexImage2D(3553,e,v,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data);t.__maxMipLevel=y.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,v,h.width,h.height,h.depth,0,p,g,h.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,v,h.width,h.height,h.depth,0,p,g,h.data),t.__maxMipLevel=0;else if(y.length>0&&f){for(let e=0,t=y.length;e<t;e++)m=y[e],n.texImage2D(3553,e,v,p,g,m);r.generateMipmaps=!1,t.__maxMipLevel=y.length-1}else n.texImage2D(3553,0,v,p,g,h),t.__maxMipLevel=0;_(r,f)&&E(a,r,h.width,h.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function N(t,i,a,s,l){const c=o.convert(a.format),u=o.convert(a.type),h=A(a.internalFormat,c,u);32879===l||35866===l?n.texImage3D(l,0,h,i.width,i.height,i.depth,0,c,u,null):n.texImage2D(l,0,h,i.width,i.height,0,c,u,null),n.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,s,l,r.get(a).__webglTexture,0),n.bindFramebuffer(36160,null)}function j(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r){const t=n.depthTexture;t&&t.isDepthTexture&&(1015===t.type?i=36012:1014===t.type&&(i=33190));const r=F(n);e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(r){const t=F(n);e.renderbufferStorageMultisample(36161,t,35056,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,i=o.convert(t.format),a=o.convert(t.type),s=A(t.internalFormat,i,a);if(r){const t=F(n);e.renderbufferStorageMultisample(36161,t,s,n.width,n.height)}else e.renderbufferStorage(36161,s,n.width,n.height)}e.bindRenderbuffer(36161,null)}function B(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),O(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture;if(1026===i.depthTexture.format)e.framebufferTexture2D(36160,36096,3553,o,0);else{if(1027!==i.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),j(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),j(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function F(e){return c&&e.isWebGLMultisampleRenderTarget?Math.min(f,e.samples):0}let z=!1,H=!1;this.allocateTextureUnit=function(){const e=C;return e>=u&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+u),C+=1,e},this.resetTextureUnits=function(){C=0},this.setTexture2D=O,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=R,this.setupRenderTarget=function(t){const s=t.texture,u=r.get(t),h=r.get(s);t.addEventListener("dispose",T),!0!==t.isWebGLMultipleRenderTargets&&(h.__webglTexture=e.createTexture(),h.__version=s.version,a.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,f=!0===t.isWebGLMultipleRenderTargets,p=!0===t.isWebGLMultisampleRenderTarget,m=s.isDataTexture3D||s.isDataTexture2DArray,g=x(t)||c;if(!c||1022!==s.format||1015!==s.type&&1016!==s.type||(s.format=l,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),d){u.__webglFramebuffer=[];for(let t=0;t<6;t++)u.__webglFramebuffer[t]=e.createFramebuffer()}else if(u.__webglFramebuffer=e.createFramebuffer(),f)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(p)if(c){u.__webglMultisampledFramebuffer=e.createFramebuffer(),u.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,u.__webglColorRenderbuffer);const r=o.convert(s.format),i=o.convert(s.type),a=A(s.internalFormat,r,i),l=F(t);e.renderbufferStorageMultisample(36161,l,a,t.width,t.height),n.bindFramebuffer(36160,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,u.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(u.__webglDepthRenderbuffer=e.createRenderbuffer(),j(u.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(d){n.bindTexture(34067,h.__webglTexture),L(34067,s,g);for(let e=0;e<6;e++)N(u.__webglFramebuffer[e],t,s,36064,34069+e);_(s,g)&&E(34067,s,t.width,t.height),n.bindTexture(34067,null)}else if(f){const e=t.texture;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=r.get(o);n.bindTexture(3553,a.__webglTexture),L(3553,o,g),N(u.__webglFramebuffer,t,o,36064+i,3553),_(o,g)&&E(3553,o,t.width,t.height)}n.bindTexture(3553,null)}else{let e=3553;if(m)if(c){e=s.isDataTexture3D?32879:35866}else console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.");n.bindTexture(e,h.__webglTexture),L(e,s,g),N(u.__webglFramebuffer,t,s,36064,e),_(s,g)&&E(e,s,t.width,t.height,t.depth),n.bindTexture(e,null)}t.depthBuffer&&B(t)},this.updateRenderTargetMipmap=function(e){const t=x(e)||c,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let o=0,a=i.length;o<a;o++){const a=i[o];if(_(a,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(a).__webglTexture;n.bindTexture(t,i),E(t,a,e.width,e.height),n.bindTexture(t,null)}}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(c){const i=t.width,o=t.height;let a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024);const s=r.get(t);n.bindFramebuffer(36008,s.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,s.__webglFramebuffer),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,s.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===z&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),z=!0),e=e.texture),O(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===H&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),H=!0),e=e.texture),R(e,t)}}function oi(e,t,n){const r=n.isWebGL2;return{convert:function(e){let n;if(1009===e)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1019===e)return 33635;if(1010===e)return 5120;if(1011===e)return 5122;if(1012===e)return 5123;if(1013===e)return 5124;if(1014===e)return 5125;if(1015===e)return 5126;if(1016===e)return r?5131:(n=t.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(1021===e)return 6406;if(1022===e)return 6407;if(e===l)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(1026===e)return 6402;if(1027===e)return 34041;if(1028===e)return 6403;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1032===e)return 36248;if(1033===e)return 36249;if(33776===e||33777===e||33778===e||33779===e){if(n=t.get("WEBGL_compressed_texture_s3tc"),null===n)return null;if(33776===e)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===e)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===e)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===e)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(n=t.get("WEBGL_compressed_texture_pvrtc"),null===n)return null;if(35840===e)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return n=t.get("WEBGL_compressed_texture_etc1"),null!==n?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((37492===e||37496===e)&&(n=t.get("WEBGL_compressed_texture_etc"),null!==n)){if(37492===e)return n.COMPRESSED_RGB8_ETC2;if(37496===e)return n.COMPRESSED_RGBA8_ETC2_EAC}return 37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e||37840===e||37841===e||37842===e||37843===e||37844===e||37845===e||37846===e||37847===e||37848===e||37849===e||37850===e||37851===e||37852===e||37853===e?(n=t.get("WEBGL_compressed_texture_astc"),null!==n?e:null):36492===e?(n=t.get("EXT_texture_compression_bptc"),null!==n?e:null):1020===e?r?34042:(n=t.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class ai extends zt{constructor(e=[]){super(),this.cameras=e}}ai.prototype.isArrayCamera=!0;class si extends Pe{constructor(){super(),this.type="Group"}}si.prototype.isGroup=!0;const li={type:"move"};class ci{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new si,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new si,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new R,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new R),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new si,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new R,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new R),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const a=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==a&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(li))),l&&e.hand){o=!0;for(const o of e.hand.values()){const e=t.getJointPose(o,n);if(void 0===l.joints[o.jointName]){const e=new si;e.matrixAutoUpdate=!1,e.visible=!1,l.joints[o.jointName]=e,l.add(e)}const r=l.joints[o.jointName];null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.jointRadius=e.radius),r.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],a=r.position.distanceTo(i.position),s=.02,c=.005;l.inputState.pinching&&a>s+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&a<=s-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==o),this}}class ui extends c{constructor(e,t){super();const n=this,r=e.state;let i=null,o=1,a=null,s="local-floor",l=null,c=null,u=null,h=null;const d=[],f=new Map,p=new zt;p.layers.enable(1),p.viewport=new M;const m=new zt;m.layers.enable(2),m.viewport=new M;const g=[p,m],v=new ai;v.layers.enable(1),v.layers.enable(2);let y=null,b=null;function w(e){const t=f.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function x(){f.forEach((function(e,t){e.disconnect(t)})),f.clear(),y=null,b=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),C.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function _(e){const t=i.inputSources;for(let n=0;n<d.length;n++)f.set(t[n],d[n]);for(let n=0;n<e.removed.length;n++){const t=e.removed[n],r=f.get(t);r&&(r.dispatchEvent({type:"disconnected",data:t}),f.delete(t))}for(let n=0;n<e.added.length;n++){const t=e.added[n],r=f.get(t);r&&r.dispatchEvent({type:"connected",data:t})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getGripSpace()},this.getHand=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return i},this.setSession=async function(e){if(i=e,null!==i){i.addEventListener("select",w),i.addEventListener("selectstart",w),i.addEventListener("selectend",w),i.addEventListener("squeeze",w),i.addEventListener("squeezestart",w),i.addEventListener("squeezeend",w),i.addEventListener("end",x),i.addEventListener("inputsourceschange",_);const e=t.getContextAttributes();if(!0!==e.xrCompatible&&await t.makeXRCompatible(),void 0===i.renderState.layers){const n={antialias:e.antialias,alpha:e.alpha,depth:e.depth,stencil:e.stencil,framebufferScaleFactor:o},r=new XRWebGLLayer(i,t,n);i.updateRenderState({baseLayer:r})}else{let n=0;e.depth&&(n=e.stencil?34041:6402);const r={colorFormat:e.alpha?6408:6407,depthFormat:n,scaleFactor:o};c=new XRWebGLBinding(i,t),h=c.createProjectionLayer(r),u=t.createFramebuffer(),i.updateRenderState({layers:[h]})}a=await i.requestReferenceSpace(s),C.setContext(i),C.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const E=new R,A=new R;function S(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===i)return;v.near=m.near=p.near=e.near,v.far=m.far=p.far=e.far,y===v.near&&b===v.far||(i.updateRenderState({depthNear:v.near,depthFar:v.far}),y=v.near,b=v.far);const t=e.parent,n=v.cameras;S(v,t);for(let i=0;i<n.length;i++)S(n[i],t);v.matrixWorld.decompose(v.position,v.quaternion,v.scale),e.position.copy(v.position),e.quaternion.copy(v.quaternion),e.scale.copy(v.scale),e.matrix.copy(v.matrix),e.matrixWorld.copy(v.matrixWorld);const r=e.children;for(let i=0,o=r.length;i<o;i++)r[i].updateMatrixWorld(!0);2===n.length?function(e,t,n){E.setFromMatrixPosition(t.matrixWorld),A.setFromMatrixPosition(n.matrixWorld);const r=E.distanceTo(A),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(v,p,m):v.projectionMatrix.copy(p.projectionMatrix)},this.getCamera=function(){return v};let T=null;const C=new Zt;C.setAnimationLoop((function(e,n){if(l=n.getViewerPose(a),null!==l){const e=l.views,n=i.renderState.baseLayer;void 0===i.renderState.layers&&r.bindXRFramebuffer(n.framebuffer);let o=!1;e.length!==v.cameras.length&&(v.cameras.length=0,o=!0);for(let a=0;a<e.length;a++){const s=e[a];let l=null;if(void 0===i.renderState.layers)l=n.getViewport(s);else{const e=c.getViewSubImage(h,s);r.bindXRFramebuffer(u),t.framebufferTexture2D(36160,36064,3553,e.colorTexture,0),void 0!==e.depthStencilTexture&&t.framebufferTexture2D(36160,36096,3553,e.depthStencilTexture,0),l=e.viewport}const d=g[a];d.matrix.fromArray(s.transform.matrix),d.projectionMatrix.fromArray(s.projectionMatrix),d.viewport.set(l.x,l.y,l.width,l.height),0===a&&v.matrix.copy(d.matrix),!0===o&&v.cameras.push(d)}}const o=i.inputSources;for(let t=0;t<d.length;t++){const e=d[t],r=o[t];e.update(r,n,a)}T&&T(e,n)})),this.setAnimationLoop=function(e){T=e},this.dispose=function(){}}}function hi(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap);const r=e.get(n).envMap;if(r){t.envMap.value=r,t.flipEnvMap.value=r.isCubeTexture&&r._needsFlipEnvMap?-1:1,t.reflectivity.value=n.reflectivity,t.refractionRatio.value=n.refractionRatio;const i=e.get(r).__maxMipLevel;void 0!==i&&(t.maxMipLevel.value=i)}let i,o;n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?i=n.map:n.specularMap?i=n.specularMap:n.displacementMap?i=n.displacementMap:n.normalMap?i=n.normalMap:n.bumpMap?i=n.bumpMap:n.roughnessMap?i=n.roughnessMap:n.metalnessMap?i=n.metalnessMap:n.alphaMap?i=n.alphaMap:n.emissiveMap?i=n.emissiveMap:n.clearcoatMap?i=n.clearcoatMap:n.clearcoatNormalMap?i=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(i=n.clearcoatRoughnessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),t.uv2Transform.value.copy(o.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,n.side===a&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),n.side===a&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias);e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o,s){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap);t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t,r){n(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen);t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap);t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap);t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===a&&e.clearcoatNormalScale.value.negate());e.transmission.value=t.transmission,t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap);t.transmission>0&&(e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height));e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap);e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)}(e,r,s):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);let i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);let n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function di(e={}){const t=void 0!==e.canvas?e.canvas:function(){const e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,s=void 0!==e.antialias&&e.antialias,c=void 0===e.premultipliedAlpha||e.premultipliedAlpha,u=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,h=void 0!==e.powerPreference?e.powerPreference:"default",d=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let f=null,p=null;const m=[],g=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const v=this;let y=!1,b=0,w=0,x=null,_=-1,E=null;const A=new M,S=new M;let O=null,k=t.width,P=t.height,L=1,D=null,I=null;const N=new M(0,0,k,P),j=new M(0,0,k,P);let B=!1;const F=[],z=new Qt;let H=!1,U=!1,V=null;const G=new se,W=new R,q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function X(){return null===x?L:1}let Y,K,Q,Z,J,$,ee,te,ne,re,ie,oe,ae,le,ce,ue,he,de,fe,pe,me,ge,ve=n;function ye(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:r,depth:i,stencil:o,antialias:s,premultipliedAlpha:c,preserveDrawingBuffer:u,powerPreference:h,failIfMajorPerformanceCaveat:d};if(t.addEventListener("webglcontextlost",xe,!1),t.addEventListener("webglcontextrestored",_e,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===v.isWebGL1Renderer&&t.shift(),ve=ye(t,e),null===ve)throw ye(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Le){throw console.error("THREE.WebGLRenderer: "+Le.message),Le}function be(){Y=new un(ve),K=new sn(ve,Y,e),Y.init(K),me=new oi(ve,Y,K),Q=new ri(ve,Y,K),F[0]=1029,Z=new fn(ve),J=new Vr,$=new ii(ve,Y,Q,J,K,me,Z),ee=new cn(v),te=new Jt(ve,K),ge=new on(ve,Y,te,K),ne=new hn(ve,te,Z,ge),re=new vn(ve,ne,te,Z),de=new gn(ve),ce=new ln(J),ie=new Ur(v,ee,Y,K,ge,ce),oe=new hi(J),ae=new Xr(J),le=new $r(Y,K),he=new rn(v,ee,Q,re,c),ue=new ni(v,re,K),fe=new an(ve,Y,Z,K),pe=new dn(ve,Y,Z,K),Z.programs=ie.programs,v.capabilities=K,v.extensions=Y,v.properties=J,v.renderLists=ae,v.shadowMap=ue,v.state=Q,v.info=Z}be();const we=new ui(v,ve);function xe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),y=!0}function _e(){console.log("THREE.WebGLRenderer: Context Restored."),y=!1;const e=Z.autoReset,t=ue.enabled,n=ue.autoUpdate,r=ue.needsUpdate,i=ue.type;be(),Z.autoReset=e,ue.enabled=t,ue.autoUpdate=n,ue.needsUpdate=r,ue.type=i}function Ee(e){const t=e.target;t.removeEventListener("dispose",Ee),function(e){(function(e){const t=J.get(e).programs;void 0!==t&&t.forEach((function(e){ie.releaseProgram(e)}))})(e),J.remove(e)}(t)}this.xr=we,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=Y.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=Y.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return L},this.setPixelRatio=function(e){void 0!==e&&(L=e,this.setSize(k,P,!1))},this.getSize=function(e){return e.set(k,P)},this.setSize=function(e,n,r){we.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(k=e,P=n,t.width=Math.floor(e*L),t.height=Math.floor(n*L),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(k*L,P*L).floor()},this.setDrawingBufferSize=function(e,n,r){k=e,P=n,L=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(A)},this.getViewport=function(e){return e.copy(N)},this.setViewport=function(e,t,n,r){e.isVector4?N.set(e.x,e.y,e.z,e.w):N.set(e,t,n,r),Q.viewport(A.copy(N).multiplyScalar(L).floor())},this.getScissor=function(e){return e.copy(j)},this.setScissor=function(e,t,n,r){e.isVector4?j.set(e.x,e.y,e.z,e.w):j.set(e,t,n,r),Q.scissor(S.copy(j).multiplyScalar(L).floor())},this.getScissorTest=function(){return B},this.setScissorTest=function(e){Q.setScissorTest(B=e)},this.setOpaqueSort=function(e){D=e},this.setTransparentSort=function(e){I=e},this.getClearColor=function(e){return e.copy(he.getClearColor())},this.setClearColor=function(){he.setClearColor.apply(he,arguments)},this.getClearAlpha=function(){return he.getClearAlpha()},this.setClearAlpha=function(){he.setClearAlpha.apply(he,arguments)},this.clear=function(e,t,n){let r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),ve.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",xe,!1),t.removeEventListener("webglcontextrestored",_e,!1),ae.dispose(),le.dispose(),J.dispose(),ee.dispose(),re.dispose(),ge.dispose(),we.dispose(),we.removeEventListener("sessionstart",Se),we.removeEventListener("sessionend",Me),V&&(V.dispose(),V=null),Te.stop()},this.renderBufferImmediate=function(e,t){ge.initAttributes();const n=J.get(e);e.hasPositions&&!n.position&&(n.position=ve.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=ve.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=ve.createBuffer()),e.hasColors&&!n.color&&(n.color=ve.createBuffer());const r=t.getAttributes();e.hasPositions&&(ve.bindBuffer(34962,n.position),ve.bufferData(34962,e.positionArray,35048),ge.enableAttribute(r.position),ve.vertexAttribPointer(r.position,3,5126,!1,0,0)),e.hasNormals&&(ve.bindBuffer(34962,n.normal),ve.bufferData(34962,e.normalArray,35048),ge.enableAttribute(r.normal),ve.vertexAttribPointer(r.normal,3,5126,!1,0,0)),e.hasUvs&&(ve.bindBuffer(34962,n.uv),ve.bufferData(34962,e.uvArray,35048),ge.enableAttribute(r.uv),ve.vertexAttribPointer(r.uv,2,5126,!1,0,0)),e.hasColors&&(ve.bindBuffer(34962,n.color),ve.bufferData(34962,e.colorArray,35048),ge.enableAttribute(r.color),ve.vertexAttribPointer(r.color,3,5126,!1,0,0)),ge.disableUnusedAttributes(),ve.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=q);const a=i.isMesh&&i.matrixWorld.determinant()<0,s=Pe(e,t,r,i);Q.setMaterial(r,a);let l=n.index;const c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;let u,h=1;!0===r.wireframe&&(l=ne.getWireframeAttribute(n),h=2),(r.morphTargets||r.morphNormals)&&de.update(i,n,r,s),ge.setup(i,r,s,n,l);let d=fe;null!==l&&(u=te.get(l),d=pe,d.setIndex(u));const f=null!==l?l.count:c.count,p=n.drawRange.start*h,m=n.drawRange.count*h,g=null!==o?o.start*h:0,v=null!==o?o.count*h:1/0,y=Math.max(p,g),b=Math.min(f,p+m,g+v)-1,w=Math.max(0,b-y+1);if(0!==w){if(i.isMesh)!0===r.wireframe?(Q.setLineWidth(r.wireframeLinewidth*X()),d.setMode(1)):d.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),Q.setLineWidth(e*X()),i.isLineSegments?d.setMode(1):i.isLineLoop?d.setMode(2):d.setMode(3)}else i.isPoints?d.setMode(0):i.isSprite&&d.setMode(4);if(i.isInstancedMesh)d.renderInstances(y,w,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(y,w,e)}else d.render(y,w)}},this.compile=function(e,t){p=le.get(e),p.init(),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))})),p.setupLights(),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++){Re(n[r],e,t)}else Re(n,e,t)}))};let Ae=null;function Se(){Te.stop()}function Me(){Te.start()}const Te=new Zt;function Ce(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=o.object,s=o.geometry,l=null===r?o.material:r,c=o.group;if(n.isArrayCamera){const e=n.cameras;for(let n=0,r=e.length;n<r;n++){const r=e[n];a.layers.test(r.layers)&&(Q.viewport(A.copy(r.viewport)),p.setupLightsView(r),Oe(a,t,r,s,l,c))}}else Oe(a,t,n,s,l,c)}}function Oe(e,t,n,r,i,o){if(e.onBeforeRender(v,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){const r=Pe(n,t,i,e);Q.setMaterial(i),ge.reset(),function(e,t){e.render((function(e){v.renderBufferImmediate(e,t)}))}(e,r)}else!0===i.transparent&&2===i.side?(i.side=a,i.needsUpdate=!0,v.renderBufferDirect(n,t,r,i,e,o),i.side=0,i.needsUpdate=!0,v.renderBufferDirect(n,t,r,i,e,o),i.side=2):v.renderBufferDirect(n,t,r,i,e,o);e.onAfterRender(v,t,n,r,i,o)}function Re(e,t,n){!0!==t.isScene&&(t=q);const r=J.get(e),i=p.state.lights,o=p.state.shadowsArray,a=i.state.version,s=ie.getParameters(e,i.state,o,t,n),l=ie.getProgramCacheKey(s);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=ee.get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",Ee),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===a)return ke(e,s),u}else s.uniforms=ie.getUniforms(e),e.onBuild(s,v),e.onBeforeCompile(s,v),u=ie.acquireProgram(s,l),c.set(l,u),r.uniforms=s.uniforms;const h=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(h.clippingPlanes=ce.uniform),ke(e,s),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotShadowMatrix.value=i.state.spotShadowMatrix,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix);const d=u.getUniforms(),f=xr.seqWithValue(d.seq,h);return r.currentProgram=u,r.uniformsList=f,u}function ke(e,t){const n=J.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas}function Pe(e,t,n,r){!0!==t.isScene&&(t=q),$.resetTextureUnits();const i=t.fog,o=n.isMeshStandardMaterial?t.environment:null,a=null===x?v.outputEncoding:x.texture.encoding,s=ee.get(n.envMap||o),l=!0===n.vertexColors&&r.geometry&&r.geometry.attributes.color&&4===r.geometry.attributes.color.itemSize,c=J.get(n),u=p.state.lights;if(!0===H&&(!0===U||e!==E)){const t=e===E&&n.id===_;ce.setState(n,e,t)}let h=!1;n.version===c.__version?c.needsLights&&c.lightsStateVersion!==u.state.version||c.outputEncoding!==a||r.isInstancedMesh&&!1===c.instancing?h=!0:r.isInstancedMesh||!0!==c.instancing?r.isSkinnedMesh&&!1===c.skinning?h=!0:r.isSkinnedMesh||!0!==c.skinning?c.envMap!==s||n.fog&&c.fog!==i?h=!0:void 0===c.numClippingPlanes||c.numClippingPlanes===ce.numPlanes&&c.numIntersection===ce.numIntersection?c.vertexAlphas!==l&&(h=!0):h=!0:h=!0:h=!0:(h=!0,c.__version=n.version);let d=c.currentProgram;!0===h&&(d=Re(n,t,r));let f=!1,m=!1,g=!1;const y=d.getUniforms(),b=c.uniforms;if(Q.useProgram(d.program)&&(f=!0,m=!0,g=!0),n.id!==_&&(_=n.id,m=!0),f||E!==e){if(y.setValue(ve,"projectionMatrix",e.projectionMatrix),K.logarithmicDepthBuffer&&y.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),E!==e&&(E=e,m=!0,g=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const t=y.map.cameraPosition;void 0!==t&&t.setValue(ve,W.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||r.isSkinnedMesh)&&y.setValue(ve,"viewMatrix",e.matrixWorldInverse)}if(r.isSkinnedMesh){y.setOptional(ve,r,"bindMatrix"),y.setOptional(ve,r,"bindMatrixInverse");const e=r.skeleton;e&&(K.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),y.setValue(ve,"boneTexture",e.boneTexture,$),y.setValue(ve,"boneTextureSize",e.boneTextureSize)):y.setOptional(ve,e,"boneMatrices"))}return(m||c.receiveShadow!==r.receiveShadow)&&(c.receiveShadow=r.receiveShadow,y.setValue(ve,"receiveShadow",r.receiveShadow)),m&&(y.setValue(ve,"toneMappingExposure",v.toneMappingExposure),c.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(b,g),i&&n.fog&&oe.refreshFogUniforms(b,i),oe.refreshMaterialUniforms(b,n,L,P,V),xr.upload(ve,c.uniformsList,b,$)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(xr.upload(ve,c.uniformsList,b,$),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(ve,"center",r.center),y.setValue(ve,"modelViewMatrix",r.modelViewMatrix),y.setValue(ve,"normalMatrix",r.normalMatrix),y.setValue(ve,"modelMatrix",r.matrixWorld),d}Te.setAnimationLoop((function(e){Ae&&Ae(e)})),"undefined"!==typeof window&&Te.setContext(window),this.setAnimationLoop=function(e){Ae=e,we.setAnimationLoop(e),null===e?Te.stop():Te.start()},we.addEventListener("sessionstart",Se),we.addEventListener("sessionend",Me),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===y)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===we.enabled&&!0===we.isPresenting&&(!0===we.cameraAutoUpdate&&we.updateCamera(t),t=we.getCamera()),!0===e.isScene&&e.onBeforeRender(v,e,t,x),p=le.get(e,g.length),p.init(),g.push(p),G.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),z.setFromProjectionMatrix(G),U=this.localClippingEnabled,H=ce.init(this.clippingPlanes,U,t),f=ae.get(e,m.length),f.init(),m.push(f),function e(t,n,r,i){if(!1===t.visible)return;if(t.layers.test(n.layers))if(t.isGroup)r=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(n);else if(t.isLight)p.pushLight(t),t.castShadow&&p.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||z.intersectsSprite(t)){i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G);const e=re.update(t),n=t.material;n.visible&&f.push(t,e,n,r,W.z,null)}}else if(t.isImmediateRenderObject)i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G),f.push(t,null,t.material,r,W.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==Z.render.frame&&(t.skeleton.update(),t.skeleton.frame=Z.render.frame),!t.frustumCulled||z.intersectsObject(t))){i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G);const e=re.update(t),n=t.material;if(Array.isArray(n)){const i=e.groups;for(let o=0,a=i.length;o<a;o++){const a=i[o],s=n[a.materialIndex];s&&s.visible&&f.push(t,e,s,r,W.z,a)}}else n.visible&&f.push(t,e,n,r,W.z,null)}const o=t.children;for(let a=0,s=o.length;a<s;a++)e(o[a],n,r,i)}(e,t,0,v.sortObjects),f.finish(),!0===v.sortObjects&&f.sort(D,I),!0===H&&ce.beginShadows();const n=p.state.shadowsArray;ue.render(n,e,t),p.setupLights(),p.setupLightsView(t),!0===H&&ce.endShadows(),!0===this.info.autoReset&&this.info.reset(),he.render(f,e);const r=f.opaque,i=f.transmissive,o=f.transparent;r.length>0&&Ce(r,e,t),i.length>0&&function(e,t,n,r){if(null===V){const e=!0===s&&!0===K.isWebGL2;V=new(e?C:T)(1024,1024,{generateMipmaps:!0,type:null!==me.convert(1016)?1016:1009,minFilter:1008,magFilter:1003,wrapS:1001,wrapT:1001})}const i=v.getRenderTarget();v.setRenderTarget(V),v.clear();const o=v.toneMapping;v.toneMapping=0,Ce(e,n,r),v.toneMapping=o,$.updateMultisampleRenderTarget(V),$.updateRenderTargetMipmap(V),v.setRenderTarget(i),Ce(t,n,r)}(r,i,e,t),o.length>0&&Ce(o,e,t),null!==x&&($.updateMultisampleRenderTarget(x),$.updateRenderTargetMipmap(x)),!0===e.isScene&&e.onAfterRender(v,e,t),Q.buffers.depth.setTest(!0),Q.buffers.depth.setMask(!0),Q.buffers.color.setMask(!0),Q.setPolygonOffset(!1),ge.resetDefaultState(),_=-1,E=null,g.pop(),p=g.length>0?g[g.length-1]:null,m.pop(),f=m.length>0?m[m.length-1]:null},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return w},this.getRenderTarget=function(){return x},this.setRenderTarget=function(e,t=0,n=0){x=e,b=t,w=n,e&&void 0===J.get(e).__webglFramebuffer&&$.setupRenderTarget(e);let r=null,i=!1,o=!1;if(e){const n=e.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(o=!0);const a=J.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=a[t],i=!0):r=e.isWebGLMultisampleRenderTarget?J.get(e).__webglMultisampledFramebuffer:a,A.copy(e.viewport),S.copy(e.scissor),O=e.scissorTest}else A.copy(N).multiplyScalar(L).floor(),S.copy(j).multiplyScalar(L).floor(),O=B;if(Q.bindFramebuffer(36160,r)&&K.drawBuffers){let t=!1;if(e)if(e.isWebGLMultipleRenderTargets){const n=e.texture;if(F.length!==n.length||36064!==F[0]){for(let e=0,t=n.length;e<t;e++)F[e]=36064+e;F.length=n.length,t=!0}}else 1===F.length&&36064===F[0]||(F[0]=36064,F.length=1,t=!0);else 1===F.length&&1029===F[0]||(F[0]=1029,F.length=1,t=!0);t&&(K.isWebGL2?ve.drawBuffers(F):Y.get("WEBGL_draw_buffers").drawBuffersWEBGL(F))}if(Q.viewport(A),Q.scissor(S),Q.setScissorTest(O),i){const r=J.get(e.texture);ve.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(o){const r=J.get(e.texture),i=t||0;ve.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=J.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){Q.bindFramebuffer(36160,s);try{const a=e.texture,s=a.format,c=a.type;if(s!==l&&me.convert(s)!==ve.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const u=1016===c&&(Y.has("EXT_color_buffer_half_float")||K.isWebGL2&&Y.has("EXT_color_buffer_float"));if(1009!==c&&me.convert(c)!==ve.getParameter(35738)&&(1015!==c||!(K.isWebGL2||Y.has("OES_texture_float")||Y.has("WEBGL_color_buffer_float")))&&!u)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ve.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ve.readPixels(t,n,r,i,me.convert(s),me.convert(c),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==x?J.get(x).__webglFramebuffer:null;Q.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);let a=me.convert(t.format);K.isWebGL2&&(6407===a&&(a=32849),6408===a&&(a=32856)),$.setTexture2D(t,0),ve.copyTexImage2D(3553,n,a,e.x,e.y,i,o,0),Q.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,a=me.convert(n.format),s=me.convert(n.type);$.setTexture2D(n,0),ve.pixelStorei(37440,n.flipY),ve.pixelStorei(37441,n.premultiplyAlpha),ve.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):ve.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&ve.generateMipmap(3553),Q.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(v.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const o=e.max.x-e.min.x+1,a=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,l=me.convert(r.format),c=me.convert(r.type);let u;if(r.isDataTexture3D)$.setTexture3D(r,0),u=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");$.setTexture2DArray(r,0),u=35866}ve.pixelStorei(37440,r.flipY),ve.pixelStorei(37441,r.premultiplyAlpha),ve.pixelStorei(3317,r.unpackAlignment);const h=ve.getParameter(3314),d=ve.getParameter(32878),f=ve.getParameter(3316),p=ve.getParameter(3315),m=ve.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ve.pixelStorei(3314,g.width),ve.pixelStorei(32878,g.height),ve.pixelStorei(3316,e.min.x),ve.pixelStorei(3315,e.min.y),ve.pixelStorei(32877,e.min.z),n.isDataTexture||n.isDataTexture3D?ve.texSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,c,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,g.data)):ve.texSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,c,g),ve.pixelStorei(3314,h),ve.pixelStorei(32878,d),ve.pixelStorei(3316,f),ve.pixelStorei(3315,p),ve.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ve.generateMipmap(u),Q.unbindTexture()},this.initTexture=function(e){$.setTexture2D(e,0),Q.unbindTexture()},this.resetState=function(){b=0,w=0,x=null,Q.reset(),ge.reset()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}(class extends di{}).prototype.isWebGL1Renderer=!0;class fi{constructor(e,t=25e-5){this.name="",this.color=new Je(e),this.density=t}clone(){return new fi(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}fi.prototype.isFogExp2=!0;class pi{constructor(e,t=1,n=1e3){this.name="",this.color=new Je(e),this.near=t,this.far=n}clone(){return new pi(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}pi.prototype.isFog=!0;class mi extends Pe{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}mi.prototype.isScene=!0;class gi{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=f()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=f()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=f()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}gi.prototype.isInterleavedBuffer=!0;const vi=new R;class yi{constructor(e,t,n,r=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.applyMatrix4(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.applyNormalMatrix(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.transformDirection(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new nt(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new yi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}yi.prototype.isInterleavedBufferAttribute=!0;class bi extends We{constructor(e){super(),this.type="SpriteMaterial",this.color=new Je(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let wi;bi.prototype.isSpriteMaterial=!0;const xi=new R,_i=new R,Ei=new R,Ai=new b,Si=new b,Mi=new se,Ti=new R,Ci=new R,Oi=new R,Ri=new b,ki=new b,Pi=new b;class Li extends Pe{constructor(e){if(super(),this.type="Sprite",void 0===wi){wi=new pt;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new gi(e,5);wi.setIndex([0,1,2,0,2,3]),wi.setAttribute("position",new yi(t,3,0,!1)),wi.setAttribute("uv",new yi(t,2,3,!1))}this.geometry=wi,this.material=void 0!==e?e:new bi,this.center=new b(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),_i.setFromMatrixScale(this.matrixWorld),Mi.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ei.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&_i.multiplyScalar(-Ei.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;Di(Ti.set(-.5,-.5,0),Ei,o,_i,r,i),Di(Ci.set(.5,-.5,0),Ei,o,_i,r,i),Di(Oi.set(.5,.5,0),Ei,o,_i,r,i),Ri.set(0,0),ki.set(1,0),Pi.set(1,1);let a=e.ray.intersectTriangle(Ti,Ci,Oi,!1,xi);if(null===a&&(Di(Ci.set(-.5,.5,0),Ei,o,_i,r,i),ki.set(0,1),a=e.ray.intersectTriangle(Ti,Oi,Ci,!1,xi),null===a))return;const s=e.ray.origin.distanceTo(xi);s<e.near||s>e.far||t.push({distance:s,point:xi.clone(),uv:Ve.getUV(xi,Ti,Ci,Oi,Ri,ki,Pi,new b),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Di(e,t,n,r,i,o){Ai.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Si.x=o*Ai.x-i*Ai.y,Si.y=i*Ai.x+o*Ai.y):Si.copy(Ai),e.copy(t),e.x+=Si.x,e.y+=Si.y,e.applyMatrix4(Mi)}Li.prototype.isSprite=!0;const Ii=new R,Ni=new M,ji=new M,Bi=new R,Fi=new se;class zi extends Pt{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new se,this.bindMatrixInverse=new se}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new M,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;Ni.fromBufferAttribute(r.attributes.skinIndex,e),ji.fromBufferAttribute(r.attributes.skinWeight,e),Ii.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let i=0;i<4;i++){const e=ji.getComponent(i);if(0!==e){const r=Ni.getComponent(i);Fi.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(Bi.copy(Ii).applyMatrix4(Fi),e)}}return t.applyMatrix4(this.bindMatrixInverse)}}zi.prototype.isSkinnedMesh=!0;class Hi extends Pe{constructor(){super(),this.type="Bone"}}Hi.prototype.isBone=!0;class Ui extends A{constructor(e=null,t=1,n=1,r,i,o,a,s,l=1003,c=1003,u,h){super(null,o,a,s,l,c,r,i,u,h),this.image={data:e,width:t,height:n},this.magFilter=l,this.minFilter=c,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}Ui.prototype.isDataTexture=!0;const Vi=new se,Gi=new se,Wi=[],qi=new Pt;class Xi extends Pt{constructor(e,t,n){super(e,t),this.instanceMatrix=new nt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(qi.geometry=this.geometry,qi.material=this.material,void 0!==qi.material)for(let i=0;i<r;i++){this.getMatrixAt(i,Vi),Gi.multiplyMatrices(n,Vi),qi.matrixWorld=Gi,qi.raycast(e,Wi);for(let e=0,n=Wi.length;e<n;e++){const n=Wi[e];n.instanceId=i,n.object=this,t.push(n)}Wi.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new nt(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Xi.prototype.isInstancedMesh=!0;class Yi extends We{constructor(e){super(),this.type="LineBasicMaterial",this.color=new Je(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this}}Yi.prototype.isLineBasicMaterial=!0;const Ki=new R,Qi=new R,Zi=new se,Ji=new ae,$i=new J;class eo extends Pe{constructor(e=new pt,t=new Yi){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Ki.fromBufferAttribute(t,e-1),Qi.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Ki.distanceTo(Qi);e.setAttribute("lineDistance",new ot(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),$i.copy(n.boundingSphere),$i.applyMatrix4(r),$i.radius+=i,!1===e.ray.intersectsSphere($i))return;Zi.copy(r).invert(),Ji.copy(e.ray).applyMatrix4(Zi);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a,l=new R,c=new R,u=new R,h=new R,d=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){for(let n=Math.max(0,o.start),a=Math.min(r.count,o.start+o.count)-1;n<a;n+=d){const o=r.getX(n),a=r.getX(n+1);l.fromBufferAttribute(i,o),c.fromBufferAttribute(i,a);if(Ji.distanceSqToSegment(l,c,h,u)>s)continue;h.applyMatrix4(this.matrixWorld);const d=e.ray.origin.distanceTo(h);d<e.near||d>e.far||t.push({distance:d,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;n<r;n+=d){l.fromBufferAttribute(i,n),c.fromBufferAttribute(i,n+1);if(Ji.distanceSqToSegment(l,c,h,u)>s)continue;h.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(h);r<e.near||r>e.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}eo.prototype.isLine=!0;const to=new R,no=new R;class ro extends eo{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)to.fromBufferAttribute(t,e),no.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+to.distanceTo(no);e.setAttribute("lineDistance",new ot(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}ro.prototype.isLineSegments=!0;class io extends eo{constructor(e,t){super(e,t),this.type="LineLoop"}}io.prototype.isLineLoop=!0;class oo extends We{constructor(e){super(),this.type="PointsMaterial",this.color=new Je(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this}}oo.prototype.isPointsMaterial=!0;const ao=new se,so=new ae,lo=new J,co=new R;class uo extends Pe{constructor(e=new pt,t=new oo){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),lo.copy(n.boundingSphere),lo.applyMatrix4(r),lo.radius+=i,!1===e.ray.intersectsSphere(lo))return;ao.copy(r).invert(),so.copy(e.ray).applyMatrix4(ao);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position;if(null!==i){for(let n=Math.max(0,o.start),l=Math.min(i.count,o.start+o.count);n<l;n++){const o=i.getX(n);co.fromBufferAttribute(a,o),ho(co,o,s,r,e,t,this)}}else{for(let n=Math.max(0,o.start),i=Math.min(a.count,o.start+o.count);n<i;n++)co.fromBufferAttribute(a,n),ho(co,n,s,r,e,t,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function ho(e,t,n,r,i,o,a){const s=so.distanceSqToPoint(e);if(s<n){const n=new R;so.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;o.push({distance:l,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:a})}}uo.prototype.isPoints=!0;(class extends A{constructor(e,t,n,r,i,o,a,l,c){super(e,t,n,r,i,o,a,l,c),this.format=void 0!==a?a:1022,this.minFilter=void 0!==o?o:s,this.magFilter=void 0!==i?i:s,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){u.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}).prototype.isVideoTexture=!0;class fo extends A{constructor(e,t,n,r,i,o,a,s,l,c,u,h){super(null,o,a,s,l,c,r,i,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}fo.prototype.isCompressedTexture=!0;(class extends A{constructor(e,t,n,r,i,o,a,s,l){super(e,t,n,r,i,o,a,s,l),this.needsUpdate=!0}}).prototype.isCanvasTexture=!0;(class extends A{constructor(e,t,n,r,i,o,a,s,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===c&&(n=1012),void 0===n&&1027===c&&(n=1020),super(null,r,i,o,a,s,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==a?a:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}}).prototype.isDepthTexture=!0;class po extends pt{constructor(e=1,t=1,n=1,r=8,i=1,o=!1,a=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};const l=this;r=Math.floor(r),i=Math.floor(i);const c=[],u=[],h=[],d=[];let f=0;const p=[],m=n/2;let g=0;function v(n){const i=f,o=new b,p=new R;let v=0;const y=!0===n?e:t,w=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*w,0),h.push(0,w,0),d.push(.5,.5),f++;const x=f;for(let e=0;e<=r;e++){const t=e/r*s+a,n=Math.cos(t),i=Math.sin(t);p.x=y*i,p.y=m*w,p.z=y*n,u.push(p.x,p.y,p.z),h.push(0,w,0),o.x=.5*n+.5,o.y=.5*i*w+.5,d.push(o.x,o.y),f++}for(let e=0;e<r;e++){const t=i+e,r=x+e;!0===n?c.push(r,r+1,t):c.push(r+1,r,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const o=new R,v=new R;let y=0;const b=(t-e)/n;for(let l=0;l<=i;l++){const c=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*s+a,l=Math.sin(i),p=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*p,u.push(v.x,v.y,v.z),o.set(l,b,p).normalize(),h.push(o.x,o.y,o.z),d.push(t,1-g),c.push(f++)}p.push(c)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=p[t][e],r=p[t+1][e],i=p[t+1][e+1],o=p[t][e+1];c.push(n,r,o),c.push(r,i,o),y+=6}l.addGroup(g,y,0),g+=y}(),!1===o&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new ot(u,3)),this.setAttribute("normal",new ot(h,3)),this.setAttribute("uv",new ot(d,2))}static fromJSON(e){return new po(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class mo extends po{constructor(e=1,t=1,n=8,r=1,i=!1,o=0,a=2*Math.PI){super(0,e,t,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}static fromJSON(e){return new mo(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}new R,new R,new R,new Ve;class go{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let a,s=0,l=i-1;for(;s<=l;)if(r=Math.floor(s+(l-s)/2),a=n[r]-o,a<0)s=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(r=l,n[r]===o)return r/(i-1);const c=n[r];return(r+(o-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){let n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);const i=this.getPoint(n),o=this.getPoint(r),a=t||(i.isVector2?new b:new R);return a.copy(o).sub(i).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new R,r=[],i=[],o=[],a=new R,s=new se;for(let d=0;d<=e;d++){const t=d/e;r[d]=this.getTangentAt(t,new R),r[d].normalize()}i[0]=new R,o[0]=new R;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),h=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),h<=l&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(let d=1;d<=e;d++){if(i[d]=i[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(r[d-1],r[d]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(p(r[d-1].dot(r[d]),-1,1));i[d].applyMatrix4(s.makeRotationAxis(a,e))}o[d].crossVectors(r[d],i[d])}if(!0===t){let t=Math.acos(p(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vo extends go{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,a=!1,s=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s}getPoint(e,t){const n=t||new b,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const a=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(a),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=l-this.aY;s=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(s,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}vo.prototype.isEllipseCurve=!0;class yo extends vo{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.type="ArcCurve"}}function bo(){let e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){let l=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(r-t)/(a+s)+(r-n)/s;l*=a,c*=a,i(t,n,l,c)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}yo.prototype.isArcCurve=!0;const wo=new R,xo=new bo,_o=new bo,Eo=new bo;class Ao extends go{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new R){const n=t,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e;let a,s,l=Math.floor(o),c=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?a=r[(l-1)%i]:(wo.subVectors(r[0],r[1]).add(r[0]),a=wo);const u=r[l%i],h=r[(l+1)%i];if(this.closed||l+2<i?s=r[(l+2)%i]:(wo.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=wo),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(a.distanceToSquared(u),e),n=Math.pow(u.distanceToSquared(h),e),r=Math.pow(h.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),xo.initNonuniformCatmullRom(a.x,u.x,h.x,s.x,t,n,r),_o.initNonuniformCatmullRom(a.y,u.y,h.y,s.y,t,n,r),Eo.initNonuniformCatmullRom(a.z,u.z,h.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(xo.initCatmullRom(a.x,u.x,h.x,s.x,this.tension),_o.initCatmullRom(a.y,u.y,h.y,s.y,this.tension),Eo.initCatmullRom(a.z,u.z,h.z,s.z,this.tension));return n.set(xo.calc(c),_o.calc(c),Eo.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new R).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function So(e,t,n,r,i){const o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function Mo(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function To(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}Ao.prototype.isCatmullRomCurve3=!0;class Co extends go{constructor(e=new b,t=new b,n=new b,r=new b){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new b){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(To(e,r.x,i.x,o.x,a.x),To(e,r.y,i.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Co.prototype.isCubicBezierCurve=!0;class Oo extends go{constructor(e=new R,t=new R,n=new R,r=new R){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new R){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(To(e,r.x,i.x,o.x,a.x),To(e,r.y,i.y,o.y,a.y),To(e,r.z,i.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Oo.prototype.isCubicBezierCurve3=!0;class Ro extends go{constructor(e=new b,t=new b){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new b){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new b;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ro.prototype.isLineCurve=!0;class ko extends go{constructor(e=new b,t=new b,n=new b){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new b){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(Mo(e,r.x,i.x,o.x),Mo(e,r.y,i.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}ko.prototype.isQuadraticBezierCurve=!0;class Po extends go{constructor(e=new R,t=new R,n=new R){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new R){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(Mo(e,r.x,i.x,o.x),Mo(e,r.y,i.y,o.y),Mo(e,r.z,i.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Po.prototype.isQuadraticBezierCurve3=!0;class Lo extends go{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new b){const n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],l=r[o],c=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(So(a,s.x,l.x,c.x,u.x),So(a,s.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new b).fromArray(n))}return this}}Lo.prototype.isSplineCurve=!0;var Do=Object.freeze({__proto__:null,ArcCurve:yo,CatmullRomCurve3:Ao,CubicBezierCurve:Co,CubicBezierCurve3:Oo,EllipseCurve:vo,LineCurve:Ro,LineCurve3:class extends go{constructor(e=new R,t=new R){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new R){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},QuadraticBezierCurve:ko,QuadraticBezierCurve3:Po,SplineCurve:Lo});const Io=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let o=No(e,0,i,n,!0);const a=[];if(!o||o.next===o.prev)return a;let s,l,c,u,h,d,f;if(r&&(o=function(e,t,n,r){const i=[];let o,a,s,l,c;for(o=0,a=t.length;o<a;o++)s=t[o]*r,l=o<a-1?t[o+1]*r:e.length,c=No(e,s,l,r,!1),c===c.next&&(c.steiner=!0),i.push(Xo(c));for(i.sort(Vo),o=0;o<i.length;o++)Go(i[o],n),n=jo(n,n.next);return n}(e,t,o,n)),e.length>80*n){s=c=e[0],l=u=e[1];for(let t=n;t<i;t+=n)h=e[t],d=e[t+1],h<s&&(s=h),d<l&&(l=d),h>c&&(c=h),d>u&&(u=d);f=Math.max(c-s,u-l),f=0!==f?1/f:0}return Bo(o,a,n,s,l,f),a};function No(e,t,n,r,i){let o,a;if(i===function(e,t,n,r){let i=0;for(let o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=ra(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=ra(o,e[o],e[o+1],a);return a&&Zo(a,a.next)&&(ia(a),a=a.next),a}function jo(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!Zo(r,r.next)&&0!==Qo(r.prev,r,r.next))r=r.next;else{if(ia(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function Bo(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=qo(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ,r);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);let s,l,c=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,o?zo(e,r,i,o):Fo(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),ia(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?Bo(e=Ho(jo(e),t,n),t,n,r,i,o,2):2===a&&Uo(e,t,n,r,i,o):Bo(jo(e),t,n,r,i,o,1);break}}function Fo(e){const t=e.prev,n=e,r=e.next;if(Qo(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(Yo(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function zo(e,t,n,r){const i=e.prev,o=e,a=e.next;if(Qo(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=qo(s,l,t,n,r),d=qo(c,u,t,n,r);let f=e.prevZ,p=e.nextZ;for(;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Ho(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!Zo(i,o)&&Jo(i,r,r.next,o)&&ta(i,o)&&ta(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),ia(r),ia(r.next),r=e=o),r=r.next}while(r!==e);return jo(r)}function Uo(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Ko(a,e)){let s=na(a,e);return a=jo(a,a.next),s=jo(s,s.next),Bo(a,t,n,r,i,o),void Bo(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function Vo(e,t){return e.x-t.x}function Go(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o;const s=o,l=o.x,c=o.y;let u,h=1/0;n=o;do{r>=n.x&&n.x>=l&&r!==n.x&&Yo(i<c?r:a,i,l,c,i<c?a:r,i,n.x,n.y)&&(u=Math.abs(i-n.y)/(r-n.x),ta(n,e)&&(u<h||u===h&&(n.x>o.x||n.x===o.x&&Wo(o,n)))&&(o=n,h=u)),n=n.next}while(n!==s);return o}(e,t)){const n=na(t,e);jo(t,t.next),jo(n,n.next)}}function Wo(e,t){return Qo(e.prev,e,t.prev)<0&&Qo(t.next,e,e.next)<0}function qo(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Xo(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function Yo(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Ko(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Jo(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(ta(e,t)&&ta(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Qo(e.prev,e,t.prev)||Qo(e,t.prev,t))||Zo(e,t)&&Qo(e.prev,e,e.next)>0&&Qo(t.prev,t,t.next)>0)}function Qo(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Zo(e,t){return e.x===t.x&&e.y===t.y}function Jo(e,t,n,r){const i=ea(Qo(e,t,n)),o=ea(Qo(e,t,r)),a=ea(Qo(n,r,e)),s=ea(Qo(n,r,t));return i!==o&&a!==s||(!(0!==i||!$o(e,n,t))||(!(0!==o||!$o(e,r,t))||(!(0!==a||!$o(n,e,r))||!(0!==s||!$o(n,t,r)))))}function $o(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function ea(e){return e>0?1:e<0?-1:0}function ta(e,t){return Qo(e.prev,e,e.next)<0?Qo(e,t,e.next)>=0&&Qo(e,e.prev,t)>=0:Qo(e,t,e.prev)<0||Qo(e,e.next,t)<0}function na(e,t){const n=new oa(e.i,e.x,e.y),r=new oa(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function ra(e,t,n,r){const i=new oa(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function ia(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function oa(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class aa{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return aa.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];sa(e),la(n,e);let o=e.length;t.forEach(sa);for(let s=0;s<t.length;s++)r.push(o),o+=t[s].length,la(n,t[s]);const a=Io(n,r);for(let s=0;s<a.length;s+=3)i.push(a.slice(s,s+3));return i}}function sa(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function la(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class ca extends pt{constructor(e,t){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let a=0,s=e.length;a<s;a++){o(e[a])}function o(e){const o=[],a=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1;let l=void 0!==t.depth?t.depth:100,c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:6,h=void 0!==t.bevelSize?t.bevelSize:u-2,d=void 0!==t.bevelOffset?t.bevelOffset:0,f=void 0!==t.bevelSegments?t.bevelSegments:3;const p=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:ua;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=t.amount);let g,v,y,w,x,_=!1;p&&(g=p.getSpacedPoints(s),_=!0,c=!1,v=p.computeFrenetFrames(s,!1),y=new R,w=new R,x=new R),c||(f=0,u=0,h=0,d=0);const E=e.extractPoints(a);let A=E.shape;const S=E.holes;if(!aa.isClockWise(A)){A=A.reverse();for(let e=0,t=S.length;e<t;e++){const t=S[e];aa.isClockWise(t)&&(S[e]=t.reverse())}}const M=aa.triangulateShape(A,S),T=A;for(let t=0,n=S.length;t<n;t++){const e=S[t];A=A.concat(e)}function C(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const O=A.length,k=M.length;function P(e,t,n){let r,i,o;const a=e.x-t.x,s=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=a*a+s*s,h=a*c-s*l;if(Math.abs(h)>Number.EPSILON){const h=Math.sqrt(u),d=Math.sqrt(l*l+c*c),f=t.x-s/h,p=t.y+a/h,m=((n.x-c/d-f)*c-(n.y+l/d-p)*l)/(a*c-s*l);r=f+a*m-e.x,i=p+s*m-e.y;const g=r*r+i*i;if(g<=2)return new b(r,i);o=Math.sqrt(g/2)}else{let e=!1;a>Number.EPSILON?l>Number.EPSILON&&(e=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(c)&&(e=!0),e?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new b(r/o,i/o)}const L=[];for(let t=0,n=T.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),L[t]=P(T[t],T[r],T[i]);const D=[];let I,N=L.concat();for(let t=0,n=S.length;t<n;t++){const e=S[t];I=[];for(let t=0,n=e.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),I[t]=P(e[t],e[r],e[i]);D.push(I),N=N.concat(I)}for(let t=0;t<f;t++){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+d;for(let t=0,i=T.length;t<i;t++){const e=C(T[t],L[t],r);F(e.x,e.y,-n)}for(let t=0,i=S.length;t<i;t++){const e=S[t];I=D[t];for(let t=0,i=e.length;t<i;t++){const i=C(e[t],I[t],r);F(i.x,i.y,-n)}}}const j=h+d;for(let t=0;t<O;t++){const e=c?C(A[t],N[t],j):A[t];_?(w.copy(v.normals[0]).multiplyScalar(e.x),y.copy(v.binormals[0]).multiplyScalar(e.y),x.copy(g[0]).add(w).add(y),F(x.x,x.y,x.z)):F(e.x,e.y,0)}for(let t=1;t<=s;t++)for(let e=0;e<O;e++){const n=c?C(A[e],N[e],j):A[e];_?(w.copy(v.normals[t]).multiplyScalar(n.x),y.copy(v.binormals[t]).multiplyScalar(n.y),x.copy(g[t]).add(w).add(y),F(x.x,x.y,x.z)):F(n.x,n.y,l/s*t)}for(let t=f-1;t>=0;t--){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+d;for(let t=0,i=T.length;t<i;t++){const e=C(T[t],L[t],r);F(e.x,e.y,l+n)}for(let t=0,i=S.length;t<i;t++){const e=S[t];I=D[t];for(let t=0,i=e.length;t<i;t++){const i=C(e[t],I[t],r);_?F(i.x,i.y+g[s-1].y,g[s-1].x+n):F(i.x,i.y,l+n)}}}function B(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+2*f;e<n;e++){const n=O*e,o=O*(e+1);H(t+r+n,t+i+n,t+i+o,t+r+o)}}}function F(e,t,n){o.push(e),o.push(t),o.push(n)}function z(e,t,i){U(e),U(t),U(i);const o=r.length/3,a=m.generateTopUV(n,r,o-3,o-2,o-1);V(a[0]),V(a[1]),V(a[2])}function H(e,t,i,o){U(e),U(t),U(o),U(t),U(i),U(o);const a=r.length/3,s=m.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);V(s[0]),V(s[1]),V(s[3]),V(s[1]),V(s[2]),V(s[3])}function U(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function V(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=O*e;for(let n=0;n<k;n++){const e=M[n];z(e[2]+t,e[1]+t,e[0]+t)}e=s+2*f,t=O*e;for(let n=0;n<k;n++){const e=M[n];z(e[0]+t,e[1]+t,e[2]+t)}}else{for(let e=0;e<k;e++){const t=M[e];z(t[2],t[1],t[0])}for(let e=0;e<k;e++){const t=M[e];z(t[0]+O*s,t[1]+O*s,t[2]+O*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;B(T,t),t+=T.length;for(let n=0,r=S.length;n<r;n++){const e=S[n];B(e,t),t+=e.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new ot(r,3)),this.setAttribute("uv",new ot(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let r=0,i=e.length;r<i;r++){const t=e[r];n.shapes.push(t.uuid)}else n.shapes.push(e.uuid);void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let i=0,o=e.shapes.length;i<o;i++){const r=t[e.shapes[i]];n.push(r)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new Do[r.type]).fromJSON(r)),new ca(n,e.options)}}const ua={generateTopUV:function(e,t,n,r,i){const o=t[3*n],a=t[3*n+1],s=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new b(o,a),new b(s,l),new b(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){const a=t[3*n],s=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*o],g=t[3*o+1],v=t[3*o+2];return Math.abs(s-u)<Math.abs(a-c)?[new b(a,1-l),new b(c,1-h),new b(d,1-p),new b(m,1-v)]:[new b(s,1-l),new b(u,1-h),new b(f,1-p),new b(g,1-v)]}};class ha extends pt{constructor(e,t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let a=0,s=0;if(!1===Array.isArray(e))l(e);else for(let c=0;c<e.length;c++)l(e[c]),this.addGroup(a,s,c),a+=s,s=0;function l(e){const a=r.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===aa.isClockWise(c)&&(c=c.reverse());for(let t=0,n=u.length;t<n;t++){const e=u[t];!0===aa.isClockWise(e)&&(u[t]=e.reverse())}const h=aa.triangulateShape(c,u);for(let t=0,n=u.length;t<n;t++){const e=u[t];c=c.concat(e)}for(let t=0,n=c.length;t<n;t++){const e=c[t];r.push(e.x,e.y,0),i.push(0,0,1),o.push(e.x,e.y)}for(let t=0,r=h.length;t<r;t++){const e=h[t],r=e[0]+a,i=e[1]+a,o=e[2]+a;n.push(r,i,o),s+=3}}this.setIndex(n),this.setAttribute("position",new ot(r,3)),this.setAttribute("normal",new ot(i,3)),this.setAttribute("uv",new ot(o,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new ha(n,e.curveSegments)}}class da extends pt{constructor(e=1,t=8,n=6,r=0,i=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(o+a,Math.PI);let l=0;const c=[],u=new R,h=new R,d=[],f=[],p=[],m=[];for(let g=0;g<=n;g++){const d=[],v=g/n;let y=0;0==g&&0==o?y=.5/t:g==n&&s==Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const s=n/t;u.x=-e*Math.cos(r+s*i)*Math.sin(o+v*a),u.y=e*Math.cos(o+v*a),u.z=e*Math.sin(r+s*i)*Math.sin(o+v*a),f.push(u.x,u.y,u.z),h.copy(u).normalize(),p.push(h.x,h.y,h.z),m.push(s+y,1-v),d.push(l++)}c.push(d)}for(let g=0;g<n;g++)for(let e=0;e<t;e++){const t=c[g][e+1],r=c[g][e],i=c[g+1][e],a=c[g+1][e+1];(0!==g||o>0)&&d.push(t,r,a),(g!==n-1||s<Math.PI)&&d.push(r,i,a)}this.setIndex(d),this.setAttribute("position",new ot(f,3)),this.setAttribute("normal",new ot(p,3)),this.setAttribute("uv",new ot(m,2))}static fromJSON(e){return new da(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class fa extends pt{constructor(e,t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new R,s=new R,l=new b;let c=new R;const u=[],h=[],d=[],f=[];function p(i){c=e.getPointAt(i/t,c);const l=o.normals[i],d=o.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),o=-Math.cos(t);s.x=o*l.x+i*d.x,s.y=o*l.y+i*d.y,s.z=o*l.z+i*d.z,s.normalize(),h.push(s.x,s.y,s.z),a.x=c.x+n*s.x,a.y=c.y+n*s.y,a.z=c.z+n*s.z,u.push(a.x,a.y,a.z)}}!function(){for(let e=0;e<t;e++)p(e);p(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,d.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,a=(r+1)*(e-1)+t;f.push(n,i,a),f.push(i,o,a)}}()}(),this.setIndex(f),this.setAttribute("position",new ot(u,3)),this.setAttribute("normal",new ot(h,3)),this.setAttribute("uv",new ot(d,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new fa((new Do[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class pa extends We{constructor(e){super(),this.type="ShadowMaterial",this.color=new Je(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}pa.prototype.isShadowMaterial=!0;class ma extends Bt{constructor(e){super(e),this.type="RawShaderMaterial"}}ma.prototype.isRawShaderMaterial=!0;class ga extends We{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Je(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this}}ga.prototype.isMeshStandardMaterial=!0;class va extends ga{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new b(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(e){this.reflectivity=p(2.5*(e-1)/(e+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.thickness=.01,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new Je(1,1,1),this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new Je).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this}}va.prototype.isMeshPhysicalMaterial=!0;class ya extends We{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Je(16777215),this.specular=new Je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}ya.prototype.isMeshPhongMaterial=!0;class ba extends We{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}ba.prototype.isMeshToonMaterial=!0;class wa extends We{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}wa.prototype.isMeshNormalMaterial=!0;class xa extends We{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}xa.prototype.isMeshLambertMaterial=!0;class _a extends We{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}_a.prototype.isMeshMatcapMaterial=!0;class Ea extends Yi{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}Ea.prototype.isLineDashedMaterial=!0;const Aa={arraySlice:function(e,t,n){return Aa.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"===typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,a=0;a!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const a=[];for(let l=0;l<o.tracks.length;++l){const e=o.tracks[l],t=e.getValueSize(),s=[],c=[];for(let o=0;o<e.times.length;++o){const a=e.times[o]*i;if(!(a<n||a>=r)){s.push(e.times[o]);for(let n=0;n<t;++n)c.push(e.values[o*t+n])}}0!==s.length&&(e.times=Aa.convertArray(s,e.times.constructor),e.values=Aa.convertArray(c,e.values.constructor),a.push(e))}o.tracks=a;let s=1/0;for(let l=0;l<o.tracks.length;++l)s>o.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let a=0;a<i;++a){const t=n.tracks[a],r=t.ValueTypeName;if("bool"===r||"string"===r)continue;const i=e.tracks.find((function(e){return e.name===t.name&&e.ValueTypeName===r}));if(void 0===i)continue;let s=0;const l=t.getValueSize();t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);let c=0;const u=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const h=t.times.length-1;let d;if(o<=t.times[0]){const e=s,n=l-s;d=Aa.arraySlice(t.values,e,n)}else if(o>=t.times[h]){const e=h*l+s,n=e+l-s;d=Aa.arraySlice(t.values,e,n)}else{const e=t.createInterpolant(),n=s,r=l-s;e.evaluate(o),d=Aa.arraySlice(e.resultBuffer,n,r)}if("quaternion"===r){(new O).fromArray(d).normalize().conjugate().toArray(d)}const f=i.times.length;for(let e=0;e<f;++e){const t=e*u+c;if("quaternion"===r)O.multiplyQuaternionsFlat(i.values,t,d,0,i.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)i.values[t+n]-=d[n]}}}return e.blendMode=2501,e}};class Sa{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const a=t[1];e<a&&(n=2,i=a);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let o=0;o!==r;++o)t[o]=n[i+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}Sa.prototype.beforeStart_=Sa.prototype.copySampleValue_,Sa.prototype.afterEnd_=Sa.prototype.copySampleValue_;class Ma extends Sa{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:i=e,a=2*t-n;break;case 2402:i=r.length-2,a=t+r[i]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:o=e,s=2*n-t;break;case 2402:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-a),this._weightNext=l/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-h*m+2*h*p-h*f,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*f+1,y=(-1-d)*m+(1.5+d)*p+.5*f,b=d*m-d*p;for(let w=0;w!==a;++w)i[w]=g*o[c+w]+v*o[l+w]+y*o[s+w]+b*o[u+w];return i}}class Ta extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=(n-t)/(r-t),u=1-c;for(let h=0;h!==a;++h)i[h]=o[l+h]*u+o[s+h]*c;return i}}class Ca extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Oa{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Aa.convertArray(t,this.TimeBufferType),this.values=Aa.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Aa.convertArray(e.times,Array),values:Aa.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new Ca(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Ta(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Ma(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=Aa.arraySlice(n,i,o),this.values=Aa.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==i;a++){const t=n[a];if("number"===typeof t&&isNaN(t)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,t),e=!1;break}if(null!==o&&o>t){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,t,o),e=!1;break}o=t}if(void 0!==r&&Aa.isTypedArray(r))for(let a=0,s=r.length;a!==s;++a){const t=r[a];if(isNaN(t)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,t),e=!1;break}}return e}optimize(){const e=Aa.arraySlice(this.times),t=Aa.arraySlice(this.values),n=this.getValueSize(),r=2302===this.getInterpolation(),i=e.length-1;let o=1;for(let a=1;a<i;++a){let i=!1;const s=e[a];if(s!==e[a+1]&&(1!==a||s!==e[0]))if(r)i=!0;else{const e=a*n,r=e-n,o=e+n;for(let a=0;a!==n;++a){const n=t[e+a];if(n!==t[r+a]||n!==t[o+a]){i=!0;break}}}if(i){if(a!==o){e[o]=e[a];const r=a*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,a=0;a!==n;++a)t[r+a]=t[e+a];++o}return o!==e.length?(this.times=Aa.arraySlice(e,0,o),this.values=Aa.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=Aa.arraySlice(this.times,0),t=Aa.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Oa.prototype.TimeBufferType=Float32Array,Oa.prototype.ValueBufferType=Float32Array,Oa.prototype.DefaultInterpolation=2301;class Ra extends Oa{}Ra.prototype.ValueTypeName="bool",Ra.prototype.ValueBufferType=Array,Ra.prototype.DefaultInterpolation=2300,Ra.prototype.InterpolantFactoryMethodLinear=void 0,Ra.prototype.InterpolantFactoryMethodSmooth=void 0;class ka extends Oa{}ka.prototype.ValueTypeName="color";class Pa extends Oa{}Pa.prototype.ValueTypeName="number";class La extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t);let l=e*a;for(let c=l+a;l!==c;l+=4)O.slerpFlat(i,0,o,l-a,o,l,s);return i}}class Da extends Oa{InterpolantFactoryMethodLinear(e){return new La(this.times,this.values,this.getValueSize(),e)}}Da.prototype.ValueTypeName="quaternion",Da.prototype.DefaultInterpolation=2301,Da.prototype.InterpolantFactoryMethodSmooth=void 0;class Ia extends Oa{}Ia.prototype.ValueTypeName="string",Ia.prototype.ValueBufferType=Array,Ia.prototype.DefaultInterpolation=2300,Ia.prototype.InterpolantFactoryMethodLinear=void 0,Ia.prototype.InterpolantFactoryMethodSmooth=void 0;class Na extends Oa{}Na.prototype.ValueTypeName="vector";class ja{constructor(e,t=-1,n,r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=f(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(Ba(n[o]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let i=0,o=n.length;i!==o;++i)t.push(Oa.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let a=0;a<i;a++){let e=[],s=[];e.push((a+i-1)%i,a,(a+1)%i),s.push(0,1,0);const l=Aa.getKeyframeOrder(e);e=Aa.sortedArray(e,1,l),s=Aa.sortedArray(s,1,l),r||0!==e[0]||(e.push(i),s.push(s[0])),o.push(new Pa(".morphTargetInfluences["+t[a].name+"]",e,s).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let a=0,s=e.length;a<s;a++){const t=e[a],n=t.name.match(i);if(n&&n.length>1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],a=[];Aa.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode;let s=e.length||-1;const l=e.hierarchy||[];for(let c=0;c<l.length;c++){const e=l[c].keys;if(e&&0!==e.length)if(e[0].morphTargets){const t={};let n;for(n=0;n<e.length;n++)if(e[n].morphTargets)for(let r=0;r<e[n].morphTargets.length;r++)t[e[n].morphTargets[r]]=-1;for(const i in t){const t=[],o=[];for(let r=0;r!==e[n].morphTargets.length;++r){const r=e[n];t.push(r.time),o.push(r.morphTarget===i?1:0)}r.push(new Pa(".morphTargetInfluence["+i+"]",t,o))}s=t.length*(o||1)}else{const i=".bones["+t[c].name+"]";n(Na,i+".position",e,"pos",r),n(Da,i+".quaternion",e,"rot",r),n(Na,i+".scale",e,"scl",r)}}if(0===r.length)return null;return new this(i,s,r,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Ba(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Pa;case"vector":case"vector2":case"vector3":case"vector4":return Na;case"color":return ka;case"quaternion":return Da;case"bool":case"boolean":return Ra;case"string":return Ia}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];Aa.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const Fa={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class za{constructor(e,t,n){const r=this;let i=!1,o=0,a=0,s=void 0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===i&&void 0!==r.onStart&&r.onStart(e,o,a),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const Ha=new za;class Ua{constructor(e){this.manager=void 0!==e?e:Ha,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Va={};class Ga extends Ua{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;if(void 0!==Va[e])return void Va[e].push({onLoad:t,onProgress:n,onError:r});const a=e.match(/^data:(.*?)(;base64)?,(.*)$/);let s;if(a){const n=a[1],o=!!a[2];let s=a[3];s=decodeURIComponent(s),o&&(s=atob(s));try{let r;const o=(this.responseType||"").toLowerCase();switch(o){case"arraybuffer":case"blob":const e=new Uint8Array(s.length);for(let n=0;n<s.length;n++)e[n]=s.charCodeAt(n);r="blob"===o?new Blob([e.buffer],{type:n}):e.buffer;break;case"document":const t=new DOMParser;r=t.parseFromString(s,n);break;case"json":r=JSON.parse(s);break;default:r=s}setTimeout((function(){t&&t(r),i.manager.itemEnd(e)}),0)}catch(l){setTimeout((function(){r&&r(l),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{Va[e]=[],Va[e].push({onLoad:t,onProgress:n,onError:r}),s=new XMLHttpRequest,s.open("GET",e,!0),s.addEventListener("load",(function(t){const n=this.response,r=Va[e];if(delete Va[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),Fa.add(e,n);for(let e=0,t=r.length;e<t;e++){const t=r[e];t.onLoad&&t.onLoad(n)}i.manager.itemEnd(e)}else{for(let e=0,n=r.length;e<n;e++){const n=r[e];n.onError&&n.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),s.addEventListener("progress",(function(t){const n=Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onProgress&&r.onProgress(t)}}),!1),s.addEventListener("error",(function(t){const n=Va[e];delete Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),s.addEventListener("abort",(function(t){const n=Va[e];delete Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.overrideMimeType&&s.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(const e in this.requestHeader)s.setRequestHeader(e,this.requestHeader[e]);s.send(null)}return i.manager.itemStart(e),s}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Wa extends Ua{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),Fa.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return a.addEventListener("load",s,!1),a.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}class qa extends Ua{constructor(e){super(e)}load(e,t,n,r){const i=new Ut,o=new Wa(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,a++,6===a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let l=0;l<e.length;++l)s(l);return i}}class Xa extends Ua{constructor(e){super(e)}load(e,t,n,r){const i=new A,o=new Wa(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;const r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:l,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class Ya extends go{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Ro(t,e))}getPoint(e){const t=e*this.getLength(),n=this.getCurveLengths();let r=0;for(;r<n.length;){if(n[r]>=t){const e=n[r]-t,i=this.curves[r],o=i.getLength(),a=0===o?0:1-e/o;return i.getPointAt(a)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],a=o&&o.isEllipseCurve?2*e:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a);for(let e=0;e<s.length;e++){const r=s[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new Do[n.type]).fromJSON(n))}return this}}class Ka extends Ya{constructor(e){super(),this.type="Path",this.currentPoint=new b,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Ro(this.currentPoint.clone(),new b(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new ko(this.currentPoint.clone(),new b(e,t),new b(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const a=new Co(this.currentPoint.clone(),new b(e,t),new b(n,r),new b(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Lo(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,a,s){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,a,s),this}absellipse(e,t,n,r,i,o,a,s){const l=new vo(e,t,n,r,i,o,a,s);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Qa extends Ka{constructor(e){super(e),this.uuid=f(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new Ka).fromJSON(n))}return this}}class Za extends Pe{constructor(e,t=1){super(),this.type="Light",this.color=new Je(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}Za.prototype.isLight=!0;class Ja extends Za{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.groundColor=new Je(t)}copy(e){return Za.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}Ja.prototype.isHemisphereLight=!0;const $a=new se,es=new R,ts=new R;class ns{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new b(512,512),this.map=null,this.mapPass=null,this.matrix=new se,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Qt,this._frameExtents=new b(1,1),this._viewportCount=1,this._viewports=[new M(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;es.setFromMatrixPosition(e.matrixWorld),t.position.copy(es),ts.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(ts),t.updateMatrixWorld(),$a.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix($a),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class rs extends ns{constructor(){super(new zt(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*d*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}rs.prototype.isSpotLightShadow=!0;class is extends Za{constructor(e,t,n=0,r=Math.PI/3,i=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.target=new Pe,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new rs}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}is.prototype.isSpotLight=!0;const os=new se,as=new R,ss=new R;class ls extends ns{constructor(){super(new zt(90,1,.5,500)),this._frameExtents=new b(4,2),this._viewportCount=6,this._viewports=[new M(2,1,1,1),new M(0,1,1,1),new M(3,1,1,1),new M(1,1,1,1),new M(3,0,1,1),new M(1,0,1,1)],this._cubeDirections=[new R(1,0,0),new R(-1,0,0),new R(0,0,1),new R(0,0,-1),new R(0,1,0),new R(0,-1,0)],this._cubeUps=[new R(0,1,0),new R(0,1,0),new R(0,1,0),new R(0,1,0),new R(0,0,1),new R(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),as.setFromMatrixPosition(e.matrixWorld),n.position.copy(as),ss.copy(n.position),ss.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(ss),n.updateMatrixWorld(),r.makeTranslation(-as.x,-as.y,-as.z),os.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(os)}}ls.prototype.isPointLightShadow=!0;class cs extends Za{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new ls}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}cs.prototype.isPointLight=!0;class us extends Ft{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,a-=t*this.view.offsetY,s=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}us.prototype.isOrthographicCamera=!0;class hs extends ns{constructor(){super(new us(-5,5,5,-5,.5,500))}}hs.prototype.isDirectionalLightShadow=!0;class ds extends Za{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.target=new Pe,this.shadow=new hs}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}ds.prototype.isDirectionalLight=!0;class fs extends Za{constructor(e,t){super(e,t),this.type="AmbientLight"}}fs.prototype.isAmbientLight=!0;class ps extends Za{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}ps.prototype.isRectAreaLight=!0;class ms{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new R)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}ms.prototype.isSphericalHarmonics3=!0;class gs extends Za{constructor(e=new ms,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}gs.prototype.isLightProbe=!0;class vs{static decodeText(t){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(t);let n="";for(let e=0,r=t.length;e<r;e++)n+=String.fromCharCode(t[e]);try{return decodeURIComponent(escape(n))}catch(e){return n}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}}class ys extends pt{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}ys.prototype.isInstancedBufferGeometry=!0;class bs extends nt{constructor(e,t,n,r=1){"number"===typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}bs.prototype.isInstancedBufferAttribute=!0;(class extends Ua{constructor(e){super(e),"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){Fa.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}).prototype.isImageBitmapLoader=!0;class ws{constructor(){this.type="ShapePath",this.color=new Je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ka,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new Qa;i.curves=r.curves,t.push(i)}return t}function r(e,t){const n=t.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=t[i],a=t[o],s=a.x-n.x,l=a.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[o],s=-s,a=t[i],l=-l),e.y<n.y||e.y>a.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-s*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(a.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=a.x)return!0}}return r}const i=aa.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let a,s,l;const c=[];if(1===o.length)return s=o[0],l=new Qa,l.curves=s.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const h=[],d=[];let f,p,m=[],g=0;d[g]=void 0,m[g]=[];for(let v=0,y=o.length;v<y;v++)s=o[v],f=s.getPoints(),a=i(f),a=e?!a:a,a?(!u&&d[g]&&g++,d[g]={s:new Qa,p:f},d[g].s.curves=s.curves,u&&g++,m[g]=[]):m[g].push({h:s,p:f[0]});if(!d[0])return n(o);if(d.length>1){let e=!1;const t=[];for(let n=0,r=d.length;n<r;n++)h[n]=[];for(let n=0,i=d.length;n<i;n++){const i=m[n];for(let o=0;o<i.length;o++){const a=i[o];let s=!0;for(let i=0;i<d.length;i++)r(a.p,d[i].p)&&(n!==i&&t.push({froms:n,tos:i,hole:o}),s?(s=!1,h[i].push(a)):e=!0);s&&h[n].push(a)}}t.length>0&&(e||(m=h))}for(let v=0,y=d.length;v<y;v++){l=d[v].s,c.push(l),p=m[v];for(let e=0,t=p.length;e<t;e++)l.holes.push(p[e].h)}return c}}class xs{constructor(e){this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],r=function(e,t,n){const r=Array.from(e),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[];let s=0,l=0;for(let c=0;c<r.length;c++){const e=r[c];if("\n"===e)s=0,l-=o;else{const t=_s(e,i,s,l,n);s+=t.offsetX,a.push(t.path)}}return a}(e,t,this.data);for(let i=0,o=r.length;i<o;i++)Array.prototype.push.apply(n,r[i].toShapes());return n}}function _s(e,t,n,r,i){const o=i.glyphs[e]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".");const a=new ws;let s,l,c,u,h,d,f,p;if(o.o){const e=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let i=0,o=e.length;i<o;){switch(e[i++]){case"m":s=e[i++]*t+n,l=e[i++]*t+r,a.moveTo(s,l);break;case"l":s=e[i++]*t+n,l=e[i++]*t+r,a.lineTo(s,l);break;case"q":c=e[i++]*t+n,u=e[i++]*t+r,h=e[i++]*t+n,d=e[i++]*t+r,a.quadraticCurveTo(h,d,c,u);break;case"b":c=e[i++]*t+n,u=e[i++]*t+r,h=e[i++]*t+n,d=e[i++]*t+r,f=e[i++]*t+n,p=e[i++]*t+r,a.bezierCurveTo(h,d,f,p,c,u)}}}return{offsetX:o.ha*t,path:a}}xs.prototype.isFont=!0;let Es;const As=function(){return void 0===Es&&(Es=new(window.AudioContext||window.webkitAudioContext)),Es};class Ss extends Ua{constructor(e){super(e)}load(t,n,r,i){const o=this,a=new Ga(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(r){try{const e=r.slice(0);As().decodeAudioData(e,(function(e){n(e)}))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)}}(class extends gs{constructor(e,t,n=1){super(void 0,n);const r=(new Je).set(e),i=(new Je).set(t),o=new R(r.r,r.g,r.b),a=new R(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(l)}}).prototype.isHemisphereLightProbe=!0;(class extends gs{constructor(e,t=1){super(void 0,t);const n=(new Je).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}).prototype.isAmbientLightProbe=!0;class Ms{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Ts(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=Ts();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function Ts(){return("undefined"===typeof performance?Date:performance).now()}class Cs extends Pe{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}class Os{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let s=t,l=t+t;s!==l;++s)if(n[s]!==n[s+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let o=0;o!==i;++o)e[t+o]=e[n+o]}_slerp(e,t,n,r){O.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;O.multiplyQuaternionsFlat(e,o,e,t,e,n),O.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const Rs=new RegExp("[\\[\\]\\.:\\/]","g"),ks="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Ps=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ls=/(WCOD+)?/.source.replace("WCOD",ks),Ds=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Is=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ns=new RegExp("^"+Ps+Ls+Ds+Is+"$"),js=["material","materials","bones"];class Bs{constructor(e,t,n){this.path=t,this.parsedPath=n||Bs.parseTrackName(t),this.node=Bs.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Bs.Composite(e,t,n):new Bs(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Rs,"")}static parseTrackName(e){const t=Ns.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==js.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.node[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Bs.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const o=e[r];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let a=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let s=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(s=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Bs.Composite=class{constructor(e,t,n){const r=n||Bs.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Bs.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Bs.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Bs.prototype.GetterByBindingType=[Bs.prototype._getValue_direct,Bs.prototype._getValue_array,Bs.prototype._getValue_arrayElement,Bs.prototype._getValue_toArray],Bs.prototype.SetterByBindingTypeAndVersioning=[[Bs.prototype._setValue_direct,Bs.prototype._setValue_direct_setNeedsUpdate,Bs.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_array,Bs.prototype._setValue_array_setNeedsUpdate,Bs.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_arrayElement,Bs.prototype._setValue_arrayElement_setNeedsUpdate,Bs.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_fromArray,Bs.prototype._setValue_fromArray_setNeedsUpdate,Bs.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];(class{constructor(){this.uuid=f(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,r=arguments.length;n!==r;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length;let a=void 0,s=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],h=u.uuid;let d=t[h];if(void 0===d){d=s++,t[h]=d,e.push(u);for(let e=0,t=o;e!==t;++e)i[e].push(new Bs(u,n[e],r[e]))}else if(d<l){a=e[d];const s=--l,c=e[s];t[c.uuid]=d,e[d]=c,t[h]=s,e[s]=u;for(let e=0,t=o;e!==t;++e){const t=i[e],o=t[s];let a=t[d];t[d]=o,void 0===a&&(a=new Bs(u,n[e],r[e])),t[s]=a}}else e[d]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const a=arguments[o],s=a.uuid,l=t[s];if(void 0!==l&&l>=i){const o=i++,c=e[o];t[c.uuid]=l,e[l]=c,t[s]=o,e[o]=a;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[l];t[l]=r,t[o]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=e.length;for(let a=0,s=arguments.length;a!==s;++a){const s=arguments[a].uuid,l=t[s];if(void 0!==l)if(delete t[s],l<i){const a=--i,s=e[a],c=--o,u=e[c];t[s.uuid]=l,e[l]=s,t[u.uuid]=a,e[a]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[a],i=t[c];t[l]=r,t[a]=i,t.pop()}}else{const i=--o,a=e[i];i>0&&(t[a.uuid]=l),e[l]=a,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,a=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(u);for(let h=c,d=s.length;h!==d;++h){const n=s[h];u[h]=new Bs(n,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}).prototype.isAnimationObjectGroup=!0;class Fs{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,a=new Array(o),s={endingStart:2400,endingEnd:2400};for(let l=0;l!==o;++l){const e=i[l].createInterpolant(null);a[l]=e,e.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const s=a.parameterPositions,l=a.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case 2501:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(a);break;case 2500:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=2202===n;if(0===e)return-1===i?r:o&&1===(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1===(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}}(class extends c{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName;let c=l[s];void 0===c&&(c={},l[s]=c);for(let u=0;u!==i;++u){const e=r[u],i=e.name;let l=c[i];if(void 0!==l)o[u]=l;else{if(l=o[u],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,s,i));continue}const r=t&&t._propertyBindings[u].binding.parsedPath;l=new Os(Bs.create(n,i,r),e.ValueTypeName,e.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,s,i),o[u]=l}a[u].resultBuffer=l.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null;delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const e=t[n];0===--e.referenceCount&&this._removeInactiveBinding(e)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new Ta(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"===typeof e?ja.findByName(r,e):e;const a=null!==o?o.uuid:e,s=this._actionsByClip[a];let l=null;if(void 0===n&&(n=null!==o?o.blendMode:2500),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=s.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;const c=new Fs(this,o,t,n);return this._bindAction(c,l),this._addInactiveAction(c,a,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"===typeof e?ja.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let l=0;l!==n;++l){t[l]._update(r,e,i,o)}const a=this._bindings,s=this._nActiveBindings;for(let l=0;l!==s;++l)a[l].apply(o);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const i in n){const e=n[i].actionByRoot[t];void 0!==e&&(this._deactivateAction(e),this._removeInactiveAction(e))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const i in r){const e=r[i];e.restoreOriginalState(),this._removeInactiveBinding(e)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}).prototype._controlInterpolantsResultBuffer=new Float32Array(1);class zs{constructor(e){"string"===typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}clone(){return new zs(void 0===this.value.clone?this.value:this.value.clone())}}(class extends gi{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}).prototype.isInstancedInterleavedBuffer=!0;(class{constructor(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}).prototype.isGLBufferAttribute=!0;class Hs{constructor(e,t,n=0,r=1/0){this.ray=new ae(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new ye,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!1,n=[]){return Vs(e,this,n,t),n.sort(Us),n}intersectObjects(e,t=!1,n=[]){for(let r=0,i=e.length;r<i;r++)Vs(e[r],this,n,t);return n.sort(Us),n}}function Us(e,t){return e.distance-t.distance}function Vs(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)Vs(r[e],t,n,!0)}}class Gs{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(p(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}const Ws=new b;class qs{constructor(e=new b(1/0,1/0),t=new b(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Ws.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Ws.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}qs.prototype.isBox2=!0;const Xs=new R,Ys=new R;(class extends Pe{constructor(e){super(),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}).prototype.isImmediateRenderObject=!0;const Ks=new R,Qs=new se,Zs=new se;const Js=new Float32Array(1);new Int32Array(Js.buffer);Math.pow(2,8);const $s=[.125,.215,.35,.446,.526,.582],el=5+$s.length,tl=new $e({side:a,depthWrite:!1,depthTest:!1}),{_lodPlanes:nl,_sizeLods:rl,_sigmas:il}=(new Pt(new Dt,tl),ol());Math.sqrt(5);function ol(){const e=[],t=[],n=[];let r=8;for(let i=0;i<el;i++){const o=Math.pow(2,r);t.push(o);let a=1/o;i>4?a=$s[i-8+4-1]:0==i&&(a=0),n.push(a);const s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=6,d=6,f=3,p=2,m=1,g=new Float32Array(f*d*h),v=new Float32Array(p*d*h),y=new Float32Array(m*d*h);for(let e=0;e<h;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];g.set(r,f*d*e),v.set(u,p*d*e);const i=[e,e,e,e,e,e];y.set(i,m*d*e)}const b=new pt;b.setAttribute("position",new nt(g,f)),b.setAttribute("uv",new nt(v,p)),b.setAttribute("faceIndex",new nt(y,m)),e.push(b),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}go.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(go.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Ka.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},class extends ro{constructor(e=10,t=10,n=4473924,r=8947848){n=new Je(n),r=new Je(r);const i=t/2,o=e/t,a=e/2,s=[],l=[];for(let u=0,h=0,d=-a;u<=t;u++,d+=o){s.push(-a,0,d,a,0,d),s.push(d,0,-a,d,0,a);const e=u===i?n:r;e.toArray(l,h),h+=3,e.toArray(l,h),h+=3,e.toArray(l,h),h+=3,e.toArray(l,h),h+=3}const c=new pt;c.setAttribute("position",new ot(s,3)),c.setAttribute("color",new ot(l,3));super(c,new Yi({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},class extends ro{constructor(e){const t=function e(t){const n=[];t&&t.isBone&&n.push(t);for(let r=0;r<t.children.length;r++)n.push.apply(n,e(t.children[r]));return n}(e),n=new pt,r=[],i=[],o=new Je(0,0,1),a=new Je(0,1,0);for(let s=0;s<t.length;s++){const e=t[s];e.parent&&e.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.setAttribute("position",new ot(r,3)),n.setAttribute("color",new ot(i,3));super(n,new Yi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");Zs.copy(this.root.matrixWorld).invert();for(let i=0,o=0;i<t.length;i++){const e=t[i];e.parent&&e.parent.isBone&&(Qs.multiplyMatrices(Zs,e.matrixWorld),Ks.setFromMatrixPosition(Qs),r.setXYZ(o,Ks.x,Ks.y,Ks.z),Qs.multiplyMatrices(Zs,e.parent.matrixWorld),Ks.setFromMatrixPosition(Qs),r.setXYZ(o+1,Ks.x,Ks.y,Ks.z),o+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Ua.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),vs.extractUrlBase(e)},Ua.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},qs.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},qs.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},qs.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},qs.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},L.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},L.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},L.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},L.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},L.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},J.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Qt.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},class{constructor(e=new R,t=new R){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Xs.subVectors(e,this.start),Ys.subVectors(this.end,this.start);const n=Ys.dot(Ys);let r=Ys.dot(Xs)/n;return t&&(r=p(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},w.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},w.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},w.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},w.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},w.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},w.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},se.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},se.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},se.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new R).setFromMatrixColumn(this,3)},se.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},se.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},se.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},se.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},se.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},se.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},se.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},se.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},se.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},se.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},se.prototype.makeFrustum=function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},se.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Xt.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},O.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},O.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},ae.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},ae.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},ae.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},Ve.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Ve.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},Ve.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},Ve.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},Ve.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},Ve.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Ve.getBarycoord(e,t,n,r,i)},Ve.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Ve.getNormal(e,t,n,r)},Qa.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},Qa.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new ca(this,e)},Qa.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new ha(this,e)},b.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},b.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},b.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},R.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},R.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},R.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},R.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},R.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},R.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},R.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},R.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},R.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},M.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},M.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Pe.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},Pe.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Pe.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},Pe.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Pe.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Pe.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Pt.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(Pt.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),zi.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},zt.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Za.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(nt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),35048===this.usage},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),nt.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},nt.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},nt.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},pt.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},pt.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new nt(arguments[1],arguments[2])))},pt.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},pt.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},pt.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},pt.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},pt.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(pt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),gi.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},gi.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},ca.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},ca.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},ca.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},mi.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},zs.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(We.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Je}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Bt.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),di.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},di.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},di.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},di.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},di.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},di.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},di.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},di.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},di.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},di.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},di.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},di.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},di.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},di.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},di.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},di.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},di.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},di.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},di.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},di.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},di.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},di.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},di.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},di.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},di.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(di.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(ni.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(T.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Cs.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new Ss).load(e,(function(e){t.setBuffer(e)})),this},class{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ht.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Ht.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},_.crossOrigin=void 0,_.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new Xa;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},_.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new qa;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},_.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},_.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"130"}})),"undefined"!==typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="130")},function(e,t,n){"use strict";var r=n(0),i=n(32),o=n(65),a=n(28),s=n(73),l=n(89),c=n(37),u=n(74),h=n(95),d=n(5),f=n(81);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=m(m(m(m(m(m(m(m(m({},a.c),a.a),a.b),a.d),a.e),a.f),a.h),a.g),{},{href:!0,lang:!0,onScroll:!0,onWheel:!0,pointerEvents:!0}),y=r.forwardRef((function(e,t){var n=e.hrefAttrs,o=e.onLayout,a=e.onMoveShouldSetResponder,p=e.onMoveShouldSetResponderCapture,m=e.onResponderEnd,g=e.onResponderGrant,y=e.onResponderMove,x=e.onResponderReject,_=e.onResponderRelease,E=e.onResponderStart,A=e.onResponderTerminate,S=e.onResponderTerminationRequest,M=e.onScrollShouldSetResponder,T=e.onScrollShouldSetResponderCapture,C=e.onSelectionChangeShouldSetResponder,O=e.onSelectionChangeShouldSetResponderCapture,R=e.onStartShouldSetResponder,k=e.onStartShouldSetResponderCapture;var P=r.useContext(f.a),L=r.useRef(null);Object(l.a)(L,o),Object(h.a)(L,{onMoveShouldSetResponder:a,onMoveShouldSetResponderCapture:p,onResponderEnd:m,onResponderGrant:g,onResponderMove:y,onResponderReject:x,onResponderRelease:_,onResponderStart:E,onResponderTerminate:A,onResponderTerminationRequest:S,onScrollShouldSetResponder:M,onScrollShouldSetResponderCapture:T,onSelectionChangeShouldSetResponder:C,onSelectionChangeShouldSetResponderCapture:O,onStartShouldSetResponder:R,onStartShouldSetResponderCapture:k});var D=d.a.compose(P&&w.inline,e.style),I=function(e){return Object(s.a)(e,v)}(e);if(I.classList=b,I.style=D,null!=e.href&&null!=n){var N=n.download,j=n.rel,B=n.target;null!=N&&(I.download=N),null!=j&&(I.rel=j),"string"===typeof B&&(I.target="_"!==B.charAt(0)?"_"+B:B)}var F=Object(u.a)(I),z=Object(c.a)(L,F,t);return I.ref=z,Object(i.a)("div",I)}));y.displayName="View";var b=[o.a.create({view:{alignItems:"stretch",border:"0 solid black",boxSizing:"border-box",display:"flex",flexBasis:"auto",flexDirection:"column",flexShrink:0,margin:0,minHeight:0,minWidth:0,padding:0,position:"relative",zIndex:0}}).view],w=d.a.create({inline:{display:"inline-flex"}});t.a=y},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(r(t),!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;(a=new Error(t.replace(/%s/g,(function(){return String(i[s++])})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},function(e,t,n){"use strict";var r=n(13),i=n(105),o=n(82),a={position:"absolute",left:0,right:0,top:0,bottom:0},s={absoluteFill:i.a.register(a),absoluteFillObject:a,compose:function(e,t){return e&&t?[e,t]:e||t},create:function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n]&&i.a.register(e[n]);t[n]=r})),t},flatten:o.a,hairlineWidth:1};r.canUseDOM&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__&&(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=s.flatten);t.a=s},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(295)},function(e,t,n){var r=n(292),i=n(293),o=n(179),a=n(294);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r={OS:"web",select:function(e){return"web"in e?e.web:e.default},get isTesting(){return!1}};t.a=r},function(t,n,r){"use strict";(function(t){r.d(n,"a",(function(){return kn})),r.d(n,"b",(function(){return pt})),r.d(n,"c",(function(){return Mt})),r.d(n,"d",(function(){return er})),r.d(n,"e",(function(){return at})),r.d(n,"f",(function(){return Gt})),r.d(n,"g",(function(){return At})),r.d(n,"h",(function(){return Me})),r.d(n,"i",(function(){return Dt})),r.d(n,"j",(function(){return q})),r.d(n,"k",(function(){return $t})),r.d(n,"l",(function(){return $n})),r.d(n,"m",(function(){return Nt})),r.d(n,"n",(function(){return Wt})),r.d(n,"o",(function(){return Xt})),r.d(n,"p",(function(){return Mn})),r.d(n,"q",(function(){return Qt})),r.d(n,"r",(function(){return fn})),r.d(n,"s",(function(){return Ee})),r.d(n,"t",(function(){return tn})),r.d(n,"u",(function(){return kt})),r.d(n,"v",(function(){return Mt})),r.d(n,"w",(function(){return en})),r.d(n,"x",(function(){return Jt}));function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"===typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var o={};function a(){return"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:o}var s=Object.assign,l=Object.getOwnPropertyDescriptor,c=Object.defineProperty,u=Object.prototype,h=[];Object.freeze(h);var d={};Object.freeze(d);var f="undefined"!==typeof Proxy,p=Object.toString();function m(){f||i("Proxy not available")}function g(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function y(e){return"function"===typeof e}function b(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function w(e){return null!==e&&"object"===typeof e}function x(e){var t;if(!w(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===p}function _(e,t,n){c(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function E(e,t,n){c(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function A(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return w(e)&&!0===e[n]}}function S(e){return e instanceof Map}function M(e){return e instanceof Set}var T="undefined"!==typeof Object.getOwnPropertySymbols;function C(e){var t=Object.keys(e);if(!T)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return u.propertyIsEnumerable.call(e,t)}))):t}var O="undefined"!==typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:T?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function R(e){return null===e?null:"object"===typeof e?""+e:e}function k(e,t){return u.hasOwnProperty.call(e,t)}var P=Object.getOwnPropertyDescriptors||function(e){var t={};return O(e).forEach((function(n){t[n]=l(e,n)})),t};function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function I(){return(I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function N(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var z=Symbol("mobx-stored-annotations");function H(e){return Object.assign((function(t,n){U(t,n,e)}),e)}function U(e,t,n){k(e,z)||_(e,z,I({},e[z])),function(e){return"override"===e.annotationType_}(n)||(e[z][t]=n)}var V=Symbol("mobx administration"),G=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ze.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return dt(this)},t.reportChanged=function(){ut(),ft(this),ht()},t.toString=function(){return this.name_},e}(),W=A("Atom",G);function q(e,t,n){void 0===t&&(t=v),void 0===n&&(n=v);var r,i=new G(e);return t!==v&&Lt("onBO",i,t,r),n!==v&&Pt(i,n),i}var X={identity:function(e,t){return e===t},structural:function(e,t){return rr(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return rr(e,t,1)}};function Y(e,t,n){return Kt(e)?e:Array.isArray(e)?Ee.array(e,{name:n}):x(e)?Ee.object(e,void 0,{name:n}):S(e)?Ee.map(e,{name:n}):M(e)?Ee.set(e,{name:n}):e}function K(e){return e}function Q(e,t){return{annotationType_:e,options_:t,make_:Z,extend_:J}}function Z(e,t){for(var n,r,o,a=!1,s=e.target_,h=null!=(n=null==(r=this.options_)?void 0:r.bound)&&n;s&&s!==u;){var d=l(s,t);if(d){if(s===e.target_||h){var f=$(e,this,t,d);if(!e.defineProperty_(t,f))return;if(a=!0,h)break}if(s!==e.target_){if(Tt(d.value)){a=!0;break}var p=$(e,this,t,d,!1);c(s,t,p),a=!0}}s=Object.getPrototypeOf(s)}a?Vn(e,this,t):(null==(o=e.target_[z])?void 0:o[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function J(e,t,n,r){var i=$(e,this,t,n);return e.defineProperty_(t,i,r)}function $(e,t,n,r,i){var o,a,s,l,c,u;void 0===i&&(i=ot.safeDescriptors),u=r,t.annotationType_,u.value;var h,d=r.value;(null==(o=t.options_)?void 0:o.bound)&&(d=d.bind(null!=(h=e.proxy_)?h:e.target_));return{value:Pe(null!=(a=null==(s=t.options_)?void 0:s.name)?a:n.toString(),d,null!=(l=null==(c=t.options_)?void 0:c.autoAction)&&l),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ee(e,t){return{annotationType_:e,options_:t,make_:te,extend_:ne}}function te(e,t){for(var n,r=!1,o=e.target_;o&&o!==u;){var a=l(o,t);if(a){if(o!==e.target_){if(Vt(a.value)){r=!0;break}var s=re(e,this,t,a,!1);c(o,t,s)}else{var h=re(e,this,t,a);if(!e.defineProperty_(t,h))return}r=!0}o=Object.getPrototypeOf(o)}r?Vn(e,this,t):(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ne(e,t,n,r){var i=re(e,this,t,n);return e.defineProperty_(t,i,r)}function re(e,t,n,r,i){var o;return void 0===i&&(i=ot.safeDescriptors),o=r,t.annotationType_,o.value,{value:Ht(r.value),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ie(e,t){return{annotationType_:e,options_:t,make_:oe,extend_:ae}}function oe(e,t){for(var n,r=e.target_;r&&r!==u;){var o=l(r,t);if(o){if(se(e,this,t,o),!e.defineComputedProperty_(t,I({},this.options_,{get:o.get,set:o.set})))return;return void Vn(e,this,t)}r=Object.getPrototypeOf(r)}(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ae(e,t,n,r){return se(e,this,t,n),e.defineComputedProperty_(t,I({},this.options_,{get:n.get,set:n.set}),r)}function se(e,t,n,r){t.annotationType_,r.get}function le(e,t){return{annotationType_:e,options_:t,make_:ce,extend_:ue}}function ce(e,t){for(var n,r=e.target_;r&&r!==u;){var o=l(r,t);if(o){var a,s;if(he(e,this,t,o),!e.defineObservableProperty_(t,o.value,null!=(a=null==(s=this.options_)?void 0:s.enhancer)?a:Y))return;return void Vn(e,this,t)}r=Object.getPrototypeOf(r)}(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ue(e,t,n,r){var i,o;return he(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:Y,r)}function he(e,t,n,r){t.annotationType_}var de={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function fe(e){return e||de}Object.freeze(de);var pe=le("observable"),me=le("observable.ref",{enhancer:K}),ge=le("observable.shallow",{enhancer:function(e,t,n){return void 0===e||null===e||Un(e)||Mn(e)||Pn(e)||In(e)?e:Array.isArray(e)?Ee.array(e,{name:n,deep:!1}):x(e)?Ee.object(e,void 0,{name:n,deep:!1}):S(e)?Ee.map(e,{name:n,deep:!1}):M(e)?Ee.set(e,{name:n,deep:!1}):void 0}}),ve=le("observable.struct",{enhancer:function(e,t){return rr(e,t)?t:e}}),ye=H(pe);function be(e){return!0===e.deep?Y:!1===e.deep?K:function(e){var t,n;return e&&null!=(t=null==(n=e.options_)?void 0:n.enhancer)?t:Y}(e.defaultDecorator)}function we(e,t,n){if(!b(t))return Kt(e)?e:x(e)?Ee.object(e,t,n):Array.isArray(e)?Ee.array(e,t):S(e)?Ee.map(e,t):M(e)?Ee.set(e,t):"object"===typeof e&&null!==e?e:Ee.box(e,t);U(e,t,pe)}Object.assign(we,ye);var xe,_e,Ee=s(we,{box:function(e,t){var n=fe(t);return new Be(e,be(n),n.name,!0,n.equals)},array:function(e,t){var n=fe(t);return(!1===ot.useProxies||!1===n.proxy?Jn:vn)(e,be(n),n.name)},map:function(e,t){var n=fe(t);return new kn(e,be(n),n.name)},set:function(e,t){var n=fe(t);return new Dn(e,be(n),n.name)},object:function(e,t,n){return It(!1===ot.useProxies||!1===(null==n?void 0:n.proxy)?Fn({},n):function(e,t){var n,r;return m(),e=Fn(e,t),null!=(r=(n=e[V]).proxy_)?r:n.proxy_=new Proxy(e,an)}({},n),e,t)},ref:H(me),shallow:H(ge),deep:ye,struct:H(ve)}),Ae=ie("computed"),Se=ie("computed.struct",{equals:X.structural}),Me=function(e,t){if(b(t))return U(e,t,Ae);if(x(e))return H(ie("computed",e));var n=x(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Ue(n)};Object.assign(Me,Ae),Me.struct=H(Se);var Te,Ce=0,Oe=1,Re=null!=(xe=null==(_e=l((function(){}),"name"))?void 0:_e.configurable)&&xe,ke={value:"action",configurable:!0,writable:!1,enumerable:!1};function Pe(e,t,n,r){function i(){return Le(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),i.isMobxAction=!0,Re&&(ke.value=e,Object.defineProperty(i,"name",ke)),i}function Le(e,t,n,r,o){var a=function(e,t,n,r){0;var i=ot.trackingDerivation,o=!t||!i;ut();var a=ot.allowStateChanges;o&&(Ze(),a=Ie(!0));var s=$e(!0),l={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:a,prevAllowStateReads_:s,notifySpy_:!1,startTime_:0,actionId_:Oe++,parentActionId_:Ce};return Ce=l.actionId_,l}(0,t);try{return n.apply(r,o)}catch(s){throw a.error_=s,s}finally{!function(e){Ce!==e.actionId_&&i(30);Ce=e.parentActionId_,void 0!==e.error_&&(ot.suppressReactionErrors=!0);Ne(e.prevAllowStateChanges_),et(e.prevAllowStateReads_),ht(),e.runAsAction_&&Je(e.prevDerivation_);0;ot.suppressReactionErrors=!1}(a)}}function De(e,t){var n=Ie(e);try{return t()}finally{Ne(n)}}function Ie(e){var t=ot.allowStateChanges;return ot.allowStateChanges=e,t}function Ne(e){ot.allowStateChanges=e}Te=Symbol.toPrimitive;var je,Be=function(e){function t(t,n,r,i,o){var a;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=X.default),(a=e.call(this,r)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=n,a.name_=r,a.equals=o,a.value_=n(t,void 0,r),a}N(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){this.value_;if((e=this.prepareNewValue_(e))!==ot.UNCHANGED){0,this.setNewValue_(e)}},n.prepareNewValue_=function(e){if(Xe(this),sn(this)){var t=cn(this,{object:this,type:pn,newValue:e});if(!t)return ot.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?ot.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),un(this)&&dn(this,{type:pn,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return ln(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:pn,newValue:this.value_,oldValue:void 0}),hn(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return R(this.get())},n[Te]=function(){return this.valueOf()},t}(G),Fe=A("ObservableValue",Be);je=Symbol.toPrimitive;var ze,He,Ue=function(){function t(e){this.dependenciesState_=ze.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ze.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Ge(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=He.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||i(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=Pe("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?X.structural:X.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var n=t.prototype;return n.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==ze.UP_TO_DATE_)return;e.lowestObserverState_=ze.POSSIBLY_STALE_,e.observers_.forEach((function(e){e.dependenciesState_===ze.UP_TO_DATE_&&(e.dependenciesState_=ze.POSSIBLY_STALE_,e.onBecomeStale_())}))}(this)},n.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},n.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},n.get=function(){if(this.isComputing_&&i(32,this.name_,this.derivation),0!==ot.inBatch||0!==this.observers_.size||this.keepAlive_){if(dt(this),qe(this)){var e=ot.trackingContext;this.keepAlive_&&!e&&(ot.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===ze.STALE_)return;e.lowestObserverState_=ze.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===ze.POSSIBLY_STALE_?t.dependenciesState_=ze.STALE_:t.dependenciesState_===ze.UP_TO_DATE_&&(e.lowestObserverState_=ze.UP_TO_DATE_)}))}(this),ot.trackingContext=e}}else qe(this)&&(this.warnAboutUntrackedRead_(),ut(),this.value_=this.computeValue_(!1),ht());var t=this.value_;if(We(t))throw t.cause;return t},n.set=function(e){if(this.setter_){this.isRunningSetter_&&i(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else i(34,this.name_)},n.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===ze.NOT_TRACKING_,n=this.computeValue_(!0);var r=t||We(e)||We(n)||!this.equals_(e,n);return r&&(this.value_=n),r},n.computeValue_=function(t){this.isComputing_=!0;var n,r=Ie(!1);if(t)n=Ye(this,this.derivation,this.scope_);else if(!0===ot.disableErrorBoundaries)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(e){n=new Ge(e)}return Ne(r),this.isComputing_=!1,n},n.suspend_=function(){this.keepAlive_||(Ke(this),this.value_=void 0)},n.observe_=function(e,t){var n=this,r=!0,i=void 0;return Ct((function(){var o=n.get();if(!r||t){var a=Ze();e({observableKind:"computed",debugObjectName:n.name_,type:pn,object:n,newValue:o,oldValue:i}),Je(a)}r=!1,i=o}))},n.warnAboutUntrackedRead_=function(){},n.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},n.valueOf=function(){return R(this.get())},n[je]=function(){return this.valueOf()},t}(),Ve=A("ComputedValue",Ue);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(ze||(ze={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(He||(He={}));var Ge=function(e){this.cause=void 0,this.cause=e};function We(e){return e instanceof Ge}function qe(t){switch(t.dependenciesState_){case ze.UP_TO_DATE_:return!1;case ze.NOT_TRACKING_:case ze.STALE_:return!0;case ze.POSSIBLY_STALE_:for(var n=$e(!0),r=Ze(),i=t.observing_,o=i.length,a=0;a<o;a++){var s=i[a];if(Ve(s)){if(ot.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return Je(r),et(n),!0}if(t.dependenciesState_===ze.STALE_)return Je(r),et(n),!0}}return tt(t),Je(r),et(n),!1}}function Xe(e){}function Ye(t,n,r){var i=$e(!0);tt(t),t.newObserving_=new Array(t.observing_.length+100),t.unboundDepsCount_=0,t.runId_=++ot.runId;var o,a=ot.trackingDerivation;if(ot.trackingDerivation=t,ot.inBatch++,!0===ot.disableErrorBoundaries)o=n.call(r);else try{o=n.call(r)}catch(e){o=new Ge(e)}return ot.inBatch--,ot.trackingDerivation=a,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=ze.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=n[a];0===s.diffValue_&&(s.diffValue_=1,i!==a&&(n[i]=s),i++),s.dependenciesState_>r&&(r=s.dependenciesState_)}n.length=i,e.newObserving_=null,o=t.length;for(;o--;){var l=t[o];0===l.diffValue_&&lt(l,e),l.diffValue_=0}for(;i--;){var c=n[i];1===c.diffValue_&&(c.diffValue_=0,st(c,e))}r!==ze.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(t),et(i),o}function Ke(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)lt(t[n],e);e.dependenciesState_=ze.NOT_TRACKING_}function Qe(e){var t=Ze();try{return e()}finally{Je(t)}}function Ze(){var e=ot.trackingDerivation;return ot.trackingDerivation=null,e}function Je(e){ot.trackingDerivation=e}function $e(e){var t=ot.allowStateReads;return ot.allowStateReads=e,t}function et(e){ot.allowStateReads=e}function tt(e){if(e.dependenciesState_!==ze.UP_TO_DATE_){e.dependenciesState_=ze.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=ze.UP_TO_DATE_}}var nt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},rt=!0,it=!1,ot=function(){var e=a();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(rt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new nt).version&&(rt=!1),rt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new nt):(setTimeout((function(){it||i(35)}),1),new nt)}();function at(){return ot}function st(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function lt(e,t){e.observers_.delete(t),0===e.observers_.size&&ct(e)}function ct(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,ot.pendingUnobservations.push(e))}function ut(){ot.inBatch++}function ht(){if(0===--ot.inBatch){gt();for(var e=ot.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Ue&&n.suspend_())}ot.pendingUnobservations=[]}}function dt(e){var t=ot.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&ot.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&ot.inBatch>0&&ct(e),!1)}function ft(e){e.lowestObserverState_!==ze.STALE_&&(e.lowestObserverState_=ze.STALE_,e.observers_.forEach((function(e){e.dependenciesState_===ze.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=ze.STALE_})))}var pt=function(){function t(e,t,n,r){void 0===e&&(e="Reaction"),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=ze.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=He.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var n=t.prototype;return n.onBecomeStale_=function(){this.schedule_()},n.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ot.pendingReactions.push(this),gt())},n.isScheduled=function(){return this.isScheduled_},n.runReaction_=function(){if(!this.isDisposed_){ut(),this.isScheduled_=!1;var t=ot.trackingContext;if(ot.trackingContext=this,qe(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}ot.trackingContext=t,ht()}},n.track=function(e){if(!this.isDisposed_){ut();0,this.isRunning_=!0;var t=ot.trackingContext;ot.trackingContext=this;var n=Ye(this,e,void 0);ot.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Ke(this),We(n)&&this.reportExceptionInDerivation_(n.cause),ht()}},n.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(ot.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";ot.suppressReactionErrors||console.error(n,e),ot.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},n.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(ut(),Ke(this),ht()))},n.getDisposer_=function(){var e=this.dispose.bind(this);return e[V]=this,e},n.toString=function(){return"Reaction["+this.name_+"]"},n.trace=function(e){void 0===e&&(e=!1),function(){i("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"===typeof n[n.length-1]&&(e=n.pop());var o=nn(n);if(!o)return i("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===He.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled");o.isTracing_=e?He.BREAK:He.LOG}(this,e)},t}();var mt=function(e){return e()};function gt(){ot.inBatch>0||ot.isRunningReactions||mt(vt)}function vt(){ot.isRunningReactions=!0;for(var e=ot.pendingReactions,t=0;e.length>0;){100===++t&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}ot.isRunningReactions=!1}var yt=A("Reaction",pt);var bt=Q("action"),wt=Q("action.bound",{bound:!0}),xt=Q("autoAction",{autoAction:!0}),_t=Q("autoAction.bound",{autoAction:!0,bound:!0});function Et(e){return function(t,n){return y(t)?Pe(t.name||"<unnamed action>",t,e):y(n)?Pe(t,n,e):b(n)?U(t,n,e?xt:bt):b(t)?H(Q(e?"autoAction":"action",{name:t,autoAction:e})):void 0}}var At=Et(!1);Object.assign(At,bt);var St=Et(!0);function Mt(e){return Le(e.name,!1,e,this,void 0)}function Tt(e){return y(e)&&!0===e.isMobxAction}function Ct(e,t){var n,r;void 0===t&&(t=d);var i,o=null!=(n=null==(r=t)?void 0:r.name)?n:"Autorun";if(!t.scheduler&&!t.delay)i=new pt(o,(function(){this.track(l)}),t.onError,t.requiresObservable);else{var a=Rt(t),s=!1;i=new pt(o,(function(){s||(s=!0,a((function(){s=!1,i.isDisposed_||i.track(l)})))}),t.onError,t.requiresObservable)}function l(){e(i)}return i.schedule_(),i.getDisposer_()}Object.assign(St,xt),At.bound=H(wt),St.bound=H(_t);var Ot=function(e){return e()};function Rt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ot}function kt(t,n,r){var i;void 0===r&&(r=d);var o,a,s,l=null!=(i=r.name)?i:"Reaction",c=At(l,r.onError?(o=r.onError,a=n,function(){try{return a.apply(this,arguments)}catch(e){o.call(this,e)}}):n),u=!r.scheduler&&!r.delay,h=Rt(r),f=!0,p=!1,m=void 0,g=r.compareStructural?X.structural:r.equals||X.default,v=new pt(l,(function(){f||u?y():p||(p=!0,h(y))}),r.onError,r.requiresObservable);function y(){if(p=!1,!v.isDisposed_){var e=!1;v.track((function(){var n=De(!1,(function(){return t(v)}));e=f||!g(s,n),m=s,s=n})),(f&&r.fireImmediately||!f&&e)&&c(s,m,v),f=!1}}return v.schedule_(),v.getDisposer_()}function Pt(e,t,n){return Lt("onBUO",e,t,n)}function Lt(e,t,n,r){var i="function"===typeof r?$n(t,n):$n(t),o=y(r)?r:n,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function Dt(e){!0===e.isolateGlobalState&&function(){if((ot.pendingReactions.length||ot.inBatch||ot.isRunningReactions)&&i(36),it=!0,rt){var e=a();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),ot=new nt}}();var t=e.useProxies,n=e.enforceActions;if(void 0!==t&&(ot.useProxies="always"===t||"never"!==t&&"undefined"!==typeof Proxy),"ifavailable"===t&&(ot.verifyProxies=!0),void 0!==n){var r="always"===n?"always":"observed"===n;ot.enforceActions=r,ot.allowStateChanges=!0!==r&&"always"!==r}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach((function(t){t in e&&(ot[t]=!!e[t])})),ot.allowStateReads=!ot.observableRequiresReaction,e.reactionScheduler&&function(e){var t=mt;mt=function(n){return e((function(){return t(n)}))}}(e.reactionScheduler)}function It(e,t,n,r){var i=P(t),o=Fn(e,r)[V];ut();try{O(i).forEach((function(e){o.extend_(e,i[e],!n||(!(e in n)||n[e]))}))}finally{ht()}return e}function Nt(e,t){return jt($n(e,t))}function jt(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(jt)),n}var Bt=0;function Ft(){this.message="FLOW_CANCELLED"}Ft.prototype=Object.create(Error.prototype);var zt=ee("flow"),Ht=Object.assign((function(t,n){if(b(n))return U(t,n,zt);var r=t,i=r.name||"<unnamed flow>",o=function(){var t,n=this,o=arguments,a=++Bt,s=At(i+" - runid: "+a+" - init",r).apply(n,o),l=void 0,c=new Promise((function(n,r){var o=0;function c(t){var n;l=void 0;try{n=At(i+" - runid: "+a+" - yield "+o++,s.next).call(s,t)}catch(e){return r(e)}h(n)}function u(t){var n;l=void 0;try{n=At(i+" - runid: "+a+" - yield "+o++,s.throw).call(s,t)}catch(e){return r(e)}h(n)}function h(e){if(!y(null==e?void 0:e.then))return e.done?n(e.value):(l=Promise.resolve(e.value)).then(c,u);e.then(h,r)}t=r,c(void 0)}));return c.cancel=At(i+" - runid: "+a+" - cancel",(function(){try{l&&Ut(l);var n=s.return(void 0),r=Promise.resolve(n.value);r.then(v,v),Ut(r),t(new Ft)}catch(e){t(e)}})),c};return o.isMobXFlow=!0,o}),zt);function Ut(e){y(e.cancel)&&e.cancel()}function Vt(e){return!0===(null==e?void 0:e.isMobXFlow)}function Gt(e,t,n){var r;return Pn(e)||Mn(e)||Fe(e)?r=er(e):Un(e)&&(r=er(e,t)),r.dehancer="function"===typeof t?t:n,function(){r.dehancer=void 0}}function Wt(e,t,n){return y(n)?function(e,t,n){return er(e,t).intercept_(n)}(e,t,n):function(e,t){return er(e).intercept_(t)}(e,t)}function qt(e,t){if(void 0!==t){if(!1===Un(e))return!1;if(!e[V].values_.has(t))return!1;var n=$n(e,t);return Ve(n)}return Ve(e)}function Xt(e,t){return qt(e,t)}function Yt(e,t){return!!e&&(void 0!==t?!!Un(e)&&e[V].values_.has(t):Un(e)||!!e[V]||W(e)||yt(e)||Ve(e))}function Kt(e){return Yt(e)}function Qt(e,t){return Yt(e,t)}function Zt(e){return Un(e)?e[V].keys_():Pn(e)||In(e)?Array.from(e.keys()):Mn(e)?e.map((function(e,t){return t})):void i(5)}function Jt(e){return Un(e)?Zt(e).map((function(t){return e[t]})):Pn(e)?Zt(e).map((function(t){return e.get(t)})):In(e)?Array.from(e.values()):Mn(e)?e.slice():void i(6)}function $t(e){return Un(e)?Zt(e).map((function(t){return[t,e[t]]})):Pn(e)?Zt(e).map((function(t){return[t,e.get(t)]})):In(e)?Array.from(e.entries()):Mn(e)?e.map((function(e,t){return[t,e]})):void i(7)}function en(e,t,n){if(2!==arguments.length||In(e))Un(e)?e[V].set_(t,n):Pn(e)?e.set(t,n):In(e)?e.add(t):Mn(e)?("number"!==typeof t&&(t=parseInt(t,10)),t<0&&i("Invalid index: '"+t+"'"),ut(),t>=e.length&&(e.length=t+1),e[t]=n,ht()):i(8);else{ut();var r=t;try{for(var o in r)en(e,o,r[o])}finally{ht()}}}function tn(e,t,n,r){return y(n)?function(e,t,n,r){return er(e,t).observe_(n,r)}(e,t,n,r):function(e,t,n){return er(e).observe_(t,n)}(e,t,n)}function nn(e){switch(e.length){case 0:return ot.trackingDerivation;case 1:return $n(e[0]);case 2:return $n(e[0],e[1])}}function rn(e,t){void 0===t&&(t=void 0),ut();try{return e.apply(t)}finally{ht()}}function on(e){return e[V]}var an={has:function(e,t){return on(e).has_(t)},get:function(e,t){return on(e).get_(t)},set:function(e,t,n){var r;return!!b(t)&&(null==(r=on(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return!!b(t)&&(null==(n=on(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return null==(r=on(e).defineProperty_(t,n))||r},ownKeys:function(e){return on(e).ownKeys_()},preventExtensions:function(e){i(13)}};function sn(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function ln(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function cn(e,t){var n=Ze();try{for(var r=[].concat(e.interceptors_||[]),o=0,a=r.length;o<a&&((t=r[o](t))&&!t.type&&i(14),t);o++);return t}finally{Je(n)}}function un(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function hn(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function dn(e,t){var n=Ze(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);Je(n)}}function fn(e,t,n){var r=Fn(e,n)[V];ut();try{null!=t||(t=function(e){return k(e,z)||_(e,z,I({},e[z])),e[z]}(e)),O(t).forEach((function(e){return r.make_(e,t[e])}))}finally{ht()}return e}var pn="update",mn={get:function(e,t){var n=e[V];return t===V?n:"length"===t?n.getArrayLength_():"string"!==typeof t||isNaN(t)?k(yn,t)?yn[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[V];return"length"===t&&r.setArrayLength_(n),"symbol"===typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){i(15)}},gn=function(){function e(e,t,n,r){void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new G(e),this.enhancer_=function(e,n){return t(e,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return ln(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),hn(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!==typeof e||e<0)&&i("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&i(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Zn(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=h),sn(this)){var o=cn(this,{object:this.proxy_,type:"splice",index:e,removedCount:t,added:n});if(!o)return h;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map((function(e){return r.enhancer_(e,void 0)})),this.legacyMode_){var a=n.length-t;this.updateArrayLength_(i,a)}var s=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length=e+n.length-t;for(var a=0;a<n.length;a++)this.values_[e+a]=n[a];for(var s=0;s<o.length;s++)this.values_[e+n.length+s]=o[s];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&!1,i=un(this),o=i||r?{observableKind:"array",object:this.proxy_,type:pn,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&dn(this,o)},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&!1,i=un(this),o=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&dn(this,o)},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){this.atom_;var r=n[e];if(sn(this)){var o=cn(this,{type:pn,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else e===n.length?this.spliceWithArray_(e,0,[t]):i(17,e,n.length)},e}();function vn(e,t,n,r){void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),m();var i=new gn(n,t,r,!1);E(i.values_,V,i);var o=new Proxy(i.values_,mn);if(i.proxy_=o,e&&e.length){var a=Ie(!0);i.spliceWithArray_(0,0,e),Ne(a)}return o}var yn={clear:function(){return this.splice(0)},replace:function(e){var t=this[V];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=this[V];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[V].spliceWithArray_(e,t,n)},push:function(){for(var e=this[V],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[V].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[V],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return ot.trackingDerivation&&i(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ot.trackingDerivation&&i(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[V],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function bn(e,t){"function"===typeof Array.prototype[e]&&(yn[e]=t(e))}function wn(e){return function(){var t=this[V];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function xn(e){return function(t,n){var r=this,i=this[V];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e]((function(e,i){return t.call(n,e,i,r)}))}}function _n(e){return function(){var t=this,n=this[V];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}bn("concat",wn),bn("flat",wn),bn("includes",wn),bn("indexOf",wn),bn("join",wn),bn("lastIndexOf",wn),bn("slice",wn),bn("toString",wn),bn("toLocaleString",wn),bn("every",xn),bn("filter",xn),bn("find",xn),bn("findIndex",xn),bn("flatMap",xn),bn("forEach",xn),bn("map",xn),bn("some",xn),bn("reduce",_n),bn("reduceRight",_n);var En,An,Sn=A("ObservableArrayAdministration",gn);function Mn(e){return w(e)&&Sn(e[V])}var Tn={},Cn="add";En=Symbol.iterator,An=Symbol.toStringTag;var On,Rn,kn=function(){function e(e,t,n){void 0===t&&(t=Y),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[V]=Tn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,y(Map)||i(18),this.keysAtom_=q("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,this.merge(e)}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!ot.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Be(this.has_(e),K,"ObservableMap.key?",!1);this.hasMap_.set(e,r),Pt(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(sn(this)){var r=cn(this,{type:n?pn:Cn,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((this.keysAtom_,sn(this))&&!cn(this,{type:"delete",object:this,name:e}))return!1;if(this.has_(e)){var n=un(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(e).value_,name:e}:null;return rn((function(){t.keysAtom_.reportChanged(),t.updateHasMapEntry_(e,!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),n&&dn(this,r),!0}return!1},t.updateHasMapEntry_=function(e,t){var n=this.hasMap_.get(e);n&&n.setNewValue_(t)},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==ot.UNCHANGED){var r=un(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:pn,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),r&&dn(this,i)}},t.addValue_=function(e,t){var n=this;this.keysAtom_,rn((function(){var r=new Be(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,r),t=r.value_,n.updateHasMapEntry_(e,!0),n.keysAtom_.reportChanged()}));var r=un(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:Cn,object:this,name:e,newValue:t}:null;r&&dn(this,i)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return or({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return or({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[En]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=F(this);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];e.call(t,a,o,this)}},t.merge=function(e){var t=this;return Pn(e)&&(e=new Map(e)),rn((function(){x(e)?C(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):S(e)?(e.constructor!==Map&&i(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!==e&&void 0!==e&&i(20,e)})),this},t.clear=function(){var e=this;rn((function(){Qe((function(){for(var t,n=F(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return rn((function(){for(var n,r=function(e){if(S(e)||Pn(e))return e;if(Array.isArray(e))return new Map(e);if(x(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return i(21,e)}(e),o=new Map,a=!1,s=F(t.data_.keys());!(n=s()).done;){var l=n.value;if(!r.has(l))if(t.delete(l))a=!0;else{var c=t.data_.get(l);o.set(l,c)}}for(var u,h=F(r.entries());!(u=h()).done;){var d=u.value,f=d[0],p=d[1],m=t.data_.has(f);if(t.set(f,p),t.data_.has(f)){var g=t.data_.get(f);o.set(f,g),m||(a=!0)}}if(!a)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var v=t.data_.keys(),y=o.keys(),b=v.next(),w=y.next();!b.done;){if(b.value!==w.value){t.keysAtom_.reportChanged();break}b=v.next(),w=y.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},D(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:An,get:function(){return"Map"}}]),e}(),Pn=A("ObservableMap",kn);var Ln={};On=Symbol.iterator,Rn=Symbol.toStringTag;var Dn=function(){function e(e,t,n){void 0===t&&(t=Y),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[V]=Ln,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,y(Set)||i(22),this.atom_=q(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;rn((function(){Qe((function(){for(var t,n=F(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=F(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if((this.atom_,sn(this))&&!cn(this,{type:Cn,object:this,newValue:e}))return this;if(!this.has(e)){rn((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n=un(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:Cn,object:this,newValue:e}:null;0,n&&dn(this,r)}return this},t.delete=function(e){var t=this;if(sn(this)&&!cn(this,{type:"delete",object:this,oldValue:e}))return!1;if(this.has(e)){var n=un(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:e}:null;return rn((function(){t.atom_.reportChanged(),t.data_.delete(e)})),n&&dn(this,r),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return or({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return or({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return In(e)&&(e=new Set(e)),rn((function(){Array.isArray(e)||M(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!==e&&void 0!==e&&i("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[On]=function(){return this.values()},D(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Rn,get:function(){return"Set"}}]),e}(),In=A("ObservableSet",Dn),Nn=Symbol("mobx-inferred-annotations"),jn=Object.create(null),Bn=function(){function e(e,t,n,r,i){void 0===t&&(t=new Map),void 0===r&&(r=Ee),void 0===i&&(i=!1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.autoBind_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.autoBind_=i,this.keysAtom_=new G("ObservableObject.keys"),this.isPlainObject_=x(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Ue)return n.set(t),!0;if(sn(this)){var r=cn(this,{type:pn,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==ot.UNCHANGED){var i=un(this),o=i?{type:pn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&dn(this,o)}return!0},t.get_=function(e){return ot.trackingDerivation&&!k(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),k(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!ot.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Be(e in this.target_,K,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){!0===t&&(t=this.inferAnnotation_(e)),!1!==t&&(Gn(this,t,e),t.make_(this,e))},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=sr(t,this.defaultAnnotation_,this.autoBind_)),!1===n)return this.defineProperty_(e,t,r);Gn(this,n,e);var i=n.extend_(this,e,t,r);return i&&Vn(this,n,e),i},t.inferAnnotation_=function(e){var t,n=null==(t=this.target_[Nn])?void 0:t.get(e);if(n)return n;for(var r=this.target_;r&&r!==u;){var o=l(r,e);if(o){n=sr(o,this.defaultAnnotation_,this.autoBind_);break}r=Object.getPrototypeOf(r)}if(void 0===n&&i(1,"true",e),!this.isPlainObject_){var a=Object.getPrototypeOf(this.target_);k(a,Nn)||_(a,Nn,new Map),a[Nn].set(e,n)}return n},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{ut();var r=this.delete_(e);if(!r)return r;if(sn(this)){var i=cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=I({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else c(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{ht()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{ut();var i=this.delete_(e);if(!i)return i;if(sn(this)){var o=cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:t});if(!o)return null;t=o.newValue}var a=Hn(e),s={configurable:!ot.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else c(this.target_,e,s);var l=new Be(t,n,"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{ht()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{ut();var r=this.delete_(e);if(!r)return r;if(sn(this))if(!cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Hn(e),o={configurable:!ot.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else c(this.target_,e,o);this.values_.set(e,new Ue(t)),this.notifyPropertyAddition_(e,void 0)}finally{ht()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!k(this.target_,e))return!0;if(sn(this)&&!cn(this,{object:this.proxy_||this.target_,name:e,type:"remove"}))return null;try{var n,r;ut();var i,o=un(this),a=this.values_.get(e),s=void 0;if(!a&&o)s=null==(i=l(this.target_,e))?void 0:i.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(a&&(this.values_.delete(e),a instanceof Be&&(s=a.value_),ft(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),o){var c={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:s,name:e};0,o&&dn(this,c)}}finally{ht()}return!0},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,i=un(this);if(i){var o=i?{type:Cn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,i&&dn(this,o)}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),O(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Fn(e,t){var n;if(k(e,V))return e;var r=null!=(n=null==t?void 0:t.name)?n:"ObservableObject",i=new Bn(e,new Map,String(r),function(e){return e?!0===e.deep?pe:!1===e.deep?me:e.defaultDecorator:void 0}(t),null==t?void 0:t.autoBind);return _(e,V,i),e}var zn=A("ObservableObjectAdministration",Bn);function Hn(e){return jn[e]||(jn[e]={get:function(){return this[V].getObservablePropValue_(e)},set:function(t){return this[V].setObservablePropValue_(e,t)}})}function Un(e){return!!w(e)&&zn(e[V])}function Vn(e,t,n){var r;null==(r=e.target_[z])||delete r[n]}function Gn(e,t,n){}var Wn,qn,Xn=0,Yn=function(){};Wn=Yn,qn=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Wn.prototype,qn):void 0!==Wn.prototype.__proto__?Wn.prototype.__proto__=qn:Wn.prototype=qn;var Kn=function(e){function t(t,n,r,i){var o;void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this;var a=new gn(r,n,i,!0);if(a.proxy_=j(o),E(j(o),V,a),t&&t.length){var s=Ie(!0);o.spliceWithArray(0,0,t),Ne(s)}return o}N(t,e);var n=t.prototype;return n.concat=function(){this[V].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return Mn(e)?e.slice():e})))},n[Symbol.iterator]=function(){var e=this,t=0;return or({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},D(t,[{key:"length",get:function(){return this[V].getArrayLength_()},set:function(e){this[V].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}]),t}(Yn);function Qn(e){c(Kn.prototype,""+e,function(e){return{enumerable:!1,configurable:!0,get:function(){return this[V].get_(e)},set:function(t){this[V].set_(e,t)}}}(e))}function Zn(e){if(e>Xn){for(var t=Xn;t<e+100;t++)Qn(t);Xn=e}}function Jn(e,t,n){return new Kn(e,t,n)}function $n(e,t){if("object"===typeof e&&null!==e){if(Mn(e))return void 0!==t&&i(23),e[V].atom_;if(In(e))return e[V];if(Pn(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||i(25,t,tr(e)),n}if(Un(e)){if(!t)return i(26);var r=e[V].values_.get(t);return r||i(27,t,tr(e)),r}if(W(e)||Ve(e)||yt(e))return e}else if(y(e)&&yt(e[V]))return e[V];i(28)}function er(e,t){return e||i(29),void 0!==t?er($n(e,t)):W(e)||Ve(e)||yt(e)||Pn(e)||In(e)?e:e[V]?e[V]:void i(24,e)}function tr(e,t){var n;if(void 0!==t)n=$n(e,t);else{if(Tt(e))return e.name;n=Un(e)||Pn(e)||In(e)?er(e):$n(e)}return n.name_}Object.entries(yn).forEach((function(e){var t=e[0],n=e[1];"concat"!==t&&_(Kn.prototype,t,n)})),Zn(1e3);var nr=u.toString;function rr(e,t,n){return void 0===n&&(n=-1),function e(t,n,r,i,o){if(t===n)return 0!==t||1/t===1/n;if(null==t||null==n)return!1;if(t!==t)return n!==n;var a=typeof t;if(!y(a)&&"object"!==a&&"object"!=typeof n)return!1;var s=nr.call(t);if(s!==nr.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t===""+n;case"[object Number]":return+t!==+t?+n!==+n:0===+t?1/+t===1/n:+t===+n;case"[object Date]":case"[object Boolean]":return+t===+n;case"[object Symbol]":return"undefined"!==typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":r>=0&&r++}t=ir(t),n=ir(n);var l="[object Array]"===s;if(!l){if("object"!=typeof t||"object"!=typeof n)return!1;var c=t.constructor,u=n.constructor;if(c!==u&&!(y(c)&&c instanceof c&&y(u)&&u instanceof u)&&"constructor"in t&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);o=o||[];var h=(i=i||[]).length;for(;h--;)if(i[h]===t)return o[h]===n;if(i.push(t),o.push(n),l){if((h=t.length)!==n.length)return!1;for(;h--;)if(!e(t[h],n[h],r-1,i,o))return!1}else{var d,f=Object.keys(t);if(h=f.length,Object.keys(n).length!==h)return!1;for(;h--;)if(d=f[h],!k(n,d)||!e(t[d],n[d],r-1,i,o))return!1}return i.pop(),o.pop(),!0}(e,t,n)}function ir(e){return Mn(e)?e.slice():S(e)||Pn(e)||M(e)||In(e)?Array.from(e.entries()):e}function or(e){return e[Symbol.iterator]=ar,e}function ar(){return this}function sr(e,t,n){return e.get?Me:!e.set&&(y(e.value)?function(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}(e.value)?!Vt(e.value)&&Ht:!Tt(e.value)&&(n?St.bound:St):t)}["Symbol","Map","Set","Symbol"].forEach((function(e){"undefined"===typeof a()[e]&&i("MobX requires global '"+e+"' to be available or polyfilled")})),"object"===typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:tr},$mobx:V})}).call(this,r(46))},function(e,t,n){"use strict";n.r(t);t.default=function(e){return e instanceof Function?e:"string"===typeof e?function(t){return t[e]}:function(t){return e}}},function(e,t,n){"use strict";var r=n(9),i=n(0),o=n(72),a=n(26),s=n(15),l=n(49),c=n(4),u=n.n(c);function h(e,t,n){var r=[];u()(n[0]&&n[0].nativeEvent,"Native driven events only support animated values contained inside `nativeEvent`."),function e(t,n){if(t instanceof a.a)t.__makeNative(),r.push({nativeEventPath:n,animatedValueTag:t.__getNativeTag()});else if("object"===typeof t)for(var i in t)e(t[i],n.concat(i))}(n[0].nativeEvent,[]);var i=Object(l.a)(e);return null!=i&&r.forEach((function(e){s.a.API.addAnimatedEventToView(i,t,e)})),{detach:function(){null!=i&&r.forEach((function(e){s.a.API.removeAnimatedEventFromView(i,t,e.animatedValueTag)}))}}}var d=function(){function e(e,t){this._listeners=[],this._argMapping=e,null==t&&(console.warn("Animated.event now requires a second argument for options"),t={useNativeDriver:!1}),t.listener&&this.__addListener(t.listener),this._callListeners=this._callListeners.bind(this),this._attachedEvent=null,this.__isNative=Object(s.c)(t)}var t=e.prototype;return t.__addListener=function(e){this._listeners.push(e)},t.__removeListener=function(e){this._listeners=this._listeners.filter((function(t){return t!==e}))},t.__attach=function(e,t){u()(this.__isNative,"Only native driven events need to be attached."),this._attachedEvent=h(e,t,this._argMapping)},t.__detach=function(e,t){u()(this.__isNative,"Only native driven events need to be detached."),this._attachedEvent&&this._attachedEvent.detach()},t.__getHandler=function(){var e=this;if(this.__isNative)return this._callListeners;return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=function e(t,n,r){if(t instanceof a.a)"number"===typeof n&&t.setValue(n);else if("object"===typeof t)for(var i in t)e(t[i],n[i],i)};e._argMapping.forEach((function(e,t){i(e,n[t],"arg"+t)})),e._callListeners.apply(e,n)}},t._callListeners=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._listeners.forEach((function(e){return e.apply(void 0,t)}))},e}(),f=n(22),p=n(33);function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this)._transforms=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var i=r.prototype;return i.__makeNative=function(){this._transforms.forEach((function(e){for(var t in e){var n=e[t];n instanceof f.a&&n.__makeNative()}})),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._transforms.map((function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getValue():t[n]=r}return t}))},i.__getAnimatedValue=function(){return this._transforms.map((function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getAnimatedValue():t[n]=r}return t}))},i.__attach=function(){var e=this;this._transforms.forEach((function(t){for(var n in t){var r=t[n];r instanceof f.a&&r.__addChild(e)}}))},i.__detach=function(){var t=this;this._transforms.forEach((function(e){for(var n in e){var r=e[n];r instanceof f.a&&r.__removeChild(t)}})),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){var e=[];return this._transforms.forEach((function(t){for(var n in t){var r=t[n];r instanceof f.a?e.push({type:"animated",property:n,nodeTag:r.__getNativeTag()}):e.push({type:"static",property:n,value:s.a.transformDataType(r)})}})),s.a.validateTransform(e),{type:"transform",transforms:e}},r}(p.a),v=n(82);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(t){var n;return n=e.call(this)||this,(t=Object(v.a)(t)||{}).transform&&(t=b(b({},t),{},{transform:new g(t.transform)})),n._style=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n);var i=r.prototype;return i._walkStyleAndGetValues=function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?r.__isNative||(t[n]=r.__getValue()):r&&!Array.isArray(r)&&"object"===typeof r?t[n]=this._walkStyleAndGetValues(r):t[n]=r}return t},i.__getValue=function(){return this._walkStyleAndGetValues(this._style)},i._walkStyleAndGetAnimatedValues=function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getAnimatedValue():r&&!Array.isArray(r)&&"object"===typeof r&&(t[n]=this._walkStyleAndGetAnimatedValues(r))}return t},i.__getAnimatedValue=function(){return this._walkStyleAndGetAnimatedValues(this._style)},i.__attach=function(){for(var e in this._style){var t=this._style[e];t instanceof f.a&&t.__addChild(this)}},i.__detach=function(){for(var t in this._style){var n=this._style[t];n instanceof f.a&&n.__removeChild(this)}e.prototype.__detach.call(this)},i.__makeNative=function(){for(var t in this._style){var n=this._style[t];n instanceof f.a&&n.__makeNative()}e.prototype.__makeNative.call(this)},i.__getNativeConfig=function(){var e={};for(var t in this._style)if(this._style[t]instanceof f.a){var n=this._style[t];n.__makeNative(),e[t]=n.__getNativeTag()}return s.a.validateStyles(e),{type:"style",style:e}},r}(p.a);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){var t,n;function r(t,n){var r;return r=e.call(this)||this,t.style&&(t=A(A({},t),{},{style:new _(t.style)})),r._props=t,r._callback=n,r.__attach(),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n);var i=r.prototype;return i.__getValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a?(!n.__isNative||n instanceof _)&&(e[t]=n.__getValue()):e[t]=n instanceof d?n.__getHandler():n}return e},i.__getAnimatedValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a&&(e[t]=n.__getAnimatedValue())}return e},i.__attach=function(){for(var e in this._props){var t=this._props[e];t instanceof f.a&&t.__addChild(this)}},i.__detach=function(){for(var t in this.__isNative&&this._animatedView&&this.__disconnectAnimatedView(),this._props){var n=this._props[t];n instanceof f.a&&n.__removeChild(this)}e.prototype.__detach.call(this)},i.update=function(){this._callback()},i.__makeNative=function(){if(!this.__isNative){for(var e in this.__isNative=!0,this._props){var t=this._props[e];t instanceof f.a&&t.__makeNative()}this._animatedView&&this.__connectAnimatedView()}},i.setNativeView=function(e){this._animatedView!==e&&(this._animatedView=e,this.__isNative&&this.__connectAnimatedView())},i.__connectAnimatedView=function(){u()(this.__isNative,'Expected node to be marked as "native"');var e=Object(l.a)(this._animatedView);u()(null!=e,"Unable to locate attached view in the native tree"),s.a.API.connectAnimatedNodeToView(this.__getNativeTag(),e)},i.__disconnectAnimatedView=function(){u()(this.__isNative,'Expected node to be marked as "native"');var e=Object(l.a)(this._animatedView);u()(null!=e,"Unable to locate attached view in the native tree"),s.a.API.disconnectAnimatedNodeFromView(this.__getNativeTag(),e)},i.__restoreDefaultValues=function(){this.__isNative&&s.a.API.restoreDefaultValues(this.__getNativeTag())},i.__getNativeConfig=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a&&(n.__makeNative(),e[t]=n.__getNativeTag())}return{type:"props",props:e}},r}(f.a);var C=function(e){var t=e.getForwardedRef,n=e.setLocalRef;return function(e){var r=t();n(e),"function"===typeof r?r(e):"object"===typeof r&&null!=r&&(r.current=e)}};function O(){return(O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=1;var N=function(e,t){u()("function"!==typeof e||e.prototype&&e.prototype.isReactComponent,"`createAnimatedComponent` does not support stateless functional components; use a class component instead.");var n=function(n){var r,o;function a(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))||this)._invokeAnimatedPropsCallbackOnMount=!1,e._eventDetachers=[],e._animatedComponentId=I+++":animatedComponent",e._isFabric=function(){var t,n,r,i,o,a;return null!=e._component&&(null!=(null==(t=e._component._internalInstanceHandle)||null==(n=t.stateNode)?void 0:n.canonical)||null!=e._component.getNativeScrollRef&&null!=e._component.getNativeScrollRef()&&null!=(null==(r=e._component.getNativeScrollRef()._internalInstanceHandle)||null==(i=r.stateNode)?void 0:i.canonical)||null!=e._component.getScrollResponder&&null!=e._component.getScrollResponder()&&null!=e._component.getScrollResponder().getNativeScrollRef&&null!=e._component.getScrollResponder().getNativeScrollRef()&&null!=(null==(o=e._component.getScrollResponder().getNativeScrollRef()._internalInstanceHandle)||null==(a=o.stateNode)?void 0:a.canonical))},e._waitForUpdate=function(){e._isFabric()&&s.a.API.setWaitingForIdentifier(e._animatedComponentId)},e._markUpdateComplete=function(){e._isFabric()&&s.a.API.unsetWaitingForIdentifier(e._animatedComponentId)},e._animatedPropsCallback=function(){if(null==e._component)e._invokeAnimatedPropsCallbackOnMount=!0;else if("function"!==typeof e._component.setNativeProps||e._isFabric())e.forceUpdate();else{if(e._propsAnimated.__isNative)throw new Error('Attempting to run JS driven animation on animated node that has been moved to "native" earlier by starting an animation with `useNativeDriver: true`');e._component.setNativeProps(e._propsAnimated.__getAnimatedValue())}},e._setComponentRef=C({getForwardedRef:function(){return e.props.forwardedRef},setLocalRef:function(t){e._prevComponent=e._component,e._component=t,null!=t&&null==t.getNode&&(t.getNode=function(){var e;return console.warn("%s: Calling `getNode()` on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release.",null!==(e=t.constructor.name)&&void 0!==e?e:"<<anonymous>>"),t})}}),e}o=n,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,D(r,o);var l=a.prototype;return l._attachNativeEvents=function(){var e,t=this,n=null!=(e=this._component)&&e.getScrollableNode?this._component.getScrollableNode():this._component,r=function(e){var r=t.props[e];r instanceof d&&r.__isNative&&(r.__attach(n,e),t._eventDetachers.push((function(){return r.__detach(n,e)})))};for(var i in this.props)r(i)},l._detachNativeEvents=function(){this._eventDetachers.forEach((function(e){return e()})),this._eventDetachers=[]},l._attachProps=function(e){var t=this._propsAnimated;e!==t&&(this._propsAnimated=new T(e,this._animatedPropsCallback),t&&(t.__restoreDefaultValues(),t.__detach()))},l.render=function(){var n,r,o=this._propsAnimated.__getValue()||{},a=o.style,s=void 0===a?{}:a,l=L(o,["style"]),c=this.props.passthroughAnimatedPropExplicitValues||{},u=c.style,h=void 0===u?{}:u,d=L(c,["style"]),f=k(k({},s),h),p=null==this._component&&(!1===(null==t?void 0:t.collapsable)||!0!==l.collapsable)||this._isFabric(),m=(null!==(n=l.collapsable)&&void 0!==n?n:this._propsAnimated.__isNative||p||!1===(null==t?void 0:t.collapsable))?{nativeID:null!==(r=l.nativeID)&&void 0!==r?r:"animatedComponent",collapsable:!1}:{};return i.createElement(e,O({},l,d,m,{style:f,ref:this._setComponentRef}))},l.UNSAFE_componentWillMount=function(){this._waitForUpdate(),this._attachProps(this.props)},l.componentDidMount=function(){this._invokeAnimatedPropsCallbackOnMount&&(this._invokeAnimatedPropsCallbackOnMount=!1,this._animatedPropsCallback()),this._propsAnimated.setNativeView(this._component),this._attachNativeEvents(),this._markUpdateComplete()},l.UNSAFE_componentWillReceiveProps=function(e){this._waitForUpdate(),this._attachProps(e)},l.componentDidUpdate=function(e){this._component!==this._prevComponent&&this._propsAnimated.setNativeView(this._component),this._component===this._prevComponent&&e===this.props||(this._detachNativeEvents(),this._attachNativeEvents()),this._markUpdateComplete()},l.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach(),this._detachNativeEvents(),this._markUpdateComplete(),this._component=null,this._prevComponent=null},a}(i.Component);return i.forwardRef((function(e,t){return i.createElement(n,O({},e,null==t?null:{forwardedRef:t}))}))};function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var B=N(i.forwardRef((function(e,t){return i.createElement(o.a,j({scrollEventThrottle:1e-4},e,{ref:t}))}))),F=N(n(38).a,{collapsable:!1}),z=n(53);function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var U=N(i.forwardRef((function(e,t){return i.createElement(z.a,H({scrollEventThrottle:1e-4},e,{ref:t}))})),{collapsable:!1}),V=n(127);function G(){return(G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var W=N(i.forwardRef((function(e,t){return i.createElement(V.a,G({scrollEventThrottle:1e-4},e,{ref:t}))}))),q=N(n(58).a,{collapsable:!1}),X=N(n(3).a,{collapsable:!0}),Y=n(35);function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Q=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,K(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()+this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"addition",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var J=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this)||this)._a=t,i._min=n,i._max=r,i._value=i._lastValue=i._a.__getValue(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Z(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),e.prototype.__makeNative.call(this)},i.interpolate=function(e){return new Y.a(this,e)},i.__getValue=function(){var e=this._a.__getValue(),t=e-this._lastValue;return this._lastValue=e,this._value=Math.min(Math.max(this._value+t,this._min),this._max),this._value},i.__attach=function(){this._a.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"diffclamp",input:this._a.__getNativeTag(),min:this._min,max:this._max}},r}(p.a);function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ee=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._warnedAboutDivideByZero=!1,(0===n||n instanceof f.a&&0===n.__getValue())&&console.error("Detected potential division by zero in AnimatedDivision"),r._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,$(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){var e=this._a.__getValue(),t=this._b.__getValue();return 0===t?(this._warnedAboutDivideByZero||(console.error("Detected division by zero in AnimatedDivision"),this._warnedAboutDivideByZero=!0),0):(this._warnedAboutDivideByZero=!1,e/t)},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"division",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ne=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a=t,r._modulus=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,te(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"modulus",input:this._a.__getNativeTag(),modulus:this._modulus}},r}(p.a);function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ie=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,re(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()*this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"multiplication",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ae=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,oe(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()-this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"subtraction",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var he=function(e){var t,n;function r(t,n,r,i,o){var a;return(a=e.call(this)||this)._value=t,a._parent=n,a._animationClass=r,a._animationConfig=i,a._useNativeDriver=Object(s.c)(i),a._callback=o,a.__attach(),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ue(t,n);var i=r.prototype;return i.__makeNative=function(){this.__isNative=!0,this._parent.__makeNative(),e.prototype.__makeNative.call(this),this._value.__makeNative()},i.__getValue=function(){return this._parent.__getValue()},i.__attach=function(){this._parent.__addChild(this),this._useNativeDriver&&this.__makeNative()},i.__detach=function(){this._parent.__removeChild(this),e.prototype.__detach.call(this)},i.update=function(){this._value.animate(new this._animationClass(le(le({},this._animationConfig),{},{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},i.__getNativeConfig=function(){var e=new this._animationClass(le(le({},this._animationConfig),{},{toValue:void 0})).__getNativeAnimationConfig();return{type:"tracking",animationId:Object(s.b)(),animationConfig:e,toValue:this._parent.__getNativeTag(),value:this._value.__getNativeTag()}},r}(f.a),de=n(79),fe=n(244),pe=n(165),me=n(167);function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be=function(e,t){return e&&t.onComplete?function(){t.onComplete&&t.onComplete.apply(t,arguments),e&&e.apply(void 0,arguments)}:e||t.onComplete},we=function(e,t,n){if(e instanceof de.a){var r=ve({},t),i=ve({},t);for(var o in t){var a=t[o],s=a.x,l=a.y;void 0!==s&&void 0!==l&&(r[o]=s,i[o]=l)}var c=n(e.x,r),u=n(e.y,i);return Ee([c,u],{stopTogether:!1})}return null},xe=function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),t.toValue instanceof f.a?r.track(new he(r,t.toValue,me.a,i,n)):r.animate(new me.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},_e=function(e){var t=0;return{start:function(n){0===e.length?n&&n({finished:!0}):e[t].start((function r(i){i.finished&&++t!==e.length?e[t].start(r):n&&n(i)}))},stop:function(){t<e.length&&e[t].stop()},reset:function(){e.forEach((function(e,n){n<=t&&e.reset()})),t=0},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.sequence animations")},_isUsingNativeDriver:function(){return!1}}},Ee=function(e,t){var n=0,r={},i=!(t&&!1===t.stopTogether),o={start:function(t){n!==e.length?e.forEach((function(a,s){var l=function(a){if(r[s]=!0,++n===e.length)return n=0,void(t&&t(a));!a.finished&&i&&o.stop()};a?a.start(l):l({finished:!0})})):t&&t({finished:!0})},stop:function(){e.forEach((function(e,t){!r[t]&&e.stop(),r[t]=!0}))},reset:function(){e.forEach((function(e,t){e.reset(),r[t]=!1,n=0}))},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.parallel animations")},_isUsingNativeDriver:function(){return!1}};return o},Ae=function(e){return xe(new a.a(0),{toValue:0,delay:e,duration:0,useNativeDriver:!1})};var Se={Value:a.a,ValueXY:de.a,Interpolation:Y.a,Node:f.a,decay:function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),r.animate(new fe.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},timing:xe,spring:function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),t.toValue instanceof f.a?r.track(new he(r,t.toValue,pe.a,i,n)):r.animate(new pe.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},add:function(e,t){return new Q(e,t)},subtract:function(e,t){return new ae(e,t)},divide:function(e,t){return new ee(e,t)},multiply:function(e,t){return new ie(e,t)},modulo:function(e,t){return new ne(e,t)},diffClamp:function(e,t,n){return new J(e,t,n)},delay:Ae,sequence:_e,parallel:Ee,stagger:function(e,t){return Ee(t.map((function(t,n){return _e([Ae(e*n),t])})))},loop:function(e,t){var n=void 0===t?{}:t,r=n.iterations,i=void 0===r?-1:r,o=n.resetBeforeIteration,a=void 0===o||o,s=!1,l=0;return{start:function(t){e&&0!==i?e._isUsingNativeDriver()?e._startNativeLoop(i):function n(r){void 0===r&&(r={finished:!0}),s||l===i||!1===r.finished?t&&t(r):(l++,a&&e.reset(),e.start(n))}():t&&t({finished:!0})},stop:function(){s=!0,e.stop()},reset:function(){l=0,s=!1,e.reset()},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.loop animations")},_isUsingNativeDriver:function(){return e._isUsingNativeDriver()}}},event:function(e,t){var n=new d(e,t);return n.__isNative?n:n.__getHandler()},createAnimatedComponent:N,attachNativeEvent:h,forkEvent:function(e,t){return e?e instanceof d?(e.__addListener(t),e):function(){"function"===typeof e&&e.apply(void 0,arguments),t.apply(void 0,arguments)}:t},unforkEvent:function(e,t){e&&e instanceof d&&e.__removeListener(t)},Event:d,__PropsOnlyForTests:T};function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){Ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oe={start:function(){},stop:function(){},reset:function(){},_startNativeLoop:function(){},_isUsingNativeDriver:function(){return!1}},Re={Value:a.a,ValueXY:de.a,Interpolation:Y.a,Node:f.a,decay:function(e,t){return Oe},timing:function(e,t){var n=e;return Te(Te({},Oe),{},{start:function(e){n.setValue(t.toValue),e&&e({finished:!0})}})},spring:function(e,t){var n=e;return Te(Te({},Oe),{},{start:function(e){n.setValue(t.toValue),e&&e({finished:!0})}})},add:Se.add,subtract:Se.subtract,divide:Se.divide,multiply:Se.multiply,modulo:Se.modulo,diffClamp:Se.diffClamp,delay:function(e){return Oe},sequence:function(e){return Oe},parallel:function(e,t){return Oe},stagger:function(e,t){return Oe},loop:function(e,t){(void 0===t?{}:t).iterations;return Oe},event:function(e,t){return null},createAnimatedComponent:N,attachNativeEvent:h,forkEvent:Se.forkEvent,unforkEvent:Se.unforkEvent,Event:d,__PropsOnlyForTests:T};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Le=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({FlatList:B,Image:F,ScrollView:U,SectionList:W,Text:q,View:X},r.a.isTesting?Re:Se);t.a=Le},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";var r,i="function"===typeof Float32Array;function o(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,n){return((o(t,n)*e+a(t,n))*e+s(t))*e}function c(e,t,n){return 3*o(t,n)*e*e+2*a(t,n)*e+s(t)}function u(e,t,n,r){if(!(e>=0&&e<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");var o=i?new Float32Array(11):new Array(11);if(e!==t||n!==r)for(var a=0;a<11;++a)o[a]=l(.1*a,e,n);function s(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=.1;--i;var a=r+.1*((t-o[i])/(o[i+1]-o[i])),s=c(a,e,n);return s>=.001?function(e,t,n,r){for(var i=t,o=0;o<4;++o){var a=c(i,n,r);if(0===a)return i;i-=(l(i,n,r)-e)/a}return i}(t,a,e,n):0===s?a:function(e,t,n,r,i){var o,a,s=0,c=t,u=n;do{(o=l(a=c+(u-c)/2,r,i)-e)>0?u=a:c=a}while(Math.abs(o)>1e-7&&++s<10);return a}(t,r,r+.1,e,n)}return function(i){return e===t&&n===r?i:0===i?0:1===i?1:l(s(i),t,r)}}var h=function(){function e(){}return e.step0=function(e){return e>0?1:0},e.step1=function(e){return e>=1?1:0},e.linear=function(e){return e},e.ease=function(t){return r||(r=e.bezier(.42,0,1,1)),r(t)},e.quad=function(e){return e*e},e.cubic=function(e){return e*e*e},e.poly=function(e){return function(t){return Math.pow(t,e)}},e.sin=function(e){return 1-Math.cos(e*Math.PI/2)},e.circle=function(e){return 1-Math.sqrt(1-e*e)},e.exp=function(e){return Math.pow(2,10*(e-1))},e.elastic=function(e){void 0===e&&(e=1);var t=e*Math.PI;return function(e){return 1-Math.pow(Math.cos(e*Math.PI/2),3)*Math.cos(e*t)}},e.back=function(e){return void 0===e&&(e=1.70158),function(t){return t*t*((e+1)*t-e)}},e.bounce=function(e){if(e<1/2.75)return 7.5625*e*e;if(e<2/2.75){var t=e-1.5/2.75;return 7.5625*t*t+.75}if(e<2.5/2.75){var n=e-2.25/2.75;return 7.5625*n*n+.9375}var r=e-2.625/2.75;return 7.5625*r*r+.984375},e.bezier=function(e,t,n,r){return u(e,t,n,r)},e.in=function(e){return e},e.out=function(e){return function(t){return 1-e(1-t)}},e.inOut=function(e){return function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2}},e}();t.a=h},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return _}));var r,i=n(243),o=n(242),a=n(134),s=n(9),l=n(4),c=n.n(l),u="ios"===s.a.OS&&e.RN$Bridgeless?o.a:i.a,h=1,d=1,f=new Set,p=!1,m=[],g={getValue:function(e,t){c()(u,"Native animated module is not available"),u.getValue&&u.getValue(e,t)},setWaitingForIdentifier:function(e){f.add(e),p=!0},unsetWaitingForIdentifier:function(e){f.delete(e),0===f.size&&(p=!1,g.disableQueue())},disableQueue:function(){c()(u,"Native animated module is not available"),"android"===s.a.OS&&u.startOperationBatch();for(var e=0,t=m.length;e<t;e++)m[e]();m.length=0,"android"===s.a.OS&&u.finishOperationBatch()},queueOperation:function(e){p?m.push(e):e()},createAnimatedNode:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.createAnimatedNode(e,t)}))},startListeningToAnimatedNodeValue:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.startListeningToAnimatedNodeValue(e)}))},stopListeningToAnimatedNodeValue:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.stopListeningToAnimatedNodeValue(e)}))},connectAnimatedNodes:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.connectAnimatedNodes(e,t)}))},disconnectAnimatedNodes:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.disconnectAnimatedNodes(e,t)}))},startAnimatingNode:function(e,t,n,r){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.startAnimatingNode(e,t,n,r)}))},stopAnimation:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.stopAnimation(e)}))},setAnimatedNodeValue:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.setAnimatedNodeValue(e,t)}))},setAnimatedNodeOffset:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.setAnimatedNodeOffset(e,t)}))},flattenAnimatedNodeOffset:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.flattenAnimatedNodeOffset(e)}))},extractAnimatedNodeOffset:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.extractAnimatedNodeOffset(e)}))},connectAnimatedNodeToView:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.connectAnimatedNodeToView(e,t)}))},disconnectAnimatedNodeFromView:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.disconnectAnimatedNodeFromView(e,t)}))},restoreDefaultValues:function(e){c()(u,"Native animated module is not available"),null!=u.restoreDefaultValues&&g.queueOperation((function(){return u.restoreDefaultValues(e)}))},dropAnimatedNode:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.dropAnimatedNode(e)}))},addAnimatedEventToView:function(e,t,n){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.addAnimatedEventToView(e,t,n)}))},removeAnimatedEventFromView:function(e,t,n){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.removeAnimatedEventFromView(e,t,n)}))}},v={opacity:!0,transform:!0,borderRadius:!0,borderBottomEndRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderBottomStartRadius:!0,borderTopEndRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderTopStartRadius:!0,elevation:!0,zIndex:!0,shadowOpacity:!0,shadowRadius:!0,scaleX:!0,scaleY:!0,translateX:!0,translateY:!0},y={translateX:!0,translateY:!0,scale:!0,scaleX:!0,scaleY:!0,rotate:!0,rotateX:!0,rotateY:!0,rotateZ:!0,perspective:!0},b={inputRange:!0,outputRange:!0,extrapolate:!0,extrapolateRight:!0,extrapolateLeft:!0};function w(){return d++}var x=!1;function _(e){return null==e.useNativeDriver&&console.warn("Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`"),!0!==e.useNativeDriver||u?e.useNativeDriver||!1:(x||(console.warn("Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. Make sure to run `pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md"),x=!0),!1)}t.a={API:g,addWhitelistedStyleProp:function(e){v[e]=!0},addWhitelistedTransformProp:function(e){y[e]=!0},addWhitelistedInterpolationParam:function(e){b[e]=!0},validateStyles:function(e){for(var t in e)if(!v.hasOwnProperty(t))throw new Error("Style property '"+t+"' is not supported by native animated module")},validateTransform:function(e){e.forEach((function(e){if(!y.hasOwnProperty(e.property))throw new Error("Property '"+e.property+"' is not supported by native animated module")}))},validateInterpolation:function(e){for(var t in e)if(!b.hasOwnProperty(t))throw new Error("Interpolation property '"+t+"' is not supported by native animated module")},generateNewNodeTag:function(){return h++},generateNewAnimationId:w,assertNativeAnimatedModule:function(){c()(u,"Native animated module is not available")},shouldUseNativeDriver:_,transformDataType:function(e){return"string"!==typeof e?e:/deg$/.test(e)?(parseFloat(e)||0)*Math.PI/180:e},get nativeEventEmitter(){return r||(r=new a.a(u)),r}}}).call(this,n(46))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(296);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(315),i=n(316),o=n(179),a=n(317);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(15),i=n(4),o=n.n(i),a=r.a.API,s=1,l=function(){var e=t.prototype;function t(){this._listeners={}}return e.__attach=function(){},e.__detach=function(){this.__isNative&&null!=this.__nativeTag&&(r.a.API.dropAnimatedNode(this.__nativeTag),this.__nativeTag=void 0)},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(e){},e.__removeChild=function(e){},e.__getChildren=function(){return[]},e.__makeNative=function(){if(!this.__isNative)throw new Error('This node cannot be made a "native" animated node');this.hasListeners()&&this._startListeningToNativeValueUpdates()},e.addListener=function(e){var t=String(s++);return this._listeners[t]=e,this.__isNative&&this._startListeningToNativeValueUpdates(),t},e.removeListener=function(e){delete this._listeners[e],this.__isNative&&!this.hasListeners()&&this._stopListeningForNativeValueUpdates()},e.removeAllListeners=function(){this._listeners={},this.__isNative&&this._stopListeningForNativeValueUpdates()},e.hasListeners=function(){return!!Object.keys(this._listeners).length},e._startListeningToNativeValueUpdates=function(){var e=this;this.__nativeAnimatedValueListener&&!this.__shouldUpdateListenersForNewNativeTag||(this.__shouldUpdateListenersForNewNativeTag&&(this.__shouldUpdateListenersForNewNativeTag=!1,this._stopListeningForNativeValueUpdates()),a.startListeningToAnimatedNodeValue(this.__getNativeTag()),this.__nativeAnimatedValueListener=r.a.nativeEventEmitter.addListener("onAnimatedValueUpdate",(function(t){t.tag===e.__getNativeTag()&&e._onAnimatedValueUpdateReceived(t.value)})))},e._onAnimatedValueUpdateReceived=function(e){this.__callListeners(e)},e.__callListeners=function(e){for(var t in this._listeners)this._listeners[t]({value:e})},e._stopListeningForNativeValueUpdates=function(){this.__nativeAnimatedValueListener&&(this.__nativeAnimatedValueListener.remove(),this.__nativeAnimatedValueListener=null,a.stopListeningToAnimatedNodeValue(this.__getNativeTag()))},e.__getNativeTag=function(){var e;r.a.assertNativeAnimatedModule(),o()(this.__isNative,'Attempt to get native tag from node not marked as "native"');var t=null!==(e=this.__nativeTag)&&void 0!==e?e:r.a.generateNewNodeTag();return null==this.__nativeTag&&(this.__nativeTag=t,r.a.API.createAnimatedNode(t,this.__getNativeConfig()),this.__shouldUpdateListenersForNewNativeTag=!0),t},e.__getNativeConfig=function(){throw new Error("This JS animated node type cannot be used as native animated node")},e.toJSON=function(){return this.__getValue()},t}();t.a=l},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(154);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(188).default,i=n(16);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(35),i=n(33),o=n(55);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=n(15).a.API;var l=function(e){var t,n;function i(t){var n;if(n=e.call(this)||this,"number"!==typeof t)throw new Error("AnimatedValue: Attempting to set value to undefined");return n._startingValue=n._value=t,n._offset=0,n._animation=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l=i.prototype;return l.__detach=function(){var t=this;this.__isNative&&s.getValue(this.__getNativeTag(),(function(e){t._value=e})),this.stopAnimation(),e.prototype.__detach.call(this)},l.__getValue=function(){return this._value+this._offset},l.setValue=function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e,!this.__isNative),this.__isNative&&s.setAnimatedNodeValue(this.__getNativeTag(),e)},l.setOffset=function(e){this._offset=e,this.__isNative&&s.setAnimatedNodeOffset(this.__getNativeTag(),e)},l.flattenOffset=function(){this._value+=this._offset,this._offset=0,this.__isNative&&s.flattenAnimatedNodeOffset(this.__getNativeTag())},l.extractOffset=function(){this._offset+=this._value,this._value=0,this.__isNative&&s.extractAnimatedNodeOffset(this.__getNativeTag())},l.stopAnimation=function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())},l.resetAnimation=function(e){this.stopAnimation(e),this._value=this._startingValue},l._onAnimatedValueUpdateReceived=function(e){this._updateValue(e,!1)},l.interpolate=function(e){return new r.a(this,e)},l.animate=function(e,t){var n=this,r=null;e.__isInteraction&&(r=o.a.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,(function(e){n._updateValue(e,!0)}),(function(e){n._animation=null,null!==r&&o.a.clearInteractionHandle(r),t&&t(e)}),i,this)},l.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},l.track=function(e){this.stopTracking(),this._tracking=e},l._updateValue=function(t,n){if(void 0===t)throw new Error("AnimatedValue: Attempting to set value to undefined");this._value=t,n&&function(e){var t=new Set;!function e(n){"function"===typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach((function(e){return e.update()}))}(this),e.prototype.__callListeners.call(this,this.__getValue())},l.__getNativeConfig=function(){return{type:"value",value:this._value,offset:this._offset}},i}(i.a);t.a=l},function(e,t,n){"use strict";t.a=function(e){return function(){return e}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"g",(function(){return u}));var r={children:!0,dataSet:!0,nativeID:!0,ref:!0,suppressHydrationWarning:!0,testID:!0},i={accessibilityActiveDescendant:!0,accessibilityAtomic:!0,accessibilityAutoComplete:!0,accessibilityBusy:!0,accessibilityChecked:!0,accessibilityColumnCount:!0,accessibilityColumnIndex:!0,accessibilityColumnSpan:!0,accessibilityControls:!0,accessibilityCurrent:!0,accessibilityDescribedBy:!0,accessibilityDetails:!0,accessibilityDisabled:!0,accessibilityErrorMessage:!0,accessibilityExpanded:!0,accessibilityFlowTo:!0,accessibilityHasPopup:!0,accessibilityHidden:!0,accessibilityInvalid:!0,accessibilityKeyShortcuts:!0,accessibilityLabel:!0,accessibilityLabelledBy:!0,accessibilityLevel:!0,accessibilityLiveRegion:!0,accessibilityModal:!0,accessibilityMultiline:!0,accessibilityMultiSelectable:!0,accessibilityOrientation:!0,accessibilityOwns:!0,accessibilityPlaceholder:!0,accessibilityPosInSet:!0,accessibilityPressed:!0,accessibilityReadOnly:!0,accessibilityRequired:!0,accessibilityRole:!0,accessibilityRoleDescription:!0,accessibilityRowCount:!0,accessibilityRowIndex:!0,accessibilityRowSpan:!0,accessibilitySelected:!0,accessibilitySetSize:!0,accessibilitySort:!0,accessibilityValueMax:!0,accessibilityValueMin:!0,accessibilityValueNow:!0,accessibilityValueText:!0,dir:!0,focusable:!0,accessible:!0,accessibilityState:!0,accessibilityValue:!0},o={onClick:!0,onClickCapture:!0,onContextMenu:!0},a={onBlur:!0,onFocus:!0},s={onKeyDown:!0,onKeyDownCapture:!0,onKeyUp:!0,onKeyUpCapture:!0},l={onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOver:!0,onMouseOut:!0,onMouseUp:!0},c={onTouchCancel:!0,onTouchCancelCapture:!0,onTouchEnd:!0,onTouchEndCapture:!0,onTouchMove:!0,onTouchMoveCapture:!0,onTouchStart:!0,onTouchStartCapture:!0},u={classList:!0,style:!0}},function(e,t,n){"use strict";var r=n(98),i=n(104);var o=function(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||i.a.hasOwnProperty(e)&&i.a[e]?(""+t).trim():t+"px"};var a=function(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=o(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,a):n[r]=a}},s=function(e){var t=Object(r.a)(e),n=t.x,i=t.y,o=t.top,a=t.left;return{x:n,y:i,width:e.offsetWidth,height:e.offsetHeight,top:o,left:a}},l=function(e,t,n){var i=t||e&&e.parentNode;e&&i&&setTimeout((function(){var t=Object(r.a)(i),o=s(e),a=o.height,l=o.left,c=o.top,u=o.width,h=l-t.left,d=c-t.top;n(h,d,u,a,l,c)}),0)},c={A:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0},u={blur:function(e){try{e.blur()}catch(t){}},focus:function(e){try{var t=e.nodeName;null==e.getAttribute("tabIndex")&&null==c[t]&&e.setAttribute("tabIndex","-1"),e.focus()}catch(n){}},measure:function(e,t){l(e,null,t)},measureInWindow:function(e,t){e&&setTimeout((function(){var n=s(e),r=n.height,i=n.left,o=n.top,a=n.width;t(i,o,a,r)}),0)},measureLayout:function(e,t,n,r){l(e,t,r)},updateView:function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];switch(n){case"style":a(e,r);break;case"class":case"className":e.setAttribute("class",r);break;case"text":case"value":e.value=r;break;default:e.setAttribute(n,r)}}},configureNextLayoutAnimation:function(e,t){t()},setLayoutAnimationEnabledExperimental:function(){}};t.a=u},function(e,t,n){"use strict";var r=n(75);n.o(r,"NavigationContext")&&n.d(t,"NavigationContext",(function(){return r.NavigationContext})),n.o(r,"NavigationHelpersContext")&&n.d(t,"NavigationHelpersContext",(function(){return r.NavigationHelpersContext})),n.o(r,"NavigationRouteContext")&&n.d(t,"NavigationRouteContext",(function(){return r.NavigationRouteContext})),n.o(r,"StackActions")&&n.d(t,"StackActions",(function(){return r.StackActions})),n.o(r,"StackRouter")&&n.d(t,"StackRouter",(function(){return r.StackRouter})),n.o(r,"createNavigatorFactory")&&n.d(t,"createNavigatorFactory",(function(){return r.createNavigatorFactory})),n.o(r,"useNavigation")&&n.d(t,"useNavigation",(function(){return r.useNavigation})),n.o(r,"useNavigationBuilder")&&n.d(t,"useNavigationBuilder",(function(){return r.useNavigationBuilder}));var i=n(205);n.o(i,"NavigationContext")&&n.d(t,"NavigationContext",(function(){return i.NavigationContext})),n.o(i,"NavigationHelpersContext")&&n.d(t,"NavigationHelpersContext",(function(){return i.NavigationHelpersContext})),n.o(i,"NavigationRouteContext")&&n.d(t,"NavigationRouteContext",(function(){return i.NavigationRouteContext})),n.o(i,"StackActions")&&n.d(t,"StackActions",(function(){return i.StackActions})),n.o(i,"StackRouter")&&n.d(t,"StackRouter",(function(){return i.StackRouter})),n.o(i,"createNavigatorFactory")&&n.d(t,"createNavigatorFactory",(function(){return i.createNavigatorFactory})),n.o(i,"useNavigation")&&n.d(t,"useNavigation",(function(){return i.useNavigation})),n.o(i,"useNavigationBuilder")&&n.d(t,"useNavigationBuilder",(function(){return i.useNavigationBuilder}))},function(t,n,r){"use strict";(function(t,i){r.d(n,"a",(function(){return w})),r.d(n,"b",(function(){return b})),r.d(n,"c",(function(){return g})),r.d(n,"d",(function(){return Dt}));var o,a=r(10),s="warn";function l(){return s}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(o||(o={}));var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function u(e,t){function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function d(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function m(e){return ne(e,1),re(e).type}function g(e,t){return ne(e,1),Oe(t,2),re(e).onSnapshot(t)}function v(e,t){ne(e,1),Ce(t,(function(e){return"object"===typeof e}),"object or array",2),re(e).applyPatches(ge(t))}function y(e,t){void 0===t&&(t=!0),ne(e,1);var n=re(e);return t?n.snapshot:we(n.type.getSnapshot(n,!1))}function b(e){return ne(e,1),re(e).root.storedValue}function w(e){ne(e,1);var t=re(e).root.environment;return t||ue}var x=function(){function e(e,t,n,r){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:K.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=r,this.baseSetParent(t,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){var t=this.isAlive;this._state=e;var n=this.isAlive;this.aliveAtom&&t!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._hookSubscribers&&this._hookSubscribers.emit(e,this,e)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._hookSubscribers||(this._hookSubscribers=new Ee),this._hookSubscribers.register(e,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._parent=e,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&(this.pathAtom||(this.pathAtom=Object(a.j)("path")),this.pathAtom.reportObserved()),this.parent?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?Le(this._subpath):""),this.parent.getEscapedPath(e)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==K.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===K.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=Object(a.j)("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.state===K.CREATED){if(this.parent){if(this.parent.state!==K.FINALIZED)return;this.fireHook(o.afterAttach)}this.state=K.FINALIZED,e&&e()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=K.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(o.beforeDestroy)}}),e}(),_=function(t){function n(n,r,i,o,a){var s=t.call(this,n,r,i,o)||this;try{s.storedValue=n.createNewInstance(a)}catch(e){throw s.state=K.DEAD,e}return s.state=K.CREATED,s.finalizeCreation(),s}return u(n,t),Object.defineProperty(n.prototype,"root",{get:function(){if(!this.parent)throw de("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.parent!==e,r=this.subpath!==t;(n||r)&&(this.environment=void 0,this.baseSetParent(this.parent,t))}}),Object.defineProperty(n.prototype,"snapshot",{get:function(){return we(this.getSnapshot())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(n.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")}}),Object.defineProperty(n.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==K.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(n.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(n.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(n.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(n.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.fireInternalHook(e)}}),n}(x);_.prototype.die=Object(a.g)(_.prototype.die);var E,A,S=1,M={onError:function(e){throw e}},T=function(t){function n(e,n,r,i,o){var s=t.call(this,e,n,r,i)||this;if(Object.defineProperty(s,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++S}),Object.defineProperty(s,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(s,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),s._snapshotComputed=Object(a.h)((function(){return we(s.getSnapshot())})),s.unbox=s.unbox.bind(s),s._initialSnapshot=we(o),s.identifierAttribute=e.identifierAttribute,n||(s.identifierCache=new Z),s._childNodes=e.initializeChildNodes(s,s._initialSnapshot),s.identifier=null,s.unnormalizedIdentifier=null,s.identifierAttribute&&s._initialSnapshot){var l=s._initialSnapshot[s.identifierAttribute];if(void 0===l){var c=s._childNodes[s.identifierAttribute];c&&(l=c.value)}if("string"!==typeof l&&"number"!==typeof l)throw de("Instance identifier '"+s.identifierAttribute+"' for type '"+s.type.name+"' must be a string or a number");s.identifier=kt(l),s.unnormalizedIdentifier=l}return n?n.root.identifierCache.addNodeToCache(s):s.identifierCache.addNodeToCache(s),s}return u(n,t),Object.defineProperty(n.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)}}),Object.defineProperty(n.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)}}),Object.defineProperty(n.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(){0===this._observableInstanceState&&this.createObservableInstance()}}),Object.defineProperty(n.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t,n;this._observableInstanceState=1;for(var r=[],i=this.parent;i&&0===i._observableInstanceState;)r.unshift(i),i=i.parent;try{for(var a=d(r),s=a.next();!s.done;s=a.next()){s.value.createObservableInstanceIfNeeded()}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var l=this.type;try{this.storedValue=l.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,l.finalizeNewInstance(this,this.storedValue)}catch(e){throw this.state=K.DEAD,e}finally{this._isRunningAction=!1}this._observableInstanceState=2,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=ue,this.state=K.CREATED,this.fireHook(o.afterCreate),this.finalizeCreation()}}),Object.defineProperty(n.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(o.beforeDetach);var e=this.state;this.state=K.DETACHING;var t=this.root,n=t.environment,r=t.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=r}finally{this.state=e}}}}),Object.defineProperty(n.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=e!==this.parent,r=t!==this.subpath;(n||r)&&(n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,t),this.fireHook(o.afterAttach)):r&&this.baseSetParent(this.parent,t))}}),Object.defineProperty(n.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"===typeof this.storedValue&&this.storedValue[e];"function"===typeof n&&(a.c?Object(a.c)((function(){n.apply(t.storedValue)})):n.apply(this.storedValue))}}),Object.defineProperty(n.prototype,"snapshot",{get:function(){return this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(n.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(n.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(n.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()}}),Object.defineProperty(n.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=l();if(!this.isAlive&&"ignore"!==t){var n=this._getAssertAliveError(e);switch(t){case"error":throw de(n);case"warn":Te(n)}}}}),Object.defineProperty(n.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",n=e.subpath&&Le(e.subpath)||"",r=e.actionContext||N();r&&"action"!==r.type&&r.parentActionEvent&&(r=r.parentActionEvent);var i,o="";r&&null!=r.name&&(o=(r&&r.context&&(ne(i=r.context,1),re(i).path)||t)+"."+r.name+"()");return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+n+"', Action: '"+o+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."}}),Object.defineProperty(n.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(ue),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):se(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type.getChildType(e)}}),Object.defineProperty(n.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw de("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")}}),Object.defineProperty(n.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.type.removeChild(this,e)}}),Object.defineProperty(n.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e}}),Object.defineProperty(n.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")}}),Object.defineProperty(n.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.baseFinalizeCreation((function(){var t,n;try{for(var r=d(e.getChildren()),i=r.next();!i.done;i=r.next()){i.value.finalizeCreation()}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.fireInternalHook(o.afterCreationFinalization)}))}}),Object.defineProperty(n.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw de("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(n.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this._applyPatches=z(this.storedValue,"@APPLY_PATCHES",(function(t){t.forEach((function(t){if(t.path){var n=Ne(t.path);ae(e,n.slice(0,-1)).applyPatchLocally(n[n.length-1],t)}else e.type.applySnapshot(e,t.value)}))})),this._applySnapshot=z(this.storedValue,"@APPLY_SNAPSHOT",(function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)})),xe(this.storedValue,"$treenode",this),xe(this.storedValue,"toJSON",oe)}}),Object.defineProperty(n.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==K.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(n.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){0!==this._observableInstanceState&&(this.getChildren().forEach((function(e){e.aboutToDie()})),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))}}),Object.defineProperty(n.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach((function(e){e.finalizeDeath()})),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(n.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)}}),Object.defineProperty(n.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEventsEmit("snapshot",e)}}),Object.defineProperty(n.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsRegister("patch",e)}}),Object.defineProperty(n.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._internalEventsHasSubscribers("patch")){var n=f(function(e){if(!("oldValue"in e))throw de("Patches without `oldValue` field cannot be inversed");return[ke(e),Pe(e)]}(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var i=t[r];for(var o in i)e[o]=i[o]}return e}({},e,{path:t.path.substr(this.path.length)+"/"+e.path})),2),r=n[0],i=n[1];this._internalEventsEmit("patch",r,i)}this.parent&&this.parent.emitPatch(e,t)}}),Object.defineProperty(n.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsHas("dispose",e)}}),Object.defineProperty(n.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.hasDisposer(e))throw de("cannot add a disposer when it is already registered for execution");this._internalEventsRegister("dispose",e,!0)}}),Object.defineProperty(n.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._internalEventsHas("dispose",e))throw de("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",e)}}),Object.defineProperty(n.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.middlewares){var t=this.middlewares.indexOf(e);t>=0&&this.middlewares.splice(t,1)}}}),Object.defineProperty(n.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=!0);var r={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}}}),Object.defineProperty(n.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)}}),Object.defineProperty(n.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(!this._hasSnapshotReaction){var t=Object(a.u)((function(){return e.snapshot}),(function(t){return e.emitSnapshot(t)}),M);this.addDisposer(t),this._hasSnapshotReaction=!0}}}),Object.defineProperty(n.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)}}),Object.defineProperty(n.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new Ee),this._internalEvents.register(e,t,n)}}),Object.defineProperty(n.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._internalEvents&&(t=this._internalEvents).emit.apply(t,p([e],n))}}),Object.defineProperty(n.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEvents&&this._internalEvents.clear(e)}}),Object.defineProperty(n.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),n}(x);T.prototype.createObservableInstance=Object(a.g)(T.prototype.createObservableInstance),T.prototype.detach=Object(a.g)(T.prototype.detach),T.prototype.die=Object(a.g)(T.prototype.die),function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor"}(A||(A={}));var C=Symbol("$type"),O=function(){function e(e){Object.defineProperty(this,E,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Y(this,e),this.instantiate(null,"",t,e).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw de("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(ie(e)){var n=m(e);return this.isAssignableFrom(n)?W():q(t,e)}return this.isValidSnapshot(e,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return 0===this.validate(e,[{path:"",type:this}]).length}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw de("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw de("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw de("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw de("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();E=C,O.prototype.create=Object(a.g)(O.prototype.create);var R=function(e){function t(t){var n=e.call(this,t)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return u(t,e),Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return void 0===t&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,n)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.createObservableInstanceIfNeeded(),e.storedValue}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!e.isDetaching&&(e.snapshot===t||(!(!te(t)||re(t)!==e)||!(e.type!==this||!ye(t)||te(t)||e.identifierAttribute&&e.identifier!==kt(t[e.identifierAttribute]))&&(e.applySnapshot(t),!0)))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(this.tryToReconcileNode(e,t))return e.setParent(n,r),e;if(e.die(),te(t)&&this.isAssignableFrom(m(t))){var i=re(t);return i.setParent(n,r),i}return this.instantiate(n,r,void 0,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(O);R.prototype.create=Object(a.g)(R.prototype.create);var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e.isDetaching&&e.type===this&&e.storedValue===t)return e;var i=this.instantiate(n,r,void 0,t);return e.die(),i}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(O);function P(e){return"object"===typeof e&&e&&!0===e.isType}function L(e,t){Ce(e,P,"mobx-state-tree type",t)}new Map;!function(){function e(e,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),e&&e.onStart(t)}Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,e))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0})}();var D,I=1;function N(){return D}function j(){return I++}function B(e,t){var n=re(e.context);"action"===e.type&&n.assertAlive({actionContext:e});var r=n._isRunningAction;n._isRunningAction=!0;var i=D;D=e;try{return function(e,t,n){var r=new H(e,n);if(r.isEmpty)return Object(a.g)(n).apply(null,t.args);var i=null;return function e(t){var s=r.getNextMiddleware(),l=s&&s.handler;return l?!s.includeHooks&&o[t.name]?e(t):(l(t,(function(t,n){!0,i=e(t),n&&(i=n(i))}),(function(e){!0,i=e})),i):Object(a.g)(n).apply(null,t.args)}(t)}(n,e,t)}finally{D=i,n._isRunningAction=r}}function F(e){if(e)return"action"===e.type?e:e.parentActionEvent}function z(e,t,n){var r=function(){var r=j(),i=D,o=F(i);return B({type:"action",name:t,id:r,args:Ae(arguments),context:e,tree:b(e),rootId:i?i.rootId:r,parentId:i?i.id:0,allParentIds:i?p(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},n)};return r._isMSTAction=!0,r}var H=function(){function e(e,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=e;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.middlewares[this.arrayIndex];if(e){var t=e[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function U(t){return"function"===typeof t?"<function"+(t.name?" "+t.name:"")+">":te(t)?"<"+t+">":"`"+function(t){try{return JSON.stringify(t)}catch(e){return"<Unserializable: "+e+">"}}(t)+"`"}function V(e){var t=e.value,n=e.context[e.context.length-1].type,r=e.context.map((function(e){return e.path})).filter((function(e){return e.length>0})).join("/"),i=r.length>0?'at path "/'+r+'" ':"",o=te(t)?"value of type "+re(t).type.name+":":be(t)?"value":"snapshot",a=n&&te(t)&&n.is(re(t).snapshot);return""+i+o+" "+U(t)+" is not assignable "+(n?"to type: `"+n.name+"`":"")+(e.message?" ("+e.message+")":"")+(n?function(e){return P(e)&&(e.flags&(A.String|A.Number|A.Integer|A.Boolean|A.Date))>0}(n)||be(t)?".":", expected an instance of `"+n.name+"` or a snapshot like `"+n.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function G(e,t,n){return e.concat([{path:t,type:n}])}function W(){return ce}function q(e,t,n){return[{context:e,value:t,message:n}]}function X(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function Y(e,n){"undefined"!==typeof t&&Object({NODE_ENV:"production",PUBLIC_URL:"",APP_MANIFEST:{name:"OrgRoamForceGraphReact",slug:"OrgRoamForceGraphReact",version:"1.0.0",orientation:"portrait",icon:"./assets/images/icon.png",splash:{image:"./assets/images/splash.png",resizeMode:"contain",backgroundColor:"#ffffff"},updates:{fallbackToCacheTimeout:0},assetBundlePatterns:["**/*"],web:{},_internal:{isDebug:!1,projectRoot:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact",dynamicConfigPath:null,staticConfigPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/app.json",packageJsonPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/package.json"},sdkVersion:"40.0.0",platforms:["ios","android","web"]}})&&"true"===Object({NODE_ENV:"production",PUBLIC_URL:"",APP_MANIFEST:{name:"OrgRoamForceGraphReact",slug:"OrgRoamForceGraphReact",version:"1.0.0",orientation:"portrait",icon:"./assets/images/icon.png",splash:{image:"./assets/images/splash.png",resizeMode:"contain",backgroundColor:"#ffffff"},updates:{fallbackToCacheTimeout:0},assetBundlePatterns:["**/*"],web:{},_internal:{isDebug:!1,projectRoot:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact",dynamicConfigPath:null,staticConfigPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/app.json",packageJsonPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/package.json"},sdkVersion:"40.0.0",platforms:["ios","android","web"]}}).ENABLE_TYPE_CHECK&&function(e,t){var n=e.validate(t,[{path:"",type:e}]);if(n.length>0)throw de(function(e,t,n){if(0===n.length)return;return"Error while converting "+(r=U(t),(r.length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `")+e.name+"`:\n\n "+n.map(V).join("\n ");var r}(e,t,n))}(e,n)}var K,Q=0,Z=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:Q++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:a.s.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:a.s.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,a.s.array([],he));var r=this.cache.get(n);if(-1!==r.indexOf(e))throw de("Already registered");r.push(e),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;Object(a.x)(e.identifierCache.cache).forEach((function(e){return e.forEach((function(e){t.addNodeToCache(e)}))}))}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.identifierAttribute){var t=e.identifier,n=this.cache.get(t);n&&(n.remove(e),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,r=new e,i=t.path;return Object(a.k)(this.cache).forEach((function(e){for(var t=f(e,2),o=t[0],a=t[1],s=!1,l=a.length-1;l>=0;l--)0===a[l].path.indexOf(i)&&(r.addNodeToCache(a[l],!1),a.splice(l,1),s=!0);s&&n.updateLastCacheModificationPerId(o)})),r}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.cache.get(t);return!!n&&n.some((function(t){return e.isAssignableFrom(t.type)}))}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.cache.get(t);if(!n)return null;var r=n.filter((function(t){return e.isAssignableFrom(t.type)}));switch(r.length){case 0:return null;case 1:return r[0];default:throw de("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+r.map((function(e){return e.path})).join(", "))}}}),e}();function J(e,t,n,r,i){var o=ie(i);if(o){if(o.parent)throw de("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+n+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,n),o}return new T(e,t,n,r,i)}function $(e,t,n,r,i){return new _(e,t,n,r,i)}function ee(e){return e instanceof _||e instanceof T}function te(e){return!(!e||!e.$treenode)}function ne(e,t){Ce(e,te,"mobx-state-tree node",t)}function re(e){if(!te(e))throw de("Value "+e+" is no MST Node");return e.$treenode}function ie(e){return e&&e.$treenode||null}function oe(){return re(this).snapshot}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(K||(K={}));function ae(t,n,r){void 0===r&&(r=!0);for(var i=t,o=0;o<n.length;o++){var a=n[o];if(".."===a){if(i=i.parent)continue}else{if("."===a)continue;if(i){if(i instanceof _)try{var s=i.value;te(s)&&(i=re(s))}catch(e){if(!r)return;throw e}if(i instanceof T)if(i.getChildType(a)&&(i=i.getChildNode(a)))continue}}if(r)throw de("Could not resolve '"+a+"' in path '"+(Ie(n.slice(0,o))||"/")+"' while resolving '"+Ie(n)+"'");return}return i}function se(e){if(!e)return ce;var t=Object.keys(e);if(!t.length)return ce;var n=new Array(t.length);return t.forEach((function(t,r){n[r]=e[t]})),n}var le=Object.toString(),ce=Object.freeze([]),ue=Object.freeze({}),he=Object(a.e)().useProxies?{deep:!1}:{deep:!1,proxy:!1};function de(e){return void 0===e&&(e="Illegal state"),new Error("[mobx-state-tree] "+e)}function fe(e){return e}Object.freeze(he);var pe=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e};function me(e){return Array.isArray(e)||Object(a.p)(e)}function ge(e){return e?me(e)?e:[e]:ce}function ve(e){var t;if(null===e||"object"!==typeof e)return!1;var n=Object.getPrototypeOf(e);return null==n||(null===(t=n.constructor)||void 0===t?void 0:t.toString())===le}function ye(e){return null!==e&&"object"===typeof e&&!(e instanceof Date)&&!(e instanceof RegExp)}function be(e,t){return void 0===t&&(t=!0),null===e||void 0===e||!!("string"===typeof e||"number"===typeof e||"boolean"===typeof e||t&&e instanceof Date)}function we(e){return e}function xe(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}var _e=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){n.unregister(e)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.handlers.indexOf(e)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.handlers.slice();n.forEach((function(t){return t.apply(void 0,p(e))}))}}),e}(),Ee=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.eventHandlers&&this.eventHandlers[e];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){void 0===n&&(n=!1),this.eventHandlers||(this.eventHandlers={});var r=this.eventHandlers[e];return r||(r=this.eventHandlers[e]=new _e),r.register(t,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.eventHandlers&&this.eventHandlers[e];return!!n&&n.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.eventHandlers&&this.eventHandlers[e];n&&n.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.eventHandlers&&delete this.eventHandlers[e]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.eventHandlers&&this.eventHandlers[e];i&&(t=i).emit.apply(t,p(n))}}),e}();function Ae(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return t}function Se(e,t){return 0===e.indexOf(t)}var Me=function(e,t){};function Te(e){console.warn(new Error("[mobx-state-tree] "+e))}function Ce(e,t,n,r){0}function Oe(e,t){Ce()}function Re(e,t,n){void 0===n&&(n=!0),Ce(),n||Ce()}function ke(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function Pe(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function Le(e){return!0===("number"===typeof e)?""+e:-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function De(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ie(e){if(0===e.length)return"";var t=function(e){return e.map(Le).join("/")};return"."===e[0]||".."===e[0]?t(e):"/"+t(e)}function Ne(e){var t=e.split("/").map(De);if(!(""===e||"."===e||".."===e||Se(e,"/")||Se(e,"./")||Se(e,"../")))throw de("a json path must be either rooted, empty or relative, but got '"+e+"'");return""===t[0]&&t.shift(),t}Me.ids={};var je=function(e){function t(t,n,r){var i=e.call(this,r||t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor("+this._subtype.describe()+")"}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.preProcessor?this._processors.preProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.postProcessor?this._processors.postProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;!function(e,t){for(var n,r,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=d(i),s=a.next();!s.done;s=a.next()){var l=s.value;e[l]=t[l].bind(t)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(e.type,this,"create");var n=e.getSnapshot;e.getSnapshot=function(){return t.postProcessSnapshot(n.call(e))}}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(r)?r:this.preProcessSnapshot(r),o=this._subtype.instantiate(e,t,n,i);return this._fixNode(o),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this._subtype.reconcile(e,te(t)?t:this.preProcessSnapshot(t),n,r);return i!==e&&this._fixNode(i),i}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=!0);var n=this._subtype.getSnapshot(e);return t?this.postProcessSnapshot(n):n}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.preProcessSnapshot(e);return this._subtype.validate(n,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=P(e)?this._subtype:te(e)?y(e,!1):this.preProcessSnapshot(e);return 0===this._subtype.validate(t,[{path:"",type:this._subtype}]).length}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),t}(O);var Be,Fe="Map.put can only be used to store complex values that have an identifier type attribute";!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"}(Be||(Be={}));var ze=function(e){function t(t){return e.call(this,t,a.s.ref.enhancer)||this}return u(t,e),Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return e.prototype.set.call(this,""+t,n)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!e)throw de("Map.put cannot be used to set empty values");if(te(e)){var t=re(e);if(null===t.identifier)throw de(Fe);return this.set(t.identifier,e),e}if(ye(e)){var n=re(this),r=n.type;if(r.identifierMode!==Be.YES)throw de(Fe);var i=e[r.mapIdentifierAttribute];if(!Pt(i)){var o=this.put(r.getChildType().create(e,n.environment));return this.put(y(o))}var a=kt(i);return this.set(a,e),this.get(a)}throw de("Map.put can only be used to store complex values")}}),t}(a.a),He=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Be.UNKNOWN}),Object.defineProperty(i,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Map}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i._determineIdentifierMode(),i.hookInitializers=r,i}return u(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._determineIdentifierMode(),J(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Be.UNKNOWN){var e=[];if(function e(t,n){var r,i,o=t.getSubTypes();if("cannotDetermine"===o)return!1;if(o){var a=ge(o);try{for(var s=d(a),l=s.next();!l.done;l=s.next()){if(!e(l.value,n))return!1}}catch(c){r={error:c}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}return t instanceof Ke&&n.push(t),!0}(this._subType,e)){var t=void 0;e.forEach((function(e){if(e.identifierAttribute){if(t&&t!==e.identifierAttribute)throw de("The objects in a map should all have the same identifier attribute, expected '"+t+"', but child of type '"+e.name+"' declared attribute '"+e.identifierAttribute+"' as identifier");t=e.identifierAttribute}})),t?(this.identifierMode=Be.YES,this.mapIdentifierAttribute=t):this.identifierMode=Be.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var n=e.type._subType,r={};return Object.keys(t).forEach((function(i){r[i]=n.instantiate(e,i,void 0,t[i])})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new ze(e)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Object(a.f)(t,e.unbox),e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],i=z(t,e,r);xe(t,e,i)}))})),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"Map<string, "+this._subType.describe()+">"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(a.x)(e.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=e.storedValue.get(""+t);if(!n)throw de("Not a child "+t);return n}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object),n=e.name;t.assertWritable({subpath:n});var r=t.type,i=r._subType;switch(e.type){case"update":var o=e.newValue;if(o===e.object.get(n))return null;Y(i,o),e.newValue=i.reconcile(t.getChildNode(n),e.newValue,t,n),r.processIdentifier(n,e.newValue);break;case"add":Y(i,e.newValue),e.newValue=i.instantiate(t,n,void 0,e.newValue),r.processIdentifier(n,e.newValue)}return e}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.identifierMode===Be.YES&&t instanceof T){var n=t.identifier;if(n!==e)throw de("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+e+"'")}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return e.getChildren().forEach((function(e){t[e.subpath]=e.snapshot})),t}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].getSnapshot()})),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:Le(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:Le(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var n=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:Le(e.name),oldValue:n},t)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=e.storedValue;switch(n.op){case"add":case"replace":r.set(t,n.value);break;case"remove":r.delete(t)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Y(this,t);var n=e.storedValue,r={};if(Array.from(n.keys()).forEach((function(e){r[e]=!1})),t)for(var i in t)n.set(i,t[i]),r[""+i]=!0;Object.keys(r).forEach((function(e){!1===r[e]&&n.delete(e)}))}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return ve(e)?X(Object.keys(e).map((function(r){return n._subType.validate(e[r],G(t,r,n._subType))}))):q(t,e,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ue}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.delete(t)}}),t}(R);He.prototype.applySnapshot=Object(a.g)(He.prototype.applySnapshot);var Ue=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Array}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i.hookInitializers=r,i}return u(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return J(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=[]);var n=e.type._subType,r={};return t.forEach((function(t,i){var o=""+i;r[o]=n.instantiate(e,o,void 0,t)})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return a.s.array(se(e),he)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Object(a.d)(t).dehancer=e.unbox,e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],i=z(t,e,r);xe(t,e,i)}))})),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType.describe()+"[]"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=Number(t);if(n<e.storedValue.length)return e.storedValue[n];throw de("Not a child: "+t)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);t.assertWritable({subpath:""+e.index});var n=t.type._subType,r=t.getChildren();switch(e.type){case"update":if(e.newValue===e.object[e.index])return null;var i=Ve(t,n,[r[e.index]],[e.newValue],[e.index]);if(!i)return null;e.newValue=i[0];break;case"splice":var o=e.index,a=e.removedCount,s=e.added,l=Ve(t,n,r.slice(o,o+a),s,s.map((function(e,t){return o+t})));if(!l)return null;e.added=l;for(var c=o+a;c<r.length;c++)r[c].setParent(t,""+(c+s.length-a))}return e}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.getChildren().map((function(e){return e.snapshot}))}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=[];return Object.keys(e).forEach((function(n){t.push(e[n].getSnapshot())})),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:""+e.index,value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"splice":for(var n=e.removedCount-1;n>=0;n--)t.emitPatch({op:"remove",path:""+(e.index+n),oldValue:e.removed[n].snapshot},t);for(n=0;n<e.addedCount;n++)t.emitPatch({op:"add",path:""+(e.index+n),value:t.getChildNode(""+(e.index+n)).snapshot,oldValue:void 0},t);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=e.storedValue,i="-"===t?r.length:Number(t);switch(n.op){case"replace":r[i]=n.value;break;case"add":r.splice(i,0,n.value);break;case"remove":r.splice(i,1)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Y(this,t),e.storedValue.replace(t)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return me(e)?X(e.map((function(e,r){return n._subType.validate(e,G(t,""+r,n._subType))}))):q(t,e,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ce}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.splice(Number(t),1)}}),t}(R);function Ve(e,t,n,r,i){for(var o=!0,a=0;;a++){var s=a<=r.length-1,l=n[a],c=s?r[a]:void 0,u=""+i[a];if(ee(c)&&(c=c.storedValue),!l&&!s)break;if(s)if(l)if(We(l,c))n[a]=Ge(t,e,u,c,l);else{for(var h=void 0,d=a;d<n.length;d++)if(We(n[d],c)){h=n.splice(d,1)[0];break}o=!1;f=Ge(t,e,u,c,h);n.splice(a,0,f)}else{if(te(c)&&re(c).parent===e)throw de("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+u+"', but it lives already at '"+re(c).path+"'");o=!1;var f=Ge(t,e,u,c);n.splice(a,0,f)}else o=!1,n.splice(a,1),l instanceof T&&l.createObservableInstanceIfNeeded(),l.die(),a--}return o?null:n}function Ge(e,t,n,r,i){Y(e,r);var o=function(){if(te(r)){var o=re(r);if(o.assertAlive(ue),null!==o.parent&&o.parent===t)return o.setParent(t,n),o}return i?e.reconcile(i,r,t,n):e.instantiate(t,n,void 0,r)}();return i&&i!==o&&(i instanceof T&&i.createObservableInstanceIfNeeded(),i.die()),o}function We(e,t){if(!e.isAlive)return!1;if(te(t)){var n=re(t);return n.isAlive&&n===e}return e.snapshot===t||e instanceof T&&null!==e.identifier&&e.identifierAttribute&&ve(t)&&e.identifier===kt(t[e.identifierAttribute])&&e.type.is(t)}Ue.prototype.applySnapshot=Object(a.g)(Ue.prototype.applySnapshot);function qe(){return re(this).toString()}var Xe={name:"AnonymousModel",properties:{},initializers:ce};function Ye(e){return Object.keys(e).reduce((function(e,t){var n,r,i;if(t in o)throw de("Hook '"+t+"' was defined as property. Hooks should be defined as part of the actions");var a=Object.getOwnPropertyDescriptor(e,t);if("get"in a)throw de("Getters are not supported as properties. Please use views instead");var s=a.value;if(null===s||void 0===s)throw de("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(be(s))return Object.assign({},e,((n={})[t]=dt(function(e){switch(typeof e){case"string":return Je;case"number":return $e;case"boolean":return tt;case"object":if(e instanceof Date)return ot}throw de("Cannot determine primitive type from value "+e)}(s),s),n));if(s instanceof He)return Object.assign({},e,((r={})[t]=dt(s,{}),r));if(s instanceof Ue)return Object.assign({},e,((i={})[t]=dt(s,[]),i));if(P(s))return e;throw de("Invalid type definition for property '"+t+"', cannot infer a type from a value like '"+s+"' ("+typeof s+")")}),e)}var Ke=function(e){function t(t){var n=e.call(this,t.name||Xe.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.cloneAndEnhance({name:e})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.cloneAndEnhance({properties:e})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=n.preProcessor;return t?n.cloneAndEnhance({preProcessor:function(n){return t(e(n))}}):n.cloneAndEnhance({preProcessor:e})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=n.postProcessor;return t?n.cloneAndEnhance({postProcessor:function(n){return e(t(n))}}):n.cloneAndEnhance({postProcessor:e})}}),Object.assign(n,Xe,t),n.properties=Ye(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return u(t,e),Object.defineProperty(t.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=void 0;return this.forAllProps((function(t,n){if(n.flags&A.Identifier){if(e)throw de("Cannot define property '"+t+"' as object identifier, property '"+e+"' is already defined as identifier property");e=t}})),e}}),Object.defineProperty(t.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new t({name:e.name||this.name,properties:Object.assign({},this.properties,e.properties),initializers:this.initializers.concat(e.initializers||[]),preProcessor:e.preProcessor||this.preProcessor,postProcessor:e.postProcessor||this.postProcessor})}}),Object.defineProperty(t.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateActions(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("actions initializer should return a plain object containing actions");Object.keys(t).forEach((function(n){if("preProcessSnapshot"===n)throw de("Cannot define action 'preProcessSnapshot', it should be defined using 'type.preProcessSnapshot(fn)' instead");if("postProcessSnapshot"===n)throw de("Cannot define action 'postProcessSnapshot', it should be defined using 'type.postProcessSnapshot(fn)' instead");var r=t[n],i=e[n];if(n in o&&i){var a=r;r=function(){i.apply(null,arguments),a.apply(null,arguments)}}var s=r.$mst_middleware,l=r.bind(t);l.$mst_middleware=s;var c=z(e,n,l);t[n]=c,xe(e,n,c)}))}}),Object.defineProperty(t.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if("function"!==typeof e)throw de("You passed an "+typeof e+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(n){return t.instantiateVolatileState(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("volatile state initializer should return a plain object containing state");Object(a.w)(e,t)}}),Object.defineProperty(t.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){var r=e(n),i=r.actions,o=r.views,a=r.state,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(r,["actions","views","state"]);for(var l in s)throw de("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+l+"'");return a&&t.instantiateVolatileState(n,a),o&&t.instantiateViews(n,o),i&&t.instantiateActions(n,i),n}]})}}),Object.defineProperty(t.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateViews(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("views initializer should return a plain object containing views");Object.keys(t).forEach((function(n){var r,i=Object.getOwnPropertyDescriptor(t,n);if("get"in i)if(Object(a.o)(e,n)){var o=Object(a.d)(e,n);o.derivation=i.get,o.scope=e,i.set&&(o.setter=Object(a.g)(o.name+"-setter",i.set))}else Object.defineProperty(e,n,i),Object(a.r)(e,((r={})[n]=a.h,r));else{if("function"!==typeof i.value)throw de("A view member should either be a function or getter based property");xe(e,n,i.value)}}))}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return J(this,e,t,n,te(r)?r:this.applySnapshotPreProcessor(r))}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var n=e.type,r={};return n.forAllProps((function(n,i){r[n]=i.instantiate(e,n,void 0,t[n])})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return a.s.object(e,ue,he)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){xe(t,"toString",qe),this.forAllProps((function(n){Object(a.f)(t,n,e.unbox)})),this.initializers.reduce((function(e,t){return t(e)}),t),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,n=re(t.object),r=t.name;n.assertWritable({subpath:r});var i=n.type.properties[r];return i&&(Y(i,t.newValue),t.newValue=i.reconcile(n.getChildNode(r),t.newValue,n,r)),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,n=re(t.object);if(n.type.properties[t.name]){var r=t.oldValue?t.oldValue.snapshot:void 0;n.emitPatch({op:"replace",path:Le(t.name),value:t.newValue.snapshot,oldValue:r},n)}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,n=[];return this.forAllProps((function(r){n.push(t.getChildNode(e,r))})),n}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!(t in this.properties))throw de("Not a value property: "+t);var n=Object(a.d)(e.storedValue,t).raw();if(!n)throw de("Node not available for property "+t);return n}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=!0);var r={};return this.forAllProps((function(t,i){Object(a.l)(e.storedValue,t).reportObserved(),r[t]=n.getChildNode(e,t).snapshot})),t?this.applySnapshotPostProcessor(r):r}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].getSnapshot()})),this.applySnapshotPostProcessor(t)}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){if("replace"!==n.op&&"add"!==n.op)throw de("object does not support operation "+n.op);e.storedValue[t]=n.value}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.applySnapshotPreProcessor(t);Y(this,n),this.forAllProps((function(t){e.storedValue[t]=n[t]}))}}),Object.defineProperty(t.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.preProcessor;return t?t.call(null,e):e}}),Object.defineProperty(t.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.postProcessor;return t?t.call(null,e):e}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Re(),this.properties[e]}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this,r=this.applySnapshotPreProcessor(e);return ve(r)?X(this.propertyNames.map((function(e){return n.properties[e].validate(r[e],G(t,e,n.properties[e]))}))):q(t,r,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.propertyNames.forEach((function(n){return e(n,t.properties[n])}))}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return"{ "+this.propertyNames.map((function(t){return t+": "+e.properties[t].describe()})).join("; ")+" }"}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ue}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue[t]=void 0}}),t}(R);function Qe(e){return P(e)&&(e.flags&A.Object)>0}Ke.prototype.applySnapshot=Object(a.g)(Ke.prototype.applySnapshot);var Ze=function(e){function t(t,n,r,i){void 0===i&&(i=fe);var o=e.call(this,t)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:i}),o.flags=n,o}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.initializer(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return be(e)&&this.checker(e)?W():q(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))}}),t}(k),Je=new Ze("string",A.String,(function(e){return"string"===typeof e})),$e=new Ze("number",A.Number,(function(e){return"number"===typeof e})),et=new Ze("integer",A.Integer,(function(e){return pe(e)})),tt=new Ze("boolean",A.Boolean,(function(e){return"boolean"===typeof e})),nt=new Ze("null",A.Null,(function(e){return null===e})),rt=new Ze("undefined",A.Undefined,(function(e){return void 0===e})),it=new Ze("Date",A.Date,(function(e){return"number"===typeof e||e instanceof Date}),(function(e){return e instanceof Date?e:new Date(e)}));it.getSnapshot=function(e){return e.storedValue.getTime()};var ot=it;var at=function(e){function t(t){var n=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Literal}),n.value=t,n}return u(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return be(e)&&e===this.value?W():q(t,e,"Value is not a literal "+JSON.stringify(this.value))}}),t}(k);function st(e){return Ce(),new at(e)}var lt=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this._subtype.validate(e,t);if(n.length>0)return n;var r=te(e)?re(e).snapshot:e;return this._predicate(r)?W():q(t,e,this._message(e))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.reconcile(e,t,n,r)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(O);var ct=function(e){function t(t,n,r){var i=e.call(this,t)||this;return Object.defineProperty(i,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),r=h({eager:!0,dispatcher:void 0},r),i._dispatcher=r.dispatcher,r.eager||(i._eager=!1),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=A.Union;return this._types.forEach((function(t){e|=t.flags})),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._types.some((function(t){return t.isAssignableFrom(e)}))}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map((function(e){return e.describe()})).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this.determineType(r,void 0);if(!i)throw de("No matching type for union "+this.describe());return i.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this.determineType(t,e.type);if(!i)throw de("No matching type for union "+this.describe());return i.reconcile(e,t,n,r)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter((function(e){return e!==t})).find((function(t){return t.is(e)})):this._types.find((function(t){return t.is(e)}))}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var n=[],r=0,i=0;i<this._types.length;i++){var o=this._types[i].validate(e,t);if(0===o.length){if(this._eager)return W();r++}else n.push(o)}return 1===r?W():q(t,e,"No type is applicable for the union").concat(X(n))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(O);function ut(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=P(e)?void 0:e,i=P(e)?p([e],t):t,o="("+i.map((function(e){return e.name})).join(" | ")+")";return new ct(o,i,r)}var ht=function(e){function t(t,n,r){var i=e.call(this,t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(this.optionalValues.indexOf(r)>=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,n,i)}return this._subtype.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),n,r)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e="function"===typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"===typeof this._defaultValue&&Y(this,e),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this.optionalValues.indexOf(e)>=0?W():this._subtype.validate(e,t)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(O);function dt(e,t,n){return function(e,t){if("function"!==typeof t&&te(t))throw de("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");L(e,1)}(e,t),new ht(e,t,n||ft)}var ft=[void 0];var pt=dt(rt,void 0),mt=dt(nt,null);function gt(e){return L(e,1),ut(e,pt)}var vt=function(t){function n(e,n){var r=t.call(this,e)||this;return Object.defineProperty(r,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),r}return u(n,t),Object.defineProperty(n.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|A.Late},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._subType){var n=void 0;try{n=this._definition()}catch(e){if(!(e instanceof ReferenceError))throw e;n=void 0}if(t&&void 0===n)throw de("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(n.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this.getSubType(!0).instantiate(e,t,n,r)}}),Object.defineProperty(n.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this.getSubType(!0).reconcile(e,t,n,r)}}),Object.defineProperty(n.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e?e.name:"<uknown late type>"}}),Object.defineProperty(n.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.getSubType(!1);return n?n.validate(e,t):W()}}),Object.defineProperty(n.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)}}),Object.defineProperty(n.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e||"cannotDetermine"}}),n}(O);var yt=function(e){function t(t){var n=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Frozen}),n}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return function(e){return"function"!==typeof e}(e)?this.subType?this.subType.validate(e,t):W():q(t,e,"Value is not serializable and cannot be frozen")}}),t}(k),bt=new yt;var wt=function(){function e(e,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Pt(e))this.identifier=e;else{if(!te(e))throw de("Can only store references to tree nodes or identifiers, got: '"+e+"'");var n=re(e);if(!n.identifierAttribute)throw de("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null===r||void 0===r)throw de("Can only store references to tree nodes with a defined identifier.");this.identifier=r}}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=kt(this.identifier),n=e.root,r=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var i=this.targetType,o=n.identifierCache.resolve(i,t);if(!o)throw new xt("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:o,lastCacheModification:r}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),xt=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return u(t,e),t}(Error),_t=function(e){function t(t,n){var r=e.call(this,"reference("+t.name+")")||this;return Object.defineProperty(r,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Reference}),r}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.targetType.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Pt(e)?W():q(t,e,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(t.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=t.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:e,parent:o,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(e){v(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){Qe(i.type)?this.replaceRef(void 0):v(t.root.storedValue,{op:"remove",path:t.path})}})}}}),Object.defineProperty(t.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this,r=this.getValue(e);if(r){var i=re(r),a=function(r,a){var s=function(e){switch(e){case o.beforeDestroy:return"destroy";case o.beforeDetach:return"detach";default:return}}(a);s&&n.fireInvalidated(s,e,t,i)},s=i.registerHook(o.beforeDetach,a),l=i.registerHook(o.beforeDestroy,a);return function(){s(),l()}}}}),Object.defineProperty(t.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=this;if(this.onInvalidated){var i;e.registerHook(o.beforeDestroy,(function(){i&&i()}));var a=function(o){i&&i();var a=e.parent,s=a&&a.storedValue;if(a&&a.isAlive&&s){(n?!!n.get(t,s):e.root.identifierCache.has(r.targetType,kt(t)))?i=r.addTargetNodeWatcher(e,t):o||r.fireInvalidated("invalidSnapshotReference",e,t,null)}};e.state===K.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(o.afterCreationFinalization,(function(){e.parent&&e.parent.createObservableInstanceIfNeeded()})),e.registerHook(o.afterAttach,(function(){a(!1)})))}}}),t}(k),Et=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return e.storedValue.resolvedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i,o=te(r)?(ne(i=r,1),re(i).identifier):r,a=new wt(r,this.targetType),s=$(this,e,t,n,a);return a.node=s,this.watchTargetNodeForInvalidations(s,o,void 0),s}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e.isDetaching&&e.type===this){var i=te(t),o=e.storedValue;if(!i&&o.identifier===t||i&&o.resolvedValue===t)return e.setParent(n,r),e}var a=this.instantiate(n,r,void 0,t);return e.die(),a}}),t}(_t),At=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return u(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(r)?this.options.set(r,e?e.storedValue:null):r,o=$(this,e,t,n,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===i)return e.setParent(n,r),e;var o=this.instantiate(n,r,void 0,i);return e.die(),o}}),t}(_t);function St(e,t){L(e,1);var n=t||void 0,r=t?t.onInvalidated:void 0;return n&&(n.get||n.set)?new At(e,{get:n.get,set:n.set},r):new Et(e,r)}var Mt=function(e){function t(t,n){var r=e.call(this,t)||this;return Object.defineProperty(r,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Identifier}),r}return u(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e||!(e.type instanceof Ke))throw de("Identifier types can only be instantiated as direct child of a model type");return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(e.storedValue!==t)throw de("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(n,r),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return typeof e!==this.validType?q(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):W()}}),t}(k),Tt=function(e){function t(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Identifier}),t}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(Mt),Ct=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return u(t,e),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(Mt),Ot=new Tt,Rt=new Ct;function kt(e){return""+e}function Pt(e){return"string"===typeof e||"number"===typeof e}var Lt=function(e){function t(t){var n=e.call(this,t.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Custom}),n}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.options.isTargetType(e))return W();var n=this.options.getValidationMessage(e);return n?q(t,e,"Invalid value for type '"+this.name+"': "+n):W()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.options.toSnapshot(e.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,this.options.isTargetType(r)?r:this.options.fromSnapshot(r,e&&e.root.environment))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=!this.options.isTargetType(t);if(!e.isDetaching&&(e.type===this&&(i?t===e.snapshot:t===e.storedValue)))return e.setParent(n,r),e;var o=i?this.options.fromSnapshot(t,n.root.environment):t,a=this.instantiate(n,r,void 0,o);return e.die(),a}}),t}(k),Dt={enumeration:function(e,t){var n="string"===typeof e?t:e,r=ut.apply(void 0,p(n.map((function(e){return st(""+e)}))));return"string"===typeof e&&(r.name=e),r},model:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0]?e.shift():"AnonymousModel",r=e.shift()||{};return new Ke({name:n,properties:r})},compose:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0],r=n?e[0]:"AnonymousModel";return n&&e.shift(),e.reduce((function(e,t){return e.cloneAndEnhance({name:e.name+"_"+t.name,properties:t.properties,initializers:t.initializers,preProcessor:function(n){return t.applySnapshotPreProcessor(e.applySnapshotPreProcessor(n))},postProcessor:function(n){return t.applySnapshotPostProcessor(e.applySnapshotPostProcessor(n))}})})).named(r)},custom:function(e){return new Lt(e)},reference:St,safeReference:function(e,t){var n=St(e,h(h({},t),{onInvalidated:function(e){t&&t.onInvalidated&&t.onInvalidated(e),e.removeRef()}}));return t&&!1===t.acceptsUndefined?n:gt(n)},union:ut,optional:dt,literal:st,maybe:gt,maybeNull:function(e){return L(e,1),ut(e,mt)},refinement:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0]?e.shift():P(e[0])?e[0].name:null,r=e[0],i=e[1],o=e[2]?e[2]:function(e){return"Value does not respect the refinement predicate"};return L(r,[1,2]),Re(),Oe(),Oe(),new lt(n,r,i,o)},string:Je,boolean:tt,number:$e,integer:et,Date:ot,map:function(e){return new He("map<string, "+e.name+">",e)},array:function(e){return L(e,1),new Ue(e.name+"[]",e)},frozen:function(e){return 0===arguments.length?bt:P(e)?new yt(e):dt(bt,e)},identifier:Ot,identifierNumber:Rt,late:function(e,t){var n="string"===typeof e?e:"late("+e.toString()+")",r="string"===typeof e?t:e;return new vt(n,r)},undefined:rt,null:nt,snapshotProcessor:function(e,t,n){return L(e,1),new je(e,t,n)}}}).call(this,r(111),r(443).setImmediate)},function(e,t,n){"use strict";var r=n(96),i=n(129),o=n(0),a=n.n(o);t.a=function(e,t){var n;e&&e.constructor===String&&(n=r.a.propsToAccessibilityComponent(t));for(var o=n||e,s=Object(i.a)(o,t),l=arguments.length,c=new Array(l>2?l-2:0),u=2;u<l;u++)c[u-2]=arguments[u];return a.a.createElement.apply(a.a,[o,s].concat(c))}},function(e,t,n){"use strict";var r=n(22),i=n(15);function o(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){var t;return(t=e.call(this)||this)._children=[],t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.__makeNative=function(){if(!this.__isNative){this.__isNative=!0;for(var t,n=o(this._children);!(t=n()).done;){var r=t.value;r.__makeNative(),i.a.API.connectAnimatedNodes(this.__getNativeTag(),r.__getNativeTag())}}e.prototype.__makeNative.call(this)},a.__addChild=function(e){0===this._children.length&&this.__attach(),this._children.push(e),this.__isNative&&(e.__makeNative(),i.a.API.connectAnimatedNodes(this.__getNativeTag(),e.__getNativeTag()))},a.__removeChild=function(e){var t=this._children.indexOf(e);-1!==t?(this.__isNative&&e.__isNative&&i.a.API.disconnectAnimatedNodes(this.__getNativeTag(),e.__getNativeTag()),this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},a.__getChildren=function(){return this._children},a.__callListeners=function(t){if(e.prototype.__callListeners.call(this,t),!this.__isNative)for(var n,r=o(this._children);!(n=r()).done;){var i=n.value;i.__getValue&&i.__callListeners(i.__getValue())}},r}(r.a);t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n(4),o=n.n(i),a={window:{fontScale:1,height:0,scale:1,width:0},screen:{fontScale:1,height:0,scale:1,width:0}},s={},l=function(){function e(){}return e.get=function(e){return o()(a[e],"No dimension set for key "+e),a[e]},e.set=function(e){e&&(r.canUseDOM?o()(!1,"Dimensions cannot be set in the browser"):(null!=e.screen&&(a.screen=e.screen),null!=e.window&&(a.window=e.window)))},e._update=function(){if(r.canUseDOM){var e=window,t=e.document.documentElement;a.window={fontScale:1,height:t.clientHeight,scale:e.devicePixelRatio||1,width:t.clientWidth},a.screen={fontScale:1,height:e.screen.height,scale:e.devicePixelRatio||1,width:e.screen.width},Array.isArray(s.change)&&s.change.forEach((function(e){return e(a)}))}},e.addEventListener=function(e,t){s[e]=s[e]||[],s[e].push(t)},e.removeEventListener=function(e,t){Array.isArray(s[e])&&(s[e]=s[e].filter((function(e){return e!==t})))},e}();r.canUseDOM&&(l._update(),window.addEventListener("resize",l._update,!1))},function(e,t,n){"use strict";var r=n(33),i=n(15),o=n(4),a=n.n(o),s=n(90),l=n.n(s);function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){return e};function p(e){if(e.outputRange&&"string"===typeof e.outputRange[0])return function(e){var t=e.outputRange;a()(t.length>=2,"Bad output range"),function(e){for(var t=e[0].replace(g,""),n=1;n<e.length;++n)a()(t===e[n].replace(g,""),"invalid pattern "+e[0]+" and "+e[n])}(t=t.map(m));var n=t[0].match(g).map((function(){return[]}));t.forEach((function(e){e.match(g).forEach((function(e,t){n[t].push(+e)}))}));var r=t[0].match(g).map((function(t,r){return p(h(h({},e),{},{outputRange:n[r]}))})),i=(o=t[0],"string"===typeof o&&o.startsWith("rgb"));var o;return function(e){var n=0;return t[0].replace(g,(function(){var t=+r[n++](e);return i&&(t=n<4?Math.round(t):Math.round(1e3*t)/1e3),String(t)}))}}(e);var t=e.outputRange;v("outputRange",t);var n=e.inputRange;v("inputRange",n),function(e){a()(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)a()(e[t]>=e[t-1],"inputRange must be monotonically non-decreasing "+e)}(n),a()(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||f,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var o="extend";return void 0!==e.extrapolateRight?o=e.extrapolateRight:void 0!==e.extrapolate&&(o=e.extrapolate),function(e){a()("number"===typeof e,"Cannot interpolation an input which is not a number");var s=function(e,t){var n;for(n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,n);return function(e,t,n,r,i,o,a,s){var l=e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=o(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r;return l}(e,n[s],n[s+1],t[s],t[s+1],r,i,o)}}function m(e){var t=l()(e);return null===t||"number"!==typeof t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var g=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g;function v(e,t){a()(t.length>=2,e+" must have at least 2 elements"),a()(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var y=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._parent=t,r._config=n,r._interpolation=p(n),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o=r.prototype;return o.__makeNative=function(){this._parent.__makeNative(),e.prototype.__makeNative.call(this)},o.__getValue=function(){var e=this._parent.__getValue();return a()("number"===typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)},o.interpolate=function(e){return new r(this,e)},o.__attach=function(){this._parent.__addChild(this)},o.__detach=function(){this._parent.__removeChild(this),e.prototype.__detach.call(this)},o.__transformDataType=function(e){return e.map(i.a.transformDataType)},o.__getNativeConfig=function(){return{inputRange:this._config.inputRange,outputRange:this.__transformDataType(this._config.outputRange),extrapolateLeft:this._config.extrapolateLeft||this._config.extrapolate||"extend",extrapolateRight:this._config.extrapolateRight||this._config.extrapolate||"extend",type:"interpolation"}},r}(r.a);y.__createInterpolation=p,t.a=y},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=!0,a=!1,s=!0,l=!1,c=function(){return!!l||s&&a},u=function(){i.a.canUseDOM&&document.documentElement&&document.documentElement.setAttribute&&document.documentElement.setAttribute("dir",c()?"rtl":"ltr")},h={allowRTL:function(e){s=e,u()},forceRTL:function(e){l=e,u()},getConstants:function(){return{doLeftAndRightSwapInRTL:o,isRTL:c()}},setPreferredLanguageRTL:function(e){a=e,u()},swapLeftAndRightInRTL:function(e){o=e}};t.a=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(131);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((function(){return i.a.apply(void 0,t)}),[].concat(t))}},function(e,t,n){"use strict";var r=n(0),i=n(32),o=n(65),a=[];function s(e){return a[e-1]}var l=n(130),c=/^data:/,u=function(){function e(){}return e.has=function(t){var n=e._entries;return c.test(t)||Boolean(n[t])},e.add=function(t){var n=e._entries,r=Date.now();n[t]?(n[t].lastUsedTimestamp=r,n[t].refCount+=1):n[t]={lastUsedTimestamp:r,refCount:1}},e.remove=function(t){var n=e._entries;n[t]&&(n[t].refCount-=1),e._cleanUpIfNeeded()},e._cleanUpIfNeeded=function(){var t,n,r=e._entries,i=Object.keys(r);i.length+1>e._maximumEntries&&(i.forEach((function(e){var i=r[e];(!n||i.lastUsedTimestamp<n.lastUsedTimestamp)&&0===i.refCount&&(t=e,n=i)})),t&&delete r[t])},e}();u._maximumEntries=256,u._entries={};var h=0,d={},f={abort:function(e){var t=d[""+e];t&&(t.onerror=null,t.onload=null,t=null,delete d[""+e])},getSize:function(e,t,n){var r=!1,i=setInterval(a,16),o=f.load(e,a,(function(){"function"===typeof n&&n();f.abort(o),clearInterval(i)}));function a(){var e=d[""+o];if(e){var n=e.naturalHeight,a=e.naturalWidth;n&&a&&(t(a,n),r=!0)}r&&(f.abort(o),clearInterval(i))}},has:function(e){return u.has(e)},load:function(e,t,n){h+=1;var r=new window.Image;return r.onerror=n,r.onload=function(e){var n=function(){return t({nativeEvent:e})};"function"===typeof r.decode?r.decode().then(n,n):setTimeout(n,0)},r.src=e,d[""+h]=r,h},prefetch:function(e){return new Promise((function(t,n){f.load(e,(function(){u.add(e),u.remove(e),t()}),n)}))},queryCache:function(e){var t={};return e.forEach((function(e){u.has(e)&&(t[e]="disk/memory")})),Promise.resolve(t)}},p=f,m=n(116),g=n(5),v=n(81),y=n(3);function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,A=/^(data:image\/svg\+xml;utf8,)(.*)/;function S(e){var t=null;if("number"===typeof e){var n=s(e),r=n.scales[0];if(n.scales.length>1){var i=m.a.get();r=n.scales.reduce((function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e}))}var o=1!==r?"@"+r+"x":"";t=n?n.httpServerLocation+"/"+n.name+o+"."+n.type:""}else"string"===typeof e?t=e:e&&"string"===typeof e.uri&&(t=e.uri);if(t){var a=t.match(A);if(a){var l=a[1],c=a[2];return""+l+encodeURIComponent(c)}}return t}var M=r.forwardRef((function(e,t){var n=e.accessibilityLabel,o=e.blurRadius,a=e.defaultSource,c=e.draggable,u=e.onError,h=e.onLayout,d=e.onLoad,f=e.onLoadEnd,m=e.onLoadStart,w=e.pointerEvents,_=e.source,A=e.style,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["accessibilityLabel","blurRadius","defaultSource","draggable","onError","onLayout","onLoad","onLoadEnd","onLoadStart","pointerEvents","source","style"]);var T=r.useState((function(){var e=S(_);if(null!=e&&p.has(e))return"LOADED";return"IDLE"})),k=T[0],P=T[1],L=r.useState({}),D=L[0],I=L[1],N=r.useContext(v.a),j=r.useRef(null),B=r.useRef(E++),F=r.useRef(null),z="LOADED"===k||"LOADING"===k&&null==a,H=function(e,t,n){var r=x({},g.a.flatten(e)),i=r.filter,o=r.resizeMode,a=r.shadowOffset,s=r.tintColor,c=[],u=null;if(i&&c.push(i),t&&c.push("blur("+t+"px)"),a){var h=Object(l.a)(r);h&&c.push("drop-shadow("+h+")")}return s&&null!=n&&c.push("url(#tint-"+n+")"),c.length>0&&(u=c.join(" ")),delete r.blurRadius,delete r.shadowColor,delete r.shadowOpacity,delete r.shadowOffset,delete r.shadowRadius,delete r.tintColor,delete r.overlayColor,delete r.resizeMode,[r,o,u,s]}(A,o,B.current),U=H[0],V=H[1],G=H[2],W=H[3],q=e.resizeMode||V||"cover",X=z?_:a,Y=S(X),K=function(e){if("number"===typeof e){var t=s(e);return{height:t.height,width:t.width}}if(null!=e&&!Array.isArray(e)&&"object"===typeof e)return{height:e.height,width:e.width}}(X),Q=Y?'url("'+Y+'")':null,Z=function(){if(null!=j.current&&("center"===q||"repeat"===q)){var e=j.current,t=e.naturalHeight,n=e.naturalWidth,r=D.height,i=D.width;if(t&&n&&r&&i){var o=Math.min(1,i/n,r/t),a=Math.ceil(o*n),s=Math.ceil(o*t);return a+"px "+s+"px"}}}(),J=Y?Object(i.a)("img",{alt:n||"",classList:[C.accessibilityImage],draggable:c||!1,ref:j,src:Y}):null;var $=S(_);return r.useEffect((function(){function e(){null!=F.current&&(p.abort(F.current),F.current=null)}return e(),null!=$&&(P("LOADING"),m&&m(),F.current=p.load($,(function(e){P("LOADED"),d&&d(e),f&&f()}),(function(){P("ERRORED"),u&&u({nativeEvent:{error:"Failed to load resource "+$+" (404)"}}),f&&f()}))),e}),[$,F,P,u,d,f,m]),r.createElement(y.a,b({},M,{accessibilityLabel:n,onLayout:function(e){if("center"===q||"repeat"===q||h){var t=e.nativeEvent.layout;h&&h(e),I(t)}},pointerEvents:w,ref:t,style:[O.root,N&&O.inline,K,U]}),r.createElement(y.a,{style:[O.image,R[q],{backgroundImage:Q,filter:G},null!=Z&&{backgroundSize:Z}],suppressHydrationWarning:!0}),J,function(e,t){return e&&null!=t?r.createElement("svg",{style:{position:"absolute",height:0,visibility:"hidden",width:0}},r.createElement("defs",null,r.createElement("filter",{id:"tint-"+t,suppressHydrationWarning:!0},r.createElement("feFlood",{floodColor:""+e,key:e}),r.createElement("feComposite",{in2:"SourceAlpha",operator:"atop"})))):null}(W,B.current))}));M.displayName="Image";var T=M;T.getSize=function(e,t,n){p.getSize(e,t,n)},T.prefetch=function(e){return p.prefetch(e)},T.queryCache=function(e){return p.queryCache(e)};var C=o.a.create({accessibilityImage:x(x({},g.a.absoluteFillObject),{},{height:"100%",opacity:0,width:"100%",zIndex:-1})}),O=g.a.create({root:{flexBasis:"auto",overflow:"hidden",zIndex:0},inline:{display:"inline-flex"},image:x(x({},g.a.absoluteFillObject),{},{backgroundColor:"transparent",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover",height:"100%",width:"100%",zIndex:-1})}),R=g.a.create({center:{backgroundSize:"auto"},contain:{backgroundSize:"contain"},cover:{backgroundSize:"cover"},none:{backgroundPosition:"0 0",backgroundSize:"auto"},repeat:{backgroundPosition:"0 0",backgroundRepeat:"repeat",backgroundSize:"auto"},stretch:{backgroundSize:"100% 100%"}});t.a=T},function(e,t,n){var r=n(57),i=n(112);e.exports=function(e){return function t(n,o){switch(arguments.length){case 0:return t;case 1:return i(n)?t:r((function(t){return e(n,t)}));default:return i(n)&&i(o)?t:i(n)?r((function(t){return e(t,o)})):i(o)?r((function(t){return e(n,t)})):e(n,o)}}}},function(e,t,n){"use strict";var r=n(0),i=r.createContext({onDispatchAction:function(){},onOptionsChange:function(){}});t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let r=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return s}));var r="react-native-stylesheet",i={reset:0,modality:.1,classicReset:.5,classic:1,atomic:2.2,custom:{borderColor:2,borderRadius:2,borderStyle:2,borderWidth:2,display:2,flex:2,margin:2,overflow:2,overscrollBehavior:2,padding:2,marginHorizontal:2.1,marginVertical:2.1,paddingHorizontal:2.1,paddingVertical:2.1}},o={borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderStyle:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],margin:["marginTop","marginRight","marginBottom","marginLeft"],marginHorizontal:["marginRight","marginLeft"],marginVertical:["marginTop","marginBottom"],overflow:["overflowX","overflowY"],overscrollBehavior:["overscrollBehaviorX","overscrollBehaviorY"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"],paddingHorizontal:["paddingRight","paddingLeft"],paddingVertical:["paddingTop","paddingBottom"]},a="monospace,monospace",s='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif'},function(e,t,n){"use strict";var r=n(189);n.d(t,"CommonActions",(function(){return r}));var i=n(155);n.d(t,"StackRouter",(function(){return i.b})),n.d(t,"StackActions",(function(){return i.a}))},function(e,t,n){"use strict";t.a=function(e){return 1e-6*(e()-.5)}},function(e,t,n){"use strict";var r=n(186);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(19)),a=r(n(17)),s=r(n(0)),l=n(160),c=r(n(369)),u=s.default.forwardRef((function(e,t){var n=l.StyleSheet.compose(i.slider,e.style),r=e.onValueChange,u=e.onSlidingStart,h=e.onSlidingComplete,d=(0,a.default)(e,["onValueChange","onSlidingStart","onSlidingComplete"]),f=r?function(e){var t=!0;"android"===l.Platform.OS&&(t=null!=e.nativeEvent.fromUser&&e.nativeEvent.fromUser),t&&r(e.nativeEvent.value)}:null,p=f,m=u?function(e){u(e.nativeEvent.value)}:null,g=h?function(e){h(e.nativeEvent.value)}:null;return s.default.createElement(c.default,(0,o.default)({},d,{thumbImage:"web"===l.Platform.OS?e.thumbImage:l.Image.resolveAssetSource(e.thumbImage),ref:t,style:n,onChange:p,onRNCSliderSlidingStart:m,onRNCSliderSlidingComplete:g,onRNCSliderValueChange:f,enabled:!e.disabled,onStartShouldSetResponder:function(){return!0},onResponderTerminationRequest:function(){return!1},__source:{fileName:"/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/Slider.js",lineNumber:270}}))}));u.defaultProps={disabled:!1,value:0,minimumValue:0,maximumValue:1,step:0,inverted:!1},i="ios"===l.Platform.OS?l.StyleSheet.create({slider:{height:40}}):l.StyleSheet.create({slider:{}});var h=u;t.default=h},function(t,n){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===typeof window&&(r=window)}t.exports=r},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(37),o=n(76),a=n(5),s=n(3);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=a.a.create({root:{transitionProperty:"opacity",transitionDuration:"0.15s",userSelect:"none"},actionable:{cursor:"pointer",touchAction:"manipulation"}}),u=r.memo(r.forwardRef((function(e,t){var n=e.activeOpacity,a=e.delayPressIn,u=e.delayPressOut,h=e.delayLongPress,d=e.disabled,f=e.focusable,p=e.onLongPress,m=e.onPress,g=e.onPressIn,v=e.onPressOut,y=e.rejectResponderTermination,b=e.style,w=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["activeOpacity","delayPressIn","delayPressOut","delayLongPress","disabled","focusable","onLongPress","onPress","onPressIn","onPressOut","rejectResponderTermination","style"]),x=Object(r.useRef)(null),_=Object(i.a)(t,x),E=Object(r.useState)("0s"),A=E[0],S=E[1],M=Object(r.useState)(null),T=M[0],C=M[1],O=Object(r.useCallback)((function(e,t){C(e),S(t?t/1e3+"s":"0s")}),[C,S]),R=Object(r.useCallback)((function(e){O(null!==n&&void 0!==n?n:.2,e)}),[n,O]),k=Object(r.useCallback)((function(e){O(null,e)}),[O]),P=Object(r.useMemo)((function(){return{cancelable:!y,disabled:d,delayLongPress:h,delayPressStart:a,delayPressEnd:u,onLongPress:p,onPress:m,onPressStart:function(e){var t=null!=e.dispatchConfig?"onResponderGrant"===e.dispatchConfig.registrationName:"keydown"===e.type;R(t?0:150),null!=g&&g(e)},onPressEnd:function(e){k(250),null!=v&&v(e)}}}),[h,a,u,d,p,m,g,v,y,R,k]),L=Object(o.a)(x,P);return r.createElement(s.a,l({},w,L,{accessibilityDisabled:d,focusable:!d&&!1!==f,ref:_,style:[c.root,!d&&c.actionable,b,null!=T&&{opacity:T},{transitionDuration:A}]}))})));u.displayName="TouchableOpacity",t.a=u},function(t,n,r){"use strict";var i=r(64);n.a=function(t){var n;try{n=Object(i.findDOMNode)(t)}catch(e){}return n}},function(t,n,r){"use strict";r.d(n,"a",(function(){return M}));var i=r(10),o=r(0),a=r.n(o);if(!o.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!i.r)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var s=r(64);function l(e){e()}var c=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},u=[];function h(e){return Object(i.m)(e)}var d="undefined"===typeof FinalizationRegistry?void 0:FinalizationRegistry;function f(e){return{reaction:e,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+p}}var p=1e4;var m=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var g=d?function(e){var t=new Map,n=1,r=new e((function(e){var n=t.get(e);n&&(n.reaction.dispose(),t.delete(e))}));return{addReactionToTrack:function(e,i,o){var a=n++;return r.register(o,a,e),e.current=f(i),e.current.finalizationRegistryCleanupToken=a,t.set(a,e.current),e.current},recordReactionAsCommitted:function(e){r.unregister(e),e.current&&e.current.finalizationRegistryCleanupToken&&t.delete(e.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(d):function(){var e,t=new Set;function n(){void 0===e&&(e=setTimeout(r,1e4))}function r(){e=void 0;var r=Date.now();t.forEach((function(e){var n=e.current;n&&r>=n.cleanAt&&(n.reaction.dispose(),e.current=null,t.delete(e))})),t.size>0&&n()}return{addReactionToTrack:function(e,r,i){var o;return e.current=f(r),o=e,t.add(o),n(),e.current},recordReactionAsCommitted:function(e){t.delete(e)},forceCleanupTimerToRunNowForTests:function(){e&&(clearTimeout(e),r())},resetCleanupScheduleForTests:function(){var n,r;if(t.size>0){try{for(var i=m(t),o=i.next();!o.done;o=i.next()){var a=o.value,s=a.current;s&&(s.reaction.dispose(),a.current=null)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.clear()}e&&(clearTimeout(e),e=void 0)}}}(),v=g.addReactionToTrack,y=g.recordReactionAsCommitted,b=(g.resetCleanupScheduleForTests,g.forceCleanupTimerToRunNowForTests,!1);function w(){return b}var x=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function _(e){return"observer"+e}var E=function(){};function A(t,n){if(void 0===n&&(n="observed"),w())return t();var r=x(a.a.useState(new E),1)[0],s=function(){var e=c(Object(o.useState)(0),2)[1];return Object(o.useCallback)((function(){e((function(e){return e+1}))}),u)}(),l=a.a.useRef(null);if(!l.current)var d=new i.b(_(n),(function(){f.mounted?s():f.changedBeforeMount=!0})),f=v(l,d,r);var p,m,g=l.current.reaction;if(a.a.useDebugValue(g,h),a.a.useEffect((function(){return y(l),l.current?(l.current.mounted=!0,l.current.changedBeforeMount&&(l.current.changedBeforeMount=!1,s())):(l.current={reaction:new i.b(_(n),(function(){s()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},s()),function(){l.current.reaction.dispose(),l.current=null}}),[]),g.track((function(){try{p=t()}catch(e){m=e}})),m)throw m;return p}var S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function M(e,t){if(w())return e;var n,r,i,a=S({forwardRef:!1},t),s=e.displayName||e.name,l=function(t,n){return A((function(){return e(t,n)}),s)};return l.displayName=s,n=a.forwardRef?Object(o.memo)(Object(o.forwardRef)(l)):Object(o.memo)(l),r=e,i=n,Object.keys(r).forEach((function(e){T[e]||Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(r,e))})),n.displayName=s,n}var T={$$typeof:!0,render:!0,compare:!0,type:!0};var C;(C=s.unstable_batchedUpdates)||(C=l),Object(i.i)({reactionScheduler:C})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(104),i=n(146),o={backgroundColor:!0,borderColor:!0,borderTopColor:!0,borderRightColor:!0,borderBottomColor:!0,borderLeftColor:!0,color:!0,shadowColor:!0,textDecorationColor:!0,textShadowColor:!0};function a(e,t){var n=e;return null!=t&&r.a[t]||"number"!==typeof e?null!=t&&o[t]&&(n=Object(i.a)(e)):n=e+"px",n}},function(e,t,n){"use strict";var r=n(209),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!==typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:s,isPlainObject:l,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"===typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";var r=n(241),i=n.n(r),o=n(132),a=n(4),s=n.n(a),l=n(131),c=n(34),u=n(49),h=n(9),d=n(61),f=n(29),p=n(162),m=n.n(p),g={},v={Mixin:{scrollResponderMixinGetInitialState:function(){return{isTouching:!1,lastMomentumScrollBeginTime:0,lastMomentumScrollEndTime:0,observedScrollSinceBecomingResponder:!1,becameResponderWhileAnimating:!1}},scrollResponderHandleScrollShouldSetResponder:function(){return this.state.isTouching},scrollResponderHandleStartShouldSetResponder:function(){return!1},scrollResponderHandleStartShouldSetResponderCapture:function(e){return this.scrollResponderIsAnimating()},scrollResponderHandleResponderReject:function(){m()(!1,"ScrollView doesn't take rejection well - scrolls anyway")},scrollResponderHandleTerminationRequest:function(){return!this.state.observedScrollSinceBecomingResponder},scrollResponderHandleTouchEnd:function(e){var t=e.nativeEvent;this.state.isTouching=0!==t.touches.length,this.props.onTouchEnd&&this.props.onTouchEnd(e)},scrollResponderHandleResponderRelease:function(e){this.props.onResponderRelease&&this.props.onResponderRelease(e);var t=d.a.currentlyFocusedField();this.props.keyboardShouldPersistTaps||null==t||e.target===t||this.state.observedScrollSinceBecomingResponder||this.state.becameResponderWhileAnimating||(this.props.onScrollResponderKeyboardDismissed&&this.props.onScrollResponderKeyboardDismissed(e),d.a.blurTextInput(t))},scrollResponderHandleScroll:function(e){this.state.observedScrollSinceBecomingResponder=!0,this.props.onScroll&&this.props.onScroll(e)},scrollResponderHandleResponderGrant:function(e){this.state.observedScrollSinceBecomingResponder=!1,this.props.onResponderGrant&&this.props.onResponderGrant(e),this.state.becameResponderWhileAnimating=this.scrollResponderIsAnimating()},scrollResponderHandleScrollBeginDrag:function(e){this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e)},scrollResponderHandleScrollEndDrag:function(e){this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e)},scrollResponderHandleMomentumScrollBegin:function(e){this.state.lastMomentumScrollBeginTime=Date.now(),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e)},scrollResponderHandleMomentumScrollEnd:function(e){this.state.lastMomentumScrollEndTime=Date.now(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e)},scrollResponderHandleTouchStart:function(e){this.state.isTouching=!0,this.props.onTouchStart&&this.props.onTouchStart(e)},scrollResponderHandleTouchMove:function(e){this.props.onTouchMove&&this.props.onTouchMove(e)},scrollResponderIsAnimating:function(){return Date.now()-this.state.lastMomentumScrollEndTime<16||this.state.lastMomentumScrollEndTime<this.state.lastMomentumScrollBeginTime},scrollResponderGetScrollableNode:function(){return this.getScrollableNode?this.getScrollableNode():Object(u.a)(this)},scrollResponderScrollTo:function(e,t,n){if("number"===typeof e)console.warn("`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.");else{var r=e||g;e=r.x,t=r.y,n=r.animated}var i=this.scrollResponderGetScrollableNode(),o=e||0,a=t||0;"function"===typeof i.scroll?i.scroll({top:a,left:o,behavior:n?"smooth":"auto"}):(i.scrollLeft=o,i.scrollTop=a)},scrollResponderZoomTo:function(e,t){"ios"!==h.a.OS&&s()("zoomToRect is not implemented")},scrollResponderFlashScrollIndicators:function(){},scrollResponderScrollNativeHandleToKeyboard:function(e,t,n){this.additionalScrollOffset=t||0,this.preventNegativeScrollOffset=!!n,f.a.measureLayout(e,Object(u.a)(this.getInnerViewNode()),this.scrollResponderTextInputFocusError,this.scrollResponderInputMeasureAndScrollToKeyboard)},scrollResponderInputMeasureAndScrollToKeyboard:function(e,t,n,r){var i=c.a.get("window").height;this.keyboardWillOpenTo&&(i=this.keyboardWillOpenTo.endCoordinates.screenY);var o=t-i+r+this.additionalScrollOffset;this.preventNegativeScrollOffset&&(o=Math.max(0,o)),this.scrollResponderScrollTo({x:0,y:o,animated:!0}),this.additionalOffset=0,this.preventNegativeScrollOffset=!1},scrollResponderTextInputFocusError:function(e){console.error("Error measuring text field: ",e)},UNSAFE_componentWillMount:function(){this.keyboardWillOpenTo=null,this.additionalScrollOffset=0},scrollResponderKeyboardWillShow:function(e){this.keyboardWillOpenTo=e,this.props.onKeyboardWillShow&&this.props.onKeyboardWillShow(e)},scrollResponderKeyboardWillHide:function(e){this.keyboardWillOpenTo=null,this.props.onKeyboardWillHide&&this.props.onKeyboardWillHide(e)},scrollResponderKeyboardDidShow:function(e){e&&(this.keyboardWillOpenTo=e),this.props.onKeyboardDidShow&&this.props.onKeyboardDidShow(e)},scrollResponderKeyboardDidHide:function(e){this.keyboardWillOpenTo=null,this.props.onKeyboardDidHide&&this.props.onKeyboardDidHide(e)}}},y=n(0),b=n.n(y),w=n(5),x=n(3),_=n(37);function E(){return(E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function A(e){return{nativeEvent:{contentOffset:{get x(){return e.target.scrollLeft},get y(){return e.target.scrollTop}},contentSize:{get height(){return e.target.scrollHeight},get width(){return e.target.scrollWidth}},layoutMeasurement:{get height(){return e.target.offsetHeight},get width(){return e.target.offsetWidth}}},timeStamp:Date.now()}}var S=y.forwardRef((function(e,t){var n=e.onScroll,r=e.onTouchMove,i=e.onWheel,o=e.scrollEnabled,a=void 0===o||o,s=e.scrollEventThrottle,l=void 0===s?0:s,c=e.showsHorizontalScrollIndicator,u=e.showsVerticalScrollIndicator,h=e.style,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["onScroll","onTouchMove","onWheel","scrollEnabled","scrollEventThrottle","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","style"]),f=y.useRef({isScrolling:!1,scrollLastTick:0}),p=y.useRef(null),m=y.useRef(null);function g(e){return function(t){a&&e&&e(t)}}function v(e){f.current.scrollLastTick=Date.now(),n&&n(A(e))}var b=!1===c||!1===u;return y.createElement(x.a,E({},d,{onScroll:function(e){e.stopPropagation(),e.target===m.current&&(e.persist(),null!=p.current&&clearTimeout(p.current),p.current=setTimeout((function(){!function(e){f.current.isScrolling=!1,n&&n(A(e))}(e)}),100),f.current.isScrolling?function(e,t){var n=Date.now()-e;return t>0&&n>=t}(f.current.scrollLastTick,l)&&v(e):function(e){f.current.isScrolling=!0,v(e)}(e))},onTouchMove:g(r),onWheel:g(i),ref:Object(_.a)(m,t),style:[h,!a&&M.scrollDisabled,b&&M.hideScrollbar]}))})),M=w.a.create({scrollDisabled:{overflowX:"hidden",overflowY:"hidden",touchAction:"none"},hideScrollbar:{scrollbarWidth:"none"}}),T=S;function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(){return(k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var P={},L=i()({displayName:"ScrollView",mixins:[v.Mixin],getInitialState:function(){return this.scrollResponderMixinGetInitialState()},flashScrollIndicators:function(){this.scrollResponderFlashScrollIndicators()},getScrollResponder:function(){return this},getScrollableNode:function(){return this._scrollNodeRef},getInnerViewRef:function(){return this._innerViewRef},getInnerViewNode:function(){return this._innerViewRef},getNativeScrollRef:function(){return this._scrollNodeRef},scrollTo:function(e,t,n){if("number"===typeof e)console.warn("`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.");else{var r=e||P;t=r.x,e=r.y,n=r.animated}this.getScrollResponder().scrollResponderScrollTo({x:t||0,y:e||0,animated:!1!==n})},scrollToEnd:function(e){var t=!1!==(e&&e.animated),n=this.props.horizontal,r=this.getScrollResponder(),i=r.scrollResponderGetScrollableNode(),o=n?i.scrollWidth:0,a=n?0:i.scrollHeight;r.scrollResponderScrollTo({x:o,y:a,animated:t})},render:function(){var e=this.props,t=e.contentContainerStyle,n=e.horizontal,r=e.onContentSizeChange,i=e.refreshControl,o=e.stickyHeaderIndices,a=e.pagingEnabled,l=(e.forwardedRef,e.keyboardDismissMode,e.onScroll,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["contentContainerStyle","horizontal","onContentSizeChange","refreshControl","stickyHeaderIndices","pagingEnabled","forwardedRef","keyboardDismissMode","onScroll"])),c={};r&&(c={onLayout:this._handleContentOnLayout});var u=!n&&Array.isArray(o),h=u||a?b.a.Children.map(this.props.children,(function(e,t){var n=u&&o.indexOf(t)>-1;return null!=e&&(n||a)?b.a.createElement(x.a,{style:w.a.compose(n&&I.stickyHeader,a&&I.pagingEnabledChild)},e):e})):this.props.children,d=b.a.createElement(x.a,k({},c,{children:h,collapsable:!1,ref:this._setInnerViewRef,style:w.a.compose(n&&I.contentContainerHorizontal,t)})),f=n?I.baseHorizontal:I.baseVertical,p=n?I.pagingEnabledHorizontal:I.pagingEnabledVertical,m=O(O({},l),{},{style:[f,a&&p,this.props.style],onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this._handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject}),g=T;s()(void 0!==g,"ScrollViewClass must not be undefined");var v=b.a.createElement(g,k({},m,{ref:this._setScrollNodeRef}),d);return i?b.a.cloneElement(i,{style:m.style},v):v},_handleContentOnLayout:function(e){var t=e.nativeEvent.layout,n=t.width,r=t.height;this.props.onContentSizeChange(n,r)},_handleScroll:function(e){"on-drag"===this.props.keyboardDismissMode&&Object(o.a)(),this.scrollResponderHandleScroll(e)},_setInnerViewRef:function(e){this._innerViewRef=e},_setScrollNodeRef:function(e){this._scrollNodeRef=e,null!=e&&(e.getScrollResponder=this.getScrollResponder,e.getInnerViewNode=this.getInnerViewNode,e.getInnerViewRef=this.getInnerViewRef,e.getNativeScrollRef=this.getNativeScrollRef,e.getScrollableNode=this.getScrollableNode,e.scrollTo=this.scrollTo,e.scrollToEnd=this.scrollToEnd,e.flashScrollIndicators=this.flashScrollIndicators,e.scrollResponderZoomTo=this.scrollResponderZoomTo,e.scrollResponderScrollNativeHandleToKeyboard=this.scrollResponderScrollNativeHandleToKeyboard),Object(l.a)(this.props.forwardedRef)(e)}}),D={flexGrow:1,flexShrink:1,transform:[{translateZ:0}],WebkitOverflowScrolling:"touch"},I=w.a.create({baseVertical:O(O({},D),{},{flexDirection:"column",overflowX:"hidden",overflowY:"auto"}),baseHorizontal:O(O({},D),{},{flexDirection:"row",overflowX:"auto",overflowY:"hidden"}),contentContainerHorizontal:{flexDirection:"row"},stickyHeader:{position:"sticky",top:0,zIndex:10},pagingEnabledHorizontal:{scrollSnapType:"x mandatory"},pagingEnabledVertical:{scrollSnapType:"y mandatory"},pagingEnabledChild:{scrollSnapAlign:"start"}}),N=b.a.forwardRef((function(e,t){return b.a.createElement(L,k({},e,{forwardedRef:t}))}));N.displayName="ScrollView";t.a=N},function(e,t,n){"use strict";var r=n(248),i=n.n(r);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function e(t,n){var r=n.default,i=void 0===r?null:r,o=n.triggerUpdate,a=void 0===o||o,s=n.onChange,l=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=i,this.triggerUpdate=a,this.onChange=l};t.a=function(e){var t=e.stateInit,n=void 0===t?function(){return{}}:t,r=e.props,a=void 0===r?{}:r,l=e.methods,c=void 0===l?{}:l,u=e.aliases,h=void 0===u?{}:u,d=e.init,f=void 0===d?function(){}:d,p=e.update,m=void 0===p?function(){}:p,g=Object.keys(a).map((function(e){return new s(e,a[e])}));return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1}),r={};function a(t){return s(t,e),l(),a}var s=function(e,n){f.call(a,e,t,n),t.initialised=!0},l=i()((function(){t.initialised&&(m.call(a,t,r),r={})}),1);return g.forEach((function(e){a[e.name]=function(e){var n=e.name,i=e.triggerUpdate,o=void 0!==i&&i,s=e.onChange,c=void 0===s?function(e,t){}:s,u=e.defaultVal,h=void 0===u?null:u;return function(e){var i=t[n];if(!arguments.length)return i;var s=void 0===e?h:e;return t[n]=s,c.call(a,s,t,i),!r.hasOwnProperty(n)&&(r[n]=i),o&&l(),a}}(e)})),Object.keys(c).forEach((function(e){a[e]=function(){for(var n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(n=c[e]).call.apply(n,[a,t].concat(i))}})),Object.entries(h).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];return a[n]=a[r]})),a.resetProps=function(){return g.forEach((function(e){a[e.name](e.defaultVal)})),a},a.resetProps(),t._rerender=l,a}}},function(e,t,n){"use strict";var r=n(4),i=n.n(r),o=n(13).canUseDOM&&"undefined"!==typeof window.requestIdleCallback,a=o?window.requestIdleCallback:function(e,t){return setTimeout((function(){var t=Date.now();e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},s=o?window.cancelIdleCallback:function(e){clearTimeout(e)},l=a,c={Events:{interactionStart:"interactionStart",interactionComplete:"interactionComplete"},runAfterInteractions:function(e){var t,n=new Promise((function(n){t=l((function(){e?n(e()):n()}))}));return{then:n.then.bind(n),done:n.then.bind(n),cancel:function(){s(t)}}},createInteractionHandle:function(){return 1},clearInteractionHandle:function(e){i()(!!e,"Must provide a handle to clear.")},addListener:function(){}};t.a=c},,function(e,t,n){var r=n(112);e.exports=function(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}},function(e,t,n){"use strict";var r=n(0),i=n(32),o=n(65),a=n(28),s=n(73),l=n(89),c=n(37),u=n(74),h=n(95),d=n(5),f=n(81);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=m(m(m(m(m(m(m(m(m({},a.c),a.a),a.b),a.d),a.e),a.f),a.h),a.g),{},{href:!0,lang:!0,pointerEvents:!0}),y=r.forwardRef((function(e,t){var n=e.dir,o=e.hrefAttrs,a=e.numberOfLines,d=e.onClick,p=e.onLayout,m=e.onPress,g=e.onMoveShouldSetResponder,y=e.onMoveShouldSetResponderCapture,x=e.onResponderEnd,_=e.onResponderGrant,E=e.onResponderMove,A=e.onResponderReject,S=e.onResponderRelease,M=e.onResponderStart,T=e.onResponderTerminate,C=e.onResponderTerminationRequest,O=e.onScrollShouldSetResponder,R=e.onScrollShouldSetResponderCapture,k=e.onSelectionChangeShouldSetResponder,P=e.onSelectionChangeShouldSetResponderCapture,L=e.onStartShouldSetResponder,D=e.onStartShouldSetResponderCapture,I=e.selectable,N=r.useContext(f.a),j=r.useRef(null),B=[b.text,!0===N&&b.textHasAncestor,1===a&&b.textOneLine,null!=a&&a>1&&b.textMultiLine],F=[e.style,null!=a&&a>1&&{WebkitLineClamp:a},!0===I&&w.selectable,!1===I&&w.notSelectable,m&&w.pressable];Object(l.a)(j,p),Object(h.a)(j,{onMoveShouldSetResponder:g,onMoveShouldSetResponderCapture:y,onResponderEnd:x,onResponderGrant:_,onResponderMove:E,onResponderReject:A,onResponderRelease:S,onResponderStart:M,onResponderTerminate:T,onResponderTerminationRequest:C,onScrollShouldSetResponder:O,onScrollShouldSetResponderCapture:R,onSelectionChangeShouldSetResponder:k,onSelectionChangeShouldSetResponderCapture:P,onStartShouldSetResponder:L,onStartShouldSetResponderCapture:D});var z=N?"span":"div",H=function(e){return Object(s.a)(e,v)}(e);if(H.classList=B,H.dir=n,N||(H.dir=null!=n?n:"auto"),H.onClick=function(e){null!=d&&d(e),null==d&&null!=m&&(e.stopPropagation(),m(e))},H.style=F,null!=e.href&&null!=o){var U=o.download,V=o.rel,G=o.target;null!=U&&(H.download=U),null!=V&&(H.rel=V),"string"===typeof G&&(H.target="_"!==G.charAt(0)?"_"+G:G)}var W=Object(u.a)(H),q=Object(c.a)(j,W,t);H.ref=q;var X=Object(i.a)(z,H);return N?X:r.createElement(f.a.Provider,{value:!0},X)}));y.displayName="Text";var b=o.a.create({text:{border:"0 solid black",boxSizing:"border-box",color:"black",display:"inline",font:"14px System",margin:0,padding:0,whiteSpace:"pre-wrap",wordWrap:"break-word"},textHasAncestor:{color:"inherit",font:"inherit",whiteSpace:"inherit"},textOneLine:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},textMultiLine:{display:"-webkit-box",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",WebkitBoxOrient:"vertical"}}),w=d.a.create({notSelectable:{userSelect:"none"},selectable:{userSelect:"text"},pressable:{cursor:"pointer"}});t.a=y},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(t,n,r){"use strict";var i=r(0),o=r(32),a=r(65),s=r(28),l=r(73),c=r(89),u=r(68),h=r(37),d=r(74),f=r(95),p=r(5),m=r(61);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=v(v(v(v(v(v(v(v(v({},s.c),s.a),s.b),s.d),s.e),s.f),s.h),s.g),{},{autoCapitalize:!0,autoComplete:!0,autoCorrect:!0,autoFocus:!0,defaultValue:!0,disabled:!0,lang:!0,maxLength:!0,onChange:!0,onScroll:!0,placeholder:!0,pointerEvents:!0,readOnly:!0,rows:!0,spellCheck:!0,value:!0,type:!0});var w=i.forwardRef((function(t,n){var r,a,s=t.autoCapitalize,g=void 0===s?"sentences":s,v=t.autoComplete,y=t.autoCompleteType,w=t.autoCorrect,_=void 0===w||w,E=t.blurOnSubmit,A=t.clearTextOnFocus,S=t.dir,M=t.editable,T=void 0===M||M,C=t.keyboardType,O=void 0===C?"default":C,R=t.multiline,k=void 0!==R&&R,P=t.numberOfLines,L=void 0===P?1:P,D=t.onBlur,I=t.onChange,N=t.onChangeText,j=t.onContentSizeChange,B=t.onFocus,F=t.onKeyPress,z=t.onLayout,H=t.onMoveShouldSetResponder,U=t.onMoveShouldSetResponderCapture,V=t.onResponderEnd,G=t.onResponderGrant,W=t.onResponderMove,q=t.onResponderReject,X=t.onResponderRelease,Y=t.onResponderStart,K=t.onResponderTerminate,Q=t.onResponderTerminationRequest,Z=t.onScrollShouldSetResponder,J=t.onScrollShouldSetResponderCapture,$=t.onSelectionChange,ee=t.onSelectionChangeShouldSetResponder,te=t.onSelectionChangeShouldSetResponderCapture,ne=t.onStartShouldSetResponder,re=t.onStartShouldSetResponderCapture,ie=t.onSubmitEditing,oe=t.placeholderTextColor,ae=t.returnKeyType,se=t.secureTextEntry,le=void 0!==se&&se,ce=t.selection,ue=t.selectTextOnFocus,he=t.spellCheck;switch(O){case"email-address":r="email";break;case"number-pad":case"numeric":a="numeric";break;case"decimal-pad":a="decimal";break;case"phone-pad":r="tel";break;case"search":case"web-search":r="search";break;case"url":r="url";break;default:r="text"}le&&(r="password");var de=i.useRef({height:null,width:null}),fe=i.useRef(null),pe=i.useCallback((function(e){if(k&&j&&null!=e){var t=e.scrollHeight,n=e.scrollWidth;t===de.current.height&&n===de.current.width||(de.current.height=t,de.current.width=n,j({nativeEvent:{contentSize:{height:de.current.height,width:de.current.width}}}))}}),[k,j]),me=i.useMemo((function(){return function(e){null!=e&&(e.clear=function(){null!=e&&(e.value="")},e.isFocused=function(){return null!=e&&m.a.currentlyFocusedField()===e},pe(e))}}),[pe]);Object(u.a)((function(){var t=fe.current;null!=t&&null!=ce&&function(t,n){if(function(e,t){var n=e.selectionEnd,r=e.selectionStart,i=t.start,o=t.end;return i!==r||o!==n}(t,n)){var r=n.start,i=n.end;try{t.setSelectionRange(r,i||r)}catch(e){}}}(t,ce),document.activeElement===t&&(m.a._currentlyFocusedNode=t)}),[fe,ce]);var ge=k?"textarea":"input",ve=[x.textinput],ye=p.a.compose(t.style,oe&&{placeholderTextColor:oe});Object(c.a)(fe,z),Object(f.a)(fe,{onMoveShouldSetResponder:H,onMoveShouldSetResponderCapture:U,onResponderEnd:V,onResponderGrant:G,onResponderMove:W,onResponderReject:q,onResponderRelease:X,onResponderStart:Y,onResponderTerminate:K,onResponderTerminationRequest:Q,onScrollShouldSetResponder:Z,onScrollShouldSetResponderCapture:J,onSelectionChangeShouldSetResponder:ee,onSelectionChangeShouldSetResponderCapture:te,onStartShouldSetResponder:ne,onStartShouldSetResponderCapture:re});var be=function(e){return Object(l.a)(e,b)}(t);be.autoCapitalize=g,be.autoComplete=v||y||"on",be.autoCorrect=_?"on":"off",be.classList=ve,be.dir=void 0!==S?S:"auto",be.enterKeyHint=ae,be.onBlur=function(e){m.a._currentlyFocusedNode=null,D&&(e.nativeEvent.text=e.target.value,D(e))},be.onChange=function(e){var t=e.target,n=t.value;e.nativeEvent.text=n,pe(t),I&&I(e),N&&N(n)},be.onFocus=function(e){var t=e.target;B&&(e.nativeEvent.text=t.value,B(e)),null!=t&&(m.a._currentlyFocusedNode=t,A&&(t.value=""),ue&&setTimeout((function(){t.select()}),0))},be.onKeyDown=function(e){var t=e.target;e.stopPropagation();var n=null==E?!k:E,r=e.nativeEvent,i=function(e){return e.isComposing||229===e.keyCode}(r);F&&F(e),"Enter"!==e.key||e.shiftKey||i||e.isDefaultPrevented()||(!E&&k||!ie||(e.preventDefault(),r.text=e.target.value,ie(e)),n&&null!=t&&t.blur())},be.onSelect=function(e){if($)try{var t=e.target,n=t.selectionStart,r=t.selectionEnd;e.nativeEvent.selection={start:n,end:r},e.nativeEvent.text=e.target.value,$(e)}catch(e){}},be.readOnly=!T,be.rows=k?L:void 0,be.spellCheck=null!=he?he:_,be.style=ye,be.type=k?void 0:r,be.inputMode=a;var we=Object(d.a)(be),xe=Object(h.a)(fe,we,me,n);return be.ref=xe,Object(o.a)(ge,be)}));w.displayName="TextInput",w.State=m.a;var x=a.a.create({textinput:{MozAppearance:"textfield",WebkitAppearance:"none",backgroundColor:"transparent",border:"0 solid black",borderRadius:0,boxSizing:"border-box",font:"14px System",margin:0,padding:0,resize:"none"}});n.a=w},function(e,t,n){"use strict";var r=n(29),i={_currentlyFocusedNode:null,currentlyFocusedField:function(){return document.activeElement!==this._currentlyFocusedNode&&(this._currentlyFocusedNode=null),this._currentlyFocusedNode},focusTextInput:function(e){null!==e&&(this._currentlyFocusedNode=e,document.activeElement!==e&&r.a.focus(e))},blurTextInput:function(e){null!==e&&(this._currentlyFocusedNode=null,document.activeElement===e&&r.a.blur(e))}};t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(32),o=n(99),a=n(5),s=n(3);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d={},f=r.forwardRef((function(e,t){var n=e.accessibilityLabel,l=e.activeThumbColor,c=void 0===l?"#009688":l,u=e.activeTrackColor,f=void 0===u?"#A3D3CF":u,m=e.disabled,g=void 0!==m&&m,v=e.onValueChange,y=e.style,b=void 0===y?d:y,w=e.thumbColor,x=void 0===w?"#FAFAFA":w,_=e.trackColor,E=void 0===_?"#939393":_,A=e.value,S=void 0!==A&&A,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["accessibilityLabel","activeThumbColor","activeTrackColor","disabled","onValueChange","style","thumbColor","trackColor","value"]),T=r.useRef(null);function C(e){var t="focus"===e.nativeEvent.type?"0px 1px 3px rgba(0,0,0,0.5), 0 0 0 10px rgba(0,0,0,0.1)":"0px 1px 3px rgba(0,0,0,0.5)";null!=T.current&&(T.current.style.boxShadow=t)}var O=a.a.flatten(b),R=O.height,k=O.width,P=R||"20px",L=Object(o.a)(P,2),D=k>L?k:L,I=Object(o.a)(P,.5),N=!0===S?null!=E&&"object"===typeof E?E.true:f:null!=E&&"object"===typeof E?E.false:E,j=S?c:x,B=P,F=B,z=[p.root,b,g&&p.cursorDefault,{height:P,width:D}],H=[p.track,{backgroundColor:g?"#D5D5D5":N,borderRadius:I}],U=[p.thumb,S&&p.thumbActive,{backgroundColor:g?"#BDBDBD":j,height:B,marginStart:S?Object(o.a)(F,-1):0,width:F}],V=Object(i.a)("input",{accessibilityLabel:n,checked:S,disabled:g,onBlur:C,onChange:function(e){null!=v&&v(e.nativeEvent.target.checked)},onFocus:C,ref:t,style:[p.nativeControl,p.cursorInherit],type:"checkbox",role:"switch"});return r.createElement(s.a,h({},M,{style:z}),r.createElement(s.a,{style:H}),r.createElement(s.a,{ref:T,style:U}),V)}));f.displayName="Switch";var p=a.a.create({root:{cursor:"pointer",userSelect:"none"},cursorDefault:{cursor:"default"},cursorInherit:{cursor:"inherit"},track:c(c({},a.a.absoluteFillObject),{},{height:"70%",margin:"auto",transitionDuration:"0.1s",width:"100%"}),thumb:{alignSelf:"flex-start",borderRadius:"100%",boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",start:"0%",transform:[{translateZ:0}],transitionDuration:"0.1s"},thumbActive:{start:"100%"},nativeControl:c(c({},a.a.absoluteFillObject),{},{height:"100%",margin:0,opacity:0,padding:0,width:"100%"})});t.a=f},function(e,t,n){"use strict";(function(e){var n={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-n.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*n.Bounce.In(2*e):.5*n.Bounce.Out(2*e-1)+.5}}},r="undefined"===typeof self&&"undefined"!==typeof e&&e.hrtime?function(){var t=e.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!==typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},i=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=r()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var o=this._tweens[n[i]],a=!t;o&&!1===o.update(e,a)&&!t&&delete this._tweens[n[i]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),o={Linear:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=o.Utils.Linear;return t<0?a(e[0],e[1],r):t>1?a(e[n],e[n-1],n-r):a(e[i],e[i+1>n?n:i+1],r-i)},Bezier:function(e,t){for(var n=0,r=e.length-1,i=Math.pow,a=o.Utils.Bernstein,s=0;s<=r;s++)n+=i(1-t,r-s)*i(t,s)*e[s]*a(r,s);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=o.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(i=Math.floor(r=n*(1+t))),a(e[(i-1+n)%n],e[i],e[(i+1)%n],e[(i+2)%n],r-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(a(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):a(e[i?i-1:0],e[i],e[n<i+1?n:i+1],e[n<i+2?n:i+2],r-i)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=o.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var r=t;r>1;r--)n*=r;return e[t]=n,n}}(),CatmullRom:function(e,t,n,r,i){var o=.5*(n-e),a=.5*(r-t),s=i*i;return(2*t-2*n+o+a)*(i*s)+(-3*t+3*n-2*o-a)*s+o*i+t}}},a=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),s=new i,l=function(){function e(e,t){void 0===t&&(t=s),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=n.Linear.None,this._interpolationFunction=o.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=a.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"===typeof e?r()+parseFloat(e):e:r(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,r){for(var i in n){var o=e[i],a=Array.isArray(o),s=a?"array":typeof o,l=!a&&Array.isArray(n[i]);if("undefined"!==s&&"function"!==s){if(l){var c=n[i];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,o)),n[i]=[o].concat(c)}if("object"!==s&&!a||!o||l)"undefined"===typeof t[i]&&(t[i]=o),a||(t[i]*=1),r[i]=l?n[i].slice().reverse():t[i]||0;else{for(var u in t[i]=a?[]:{},o)t[i][u]=o[u];r[i]=a?[]:{},this._setupProperties(o,t[i],n[i],r[i])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=r()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=r()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return this._group=e,this},e.prototype.delay=function(e){return this._delayTime=e,this},e.prototype.repeat=function(e){return this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return this._yoyo=e,this},e.prototype.easing=function(e){return this._easingFunction=e,this},e.prototype.interpolation=function(e){return this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=r()),void 0===t&&(t=!0),this._isPaused)return!0;var n,i,o=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>o)return!1;t&&this.start(e)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),i=(e-this._startTime)/this._duration,i=0===this._duration||i>1?1:i;var a=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),1===i){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!==typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,l=this._chainedTweens.length;s<l;s++)this._chainedTweens[s].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,r){for(var i in n)if(void 0!==t[i]){var o=t[i]||0,a=n[i],s=Array.isArray(e[i]),l=Array.isArray(a);!s&&l?e[i]=this._interpolationFunction(a,r):"object"===typeof a&&a?this._updateProperties(e[i],o,a,r):"number"===typeof(a=this._handleRelativeValue(o,a))&&(e[i]=o+(a-o)*r)}},e.prototype._handleRelativeValue=function(e,t){return"string"!==typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"===typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),c=a.nextId,u=s,h=u.getAll.bind(u),d=u.removeAll.bind(u),f=u.add.bind(u),p=u.remove.bind(u),m=u.update.bind(u),g={Easing:n,Group:i,Interpolation:o,now:r,Sequence:a,nextId:c,Tween:l,VERSION:"18.6.4",getAll:h,removeAll:d,add:f,remove:p,update:m};t.a=g}).call(this,n(111))},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(300)},function(e,t,n){"use strict";var r=n(94),i={create:function(e,t){return r.a.createCSS(e,t)}};t.a=i},function(e,t,n){"use strict";var r=n(3),i=n(0),o=n.n(i);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var s=i.prototype;return s.setNativeProps=function(){},s.render=function(){return o.a.createElement(r.a,{style:[l,this.props.style]},this.props.children)},i}(o.a.Component),l={};t.a=s},function(e,t,n){"use strict";var r=n(21),i=n.n(r),o=n(23),a=n.n(o),s=n(225),l=n.n(s),c=function(e,t){return new Promise((function(n,r){try{var i=e();t&&t(null,i),n(i)}catch(o){t&&t(o),r(o)}}))},u=function(e,t,n){return Promise.all(e).then((function(e){var r=n?n(e):null;return t&&t(null,r),Promise.resolve(r)}),(function(e){return t&&t(e),Promise.reject(e)}))},h=function(){function e(){i()(this,e)}return a()(e,null,[{key:"getItem",value:function(e,t){return c((function(){return window.localStorage.getItem(e)}),t)}},{key:"setItem",value:function(e,t,n){return c((function(){window.localStorage.setItem(e,t)}),n)}},{key:"removeItem",value:function(e,t){return c((function(){return window.localStorage.removeItem(e)}),t)}},{key:"mergeItem",value:function(e,t,n){return c((function(){!function(e,t){var n=window.localStorage.getItem(e),r=JSON.parse(n),i=JSON.parse(t),o=JSON.stringify(l()({},r,i));window.localStorage.setItem(e,o)}(e,t)}),n)}},{key:"clear",value:function(e){return c((function(){window.localStorage.clear()}),e)}},{key:"getAllKeys",value:function(e){return c((function(){for(var e=window.localStorage.length,t=[],n=0;n<e;n+=1){var r=window.localStorage.key(n);t.push(r)}return t}),e)}},{key:"flushGetRequests",value:function(){}},{key:"multiGet",value:function(t,n){var r=t.map((function(t){return e.getItem(t)}));return u(r,n,(function(e){return e.map((function(e,n){return[t[n],e]}))}))}},{key:"multiSet",value:function(t,n){var r=t.map((function(t){return e.setItem(t[0],t[1])}));return u(r,n)}},{key:"multiRemove",value:function(t,n){var r=t.map((function(t){return e.removeItem(t)}));return u(r,n)}},{key:"multiMerge",value:function(t,n){var r=t.map((function(t){return e.mergeItem(t[0],t[1])}));return u(r,n)}}]),e}();t.a=h},function(e,t,n){"use strict";var r=n(13),i=n(0),o=r.canUseDOM?i.useLayoutEffect:i.useEffect;t.a=o},function(e,t,n){"use strict";var r=n(0),i="Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.";t.a=r.createContext({isDefault:!0,get getKey(){throw new Error(i)},get setKey(){throw new Error(i)},get getState(){throw new Error(i)},get setState(){throw new Error(i)},get getIsInitial(){throw new Error(i)}})},function(e,t,n){"use strict";var r=n(4),i=n.n(r);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,n;function r(t,n,r,i){var o;return(o=e.call(this,n)||this).emitter=t,o.listener=r,o.context=i,o}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n),r.prototype.remove=function(){this.emitter.removeSubscription(this)},r}(function(){function e(e){this.subscriber=e}return e.prototype.remove=function(){this.subscriber.removeSubscription(this)},e}()),s=function(){function e(){this._subscriptionsForType={}}var t=e.prototype;return t.addSubscription=function(e,t){i()(t.subscriber===this,"The subscriber of the subscription is incorrectly set."),this._subscriptionsForType[e]||(this._subscriptionsForType[e]=[]);var n=this._subscriptionsForType[e].length;return this._subscriptionsForType[e].push(t),t.eventType=e,t.key=n,t},t.removeAllSubscriptions=function(e){null==e?this._subscriptionsForType={}:delete this._subscriptionsForType[e]},t.removeSubscription=function(e){var t=e.eventType,n=e.key,r=this._subscriptionsForType[t];r&&delete r[n]},t.getSubscriptionsForType=function(e){return this._subscriptionsForType[e]},e}(),l=function(){return!0},c=function(){function e(e){this._subscriber=e||new s}var t=e.prototype;return t.addListener=function(e,t,n){return this._subscriber.addSubscription(e,new a(this,this._subscriber,t,n))},t.removeAllListeners=function(e){this._subscriber.removeAllSubscriptions(e)},t.removeSubscription=function(e){i()(e.emitter===this,"Subscription does not belong to this emitter."),this._subscriber.removeSubscription(e)},t.listenerCount=function(e){var t=this._subscriber.getSubscriptionsForType(e);return t?t.filter(l).length:0},t.emit=function(e){var t=this._subscriber.getSubscriptionsForType(e);if(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=0,a=t.length;o<a;o++){var s=t[o];s&&s.listener&&s.listener.apply(s.context,r)}}},t.removeListener=function(e,t){console.error("EventEmitter.removeListener('"+e+"', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.");var n=this._subscriber.getSubscriptionsForType(e);if(n)for(var r=0,i=n.length;r<i;r++){var o=n[r];o&&o.listener===t&&o.remove()}},e}();t.a=new c},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(59);function o(){var e=r.useContext(i.a);if(void 0===e)throw new Error("Couldn't find a navigation object. Is your component inside a screen in a navigator?");return e}},function(e,t,n){"use strict";var r=function e(t,n,r){if(void 0===r&&(r=-1),0===r)return!0;if(t===n)return!1;if("function"===typeof t&&"function"===typeof n)return!1;if("object"!==typeof t||null===t)return t!==n;if("object"!==typeof n||null===n)return!0;if(t.constructor!==n.constructor)return!0;if(Array.isArray(t)){var i=t.length;if(n.length!==i)return!0;for(var o=0;o<i;o++)if(e(t[o],n[o],r-1))return!0}else{for(var a in t)if(e(t[a],n[a],r-1))return!0;for(var s in n)if(void 0===t[s]&&void 0!==n[s])return!0}return!1},i=n(0),o=n(5),a=n(3),s=n(77),l=n(4),c=n.n(l);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=f(f({},s.a.defaultProps),{},{numColumns:1}),g=function(e){var t,n;n=e,(t=d).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var l=d.prototype;function d(t){var n;return(n=e.call(this,t)||this)._virtualizedListPairs=[],n._captureRef=function(e){n._listRef=e},n._getItem=function(e,t){var r=n.props.numColumns;if(r>1){for(var i=[],o=0;o<r;o++){var a=e[t*r+o];null!=a&&i.push(a)}return i}return e[t]},n._getItemCount=function(e){if(e){var t=n.props.numColumns;return t>1?Math.ceil(e.length/t):e.length}return 0},n._keyExtractor=function(e,t){var r=n.props,i=r.keyExtractor,o=r.numColumns;return o>1?(c()(Array.isArray(e),"FlatList: Encountered internal consistency error, expected each item to consist of an array with 1-%s columns; instead, received a single item.",o),e.map((function(e,n){return i(e,t*o+n)})).join(":")):i(e,t)},n._renderer=function(){var e,t=n.props,r=t.ListItemComponent,s=t.renderItem,l=t.numColumns,u=t.columnWrapperStyle,h=function(e){return r?i.createElement(r,e):s?s(e):null};return(e={})[r?"ListItemComponent":"renderItem"]=function(e){if(l>1){var t=e.item,n=e.index;return c()(Array.isArray(t),"Expected array of items with numColumns > 1"),i.createElement(a.a,{style:o.a.compose(v.row,u)},t.map((function(t,r){var o=h({item:t,index:n*l+r,separators:e.separators});return null!=o?i.createElement(i.Fragment,{key:r},o):null})))}return h(e)},e},n._checkProps(n.props),n.props.viewabilityConfigCallbackPairs?n._virtualizedListPairs=n.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityConfig:e.viewabilityConfig,onViewableItemsChanged:n._createOnViewableItemsChanged(e.onViewableItemsChanged)}})):n.props.onViewableItemsChanged&&n._virtualizedListPairs.push({viewabilityConfig:n.props.viewabilityConfig,onViewableItemsChanged:n._createOnViewableItemsChanged(n.props.onViewableItemsChanged)}),n}return l.scrollToEnd=function(e){this._listRef&&this._listRef.scrollToEnd(e)},l.scrollToIndex=function(e){this._listRef&&this._listRef.scrollToIndex(e)},l.scrollToItem=function(e){this._listRef&&this._listRef.scrollToItem(e)},l.scrollToOffset=function(e){this._listRef&&this._listRef.scrollToOffset(e)},l.recordInteraction=function(){this._listRef&&this._listRef.recordInteraction()},l.flashScrollIndicators=function(){this._listRef&&this._listRef.flashScrollIndicators()},l.getScrollResponder=function(){if(this._listRef)return this._listRef.getScrollResponder()},l.getNativeScrollRef=function(){if(this._listRef)return this._listRef.getScrollRef()},l.getScrollableNode=function(){if(this._listRef)return this._listRef.getScrollableNode()},l.setNativeProps=function(e){this._listRef&&this._listRef.setNativeProps(e)},l.componentDidUpdate=function(e){c()(e.numColumns===this.props.numColumns,"Changing numColumns on the fly is not supported. Change the key prop on FlatList when changing the number of columns to force a fresh render of the component."),c()(e.onViewableItemsChanged===this.props.onViewableItemsChanged,"Changing onViewableItemsChanged on the fly is not supported"),c()(!r(e.viewabilityConfig,this.props.viewabilityConfig),"Changing viewabilityConfig on the fly is not supported"),c()(e.viewabilityConfigCallbackPairs===this.props.viewabilityConfigCallbackPairs,"Changing viewabilityConfigCallbackPairs on the fly is not supported"),this._checkProps(this.props)},l._checkProps=function(e){var t=e.getItem,n=e.getItemCount,r=e.horizontal,i=e.numColumns,o=e.columnWrapperStyle,a=e.onViewableItemsChanged,s=e.viewabilityConfigCallbackPairs;c()(!t&&!n,"FlatList does not support custom data formats."),i>1?c()(!r,"numColumns does not support horizontal."):c()(!o,"columnWrapperStyle not supported for single column lists"),c()(!(a&&s),"FlatList does not support setting both onViewableItemsChanged and viewabilityConfigCallbackPairs.")},l._pushMultiColumnViewable=function(e,t){var n=this.props,r=n.numColumns,i=n.keyExtractor;t.item.forEach((function(n,o){c()(null!=t.index,"Missing index!");var a=t.index*r+o;e.push(f(f({},t),{},{item:n,key:i(n,a),index:a}))}))},l._createOnViewableItemsChanged=function(e){var t=this;return function(n){var r=t.props.numColumns;if(e)if(r>1){var i=[],o=[];n.viewableItems.forEach((function(e){return t._pushMultiColumnViewable(o,e)})),n.changed.forEach((function(e){return t._pushMultiColumnViewable(i,e)})),e({viewableItems:o,changed:i})}else e(n)}},l.render=function(){var e=this.props,t=(e.numColumns,e.columnWrapperStyle,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["numColumns","columnWrapperStyle"]));return i.createElement(s.a,u({},t,{getItem:this._getItem,getItemCount:this._getItemCount,keyExtractor:this._keyExtractor,ref:this._captureRef,viewabilityConfigCallbackPairs:this._virtualizedListPairs},this._renderer()))},d}(i.PureComponent);g.defaultProps=m;var v=o.a.create({row:{flexDirection:"row"}}),y=g;t.a=y},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(!0!==t[r]&&0!==r.indexOf("aria-")||(n[r]=e[r]));return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(29),i=n(129),o=n(106),a=n(0);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={};function h(e){var t=e.classList,n=e.pointerEvents,s=e.style,c=Object(a.useRef)(null),h=Object(a.useRef)(null);return h.current={classList:t,pointerEvents:n,style:s},Object(o.a)((function(){return function(e){null!=e&&(e.measure=function(t){return r.a.measure(e,t)},e.measureLayout=function(t,n,i){return r.a.measureLayout(e,t,i,n)},e.measureInWindow=function(t){return r.a.measureInWindow(e,t)},e.setNativeProps=function(t){var n=h.current||u,o=n.classList,a=n.style,s=n.pointerEvents;!function(e,t,n,o,a,s){if(null!=e&&t){var c=Object(i.a)(null,l(l({pointerEvents:o},t),{},{classList:[n,t.className],style:[a,t.style]})),u=c.style;if(null!=s.current)for(var h in null==c.style&&(c.style={}),s.current)null==c.style[h]&&(c.style[h]="");s.current=u,r.a.updateView(e,c)}}(e,t,o,s,a,c)})}}))}},function(e,t,n){"use strict";var r=n(43);n.o(r,"StackActions")&&n.d(t,"StackActions",(function(){return r.StackActions})),n.o(r,"StackRouter")&&n.d(t,"StackRouter",(function(){return r.StackRouter}));var i=n(190);n.d(t,"BaseNavigationContainer",(function(){return i.a}));var o=n(191);n.d(t,"createNavigatorFactory",(function(){return o.a}));var a=n(192);n.d(t,"NavigationHelpersContext",(function(){return a.a}));var s=n(59);n.d(t,"NavigationContext",(function(){return s.a}));var l=n(47);n.d(t,"NavigationRouteContext",(function(){return l.a}));n(124);var c=n(220);n.d(t,"useNavigationBuilder",(function(){return c.a}));var u=n(71);n.d(t,"useNavigation",(function(){return u.a}));n(193),n(194),n(195),n(196);var h=n(197);n.d(t,"getStateFromPath",(function(){return h.a}));var d=n(202);n.d(t,"getPathFromState",(function(){return d.a}));var f=n(203);n.d(t,"getActionFromState",(function(){return f.a}));n(204),n(87)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r="ERROR",i=Object.freeze({NOT_RESPONDER:{DELAY:r,RESPONDER_GRANT:"RESPONDER_INACTIVE_PRESS_START",RESPONDER_RELEASE:r,RESPONDER_TERMINATED:r,LONG_PRESS_DETECTED:r},RESPONDER_INACTIVE_PRESS_START:{DELAY:"RESPONDER_ACTIVE_PRESS_START",RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:r},RESPONDER_ACTIVE_PRESS_START:{DELAY:r,RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"RESPONDER_ACTIVE_LONG_PRESS_START"},RESPONDER_ACTIVE_LONG_PRESS_START:{DELAY:r,RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"RESPONDER_ACTIVE_LONG_PRESS_START"},ERROR:{DELAY:"NOT_RESPONDER",RESPONDER_GRANT:"RESPONDER_INACTIVE_PRESS_START",RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"NOT_RESPONDER"}}),o=function(e){return"RESPONDER_ACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_LONG_PRESS_START"===e},a=function(e){return"button"===e.getAttribute("role")},s=function(e){return"RESPONDER_INACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_LONG_PRESS_START"===e},l=function(){function e(e){this._eventHandlers=null,this._isPointerTouch=!1,this._longPressDelayTimeout=null,this._longPressDispatched=!1,this._pressDelayTimeout=null,this._pressOutDelayTimeout=null,this._touchState="NOT_RESPONDER",this.configure(e)}var t=e.prototype;return t.configure=function(e){this._config=e},t.reset=function(){this._cancelLongPressDelayTimeout(),this._cancelPressDelayTimeout(),this._cancelPressOutDelayTimeout()},t.getEventHandlers=function(){return null==this._eventHandlers&&(this._eventHandlers=this._createEventHandlers()),this._eventHandlers},t._createEventHandlers=function(){var e=this,t=function(t,n){t.persist(),e._cancelPressOutDelayTimeout(),e._longPressDispatched=!1,e._selectionTerminated=!1,e._touchState="NOT_RESPONDER",e._isPointerTouch="touchstart"===t.nativeEvent.type,e._receiveSignal("RESPONDER_GRANT",t);var r=c(e._config.delayPressStart,0,50);!1!==n&&r>0?e._pressDelayTimeout=setTimeout((function(){e._receiveSignal("DELAY",t)}),r):e._receiveSignal("DELAY",t);var i=c(e._config.delayLongPress,10,450);e._longPressDelayTimeout=setTimeout((function(){e._handleLongPress(t)}),i+r)},n=function(t){e._receiveSignal("RESPONDER_RELEASE",t)},r=function t(r){"NOT_RESPONDER"!==e._touchState&&(n(r),document.removeEventListener("keyup",t))};return{onStartShouldSetResponder:function(t){var n=e._config.disabled;return n&&a(t.currentTarget)&&t.stopPropagation(),null==n||!n},onKeyDown:function(n){(function(e){var t=e.key,n=e.currentTarget.getAttribute("role"),r=" "===t||"Spacebar"===t;return!e.repeat&&("Enter"===t||r&&("button"===n||"menuitem"===n))})(n)&&("NOT_RESPONDER"===e._touchState&&(t(n,!1),document.addEventListener("keyup",r)),n.stopPropagation())},onResponderGrant:function(e){return t(e)},onResponderMove:function(t){null!=e._config.onPressMove&&e._config.onPressMove(t);var n=u(t);if(null!=e._touchActivatePosition){var r=e._touchActivatePosition.pageX-n.pageX,i=e._touchActivatePosition.pageY-n.pageY;Math.hypot(r,i)>10&&e._cancelLongPressDelayTimeout()}},onResponderRelease:function(e){return n(e)},onResponderTerminate:function(t){"selectionchange"===t.nativeEvent.type&&(e._selectionTerminated=!0),e._receiveSignal("RESPONDER_TERMINATED",t)},onResponderTerminationRequest:function(t){var n=e._config,r=n.cancelable,i=n.disabled,o=n.onLongPress;return!(!i&&null!=o&&e._isPointerTouch&&"contextmenu"===t.nativeEvent.type)&&(null==r||r)},onClick:function(t){var n=e._config,r=n.disabled,i=n.onPress;r?a(t.currentTarget)&&t.stopPropagation():(t.stopPropagation(),e._longPressDispatched||e._selectionTerminated?t.preventDefault():null!=i&&!1===t.altKey&&i(t))},onContextMenu:function(t){var n=e._config,r=n.disabled,i=n.onLongPress;r?a(t.currentTarget)&&t.stopPropagation():null!=i&&e._isPointerTouch&&!t.defaultPrevented&&(t.preventDefault(),t.stopPropagation())}}},t._receiveSignal=function(e,t){var n=this._touchState,o=null;null!=i[n]&&(o=i[n][e]),"NOT_RESPONDER"===this._touchState&&"RESPONDER_RELEASE"===e||(null==o||o===r?console.error("PressResponder: Invalid signal "+e+" for state "+n+" on responder"):n!==o&&(this._performTransitionSideEffects(n,o,e,t),this._touchState=o))},t._performTransitionSideEffects=function(e,t,n,r){if(function(e){return"RESPONDER_TERMINATED"===e||"RESPONDER_RELEASE"===e}(n)&&(this._isPointerTouch=!1,this._touchActivatePosition=null,this._cancelLongPressDelayTimeout()),s(e)&&"LONG_PRESS_DETECTED"===n){var i=this._config.onLongPress;null!=i&&null==r.nativeEvent.key&&(i(r),this._longPressDispatched=!0)}var a=o(e),l=o(t);if(!a&&l?this._activate(r):a&&!l&&this._deactivate(r),s(e)&&"RESPONDER_RELEASE"===n){var c=this._config,u=c.onLongPress;if(null!=c.onPress)null!=u&&"RESPONDER_ACTIVE_LONG_PRESS_START"===e||l||a||(this._activate(r),this._deactivate(r))}this._cancelPressDelayTimeout()},t._activate=function(e){var t=this._config,n=t.onPressChange,r=t.onPressStart,i=u(e);this._touchActivatePosition={pageX:i.pageX,pageY:i.pageY},null!=r&&r(e),null!=n&&n(!0)},t._deactivate=function(e){var t=this._config,n=t.onPressChange,r=t.onPressEnd;function i(){null!=r&&r(e),null!=n&&n(!1)}var o=c(this._config.delayPressEnd);o>0?this._pressOutDelayTimeout=setTimeout((function(){i()}),o):i()},t._handleLongPress=function(e){"RESPONDER_ACTIVE_PRESS_START"!==this._touchState&&"RESPONDER_ACTIVE_LONG_PRESS_START"!==this._touchState||this._receiveSignal("LONG_PRESS_DETECTED",e)},t._cancelLongPressDelayTimeout=function(){null!=this._longPressDelayTimeout&&(clearTimeout(this._longPressDelayTimeout),this._longPressDelayTimeout=null)},t._cancelPressDelayTimeout=function(){null!=this._pressDelayTimeout&&(clearTimeout(this._pressDelayTimeout),this._pressDelayTimeout=null)},t._cancelPressOutDelayTimeout=function(){null!=this._pressOutDelayTimeout&&(clearTimeout(this._pressOutDelayTimeout),this._pressOutDelayTimeout=null)},e}();function c(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),Math.max(t,null!==e&&void 0!==e?e:n)}function u(e){var t=e.nativeEvent,n=t.changedTouches,r=t.touches;return null!=r&&r.length>0?r[0]:null!=n&&n.length>0?n[0]:e.nativeEvent}var h=n(0);function d(e,t){var n=Object(h.useRef)(null);null==n.current&&(n.current=new l(t));var r=n.current;return Object(h.useEffect)((function(){r.configure(t)}),[t,r]),Object(h.useEffect)((function(){return function(){r.reset()}}),[r]),Object(h.useDebugValue)(t),r.getEventHandlers()}},function(e,t,n){"use strict";var r=n(55),i=function(){function e(e,t){this._delay=t,this._callback=e}var t=e.prototype;return t.dispose=function(e){void 0===e&&(e={abort:!1}),this._taskHandle&&(this._taskHandle.cancel(),e.abort||this._callback(),this._taskHandle=null)},t.schedule=function(){var e=this;if(!this._taskHandle){var t=setTimeout((function(){e._taskHandle=r.a.runAfterInteractions((function(){e._taskHandle=null,e._callback()}))}),this._delay);this._taskHandle={cancel:function(){return clearTimeout(t)}}}},e}(),o=n(245),a=(n(1),n(0)),s=n(117),l=n(53),c=n(5),u=n(3),h=n(4),d=n.n(h);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,i,o){if(function(e,t,n){return e>=0&&t<=n&&t>e}(n,r,i))return!0;var a=function(e,t,n){var r=Math.min(t,n)-Math.max(e,0);return Math.max(0,r)}(n,r,i);return 100*(e?a/i:a/o)>=t}var b=function(){function e(e){void 0===e&&(e={viewAreaCoveragePercentThreshold:0}),this._hasInteracted=!1,this._timers=new Set,this._viewableIndices=[],this._viewableItems=new Map,this._config=e}var t=e.prototype;return t.dispose=function(){this._timers.forEach(clearTimeout)},t.computeViewableItems=function(e,t,n,r,i){var o=this._config,a=o.itemVisiblePercentThreshold,s=o.viewAreaCoveragePercentThreshold,l=null!=s,c=l?s:a;d()(null!=c&&null!=a!==(null!=s),"Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold");var u=[];if(0===e)return u;var h=-1,f=i||{first:0,last:e-1},p=f.first,m=f.last;if(m>=e)return console.warn("Invalid render range computing viewability "+JSON.stringify({renderRange:i,itemCount:e})),[];for(var g=p;g<=m;g++){var v=r(g);if(v){var b=v.offset-t,w=b+v.length;if(b<n&&w>0)h=g,y(l,c,b,w,n,v.length)&&u.push(g);else if(h>=0)break}}return u},t.onUpdate=function(e,t,n,r,i,o,a){var s=this;if((!this._config.waitForInteraction||this._hasInteracted)&&0!==e&&r(0)){var l=[];if(e&&(l=this.computeViewableItems(e,t,n,r,a)),this._viewableIndices.length!==l.length||!this._viewableIndices.every((function(e,t){return e===l[t]})))if(this._viewableIndices=l,this._config.minimumViewTime){var c=setTimeout((function(){s._timers.delete(c),s._onUpdateSync(l,o,i)}),this._config.minimumViewTime);this._timers.add(c)}else this._onUpdateSync(l,o,i)}},t.resetViewableIndices=function(){this._viewableIndices=[]},t.recordInteraction=function(){this._hasInteracted=!0},t._onUpdateSync=function(e,t,n){var r=this;e=e.filter((function(e){return r._viewableIndices.includes(e)}));for(var i,o=this._viewableItems,a=new Map(e.map((function(e){var t=n(e,!0);return[t.key,t]}))),s=[],l=g(a);!(i=l()).done;){var c=i.value,u=c[0],h=c[1];o.has(u)||s.push(h)}for(var d,f=g(o);!(d=f()).done;){var m=d.value,v=m[0],y=m[1];a.has(v)||s.push(p(p({},y),{},{isViewable:!1}))}s.length>0&&(this._viewableItems=a,t({viewableItems:Array.from(a.values()),changed:s,viewabilityConfig:this._config}))},e}(),w=n(49);var x=function(){var e;return(e=console).log.apply(e,arguments)};n(162);function _(e,t,n){for(var r=[],i=0,o=0;o<t;o++)for(var a=n(o),s=a.offset+a.length,l=0;l<e.length;l++)if(null==r[l]&&s>=e[l]&&(r[l]=o,i++,l===e.length-1))return d()(i===e.length,"bad offsets input, should be in increasing order: %s",JSON.stringify(e)),r;return r}function E(e,t){return t.last-t.first+1-Math.max(0,1+Math.min(t.last,e.last)-Math.max(t.first,e.first))}function A(e,t,n,r){var i=e.data,o=e.getItemCount,a=e.maxToRenderPerBatch,s=e.windowSize,l=o(i);if(0===l)return t;var c=r.offset,u=r.velocity,h=r.visibleLength,d=Math.max(0,c),f=d+h,p=(s-1)*h,m=u>1?"after":u<-1?"before":"none",g=Math.max(0,d-.5*p),v=Math.max(0,f+.5*p);if(n(l-1).offset<g)return{first:Math.max(0,l-1-a),last:l-1};var y=_([g,d,f,v],e.getItemCount(e.data),n),b=y[0],w=y[1],x=y[2],A=y[3];b=null==b?0:b,A=null==A?l-1:A;for(var S={first:w=null==w?Math.max(0,b):w,last:x=null==x?Math.min(A,w+a-1):x},M=E(t,S);!(w<=b&&x>=A);){var T=M>=a,C=w<=t.first||w>t.last,O=w>b&&(!T||!C),R=x>=t.last||x<t.first,k=x<A&&(!T||!R);if(T&&!O&&!k)break;!O||"after"===m&&k&&R||(C&&M++,w--),!k||"before"===m&&O&&C||(R&&M++,x++)}if(!(x>=w&&w>=0&&x<l&&w>=b&&x<=A&&w<=S.first&&x>=S.last))throw new Error("Bad window calculation "+JSON.stringify({first:w,last:x,itemCount:l,overscanFirst:b,overscanLast:A,visible:S}));return{first:w,last:x}}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=a.createContext(null);function O(e){var t=e.children,n=e.value,r=Object(a.useMemo)((function(){return{cellKey:null,getScrollMetrics:n.getScrollMetrics,horizontal:n.horizontal,getOutermostParentListRef:n.getOutermostParentListRef,getNestedChildState:n.getNestedChildState,registerAsNestedChild:n.registerAsNestedChild,unregisterAsNestedChild:n.unregisterAsNestedChild,debugInfo:{cellKey:n.debugInfo.cellKey,horizontal:n.debugInfo.horizontal,listKey:n.debugInfo.listKey,parent:n.debugInfo.parent}}}),[n.getScrollMetrics,n.horizontal,n.getOutermostParentListRef,n.getNestedChildState,n.registerAsNestedChild,n.unregisterAsNestedChild,n.debugInfo.cellKey,n.debugInfo.horizontal,n.debugInfo.listKey,n.debugInfo.parent]);return a.createElement(C.Provider,{value:r},t)}function R(e){var t=e.cellKey,n=e.children,r=Object(a.useContext)(C);return a.createElement(C.Provider,{value:null==r?null:M(M({},r),{},{cellKey:t})},n)}function k(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(){return(L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,B(e,t)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}c.a.flatten;var F=!1,z="",H=function(e){j(n,e);var t=n.prototype;function n(t){var n;if((n=e.call(this,t)||this)._getScrollMetrics=function(){return n._scrollMetrics},n._getOutermostParentListRef=function(){return n._isNestedWithSameOrientation()?n.context.getOutermostParentListRef():function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)},n._getNestedChildState=function(e){var t=n._nestedChildLists.get(e);return t&&t.state},n._registerAsNestedChild=function(e){var t=n._cellKeysToChildListKeys.get(e.cellKey)||new Set;t.add(e.key),n._cellKeysToChildListKeys.set(e.cellKey,t);var r=n._nestedChildLists.get(e.key);r&&null!==r.ref&&console.error("A VirtualizedList contains a cell which itself contains more than one VirtualizedList of the same orientation as the parent list. You must pass a unique listKey prop to each sibling list.\n\n"+function(e){var t="VirtualizedList trace:\n Child ("+(e.horizontal?"horizontal":"vertical")+"):\n listKey: "+e.key+"\n cellKey: "+e.cellKey,n=e.parentDebugInfo;for(;n;)t+="\n Parent ("+(n.horizontal?"horizontal":"vertical")+"):\n listKey: "+n.listKey+"\n cellKey: "+n.cellKey,n=n.parent;return t}(I(I({},e),{},{horizontal:!!e.ref.props.horizontal}))),n._nestedChildLists.set(e.key,{ref:e.ref,state:null}),n._hasInteracted&&e.ref.recordInteraction()},n._unregisterAsNestedChild=function(e){n._nestedChildLists.set(e.key,{ref:null,state:e.state})},n._onUpdateSeparators=function(e,t){e.forEach((function(e){var r=null!=e&&n._cellRefs[e];r&&r.updateSeparatorProps(t)}))},n._averageCellLength=0,n._cellKeysToChildListKeys=new Map,n._cellRefs={},n._frames={},n._footerLength=0,n._hasDoneInitialScroll=!1,n._hasInteracted=!1,n._hasMore=!1,n._hasWarned={},n._headerLength=0,n._hiPriInProgress=!1,n._highestMeasuredFrameIndex=0,n._indicesToKeys=new Map,n._nestedChildLists=new Map,n._offsetFromParentVirtualizedList=0,n._prevParentOffset=0,n._scrollMetrics={contentLength:0,dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0},n._scrollRef=null,n._sentEndForContentLength=0,n._totalCellLength=0,n._totalCellsMeasured=0,n._viewabilityTuples=[],n._captureScrollRef=function(e){n._scrollRef=e},n._defaultRenderScrollComponent=function(e){var t=e.onRefresh;return n._isNestedWithSameOrientation()?a.createElement(u.a,e):t?(d()("boolean"===typeof e.refreshing,"`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `"+JSON.stringify(e.refreshing)+"`"),a.createElement(l.a,L({},e,{refreshControl:null==e.refreshControl?a.createElement(s.a,{refreshing:e.refreshing,onRefresh:t,progressViewOffset:e.progressViewOffset}):e.refreshControl}))):a.createElement(l.a,e)},n._onCellUnmount=function(e){var t=n._frames[e];t&&(n._frames[e]=I(I({},t),{},{inLayout:!1}))},n._onLayout=function(e){n._isNestedWithSameOrientation()?n.measureLayoutRelativeToContainingList():n._scrollMetrics.visibleLength=n._selectLength(e.nativeEvent.layout),n.props.onLayout&&n.props.onLayout(e),n._scheduleCellsToRenderUpdate(),n._maybeCallOnEndReached()},n._onLayoutEmpty=function(e){n.props.onLayout&&n.props.onLayout(e)},n._onLayoutFooter=function(e){n._triggerRemeasureForChildListsInCell(n._getFooterCellKey()),n._footerLength=n._selectLength(e.nativeEvent.layout)},n._onLayoutHeader=function(e){n._headerLength=n._selectLength(e.nativeEvent.layout)},n._onContentSizeChange=function(e,t){e>0&&t>0&&null!=n.props.initialScrollIndex&&n.props.initialScrollIndex>0&&!n._hasDoneInitialScroll&&(n._hasDoneInitialScroll=!0),n.props.onContentSizeChange&&n.props.onContentSizeChange(e,t),n._scrollMetrics.contentLength=n._selectLength({height:t,width:e}),n._scheduleCellsToRenderUpdate(),n._maybeCallOnEndReached()},n._convertParentScrollMetrics=function(e){var t=e.offset-n._offsetFromParentVirtualizedList,r=e.visibleLength,i=t-n._scrollMetrics.offset;return{visibleLength:r,contentLength:n._scrollMetrics.contentLength,offset:t,dOffset:i}},n._onScroll=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScroll(e)})),n.props.onScroll&&n.props.onScroll(e);var t=e.timeStamp,r=n._selectLength(e.nativeEvent.layoutMeasurement),i=n._selectLength(e.nativeEvent.contentSize),o=n._selectOffset(e.nativeEvent.contentOffset),a=o-n._scrollMetrics.offset;if(n._isNestedWithSameOrientation()){if(0===n._scrollMetrics.contentLength)return;var s=n._convertParentScrollMetrics({visibleLength:r,offset:o});r=s.visibleLength,i=s.contentLength,o=s.offset,a=s.dOffset}var l=n._scrollMetrics.timestamp?Math.max(1,t-n._scrollMetrics.timestamp):1,c=a/l;l>500&&n._scrollMetrics.dt>500&&i>5*r&&!n._hasWarned.perf&&(x("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:l,prevDt:n._scrollMetrics.dt,contentLength:i}),n._hasWarned.perf=!0),n._scrollMetrics={contentLength:i,dt:l,dOffset:a,offset:o,timestamp:t,velocity:c,visibleLength:r},n._updateViewableItems(n.props.data),n.props&&(n._maybeCallOnEndReached(),0!==c&&n._fillRateHelper.activate(),n._computeBlankness(),n._scheduleCellsToRenderUpdate())},n._onScrollBeginDrag=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScrollBeginDrag(e)})),n._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),n._hasInteracted=!0,n.props.onScrollBeginDrag&&n.props.onScrollBeginDrag(e)},n._onScrollEndDrag=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScrollEndDrag(e)}));var t=e.nativeEvent.velocity;t&&(n._scrollMetrics.velocity=n._selectOffset(t)),n._computeBlankness(),n.props.onScrollEndDrag&&n.props.onScrollEndDrag(e)},n._onMomentumScrollBegin=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onMomentumScrollBegin(e)})),n.props.onMomentumScrollBegin&&n.props.onMomentumScrollBegin(e)},n._onMomentumScrollEnd=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onMomentumScrollEnd(e)})),n._scrollMetrics.velocity=0,n._computeBlankness(),n.props.onMomentumScrollEnd&&n.props.onMomentumScrollEnd(e)},n._updateCellsToRender=function(){var e=n.props,t=e.data,r=e.getItemCount,i=e.onEndReachedThreshold,o=n._isVirtualizationDisabled();n._updateViewableItems(t),t&&n.setState((function(e){var a,s=n._scrollMetrics,l=s.contentLength,c=s.offset,u=s.visibleLength;if(o){var h=l-u-c<i*u?n.props.maxToRenderPerBatch:0;a={first:0,last:Math.min(e.last+h,r(t)-1)}}else u>0&&l>0&&(n.props.initialScrollIndex&&!n._scrollMetrics.offset||(a=A(n.props,e,n._getFrameMetricsApprox,n._scrollMetrics)));if(a&&n._nestedChildLists.size>0)for(var d=a.first,f=a.last,p=d;p<=f;p++){var m=n._indicesToKeys.get(p),g=m&&n._cellKeysToChildListKeys.get(m);if(g){for(var v,y=!1,b=k(g);!(v=b()).done;){var w=v.value,x=n._nestedChildLists.get(w);if(x&&x.ref&&x.ref.hasMore()){y=!0;break}}if(y&&a){a.last=p;break}}}return null!=a&&a.first===e.first&&a.last===e.last&&(a=null),a}))},n._createViewToken=function(e,t){var r=n.props,i=r.data,o=r.getItem,a=r.keyExtractor,s=o(i,e);return{index:e,item:s,key:a(s,e),isViewable:t}},n._getFrameMetricsApprox=function(e){var t=n._getFrameMetrics(e);if(t&&t.index===e)return t;var r=n.props.getItemLayout;return d()(!r,"Should not have to estimate frames when a measurement metrics function is provided"),{length:n._averageCellLength,offset:n._averageCellLength*e}},n._getFrameMetrics=function(e){var t=n.props,r=t.data,i=t.getItem,o=t.getItemCount,a=t.getItemLayout,s=t.keyExtractor;d()(o(r)>e,"Tried to get frame for out of range index "+e);var l=i(r,e),c=l&&n._frames[s(l,e)];return c&&c.index===e||a&&(c=a(r,e)),c},d()(!t.onScroll||!t.onScroll.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),d()(t.windowSize>0,"VirtualizedList: The windowSize prop must be present and set to a value greater than 0."),n._fillRateHelper=new o.a(n._getFrameMetrics),n._updateCellsToRenderBatcher=new i(n._updateCellsToRender,n.props.updateCellsBatchingPeriod),n.props.viewabilityConfigCallbackPairs)n._viewabilityTuples=n.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityHelper:new b(e.viewabilityConfig),onViewableItemsChanged:e.onViewableItemsChanged}}));else if(n.props.onViewableItemsChanged){var r=n.props.onViewableItemsChanged;n._viewabilityTuples.push({viewabilityHelper:new b(n.props.viewabilityConfig),onViewableItemsChanged:r})}var c={first:n.props.initialScrollIndex||0,last:Math.min(n.props.getItemCount(n.props.data),(n.props.initialScrollIndex||0)+n.props.initialNumToRender)-1};if(n._isNestedWithSameOrientation()){var h=n.context.getNestedChildState(n._getListKey());h&&(c=h,n.state=h,n._frames=h.frames)}return n.state=c,n}return t.scrollToEnd=function(e){var t=!e||e.animated,n=this.props.getItemCount(this.props.data)-1,r=this._getFrameMetricsApprox(n),i=Math.max(0,r.offset+r.length+this._footerLength-this._scrollMetrics.visibleLength);null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(this.props.horizontal?{x:i,animated:t}:{y:i,animated:t}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.scrollToIndex=function(e){var t=this.props,n=t.data,r=t.horizontal,i=t.getItemCount,o=t.getItemLayout,a=t.onScrollToIndexFailed,s=e.animated,l=e.index,c=e.viewOffset,u=e.viewPosition;if(d()(l>=0,"scrollToIndex out of range: requested index "+l+" but minimum is 0"),d()(i(n)>=1,"scrollToIndex out of range: item length "+i(n)+" but minimum is 1"),d()(l<i(n),"scrollToIndex out of range: requested index "+l+" is out of 0 to "+(i(n)-1)),!o&&l>this._highestMeasuredFrameIndex)return d()(!!a,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void a({averageItemLength:this._averageCellLength,highestMeasuredFrameIndex:this._highestMeasuredFrameIndex,index:l});var h=this._getFrameMetricsApprox(l),f=Math.max(0,h.offset-(u||0)*(this._scrollMetrics.visibleLength-h.length))-(c||0);null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(r?{x:f,animated:s}:{y:f,animated:s}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.scrollToItem=function(e){for(var t=e.item,n=this.props,r=n.data,i=n.getItem,o=(0,n.getItemCount)(r),a=0;a<o;a++)if(i(r,a)===t){this.scrollToIndex(I(I({},e),{},{index:a}));break}},t.scrollToOffset=function(e){var t=e.animated,n=e.offset;null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(this.props.horizontal?{x:n,animated:t}:{y:n,animated:t}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.recordInteraction=function(){this._nestedChildLists.forEach((function(e){e.ref&&e.ref.recordInteraction()})),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),this._updateViewableItems(this.props.data)},t.flashScrollIndicators=function(){null!=this._scrollRef&&this._scrollRef.flashScrollIndicators()},t.getScrollResponder=function(){if(this._scrollRef&&this._scrollRef.getScrollResponder)return this._scrollRef.getScrollResponder()},t.getScrollableNode=function(){return this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode():Object(w.a)(this._scrollRef)},t.getScrollRef=function(){return this._scrollRef&&this._scrollRef.getScrollRef?this._scrollRef.getScrollRef():this._scrollRef},t.setNativeProps=function(e){this._scrollRef&&this._scrollRef.setNativeProps(e)},t._getCellKey=function(){var e;return(null==(e=this.context)?void 0:e.cellKey)||"rootList"},t._getListKey=function(){return this.props.listKey||this._getCellKey()},t._getDebugInfo=function(){var e;return{listKey:this._getListKey(),cellKey:this._getCellKey(),horizontal:!!this.props.horizontal,parent:null==(e=this.context)?void 0:e.debugInfo}},t.hasMore=function(){return this._hasMore},t.componentDidMount=function(){this._isNestedWithSameOrientation()&&this.context.registerAsNestedChild({cellKey:this._getCellKey(),key:this._getListKey(),ref:this,parentDebugInfo:this.context.debugInfo})},t.componentWillUnmount=function(){this._isNestedWithSameOrientation()&&this.context.unregisterAsNestedChild({key:this._getListKey(),state:{first:this.state.first,last:this.state.last,frames:this._frames}}),this._updateViewableItems(null),this._updateCellsToRenderBatcher.dispose({abort:!0}),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.dispose()})),this._fillRateHelper.deactivateAndFlush()},n.getDerivedStateFromProps=function(e,t){var n=e.data,r=e.getItemCount,i=e.maxToRenderPerBatch;return{first:Math.max(0,Math.min(t.first,r(n)-1-i)),last:Math.max(0,Math.min(t.last,r(n)-1))}},t._pushCells=function(e,t,n,r,i,o){var s,l=this,c=this.props,u=c.CellRendererComponent,h=c.ItemSeparatorComponent,d=c.data,f=c.getItem,p=c.getItemCount,m=c.horizontal,g=c.keyExtractor,v=this.props.ListHeaderComponent?1:0,y=p(d)-1;i=Math.min(y,i);for(var b=function(r){var i=f(d,r),c=g(i,r);l._indicesToKeys.set(r,c),n.has(r+v)&&t.push(e.length),e.push(a.createElement(U,{CellRendererComponent:u,ItemSeparatorComponent:r<y?h:void 0,cellKey:c,fillRateHelper:l._fillRateHelper,horizontal:m,index:r,inversionStyle:o,item:i,key:c,prevCellKey:s,onUpdateSeparators:l._onUpdateSeparators,onLayout:function(e){return l._onCellLayout(e,c,r)},onUnmount:l._onCellUnmount,parentProps:l.props,ref:function(e){l._cellRefs[c]=e}})),s=c},w=r;w<=i;w++)b(w)},t._isVirtualizationDisabled=function(){return this.props.disableVirtualization||!1},t._isNestedWithSameOrientation=function(){var e=this.context;return!(!e||!!e.horizontal!==!!this.props.horizontal)},t.render=function(){var e=this,t=this.props,n=t.ListEmptyComponent,r=t.ListFooterComponent,i=t.ListHeaderComponent,o=this.props,s=o.data,l=o.horizontal,h=this._isVirtualizationDisabled(),d=this.props.inverted?this.props.horizontal?V.horizontallyInverted:V.verticallyInverted:null,f=[],p=new Set(this.props.stickyHeaderIndices),m=[];if(i){p.has(0)&&m.push(0);var g=a.isValidElement(i)?i:a.createElement(i,null);f.push(a.createElement(R,{cellKey:this._getCellKey()+"-header",key:"$header"},a.createElement(u.a,{onLayout:this._onLayoutHeader,style:c.a.compose(d,this.props.ListHeaderComponentStyle)},g)))}var v=this.props.getItemCount(s);if(v>0){F=!1,z="";var y=l?"width":"height",b=this.props.initialScrollIndex?-1:this.props.initialNumToRender-1,w=this.state,x=w.first,_=w.last;this._pushCells(f,m,p,0,b,d);var E=Math.max(b+1,x);if(!h&&x>b+1){var A=!1;if(p.size>0)for(var S=i?1:0,M=E-1;M>b;M--)if(p.has(M+S)){var T,C,k=this._getFrameMetricsApprox(b),P=this._getFrameMetricsApprox(M),L=P.offset-k.offset-(this.props.initialScrollIndex?0:k.length);f.push(a.createElement(u.a,{key:"$sticky_lead",style:(T={},T[y]=L,T)})),this._pushCells(f,m,p,M,M,d);var D=this._getFrameMetricsApprox(x).offset-(P.offset+P.length);f.push(a.createElement(u.a,{key:"$sticky_trail",style:(C={},C[y]=D,C)})),A=!0;break}if(!A){var N,j=this._getFrameMetricsApprox(b),B=this._getFrameMetricsApprox(x).offset-(j.offset+j.length);f.push(a.createElement(u.a,{key:"$lead_spacer",style:(N={},N[y]=B,N)}))}}if(this._pushCells(f,m,p,E,_,d),!this._hasWarned.keys&&F&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",z),this._hasWarned.keys=!0),!h&&_<v-1){var H,U=this._getFrameMetricsApprox(_),G=this.props.getItemLayout?v-1:Math.min(v-1,this._highestMeasuredFrameIndex),W=this._getFrameMetricsApprox(G),q=W.offset+W.length-(U.offset+U.length);f.push(a.createElement(u.a,{key:"$tail_spacer",style:(H={},H[y]=q,H)}))}}else if(n){var X=a.isValidElement(n)?n:a.createElement(n,null);f.push(a.cloneElement(X,{key:"$empty",onLayout:function(t){e._onLayoutEmpty(t),X.props.onLayout&&X.props.onLayout(t)},style:c.a.compose(d,X.props.style)}))}if(r){var Y=a.isValidElement(r)?r:a.createElement(r,null);f.push(a.createElement(R,{cellKey:this._getFooterCellKey(),key:"$footer"},a.createElement(u.a,{onLayout:this._onLayoutFooter,style:c.a.compose(d,this.props.ListFooterComponentStyle)},Y)))}var K=I(I({},this.props),{},{onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout,onScroll:this._onScroll,onScrollBeginDrag:this._onScrollBeginDrag,onScrollEndDrag:this._onScrollEndDrag,onMomentumScrollBegin:this._onMomentumScrollBegin,onMomentumScrollEnd:this._onMomentumScrollEnd,scrollEventThrottle:this.props.scrollEventThrottle,stickyHeaderIndices:m,style:d?[d,this.props.style]:this.props.style});this._hasMore=this.state.last<this.props.getItemCount(this.props.data)-1;var Q=a.createElement(O,{value:{cellKey:null,getScrollMetrics:this._getScrollMetrics,horizontal:this.props.horizontal,getOutermostParentListRef:this._getOutermostParentListRef,getNestedChildState:this._getNestedChildState,registerAsNestedChild:this._registerAsNestedChild,unregisterAsNestedChild:this._unregisterAsNestedChild,debugInfo:this._getDebugInfo()}},a.cloneElement((this.props.renderScrollComponent||this._defaultRenderScrollComponent)(K),{ref:this._captureScrollRef},f));return this.props.debug?a.createElement(u.a,{style:V.debug},Q,this._renderDebugOverlay()):Q},t.componentDidUpdate=function(e){var t=this.props,n=t.data,r=t.extraData;n===e.data&&r===e.extraData||this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.resetViewableIndices()}));var i=this._hiPriInProgress;this._scheduleCellsToRenderUpdate(),i&&(this._hiPriInProgress=!1)},t._computeBlankness=function(){this._fillRateHelper.computeBlankness(this.props,this.state,this._scrollMetrics)},t._onCellLayout=function(e,t,n){var r=e.nativeEvent.layout,i={offset:this._selectOffset(r),length:this._selectLength(r),index:n,inLayout:!0},o=this._frames[t];o&&i.offset===o.offset&&i.length===o.length&&n===o.index?this._frames[t].inLayout=!0:(this._totalCellLength+=i.length-(o?o.length:0),this._totalCellsMeasured+=o?0:1,this._averageCellLength=this._totalCellLength/this._totalCellsMeasured,this._frames[t]=i,this._highestMeasuredFrameIndex=Math.max(this._highestMeasuredFrameIndex,n),this._scheduleCellsToRenderUpdate()),this._triggerRemeasureForChildListsInCell(t),this._computeBlankness(),this._updateViewableItems(this.props.data)},t._triggerRemeasureForChildListsInCell=function(e){var t=this._cellKeysToChildListKeys.get(e);if(t)for(var n,r=k(t);!(n=r()).done;){var i=n.value,o=this._nestedChildLists.get(i);o&&o.ref&&o.ref.measureLayoutRelativeToContainingList()}},t.measureLayoutRelativeToContainingList=function(){var e=this;try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(),(function(t,n,r,i){e._offsetFromParentVirtualizedList=e._selectOffset({x:t,y:n}),e._scrollMetrics.contentLength=e._selectLength({width:r,height:i});var o=e._convertParentScrollMetrics(e.context.getScrollMetrics());e._scrollMetrics.visibleLength=o.visibleLength,e._scrollMetrics.offset=o.offset}),(function(e){console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")}))}catch(t){console.warn("measureLayoutRelativeToContainingList threw an error",t.stack)}},t._getFooterCellKey=function(){return this._getCellKey()+"-footer"},t._renderDebugOverlay=function(){for(var e=this._scrollMetrics.visibleLength/(this._scrollMetrics.contentLength||1),t=[],n=this.props.getItemCount(this.props.data),r=0;r<n;r++){var i=this._getFrameMetricsApprox(r);i.inLayout&&t.push(i)}var o=this._getFrameMetricsApprox(this.state.first).offset,s=this._getFrameMetricsApprox(this.state.last),l=s.offset+s.length-o,c=this._scrollMetrics.offset,h=this._scrollMetrics.visibleLength;return a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlay]},t.map((function(t,n){return a.createElement(u.a,{key:"f"+n,style:[V.debugOverlayBase,V.debugOverlayFrame,{top:t.offset*e,height:t.length*e}]})})),a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlayFrameLast,{top:o*e,height:l*e}]}),a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlayFrameVis,{top:c*e,height:h*e}]}))},t._selectLength=function(e){return this.props.horizontal?e.width:e.height},t._selectOffset=function(e){return this.props.horizontal?e.x:e.y},t._maybeCallOnEndReached=function(){var e=this.props,t=e.data,n=e.getItemCount,r=e.onEndReached,i=e.onEndReachedThreshold,o=this._scrollMetrics,a=o.contentLength,s=o.visibleLength,l=a-s-o.offset,c=i?i*s:2;r&&this.state.last===n(t)-1&&l<c&&this._scrollMetrics.contentLength!==this._sentEndForContentLength?(this._sentEndForContentLength=this._scrollMetrics.contentLength,r({distanceFromEnd:l})):l>c&&(this._sentEndForContentLength=0)},t._scheduleCellsToRenderUpdate=function(){var e=this.state,t=e.first,n=e.last,r=this._scrollMetrics,i=r.offset,o=r.visibleLength,a=r.velocity,s=this.props.getItemCount(this.props.data),l=!1,c=this.props.onEndReachedThreshold*o/2;if(t>0){var u=i-this._getFrameMetricsApprox(t).offset;l=l||u<0||a<-2&&u<c}if(n<s-1){var h=this._getFrameMetricsApprox(n).offset-(i+o);l=l||h<0||a>2&&h<c}if(l&&(this._averageCellLength||this.props.getItemLayout)&&!this._hiPriInProgress)return this._hiPriInProgress=!0,this._updateCellsToRenderBatcher.dispose({abort:!0}),void this._updateCellsToRender();this._updateCellsToRenderBatcher.schedule()},t._updateViewableItems=function(e){var t=this,n=this.props.getItemCount;this._viewabilityTuples.forEach((function(r){r.viewabilityHelper.onUpdate(n(e),t._scrollMetrics.offset,t._scrollMetrics.visibleLength,t._getFrameMetrics,t._createViewToken,r.onViewableItemsChanged,t.state)}))},n}(a.PureComponent);H.contextType=C,H.defaultProps={disableVirtualization:!1,horizontal:!1,initialNumToRender:10,keyExtractor:function(e,t){return null!=e.key?e.key:null!=e.id?e.id:(F=!0,e.type&&e.type.displayName&&(z=e.type.displayName),String(t))},maxToRenderPerBatch:10,onEndReachedThreshold:2,scrollEventThrottle:50,updateCellsBatchingPeriod:50,windowSize:21};var U=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={separatorProps:{highlighted:!1,leadingItem:t.props.item}},t._separators={highlight:function(){var e=t.props,n=e.cellKey,r=e.prevCellKey;t.props.onUpdateSeparators([n,r],{highlighted:!0})},unhighlight:function(){var e=t.props,n=e.cellKey,r=e.prevCellKey;t.props.onUpdateSeparators([n,r],{highlighted:!1})},updateProps:function(e,n){var r=t.props,i=r.cellKey,o=r.prevCellKey;t.props.onUpdateSeparators(["leading"===e?o:i],n)}},t}j(t,e),t.getDerivedStateFromProps=function(e,t){return{separatorProps:I(I({},t.separatorProps),{},{leadingItem:e.item})}};var n=t.prototype;return n.updateSeparatorProps=function(e){this.setState((function(t){return{separatorProps:I(I({},t.separatorProps),e)}}))},n.componentWillUnmount=function(){this.props.onUnmount(this.props.cellKey)},n._renderElement=function(e,t,n,r){return e&&t&&console.warn("VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take precedence over renderItem."),t?a.createElement(t,{item:n,index:r,separators:this._separators}):e?e({item:n,index:r,separators:this._separators}):void d()(!1,"VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.")},n.render=function(){var e=this.props,t=e.CellRendererComponent,n=e.ItemSeparatorComponent,r=e.fillRateHelper,i=e.horizontal,o=e.item,s=e.index,l=e.inversionStyle,c=e.parentProps,h=c.renderItem,d=c.getItemLayout,f=c.ListItemComponent,p=this._renderElement(h,f,o,s),m=!d||c.debug||r.enabled()?this.props.onLayout:void 0,g=n&&a.createElement(n,this.state.separatorProps),v=l?i?[V.rowReverse,l]:[V.columnReverse,l]:i?[V.row,l]:l,y=t?a.createElement(t,L({},this.props,{style:v,onLayout:m}),p,g):a.createElement(u.a,{style:v,onLayout:m},p,g);return a.createElement(R,{cellKey:this.props.cellKey},y)},t}(a.Component);var V=c.a.create({verticallyInverted:{transform:[{scaleY:-1}]},horizontallyInverted:{transform:[{scaleX:-1}]},row:{flexDirection:"row"},rowReverse:{flexDirection:"row-reverse"},columnReverse:{flexDirection:"column-reverse"},debug:{flex:1},debugOverlayBase:{position:"absolute",top:0,right:0},debugOverlay:{bottom:0,width:20,borderColor:"blue",borderWidth:1},debugOverlayFrame:{left:0,backgroundColor:"orange"},debugOverlayFrameLast:{left:0,borderColor:"green",borderWidth:2},debugOverlayFrameVis:{left:0,borderColor:"red",borderWidth:2}});t.a=H},function(e,t,n){"use strict";var r=function(){};function i(){return null}i.setBackgroundColor=r,i.setBarStyle=r,i.setHidden=r,i.setNetworkActivityIndicatorVisible=r,i.setTranslucent=r,t.a=i},function(e,t,n){"use strict";var r=n(26),i=n(33),o=n(4),a=n.n(o);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=1,c=function(e){var t,n;function i(t){var n;n=e.call(this)||this;var i=t||{x:0,y:0};return"number"===typeof i.x&&"number"===typeof i.y?(n.x=new r.a(i.x),n.y=new r.a(i.y)):(a()(i.x instanceof r.a&&i.y instanceof r.a,"AnimatedValueXY must be initialized with an object of numbers or AnimatedValues."),n.x=i.x,n.y=i.y),n._listeners={},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var o=i.prototype;return o.setValue=function(e){this.x.setValue(e.x),this.y.setValue(e.y)},o.setOffset=function(e){this.x.setOffset(e.x),this.y.setOffset(e.y)},o.flattenOffset=function(){this.x.flattenOffset(),this.y.flattenOffset()},o.extractOffset=function(){this.x.extractOffset(),this.y.extractOffset()},o.__getValue=function(){return{x:this.x.__getValue(),y:this.y.__getValue()}},o.resetAnimation=function(e){this.x.resetAnimation(),this.y.resetAnimation(),e&&e(this.__getValue())},o.stopAnimation=function(e){this.x.stopAnimation(),this.y.stopAnimation(),e&&e(this.__getValue())},o.addListener=function(e){var t=this,n=String(l++),r=function(n){n.value;e(t.__getValue())};return this._listeners[n]={x:this.x.addListener(r),y:this.y.addListener(r)},n},o.removeListener=function(e){this.x.removeListener(this._listeners[e].x),this.y.removeListener(this._listeners[e].y),delete this._listeners[e]},o.removeAllListeners=function(){this.x.removeAllListeners(),this.y.removeAllListeners(),this._listeners={}},o.getLayout=function(){return{left:this.x,top:this.y}},o.getTranslateTransform=function(){return[{translateX:this.x},{translateY:this.y}]},i}(i.a);t.a=c},function(e,t,n){"use strict";function r(){}var i={exitApp:r,addEventListener:function(){return{remove:r}},removeEventListener:r};t.a=i},function(e,t,n){"use strict";var r=n(0),i=Object(r.createContext)(!1);t.a=i},function(e,t,n){"use strict";var r=n(105);n(4);t.a=function e(t){if(t){if(!Array.isArray(t))return function(e){return"number"===typeof e?r.a.getByID(e):e}(t);for(var n={},i=0,o=t.length;i<o;++i){var a=e(t[i]);if(a)for(var s in a){var l=a[s];n[s]=l}}return n}}},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(463),i=n(249);const o=4294967296;function a(e){return e.x}function s(e){return e.y}function l(e){return e.z}var c=Math.PI*(3-Math.sqrt(5)),u=20*Math.PI/(9+Math.sqrt(221));t.a=function(e,t){t=t||2;var n,a=Math.min(3,Math.max(1,Math.round(t))),s=1,l=.001,h=1-Math.pow(l,1/300),d=0,f=.6,p=new Map,m=Object(i.c)(y),g=Object(r.a)("tick","end"),v=function(){let e=1;return()=>(e=(1664525*e+1013904223)%o)/o}();function y(){b(),g.call("tick",n),s<l&&(m.stop(),g.call("end",n))}function b(t){var r,i,o=e.length;void 0===t&&(t=1);for(var l=0;l<t;++l)for(s+=(d-s)*h,p.forEach((function(e){e(s)})),r=0;r<o;++r)null==(i=e[r]).fx?i.x+=i.vx*=f:(i.x=i.fx,i.vx=0),a>1&&(null==i.fy?i.y+=i.vy*=f:(i.y=i.fy,i.vy=0)),a>2&&(null==i.fz?i.z+=i.vz*=f:(i.z=i.fz,i.vz=0));return n}function w(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),null!=t.fz&&(t.z=t.fz),isNaN(t.x)||a>1&&isNaN(t.y)||a>2&&isNaN(t.z)){var i=10*(a>2?Math.cbrt(.5+n):a>1?Math.sqrt(.5+n):n),o=n*c,s=n*u;1===a?t.x=i:2===a?(t.x=i*Math.cos(o),t.y=i*Math.sin(o)):(t.x=i*Math.sin(o)*Math.cos(s),t.y=i*Math.cos(o),t.z=i*Math.sin(o)*Math.sin(s))}(isNaN(t.vx)||a>1&&isNaN(t.vy)||a>2&&isNaN(t.vz))&&(t.vx=0,a>1&&(t.vy=0),a>2&&(t.vz=0))}}function x(t){return t.initialize&&t.initialize(e,v,a),t}return null==e&&(e=[]),w(),n={tick:b,restart:function(){return m.restart(y),n},stop:function(){return m.stop(),n},numDimensions:function(e){return arguments.length?(a=Math.min(3,Math.max(1,Math.round(e))),p.forEach(x),n):a},nodes:function(t){return arguments.length?(e=t,w(),p.forEach(x),n):e},alpha:function(e){return arguments.length?(s=+e,n):s},alphaMin:function(e){return arguments.length?(l=+e,n):l},alphaDecay:function(e){return arguments.length?(h=+e,n):+h},alphaTarget:function(e){return arguments.length?(d=+e,n):d},velocityDecay:function(e){return arguments.length?(f=1-e,n):1-f},randomSource:function(e){return arguments.length?(v=e,p.forEach(x),n):v},force:function(e,t){return arguments.length>1?(null==t?p.delete(e):p.set(e,x(t)),n):p.get(e)},find:function(){var t,n,r,i,o,s,l=Array.prototype.slice.call(arguments),c=l.shift()||0,u=(a>1?l.shift():null)||0,h=(a>2?l.shift():null)||0,d=l.shift()||1/0,f=0,p=e.length;for(d*=d,f=0;f<p;++f)(i=(t=c-(o=e[f]).x)*t+(n=u-(o.y||0))*n+(r=h-(o.z||0))*r)<d&&(s=o,d=i);return s},on:function(e,t){return arguments.length>1?(g.on(e,t),n):g.on(e)}}}},function(e,t,n){const r=n(185);e.exports=function(e){return function(t,n){let i=n&&n.indent||0,o=n&&void 0!==n.join?n.join:"\n",a=Array(i+1).join(" "),s=[];for(let l=0;l<e;++l){let e=r(l),n=0===l?"":a;s.push(n+t.replace(/{var}/g,e))}return s.join(o)}}},function(e,t){e.exports=function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,i){return t.apply(this,arguments)};case 5:return function(e,n,r,i,o){return t.apply(this,arguments)};case 6:return function(e,n,r,i,o,a){return t.apply(this,arguments)};case 7:return function(e,n,r,i,o,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,i,o,a,s,l){return t.apply(this,arguments)};case 9:return function(e,n,r,i,o,a,s,l,c){return t.apply(this,arguments)};case 10:return function(e,n,r,i,o,a,s,l,c,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(21),i=n.n(r);var o=function e(){i()(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"",void 0)}},function(e,t,n){"use strict";t.a={dark:!1,colors:{primary:"rgb(0, 122, 255)",background:"rgb(242, 242, 242)",card:"rgb(255, 255, 255)",text:"rgb(28, 28, 30)",border:"rgb(216, 216, 216)",notification:"rgb(255, 59, 48)"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n(68),o=n(29),a=(r.canUseDOM,null);function s(e,t){var n=(r.canUseDOM&&"undefined"!==typeof window.ResizeObserver&&null==a&&(a=new window.ResizeObserver((function(e){e.forEach((function(e){var t=e.target,n=t.__reactLayoutHandler;"function"===typeof n&&o.a.measure(t,(function(t,r,i,o,a,s){var l={nativeEvent:{layout:{x:t,y:r,width:i,height:o,left:a,top:s}},timeStamp:Date.now()};Object.defineProperty(l.nativeEvent,"target",{enumerable:!0,get:function(){return e.target}}),n(l)}))}))}))),a);Object(i.a)((function(){var n=e.current;null!=n&&(n.__reactLayoutHandler=t)}),[e,t]),Object(i.a)((function(){var t=e.current;return null!=t&&null!=n&&("function"===typeof t.__reactLayoutHandler?n.observe(t):n.unobserve(t)),function(){null!=t&&null!=n&&n.unobserve(t)}}),[e,n])}},function(e,t){function n(e){var t;return"number"===typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=l.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:f.hasOwnProperty(e)?f[e]:(t=l.rgb.exec(e))?(c(t[1])<<24|c(t[2])<<16|c(t[3])<<8|255)>>>0:(t=l.rgba.exec(e))?(c(t[1])<<24|c(t[2])<<16|c(t[3])<<8|h(t[4]))>>>0:(t=l.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=l.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=l.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=l.hsl.exec(e))?(255|i(u(t[1]),d(t[2]),d(t[3])))>>>0:(t=l.hsla.exec(e))?(i(u(t[1]),d(t[2]),d(t[3]))|h(t[4]))>>>0:null}function r(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function i(e,t,n){var i=n<.5?n*(1+t):n+t-n*t,o=2*n-i,a=r(o,i,e+1/3),s=r(o,i,e),l=r(o,i,e-1/3);return Math.round(255*a)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}var o="[-+]?\\d*\\.?\\d+";function a(e){return Array.prototype.slice.call(e,0)}function s(){return"\\(\\s*("+a(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var l={rgb:new RegExp("rgb"+s(o,o,o)),rgba:new RegExp("rgba"+s(o,o,o,o)),hsl:new RegExp("hsl"+s(o,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+s(o,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",o)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function c(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function u(e){return(parseFloat(e)%360+360)%360/360}function h(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function d(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var f={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};n.rgba=function(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}},e.exports=n},function(t,n,r){"use strict";var i=r(15),o=1,a=function(){function t(){}var n=t.prototype;return n.start=function(e,t,n,r,i){},n.stop=function(){this.__nativeId&&i.a.API.stopAnimation(this.__nativeId)},n.__getNativeAnimationConfig=function(){throw new Error("This animation type cannot be offloaded to native")},n.__debouncedOnEnd=function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)},n.__startNativeAnimation=function(t){var n=o+":startAnimation";o+=1,i.a.API.setWaitingForIdentifier(n);try{t.__makeNative(),this.__nativeId=i.a.generateNewAnimationId(),i.a.API.startAnimatingNode(this.__nativeId,t.__getNativeTag(),this.__getNativeAnimationConfig(),this.__debouncedOnEnd.bind(this))}catch(e){throw e}finally{i.a.API.unsetWaitingForIdentifier(n)}},t}();n.a=a},function(e,t,n){"use strict";var r=n(66);t.a=r.a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(0),i=r.createContext(void 0);function o(e){var t=e.children,n=r.useRef(),o=r.useMemo((function(){return{register:function(e){var t=n.current;if(void 0!==t&&e!==t)throw new Error('Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.');n.current=e},unregister:function(e){e===n.current&&(n.current=void 0)}}}),[]);return r.createElement(i.Provider,{value:o},t)}},function(t,n,r){"use strict";var i=r(13);var o=r(51),a=r(130);var s={height:0,width:0};var l=function(e){var t=e.shadowColor,n=e.shadowOffset,r=e.shadowOpacity,i=e.shadowRadius,l=e.textShadowColor,c=e.textShadowOffset,u=e.textShadowRadius,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["shadowColor","shadowOffset","shadowOpacity","shadowRadius","textShadowColor","textShadowOffset","textShadowRadius"]);return null==t&&null==n&&null==r&&null==i||function(e,t){var n=t.boxShadow,r=Object(a.a)(t);null!=r&&(e.boxShadow=n?n+", "+r:r)}(h,e),null==l&&null==c&&null==u||function(e,t){var n=t.textShadowColor,r=t.textShadowOffset,i=t.textShadowRadius,a=r||s,l=a.height,c=a.width,u=i||0,h=Object(o.a)(c),d=Object(o.a)(l),f=Object(o.a)(u),p=Object(o.a)(n,"textShadowColor");!p||0===l&&0===c&&0===u||null==h||null==d||null==f||(e.textShadow=h+" "+d+" "+f+" "+p)}(h,e),h},c=Array.prototype.slice;function u(t){var n,r={},i={};null!=t&&c.call(t.cssRules).forEach((function(e,t){var o=e.cssText;if(o.indexOf("stylesheet-group")>-1)n=function(e){return Number(e.selectorText.split(/["']/)[1])}(e),r[n]={start:t,rules:[o]};else{var a=f(o);null!=a&&(i[a]=!0,r[n].rules.push(o))}}));function o(t,n,i){var o=h(r),a=o.indexOf(n)+1,s=o[a],l=null!=s&&null!=r[s].start?r[s].start:t.cssRules.length,c=function(t,n,r){try{return t.insertRule(n,r),!0}catch(e){return!1}}(t,i,l);if(c){null==r[n].start&&(r[n].start=l);for(var u=a;u<o.length;u+=1){var d=o[u],f=r[d].start||0;r[d].start=f+1}}return c}return{getTextContent:function(){return h(r).map((function(e){return r[e].rules.join("\n")})).join("\n")},insert:function(e,n){var a=Number(n);if(null==r[a]){var s=function(e){return'[stylesheet-group="'+e+'"]{}'}(a);r[a]={start:null,rules:[s]},null!=t&&o(t,a,s)}var l=f(e);null!=l&&null==i[l]&&(i[l]=!0,r[a].rules.push(e),null!=t&&(o(t,a,e)||r[a].rules.pop()))}}}function h(e){return Object.keys(e).map(Number).sort((function(e,t){return e>t?1:-1}))}var d=/\s*([,])\s*/g;function f(e){var t=e.split("{")[0].trim();return""!==t?t.replace(d,"$1"):null}var p=function(e){return function e(t,n){for(var r=0;r<t.length;r++){var i=t[r];Array.isArray(i)?e(i,n):null!=i&&!1!==i&&n.push(i)}return n}(e,[])},m=r(82),g=r(36),v=r(99),y={},b={borderTopLeftRadius:"borderTopRightRadius",borderTopRightRadius:"borderTopLeftRadius",borderBottomLeftRadius:"borderBottomRightRadius",borderBottomRightRadius:"borderBottomLeftRadius",borderLeftColor:"borderRightColor",borderLeftStyle:"borderRightStyle",borderLeftWidth:"borderRightWidth",borderRightColor:"borderLeftColor",borderRightStyle:"borderLeftStyle",borderRightWidth:"borderLeftWidth",left:"right",marginLeft:"marginRight",marginRight:"marginLeft",paddingLeft:"paddingRight",paddingRight:"paddingLeft",right:"left"},w={borderTopStartRadius:"borderTopLeftRadius",borderTopEndRadius:"borderTopRightRadius",borderBottomStartRadius:"borderBottomLeftRadius",borderBottomEndRadius:"borderBottomRightRadius",borderStartColor:"borderLeftColor",borderStartStyle:"borderLeftStyle",borderStartWidth:"borderLeftWidth",borderEndColor:"borderRightColor",borderEndStyle:"borderRightStyle",borderEndWidth:"borderRightWidth",end:"right",marginStart:"marginLeft",marginEnd:"marginRight",paddingStart:"paddingLeft",paddingEnd:"paddingRight",start:"left"},x={clear:!0,float:!0,textAlign:!0},_=function(e){return Object(v.a)(e,-1)},E=function(e){var t=g.a.getConstants(),n=t.doLeftAndRightSwapInRTL,r=t.isRTL,i=e||y,o={},a={};for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var l=i[s],c=s,u=l;if(w.hasOwnProperty(s)){var h=w[s];c=r?b[h]:h}else r&&n&&b[s]&&(c=b[s]);if(x.hasOwnProperty(s)&&("start"===l?u=r?"right":"left":"end"===l?u=r?"left":"right":r&&n&&("left"===l?u="right":"right"===l&&(u="left"))),"transitionProperty"===c)if(w.hasOwnProperty(u)){var d=w[l];u=r?b[d]:d}else if(r&&n){var f=b[l];null!=f&&(u=f)}if(r&&"textShadowOffset"===c){var p=_(u.width);u.width=p,a[c]=u}else o[c]||(a[c]=u);w[s]&&(o[c]=!0)}return a},A=r(42),S={},M=!i.canUseDOM||null!=window.CSS&&null!=window.CSS.supports&&(window.CSS.supports("text-decoration-line","none")||window.CSS.supports("-webkit-text-decoration-line","none")),T=function(e){var t=Object.keys(e)[0],n=e[t];return"matrix"===t||"matrix3d"===t?t+"("+n.join(",")+")":t+"("+Object(o.a)(n,t)+")"},C=function(e){if(!e)return S;var t={};return Object.keys(e).sort().forEach((function(n){var r=Object(o.a)(e[n],n);if(null!=r)switch(n){case"elevation":case"overlayColor":case"resizeMode":case"tintColor":break;case"aspectRatio":t[n]=r.toString();break;case"backgroundClip":"text"===r&&(t.backgroundClip=r,t.WebkitBackgroundClip=r);break;case"flex":-1===r?(t.flexGrow=0,t.flexShrink=1,t.flexBasis="auto"):t.flex=r;break;case"font":t[n]=r.replace("System",A.e);break;case"fontFamily":if(r.indexOf("System")>-1){var i=r.split(/,\s*/);i[i.indexOf("System")]=A.e,t[n]=i.join(",")}else t[n]="monospace"===r?A.a:r;break;case"fontVariant":Array.isArray(r)&&r.length>0&&(t.fontVariant=r.join(" "));break;case"textAlignVertical":t.verticalAlign="center"===r?"middle":r;break;case"textDecorationLine":M?t.textDecorationLine=r:t.textDecoration=r;break;case"transform":case"transformMatrix":!function(e,t){var n=t.transform;Array.isArray(t.transform)&&(n=t.transform.map(T).join(" ")),e.transform=n}(t,e);break;case"writingDirection":t.direction=r;break;default:var a=A.d[n];a?a.forEach((function(n,i){"undefined"===typeof e[n]&&(t[n]=r)})):t[n]=Array.isArray(r)?r.join(","):r}})),t};var O=function(e){return function(e,t){for(var n,r=e.length,i=t^r,o=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}(e,1).toString(36)},R=r(161),k=r(226),P=r.n(k),L=r(227),D=r.n(L),I=r(228),N=r.n(I),j=r(229),B=r.n(j),F=r(230),z=r.n(F),H=r(231),U=r.n(H),V=r(232),G=r.n(V),W=r(233),q=r.n(W),X=r(234),Y=r.n(X),K=r(235),Q=r.n(K),Z=r(236),J=r.n(Z),$=r(237),ee=r.n($),te=r(238),ne=r.n(te),re=r(239),ie=r.n(re),oe=r(240),ae=r.n(oe),se=["Webkit"],le=["Moz"],ce=["ms"],ue=["Webkit","Moz"],he=["Webkit","ms"],de=["Webkit","Moz","ms"],fe={plugins:[D.a,N.a,B.a,z.a,U.a,G.a,q.a,Y.a,Q.a,J.a,ee.a,ne.a,ie.a,ae.a],prefixMap:{animation:se,animationDelay:se,animationDirection:se,animationFillMode:se,animationDuration:se,animationIterationCount:se,animationName:se,animationPlayState:se,animationTimingFunction:se,appearance:ue,userSelect:de,textEmphasisPosition:se,textEmphasis:se,textEmphasisStyle:se,textEmphasisColor:se,boxDecorationBreak:se,clipPath:se,maskImage:se,maskMode:se,maskRepeat:se,maskPosition:se,maskClip:se,maskOrigin:se,maskSize:se,maskComposite:se,mask:se,maskBorderSource:se,maskBorderMode:se,maskBorderSlice:se,maskBorderWidth:se,maskBorderOutset:se,maskBorderRepeat:se,maskBorder:se,maskType:se,textDecorationStyle:se,textDecorationSkip:se,textDecorationLine:se,textDecorationColor:se,filter:se,fontFeatureSettings:se,breakAfter:de,breakBefore:de,breakInside:de,columnCount:ue,columnFill:ue,columnGap:ue,columnRule:ue,columnRuleColor:ue,columnRuleStyle:ue,columnRuleWidth:ue,columns:ue,columnSpan:ue,columnWidth:ue,writingMode:he,flex:he,flexBasis:se,flexDirection:he,flexGrow:se,flexFlow:he,flexShrink:se,flexWrap:he,alignContent:se,alignItems:se,alignSelf:se,justifyContent:se,order:se,transform:se,transformOrigin:se,transformOriginX:se,transformOriginY:se,backfaceVisibility:se,perspective:se,perspectiveOrigin:se,transformStyle:se,transformOriginZ:se,backdropFilter:se,fontKerning:se,scrollSnapType:he,scrollSnapPointsX:he,scrollSnapPointsY:he,scrollSnapDestination:he,scrollSnapCoordinate:he,shapeImageThreshold:se,shapeImageMargin:se,shapeImageOutside:se,hyphens:de,flowInto:he,flowFrom:he,regionFragment:he,textOrientation:se,textAlignLast:le,tabSize:le,wrapFlow:ce,wrapThrough:ce,wrapMargin:ce,touchAction:ce,textSizeAdjust:["ms","Webkit"],borderImage:se,borderImageOutset:se,borderImageRepeat:se,borderImageSlice:se,borderImageSource:se,borderImageWidth:se,transitionDelay:se,transitionDuration:se,transitionProperty:se,transitionTimingFunction:se}},pe=P()(fe),me=pe;function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be={get:function(e,t){if(null!=be[e]&&be[e].hasOwnProperty(t)&&null!=be[e][t])return be[e][t]},set:function(e,t,n){return null==be[e]&&(be[e]={}),be[e][t]=n}};function we(e){return Object.keys(e).sort().reduce((function(t,n){var r=e[n];if(null!=r){var i=Ee(r,n),o=be.get(n,i);if(null!=o){t[o.identifier]=o}else{var a=Se("r",n,r),s=function(e,t,n){var r=[],i="."+e;switch(t){case"animationKeyframes":var o=Me(n),a=o.animationNames,s=o.rules,l=Ae({animationName:a.join(",")});r.push.apply(r,[""+i+l].concat(s));break;case"placeholderTextColor":var c=Ae({color:n,opacity:1});r.push(i+"::-webkit-input-placeholder"+c,i+"::-moz-placeholder"+c,i+":-ms-input-placeholder"+c,i+"::placeholder"+c);break;case"pointerEvents":var u=n;if("auto"===n||"box-only"===n){if(u="auto!important","box-only"===n){var h=Ae({pointerEvents:"none"});r.push(i+">*"+h)}}else if(("none"===n||"box-none"===n)&&(u="none!important","box-none"===n)){var d=Ae({pointerEvents:"auto"});r.push(i+">*"+d)}var f=Ae({pointerEvents:u});r.push(""+i+f);break;case"scrollbarWidth":"none"===n&&r.push(i+"::-webkit-scrollbar{display:none}");var p=Ae({scrollbarWidth:n});r.push(""+i+p);break;default:var m,g=Ae(((m={})[t]=n,m));r.push(""+i+g)}return r}(a,n,r),l=be.set(n,i,{property:n,value:Ee(r,n),identifier:a,rules:s});t[a]=l}}return t}),{})}function xe(e,t){var n,r,i=Se("css",t,e),o=e.animationKeyframes,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["animationKeyframes"]),s=[],l="."+i;if(null!=o){var c=Me(o),u=c.animationNames,h=c.rules;r=u.join(","),s.push.apply(s,h)}var d=Ae(ve(ve({},a),{},{animationName:r}));return s.push(""+l+d),(n={})[i]={identifier:i,rules:s},n}function _e(e){return function(e){var t=pe(e);return Object.keys(t).forEach((function(e){var n=t[e];Array.isArray(n)&&(t[e]=n[n.length-1])})),t}(C(e))}function Ee(e,t){var n=Object(o.a)(e,t);return"string"!==typeof n?JSON.stringify(n||""):n}function Ae(e){var t=me(C(e));return"{"+Object.keys(t).map((function(e){var n=t[e],r=Object(R.default)(e);return Array.isArray(n)?n.map((function(e){return r+":"+e})).join(";"):r+":"+n})).sort().join(";")+";}"}function Se(e,t,n){return e+"-"+O(t+Ee(n,t))}function Me(e){if("number"===typeof e)throw new Error("Invalid CSS keyframes type: "+typeof e);var t=[],n=[];return(Array.isArray(e)?e:[e]).forEach((function(e){if("string"===typeof e)t.push(e);else{var r=function(e){var t=Se("r","animation",e),n="{"+Object.keys(e).map((function(t){return""+t+Ae(e[t])})).join("")+"}",r=["-webkit-",""].map((function(e){return"@"+e+"keyframes "+t+n}));return{identifier:t,rules:r}}(e),i=r.identifier,o=r.rules;t.push(i),n.push.apply(n,o)}})),{animationNames:t,rules:n}}var Te=["html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}","body{margin:0;}","button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}","input::-webkit-inner-spin-button,input::-webkit-outer-spin-button,input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"],Ce=function(e){if(e(":focus:not([data-focusvisible-polyfill]){outline: none;}"),i.canUseDOM){var t=!0,n=!1,r=null,o={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};document.addEventListener("keydown",(function(e){"Tab"!==e.key&&(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)||(a(document.activeElement)&&s(document.activeElement),t=!0)}),!0),document.addEventListener("mousedown",c,!0),document.addEventListener("pointerdown",c,!0),document.addEventListener("touchstart",c,!0),document.addEventListener("focus",(function(e){a(e.target)&&(t||function(e){var t=e.type,n=e.tagName,r=e.readOnly;return!("INPUT"!==n||!o[t]||r)||("TEXTAREA"===n&&!r||!!e.isContentEditable)}(e.target))&&s(e.target)}),!0),document.addEventListener("blur",(function(e){a(e.target)&&e.target.hasAttribute("data-focusvisible-polyfill")&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1,window.clearTimeout(r)}),100),l(e.target))}),!0),document.addEventListener("visibilitychange",(function(e){"hidden"===document.visibilityState&&(n&&(t=!0),u())}),!0),u()}function a(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.hasAttribute("data-focusvisible-polyfill")||e.setAttribute("data-focusvisible-polyfill",!0)}function l(e){e.removeAttribute("data-focusvisible-polyfill")}function c(e){!0===t&&function(){for(var e=document.querySelectorAll("[data-focusvisible-polyfill]"),t=0;t<e.length;t+=1)l(e[t])}(),t=!1}function u(){document.addEventListener("mousemove",h),document.addEventListener("mousedown",h),document.addEventListener("mouseup",h),document.addEventListener("pointermove",h),document.addEventListener("pointerdown",h),document.addEventListener("pointerup",h),document.addEventListener("touchmove",h),document.addEventListener("touchstart",h),document.addEventListener("touchend",h)}function h(e){"HTML"!==e.target.nodeName&&(t=!1,document.removeEventListener("mousemove",h),document.removeEventListener("mousedown",h),document.removeEventListener("mouseup",h),document.removeEventListener("pointermove",h),document.removeEventListener("pointerdown",h),document.removeEventListener("pointerup",h),document.removeEventListener("touchmove",h),document.removeEventListener("touchstart",h),document.removeEventListener("touchend",h))}};var Oe=function(e){return"rn-"+e},Re=function(e){return e.join(" ").trim()},ke=function(){var e,t,n,r={css:{},ltr:{},rtl:{},rtlNoSwap:{}},o=function(){e={css:{},ltr:{},rtl:{},rtlNoSwap:{}},t=u(function(e){if(i.canUseDOM){var t=document.getElementById(e);if(null!=t)return t.sheet;var n=document.createElement("style");n.setAttribute("id",e);var r=document.head;return r&&r.insertBefore(n,r.firstChild),n.sheet}return null}(A.b)),n={},Ce((function(e){return t.insert(e,A.c.modality)})),Te.forEach((function(e){t.insert(e,A.c.reset)}))};function a(r){var i=g.a.getConstants(),o=i.doLeftAndRightSwapInRTL,a=i.isRTL?o?"rtl":"rtlNoSwap":"ltr";if(!e[a][r]){var s=we(l(E(Object(m.a)(r))));Object.keys(s).forEach((function(e){var r=s[e],i=r.identifier,o=r.property,a=r.rules,l=r.value;!function(e,t,r){n[t]||(n[t]={}),n[t][r]=e}(i,o,l),a.forEach((function(e){var n=A.c.custom[o]||A.c.atomic;t.insert(e,n)}))})),e[a][r]=!0}}function s(e,i){var o=g.a.getConstants(),a=o.doLeftAndRightSwapInRTL,s=o.isRTL?a?"rtl":"rtlNoSwap":"ltr";if(null!=i&&null!=r[s][i])return r[s][i];var c=Object(m.a)(e),u=l(E(c)),h=Object.keys(u).sort().reduce((function(e,r){var i=u[r];if(null!=i){var o=function(e,t){var r=Ee(t,e);return n[e]&&n[e].hasOwnProperty(r)&&n[e][r]}(r,i);if(o)e.classList.push(o);else if("animationKeyframes"===r||"placeholderTextColor"===r||"pointerEvents"===r||"scrollbarWidth"===r){var a,s=we(((a={})[r]=i,a));Object.keys(s).forEach((function(n){var r=s[n],i=r.identifier,o=r.rules;e.classList.push(i),o.forEach((function(e){t.insert(e,A.c.atomic)}))}))}else e.style||(e.style={}),e.style[r]=i}return e}),{classList:[]});return h.style&&(h.style=_e(h.style)),null!=i&&(r[s][i]=h),h}return o(),{getStyleSheet:function(){var e=t.getTextContent();return i.canUseDOM||o(),{id:A.b,textContent:e}},createCSS:function(e,t){var n={};return Object.keys(e).forEach((function(i){var o=xe(e[i],i);Object.keys(o).forEach((function(e){var a=o[e],s=a.identifier,l=a.rules;r.css[s]={group:t||A.c.classic,rules:l},n[i]=s}))})),n},resolve:function(n,i){var o=[],l={};if(!n&&!i)return l;if(Array.isArray(i)&&p(i).forEach((function(n){if(n){if(null==e.css[n]&&null!=r.css[n]){var i=r.css[n];i.rules.forEach((function(e){t.insert(e,i.group)})),e.css[n]=!0}o.push(n)}})),"number"===typeof n)a(n),l=s(n,Oe(n));else if(Array.isArray(n)){for(var c=p(n),u=!0,h="",d=0;d<c.length;d++){var f=c[d];"number"!==typeof f?u=!1:(u&&(h+=f+"-"),a(f))}l=s(c,u?Oe(h):null)}else l=s(n);o.push.apply(o,l.classList);var m={className:Re(o),classList:o};return l.style&&(m.style=l.style),m},get sheet(){return t}}}();n.a=ke},function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r=n(0),i=n(13),o=n(98);function a(e){return"touchstart"===e||"mousedown"===e}function s(e){return"touchmove"===e||"mousemove"===e}function l(e){return"touchend"===e||"mouseup"===e||c(e)}function c(e){return"touchcancel"===e||"dragstart"===e}var u=[],h={touchBank:u,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function d(e){return e.timeStamp||e.timestamp}function f(e){var t=e.identifier;return null==t&&console.error("Touch object is missing identifier."),t}function p(e){var t=f(e),n=u[t];n?function(e,t){e.touchActive=!0,e.startPageX=t.pageX,e.startPageY=t.pageY,e.startTimeStamp=d(t),e.currentPageX=t.pageX,e.currentPageY=t.pageY,e.currentTimeStamp=d(t),e.previousPageX=t.pageX,e.previousPageY=t.pageY,e.previousTimeStamp=d(t)}(n,e):u[t]=function(e){return{touchActive:!0,startPageX:e.pageX,startPageY:e.pageY,startTimeStamp:d(e),currentPageX:e.pageX,currentPageY:e.pageY,currentTimeStamp:d(e),previousPageX:e.pageX,previousPageY:e.pageY,previousTimeStamp:d(e)}}(e),h.mostRecentTimeStamp=d(e)}function m(e){var t=u[f(e)];t?(t.touchActive=!0,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=d(e),h.mostRecentTimeStamp=d(e)):console.warn("Cannot record touch move without a touch start.\n","Touch Move: "+v(e)+"\n","Touch Bank: "+y())}function g(e){var t=u[f(e)];t?(t.touchActive=!1,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=d(e),h.mostRecentTimeStamp=d(e)):console.warn("Cannot record touch end without a touch start.\n","Touch End: "+v(e)+"\n","Touch Bank: "+y())}function v(e){return JSON.stringify({identifier:e.identifier,pageX:e.pageX,pageY:e.pageY,timestamp:d(e)})}function y(){var e=JSON.stringify(u.slice(0,20));return u.length>20&&(e+=" (original size: "+u.length+")"),e}var b={recordTouchTrack:function(e,t){if(s(e))t.changedTouches.forEach(m);else if(a(e))t.changedTouches.forEach(p),h.numberActiveTouches=t.touches.length,1===h.numberActiveTouches&&(h.indexOfSingleActiveTouch=t.touches[0].identifier);else if(l(e)){if(t.changedTouches.forEach(g),h.numberActiveTouches=t.touches.length,1===h.numberActiveTouches)for(var n=0;n<u.length;n++){var r=u[n];if(null!=r&&r.touchActive){h.indexOfSingleActiveTouch=n;break}}}},touchHistory:h},w=function(){},x={},_=[];function E(e){return e>20?e%20:e}function A(e){var t,n,r,i=!1,a=e.changedTouches,s=e.type,l=!0===e.metaKey,c=!0===e.shiftKey,u=a&&a[0].force||0,h=E(a&&a[0].identifier||0),d=a&&a[0].clientX||e.clientX,f=a&&a[0].clientY||e.clientY,p=a&&a[0].pageX||e.pageX,m=a&&a[0].pageY||e.pageY,g="function"===typeof e.preventDefault?e.preventDefault.bind(e):w,v=e.timeStamp;function y(e){return Array.prototype.slice.call(e).map((function(e){return{force:e.force,identifier:E(e.identifier),get locationX(){return M(e.clientX)},get locationY(){return T(e.clientY)},pageX:e.pageX,pageY:e.pageY,target:e.target,timestamp:v}}))}if(null!=a)n=y(a),r=y(e.touches);else{var A=[{force:u,identifier:h,get locationX(){return M(d)},get locationY(){return T(f)},pageX:p,pageY:m,target:e.target,timestamp:v}];n=A,r="mouseup"===s||"dragstart"===s?_:A}var S={bubbles:!0,cancelable:!0,currentTarget:null,defaultPrevented:e.defaultPrevented,dispatchConfig:x,eventPhase:e.eventPhase,isDefaultPrevented:function(){return e.defaultPrevented},isPropagationStopped:function(){return i},isTrusted:e.isTrusted,nativeEvent:{altKey:!1,ctrlKey:!1,metaKey:l,shiftKey:c,changedTouches:n,force:u,identifier:h,get locationX(){return M(d)},get locationY(){return T(f)},pageX:p,pageY:m,target:e.target,timestamp:v,touches:r,type:s},persist:w,preventDefault:g,stopPropagation:function(){i=!0},target:e.target,timeStamp:v,touchHistory:b.touchHistory};function M(e){if(t=t||Object(o.a)(S.currentTarget))return e-t.left}function T(e){if(t=t||Object(o.a)(S.currentTarget))return e-t.top}return S}function S(e){for(var t=[];null!=e&&e!==document.body;)t.push(e),e=e.parentNode;return t}function M(e){return null!=e?e.__reactResponderId:null}function T(e){for(var t=[],n=[],r=function(e){return"selectionchange"===e.type?S(window.getSelection().anchorNode):null!=e.composedPath?e.composedPath():S(e.target)}(e),i=0;i<r.length;i++){var o=r[i],a=M(o);null!=a&&(t.push(a),n.push(o))}return{idPath:t,nodePath:n}}function C(e){return"selectionchange"===e.type?function(){var e=window.getSelection(),t=e.toString(),n=e.anchorNode,r=e.focusNode,i=n&&n.nodeType===window.Node.TEXT_NODE||r&&r.nodeType===window.Node.TEXT_NODE;return t.length>=1&&"\n"!==t&&i}():"select"===e.type}var O={},R=["onStartShouldSetResponderCapture","onStartShouldSetResponder",{bubbles:!0}],k=["onMoveShouldSetResponderCapture","onMoveShouldSetResponder",{bubbles:!0}],P={touchstart:R,mousedown:R,touchmove:k,mousemove:k,scroll:["onScrollShouldSetResponderCapture","onScrollShouldSetResponder",{bubbles:!1}]},L={id:null,idPath:null,node:null},D=new Map,I=!1,N=0,j={id:null,node:null,idPath:null};function B(e){j=e}function F(e){var t=D.get(e);return null!=t?t:O}function z(e){var t=e.type,n=e.target;if("touchstart"===t&&(I=!0),("touchmove"===t||N>1)&&(I=!1),!("mousedown"===t&&I||"mousemove"===t&&I||"mousemove"===t&&N<1))if(I&&"mouseup"===t)0===N&&(I=!1);else{var r=a(t)&&function(e){var t=e.altKey,n=e.button,r=e.buttons,i=e.ctrlKey,o=e.type,a=!1===t&&!1===i;return!!("touchstart"===o||"touchmove"===o||"mousedown"===o&&(0===n||1===r)&&a||"mousemove"===o&&1===r&&a)}(e),i=s(t),o=l(t),u=function(e){return"scroll"===e}(t),h=function(e){return"select"===e||"selectionchange"===e}(t),d=A(e);(r||i||o)&&(e.touches?N=e.touches.length:r?N=1:o&&(N=0),b.recordTouchTrack(t,d.nativeEvent));var f,p=T(e),m=!1;if(r||i||u&&N>0){var g=j.idPath,v=p.idPath;if(null!=g&&null!=v){var y=function(e,t){var n=e.length,r=t.length;if(0===n||0===r||e[n-1]!==t[r-1])return null;var i=e[0],o=0,a=t[0],s=0;n-r>0&&(i=e[o=n-r],n=r),r-n>0&&(a=t[s=r-n],r=n);for(var l=n;l--;){if(i===a)return i;i=e[o++],a=t[s++]}return null}(g,v);if(null!=y){var w=v.indexOf(y)+(y===j.id?1:0);p={idPath:v.slice(w),nodePath:p.nodePath.slice(w)}}else p=null}null!=p&&null!=(f=function(e,t,n){var r=P[t.type];if(null!=r){for(var i=e.idPath,o=e.nodePath,a=r[0],s=r[1],l=r[2].bubbles,c=function(e,t,r){var o=F(e)[r];if(null!=o&&(n.currentTarget=t,!0===o(n)))return{id:e,node:t,idPath:i.slice(i.indexOf(e))}},u=i.length-1;u>=0;u--){var h=i[u],d=o[u],f=c(h,d,a);if(null!=f)return f;if(!0===n.isPropagationStopped())return}if(l)for(var p=0;p<i.length;p++){var m=i[p],g=o[p],v=c(m,g,s);if(null!=v)return v;if(!0===n.isPropagationStopped())return}else{var y=i[0],b=o[0];if(t.target===b)return c(y,b,s)}}}(p,e,d))&&(!function(e,t){var n=j,r=n.id,i=n.node,o=t.id,a=t.node,s=F(o),l=s.onResponderGrant,c=s.onResponderReject;if(e.bubbles=!1,e.cancelable=!1,e.currentTarget=a,null==r)null!=l&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderGrant",l(e)),B(t);else{var u=F(r),h=u.onResponderTerminate,d=u.onResponderTerminationRequest,f=!0;null!=d&&(e.currentTarget=i,e.dispatchConfig.registrationName="onResponderTerminationRequest",!1===d(e)&&(f=!1)),f?(null!=h&&(e.currentTarget=i,e.dispatchConfig.registrationName="onResponderTerminate",h(e)),null!=l&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderGrant",l(e)),B(t)):null!=c&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderReject",c(e))}}(d,f),m=!0)}if(null!=j.id&&null!=j.node){var x=j,_=x.id,E=x.node,S=F(_),M=S.onResponderStart,O=S.onResponderMove,R=S.onResponderEnd,k=S.onResponderRelease,D=S.onResponderTerminate,z=S.onResponderTerminationRequest;if(d.bubbles=!1,d.cancelable=!1,d.currentTarget=E,r)null!=M&&(d.dispatchConfig.registrationName="onResponderStart",M(d));else if(i)null!=O&&(d.dispatchConfig.registrationName="onResponderMove",O(d));else{var H=c(t)||"contextmenu"===t||"blur"===t&&n===window||"blur"===t&&n.contains(E)&&e.relatedTarget!==E||u&&0===N||u&&n.contains(E)&&n!==E||h&&C(e),U=o&&!H&&!function(e,t){if(!t||0===t.length)return!1;for(var n=0;n<t.length;n++){var r=t[n].target;if(null!=r&&e.contains(r))return!0}return!1}(E,e.touches);if(o&&null!=R&&(d.dispatchConfig.registrationName="onResponderEnd",R(d)),U&&(null!=k&&(d.dispatchConfig.registrationName="onResponderRelease",k(d)),B(L)),H){var V=!0;"contextmenu"!==t&&"scroll"!==t&&"selectionchange"!==t||(m?V=!1:null!=z&&(d.dispatchConfig.registrationName="onResponderTerminationRequest",!1===z(d)&&(V=!1))),V&&(null!=D&&(d.dispatchConfig.registrationName="onResponderTerminate",D(d)),B(L),I=!1,N=0)}}}}}var H=["blur","scroll"],U=["mousedown","mousemove","mouseup","dragstart","touchstart","touchmove","touchend","touchcancel","contextmenu","select","selectionchange"];function V(e){j.id===e&&function(){var e=j,t=e.id,n=e.node;if(null!=t&&null!=n){var r=F(t).onResponderTerminate;if(null!=r){var i=A({});i.currentTarget=n,r(i)}B(L)}I=!1,N=0}(),D.has(e)&&D.delete(e)}var G={},W=0;function q(e,t){void 0===t&&(t=G);var n=function(e){var t=r.useRef(null);return null==t.current&&(t.current=e()),t.current}((function(){return W++})),o=r.useRef(!1);r.useEffect((function(){return i.canUseDOM&&null==window.__reactResponderSystemActive&&(window.addEventListener("blur",z),U.forEach((function(e){document.addEventListener(e,z)})),H.forEach((function(e){document.addEventListener(e,z,!0)})),window.__reactResponderSystemActive=!0),function(){V(n)}}),[n]),r.useEffect((function(){var r=t,i=r.onMoveShouldSetResponder,a=r.onMoveShouldSetResponderCapture,s=r.onScrollShouldSetResponder,l=r.onScrollShouldSetResponderCapture,c=r.onSelectionChangeShouldSetResponder,u=r.onSelectionChangeShouldSetResponderCapture,h=r.onStartShouldSetResponder,d=r.onStartShouldSetResponderCapture,f=null!=i||null!=a||null!=s||null!=l||null!=c||null!=u||null!=h||null!=d,p=e.current;f?(!function(e,t,n){!function(e,t){null!=e&&(e.__reactResponderId=t)}(t,e),D.set(e,n)}(n,p,t),o.current=!0):o.current&&(V(n),o.current=!1)}),[t,e,n]),r.useDebugValue({isResponder:e.current===j.node}),r.useDebugValue(t)}},function(e,t,n){"use strict";var r={adjustable:"slider",button:"button",header:"heading",image:"img",imagebutton:null,keyboardkey:null,label:null,link:"link",none:"presentation",search:"search",summary:"region",text:null},i=function(e){var t=e.accessibilityRole;if(t){var n=r[t];if(null!==n)return n||t}},o={article:"article",banner:"header",blockquote:"blockquote",code:"code",complementary:"aside",contentinfo:"footer",deletion:"del",emphasis:"em",figure:"figure",insertion:"ins",form:"form",link:"a",list:"ul",listitem:"li",main:"main",navigation:"nav",region:"section",strong:"strong"},a={},s={buttonLikeRoles:{button:!0,menuitem:!0},isDisabled:function(e){return e.disabled||Array.isArray(e.accessibilityStates)&&e.accessibilityStates.indexOf("disabled")>-1},propsToAccessibilityComponent:function(e){if(void 0===e&&(e=a),"label"===e.accessibilityRole)return"label";if(null!=e.href)return"a";var t=i(e);if(t){if("heading"===t){var n=e.accessibilityLevel||e["aria-level"];return null!=n?"h"+n:"h1"}return o[t]}},propsToAriaRole:i};t.a=s},function(e,t,n){var r,i;i=this,void 0===(r=function(){return function(e){"use strict";var t=e&&e.I18n||{},n=Array.prototype.slice,r=function(e){return("0"+e.toString()).substr(-2)},i=function(e){var t=typeof e;return"function"===t||"object"===t},o=function(e){return"function"===typeof e},a=function(e){return"undefined"!==typeof e&&null!==e},s=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},l=function(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)},c=function(e){return!0===e||!1===e},u=function(e){return null===e},h=function(e,t,n){return"undefined"===typeof n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!==typeof n||n%1!==0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))},d=function(e,t){return o(e)?e(t):e},f=function(e,t){var n,r,i;for(n in t)t.hasOwnProperty(n)&&(r=t[n],"string"===typeof(i=r)||"[object String]"===Object.prototype.toString.call(i)||l(r)||c(r)||s(r)||u(r)?e[n]=r:(null==e[n]&&(e[n]={}),f(e[n],r)));return e},p={day_names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],month_names:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbr_month_names:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridian:["AM","PM"]},m={precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1},g={unit:"$",precision:2,format:"%u%n",sign_first:!0,delimiter:",",separator:"."},v={unit:"%",precision:3,format:"%n%u",separator:".",delimiter:""},y=[null,"kb","mb","gb","tb"],b={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,fallbacks:!1,translations:{},missingBehaviour:"message",missingTranslationPrefix:""};return t.reset=function(){var e;for(e in b)this[e]=b[e]},t.initializeOptions=function(){var e;for(e in b)a(this[e])||(this[e]=b[e])},t.initializeOptions(),t.locales={},t.locales.get=function(e){var n=this[e]||this[t.locale]||this.default;return o(n)&&(n=n(e)),!1===s(n)&&(n=[n]),n},t.locales.default=function(e){var n=[],r=[];return e&&n.push(e),!e&&t.locale&&n.push(t.locale),t.fallbacks&&t.defaultLocale&&n.push(t.defaultLocale),n.forEach((function(e){var n=e.split("-"),i=null,o=null;3===n.length?(i=[n[0],n[1]].join("-"),o=n[0]):2===n.length&&(i=n[0]),-1===r.indexOf(e)&&r.push(e),t.fallbacks&&[i,o].forEach((function(t){"undefined"!==typeof t&&null!==t&&t!==e&&-1===r.indexOf(t)&&r.push(t)}))})),n.length||n.push("en"),r},t.pluralization={},t.pluralization.get=function(e){return this[e]||this[t.locale]||this.default},t.pluralization.default=function(e){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}},t.currentLocale=function(){return this.locale||this.defaultLocale},t.isSet=a,t.lookup=function(e,t){t=t||{};var n,r,i,o,s=this.locales.get(t.locale).slice();for(i=this.getFullScope(e,t);s.length;)if(n=s.shift(),r=i.split(t.separator||this.defaultSeparator),o=this.translations[n]){for(;r.length&&void 0!==(o=o[r.shift()])&&null!==o;);if(void 0!==o&&null!==o)return o}if(a(t.defaultValue))return d(t.defaultValue,e)},t.pluralizationLookupWithoutFallback=function(e,t,n){var r,o,s=this.pluralization.get(t)(e);if(i(n))for(;s.length;)if(r=s.shift(),a(n[r])){o=n[r];break}return o},t.pluralizationLookup=function(e,t,n){n=n||{};var r,o,s,l,c=this.locales.get(n.locale).slice();for(t=this.getFullScope(t,n);c.length;)if(r=c.shift(),o=t.split(n.separator||this.defaultSeparator),s=this.translations[r]){for(;o.length&&(s=s[o.shift()],i(s));)0===o.length&&(l=this.pluralizationLookupWithoutFallback(e,r,s));if("undefined"!==typeof l&&null!==l)break}return"undefined"!==typeof l&&null!==l||a(n.defaultValue)&&(l=i(n.defaultValue)?this.pluralizationLookupWithoutFallback(e,n.locale,n.defaultValue):n.defaultValue,s=n.defaultValue),{message:l,translations:s}},t.meridian=function(){var e=this.lookup("time"),t=this.lookup("date");return e&&e.am&&e.pm?[e.am,e.pm]:t&&t.meridian?t.meridian:p.meridian},t.prepareOptions=function(){for(var e,t=n.call(arguments),r={};t.length;)if("object"==typeof(e=t.shift()))for(var i in e)e.hasOwnProperty(i)&&(a(r[i])||(r[i]=e[i]));return r},t.createTranslationOptions=function(e,t){var n=[{scope:e}];return a(t.defaults)&&(n=n.concat(t.defaults)),a(t.defaultValue)&&n.push({message:t.defaultValue}),n},t.translate=function(e,t){t=t||{};var n,r=this.createTranslationOptions(e,t),o=e,l=this.prepareOptions(t);return delete l.defaultValue,r.some((function(t){if(a(t.scope)?(o=t.scope,n=this.lookup(o,l)):a(t.message)&&(n=d(t.message,e)),void 0!==n&&null!==n)return!0}),this)?("string"===typeof n?n=this.interpolate(n,t):s(n)?n=n.map((function(e){return"string"===typeof e?this.interpolate(e,t):e}),this):i(n)&&a(t.count)&&(n=this.pluralize(t.count,o,t)),n):this.missingTranslation(e,t)},t.interpolate=function(e,t){if(null==e)return e;t=t||{};var n,r,i,o,s=e.match(this.placeholder);if(!s)return e;for(;s.length;)i=(n=s.shift()).replace(this.placeholder,"$1"),r=a(t[i])?t[i].toString().replace(/\$/gm,"_#$#_"):i in t?this.nullPlaceholder(n,e,t):this.missingPlaceholder(n,e,t),o=new RegExp(n.replace(/{/gm,"\\{").replace(/}/gm,"\\}")),e=e.replace(o,r);return e.replace(/_#\$#_/g,"$")},t.pluralize=function(e,t,n){var r,i;return n=this.prepareOptions({count:String(e)},n),"undefined"===typeof(i=this.pluralizationLookup(e,t,n)).translations||null==i.translations?this.missingTranslation(t,n):"undefined"!==typeof i.message&&null!=i.message?this.interpolate(i.message,n):(r=this.pluralization.get(n.locale),this.missingTranslation(t+"."+r(e)[0],n))},t.missingTranslation=function(e,t){if("guess"===this.missingBehaviour){var n=e.split(".").slice(-1)[0];return(this.missingTranslationPrefix.length>0?this.missingTranslationPrefix:"")+n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+" "+n.toLowerCase()}))}return'[missing "'+[null!=t&&null!=t.locale?t.locale:this.currentLocale(),this.getFullScope(e,t)].join(t.separator||this.defaultSeparator)+'" translation]'},t.missingPlaceholder=function(e,t,n){return"[missing "+e+" value]"},t.nullPlaceholder=function(){return t.missingPlaceholder.apply(t,arguments)},t.toNumber=function(e,t){t=this.prepareOptions(t,this.lookup("number.format"),m);var n,r,i=e<0,o=function(e,t){return h("round",e,-t).toFixed(t)}(Math.abs(e),t.precision).toString().split("."),a=[],s=t.format||"%n",l=i?"-":"";for(e=o[0],n=o[1];e.length>0;)a.unshift(e.substr(Math.max(0,e.length-3),3)),e=e.substr(0,e.length-3);return r=a.join(t.delimiter),t.strip_insignificant_zeros&&n&&(n=n.replace(/0+$/,"")),t.precision>0&&n&&(r+=t.separator+n),r=(s=t.sign_first?"%s"+s:s.replace("%n","%s%n")).replace("%u",t.unit).replace("%n",r).replace("%s",l)},t.toCurrency=function(e,t){return t=this.prepareOptions(t,this.lookup("number.currency.format",t),this.lookup("number.format",t),g),this.toNumber(e,t)},t.localize=function(e,t,n){switch(n||(n={}),e){case"currency":return this.toCurrency(t,n);case"number":return e=this.lookup("number.format",n),this.toNumber(t,e);case"percentage":return this.toPercentage(t,n);default:var r;return r=e.match(/^(date|time)/)?this.toTime(e,t,n):t.toString(),this.interpolate(r,n)}},t.parseDate=function(e){var t,n,r;if(null==e)return e;if("object"===typeof e)return e;if(t=e.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/)){for(var i=1;i<=6;i++)t[i]=parseInt(t[i],10)||0;t[2]-=1,r=t[7]?1e3*("0"+t[7]):null,n=t[8]?new Date(Date.UTC(t[1],t[2],t[3],t[4],t[5],t[6],r)):new Date(t[1],t[2],t[3],t[4],t[5],t[6],r)}else"number"==typeof e?(n=new Date).setTime(e):e.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)?(n=new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" "))):(e.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),(n=new Date).setTime(Date.parse(e)));return n},t.strftime=function(e,n,i){i=this.lookup("date",i);var o=t.meridian();if(i||(i={}),i=this.prepareOptions(i,p),isNaN(e.getTime()))throw new Error("I18n.strftime() requires a valid date object, but received an invalid date.");var a=e.getDay(),s=e.getDate(),l=e.getFullYear(),c=e.getMonth()+1,u=e.getHours(),h=u,d=u>11?1:0,f=e.getSeconds(),m=e.getMinutes(),g=e.getTimezoneOffset(),v=Math.floor(Math.abs(g/60)),y=Math.abs(g)-60*v,b=(g>0?"-":"+")+(v.toString().length<2?"0"+v:v)+(y.toString().length<2?"0"+y:y);return h>12?h-=12:0===h&&(h=12),n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace("%a",i.abbr_day_names[a])).replace("%A",i.day_names[a])).replace("%b",i.abbr_month_names[c])).replace("%B",i.month_names[c])).replace("%d",r(s))).replace("%e",s)).replace("%-d",s)).replace("%H",r(u))).replace("%-H",u)).replace("%k",u)).replace("%I",r(h))).replace("%-I",h)).replace("%l",h)).replace("%m",r(c))).replace("%-m",c)).replace("%M",r(m))).replace("%-M",m)).replace("%p",o[d])).replace("%P",o[d].toLowerCase())).replace("%S",r(f))).replace("%-S",f)).replace("%w",a)).replace("%y",r(l))).replace("%-y",r(l).replace(/^0+/,""))).replace("%Y",l)).replace("%z",b)).replace("%Z",b)},t.toTime=function(e,t,n){var r=this.parseDate(t),i=this.lookup(e,n);if(null==r)return r;var o=r.toString();return o.match(/invalid/i)?o:i?this.strftime(r,i,n):o},t.toPercentage=function(e,t){return t=this.prepareOptions(t,this.lookup("number.percentage.format",t),this.lookup("number.format",t),v),this.toNumber(e,t)},t.toHumanSize=function(e,t){for(var n,r,i,o=e,a=0;o>=1024&&a<4;)o/=1024,a+=1;return 0===a?(i=this.getFullScope("number.human.storage_units.units.byte",t),n=this.t(i,{count:o}),r=0):(i=this.getFullScope("number.human.storage_units.units."+y[a],t),n=this.t(i),r=o-Math.floor(o)===0?0:1),t=this.prepareOptions(t,{unit:n,precision:r,format:"%n%u",delimiter:""}),this.toNumber(o,t)},t.getFullScope=function(e,t){return t=t||{},s(e)&&(e=e.join(t.separator||this.defaultSeparator)),t.scope&&(e=[t.scope,e].join(t.separator||this.defaultSeparator)),e},t.extend=function(e,t){return"undefined"===typeof e&&"undefined"===typeof t?{}:f(e,t)},t.t=t.translate.bind(t),t.l=t.localize.bind(t),t.p=t.pluralize.bind(t),t}(i)}.call(t,n,t,e))||(e.exports=r)},function(e,t,n){"use strict";t.a=function(e){if(null!=e&&(1===e.nodeType&&"function"===typeof e.getBoundingClientRect))return e.getBoundingClientRect()}},function(e,t,n){"use strict";var r=/^[+-]?\d*(?:\.\d+)?(?:[Ee][+-]?\d+)?(%|\w*)/;t.a=function(e,t){var n;return"string"===typeof e?""+parseFloat(e)*t+e.match(r)[1]:(n=e,!isNaN(parseFloat(n))&&isFinite(n)?e*t:void 0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"===typeof e&&r.test(e)};var r=/-webkit-|-moz-|-ms-/;e.exports=t.default},function(e,t,n){"use strict";var r=n(0),i=n(3);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).frame=null,t.onLayout=function(e){t.frame=e.nativeEvent.layout},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l=s.prototype;return l.relativeKeyboardHeight=function(e){var t=this.frame;if(!t||!e)return 0;var n=e.screenY-(this.props.keyboardVerticalOffset||0);return Math.max(t.y+t.height-n,0)},l.onKeyboardChange=function(e){},l.render=function(){var e=this.props,t=(e.behavior,e.contentContainerStyle,e.keyboardVerticalOffset,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["behavior","contentContainerStyle","keyboardVerticalOffset"]));return r.createElement(i.a,o({onLayout:this.onLayout},t))},s}(r.Component);t.a=s},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(41);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={getStateForAction:function(e,t){switch(t.type){case"SET_PARAMS":var n=t.source?e.routes.findIndex((function(e){return e.key===t.source})):e.index;return-1===n?null:s(s({},e),{},{routes:e.routes.map((function(e,r){return r===n?s(s({},e),{},{params:s(s({},e.params),t.payload.params)}):e}))});case"RESET":var r=t.payload;return 0===r.routes.length||r.routes.some((function(t){return!e.routeNames.includes(t.name)}))?null:!1===r.stale?e.routeNames.length!==r.routeNames.length||r.routeNames.some((function(t){return!e.routeNames.includes(t)}))?null:s(s({},r),{},{routes:r.routes.map((function(e){return e.key?e:s(s({},e),{},{key:"".concat(e.name,"-").concat(Object(o.a)())})}))}):r;default:return null}},shouldActionChangeFocus:function(e){return"NAVIGATE"===e.type}};t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(4),i=n.n(r),o=n(120),a=n(0),s=n.n(a),l=n(5),c=n(3),u=a.createContext(null);function h(e){var t=e.children,n=e.WrapperComponent,r=a.createElement(c.a,{children:t,key:1,pointerEvents:"box-none",style:d.appContainer});return n&&(r=a.createElement(n,null,r)),a.createElement(u.Provider,{value:e.rootTag},a.createElement(c.a,{pointerEvents:"box-none",style:d.appContainer},r))}var d=l.a.create({appContainer:{flex:1}}),f=n(64),p=n(119),m=n(94);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var v,y={},b={},w=function(e){return e()},x=function(){function e(){}return e.getAppKeys=function(){return Object.keys(b)},e.getApplication=function(e,t){return i()(b[e]&&b[e].getApplication,"Application "+e+" has not been registered. This is either due to an import error during initialization or failure to call AppRegistry.registerComponent."),b[e].getApplication(t)},e.registerComponent=function(e,t){return b[e]={getApplication:function(e){return n=w(t),r=e?e.initialProps:y,i=v&&v(e),{element:s.a.createElement(h,{WrapperComponent:i,rootTag:{}},s.a.createElement(n,r)),getStyleElement:function(e){var t=m.a.getStyleSheet();return s.a.createElement("style",g({},e,{dangerouslySetInnerHTML:{__html:t.textContent},id:t.id}))}};var n,r,i},run:function(e){return function(e,t,n,r){var o=r.hydrate,a=r.initialProps,l=r.rootTag,c=o?f.hydrate:p.a;i()(l,"Expect to have a valid rootTag, instead got ",l),c(s.a.createElement(h,{WrapperComponent:t,rootTag:l},s.a.createElement(e,a)),l,n)}(w(t),v&&v(e),e.callback,{hydrate:e.hydrate||!1,initialProps:e.initialProps||y,rootTag:e.rootTag})}},e},e.registerConfig=function(t){t.forEach((function(t){var n=t.appKey,r=t.component,o=t.run;o?e.registerRunnable(n,o):(i()(r,"No component provider passed in"),e.registerComponent(n,r))}))},e.registerRunnable=function(e,t){return b[e]={run:t},e},e.runApplication=function(e,t){i()(b[e]&&b[e].run,'Application "'+e+'" has not been registered. This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.'),b[e].run(t)},e.setComponentProviderInstrumentationHook=function(e){w=e},e.setWrapperComponentProvider=function(e){v=e},e.unmountApplicationComponentAtRootTag=function(e){Object(o.a)(e)},e}()},function(e,t,n){"use strict";var r={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},i=["ms","Moz","O","Webkit"];Object.keys(r).forEach((function(e){i.forEach((function(t){r[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=r[e]}))})),t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r={},i={},o=1,a=function(e){return"r-"+e},s=function(){function e(){}return e.register=function(e){var t=o++;var n=a(t);return i[n]=e,t},e.getByID=function(e){if(!e)return r;var t=a(e),n=i[t];return n||(console.warn("Invalid style with id `"+e+"`. Skipping ..."),r)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i="function"===typeof Symbol&&"symbol"===typeof Symbol()?Symbol():Object.freeze({});function o(e){var t=r.useRef(i);return t.current===i&&(t.current=e()),t.current}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=(t instanceof Array?t.length?t:[void 0]:[t]).map((function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}})),c=e.reduce((function(e,t){var i=e,o=t;return s.forEach((function(e,t){var a,c=e.keyAccessor;if(e.isProp){var u=o,h=u[c],d=r(u,[c].map(l));a=h,o=d}else a=c(o,t);t+1<s.length?(i.hasOwnProperty(a)||(i[a]={}),i=i[a]):n?(i.hasOwnProperty(a)||(i[a]=[]),i[a].push(o)):i[a]=o})),e}),{});n instanceof Function&&function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===s.length?Object.keys(t).forEach((function(e){return t[e]=n(t[e])})):Object.values(t).forEach((function(t){return e(t,r+1)}))}(c);var u=c;return a&&(u=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===s.length?u.push({keys:n,vals:t}):Object.entries(t).forEach((function(t){var r=i(t,2),a=r[0],s=r[1];return e(s,[].concat(o(n),[a]))}))}(c),t instanceof Array&&0===t.length&&1===u.length&&(u[0].keys=[])),u}},function(e,t,n){var r;!function(i){var o=/^\s+/,a=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(a,"").toLowerCase();var t,n=!1;if(R[e])e=R[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=z.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=z.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=z.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=z.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=z.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=z.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=z.hex8.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=z.hex6.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),format:n?"name":"hex"};if(t=z.hex4.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=z.hex3.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(H(e.r)&&H(e.g)&&H(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*L(f,255),g:255*L(p,255),b:255*L(m,255)},h=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):H(e.h)&&H(e.s)&&H(e.v)?(r=j(e.s),s=j(e.v),t=function(e,t,n){e=6*L(e,360),t=L(t,100),n=L(n,100);var r=i.floor(e),o=e-r,a=n*(1-t),s=n*(1-o*t),l=n*(1-(1-o)*t),c=r%6;return{r:255*[n,s,a,a,l,n][c],g:255*[l,n,n,s,a,a][c],b:255*[a,a,l,n,n,s][c]}}(e.h,r,s),h=!0,d="hsv"):H(e.h)&&H(e.s)&&H(e.l)&&(r=j(e.s),l=j(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=L(e,360),t=L(t,100),n=L(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,l),h=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=P(n),{ok:h,format:e.format||d,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(e,t,n){e=L(e,255),t=L(t,255),n=L(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:s}}function p(e,t,n){e=L(e,255),t=L(t,255),n=L(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=o,l=o-a;if(i=0===o?0:l/o,o==a)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:s}}function m(e,t,n,r){var i=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(e,t,n,r){return[N(B(r)),N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s-=t/100,n.s=D(n.s),d(n)}function y(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s+=t/100,n.s=D(n.s),d(n)}function b(e){return d(e).desaturate(100)}function w(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l+=t/100,n.l=D(n.l),d(n)}function x(e,t){t=0===t?0:t||10;var n=d(e).toRgb();return n.r=u(0,c(255,n.r-l(-t/100*255))),n.g=u(0,c(255,n.g-l(-t/100*255))),n.b=u(0,c(255,n.b-l(-t/100*255))),d(n)}function _(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l-=t/100,n.l=D(n.l),d(n)}function E(e,t){var n=d(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,d(n)}function A(e){var t=d(e).toHsl();return t.h=(t.h+180)%360,d(t)}function S(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+120)%360,s:t.s,l:t.l}),d({h:(n+240)%360,s:t.s,l:t.l})]}function M(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+90)%360,s:t.s,l:t.l}),d({h:(n+180)%360,s:t.s,l:t.l}),d({h:(n+270)%360,s:t.s,l:t.l})]}function T(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+72)%360,s:t.s,l:t.l}),d({h:(n+216)%360,s:t.s,l:t.l})]}function C(e,t,n){t=t||6,n=n||30;var r=d(e).toHsl(),i=360/n,o=[d(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(d(r));return o}function O(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(d({h:r,s:i,v:o})),o=(o+s)%1;return a}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16)),N(B(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*L(this._r,255))+"%",g:l(100*L(this._g,255))+"%",b:l(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*L(this._r,255))+"%, "+l(100*L(this._g,255))+"%, "+l(100*L(this._b,255))+"%)":"rgba("+l(100*L(this._r,255))+"%, "+l(100*L(this._g,255))+"%, "+l(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(E,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:j(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),i=d(t).toRgb(),o=n/100;return d({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,i,o=d.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},d.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var c=0;c<t.length;c++)(r=d.readability(e,t[c]))>l&&(l=r,s=d(t[c]));return d.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var R=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(R);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function L(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return c(1,u(0,e))}function I(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function j(e){return e<=1&&(e=100*e+"%"),e}function B(e){return i.round(255*parseFloat(e)).toString(16)}function F(e){return I(e)/255}var z=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function H(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));n(6);var r=n(0);var i={value:!1};function o(e){r.useMemo((function(){return{current:new Map}}),[]);return e}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,i=n||r||Function("return this")();function o(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function a(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var s=Object.prototype,l=s.hasOwnProperty,c=s.toString,u=i.Symbol,h=s.propertyIsEnumerable,d=u?u.isConcatSpreadable:void 0,f=Math.max;function p(e){return g(e)||function(e){return function(e){return v(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}(e)}(e)&&l.call(e,"callee")&&(!h.call(e,"callee")||"[object Arguments]"==c.call(e))}(e)||!!(d&&e&&e[d])}function m(e){if("string"==typeof e||function(e){return"symbol"==typeof e||v(e)&&"[object Symbol]"==c.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var g=Array.isArray;function v(e){return!!e&&"object"==typeof e}var y,b,w=(y=function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=e[a];n(s,a)&&(o[a]=s)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}(function e(t,n,r,i,o){var s=-1,l=t.length;for(r||(r=p),o||(o=[]);++s<l;){var c=t[s];n>0&&r(c)?n>1?e(c,n-1,r,i,o):a(o,c):i||(o[o.length]=c)}return o}(t,1),m))},b=f(void 0===b?y.length-1:b,0),function(){for(var e=arguments,t=-1,n=f(e.length-b,0),r=Array(n);++t<n;)r[t]=e[b+t];t=-1;for(var i=Array(b+1);++t<b;)i[t]=e[t];return i[b]=r,o(y,this,i)});e.exports=w}).call(this,n(46))},function(t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"===typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],h=!1,d=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!h){var t=l(f);h=!0;for(var n=u.length;n;){for(c=u,u=[];++d<n;)c&&c[d].run();d=-1,n=u.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||h||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return null!=e&&"object"===typeof e&&!0===e["@@functional/placeholder"]}},function(e,t,n){var r=n(86),i=n(57),o=n(39),a=n(382),s=o((function(e,t){return 1===e?i(t):r(e,a(e,[],t))}));e.exports=s},function(e,t){e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},function(e,t,n){"use strict";var r=n(90),i=n.n(r);t.a=function(e){if(void 0===e||null===e)return e;var t=i()(e);return void 0!==t&&null!==t?t=(t<<24|t>>>8)>>>0:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(34),i=function(){function e(){}return e.get=function(){return r.a.get("window").scale},e.getFontScale=function(){return r.a.get("window").fontScale||e.get()},e.getPixelSizeForLayoutSize=function(t){return Math.round(t*e.get())},e.roundToNearestPixel=function(t){var n=e.get();return Math.round(t*n)/n},e}()},function(e,t,n){"use strict";var r=n(3),i=n(0),o=n.n(i);t.a=function(e){e.colors,e.enabled,e.onRefresh,e.progressBackgroundColor,e.progressViewOffset,e.refreshing,e.size,e.tintColor,e.title,e.titleColor;var t=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["colors","enabled","onRefresh","progressBackgroundColor","progressViewOffset","refreshing","size","tintColor","title","titleColor"]);return o.a.createElement(r.a,t)}},function(e,t,n){"use strict";var r=n(19),i=n.n(r),o=n(0),a=n(73),s=n(37),l=n(76),c={accessibilityDisabled:!0,accessibilityLabel:!0,accessibilityLiveRegion:!0,accessibilityRole:!0,accessibilityState:!0,accessibilityValue:!0,children:!0,disabled:!0,focusable:!0,nativeID:!0,onBlur:!0,onFocus:!0,onLayout:!0,testID:!0};var u=o.memo(o.forwardRef((function(e,t){var n=e.delayPressIn,r=e.delayPressOut,u=e.delayLongPress,h=e.disabled,d=e.focusable,f=e.onLongPress,p=e.onPress,m=e.onPressIn,g=e.onPressOut,v=e.rejectResponderTermination,y=Object(o.useRef)(null),b=Object(o.useMemo)((function(){return{cancelable:!v,disabled:h,delayLongPress:u,delayPressStart:n,delayPressEnd:r,onLongPress:f,onPress:p,onPressStart:m,onPressEnd:g}}),[h,n,r,u,f,p,m,g,v]),w=Object(l.a)(y,b),x=o.Children.only(e.children),_=[x.props.children],E=function(e){return Object(a.a)(e,c)}(e);E.accessibilityDisabled=h,E.focusable=!h&&!1!==d,E.ref=Object(s.a)(t,y,x.ref);var A=i()(E,w);return o.cloneElement.apply(o,[x,A].concat(_))})));u.displayName="TouchableWithoutFeedback",t.a=u},function(e,t,n){"use strict";var r=n(64);t.a=r.render},function(e,t,n){"use strict";var r=n(64);t.a=r.unmountComponentAtNode},function(e,t,n){"use strict";var r=n(132),i={addListener:function(){return{remove:function(){}}},dismiss:function(){Object(r.a)()},removeAllListeners:function(){},removeListener:function(){}};t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(13),o=n(5),a=n(3);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=i.canUseDOM&&window.CSS&&window.CSS.supports&&window.CSS.supports("top: constant(safe-area-inset-top)")?"constant":"env",c=r.forwardRef((function(e,t){var n=e.style,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["style"]);return r.createElement(a.a,s({},i,{ref:t,style:o.a.compose(u.root,n)}))}));c.displayName="SafeAreaView";var u=o.a.create({root:{paddingTop:l+"(safe-area-inset-top)",paddingRight:l+"(safe-area-inset-right)",paddingBottom:l+"(safe-area-inset-bottom)",paddingLeft:l+"(safe-area-inset-left)"}});t.a=c},function(e,t,n){"use strict";var r=n(0),i=n(37),o=n(76),a=n(5),s=n(3);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){return{child:{opacity:null!==e&&void 0!==e?e:.85},underlay:{backgroundColor:void 0===t?"black":t}}}function u(e){return null!=e.onPress||null!=e.onPressIn||null!=e.onPressOut||null!=e.onLongPress}var h=a.a.create({root:{userSelect:"none"},actionable:{cursor:"pointer",touchAction:"manipulation"}}),d=r.memo(r.forwardRef((function(e,t){var n=e.activeOpacity,d=e.children,f=e.delayPressIn,p=e.delayPressOut,m=e.delayLongPress,g=e.disabled,v=e.focusable,y=e.onHideUnderlay,b=e.onLongPress,w=e.onPress,x=e.onPressIn,_=e.onPressOut,E=e.onShowUnderlay,A=e.rejectResponderTermination,S=e.style,M=e.testOnly_pressed,T=e.underlayColor,C=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["activeOpacity","children","delayPressIn","delayPressOut","delayLongPress","disabled","focusable","onHideUnderlay","onLongPress","onPress","onPressIn","onPressOut","onShowUnderlay","rejectResponderTermination","style","testOnly_pressed","underlayColor"]),O=Object(r.useRef)(null),R=Object(i.a)(t,O),k=Object(r.useState)(!0===M?c(n,T):null),P=k[0],L=k[1],D=Object(r.useCallback)((function(){u(e)&&(L(c(n,T)),null!=E&&E())}),[n,E,e,T]),I=Object(r.useCallback)((function(){!0!==M&&u(e)&&(L(null),null!=y&&y())}),[y,e,M]),N=Object(r.useMemo)((function(){return{cancelable:!A,disabled:g,delayLongPress:m,delayPressStart:f,delayPressEnd:p,onLongPress:b,onPress:w,onPressStart:function(e){D(),null!=x&&x(e)},onPressEnd:function(e){I(),null!=_&&_(e)}}}),[m,f,p,g,b,w,x,_,A,D,I]),j=Object(o.a)(O,N),B=r.Children.only(d);return r.createElement(s.a,l({},C,j,{accessibilityDisabled:g,focusable:!g&&!1!==v,ref:R,style:[h.root,S,!g&&h.actionable,P&&P.underlay]}),r.cloneElement(B,{style:a.a.compose(B.props.style,P&&P.child)}))})));d.displayName="TouchableHighlight",t.a=d},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(80);function o(e){r.useEffect((function(){var t=i.a.addEventListener("hardwareBackPress",(function(){var t=e.current;return null!=t&&(!!t.canGoBack()&&(t.goBack(),!0))}));return function(){return t.remove()}}),[e])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(144);function o(e){var t=e.value,n=e.children;return r.createElement(i.a.Provider,{value:t},n)}},function(e,t,n){"use strict";var r=n(9),i=n(0),o=n(3),a=n(77),s=n(4),l=n.n(s);function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._getItem=function(e,t,n){if(!t)return null;for(var r=n-1,i=0;i<t.length;i++){var o=t[i],a=o.data,s=e.getItemCount(a);if(-1===r||r===s)return o;if(r<s)return e.getItem(a,r);r-=s+2}return null},t._keyExtractor=function(e,n){var r=t._subExtractor(n);return r&&r.key||String(n)},t._convertViewable=function(e){l()(null!=e.index,"Received a broken ViewToken");var n=t._subExtractor(e.index);if(!n)return null;var r=n.section.keyExtractor||t.props.keyExtractor;return f(f({},e),{},{index:n.index,key:r(e.item,n.index),section:n.section})},t._onViewableItemsChanged=function(e){var n=e.viewableItems,r=e.changed,i=t.props.onViewableItemsChanged;null!=i&&i({viewableItems:n.map(t._convertViewable,m(t)).filter(Boolean),changed:r.map(t._convertViewable,m(t)).filter(Boolean)})},t._renderItem=function(e){return function(n){var r=n.item,o=n.index,a=t._subExtractor(o);if(!a)return null;var s=a.index;if(null==s){var c=a.section;if(!0===a.header){var u=t.props.renderSectionHeader;return u?u({section:c}):null}var h=t.props.renderSectionFooter;return h?h({section:c}):null}var d=a.section.renderItem||t.props.renderItem,f=t._getSeparatorComponent(o,a,e);return l()(d,"no renderItem!"),i.createElement(b,{SeparatorComponent:f,LeadingSeparatorComponent:0===s?t.props.SectionSeparatorComponent:void 0,cellKey:a.key,index:s,item:r,leadingItem:a.leadingItem,leadingSection:a.leadingSection,onUpdateSeparator:t._onUpdateSeparator,prevCellKey:(t._subExtractor(o-1)||{}).key,ref:function(e){t._cellRefs[a.key]=e},renderItem:d,section:a.section,trailingItem:a.trailingItem,trailingSection:a.trailingSection,inverted:!!t.props.inverted})}},t._onUpdateSeparator=function(e,n){var r=t._cellRefs[e];r&&r.updateSeparatorProps(n)},t._cellRefs={},t._captureRef=function(e){t._listRef=e},t}g(t,e);var n=t.prototype;return n.scrollToLocation=function(e){for(var t=e.itemIndex,n=0;n<e.sectionIndex;n++)t+=this.props.getItemCount(this.props.sections[n].data)+2;var r=e.viewOffset||0;if(null!=this._listRef){if(e.itemIndex>0&&this.props.stickySectionHeadersEnabled)r+=this._listRef._getFrameMetricsApprox(t-e.itemIndex).length;var i=f(f({},e),{},{viewOffset:r,index:t});this._listRef.scrollToIndex(i)}},n.getListRef=function(){return this._listRef},n.render=function(){for(var e,t=this,n=this.props,r=(n.ItemSeparatorComponent,n.SectionSeparatorComponent,n.renderItem,n.renderSectionFooter,n.renderSectionHeader,n.sections,n.stickySectionHeadersEnabled,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["ItemSeparatorComponent","SectionSeparatorComponent","renderItem","renderSectionFooter","renderSectionHeader","sections","stickySectionHeadersEnabled"])),o=this.props.ListHeaderComponent?1:0,s=this.props.stickySectionHeadersEnabled?[]:void 0,l=0,h=u(this.props.sections);!(e=h()).done;){var d=e.value;null!=s&&s.push(l+o),l+=2,l+=this.props.getItemCount(d.data)}var f=this._renderItem(l);return i.createElement(a.a,c({},r,{keyExtractor:this._keyExtractor,stickyHeaderIndices:s,renderItem:f,data:this.props.sections,getItem:function(e,n){return t._getItem(t.props,e,n)},getItemCount:function(){return l},onViewableItemsChanged:this.props.onViewableItemsChanged?this._onViewableItemsChanged:void 0,ref:this._captureRef}))},n._subExtractor=function(e){for(var t=e,n=this.props,r=n.getItem,i=n.getItemCount,o=n.keyExtractor,a=n.sections,s=0;s<a.length;s++){var l=a[s],c=l.data,u=l.key||String(s);if(!((t-=1)>=i(c)+1))return-1===t?{section:l,key:u+":header",index:null,header:!0,trailingSection:a[s+1]}:t===i(c)?{section:l,key:u+":footer",index:null,header:!1,trailingSection:a[s+1]}:{section:l,key:u+":"+(l.keyExtractor||o)(r(c,t),t),index:t,leadingItem:r(c,t-1),leadingSection:a[s-1],trailingItem:r(c,t+1),trailingSection:a[s+1]};t-=i(c)+1}},n._getSeparatorComponent=function(e,t,n){if(!(t=t||this._subExtractor(e)))return null;var r=t.section.ItemSeparatorComponent||this.props.ItemSeparatorComponent,i=this.props.SectionSeparatorComponent,o=e===n-1,a=t.index===this.props.getItemCount(t.section.data)-1;return i&&a?i:!r||a||o?null:r},t}(i.PureComponent);y.defaultProps=f(f({},a.a.defaultProps),{},{data:[]});var b=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={separatorProps:{highlighted:!1,leadingItem:t.props.item,leadingSection:t.props.leadingSection,section:t.props.section,trailingItem:t.props.trailingItem,trailingSection:t.props.trailingSection},leadingSeparatorProps:{highlighted:!1,leadingItem:t.props.leadingItem,leadingSection:t.props.leadingSection,section:t.props.section,trailingItem:t.props.item,trailingSection:t.props.trailingSection}},t._separators={highlight:function(){["leading","trailing"].forEach((function(e){return t._separators.updateProps(e,{highlighted:!0})}))},unhighlight:function(){["leading","trailing"].forEach((function(e){return t._separators.updateProps(e,{highlighted:!1})}))},updateProps:function(e,n){var r=t.props,i=r.LeadingSeparatorComponent,o=r.cellKey,a=r.prevCellKey;"leading"===e&&null!=i?t.setState((function(e){return{leadingSeparatorProps:f(f({},e.leadingSeparatorProps),n)}})):t.props.onUpdateSeparator("leading"===e&&a||o,n)}},t}g(t,e),t.getDerivedStateFromProps=function(e,t){return{separatorProps:f(f({},t.separatorProps),{},{leadingItem:e.item,leadingSection:e.leadingSection,section:e.section,trailingItem:e.trailingItem,trailingSection:e.trailingSection}),leadingSeparatorProps:f(f({},t.leadingSeparatorProps),{},{leadingItem:e.leadingItem,leadingSection:e.leadingSection,section:e.section,trailingItem:e.item,trailingSection:e.trailingSection})}};var n=t.prototype;return n.updateSeparatorProps=function(e){this.setState((function(t){return{separatorProps:f(f({},t.separatorProps),e)}}))},n.render=function(){var e=this.props,t=e.LeadingSeparatorComponent,n=e.SeparatorComponent,r=e.item,a=e.index,s=e.section,l=e.inverted,c=this.props.renderItem({item:r,index:a,section:s,separators:this._separators}),u=null!=t&&i.createElement(t,this.state.leadingSeparatorProps),h=null!=n&&i.createElement(n,this.state.separatorProps);return u||h?i.createElement(o.a,null,!1===l?u:h,c,!1===l?h:u):c},t}(i.Component),w=y;function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=A(A({},w.defaultProps),{},{stickySectionHeadersEnabled:"ios"===r.a.OS}),T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this)._captureRef=function(e){t._wrapperListRef=e},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var o=r.prototype;return o.scrollToLocation=function(e){null!=this._wrapperListRef&&this._wrapperListRef.scrollToLocation(e)},o.recordInteraction=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();e&&e.recordInteraction()},o.flashScrollIndicators=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();e&&e.flashScrollIndicators()},o.getScrollResponder=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();if(e)return e.getScrollResponder()},o.getScrollableNode=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();if(e)return e.getScrollableNode()},o.setNativeProps=function(e){var t=this._wrapperListRef&&this._wrapperListRef.getListRef();t&&t.setNativeProps(e)},o.render=function(){return i.createElement(w,x({},this.props,{ref:this._captureRef,getItemCount:function(e){return e.length},getItem:function(e,t){return e[t]}}))},r}(i.PureComponent);T.defaultProps=M;var C=T;t.a=C},function(t,n,r){"use strict";r.d(n,"a",(function(){return m}));var i=r(8),o=r.n(i),a=r(7),s=r.n(a),l=r(0),c=r(75),u=r(41),h=l.createContext(void 0),d=function(){var e=0,t=[],n=[],r=function(){n.forEach((function(e){var t=e.cb;e.cb=function(){return t(!0)}}))};return{get index(){var e,n=null===(e=window.history.state)||void 0===e?void 0:e.id;if(n){var r=t.findIndex((function(e){return e.id===n}));return r>-1?r:0}return 0},get:function(e){return t[e]},backIndex:function(n){for(var r=n.path,i=e-1;i>=0;i--){if(t[i].path===r)return i}return-1},push:function(n){var i=n.path,o=n.state;r();var a=Object(u.a)();(t=t.slice(0,e+1)).push({path:i,state:o,id:a}),e=t.length-1,window.history.pushState({id:a},"",i)},replace:function(n){var i,o,a=n.path,s=n.state;r();var l=null!==(i=null===(o=window.history.state)||void 0===o?void 0:o.id)&&void 0!==i?i:Object(u.a)();t.length?t[e]={path:a,state:s,id:l}:t.push({path:a,state:s,id:l}),window.history.replaceState({id:l},"",a)},go:function(i){if(r(),i>0?i=Math.min(i,t.length-1):i<0&&(i=e+i<0?-e:i),0!==i)return e+=i,new Promise((function(e,t){var r=function(n){if(clearTimeout(o),n)t(new Error("History was changed during navigation."));else{var r=window.document.title;window.document.title="",window.document.title=r,e()}};n.push({ref:r,cb:r});var o=setTimeout((function(){var e=n.findIndex((function(e){return e.ref===r}));e>-1&&(n[e].cb(),n.splice(e,1))}),100);window.addEventListener("popstate",(function e(){var t=n.pop();window.removeEventListener("popstate",e),null===t||void 0===t||t.cb()})),window.history.go(i)}))},listen:function(e){var t=function(){n.length||e()};return window.addEventListener("popstate",t),function(){return window.removeEventListener("popstate",t)}}}},f=function e(t,n){if(void 0===t||void 0===n||t.key!==n.key)return[void 0,void 0];var r=t.history?t.history.length:t.routes.length,i=n.history?n.history.length:n.routes.length,o=t.routes[t.index],a=n.routes[n.index],s=o.state,l=a.state;return r!==i||o.key!==a.key||void 0===s||void 0===l||s.key!==l.key?[t,n]:e(s,l)},p=!1;function m(t,n){var r=n.enabled,i=void 0===r||r,a=n.config,u=n.getStateFromPath,m=void 0===u?c.getStateFromPath:u,g=n.getPathFromState,v=void 0===g?c.getPathFromState:g,y=n.getActionFromState,b=void 0===y?c.getActionFromState:y;l.useEffect((function(){if(!1!==i&&p)throw new Error(["Looks like you have configured linking in multiple places. This is likely an error since URL integration should only be handled in one place to avoid conflicts. Make sure that:","- You are not using both 'linking' prop and 'useLinking'","- You don't have 'useLinking' in multiple components"].join("\n").trim());return p=!1!==i,function(){p=!1}}));var w=l.useState(d),x=o()(w,1)[0],_=l.useRef(i),E=l.useRef(a),A=l.useRef(m),S=l.useRef(b),M=l.useRef(v);l.useEffect((function(){_.current=i,E.current=a,A.current=m,S.current=b,M.current=v}));var T=l.useContext(h),C=l.useCallback((function(){var e;if(_.current){var t,n=null!==(t=null===T||void 0===T?void 0:T.location)&&void 0!==t?t:"undefined"!==typeof window?window.location:void 0,r=n?n.pathname+n.search:void 0;r&&(e=A.current(r,E.current))}var i={then:function(t){return Promise.resolve(t?t(e):e)},catch:function(){return i}};return i}),[]),O=l.useRef(void 0),R=l.useRef(void 0),k=l.useRef(void 0);return l.useEffect((function(){return O.current=x.index,x.listen((function(){var n,r=t.current;if(r&&i){var o=location.pathname+location.search,a=x.index,s=null!==(n=O.current)&&void 0!==n?n:0;O.current=a,k.current=o;var l=x.get(a);if((null===l||void 0===l?void 0:l.path)===o&&null!==l&&void 0!==l&&l.state)r.resetRoot(l.state);else{var c=A.current(o,E.current);if(c){var u=r.getRootState();if(c.routes.some((function(e){return!(null!==u&&void 0!==u&&u.routeNames.includes(e.name))})))return void console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.");if(a>s){var h=S.current(c,E.current);if(void 0!==h)try{r.dispatch(h)}catch(e){console.warn("An error occurred when trying to handle the link '".concat(o,"': ").concat(e.message))}else r.resetRoot(c)}else r.resetRoot(c)}else r.resetRoot(c)}}}))}),[i,x,t]),l.useEffect((function(){var e;if(i){if(t.current){var n=t.current.getRootState();if(n){var r=M.current(n,E.current);void 0===R.current&&(R.current=n),x.replace({path:r,state:n})}}return null===(e=t.current)||void 0===e?void 0:e.addListener("state",function(e){var t=!1,n=[];return function r(){var i;return s.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,!t){o.next=4;break}return n.unshift(r),o.abrupt("return");case 4:return t=!0,o.next=7,s.a.awrap(e());case 7:return o.prev=7,t=!1,n.length&&(null===(i=n.pop())||void 0===i||i()),o.finish(7);case 11:case"end":return o.stop()}}),null,null,[[0,,7,11]],Promise)}}((function(){var e,n,r,a,l,c,u,h,d,p,m,g;return s.a.async((function(v){for(;;)switch(v.prev=v.next){case 0:if((e=t.current)&&i){v.next=3;break}return v.abrupt("return");case 3:if(n=R.current,r=e.getRootState(),a=k.current,l=M.current(r,E.current),R.current=r,k.current=void 0,c=f(n,r),u=o()(c,2),h=u[0],d=u[1],!h||!d||l===a){v.next=37;break}if(!((p=(d.history?d.history.length:d.routes.length)-(h.history?h.history.length:h.routes.length))>0)){v.next=16;break}x.push({path:l,state:r}),v.next=35;break;case 16:if(!(p<0)){v.next=34;break}if(m=x.backIndex({path:l}),g=x.index,v.prev=19,!(-1!==m&&m<g)){v.next=25;break}return v.next=23,s.a.awrap(x.go(m-g));case 23:v.next=27;break;case 25:return v.next=27,s.a.awrap(x.go(p));case 27:x.replace({path:l,state:r}),v.next=32;break;case 30:v.prev=30,v.t0=v.catch(19);case 32:v.next=35;break;case 34:x.replace({path:l,state:r});case 35:v.next=38;break;case 37:x.replace({path:l,state:r});case 38:case"end":return v.stop()}}),null,null,[[19,30]],Promise)})))}})),{getInitialState:C}}},function(e,t,n){"use strict";var r=n(96),i=n(65),o=n(5),a=n(94),s=n(42);var l={},c=Object.prototype.hasOwnProperty,u=Array.isArray,h=/[A-Z]/g;function d(e){return"-"+e.toLowerCase()}function f(e){return u(e)?e.join(" "):e}var p=i.a.create({reset:{backgroundColor:"transparent",color:"inherit",font:"inherit",listStyle:"none",margin:0,textAlign:"inherit",textDecoration:"none"},cursor:{cursor:"pointer"}},s.c.classicReset),m=o.a.create({auto:{pointerEvents:"auto"},"box-none":{pointerEvents:"box-none"},"box-only":{pointerEvents:"box-only"},none:{pointerEvents:"none"}});t.a=function(e,t){t||(t=l);var n=t,i=n.accessibilityActiveDescendant,s=n.accessibilityAtomic,u=n.accessibilityAutoComplete,g=n.accessibilityBusy,v=n.accessibilityChecked,y=n.accessibilityColumnCount,b=n.accessibilityColumnIndex,w=n.accessibilityColumnSpan,x=n.accessibilityControls,_=n.accessibilityCurrent,E=n.accessibilityDescribedBy,A=n.accessibilityDetails,S=n.accessibilityDisabled,M=n.accessibilityErrorMessage,T=n.accessibilityExpanded,C=n.accessibilityFlowTo,O=n.accessibilityHasPopup,R=n.accessibilityHidden,k=n.accessibilityInvalid,P=n.accessibilityKeyShortcuts,L=n.accessibilityLabel,D=n.accessibilityLabelledBy,I=n.accessibilityLevel,N=n.accessibilityLiveRegion,j=n.accessibilityModal,B=n.accessibilityMultiline,F=n.accessibilityMultiSelectable,z=n.accessibilityOrientation,H=n.accessibilityOwns,U=n.accessibilityPlaceholder,V=n.accessibilityPosInSet,G=n.accessibilityPressed,W=n.accessibilityReadOnly,q=n.accessibilityRequired,X=(n.accessibilityRole,n.accessibilityRoleDescription),Y=n.accessibilityRowCount,K=n.accessibilityRowIndex,Q=n.accessibilityRowSpan,Z=n.accessibilitySelected,J=n.accessibilitySetSize,$=n.accessibilitySort,ee=n.accessibilityValueMax,te=n.accessibilityValueMin,ne=n.accessibilityValueNow,re=n.accessibilityValueText,ie=n.classList,oe=n.dataSet,ae=n.focusable,se=n.nativeID,le=n.pointerEvents,ce=n.style,ue=n.testID,he=n.accessible,de=n.accessibilityState,fe=n.accessibilityValue,pe=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["accessibilityActiveDescendant","accessibilityAtomic","accessibilityAutoComplete","accessibilityBusy","accessibilityChecked","accessibilityColumnCount","accessibilityColumnIndex","accessibilityColumnSpan","accessibilityControls","accessibilityCurrent","accessibilityDescribedBy","accessibilityDetails","accessibilityDisabled","accessibilityErrorMessage","accessibilityExpanded","accessibilityFlowTo","accessibilityHasPopup","accessibilityHidden","accessibilityInvalid","accessibilityKeyShortcuts","accessibilityLabel","accessibilityLabelledBy","accessibilityLevel","accessibilityLiveRegion","accessibilityModal","accessibilityMultiline","accessibilityMultiSelectable","accessibilityOrientation","accessibilityOwns","accessibilityPlaceholder","accessibilityPosInSet","accessibilityPressed","accessibilityReadOnly","accessibilityRequired","accessibilityRole","accessibilityRoleDescription","accessibilityRowCount","accessibilityRowIndex","accessibilityRowSpan","accessibilitySelected","accessibilitySetSize","accessibilitySort","accessibilityValueMax","accessibilityValueMin","accessibilityValueNow","accessibilityValueText","classList","dataSet","focusable","nativeID","pointerEvents","style","testID","accessible","accessibilityState","accessibilityValue"]),me=null!=de&&!0===de.disabled||S,ge=r.a.propsToAriaRole(t),ve="link"===ge||"a"===e||"button"===e||"input"===e||"select"===e||"textarea"===e||null!=pe.contentEditable;if(null!=de)for(var ye in de){var be=de[ye];null!=be&&("disabled"===ye||"hidden"===ye?!0===be&&(pe["aria-"+ye]=be,pe[ye]=be):pe["aria-"+ye]=be)}if(null!=fe)for(var we in fe){var xe=fe[we];null!=xe&&(pe["aria-value"+we]=xe)}if(null!=i&&(pe["aria-activedescendant"]=i),null!=s&&(pe["aria-atomic"]=s),null!=u&&(pe["aria-autocomplete"]=u),null!=g&&(pe["aria-busy"]=g),null!=v&&(pe["aria-checked"]=v),null!=y&&(pe["aria-colcount"]=y),null!=b&&(pe["aria-colindex"]=b),null!=w&&(pe["aria-colspan"]=w),null!=x&&(pe["aria-controls"]=f(x)),null!=_&&(pe["aria-current"]=_),null!=E&&(pe["aria-describedby"]=f(E)),null!=A&&(pe["aria-details"]=A),!0===me&&(pe["aria-disabled"]=!0,"button"!==e&&"form"!==e&&"input"!==e&&"select"!==e&&"textarea"!==e||(pe.disabled=!0)),null!=M&&(pe["aria-errormessage"]=M),null!=T&&(pe["aria-expanded"]=T),null!=C&&(pe["aria-flowto"]=f(C)),null!=O&&(pe["aria-haspopup"]=O),!0===R&&(pe["aria-hidden"]=R),null!=k&&(pe["aria-invalid"]=k),null!=P&&Array.isArray(P)&&(pe["aria-keyshortcuts"]=P.join(" ")),null!=L&&(pe["aria-label"]=L),null!=D&&(pe["aria-labelledby"]=f(D)),null!=I&&(pe["aria-level"]=I),null!=N&&(pe["aria-live"]="none"===N?"off":N),null!=j&&(pe["aria-modal"]=j),null!=B&&(pe["aria-multiline"]=B),null!=F&&(pe["aria-multiselectable"]=F),null!=z&&(pe["aria-orientation"]=z),null!=H&&(pe["aria-owns"]=f(H)),null!=U&&(pe["aria-placeholder"]=U),null!=V&&(pe["aria-posinset"]=V),null!=G&&(pe["aria-pressed"]=G),null!=W&&(pe["aria-readonly"]=W,"input"!==e&&"select"!==e&&"textarea"!==e||(pe.readOnly=!0)),null!=q&&(pe["aria-required"]=q,"input"!==e&&"select"!==e&&"textarea"!==e||(pe.required=!0)),null!=ge&&(pe.role="none"===ge?"presentation":ge),null!=X&&(pe["aria-roledescription"]=X),null!=Y&&(pe["aria-rowcount"]=Y),null!=K&&(pe["aria-rowindex"]=K),null!=Q&&(pe["aria-rowspan"]=Q),null!=Z&&(pe["aria-selected"]=Z),null!=J&&(pe["aria-setsize"]=J),null!=$&&(pe["aria-sort"]=$),null!=ee&&(pe["aria-valuemax"]=ee),null!=te&&(pe["aria-valuemin"]=te),null!=ne&&(pe["aria-valuenow"]=ne),null!=re&&(pe["aria-valuetext"]=re),null!=oe)for(var _e in oe)if(c.call(oe,_e)){var Ee=_e.replace(h,d),Ae=oe[_e];null!=Ae&&(pe["data-"+Ee]=Ae)}var Se=null!=ae?ae:he;!1===Se&&(pe.tabIndex="-1"),"a"===e||"button"===e||"input"===e||"select"===e||"textarea"===e?!1!==Se&&!0!==S||(pe.tabIndex="-1"):"button"===ge||"checkbox"===ge||"link"===ge||"menuitem"===ge||"radio"===ge||"textbox"===ge||"switch"===ge?!1!==Se&&(pe.tabIndex="0"):!0===Se&&(pe.tabIndex="0");var Me=o.a.compose(le&&m[le],ce),Te=("button"===ge||"link"===ge)&&!me,Ce=[("a"===e||"button"===e||"li"===e||"ul"===e||"heading"===ge)&&p.reset,Te&&p.cursor,ie],Oe=a.a.resolve(Me,Ce),Re=Oe.className,ke=Oe.style;if(null!=Re&&""!==Re&&(pe.className=Re),ke&&(pe.style=ke),null!=se&&(pe.id=se),null!=ue&&(pe["data-testid"]=ue),ve||"button"===ge||"menuitem"===ge||!0===Se&&!me){var Pe=pe.onClick;if(null!=Pe)if(me)pe.onClick=function(e){e.stopPropagation()};else if(!ve){var Le=pe.onKeyDown;pe.onKeyDown=function(e){var t=e.key,n=e.repeat,r=" "===t||"Spacebar"===t,i="button"===ge||"menuitem"===ge;null!=Le&&Le(e),n||"Enter"!==t?r&&i&&(n||Pe(e),e.preventDefault()):Pe(e)}}}return pe}},function(e,t,n){"use strict";var r=n(146),i=n(51),o={height:0,width:0};t.a=function(e){var t=e.shadowColor,n=e.shadowOffset,a=e.shadowOpacity,s=e.shadowRadius,l=n||o,c=l.height,u=l.width,h=Object(i.a)(u),d=Object(i.a)(c),f=Object(i.a)(s||0),p=Object(r.a)(t||"black",a);if(null!=p&&null!=h&&null!=d&&null!=f)return h+" "+d+" "+f+" "+p}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(0);function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){null!=t&&("function"!==typeof t?"object"!==typeof t?console.error("mergeRefs cannot handle Refs of type boolean, number or string, received ref "+String(t)):t.current=e:t(e))}))}}},function(e,t,n){"use strict";var r=n(61);t.a=function(){r.a.blurTextInput(r.a.currentlyFocusedField())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(4);function r(e){return null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(9),i=n(70),o=n(4),a=n.n(o),s=function(){function e(e){"ios"===r.a.OS&&(a()(null!=e,"`new NativeEventEmitter()` requires a non-null argument."),this._nativeModule=e)}var t=e.prototype;return t.addListener=function(e,t,n){var r,o=this;null==(r=this._nativeModule)||r.addListener(e);var a=i.a.addListener(e,t,n);return{remove:function(){var e;null!=a&&(null==(e=o._nativeModule)||e.removeListeners(1),a.remove(),a=null)}}},t.removeListener=function(e,t){var n;null==(n=this._nativeModule)||n.removeListeners(1),i.a.removeListener(e,t)},t.emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.a.emit.apply(i.a,[e].concat(n))},t.removeAllListeners=function(e){var t;a()(null!=e,"`NativeEventEmitter.removeAllListener()` requires a non-null argument."),null==(t=this._nativeModule)||t.removeListeners(this.listenerCount(e)),i.a.removeAllListeners(e)},t.listenerCount=function(e){return i.a.listenerCount(e)},e}()},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(0),i=r.createContext({scheduleUpdate:function(){throw new Error("Couldn't find a schedule context.")},flushUpdates:function(){throw new Error("Couldn't find a schedule context.")}});function o(e){var t=r.useContext(i),n=t.scheduleUpdate,o=t.flushUpdates;n(e),r.useEffect(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(){var e=r.useRef({action:[],focus:[]}).current,t=r.useCallback((function(t,n){return e[t].push(n),function(){var r=e[t].indexOf(n);e[t].splice(r,1)}}),[e]);return{listeners:e,addListener:t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(){var e=r.useRef({getState:{},beforeRemove:{}}).current,t=r.useCallback((function(t,n,r){return e[t][n]=r,function(){e[t][n]=void 0}}),[e]);return{keyedListeners:e,addKeyedListener:t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(69),o=n(40);function a(e){var t=e.key,n=e.options,a=e.navigation,s=r.useRef(n),l=r.useRef({}),c=r.useContext(o.a).onOptionsChange,u=r.useContext(i.a).addOptionsGetter,h=r.useCallback((function(){var e,t,n=null===(e=null===a||void 0===a?void 0:a.isFocused())||void 0===e||e,r=Object.keys(l.current).length;n&&!r&&c(null!==(t=s.current)&&void 0!==t?t:{})}),[a,c]);r.useEffect((function(){return s.current=n,h(),null===a||void 0===a?void 0:a.addListener("focus",h)}),[a,n,h]);var d=r.useCallback((function(){for(var e in l.current)if(l.current.hasOwnProperty(e)){var t,n,r=null===(t=(n=l.current)[e])||void 0===t?void 0:t.call(n);if(null!==r)return r}return null}),[]),f=r.useCallback((function(){var e;if(!(null===(e=null===a||void 0===a?void 0:a.isFocused())||void 0===e||e))return null;var t=d();return null!==t?t:s.current}),[a,d]);return r.useEffect((function(){return null===u||void 0===u?void 0:u(t,f)}),[f,u,t]),{addOptionsGetter:r.useCallback((function(e,t){return l.current[e]=t,h(),function(){delete l.current[e],h()}}),[h]),getCurrentOptions:f}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(20),i=n.n(r),o=n(0);function a(e){var t=o.useRef(e);o.useEffect((function(){t.current=e}));var n=o.useRef({}),r=o.useCallback((function(e){var t=function(t,r){var i=n.current[t]?n.current[t][e]:void 0;if(i){var o=i.indexOf(r);i.splice(o,1)}};return{addListener:function(r,i){return n.current[r]=n.current[r]||{},n.current[r][e]=n.current[r][e]||[],n.current[r][e].push(i),function(){return t(r,i)}},removeListener:t}}),[]),a=o.useCallback((function(e){var r,o,a,s=e.type,l=e.data,c=e.target,u=e.canPreventDefault,h=n.current[s]||{},d=void 0!==c?null===(o=h[c])||void 0===o?void 0:o.slice():(r=[]).concat.apply(r,i()(Object.keys(h).map((function(e){return h[e]})))).filter((function(e,t,n){return n.lastIndexOf(e)===t})),f={get type(){return s}};if(void 0!==c&&Object.defineProperty(f,"target",{enumerable:!0,get:function(){return c}}),void 0!==l&&Object.defineProperty(f,"data",{enumerable:!0,get:function(){return l}}),u){var p=!1;Object.defineProperties(f,{defaultPrevented:{enumerable:!0,get:function(){return p}},preventDefault:{enumerable:!0,value:function(){p=!0}}})}return null===(a=t.current)||void 0===a||a.call(t,f),null===d||void 0===d||d.forEach((function(e){return e(f)})),f}),[]);return o.useMemo((function(){return{create:r,emit:a}}),[r,a])}},function(e,t,n){"use strict";function r(e){return null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(8),i=n(19),o=n(20);function a(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=n(198),c=n(199),u=n(200),h=n(201);function d(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function f(e,t){return t.encode?t.strict?l(e):encodeURIComponent(e):e}function p(e,t){return t.decode?c(e):e}function m(e){var t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){var t=(e=m(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function v(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function y(e,t){d((t=i({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return function(t,n,r){var i="string"===typeof n&&n.includes(e.arrayFormatSeparator),o="string"===typeof n&&!i&&p(n,e).includes(e.arrayFormatSeparator);n=o?p(n,e):n;var a=i||o?n.split(e.arrayFormatSeparator).map((function(t){return p(t,e)})):null===n?n:p(n,e);r[t]=a};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),o=Object.create(null);if("string"!==typeof e)return o;if(!(e=e.trim().replace(/^[?#&]/,"")))return o;for(var s,l=a(e.split("&"));!(s=l()).done;){var c=s.value;if(""!==c){var h=u(t.decode?c.replace(/\+/g," "):c,"="),f=r(h,2),m=f[0],g=f[1];g=void 0===g?null:["comma","separator"].includes(t.arrayFormat)?g:p(g,t),n(p(m,t),g,o)}}for(var y=0,b=Object.keys(o);y<b.length;y++){var w=b[y],x=o[w];if("object"===typeof x&&null!==x)for(var _=0,E=Object.keys(x);_<E.length;_++){var A=E[_];x[A]=v(x[A],t)}else o[w]=v(x,t)}return!1===t.sort?o:(!0===t.sort?Object.keys(o).sort():Object.keys(o).sort(t.sort)).reduce((function(e,t){var n=o[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))}t.extract=g,t.parse=y,t.stringify=function(e,t){if(!e)return"";d((t=i({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);for(var n=function(n){return t.skipNull&&function(e){return null===e||void 0===e}(e[n])||t.skipEmptyString&&""===e[n]},r=function(e){switch(e.arrayFormat){case"index":return function(t){return function(n,r){var i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[[f(t,e),"[",i,"]"].join("")]:[[f(t,e),"[",f(i,e),"]=",f(r,e)].join("")])}};case"bracket":return function(t){return function(n,r){return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[[f(t,e),"[]"].join("")]:[[f(t,e),"[]=",f(r,e)].join("")])}};case"comma":case"separator":return function(t){return function(n,r){return null===r||void 0===r||0===r.length?n:0===n.length?[[f(t,e),"=",f(r,e)].join("")]:[[n,f(r,e)].join(e.arrayFormatSeparator)]}};default:return function(t){return function(n,r){return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[f(t,e)]:[[f(t,e),"=",f(r,e)].join("")])}}}}(t),a={},s=0,l=Object.keys(e);s<l.length;s++){var c=l[s];n(c)||(a[c]=e[c])}var u=Object.keys(a);return!1!==t.sort&&u.sort(t.sort),u.map((function(n){var i=e[n];return void 0===i?"":null===i?f(n,t):Array.isArray(i)?i.reduce(r(n),[]).join("&"):f(n,t)+"="+f(i,t)})).filter((function(e){return e.length>0})).join("&")},t.parseUrl=function(e,t){t=i({decode:!0},t);var n=u(e,"#"),o=r(n,2),a=o[0],s=o[1];return i({url:a.split("?")[0]||"",query:y(g(e),t)},t&&t.parseFragmentIdentifier&&s?{fragmentIdentifier:p(s,t)}:{})},t.stringifyUrl=function(e,n){n=i({encode:!0,strict:!0},n);var r=m(e.url).split("?")[0]||"",o=t.extract(e.url),a=t.parse(o,{sort:!1}),s=i(a,e.query),l=t.stringify(s,n);l&&(l="?"+l);var c=function(e){var t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(c="#"+f(e.fragmentIdentifier,n)),""+r+l+c},t.pick=function(e,n,r){r=i({parseFragmentIdentifier:!0},r);var o=t.parseUrl(e,r),a=o.url,s=o.query,l=o.fragmentIdentifier;return t.stringifyUrl({url:a,query:h(s,n),fragmentIdentifier:l},r)},t.exclude=function(e,n,r){var i=Array.isArray(n)?function(e){return!n.includes(e)}:function(e,t){return!n(e,t)};return t.pick(e,i,r)}},function(e,t,n){"use strict";function r(e){var t=!1;if(e&&(t=Object.keys(e).some((function(e){return"screens"!==e&&"initialRouteName"!==e})))&&(e.hasOwnProperty("screens")||e.hasOwnProperty("initialRouteName")))throw new Error("Found invalid keys in the configuration object. See https://reactnavigation.org/docs/configuring-links/ for more details on the shape of the configuration object.");return t?[t,{screens:e}]:[t,e]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(88),o=r.createContext(i.a);o.displayName="ThemeContext",t.a=o},function(e,t,n){"use strict";function r(e){return null!=e&&"object"===typeof e&&!0===e["@@functional/placeholder"]}function i(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}n.d(t,"a",(function(){return v}));var o=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function a(e){return"[object String]"===Object.prototype.toString.call(e)}var s=i((function(e){return!!o(e)||!!e&&("object"===typeof e&&(!a(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}));"undefined"!==typeof Symbol&&Symbol.iterator;function l(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var c=Object.prototype.toString,u=function(){return"[object Arguments]"===c.call(arguments)?function(e){return"[object Arguments]"===c.call(e)}:function(e){return l("callee",e)}},h=!{toString:null}.propertyIsEnumerable("toString"),d=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],f=function(){return arguments.propertyIsEnumerable("length")}(),p=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};Object.keys;Number.isInteger;function m(e){return function t(n){for(var r,i,o,a=[],l=0,c=n.length;l<c;){if(s(n[l]))for(o=0,i=(r=e?t(n[l]):n[l]).length;o<i;)a[a.length]=r[o],o+=1;else a[a.length]=n[l];l+=1}return a}}var g=function(e){return(e<10?"0":"")+e};Date.prototype.toISOString;var v=i(m(!0));"function"===typeof Object.assign&&Object.assign;var y="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";String.prototype.trim},function(e,t,n){"use strict";var r=function(e){return"currentcolor"===e||"currentColor"===e||"inherit"===e||0===e.indexOf("var(")},i=n(115);t.a=function(e,t){if(void 0===t&&(t=1),null!=e){if("string"===typeof e&&r(e))return e;var n=Object(i.a)(e);if(null!=n)return"rgba("+(n>>16&255)+","+(n>>8&255)+","+(255&n)+","+((n>>24&255)/255*t).toFixed(2)+")"}}},function(t,n,r){"use strict";r.r(n);var i=r(2),o=r(84),a=r(464),s=r(465),l=r(466),c=r(467),u=r(246),h=r.n(u),d=r(247),f=r.n(d),p=r(54),m=r(11),g=r(461),v=r(462),y=r(107);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){if(e){if("string"===typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t,n){var r=n.objBindAttr,i=void 0===r?"__obj":r,o=n.dataBindAttr,a=void 0===o?"__data":o,s=n.idAccessor,l=n.purge,c=void 0!==l&&l,u=function(e){return e.hasOwnProperty(a)},h=t.filter((function(e){return!u(e)})),d=t.filter(u).map((function(e){return e[a]})),f=c?{enter:e,exit:d,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var i=Object(y.a)(e,n,!1),o=Object(y.a)(t,n,!1),a=Object.assign({},i,o);Object.entries(a).forEach((function(e){var t=_(e,2),n=t[0],a=t[1],s=i.hasOwnProperty(n)?o.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[i[n],o[n]]:a)}))}else{var s=new Set(e),l=new Set(t);new Set([].concat(E(s),E(l))).forEach((function(e){var t=s.has(e)?l.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)}))}return r}(d,e,s);return f.update=f.update.map((function(e){var t=_(e,2),n=t[0],r=t[1];return n!==r&&(r[i]=n[i],r[i][a]=r),r})),f.exit=f.exit.concat(h.map((function(e){return w({},i,e)}))),f}var T=function(e,t,n,r,i){var o=i.createObj,a=void 0===o?function(e){return{}}:o,s=i.updateObj,l=void 0===s?function(e,t){}:s,c=i.exitObj,u=void 0===c?function(e){}:c,h=i.objBindAttr,d=void 0===h?"__obj":h,f=i.dataBindAttr,p=void 0===f?"__data":f,m=x(i,["createObj","updateObj","exitObj","objBindAttr","dataBindAttr"]),g=M(e,t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({objBindAttr:d,dataBindAttr:p},m)),v=g.enter,y=g.update;g.exit.forEach((function(e){var t=e[d];delete e[d],u(t),r(t)}));var _=function(e){var t=[];return e.forEach((function(e){var n=a(e);n&&(n[p]=e,e[d]=n,t.push(n))})),t}(v);!function(e){e.forEach((function(e){var t=e[d];t&&(t[p]=e,l(t,e))}))}([].concat(E(v),E(y))),_.forEach(n)},C=r(475),O=r(477),R=r(108),k=r.n(R);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){return(D="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function H(e,t,n){return(H=z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&F(i,n.prototype),i}).apply(null,arguments)}function U(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?V(e):t}function W(e){var t=z();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return G(this,n)}}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){if(e){if("string"===typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Q=function e(t){t.geometry&&t.geometry.dispose(),t.material&&function e(t){t instanceof Array?t.forEach(e):(t.map&&t.map.dispose(),t.dispose())}(t.material),t.texture&&t.texture.dispose(),t.children&&t.children.forEach(e)},Z=function(e){for(;e.children.length;){var t=e.children[0];e.remove(t),Q(t)}},J=["objFilter"];function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.objFilter,i=void 0===r?function(){return!0}:r,o=U(n,J);return T(e,t.children.filter(i),(function(e){return t.add(e)}),(function(e){t.remove(e),Z(e)}),L({objBindAttr:"__threeObj"},o))}var ee=function(e){return isNaN(e)?parseInt(k()(e).toHex(),16):e},te=function(e){return isNaN(e)?k()(e).getAlpha():1},ne=Object(C.a)(O.a);function re(e,t,n){t&&"string"===typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=ne(t(e))}))}var ie=window.THREE?window.THREE:{Group:i.n,Mesh:i.t,MeshLambertMaterial:i.v,Color:i.g,BufferGeometry:i.e,BufferAttribute:i.d,Matrix4:i.s,Vector3:i.Q,SphereBufferGeometry:i.F,CylinderBufferGeometry:i.j,TubeBufferGeometry:i.N,ConeBufferGeometry:i.h,Line:i.o,LineBasicMaterial:i.p,QuadraticBezierCurve3:i.z,CubicBezierCurve3:i.i,Box3:i.c},oe={graph:h.a,forcelayout:f.a},ae=(new ie.BufferGeometry).setAttribute?"setAttribute":"addAttribute",se=(new ie.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix";var le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=function(t){j(i,t);var r=W(i);function i(){var t;I(this,i);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return(t=r.call.apply(r,[this].concat(a))).__kapsuleInstance=e().apply(void 0,[].concat(X(n?[V(t)]:[]),a)),t}return i}(t);return Object.keys(e()).forEach((function(e){return r.prototype[e]=function(){var t,n=(t=this.__kapsuleInstance)[e].apply(t,arguments);return n===this.__kapsuleInstance?this:n}})),r}(Object(p.a)({props:{jsonUrl:{onChange:function(e,t){var n=this;e&&!t.fetchingJson&&(t.fetchingJson=!0,t.onLoading(),fetch(e).then((function(e){return e.json()})).then((function(e){t.fetchingJson=!1,t.onFinishLoading(e),n.graphData(e)})))},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},numDimensions:{default:3,onChange:function(e,t){var n=t.d3ForceLayout.force("charge");function r(e,t){e.forEach((function(e){delete e[t],delete e["v".concat(t)]}))}n&&n.strength(e>2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y")}},dagMode:{onChange:function(e,t){!e&&"d3"===t.forceEngine&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=e.fz=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,n){return void 0===n?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t="ngraph"!==e.forceEngine;return e.engineRunning&&function(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||t&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.layout[t?"tick":"step"](),e.onEngineTick());e.graphData.nodes.forEach((function(n){var r=n.__threeObj;if(r){var i=t?n:e.layout.getNodePosition(n[e.nodeId]);r.position.x=i.x,r.position.y=i.y||0,r.position.z=i.z||0}}));var n=Object(m.default)(e.linkWidth),r=Object(m.default)(e.linkCurvature),i=Object(m.default)(e.linkCurveRotation),o=Object(m.default)(e.linkThreeObjectExtend);e.graphData.links.forEach((function(a){var s=a.__lineObj;if(s){var l=t?a:e.layout.getLinkPosition(e.layout.graph.getLink(a.source,a.target).id),c=l[t?"source":"from"],u=l[t?"target":"to"];if(c&&u&&c.hasOwnProperty("x")&&u.hasOwnProperty("x")){!function(n){var o=t?n:e.layout.getLinkPosition(e.layout.graph.getLink(n.source,n.target).id),a=o[t?"source":"from"],s=o[t?"target":"to"];if(a&&s&&a.hasOwnProperty("x")&&s.hasOwnProperty("x")){var l=r(n);if(l){var c,u=new ie.Vector3(a.x,a.y||0,a.z||0),h=new ie.Vector3(s.x,s.y||0,s.z||0),d=u.distanceTo(h),f=i(n);if(d>0){var p=s.x-a.x,m=s.y-a.y||0,g=(new ie.Vector3).subVectors(h,u),v=g.clone().multiplyScalar(l).cross(0!==p||0!==m?new ie.Vector3(0,0,1):new ie.Vector3(0,1,0)).applyAxisAngle(g.normalize(),f).add((new ie.Vector3).addVectors(u,h).divideScalar(2));c=new ie.QuadraticBezierCurve3(u,v,h)}else{var y=70*l,b=-f,w=b+Math.PI/2;c=new ie.CubicBezierCurve3(u,new ie.Vector3(y*Math.cos(w),y*Math.sin(w),0).add(u),new ie.Vector3(y*Math.cos(b),y*Math.sin(b),0).add(u),h)}n.__curve=c}else n.__curve=null}}(a);var h=o(a);if(!e.linkPositionUpdate||!e.linkPositionUpdate(h?s.children[1]:s,{start:{x:c.x,y:c.y,z:c.z},end:{x:u.x,y:u.y,z:u.z}},a)||h){var d=a.__curve,f=s.children.length?s.children[0]:s;if("Line"===f.type){if(d)f.geometry.setFromPoints(d.getPoints(30));else{var p=f.geometry.getAttribute("position");p&&p.array&&6===p.array.length||f.geometry[ae]("position",p=new ie.BufferAttribute(new Float32Array(6),3)),p.array[0]=c.x,p.array[1]=c.y||0,p.array[2]=c.z||0,p.array[3]=u.x,p.array[4]=u.y||0,p.array[5]=u.z||0,p.needsUpdate=!0}f.geometry.computeBoundingSphere()}else if("Mesh"===f.type)if(d){f.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(f.position.set(0,0,0),f.rotation.set(0,0,0),f.scale.set(1,1,1));var m=Math.ceil(10*n(a))/10/2,g=new ie.TubeBufferGeometry(d,30,m,e.linkResolution,!1);f.geometry.dispose(),f.geometry=g}else{if(!f.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var v=Math.ceil(10*n(a))/10/2,y=new ie.CylinderBufferGeometry(v,v,1,e.linkResolution,1,!1);y[se]((new ie.Matrix4).makeTranslation(0,.5,0)),y[se]((new ie.Matrix4).makeRotationX(Math.PI/2)),f.geometry.dispose(),f.geometry=y}var b=new ie.Vector3(c.x,c.y||0,c.z||0),w=new ie.Vector3(u.x,u.y||0,u.z||0),x=b.distanceTo(w);f.position.x=b.x,f.position.y=b.y,f.position.z=b.z,f.scale.z=x,f.parent.localToWorld(w),f.lookAt(w)}}}}}))}(),function(){var n=Object(m.default)(e.linkDirectionalArrowRelPos),r=Object(m.default)(e.linkDirectionalArrowLength),i=Object(m.default)(e.nodeVal);e.graphData.links.forEach((function(o){var a=o.__arrowObj;if(a){var s=t?o:e.layout.getLinkPosition(e.layout.graph.getLink(o.source,o.target).id),l=s[t?"source":"from"],c=s[t?"target":"to"];if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=Math.sqrt(Math.max(0,i(l)||1))*e.nodeRelSize,h=Math.sqrt(Math.max(0,i(c)||1))*e.nodeRelSize,d=r(o),f=n(o),p=o.__curve?function(e){return o.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",l,c,e),y:t("y",l,c,e),z:t("z",l,c,e)}},m=o.__curve?o.__curve.getLength():Math.sqrt(["x","y","z"].map((function(e){return Math.pow((c[e]||0)-(l[e]||0),2)})).reduce((function(e,t){return e+t}),0)),g=u+d+(m-u-h-d)*f,v=p(g/m),y=p((g-d)/m);["x","y","z"].forEach((function(e){return a.position[e]=y[e]}));var b=H(ie.Vector3,X(["x","y","z"].map((function(e){return v[e]}))));a.parent.localToWorld(b),a.lookAt(b)}}}))}(),function(){var n=Object(m.default)(e.linkDirectionalParticleSpeed);e.graphData.links.forEach((function(r){var i=r.__photonsObj&&r.__photonsObj.children,o=r.__singleHopPhotonsObj&&r.__singleHopPhotonsObj.children;if(o&&o.length||i&&i.length){var a=t?r:e.layout.getLinkPosition(e.layout.graph.getLink(r.source,r.target).id),s=a[t?"source":"from"],l=a[t?"target":"to"];if(s&&l&&s.hasOwnProperty("x")&&l.hasOwnProperty("x")){var c=n(r),u=r.__curve?function(e){return r.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",s,l,e),y:t("y",s,l,e),z:t("z",s,l,e)}};[].concat(X(i||[]),X(o||[])).forEach((function(e,t){var n="singleHopPhotons"===e.parent.__linkThreeObjType;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=n?0:t/i.length),e.__progressRatio+=c,e.__progressRatio>=1){if(n)return e.parent.remove(e),void Z(e);e.__progressRatio=e.__progressRatio%1}var r=e.__progressRatio,o=u(r);["x","y","z"].forEach((function(t){return e.position[t]=o[t]}))}))}}}))}(),this},emitParticle:function(e,t){if(t){if(!t.__singleHopPhotonsObj){var n=new ie.Group;n.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=n,e.graphScene.add(n)}var r=Object(m.default)(e.linkDirectionalParticleWidth),i=Math.ceil(10*r(t))/10/2,o=e.linkDirectionalParticleResolution,a=new ie.SphereBufferGeometry(i,o,o),s=Object(m.default)(e.linkColor),l=Object(m.default)(e.linkDirectionalParticleColor)(t)||s(t)||"#f0f0f0",c=new ie.Color(ee(l)),u=3*e.linkOpacity,h=new ie.MeshLambertMaterial({color:c,transparent:!0,opacity:u});t.__singleHopPhotonsObj.add(new ie.Mesh(a,h))}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(!e.initialised)return null;var n=function e(n){var r=[];if(n.geometry){n.geometry.computeBoundingBox();var i=new ie.Box3;i.copy(n.geometry.boundingBox).applyMatrix4(n.matrixWorld),r.push(i)}return r.concat.apply(r,X((n.children||[]).filter((function(e){return!e.hasOwnProperty("__graphObjType")||"node"===e.__graphObjType&&t(e.__data)})).map(e)))}(e.graphScene);return n.length?Object.assign.apply(Object,X(["x","y","z"].map((function(e){return N({},e,[Object(g.a)(n,(function(t){return t.min[e]})),Object(v.a)(n,(function(t){return t.max[e]}))])})))):null}},stateInit:function(){return{d3ForceLayout:Object(o.a)().force("link",Object(a.a)()).force("charge",Object(s.a)()).force("center",Object(l.a)()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e},update:function(e,t){var n=function(e){return e.some((function(e){return t.hasOwnProperty(e)}))};if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&n(["nodeAutoColorBy","graphData","nodeColor"])&&re(e.graphData.nodes,Object(m.default)(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&n(["linkAutoColorBy","graphData","linkColor"])&&re(e.graphData.links,Object(m.default)(e.linkAutoColorBy),e.linkColor),e._flushObjects||n(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=Object(m.default)(e.nodeThreeObject),i=Object(m.default)(e.nodeThreeObjectExtend),o=Object(m.default)(e.nodeVal),a=Object(m.default)(e.nodeColor),s=Object(m.default)(e.nodeVisibility),l={},u={};$(e.graphData.nodes.filter(s),e.graphScene,{purge:e._flushObjects||n(["nodeThreeObject","nodeThreeObjectExtend"]),objFilter:function(e){return"node"===e.__graphObjType},createObj:function(t){var n,o=r(t),a=i(t);return o&&e.nodeThreeObject===o&&(o=o.clone()),o&&!a?n=o:((n=new ie.Mesh).__graphDefaultObj=!0,o&&a&&n.add(o)),n.__graphObjType="node",n},updateObj:function(t,n){if(t.__graphDefaultObj){var r=o(n)||1,i=Math.cbrt(r)*e.nodeRelSize,s=e.nodeResolution;t.geometry.type.match(/^Sphere(Buffer)?Geometry$/)&&t.geometry.parameters.radius===i&&t.geometry.parameters.widthSegments===s||(l.hasOwnProperty(r)||(l[r]=new ie.SphereBufferGeometry(i,s,s)),t.geometry.dispose(),t.geometry=l[r]);var c=a(n),h=new ie.Color(ee(c||"#ffffaa")),d=e.nodeOpacity*te(c);"MeshLambertMaterial"===t.material.type&&t.material.color.equals(h)&&t.material.opacity===d||(u.hasOwnProperty(c)||(u[c]=new ie.MeshLambertMaterial({color:h,transparent:!0,opacity:d})),t.material.dispose(),t.material=u[c])}}})}if(e._flushObjects||n(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution"])){var h=Object(m.default)(e.linkThreeObject),d=Object(m.default)(e.linkThreeObjectExtend),f=Object(m.default)(e.linkMaterial),p=Object(m.default)(e.linkVisibility),g=Object(m.default)(e.linkColor),v=Object(m.default)(e.linkWidth),y={},b={},w={},x=e.graphData.links.filter(p);if($(x,e.graphScene,{objBindAttr:"__lineObj",purge:e._flushObjects||n(["linkThreeObject","linkThreeObjectExtend","linkWidth"]),objFilter:function(e){return"link"===e.__graphObjType},createObj:function(t){var n,r,i=h(t),o=d(t);if(i&&e.linkThreeObject===i&&(i=i.clone()),!i||o)if(!!v(t))n=new ie.Mesh;else{var a=new ie.BufferGeometry;a[ae]("position",new ie.BufferAttribute(new Float32Array(6),3)),n=new ie.Line(a)}return i?o?((r=new ie.Group).__graphDefaultObj=!0,r.add(n),r.add(i)):r=i:(r=n).__graphDefaultObj=!0,r.renderOrder=10,r.__graphObjType="link",r},updateObj:function(t,n){if(t.__graphDefaultObj){var r=t.children.length?t.children[0]:t,i=Math.ceil(10*v(n))/10,o=!!i;if(o){var a=i/2,s=e.linkResolution;if(!r.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||r.geometry.parameters.radiusTop!==a||r.geometry.parameters.radialSegments!==s){if(!y.hasOwnProperty(i)){var l=new ie.CylinderBufferGeometry(a,a,1,s,1,!1);l[se]((new ie.Matrix4).makeTranslation(0,.5,0)),l[se]((new ie.Matrix4).makeRotationX(Math.PI/2)),y[i]=l}r.geometry.dispose(),r.geometry=y[i]}}var c=f(n);if(c)r.material=c;else{var u=g(n),h=new ie.Color(ee(u||"#f0f0f0")),d=e.linkOpacity*te(u),p=o?"MeshLambertMaterial":"LineBasicMaterial";if(r.material.type!==p||!r.material.color.equals(h)||r.material.opacity!==d){var m=o?b:w;m.hasOwnProperty(u)||(m[u]=new ie[p]({color:h,transparent:d<1,opacity:d,depthWrite:d>=1})),r.material.dispose(),r.material=m[u]}}}}}),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var _=Object(m.default)(e.linkDirectionalArrowLength),E=Object(m.default)(e.linkDirectionalArrowColor);$(x.filter(_),e.graphScene,{objBindAttr:"__arrowObj",objFilter:function(e){return"arrow"===e.__linkThreeObjType},createObj:function(){var e=new ie.Mesh(void 0,new ie.MeshLambertMaterial({transparent:!0}));return e.__linkThreeObjType="arrow",e},updateObj:function(t,n){var r=_(n),i=e.linkDirectionalArrowResolution;if(!t.geometry.type.match(/^Cone(Buffer)?Geometry$/)||t.geometry.parameters.height!==r||t.geometry.parameters.radialSegments!==i){var o=new ie.ConeBufferGeometry(.25*r,r,i);o.translate(0,r/2,0),o.rotateX(Math.PI/2),t.geometry.dispose(),t.geometry=o}t.material.color=new ie.Color(E(n)||g(n)||"#f0f0f0"),t.material.opacity=3*e.linkOpacity}})}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var A=Object(m.default)(e.linkDirectionalParticles),S=Object(m.default)(e.linkDirectionalParticleWidth),M=Object(m.default)(e.linkDirectionalParticleColor),T={},C={};$(x.filter(A),e.graphScene,{objBindAttr:"__photonsObj",objFilter:function(e){return"photons"===e.__linkThreeObjType},createObj:function(){var e=new ie.Group;return e.__linkThreeObjType="photons",e},updateObj:function(t,n){var r,i=Math.round(Math.abs(A(n))),o=!!t.children.length&&t.children[0],a=Math.ceil(10*S(n))/10/2,s=e.linkDirectionalParticleResolution;o&&o.geometry.parameters.radius===a&&o.geometry.parameters.widthSegments===s?r=o.geometry:(C.hasOwnProperty(a)||(C[a]=new ie.SphereBufferGeometry(a,s,s)),r=C[a],o&&o.geometry.dispose());var l,c=M(n)||g(n)||"#f0f0f0",u=new ie.Color(ee(c)),h=3*e.linkOpacity;o&&o.material.color.equals(u)&&o.material.opacity===h?l=o.material:(T.hasOwnProperty(c)||(T[c]=new ie.MeshLambertMaterial({color:u,transparent:!0,opacity:h})),l=T[c],o&&o.material.dispose()),$(X(new Array(i)).map((function(e,t){return{idx:t}})),t,{idAccessor:function(e){return e.idx},createObj:function(){return new ie.Mesh(r,l)},updateObj:function(e){e.geometry=r,e.material=l}})}})}}if(e._flushObjects=!1,n(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]}));var O,R="ngraph"!==e.forceEngine;if(R){(O=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var k=e.d3ForceLayout.force("link");k&&k.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var P=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.nodeFilter,a=void 0===o?function(){return!0}:o,s=i.onLoopError,l=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};n.forEach((function(e){return c[t(e)]={data:e,out:[],depth:-1,skip:!a(e)}})),r.forEach((function(e){var n=e.source,r=e.target,i=l(n),o=l(r);if(!c.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!c.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var a=c[i],s=c[o];function l(e){return"object"===D(e)?t(e):e}a.out.push(s)}));var u=[];d(Object.values(c));var h=Object.assign.apply(Object,[{}].concat(X(Object.entries(c).filter((function(e){return!q(e,2)[1].skip})).map((function(e){var t=q(e,2);return N({},t[0],t[1].depth)})))));return h;function d(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,o=e.length;i<o;i++){var a=e[i];if(-1!==n.indexOf(a)){var s=function(){var e=[].concat(X(n.slice(n.indexOf(a))),[a]).map((function(e){return t(e.data)}));return u.some((function(t){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}))||(u.push(e),l(e)),"continue"}();if("continue"===s)continue}r>a.depth&&(a.depth=r,d(a.out,[].concat(X(n),[a]),r+(a.skip?0:1)))}}}(e.graphData,(function(t){return t[e.nodeId]}),{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),I=Math.max.apply(Math,X(Object.values(P||[]))),j=e.dagLevelDistance||e.graphData.nodes.length/(I||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(e.dagMode){var B=function(t,n){return function(r){return t?(P[r[e.nodeId]]-I/2)*j*(n?-1:1):void 0}},F=B(-1!==["lr","rl"].indexOf(e.dagMode),"rl"===e.dagMode),z=B(-1!==["td","bu"].indexOf(e.dagMode),"td"===e.dagMode),H=B(-1!==["zin","zout"].indexOf(e.dagMode),"zout"===e.dagMode);e.graphData.nodes.filter(e.dagNodeFilter).forEach((function(e){e.fx=F(e),e.fy=z(e),e.fz=H(e)}))}e.d3ForceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?Object(c.a)((function(t){var n=P[t[e.nodeId]]||-1;return("radialin"===e.dagMode?I-n:n)*j})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null)}else{var U=oe.graph();e.graphData.nodes.forEach((function(t){U.addNode(t[e.nodeId])})),e.graphData.links.forEach((function(e){U.addLink(e.source,e.target)})),(O=oe.forcelayout(U,L({dimensions:e.numDimensions},e.ngraphPhysics))).graph=U}for(var V=0;V<e.warmupTicks&&!(R&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin);V++)O[R?"tick":"step"]();e.layout=O,this.resetCountdown()}e.engineRunning=!0,e.onFinishUpdate()}}),(window.THREE?window.THREE:{Group:i.n}).Group,!0);n.default=le},,,,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(l[s[h]]=n[s[h]])}}return l}},function(e,t){e.exports=function(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");for(var t=["on","fire","off"],n=0;n<t.length;++n)if(e.hasOwnProperty(t[n]))throw new Error("Subject cannot be eventified, since it already has property '"+t[n]+"'")}(e);var t=function(e){var t=Object.create(null);return{on:function(n,r,i){if("function"!==typeof r)throw new Error("callback is expected to be a function");var o=t[n];return o||(o=t[n]=[]),o.push({callback:r,ctx:i}),e},off:function(n,r){if("undefined"===typeof n)return t=Object.create(null),e;if(t[n])if("function"!==typeof r)delete t[n];else for(var i=t[n],o=0;o<i.length;++o)i[o].callback===r&&i.splice(o,1);return e},fire:function(n){var r,i=t[n];if(!i)return e;arguments.length>1&&(r=Array.prototype.splice.call(arguments,1));for(var o=0;o<i.length;++o){var a=i[o];a.callback.apply(a.ctx,r)}return e}}}(e);return e.on=t.on,e.off=t.off,e.fire=t.fire,e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return d}));var r=n(20),i=n.n(r),o=n(6),a=n.n(o),s=n(41),l=n(102);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={replace:function(e,t){return{type:"REPLACE",payload:{name:e,params:t}}},push:function(e,t){return{type:"PUSH",payload:{name:e,params:t}}},pop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{type:"POP",payload:{count:e}}},popToTop:function(){return{type:"POP_TO_TOP"}}};function d(e){var t=u(u({},l.a),{},{type:"stack",getInitialState:function(t){var n=t.routeNames,r=t.routeParamList,i=void 0!==e.initialRouteName&&n.includes(e.initialRouteName)?e.initialRouteName:n[0];return{stale:!1,type:"stack",key:"stack-".concat(Object(s.a)()),index:0,routeNames:n,routes:[{key:"".concat(i,"-").concat(Object(s.a)()),name:i,params:r[i]}]}},getRehydratedState:function(t,n){var r=n.routeNames,i=n.routeParamList,o=t;if(!1===o.stale)return o;var a=o.routes.filter((function(e){return r.includes(e.name)})).map((function(e){return u(u({},e),{},{key:e.key||"".concat(e.name,"-").concat(Object(s.a)()),params:void 0!==i[e.name]?u(u({},i[e.name]),e.params):e.params})}));if(0===a.length){var l=void 0!==e.initialRouteName?e.initialRouteName:r[0];a.push({key:"".concat(l,"-").concat(Object(s.a)()),name:l,params:i[l]})}return{stale:!1,type:"stack",key:"stack-".concat(Object(s.a)()),index:a.length-1,routeNames:r,routes:a}},getStateForRouteNamesChange:function(t,n){var r=n.routeNames,i=n.routeParamList,o=t.routes.filter((function(e){return r.includes(e.name)}));if(0===o.length){var a=void 0!==e.initialRouteName&&r.includes(e.initialRouteName)?e.initialRouteName:r[0];o.push({key:"".concat(a,"-").concat(Object(s.a)()),name:a,params:i[a]})}return u(u({},t),{},{routeNames:r,routes:o,index:Math.min(t.index,o.length-1)})},getStateForRouteFocus:function(e,t){var n=e.routes.findIndex((function(e){return e.key===t}));return-1===n||n===e.index?e:u(u({},e),{},{index:n,routes:e.routes.slice(0,n+1)})},getStateForAction:function(e,n,r){var o=r.routeParamList;switch(n.type){case"REPLACE":var a=n.target===e.key&&n.source?e.routes.findIndex((function(e){return e.key===n.source})):e.index;if(-1===a)return null;var c=n.payload,h=c.name,d=c.key,f=c.params;return e.routeNames.includes(h)?u(u({},e),{},{routes:e.routes.map((function(e,t){return t===a?{key:void 0!==d?d:"".concat(h,"-").concat(Object(s.a)()),name:h,params:void 0!==o[h]?u(u({},o[h]),f):f}:e}))}):null;case"PUSH":if(e.routeNames.includes(n.payload.name)){var p,m,g=r.routeGetIdList[n.payload.name],v=null===g||void 0===g?void 0:g({params:n.payload.params}),y=n.payload.name&&n.payload.key?e.routes.find((function(e){return e.name===n.payload.name&&e.key===n.payload.key})):v?e.routes.find((function(e){return e.name===n.payload.name&&v===(null===g||void 0===g?void 0:g({params:e.params}))})):void 0;if(y)(p=e.routes.filter((function(e){return e.key!==y.key}))).push(u(u({},y),{},{params:void 0!==n.payload.params?u(u({},y.params),n.payload.params):y.params}));else p=[].concat(i()(e.routes),[{key:null!==(m=n.payload.key)&&void 0!==m?m:"".concat(n.payload.name,"-").concat(Object(s.a)()),name:n.payload.name,params:void 0!==o[n.payload.name]?u(u({},o[n.payload.name]),n.payload.params):n.payload.params}]);return u(u({},e),{},{index:p.length-1,routes:p})}return null;case"POP":var b=n.target===e.key&&n.source?e.routes.findIndex((function(e){return e.key===n.source})):e.index;if(b>0){var w=Math.max(b-n.payload.count+1,1),x=e.routes.slice(0,w).concat(e.routes.slice(b+1));return u(u({},e),{},{index:x.length-1,routes:x})}return null;case"POP_TO_TOP":return t.getStateForAction(e,{type:"POP",payload:{count:e.routes.length-1}},r);case"NAVIGATE":if(void 0!==n.payload.name&&!e.routeNames.includes(n.payload.name))return null;if(n.payload.key||n.payload.name){var _=-1,E=void 0===n.payload.key&&void 0!==n.payload.name?r.routeGetIdList[n.payload.name]:void 0,A=null===E||void 0===E?void 0:E({params:n.payload.params});if(A)_=e.routes.findIndex((function(e){return e.name===n.payload.name&&A===(null===E||void 0===E?void 0:E({params:e.params}))}));else if(e.routes[e.index].name===n.payload.name&&void 0===n.payload.key||e.routes[e.index].key===n.payload.key)_=e.index;else for(var S=e.routes.length-1;S>=0;S--)if(e.routes[S].name===n.payload.name&&void 0===n.payload.key||e.routes[S].key===n.payload.key){_=S;break}if(-1===_&&n.payload.key&&void 0===n.payload.name)return null;if(-1===_&&void 0!==n.payload.name){var M,T=[].concat(i()(e.routes),[{key:null!==(M=n.payload.key)&&void 0!==M?M:"".concat(n.payload.name,"-").concat(Object(s.a)()),name:n.payload.name,params:void 0!==o[n.payload.name]?u(u({},o[n.payload.name]),n.payload.params):n.payload.params}]);return u(u({},e),{},{routes:T,index:T.length-1})}var C,O=e.routes[_];return C=!1===n.payload.merge?void 0!==o[O.name]?u(u({},o[O.name]),n.payload.params):n.payload.params:n.payload.params?u(u({},O.params),n.payload.params):O.params,u(u({},e),{},{index:_,routes:[].concat(i()(e.routes.slice(0,_)),[C!==O.params?u(u({},O),{},{params:C}):e.routes[_]])})}return null;case"GO_BACK":return e.index>0?t.getStateForAction(e,{type:"POP",payload:{count:1},target:n.target,source:n.source},r):null;default:return l.a.getStateForAction(e,n)}},actionCreators:h});return t}},function(e,t,n){var r=n(57),i=n(39),o=n(112);e.exports=function(e){return function t(n,a,s){switch(arguments.length){case 0:return t;case 1:return o(n)?t:i((function(t,r){return e(n,t,r)}));case 2:return o(n)&&o(a)?t:o(n)?i((function(t,n){return e(t,a,n)})):o(a)?i((function(t,r){return e(n,t,r)})):r((function(t){return e(n,a,t)}));default:return o(n)&&o(a)&&o(s)?t:o(n)&&o(a)?i((function(t,n){return e(t,n,s)})):o(n)&&o(s)?i((function(t,n){return e(t,a,n)})):o(a)&&o(s)?i((function(t,r){return e(n,t,r)})):o(n)?r((function(t){return e(t,a,s)})):o(a)?r((function(t){return e(n,t,s)})):o(s)?r((function(t){return e(n,a,t)})):e(n,a,s)}}}},function(e,t){e.exports=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){var r=n(157);e.exports=function(e,t){return function(){var n=arguments.length;if(0===n)return t();var i=arguments[n-1];return r(i)||"function"!==typeof i[e]?t.apply(this,arguments):i[e].apply(i,Array.prototype.slice.call(arguments,0,n-1))}}},function(e,t,n){var r=n(57),i=n(114),o=n(391),a=!{toString:null}.propertyIsEnumerable("toString"),s=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],l=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),c=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},u=r("function"!==typeof Object.keys||l?function(e){if(Object(e)!==e)return[];var t,n,r=[],u=l&&o(e);for(t in e)!i(t,e)||u&&"length"===t||(r[r.length]=t);if(a)for(n=s.length-1;n>=0;)i(t=s[n],e)&&!c(r,t)&&(r[r.length]=t),n-=1;return r}:function(e){return Object(e)!==e?[]:Object.keys(e)});e.exports=u},function(t,n,r){"use strict";r.r(n),r.d(n,"unstable_createElement",(function(){return i.a})),r.d(n,"findNodeHandle",(function(){return o.a})),r.d(n,"processColor",(function(){return a.a})),r.d(n,"render",(function(){return s.a})),r.d(n,"unmountComponentAtNode",(function(){return l.a})),r.d(n,"NativeModules",(function(){return c.a})),r.d(n,"AccessibilityInfo",(function(){return m})),r.d(n,"Alert",(function(){return g})),r.d(n,"Animated",(function(){return v.a})),r.d(n,"Appearance",(function(){return w})),r.d(n,"AppRegistry",(function(){return x.a})),r.d(n,"AppState",(function(){return D})),r.d(n,"BackHandler",(function(){return N.a})),r.d(n,"Clipboard",(function(){return j})),r.d(n,"DeviceInfo",(function(){return F})),r.d(n,"Dimensions",(function(){return B.a})),r.d(n,"Easing",(function(){return z.a})),r.d(n,"I18nManager",(function(){return H.a})),r.d(n,"Keyboard",(function(){return U.a})),r.d(n,"InteractionManager",(function(){return V.a})),r.d(n,"LayoutAnimation",(function(){return K})),r.d(n,"Linking",(function(){return $})),r.d(n,"NativeEventEmitter",(function(){return ee})),r.d(n,"PanResponder",(function(){return de})),r.d(n,"PixelRatio",(function(){return fe.a})),r.d(n,"Platform",(function(){return G.a})),r.d(n,"Share",(function(){return me})),r.d(n,"StyleSheet",(function(){return ge.a})),r.d(n,"UIManager",(function(){return W.a})),r.d(n,"Vibration",(function(){return ye})),r.d(n,"ActivityIndicator",(function(){return Ce})),r.d(n,"Button",(function(){return Le})),r.d(n,"CheckBox",(function(){return ze})),r.d(n,"FlatList",(function(){return He.a})),r.d(n,"Image",(function(){return Ue.a})),r.d(n,"ImageBackground",(function(){return qe})),r.d(n,"KeyboardAvoidingView",(function(){return Xe.a})),r.d(n,"Modal",(function(){return gt})),r.d(n,"Picker",(function(){return Et})),r.d(n,"Pressable",(function(){return mn})),r.d(n,"ProgressBar",(function(){return bn})),r.d(n,"RefreshControl",(function(){return wn.a})),r.d(n,"SafeAreaView",(function(){return xn.a})),r.d(n,"ScrollView",(function(){return _n.a})),r.d(n,"SectionList",(function(){return En.a})),r.d(n,"StatusBar",(function(){return An.a})),r.d(n,"Switch",(function(){return Sn.a})),r.d(n,"Text",(function(){return Re.a})),r.d(n,"TextInput",(function(){return Mn.a})),r.d(n,"Touchable",(function(){return fr})),r.d(n,"TouchableHighlight",(function(){return pr.a})),r.d(n,"TouchableNativeFeedback",(function(){return mr.a})),r.d(n,"TouchableOpacity",(function(){return Oe.a})),r.d(n,"TouchableWithoutFeedback",(function(){return gr.a})),r.d(n,"View",(function(){return xe.a})),r.d(n,"VirtualizedList",(function(){return vr})),r.d(n,"YellowBox",(function(){return wr})),r.d(n,"LogBox",(function(){return xr.a})),r.d(n,"DrawerLayoutAndroid",(function(){return _r})),r.d(n,"InputAccessoryView",(function(){return Er})),r.d(n,"ToastAndroid",(function(){return Ar})),r.d(n,"PermissionsAndroid",(function(){return Mr})),r.d(n,"Settings",(function(){return Tr})),r.d(n,"Systrace",(function(){return Cr})),r.d(n,"TVEventHandler",(function(){return Or})),r.d(n,"DeviceEventEmitter",(function(){return Rr})),r.d(n,"useColorScheme",(function(){return kr})),r.d(n,"useWindowDimensions",(function(){return Pr}));var i=r(32),o=r(49),a=r(115),s=r(119),l=r(120),c=r(187),u=r(13);function h(){return new Promise((function(e,t){e(!0)}))}var d=u.canUseDOM&&"function"===typeof window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null;var f={},p={isScreenReaderEnabled:h,isReduceMotionEnabled:function(){return new Promise((function(e,t){e(!d||d.matches)}))},fetch:h,addEventListener:function(e,t){if("reduceMotionChanged"===e){if(!d)return;var n=function(e){t(e.matches)};r=n,null!=d&&(null!=d.addEventListener?d.addEventListener("change",r):d.addListener(r)),f[t]=n}var r;return{remove:function(){return p.removeEventListener(e,t)}}},setAccessibilityFocus:function(e){},announceForAccessibility:function(e){},removeEventListener:function(e,t){if("reduceMotionChanged"===e){var n=f[t];if(!n||!d)return;r=n,null!=d&&(null!=d.removeEventListener?d.removeEventListener("change",r):d.removeListener(r))}var r}},m=p,g=function(){function e(){}return e.alert=function(){},e}(),v=r(12);var y=u.canUseDOM&&null!=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null,b=new WeakMap,w={getColorScheme:function(){return y&&y.matches?"dark":"light"},addChangeListener:function(e){var t=b.get(e);t||(t=function(t){var n=t.matches;e({colorScheme:n?"dark":"light"})},b.set(e,t)),y&&y.addListener(t)},removeChangeListener:function(e){var t=b.get(e);t&&(y&&y.removeListener(t),b.delete(e))}},x=r(103),_=r(252),E=r.n(_),A=r(4),S=r.n(A);function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var T=u.canUseDOM&&!document.hasOwnProperty("hidden")&&document.hasOwnProperty("webkitHidden"),C=["change","memoryWarning"],O=T?"webkitvisibilitychange":"visibilitychange",R=T?"webkitVisibilityState":"visibilityState",k="background",P="active",L=[],D=function(){function e(){}var t,n,r;return e.addEventListener=function(t,n){if(e.isAvailable&&(S()(-1!==C.indexOf(t),'Trying to subscribe to unknown event: "%s"',t),"change"===t)){var r=function(){return n(e.currentState)};L.push([n,r]),document.addEventListener(O,r,!1)}},e.removeEventListener=function(t,n){if(e.isAvailable&&(S()(-1!==C.indexOf(t),'Trying to remove listener for unknown event: "%s"',t),"change"===t)){var r=E()(L,(function(e){return e[0]===n}));S()(-1!==r,"Trying to remove AppState listener for unregistered handler");var i=L[r][1];document.removeEventListener(O,i,!1),L.splice(r,1)}},t=e,r=[{key:"currentState",get:function(){if(!e.isAvailable)return P;switch(document[R]){case"hidden":case"prerender":case"unloaded":return k;default:return P}}}],(n=null)&&M(t.prototype,n),r&&M(t,r),e}();D.isAvailable=u.canUseDOM&&document[R];var I,N=r(80),j=function(){function t(){}return t.isAvailable=function(){return void 0===I&&(I="function"===typeof document.queryCommandSupported&&document.queryCommandSupported("copy")),I},t.getString=function(){return Promise.resolve("")},t.setString=function(t){var n=!1,r=document.body;if(r){var i=document.createElement("span");i.textContent=t,i.style.opacity="0",i.style.position="absolute",i.style.whiteSpace="pre-wrap",i.style.userSelect="auto",r.appendChild(i);var o=window.getSelection();o.removeAllRanges();var a=document.createRange();a.selectNodeContents(i),o.addRange(a);try{document.execCommand("copy"),n=!0}catch(e){}o.removeAllRanges(),r.removeChild(i)}return n},t}(),B=r(34),F={Dimensions:{get windowPhysicalPixels(){var e=B.a.get("window"),t=e.width,n=e.height,r=e.fontScale,i=e.scale;return{width:t*i,height:n*i,scale:i,fontScale:r}},get screenPhysicalPixels(){var e=B.a.get("screen"),t=e.width,n=e.height,r=e.fontScale,i=e.scale;return{width:t*i,height:n*i,scale:i,fontScale:r}}},get locale(){if(u.canUseDOM)return navigator.languages?navigator.languages[0]:navigator.language},get totalMemory(){return u.canUseDOM?navigator.deviceMemory:void 0},get userAgent(){return u.canUseDOM?navigator.userAgent:""}},z=r(14),H=r(36),U=r(121),V=r(55),G=r(9),W=r(29);function q(e,t){G.a.isTesting||W.a.configureNextLayoutAnimation(e,null!==t&&void 0!==t?t:function(){},(function(){}))}function X(e,t,n){return{duration:e,create:{type:t,property:n},update:{type:t},delete:{type:t,property:n}}}var Y={easeInEaseOut:X(300,"easeInEaseOut","opacity"),linear:X(500,"linear","opacity"),spring:{duration:700,create:{type:"linear",property:"opacity"},update:{type:"spring",springDamping:.4},delete:{type:"linear",property:"opacity"}}},K={configureNext:q,create:X,Types:Object.freeze({spring:"spring",linear:"linear",easeInEaseOut:"easeInEaseOut",easeIn:"easeIn",easeOut:"easeOut",keyboard:"keyboard"}),Properties:Object.freeze({opacity:"opacity",scaleX:"scaleX",scaleY:"scaleY",scaleXY:"scaleXY"}),checkConfig:function(){console.error("LayoutAnimation.checkConfig(...) has been disabled.")},Presets:Y,easeInEaseOut:q.bind(null,Y.easeInEaseOut),linear:q.bind(null,Y.linear),spring:q.bind(null,Y.spring)},Q=u.canUseDOM?window.location.href:"",Z=function(){function t(){var e=this;this._eventCallbacks={},this.addEventListener=function(t,n){e._eventCallbacks[t]?e._eventCallbacks[t].push(n):e._eventCallbacks[t]=[n]},this.removeEventListener=function(t,n){var r=e._eventCallbacks[t].filter((function(e){return e.toString()!==n.toString()}));e._eventCallbacks[t]=r}}var n=t.prototype;return n._dispatchEvent=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=this._eventCallbacks[e];null!=i&&Array.isArray(i)&&i.map((function(e){e.apply(void 0,n)}))},n.canOpenURL=function(){return Promise.resolve(!0)},n.getInitialURL=function(){return Promise.resolve(Q)},n.openURL=function(t){try{return J(t),this._dispatchEvent("onOpen",t),Promise.resolve()}catch(e){return Promise.reject(e)}},n._validateURL=function(e){S()("string"===typeof e,"Invalid URL: should be a string. Was: "+e),S()(e,"Invalid URL: cannot be empty")},t}(),J=function(e){if(u.canUseDOM){var t=new URL(e,window.location).toString();window.open(t,"_blank","noopener")}},$=new Z,ee=r(134).a,te={centroidDimension:function(e,t,n,r){var i=e.touchBank,o=0,a=0,s=1===e.numberActiveTouches?e.touchBank[e.indexOfSingleActiveTouch]:null;if(null!==s)s.touchActive&&s.currentTimeStamp>t&&(o+=r&&n?s.currentPageX:r&&!n?s.currentPageY:!r&&n?s.previousPageX:s.previousPageY,a=1);else for(var l=0;l<i.length;l++){var c=i[l];if(null!==c&&void 0!==c&&c.touchActive&&c.currentTimeStamp>=t){o+=r&&n?c.currentPageX:r&&!n?c.currentPageY:!r&&n?c.previousPageX:c.previousPageY,a++}}return a>0?o/a:te.noCentroid},currentCentroidXOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!0,!0)},currentCentroidYOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!1,!0)},previousCentroidXOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!0,!1)},previousCentroidYOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!1,!1)},currentCentroidX:function(e){return te.centroidDimension(e,0,!0,!0)},currentCentroidY:function(e){return te.centroidDimension(e,0,!1,!0)},noCentroid:-1},ne=te,re=ne.currentCentroidXOfTouchesChangedAfter,ie=ne.currentCentroidYOfTouchesChangedAfter,oe=ne.previousCentroidXOfTouchesChangedAfter,ae=ne.previousCentroidYOfTouchesChangedAfter,se=ne.currentCentroidX,le=ne.currentCentroidY,ce={_initializeGestureState:function(e){e.moveX=0,e.moveY=0,e.x0=0,e.y0=0,e.dx=0,e.dy=0,e.vx=0,e.vy=0,e.numberActiveTouches=0,e._accountsForMovesUpTo=0},_updateGestureStateOnMove:function(e,t){e.numberActiveTouches=t.numberActiveTouches,e.moveX=re(t,e._accountsForMovesUpTo),e.moveY=ie(t,e._accountsForMovesUpTo);var n=e._accountsForMovesUpTo,r=oe(t,n),i=re(t,n),o=ae(t,n),a=ie(t,n),s=e.dx+(i-r),l=e.dy+(a-o),c=t.mostRecentTimeStamp-e._accountsForMovesUpTo;e.vx=(s-e.dx)/c,e.vy=(l-e.dy)/c,e.dx=s,e.dy=l,e._accountsForMovesUpTo=t.mostRecentTimeStamp},create:function(e){var t={handle:null,shouldCancelClick:!1,timeout:null},n={stateID:Math.random(),moveX:0,moveY:0,x0:0,y0:0,dx:0,dy:0,vx:0,vy:0,numberActiveTouches:0,_accountsForMovesUpTo:0};return{panHandlers:{onStartShouldSetResponder:function(t){return null!=e.onStartShouldSetPanResponder&&e.onStartShouldSetPanResponder(t,n)},onMoveShouldSetResponder:function(t){return null!=e.onMoveShouldSetPanResponder&&e.onMoveShouldSetPanResponder(t,n)},onStartShouldSetResponderCapture:function(t){return 1===t.nativeEvent.touches.length&&ce._initializeGestureState(n),n.numberActiveTouches=t.touchHistory.numberActiveTouches,null!=e.onStartShouldSetPanResponderCapture&&e.onStartShouldSetPanResponderCapture(t,n)},onMoveShouldSetResponderCapture:function(t){var r=t.touchHistory;return n._accountsForMovesUpTo!==r.mostRecentTimeStamp&&(ce._updateGestureStateOnMove(n,r),!!e.onMoveShouldSetPanResponderCapture&&e.onMoveShouldSetPanResponderCapture(t,n))},onResponderGrant:function(r){return t.handle||(t.handle=V.a.createInteractionHandle()),t.timeout&&function(e){clearTimeout(e.timeout)}(t),t.shouldCancelClick=!0,n.x0=se(r.touchHistory),n.y0=le(r.touchHistory),n.dx=0,n.dy=0,e.onPanResponderGrant&&e.onPanResponderGrant(r,n),null==e.onShouldBlockNativeResponder||e.onShouldBlockNativeResponder(r,n)},onResponderReject:function(r){ue(t,e.onPanResponderReject,r,n)},onResponderRelease:function(r){ue(t,e.onPanResponderRelease,r,n),he(t),ce._initializeGestureState(n)},onResponderStart:function(t){var r=t.touchHistory;n.numberActiveTouches=r.numberActiveTouches,e.onPanResponderStart&&e.onPanResponderStart(t,n)},onResponderMove:function(t){var r=t.touchHistory;n._accountsForMovesUpTo!==r.mostRecentTimeStamp&&(ce._updateGestureStateOnMove(n,r),e.onPanResponderMove&&e.onPanResponderMove(t,n))},onResponderEnd:function(r){var i=r.touchHistory;n.numberActiveTouches=i.numberActiveTouches,ue(t,e.onPanResponderEnd,r,n)},onResponderTerminate:function(r){ue(t,e.onPanResponderTerminate,r,n),he(t),ce._initializeGestureState(n)},onResponderTerminationRequest:function(t){return null==e.onPanResponderTerminationRequest||e.onPanResponderTerminationRequest(t,n)},onClickCapture:function(e){!0===t.shouldCancelClick&&(e.stopPropagation(),e.preventDefault())}},getInteractionHandle:function(){return t.handle}}}};function ue(e,t,n,r){e.handle&&(V.a.clearInteractionHandle(e.handle),e.handle=null),t&&t(n,r)}function he(e){e.timeout=setTimeout((function(){e.shouldCancelClick=!1}),250)}var de=ce,fe=r(116);function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var me=function(){function e(){}var t,n,r;return e.share=function(e,t){return void 0===t&&(t={}),S()("object"===typeof e&&null!==e,"Content to share must be a valid object"),S()("string"===typeof e.url||"string"===typeof e.message,"At least one of URL and message is required"),S()("object"===typeof t&&null!==t,"Options must be a valid object"),S()(!e.title||"string"===typeof e.title,"Invalid title: title should be a string."),void 0!==window.navigator.share?window.navigator.share({title:e.title,text:e.message,url:e.url}):Promise.reject(new Error("Share is not supported in this browser"))},t=e,r=[{key:"sharedAction",get:function(){return"sharedAction"}},{key:"dismissedAction",get:function(){return"dismissedAction"}}],(n=null)&&pe(t.prototype,n),r&&pe(t,r),e}(),ge=r(5),ve=function(e){"vibrate"in window.navigator&&window.navigator.vibrate(e)},ye={cancel:function(){ve(0)},vibrate:function(e){void 0===e&&(e=400),ve(e)}},be=r(0),we=r.n(be),xe=r(3);function _e(){return(_e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ee={max:1,min:0},Ae=function(e){return be.createElement("circle",{cx:"16",cy:"16",fill:"none",r:"14",strokeWidth:"4",style:e})},Se=be.forwardRef((function(e,t){var n=e.animating,r=void 0===n||n,i=e.color,o=void 0===i?"#1976D2":i,a=e.hidesWhenStopped,s=void 0===a||a,l=e.size,c=void 0===l?"small":l,u=e.style,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["animating","color","hidesWhenStopped","size","style"]),d=be.createElement("svg",{height:"100%",viewBox:"0 0 32 32",width:"100%"},Ae({stroke:o,opacity:.2}),Ae({stroke:o,strokeDasharray:80,strokeDashoffset:60}));return be.createElement(xe.a,_e({},h,{accessibilityRole:"progressbar",accessibilityValue:Ee,ref:t,style:[Me.container,u]}),be.createElement(xe.a,{children:d,style:["number"===typeof c?{height:c,width:c}:Te[c],Me.animation,!r&&Me.animationPause,!r&&s&&Me.hidesWhenStopped]}))}));Se.displayName="ActivityIndicator";var Me=ge.a.create({container:{alignItems:"center",justifyContent:"center"},hidesWhenStopped:{visibility:"hidden"},animation:{animationDuration:"0.75s",animationKeyframes:[{"0%":{transform:[{rotate:"0deg"}]},"100%":{transform:[{rotate:"360deg"}]}}],animationTimingFunction:"linear",animationIterationCount:"infinite"},animationPause:{animationPlayState:"paused"}}),Te=ge.a.create({small:{width:20,height:20},large:{width:36,height:36}}),Ce=Se,Oe=r(48),Re=r(58),ke=be.forwardRef((function(e,t){var n=e.accessibilityLabel,r=e.color,i=e.disabled,o=e.onPress,a=e.testID,s=e.title;return be.createElement(Oe.a,{accessibilityLabel:n,accessibilityRole:"button",disabled:i,focusable:!i,onPress:o,ref:t,style:[Pe.button,r&&{backgroundColor:r},i&&Pe.buttonDisabled],testID:a},be.createElement(Re.a,{style:[Pe.text,i&&Pe.textDisabled]},s))}));ke.displayName="Button";var Pe=ge.a.create({button:{backgroundColor:"#2196F3",borderRadius:2},text:{color:"#fff",fontWeight:"500",padding:8,textAlign:"center",textTransform:"uppercase"},buttonDisabled:{backgroundColor:"#dfdfdf"},textDisabled:{color:"#a1a1a1"}}),Le=ke;function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){Ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(){return(je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Be=be.forwardRef((function(e,t){var n=e.color,r=e.disabled,o=e.onChange,a=e.onValueChange,s=e.style,l=e.value,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["color","disabled","onChange","onValueChange","style","value"]);var u=be.createElement(xe.a,{style:[Fe.fakeControl,l&&Fe.fakeControlChecked,l&&n&&{backgroundColor:n,borderColor:n},r&&Fe.fakeControlDisabled,l&&r&&Fe.fakeControlCheckedAndDisabled]}),h=Object(i.a)("input",{checked:l,disabled:r,onChange:function(e){var t=e.nativeEvent.target.checked;e.nativeEvent.value=t,o&&o(e),a&&a(t)},ref:t,style:[Fe.nativeControl,Fe.cursorInherit],type:"checkbox"});return be.createElement(xe.a,je({},c,{accessibilityDisabled:r,style:[Fe.root,s,r&&Fe.cursorDefault]}),u,h)}));Be.displayName="CheckBox";var Fe=ge.a.create({root:{cursor:"pointer",height:16,userSelect:"none",width:16},cursorDefault:{cursor:"default"},cursorInherit:{cursor:"inherit"},fakeControl:{alignItems:"center",backgroundColor:"#fff",borderColor:"#657786",borderRadius:2,borderStyle:"solid",borderWidth:2,height:"100%",justifyContent:"center",width:"100%"},fakeControlChecked:{backgroundColor:"#009688",backgroundImage:'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")',backgroundRepeat:"no-repeat",borderColor:"#009688"},fakeControlDisabled:{borderColor:"#CCD6DD"},fakeControlCheckedAndDisabled:{backgroundColor:"#AAB8C2",borderColor:"#AAB8C2"},nativeControl:Ie(Ie({},ge.a.absoluteFillObject),{},{height:"100%",margin:0,opacity:0,padding:0,width:"100%"})}),ze=Be,He=r(72),Ue=r(38);function Ve(){return(Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ge={},We=Object(be.forwardRef)((function(e,t){var n=e.children,r=e.style,i=void 0===r?Ge:r,o=e.imageStyle,a=e.imageRef,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","style","imageStyle","imageRef"]),l=ge.a.flatten(i),c=l.height,u=l.width;return be.createElement(xe.a,{ref:t,style:i},be.createElement(Ue.a,Ve({},s,{ref:a,style:[ge.a.absoluteFill,{width:u,height:c,zIndex:-1},o]})),n)}));We.displayName="ImageBackground";var qe=We,Xe=r(101),Ye=r(64),Ke=r.n(Ye);var Qe=function(e){var t=e.children,n=be.useRef(null);if(u.canUseDOM&&!n.current){var r=document.createElement("div");r&&document.body&&(document.body.appendChild(r),n.current=r)}return be.useEffect((function(){if(u.canUseDOM)return function(){document.body&&n.current&&(document.body.removeChild(n.current),n.current=null)}}),[]),n.current&&u.canUseDOM?Ke.a.createPortal(t,n.current):null};function Ze(e,t){return"slide"===e?t?$e:et:"fade"===e?t?tt:nt:t?Je.container:Je.hidden}var Je=ge.a.create({container:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999},animatedIn:{animationDuration:"300ms",animationTimingFunction:"ease-in"},animatedOut:{pointerEvents:"none",animationDuration:"300ms",animationTimingFunction:"ease-out"},fadeIn:{opacity:1,animationKeyframes:{"0%":{opacity:0},"100%":{opacity:1}}},fadeOut:{opacity:0,animationKeyframes:{"0%":{opacity:1},"100%":{opacity:0}}},slideIn:{transform:[{translateY:"0%"}],animationKeyframes:{"0%":{transform:[{translateY:"100%"}]},"100%":{transform:[{translateY:"0%"}]}}},slideOut:{transform:[{translateY:"100%"}],animationKeyframes:{"0%":{transform:[{translateY:"0%"}]},"100%":{transform:[{translateY:"100%"}]}}},hidden:{opacity:0}}),$e=[Je.container,Je.animatedIn,Je.slideIn],et=[Je.container,Je.animatedOut,Je.slideOut],tt=[Je.container,Je.animatedIn,Je.fadeIn],nt=[Je.container,Je.animatedOut,Je.fadeOut],rt=function(e){var t=e.animationType,n=e.children,r=e.onDismiss,o=e.onShow,a=e.visible,s=be.useState(!1),l=s[0],c=s[1],u=be.useRef(!1),h=t&&"none"!==t,d=be.useCallback((function(e){e&&e.currentTarget!==e.target||(a?o&&o():(c(!1),r&&r()))}),[r,o,a]);return be.useEffect((function(){a&&c(!0),a===u.current||h||d(),u.current=a}),[h,a,d]),l||a?Object(i.a)("div",{style:l?Ze(t,a):Je.hidden,onAnimationEnd:d,children:n}):null},it=be.forwardRef((function(e,t){var n=e.active,r=e.children,i=e.onRequestClose,o=e.transparent;be.useEffect((function(){if(u.canUseDOM){var e=function(e){n&&"Escape"===e.key&&(e.stopPropagation(),i&&i())};return document.addEventListener("keyup",e,!1),function(){return document.removeEventListener("keyup",e,!1)}}}),[n,i]);var a=be.useMemo((function(){return[ot.modal,o?ot.modalTransparent:ot.modalOpaque]}),[o]);return be.createElement(xe.a,{accessibilityRole:n?"dialog":null,"aria-modal":!0,ref:t,style:a},be.createElement(xe.a,{style:ot.container},r))})),ot=ge.a.create({modal:{position:"fixed",top:0,right:0,bottom:0,left:0},modalTransparent:{backgroundColor:"transparent"},modalOpaque:{backgroundColor:"white"},container:{top:0,flex:1}}),at=it,st=function(){return Object(i.a)("div",{accessibilityRole:"none",tabIndex:0,style:ut.focusBracket})};function lt(t){if(!u.canUseDOM)return!1;try{t.focus()}catch(e){}return document.activeElement===t}var ct=function(e){var t=e.active,n=e.children,r=be.useRef(),i=be.useRef({trapFocusInProgress:!1,lastFocusedElement:null});return be.useEffect((function(){if(u.canUseDOM){var e=function(){if(null!=r.current&&!i.current.trapFocusInProgress&&t){try{if(i.current.trapFocusInProgress=!0,document.activeElement instanceof Node&&!r.current.contains(document.activeElement)){var e=function e(t){for(var n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(lt(r)||e(r))return!0}return!1}(r.current);i.current.lastFocusedElement===document.activeElement&&(e=function e(t){for(var n=t.childNodes.length-1;n>=0;n--){var r=t.childNodes[n];if(lt(r)||e(r))return!0}return!1}(r.current)),!e&&null!=r.current&&document.activeElement&&W.a.focus(r.current)}}finally{i.current.trapFocusInProgress=!1}i.current.lastFocusedElement=document.activeElement}};return e(),document.addEventListener("focus",e,!0),function(){return document.removeEventListener("focus",e,!0)}}}),[t]),be.useEffect((function(){if(u.canUseDOM){var e=document.activeElement;return function(){e&&document.contains(e)&&W.a.focus(e)}}}),[]),be.createElement(be.Fragment,null,be.createElement(st,null),be.createElement(xe.a,{ref:r},n),be.createElement(st,null))},ut=ge.a.create({focusBracket:{outlineStyle:"none"}}),ht=0,dt=[],ft={};function pt(){if(0!==dt.length){var e=dt[dt.length-1];dt.forEach((function(t){t in ft&&ft[t](t===e)}))}}function mt(e){e in ft&&(ft[e](!1),delete ft[e]);var t=dt.indexOf(e);-1!==t&&(dt.splice(t,1),pt())}var gt=be.forwardRef((function(e,t){var n=e.animationType,r=e.children,i=e.onDismiss,o=e.onRequestClose,a=e.onShow,s=e.transparent,l=e.visible,c=void 0===l||l,u=be.useMemo((function(){return ht++}),[]),h=be.useState(!1),d=h[0],f=h[1],p=be.useCallback((function(){mt(u),i&&i()}),[u,i]),m=be.useCallback((function(){!function(e,t){mt(e),dt.push(e),ft[e]=t,pt()}(u,f),a&&a()}),[u,a]);return be.useEffect((function(){return function(){return mt(u)}}),[u]),be.createElement(Qe,null,be.createElement(rt,{animationType:n,onDismiss:p,onShow:m,visible:c},be.createElement(ct,{active:d},be.createElement(at,{active:d,onRequestClose:o,ref:t,transparent:s},r))))})),vt=r(37),yt=r(74);function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xt=be.forwardRef((function(e,t){var n=e.children,r=e.enabled,o=e.onValueChange,a=e.selectedValue,s=e.style,l=e.testID,c=(e.itemStyle,e.mode,e.prompt,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","enabled","onValueChange","selectedValue","style","testID","itemStyle","mode","prompt"])),u=be.useRef(null);var h=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){wt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({children:n,disabled:!1===r||void 0,onChange:function(e){var t=e.target,n=t.selectedIndex,r=t.value;o&&o(r,n)},style:[_t.initial,s],testID:l,value:a},c),d=Object(yt.a)(h),f=Object(vt.a)(u,d,t);return h.ref=f,Object(i.a)("select",h)}));xt.Item=function(e){var t=e.color,n=e.label,r=e.testID,o=e.value,a={color:t};return Object(i.a)("option",{style:a,testID:r,value:o},n)};var _t=ge.a.create({initial:{fontFamily:"System",fontSize:"inherit",margin:0}}),Et=xt,At=function(){};var St=function(){var t=!1;if(u.canUseDOM)try{var n={};Object.defineProperty(n,"passive",{get:function(){return t=!0,!1}}),window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch(e){}return t}();function Mt(){return this.cancelBubble}function Tt(){return this.defaultPrevented}function Ct(e,t){var n=function(e){return null!=e&&(St?e:Boolean(e.capture))}(t);return function(t,r){if(null==t||"function"!==typeof t.addEventListener)throw new Error("createEventHandle: called on an invalid target.");var i=t;if(null!=r){var o=function(e){return r(((t=e).nativeEvent=t,t.persist=At,t.isDefaultPrevented=Tt,t.isPropagationStopped=Mt,t));var t};return i.addEventListener(e,o,n),function(){null!=i&&i.removeEventListener(e,o,n)}}return At}}var Ot,Rt,kt="keyboard",Pt="keyboard",Lt=!1,Dt=new Set,It={passive:!0},Nt={capture:!0,passive:!0},jt=Ct("blur",It),Bt=Ct("focus",It),Ft=Ct("visibilitychange",Nt),zt=Ct("keydown",Nt),Ht=Ct("pointerdown",Nt),Ut=Ct("pointermove",Nt),Vt=Ct("contextmenu",Nt),Gt=Ct("mousedown",Nt),Wt=Ct("mousemove",Nt),qt=Ct("mouseup",Nt),Xt=Ct("scroll",Nt),Yt=Ct("selectionchange",Nt),Kt=Ct("touchcancel",Nt),Qt=Ct("touchmove",Nt),Zt=Ct("touchstart",Nt);function Jt(){null==Ot&&null==Rt||(null!=Ot&&(Pt=Ot,Ot=null),null!=Rt&&(kt=Rt,Rt=null),en())}function $t(e){var t=e.type;if("undefined"!==typeof window&&null!=window.PointerEvent){if("pointerdown"===t)return void(kt!==e.pointerType&&(Pt=e.pointerType,kt=e.pointerType,en()));if("pointermove"===t)return void(Pt!==e.pointerType&&(Pt=e.pointerType,en()))}else{if(Lt||("mousedown"===t&&"mouse"!==kt&&(Pt="mouse",kt="mouse",en()),"mousemove"===t&&"mouse"!==Pt&&(Pt="mouse",en())),"touchstart"===t)return Lt=!0,e.touches&&e.touches.length>1&&(Lt=!1),void("touch"!==kt&&(Pt="touch",kt="touch",en()));"contextmenu"!==t&&"mouseup"!==t&&"selectionchange"!==t&&"scroll"!==t&&"touchcancel"!==t&&"touchmove"!==t||(Lt=!1)}}function en(){var e={activeModality:kt,modality:Pt};Dt.forEach((function(t){t(e)}))}u.canUseDOM&&(jt(window,(function(){Ot=Pt,Rt=kt,kt="keyboard",Pt="keyboard",en(),Lt=!1})),Bt(window,(function(){Jt()})),zt(document,(function(e){e.metaKey||e.altKey||e.ctrlKey||"keyboard"!==Pt&&(Pt="keyboard",kt="keyboard",en())})),Ht(document,$t),Ut(document,$t),Ft(document,(function(){"hidden"!==document.visibilityState&&Jt()})),Vt(document,$t),Gt(document,$t),Wt(document,$t),qt(document,$t),Kt(document,$t),Qt(document,$t),Zt(document,$t),Yt(document,$t),Xt(document,$t));var tn=r(68),nn=r(106);function rn(e,t){var n=Object(nn.a)((function(){return new Map})),r=Object(nn.a)((function(){var r=Ct(e,t);return function(e,t){var i=n.get(e);null!=i&&i(),null==t&&n.delete(e);var o=r(e,t);return n.set(e,o),o}}));return Object(tn.a)((function(){return function(){n.forEach((function(e){e()})),n.clear()}}),[]),r}var on={},an={passive:!0};function sn(e,t,n){var r=document.createEvent("CustomEvent"),i=n||on,o=i.bubbles,a=void 0===o||o,s=i.cancelable,l=void 0===s||s,c=i.detail;r.initCustomEvent(t,a,l,c),e.dispatchEvent(r)}function ln(e){var t=e.pointerType;return null!=t?t:Pt}function cn(e,t){var n=t.contain,r=t.disabled,i=t.onHoverStart,o=t.onHoverChange,a=t.onHoverUpdate,s=t.onHoverEnd,l=!("undefined"===typeof window||null==window.PointerEvent),c=rn(l?"pointermove":"mousemove",an),u=rn(l?"pointerenter":"mouseenter",an),h=rn(l?"pointerleave":"mouseleave",an),d=rn("react-gui:hover:lock",an),f=rn("react-gui:hover:unlock",an);Object(tn.a)((function(){var t=e.current;if(null!==t){var l=function(e){null!=s&&s(e),null!=o&&o(!1),c(t,null),h(t,null)},p=function(t){var r=e.current;null!=r&&"touch"!==ln(t)&&(n&&sn(r,"react-gui:hover:unlock"),l(t))},m=function(e){"touch"!==ln(e)&&null!=a&&(null==e.x&&(e.x=e.clientX),null==e.y&&(e.y=e.clientY),a(e))},g=function(e){null!=i&&i(e),null!=o&&o(!0),null!=a&&c(t,r?null:m),h(t,r?null:p)};u(t,r?null:function(t){var i=e.current;if(null!=i&&"touch"!==ln(t)){n&&sn(i,"react-gui:hover:lock"),g(t);d(i,r?null:function(e){e.target!==i&&l(t)}),f(i,r?null:function(e){e.target!==i&&g(t)})}})}}),[u,c,h,d,f,n,r,i,o,a,s,e])}var un=r(76);function hn(){return(hn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dn(e){var t=Object(be.useState)(!1);return[t[0]||e,t[1]]}var fn=ge.a.create({root:{cursor:"pointer",touchAction:"manipulation"}}),pn=Object(be.memo)(Object(be.forwardRef)((function(e,t){var n=e.children,r=e.delayLongPress,i=e.delayPressIn,o=e.delayPressOut,a=e.disabled,s=e.focusable,l=e.onBlur,c=e.onContextMenu,u=e.onFocus,h=e.onHoverIn,d=e.onHoverOut,f=e.onKeyDown,p=e.onLongPress,m=e.onPress,g=e.onPressMove,v=e.onPressIn,y=e.onPressOut,b=e.style,w=e.testOnly_hovered,x=e.testOnly_pressed,_=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","delayLongPress","delayPressIn","delayPressOut","disabled","focusable","onBlur","onContextMenu","onFocus","onHoverIn","onHoverOut","onKeyDown","onLongPress","onPress","onPressMove","onPressIn","onPressOut","style","testOnly_hovered","testOnly_pressed"]),E=dn(!0===w),A=E[0],S=E[1],M=dn(!1),T=M[0],C=M[1],O=dn(!0===x),R=O[0],k=O[1],P=Object(be.useRef)(null),L=Object(vt.a)(t,P),D=Object(be.useMemo)((function(){return{delayLongPress:r,delayPressStart:i,delayPressEnd:o,disabled:a,onLongPress:p,onPress:m,onPressChange:k,onPressStart:v,onPressMove:g,onPressEnd:y}}),[r,i,o,a,p,m,v,g,y,k]),I=Object(un.a)(P,D),N=I.onContextMenu,j=I.onKeyDown;cn(P,{contain:!0,disabled:a,onHoverChange:S,onHoverStart:h,onHoverEnd:d});var B={hovered:A,focused:T,pressed:R},F=be.useCallback((function(e){e.nativeEvent.target===P.current&&(C(!1),null!=l&&l(e))}),[P,C,l]),z=be.useCallback((function(e){e.nativeEvent.target===P.current&&(C(!0),null!=u&&u(e))}),[P,C,u]),H=be.useCallback((function(e){null!=N&&N(e),null!=c&&c(e)}),[c,N]),U=be.useCallback((function(e){null!=j&&j(e),null!=f&&f(e)}),[f,j]);return be.createElement(xe.a,hn({},_,I,{accessibilityDisabled:a,focusable:!a&&!1!==s,onBlur:F,onContextMenu:H,onFocus:z,onKeyDown:U,ref:L,style:[!a&&fn.root,"function"===typeof b?b(B):b]}),"function"===typeof n?n(B):n)})));pn.displayName="Pressable";var mn=pn;function gn(){return(gn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vn=be.forwardRef((function(e,t){var n=e.color,r=void 0===n?"#1976D2":n,i=e.indeterminate,o=void 0!==i&&i,a=e.progress,s=void 0===a?0:a,l=e.trackColor,c=void 0===l?"transparent":l,u=e.style,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["color","indeterminate","progress","trackColor","style"]),d=100*s,f=be.useRef(null);return be.useEffect((function(){var e=o?"25%":d+"%";null!=f.current&&f.current.setNativeProps({style:{width:e}})}),[o,d,f]),be.createElement(xe.a,gn({},h,{accessibilityRole:"progressbar",accessibilityValue:{max:100,min:0,now:o?null:d},ref:t,style:[yn.track,u,{backgroundColor:c}]}),be.createElement(xe.a,{ref:f,style:[yn.progress,o&&yn.animation,{backgroundColor:r}]}))}));vn.displayName="ProgressBar";var yn=ge.a.create({track:{height:5,overflow:"hidden",userSelect:"none",zIndex:0},progress:{height:"100%",zIndex:-1},animation:{animationDuration:"1s",animationKeyframes:[{"0%":{transform:[{translateX:"-100%"}]},"100%":{transform:[{translateX:"400%"}]}}],animationTimingFunction:"linear",animationIterationCount:"infinite"}}),bn=vn,wn=r(117),xn=r(122),_n=r(53),En=r(127),An=r(78),Sn=r(62),Mn=r(60),Tn=r(96),Cn=function(e,t){if(this.instancePool.length){var n=this.instancePool.pop();return this.call(n,e,t),n}return new this(e,t)},On=function(e){e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},Rn=Cn,kn={addPoolingTo:function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||Rn,n.poolSize||(n.poolSize=10),n.release=On,n},twoArgumentPooler:Cn},Pn=kn.twoArgumentPooler;function Ln(e,t){this.width=e,this.height=t}Ln.prototype.destructor=function(){this.width=null,this.height=null},Ln.getPooledFromElement=function(e){return Ln.getPooled(e.offsetWidth,e.offsetHeight)},kn.addPoolingTo(Ln,Pn);var Dn=Ln,In=r(90),Nn=r.n(In),jn=kn.twoArgumentPooler;function Bn(e,t){this.left=e,this.top=t}Bn.prototype.destructor=function(){this.left=null,this.top=null},kn.addPoolingTo(Bn,jn);var Fn=Bn;function zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){Un(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vn=function(e){var t=e.touches,n=e.changedTouches,r=t&&t.length>0,i=n&&n.length>0;return!r&&i?n[0]:r?t[0]:e},Gn="NOT_RESPONDER",Wn="RESPONDER_INACTIVE_PRESS_IN",qn="RESPONDER_INACTIVE_PRESS_OUT",Xn="RESPONDER_ACTIVE_PRESS_IN",Yn="RESPONDER_ACTIVE_PRESS_OUT",Kn="RESPONDER_ACTIVE_LONG_PRESS_IN",Qn="RESPONDER_ACTIVE_LONG_PRESS_OUT",Zn="ERROR",Jn={NOT_RESPONDER:!1,RESPONDER_INACTIVE_PRESS_IN:!1,RESPONDER_INACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_PRESS_IN:!1,RESPONDER_ACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_LONG_PRESS_IN:!1,RESPONDER_ACTIVE_LONG_PRESS_OUT:!1,ERROR:!1},$n=Hn(Hn({},Jn),{},{RESPONDER_ACTIVE_PRESS_OUT:!0,RESPONDER_ACTIVE_PRESS_IN:!0}),er=Hn(Hn({},Jn),{},{RESPONDER_INACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),tr=Hn(Hn({},Jn),{},{RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),nr="DELAY",rr="RESPONDER_GRANT",ir="RESPONDER_RELEASE",or="RESPONDER_TERMINATED",ar="ENTER_PRESS_RECT",sr="LEAVE_PRESS_RECT",lr="LONG_PRESS_DETECTED",cr={NOT_RESPONDER:{DELAY:Zn,RESPONDER_GRANT:Wn,RESPONDER_RELEASE:Zn,RESPONDER_TERMINATED:Zn,ENTER_PRESS_RECT:Zn,LEAVE_PRESS_RECT:Zn,LONG_PRESS_DETECTED:Zn},RESPONDER_INACTIVE_PRESS_IN:{DELAY:Xn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Wn,LEAVE_PRESS_RECT:qn,LONG_PRESS_DETECTED:Zn},RESPONDER_INACTIVE_PRESS_OUT:{DELAY:Yn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Wn,LEAVE_PRESS_RECT:qn,LONG_PRESS_DETECTED:Zn},RESPONDER_ACTIVE_PRESS_IN:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Xn,LEAVE_PRESS_RECT:Yn,LONG_PRESS_DETECTED:Kn},RESPONDER_ACTIVE_PRESS_OUT:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Xn,LEAVE_PRESS_RECT:Yn,LONG_PRESS_DETECTED:Zn},RESPONDER_ACTIVE_LONG_PRESS_IN:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Kn,LEAVE_PRESS_RECT:Qn,LONG_PRESS_DETECTED:Kn},RESPONDER_ACTIVE_LONG_PRESS_OUT:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Kn,LEAVE_PRESS_RECT:Qn,LONG_PRESS_DETECTED:Zn},error:{DELAY:Gn,RESPONDER_GRANT:Wn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Gn,LEAVE_PRESS_RECT:Gn,LONG_PRESS_DETECTED:Gn}},ur={componentDidMount:function(){var e=this;this._touchableNode=Object(o.a)(this),this._touchableNode&&this._touchableNode.addEventListener&&(this._touchableBlurListener=function(t){e._isTouchableKeyboardActive&&(e.state.touchable.touchState&&e.state.touchable.touchState!==Gn&&e.touchableHandleResponderTerminate({nativeEvent:t}),e._isTouchableKeyboardActive=!1)},this._touchableNode.addEventListener("blur",this._touchableBlurListener))},componentWillUnmount:function(){this._touchableNode&&this._touchableNode.addEventListener&&this._touchableNode.removeEventListener("blur",this._touchableBlurListener),this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressInLocation=null,this.state.touchable.responderID=null,this._touchableNode=null},touchableGetInitialState:function(){return{touchable:{touchState:void 0,responderID:null}}},touchableHandleResponderTerminationRequest:function(){return!this.props.rejectResponderTermination},touchableHandleStartShouldSetResponder:function(){return!this.props.disabled},touchableLongPressCancelsPress:function(){return!0},touchableHandleResponderGrant:function(e){var t=e.currentTarget;e.persist(),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressOutDelayTimeout=null,this.state.touchable.touchState=Gn,this.state.touchable.responderID=t,this._receiveSignal(rr,e);var n=void 0!==this.touchableGetHighlightDelayMS?Math.max(this.touchableGetHighlightDelayMS(),0):130;0!==(n=isNaN(n)?130:n)?this.touchableDelayTimeout=setTimeout(this._handleDelay.bind(this,e),n):this._handleDelay(e);var r=void 0!==this.touchableGetLongPressDelayMS?Math.max(this.touchableGetLongPressDelayMS(),10):370;r=isNaN(r)?370:r,this.longPressDelayTimeout=setTimeout(this._handleLongDelay.bind(this,e),r+n)},touchableHandleResponderRelease:function(e){this.pressInLocation=null,this._receiveSignal(ir,e)},touchableHandleResponderTerminate:function(e){this.pressInLocation=null,this._receiveSignal(or,e)},touchableHandleResponderMove:function(e){if(this.state.touchable.positionOnActivate){var t=this.state.touchable.positionOnActivate,n=this.state.touchable.dimensionsOnActivate,r=this.touchableGetPressRectOffset?this.touchableGetPressRectOffset():{left:20,right:20,top:20,bottom:20},i=r.left,o=r.top,a=r.right,s=r.bottom,l=this.touchableGetHitSlop?this.touchableGetHitSlop():null;l&&(i+=l.left||0,o+=l.top||0,a+=l.right||0,s+=l.bottom||0);var c=Vn(e.nativeEvent),u=c&&c.pageX,h=c&&c.pageY;if(this.pressInLocation)this._getDistanceBetweenPoints(u,h,this.pressInLocation.pageX,this.pressInLocation.pageY)>10&&this._cancelLongPressDelayTimeout();if(u>t.left-i&&h>t.top-o&&u<t.left+n.width+a&&h<t.top+n.height+s){var d=this.state.touchable.touchState;this._receiveSignal(ar,e),this.state.touchable.touchState===Wn&&d!==Wn&&this._cancelLongPressDelayTimeout()}else this._cancelLongPressDelayTimeout(),this._receiveSignal(sr,e)}},touchableHandleFocus:function(e){this.props.onFocus&&this.props.onFocus(e)},touchableHandleBlur:function(e){this.props.onBlur&&this.props.onBlur(e)},_remeasureMetricsOnActivation:function(){var e=this.state.touchable.responderID;null!=e&&W.a.measure(e,this._handleQueryLayout)},_handleQueryLayout:function(e,t,n,r,i,o){(e||t||n||r||i||o)&&(this.state.touchable.positionOnActivate&&Fn.release(this.state.touchable.positionOnActivate),this.state.touchable.dimensionsOnActivate&&Dn.release(this.state.touchable.dimensionsOnActivate),this.state.touchable.positionOnActivate=Fn.getPooled(i,o),this.state.touchable.dimensionsOnActivate=Dn.getPooled(n,r))},_handleDelay:function(e){this.touchableDelayTimeout=null,this._receiveSignal(nr,e)},_handleLongDelay:function(e){this.longPressDelayTimeout=null;var t=this.state.touchable.touchState;t!==Xn&&t!==Kn?console.error("Attempted to transition from state `"+t+"` to `"+Kn+"`, which is not supported. This is most likely due to `Touchable.longPressDelayTimeout` not being cancelled."):this._receiveSignal(lr,e)},_receiveSignal:function(e,t){var n=this.state.touchable.responderID,r=this.state.touchable.touchState,i=cr[r]&&cr[r][e];if(n||e!==ir){if(!i)throw new Error("Unrecognized signal `"+e+"` or state `"+r+"` for Touchable responder `"+n+"`");if(i===Zn)throw new Error("Touchable cannot transition from `"+r+"` to `"+e+"` for responder `"+n+"`");r!==i&&(this._performSideEffectsForTransition(r,i,e,t),this.state.touchable.touchState=i)}},_cancelLongPressDelayTimeout:function(){this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.longPressDelayTimeout=null},_isHighlight:function(e){return e===Xn||e===Kn},_savePressInLocation:function(e){var t=Vn(e.nativeEvent),n=t&&t.pageX,r=t&&t.pageY,i=t&&t.locationX,o=t&&t.locationY;this.pressInLocation={pageX:n,pageY:r,locationX:i,locationY:o}},_getDistanceBetweenPoints:function(e,t,n,r){var i=e-n,o=t-r;return Math.sqrt(i*i+o*o)},_performSideEffectsForTransition:function(e,t,n,r){var i=this._isHighlight(e),o=this._isHighlight(t);(n===or||n===ir)&&this._cancelLongPressDelayTimeout();var a=e===Gn&&t===Wn,s=!$n[e]&&$n[t];if((a||s)&&this._remeasureMetricsOnActivation(),er[e]&&n===lr&&this.touchableHandleLongPress&&this.touchableHandleLongPress(r),o&&!i?this._startHighlight(r):!o&&i&&this._endHighlight(r),er[e]&&n===ir){var l=!!this.props.onLongPress,c=tr[e]&&(!l||!this.touchableLongPressCancelsPress());(!tr[e]||c)&&this.touchableHandlePress&&(o||i||(this._startHighlight(r),this._endHighlight(r)),this.touchableHandlePress(r))}this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.touchableDelayTimeout=null},_playTouchSound:function(){W.a.playTouchSound()},_startHighlight:function(e){this._savePressInLocation(e),this.touchableHandleActivePressIn&&this.touchableHandleActivePressIn(e)},_endHighlight:function(e){var t=this;this.touchableHandleActivePressOut&&(this.touchableGetPressOutDelayMS&&this.touchableGetPressOutDelayMS()?this.pressOutDelayTimeout=setTimeout((function(){t.touchableHandleActivePressOut(e)}),this.touchableGetPressOutDelayMS()):this.touchableHandleActivePressOut(e))},touchableHandleKeyEvent:function(e){var t=e.type,n=e.key;"Enter"!==n&&" "!==n||("keydown"===t?this._isTouchableKeyboardActive||this.state.touchable.touchState&&this.state.touchable.touchState!==Gn||(this.touchableHandleResponderGrant(e),this._isTouchableKeyboardActive=!0):"keyup"===t&&this._isTouchableKeyboardActive&&this.state.touchable.touchState&&this.state.touchable.touchState!==Gn&&(this.touchableHandleResponderRelease(e),this._isTouchableKeyboardActive=!1),e.stopPropagation(),"Enter"===n&&"link"===Tn.a.propsToAriaRole(this.props)||e.preventDefault())},withoutDefaultFocusAndBlur:{}},hr=(ur.touchableHandleFocus,ur.touchableHandleBlur,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(ur,["touchableHandleFocus","touchableHandleBlur"]));ur.withoutDefaultFocusAndBlur=hr;var dr={Mixin:ur,TOUCH_TARGET_DEBUG:!1,renderDebugView:function(e){var t=e.color,n=e.hitSlop;if(!dr.TOUCH_TARGET_DEBUG)return null;var r={};for(var i in n=n||{top:0,bottom:0,left:0,right:0})r[i]=-n[i];var o=Nn()(t);if("number"!==typeof o)return null;var a="#"+("00000000"+o.toString(16)).substr(-8);return we.a.createElement(xe.a,{pointerEvents:"none",style:Hn({position:"absolute",borderColor:a.slice(0,-2)+"55",borderWidth:1,borderStyle:"dashed",backgroundColor:a.slice(0,-2)+"0F"},r)})}},fr=dr,pr=r(123),mr=r(92),gr=r(118),vr=r(77).a,yr=r(66);function br(e){return we.a.createElement(yr.a,e)}br.ignoreWarnings=function(){};var wr=br,xr=r(181),_r=yr.a,Er=yr.a,Ar=yr.a,Sr=function(){return Promise.resolve(!1)},Mr={PERMISSIONS:{},RESULTS:{},checkPermission:Sr,check:Sr,requestPermission:Sr,request:Sr,requestMultiple:Sr},Tr={},Cr={},Or={},Rr=r(70).a;function kr(){var e=be.useState(w.getColorScheme()),t=e[0],n=e[1];return be.useEffect((function(){function e(e){n(e.colorScheme)}return w.addChangeListener(e),function(){return w.removeChangeListener(e)}})),t}function Pr(){var e=Object(be.useState)((function(){return B.a.get("window")})),t=e[0],n=e[1];return Object(be.useEffect)((function(){function e(e){var t=e.window;null!=t&&n(t)}return B.a.addEventListener("change",e),n(B.a.get("window")),function(){B.a.removeEventListener("change",e)}}),[]),t}},function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,i=/^ms-/,o={};function a(e){return"-"+e.toLowerCase()}t.default=function(e){if(o.hasOwnProperty(e))return o[e];var t=e.replace(r,a);return o[e]=i.test(t)?"-"+t:t}},function(e,t,n){"use strict";var r=n(311);e.exports=r},function(e,t,n){e.exports=n(424)},function(t,n,r){"use strict";r.r(n),r.d(n,"enableScreens",(function(){return T})),r.d(n,"screensEnabled",(function(){return C})),r.d(n,"NativeScreen",(function(){return O})),r.d(n,"Screen",(function(){return R})),r.d(n,"ScreenContainer",(function(){return k})),r.d(n,"NativeScreenContainer",(function(){return P})),r.d(n,"ScreenStack",(function(){return L})),r.d(n,"ScreenStackHeaderBackButtonImage",(function(){return D})),r.d(n,"ScreenStackHeaderRightView",(function(){return I})),r.d(n,"ScreenStackHeaderLeftView",(function(){return N})),r.d(n,"ScreenStackHeaderCenterView",(function(){return j})),r.d(n,"ScreenStackHeaderConfig",(function(){return B})),r.d(n,"ScreenStackHeaderSubview",(function(){return F})),r.d(n,"shouldUseActivityState",(function(){return z}));var i=r(17),o=r.n(i),a=r(21),s=r.n(a),l=r(23),c=r.n(l),u=r(24),h=r.n(u),d=r(25),f=r.n(d),p=r(18),m=r.n(p),g=r(0),v=r.n(g),y=r(12),b=r(3),w=r(38),x=r(218);for(var _ in x)["enableScreens","screensEnabled","NativeScreen","Screen","ScreenContainer","NativeScreenContainer","ScreenStack","ScreenStackHeaderBackButtonImage","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderConfig","ScreenStackHeaderSubview","shouldUseActivityState","default"].indexOf(_)<0&&function(e){r.d(n,e,(function(){return x[e]}))}(_);var E=["active","activityState","style","enabled"];function A(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=m()(t);if(n){var i=m()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return f()(this,e)}}function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var M=!0;function T(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];M=e}function C(){return M}var O=function(e){h()(n,e);var t=A(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.active,n=e.activityState,r=e.style,i=e.enabled,a=void 0===i||i,s=o()(e,E);return void 0!==t&&void 0===n&&(n=0!==t?2:0),v.a.createElement(b.a,S({style:[r,M&&a&&2!==n?{display:"none"}:null]},s))}}]),n}(v.a.Component),R=y.a.createAnimatedComponent(O),k=b.a,P=b.a,L=b.a,D=function(e){return v.a.createElement(b.a,null,v.a.createElement(w.a,S({resizeMode:"center",fadeDuration:0},e)))},I=function(e){return v.a.createElement(b.a,e)},N=function(e){return v.a.createElement(b.a,e)},j=function(e){return v.a.createElement(b.a,e)},B=b.a,F=b.a,z=!0},function(e,t,n){"use strict";(function(e){var r=n(91),i=n(166),o=n(4),a=n.n(o),s=n(15);function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(t){var n,r;function o(e){var n,r,o,l,c,u,h,d,f,p,m,g;if((f=t.call(this)||this)._overshootClamping=null!==(n=e.overshootClamping)&&void 0!==n&&n,f._restDisplacementThreshold=null!==(r=e.restDisplacementThreshold)&&void 0!==r?r:.001,f._restSpeedThreshold=null!==(o=e.restSpeedThreshold)&&void 0!==o?o:.001,f._initialVelocity=null!==(l=e.velocity)&&void 0!==l?l:0,f._lastVelocity=null!==(c=e.velocity)&&void 0!==c?c:0,f._toValue=e.toValue,f._delay=null!==(u=e.delay)&&void 0!==u?u:0,f._useNativeDriver=Object(s.c)(e),f.__isInteraction=null!==(h=e.isInteraction)&&void 0!==h?h:!f._useNativeDriver,f.__iterations=null!==(d=e.iterations)&&void 0!==d?d:1,void 0!==e.stiffness||void 0!==e.damping||void 0!==e.mass)a()(void 0===e.bounciness&&void 0===e.speed&&void 0===e.tension&&void 0===e.friction,"You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one"),f._stiffness=null!==(p=e.stiffness)&&void 0!==p?p:100,f._damping=null!==(m=e.damping)&&void 0!==m?m:10,f._mass=null!==(g=e.mass)&&void 0!==g?g:1;else if(void 0!==e.bounciness||void 0!==e.speed){var v,y;a()(void 0===e.tension&&void 0===e.friction&&void 0===e.stiffness&&void 0===e.damping&&void 0===e.mass,"You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one");var b=i.a.fromBouncinessAndSpeed(null!==(v=e.bounciness)&&void 0!==v?v:8,null!==(y=e.speed)&&void 0!==y?y:12);f._stiffness=b.stiffness,f._damping=b.damping,f._mass=1}else{var w,x,_=i.a.fromOrigamiTensionAndFriction(null!==(w=e.tension)&&void 0!==w?w:40,null!==(x=e.friction)&&void 0!==x?x:7);f._stiffness=_.stiffness,f._damping=_.damping,f._mass=1}return a()(f._stiffness>0,"Stiffness value must be greater than 0"),a()(f._damping>0,"Damping value must be greater than 0"),a()(f._mass>0,"Mass value must be greater than 0"),f}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,l(n,r);var c=o.prototype;return c.__getNativeAnimationConfig=function(){var e;return{type:"spring",overshootClamping:this._overshootClamping,restDisplacementThreshold:this._restDisplacementThreshold,restSpeedThreshold:this._restSpeedThreshold,stiffness:this._stiffness,damping:this._damping,mass:this._mass,initialVelocity:null!==(e=this._initialVelocity)&&void 0!==e?e:this._lastVelocity,toValue:this._toValue,iterations:this.__iterations}},c.start=function(e,t,n,r,i){var a=this;if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=t,this.__onEnd=n,this._lastTime=Date.now(),this._frameTime=0,r instanceof o){var s=r.getInternalState();this._lastPosition=s.lastPosition,this._lastVelocity=s.lastVelocity,this._initialVelocity=this._lastVelocity,this._lastTime=s.lastTime}var l=function(){a._useNativeDriver?a.__startNativeAnimation(i):a.onUpdate()};this._delay?this._timeout=setTimeout(l,this._delay):l()},c.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},c.onUpdate=function(){var e=Date.now();e>this._lastTime+64&&(e=this._lastTime+64);var t=(e-this._lastTime)/1e3;this._frameTime+=t;var n=this._damping,r=this._mass,i=this._stiffness,o=-this._initialVelocity,a=n/(2*Math.sqrt(i*r)),s=Math.sqrt(i/r),l=s*Math.sqrt(1-a*a),c=this._toValue-this._startPosition,u=0,h=0,d=this._frameTime;if(a<1){var f=Math.exp(-a*s*d);u=this._toValue-f*((o+a*s*c)/l*Math.sin(l*d)+c*Math.cos(l*d)),h=a*s*f*(Math.sin(l*d)*(o+a*s*c)/l+c*Math.cos(l*d))-f*(Math.cos(l*d)*(o+a*s*c)-l*c*Math.sin(l*d))}else{var p=Math.exp(-s*d);u=this._toValue-p*(c+(o+s*c)*d),h=p*(o*(d*s-1)+d*c*(s*s))}if(this._lastTime=e,this._lastPosition=u,this._lastVelocity=h,this._onUpdate(u),this.__active){var m=!1;this._overshootClamping&&0!==this._stiffness&&(m=this._startPosition<this._toValue?u>this._toValue:u<this._toValue);var g=Math.abs(h)<=this._restSpeedThreshold,v=!0;if(0!==this._stiffness&&(v=Math.abs(this._toValue-u)<=this._restDisplacementThreshold),m||g&&v)return 0!==this._stiffness&&(this._lastPosition=this._toValue,this._lastVelocity=0,this._onUpdate(this._toValue)),void this.__debouncedOnEnd({finished:!0});this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))}},c.stop=function(){t.prototype.stop.call(this),this.__active=!1,clearTimeout(this._timeout),e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},o}(r.a);t.a=c}).call(this,n(46))},function(e,t,n){"use strict";function r(e){return 3.62*(e-30)+194}function i(e){return 3*(e-8)+25}t.a={fromOrigamiTensionAndFriction:function(e,t){return{stiffness:r(e),damping:i(t)}},fromBouncinessAndSpeed:function(e,t){function n(e,t,n){return(e-t)/(n-t)}function o(e,t,n){return t+e*(n-t)}var a=n(e/1.7,0,20);a=o(a,0,.8);var s,l,c=o(n(t/1.7,0,20),.5,200),u=(s=a,l=function(e){return e<=18?(t=e,7e-4*Math.pow(t,3)-.031*Math.pow(t,2)+.64*t+1.28):e>18&&e<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(e):function(e){return 45e-8*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(e);var t}(c),function(e,t,n){return e*n+(1-e)*t}(2*s-s*s,l,.01));return{stiffness:r(c),damping:i(u)}}}},function(e,t,n){"use strict";(function(e){var r,i=n(91),o=n(15),a=n(14);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(t){var n,i;function l(e){var n,i,s,l,c,u;return(u=t.call(this)||this)._toValue=e.toValue,u._easing=null!==(n=e.easing)&&void 0!==n?n:(r||(r=a.a.inOut(a.a.ease)),r),u._duration=null!==(i=e.duration)&&void 0!==i?i:500,u._delay=null!==(s=e.delay)&&void 0!==s?s:0,u.__iterations=null!==(l=e.iterations)&&void 0!==l?l:1,u._useNativeDriver=Object(o.c)(e),u.__isInteraction=null!==(c=e.isInteraction)&&void 0!==c?c:!u._useNativeDriver,u}i=t,(n=l).prototype=Object.create(i.prototype),n.prototype.constructor=n,s(n,i);var c=l.prototype;return c.__getNativeAnimationConfig=function(){for(var e=[],t=Math.round(this._duration/(1e3/60)),n=0;n<t;n++)e.push(this._easing(n/t));return e.push(this._easing(1)),{type:"frames",frames:e,toValue:this._toValue,iterations:this.__iterations}},c.start=function(e,t,n,r,i){var o=this;this.__active=!0,this._fromValue=e,this._onUpdate=t,this.__onEnd=n;var a=function(){0!==o._duration||o._useNativeDriver?(o._startTime=Date.now(),o._useNativeDriver?o.__startNativeAnimation(i):o._animationFrame=requestAnimationFrame(o.onUpdate.bind(o))):(o._onUpdate(o._toValue),o.__debouncedOnEnd({finished:!0}))};this._delay?this._timeout=setTimeout(a,this._delay):a()},c.onUpdate=function(){var e=Date.now();if(e>=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((e-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this)))},c.stop=function(){t.prototype.stop.call(this),this.__active=!1,clearTimeout(this._timeout),e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},l}(i.a);t.a=l}).call(this,n(46))},function(e,t){e.exports=function(e){return[...e].reduce((e,[t,n])=>(e[t]=n,e),{})}},function(e,t,n){e.exports=n.p+"static/media/bezier.799a5c8c.cjs"},function(t,n,r){"use strict";r.d(n,"a",(function(){return Wo})),r.d(n,"b",(function(){return Go}));var i=r(0),o=r.n(i);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){var n=new Set(t);return Object.assign.apply(Object,[{}].concat(l(Object.entries(e).filter((function(e){var t=s(e,1)[0];return!n.has(t)})).map((function(e){var t=s(e,2);return a({},t[0],t[1])})))))},d=r(168),f=r.n(d);function p(e){return(p="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=function(e,t){var n="object"===p(t)?t:{wrapperElementType:t,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},r=n.wrapperElementType,a=void 0===r?"div":r,s=n.nodeMapper,l=void 0===s?function(e){return e}:s,c=n.methodNames,u=void 0===c?[]:c,d=n.initPropNames,v=void 0===d?[]:d;return Object(i.forwardRef)((function(t,n){var r=Object(i.useRef)(),s=m(Object(i.useState)({}),2),c=s[0],d=s[1];Object(i.useEffect)((function(){return d(t)}));var p=Object(i.useMemo)((function(){var n=f()(v.filter((function(e){return t.hasOwnProperty(e)})).map((function(e){return[e,t[e]]})));return e(n)}),[]);Object(i.useLayoutEffect)((function(){p(l(r.current))}),[]),Object(i.useEffect)((function(){return p._destructor instanceof Function?p._destructor:void 0}),[]);var y=Object(i.useCallback)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return p[e]instanceof Function?p[e].apply(p,n):void 0}),[p]),b=h(t,[].concat(g(u),g(v)));return Object.keys(b).filter((function(e){return c[e]!==t[e]})).forEach((function(e){return y(e,t[e])})),Object(i.useImperativeHandle)(n,(function(){return f()(u.map((function(e){return[e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y.apply(void 0,[e].concat(n))}]})))})),o.a.createElement(a,{ref:r})}))},w=(r(318),r(319),r(183),r(54)),x=r(11);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".graph-nav-info {\n position: absolute;\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n font-family: Sans-serif;\n z-index: 1000;\n}");var O=Object(w.a)({props:{width:{default:window.innerWidth,triggerUpdate:!1,onChange:function(e,t){t.container&&(t.container.style.width=e)}},height:{default:window.innerHeight,triggerUpdate:!1,onChange:function(e,t){t.container&&(t.container.style.height=e)}},jsonUrl:{},graphData:{default:{nodes:[],links:[]}},numDimensions:{default:3},dagMode:{},dagLevelDistance:{},dagNodeFilter:{default:function(){return!0}},onDagError:{default:void 0},backgroundColor:{default:"#002"},showNavInfo:{default:!0},nodeRelSize:{default:4},nodeId:{default:"id"},nodeLabel:{default:"name"},nodeDesc:{default:"desc"},onNodeHover:{},onNodeClick:{},nodeVal:{default:"val"},nodeResolution:{default:8},nodeVisibility:{default:!0},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkLabel:{default:"name"},linkDesc:{default:"desc"},onLinkHover:{},onLinkClick:{},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{default:0},linkResolution:{default:6},linkCurvature:{default:0},linkCurveRotation:{default:0},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228},d3VelocityDecay:{default:.4},ngraphPhysics:{},warmupTicks:{default:0},cooldownTicks:{},cooldownTime:{default:15e3},onEngineTick:{},onEngineStop:{}},methods:E(E({},Object.assign.apply(Object,[{}].concat(M(["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"].map((function(e){return A({},e,(function(t){for(var n=t.forcegraph.components.forcegraph,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=n[e].apply(n,i);return a===n?this:a}))})))))),{},{_destructor:function(){this.graphData({nodes:[],links:[]})}}),init:function(e,t){e.innerHTML="",t.container=document.createElement("div"),e.appendChild(t.container),t.container.style.position="relative",t.container.style.width=t.width,t.container.style.height=t.height,t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="graph-nav-info",t.navInfo.textContent="Mouse drag: look, gamepad/arrow/wasd keys: move";var n,r,i,o,a,s=document.createElement("a-scene");s.setAttribute("embedded",""),s.appendChild(t.sky=document.createElement("a-sky")),t.sky.setAttribute("radius",3e3),s.appendChild(n=document.createElement("a-entity")),n.setAttribute("position","0 0 300"),n.setAttribute("movement-controls","fly: true; speed: 7"),n.appendChild(r=document.createElement("a-entity")),r.setAttribute("camera",""),r.setAttribute("position","0 0 0"),r.setAttribute("look-controls","reverseMouseDrag: false; pointerLockEnabled: false"),r.appendChild(i=document.createElement("a-text")),i.setAttribute("position","0 -0.3 -1"),i.setAttribute("width",2),i.setAttribute("align","center"),i.setAttribute("color","lavender"),i.setAttribute("value",""),r.appendChild(o=document.createElement("a-text")),o.setAttribute("position","0 -0.4 -1"),o.setAttribute("width",1.3),o.setAttribute("align","center"),o.setAttribute("color","lavender"),o.setAttribute("value",""),s.appendChild(a=document.createElement("a-entity")),a.setAttribute("cursor","rayOrigin: mouse; mouseCursorStylesEnabled: true"),a.setAttribute("raycaster","objects: [forcegraph]; interval: 100"),["left","right"].forEach((function(e){var t;n.appendChild(t=document.createElement("a-entity")),t.setAttribute("laser-controls","hand: ".concat(e)),t.setAttribute("raycaster","objects: [forcegraph]; interval: 100; lineColor: steelblue; lineOpacity: 0.85")})),s.appendChild(t.forcegraph=document.createElement("a-entity")),t.forcegraph.setAttribute("forcegraph",null),t.container.appendChild(s),t.forcegraph.setAttribute("forcegraph",Object.assign.apply(Object,M(["node","link"].map((function(e){var n={node:"Node",link:"Link"}[e];return A({},"on".concat(n,"Hover"),(function(r,a){var s=r&&Object(x.default)(t["".concat(e,"Label")])(r)||"",l=r&&Object(x.default)(t["".concat(e,"Desc")])(r)||"";i.setAttribute("value",s),o.setAttribute("value",l),t["on".concat(n,"Hover")]&&t["on".concat(n,"Hover")](r,a)}))})))))},update:function(e,t){t.hasOwnProperty("backgroundColor")&&e.sky.setAttribute("color",e.backgroundColor),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none");var n=["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","onNodeClick","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","onLinkClick","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"],r=Object.assign.apply(Object,[{}].concat(M(Object.entries(e).filter((function(e){var r=S(e,2),i=r[0],o=r[1];return t.hasOwnProperty(i)&&-1!==n.indexOf(i)&&void 0!==o&&null!==o})).map((function(e){var t=S(e,2);return A({},t[0],t[1])}))),M(Object.entries(e.graphData).map((function(e){var t=S(e,2);return A({},t[0],t[1])})))));e.forcegraph.setAttribute("forcegraph",r)}}),R=r(1),k=r.n(R);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||j(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){if(e){if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=Object(w.a)({props:{width:{},height:{},yOffset:{default:1.5},glScale:{default:200},jsonUrl:{},graphData:{default:{nodes:[],links:[]}},numDimensions:{default:3},dagMode:{},dagLevelDistance:{},dagNodeFilter:{default:function(){return!0}},onDagError:{default:void 0},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeVisibility:{default:!0},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{default:0},linkResolution:{default:6},linkCurvature:{default:0},linkCurveRotation:{default:0},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},onNodeHover:{},onNodeClick:{},onLinkHover:{},onLinkClick:{},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228},d3VelocityDecay:{default:.4},ngraphPhysics:{},warmupTicks:{default:0},cooldownTicks:{},cooldownTime:{default:15e3},onEngineTick:{},onEngineStop:{}},methods:L(L({},Object.assign.apply(Object,[{}].concat(N(["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"].map((function(e){return D({},e,(function(t){for(var n=t.forcegraph.components.forcegraph,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=n[e].apply(n,i);return a===n?this:a}))})))))),{},{_destructor:function(){this.graphData({nodes:[],links:[]})}}),init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.markerAttrs,i=void 0===r?{preset:"hiro"}:r;e.innerHTML="",t.container=document.createElement("div"),e.appendChild(t.container);var o=document.createElement("a-scene");o.setAttribute("embedded",""),o.setAttribute("arjs","debugUIEnabled: false;");var a,s=document.createElement("a-marker");Object.entries(i).forEach((function(e){var t=I(e,2),n=t[0],r=t[1];return s.setAttribute(n,r)})),o.appendChild(s),o.appendChild(a=document.createElement("a-entity")),a.setAttribute("cursor"),a.setAttribute("raycaster","objects: [forcegraph]"),t.forcegraph=document.createElement("a-entity"),t.forcegraph.setAttribute("forcegraph",null),s.appendChild(t.forcegraph);var l=document.createElement("a-entity");l.setAttribute("camera",""),o.appendChild(l),t.container.appendChild(o)},update:function(e,t){t.hasOwnProperty("width")&&e.width&&(e.container.style.width=e.width),t.hasOwnProperty("height")&&e.height&&(e.container.style.height=e.height),t.hasOwnProperty("glScale")&&e.forcegraph.setAttribute("scale",N(new Array(3)).map((function(){return 1/e.glScale})).join(" ")),t.hasOwnProperty("yOffset")&&e.forcegraph.setAttribute("position","0 ".concat(e.yOffset," 0"));var n=["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","onNodeHover","onNodeClick","onLinkHover","onLinkClick","forceEngine","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"],r=Object.assign.apply(Object,[{}].concat(N(Object.entries(e).filter((function(e){var r=I(e,2),i=r[0],o=r[1];return t.hasOwnProperty(i)&&-1!==n.indexOf(i)&&void 0!==o&&null!==o})).map((function(e){var t=I(e,2);return D({},t[0],t[1])}))),N(Object.entries(e.graphData).map((function(e){var t=I(e,2);return D({},t[0],t[1])})))));e.forcegraph.setAttribute("forcegraph",r)}}),z=r(2);const H=new z.y,U=new z.C,V=new z.P,G=new z.Q,W=new z.Q,q=new z.Q,X=new z.s;class Y extends z.l{constructor(e,t,n){super(),n.style.touchAction="none";let r=null,i=null;const o=[],a=this;function s(){n.addEventListener("pointermove",c),n.addEventListener("pointerdown",u),n.addEventListener("pointerup",h),n.addEventListener("pointerleave",h)}function l(){n.removeEventListener("pointermove",c),n.removeEventListener("pointerdown",u),n.removeEventListener("pointerup",h),n.removeEventListener("pointerleave",h),n.style.cursor=""}function c(s){if(!1!==a.enabled){if(d(s),U.setFromCamera(V,t),r)return U.ray.intersectPlane(H,W)&&r.position.copy(W.sub(G).applyMatrix4(X)),void a.dispatchEvent({type:"drag",object:r});if("mouse"===s.pointerType||"pen"===s.pointerType)if(o.length=0,U.setFromCamera(V,t),U.intersectObjects(e,!0,o),o.length>0){const e=o[0].object;H.setFromNormalAndCoplanarPoint(t.getWorldDirection(H.normal),q.setFromMatrixPosition(e.matrixWorld)),i!==e&&null!==i&&(a.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null),i!==e&&(a.dispatchEvent({type:"hoveron",object:e}),n.style.cursor="pointer",i=e)}else null!==i&&(a.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null)}}function u(i){!1!==a.enabled&&(d(i),o.length=0,U.setFromCamera(V,t),U.intersectObjects(e,!0,o),o.length>0&&(r=!0===a.transformGroup?e[0]:o[0].object,H.setFromNormalAndCoplanarPoint(t.getWorldDirection(H.normal),q.setFromMatrixPosition(r.matrixWorld)),U.ray.intersectPlane(H,W)&&(X.copy(r.parent.matrixWorld).invert(),G.copy(W).sub(q.setFromMatrixPosition(r.matrixWorld))),n.style.cursor="move",a.dispatchEvent({type:"dragstart",object:r})))}function h(){!1!==a.enabled&&(r&&(a.dispatchEvent({type:"dragend",object:r}),r=null),n.style.cursor=i?"pointer":"auto")}function d(e){const t=n.getBoundingClientRect();V.x=(e.clientX-t.left)/t.width*2-1,V.y=-(e.clientY-t.top)/t.height*2+1}s(),this.enabled=!0,this.transformGroup=!1,this.activate=s,this.deactivate=l,this.dispose=function(){l()},this.getObjects=function(){return e}}}var K=r(147);const Q={type:"change"},Z={type:"start"},J={type:"end"};class $ extends z.l{constructor(e,t){super(),void 0===t&&console.warn('THREE.TrackballControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.TrackballControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.');const n=this,r=-1,i=0,o=1,a=2,s=3,l=4;this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:z.r.ROTATE,MIDDLE:z.r.DOLLY,RIGHT:z.r.PAN},this.target=new z.Q;const c=new z.Q;let u=1,h=r,d=r,f=0,p=0,m=0;const g=new z.Q,v=new z.P,y=new z.P,b=new z.Q,w=new z.P,x=new z.P,_=new z.P,E=new z.P,A=[],S={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=n.domElement.getBoundingClientRect(),t=n.domElement.ownerDocument.documentElement;n.screen.left=e.left+window.pageXOffset-t.clientLeft,n.screen.top=e.top+window.pageYOffset-t.clientTop,n.screen.width=e.width,n.screen.height=e.height};const M=function(){const e=new z.P;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),T=function(){const e=new z.P;return function(t,r){return e.set((t-.5*n.screen.width-n.screen.left)/(.5*n.screen.width),(n.screen.height+2*(n.screen.top-r))/n.screen.width),e}}();function C(e){!1!==n.enabled&&(0===A.length&&(n.domElement.ownerDocument.addEventListener("pointermove",O),n.domElement.ownerDocument.addEventListener("pointerup",R)),function(e){A.push(e)}(e),"touch"===e.pointerType?function(e){switch(j(e),A.length){case 1:h=s,y.copy(T(A[0].pageX,A[0].pageY)),v.copy(y);break;default:h=l;const e=A[0].pageX-A[1].pageX,t=A[0].pageY-A[1].pageY;p=f=Math.sqrt(e*e+t*t);const n=(A[0].pageX+A[1].pageX)/2,r=(A[0].pageY+A[1].pageY)/2;_.copy(M(n,r)),E.copy(_)}n.dispatchEvent(Z)}(e):function(e){if(h===r)switch(e.button){case n.mouseButtons.LEFT:h=i;break;case n.mouseButtons.MIDDLE:h=o;break;case n.mouseButtons.RIGHT:h=a;break;default:h=r}const t=d!==r?d:h;t!==i||n.noRotate?t!==o||n.noZoom?t!==a||n.noPan||(_.copy(M(e.pageX,e.pageY)),E.copy(_)):(w.copy(M(e.pageX,e.pageY)),x.copy(w)):(y.copy(T(e.pageX,e.pageY)),v.copy(y));n.domElement.ownerDocument.addEventListener("pointermove",O),n.domElement.ownerDocument.addEventListener("pointerup",R),n.dispatchEvent(Z)}(e))}function O(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(j(e),A.length){case 1:v.copy(y),y.copy(T(e.pageX,e.pageY));break;default:const t=function(e){const t=e.pointerId===A[0].pointerId?A[1]:A[0];return S[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;p=Math.sqrt(n*n+r*r);const i=(e.pageX+t.x)/2,o=(e.pageY+t.y)/2;E.copy(M(i,o))}}(e):function(e){const t=d!==r?d:h;t!==i||n.noRotate?t!==o||n.noZoom?t!==a||n.noPan||E.copy(M(e.pageX,e.pageY)):x.copy(M(e.pageX,e.pageY)):(v.copy(y),y.copy(T(e.pageX,e.pageY)))}(e))}function R(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(A.length){case 0:h=r;break;case 1:h=s,y.copy(T(e.pageX,e.pageY)),v.copy(y)}n.dispatchEvent(J)}(e):(h=r,n.domElement.ownerDocument.removeEventListener("pointermove",O),n.domElement.ownerDocument.removeEventListener("pointerup",R),n.dispatchEvent(J)),N(e),0===A.length&&(n.domElement.ownerDocument.removeEventListener("pointermove",O),n.domElement.ownerDocument.removeEventListener("pointerup",R)))}function k(e){N(e)}function P(e){!1!==n.enabled&&(window.removeEventListener("keydown",P),d===r&&(e.code!==n.keys[i]||n.noRotate?e.code!==n.keys[o]||n.noZoom?e.code!==n.keys[a]||n.noPan||(d=a):d=o:d=i))}function L(){!1!==n.enabled&&(d=r,window.addEventListener("keydown",P))}function D(e){if(!1!==n.enabled&&!0!==n.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:w.y-=.025*e.deltaY;break;case 1:w.y-=.01*e.deltaY;break;default:w.y-=25e-5*e.deltaY}n.dispatchEvent(Z),n.dispatchEvent(J)}}function I(e){!1!==n.enabled&&e.preventDefault()}function N(e){delete S[e.pointerId];for(let t=0;t<A.length;t++)if(A[t].pointerId==e.pointerId)return void A.splice(t,1)}function j(e){let t=S[e.pointerId];void 0===t&&(t=new z.P,S[e.pointerId]=t),t.set(e.pageX,e.pageY)}this.rotateCamera=function(){const e=new z.Q,t=new z.A,r=new z.Q,i=new z.Q,o=new z.Q,a=new z.Q;return function(){a.set(y.x-v.x,y.y-v.y,0);let s=a.length();s?(g.copy(n.object.position).sub(n.target),r.copy(g).normalize(),i.copy(n.object.up).normalize(),o.crossVectors(i,r).normalize(),i.setLength(y.y-v.y),o.setLength(y.x-v.x),a.copy(i.add(o)),e.crossVectors(a,g).normalize(),s*=n.rotateSpeed,t.setFromAxisAngle(e,s),g.applyQuaternion(t),n.object.up.applyQuaternion(t),b.copy(e),m=s):!n.staticMoving&&m&&(m*=Math.sqrt(1-n.dynamicDampingFactor),g.copy(n.object.position).sub(n.target),t.setFromAxisAngle(b,m),g.applyQuaternion(t),n.object.up.applyQuaternion(t)),v.copy(y)}}(),this.zoomCamera=function(){let e;h===l?(e=f/p,f=p,n.object.isPerspectiveCamera?g.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom*=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(e=1+(x.y-w.y)*n.zoomSpeed,1!==e&&e>0&&(n.object.isPerspectiveCamera?g.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom/=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?w.copy(x):w.y+=(x.y-w.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new z.P,t=new z.Q,r=new z.Q;return function(){if(e.copy(E).sub(_),e.lengthSq()){if(n.object.isOrthographicCamera){const t=(n.object.right-n.object.left)/n.object.zoom/n.domElement.clientWidth,r=(n.object.top-n.object.bottom)/n.object.zoom/n.domElement.clientWidth;e.x*=t,e.y*=r}e.multiplyScalar(g.length()*n.panSpeed),r.copy(g).cross(n.object.up).setLength(e.x),r.add(t.copy(n.object.up).setLength(e.y)),n.object.position.add(r),n.target.add(r),n.staticMoving?_.copy(E):_.add(e.subVectors(E,_).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(g.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,g.setLength(n.maxDistance)),w.copy(x)),g.lengthSq()<n.minDistance*n.minDistance&&(n.object.position.addVectors(n.target,g.setLength(n.minDistance)),w.copy(x)))},this.update=function(){g.subVectors(n.object.position,n.target),n.noRotate||n.rotateCamera(),n.noZoom||n.zoomCamera(),n.noPan||n.panCamera(),n.object.position.addVectors(n.target,g),n.object.isPerspectiveCamera?(n.checkDistances(),n.object.lookAt(n.target),c.distanceToSquared(n.object.position)>1e-6&&(n.dispatchEvent(Q),c.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(c.distanceToSquared(n.object.position)>1e-6||u!==n.object.zoom)&&(n.dispatchEvent(Q),c.copy(n.object.position),u=n.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){h=r,d=r,n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.up.copy(n.up0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),g.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent(Q),c.copy(n.object.position),u=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",I),n.domElement.removeEventListener("pointerdown",C),n.domElement.removeEventListener("pointercancel",k),n.domElement.removeEventListener("wheel",D),window.removeEventListener("keydown",P),window.removeEventListener("keyup",L)},this.domElement.addEventListener("contextmenu",I),this.domElement.addEventListener("pointerdown",C),this.domElement.addEventListener("pointercancel",k),this.domElement.addEventListener("wheel",D,{passive:!1}),window.addEventListener("keydown",P),window.addEventListener("keyup",L),this.handleResize(),this.update()}}const ee={type:"change"},te={type:"start"},ne={type:"end"};class re extends z.l{constructor(e,t){super(),void 0===t&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new z.Q,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:z.r.ROTATE,MIDDLE:z.r.DOLLY,RIGHT:z.r.PAN},this.touches={ONE:z.K.ROTATE,TWO:z.K.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.listenToKeyEvents=function(e){e.addEventListener("keydown",G),this._domElementKeyEvents=e},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(ee),n.update(),i=r.NONE},this.update=function(){const t=new z.Q,h=(new z.A).setFromUnitVectors(e.up,new z.Q(0,1,0)),d=h.clone().invert(),f=new z.Q,p=new z.A,m=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(h),a.setFromVector3(t),n.autoRotate&&i===r.NONE&&E(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(a.theta+=s.theta*n.dampingFactor,a.phi+=s.phi*n.dampingFactor):(a.theta+=s.theta,a.phi+=s.phi);let g=n.minAzimuthAngle,v=n.maxAzimuthAngle;return isFinite(g)&&isFinite(v)&&(g<-Math.PI?g+=m:g>Math.PI&&(g-=m),v<-Math.PI?v+=m:v>Math.PI&&(v-=m),a.theta=g<=v?Math.max(g,Math.min(v,a.theta)):a.theta>(g+v)/2?Math.max(g,a.theta):Math.min(v,a.theta)),a.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,a.phi)),a.makeSafe(),a.radius*=l,a.radius=Math.max(n.minDistance,Math.min(n.maxDistance,a.radius)),!0===n.enableDamping?n.target.addScaledVector(c,n.dampingFactor):n.target.add(c),t.setFromSpherical(a),t.applyQuaternion(d),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,c.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),c.set(0,0,0)),l=1,!!(u||f.distanceToSquared(n.object.position)>o||8*(1-p.dot(n.object.quaternion))>o)&&(n.dispatchEvent(ee),f.copy(n.object.position),p.copy(n.object.quaternion),u=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",W),n.domElement.removeEventListener("pointerdown",B),n.domElement.removeEventListener("pointercancel",U),n.domElement.removeEventListener("wheel",V),n.domElement.ownerDocument.removeEventListener("pointermove",F),n.domElement.ownerDocument.removeEventListener("pointerup",H),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",G)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const o=1e-6,a=new z.H,s=new z.H;let l=1;const c=new z.Q;let u=!1;const h=new z.P,d=new z.P,f=new z.P,p=new z.P,m=new z.P,g=new z.P,v=new z.P,y=new z.P,b=new z.P,w=[],x={};function _(){return Math.pow(.95,n.zoomSpeed)}function E(e){s.theta-=e}function A(e){s.phi-=e}const S=function(){const e=new z.Q;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),c.add(e)}}(),M=function(){const e=new z.Q;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),c.add(e)}}(),T=function(){const e=new z.Q;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const o=n.object.position;e.copy(o).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),S(2*t*a/i.clientHeight,n.object.matrix),M(2*r*a/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(S(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),M(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function C(e){n.object.isPerspectiveCamera?l/=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),u=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function O(e){n.object.isPerspectiveCamera?l*=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),u=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function R(e){h.set(e.clientX,e.clientY)}function k(e){p.set(e.clientX,e.clientY)}function P(){if(1===w.length)h.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);h.set(e,t)}}function L(){if(1===w.length)p.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);p.set(e,t)}}function D(){const e=w[0].pageX-w[1].pageX,t=w[0].pageY-w[1].pageY,n=Math.sqrt(e*e+t*t);v.set(0,n)}function I(e){if(1==w.length)d.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);d.set(n,r)}f.subVectors(d,h).multiplyScalar(n.rotateSpeed);const t=n.domElement;E(2*Math.PI*f.x/t.clientHeight),A(2*Math.PI*f.y/t.clientHeight),h.copy(d)}function N(e){if(1===w.length)m.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}g.subVectors(m,p).multiplyScalar(n.panSpeed),T(g.x,g.y),p.copy(m)}function j(e){const t=Y(e),r=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(r*r+i*i);y.set(0,o),b.set(0,Math.pow(y.y/v.y,n.zoomSpeed)),C(b.y),v.copy(y)}function B(e){!1!==n.enabled&&(0===w.length&&(n.domElement.ownerDocument.addEventListener("pointermove",F),n.domElement.ownerDocument.addEventListener("pointerup",H)),function(e){w.push(e)}(e),"touch"===e.pointerType?function(e){switch(X(e),w.length){case 1:switch(n.touches.ONE){case z.K.ROTATE:if(!1===n.enableRotate)return;P(),i=r.TOUCH_ROTATE;break;case z.K.PAN:if(!1===n.enablePan)return;L(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(n.touches.TWO){case z.K.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&D(),n.enablePan&&L(),i=r.TOUCH_DOLLY_PAN;break;case z.K.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&D(),n.enableRotate&&P(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(te)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case z.r.DOLLY:if(!1===n.enableZoom)return;!function(e){v.set(e.clientX,e.clientY)}(e),i=r.DOLLY;break;case z.r.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;k(e),i=r.PAN}else{if(!1===n.enableRotate)return;R(e),i=r.ROTATE}break;case z.r.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;R(e),i=r.ROTATE}else{if(!1===n.enablePan)return;k(e),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(te)}(e))}function F(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(X(e),i){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;I(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;N(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&j(e),n.enablePan&&N(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&j(e),n.enableRotate&&I(e)}(e),n.update();break;default:i=r.NONE}}(e):function(e){if(!1===n.enabled)return;switch(i){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){d.set(e.clientX,e.clientY),f.subVectors(d,h).multiplyScalar(n.rotateSpeed);const t=n.domElement;E(2*Math.PI*f.x/t.clientHeight),A(2*Math.PI*f.y/t.clientHeight),h.copy(d),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){y.set(e.clientX,e.clientY),b.subVectors(y,v),b.y>0?C(_()):b.y<0&&O(_()),v.copy(y),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){m.set(e.clientX,e.clientY),g.subVectors(m,p).multiplyScalar(n.panSpeed),T(g.x,g.y),p.copy(m),n.update()}(e)}}(e))}function H(e){!1!==n.enabled&&(e.pointerType,n.dispatchEvent(ne),i=r.NONE,q(e),0===w.length&&(n.domElement.ownerDocument.removeEventListener("pointermove",F),n.domElement.ownerDocument.removeEventListener("pointerup",H)))}function U(e){q(e)}function V(e){!1===n.enabled||!1===n.enableZoom||i!==r.NONE&&i!==r.ROTATE||(e.preventDefault(),n.dispatchEvent(te),function(e){e.deltaY<0?O(_()):e.deltaY>0&&C(_()),n.update()}(e),n.dispatchEvent(ne))}function G(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:T(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:T(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:T(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:T(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function W(e){!1!==n.enabled&&e.preventDefault()}function q(e){delete x[e.pointerId];for(let t=0;t<w.length;t++)if(w[t].pointerId==e.pointerId)return void w.splice(t,1)}function X(e){let t=x[e.pointerId];void 0===t&&(t=new z.P,x[e.pointerId]=t),t.set(e.pageX,e.pageY)}function Y(e){const t=e.pointerId===w[0].pointerId?w[1]:w[0];return x[t.pointerId]}n.domElement.addEventListener("contextmenu",W),n.domElement.addEventListener("pointerdown",B),n.domElement.addEventListener("pointercancel",U),n.domElement.addEventListener("wheel",V,{passive:!1}),this.update()}}const ie={type:"change"};class oe extends z.l{constructor(e,t){super(),void 0===t&&(console.warn('THREE.FlyControls: The second parameter "domElement" is now mandatory.'),t=document),this.object=e,this.domElement=t,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const n=this,r=new z.A,i=new z.Q;this.tmpQuaternion=new z.A,this.mouseStatus=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new z.Q(0,0,0),this.rotationVector=new z.Q(0,0,0),this.keydown=function(e){if(!e.altKey){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()},this.mousedown=function(e){if(this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.mousemove=function(e){if(!this.dragToLook||this.mouseStatus>0){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}},this.mouseup=function(e){if(this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()},this.update=function(e){const t=e*n.movementSpeed,o=e*n.rollSpeed;n.object.translateX(n.moveVector.x*t),n.object.translateY(n.moveVector.y*t),n.object.translateZ(n.moveVector.z*t),n.tmpQuaternion.set(n.rotationVector.x*o,n.rotationVector.y*o,n.rotationVector.z*o,1).normalize(),n.object.quaternion.multiply(n.tmpQuaternion),(i.distanceToSquared(n.object.position)>1e-6||8*(1-r.dot(n.object.quaternion))>1e-6)&&(n.dispatchEvent(ie),r.copy(n.object.quaternion),i.copy(n.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",ae),this.domElement.removeEventListener("mousedown",a),this.domElement.removeEventListener("mousemove",o),this.domElement.removeEventListener("mouseup",s),window.removeEventListener("keydown",l),window.removeEventListener("keyup",c)};const o=this.mousemove.bind(this),a=this.mousedown.bind(this),s=this.mouseup.bind(this),l=this.keydown.bind(this),c=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",ae),this.domElement.addEventListener("mousemove",o),this.domElement.addEventListener("mousedown",a),this.domElement.addEventListener("mouseup",s),window.addEventListener("keydown",l),window.addEventListener("keyup",c),this.updateMovementVector(),this.updateRotationVector()}}function ae(e){e.preventDefault()}var se={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\t\t}"};class le{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}const ce=new z.w(-1,1,1,-1,0,1),ue=new z.e;ue.setAttribute("position",new z.m([-1,3,0,-1,-1,0,3,-1,0],3)),ue.setAttribute("uv",new z.m([0,2,0,0,2,0],2));class he{constructor(e){this._mesh=new z.t(ue,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,ce)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class de extends le{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof z.E?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=z.O.clone(e.uniforms),this.material=new z.E({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new he(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}}class fe extends le{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),i=e.state;let o,a;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),i.buffers.stencil.setClear(a),i.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(r.EQUAL,1,4294967295),i.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),i.buffers.stencil.setLocked(!0)}}class pe extends le{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class me{constructor(e,t){if(this.renderer=e,void 0===t){const n={minFilter:z.q,magFilter:z.q,format:z.B},r=e.getSize(new z.P);this._pixelRatio=e.getPixelRatio(),this._width=r.width,this._height=r.height,(t=new z.R(this._width*this._pixelRatio,this._height*this._pixelRatio,n)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],void 0===se&&console.error("THREE.EffectComposer relies on CopyShader"),void 0===de&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new de(se),this.clock=new z.f}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let r=0,i=this.passes.length;r<i;r++){const t=this.passes[r];if(!1!==t.enabled){if(t.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),t.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),t.needsSwap){if(n){const t=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(t.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),n.setFunc(t.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==fe&&(t instanceof fe?n=!0:t instanceof pe&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(void 0===e){const t=this.renderer.getSize(new z.P);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,(e=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(n,r),this.renderTarget2.setSize(n,r);for(let i=0;i<this.passes.length;i++)this.passes[i].setSize(n,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}}new z.w(-1,1,1,-1,0,1);const ge=new z.e;ge.setAttribute("position",new z.m([-1,3,0,-1,-1,0,3,-1,0],3)),ge.setAttribute("uv",new z.m([0,2,0,0,2,0],2));class ve extends le{constructor(e,t,n,r,i){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=void 0!==i?i:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new z.g}render(e,t,n){const r=e.autoClear;let i,o;e.autoClear=!1,void 0!==this.overrideMaterial&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),i=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,i),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=o),e.autoClear=r}}function ye(){return(ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function be(e,t){return(be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function we(e){return(we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xe(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _e(e,t,n){return(_e=xe()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&be(i,n.prototype),i}).apply(null,arguments)}function Ee(e){var t="function"===typeof Map?new Map:void 0;return(Ee=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _e(e,arguments,we(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),be(r,e)})(e)}var Ae=function(e){var t,n;function r(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,be(t,n),r}(Ee(Error));function Se(e){return Math.round(255*e)}function Me(e,t,n){return Se(e)+","+Se(t)+","+Se(n)}function Te(e,t,n,r){if(void 0===r&&(r=Me),0===t)return r(n,n,n);var i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*t,a=o*(1-Math.abs(i%2-1)),s=0,l=0,c=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,c=a):i>=3&&i<4?(l=a,c=o):i>=4&&i<5?(s=a,c=o):i>=5&&i<6&&(s=o,c=a);var u=n-o/2;return r(s+u,l+u,c+u)}var Ce={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var Oe=/^#[a-fA-F0-9]{6}$/,Re=/^#[a-fA-F0-9]{8}$/,ke=/^#[a-fA-F0-9]{3}$/,Pe=/^#[a-fA-F0-9]{4}$/,Le=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,De=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,Ie=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Ne=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function je(e){if("string"!==typeof e)throw new Ae(3);var t=function(e){if("string"!==typeof e)return e;var t=e.toLowerCase();return Ce[t]?"#"+Ce[t]:e}(e);if(t.match(Oe))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(Re)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(ke))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(Pe)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=Le.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=De.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])};var a=Ie.exec(t);if(a){var s="rgb("+Te(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",l=Le.exec(s);if(!l)throw new Ae(4,t,s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=Ne.exec(t.substring(0,50));if(c){var u="rgb("+Te(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",h=Le.exec(u);if(!h)throw new Ae(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+c[4])}}throw new Ae(5)}var Be=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function Fe(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function ze(e,t,n){if("number"===typeof e&&"number"===typeof t&&"number"===typeof n)return Be("#"+Fe(e)+Fe(t)+Fe(n));if("object"===typeof e&&void 0===t&&void 0===n)return Be("#"+Fe(e.red)+Fe(e.green)+Fe(e.blue));throw new Ae(6)}function He(e,t,n,r){if("string"===typeof e&&"number"===typeof t){var i=je(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"===typeof e&&"number"===typeof t&&"number"===typeof n&&"number"===typeof r)return r>=1?ze(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"===typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?ze(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Ae(7)}function Ue(e){return function e(t,n,r){return function(){var i=r.concat(Array.prototype.slice.call(arguments));return i.length>=n?t.apply(this,i):e(t,n,i)}}(e,e.length,[])}function Ve(e,t,n){return Math.max(e,Math.min(t,n))}function Ge(e,t){if("transparent"===t)return t;var n=je(t);return He(ye({},n,{alpha:Ve(0,1,(100*("number"===typeof n.alpha?n.alpha:1)+100*parseFloat(e))/100)}))}var We=Ue(Ge);var qe=r(63);function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Qe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(e){return function(e){if(Array.isArray(e))return Ze(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Qe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qe(e,t){if(e){if("string"===typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}");var Je=window.THREE?window.THREE:{WebGLRenderer:z.S,Scene:z.D,PerspectiveCamera:z.x,Raycaster:z.C,TextureLoader:z.M,Vector2:z.P,Vector3:z.Q,Box3:z.c,Color:z.g,Mesh:z.t,SphereGeometry:z.G,MeshBasicMaterial:z.u,BackSide:z.b,EventDispatcher:z.l,MOUSE:z.r,Quaternion:z.A,Spherical:z.H,Clock:z.f},$e=Object(w.a)({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),r=n.length?n[0]:null;t=r?r.object:null,e.intersectionPoint=r?r.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&Object(x.default)(e.tooltipContent)(t)||"",e.hoverObj=t)}qe.a.update()}return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,r){var i=e.camera;if(t&&e.initialised){var o=t,a=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},i.position),l=h();new qe.a.Tween(s).to(o,r).easing(qe.a.Easing.Quadratic.Out).onUpdate(c).start(),new qe.a.Tween(l).to(a,r/3).easing(qe.a.Easing.Quadratic.Out).onUpdate(u).start()}else c(o),u(a);return this}return Object.assign({},i.position,{lookAt:h()});function c(e){var t=e.x,n=e.y,r=e.z;void 0!==t&&(i.position.x=t),void 0!==n&&(i.position.y=n),void 0!==r&&(i.position.z=r)}function u(t){e.controls.target=new Je.Vector3(t.x,t.y,t.z)}function h(){return Object.assign(new Je.Vector3(0,0,-1e3).applyQuaternion(i.quaternion).add(i.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return this.fitToBbox(this.getBbox.apply(this,i),t,n)},fitToBbox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,i=e.camera;if(t){var o=new Je.Vector3(0,0,0),a=2*Math.max.apply(Math,Ke(Object.entries(t).map((function(e){var t=Ye(e,2),n=t[0],r=t[1];return Math.max.apply(Math,Ke(r.map((function(e){return Math.abs(o[n]-e)}))))})))),s=(1-2*r/e.height)*i.fov,l=a/Math.atan(s*Math.PI/180),c=l/i.aspect,u=Math.max(l,c);if(u>0){var h=o.clone().sub(i.position).normalize().multiplyScalar(-u);this.cameraPosition(h,o,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new Je.Box3(new Je.Vector3(0,0,0),new Je.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach((function(e){return n.expandByObject(e)})),Object.assign.apply(Object,Ke(["x","y","z"].map((function(e){return Xe({},e,[n.min[e],n.max[e]])}))))):null},getScreenCoords:function(e,t,n,r){var i=new Je.Vector3(t,n,r);return i.project(this.camera()),{x:(i.x+1)*e.width/2,y:-(i.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=new Je.Vector2(t/e.width*2-1,-n/e.height*2+1),o=new Je.Raycaster;return o.setFromCamera(i,e.camera),Object.assign({},o.ray.at(r,new Je.Vector3))},intersectingObjects:function(e,t,n){var r=new Je.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new Je.Raycaster;return i.params.Line.threshold=e.lineHoverPrecision,i.setFromCamera(r,e.camera),i.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new Je.Scene,camera:new Je.PerspectiveCamera,clock:new Je.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,i=void 0===r?"trackball":r,o=n.rendererConfig,a=void 0===o?{}:o,s=n.extraRenderers,l=void 0===s?[]:s,c=n.waitForLoadComplete,u=void 0===c||c;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[i]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new Je.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var r=function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(t.container);t.pointerPos.x=n.pageX-r.left,t.pointerPos.y=n.pageY-r.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, 21px)")}}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new Je.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},a)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=l,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new me(t.renderer),t.postProcessingComposer.addPass(new ve(t.scene,t.camera)),t.controls=new{trackball:$,orbit:re,fly:oe}[i](t.camera,t.renderer.domElement),"fly"===i&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==i&&"orbit"!==i||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(Ke(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new Je.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!u,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width=e.width,e.container.style.height=e.height,[e.renderer,e.postProcessingComposer].concat(Ke(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=e.skyRadius),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new Je.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=je(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new Je.Color(We(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new Je.TextureLoader).load(e.backgroundImageUrl,(function(t){e.skysphere.material=new Je.MeshBasicMaterial({map:t,side:Je.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}});function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){nt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rt(e){return function(e){if(Array.isArray(e))return it(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ot(e,t){var n=new t;return{linkProp:function(t){return{default:n[t](),onChange:function(n,r){r[e][t](n)},triggerUpdate:!1}},linkMethod:function(t){return function(n){for(var r=n[e],i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var s=r[t].apply(r,o);return s===r?this:s}}}}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".graph-info-msg {\n top: 50%;\n width: 100%;\n text-align: center;\n color: lavender;\n opacity: 0.7;\n font-size: 22px;\n position: absolute;\n font-family: Sans-serif;\n}\n\n.scene-container .clickable {\n cursor: pointer;\n}\n\n.scene-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.scene-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}");var at=window.THREE?window.THREE:{AmbientLight:z.a,DirectionalLight:z.k,Vector3:z.Q},st=ot("forceGraph",K.default),lt=Object.assign.apply(Object,rt(["jsonUrl","graphData","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeColor","nodeAutoColorBy","nodeOpacity","nodeVisibility","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaDecay","d3VelocityDecay","d3AlphaMin","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(e){return nt({},e,st.linkProp(e))})))),ct=Object.assign.apply(Object,rt(["refresh","getGraphBbox","d3Force","d3ReheatSimulation","emitParticle"].map((function(e){return nt({},e,st.linkMethod(e))})))),ut=ot("renderObjs",$e),ht=Object.assign.apply(Object,rt(["width","height","backgroundColor","showNavInfo","enablePointerInteraction"].map((function(e){return nt({},e,ut.linkProp(e))})))),dt=Object.assign.apply(Object,rt(["cameraPosition","postProcessingComposer"].map((function(e){return nt({},e,ut.linkMethod(e))}))).concat([{graph2ScreenCoords:ut.linkMethod("getScreenCoords"),screen2GraphCoords:ut.linkMethod("getSceneCoords")}]));function ft(e){for(var t=e;t&&!t.hasOwnProperty("__graphObjType");)t=t.parent;return t}var pt=Object(w.a)({props:tt(tt({nodeLabel:{default:"name",triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:1,onChange:function(e,t){return t.renderObjs.lineHoverPrecision(e)},triggerUpdate:!1},enableNavigationControls:{default:!0,onChange:function(e,t){var n=t.renderObjs.controls();n&&(n.enabled=e)},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1}},lt),ht),methods:tt(tt({zoomToFit:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return e.renderObjs.fitToBbox((r=e.forceGraph).getGraphBbox.apply(r,o),t,n),this},pauseAnimation:function(e){return null!==e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return null===e.animationFrameRequestId&&this._animationCycle(),this},_animationCycle:function(e){e.enablePointerInteraction&&(this.renderer().domElement.style.cursor=null),e.forceGraph.tickFrame(),e.renderObjs.tick(),e.animationFrameRequestId=requestAnimationFrame(this._animationCycle)},scene:function(e){return e.renderObjs.scene()},camera:function(e){return e.renderObjs.camera()},renderer:function(e){return e.renderObjs.renderer()},controls:function(e){return e.renderObjs.controls()},tbControls:function(e){return e.renderObjs.tbControls()},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},ct),dt),stateInit:function(e){var t=e.controlType,n=e.rendererConfig,r=e.extraRenderers;return{forceGraph:new K.default,renderObjs:$e({controlType:t,rendererConfig:n,extraRenderers:r})}},init:function(e,t){e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.style.position="relative";var n=document.createElement("div");t.container.appendChild(n),t.renderObjs(n);var r,i=t.renderObjs.camera(),o=t.renderObjs.renderer(),a=t.renderObjs.controls();a.enabled=!!t.enableNavigationControls,t.lastSetCameraZ=i.position.z,t.container.appendChild(r=document.createElement("div")),r.className="graph-info-msg",r.textContent="",t.forceGraph.onLoading((function(){r.textContent="Loading..."})).onFinishLoading((function(){r.textContent=""})).onUpdate((function(){t.graphData=t.forceGraph.graphData(),0===i.position.x&&0===i.position.y&&i.position.z===t.lastSetCameraZ&&t.graphData.nodes.length&&(i.lookAt(t.forceGraph.position),t.lastSetCameraZ=i.position.z=170*Math.cbrt(t.graphData.nodes.length))})).onFinishUpdate((function(){if(t._dragControls){var e=t.graphData.nodes.find((function(e){return e.__initialFixedPos&&!e.__disposeControlsAfterDrag}));e?e.__disposeControlsAfterDrag=!0:t._dragControls.dispose(),t._dragControls=void 0}if(t.enableNodeDrag&&t.enablePointerInteraction&&"d3"===t.forceEngine){var n=t._dragControls=new Y(t.graphData.nodes.map((function(e){return e.__threeObj})).filter((function(e){return e})),i,o.domElement);n.addEventListener("dragstart",(function(e){a.enabled=!1,e.object.__initialPos=e.object.position.clone(),e.object.__prevPos=e.object.position.clone();var t=ft(e.object).__data;!t.__initialFixedPos&&(t.__initialFixedPos={fx:t.fx,fy:t.fy,fz:t.fz}),!t.__initialPos&&(t.__initialPos={x:t.x,y:t.y,z:t.z}),["x","y","z"].forEach((function(e){return t["f".concat(e)]=t[e]})),o.domElement.classList.add("grabbable")})),n.addEventListener("drag",(function(e){var n=ft(e.object);if(!e.object.hasOwnProperty("__graphObjType")){var r=e.object.__initialPos,i=e.object.__prevPos,o=e.object.position;n.position.add(o.clone().sub(i)),i.copy(o),o.copy(r)}var a=n.__data,s=n.position,l={x:s.x-a.x,y:s.y-a.y,z:s.z-a.z};["x","y","z"].forEach((function(e){return a["f".concat(e)]=a[e]=s[e]})),t.forceGraph.d3AlphaTarget(.3).resetCountdown(),a.__dragged=!0,t.onNodeDrag(a,l)})),n.addEventListener("dragend",(function(e){delete e.object.__initialPos,delete e.object.__prevPos;var r=ft(e.object).__data;r.__disposeControlsAfterDrag&&(n.dispose(),delete r.__disposeControlsAfterDrag);var i=r.__initialFixedPos,s=r.__initialPos,l={x:s.x-r.x,y:s.y-r.y,z:s.z-r.z};i&&(["x","y","z"].forEach((function(e){var t="f".concat(e);void 0===i[t]&&delete r[t]})),delete r.__initialFixedPos,delete r.__initialPos,r.__dragged&&(delete r.__dragged,t.onNodeDragEnd(r,l))),t.forceGraph.d3AlphaTarget(0).resetCountdown(),t.enableNavigationControls&&(a.enabled=!0,a.domElement&&a.domElement.ownerDocument&&a.domElement.ownerDocument.dispatchEvent(new PointerEvent("pointerup",{pointerType:"touch"}))),o.domElement.classList.remove("grabbable")}))}})),t.renderObjs.objects([new at.AmbientLight(12303291),new at.DirectionalLight(16777215,.6),t.forceGraph]).hoverOrderComparator((function(e,t){var n=ft(e);if(!n)return 1;var r=ft(t);if(!r)return-1;var i=function(e){return"node"===e.__graphObjType};return i(r)-i(n)})).tooltipContent((function(e){var n=ft(e);return n&&Object(x.default)(t["".concat(n.__graphObjType,"Label")])(n.__data)||""})).hoverDuringDrag(!1).onHover((function(e){var n=ft(e);if(n!==t.hoverObj){var r=t.hoverObj?t.hoverObj.__graphObjType:null,i=t.hoverObj?t.hoverObj.__data:null,a=n?n.__graphObjType:null,s=n?n.__data:null;if(r&&r!==a){var l=t["on".concat("node"===r?"Node":"Link","Hover")];l&&l(null,i)}if(a){var c=t["on".concat("node"===a?"Node":"Link","Hover")];c&&c(s,r===a?i:null)}o.domElement.classList[n&&t["on".concat("node"===a?"Node":"Link","Click")]||!n&&t.onBackgroundClick?"add":"remove"]("clickable"),t.hoverObj=n}})).clickAfterDrag(!1).onClick((function(e,n){var r=ft(e);if(r){var i=t["on".concat("node"===r.__graphObjType?"Node":"Link","Click")];i&&i(r.__data,n)}else t.onBackgroundClick&&t.onBackgroundClick(n)})).onRightClick((function(e,n){var r=ft(e);if(r){var i=t["on".concat("node"===r.__graphObjType?"Node":"Link","RightClick")];i&&i(r.__data,n)}else t.onBackgroundRightClick&&t.onBackgroundRightClick(n)})),this._animationCycle()}});function mt(){}var gt=function(e){return null==e?mt:function(){return this.querySelector(e)}};function vt(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function yt(){return[]}var bt=function(e){return null==e?yt:function(){return this.querySelectorAll(e)}};var wt=function(e){return function(){return this.matches(e)}};function xt(e){return function(t){return t.matches(e)}}var _t=Array.prototype.find;function Et(){return this.firstElementChild}var At=Array.prototype.filter;function St(){return Array.from(this.children)}var Mt=function(e){return new Array(e.length)};function Tt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Tt.prototype={constructor:Tt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var Ct=function(e){return function(){return e}};function Ot(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new Tt(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Rt(e,t,n,r,i,o,a){var s,l,c,u=new Map,h=t.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(l=t[s])&&(f[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<d;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(r[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new Tt(e,o[s]);for(s=0;s<h;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function kt(e){return e.__data__}function Pt(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function Lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Dt="http://www.w3.org/1999/xhtml",It={svg:"http://www.w3.org/2000/svg",xhtml:Dt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Nt=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),It.hasOwnProperty(t)?{space:It[t],local:e}:e};function jt(e){return function(){this.removeAttribute(e)}}function Bt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ft(e,t){return function(){this.setAttribute(e,t)}}function zt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ht(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Ut(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var Vt=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function Gt(e){return function(){this.style.removeProperty(e)}}function Wt(e,t,n){return function(){this.style.setProperty(e,t,n)}}function qt(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Xt(e,t){return e.style.getPropertyValue(t)||Vt(e).getComputedStyle(e,null).getPropertyValue(t)}function Yt(e){return function(){delete this[e]}}function Kt(e,t){return function(){this[e]=t}}function Qt(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Zt(e){return e.trim().split(/^|\s+/)}function Jt(e){return e.classList||new $t(e)}function $t(e){this._node=e,this._names=Zt(e.getAttribute("class")||"")}function en(e,t){for(var n=Jt(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function tn(e,t){for(var n=Jt(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function nn(e){return function(){en(this,e)}}function rn(e){return function(){tn(this,e)}}function on(e,t){return function(){(t.apply(this,arguments)?en:tn)(this,e)}}$t.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function an(){this.textContent=""}function sn(e){return function(){this.textContent=e}}function ln(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function cn(){this.innerHTML=""}function un(e){return function(){this.innerHTML=e}}function hn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function dn(){this.nextSibling&&this.parentNode.appendChild(this)}function fn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pn(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Dt&&t.documentElement.namespaceURI===Dt?t.createElement(e):t.createElementNS(n,e)}}function mn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}var gn=function(e){var t=Nt(e);return(t.local?mn:pn)(t)};function vn(){return null}function yn(){var e=this.parentNode;e&&e.removeChild(this)}function bn(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xn(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function _n(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function En(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function An(e,t,n){var r=Vt(e),i=r.CustomEvent;"function"===typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Sn(e,t){return function(){return An(this,e,t)}}function Mn(e,t){return function(){return An(this,e,t.apply(this,arguments))}}var Tn=[null];function Cn(e,t){this._groups=e,this._parents=t}function On(){return new Cn([[document.documentElement]],Tn)}Cn.prototype=On.prototype={constructor:Cn,select:function(e){"function"!==typeof e&&(e=gt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new Cn(r,this._parents)},selectAll:function(e){e="function"===typeof e?function(e){return function(){return vt(e.apply(this,arguments))}}(e):bt(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),i.push(a));return new Cn(r,i)},selectChild:function(e){return this.select(null==e?Et:function(e){return function(){return _t.call(this.children,e)}}("function"===typeof e?e:xt(e)))},selectChildren:function(e){return this.selectAll(null==e?St:function(e){return function(){return At.call(this.children,e)}}("function"===typeof e?e:xt(e)))},filter:function(e){"function"!==typeof e&&(e=wt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new Cn(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,kt);var n=t?Rt:Ot,r=this._parents,i=this._groups;"function"!==typeof e&&(e=Ct(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],h=i[c],d=h.length,f=Pt(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=a[c]=new Array(p),v=l[c]=new Array(d);n(u,h,m,g,v,f,t);for(var y,b,w=0,x=0;w<p;++w)if(y=m[w]){for(w>=x&&(x=w+1);!(b=g[x])&&++x<p;);y._next=b||null}}return(a=new Cn(a,r))._enter=s,a._exit=l,a},enter:function(){return new Cn(this._enter||this._groups.map(Mt),this._parents)},exit:function(){return new Cn(this._exit||this._groups.map(Mt),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=this.exit();return"function"===typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var c,u=n[l],h=r[l],d=u.length,f=s[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<i;++l)s[l]=n[l];return new Cn(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Lt);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new Cn(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,o=t[n],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var n=Nt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Bt:jt:"function"===typeof t?n.local?Ut:Ht:n.local?zt:Ft)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Gt:"function"===typeof t?qt:Wt)(e,t,null==n?"":n)):Xt(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Yt:"function"===typeof t?Qt:Kt)(e,t)):this.node()[e]},classed:function(e,t){var n=Zt(e+"");if(arguments.length<2){for(var r=Jt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"===typeof t?on:t?nn:rn)(n,t))},text:function(e){return arguments.length?this.each(null==e?an:("function"===typeof e?ln:sn)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?cn:("function"===typeof e?hn:un)(e)):this.node().innerHTML},raise:function(){return this.each(dn)},lower:function(){return this.each(fn)},append:function(e){var t="function"===typeof e?e:gn(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"===typeof e?e:gn(e),r=null==t?vn:"function"===typeof t?t:gt(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(yn)},clone:function(e){return this.select(e?wn:bn)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=xn(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?En:_n,r=0;r<a;++r)this.each(s(o[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"===typeof t?Mn:Sn)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Rn=On,kn=function(e){return"string"===typeof e?new Cn([[document.querySelector(e)]],[document.documentElement]):new Cn([[e]],Tn)},Pn=r(463);const Ln={passive:!1},Dn={capture:!0,passive:!1};function In(e){e.stopImmediatePropagation()}var Nn=function(e){e.preventDefault(),e.stopImmediatePropagation()},jn=function(e){var t=e.document.documentElement,n=kn(e).on("dragstart.drag",Nn,Dn);"onselectstart"in t?n.on("selectstart.drag",Nn,Dn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")};function Bn(e,t){var n=e.document.documentElement,r=kn(e).on("dragstart.drag",null);t&&(r.on("click.drag",Nn,Dn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Fn(e){return((e=Math.exp(e))+1/e)/2}var zn=function e(t,n,r){function i(e,i){var o,a,s=e[0],l=e[1],c=e[2],u=i[0],h=i[1],d=i[2],f=u-s,p=h-l,m=f*f+p*p;if(m<1e-12)a=Math.log(d/c)/t,o=function(e){return[s+e*f,l+e*p,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(m),v=(d*d-c*c+r*m)/(2*c*n*g),y=(d*d-c*c-r*m)/(2*d*n*g),b=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(y*y+1)-y);a=(w-b)/t,o=function(e){var r,i=e*a,o=Fn(b),u=c/(n*g)*(o*(r=t*i+b,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[s+u*f,l+u*p,c*o/Fn(t*i+b)]}}return o.duration=1e3*a*t/Math.SQRT2,o}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4),Hn=function(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]},Un=r(249),Vn=function(e,t,n){var r=new Un.a;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r},Gn=Object(Pn.a)("start","end","cancel","interrupt"),Wn=[],qn=function(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(l){var c,u,h,d;if(1!==n.state)return s();for(c in i)if((d=i[c]).name===n.name){if(3===d.state)return Vn(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Vn((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function a(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(e,i);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Object(Un.c)((function(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}),0,n.time)}(e,n,{name:t,index:r,group:i,on:Gn,tween:Wn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function Xn(e,t){var n=Kn(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function Yn(e,t){var n=Kn(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Kn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}var Qn,Zn=function(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}},Jn=function(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}},$n=180/Math.PI,er={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},tr=function(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*$n,skewX:Math.atan(l)*$n,scaleX:a,scaleY:s}};function nr(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Jn(e,i)},{i:l-2,x:Jn(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Jn(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Jn(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Jn(e,n)},{i:s-2,x:Jn(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var rr=nr((function(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?er:tr(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),ir=nr((function(e){return null==e?er:(Qn||(Qn=document.createElementNS("http://www.w3.org/2000/svg","g")),Qn.setAttribute("transform",e),(e=Qn.transform.baseVal.consolidate())?(e=e.matrix,tr(e.a,e.b,e.c,e.d,e.e,e.f)):er)}),", ",")",")");function or(e,t){var n,r;return function(){var i=Yn(this,e),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}i.tween=r}}function ar(e,t,n){var r,i;if("function"!==typeof n)throw new Error;return function(){var o=Yn(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function sr(e,t,n){var r=e._id;return e.each((function(){var e=Yn(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Kn(e,r).value[t]}}var lr=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function cr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ur(){}var hr="\\s*([+-]?\\d+)\\s*",dr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",fr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pr=/^#([0-9a-f]{3,8})$/,mr=new RegExp("^rgb\\("+[hr,hr,hr]+"\\)$"),gr=new RegExp("^rgb\\("+[fr,fr,fr]+"\\)$"),vr=new RegExp("^rgba\\("+[hr,hr,hr,dr]+"\\)$"),yr=new RegExp("^rgba\\("+[fr,fr,fr,dr]+"\\)$"),br=new RegExp("^hsl\\("+[dr,fr,fr]+"\\)$"),wr=new RegExp("^hsla\\("+[dr,fr,fr,dr]+"\\)$"),xr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function _r(){return this.rgb().formatHex()}function Er(){return this.rgb().formatRgb()}function Ar(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=pr.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Sr(t):3===n?new Or(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Mr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Mr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=mr.exec(e))?new Or(t[1],t[2],t[3],1):(t=gr.exec(e))?new Or(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vr.exec(e))?Mr(t[1],t[2],t[3],t[4]):(t=yr.exec(e))?Mr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=br.exec(e))?Lr(t[1],t[2]/100,t[3]/100,1):(t=wr.exec(e))?Lr(t[1],t[2]/100,t[3]/100,t[4]):xr.hasOwnProperty(e)?Sr(xr[e]):"transparent"===e?new Or(NaN,NaN,NaN,0):null}function Sr(e){return new Or(e>>16&255,e>>8&255,255&e,1)}function Mr(e,t,n,r){return r<=0&&(e=t=n=NaN),new Or(e,t,n,r)}function Tr(e){return e instanceof ur||(e=Ar(e)),e?new Or((e=e.rgb()).r,e.g,e.b,e.opacity):new Or}function Cr(e,t,n,r){return 1===arguments.length?Tr(e):new Or(e,t,n,null==r?1:r)}function Or(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Rr(){return"#"+Pr(this.r)+Pr(this.g)+Pr(this.b)}function kr(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function Pr(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Lr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ir(e,t,n,r)}function Dr(e){if(e instanceof Ir)return new Ir(e.h,e.s,e.l,e.opacity);if(e instanceof ur||(e=Ar(e)),!e)return new Ir;if(e instanceof Ir)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ir(a,s,l,e.opacity)}function Ir(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Nr(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function jr(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}lr(ur,Ar,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:_r,formatHex:_r,formatHsl:function(){return Dr(this).formatHsl()},formatRgb:Er,toString:Er}),lr(Or,Cr,cr(ur,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Rr,formatHex:Rr,formatRgb:kr,toString:kr})),lr(Ir,(function(e,t,n,r){return 1===arguments.length?Dr(e):new Ir(e,t,n,null==r?1:r)}),cr(ur,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Ir(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ir(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Or(Nr(e>=240?e-240:e+120,i,r),Nr(e,i,r),Nr(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Br=e=>()=>e;function Fr(e,t){return function(n){return e+n*t}}function zr(e){return 1===(e=+e)?Hr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Br(isNaN(t)?n:t)}}function Hr(e,t){var n=t-e;return n?Fr(e,n):Br(isNaN(e)?t:e)}var Ur=function e(t){var n=zr(t);function r(e,t){var r=n((e=Cr(e)).r,(t=Cr(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Hr(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Vr(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Cr(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}Vr((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return jr((n-r/t)*t,a,i,o,s)}})),Vr((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return jr((n-r/t)*t,i,o,a,s)}}));var Gr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wr=new RegExp(Gr.source,"g");var qr=function(e,t){var n,r,i,o=Gr.lastIndex=Wr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Gr.exec(e))&&(r=Wr.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Jn(n,r)})),o=Wr.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})},Xr=function(e,t){var n;return("number"===typeof t?Jn:t instanceof Ar?Ur:(n=Ar(t))?(t=n,Ur):qr)(e,t)};function Yr(e){return function(){this.removeAttribute(e)}}function Kr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttribute(e);return a===o?null:a===r?i:i=t(r=a,n)}}function Zr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===r?i:i=t(r=a,n)}}function Jr(e,t,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l));this.removeAttribute(e)}}function $r(e,t,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l));this.removeAttributeNS(e.space,e.local)}}function ei(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ti(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ni(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ti(e,i)),n}return i._value=t,i}function ri(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ei(e,i)),n}return i._value=t,i}function ii(e,t){return function(){Xn(this,e).delay=+t.apply(this,arguments)}}function oi(e,t){return t=+t,function(){Xn(this,e).delay=t}}function ai(e,t){return function(){Yn(this,e).duration=+t.apply(this,arguments)}}function si(e,t){return t=+t,function(){Yn(this,e).duration=t}}function li(e,t){if("function"!==typeof t)throw new Error;return function(){Yn(this,e).ease=t}}function ci(e,t,n){var r,i,o=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?Xn:Yn;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}var ui=Rn.prototype.constructor;function hi(e){return function(){this.style.removeProperty(e)}}function di(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function fi(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&di(e,o,n)),r}return o._value=t,o}function pi(e){return function(t){this.textContent=e.call(this,t)}}function mi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&pi(r)),t}return r._value=e,r}var gi=0;function vi(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function yi(){return++gi}var bi=Rn.prototype;vi.prototype=function(e){return Rn().transition(e)}.prototype={constructor:vi,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=gt(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=r[a],u=c.length,h=o[a]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=e.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,qn(h[d],t,n,d,h,Kn(s,n)));return new vi(o,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=bt(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=e.call(l,l.__data__,h,c),p=Kn(l,n),m=0,g=f.length;m<g;++m)(d=f[m])&&qn(d,t,n,m,f,p);o.push(f),a.push(l)}return new vi(o,a,t,n)},selectChild:bi.selectChild,selectChildren:bi.selectChildren,filter:function(e){"function"!==typeof e&&(e=wt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new vi(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=t[s],u=n[s],h=c.length,d=a[s]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;s<r;++s)a[s]=t[s];return new vi(a,this._parents,this._name,this._id)},selection:function(){return new ui(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=yi(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=Kn(a,t);qn(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new vi(r,this._parents,e,n)},call:bi.call,nodes:bi.nodes,node:bi.node,size:bi.size,empty:bi.empty,each:bi.each,on:function(e,t){var n=this._id;return arguments.length<2?Kn(this.node(),n).on.on(e):this.each(ci(n,e,t))},attr:function(e,t){var n=Nt(e),r="transform"===n?ir:Xr;return this.attrTween(e,"function"===typeof t?(n.local?$r:Jr)(n,r,sr(this,"attr."+e,t)):null==t?(n.local?Kr:Yr)(n):(n.local?Zr:Qr)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var r=Nt(e);return this.tween(n,(r.local?ni:ri)(r,t))},style:function(e,t,n){var r="transform"===(e+="")?rr:Xr;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=Xt(this,e),a=(this.style.removeProperty(e),Xt(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,hi(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=Xt(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Xt(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,sr(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=Yn(this,e),c=l.on,u=null==l.value[a]?o||(o=hi(t)):void 0;c===n&&i===u||(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var a=Xt(this,e);return a===o?null:a===r?i:i=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!==typeof t)throw new Error;return this.tween(r,fi(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(sr(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,mi(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=Kn(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===e)return r.value;return null}return this.each((null==t?or:ar)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?ii:oi)(t,e)):Kn(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?ai:si)(t,e)):Kn(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(li(t,e)):Kn(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;Yn(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0===--i&&o()}};n.each((function(){var n=Yn(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===i&&o()}))},[Symbol.iterator]:bi[Symbol.iterator]};var wi={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function xi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Rn.prototype.interrupt=function(e){return this.each((function(){Zn(this,e)}))},Rn.prototype.transition=function(e){var t,n;e instanceof vi?(t=e._id,e=e._name):(t=yi(),(n=wi).time=Object(Un.b)(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&qn(a,e,t,c,s,n||xi(a,t));return new vi(r,this._parents,e,t)};var _i=e=>()=>e;function Ei(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ai(e,t,n){this.k=e,this.x=t,this.y=n}Ai.prototype={constructor:Ai,scale:function(e){return 1===e?this:new Ai(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Ai(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Si=new Ai(1,0,0);function Mi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Si;return e.__zoom}function Ti(e){e.stopImmediatePropagation()}Mi.prototype=Ai.prototype;var Ci=function(e){e.preventDefault(),e.stopImmediatePropagation()};function Oi(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function Ri(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function ki(){return this.__zoom||Si}function Pi(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Li(){return navigator.maxTouchPoints||"ontouchstart"in this}function Di(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var Ii=function(){var e,t,n,r=Oi,i=Ri,o=Di,a=Pi,s=Li,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,h=zn,d=Object(Pn.a)("start","zoom","end"),f=0,p=10;function m(e){e.property("__zoom",ki).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",A).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Ai(t,e.x,e.y)}function v(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new Ai(e.k,r,i)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(e,t,n,r){e.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,o=arguments,a=w(e,o).event(r),s=i.apply(e,o),l=null==n?y(s):"function"===typeof n?n.apply(e,o):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,d="function"===typeof t?t.apply(e,o):t,f=h(u.invert(l).concat(c/u.k),d.invert(l).concat(c/d.k));return function(e){if(1===e)e=d;else{var t=f(e),n=c/t[2];e=new Ai(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function _(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,a.apply(this,arguments)))),u=Hn(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=i.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[u,i.invert(u)],Zn(this),n.start()}Ci(e),n.wheel=setTimeout(h,150),n.zoom("mouse",o(v(g(i,s),n.mouse[0],n.mouse[1]),n.extent,c))}function h(){n.wheel=null,n.end()}}function E(e,...t){if(!n&&r.apply(this,arguments)){var i=e.currentTarget,a=w(this,t,!0).event(e),s=kn(e.view).on("mousemove.zoom",d,!0).on("mouseup.zoom",p,!0),l=Hn(e,i),u=e.clientX,h=e.clientY;jn(e.view),Ti(e),a.mouse=[l,this.__zoom.invert(l)],Zn(this),a.start()}function d(e){if(Ci(e),!a.moved){var t=e.clientX-u,n=e.clientY-h;a.moved=t*t+n*n>f}a.event(e).zoom("mouse",o(v(a.that.__zoom,a.mouse[0]=Hn(e,i),a.mouse[1]),a.extent,c))}function p(e){s.on("mousemove.zoom mouseup.zoom",null),Bn(e.view,a.moved),Ci(e),a.event(e).end()}}function A(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=Hn(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(a),l=n.k*(e.shiftKey?.5:2),h=o(v(g(n,l),a,s),i.apply(this,t),c);Ci(e),u>0?kn(this).transition().duration(u).call(b,h,a,e):kn(this).call(m.transform,h,a,e)}}function S(n,...i){if(r.apply(this,arguments)){var o,a,s,l,c=n.touches,u=c.length,h=w(this,i,n.changedTouches.length===u).event(n);for(Ti(n),a=0;a<u;++a)s=c[a],l=[l=Hn(s,this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,o=!0,h.taps=1+!!e);e&&(e=clearTimeout(e)),o&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),500)),Zn(this),h.start())}}function M(e,...t){if(this.__zooming){var n,r,i,a,s=w(this,t).event(e),l=e.changedTouches,u=l.length;for(Ci(e),n=0;n<u;++n)r=l[n],i=Hn(r,this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var h=s.touch0[0],d=s.touch0[1],f=s.touch1[0],p=s.touch1[1],m=(m=f[0]-h[0])*m+(m=f[1]-h[1])*m,y=(y=p[0]-d[0])*y+(y=p[1]-d[1])*y;r=g(r,Math.sqrt(m/y)),i=[(h[0]+f[0])/2,(h[1]+f[1])/2],a=[(d[0]+p[0])/2,(d[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],a=s.touch0[1]}s.zoom("touch",o(v(r,i,a),s.extent,c))}}function T(e,...r){if(this.__zooming){var i,o,a=w(this,r).event(e),s=e.changedTouches,l=s.length;for(Ti(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),i=0;i<l;++i)o=s[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=Hn(o,this),Math.hypot(t[0]-o[0],t[1]-o[1])<p)){var c=kn(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return m.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property("__zoom",ki),e!==i?b(e,t,n,r):i.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"===typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,n,r){m.scaleTo(e,(function(){var e=this.__zoom.k,n="function"===typeof t?t.apply(this,arguments):t;return e*n}),n,r)},m.scaleTo=function(e,t,n,r){m.transform(e,(function(){var e=i.apply(this,arguments),r=this.__zoom,a=null==n?y(e):"function"===typeof n?n.apply(this,arguments):n,s=r.invert(a),l="function"===typeof t?t.apply(this,arguments):t;return o(v(g(r,l),a,s),e,c)}),n,r)},m.translateBy=function(e,t,n,r){m.transform(e,(function(){return o(this.__zoom.translate("function"===typeof t?t.apply(this,arguments):t,"function"===typeof n?n.apply(this,arguments):n),i.apply(this,arguments),c)}),null,r)},m.translateTo=function(e,t,n,r,a){m.transform(e,(function(){var e=i.apply(this,arguments),a=this.__zoom,s=null==r?y(e):"function"===typeof r?r.apply(this,arguments):r;return o(Si.translate(s[0],s[1]).scale(a.k).translate("function"===typeof t?-t.apply(this,arguments):-t,"function"===typeof n?-n.apply(this,arguments):-n),e,c)}),r,a)},x.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=kn(this.that).datum();d.call(e,this.that,new Ei(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:d}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"===typeof e?e:_i(+e),m):a},m.filter=function(e){return arguments.length?(r="function"===typeof e?e:_i(!!e),m):r},m.touchable=function(e){return arguments.length?(s="function"===typeof e?e:_i(!!e),m):s},m.extent=function(e){return arguments.length?(i="function"===typeof e?e:_i([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):i},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(o=e,m):o},m.duration=function(e){return arguments.length?(u=+e,m):u},m.interpolate=function(e){return arguments.length?(h=e,m):h},m.on=function(){var e=d.on.apply(d,arguments);return e===d?m:e},m.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,m):Math.sqrt(f)},m.tapDistance=function(e){return arguments.length?(p=+e,m):p},m},Ni=e=>()=>e;function ji(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function Bi(e){return!e.ctrlKey&&!e.button}function Fi(){return this.parentNode}function zi(e,t){return null==t?{x:e.x,y:e.y}:t}function Hi(){return navigator.maxTouchPoints||"ontouchstart"in this}ji.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Ui=r(461),Vi=r(462),Gi=r(250),Wi=r.n(Gi),qi=r(108),Xi=r.n(qi);function Yi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ki(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qi(e){return function(e){if(Array.isArray(e))return Zi(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Zi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zi(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ji=function(e,t,n){return(e<<16)+(t<<8)+n},$i=function(e,t){return 123*e%Math.pow(2,t)},eo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;Yi(this,e),this.csBits=t,this.registry=["__reserved for background__"]}var t,n,r;return t=e,(n=[{key:"register",value:function(e){if(this.registry.length>=Math.pow(2,24-this.csBits))return null;var t,n=this.registry.length,r=$i(n,this.csBits),i=(t=n+(r<<24-this.csBits),"#".concat(Math.min(t,Math.pow(2,24)).toString(16).padStart(6,"0")));return this.registry.push(e),i}},{key:"lookup",value:function(e){var t="string"===typeof e?function(e){var t=Xi()(e).toRgb(),n=t.r,r=t.g,i=t.b;return Ji(n,r,i)}(e):Ji.apply(void 0,Qi(e));if(!t)return null;var n=t&Math.pow(2,24-this.csBits)-1,r=t>>24-this.csBits&Math.pow(2,this.csBits)-1;return $i(n,this.csBits)!==r||n>=this.registry.length?null:this.registry[n]}}])&&Ki(t.prototype,n),r&&Ki(t,r),e}(),to=r(84),no=r(464),ro=r(465),io=r(466),oo=r(467),ao=r(169),so=r(107),lo=r(475),co=r(477);function uo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uo(Object(n),!0).forEach((function(t){po(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fo(e){return(fo="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mo(e,t){return(mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function go(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function vo(e,t,n){return(vo=go()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&mo(i,n.prototype),i}).apply(null,arguments)}function yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||wo(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bo(e){return function(e){if(Array.isArray(e))return xo(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||wo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wo(e,t){if(e){if("string"===typeof e)return xo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xo(e,t):void 0}}function xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".force-graph-container canvas {\n display: block;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.force-graph-container .graph-tooltip {\n position: absolute;\n transform: translate(-50%, 25px);\n font-family: sans-serif;\n font-size: 16px;\n padding: 4px;\n border-radius: 3px;\n color: #eee;\n background: rgba(0,0,0,0.65);\n visibility: hidden; /* by default */\n}\n\n.force-graph-container .clickable {\n cursor: pointer;\n}\n\n.force-graph-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.force-graph-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n");var _o=Object(lo.a)(co.a);function Eo(e,t,n){t&&"string"===typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=_o(t(e))}))}var Ao=function(e,t){return t.onNeedsRedraw&&t.onNeedsRedraw()},So=Object(w.a)({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},dagMode:{onChange:function(e,t){!e&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Ao},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Ao},nodeColor:{default:"color",triggerUpdate:!1,onChange:Ao},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Ao},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Ao},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Ao},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Ao},linkColor:{default:"color",triggerUpdate:!1,onChange:Ao},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Ao},linkWidth:{default:1,triggerUpdate:!1,onChange:Ao},linkCurvature:{default:0,triggerUpdate:!1,onChange:Ao},linkCanvasObject:{triggerUpdate:!1,onChange:Ao},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Ao},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Ao},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Ao},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Ao},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,t,n){return void 0===n?e.forceLayout.force(t):(e.forceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick())),function(){var t=Object(x.default)(e.linkVisibility),n=Object(x.default)(e.linkColor),r=Object(x.default)(e.linkWidth),i=Object(x.default)(e.linkLineDash),o=Object(x.default)(e.linkCurvature),a=Object(x.default)(e.linkCanvasObjectMode),s=e.ctx,l=2*e.isShadow,c=e.graphData.links.filter(t);c.forEach((function(e){var t=o(e);if(!t)return void(e.__controlPoints=null);var n=e.source,r=e.target;if(!n||!r||!n.hasOwnProperty("x")||!r.hasOwnProperty("x"))return;var i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2));if(i>0){var a=Math.atan2(r.y-n.y,r.x-n.x),s=i*t,l={x:(n.x+r.x)/2+s*Math.cos(a-Math.PI/2),y:(n.y+r.y)/2+s*Math.sin(a-Math.PI/2)};e.__controlPoints=[l.x,l.y]}else{var c=70*t;e.__controlPoints=[r.x,r.y-c,r.x+c,r.y]}}));var u=[],h=[],d=c;if(e.linkCanvasObject){var f=[],p=[];c.forEach((function(e){return({before:u,after:h,replace:f}[a(e)]||p).push(e)})),d=[].concat(bo(u),h,p),u=u.concat(f)}s.save(),u.forEach((function(t){return e.linkCanvasObject(t,s,e.globalScale)})),s.restore();var m=Object(so.a)(d,[n,r,i]);s.save(),Object.entries(m).forEach((function(t){var n=yo(t,2),r=n[0],o=n[1],a=r&&"undefined"!==r?r:"rgba(0,0,0,0.15)";Object.entries(o).forEach((function(t){var n=yo(t,2),r=n[0],o=n[1],c=(r||1)/e.globalScale+l;Object.entries(o).forEach((function(e){var t=yo(e,2);t[0];var n=t[1],r=i(n[0]);s.beginPath(),n.forEach((function(e){var t=e.source,n=e.target;if(t&&n&&t.hasOwnProperty("x")&&n.hasOwnProperty("x")){s.moveTo(t.x,t.y);var r=e.__controlPoints;r?s[2===r.length?"quadraticCurveTo":"bezierCurveTo"].apply(s,bo(r).concat([n.x,n.y])):s.lineTo(n.x,n.y)}})),s.strokeStyle=a,s.lineWidth=c,s.setLineDash(r||[]),s.stroke()}))}))})),s.restore(),s.save(),h.forEach((function(t){return e.linkCanvasObject(t,s,e.globalScale)})),s.restore()}(),!e.isShadow&&function(){var t=Object(x.default)(e.linkDirectionalArrowLength),n=Object(x.default)(e.linkDirectionalArrowRelPos),r=Object(x.default)(e.linkVisibility),i=Object(x.default)(e.linkDirectionalArrowColor||e.linkColor),o=Object(x.default)(e.nodeVal),a=e.ctx;a.save(),e.graphData.links.filter(r).forEach((function(r){var s=t(r);if(s&&!(s<0)){var l=r.source,c=r.target;if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=Math.sqrt(Math.max(0,o(l)||1))*e.nodeRelSize,h=Math.sqrt(Math.max(0,o(c)||1))*e.nodeRelSize,d=Math.min(1,Math.max(0,n(r))),f=i(r)||"rgba(0,0,0,0.28)",p=s/1.6/2,m=r.__controlPoints&&vo(ao.Bezier,[l.x,l.y].concat(bo(r.__controlPoints),[c.x,c.y])),g=m?function(e){return m.get(e)}:function(e){return{x:l.x+(c.x-l.x)*e||0,y:l.y+(c.y-l.y)*e||0}},v=m?m.length():Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),y=u+s+(v-u-h-s)*d,b=g(y/v),w=g((y-s)/v),x=g((y-.8*s)/v),_=Math.atan2(b.y-w.y,b.x-w.x)-Math.PI/2;a.beginPath(),a.moveTo(b.x,b.y),a.lineTo(w.x+p*Math.cos(_),w.y+p*Math.sin(_)),a.lineTo(x.x,x.y),a.lineTo(w.x-p*Math.cos(_),w.y-p*Math.sin(_)),a.fillStyle=f,a.fill()}}})),a.restore()}(),!e.isShadow&&function(){var t=Object(x.default)(e.linkDirectionalParticles),n=Object(x.default)(e.linkDirectionalParticleSpeed),r=Object(x.default)(e.linkDirectionalParticleWidth),i=Object(x.default)(e.linkVisibility),o=Object(x.default)(e.linkDirectionalParticleColor||e.linkColor),a=e.ctx;a.save(),e.graphData.links.filter(i).forEach((function(i){var s=t(i);if(i.hasOwnProperty("__photons")&&i.__photons.length){var l=i.source,c=i.target;if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=n(i),h=i.__photons||[],d=Math.max(0,r(i)/2)/Math.sqrt(e.globalScale),f=o(i)||"rgba(0,0,0,0.28)";a.fillStyle=f;var p=i.__controlPoints?vo(ao.Bezier,[l.x,l.y].concat(bo(i.__controlPoints),[c.x,c.y])):null,m=0,g=!1;h.forEach((function(e){var t=!!e.__singleHop;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=t?0:m/s),!t&&m++,e.__progressRatio+=u,e.__progressRatio>=1){if(t)return void(g=!0);e.__progressRatio=e.__progressRatio%1}var n=e.__progressRatio,r=p?p.get(n):{x:l.x+(c.x-l.x)*n||0,y:l.y+(c.y-l.y)*n||0};a.beginPath(),a.arc(r.x,r.y,d,0,2*Math.PI,!1),a.fill()})),g&&(i.__photons=i.__photons.filter((function(e){return!e.__singleHop||e.__progressRatio<=1})))}}})),a.restore()}(),function(){var t=Object(x.default)(e.nodeVisibility),n=Object(x.default)(e.nodeVal),r=Object(x.default)(e.nodeColor),i=Object(x.default)(e.nodeCanvasObjectMode),o=e.ctx,a=e.isShadow/e.globalScale,s=e.graphData.nodes.filter(t);o.save(),s.forEach((function(t){var s=i(t);if(!e.nodeCanvasObject||"before"!==s&&"replace"!==s||(e.nodeCanvasObject(t,o,e.globalScale),"replace"!==s)){var l=Math.sqrt(Math.max(0,n(t)||1))*e.nodeRelSize+a;o.beginPath(),o.arc(t.x,t.y,l,0,2*Math.PI,!1),o.fillStyle=r(t)||"rgba(31, 120, 180, 0.92)",o.fill(),e.nodeCanvasObject&&"after"===s&&e.nodeCanvasObject(t,e.ctx,e.globalScale)}else o.restore()})),o.restore()}(),this},emitParticle:function(e,t){return t&&(!t.__photons&&(t.__photons=[]),t.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Object(to.a)().force("link",Object(no.a)()).force("charge",Object(ro.a)()).force("center",Object(io.a)()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.ctx=e},update:function(e){if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&Eo(e.graphData.nodes,Object(x.default)(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&Eo(e.graphData.links,Object(x.default)(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]})),!e.isShadow){var t=Object(x.default)(e.linkDirectionalParticles);e.graphData.links.forEach((function(e){var n=Math.round(Math.abs(t(e)));n?e.__photons=bo(Array(n)).map((function(){return{}})):delete e.__photons}))}e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var n=e.forceLayout.force("link");n&&n.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var r=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.nodeFilter,a=void 0===o?function(){return!0}:o,s=i.onLoopError,l=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};n.forEach((function(e){return c[t(e)]={data:e,out:[],depth:-1,skip:!a(e)}})),r.forEach((function(e){var n=e.source,r=e.target,i=l(n),o=l(r);if(!c.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!c.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var a=c[i],s=c[o];function l(e){return"object"===fo(e)?t(e):e}a.out.push(s)}));var u=[];d(Object.values(c));var h=Object.assign.apply(Object,[{}].concat(bo(Object.entries(c).filter((function(e){return!yo(e,2)[1].skip})).map((function(e){var t=yo(e,2);return po({},t[0],t[1].depth)})))));return h;function d(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,o=e.length;i<o;i++){var a=e[i];if(-1!==n.indexOf(a)){var s=function(){var e=[].concat(bo(n.slice(n.indexOf(a))),[a]).map((function(e){return t(e.data)}));return u.some((function(t){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}))||(u.push(e),l(e)),"continue"}();if("continue"===s)continue}r>a.depth&&(a.depth=r,d(a.out,[].concat(bo(n),[a]),r+(a.skip?0:1)))}}}(e.graphData,(function(t){return t[e.nodeId]}),{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),i=Math.max.apply(Math,bo(Object.values(r||[]))),o=e.dagLevelDistance||e.graphData.nodes.length/(i||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(e.dagMode){var a=function(t,n){return function(a){return t?(r[a[e.nodeId]]-i/2)*o*(n?-1:1):void 0}},s=a(-1!==["lr","rl"].indexOf(e.dagMode),"rl"===e.dagMode),l=a(-1!==["td","bu"].indexOf(e.dagMode),"bu"===e.dagMode);e.graphData.nodes.filter(e.dagNodeFilter).forEach((function(e){e.fx=s(e),e.fy=l(e)}))}e.forceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?Object(oo.a)((function(t){var n=r[t[e.nodeId]]||-1;return("radialin"===e.dagMode?i-n:n)*o})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null);for(var c=0;c<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);c++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function Mo(e,t){var n=e instanceof Array?e:[e],r=new t;return{linkProp:function(e){return{default:r[e](),onChange:function(t,r){n.forEach((function(n){return r[n][e](t)}))},triggerUpdate:!1}},linkMethod:function(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=[];return n.forEach((function(n){var r=t[n],o=r[e].apply(r,i);o!==r&&a.push(o)})),a.length?a[0]:this}}}}var To=Mo("forceGraph",So),Co=Mo(["forceGraph","shadowGraph"],So),Oo=Object.assign.apply(Object,bo(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(e){return po({},e,To.linkProp(e))}))).concat(bo(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map((function(e){return po({},e,Co.linkProp(e))}))))),Ro=Object.assign.apply(Object,bo(["d3Force","d3ReheatSimulation","emitParticle"].map((function(e){return po({},e,To.linkMethod(e))}))));function ko(e){if(e.canvas){var t=e.canvas.width,n=e.canvas.height;300===t&&150===n&&(t=n=0);var r=window.devicePixelRatio;t/=r,n/=r,[e.canvas,e.shadowCanvas].forEach((function(i){i.style.width="".concat(e.width,"px"),i.style.height="".concat(e.height,"px"),i.width=e.width*r,i.height=e.height*r,t||n||i.getContext("2d").scale(r,r)}));var i=Mi(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-t)/2/i,(e.height-n)/2/i),e.needsRedraw=!0}}function Po(e){var t=window.devicePixelRatio;e.setTransform(t,0,0,t,0,0)}function Lo(e,t,n){e.save(),Po(e),e.clearRect(0,0,t,n),e.restore()}var Do=Object(w.a)({props:ho({width:{default:window.innerWidth,onChange:function(e,t){return ko(t)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,t){return ko(t)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach((function(e){var n=e.type;e.objs.filter((function(e){if(!e.hasOwnProperty("__indexColor"))return!0;var n=t.colorTracker.lookup(e.__indexColor);return!n||!n.hasOwnProperty("d")||n.d!==e})).forEach((function(e){e.__indexColor=t.colorTracker.register({type:n,d:e})}))})),t.forceGraph.graphData(e),t.shadowGraph.graphData(e)},triggerUpdate:!1},backgroundColor:{onChange:function(e,t){t.canvas&&e&&(t.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,t){t.shadowGraph.nodeCanvasObject(e?function(t,n,r){return e(t,t.__indexColor,n,r)}:null)},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,t){t.shadowGraph.linkCanvasObject(e?function(t,n,r){return e(t,t.__indexColor,n,r)}:null)},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,t){t.zoom.scaleExtent([e,t.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,t){t.zoom.scaleExtent([t.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},onZoom:{default:function(){},triggerUpdate:!1},onZoomEnd:{default:function(){},triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},Oo),aliases:{stopAnimation:"pauseAnimation"},methods:ho({graph2ScreenCoords:function(e,t,n){var r=Mi(e.canvas);return{x:t*r.k+r.x,y:n*r.k+r.y}},screen2GraphCoords:function(e,t,n){var r=Mi(e.canvas);return{x:(t-r.x)/r.k,y:(n-r.y)/r.k}},centerAt:function(e,t,n,r){if(!e.canvas)return null;if(void 0!==t||void 0!==n){var i=Object.assign({},void 0!==t?{x:t}:{},void 0!==n?{y:n}:{});return r?new qe.a.Tween(o()).to(i,r).easing(qe.a.Easing.Quadratic.Out).onUpdate(a).start():a(i),this}return o();function o(){var t=Mi(e.canvas);return{x:(e.width/2-t.x)/t.k,y:(e.height/2-t.y)/t.k}}function a(t){var n=t.x,r=t.y;e.zoom.translateTo(e.zoom.__baseElem,void 0===n?o().x:n,void 0===r?o().y:r),e.needsRedraw=!0}},zoom:function(e,t,n){return e.canvas?void 0!==t?(n?new qe.a.Tween({k:r()}).to({k:t},n).easing(qe.a.Easing.Quadratic.Out).onUpdate((function(e){return i(e.k)})).start():i(t),this):r():null;function r(){return Mi(e.canvas).k}function i(t){e.zoom.scaleTo(e.zoom.__baseElem,t),e.needsRedraw=!0}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var a=this.getGraphBbox.apply(this,i);if(a){var s={x:(a.x[0]+a.x[1])/2,y:(a.y[0]+a.y[1])/2},l=Math.max(1e-12,Math.min(1e12,(e.width-2*n)/(a.x[1]-a.x[0]),(e.height-2*n)/(a.y[1]-a.y[0])));this.centerAt(s.x,s.y,t),this.zoom(l,t)}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=Object(x.default)(e.nodeVal),r=function(t){return Math.sqrt(Math.max(0,n(t)||1))*e.nodeRelSize},i=e.graphData.nodes.filter(t).map((function(e){return{x:e.x,y:e.y,r:r(e)}}));return i.length?{x:[Object(Ui.a)(i,(function(e){return e.x-e.r})),Object(Vi.a)(i,(function(e){return e.x+e.r}))],y:[Object(Ui.a)(i,(function(e){return e.y-e.r})),Object(Vi.a)(i,(function(e){return e.y+e.r}))]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Ro),stateInit:function(){return{lastSetZoom:1,zoom:Ii(),forceGraph:new So,shadowGraph:(new So).cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new eo}},init:function(e,t){e.innerHTML="";var n=document.createElement("div");n.classList.add("force-graph-container"),n.style.position="relative",e.appendChild(n),t.canvas=document.createElement("canvas"),t.backgroundColor&&(t.canvas.style.background=t.backgroundColor),n.appendChild(t.canvas),t.shadowCanvas=document.createElement("canvas");var r=t.canvas.getContext("2d"),i=t.shadowCanvas.getContext("2d"),o={x:-1e12,y:-1e12},a=function(){var e=null,n=window.devicePixelRatio,r=o.x>0&&o.y>0?i.getImageData(o.x*n,o.y*n,1,1):null;return r&&(e=t.colorTracker.lookup(r.data)),e};kn(t.canvas).call(function(){var e,t,n,r,i=Bi,o=Fi,a=zi,s=Hi,l={},c=Object(Pn.a)("start","drag","end"),u=0,h=0;function d(e){e.on("mousedown.drag",f).filter(s).on("touchstart.drag",g).on("touchmove.drag",v,Ln).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,s){if(!r&&i.call(this,a,s)){var l=b(this,o.call(this,a,s),a,s,"mouse");l&&(kn(a.view).on("mousemove.drag",p,Dn).on("mouseup.drag",m,Dn),jn(a.view),In(a),n=!1,e=a.clientX,t=a.clientY,l("start",a))}}function p(r){if(Nn(r),!n){var i=r.clientX-e,o=r.clientY-t;n=i*i+o*o>h}l.mouse("drag",r)}function m(e){kn(e.view).on("mousemove.drag mouseup.drag",null),Bn(e.view,n),Nn(e),l.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,r,a=e.changedTouches,s=o.call(this,e,t),l=a.length;for(n=0;n<l;++n)(r=b(this,s,e,t,a[n].identifier,a[n]))&&(In(e),r("start",e,a[n]))}}function v(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=l[r[t].identifier])&&(Nn(e),n("drag",e,r[t]))}function y(e){var t,n,i=e.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(n=l[i[t].identifier])&&(In(e),n("end",e,i[t]))}function b(e,t,n,r,i,o){var s,h,f,p=c.copy(),m=Hn(o||n,t);if(null!=(f=a.call(e,new ji("beforestart",{sourceEvent:n,target:d,identifier:i,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-m[0]||0,h=f.y-m[1]||0,function n(o,a,c){var g,v=m;switch(o){case"start":l[i]=n,g=u++;break;case"end":delete l[i],--u;case"drag":m=Hn(c||a,t),g=u}p.call(o,e,new ji(o,{sourceEvent:a,subject:f,target:d,identifier:i,active:g,x:m[0]+s,y:m[1]+h,dx:m[0]-v[0],dy:m[1]-v[1],dispatch:p}),r)}}return d.filter=function(e){return arguments.length?(i="function"===typeof e?e:Ni(!!e),d):i},d.container=function(e){return arguments.length?(o="function"===typeof e?e:Ni(e),d):o},d.subject=function(e){return arguments.length?(a="function"===typeof e?e:Ni(e),d):a},d.touchable=function(e){return arguments.length?(s="function"===typeof e?e:Ni(!!e),d):s},d.on=function(){var e=c.on.apply(c,arguments);return e===c?d:e},d.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,d):Math.sqrt(h)},d}().subject((function(){if(!t.enableNodeDrag)return null;var e=a();return e&&"Node"===e.type?e.d:null})).on("start",(function(e){var n=e.subject;n.__initialDragPos={x:n.x,y:n.y,fx:n.fx,fy:n.fy},e.active||(n.fx=n.x,n.fy=n.y),t.canvas.classList.add("grabbable")})).on("drag",(function(e){var n=e.subject,r=n.__initialDragPos,i=e,o=Mi(t.canvas).k,a={x:r.x+(i.x-r.x)/o-n.x,y:r.y+(i.y-r.y)/o-n.y};["x","y"].forEach((function(e){return n["f".concat(e)]=n[e]=r[e]+(i[e]-r[e])/o})),t.forceGraph.d3AlphaTarget(.3).resetCountdown(),t.isPointerDragging=!0,n.__dragged=!0,t.onNodeDrag(n,a)})).on("end",(function(e){var n=e.subject,r=n.__initialDragPos,i={x:n.x-r.x,y:n.y-r.y};void 0===r.fx&&(n.fx=void 0),void 0===r.fy&&(n.fy=void 0),delete n.__initialDragPos,t.forceGraph.d3AlphaTarget(0).resetCountdown(),t.canvas.classList.remove("grabbable"),t.isPointerDragging=!1,n.__dragged&&(delete n.__dragged,t.onNodeDragEnd(n,i))}))),t.zoom(t.zoom.__baseElem=kn(t.canvas)),t.zoom.__baseElem.on("dblclick.zoom",null),t.zoom.filter((function(e){return!e.button&&t.enableZoomPanInteraction&&(t.enableZoomInteraction||"wheel"!==e.type)&&(t.enablePanInteraction||"wheel"===e.type)})).on("zoom",(function(e){var n=e.transform;[r,i].forEach((function(e){Po(e),e.translate(n.x,n.y),e.scale(n.k,n.k)})),t.onZoom(ho({},n)),t.needsRedraw=!0})).on("end",(function(e){return t.onZoomEnd(ho({},e.transform))})),ko(t),t.forceGraph.onNeedsRedraw((function(){return t.needsRedraw=!0})).onFinishUpdate((function(){Mi(t.canvas).k===t.lastSetZoom&&t.graphData.nodes.length&&(t.zoom.scaleTo(t.zoom.__baseElem,t.lastSetZoom=4/Math.cbrt(t.graphData.nodes.length)),t.needsRedraw=!0)}));var s=document.createElement("div");s.classList.add("graph-tooltip"),n.appendChild(s),["pointermove","pointerdown"].forEach((function(e){return n.addEventListener(e,(function(r){"pointerdown"===e&&(t.isPointerPressed=!0,t.pointerDownEvent=r),!t.isPointerDragging&&"pointermove"===r.type&&t.onBackgroundClick&&(r.pressure>0||t.isPointerPressed)&&("touch"!==r.pointerType||void 0===r.movementX||[r.movementX,r.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0);var i=function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(n);o.x=r.pageX-i.left,o.y=r.pageY-i.top,s.style.top="".concat(o.y,"px"),s.style.left="".concat(o.x,"px")}),{passive:!0})})),n.addEventListener("pointerup",(function(e){if(t.isPointerPressed=!1,t.isPointerDragging)t.isPointerDragging=!1;else{var n=[e,t.pointerDownEvent];requestAnimationFrame((function(){if(0===e.button)if(t.hoverObj){var r=t["on".concat(t.hoverObj.type,"Click")];r&&r.apply(void 0,[t.hoverObj.d].concat(n))}else t.onBackgroundClick&&t.onBackgroundClick.apply(t,n);if(2===e.button)if(t.hoverObj){var i=t["on".concat(t.hoverObj.type,"RightClick")];i&&i.apply(void 0,[t.hoverObj.d].concat(n))}else t.onBackgroundRightClick&&t.onBackgroundRightClick.apply(t,n)}))}}),{passive:!0}),n.addEventListener("contextmenu",(function(e){return!(t.onBackgroundRightClick||t.onNodeRightClick||t.onLinkRightClick)||(e.preventDefault(),!1)})),t.forceGraph(r),t.shadowGraph(i);var l=Wi()((function(){Lo(i,t.width,t.height),t.shadowGraph.linkWidth((function(e){return Object(x.default)(t.linkWidth)(e)+t.linkHoverPrecision}));var e=Mi(t.canvas);t.shadowGraph.globalScale(e.k).tickFrame()}),800);(this._animationCycle=function e(){var n=!t.autoPauseRedraw||!!t.needsRedraw||t.forceGraph.isEngineRunning()||t.graphData.links.some((function(e){return e.__photons&&e.__photons.length}));if(t.needsRedraw=!1,t.enablePointerInteraction){var i=t.isPointerDragging?null:a();if(i!==t.hoverObj){var o=t.hoverObj,c=o?o.type:null,u=i?i.type:null;if(c&&c!==u){var h=t["on".concat(c,"Hover")];h&&h(null,o.d)}if(u){var d=t["on".concat(u,"Hover")];d&&d(i.d,c===u?o.d:null)}var f=i&&Object(x.default)(t["".concat(i.type.toLowerCase(),"Label")])(i.d)||"";s.style.visibility=f?"visible":"hidden",s.innerHTML=f,t.canvas.classList[i&&t["on".concat(u,"Click")]||!i&&t.onBackgroundClick?"add":"remove"]("clickable"),t.hoverObj=i}n&&l()}if(n){Lo(r,t.width,t.height);var p=Mi(t.canvas).k;t.onRenderFramePre&&t.onRenderFramePre(r,p),t.forceGraph.globalScale(p).tickFrame(),t.onRenderFramePost&&t.onRenderFramePost(r,p)}qe.a.update(),t.animationFrameRequestId=requestAnimationFrame(e)})()},update:function(e){}}),Io={width:k.a.number,height:k.a.number,graphData:k.a.shape({nodes:k.a.arrayOf(k.a.object).isRequired,links:k.a.arrayOf(k.a.object).isRequired}),backgroundColor:k.a.string,nodeRelSize:k.a.number,nodeId:k.a.string,nodeLabel:k.a.oneOfType([k.a.string,k.a.func]),nodeVal:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),nodeVisibility:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),nodeColor:k.a.oneOfType([k.a.string,k.a.func]),nodeAutoColorBy:k.a.oneOfType([k.a.string,k.a.func]),onNodeHover:k.a.func,onNodeClick:k.a.func,linkSource:k.a.string,linkTarget:k.a.string,linkLabel:k.a.oneOfType([k.a.string,k.a.func]),linkVisibility:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkColor:k.a.oneOfType([k.a.string,k.a.func]),linkAutoColorBy:k.a.oneOfType([k.a.string,k.a.func]),linkWidth:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkCurvature:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalArrowLength:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalArrowColor:k.a.oneOfType([k.a.string,k.a.func]),linkDirectionalArrowRelPos:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticles:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleSpeed:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleWidth:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleColor:k.a.oneOfType([k.a.string,k.a.func]),onLinkHover:k.a.func,onLinkClick:k.a.func,dagMode:k.a.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:k.a.number,dagNodeFilter:k.a.func,onDagError:k.a.func,d3AlphaMin:k.a.number,d3AlphaDecay:k.a.number,d3VelocityDecay:k.a.number,warmupTicks:k.a.number,cooldownTicks:k.a.number,cooldownTime:k.a.number,onEngineTick:k.a.func,onEngineStop:k.a.func,getGraphBbox:k.a.func},No={zoomToFit:k.a.func,onNodeRightClick:k.a.func,onNodeDrag:k.a.func,onNodeDragEnd:k.a.func,onLinkRightClick:k.a.func,linkHoverPrecision:k.a.number,onBackgroundClick:k.a.func,onBackgroundRightClick:k.a.func,enablePointerInteraction:k.a.bool,enableNodeDrag:k.a.bool},jo={showNavInfo:k.a.bool,nodeOpacity:k.a.number,nodeResolution:k.a.number,nodeThreeObject:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),nodeThreeObjectExtend:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkOpacity:k.a.number,linkResolution:k.a.number,linkCurveRotation:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkMaterial:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),linkThreeObject:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),linkThreeObjectExtend:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkPositionUpdate:k.a.func,linkDirectionalArrowResolution:k.a.number,linkDirectionalParticleResolution:k.a.number,forceEngine:k.a.oneOf(["d3","ngraph"]),ngraphPhysics:k.a.object,numDimensions:k.a.oneOf([1,2,3])},Bo=Object.assign({},Io,No,{linkLineDash:k.a.oneOfType([k.a.arrayOf(k.a.number),k.a.string,k.a.func]),nodeCanvasObjectMode:k.a.oneOfType([k.a.string,k.a.func]),nodeCanvasObject:k.a.func,nodePointerAreaPaint:k.a.func,linkCanvasObjectMode:k.a.oneOfType([k.a.string,k.a.func]),linkCanvasObject:k.a.func,linkPointerAreaPaint:k.a.func,autoPauseRedraw:k.a.bool,minZoom:k.a.number,maxZoom:k.a.number,enableZoomInteraction:k.a.bool,enablePanInteraction:k.a.bool,onZoom:k.a.func,onZoomEnd:k.a.func,onRenderFramePre:k.a.func,onRenderFramePost:k.a.func}),Fo=Object.assign({},Io,No,jo,{enableNavigationControls:k.a.bool,controlType:k.a.oneOf(["trackball","orbit","fly"]),rendererConfig:k.a.object,extraRenderers:k.a.arrayOf(k.a.shape({render:k.a.func.isRequired}))}),zo=Object.assign({},Io,jo,{nodeDesc:k.a.oneOfType([k.a.string,k.a.func]),linkDesc:k.a.oneOfType([k.a.string,k.a.func])}),Ho=Object.assign({},Io,jo,{markerAttrs:k.a.object,yOffset:k.a.number,glScale:k.a.number});const Uo=b(O,{methodNames:["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"]});Uo.displayName="ForceGraphVR",Uo.propTypes=zo;const Vo=b(F,{methodNames:["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"],initPropNames:["markerAttrs"]});Vo.displayName="ForceGraphAR",Vo.propTypes=Ho;const Go=b(pt,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","cameraPosition","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords","postProcessingComposer","scene","camera","renderer","controls","refresh"],initPropNames:["controlType","rendererConfig","extraRenderers"]});Go.displayName="ForceGraph3D",Go.propTypes=Fo;const Wo=b(Do,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Wo.displayName="ForceGraph2D",Wo.propTypes=Bo},function(t,n,r){"use strict";r.d(n,"a",(function(){return gt}));var i={};r.r(i),r.d(i,"bounce",(function(){return te})),r.d(i,"flash",(function(){return ne})),r.d(i,"jello",(function(){return re})),r.d(i,"pulse",(function(){return ie})),r.d(i,"rotate",(function(){return oe})),r.d(i,"shake",(function(){return ae})),r.d(i,"swing",(function(){return se})),r.d(i,"rubberBand",(function(){return le})),r.d(i,"tada",(function(){return ce})),r.d(i,"wobble",(function(){return ue})),r.d(i,"bounceIn",(function(){return he})),r.d(i,"bounceInUp",(function(){return de})),r.d(i,"bounceInDown",(function(){return fe})),r.d(i,"bounceInRight",(function(){return pe})),r.d(i,"bounceInLeft",(function(){return me})),r.d(i,"bounceOut",(function(){return ge})),r.d(i,"bounceOutUp",(function(){return ve})),r.d(i,"bounceOutDown",(function(){return ye})),r.d(i,"bounceOutRight",(function(){return be})),r.d(i,"bounceOutLeft",(function(){return we})),r.d(i,"fadeIn",(function(){return _e})),r.d(i,"fadeInDown",(function(){return Ee})),r.d(i,"fadeInUp",(function(){return Ae})),r.d(i,"fadeInLeft",(function(){return Se})),r.d(i,"fadeInRight",(function(){return Me})),r.d(i,"fadeInDownBig",(function(){return Te})),r.d(i,"fadeInUpBig",(function(){return Ce})),r.d(i,"fadeInLeftBig",(function(){return Oe})),r.d(i,"fadeInRightBig",(function(){return Re})),r.d(i,"fadeOut",(function(){return Pe})),r.d(i,"fadeOutDown",(function(){return Le})),r.d(i,"fadeOutUp",(function(){return De})),r.d(i,"fadeOutLeft",(function(){return Ie})),r.d(i,"fadeOutRight",(function(){return Ne})),r.d(i,"fadeOutDownBig",(function(){return je})),r.d(i,"fadeOutUpBig",(function(){return Be})),r.d(i,"fadeOutLeftBig",(function(){return Fe})),r.d(i,"fadeOutRightBig",(function(){return ze})),r.d(i,"flipInX",(function(){return He})),r.d(i,"flipInY",(function(){return Ue})),r.d(i,"flipOutX",(function(){return Ve})),r.d(i,"flipOutY",(function(){return Ge})),r.d(i,"lightSpeedIn",(function(){return We})),r.d(i,"lightSpeedOut",(function(){return qe})),r.d(i,"slideInDown",(function(){return Ye})),r.d(i,"slideInUp",(function(){return Ke})),r.d(i,"slideInLeft",(function(){return Qe})),r.d(i,"slideInRight",(function(){return Ze})),r.d(i,"slideOutDown",(function(){return $e})),r.d(i,"slideOutUp",(function(){return et})),r.d(i,"slideOutLeft",(function(){return tt})),r.d(i,"slideOutRight",(function(){return nt})),r.d(i,"zoomIn",(function(){return it})),r.d(i,"zoomInDown",(function(){return ot})),r.d(i,"zoomInUp",(function(){return at})),r.d(i,"zoomInLeft",(function(){return st})),r.d(i,"zoomInRight",(function(){return lt})),r.d(i,"zoomOut",(function(){return ht})),r.d(i,"zoomOutDown",(function(){return dt})),r.d(i,"zoomOutUp",(function(){return ft})),r.d(i,"zoomOutLeft",(function(){return pt})),r.d(i,"zoomOutRight",(function(){return mt}));var o=r(3),a=r(58),s=r(38),l=r(6),c=r.n(l),u=r(21),h=r.n(u),d=r(23),f=r.n(d),p=r(16),m=r.n(p),g=r(24),v=r.n(g),y=r(25),b=r.n(y),w=r(18),x=r.n(w),_=r(19),E=r.n(_),A=r(0),S=r.n(A),M=r(1),T=r.n(M),C=r(12),O=r(14),R=["perspective","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","skewX","skewY","translateX","translateY"];function k(e){var t={};return Object.keys(e).forEach((function(n){-1!==R.indexOf(n)?(t.transform||(t.transform=[]),t.transform.push(c()({},n,e[n]))):t[n]=e[n]})),t}var P=r(5);function L(e){var t=E()({},P.a.flatten(e));return t.transform&&(t.transform.forEach((function(e){var n=Object.keys(e)[0];t[n]=e[n]})),delete t.transform),t}var D={Top:["Vertical",""],Bottom:["Vertical",""],Vertical:[""],Left:["Horizontal",""],Right:["Horizontal",""],Horizontal:[""]},I=Object.keys(D);function N(e,t){var n={},r=L(t);return("string"===typeof e?[e]:e).forEach((function(e){n[e]=e in r?r[e]:function(e,t){if("backgroundColor"===e)return"rgba(0,0,0,0)";if("color"===e||-1!==e.indexOf("Color"))return"rgba(0,0,0,1)";if(0===e.indexOf("rotate")||0===e.indexOf("skew"))return"0deg";if("opacity"===e||0===e.indexOf("scale"))return 1;if("fontSize"===e)return 14;if(0===e.indexOf("margin")||0===e.indexOf("padding"))for(var n,r=0;r<I.length;r++)if(n=I[r],e.substr(-n.length)===n){for(var i,o=e.substr(0,e.length-n.length),a=D[n],s=0;s<a.length;s++)if((i=o+a[s])in t)return t[i];break}return 0}(e,r)})),n}function j(e,t){return e-t}function B(e){return null!==e}function F(e){if("from"===e)return 0;if("to"===e)return 1;var t=parseFloat(e,10);return Number.isNaN(t)||t<0||t>1?null:t}var z={};function H(e){var t=JSON.stringify(e);if(z[t])return z[t];var n=Object.keys(e).map(F).filter(B);if(n.sort(j),n.length<2)throw new Error("Animation definitions must have at least two values.");var r={};e.easing&&(r.easing=e.easing),e.style&&(r.style=e.style);for(var i=function(t){var i=n[t],o=e[i];if(o||(0===i?o=e.from:1===i&&(o=e.to)),!o)throw new Error("Missing animation keyframe, this should not happen");o=L(o),Object.keys(o).forEach((function(e){e in r||(r[e]={inputRange:[],outputRange:[]}),r[e].inputRange.push(i),r[e].outputRange.push(o[e])}))},o=0;o<n.length;o+=1)i(o);return z[t]=r,r}var U={};var V={linear:O.a.linear,ease:O.a.bezier(.25,.1,.25,1),"ease-in":O.a.bezier(.42,0,1,1),"ease-out":O.a.bezier(0,0,.58,1),"ease-in-out":O.a.bezier(.42,0,.58,1),"ease-in-cubic":O.a.bezier(.55,.055,.675,.19),"ease-out-cubic":O.a.bezier(.215,.61,.355,1),"ease-in-out-cubic":O.a.bezier(.645,.045,.355,1),"ease-in-circ":O.a.bezier(.6,.04,.98,.335),"ease-out-circ":O.a.bezier(.075,.82,.165,1),"ease-in-out-circ":O.a.bezier(.785,.135,.15,.86),"ease-in-expo":O.a.bezier(.95,.05,.795,.035),"ease-out-expo":O.a.bezier(.19,1,.22,1),"ease-in-out-expo":O.a.bezier(1,0,0,1),"ease-in-quad":O.a.bezier(.55,.085,.68,.53),"ease-out-quad":O.a.bezier(.25,.46,.45,.94),"ease-in-out-quad":O.a.bezier(.455,.03,.515,.955),"ease-in-quart":O.a.bezier(.895,.03,.685,.22),"ease-out-quart":O.a.bezier(.165,.84,.44,1),"ease-in-out-quart":O.a.bezier(.77,0,.175,1),"ease-in-quint":O.a.bezier(.755,.05,.855,.06),"ease-out-quint":O.a.bezier(.23,1,.32,1),"ease-in-out-quint":O.a.bezier(.86,0,.07,1),"ease-in-sine":O.a.bezier(.47,0,.745,.715),"ease-out-sine":O.a.bezier(.39,.575,.565,1),"ease-in-out-sine":O.a.bezier(.445,.05,.55,.95),"ease-in-back":O.a.bezier(.6,-.28,.735,.045),"ease-out-back":O.a.bezier(.175,.885,.32,1.275),"ease-in-out-back":O.a.bezier(.68,-.55,.265,1.55)};function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=x()(t);if(n){var i=x()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return b()(this,e)}}var X=["rotate","rotateX","rotateY","rotateZ","skewX","skewY","transformMatrix","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","shadowColor","color","textDecorationColor","tintColor"],Y=["width","height"];function K(e,t){switch(t){case"reverse":return 0;case"alternate":return e%2?0:1;case"alternate-reverse":return e%2?1:0;case"normal":default:return 1}}function Q(e,t){return K(e,t)?0:1}function Z(e){if("string"===typeof e){var t=U[e];if(!t)throw new Error("No animation registred by the name of "+e);return t}return H(e)}function J(e,t){var n={};return Object.keys(e).forEach((function(r){"style"===r?E()(n,e.style):"easing"!==r&&(n[r]=t.interpolate(e[r]))})),k(n)}function $(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,c=r||i||a?C.a.timing(t,{toValue:n,delay:a,duration:r||1e3,easing:"function"===typeof i?i:V[i||"ease"],useNativeDriver:o}):C.a.spring(t,{toValue:n,useNativeDriver:o});setTimeout((function(){return s(e)}),a),c.start((function(){return l(e)}))}function ee(e){var t,n,r=e.displayName||e.name||"Component",i=C.a.createAnimatedComponent(e);return n=t=function(e){v()(n,e);var t=q(n);function n(e){var r;h()(this,n),(r=t.call(this,e)).ref=null,r.handleRef=function(e){r.ref=e};var i=new C.a.Value(Q(0,r.props.direction)),o={},a={};return e.animation&&(o=J(a=Z(e.animation),i)),r.state={animationValue:i,animationStyle:o,compiledAnimation:a,transitionStyle:{},transitionValues:{},currentTransitionValues:{}},e.transition&&(r.state=W(W({},r.state),r.initializeTransitionState(e.transition))),r.delayTimer=null,Object.keys(U).forEach((function(e){e in m()(r)||(r[e]=r.animate.bind(m()(r),e))})),r}return f()(n,[{key:"initializeTransitionState",value:function(e){var t={},n={},r=N(e,this.props.style);return Object.keys(r).forEach((function(e){var i=r[e];if(-1!==X.indexOf(e)||"number"!==typeof i)t[e]=new C.a.Value(0),n[e]=i;else{var o=new C.a.Value(i);t[e]=o,n[e]=o}})),{currentTransitionValues:r,transitionStyle:n,transitionValues:t}}},{key:"getTransitionState",value:function(e){var t=this,n="string"===typeof e?[e]:e,r=this.state,i=r.transitionValues,o=r.currentTransitionValues,a=r.transitionStyle,s=n.filter((function(e){return!t.state.transitionValues[e]}));if(s.length){var l=this.initializeTransitionState(s);i=W(W({},i),l.transitionValues),o=W(W({},o),l.currentTransitionValues),a=W(W({},a),l.transitionStyle)}return{transitionValues:i,currentTransitionValues:o,transitionStyle:a}}},{key:"setNativeProps",value:function(e){this.ref&&this.ref.setNativeProps(e)}},{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.animation,r=t.duration,i=t.delay,o=t.onAnimationBegin,a=t.iterationDelay;if(n){var s=function(){o(),e.startAnimation(r,0,a,(function(t){return e.props.onAnimationEnd(t)})),e.delayTimer=null};i?this.delayTimer=setTimeout(s,i):s()}}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t,n,r=this,i=e.animation,o=e.delay,a=e.duration,s=e.easing,l=e.iterationDelay,c=e.transition,u=e.onAnimationBegin;if(c){var h=N(c,e.style);this.transitionTo(h,a,s,o)}else t=i,n=this.props.animation,t!==n&&JSON.stringify(t)!==JSON.stringify(n)&&(i?this.delayTimer?this.setAnimation(i):(u(),this.animate(i,a,l).then((function(e){return r.props.onAnimationEnd(e)}))):this.stopAnimation())}},{key:"componentWillUnmount",value:function(){this.delayTimer&&clearTimeout(this.delayTimer)}},{key:"setAnimation",value:function(e,t){var n=Z(e);this.setState((function(e){return{animationStyle:J(n,e.animationValue),compiledAnimation:n}}),t)}},{key:"animate",value:function(e,t,n){var r=this;return new Promise((function(i){r.setAnimation(e,(function(){r.startAnimation(t,0,n,i)}))}))}},{key:"stopAnimation",value:function(){this.setState({scheduledAnimation:!1,animationStyle:{}}),this.state.animationValue.stopAnimation(),this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"startAnimation",value:function(e,t,n,r){var i=this,o=this.state,a=o.animationValue,s=o.compiledAnimation,l=this.props,c=l.direction,u=l.iterationCount,h=l.useNativeDriver,d=this.props.easing||s.easing||"ease",f=t||0,p=Q(f,c),m=K(f,c);a.setValue(p),"string"===typeof d&&(d=V[d]),("reverse"===c||"alternate"===c&&!m||"alternate-reverse"===c&&!m)&&(d=O.a.out(d));var g={toValue:m,easing:d,isInteraction:u<=1,duration:e||this.props.duration||1e3,useNativeDriver:h,delay:n||0};C.a.timing(a,g).start((function(t){f+=1,t.finished&&i.props.animation&&("infinite"===u||f<u)?i.startAnimation(e,f,n,r):r&&r(t)}))}},{key:"transition",value:function(e,t,n,r){var i=this,o=L(e),a=L(t),s=Object.keys(a),l=this.getTransitionState(s),c=l.transitionValues,u=l.currentTransitionValues,h=l.transitionStyle;s.forEach((function(e){var t=o[e],n=a[e],r=c[e];r||(r=new C.a.Value(0));var i=-1!==X.indexOf(e)||"number"!==typeof value,s=-1!==Y.indexOf(e);i?(r.setValue(0),h[e]=r.interpolate({inputRange:[0,1],outputRange:[t,n]}),u[e]=n,a[e]=1):(s?(h[e]=r.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolateLeft:"clamp"}),u[e]=n):h[e]=r,r.setValue(t))})),this.setState({transitionValues:c,transitionStyle:h,currentTransitionValues:u},(function(){i.transitionToValues(a,n||i.props.duration,r,i.props.delay)}))}},{key:"transitionTo",value:function(e,t,n,r){var i=this,o=this.state.currentTransitionValues,a=L(e),s={from:{},to:{}};Object.keys(a).forEach((function(e){var l=a[e],c=-1!==X.indexOf(e)||"number"!==typeof value,u=-1!==Y.indexOf(e),h=i.state.transitionStyle[e],d=i.state.transitionValues[e];if(c||u||!h||h!==d){var f=o[e];if("undefined"===typeof f&&i.props.style)f=N(e,i.props.style)[e];s.from[e]=f,s.to[e]=l}else $(e,d,l,t,n,i.props.useNativeDriver,r,(function(e){return i.props.onTransitionBegin(e)}),(function(e){return i.props.onTransitionEnd(e)}))})),Object.keys(s.from).length&&this.transition(s.from,s.to,t,n)}},{key:"transitionToValues",value:function(e,t,n,r){var i=this;Object.keys(e).forEach((function(o){$(o,i.state.transitionValues[o],e[o],t,n,i.props.useNativeDriver,r,(function(e){return i.props.onTransitionBegin(e)}),(function(e){return i.props.onTransitionEnd(e)}))}))}},{key:"render",value:function(){var e=this.props,t=e.style,n=e.animation,r=e.transition;if(n&&r)throw new Error("You cannot combine animation and transition props");var o=function(e,t){var n={};return Object.keys(t).forEach((function(r){-1===e.indexOf(r)&&(n[r]=t[r])})),n}(["animation","duration","direction","delay","easing","iterationCount","iterationDelay","onAnimationBegin","onAnimationEnd","onTransitionBegin","onTransitionEnd","style","transition","useNativeDriver"],this.props);return S.a.createElement(i,E()({ref:this.handleRef,style:[t,this.state.animationStyle,k(this.state.transitionStyle)]},o))}}]),n}(A.Component),t.displayName="withAnimatable("+r+")",t.propTypes={animation:T.a.oneOfType([T.a.string,T.a.object]),duration:T.a.number,direction:T.a.oneOf(["normal","reverse","alternate","alternate-reverse"]),delay:T.a.number,easing:T.a.oneOfType([T.a.oneOf(Object.keys(V)),T.a.func]),iterationCount:function(e,t){var n=e[t];return"infinite"===n||"number"===typeof n&&n>=1?null:new Error('iterationCount must be a positive number or "infinite"')},iterationDelay:T.a.number,onAnimationBegin:T.a.func,onAnimationEnd:T.a.func,onTransitionBegin:T.a.func,onTransitionEnd:T.a.func,style:T.a.oneOfType([T.a.number,T.a.array,T.a.object]),transition:T.a.oneOfType([T.a.string,T.a.arrayOf(T.a.string)]),useNativeDriver:T.a.bool},t.defaultProps={animation:void 0,delay:0,direction:"normal",duration:void 0,easing:void 0,iterationCount:1,iterationDelay:0,onAnimationBegin:function(){},onAnimationEnd:function(){},onTransitionBegin:function(){},onTransitionEnd:function(){},style:void 0,transition:void 0,useNativeDriver:!1},n}var te={0:{translateY:0},.2:{translateY:0},.4:{translateY:-30},.43:{translateY:-30},.53:{translateY:0},.7:{translateY:-15},.8:{translateY:0},.9:{translateY:-4},1:{translateY:0}},ne={0:{opacity:1},.25:{opacity:0},.5:{opacity:1},.75:{opacity:0},1:{opacity:1}},re={0:{skewX:"0deg",skewY:"0deg"},.111:{skewX:"0deg",skewY:"0deg"},.222:{skewX:"-12.5deg",skewY:"-12.5deg"},.333:{skewX:"6.25deg",skewY:"6.25deg"},.444:{skewX:"-3.125deg",skewY:"-3.125deg"},.555:{skewX:"1.5625deg",skewY:"1.5625deg"},.666:{skewX:"-0.78125deg",skewY:"-0.78125deg"},.777:{skewX:"0.390625deg",skewY:"0.390625deg"},.888:{skewX:"-0.1953125deg",skewY:"-0.1953125deg"},1:{skewX:"0deg",skewY:"0deg"}},ie={0:{scale:1},.5:{scale:1.05},1:{scale:1}},oe={0:{rotate:"0deg"},.25:{rotate:"90deg"},.5:{rotate:"180deg"},.75:{rotate:"270deg"},1:{rotate:"360deg"}},ae={0:{translateX:0},.1:{translateX:-10},.2:{translateX:10},.3:{translateX:-10},.4:{translateX:10},.5:{translateX:-10},.6:{translateX:10},.7:{translateX:-10},.8:{translateX:10},.9:{translateX:-10},1:{translateX:0}},se={0:{rotate:"0deg"},.2:{rotate:"15deg"},.4:{rotate:"-10deg"},.6:{rotate:"5deg"},.8:{rotate:"-5deg"},1:{rotate:"0deg"}},le={0:{scaleX:1,scaleY:1},.3:{scaleX:1.25,scaleY:.75},.4:{scaleX:.75,scaleY:1.25},.5:{scaleX:1.15,scaleY:.85},.65:{scaleX:.95,scaleY:1.05},.75:{scaleX:1.05,scaleY:.95},1:{scaleX:1,scaleY:1}},ce={0:{scale:1,rotate:"0deg"},.1:{scale:.9,rotate:"-3deg"},.2:{scale:.9,rotate:"-3deg"},.3:{scale:1.1,rotate:"-3deg"},.4:{rotate:"3deg"},.5:{rotate:"-3deg"},.6:{rotate:"3deg"},.7:{rotate:"-3deg"},.8:{rotate:"3deg"},.9:{scale:1.1,rotate:"3deg"},1:{scale:1,rotate:"0deg"}},ue={0:{translateX:0,rotate:"0deg"},.15:{translateX:-25,rotate:"-5deg"},.3:{translateX:20,rotate:"3deg"},.45:{translateX:-15,rotate:"-3deg"},.6:{translateX:10,rotate:"2deg"},.75:{translateX:-5,rotate:"-1deg"},1:{translateX:0,rotate:"0deg"}},he={0:{opacity:0,scale:.3},.2:{scale:1.1},.4:{scale:.9},.6:{opacity:1,scale:1.03},.8:{scale:.97},1:{opacity:1,scale:1}},de={0:{opacity:0,translateY:800},.6:{opacity:1,translateY:-25},.75:{translateY:10},.9:{translateY:-5},1:{translateY:0}},fe={0:{opacity:0,translateY:-800},.6:{opacity:1,translateY:25},.75:{translateY:-10},.9:{translateY:5},1:{translateY:0}},pe={0:{opacity:0,translateX:600},.6:{opacity:1,translateX:-20},.75:{translateX:8},.9:{translateX:-4},1:{translateX:0}},me={0:{opacity:0,translateX:-600},.6:{opacity:1,translateX:20},.75:{translateX:-8},.9:{translateX:4},1:{translateX:0}},ge={0:{opacity:1,scale:1},.2:{scale:.9},.5:{opacity:1,scale:1.11},.55:{scale:1.11},1:{opacity:0,scale:.3}},ve={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:-10},.4:{translateY:20},.45:{translateY:20},.55:{opacity:1},1:{opacity:0,translateY:-800}},ye={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:10},.4:{translateY:-20},.45:{translateY:-20},.55:{opacity:1},1:{opacity:0,translateY:800}},be={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:10},.4:{translateX:-20},.45:{translateX:-20},.55:{opacity:1},1:{opacity:0,translateX:600}},we={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:-10},.4:{translateX:20},.45:{translateX:20},.55:{opacity:1},1:{opacity:0,translateX:-600}};function xe(e,t){return{from:c()({opacity:0},e,t),to:c()({opacity:1},e,0)}}var _e={from:{opacity:0},to:{opacity:1}},Ee=xe("translateY",-100),Ae=xe("translateY",100),Se=xe("translateX",-100),Me=xe("translateX",100),Te=xe("translateY",-500),Ce=xe("translateY",500),Oe=xe("translateX",-500),Re=xe("translateX",500);function ke(e,t){return{from:c()({opacity:1},e,0),to:c()({opacity:0},e,t)}}var Pe={from:{opacity:1},to:{opacity:0}},Le=ke("translateY",100),De=ke("translateY",-100),Ie=ke("translateX",-100),Ne=ke("translateX",100),je=ke("translateY",500),Be=ke("translateY",-500),Fe=ke("translateX",-500),ze=ke("translateX",500),He={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateX:"90deg"},.4:{rotateX:"-20deg"},.6:{opacity:1,rotateX:"10deg"},.8:{rotateX:"-5deg"},1:{opacity:1,rotateX:"0deg"}},Ue={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateY:"90deg"},.4:{rotateY:"-20deg"},.6:{opacity:1,rotateY:"10deg"},.8:{rotateY:"-5deg"},1:{opacity:1,rotateY:"0deg"}},Ve={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateX:"0deg"},.3:{opacity:1,rotateX:"-20deg"},1:{opacity:0,rotateX:"90deg"}},Ge={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateY:"0deg"},.3:{opacity:1,rotateY:"-20deg"},1:{opacity:0,rotateY:"90deg"}},We={easing:"ease-out",0:{opacity:0,translateX:200,skewX:"-30deg"},.6:{opacity:1,translateX:0,skewX:"20deg"},.8:{skewX:"-5deg"},1:{opacity:1,translateX:0,skewX:"0deg"}},qe={easing:"ease-in",0:{opacity:1,translateX:0,skewX:"0deg"},1:{opacity:0,translateX:200,skewX:"30deg"}};function Xe(e,t){return{from:c()({},e,t),to:c()({},e,0)}}var Ye=Xe("translateY",-100),Ke=Xe("translateY",100),Qe=Xe("translateX",-100),Ze=Xe("translateX",100);function Je(e,t){return{from:c()({},e,0),to:c()({},e,t)}}var $e=Je("translateY",100),et=Je("translateY",-100),tt=Je("translateX",-100),nt=Je("translateX",100);function rt(e,t){var n=Math.min(1,Math.max(-1,t));return{easing:O.a.bezier(.175,.885,.32,1),0:c()({opacity:0,scale:.1},e,-1e3*n),.6:c()({opacity:1,scale:.457},e,t),1:c()({scale:1},e,0)}}var it={from:{opacity:0,scale:.3},.5:{opacity:1},to:{opacity:1,scale:1}},ot=rt("translateY",60),at=rt("translateY",-60),st=rt("translateX",10),lt=rt("translateX",-10);function ct(e,t){var n=Math.min(1,Math.max(-1,t));return{easing:O.a.bezier(.175,.885,.32,1),0:c()({opacity:1,scale:1},e,0),.4:c()({opacity:1,scale:.457},e,t),1:c()({opacity:0,scale:.1},e,-1e3*n)}}var ut,ht={from:{opacity:1,scale:1},.5:{opacity:1,scale:.3},to:{opacity:0,scale:0}},dt=ct("translateY",60),ft=ct("translateY",-60),pt=ct("translateX",10),mt=ct("translateX",-10);ut=i,Object.keys(ut).forEach((function(e){!function(e,t){U[e]=t}(e,H(ut[e]))}));var gt=ee(o.a);ee(a.a),ee(s.a)},function(t,n,r){"use strict";var i,o=r(19),a=r.n(o),s=r(21),l=r.n(s),c=r(23),u=r.n(c),h=r(24),d=r.n(h),f=r(25),p=r.n(f),m=r(18),g=r.n(m),v=r(6),y=r.n(v),b=r(7),w=r.n(b),x=r(255),_=(r(472),r(20)),E=r.n(_),A=r(83),S=r(257),M=r.n(S);function T(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(){if(!A.canUseDOM)return null;var e=L();return e.sheet?e.sheet:null}function R(e,t){return function(){var e=O();if(e){for(var t=E()(e.cssRules),n=[],r=0;r<t.length;r++){var i=t[r];i instanceof CSSFontFaceRule&&n.push({rule:i,index:r})}return n}return[]}().filter((function(n){var r=n.rule;return r.style.fontFamily===e&&(!t||!t.display||t.display===r.style.fontDisplay)}))}!function(e){e.AUTO="auto",e.SWAP="swap",e.BLOCK="block",e.FALLBACK="fallback",e.OPTIONAL="optional"}(i||(i={}));var k={get name(){return"ExpoFontLoader"},unloadAllAsync:function(){var e;return w.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.canUseDOM){t.next=2;break}return t.abrupt("return");case 2:(e=document.getElementById(P))&&e instanceof HTMLStyleElement&&document.removeChild(e);case 4:case"end":return t.stop()}}),null,null,null,Promise)},unloadAsync:function(e,t){var n,r,i,o,a;return w.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(n=O()){s.next=3;break}return s.abrupt("return");case 3:for(r=R(e,t),i=T(r);!(o=i()).done;)a=o.value,n.deleteRule(a.index);case 5:case"end":return s.stop()}}),null,null,null,Promise)},loadAsync:function(e,t){var n;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(A.canUseDOM){r.next=2;break}return r.abrupt("return");case 2:if(document.head&&"function"===typeof document.head.appendChild){r.next=5;break}throw new x.a("ERR_WEB_ENVIRONMENT","The browser's `document.head` element doesn't support injecting fonts.");case 5:if(n=D(e,t),document.head.appendChild(n),I()){r.next=9;break}return r.abrupt("return");case 9:return r.abrupt("return",new M.a(e,{display:t.display}).load());case 10:case"end":return r.stop()}}),null,null,null,Promise)}},P="expo-generated-fonts";function L(){var e=document.getElementById(P);if(e&&e instanceof HTMLStyleElement)return e;var t=document.createElement("style");return t.id=P,t.type="text/css",t}function D(e,t){var n="@font-face {\n font-family: "+e+";\n src: url("+t.uri+");\n font-display: "+(t.display||i.AUTO)+";\n }",r=L();if(r.styleSheet){var o=r;o.styleSheet.cssText=o.styleSheet.cssText?o.styleSheet.cssText+n:n}else{var a=document.createTextNode(n);r.appendChild(a)}return r}function I(){var e=window.navigator.userAgent,t=!!e.match(/iPad|iPhone/i),n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=e.includes("Edge"),i=e.includes("Trident"),o=e.includes("Firefox");return!n&&!t&&!r&&!i&&!o}function N(e){var t,n="string"===typeof(t=e)?t||null:"object"===typeof t&&(t.uri||t.localUri)||null,r=function(e){return e.display||i.AUTO}(e);return n&&"string"===typeof n||j(n),{uri:n,display:r}}function j(e){var t=typeof e;throw"object"===t&&(t=JSON.stringify(e,null,2)),new x.a("ERR_FONT_SOURCE","Expected font asset of type `string | FontResource | Asset` (number is not supported on web) instead got: "+t)}function B(e,t){return w.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return("object"!==typeof t||"string"!==typeof t.uri||t.downloadAsync)&&j(t),n.next=3,w.a.awrap(k.loadAsync(e,t));case 3:case"end":return n.stop()}}),null,null,null,Promise)}var F={},z={};function H(e){return e in F}function U(e,t){var n,r;return w.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if("object"!==typeof e){i.next=8;break}if(!t){i.next=3;break}throw new x.a("ERR_FONT_API","No fontFamily can be used for the provided source: "+t+". The second argument of `loadAsync()` can only be used with a `string` value as the first argument.");case 3:return n=e,r=Object.keys(n),i.next=7,w.a.awrap(Promise.all(r.map((function(e){return V(e,n[e])}))));case 7:return i.abrupt("return");case 8:return i.next=10,w.a.awrap(V(e,t));case 10:return i.abrupt("return",i.sent);case 11:case"end":return i.stop()}}),null,null,null,Promise)}function V(e,t){var n;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=2;break}throw new x.a("ERR_FONT_SOURCE",'Cannot load null or undefined font source: { "'+e+'": '+t+' }. Expected asset of type `FontSource` for fontFamily of name: "'+e+'"');case 2:if(!F[e]){r.next=4;break}return r.abrupt("return");case 4:if(!z[e]){r.next=6;break}return r.abrupt("return",z[e]);case 6:return n=N(t),z[e]=w.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,w.a.awrap(B(e,n));case 3:F[e]=!0;case 4:return t.prev=4,delete z[e],t.finish(4);case 7:case"end":return t.stop()}}),null,null,[[0,,4,7]],Promise),r.next=10,w.a.awrap(z[e]);case 10:case"end":return r.stop()}}),null,null,null,Promise)}var G=r(0),W=r.n(G),q=r(58),X=r(17),Y=r.n(X),K=(r(1),r(187)),Q=r(9),Z=r(115),J=r(116),$=K.a.RNVectorIconsManager||K.a.RNVectorIconsModule;function ee(){if(!$){if("android"===Q.a.OS)throw new Error("RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.");throw new Error("RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.")}}var te=r(253),ne=r.n(te),re=r(254),ie=r.n(re),oe=r(110),ae=r.n(oe),se=r(5),le=r(123),ce=r(3),ue=["style","iconStyle","children"];function he(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var de=se.a.create({container:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",padding:8},touchable:{overflow:"hidden"},icon:{marginRight:10},text:{fontWeight:"600",backgroundColor:"transparent"}}),fe=["ellipsizeMode","numberOfLines","textBreakStrategy","selectable","suppressHighlighting","allowFontScaling","adjustsFontSizeToFit","minimumFontScale"],pe=["accessible","accessibilityLabel","accessibilityHint","accessibilityComponentType","accessibilityRole","accessibilityStates","accessibilityTraits","onFocus","onBlur","disabled","onPress","onPressIn","onPressOut","onLayout","onLongPress","nativeID","testID","delayPressIn","delayPressOut","delayLongPress","activeOpacity","underlayColor","selectionColor","onShowUnderlay","onHideUnderlay","hasTVPreferredFocus","tvParallaxProperties"];function me(e){var t,n;return n=t=function(t){d()(r,t);var n=he(r);function r(){return l()(this,r),n.apply(this,arguments)}return u()(r,[{key:"render",value:function(){var t=this.props,n=t.style,r=t.iconStyle,i=t.children,o=Y()(t,ue),s=ae()(o,fe,"style","name","size","color"),l=ae()(o,pe),c=ie()(o,Object.keys(s),Object.keys(l),"iconStyle","borderRadius","backgroundColor");s.style=r?[de.icon,r]:de.icon;var u=ae()(this.props,"color"),h=ae()(this.props,"backgroundColor","borderRadius");return W.a.createElement(le.a,a()({style:[de.touchable,h]},l),W.a.createElement(ce.a,a()({style:[de.container,h,n]},c),W.a.createElement(e,s),ne()(i)?W.a.createElement(q.a,{style:[de.text,u]},i):i))}}]),r}(G.PureComponent),t.defaultProps={backgroundColor:"#007AFF",borderRadius:5,color:"white",size:20},n}var ge=["name","size","color","style","children"];function ve(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var ye=K.a.RNVectorIconsManager||K.a.RNVectorIconsModule;function be(e,t,n,r){var i=n?n.replace(/\.(otf|ttf)$/,""):t,o=Q.a.select({windows:"/Assets/"+n+"#"+t,android:i,web:i,default:t}),a=function(t){d()(i,t);var n=ve(i);function i(){var e;l()(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).root=null,e.handleRef=function(t){e.root=t},e}return u()(i,[{key:"setNativeProps",value:function(e){this.root&&this.root.setNativeProps(e)}},{key:"render",value:function(){var t=this.props,n=t.name,i=t.size,a=t.color,s=t.style,l=t.children,c=Y()(t,ge),u=n?e[n]||"?":"";"number"===typeof u&&(u=String.fromCodePoint(u));var h={fontSize:i,color:a},d={fontFamily:o,fontWeight:"normal",fontStyle:"normal"};return c.style=[h,s,d,r||{}],c.ref=this.handleRef,W.a.createElement(q.a,c,u,l)}}]),i}(G.PureComponent);a.defaultProps={size:12,allowFontScaling:!1};var s=function(){var e=new Map;return{setValue:function(t,n){return e.set(t,{type:"value",data:n})},setError:function(t,n){return e.set(t,{type:"error",data:n})},has:function(t){return e.has(t)},get:function(t){if(e.has(t)){var n=e.get(t),r=n.type,i=n.data;if("error"===r)throw i;return i}}}}();function c(t){var n=e[t]||"?";return"number"===typeof n?String.fromCodePoint(n):n}return a.Button=me(a),a.TabBarItemIOS=a.TabBarItem,a.getImageSource=function(e){var t,n,r,i,a,l,u,h=arguments;return w.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=h.length>1&&void 0!==h[1]?h[1]:12,n=h.length>2&&void 0!==h[2]?h[2]:"black",ee(),r=c(e),i=Object(Z.a)(n),a=r+":"+t+":"+i,!s.has(a)){d.next=8;break}return d.abrupt("return",s.get(a));case 8:return d.prev=8,d.next=11,w.a.awrap(ye.getImageForFont(o,r,t,i));case 11:return l=d.sent,u={uri:l,scale:J.a.get()},s.setValue(a,u),d.abrupt("return",u);case 17:throw d.prev=17,d.t0=d.catch(8),s.setError(a,d.t0),d.t0;case 21:case"end":return d.stop()}}),null,null,[[8,17]],Promise)},a.getImageSourceSync=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"black";ee();var r=c(e),i=Object(Z.a)(n),a=r+":"+t+":"+i;if(s.has(a))return s.get(a);try{var l=ye.getImageForFontSync(o,r,t,i),u={uri:l,scale:J.a.get()};return s.setValue(a,u),u}catch(h){throw s.setError(a,h),h}},a.loadFont=function(){var e,t=arguments;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.length>0&&void 0!==t[0]?t[0]:n,"ios"!==Q.a.OS){r.next=7;break}if(ee(),e){r.next=5;break}throw new Error("Unable to load font, because no file was specified. ");case 5:return r.next=7,w.a.awrap(ye.loadFontWithFileName.apply(ye,E()(e.split("."))));case 7:case"end":return r.stop()}}),null,null,null,Promise)},a.hasIcon=function(t){return Object.prototype.hasOwnProperty.call(e,t)},a.getRawGlyphMap=function(){return e},a.getFontFamily=function(){return o},a}function we(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var xe=r(259),_e=r.n(xe),Ee=function(e,t,n,r){var i,o=y()({},t,n),s=be(e,t,null,r);return(i=function(e){d()(r,e);var n=we(r);function r(){var e;return l()(this,r),(e=n.apply(this,arguments))._mounted=!1,e.state={fontIsLoaded:H(t)},e}return u()(r,[{key:"componentDidMount",value:function(){return w.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._mounted=!0,this.state.fontIsLoaded){e.next=5;break}return e.next=4,w.a.awrap(U(o));case 4:this._mounted&&this.setState({fontIsLoaded:!0});case 5:case"end":return e.stop()}}),null,this,null,Promise)}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"setNativeProps",value:function(e){this._icon&&this._icon.setNativeProps(e)}},{key:"render",value:function(){var e=this;return this.state.fontIsLoaded?W.a.createElement(s,a()({ref:function(t){e._icon=t}},this.props)):W.a.createElement(q.a,null)}}]),r}(W.a.Component)).defaultProps=s.defaultProps,i.Button=me(i),i.glyphMap=e,i.getRawGlyphMap=function(){return e},i.getFontFamily=function(){return t},i.loadFont=function(){return U(o)},i.font=o,i}(r(258),"material-community",_e.a);n.a=Ee},,,,,,,function(e,t,n){var r=n(180);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";t.a={ignoreLogs:function(){},ignoreAllLogs:function(){},uninstall:function(){},install:function(){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},function(t,n,r){if("undefined"===typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");let i=r(11);"default"in i&&(i=i.default);let o=r(147);"default"in o&&(o=o.default);const a=function(e){return"string"===typeof e?JSON.parse(e):e},s=function(t){if("function"===typeof t)return t;const n=eval;try{return n("("+t+")")}catch(e){}return null},l=function(e){return isNaN(parseFloat(e))?s(e)?s(e):e:parseFloat(e)};AFRAME.registerComponent("forcegraph",{schema:{jsonUrl:{type:"string",default:""},nodes:{parse:a,default:[]},links:{parse:a,default:[]},numDimensions:{type:"number",default:3},dagMode:{type:"string",default:""},dagLevelDistance:{type:"number",default:0},dagNodeFilter:{parse:s,function:()=>!0},onDagError:{parse:s,default:void 0},nodeRelSize:{type:"number",default:4},nodeId:{type:"string",default:"id"},nodeVal:{parse:l,default:"val"},nodeResolution:{type:"number",default:8},nodeVisibility:{parse:l,default:!0},nodeColor:{parse:l,default:"color"},nodeAutoColorBy:{parse:l,default:""},nodeOpacity:{type:"number",default:.75},nodeThreeObject:{parse:l,default:null},nodeThreeObjectExtend:{parse:l,default:!1},linkSource:{type:"string",default:"source"},linkTarget:{type:"string",default:"target"},linkVisibility:{parse:l,default:!0},linkColor:{parse:l,default:"color"},linkAutoColorBy:{parse:l,default:""},linkOpacity:{type:"number",default:.2},linkWidth:{parse:l,default:0},linkResolution:{type:"number",default:6},linkCurvature:{parse:l,default:0},linkCurveRotation:{parse:l,default:0},linkMaterial:{parse:l,default:null},linkThreeObject:{parse:l,default:null},linkThreeObjectExtend:{parse:l,default:!1},linkPositionUpdate:{parse:s,default:null},linkDirectionalArrowLength:{parse:l,default:0},linkDirectionalArrowColor:{parse:l,default:null},linkDirectionalArrowRelPos:{parse:l,default:.5},linkDirectionalArrowResolution:{type:"number",default:8},linkDirectionalParticles:{parse:l,default:0},linkDirectionalParticleSpeed:{parse:l,default:.01},linkDirectionalParticleWidth:{parse:l,default:.5},linkDirectionalParticleColor:{parse:l,default:null},linkDirectionalParticleResolution:{type:"number",default:4},onNodeHover:{parse:s,default:()=>{}},onLinkHover:{parse:s,default:()=>{}},onNodeClick:{parse:s,default:()=>{}},onLinkClick:{parse:s,default:()=>{}},forceEngine:{type:"string",default:"d3"},d3AlphaMin:{type:"number",default:0},d3AlphaDecay:{type:"number",default:.0228},d3VelocityDecay:{type:"number",default:.4},ngraphPhysics:{parse:a,default:null},warmupTicks:{type:"int",default:0},cooldownTicks:{type:"int",default:1e18},cooldownTime:{type:"int",default:15e3},onEngineTick:{parse:s,default:function(){}},onEngineStop:{parse:s,default:function(){}}},getGraphBbox:function(){return this.forceGraph||(this.forceGraph=new o),this.forceGraph.getGraphBbox()},emitParticle:function(){this.forceGraph||(this.forceGraph=new o);const e=this.forceGraph,t=e.emitParticle.apply(e,arguments);return t===e?this:t},d3Force:function(){this.forceGraph||(this.forceGraph=new o);const e=this.forceGraph,t=e.d3Force.apply(e,arguments);return t===e?this:t},d3ReheatSimulation:function(){return this.forceGraph&&this.forceGraph.d3ReheatSimulation(),this},refresh:function(){return this.forceGraph&&this.forceGraph.refresh(),this},init:function(){const e=this.state={};e.infoEl=document.createElement("a-text"),e.infoEl.setAttribute("position","0 -0.1 -1"),e.infoEl.setAttribute("width",1),e.infoEl.setAttribute("align","center"),e.infoEl.setAttribute("color","lavender");const t=document.querySelector("a-entity[camera], a-camera");t.appendChild(e.infoEl),e.cameraObj=t.object3D.children.filter((function(e){return"PerspectiveCamera"===e.type}))[0],this.el.sceneEl.addEventListener("camera-set-active",(function(t){e.cameraObj=t.detail.cameraEl.components.camera.camera})),this.forceGraph||(this.forceGraph=new o),this.forceGraph.onFinishUpdate(()=>this.el.setObject3D("forcegraphGroup",this.forceGraph)).onLoading(()=>e.infoEl.setAttribute("value","Loading...")).onFinishLoading(()=>e.infoEl.setAttribute("value","")),this.el.addEventListener("raycaster-intersected",t=>e.hoverDetail=t.detail),this.el.addEventListener("raycaster-intersected-cleared",t=>e.hoverDetail=t.detail),this.el.addEventListener("click",()=>e.hoverObj&&this.data["on"+("node"===e.hoverObj.__graphObjType?"Node":"Link")+"Click"](e.hoverObj.__data))},remove:function(){this.state.infoEl.remove(),this.el.removeObject3D("forcegraphGroup")},update:function(e){const t=this,n=this.data,r=AFRAME.utils.diff(n,e);["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaMin","d3AphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].filter((function(e){return e in r})).forEach((function(e){t.forceGraph[e](""!==n[e]?n[e]:null)})),("nodes"in r||"links"in r)&&t.forceGraph.graphData({nodes:n.nodes,links:n.links})},tick:function(e,t){const n=this.state,r=this.data,i=n.hoverDetail?n.hoverDetail.getIntersection?n.hoverDetail.getIntersection(this.el):n.hoverDetail.intersection||void 0:void 0;let o=i?i.object:void 0;for(;o&&!o.hasOwnProperty("__graphObjType");)o=o.parent;if(o!==n.hoverObj){const e=n.hoverObj?n.hoverObj.__graphObjType:null,t=n.hoverObj?n.hoverObj.__data:null,i=o?o.__graphObjType:null,a=o?o.__data:null;e&&e!==i&&r["on"+("node"===e?"Node":"Link")+"Hover"](null,t),i&&r["on"+("node"===i?"Node":"Link")+"Hover"](a,e===i?t:null),n.hoverObj=o}this.forceGraph.tickFrame()}})},function(e,t,n){e.exports=function(e){var t=n(366),h=n(367),d=n(153);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=h(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var f=c[e.dimensions];if(!f){var p=e.dimensions;f={Body:r(p,e.debug),createQuadTree:i(p),createBounds:o(p),createDragForce:a(p),createSpringForce:s(p),integrate:l(p)},c[p]=f}var m=f.Body,g=f.createQuadTree,v=f.createBounds,y=f.createDragForce,b=f.createSpringForce,w=f.integrate,x=n(368).random(42),_=[],E=[],A=g(e,x),S=v(_,e,x),M=b(e,x),T=y(e),C=[],O=new Map,R=0;L("nbody",(function(){if(0===_.length)return;A.insertBodies(_);var e=_.length;for(;e--;){var t=_[e];t.isPinned||(t.reset(),A.updateBodyForce(t),T.update(t))}})),L("spring",(function(){var e=E.length;for(;e--;)M.update(E[e])}));var k={bodies:_,quadTree:A,springs:E,settings:e,addForce:L,removeForce:function(e){var t=C.indexOf(O.get(e));if(t<0)return;C.splice(t,1),O.delete(e)},getForces:function(){return O},step:function(){for(var t=0;t<C.length;++t)C[t](R);var n=w(_,e.timeStep,e.adaptiveTimeStepWeight);return R+=1,n},addBody:function(e){if(!e)throw new Error("Body is required");return _.push(e),e},addBodyAt:function(e){if(!e)throw new Error("Body position is required");var t=(e=>new m(e))(e);return _.push(t),t},removeBody:function(e){if(e){var t=_.indexOf(e);if(!(t<0))return _.splice(t,1),0===_.length&&S.reset(),!0}},addSpring:function(e,n,r,i){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!==typeof r&&(r=-1);var o=new t(e,n,r,i>=0?i:-1);return E.push(o),o},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=E.indexOf(e);return t>-1?(E.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return S.getBestNewPosition(e)},getBBox:P,getBoundingBox:P,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,A.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,A.options({theta:t}),this):e.theta},random:x};return function(e,t){for(var n in e)u(e,t,n)}(e,k),d(k),k;function P(){return S.update(),S.box}function L(e,t){if(O.has(e))throw new Error("Force "+e+" is already added");O.set(e,t),C.push(t)}};var r=n(360),i=n(361),o=n(362),a=n(363),s=n(364),l=n(365),c={};function u(e,t,n){if(e.hasOwnProperty(n)&&"function"!==typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},function(e,t){e.exports=function(e){return 0===e?"x":1===e?"y":2===e?"z":"c"+(e+1)}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r={UIManager:n(29).a};t.a=r},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(){return{type:"GO_BACK"}}function i(){if("string"===typeof(arguments.length<=0?void 0:arguments[0]))return{type:"NAVIGATE",payload:{name:arguments.length<=0?void 0:arguments[0],params:arguments.length<=1?void 0:arguments[1]}};var e=(arguments.length<=0?void 0:arguments[0])||{};if(!e.hasOwnProperty("key")&&!e.hasOwnProperty("name"))throw new Error("You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.");return{type:"NAVIGATE",payload:e}}function o(e){return{type:"RESET",payload:e}}function a(e){return{type:"SET_PARAMS",payload:{params:e}}}n.r(t),n.d(t,"goBack",(function(){return r})),n.d(t,"navigate",(function(){return i})),n.d(t,"reset",(function(){return o})),n.d(t,"setParams",(function(){return a}))},function(t,n,r){"use strict";(function(t){var i=r(8),o=r.n(i),a=r(6),s=r.n(a),l=r(17),c=r.n(l),u=r(0),h=r(43),d=r(93),f=r(135),p=r(40),m=r(69),g=r(47),v=r(59),y=r(136),b=r(137),w=r(138),x=r(139),_=r(140),E=r(260),A=(r(375),["key","routeNames"]);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T="The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.";try{Object.defineProperty(t,"REACT_NAVIGATION_REDUX_DEVTOOLS_EXTENSION_INTEGRATION_ENABLED",{set:function(e){console.warn("Redux devtools extension integration can be enabled with the '@react-navigation/devtools' package. For more details, see https://reactnavigation.org/docs/devtools")}})}catch(e){}var C=u.forwardRef((function(e,t){var n=e.initialState,r=e.onStateChange,i=e.onUnhandledAction,a=e.independent,s=e.children;if(!u.useContext(m.a).isDefault&&!a)throw new Error("Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitely. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.");var l=Object(E.a)((function(){return function e(t){if(void 0!==t){t.key,t.routeNames;return M(M({},c()(t,A)),{},{stale:!0,routes:t.routes.map((function(t){return void 0===t.state?t:M(M({},t),{},{state:e(t.state)})}))})}}(null==n?void 0:n)})),S=o()(l,5),C=S[0],O=S[1],R=S[2],k=S[3],P=S[4],L=u.useRef(!0),D=u.useRef(),I=u.useCallback((function(){return D.current}),[]),N=u.useCallback((function(e){D.current=e}),[]),j=Object(b.a)(),B=j.listeners,F=j.addListener,z=Object(w.a)(),H=z.keyedListeners,U=z.addKeyedListener,V=function(e){if(null==B.focus[0])throw new Error(T);B.focus[0]((function(t){return t.dispatch(e)}))},G=function(){if(null==B.focus[0])return!1;var e=B.focus[0]((function(e){return e.canGoBack()})),t=e.result;return!!e.handled&&t},W=u.useCallback((function(e){var t,n,r,i=null!==(t=null===e||void 0===e?void 0:e.key)&&void 0!==t?t:null===(n=(r=H.getState).root)||void 0===n?void 0:n.call(r).key;if(null==i)throw new Error(T);B.focus[0]((function(t){return t.dispatch(M(M({},h.CommonActions.reset(e)),{},{target:i}))}))}),[H.getState,B.focus]),q=u.useCallback((function(){var e,t;return null===(e=(t=H.getState).root)||void 0===e?void 0:e.call(t)}),[H.getState]),X=u.useCallback((function(){var e=q();if(void 0!==e){for(;void 0!==e.routes[e.index].state;)e=e.routes[e.index].state;return e.routes[e.index]}}),[q]),Y=Object(_.a)(),K=Object(x.a)({}),Q=K.addOptionsGetter,Z=K.getCurrentOptions;u.useImperativeHandle(t,(function(){return M(M(M({},Object.keys(h.CommonActions).reduce((function(e,t){return e[t]=function(){return V(h.CommonActions[t].apply(h.CommonActions,arguments))},e}),{})),Y.create("root")),{},{resetRoot:W,dispatch:V,canGoBack:G,getRootState:q,dangerouslyGetState:function(){return C},dangerouslyGetParent:function(){},getCurrentRoute:X,getCurrentOptions:Z})}));var J=u.useCallback((function(e,t){Y.emit({type:"__unsafe_action__",data:{action:e,noop:t}})}),[Y]),$=u.useRef(),ee=u.useCallback((function(e){$.current!==e&&($.current=e,Y.emit({type:"options",data:{options:e}}))}),[Y]),te=u.useMemo((function(){return{addListener:F,addKeyedListener:U,onDispatchAction:J,onOptionsChange:ee}}),[F,U,J,ee]),ne=u.useMemo((function(){return{scheduleUpdate:k,flushUpdates:P}}),[k,P]),re=u.useRef(!0),ie=u.useCallback((function(){return re.current}),[]),oe=u.useMemo((function(){return{state:C,getState:O,setState:R,getKey:I,setKey:N,getIsInitial:ie,addOptionsGetter:Q}}),[C,O,R,I,N,ie,Q]),ae=u.useRef(r);u.useEffect((function(){re.current=!1,ae.current=r})),u.useEffect((function(){Y.emit({type:"state",data:{state:C}}),!L.current&&ae.current&&ae.current(q()),L.current=!1}),[q,Y,C]);var se=u.useCallback((function(e){}),[]),le=u.createElement(y.a.Provider,{value:ne},u.createElement(p.a.Provider,{value:te},u.createElement(m.a.Provider,{value:oe},u.createElement(f.a.Provider,{value:null!==i&&void 0!==i?i:se},u.createElement(d.b,null,s)))));return a&&(le=u.createElement(g.a.Provider,{value:void 0},u.createElement(v.a.Provider,{value:void 0},le))),le}));n.a=C}).call(this,r(46))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(141);function i(e){return function(){if(void 0!==arguments[0])throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API with React Navigation 5? See https://reactnavigation.org/docs/upgrading-from-4.x for migration guide.");return{Navigator:e,Screen:r.a}}}},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n(0),n(47)},function(e,t,n){"use strict";n(0),n(71)},function(e,t,n){"use strict";n(8),n(0),n(71)},function(e,t,n){"use strict";n(8),n(0),n(71)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(6),i=n.n(r),o=n(19),a=n.n(o),s=n(20),l=n.n(s),c=n(8),u=n.n(c),h=n(261),d=n.n(h),f=n(142),p=n(143);function m(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){var n,r=Object(p.a)(t),o=u()(r,2),s=o[0],c=o[1],h=[];null!==c&&void 0!==c&&c.initialRouteName&&h.push({initialRouteName:c.initialRouteName,parentScreens:[]});var d=null===c||void 0===c?void 0:c.screens,f=e.replace(/\/+/g,"/").replace(/^\//,"").replace(/\?.*$/,"");if(f=f.endsWith("/")?f:"".concat(f,"/"),void 0===d){var m=f.split("/").filter(Boolean).map((function(t,n,r){var i=decodeURIComponent(t);return n===r.length-1?{name:i,params:O(e)}:{name:i}}));return m.length?T(m,h):void 0}var g,v,b=(n=[]).concat.apply(n,l()(Object.keys(d).map((function(e){return _(s,e,d,[],h,[])})))).sort((function(e,t){if(e.pattern===t.pattern)return t.routeNames.join(">").localeCompare(e.routeNames.join(">"));if(e.pattern.startsWith(t.pattern))return-1;if(t.pattern.startsWith(e.pattern))return 1;var n=e.pattern.split("/"),r=t.pattern.split("/"),i=n.indexOf("*"),o=r.indexOf("*");return-1===i&&-1!==o?-1:-1!==i&&-1===o?1:i===o?r.length-n.length:o-i}));if(b.reduce((function(e,t){if(e[t.pattern]){var n=e[t.pattern].routeNames,r=t.routeNames;if(!(n.length>r.length?r.every((function(e,t){return n[t]===e})):n.every((function(e,t){return r[t]===e}))))throw new Error("Found conflicting screens with the same pattern. The pattern '".concat(t.pattern,"' resolves to both '").concat(n.join(" > "),"' and '").concat(r.join(" > "),"'. Patterns must be unique and cannot resolve to more than one screen."))}return a()(e,i()({},t.pattern,t))}),{}),"/"===f){var w=b.find((function(e){return""===e.path&&e.routeNames.every((function(e){var t;return!(null!==(t=b.find((function(t){return t.screen===e})))&&void 0!==t&&t.path)}))}));return w?T(w.routeNames.map((function(t,n,r){return n===r.length-1?{name:t,params:O(e,w.parse)}:{name:t}})),h):void 0}if(!1===s){var E=x(f,b.map((function(e){return y(y({},e),{},{regex:e.regex?new RegExp(e.regex.source+"$"):void 0})}))),S=E.routes,M=E.remainingPath;void 0!==S&&(f=M,g=v=T(S,h))}else for(;f;){var R=x(f,b),k=R.routes;if(f=R.remainingPath,void 0===k){var P=f.split("/");k=[{name:decodeURIComponent(P[0])}],P.shift(),f=P.join("/")}var L=T(k,h);if(v){for(var D;null!==(I=v)&&void 0!==I&&I.routes[v.index||0].state;){var I;v=v.routes[v.index||0].state}v.routes[(null===(D=v)||void 0===D?void 0:D.index)||0].state=L}else g=L;v=L}if(null!=v&&null!=g){var N=C(v),j=O(e,A(N.name,b));return j&&(N.params=y(y({},N.params),j)),g}}var w=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=[]).concat.apply(e,l()(n.map((function(e){return e.split("/")})))).filter(Boolean).join("/")},x=function(e,t){for(var n,r,o=e,s=function(e){if(!e.regex)return"continue";var r=o.match(e.regex);if(r){var s=null===(c=e.pattern)||void 0===c?void 0:c.split("/").filter((function(e){return e.startsWith(":")})).reduce((function(e,t,n){return a()(e,i()({},t,r[2*(n+1)].replace(/\//,"")))}),{});return n=e.routeNames.map((function(e){var n,r=t.find((function(t){return t.screen===e})),i=null===r||void 0===r||null===(n=r.path)||void 0===n?void 0:n.split("/").filter((function(e){return e.startsWith(":")})).reduce((function(e,t){var n=s[t];if(n){var i,o=t.replace(/^:/,"").replace(/\?$/,"");e[o]=null!==(i=r.parse)&&void 0!==i&&i[o]?r.parse[o](n):n}return e}),{});return i&&Object.keys(i).length?{name:e,params:i}:{name:e}})),o=o.replace(r[1],""),"break"}},l=m(t);!(r=l()).done;){var c,u=s(r.value);if("continue"!==u&&"break"===u)break}return{routes:n,remainingPath:o}},_=function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,c=[];i.push(n),a.push(n);var u=r[n];if("string"===typeof u){var h=s?w(s,u):u;c.push(E(t,n,i,h,u))}else if("object"===typeof u){var d;if("string"===typeof u.path){if(t)d=!0!==u.exact&&s?w(s,u.path):u.path;else{if(u.exact&&void 0===u.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");d=!0!==u.exact?w(s||"",u.path||""):u.path||""}c.push(E(t,n,i,d,u.path,u.parse))}u.screens&&(u.initialRouteName&&o.push({initialRouteName:u.initialRouteName,parentScreens:a}),Object.keys(u.screens).forEach((function(n){var r,h=e(t,n,u.screens,i,o,l()(a),null!==(r=d)&&void 0!==r?r:s);c.push.apply(c,l()(h))})))}return i.pop(),c},E=function(e,t,n,r,i,o){return{screen:t,regex:(r=r.split("/").filter(Boolean).join("/"))?new RegExp("^(".concat(r.split("/").map((function(t){if(e&&"*"===t)throw new Error("Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config");return t.startsWith(":")?"(([^/]+\\/)".concat(t.endsWith("?")?"?":"",")"):"".concat("*"===t?".*":d()(t),"\\/")})).join(""),")")):void 0,pattern:r,path:i,routeNames:l()(n),parse:o}},A=function(e,t){for(var n,r=m(t);!(n=r()).done;){var i=n.value;if(e===i.routeNames[i.routeNames.length-1])return i.parse}},S=function(e,t,n){for(var r,i=m(n);!(r=i()).done;){var o=r.value;if(t.length===o.parentScreens.length){for(var a=!0,s=0;s<t.length;s++)if(0!==t[s].localeCompare(o.parentScreens[s])){a=!1;break}if(a)return e!==o.initialRouteName?o.initialRouteName:void 0}}},M=function(e,t,n){return n?e?{index:1,routes:[{name:e},t]}:{routes:[t]}:e?{index:1,routes:[{name:e},y(y({},t),{},{state:{routes:[]}})]}:{routes:[y(y({},t),{},{state:{routes:[]}})]}},T=function(e,t){var n,r=e.shift(),i=[],o=S(r.name,i,t);if(i.push(r.name),n=M(o,r,0===e.length),e.length>0)for(var a=n;r=e.shift();){o=S(r.name,i,t);var s=a.index||a.routes.length-1;a.routes[s].state=M(o,r,0===e.length),e.length>0&&(a=a.routes[s].state),i.push(r.name)}return n},C=function(e){for(var t,n=e;null!==(r=n)&&void 0!==r&&r.routes[n.index||0].state;){var r;n=n.routes[n.index||0].state}return n.routes[(null===(t=n)||void 0===t?void 0:t.index)||0]},O=function(e,t){var n=e.split("?")[1],r=f.parse(n);return t&&Object.keys(r).forEach((function(e){t[e]&&"string"===typeof r[e]&&(r[e]=t[e](r[e]))})),Object.keys(r).length?r:void 0}},function(e,t,n){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(i){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var n={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},r=i.exec(e);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch(t){var o=a(r[0]);o!==r[0]&&(n[r[0]]=o)}r=i.exec(e)}n["%C2"]="\ufffd";for(var s=Object.keys(n),l=0;l<s.length;l++){var c=s[l];e=e.replace(new RegExp(c,"g"),n[c])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var a=r[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(n[a]=s)}return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(20),i=n.n(r),o=n(6),a=n.n(o),s=n(19),l=n.n(s),c=n(8),u=n.n(c),h=n(142),d=n(143);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){if(null==e)throw Error("Got 'undefined' for the navigation state. You must pass a valid state object.");for(var n=Object(d.a)(t),r=u()(n,2),i=r[0],o=r[1],a=o?w(i,o.screens):{},s="/",c=e,f={},m=function(){for(var t="number"===typeof c.index?c.index:0,n=c.routes[t],r=void 0,o=void 0,d=function e(t){var n="number"===typeof t.index?t.routes[t.index]:t.routes[t.routes.length-1];return n.state?e(n.state):n}(e),m=a,w=[],x=!0;n.name in m&&x;)if(r=m[n.name].pattern,w.push(n.name),n.params&&function(){var e=null===(y=m[n.name])||void 0===y?void 0:y.stringify,t=g(Object.entries(n.params).map((function(t){var n=u()(t,2),r=n[0],i=n[1];return[r,null!==e&&void 0!==e&&e[r]?e[r](i):String(i)]})));r&&l()(f,t),d===n&&(o=p({},t),null===(b=r)||void 0===b||b.split("/").filter((function(e){return e.startsWith(":")})).forEach((function(e){var t=v(e);o&&delete o[t]})))}(),m[n.name].screens&&void 0!==n.state){t="number"===typeof n.state.index?n.state.index:n.state.routes.length-1;var _=n.state.routes[t],E=m[n.name].screens;E&&_.name in E?(n=_,m=E):x=!1}else x=!1;if(void 0===r&&(r=w.join("/")),void 0!==m[n.name]?s+=r.split("/").map((function(e){var t=v(e);if("*"===e){if(i)throw new Error("Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config");return n.name}if(e.startsWith(":")){var r=f[t];return void 0===r&&e.endsWith("?")?"":encodeURIComponent(r)}return encodeURIComponent(e)})).join("/"):s+=encodeURIComponent(n.name),o||(o=d.params),n.state)s+="/";else if(o){for(var A in o)"undefined"===o[A]&&delete o[A];var S=h.stringify(o);S&&(s+="?".concat(S))}c=n.state};c;){var y,b;m()}return s=(s=s.replace(/\/+/g,"/")).length>1?s.replace(/\/$/,""):s}var g=function(e){return e.reduce((function(e,t){var n=u()(t,2),r=n[0],i=n[1];if(e.hasOwnProperty(r))throw new Error("A value for key '".concat(r,"' already exists in the object."));return e[r]=i,e}),{})},v=function(e){return e.replace(/^:/,"").replace(/\?$/,"")},y=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=[]).concat.apply(e,i()(n.map((function(e){return e.split("/")})))).filter(Boolean).join("/")},b=function(e,t,n){var r,i;if("string"===typeof t)return{pattern:n?y(n,t):t};if(e)i=!0!==t.exact&&n&&t.path?y(n,t.path):t.path;else{if(t.exact&&void 0===t.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");i=!0!==t.exact?y(n||"",t.path||""):t.path||""}var o=t.screens?w(e,t.screens,i):void 0;return{pattern:null===(r=i)||void 0===r?void 0:r.split("/").filter(Boolean).join("/"),stringify:t.stringify,screens:o}},w=function(e,t,n){return g(Object.entries(t).map((function(t){var r=u()(t,2),i=r[0],o=r[1];return[i,b(e,o,n)]})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(8),i=n.n(r),o=n(19),a=n.n(o),s=n(6),l=n.n(s);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t){var n,r,i=t?d(t):{},o=null!=e.index?e.routes.slice(0,e.index+1):e.routes;if(0!==o.length){if(!(1===o.length&&void 0===o[0].key||2===o.length&&void 0===o[0].key&&o[0].name===(null===i||void 0===i?void 0:i.initialRouteName)&&void 0===o[1].key))return{type:"RESET",payload:e};for(var s=e.routes[null!==(n=e.index)&&void 0!==n?n:e.routes.length-1],l=null===s||void 0===s?void 0:s.state,c=null===i||void 0===i||null===(r=i.screens)||void 0===r?void 0:r[null===s||void 0===s?void 0:s.name],h=u({},s.params),f=s?{name:s.name,params:h}:void 0;l;){var p,m,g;if(0===l.routes.length)return;var v=null!=l.index?l.routes.slice(0,l.index+1):l.routes,y=v[v.length-1];if(a()(h,{initial:void 0,screen:void 0,params:void 0,state:void 0}),1===v.length&&void 0===v[0].key)h.initial=!0,h.screen=y.name;else{if(2!==v.length||void 0!==v[0].key||v[0].name!==(null===(p=c)||void 0===p?void 0:p.initialRouteName)||void 0!==v[1].key){h.state=l;break}h.initial=!1,h.screen=y.name}y.state?(h.params=u({},y.params),h=h.params):h.params=y.params,l=y.state,c=null===(m=c)||void 0===m||null===(g=m.screens)||void 0===g?void 0:g[y.name]}if(f)return{type:"NAVIGATE",payload:f}}}var d=function(e){return"object"===typeof e&&null!=e?{initialRouteName:e.initialRouteName,screens:null!=e.screens?f(e.screens):void 0}:{}},f=function(e){return Object.entries(e).reduce((function(e,t){var n=i()(t,2),r=n[0],o=n[1];return e[r]=d(o),e}),{})}},function(e,t,n){"use strict";n(109)},function(e,t){},function(e,t,n){var r=n(156)(n(207));e.exports=r},function(e,t,n){var r=n(385),i=n(387),o=n(388);function a(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function s(e,t,n,r){return e["@@transducer/result"](n[r](o(e["@@transducer/step"],e),t))}var l="undefined"!==typeof Symbol?Symbol.iterator:"@@iterator";e.exports=function(e,t,n){if("function"===typeof e&&(e=i(e)),r(n))return function(e,t,n){for(var r=0,i=n.length;r<i;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"===typeof n["fantasy-land/reduce"])return s(e,t,n,"fantasy-land/reduce");if(null!=n[l])return a(e,t,n[l]());if("function"===typeof n.next)return a(e,t,n);if("function"===typeof n.reduce)return s(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},function(e,t,n){var r=n(57)((function(e){return function(){return e}}));e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(52);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(t,n,r){"use strict";(function(n){var i=r(52),o=r(429),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l={adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof n&&"[object process]"===Object.prototype.toString.call(n))&&(e=r(213)),e}(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(a)})),t.exports=l}).call(this,r(111))},function(t,n,r){"use strict";var i=r(52),o=r(430),a=r(432),s=r(210),l=r(433),c=r(436),u=r(437),h=r(214);t.exports=function(t){return new Promise((function(n,r){var d=t.data,f=t.headers;i.isFormData(d)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var m=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var v=l(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),s(v,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:e,config:t,request:p};o(n,r,i),p=null}},p.onabort=function(){p&&(r(h("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(h("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,"ECONNABORTED",p)),p=null},i.isStandardBrowserEnv()){var y=(t.withCredentials||u(v))&&t.xsrfCookieName?a.read(t.xsrfCookieName):void 0;y&&(f[t.xsrfHeaderName]=y)}if("setRequestHeader"in p&&i.forEach(f,(function(e,t){"undefined"===typeof d&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)})),i.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"===typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),d||(d=null),p.send(d)}))}},function(e,t,n){"use strict";var r=n(431);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";var r=n(52);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(o,c),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=i.concat(o).concat(a).concat(s),h=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(h,c),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(144);function o(){return r.useContext(i.a)}},function(e,t){},function(e,t,n){var r=n(452),i={};for(var o in r)r.hasOwnProperty(o)&&(i[r[o]]=o);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in a)if(a.hasOwnProperty(s)){if(!("channels"in a[s]))throw new Error("missing channels property: "+s);if(!("labels"in a[s]))throw new Error("missing channel labels property: "+s);if(a[s].labels.length!==a[s].channels)throw new Error("channel and label counts mismatch: "+s);var l=a[s].channels,c=a[s].labels;delete a[s].channels,delete a[s].labels,Object.defineProperty(a[s],"channels",{value:l}),Object.defineProperty(a[s],"labels",{value:c})}a.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a;return s===a?t=0:r===s?t=(i-o)/l:i===s?t=2+(o-r)/l:o===s&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+s)/2,[t,100*(s===a?0:n<=.5?l/(s+a):l/(2-s-a)),100*n]},a.rgb.hsv=function(e){var t,n,r,i,o,a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),h=function(e){return(c-e)/6/u+.5};return 0===u?i=o=0:(o=u/c,t=h(a),n=h(s),r=h(l),a===c?i=r-n:s===c?i=1/3+t-r:l===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var t=i[e];if(t)return t;var n,o,a,s=1/0;for(var l in r)if(r.hasOwnProperty(l)){var c=r[l],u=(o=e,a=c,Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));u<s&&(s=u,n=l)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(e){var t,n,r,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(r=a+1/3*-(c-1))<0&&r++,r>1&&r--,o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[c]=255*o;return i},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=o<=1?o:2-o,[t,100*(0===r?2*i/(o+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},a.hsv.hsl=function(e){var t,n,r,i=e[0],o=e[1]/100,a=e[2]/100,s=Math.max(a,.01);return r=(2-o)*a,n=o*s,[i,100*(n=(n/=(t=(2-o)*s)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,i,o,a,s,l=e[0]/360,c=e[1]/100,u=e[2]/100,h=c+u;switch(h>1&&(c/=h,u/=h),r=6*l-(t=Math.floor(6*l)),0!==(1&t)&&(r=1-r),i=c+r*((n=1-u)-c),t){default:case 6:case 0:o=n,a=i,s=c;break;case 1:o=i,a=n,s=c;break;case 2:o=c,a=n,s=i;break;case 3:o=c,a=i,s=n;break;case 4:o=i,a=c,s=n;break;case 5:o=n,a=c,s=i}return[255*o,255*a,255*s]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){var t,n,r,i=e[0]/100,o=e[1]/100,a=e[2]/100;return n=-.9689*i+1.8758*o+.0415*a,r=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var o=Math.pow(n,3),a=Math.pow(t,3),s=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,o=Math.max(Math.max(n,r),i),a=Math.min(Math.min(n,r),i),s=o-a;return t=s<=0?0:o===n?(r-i)/s%6:o===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,o=[0,0,0],a=t%1*6,s=a%1,l=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ie}));var r=n(8),i=n.n(r),o=n(19),a=n.n(o),s=n(6),l=n.n(s),c=n(17),u=n.n(c),h=n(20),d=n.n(h),f=n(0),p=(n(376),n(43)),m=n(69),g=n(47),v=n(141),y=n(140),b=n(41),w=n(93);var x=f.memo((function(e){return e.children}),(function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0,o=n;i<o.length;i++){var a=o[i];if("children"!==a&&e[a]!==t[a])return!1}return!0})),_=n(139);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){var t=e.screen,n=e.route,r=e.navigation,i=e.routeState,o=e.getState,a=e.setState,s=e.options,l=f.useRef(),c=f.useCallback((function(){return l.current}),[]),u=Object(_.a)({key:n.key,options:s,navigation:r}).addOptionsGetter,h=f.useCallback((function(e){l.current=e}),[]),d=f.useCallback((function(){var e=o().routes.find((function(e){return e.key===n.key}));return e?e.state:void 0}),[o,n.key]),p=f.useCallback((function(e){var t=o();a(A(A({},t),{},{routes:t.routes.map((function(t){return t.key===n.key?A(A({},t),{},{state:e}):t}))}))}),[o,n.key,a]),g=f.useRef(!0);f.useEffect((function(){g.current=!1}));var v=f.useCallback((function(){return g.current}),[]),y=f.useMemo((function(){return{state:i,getState:d,setState:p,getKey:c,setKey:h,getIsInitial:v,addOptionsGetter:u}}),[i,d,p,c,h,v,u]),b=t.getComponent?t.getComponent():t.component;return f.createElement(m.a.Provider,{value:y},f.createElement(w.b,null,f.createElement(x,{name:t.name,render:b||t.children,navigation:r,route:n},void 0!==b?f.createElement(b,{navigation:r,route:n}):void 0!==t.children?t.children({navigation:r,route:n}):null)))}var M=n(40),T=["emit"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=n(109),k=n(59);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){var t=e.state,n=e.screens,r=e.navigation,o=e.screenOptions,a=e.onAction,s=e.getState,c=e.setState,h=e.addListener,d=e.addKeyedListener,m=e.onRouteFocus,v=e.router,y=e.emitter,b=f.useState({}),w=i()(b,2),x=w[0],_=w[1],E=f.useContext(M.a),A=E.onDispatchAction,C=E.onOptionsChange,P=f.useMemo((function(){return{navigation:r,onAction:a,addListener:h,addKeyedListener:d,onRouteFocus:m,onDispatchAction:A,onOptionsChange:C}}),[r,a,h,d,m,A,C]),D=function(e){var t=e.state,n=e.getState,r=e.navigation,i=e.setOptions,o=e.router,a=e.emitter,s=f.useMemo((function(){return{current:{}}}),[n,r,i,o,a]),c=O(O({},o.actionCreators),p.CommonActions);return s.current=t.routes.reduce((function(e,t){var o=s.current[t.key];if(o)e[t.key]=o;else{r.emit;var h=u()(r,T),d=function(e){var i="function"===typeof e?e(n()):e;r.dispatch("object"===typeof i&&null!=i?O({source:t.key},i):i)},f=Object.keys(c).reduce((function(e,t){return e[t]=function(){return d(c[t].apply(c,arguments))},e}),{});e[t.key]=O(O(O(O({},h),f),a.create(t.key)),{},{dispatch:d,setOptions:function(e){return i((function(n){return O(O({},n),{},l()({},t.key,O(O({},n[t.key]),e)))}))},isFocused:function(){var e=n();return e.routes[e.index].key===t.key&&(!r||r.isFocused())}})}return e}),{}),s.current}({state:t,getState:s,navigation:r,setOptions:_,router:v,emitter:y});return Object(R.b)(t.routes).reduce((function(e,r,i){var a=n[r.name],l=D[r.key],u=L(L(L({},"object"===typeof o||null==o?o:o({route:r,navigation:l})),"object"===typeof a.options||null==a.options?a.options:a.options({route:r,navigation:l})),x[r.key]);return e[r.key]={navigation:l,render:function(){return f.createElement(M.a.Provider,{key:r.key,value:P},f.createElement(k.a.Provider,{value:l},f.createElement(g.a.Provider,{value:r},f.createElement(S,{navigation:l,route:r,screen:a,routeState:t.routes[i].state,getState:s,setState:c,options:u}))))},options:u},e}),{})}var I=n(135),N=n(87);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}N.a;var V=Symbol("VISITED_ROUTE_KEYS"),G=function(e,t,n,r,i){for(var o,a,s=r.map((function(e){return e.key})),c=n.filter((function(e){return!s.includes(e.key)})).reverse(),u=null!==(o=i[V])&&void 0!==o?o:new Set,h=U(U({},i),{},l()({},V,u)),d=F(c);!(a=d()).done;){var f,p=a.value;if(!u.has(p.key)){if(null===(f=t[p.key])||void 0===f?void 0:f.call(t,h))return!0;if(u.add(p.key),e.emit({type:"beforeRemove",target:p.key,data:{action:h},canPreventDefault:!0}).defaultPrevented)return!0}}return!1};function W(e){var t=e.router,n=e.getState,r=e.setState,i=e.key,o=e.actionListeners,a=e.beforeRemoveListeners,s=e.routerConfigOptions,l=e.emitter,c=f.useContext(M.a),u=c.onAction,h=c.onRouteFocus,d=c.addListener,p=c.onDispatchAction,m=f.useRef(s);f.useEffect((function(){m.current=s}));var v=f.useCallback((function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,c=n();if(s.has(c.key))return!1;if(s.add(c.key),"string"!==typeof e.target||e.target===c.key){var d=t.getStateForAction(c,e,m.current);if(null!==(d=null===d&&e.target===c.key?c:d)){if(p(e,c===d),c!==d){var f=G(l,a,c.routes,d.routes,e);if(f)return!0;r(d)}if(void 0!==h){var g=t.shouldActionChangeFocus(e);g&&void 0!==i&&h(i)}return!0}}if(void 0!==u&&u(e,s))return!0;for(var v=o.length-1;v>=0;v--){var y=o[v];if(y(e,s))return!0}return!1}),[o,a,l,n,i,u,p,h,t,r]);return function(e){var t=e.getState,n=e.emitter,r=e.beforeRemoveListeners,i=f.useContext(M.a).addKeyedListener,o=f.useContext(g.a),a=null===o||void 0===o?void 0:o.key;f.useEffect((function(){if(a)return null===i||void 0===i?void 0:i("beforeRemove",a,(function(e){var i=t();return G(n,r,i.routes,[],e)}))}),[i,r,n,t,a])}({getState:n,emitter:l,beforeRemoveListeners:a}),f.useEffect((function(){return null===d||void 0===d?void 0:d("action",v)}),[d,v]),v}var q=n(137);function X(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var K=n(138);function Q(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))}function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $=n(136),ee=n(124);var te=["children"];function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}N.a;function ie(e,t){var n=function(){var e=f.useState((function(){return Object(b.a)()})),t=i()(e,1)[0],n=f.useContext(w.a);if(void 0===n)throw new Error("Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?");return f.useEffect((function(){var e=n.register,r=n.unregister;return e(t),function(){return r(t)}}),[n,t]),t}(),r=f.useContext(g.a),o=t.children,s=u()(t,te),c=f.useRef(e(re(re({},s),null!==r&&void 0!==r&&r.params&&null==r.params.state&&!1!==r.params.initial&&"string"===typeof r.params.screen?{initialRouteName:r.params.screen}:null))).current,h=function e(t){return f.Children.toArray(t).reduce((function(t,n){var r,i;if(f.isValidElement(n)){if(n.type===v.a)return t.push(n.props),t;if(n.type===f.Fragment)return t.push.apply(t,d()(e(n.props.children))),t}throw new Error("A navigator can only contain 'Screen' components as its direct children (found ".concat(f.isValidElement(n)?"'".concat("string"===typeof n.type?n.type:null===(r=n.type)||void 0===r?void 0:r.name,"'").concat(null!==(i=n.props)&&void 0!==i&&i.name?" for the screen '".concat(n.props.name,"'"):""):"object"===typeof n?JSON.stringify(n):"'".concat(String(n),"'"),"). To render this component in the navigator, pass it in the 'component' prop to 'Screen'."))}),[])}(o),x=h.reduce((function(e,t){if(t.name in e)throw new Error("A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '".concat(t.name,"')"));return e[t.name]=t,e}),{}),_=h.map((function(e){return e.name})),E=_.reduce((function(e,t){var n,i,o,a=x[t].initialParams,s=null==(null===r||void 0===r||null===(n=r.params)||void 0===n?void 0:n.state)&&!1!==(null===r||void 0===r||null===(i=r.params)||void 0===i?void 0:i.initial)&&(null===r||void 0===r||null===(o=r.params)||void 0===o?void 0:o.screen)===t?r.params.params:void 0;return e[t]=void 0!==a||void 0!==s?re(re({},a),s):void 0,e}),{}),A=_.reduce((function(e,t){return a()(e,l()({},t,x[t].getId))}),{});if(!_.length)throw new Error("Couldn't find any screens for the navigator. Have you defined any screens as its children?");var S=f.useCallback((function(e){return void 0===e.type||e.type===c.type}),[c.type]),T=f.useCallback((function(e){return void 0!==e&&!1===e.stale&&S(e)}),[S]),C=f.useContext(m.a),O=C.state,R=C.getState,P=C.setState,L=C.setKey,N=C.getKey,j=C.getIsInitial,F=f.useMemo((function(){var e,t,n;return void 0!==O&&S(O)||null!=(null===r||void 0===r||null===(e=r.params)||void 0===e?void 0:e.state)?[c.getRehydratedState(null!==(t=null===r||void 0===r||null===(n=r.params)||void 0===n?void 0:n.state)&&void 0!==t?t:O,{routeNames:_,routeParamList:E,routeGetIdList:A}),!1]:[c.getInitialState({routeNames:_,routeParamList:E,routeGetIdList:A}),!0]}),[O,c,S]),z=i()(F,2),H=z[0],U=z[1],V=T(O)?O:H,G=V;Q(V.routeNames,_)||(G=c.getStateForRouteNamesChange(V,{routeNames:_,routeParamList:E,routeGetIdList:A}));var Y=f.useRef(null===r||void 0===r?void 0:r.params);if(f.useEffect((function(){Y.current=null===r||void 0===r?void 0:r.params}),[null===r||void 0===r?void 0:r.params]),null!==r&&void 0!==r&&r.params){var Z,ne=Y.current;"object"===typeof r.params.state&&null!=r.params.state&&r.params.state!==(null===ne||void 0===ne?void 0:ne.state)?Z=p.CommonActions.reset(r.params.state):"string"===typeof r.params.screen&&(!1===r.params.initial&&U||r.params!==ne)&&(Z=p.CommonActions.navigate(r.params.screen,r.params.params));var ie=Z?c.getStateForAction(G,Z,{routeNames:_,routeParamList:E,routeGetIdList:A}):null;G=null!==ie?c.getRehydratedState(ie,{routeNames:_,routeParamList:E,routeGetIdList:A}):G}var oe=V!==G;Object($.b)((function(){oe&&P(G)})),V=G,f.useEffect((function(){return L(n),j()||P(G),function(){setTimeout((function(){void 0!==R()&&N()===n&&P(void 0)}),0)}}),[]);var ae=f.useRef();ae.current=H;var se=f.useCallback((function(){var e=R();return T(e)?e:ae.current}),[R,T]),le=Object(y.a)((function(e){var t,n,r,i=[];e.target?null!==(r=n=V.routes.find((function(t){return t.key===e.target})))&&void 0!==r&&r.name&&i.push(n.name):(n=V.routes[V.index],i.push.apply(i,d()(Object.keys(x).filter((function(e){var t;return(null===(t=n)||void 0===t?void 0:t.name)===e})))));if(null!=n){var o=ye[n.key].navigation;(t=[]).concat.apply(t,d()(i.map((function(t){var r=x[t].listeners,i="function"===typeof r?r({route:n,navigation:o}):r;return i?Object.keys(i).filter((function(t){return t===e.type})).map((function(e){return null===i||void 0===i?void 0:i[e]})):void 0})))).filter((function(e,t,n){return e&&n.lastIndexOf(e)===t})).forEach((function(t){return null===t||void 0===t?void 0:t(e)}))}}));!function(e){var t=e.state,n=e.emitter,r=f.useContext(k.a),i=f.useRef(),o=t.routes[t.index].key;f.useEffect((function(){return null===r||void 0===r?void 0:r.addListener("focus",(function(){i.current=o,n.emit({type:"focus",target:o})}))}),[o,n,r]),f.useEffect((function(){return null===r||void 0===r?void 0:r.addListener("blur",(function(){i.current=void 0,n.emit({type:"blur",target:o})}))}),[o,n,r]),f.useEffect((function(){var e=i.current;i.current=o,void 0!==e||r||n.emit({type:"focus",target:o}),e===o||r&&!r.isFocused()||void 0!==e&&(n.emit({type:"blur",target:e}),n.emit({type:"focus",target:o}))}),[o,n,r])}({state:V,emitter:le}),f.useEffect((function(){le.emit({type:"state",data:{state:V}})}),[le,V]);var ce=Object(q.a)(),ue=ce.listeners,he=ce.addListener,de=Object(K.a)(),fe=de.keyedListeners,pe=de.addKeyedListener,me=W({router:c,getState:se,setState:P,key:null===r||void 0===r?void 0:r.key,actionListeners:ue.action,beforeRemoveListeners:fe.beforeRemove,routerConfigOptions:{routeNames:_,routeParamList:E,routeGetIdList:A},emitter:le}),ge=function(e){var t=e.router,n=e.getState,r=e.key,i=e.setState,o=f.useContext(M.a).onRouteFocus;return f.useCallback((function(e){var a=n(),s=t.getStateForRouteFocus(a,e);s!==a&&i(s),void 0!==o&&void 0!==r&&o(r)}),[n,o,t,i,r])}({router:c,key:null===r||void 0===r?void 0:r.key,getState:se,setState:P}),ve=function(e){var t=e.onAction,n=e.getState,r=e.emitter,i=e.router,o=f.useContext(I.a),a=f.useContext(k.a);return f.useMemo((function(){var e=function(e){var r="function"===typeof e?e(n()):e;t(r)||null===o||void 0===o||o(r)},s=B(B({},i.actionCreators),p.CommonActions),l=Object.keys(s).reduce((function(t,n){return t[n]=function(){return e(s[n].apply(s,arguments))},t}),{});return B(B(B({},a),l),{},{dispatch:e,emit:r.emit,isFocused:a?a.isFocused:function(){return!0},canGoBack:function(){var e=n();return null!==i.getStateForAction(e,p.CommonActions.goBack(),{routeNames:e.routeNames,routeParamList:{},routeGetIdList:{}})||(null===a||void 0===a?void 0:a.canGoBack())||!1},dangerouslyGetParent:function(){return a},dangerouslyGetState:n})}),[r.emit,n,t,o,a,i])}({onAction:me,getState:se,emitter:le,router:c});!function(e){var t=e.navigation,n=e.focusedListeners,r=f.useContext(M.a).addListener,i=f.useCallback((function(e){if(t.isFocused()){for(var r,i=X(n);!(r=i()).done;){var o=(0,r.value)(e),a=o.handled,s=o.result;if(a)return{handled:a,result:s}}return{handled:!0,result:e(t)}}return{handled:!1,result:null}}),[n,t]);f.useEffect((function(){return null===r||void 0===r?void 0:r("focus",i)}),[r,i])}({navigation:ve,focusedListeners:ue.focus}),function(e){var t=e.getState,n=e.getStateListeners,r=f.useContext(M.a).addKeyedListener,i=f.useContext(g.a),o=i?i.key:"root",a=f.useCallback((function(){var e=t(),r=e.routes.map((function(e){var t,r=null===(t=n[e.key])||void 0===t?void 0:t.call(n);return e.state===r?e:J(J({},e),{},{state:r})}));return Q(e.routes,r)?e:J(J({},e),{},{routes:r})}),[t,n]);f.useEffect((function(){return null===r||void 0===r?void 0:r("getState",o,a)}),[r,a,o])}({getState:se,getStateListeners:fe.getState});var ye=D({state:V,screens:x,navigation:ve,screenOptions:t.screenOptions,onAction:me,getState:se,setState:P,onRouteFocus:ge,addListener:he,addKeyedListener:pe,router:c,emitter:le});return function(e){var t=e.state,n=e.navigation,r=e.descriptors,i=f.useContext(ee.a);i&&n.isFocused()&&(i.options=r[t.routes[t.index].key].options)}({state:V,navigation:ve,descriptors:ye}),{state:V,navigation:ve,descriptors:ye}}},function(e,t,n){"use strict";var r=n(8),i=n.n(r),o=n(6),a=n.n(o),s=n(17),l=n.n(s),c=n(0),u=n(75),h=n(126),d=n(88),f=c.createContext({options:void 0});f.displayName="LinkingContext";var p=f,m=n(7),g=n.n(m);var v=n(128);var y=n(125),b=["theme","linking","fallback","documentTitle","onReady"];function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _=c.forwardRef((function(e,t){var n=e.theme,r=void 0===n?d.a:n,o=e.linking,s=e.fallback,f=void 0===s?null:s,m=e.documentTitle,_=e.onReady,E=l()(e,b),A=!!o&&!1!==o.enabled,S=c.useRef(null);Object(y.a)(S),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.enabled,r=void 0===n||n,i=t.formatter,o=void 0===i?function(e,t){var n;return null!==(n=null===e||void 0===e?void 0:e.title)&&void 0!==n?n:null===t||void 0===t?void 0:t.name}:i;c.useEffect((function(){if(r){var t=e.current;if(t){var n=o(t.getCurrentOptions(),t.getCurrentRoute());document.title=n}return null===t||void 0===t?void 0:t.addListener("options",(function(e){var n=o(e.data.options,null===t||void 0===t?void 0:t.getCurrentRoute());document.title=n}))}}))}(S,m);var M=function(e){var t=c.useState(e),n=i()(t,1)[0],r=[!1,void 0];n.then((function(e){r=[!0,e]}));var o=c.useState(r),a=i()(o,2),s=a[0],l=a[1],u=i()(s,1)[0];return c.useEffect((function(){var e=!1;return u||function(){var t;g.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,g.a.awrap(n);case 3:t=r.sent;case 4:return r.prev=4,e||l([!0,t]),r.finish(4);case 7:case"end":return r.stop()}}),null,null,[[0,,4,7]],Promise)}(),function(){e=!0}}),[n,u]),s}(Object(v.a)(S,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({enabled:A,prefixes:[]},o)).getInitialState),T=i()(M,2),C=T[0],O=T[1];c.useImperativeHandle(t,(function(){return S.current}));var R=c.useMemo((function(){return{options:o}}),[o]),k=null!=E.initialState||!A||C,P=c.useRef(_);return c.useEffect((function(){P.current=_})),c.useEffect((function(){var e;k&&(null===(e=P.current)||void 0===e||e.call(P))}),[k]),k?c.createElement(p.Provider,{value:R},c.createElement(h.a,{value:r},c.createElement(u.BaseNavigationContainer,x({},E,{initialState:null==E.initialState?O:E.initialState,ref:S})))):f}));t.a=_},,,function(e,t,n){"use strict";var r=n(297);e.exports={isRtlLang:r.isRtlLang,getLangDir:r.getLangDir}},function(e,t,n){"use strict";var r=n(299),i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Sources cannot be null or undefined");return Object(e)}function s(e,t,n){var o=t[n];if(void 0!==o&&null!==o){if(i.call(e,n)&&(void 0===e[n]||null===e[n]))throw new TypeError("Cannot convert undefined or null to object ("+n+")");i.call(e,n)&&r(o)?e[n]=l(Object(e[n]),t[n]):e[n]=o}}function l(e,t){if(e===t)return e;for(var n in t=Object(t))i.call(t,n)&&s(e,t,n);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),a=0;a<r.length;a++)o.call(t,r[a])&&s(e,t,r[a]);return e}e.exports=function(e){e=a(e);for(var t=1;t<arguments.length;t++)l(e,arguments[t]);return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prefixMap,n=e.plugins;return function e(s){for(var l in s){var c=s[l];if((0,a.default)(c))s[l]=e(c);else if(Array.isArray(c)){for(var u=[],h=0,d=c.length;h<d;++h){var f=(0,i.default)(n,l,c[h],s,t);(0,o.default)(u,f||c[h])}u.length>0&&(s[l]=u)}else{var p=(0,i.default)(n,l,c,s,t);p&&(s[l]=p),s=(0,r.default)(t,l,s)}}return s}};var r=s(n(303)),i=s(n(304)),o=s(n(305)),a=s(n(306));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&"text"===t)return["-webkit-text","text"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("cross-fade(")>-1)return a.map((function(e){return t.replace(/cross-fade\(/g,e+"cross-fade(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("cursor"===e&&i.hasOwnProperty(t))return r.map((function(e){return e+t}))};var r=["-webkit-","-moz-",""],i={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("filter(")>-1)return a.map((function(e){return t.replace(/filter\(/g,e+"filter(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("display"===e&&r.hasOwnProperty(t))return r[t]};var r={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){Object.prototype.hasOwnProperty.call(i,e)&&(n[i[e]]=r[t]||t);if("flex"===e){if(Object.prototype.hasOwnProperty.call(o,t))return void(n.msFlex=o[t]);if(a.test(t))return void(n.msFlex=t+" 1 0%");var s=t.split(/\s/);switch(s.length){case 1:return void(n.msFlex="1 1 "+t);case 2:return void(a.test(s[1])?n.msFlex=s[0]+" "+s[1]+" 0%":n.msFlex=s[0]+" 1 "+s[1]);default:n.msFlex=t}}};var r={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},i={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"},o={auto:"1 1 auto",inherit:"inherit",initial:"0 1 auto",none:"0 0 auto",unset:"unset"},a=/^\d+(\.\d+)?$/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){"flexDirection"===e&&"string"===typeof t&&(t.indexOf("column")>-1?n.WebkitBoxOrient="vertical":n.WebkitBoxOrient="horizontal",t.indexOf("reverse")>-1?n.WebkitBoxDirection="reverse":n.WebkitBoxDirection="normal");i.hasOwnProperty(e)&&(n[i[e]]=r[t]||t)};var r={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},i={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&s.test(t))return a.map((function(e){return t.replace(s,(function(t){return e+t}))}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-","-moz-",""],s=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function i(e){return"number"===typeof e&&!isNaN(e)}function o(e){return"string"===typeof e&&e.includes("/")}t.default=function(e,t,n){if("display"===e&&t in s)return s[t];if(e in l){(0,l[e])(t,n)}};var a=["center","end","start","stretch"],s={"inline-grid":["-ms-inline-grid","inline-grid"],grid:["-ms-grid","grid"]},l={alignSelf:function(e,t){a.indexOf(e)>-1&&(t.msGridRowAlign=e)},gridColumn:function(e,t){if(i(e))t.msGridColumn=e;else if(o(e)){var n=e.split("/"),a=r(n,2),s=a[0],c=a[1];l.gridColumnStart(+s,t);var u=c.split(/ ?span /),h=r(u,2),d=h[0],f=h[1];""===d?l.gridColumnEnd(+s+ +f,t):l.gridColumnEnd(+c,t)}else l.gridColumnStart(e,t)},gridColumnEnd:function(e,t){var n=t.msGridColumn;i(e)&&i(n)&&(t.msGridColumnSpan=e-n)},gridColumnStart:function(e,t){i(e)&&(t.msGridColumn=e)},gridRow:function(e,t){if(i(e))t.msGridRow=e;else if(o(e)){var n=e.split("/"),a=r(n,2),s=a[0],c=a[1];l.gridRowStart(+s,t);var u=c.split(/ ?span /),h=r(u,2),d=h[0],f=h[1];""===d?l.gridRowEnd(+s+ +f,t):l.gridRowEnd(+c,t)}else l.gridRowStart(e,t)},gridRowEnd:function(e,t){var n=t.msGridRow;i(e)&&i(n)&&(t.msGridRowSpan=e-n)},gridRowStart:function(e,t){i(e)&&(t.msGridRow=e)},gridTemplateColumns:function(e,t){t.msGridColumns=e},gridTemplateRows:function(e,t){t.msGridRows=e},justifySelf:function(e,t){a.indexOf(e)>-1&&(t.msGridColumnAlign=e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("image-set(")>-1)return a.map((function(e){return t.replace(/image-set\(/g,e+"image-set(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(Object.prototype.hasOwnProperty.call(r,e))for(var i=r[e],o=0,a=i.length;o<a;++o)n[i[o]]=t};var r={marginBlockStart:["WebkitMarginBefore"],marginBlockEnd:["WebkitMarginAfter"],marginInlineStart:["WebkitMarginStart","MozMarginStart"],marginInlineEnd:["WebkitMarginEnd","MozMarginEnd"],paddingBlockStart:["WebkitPaddingBefore"],paddingBlockEnd:["WebkitPaddingAfter"],paddingInlineStart:["WebkitPaddingStart","MozPaddingStart"],paddingInlineEnd:["WebkitPaddingEnd","MozPaddingEnd"],borderBlockStart:["WebkitBorderBefore"],borderBlockStartColor:["WebkitBorderBeforeColor"],borderBlockStartStyle:["WebkitBorderBeforeStyle"],borderBlockStartWidth:["WebkitBorderBeforeWidth"],borderBlockEnd:["WebkitBorderAfter"],borderBlockEndColor:["WebkitBorderAfterColor"],borderBlockEndStyle:["WebkitBorderAfterStyle"],borderBlockEndWidth:["WebkitBorderAfterWidth"],borderInlineStart:["WebkitBorderStart","MozBorderStart"],borderInlineStartColor:["WebkitBorderStartColor","MozBorderStartColor"],borderInlineStartStyle:["WebkitBorderStartStyle","MozBorderStartStyle"],borderInlineStartWidth:["WebkitBorderStartWidth","MozBorderStartWidth"],borderInlineEnd:["WebkitBorderEnd","MozBorderEnd"],borderInlineEndColor:["WebkitBorderEndColor","MozBorderEndColor"],borderInlineEndStyle:["WebkitBorderEndStyle","MozBorderEndStyle"],borderInlineEndWidth:["WebkitBorderEndWidth","MozBorderEndWidth"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("position"===e&&"sticky"===t)return["-webkit-sticky","sticky"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(i.hasOwnProperty(e)&&o.hasOwnProperty(t))return r.map((function(e){return e+t}))};var r=["-webkit-","-moz-",""],i={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},o={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){if("string"===typeof t&&s.hasOwnProperty(e)){var c=function(e,t){if((0,i.default)(e))return e;for(var n=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,a=n.length;o<a;++o){var s=n[o],c=[s];for(var u in t){var h=(0,r.default)(u);if(s.indexOf(h)>-1&&"order"!==h)for(var d=t[u],f=0,p=d.length;f<p;++f)c.unshift(s.replace(h,l[d[f]]+h))}n[o]=c.join(",")}return n.join(",")}(t,a),u=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-moz-|-ms-/.test(e)})).join(",");if(e.indexOf("Webkit")>-1)return u;var h=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-webkit-|-ms-/.test(e)})).join(",");return e.indexOf("Moz")>-1?h:(n["Webkit"+(0,o.default)(e)]=u,n["Moz"+(0,o.default)(e)]=h,c)}};var r=a(n(307)),i=a(n(100)),o=a(n(182));function a(e){return e&&e.__esModule?e:{default:e}}var s={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},l={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"}},function(e,t,n){"use strict";var r=n(0),i=n(310);if("undefined"===typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;e.exports=i(r.Component,r.isValidElement,o)},function(e,t,n){"use strict";var r=n(133);t.a=r.a("NativeAnimatedTurboModule")},function(e,t,n){"use strict";var r=n(133);t.a=r.a("NativeAnimatedModule")},function(e,t,n){"use strict";(function(e){var r=n(91),i=n(15);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(t){var n,r;function a(e){var n,r,o,a;return(a=t.call(this)||this)._deceleration=null!==(n=e.deceleration)&&void 0!==n?n:.998,a._velocity=e.velocity,a._useNativeDriver=Object(i.c)(e),a.__isInteraction=null!==(r=e.isInteraction)&&void 0!==r?r:!a._useNativeDriver,a.__iterations=null!==(o=e.iterations)&&void 0!==o?o:1,a}r=t,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,o(n,r);var s=a.prototype;return s.__getNativeAnimationConfig=function(){return{type:"decay",deceleration:this._deceleration,velocity:this._velocity,iterations:this.__iterations}},s.start=function(e,t,n,r,i){this.__active=!0,this._lastValue=e,this._fromValue=e,this._onUpdate=t,this.__onEnd=n,this._startTime=Date.now(),this._useNativeDriver?this.__startNativeAnimation(i):this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))},s.onUpdate=function(){var e=Date.now(),t=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(e-this._startTime)));this._onUpdate(t),Math.abs(this._lastValue-t)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=t,this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))))},s.stop=function(){t.prototype.stop.call(this),this.__active=!1,e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},a}(r.a);t.a=a}).call(this,n(46))},function(e,t,n){"use strict";(function(e){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=function(){this.any_blank_count=0,this.any_blank_ms=0,this.any_blank_speed_sum=0,this.mostly_blank_count=0,this.mostly_blank_ms=0,this.pixels_blank=0,this.pixels_sampled=0,this.pixels_scrolled=0,this.total_time_spent=0,this.sample_count=0},a=[],s=10,l=null,c=function(){function t(e){this._anyBlankStartTime=null,this._enabled=!1,this._info=new o,this._mostlyBlankStartTime=null,this._samplesStartTime=null,this._getFrameMetrics=e,this._enabled=(l||0)>Math.random(),this._resetData()}t.addListener=function(e){return null===l&&console.warn("Call `FillRateHelper.setSampleRate` before `addListener`."),a.push(e),{remove:function(){a=a.filter((function(t){return e!==t}))}}},t.setSampleRate=function(e){l=e},t.setMinSampleCount=function(e){s=e};var n=t.prototype;return n.activate=function(){this._enabled&&null==this._samplesStartTime&&(this._samplesStartTime=e.performance.now())},n.deactivateAndFlush=function(){if(this._enabled){var t=this._samplesStartTime;if(null!=t)if(this._info.sample_count<s)this._resetData();else{var n=e.performance.now()-t,i=r(r({},this._info),{},{total_time_spent:n});a.forEach((function(e){return e(i)})),this._resetData()}}},n.computeBlankness=function(t,n,r){if(!this._enabled||0===t.getItemCount(t.data)||null==this._samplesStartTime)return 0;var i=r.dOffset,o=r.offset,a=r.velocity,s=r.visibleLength;this._info.sample_count++,this._info.pixels_sampled+=Math.round(s),this._info.pixels_scrolled+=Math.round(Math.abs(i));var l=Math.round(1e3*Math.abs(a)),c=e.performance.now();null!=this._anyBlankStartTime&&(this._info.any_blank_ms+=c-this._anyBlankStartTime),this._anyBlankStartTime=null,null!=this._mostlyBlankStartTime&&(this._info.mostly_blank_ms+=c-this._mostlyBlankStartTime),this._mostlyBlankStartTime=null;for(var u=0,h=n.first,d=this._getFrameMetrics(h);h<=n.last&&(!d||!d.inLayout);)d=this._getFrameMetrics(h),h++;d&&h>0&&(u=Math.min(s,Math.max(0,d.offset-o)));for(var f=0,p=n.last,m=this._getFrameMetrics(p);p>=n.first&&(!m||!m.inLayout);)m=this._getFrameMetrics(p),p--;if(m&&p<t.getItemCount(t.data)-1){var g=m.offset+m.length;f=Math.min(s,Math.max(0,o+s-g))}var v=Math.round(u+f),y=v/s;return y>0?(this._anyBlankStartTime=c,this._info.any_blank_speed_sum+=l,this._info.any_blank_count++,this._info.pixels_blank+=v,y>.5&&(this._mostlyBlankStartTime=c,this._info.mostly_blank_count++)):(l<.01||Math.abs(i)<1)&&this.deactivateAndFlush(),y},n.enabled=function(){return this._enabled},n._resetData=function(){this._anyBlankStartTime=null,this._info=new o,this._mostlyBlankStartTime=null,this._samplesStartTime=null},t}();t.a=c}).call(this,n(46))},function(e,t,n){e.exports=function(e){"uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId);void 0===e.multigraph&&(e.multigraph=!1);if("function"!==typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t=new Map,n=[],c={},u=0,h=e.multigraph?function(e,t,n){var r=l(e,t),i=c.hasOwnProperty(r);if(i||M(e,t)){i||(c[r]=0);var o="@"+ ++c[r];r=l(e+o,t+o)}return new s(e,t,n,r)}:function(e,t,n){var r=l(e,t);return new s(e,t,n,r)},d=[],f=T,p=T,m=T,g=T,v={addNode:w,addLink:function(e,t,r){m();var i=x(e)||w(e),o=x(t)||w(t),s=h(e,t,r);n.push(s),a(i,s),e!==t&&a(o,s);return f(s,"add"),g(),s},removeLink:S,removeNode:_,getNode:x,getNodeCount:E,getLinkCount:A,getLinksCount:A,getNodesCount:E,getLinks:function(e){var t=x(e);return t?t.links:null},forEachNode:R,forEachLinkedNode:function(e,n,r){var i=x(e);if(i&&i.links&&"function"===typeof n)return r?function(e,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(o.fromId===n&&r(t.get(o.toId),o))return!0}}(i.links,e,n):function(e,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=o.fromId===n?o.toId:o.fromId;if(r(t.get(a),o))return!0}}(i.links,e,n)},forEachLink:function(e){var t,r;if("function"===typeof e)for(t=0,r=n.length;t<r;++t)e(n[t])},beginUpdate:m,endUpdate:g,clear:function(){m(),R((function(e){_(e.id)})),g()},hasLink:M,hasNode:x,getLink:M};return r(v),function(){var e=v.on;v.on=function(){return v.beginUpdate=m=C,v.endUpdate=g=O,f=y,p=b,v.on=e,e.apply(v,arguments)}}(),v;function y(e,t){d.push({link:e,changeType:t})}function b(e,t){d.push({node:e,changeType:t})}function w(e,n){if(void 0===e)throw new Error("Invalid node identifier");m();var r=x(e);return r?(r.data=n,p(r,"update")):(r=new o(e,n),p(r,"add")),t.set(e,r),g(),r}function x(e){return t.get(e)}function _(e){var n=x(e);if(!n)return!1;m();var r=n.links;if(r){n.links=null;for(var i=0;i<r.length;++i)S(r[i])}return t.delete(e),p(n,"remove"),g(),!0}function E(){return t.size}function A(){return n.length}function S(e){if(!e)return!1;var t=i(e,n);if(t<0)return!1;m(),n.splice(t,1);var r=x(e.fromId),o=x(e.toId);return r&&(t=i(e,r.links))>=0&&r.links.splice(t,1),o&&(t=i(e,o.links))>=0&&o.links.splice(t,1),f(e,"remove"),g(),!0}function M(e,t){var n,r=x(e);if(!r||!r.links)return null;for(n=0;n<r.links.length;++n){var i=r.links[n];if(i.fromId===e&&i.toId===t)return i}return null}function T(){}function C(){u+=1}function O(){0===(u-=1)&&d.length>0&&(v.fire("changed",d),d.length=0)}function R(e){if("function"!==typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var n=t.values(),r=n.next();!r.done;){if(e(r.value))return!0;r=n.next()}}};var r=n(153);function i(e,t){if(!t)return-1;if(t.indexOf)return t.indexOf(e);var n,r=t.length;for(n=0;n<r;n+=1)if(t[n]===e)return n;return-1}function o(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.push(t):e.links=[t]}function s(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function l(e,t){return e.toString()+"\ud83d\udc49 "+t.toString()}},function(e,t,n){e.exports=function(e,t){if(!e)throw new Error("Graph structure cannot be undefined");var o=(t&&t.createSimulator||n(184))(t);if(Array.isArray(t))throw new Error("Physics settings is expected to be an object");var a=function(t){var n=e.getLinks(t);return n?1+n.length/3:1};t&&"function"===typeof t.nodeMass&&(a=t.nodeMass);var s=new Map,l={},c=0,u=o.settings.springTransform||i;c=0,e.forEachNode((function(e){g(e.id),c+=1})),e.forEachLink(y),e.on("changed",m);var h=!1,d={step:function(){if(0===c)return f(!0),!0;var e=o.step();d.lastMove=e,d.fire("step");var t=e/c<=.01;return f(t),t},getNodePosition:function(e){return x(e).pos},setNodePosition:function(e){var t=x(e);t.setPosition.apply(t,Array.prototype.slice.call(arguments,1))},getLinkPosition:function(e){var t=l[e];if(t)return{from:t.from.pos,to:t.to.pos}},getGraphRect:function(){return o.getBBox()},forEachBody:p,pinNode:function(e,t){x(e.id).isPinned=!!t},isNodePinned:function(e){return x(e.id).isPinned},dispose:function(){e.off("changed",m),d.fire("disposed")},getBody:function(e){return s.get(e)},getSpring:function(t,n){var r;if(void 0===n)r="object"!==typeof t?t:t.id;else{var i=e.hasLink(t,n);if(!i)return;r=i.id}return l[r]},getForceVectorLength:function(){var e=0,t=0;return p((function(n){e+=Math.abs(n.force.x),t+=Math.abs(n.force.y)})),Math.sqrt(e*e+t*t)},simulator:o,graph:e,lastMove:0};return r(d),d;function f(e){var t;h!==e&&(h=e,t=e,d.fire("stable",t))}function p(e){s.forEach(e)}function m(t){for(var n=0;n<t.length;++n){var r=t[n];"add"===r.changeType?(r.node&&g(r.node.id),r.link&&y(r.link)):"remove"===r.changeType&&(r.node&&v(r.node),r.link&&b(r.link))}c=e.getNodesCount()}function g(t){var n=s.get(t);if(!n){var r=e.getNode(t);if(!r)throw new Error("initBody() was called with unknown node id");var i=r.position;if(!i){var a=function(e){var t=[];if(!e.links)return t;for(var n=Math.min(e.links.length,2),r=0;r<n;++r){var i=e.links[r],o=i.fromId!==e.id?s.get(i.fromId):s.get(i.toId);o&&o.pos&&t.push(o)}return t}(r);i=o.getBestNewBodyPosition(a)}(n=o.addBodyAt(i)).id=t,s.set(t,n),w(t),function(e){return e&&(e.isPinned||e.data&&e.data.isPinned)}(r)&&(n.isPinned=!0)}}function v(e){var t=e.id,n=s.get(t);n&&(s.delete(t),o.removeBody(n))}function y(e){w(e.fromId),w(e.toId);var t=s.get(e.fromId),n=s.get(e.toId),r=o.addSpring(t,n,e.length);u(e,r),l[e.id]=r}function b(t){var n=l[t.id];if(n){var r=e.getNode(t.fromId),i=e.getNode(t.toId);r&&w(r.id),i&&w(i.id),delete l[t.id],o.removeSpring(n)}}function w(e){var t=s.get(e);if(t.mass=a(e),Number.isNaN(t.mass))throw new Error("Node mass should be a number")}function x(e){var t=s.get(e);return t||(g(e),t=s.get(e)),t}},e.exports.simulator=n(184);var r=n(153);function i(){}},function(e,t){function n(e,t,n){var r,i,o,a,s;function l(){var c=Date.now()-a;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(o,i),o=i=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}n.debounce=n,e.exports=n},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return g}));var r,i,o=0,a=0,s=0,l=0,c=0,u=0,h="object"===typeof performance&&performance.now?performance:Date,d="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function f(){return c||(d(p),c=h.now()+u)}function p(){c=0}function m(){this._call=this._time=this._next=null}function g(e,t,n){var r=new m;return r.restart(e,t,n),r}function v(){c=(l=h.now())+u,o=a=0;try{!function(){f(),++o;for(var e,t=r;t;)(e=c-t._time)>=0&&t._call.call(void 0,e),t=t._next;--o}()}finally{o=0,function(){var e,t,n=r,o=1/0;for(;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:r=t);i=e,b(o)}(),c=0}}function y(){var e=h.now(),t=e-l;t>1e3&&(u-=t,l=e)}function b(e){o||(a&&(a=clearTimeout(a)),e-c>24?(e<1/0&&(a=setTimeout(v,e-h.now()-u)),s&&(s=clearInterval(s))):(s||(l=h.now(),s=setInterval(y,1e3)),o=1,d(v)))}m.prototype=g.prototype={constructor:m,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?f():+n)+(null==t?0:+t),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=e,this._time=n,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,c=s||l||Function("return this")(),u=Object.prototype.toString,h=Math.max,d=Math.min,f=function(){return c.Date.now()};function p(e,t,n){var r,i,o,a,s,l,c=0,u=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){return c=e,s=setTimeout(x,t),u?y(e):a}function w(e){var n=e-l;return void 0===l||n>=t||n<0||p&&e-c>=o}function x(){var e=f();if(w(e))return _(e);s=setTimeout(x,function(e){var n=t-(e-l);return p?d(n,o-(e-c)):n}(e))}function _(e){return s=void 0,v&&r?y(e):(r=i=void 0,a)}function E(){var e=f(),n=w(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return b(l);if(p)return s=setTimeout(x,t),y(l)}return void 0===s&&(s=setTimeout(x,t)),a}return t=g(t)||0,m(n)&&(u=!!n.leading,o=(p="maxWait"in n)?h(g(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},E.flush=function(){return void 0===s?a:_(f())},E}function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return m(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),p(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(46))},function(t,n,r){"use strict";var i=r(2);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=s(t);if(n){var i=s(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m="undefined"!==typeof window&&window.THREE?window.THREE:{LinearFilter:i.q,Sprite:i.I,SpriteMaterial:i.J,Texture:i.L},g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,n,r,i=u(s);function s(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgba(255, 255, 255, 1)";return o(this,s),(e=i.call(this,new m.SpriteMaterial({map:new m.Texture})))._text="".concat(t),e._textHeight=n,e._color=r,e._backgroundColor=!1,e._padding=0,e._borderWidth=0,e._borderRadius=0,e._borderColor="white",e._strokeWidth=0,e._strokeColor="white",e._fontFace="Arial",e._fontSize=90,e._fontWeight="normal",e._canvas=document.createElement("canvas"),e._texture=e.material.map,e._texture.minFilter=m.LinearFilter,e._genCanvas(),e}return t=s,(n=[{key:"text",get:function(){return this._text},set:function(e){this._text=e,this._genCanvas()}},{key:"textHeight",get:function(){return this._textHeight},set:function(e){this._textHeight=e,this._genCanvas()}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this._genCanvas()}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._genCanvas()}},{key:"padding",get:function(){return this._padding},set:function(e){this._padding=e,this._genCanvas()}},{key:"borderWidth",get:function(){return this._borderWidth},set:function(e){this._borderWidth=e,this._genCanvas()}},{key:"borderRadius",get:function(){return this._borderRadius},set:function(e){this._borderRadius=e,this._genCanvas()}},{key:"borderColor",get:function(){return this._borderColor},set:function(e){this._borderColor=e,this._genCanvas()}},{key:"fontFace",get:function(){return this._fontFace},set:function(e){this._fontFace=e,this._genCanvas()}},{key:"fontSize",get:function(){return this._fontSize},set:function(e){this._fontSize=e,this._genCanvas()}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(e){this._fontWeight=e,this._genCanvas()}},{key:"strokeWidth",get:function(){return this._strokeWidth},set:function(e){this._strokeWidth=e,this._genCanvas()}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(e){this._strokeColor=e,this._genCanvas()}},{key:"_genCanvas",value:function(){var e=this,t=this._canvas,n=t.getContext("2d"),r=Array.isArray(this.borderWidth)?this.borderWidth:[this.borderWidth,this.borderWidth],i=r.map((function(t){return t*e.fontSize*.1})),o=(Array.isArray(this.borderRadius)?this.borderRadius:[this.borderRadius,this.borderRadius,this.borderRadius,this.borderRadius]).map((function(t){return t*e.fontSize*.1})),a=Array.isArray(this.padding)?this.padding:[this.padding,this.padding],s=a.map((function(t){return t*e.fontSize*.1})),l=this.text.split("\n"),c="".concat(this.fontWeight," ").concat(this.fontSize,"px ").concat(this.fontFace);n.font=c;var u=Math.max.apply(Math,d(l.map((function(e){return n.measureText(e).width})))),f=this.fontSize*l.length;if(t.width=u+2*i[0]+2*s[0],t.height=f+2*i[1]+2*s[1],this.borderWidth){if(n.strokeStyle=this.borderColor,i[0]){var p=i[0]/2;n.lineWidth=i[0],n.beginPath(),n.moveTo(p,o[0]),n.lineTo(p,t.height-o[3]),n.moveTo(t.width-p,o[1]),n.lineTo(t.width-p,t.height-o[2]),n.stroke()}if(i[1]){var m=i[1]/2;n.lineWidth=i[1],n.beginPath(),n.moveTo(Math.max(i[0],o[0]),m),n.lineTo(t.width-Math.max(i[0],o[1]),m),n.moveTo(Math.max(i[0],o[3]),t.height-m),n.lineTo(t.width-Math.max(i[0],o[2]),t.height-m),n.stroke()}if(this.borderRadius){var g=Math.max.apply(Math,d(i)),v=g/2;n.lineWidth=g,n.beginPath(),[!!o[0]&&[o[0],v,v,o[0]],!!o[1]&&[t.width-o[1],t.width-v,v,o[1]],!!o[2]&&[t.width-o[2],t.width-v,t.height-v,t.height-o[2]],!!o[3]&&[o[3],v,t.height-v,t.height-o[3]]].filter((function(e){return e})).forEach((function(e){var t=h(e,4),r=t[0],i=t[1],o=t[2],a=t[3];n.moveTo(r,o),n.quadraticCurveTo(i,o,i,a)})),n.stroke()}}this.backgroundColor&&(n.fillStyle=this.backgroundColor,this.borderRadius?(n.beginPath(),n.moveTo(i[0],o[0]),[[i[0],o[0],t.width-o[1],i[1],i[1],i[1]],[t.width-i[0],t.width-i[0],t.width-i[0],i[1],o[1],t.height-o[2]],[t.width-i[0],t.width-o[2],o[3],t.height-i[1],t.height-i[1],t.height-i[1]],[i[0],i[0],i[0],t.height-i[1],t.height-o[3],o[0]]].forEach((function(e){var t=h(e,6),r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5];n.quadraticCurveTo(r,a,i,s),n.lineTo(o,l)})),n.closePath(),n.fill()):n.fillRect(i[0],i[1],t.width-2*i[0],t.height-2*i[1])),n.translate.apply(n,d(i)),n.translate.apply(n,d(s)),n.font=c,n.fillStyle=this.color,n.textBaseline="bottom";var y=this.strokeWidth>0;y&&(n.lineWidth=this.strokeWidth*this.fontSize/10,n.strokeStyle=this.strokeColor),l.forEach((function(t,r){var i=(u-n.measureText(t).width)/2,o=(r+1)*e.fontSize;y&&n.strokeText(t,i,o),n.fillText(t,i,o)})),this._texture.image=t,this._texture.needsUpdate=!0;var b=this.textHeight*l.length+2*r[1]+2*a[1];this.scale.set(b*t.width/t.height,b,0)}},{key:"clone",value:function(){return new this.constructor(this.text,this.textHeight,this.color).copy(this)}},{key:"copy",value:function(e){return m.Sprite.prototype.copy.call(this,e),this.color=e.color,this.backgroundColor=e.backgroundColor,this.padding=e.padding,this.borderWidth=e.borderWidth,this.borderColor=e.borderColor,this.fontFace=e.fontFace,this.fontSize=e.fontSize,this.fontWeight=e.fontWeight,this.strokeWidth=e.strokeWidth,this.strokeColor=e.strokeColor,this}}])&&a(t.prototype,n),r&&a(t,r),s}(m.Sprite);n.a=g},function(e,t,n){"use strict";e.exports=function(e,t,n){if("function"===typeof Array.prototype.findIndex)return e.findIndex(t,n);if("function"!==typeof t)throw new TypeError("predicate must be a function");var r=Object(e),i=r.length;if(0===i)return-1;for(var o=0;o<i;o++)if(t.call(n,r[o],o,r))return o;return-1}},function(e,t){var n=Object.prototype.toString,r=Array.isArray;e.exports=function(e){return"string"==typeof e||!r(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==n.call(e)}},function(t,n,r){(function(n){var r=/^\[object .+?Constructor\]$/,i=/^(?:0|[1-9]\d*)$/,o="object"==typeof n&&n&&n.Object===Object&&n,a="object"==typeof self&&self&&self.Object===Object&&self,s=o||a||Function("return this")();function l(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function c(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!==t)return function(e,t,n,r){var i=e.length,o=n+(r?1:-1);for(;r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,f,n);var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function u(e,t,n){for(var r=-1,i=e?e.length:0;++r<i;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function d(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function f(e){return e!==e}function p(e,t){return e.has(t)}function m(e,t){return function(n){return e(t(n))}}var g=Array.prototype,v=Function.prototype,y=Object.prototype,b=s["__core-js_shared__"],w=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),x=v.toString,_=y.hasOwnProperty,E=y.toString,A=RegExp("^"+x.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=s.Symbol,M=m(Object.getPrototypeOf,Object),T=y.propertyIsEnumerable,C=g.splice,O=S?S.isConcatSpreadable:void 0,R=Object.getOwnPropertySymbols,k=Math.max,P=G(s,"Map"),L=G(Object,"create");function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function I(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.__data__=new N;++t<n;)this.add(e[t])}function B(e,t){var n=J(e)||Z(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var o in e)!t&&!_.call(e,o)||i&&("length"==o||Y(o,r))||n.push(o);return n}function F(e,t){for(var n=e.length;n--;)if(Q(e[n][0],t))return n;return-1}function z(t){return!(!te(t)||(n=t,w&&w in n))&&(ee(t)||function(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(e){}return n}(t)?A:r).test(function(t){if(null!=t){try{return x.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var n}function H(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||y;return e===n}(e),n=[];for(var r in e)("constructor"!=r||!t&&_.call(e,r))&&n.push(r);return n}function U(e){return function(e,t,n){var r=t(e);return J(e)?r:d(r,n(e))}(e,re,q)}function V(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return z(n)?n:void 0}D.prototype.clear=function(){this.__data__=L?L(null):{}},D.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},D.prototype.get=function(e){var t=this.__data__;if(L){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _.call(t,e)?t[e]:void 0},D.prototype.has=function(e){var t=this.__data__;return L?void 0!==t[e]:_.call(t,e)},D.prototype.set=function(e,t){return this.__data__[e]=L&&void 0===t?"__lodash_hash_undefined__":t,this},I.prototype.clear=function(){this.__data__=[]},I.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),!0)},I.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},I.prototype.has=function(e){return F(this.__data__,e)>-1},I.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},N.prototype.clear=function(){this.__data__={hash:new D,map:new(P||I),string:new D}},N.prototype.delete=function(e){return V(this,e).delete(e)},N.prototype.get=function(e){return V(this,e).get(e)},N.prototype.has=function(e){return V(this,e).has(e)},N.prototype.set=function(e,t){return V(this,e).set(e,t),this},j.prototype.add=j.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},j.prototype.has=function(e){return this.__data__.has(e)};var W=R?m(R,Object):se,q=R?function(e){for(var t=[];e;)d(t,W(e)),e=M(e);return t}:se;function X(e){return J(e)||Z(e)||!!(O&&e&&e[O])}function Y(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}function K(e){if("string"==typeof e||function(e){return"symbol"==typeof e||ne(e)&&"[object Symbol]"==E.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Q(e,t){return e===t||e!==e&&t!==t}function Z(e){return function(e){return ne(e)&&$(e)}(e)&&_.call(e,"callee")&&(!T.call(e,"callee")||"[object Arguments]"==E.call(e))}var J=Array.isArray;function $(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!ee(e)}function ee(e){var t=te(e)?E.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function te(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ne(e){return!!e&&"object"==typeof e}function re(e){return $(e)?B(e,!0):H(e)}var ie,oe,ae=(ie=function(e,t){return null==e?{}:(t=h(function e(t,n,r,i,o){var a=-1,s=t.length;for(r||(r=X),o||(o=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,i,o):d(o,l):i||(o[o.length]=l)}return o}(t,1),K),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=e[a];n(s,a)&&(o[a]=s)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var i,o=-1,a=c,s=!0,l=e.length,d=[],f=t.length;if(!l)return d;n&&(t=h(t,(i=n,function(e){return i(e)}))),r?(a=u,s=!1):t.length>=200&&(a=p,s=!1,t=new j(t));e:for(;++o<l;){var m=e[o],g=n?n(m):m;if(m=r||0!==m?m:0,s&&g===g){for(var v=f;v--;)if(t[v]===g)continue e;d.push(m)}else a(t,g,r)||d.push(m)}return d}(U(e),t)))},oe=k(void 0===oe?ie.length-1:oe,0),function(){for(var e=arguments,t=-1,n=k(e.length-oe,0),r=Array(n);++t<n;)r[t]=e[oe+t];t=-1;for(var i=Array(oe+1);++t<oe;)i[t]=e[t];return i[oe]=r,l(ie,this,i)});function se(){return[]}t.exports=ae}).call(this,r(46))},function(t,n,r){"use strict";r.d(n,"a",(function(){return p}));var i=r(21),o=r.n(i),a=r(24),s=r.n(a),l=r(25),c=r.n(l),u=r(18),h=r.n(u),d=r(256);function f(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=h()(t);if(n){var i=h()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c()(this,e)}}var p=function(e){s()(n,e);var t=f(n);function n(e,r){var i;return o()(this,n),(i=t.call(this,r)).code=e,i}return n}(r.n(d)()(Error))},function(e,t,n){var r=n(18),i=n(154),o=n(371),a=n(372);function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){!function(){function t(e,t){document.addEventListener?e.addEventListener("scroll",t,!1):e.attachEvent("scroll",t)}function n(e){this.a=document.createElement("div"),this.a.setAttribute("aria-hidden","true"),this.a.appendChild(document.createTextNode(e)),this.b=document.createElement("span"),this.c=document.createElement("span"),this.h=document.createElement("span"),this.f=document.createElement("span"),this.g=-1,this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.b.appendChild(this.h),this.c.appendChild(this.f),this.a.appendChild(this.b),this.a.appendChild(this.c)}function r(e,t){e.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+t+";"}function i(e){var t=e.a.offsetWidth,n=t+100;return e.f.style.width=n+"px",e.c.scrollLeft=n,e.b.scrollLeft=e.b.scrollWidth+100,e.g!==t&&(e.g=t,!0)}function o(e,n){function r(){var e=o;i(e)&&e.a.parentNode&&n(e.g)}var o=e;t(e.b,r),t(e.c,r),i(e)}function a(e,t){var n=t||{};this.family=e,this.style=n.style||"normal",this.weight=n.weight||"normal",this.stretch=n.stretch||"normal"}var s=null,l=null,c=null,u=null;function h(){return null===u&&(u=!!document.fonts),u}function d(){if(null===c){var e=document.createElement("div");try{e.style.font="condensed 100px sans-serif"}catch(t){}c=""!==e.style.font}return c}function f(e,t){return[e.style,e.weight,d()?e.stretch:"","100px",t].join(" ")}a.prototype.load=function(e,t){var i=this,a=e||"BESbswy",c=0,u=t||3e3,d=(new Date).getTime();return new Promise((function(e,t){if(h()&&!function(){if(null===l)if(h()&&/Apple/.test(window.navigator.vendor)){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);l=!!e&&603>parseInt(e[1],10)}else l=!1;return l}()){var p=new Promise((function(e,t){!function n(){(new Date).getTime()-d>=u?t(Error(u+"ms timeout exceeded")):document.fonts.load(f(i,'"'+i.family+'"'),a).then((function(t){1<=t.length?e():setTimeout(n,25)}),t)}()})),m=new Promise((function(e,t){c=setTimeout((function(){t(Error(u+"ms timeout exceeded"))}),u)}));Promise.race([m,p]).then((function(){clearTimeout(c),e(i)}),t)}else!function(e){document.body?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t),e()})):document.attachEvent("onreadystatechange",(function t(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",t),e())}))}((function(){function l(){var t;(t=-1!=g&&-1!=v||-1!=g&&-1!=y||-1!=v&&-1!=y)&&((t=g!=v&&g!=y&&v!=y)||(null===s&&(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),s=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))),t=s&&(g==b&&v==b&&y==b||g==w&&v==w&&y==w||g==x&&v==x&&y==x)),t=!t),t&&(_.parentNode&&_.parentNode.removeChild(_),clearTimeout(c),e(i))}var h=new n(a),p=new n(a),m=new n(a),g=-1,v=-1,y=-1,b=-1,w=-1,x=-1,_=document.createElement("div");_.dir="ltr",r(h,f(i,"sans-serif")),r(p,f(i,"serif")),r(m,f(i,"monospace")),_.appendChild(h.a),_.appendChild(p.a),_.appendChild(m.a),document.body.appendChild(_),b=h.a.offsetWidth,w=p.a.offsetWidth,x=m.a.offsetWidth,function e(){if((new Date).getTime()-d>=u)_.parentNode&&_.parentNode.removeChild(_),t(Error(u+"ms timeout exceeded"));else{var n=document.hidden;!0!==n&&void 0!==n||(g=h.a.offsetWidth,v=p.a.offsetWidth,y=m.a.offsetWidth,l()),c=setTimeout(e,50)}}(),o(h,(function(e){g=e,l()})),r(h,f(i,'"'+i.family+'",sans-serif')),o(p,(function(e){v=e,l()})),r(p,f(i,'"'+i.family+'",serif')),o(m,(function(e){y=e,l()})),r(m,f(i,'"'+i.family+'",monospace'))}))}))},e.exports=a}()},function(e){e.exports=JSON.parse('{"ab-testing":983497,"abjad-arabic":987944,"abjad-hebrew":987945,"abugida-devanagari":987946,"abugida-thai":987947,"access-point":983043,"access-point-network":983042,"access-point-network-off":986081,"account":983044,"account-alert":983045,"account-alert-outline":985936,"account-arrow-left":985937,"account-arrow-left-outline":985938,"account-arrow-right":985939,"account-arrow-right-outline":985940,"account-box":983046,"account-box-multiple":985396,"account-box-multiple-outline":987146,"account-box-outline":983047,"account-cancel":987871,"account-cancel-outline":987872,"account-cash":987287,"account-cash-outline":987288,"account-check":983048,"account-check-outline":986082,"account-child":985737,"account-child-circle":985738,"account-child-outline":987336,"account-circle":983049,"account-circle-outline":985941,"account-clock":985942,"account-clock-outline":985943,"account-cog":988016,"account-cog-outline":988017,"account-convert":983050,"account-convert-outline":987905,"account-cowboy-hat":986779,"account-details":984625,"account-details-outline":988018,"account-edit":984764,"account-edit-outline":987131,"account-group":985161,"account-group-outline":985944,"account-hard-hat":984501,"account-heart":985241,"account-heart-outline":986083,"account-key":983051,"account-key-outline":986084,"account-lock":987486,"account-lock-outline":987487,"account-minus":983053,"account-minus-outline":985836,"account-multiple":983054,"account-multiple-check":985285,"account-multiple-check-outline":987646,"account-multiple-minus":984531,"account-multiple-minus-outline":986085,"account-multiple-outline":983055,"account-multiple-plus":983056,"account-multiple-plus-outline":985088,"account-multiple-remove":987658,"account-multiple-remove-outline":987659,"account-music":985091,"account-music-outline":986345,"account-network":983057,"account-network-outline":986086,"account-off":983058,"account-off-outline":986087,"account-outline":983059,"account-plus":983060,"account-plus-outline":985089,"account-question":985945,"account-question-outline":985946,"account-remove":983061,"account-remove-outline":985837,"account-search":983062,"account-search-outline":985397,"account-settings":984624,"account-settings-outline":987337,"account-star":983063,"account-star-outline":986088,"account-supervisor":985739,"account-supervisor-circle":985740,"account-supervisor-outline":987437,"account-switch":983065,"account-switch-outline":984267,"account-tie":986339,"account-tie-outline":987338,"account-tie-voice":987912,"account-tie-voice-off":987914,"account-tie-voice-off-outline":987915,"account-tie-voice-outline":987913,"account-voice":984523,"adjust":983066,"adobe":985398,"adobe-acrobat":987037,"air-conditioner":983067,"air-filter":986435,"air-horn":986540,"air-humidifier":987289,"air-humidifier-off":988262,"air-purifier":986436,"airbag":986089,"airballoon":983068,"airballoon-outline":987147,"airplane":983069,"airplane-landing":984532,"airplane-off":983070,"airplane-takeoff":984533,"airport":985163,"alarm":983072,"alarm-bell":984974,"alarm-check":983073,"alarm-light":984975,"alarm-light-outline":986090,"alarm-multiple":983074,"alarm-note":986737,"alarm-note-off":986738,"alarm-off":983075,"alarm-plus":983076,"alarm-snooze":984718,"album":983077,"alert":983078,"alert-box":983079,"alert-box-outline":986340,"alert-circle":983080,"alert-circle-check":987629,"alert-circle-check-outline":987630,"alert-circle-outline":984534,"alert-decagram":984765,"alert-decagram-outline":986341,"alert-minus":988347,"alert-minus-outline":988350,"alert-octagon":983081,"alert-octagon-outline":986342,"alert-octagram":984935,"alert-octagram-outline":986343,"alert-outline":983082,"alert-plus":988346,"alert-plus-outline":988349,"alert-remove":988348,"alert-remove-outline":988351,"alert-rhombus":987598,"alert-rhombus-outline":987599,"alien":985242,"alien-outline":987339,"align-horizontal-center":987587,"align-horizontal-left":987586,"align-horizontal-right":987588,"align-vertical-bottom":987589,"align-vertical-center":987590,"align-vertical-top":987591,"all-inclusive":984766,"allergy":987736,"alpha":983083,"alpha-a":985838,"alpha-a-box":985864,"alpha-a-box-outline":986091,"alpha-a-circle":986092,"alpha-a-circle-outline":986093,"alpha-b":985839,"alpha-b-box":985865,"alpha-b-box-outline":986094,"alpha-b-circle":986095,"alpha-b-circle-outline":986096,"alpha-c":985840,"alpha-c-box":985866,"alpha-c-box-outline":986097,"alpha-c-circle":986098,"alpha-c-circle-outline":986099,"alpha-d":985841,"alpha-d-box":985867,"alpha-d-box-outline":986100,"alpha-d-circle":986101,"alpha-d-circle-outline":986102,"alpha-e":985842,"alpha-e-box":985868,"alpha-e-box-outline":986103,"alpha-e-circle":986104,"alpha-e-circle-outline":986105,"alpha-f":985843,"alpha-f-box":985869,"alpha-f-box-outline":986106,"alpha-f-circle":986107,"alpha-f-circle-outline":986108,"alpha-g":985844,"alpha-g-box":985870,"alpha-g-box-outline":986109,"alpha-g-circle":986110,"alpha-g-circle-outline":986111,"alpha-h":985845,"alpha-h-box":985871,"alpha-h-box-outline":986112,"alpha-h-circle":986113,"alpha-h-circle-outline":986114,"alpha-i":985846,"alpha-i-box":985872,"alpha-i-box-outline":986115,"alpha-i-circle":986116,"alpha-i-circle-outline":986117,"alpha-j":985847,"alpha-j-box":985873,"alpha-j-box-outline":986118,"alpha-j-circle":986119,"alpha-j-circle-outline":986120,"alpha-k":985848,"alpha-k-box":985874,"alpha-k-box-outline":986121,"alpha-k-circle":986122,"alpha-k-circle-outline":986123,"alpha-l":985849,"alpha-l-box":985875,"alpha-l-box-outline":986124,"alpha-l-circle":986125,"alpha-l-circle-outline":986126,"alpha-m":985850,"alpha-m-box":985876,"alpha-m-box-outline":986127,"alpha-m-circle":986128,"alpha-m-circle-outline":986129,"alpha-n":985851,"alpha-n-box":985877,"alpha-n-box-outline":986130,"alpha-n-circle":986131,"alpha-n-circle-outline":986132,"alpha-o":985852,"alpha-o-box":985878,"alpha-o-box-outline":986133,"alpha-o-circle":986134,"alpha-o-circle-outline":986135,"alpha-p":985853,"alpha-p-box":985879,"alpha-p-box-outline":986136,"alpha-p-circle":986137,"alpha-p-circle-outline":986138,"alpha-q":985854,"alpha-q-box":985880,"alpha-q-box-outline":986139,"alpha-q-circle":986140,"alpha-q-circle-outline":986141,"alpha-r":985855,"alpha-r-box":985881,"alpha-r-box-outline":986142,"alpha-r-circle":986143,"alpha-r-circle-outline":986144,"alpha-s":985856,"alpha-s-box":985882,"alpha-s-box-outline":986145,"alpha-s-circle":986146,"alpha-s-circle-outline":986147,"alpha-t":985857,"alpha-t-box":985883,"alpha-t-box-outline":986148,"alpha-t-circle":986149,"alpha-t-circle-outline":986150,"alpha-u":985858,"alpha-u-box":985884,"alpha-u-box-outline":986151,"alpha-u-circle":986152,"alpha-u-circle-outline":986153,"alpha-v":985859,"alpha-v-box":985885,"alpha-v-box-outline":986154,"alpha-v-circle":986155,"alpha-v-circle-outline":986156,"alpha-w":985860,"alpha-w-box":985886,"alpha-w-box-outline":986157,"alpha-w-circle":986158,"alpha-w-circle-outline":986159,"alpha-x":985861,"alpha-x-box":985887,"alpha-x-box-outline":986160,"alpha-x-circle":986161,"alpha-x-circle-outline":986162,"alpha-y":985862,"alpha-y-box":985888,"alpha-y-box-outline":986163,"alpha-y-circle":986164,"alpha-y-circle-outline":986165,"alpha-z":985863,"alpha-z-box":985889,"alpha-z-box-outline":986166,"alpha-z-circle":986167,"alpha-z-circle-outline":986168,"alphabet-aurebesh":987948,"alphabet-cyrillic":987949,"alphabet-greek":987950,"alphabet-latin":987951,"alphabet-piqad":987952,"alphabet-tengwar":987959,"alphabetical":983084,"alphabetical-off":987148,"alphabetical-variant":987149,"alphabetical-variant-off":987150,"altimeter":984535,"amazon":983085,"amazon-alexa":985286,"ambulance":983087,"ammunition":986344,"ampersand":985741,"amplifier":983088,"amplifier-off":987573,"anchor":983089,"android":983090,"android-auto":985742,"android-debug-bridge":983091,"android-messages":986437,"android-studio":983092,"angle-acute":985399,"angle-obtuse":985400,"angle-right":985401,"angular":984754,"angularjs":984767,"animation":984536,"animation-outline":985743,"animation-play":985402,"animation-play-outline":985744,"ansible":987290,"antenna":987417,"anvil":985243,"apache-kafka":987151,"api":987291,"api-off":987735,"apple":983093,"apple-airplay":983071,"apple-finder":983094,"apple-icloud":983096,"apple-ios":983095,"apple-keyboard-caps":984626,"apple-keyboard-command":984627,"apple-keyboard-control":984628,"apple-keyboard-option":984629,"apple-keyboard-shift":984630,"apple-safari":983097,"application":984596,"application-export":986541,"application-import":986542,"approximately-equal":987038,"approximately-equal-box":987039,"apps":983099,"apps-box":986438,"arch":985287,"archive":983100,"archive-arrow-down":987737,"archive-arrow-down-outline":987738,"archive-arrow-up":987739,"archive-arrow-up-outline":987740,"archive-outline":987662,"arm-flex":987095,"arm-flex-outline":987094,"arrange-bring-forward":983101,"arrange-bring-to-front":983102,"arrange-send-backward":983103,"arrange-send-to-back":983104,"arrow-all":983105,"arrow-bottom-left":983106,"arrow-bottom-left-bold-outline":985527,"arrow-bottom-left-thick":985528,"arrow-bottom-right":983107,"arrow-bottom-right-bold-outline":985529,"arrow-bottom-right-thick":985530,"arrow-collapse":984597,"arrow-collapse-all":983108,"arrow-collapse-down":984978,"arrow-collapse-horizontal":985164,"arrow-collapse-left":984979,"arrow-collapse-right":984980,"arrow-collapse-up":984981,"arrow-collapse-vertical":985165,"arrow-decision":985531,"arrow-decision-auto":985532,"arrow-decision-auto-outline":985533,"arrow-decision-outline":985534,"arrow-down":983109,"arrow-down-bold":984878,"arrow-down-bold-box":984879,"arrow-down-bold-box-outline":984880,"arrow-down-bold-circle":983111,"arrow-down-bold-circle-outline":983112,"arrow-down-bold-hexagon-outline":983113,"arrow-down-bold-outline":985535,"arrow-down-box":984768,"arrow-down-circle":986331,"arrow-down-circle-outline":986332,"arrow-down-drop-circle":983114,"arrow-down-drop-circle-outline":983115,"arrow-down-thick":983110,"arrow-expand":984598,"arrow-expand-all":983116,"arrow-expand-down":984982,"arrow-expand-horizontal":985166,"arrow-expand-left":984983,"arrow-expand-right":984984,"arrow-expand-up":984985,"arrow-expand-vertical":985167,"arrow-horizontal-lock":987483,"arrow-left":983117,"arrow-left-bold":984881,"arrow-left-bold-box":984882,"arrow-left-bold-box-outline":984883,"arrow-left-bold-circle":983119,"arrow-left-bold-circle-outline":983120,"arrow-left-bold-hexagon-outline":983121,"arrow-left-bold-outline":985536,"arrow-left-box":984769,"arrow-left-circle":986333,"arrow-left-circle-outline":986334,"arrow-left-drop-circle":983122,"arrow-left-drop-circle-outline":983123,"arrow-left-right":986739,"arrow-left-right-bold":986740,"arrow-left-right-bold-outline":985537,"arrow-left-thick":983118,"arrow-right":983124,"arrow-right-bold":984884,"arrow-right-bold-box":984885,"arrow-right-bold-box-outline":984886,"arrow-right-bold-circle":983126,"arrow-right-bold-circle-outline":983127,"arrow-right-bold-hexagon-outline":983128,"arrow-right-bold-outline":985538,"arrow-right-box":984770,"arrow-right-circle":986335,"arrow-right-circle-outline":986336,"arrow-right-drop-circle":983129,"arrow-right-drop-circle-outline":983130,"arrow-right-thick":983125,"arrow-split-horizontal":985403,"arrow-split-vertical":985404,"arrow-top-left":983131,"arrow-top-left-bold-outline":985539,"arrow-top-left-bottom-right":986741,"arrow-top-left-bottom-right-bold":986742,"arrow-top-left-thick":985540,"arrow-top-right":983132,"arrow-top-right-bold-outline":985541,"arrow-top-right-bottom-left":986743,"arrow-top-right-bottom-left-bold":986744,"arrow-top-right-thick":985542,"arrow-up":983133,"arrow-up-bold":984887,"arrow-up-bold-box":984888,"arrow-up-bold-box-outline":984889,"arrow-up-bold-circle":983135,"arrow-up-bold-circle-outline":983136,"arrow-up-bold-hexagon-outline":983137,"arrow-up-bold-outline":985543,"arrow-up-box":984771,"arrow-up-circle":986337,"arrow-up-circle-outline":986338,"arrow-up-down":986745,"arrow-up-down-bold":986746,"arrow-up-down-bold-outline":985544,"arrow-up-drop-circle":983138,"arrow-up-drop-circle-outline":983139,"arrow-up-thick":983134,"arrow-vertical-lock":987484,"artstation":985947,"aspect-ratio":985636,"assistant":983140,"asterisk":984772,"at":983141,"atlassian":985092,"atm":986439,"atom":984936,"atom-variant":986747,"attachment":983142,"audio-video":985405,"audio-video-off":987574,"augmented-reality":985168,"auto-download":988030,"auto-fix":983144,"auto-upload":983145,"autorenew":983146,"av-timer":983147,"aws":986639,"axe":985288,"axis":986440,"axis-arrow":986441,"axis-arrow-info":988174,"axis-arrow-lock":986442,"axis-lock":986443,"axis-x-arrow":986444,"axis-x-arrow-lock":986445,"axis-x-rotate-clockwise":986446,"axis-x-rotate-counterclockwise":986447,"axis-x-y-arrow-lock":986448,"axis-y-arrow":986449,"axis-y-arrow-lock":986450,"axis-y-rotate-clockwise":986451,"axis-y-rotate-counterclockwise":986452,"axis-z-arrow":986453,"axis-z-arrow-lock":986454,"axis-z-rotate-clockwise":986455,"axis-z-rotate-counterclockwise":986456,"babel":985637,"baby":983148,"baby-bottle":986937,"baby-bottle-outline":986938,"baby-buggy":988128,"baby-carriage":984719,"baby-carriage-off":987040,"baby-face":986748,"baby-face-outline":986749,"backburger":983149,"backspace":983150,"backspace-outline":985948,"backspace-reverse":986750,"backspace-reverse-outline":986751,"backup-restore":983151,"bacteria":986837,"bacteria-outline":986838,"badge-account":986535,"badge-account-alert":986536,"badge-account-alert-outline":986537,"badge-account-horizontal":986637,"badge-account-horizontal-outline":986638,"badge-account-outline":986538,"badminton":985169,"bag-carry-on":986939,"bag-carry-on-check":986469,"bag-carry-on-off":986940,"bag-checked":986941,"bag-personal":986640,"bag-personal-off":986641,"bag-personal-off-outline":986642,"bag-personal-outline":986643,"baguette":986942,"balloon":985638,"ballot":985545,"ballot-outline":985546,"ballot-recount":986169,"ballot-recount-outline":986170,"bandage":986543,"bandcamp":984693,"bank":983152,"bank-minus":986544,"bank-outline":986752,"bank-plus":986545,"bank-remove":986546,"bank-transfer":985639,"bank-transfer-in":985640,"bank-transfer-out":985641,"barcode":983153,"barcode-off":987702,"barcode-scan":983154,"barley":983155,"barley-off":985949,"barn":985950,"barrel":983156,"baseball":985170,"baseball-bat":985171,"bash":987523,"basket":983158,"basket-fill":983159,"basket-outline":987521,"basket-unfill":983160,"basketball":985094,"basketball-hoop":986171,"basketball-hoop-outline":986172,"bat":985951,"battery":983161,"battery-10":983162,"battery-10-bluetooth":985406,"battery-20":983163,"battery-20-bluetooth":985407,"battery-30":983164,"battery-30-bluetooth":985408,"battery-40":983165,"battery-40-bluetooth":985409,"battery-50":983166,"battery-50-bluetooth":985410,"battery-60":983167,"battery-60-bluetooth":985411,"battery-70":983168,"battery-70-bluetooth":985412,"battery-80":983169,"battery-80-bluetooth":985413,"battery-90":983170,"battery-90-bluetooth":985414,"battery-alert":983171,"battery-alert-bluetooth":985415,"battery-alert-variant":987340,"battery-alert-variant-outline":987341,"battery-bluetooth":985416,"battery-bluetooth-variant":985417,"battery-charging":983172,"battery-charging-10":985244,"battery-charging-100":983173,"battery-charging-20":983174,"battery-charging-30":983175,"battery-charging-40":983176,"battery-charging-50":985245,"battery-charging-60":983177,"battery-charging-70":985246,"battery-charging-80":983178,"battery-charging-90":983179,"battery-charging-high":987814,"battery-charging-low":987812,"battery-charging-medium":987813,"battery-charging-outline":985247,"battery-charging-wireless":985095,"battery-charging-wireless-10":985096,"battery-charging-wireless-20":985097,"battery-charging-wireless-30":985098,"battery-charging-wireless-40":985099,"battery-charging-wireless-50":985100,"battery-charging-wireless-60":985101,"battery-charging-wireless-70":985102,"battery-charging-wireless-80":985103,"battery-charging-wireless-90":985104,"battery-charging-wireless-alert":985105,"battery-charging-wireless-outline":985106,"battery-heart":987663,"battery-heart-outline":987664,"battery-heart-variant":987665,"battery-high":987811,"battery-low":987809,"battery-medium":987810,"battery-minus":983180,"battery-negative":983181,"battery-off":987741,"battery-off-outline":987742,"battery-outline":983182,"battery-plus":983183,"battery-positive":983184,"battery-unknown":983185,"battery-unknown-bluetooth":985418,"battlenet":985952,"beach":983186,"beaker":986346,"beaker-alert":987689,"beaker-alert-outline":987690,"beaker-check":987691,"beaker-check-outline":987692,"beaker-minus":987693,"beaker-minus-outline":987694,"beaker-outline":984720,"beaker-plus":987695,"beaker-plus-outline":987696,"beaker-question":987697,"beaker-question-outline":987698,"beaker-remove":987699,"beaker-remove-outline":987700,"bed":983779,"bed-double":987092,"bed-double-outline":987091,"bed-empty":985248,"bed-king":987090,"bed-king-outline":987089,"bed-outline":983193,"bed-queen":987088,"bed-queen-outline":987099,"bed-single":987245,"bed-single-outline":987246,"bee":987041,"bee-flower":987042,"beehive-off-outline":988141,"beehive-outline":987342,"beer":983192,"beer-outline":987916,"bell":983194,"bell-alert":986457,"bell-alert-outline":986753,"bell-cancel":988135,"bell-cancel-outline":988136,"bell-check":987621,"bell-check-outline":987622,"bell-circle":986458,"bell-circle-outline":986459,"bell-minus":988137,"bell-minus-outline":988138,"bell-off":983195,"bell-off-outline":985745,"bell-outline":983196,"bell-plus":983197,"bell-plus-outline":985746,"bell-remove":988139,"bell-remove-outline":988140,"bell-ring":983198,"bell-ring-outline":983199,"bell-sleep":983200,"bell-sleep-outline":985747,"beta":983201,"betamax":985547,"biathlon":986644,"bicycle":987292,"bicycle-basket":987701,"bike":983203,"bike-fast":987423,"billboard":987152,"billiards":985953,"billiards-rack":985954,"binoculars":983205,"bio":983206,"biohazard":983207,"bitbucket":983208,"bitcoin":985107,"black-mesa":983209,"blender":986347,"blender-software":983211,"blinds":983212,"blinds-open":987153,"block-helper":983213,"blogger":983214,"blood-bag":986348,"bluetooth":983215,"bluetooth-audio":983216,"bluetooth-connect":983217,"bluetooth-off":983218,"bluetooth-settings":983219,"bluetooth-transfer":983220,"blur":983221,"blur-linear":983222,"blur-off":983223,"blur-radial":983224,"bolnisi-cross":986349,"bolt":986547,"bomb":984721,"bomb-off":984773,"bone":983225,"book":983226,"book-account":988077,"book-account-outline":988078,"book-alphabet":984605,"book-cross":983202,"book-information-variant":987247,"book-lock":984986,"book-lock-open":984987,"book-minus":984537,"book-minus-multiple":985748,"book-minus-multiple-outline":985355,"book-multiple":983227,"book-multiple-outline":984118,"book-music":983143,"book-open":983229,"book-open-outline":985955,"book-open-page-variant":984538,"book-open-variant":983230,"book-outline":985956,"book-play":986754,"book-play-outline":986755,"book-plus":984539,"book-plus-multiple":985749,"book-plus-multiple-outline":985822,"book-remove":985751,"book-remove-multiple":985750,"book-remove-multiple-outline":984266,"book-search":986756,"book-search-outline":986757,"book-variant":983231,"book-variant-multiple":983228,"bookmark":983232,"bookmark-check":983233,"bookmark-check-outline":988027,"bookmark-minus":985548,"bookmark-minus-outline":985549,"bookmark-multiple":986645,"bookmark-multiple-outline":986646,"bookmark-music":983234,"bookmark-music-outline":988025,"bookmark-off":985550,"bookmark-off-outline":985551,"bookmark-outline":983235,"bookmark-plus":983237,"bookmark-plus-outline":983236,"bookmark-remove":983238,"bookmark-remove-outline":988026,"bookshelf":987743,"boom-gate":986758,"boom-gate-alert":986759,"boom-gate-alert-outline":986760,"boom-gate-down":986761,"boom-gate-down-outline":986762,"boom-gate-outline":986763,"boom-gate-up":986764,"boom-gate-up-outline":986765,"boombox":984540,"boomerang":987343,"bootstrap":984774,"border-all":983239,"border-all-variant":985249,"border-bottom":983240,"border-bottom-variant":985250,"border-color":983241,"border-horizontal":983242,"border-inside":983243,"border-left":983244,"border-left-variant":985251,"border-none":983245,"border-none-variant":985252,"border-outside":983246,"border-right":983247,"border-right-variant":985253,"border-style":983248,"border-top":983249,"border-top-variant":985254,"border-vertical":983250,"bottle-soda":987248,"bottle-soda-classic":987249,"bottle-soda-classic-outline":988003,"bottle-soda-outline":987250,"bottle-tonic":987438,"bottle-tonic-outline":987439,"bottle-tonic-plus":987440,"bottle-tonic-plus-outline":987441,"bottle-tonic-skull":987442,"bottle-tonic-skull-outline":987443,"bottle-wine":985172,"bottle-wine-outline":987920,"bow-tie":984696,"bowl":983694,"bowl-mix":984599,"bowl-mix-outline":983780,"bowl-outline":983721,"bowling":983251,"box":983252,"box-cutter":983253,"box-cutter-off":985930,"box-shadow":984631,"boxing-glove":985957,"braille":985552,"brain":985553,"bread-slice":986350,"bread-slice-outline":986351,"bridge":984600,"briefcase":983254,"briefcase-account":986352,"briefcase-account-outline":986353,"briefcase-check":983255,"briefcase-check-outline":987934,"briefcase-clock":987344,"briefcase-clock-outline":987345,"briefcase-download":983256,"briefcase-download-outline":986173,"briefcase-edit":985752,"briefcase-edit-outline":986174,"briefcase-minus":985642,"briefcase-minus-outline":986175,"briefcase-outline":985108,"briefcase-plus":985643,"briefcase-plus-outline":986176,"briefcase-remove":985644,"briefcase-remove-outline":986177,"briefcase-search":985645,"briefcase-search-outline":986178,"briefcase-upload":983257,"briefcase-upload-outline":986179,"briefcase-variant":988308,"briefcase-variant-outline":988309,"brightness-1":983258,"brightness-2":983259,"brightness-3":983260,"brightness-4":983261,"brightness-5":983262,"brightness-6":983263,"brightness-7":983264,"brightness-auto":983265,"brightness-percent":986354,"broom":983266,"brush":983267,"bucket":988181,"bucket-outline":988182,"buddhism":985419,"buffer":984601,"buffet":984440,"bug":983268,"bug-check":985646,"bug-check-outline":985647,"bug-outline":985648,"bugle":986548,"bulldozer":985890,"bullet":986355,"bulletin-board":983269,"bullhorn":983270,"bullhorn-outline":985891,"bullseye":984541,"bullseye-arrow":985289,"bulma":987879,"bunk-bed":987906,"bunk-bed-outline":983191,"bus":983271,"bus-alert":985753,"bus-articulated-end":984988,"bus-articulated-front":984989,"bus-clock":985290,"bus-double-decker":984990,"bus-marker":987666,"bus-multiple":986943,"bus-school":984991,"bus-side":984992,"bus-stop":987154,"bus-stop-covered":987155,"bus-stop-uncovered":987156,"cable-data":988052,"cached":983272,"cactus":986549,"cake":983273,"cake-layered":983274,"cake-variant":983275,"calculator":983276,"calculator-variant":985754,"calendar":983277,"calendar-account":986839,"calendar-account-outline":986840,"calendar-alert":985649,"calendar-arrow-left":987444,"calendar-arrow-right":987445,"calendar-blank":983278,"calendar-blank-multiple":987251,"calendar-blank-outline":985958,"calendar-check":983279,"calendar-check-outline":986180,"calendar-clock":983280,"calendar-edit":985255,"calendar-export":985892,"calendar-heart":985554,"calendar-import":985893,"calendar-minus":986460,"calendar-month":986647,"calendar-month-outline":986648,"calendar-multiple":983281,"calendar-multiple-check":983282,"calendar-multiselect":985650,"calendar-outline":985959,"calendar-plus":983283,"calendar-question":984722,"calendar-range":984697,"calendar-range-outline":985960,"calendar-refresh":983521,"calendar-refresh-outline":983555,"calendar-remove":983284,"calendar-remove-outline":986181,"calendar-search":985420,"calendar-star":985555,"calendar-sync":986766,"calendar-sync-outline":986767,"calendar-text":983285,"calendar-text-outline":986182,"calendar-today":983286,"calendar-week":985651,"calendar-week-begin":985652,"calendar-weekend":986841,"calendar-weekend-outline":986842,"call-made":983287,"call-merge":983288,"call-missed":983289,"call-received":983290,"call-split":983291,"camcorder":983292,"camcorder-off":983295,"camera":983296,"camera-account":985291,"camera-burst":984723,"camera-control":985961,"camera-enhance":983297,"camera-enhance-outline":985962,"camera-front":983298,"camera-front-variant":983299,"camera-gopro":984993,"camera-image":985292,"camera-iris":983300,"camera-metering-center":984994,"camera-metering-matrix":984995,"camera-metering-partial":984996,"camera-metering-spot":984997,"camera-off":984543,"camera-outline":986461,"camera-party-mode":983301,"camera-plus":986843,"camera-plus-outline":986844,"camera-rear":983302,"camera-rear-variant":983303,"camera-retake":986649,"camera-retake-outline":986650,"camera-switch":983304,"camera-switch-outline":985162,"camera-timer":983305,"camera-wireless":986550,"camera-wireless-outline":986551,"campfire":986845,"cancel":984890,"candle":984546,"candycane":983306,"cannabis":984998,"caps-lock":985755,"car":983307,"car-2-plus":987157,"car-3-plus":987158,"car-arrow-left":988082,"car-arrow-right":988083,"car-back":986651,"car-battery":983308,"car-brake-abs":986183,"car-brake-alert":986184,"car-brake-hold":986462,"car-brake-parking":986463,"car-brake-retarder":987159,"car-child-seat":987043,"car-clutch":987160,"car-cog":988108,"car-connected":983309,"car-convertible":984999,"car-coolant-level":987161,"car-cruise-control":986464,"car-defrost-front":986465,"car-defrost-rear":986466,"car-door":985963,"car-door-lock":987293,"car-electric":985964,"car-esp":986185,"car-estate":985000,"car-hatchback":985001,"car-info":987582,"car-key":985965,"car-light-dimmed":986186,"car-light-fog":986187,"car-light-high":986188,"car-limousine":985293,"car-multiple":985966,"car-off":986652,"car-parking-lights":986467,"car-pickup":985002,"car-seat":987044,"car-seat-cooler":987045,"car-seat-heater":987046,"car-settings":988109,"car-shift-pattern":986944,"car-side":985003,"car-sports":985004,"car-tire-alert":986189,"car-traction-control":986468,"car-turbocharger":987162,"car-wash":983310,"car-windshield":987163,"car-windshield-outline":987164,"carabiner":988352,"caravan":985005,"card":985967,"card-account-details":984530,"card-account-details-outline":986539,"card-account-details-star":983715,"card-account-details-star-outline":984795,"card-account-mail":983438,"card-account-mail-outline":986776,"card-account-phone":986777,"card-account-phone-outline":986778,"card-bulleted":985968,"card-bulleted-off":985969,"card-bulleted-off-outline":985970,"card-bulleted-outline":985971,"card-bulleted-settings":985972,"card-bulleted-settings-outline":985973,"card-outline":985974,"card-plus":987647,"card-plus-outline":987648,"card-search":987252,"card-search-outline":987253,"card-text":985975,"card-text-outline":985976,"cards":984632,"cards-club":985294,"cards-diamond":985295,"cards-diamond-outline":987165,"cards-heart":985296,"cards-outline":984633,"cards-playing-outline":984634,"cards-spade":985297,"cards-variant":984775,"carrot":983311,"cart":983312,"cart-arrow-down":986470,"cart-arrow-right":986190,"cart-arrow-up":986471,"cart-minus":986472,"cart-off":984683,"cart-outline":983313,"cart-plus":983314,"cart-remove":986473,"case-sensitive-alt":983315,"cash":983316,"cash-100":983317,"cash-marker":986552,"cash-minus":987744,"cash-multiple":983318,"cash-plus":987745,"cash-refund":985756,"cash-register":986356,"cash-remove":987746,"cash-usd":987510,"cash-usd-outline":983319,"cassette":985556,"cast":983320,"cast-audio":987166,"cast-connected":983321,"cast-education":986653,"cast-off":984970,"castle":983322,"cat":983323,"cctv":985006,"ceiling-light":984937,"cellphone":983324,"cellphone-android":983325,"cellphone-arrow-down":985557,"cellphone-basic":983326,"cellphone-charging":988055,"cellphone-cog":985425,"cellphone-dock":983327,"cellphone-erase":985421,"cellphone-information":986945,"cellphone-iphone":983328,"cellphone-key":985422,"cellphone-link":983329,"cellphone-link-off":983330,"cellphone-lock":985423,"cellphone-message":985299,"cellphone-message-off":987346,"cellphone-nfc":986768,"cellphone-nfc-off":987864,"cellphone-off":985424,"cellphone-play":987167,"cellphone-screenshot":985653,"cellphone-settings":983331,"cellphone-sound":985426,"cellphone-text":985298,"cellphone-wireless":985109,"celtic-cross":986357,"centos":987418,"certificate":983332,"certificate-outline":987528,"chair-rolling":986952,"chair-school":983333,"charity":986191,"chart-arc":983334,"chart-areaspline":983335,"chart-areaspline-variant":986769,"chart-bar":983336,"chart-bar-stacked":984938,"chart-bell-curve":986192,"chart-bell-curve-cumulative":987047,"chart-bubble":984547,"chart-donut":985007,"chart-donut-variant":985008,"chart-gantt":984684,"chart-histogram":983337,"chart-line":983338,"chart-line-stacked":984939,"chart-line-variant":985009,"chart-multiline":985300,"chart-multiple":987667,"chart-pie":983339,"chart-ppf":988032,"chart-sankey":987615,"chart-sankey-variant":987616,"chart-scatter-plot":986770,"chart-scatter-plot-hexbin":984685,"chart-timeline":984686,"chart-timeline-variant":986771,"chart-tree":986772,"chat":985977,"chat-alert":985978,"chat-alert-outline":987849,"chat-minus":988176,"chat-minus-outline":988179,"chat-outline":986846,"chat-plus":988175,"chat-plus-outline":988178,"chat-processing":985979,"chat-processing-outline":987850,"chat-remove":988177,"chat-remove-outline":988180,"chat-sleep":987857,"chat-sleep-outline":987858,"check":983340,"check-all":983341,"check-bold":986654,"check-box-multiple-outline":986193,"check-box-outline":986194,"check-circle":984544,"check-circle-outline":984545,"check-decagram":984977,"check-network":986195,"check-network-outline":986196,"check-outline":985173,"check-underline":986655,"check-underline-circle":986656,"check-underline-circle-outline":986657,"checkbook":985757,"checkbox-blank":983342,"checkbox-blank-circle":983343,"checkbox-blank-circle-outline":983344,"checkbox-blank-off":987884,"checkbox-blank-off-outline":987885,"checkbox-blank-outline":983345,"checkbox-intermediate":985174,"checkbox-marked":983346,"checkbox-marked-circle":983347,"checkbox-marked-circle-outline":983348,"checkbox-marked-outline":983349,"checkbox-multiple-blank":983350,"checkbox-multiple-blank-circle":984635,"checkbox-multiple-blank-circle-outline":984636,"checkbox-multiple-blank-outline":983351,"checkbox-multiple-marked":983352,"checkbox-multiple-marked-circle":984637,"checkbox-multiple-marked-circle-outline":984638,"checkbox-multiple-marked-outline":983353,"checkerboard":983354,"checkerboard-minus":987650,"checkerboard-plus":987649,"checkerboard-remove":987651,"cheese":987833,"cheese-off":988142,"chef-hat":985980,"chemical-weapon":983355,"chess-bishop":985180,"chess-king":985175,"chess-knight":985176,"chess-pawn":985177,"chess-queen":985178,"chess-rook":985179,"chevron-double-down":983356,"chevron-double-left":983357,"chevron-double-right":983358,"chevron-double-up":983359,"chevron-down":983360,"chevron-down-box":985558,"chevron-down-box-outline":985559,"chevron-down-circle":985894,"chevron-down-circle-outline":985895,"chevron-left":983361,"chevron-left-box":985560,"chevron-left-box-outline":985561,"chevron-left-circle":985896,"chevron-left-circle-outline":985897,"chevron-right":983362,"chevron-right-box":985562,"chevron-right-box-outline":985563,"chevron-right-circle":985898,"chevron-right-circle-outline":985899,"chevron-triple-down":986553,"chevron-triple-left":986554,"chevron-triple-right":986555,"chevron-triple-up":986556,"chevron-up":983363,"chevron-up-box":985564,"chevron-up-box-outline":985565,"chevron-up-circle":985900,"chevron-up-circle-outline":985901,"chili-hot":985010,"chili-medium":985011,"chili-mild":985012,"chili-off":988263,"chip":984602,"christianity":985427,"christianity-outline":986358,"church":983364,"cigar":987529,"cigar-off":988187,"circle":984933,"circle-double":986773,"circle-edit-outline":985301,"circle-expand":986774,"circle-half":988053,"circle-half-full":988054,"circle-medium":985566,"circle-multiple":985912,"circle-multiple-outline":984725,"circle-off-outline":987347,"circle-outline":984934,"circle-slice-1":985758,"circle-slice-2":985759,"circle-slice-3":985760,"circle-slice-4":985761,"circle-slice-5":985762,"circle-slice-6":985763,"circle-slice-7":985764,"circle-slice-8":985765,"circle-small":985567,"circular-saw":986658,"city":983366,"city-variant":985654,"city-variant-outline":985655,"clipboard":983367,"clipboard-account":983368,"clipboard-account-outline":986197,"clipboard-alert":983369,"clipboard-alert-outline":986359,"clipboard-arrow-down":983370,"clipboard-arrow-down-outline":986198,"clipboard-arrow-left":983371,"clipboard-arrow-left-outline":986360,"clipboard-arrow-right":986361,"clipboard-arrow-right-outline":986362,"clipboard-arrow-up":986199,"clipboard-arrow-up-outline":986200,"clipboard-check":983374,"clipboard-check-multiple":987747,"clipboard-check-multiple-outline":987748,"clipboard-check-outline":985256,"clipboard-file":987749,"clipboard-file-outline":987750,"clipboard-flow":984776,"clipboard-flow-outline":987415,"clipboard-list":987348,"clipboard-list-outline":987349,"clipboard-multiple":987751,"clipboard-multiple-outline":987752,"clipboard-outline":983372,"clipboard-play":986201,"clipboard-play-multiple":987753,"clipboard-play-multiple-outline":987754,"clipboard-play-outline":986202,"clipboard-plus":984913,"clipboard-plus-outline":987935,"clipboard-pulse":985181,"clipboard-pulse-outline":985182,"clipboard-text":983373,"clipboard-text-multiple":987755,"clipboard-text-multiple-outline":987756,"clipboard-text-outline":985656,"clipboard-text-play":986203,"clipboard-text-play-outline":986204,"clippy":983375,"clock":985428,"clock-alert":985429,"clock-alert-outline":984526,"clock-check":987048,"clock-check-outline":987049,"clock-digital":986775,"clock-end":983377,"clock-fast":983378,"clock-in":983379,"clock-out":983380,"clock-outline":983376,"clock-start":983381,"clock-time-eight":988230,"clock-time-eight-outline":988242,"clock-time-eleven":988233,"clock-time-eleven-outline":988245,"clock-time-five":988227,"clock-time-five-outline":988239,"clock-time-four":988226,"clock-time-four-outline":988238,"clock-time-nine":988231,"clock-time-nine-outline":988243,"clock-time-one":988223,"clock-time-one-outline":988235,"clock-time-seven":988229,"clock-time-seven-outline":988241,"clock-time-six":988228,"clock-time-six-outline":988240,"clock-time-ten":988232,"clock-time-ten-outline":988244,"clock-time-three":988225,"clock-time-three-outline":988237,"clock-time-twelve":988234,"clock-time-twelve-outline":988246,"clock-time-two":988224,"clock-time-two-outline":988236,"close":983382,"close-box":983383,"close-box-multiple":986205,"close-box-multiple-outline":986206,"close-box-outline":983384,"close-circle":983385,"close-circle-multiple":984618,"close-circle-multiple-outline":985219,"close-circle-outline":983386,"close-network":983387,"close-network-outline":986207,"close-octagon":983388,"close-octagon-outline":983389,"close-outline":984777,"close-thick":988056,"closed-caption":983390,"closed-caption-outline":986557,"cloud":983391,"cloud-alert":985568,"cloud-braces":985013,"cloud-check":983392,"cloud-check-outline":987852,"cloud-circle":983393,"cloud-download":983394,"cloud-download-outline":985981,"cloud-lock":987633,"cloud-lock-outline":987634,"cloud-off-outline":983396,"cloud-outline":983395,"cloud-print":983397,"cloud-print-outline":983398,"cloud-question":985657,"cloud-refresh":984362,"cloud-search":985430,"cloud-search-outline":985431,"cloud-sync":984639,"cloud-sync-outline":987862,"cloud-tags":985014,"cloud-upload":983399,"cloud-upload-outline":985982,"clover":985110,"coach-lamp":987168,"coat-rack":987294,"code-array":983400,"code-braces":983401,"code-braces-box":987350,"code-brackets":983402,"code-equal":983403,"code-greater-than":983404,"code-greater-than-or-equal":983405,"code-json":984614,"code-less-than":983406,"code-less-than-or-equal":983407,"code-not-equal":983408,"code-not-equal-variant":983409,"code-parentheses":983410,"code-parentheses-box":987351,"code-string":983411,"code-tags":983412,"code-tags-check":984724,"codepen":983413,"coffee":983414,"coffee-maker":987295,"coffee-off":987050,"coffee-off-outline":987051,"coffee-outline":984778,"coffee-to-go":983415,"coffee-to-go-outline":987918,"coffin":985983,"cog":984211,"cog-box":984212,"cog-clockwise":987613,"cog-counterclockwise":987614,"cog-off":988110,"cog-off-outline":988111,"cog-outline":985275,"cog-refresh":988254,"cog-refresh-outline":988255,"cog-sync":988256,"cog-sync-outline":988257,"cog-transfer":987227,"cog-transfer-outline":987228,"cogs":985302,"collage":984640,"collapse-all":985766,"collapse-all-outline":985767,"color-helper":983417,"comma":986659,"comma-box":986667,"comma-box-outline":986660,"comma-circle":986661,"comma-circle-outline":986662,"comment":983418,"comment-account":983419,"comment-account-outline":983420,"comment-alert":983421,"comment-alert-outline":983422,"comment-arrow-left":985569,"comment-arrow-left-outline":985570,"comment-arrow-right":985571,"comment-arrow-right-outline":985572,"comment-check":983423,"comment-check-outline":983424,"comment-edit":987583,"comment-edit-outline":987844,"comment-eye":985658,"comment-eye-outline":985659,"comment-multiple":985183,"comment-multiple-outline":983425,"comment-outline":983426,"comment-plus":985573,"comment-plus-outline":983427,"comment-processing":983428,"comment-processing-outline":983429,"comment-question":985111,"comment-question-outline":983430,"comment-quote":987169,"comment-quote-outline":987170,"comment-remove":984542,"comment-remove-outline":983431,"comment-search":985660,"comment-search-outline":985661,"comment-text":983432,"comment-text-multiple":985184,"comment-text-multiple-outline":985185,"comment-text-outline":983433,"compare":983434,"compare-horizontal":988306,"compare-vertical":988307,"compass":983435,"compass-off":985984,"compass-off-outline":985985,"compass-outline":983436,"compass-rose":988034,"concourse-ci":987296,"console":983437,"console-line":985015,"console-network":985257,"console-network-outline":986208,"consolidate":987352,"contactless-payment":986474,"contactless-payment-circle":983841,"contactless-payment-circle-outline":984072,"contacts":984779,"contacts-outline":984504,"contain":985662,"contain-end":985663,"contain-start":985664,"content-copy":983439,"content-cut":983440,"content-duplicate":983441,"content-paste":983442,"content-save":983443,"content-save-alert":986946,"content-save-alert-outline":986947,"content-save-all":983444,"content-save-all-outline":986948,"content-save-cog":988251,"content-save-cog-outline":988252,"content-save-edit":986363,"content-save-edit-outline":986364,"content-save-move":986663,"content-save-move-outline":986664,"content-save-outline":985112,"content-save-settings":984603,"content-save-settings-outline":985902,"contrast":983445,"contrast-box":983446,"contrast-circle":983447,"controller-classic":985986,"controller-classic-outline":985987,"cookie":983448,"coolant-temperature":984008,"copyright":984550,"cordova":985432,"corn":985016,"corn-off":988143,"cosine-wave":988281,"counter":983449,"cow":983450,"cpu-32-bit":986847,"cpu-64-bit":986848,"crane":985186,"creation":984692,"creative-commons":986475,"credit-card":987119,"credit-card-check":988112,"credit-card-check-outline":988113,"credit-card-clock":986849,"credit-card-clock-outline":986850,"credit-card-marker":984744,"credit-card-marker-outline":986558,"credit-card-minus":987052,"credit-card-minus-outline":987053,"credit-card-multiple":987120,"credit-card-multiple-outline":983452,"credit-card-off":987121,"credit-card-off-outline":984548,"credit-card-outline":983451,"credit-card-plus":987122,"credit-card-plus-outline":984694,"credit-card-refund":987123,"credit-card-refund-outline":985768,"credit-card-remove":987054,"credit-card-remove-outline":987055,"credit-card-scan":987124,"credit-card-scan-outline":983453,"credit-card-settings":987125,"credit-card-settings-outline":985303,"credit-card-wireless":985090,"credit-card-wireless-off":984442,"credit-card-wireless-off-outline":984443,"credit-card-wireless-outline":986476,"cricket":986477,"crop":983454,"crop-free":983455,"crop-landscape":983456,"crop-portrait":983457,"crop-rotate":984726,"crop-square":983458,"crosshairs":983459,"crosshairs-gps":983460,"crosshairs-off":986949,"crosshairs-question":987446,"crown":983461,"crown-outline":987600,"cryengine":985433,"crystal-ball":985903,"cube":983462,"cube-off":988188,"cube-off-outline":988189,"cube-outline":983463,"cube-scan":985988,"cube-send":983464,"cube-unfolded":983465,"cup":983466,"cup-off":984549,"cup-off-outline":988029,"cup-outline":987919,"cup-water":983467,"cupboard":986950,"cupboard-outline":986951,"cupcake":985434,"curling":985187,"currency-bdt":985188,"currency-brl":985989,"currency-btc":983468,"currency-cny":985018,"currency-eth":985019,"currency-eur":983469,"currency-eur-off":987925,"currency-gbp":983470,"currency-ils":986209,"currency-inr":983471,"currency-jpy":985020,"currency-krw":985021,"currency-kzt":985189,"currency-ngn":983472,"currency-php":985574,"currency-rial":986780,"currency-rub":983473,"currency-sign":985022,"currency-try":983474,"currency-twd":985023,"currency-usd":983489,"currency-usd-circle":987499,"currency-usd-circle-outline":983416,"currency-usd-off":984698,"current-ac":988288,"current-dc":985436,"cursor-default":983488,"cursor-default-click":986365,"cursor-default-click-outline":986366,"cursor-default-gesture":987431,"cursor-default-gesture-outline":987432,"cursor-default-outline":983487,"cursor-move":983486,"cursor-pointer":983485,"cursor-text":984551,"database":983484,"database-check":985769,"database-edit":985990,"database-export":985438,"database-import":985437,"database-lock":985770,"database-marker":987894,"database-minus":983483,"database-plus":983482,"database-refresh":984514,"database-remove":986368,"database-search":985190,"database-settings":986369,"database-sync":986367,"death-star":985304,"death-star-variant":985305,"deathly-hallows":985991,"debian":985306,"debug-step-into":983481,"debug-step-out":983480,"debug-step-over":983479,"decagram":984940,"decagram-outline":984941,"decimal":987297,"decimal-comma":987298,"decimal-comma-decrease":987299,"decimal-comma-increase":987300,"decimal-decrease":983478,"decimal-increase":983477,"delete":983476,"delete-alert":987301,"delete-alert-outline":987302,"delete-circle":984707,"delete-circle-outline":985992,"delete-empty":984780,"delete-empty-outline":986781,"delete-forever":984552,"delete-forever-outline":985993,"delete-off":987303,"delete-off-outline":987304,"delete-outline":985575,"delete-restore":985113,"delete-sweep":984553,"delete-sweep-outline":986210,"delete-variant":983475,"delta":983490,"desk":987705,"desk-lamp":985439,"deskphone":983491,"desktop-classic":985024,"desktop-mac":983492,"desktop-mac-dashboard":985576,"desktop-tower":983493,"desktop-tower-monitor":985771,"details":983494,"dev-to":986478,"developer-board":984727,"deviantart":983495,"devices":987056,"diabetes":987430,"dialpad":984604,"diameter":986211,"diameter-outline":986212,"diameter-variant":986213,"diamond":985994,"diamond-outline":985995,"diamond-stone":983496,"dice-1":983498,"dice-1-outline":987466,"dice-2":983499,"dice-2-outline":987467,"dice-3":983500,"dice-3-outline":987468,"dice-4":983501,"dice-4-outline":987469,"dice-5":983502,"dice-5-outline":987470,"dice-6":983503,"dice-6-outline":987471,"dice-d10":987475,"dice-d10-outline":984943,"dice-d12":987476,"dice-d12-outline":985191,"dice-d20":987477,"dice-d20-outline":984554,"dice-d4":987472,"dice-d4-outline":984555,"dice-d6":987473,"dice-d6-outline":984557,"dice-d8":987474,"dice-d8-outline":984556,"dice-multiple":984942,"dice-multiple-outline":987478,"digital-ocean":987703,"dip-switch":985025,"directions":983504,"directions-fork":984641,"disc":984558,"disc-alert":983505,"disc-player":985440,"discord":984687,"dishwasher":985772,"dishwasher-alert":987576,"dishwasher-off":987577,"disqus":983506,"distribute-horizontal-center":987593,"distribute-horizontal-left":987592,"distribute-horizontal-right":987594,"distribute-vertical-bottom":987595,"distribute-vertical-center":987596,"distribute-vertical-top":987597,"diving-flippers":986559,"diving-helmet":986560,"diving-scuba":986561,"diving-scuba-flag":986562,"diving-scuba-tank":986563,"diving-scuba-tank-multiple":986564,"diving-snorkel":986565,"division":983508,"division-box":983509,"dlna":985665,"dna":984708,"dns":983510,"dns-outline":985996,"do-not-disturb":984728,"do-not-disturb-off":984729,"dock-bottom":987305,"dock-left":987306,"dock-right":987307,"dock-window":987308,"docker":985192,"doctor":985666,"dog":985667,"dog-service":985773,"dog-side":985668,"dolby":984755,"dolly":986782,"domain":983511,"domain-off":986479,"domain-plus":987309,"domain-remove":987310,"dome-light":988190,"domino-mask":987171,"donkey":985026,"door":985114,"door-closed":985115,"door-closed-lock":987311,"door-open":985116,"doorbell":987878,"doorbell-video":985193,"dot-net":985774,"dots-horizontal":983512,"dots-horizontal-circle":985027,"dots-horizontal-circle-outline":985997,"dots-vertical":983513,"dots-vertical-circle":985028,"dots-vertical-circle-outline":985998,"douban":984730,"download":983514,"download-box":988258,"download-box-outline":988259,"download-circle":988260,"download-circle-outline":988261,"download-lock":987936,"download-lock-outline":987937,"download-multiple":985577,"download-network":984820,"download-network-outline":986214,"download-off":987312,"download-off-outline":987313,"download-outline":985999,"drag":983515,"drag-horizontal":983516,"drag-horizontal-variant":987888,"drag-variant":986000,"drag-vertical":983517,"drag-vertical-variant":987889,"drama-masks":986370,"draw":986953,"drawing":983518,"drawing-box":983519,"dresser":986954,"dresser-outline":986955,"drone":983522,"dropbox":983523,"drupal":983524,"duck":983525,"dumbbell":983526,"dump-truck":986215,"ear-hearing":985029,"ear-hearing-off":985669,"earth":983527,"earth-arrow-right":987921,"earth-box":984781,"earth-box-minus":988167,"earth-box-off":984782,"earth-box-plus":988166,"earth-box-remove":988168,"earth-minus":988164,"earth-off":983528,"earth-plus":988163,"earth-remove":988165,"egg":985775,"egg-easter":985776,"egg-off":988144,"egg-off-outline":988145,"egg-outline":988146,"eight-track":985578,"eject":983530,"eject-outline":986001,"electric-switch":986783,"electric-switch-closed":987353,"electron-framework":987172,"elephant":985030,"elevation-decline":983531,"elevation-rise":983532,"elevator":983533,"elevator-down":987842,"elevator-passenger":988033,"elevator-up":987841,"ellipse":986784,"ellipse-outline":986785,"email":983534,"email-alert":984783,"email-alert-outline":986434,"email-box":986371,"email-check":985777,"email-check-outline":985778,"email-edit":986851,"email-edit-outline":986852,"email-lock":983537,"email-mark-as-unread":986002,"email-minus":986853,"email-minus-outline":986854,"email-multiple":986855,"email-multiple-outline":986856,"email-newsletter":987057,"email-off":988131,"email-off-outline":988132,"email-open":983535,"email-open-multiple":986857,"email-open-multiple-outline":986858,"email-open-outline":984559,"email-outline":983536,"email-plus":985579,"email-plus-outline":985580,"email-receive":987354,"email-receive-outline":987355,"email-search":985441,"email-search-outline":985442,"email-send":987356,"email-send-outline":987357,"email-sync":987847,"email-sync-outline":987848,"email-variant":984560,"ember":985904,"emby":984756,"emoticon":986216,"emoticon-angry":986217,"emoticon-angry-outline":986218,"emoticon-confused":987358,"emoticon-confused-outline":987359,"emoticon-cool":986219,"emoticon-cool-outline":983539,"emoticon-cry":986220,"emoticon-cry-outline":986221,"emoticon-dead":986222,"emoticon-dead-outline":984731,"emoticon-devil":986223,"emoticon-devil-outline":983540,"emoticon-excited":986224,"emoticon-excited-outline":984732,"emoticon-frown":986956,"emoticon-frown-outline":986957,"emoticon-happy":986225,"emoticon-happy-outline":983541,"emoticon-kiss":986226,"emoticon-kiss-outline":986227,"emoticon-lol":987668,"emoticon-lol-outline":987669,"emoticon-neutral":986228,"emoticon-neutral-outline":983542,"emoticon-outline":983538,"emoticon-poop":983543,"emoticon-poop-outline":986229,"emoticon-sad":986230,"emoticon-sad-outline":983544,"emoticon-tongue":983545,"emoticon-tongue-outline":986231,"emoticon-wink":986232,"emoticon-wink-outline":986233,"engine":983546,"engine-off":985670,"engine-off-outline":985671,"engine-outline":983547,"epsilon":987360,"equal":983548,"equal-box":983549,"equalizer":986786,"equalizer-outline":986787,"eraser":983550,"eraser-variant":984642,"escalator":983551,"escalator-box":988057,"escalator-down":987840,"escalator-up":987839,"eslint":986234,"et":985779,"ethereum":985194,"ethernet":983552,"ethernet-cable":983553,"ethernet-cable-off":983554,"ev-station":984561,"evernote":983556,"excavator":987173,"exclamation":983557,"exclamation-thick":987704,"exit-run":985672,"exit-to-app":983558,"expand-all":985780,"expand-all-outline":985781,"expansion-card":985262,"expansion-card-variant":987058,"exponent":985443,"exponent-box":985444,"export":983559,"export-variant":986003,"eye":983560,"eye-check":986372,"eye-check-outline":986373,"eye-circle":986004,"eye-circle-outline":986005,"eye-minus":987174,"eye-minus-outline":987175,"eye-off":983561,"eye-off-outline":984785,"eye-outline":984784,"eye-plus":985195,"eye-plus-outline":985196,"eye-settings":985197,"eye-settings-outline":985198,"eyedropper":983562,"eyedropper-minus":988125,"eyedropper-off":988127,"eyedropper-plus":988124,"eyedropper-remove":988126,"eyedropper-variant":983563,"face":984643,"face-agent":986480,"face-outline":986006,"face-profile":984644,"face-profile-woman":987254,"face-recognition":986235,"face-woman":987255,"face-woman-outline":987256,"facebook":983564,"facebook-messenger":983566,"facebook-workplace":985905,"factory":983567,"fan":983568,"fan-alert":988268,"fan-chevron-down":988269,"fan-chevron-up":988270,"fan-minus":988272,"fan-off":985117,"fan-plus":988271,"fan-remove":988273,"fan-speed-1":988274,"fan-speed-2":988275,"fan-speed-3":988276,"fast-forward":983569,"fast-forward-10":986481,"fast-forward-30":986374,"fast-forward-5":987640,"fast-forward-outline":984786,"fax":983570,"feather":984787,"feature-search":985673,"feature-search-outline":985674,"fedora":985307,"fencing":988353,"ferris-wheel":986788,"ferry":983571,"file":983572,"file-account":984891,"file-account-outline":987176,"file-alert":985675,"file-alert-outline":985676,"file-cabinet":985782,"file-cad":986859,"file-cad-box":986860,"file-cancel":986566,"file-cancel-outline":986567,"file-certificate":987526,"file-certificate-outline":987527,"file-chart":983573,"file-chart-outline":987177,"file-check":983574,"file-check-outline":986665,"file-clock":987873,"file-clock-outline":987874,"file-cloud":983575,"file-cloud-outline":987178,"file-code":983598,"file-code-outline":987179,"file-cog":987259,"file-cog-outline":987260,"file-compare":985258,"file-delimited":983576,"file-delimited-outline":986789,"file-document":983577,"file-document-edit":986568,"file-document-edit-outline":986569,"file-document-outline":985582,"file-download":985445,"file-download-outline":985446,"file-edit":987623,"file-edit-outline":987624,"file-excel":983579,"file-excel-box":983580,"file-excel-box-outline":987180,"file-excel-outline":987181,"file-export":983581,"file-export-outline":987182,"file-eye":986570,"file-eye-outline":986571,"file-find":983582,"file-find-outline":986007,"file-hidden":984595,"file-image":983583,"file-image-outline":986800,"file-import":983584,"file-import-outline":987183,"file-key":987524,"file-key-outline":987525,"file-link":987511,"file-link-outline":987512,"file-lock":983585,"file-lock-outline":987184,"file-move":985785,"file-move-outline":987185,"file-multiple":983586,"file-multiple-outline":987186,"file-music":983587,"file-music-outline":986666,"file-outline":983588,"file-pdf":983589,"file-pdf-box":983590,"file-pdf-box-outline":987059,"file-pdf-outline":986669,"file-percent":985118,"file-percent-outline":987187,"file-phone":987513,"file-phone-outline":987514,"file-plus":984914,"file-plus-outline":986861,"file-powerpoint":983591,"file-powerpoint-box":983592,"file-powerpoint-box-outline":987188,"file-powerpoint-outline":987189,"file-presentation-box":983593,"file-question":985199,"file-question-outline":987190,"file-refresh":985368,"file-refresh-outline":984385,"file-remove":986008,"file-remove-outline":987191,"file-replace":985906,"file-replace-outline":985907,"file-restore":984688,"file-restore-outline":987192,"file-search":986236,"file-search-outline":986237,"file-send":983594,"file-send-outline":987193,"file-settings":987257,"file-settings-outline":987258,"file-star":987194,"file-star-outline":987195,"file-swap":987060,"file-swap-outline":987061,"file-sync":987670,"file-sync-outline":987671,"file-table":986238,"file-table-box":987361,"file-table-box-multiple":987362,"file-table-box-multiple-outline":987363,"file-table-box-outline":987364,"file-table-outline":986239,"file-tree":984645,"file-tree-outline":988114,"file-undo":985308,"file-undo-outline":987196,"file-upload":985677,"file-upload-outline":985678,"file-video":983595,"file-video-outline":986668,"file-word":983596,"file-word-box":983597,"file-word-box-outline":987197,"file-word-outline":987198,"film":983599,"filmstrip":983600,"filmstrip-box":983858,"filmstrip-box-multiple":986392,"filmstrip-off":983601,"filter":983602,"filter-menu":987365,"filter-menu-outline":987366,"filter-minus":986862,"filter-minus-outline":986863,"filter-outline":983603,"filter-plus":986864,"filter-plus-outline":986865,"filter-remove":983604,"filter-remove-outline":983605,"filter-variant":983606,"filter-variant-minus":987410,"filter-variant-plus":987411,"filter-variant-remove":987199,"finance":985119,"find-replace":984788,"fingerprint":983607,"fingerprint-off":986801,"fire":983608,"fire-extinguisher":986866,"fire-hydrant":987447,"fire-hydrant-alert":987448,"fire-hydrant-off":987449,"fire-truck":985259,"firebase":985447,"firefox":983609,"fireplace":986670,"fireplace-off":986671,"firework":986672,"fish":983610,"fish-off":988147,"fishbowl":986867,"fishbowl-outline":986868,"fit-to-page":986869,"fit-to-page-outline":986870,"flag":983611,"flag-checkered":983612,"flag-minus":986009,"flag-minus-outline":987314,"flag-outline":983613,"flag-plus":986010,"flag-plus-outline":987315,"flag-remove":986011,"flag-remove-outline":987316,"flag-triangle":983615,"flag-variant":983616,"flag-variant-outline":983614,"flare":986482,"flash":983617,"flash-alert":986871,"flash-alert-outline":986872,"flash-auto":983618,"flash-circle":985120,"flash-off":983619,"flash-outline":984789,"flash-red-eye":984699,"flashlight":983620,"flashlight-off":983621,"flask":983187,"flask-empty":983188,"flask-empty-minus":987706,"flask-empty-minus-outline":987707,"flask-empty-off":988148,"flask-empty-off-outline":988149,"flask-empty-outline":983189,"flask-empty-plus":987708,"flask-empty-plus-outline":987709,"flask-empty-remove":987710,"flask-empty-remove-outline":987711,"flask-minus":987712,"flask-minus-outline":987713,"flask-off":988150,"flask-off-outline":988151,"flask-outline":983190,"flask-plus":987714,"flask-plus-outline":987715,"flask-remove":987716,"flask-remove-outline":987717,"flask-round-bottom":987723,"flask-round-bottom-empty":987724,"flask-round-bottom-empty-outline":987725,"flask-round-bottom-outline":987726,"fleur-de-lis":987907,"flip-horizontal":987367,"flip-to-back":983623,"flip-to-front":983624,"flip-vertical":987368,"floor-lamp":985309,"floor-lamp-dual":987200,"floor-lamp-variant":987201,"floor-plan":985121,"floppy":983625,"floppy-variant":985583,"flower":983626,"flower-outline":985584,"flower-poppy":986376,"flower-tulip":985585,"flower-tulip-outline":985586,"focus-auto":986958,"focus-field":986959,"focus-field-horizontal":986960,"focus-field-vertical":986961,"folder":983627,"folder-account":983628,"folder-account-outline":986012,"folder-alert":986572,"folder-alert-outline":986573,"folder-clock":985786,"folder-clock-outline":985787,"folder-cog":987263,"folder-cog-outline":987264,"folder-download":983629,"folder-download-outline":987369,"folder-edit":985310,"folder-edit-outline":986574,"folder-google-drive":983630,"folder-heart":987370,"folder-heart-outline":987371,"folder-home":987317,"folder-home-outline":987318,"folder-image":983631,"folder-information":987319,"folder-information-outline":987320,"folder-key":985260,"folder-key-network":985261,"folder-key-network-outline":986240,"folder-key-outline":987372,"folder-lock":983632,"folder-lock-open":983633,"folder-marker":987757,"folder-marker-outline":987758,"folder-move":983634,"folder-move-outline":987718,"folder-multiple":983635,"folder-multiple-image":983636,"folder-multiple-outline":983637,"folder-multiple-plus":988286,"folder-multiple-plus-outline":988287,"folder-music":987993,"folder-music-outline":987994,"folder-network":985200,"folder-network-outline":986241,"folder-open":984944,"folder-open-outline":986575,"folder-outline":983638,"folder-plus":983639,"folder-plus-outline":986013,"folder-pound":986377,"folder-pound-outline":986378,"folder-refresh":984905,"folder-refresh-outline":984386,"folder-remove":983640,"folder-remove-outline":986014,"folder-search":985448,"folder-search-outline":985449,"folder-settings":987261,"folder-settings-outline":987262,"folder-star":984733,"folder-star-multiple":988115,"folder-star-multiple-outline":988116,"folder-star-outline":986015,"folder-swap":987062,"folder-swap-outline":987063,"folder-sync":986379,"folder-sync-outline":986380,"folder-table":987875,"folder-table-outline":987876,"folder-text":986242,"folder-text-outline":986243,"folder-upload":983641,"folder-upload-outline":987373,"folder-zip":984811,"folder-zip-outline":985017,"font-awesome":983098,"food":983642,"food-apple":983643,"food-apple-outline":986244,"food-croissant":985032,"food-drumstick":988191,"food-drumstick-off":988264,"food-drumstick-off-outline":988265,"food-drumstick-outline":988192,"food-fork-drink":984562,"food-off":984563,"food-steak":988266,"food-steak-off":988267,"food-variant":983644,"food-variant-off":988133,"foot-print":986962,"football":983645,"football-australian":983646,"football-helmet":983647,"forklift":985033,"form-dropdown":988160,"form-select":988161,"form-textarea":987285,"form-textbox":984590,"form-textbox-lock":987997,"form-textbox-password":985077,"format-align-bottom":984915,"format-align-center":983648,"format-align-justify":983649,"format-align-left":983650,"format-align-middle":984916,"format-align-right":983651,"format-align-top":984917,"format-annotation-minus":985788,"format-annotation-plus":984646,"format-bold":983652,"format-clear":983653,"format-color-fill":983654,"format-color-highlight":986673,"format-color-marker-cancel":987923,"format-color-text":984734,"format-columns":985311,"format-float-center":983655,"format-float-left":983656,"format-float-none":983657,"format-float-right":983658,"format-font":984790,"format-font-size-decrease":985587,"format-font-size-increase":985588,"format-header-1":983659,"format-header-2":983660,"format-header-3":983661,"format-header-4":983662,"format-header-5":983663,"format-header-6":983664,"format-header-decrease":983665,"format-header-equal":983666,"format-header-increase":983667,"format-header-pound":983668,"format-horizontal-align-center":984606,"format-horizontal-align-left":984607,"format-horizontal-align-right":984608,"format-indent-decrease":983669,"format-indent-increase":983670,"format-italic":983671,"format-letter-case":985908,"format-letter-case-lower":985909,"format-letter-case-upper":985910,"format-letter-ends-with":987064,"format-letter-matches":987065,"format-letter-starts-with":987066,"format-line-spacing":983672,"format-line-style":984520,"format-line-weight":984521,"format-list-bulleted":983673,"format-list-bulleted-square":986576,"format-list-bulleted-triangle":986802,"format-list-bulleted-type":983674,"format-list-checkbox":985450,"format-list-checks":984918,"format-list-numbered":983675,"format-list-numbered-rtl":986381,"format-list-text":987759,"format-overline":986803,"format-page-break":984791,"format-paint":983676,"format-paragraph":983677,"format-pilcrow":984792,"format-quote-close":983678,"format-quote-close-outline":987560,"format-quote-open":984919,"format-quote-open-outline":987559,"format-rotate-90":984746,"format-section":984735,"format-size":983679,"format-strikethrough":983680,"format-strikethrough-variant":983681,"format-subscript":983682,"format-superscript":983683,"format-text":983684,"format-text-rotation-angle-down":987067,"format-text-rotation-angle-up":987068,"format-text-rotation-down":986483,"format-text-rotation-down-vertical":987069,"format-text-rotation-none":986484,"format-text-rotation-up":987070,"format-text-rotation-vertical":987071,"format-text-variant":986674,"format-text-wrapping-clip":986382,"format-text-wrapping-overflow":986383,"format-text-wrapping-wrap":986384,"format-textbox":986385,"format-textdirection-l-to-r":983685,"format-textdirection-r-to-l":983686,"format-title":984564,"format-underline":983687,"format-vertical-align-bottom":984609,"format-vertical-align-center":984610,"format-vertical-align-top":984611,"format-wrap-inline":983688,"format-wrap-square":983689,"format-wrap-tight":983690,"format-wrap-top-bottom":983691,"forum":983692,"forum-outline":985122,"forward":983693,"forwardburger":986485,"fountain":985451,"fountain-pen":986386,"fountain-pen-tip":986387,"freebsd":985312,"frequently-asked-questions":986804,"fridge":983696,"fridge-alert":987569,"fridge-alert-outline":987570,"fridge-bottom":983698,"fridge-off":987567,"fridge-off-outline":987568,"fridge-outline":983695,"fridge-top":983697,"fruit-cherries":987202,"fruit-cherries-off":988152,"fruit-citrus":987203,"fruit-citrus-off":988153,"fruit-grapes":987204,"fruit-grapes-outline":987205,"fruit-pineapple":987206,"fruit-watermelon":987207,"fuel":985034,"fullscreen":983699,"fullscreen-exit":983700,"function":983701,"function-variant":985201,"furigana-horizontal":987265,"furigana-vertical":987266,"fuse":986245,"fuse-alert":988205,"fuse-blade":986246,"fuse-off":988204,"gamepad":983702,"gamepad-circle":986675,"gamepad-circle-down":986676,"gamepad-circle-left":986677,"gamepad-circle-outline":986678,"gamepad-circle-right":986679,"gamepad-circle-up":986680,"gamepad-down":986681,"gamepad-left":986682,"gamepad-right":986683,"gamepad-round":986684,"gamepad-round-down":986685,"gamepad-round-left":986686,"gamepad-round-outline":986687,"gamepad-round-right":986688,"gamepad-round-up":986689,"gamepad-square":986805,"gamepad-square-outline":986806,"gamepad-up":986690,"gamepad-variant":983703,"gamepad-variant-outline":986807,"gamma":987374,"gantry-crane":986577,"garage":984793,"garage-alert":985202,"garage-alert-variant":987861,"garage-open":984794,"garage-open-variant":987860,"garage-variant":987859,"gas-cylinder":984647,"gas-station":983704,"gas-station-off":988169,"gas-station-off-outline":988170,"gas-station-outline":986808,"gate":983705,"gate-and":985313,"gate-arrow-right":987497,"gate-nand":985314,"gate-nor":985315,"gate-not":985316,"gate-open":987498,"gate-or":985317,"gate-xnor":985318,"gate-xor":985319,"gatsby":986691,"gauge":983706,"gauge-empty":985203,"gauge-full":985204,"gauge-low":985205,"gavel":983707,"gender-female":983708,"gender-male":983709,"gender-male-female":983710,"gender-male-female-variant":987455,"gender-non-binary":987456,"gender-transgender":983711,"gentoo":985320,"gesture":985035,"gesture-double-tap":984892,"gesture-pinch":985789,"gesture-spread":985790,"gesture-swipe":986486,"gesture-swipe-down":984893,"gesture-swipe-horizontal":985791,"gesture-swipe-left":984894,"gesture-swipe-right":984895,"gesture-swipe-up":984896,"gesture-swipe-vertical":985792,"gesture-tap":984897,"gesture-tap-box":987817,"gesture-tap-button":987816,"gesture-tap-hold":986487,"gesture-two-double-tap":984898,"gesture-two-tap":984899,"ghost":983712,"ghost-off":985589,"gif":986488,"gift":986692,"gift-outline":983713,"git":983714,"github":983716,"gitlab":986016,"glass-cocktail":983894,"glass-flute":983717,"glass-mug":983718,"glass-mug-variant":987414,"glass-pint-outline":987917,"glass-stange":983719,"glass-tulip":983720,"glass-wine":985206,"glasses":983722,"globe-light":987863,"globe-model":985321,"gmail":983723,"gnome":983724,"go-kart":986489,"go-kart-track":986490,"gog":986017,"gold":987727,"golf":985123,"golf-cart":987556,"golf-tee":987267,"gondola":984710,"goodreads":986491,"google":983725,"google-ads":986247,"google-analytics":985036,"google-assistant":985037,"google-cardboard":983726,"google-chrome":983727,"google-circles":983728,"google-circles-communities":983729,"google-circles-extended":983730,"google-circles-group":983731,"google-classroom":983744,"google-cloud":987638,"google-controller":983732,"google-controller-off":983733,"google-downasaur":988002,"google-drive":983734,"google-earth":983735,"google-fit":985452,"google-glass":983736,"google-hangouts":983753,"google-home":985124,"google-keep":984796,"google-lens":985590,"google-maps":984565,"google-my-business":987208,"google-nearby":983737,"google-photos":984797,"google-play":983740,"google-plus":983741,"google-podcast":986809,"google-spreadsheet":985591,"google-street-view":986248,"google-translate":983743,"gradient":984736,"grain":986492,"graph":987209,"graph-outline":987210,"graphql":985207,"grave-stone":986018,"grease-pencil":984648,"greater-than":985453,"greater-than-or-equal":985454,"grid":983745,"grid-large":984920,"grid-off":983746,"grill":986693,"grill-outline":987530,"group":983747,"guitar-acoustic":984945,"guitar-electric":983748,"guitar-pick":983749,"guitar-pick-outline":983750,"guy-fawkes-mask":985125,"hail":985793,"hair-dryer":987375,"hair-dryer-outline":987376,"halloween":986019,"hamburger":984709,"hammer":985322,"hammer-screwdriver":987938,"hammer-wrench":987939,"hand":985679,"hand-heart":987377,"hand-left":986694,"hand-okay":985680,"hand-peace":985681,"hand-peace-variant":985682,"hand-pointing-down":985683,"hand-pointing-left":985684,"hand-pointing-right":983751,"hand-pointing-up":985685,"hand-right":986695,"hand-saw":986696,"hand-water":988063,"handball":986963,"handcuffs":987454,"handshake":987672,"hanger":983752,"hard-hat":985455,"harddisk":983754,"harddisk-plus":987211,"harddisk-remove":987212,"hat-fedora":986020,"hazard-lights":986249,"hdr":986493,"hdr-off":986494,"head":987998,"head-alert":987960,"head-alert-outline":987961,"head-check":987962,"head-check-outline":987963,"head-cog":987964,"head-cog-outline":987965,"head-dots-horizontal":987966,"head-dots-horizontal-outline":987967,"head-flash":987968,"head-flash-outline":987969,"head-heart":987970,"head-heart-outline":987971,"head-lightbulb":987972,"head-lightbulb-outline":987973,"head-minus":987974,"head-minus-outline":987975,"head-outline":987999,"head-plus":987976,"head-plus-outline":987977,"head-question":987978,"head-question-outline":987979,"head-remove":987980,"head-remove-outline":987981,"head-snowflake":987982,"head-snowflake-outline":987983,"head-sync":987984,"head-sync-outline":987985,"headphones":983755,"headphones-bluetooth":985456,"headphones-box":983756,"headphones-off":985038,"headphones-settings":983757,"headset":983758,"headset-dock":983759,"headset-off":983760,"heart":983761,"heart-box":983762,"heart-box-outline":983763,"heart-broken":983764,"heart-broken-outline":986388,"heart-circle":985457,"heart-circle-outline":985458,"heart-flash":986873,"heart-half":984799,"heart-half-full":984798,"heart-half-outline":984800,"heart-minus":988207,"heart-minus-outline":988210,"heart-multiple":985686,"heart-multiple-outline":985687,"heart-off":984921,"heart-off-outline":988212,"heart-outline":983765,"heart-plus":988206,"heart-plus-outline":988209,"heart-pulse":984566,"heart-remove":988208,"heart-remove-outline":988211,"helicopter":985794,"help":983766,"help-box":984971,"help-circle":983767,"help-circle-outline":984613,"help-network":984821,"help-network-outline":986250,"help-rhombus":986021,"help-rhombus-outline":986022,"hexadecimal":987815,"hexagon":983768,"hexagon-multiple":984801,"hexagon-multiple-outline":987378,"hexagon-outline":983769,"hexagon-slice-1":985795,"hexagon-slice-2":985796,"hexagon-slice-3":985797,"hexagon-slice-4":985798,"hexagon-slice-5":985799,"hexagon-slice-6":985800,"hexagram":985801,"hexagram-outline":985802,"high-definition":985039,"high-definition-box":985208,"highway":984567,"hiking":986495,"hinduism":985459,"history":983770,"hockey-puck":985209,"hockey-sticks":985210,"hololens":983771,"home":983772,"home-account":985126,"home-alert":985211,"home-analytics":986810,"home-assistant":985040,"home-automation":985041,"home-circle":985042,"home-circle-outline":987213,"home-city":986389,"home-city-outline":986390,"home-currency-usd":985263,"home-edit":987481,"home-edit-outline":987482,"home-export-outline":987035,"home-flood":986874,"home-floor-0":986578,"home-floor-1":986496,"home-floor-2":986497,"home-floor-3":986498,"home-floor-a":986499,"home-floor-b":986500,"home-floor-g":986501,"home-floor-l":986502,"home-floor-negative-1":986579,"home-group":986580,"home-heart":985127,"home-import-outline":987036,"home-lightbulb":987729,"home-lightbulb-outline":987730,"home-lock":985323,"home-lock-open":985324,"home-map-marker":984568,"home-minus":985460,"home-minus-outline":988117,"home-modern":983773,"home-outline":984737,"home-plus":985461,"home-plus-outline":988118,"home-remove":987719,"home-remove-outline":988119,"home-roof":987435,"home-search":988080,"home-search-outline":988081,"home-thermometer":986964,"home-thermometer-outline":986965,"home-variant":983774,"home-variant-outline":986023,"hook":984802,"hook-off":984803,"hops":983775,"horizontal-rotate-clockwise":987379,"horizontal-rotate-counterclockwise":987380,"horseshoe":985688,"hospital":987126,"hospital-box":983776,"hospital-box-outline":987127,"hospital-building":983777,"hospital-marker":983778,"hot-tub":985128,"hours-24":988280,"hubspot":986391,"hulu":985129,"human":983782,"human-baby-changing-table":988043,"human-child":983783,"human-female":984649,"human-female-boy":985689,"human-female-female":985690,"human-female-girl":985691,"human-greeting":984650,"human-handsdown":984651,"human-handsup":984652,"human-male":984653,"human-male-boy":985692,"human-male-child":988044,"human-male-female":983784,"human-male-girl":985693,"human-male-height":986875,"human-male-height-variant":986876,"human-male-male":985694,"human-pregnant":984527,"human-wheelchair":988045,"humble-bundle":984900,"hvac":987986,"hydraulic-oil-level":987940,"hydraulic-oil-temperature":987941,"hydro-power":987877,"ice-cream":985130,"ice-cream-off":986706,"ice-pop":986877,"id-card":987072,"identifier":986878,"ideogram-cjk":987953,"ideogram-cjk-variant":987954,"iframe":986251,"iframe-array":987381,"iframe-array-outline":987382,"iframe-braces":987383,"iframe-braces-outline":987384,"iframe-outline":986252,"iframe-parentheses":987385,"iframe-parentheses-outline":987386,"iframe-variable":987387,"iframe-variable-outline":987388,"image":983785,"image-album":983786,"image-area":983787,"image-area-close":983788,"image-auto-adjust":987073,"image-broken":983789,"image-broken-variant":983790,"image-edit":987619,"image-edit-outline":987620,"image-filter-black-white":983792,"image-filter-center-focus":983793,"image-filter-center-focus-strong":986879,"image-filter-center-focus-strong-outline":986880,"image-filter-center-focus-weak":983794,"image-filter-drama":983795,"image-filter-frames":983796,"image-filter-hdr":983797,"image-filter-none":983798,"image-filter-tilt-shift":983799,"image-filter-vintage":983800,"image-frame":986697,"image-minus":988185,"image-move":985592,"image-multiple":983801,"image-multiple-outline":983791,"image-off":985131,"image-off-outline":987601,"image-outline":985462,"image-plus":985212,"image-remove":988184,"image-search":985463,"image-search-outline":985464,"image-size-select-actual":986253,"image-size-select-large":986254,"image-size-select-small":986255,"import":983802,"inbox":984711,"inbox-arrow-down":983803,"inbox-arrow-down-outline":987760,"inbox-arrow-up":984017,"inbox-arrow-up-outline":987761,"inbox-full":987762,"inbox-full-outline":987763,"inbox-multiple":985264,"inbox-multiple-outline":986024,"inbox-outline":987764,"incognito":984569,"incognito-circle":988193,"incognito-circle-off":988194,"incognito-off":983157,"infinity":984804,"information":983804,"information-outline":983805,"information-variant":984654,"instagram":983806,"instrument-triangle":987214,"invert-colors":983809,"invert-colors-off":986698,"iobroker":987880,"ip":985695,"ip-network":985696,"ip-network-outline":986256,"ipod":986257,"islam":985465,"island":987215,"iv-bag":987321,"jabber":986581,"jeepney":983810,"jellyfish":986881,"jellyfish-outline":986882,"jira":983811,"jquery":985213,"jsfiddle":983812,"judaism":985466,"jump-rope":987903,"kabaddi":986503,"karate":985132,"keg":983813,"kettle":984570,"kettle-alert":987927,"kettle-alert-outline":987928,"kettle-off":987931,"kettle-off-outline":987932,"kettle-outline":986966,"kettle-steam":987929,"kettle-steam-outline":987930,"kettlebell":987904,"key":983814,"key-arrow-right":987922,"key-change":983815,"key-link":987551,"key-minus":983816,"key-outline":986582,"key-plus":983817,"key-remove":983818,"key-star":987550,"key-variant":983819,"key-wireless":987074,"keyboard":983820,"keyboard-backspace":983821,"keyboard-caps":983822,"keyboard-close":983823,"keyboard-esc":987831,"keyboard-f1":987819,"keyboard-f10":987828,"keyboard-f11":987829,"keyboard-f12":987830,"keyboard-f2":987820,"keyboard-f3":987821,"keyboard-f4":987822,"keyboard-f5":987823,"keyboard-f6":987824,"keyboard-f7":987825,"keyboard-f8":987826,"keyboard-f9":987827,"keyboard-off":983824,"keyboard-off-outline":986699,"keyboard-outline":985467,"keyboard-return":983825,"keyboard-settings":985593,"keyboard-settings-outline":985594,"keyboard-space":987216,"keyboard-tab":983826,"keyboard-variant":983827,"khanda":987389,"kickstarter":984901,"klingon":987995,"knife":985595,"knife-military":985596,"kodi":983828,"kubernetes":987390,"label":983829,"label-multiple":988021,"label-multiple-outline":988022,"label-off":985803,"label-off-outline":985804,"label-outline":983830,"label-percent":987882,"label-percent-outline":987883,"label-variant":985805,"label-variant-outline":985806,"ladybug":985133,"lambda":984615,"lamp":984757,"lan":983831,"lan-check":987818,"lan-connect":983832,"lan-disconnect":983833,"lan-pending":983834,"language-c":984689,"language-cpp":984690,"language-csharp":983835,"language-css3":983836,"language-fortran":987674,"language-go":985043,"language-haskell":986258,"language-html5":983837,"language-java":985911,"language-javascript":983838,"language-kotlin":987673,"language-lua":985265,"language-markdown":983892,"language-markdown-outline":986971,"language-php":983839,"language-python":983840,"language-r":985044,"language-ruby":986413,"language-ruby-on-rails":985807,"language-swift":984805,"language-typescript":984806,"language-xaml":984691,"laptop":983842,"laptop-chromebook":983843,"laptop-mac":983844,"laptop-off":984807,"laptop-windows":983845,"laravel":985808,"laser-pointer":988292,"lasso":986883,"lastpass":984134,"latitude":986967,"launch":983847,"lava-lamp":985045,"layers":983848,"layers-minus":986700,"layers-off":983849,"layers-off-outline":985597,"layers-outline":985598,"layers-plus":986701,"layers-remove":986702,"layers-search":987654,"layers-search-outline":987655,"layers-triple":986968,"layers-triple-outline":986969,"lead-pencil":984655,"leaf":983850,"leaf-maple":986259,"leaf-maple-off":987866,"leaf-off":987865,"leak":986583,"leak-off":986584,"led-off":983851,"led-on":983852,"led-outline":983853,"led-strip":985046,"led-strip-variant":987217,"led-variant-off":983854,"led-variant-on":983855,"led-variant-outline":983856,"leek":987517,"less-than":985468,"less-than-or-equal":985469,"library":983857,"library-shelves":986025,"license":987075,"lifebuoy":985214,"light-switch":985470,"lightbulb":983861,"lightbulb-cfl":987656,"lightbulb-cfl-off":987657,"lightbulb-cfl-spiral":987765,"lightbulb-cfl-spiral-off":987843,"lightbulb-group":987731,"lightbulb-group-off":987853,"lightbulb-group-off-outline":987854,"lightbulb-group-outline":987732,"lightbulb-multiple":987733,"lightbulb-multiple-off":987855,"lightbulb-multiple-off-outline":987856,"lightbulb-multiple-outline":987734,"lightbulb-off":986703,"lightbulb-off-outline":986704,"lightbulb-on":984808,"lightbulb-on-outline":984809,"lightbulb-outline":983862,"lighthouse":985599,"lighthouse-on":985600,"lightning-bolt":988171,"lightning-bolt-outline":988172,"lingerie":988278,"link":983863,"link-box":986394,"link-box-outline":986395,"link-box-variant":986396,"link-box-variant-outline":986397,"link-lock":987322,"link-off":983864,"link-plus":986260,"link-variant":983865,"link-variant-minus":987391,"link-variant-off":983866,"link-variant-plus":987392,"link-variant-remove":987393,"linkedin":983867,"linux":983869,"linux-mint":985325,"lipstick":988085,"litecoin":985697,"loading":984946,"location-enter":987076,"location-exit":987077,"lock":983870,"lock-alert":985326,"lock-check":988058,"lock-clock":985471,"lock-open":983871,"lock-open-alert":988059,"lock-open-check":988060,"lock-open-outline":983872,"lock-open-variant":987078,"lock-open-variant-outline":987079,"lock-outline":983873,"lock-pattern":984810,"lock-plus":984571,"lock-question":985327,"lock-reset":984947,"lock-smart":985266,"locker":985047,"locker-multiple":985048,"login":983874,"login-variant":984572,"logout":983875,"logout-variant":984573,"longitude":986970,"looks":983876,"loupe":983877,"lumx":983878,"lungs":987268,"magnet":983879,"magnet-on":983880,"magnify":983881,"magnify-close":985472,"magnify-minus":983882,"magnify-minus-cursor":985698,"magnify-minus-outline":984812,"magnify-plus":983883,"magnify-plus-cursor":985699,"magnify-plus-outline":984813,"magnify-remove-cursor":987660,"magnify-remove-outline":987661,"magnify-scan":987766,"mail":986811,"mailbox":984814,"mailbox-open":986504,"mailbox-open-outline":986505,"mailbox-open-up":986506,"mailbox-open-up-outline":986507,"mailbox-outline":986508,"mailbox-up":986509,"mailbox-up-outline":986510,"map":983885,"map-check":986812,"map-check-outline":986813,"map-clock":986398,"map-clock-outline":986399,"map-legend":985601,"map-marker":983886,"map-marker-alert":986885,"map-marker-alert-outline":986886,"map-marker-check":986261,"map-marker-check-outline":987899,"map-marker-circle":983887,"map-marker-distance":985328,"map-marker-down":987394,"map-marker-left":987867,"map-marker-left-outline":987869,"map-marker-minus":984656,"map-marker-minus-outline":987897,"map-marker-multiple":983888,"map-marker-multiple-outline":987767,"map-marker-off":983889,"map-marker-off-outline":987901,"map-marker-outline":985049,"map-marker-path":986400,"map-marker-plus":984657,"map-marker-plus-outline":987896,"map-marker-question":986887,"map-marker-question-outline":986888,"map-marker-radius":983890,"map-marker-radius-outline":987900,"map-marker-remove":986889,"map-marker-remove-outline":987898,"map-marker-remove-variant":986890,"map-marker-right":987868,"map-marker-right-outline":987870,"map-marker-up":987395,"map-minus":985473,"map-outline":985474,"map-plus":985475,"map-search":985476,"map-search-outline":985477,"mapbox":986026,"margin":983891,"marker":984658,"marker-cancel":986585,"marker-check":983893,"mastodon":985809,"material-design":985478,"material-ui":983895,"math-compass":983896,"math-cos":986262,"math-integral":987080,"math-integral-box":987081,"math-log":987269,"math-norm":987082,"math-norm-box":987083,"math-sin":986263,"math-tan":986264,"matrix":984616,"medal":985479,"medal-outline":987942,"medical-bag":984815,"meditation":987515,"memory":983899,"menu":983900,"menu-down":983901,"menu-down-outline":984758,"menu-left":983902,"menu-left-outline":985602,"menu-open":986027,"menu-right":983903,"menu-right-outline":985603,"menu-swap":985700,"menu-swap-outline":985701,"menu-up":983904,"menu-up-outline":984759,"merge":986972,"message":983905,"message-alert":983906,"message-alert-outline":985604,"message-arrow-left":987890,"message-arrow-left-outline":987891,"message-arrow-right":987892,"message-arrow-right-outline":987893,"message-bulleted":984738,"message-bulleted-off":984739,"message-cog":984817,"message-cog-outline":987506,"message-draw":983907,"message-image":983908,"message-image-outline":987500,"message-lock":987084,"message-lock-outline":987501,"message-minus":987502,"message-minus-outline":987503,"message-outline":983909,"message-plus":984659,"message-plus-outline":987323,"message-processing":983910,"message-processing-outline":987504,"message-reply":983911,"message-reply-text":983912,"message-settings":984816,"message-settings-outline":987505,"message-text":983913,"message-text-clock":987507,"message-text-clock-outline":987508,"message-text-lock":987085,"message-text-lock-outline":987509,"message-text-outline":983914,"message-video":983915,"meteor":984617,"metronome":985050,"metronome-tick":985051,"micro-sd":985052,"microphone":983916,"microphone-minus":985267,"microphone-off":983917,"microphone-outline":983918,"microphone-plus":985268,"microphone-settings":983919,"microphone-variant":983920,"microphone-variant-off":983921,"microscope":984660,"microsoft":983922,"microsoft-access":988046,"microsoft-azure":985093,"microsoft-azure-devops":987093,"microsoft-bing":983204,"microsoft-dynamics-365":985480,"microsoft-edge":983529,"microsoft-edge-legacy":987728,"microsoft-excel":988047,"microsoft-internet-explorer":983808,"microsoft-office":984006,"microsoft-onedrive":984010,"microsoft-onenote":984903,"microsoft-outlook":986402,"microsoft-powerpoint":988048,"microsoft-sharepoint":988049,"microsoft-teams":983739,"microsoft-visual-studio":984592,"microsoft-visual-studio-code":985630,"microsoft-windows":984499,"microsoft-windows-classic":985633,"microsoft-word":988050,"microsoft-xbox":984505,"microsoft-xbox-controller":984506,"microsoft-xbox-controller-battery-alert":984907,"microsoft-xbox-controller-battery-charging":985634,"microsoft-xbox-controller-battery-empty":984908,"microsoft-xbox-controller-battery-full":984909,"microsoft-xbox-controller-battery-low":984910,"microsoft-xbox-controller-battery-medium":984911,"microsoft-xbox-controller-battery-unknown":984912,"microsoft-xbox-controller-menu":986735,"microsoft-xbox-controller-off":984507,"microsoft-xbox-controller-view":986736,"microsoft-yammer":984969,"microwave":986265,"microwave-off":988195,"middleware":986973,"middleware-outline":986974,"midi":985329,"midi-port":985330,"mine":986586,"minecraft":983923,"mini-sd":985605,"minidisc":985606,"minus":983924,"minus-box":983925,"minus-box-multiple":987457,"minus-box-multiple-outline":987458,"minus-box-outline":984818,"minus-circle":983926,"minus-circle-multiple":983898,"minus-circle-multiple-outline":985811,"minus-circle-off":988249,"minus-circle-off-outline":988250,"minus-circle-outline":983927,"minus-network":983928,"minus-network-outline":986266,"mirror":987645,"mixed-martial-arts":986511,"mixed-reality":985215,"mixer":985053,"molecule":986028,"molecule-co":987902,"molecule-co2":985060,"monitor":983929,"monitor-cellphone":985481,"monitor-cellphone-star":985482,"monitor-clean":987396,"monitor-dashboard":985607,"monitor-edit":987846,"monitor-eye":988084,"monitor-lock":986587,"monitor-multiple":983930,"monitor-off":986512,"monitor-screenshot":986705,"monitor-share":988291,"monitor-speaker":986975,"monitor-speaker-off":986976,"monitor-star":986588,"moon-first-quarter":986977,"moon-full":986978,"moon-last-quarter":986979,"moon-new":986980,"moon-waning-crescent":986981,"moon-waning-gibbous":986982,"moon-waxing-crescent":986983,"moon-waxing-gibbous":986984,"moped":987270,"more":983931,"mother-heart":987924,"mother-nurse":986401,"motion-sensor":986513,"motion-sensor-off":988213,"motorbike":983932,"mouse":983933,"mouse-bluetooth":985483,"mouse-off":983934,"mouse-variant":983935,"mouse-variant-off":983936,"move-resize":984661,"move-resize-variant":984662,"movie":983937,"movie-edit":987426,"movie-edit-outline":987427,"movie-filter":987428,"movie-filter-outline":987429,"movie-open":987086,"movie-open-outline":987087,"movie-outline":986589,"movie-roll":985054,"movie-search":987602,"movie-search-outline":987603,"muffin":985484,"multiplication":983938,"multiplication-box":983939,"mushroom":985055,"mushroom-off":988154,"mushroom-off-outline":988155,"mushroom-outline":985056,"music":984922,"music-accidental-double-flat":986985,"music-accidental-double-sharp":986986,"music-accidental-flat":986987,"music-accidental-natural":986988,"music-accidental-sharp":986989,"music-box":983940,"music-box-multiple":983859,"music-box-multiple-outline":986884,"music-box-outline":983941,"music-circle":983942,"music-circle-outline":985812,"music-clef-alto":986990,"music-clef-bass":986991,"music-clef-treble":986992,"music-note":983943,"music-note-bluetooth":984574,"music-note-bluetooth-off":984575,"music-note-eighth":983944,"music-note-eighth-dotted":986993,"music-note-half":983945,"music-note-half-dotted":986994,"music-note-off":983946,"music-note-off-outline":986995,"music-note-outline":986996,"music-note-plus":986590,"music-note-quarter":983947,"music-note-quarter-dotted":986997,"music-note-sixteenth":983948,"music-note-sixteenth-dotted":986998,"music-note-whole":983949,"music-note-whole-dotted":986999,"music-off":984923,"music-rest-eighth":987000,"music-rest-half":987001,"music-rest-quarter":987002,"music-rest-sixteenth":987003,"music-rest-whole":987004,"nail":986591,"nas":985331,"nativescript":985216,"nature":983950,"nature-people":983951,"navigation":983952,"near-me":984525,"necklace":986891,"needle":983953,"netflix":984902,"network":984819,"network-off":986267,"network-off-outline":986268,"network-outline":986269,"network-strength-1":985332,"network-strength-1-alert":985333,"network-strength-2":985334,"network-strength-2-alert":985335,"network-strength-3":985336,"network-strength-3-alert":985337,"network-strength-4":985338,"network-strength-4-alert":985339,"network-strength-off":985340,"network-strength-off-outline":985341,"network-strength-outline":985342,"new-box":983956,"newspaper":983957,"newspaper-minus":986892,"newspaper-plus":986893,"newspaper-variant":987137,"newspaper-variant-multiple":987138,"newspaper-variant-multiple-outline":987139,"newspaper-variant-outline":987140,"nfc":983958,"nfc-search-variant":986707,"nfc-tap":983959,"nfc-variant":983960,"nfc-variant-off":986708,"ninja":984948,"nintendo-game-boy":988051,"nintendo-switch":985057,"nintendo-wii":984491,"nintendo-wiiu":984877,"nix":987397,"nodejs":983961,"noodles":987518,"not-equal":985485,"not-equal-variant":985486,"note":983962,"note-multiple":984760,"note-multiple-outline":984761,"note-outline":983963,"note-plus":983964,"note-plus-outline":983965,"note-text":983966,"note-text-outline":987607,"notebook":985134,"notebook-multiple":986709,"notebook-outline":986815,"notification-clear-all":983967,"npm":984823,"nuke":984740,"null":985058,"numeric":983968,"numeric-0":985913,"numeric-0-box":983969,"numeric-0-box-multiple":986894,"numeric-0-box-multiple-outline":983970,"numeric-0-box-outline":983971,"numeric-0-circle":986270,"numeric-0-circle-outline":986271,"numeric-1":985914,"numeric-1-box":983972,"numeric-1-box-multiple":986895,"numeric-1-box-multiple-outline":983973,"numeric-1-box-outline":983974,"numeric-1-circle":986272,"numeric-1-circle-outline":986273,"numeric-10":987113,"numeric-10-box":987005,"numeric-10-box-multiple":987114,"numeric-10-box-multiple-outline":987115,"numeric-10-box-outline":987006,"numeric-10-circle":987116,"numeric-10-circle-outline":987117,"numeric-2":985915,"numeric-2-box":983975,"numeric-2-box-multiple":986896,"numeric-2-box-multiple-outline":983976,"numeric-2-box-outline":983977,"numeric-2-circle":986274,"numeric-2-circle-outline":986275,"numeric-3":985916,"numeric-3-box":983978,"numeric-3-box-multiple":986897,"numeric-3-box-multiple-outline":983979,"numeric-3-box-outline":983980,"numeric-3-circle":986276,"numeric-3-circle-outline":986277,"numeric-4":985917,"numeric-4-box":983981,"numeric-4-box-multiple":986898,"numeric-4-box-multiple-outline":983986,"numeric-4-box-outline":983982,"numeric-4-circle":986278,"numeric-4-circle-outline":986279,"numeric-5":985918,"numeric-5-box":983985,"numeric-5-box-multiple":986899,"numeric-5-box-multiple-outline":983983,"numeric-5-box-outline":983984,"numeric-5-circle":986280,"numeric-5-circle-outline":986281,"numeric-6":985919,"numeric-6-box":983987,"numeric-6-box-multiple":986900,"numeric-6-box-multiple-outline":983988,"numeric-6-box-outline":983989,"numeric-6-circle":986282,"numeric-6-circle-outline":986283,"numeric-7":985920,"numeric-7-box":983990,"numeric-7-box-multiple":986901,"numeric-7-box-multiple-outline":983991,"numeric-7-box-outline":983992,"numeric-7-circle":986284,"numeric-7-circle-outline":986285,"numeric-8":985921,"numeric-8-box":983993,"numeric-8-box-multiple":986902,"numeric-8-box-multiple-outline":983994,"numeric-8-box-outline":983995,"numeric-8-circle":986286,"numeric-8-circle-outline":986287,"numeric-9":985922,"numeric-9-box":983996,"numeric-9-box-multiple":986903,"numeric-9-box-multiple-outline":983997,"numeric-9-box-outline":983998,"numeric-9-circle":986288,"numeric-9-circle-outline":986289,"numeric-9-plus":987118,"numeric-9-plus-box":983999,"numeric-9-plus-box-multiple":986904,"numeric-9-plus-box-multiple-outline":984000,"numeric-9-plus-box-outline":984001,"numeric-9-plus-circle":986290,"numeric-9-plus-circle-outline":986291,"numeric-negative-1":987218,"nut":984824,"nutrition":984002,"nuxt":987398,"oar":984700,"ocarina":986592,"oci":987881,"ocr":987450,"octagon":984003,"octagon-outline":984004,"octagram":984825,"octagram-outline":984949,"odnoklassniki":984005,"offer":987675,"office-building":985489,"oil":984007,"oil-lamp":986905,"oil-level":987219,"oil-temperature":987128,"omega":984009,"one-up":986029,"onepassword":985217,"opacity":984524,"open-in-app":984011,"open-in-new":984012,"open-source-initiative":986030,"openid":984013,"opera":984014,"orbit":983064,"order-alphabetical-ascending":983565,"order-alphabetical-descending":986375,"order-bool-ascending":983742,"order-bool-ascending-variant":985487,"order-bool-descending":988036,"order-bool-descending-variant":985488,"order-numeric-ascending":984389,"order-numeric-descending":984390,"origin":985923,"ornament":984015,"ornament-variant":984016,"outdoor-lamp":987220,"overscan":987141,"owl":984018,"pac-man":986031,"package":984019,"package-down":984020,"package-up":984021,"package-variant":984022,"package-variant-closed":984023,"page-first":984576,"page-last":984577,"page-layout-body":984826,"page-layout-footer":984827,"page-layout-header":984828,"page-layout-header-footer":987007,"page-layout-sidebar-left":984829,"page-layout-sidebar-right":984830,"page-next":986032,"page-next-outline":986033,"page-previous":986034,"page-previous-outline":986035,"pail":988183,"pail-minus":988215,"pail-minus-outline":988220,"pail-off":988217,"pail-off-outline":988222,"pail-outline":988218,"pail-plus":988214,"pail-plus-outline":988219,"pail-remove":988216,"pail-remove-outline":988221,"palette":984024,"palette-advanced":984025,"palette-outline":986636,"palette-swatch":985269,"palette-swatch-outline":987996,"palm-tree":987221,"pan":986036,"pan-bottom-left":986037,"pan-bottom-right":986038,"pan-down":986039,"pan-horizontal":986040,"pan-left":986041,"pan-right":986042,"pan-top-left":986043,"pan-top-right":986044,"pan-up":986045,"pan-vertical":986046,"panda":984026,"pandora":984027,"panorama":984028,"panorama-fisheye":984029,"panorama-horizontal":984030,"panorama-vertical":984031,"panorama-wide-angle":984032,"paper-cut-vertical":984033,"paper-roll":987479,"paper-roll-outline":987480,"paperclip":984034,"parachute":986292,"parachute-outline":986293,"parking":984035,"party-popper":987222,"passport":985059,"passport-biometric":986593,"pasta":987488,"patio-heater":987008,"patreon":985218,"pause":984036,"pause-circle":984037,"pause-circle-outline":984038,"pause-octagon":984039,"pause-octagon-outline":984040,"paw":984041,"paw-off":984663,"pdf-box":986710,"peace":985220,"peanut":987132,"peanut-off":987133,"peanut-off-outline":987135,"peanut-outline":987134,"pen":984042,"pen-lock":986594,"pen-minus":986595,"pen-off":986596,"pen-plus":986597,"pen-remove":986598,"pencil":984043,"pencil-box":984044,"pencil-box-multiple":987460,"pencil-box-multiple-outline":987461,"pencil-box-outline":984045,"pencil-circle":984831,"pencil-circle-outline":984950,"pencil-lock":984046,"pencil-lock-outline":986599,"pencil-minus":986600,"pencil-minus-outline":986601,"pencil-off":984047,"pencil-off-outline":986602,"pencil-outline":986294,"pencil-plus":986603,"pencil-plus-outline":986604,"pencil-remove":986605,"pencil-remove-outline":986606,"pencil-ruler":987987,"penguin":986816,"pentagon":984833,"pentagon-outline":984832,"percent":984048,"percent-outline":987768,"periodic-table":985270,"perspective-less":986403,"perspective-more":986404,"pharmacy":984049,"phone":984050,"phone-alert":986906,"phone-alert-outline":987534,"phone-bluetooth":984051,"phone-bluetooth-outline":987535,"phone-cancel":987324,"phone-cancel-outline":987536,"phone-check":987561,"phone-check-outline":987562,"phone-classic":984578,"phone-classic-off":987769,"phone-forward":984052,"phone-forward-outline":987537,"phone-hangup":984053,"phone-hangup-outline":987538,"phone-in-talk":984054,"phone-in-talk-outline":987522,"phone-incoming":984055,"phone-incoming-outline":987539,"phone-lock":984056,"phone-lock-outline":987540,"phone-log":984057,"phone-log-outline":987541,"phone-message":987542,"phone-message-outline":987543,"phone-minus":984664,"phone-minus-outline":987544,"phone-missed":984058,"phone-missed-outline":987557,"phone-off":986607,"phone-off-outline":987558,"phone-outgoing":984059,"phone-outgoing-outline":987545,"phone-outline":986608,"phone-paused":984060,"phone-paused-outline":987546,"phone-plus":984665,"phone-plus-outline":987547,"phone-return":985135,"phone-return-outline":987548,"phone-ring":987563,"phone-ring-outline":987564,"phone-rotate-landscape":985221,"phone-rotate-portrait":985222,"phone-settings":984061,"phone-settings-outline":987549,"phone-voip":984062,"pi":984063,"pi-box":984064,"pi-hole":986609,"piano":984701,"pickaxe":985271,"picture-in-picture-bottom-right":986711,"picture-in-picture-bottom-right-outline":986712,"picture-in-picture-top-right":986713,"picture-in-picture-top-right-outline":986714,"pier":985223,"pier-crane":985224,"pig":984065,"pig-variant":987142,"piggy-bank":987143,"pill":984066,"pillar":984834,"pin":984067,"pin-off":984068,"pin-off-outline":985392,"pin-outline":985393,"pine-tree":984069,"pine-tree-box":984070,"pine-tree-fire":988186,"pinterest":984071,"pinwheel":985813,"pinwheel-outline":985814,"pipe":985061,"pipe-disconnected":985062,"pipe-leak":985225,"pipe-wrench":987988,"pirate":985608,"pistol":984835,"piston":985226,"pizza":984073,"play":984074,"play-box":987770,"play-box-multiple":986393,"play-box-multiple-outline":988134,"play-box-outline":984075,"play-circle":984076,"play-circle-outline":984077,"play-network":985227,"play-network-outline":986295,"play-outline":986907,"play-pause":984078,"play-protected-content":984079,"play-speed":985343,"playlist-check":984519,"playlist-edit":985344,"playlist-minus":984080,"playlist-music":986296,"playlist-music-outline":986297,"playlist-play":984081,"playlist-plus":984082,"playlist-remove":984083,"playlist-star":986610,"plex":984762,"plus":984085,"plus-box":984086,"plus-box-multiple":983860,"plus-box-multiple-outline":987459,"plus-box-outline":984836,"plus-circle":984087,"plus-circle-multiple":983884,"plus-circle-multiple-outline":984088,"plus-circle-outline":984089,"plus-minus":985490,"plus-minus-box":985491,"plus-minus-variant":988361,"plus-network":984090,"plus-network-outline":986298,"plus-one":984091,"plus-outline":984837,"plus-thick":987628,"podcast":985492,"podium":986405,"podium-bronze":986406,"podium-gold":986407,"podium-silver":986408,"point-of-sale":986514,"pokeball":984093,"pokemon-go":985609,"poker-chip":985136,"polaroid":984094,"police-badge":987495,"police-badge-outline":987496,"poll":984095,"poll-box":984096,"poll-box-outline":987771,"polo":988355,"polymer":984097,"pool":984582,"popcorn":984098,"post":987144,"post-outline":987145,"postage-stamp":986299,"pot":983781,"pot-mix":984667,"pot-mix-outline":984695,"pot-outline":983807,"pot-steam":984666,"pot-steam-outline":983846,"pound":984099,"pound-box":984100,"pound-box-outline":987519,"power":984101,"power-cycle":985345,"power-off":985346,"power-on":985347,"power-plug":984741,"power-plug-off":984742,"power-plug-off-outline":988196,"power-plug-outline":988197,"power-settings":984102,"power-sleep":985348,"power-socket":984103,"power-socket-au":985349,"power-socket-de":987399,"power-socket-eu":985063,"power-socket-fr":987400,"power-socket-jp":987401,"power-socket-uk":985064,"power-socket-us":985065,"power-standby":985350,"powershell":985610,"prescription":984838,"presentation":984104,"presentation-play":984105,"printer":984106,"printer-3d":984107,"printer-3d-nozzle":986715,"printer-3d-nozzle-alert":987584,"printer-3d-nozzle-alert-outline":987585,"printer-3d-nozzle-outline":986716,"printer-alert":984108,"printer-check":987462,"printer-eye":988248,"printer-off":986717,"printer-pos":987223,"printer-search":988247,"printer-settings":984839,"printer-wireless":985611,"priority-high":984579,"priority-low":984580,"professional-hexagon":984109,"progress-alert":986300,"progress-check":985493,"progress-clock":985494,"progress-close":987402,"progress-download":985495,"progress-upload":985496,"progress-wrench":986301,"projector":984110,"projector-screen":984111,"propane-tank":987991,"propane-tank-outline":987992,"protocol":987096,"publish":984743,"pulse":984112,"pump":988162,"pumpkin":986047,"purse":986908,"purse-outline":986909,"puzzle":984113,"puzzle-check":988198,"puzzle-check-outline":988199,"puzzle-edit":988371,"puzzle-edit-outline":988377,"puzzle-heart":988372,"puzzle-heart-outline":988378,"puzzle-minus":988369,"puzzle-minus-outline":988375,"puzzle-outline":985702,"puzzle-plus":988368,"puzzle-plus-outline":988374,"puzzle-remove":988370,"puzzle-remove-outline":988376,"puzzle-star":988373,"puzzle-star-outline":988379,"qi":985497,"qqchat":984581,"qrcode":984114,"qrcode-edit":985272,"qrcode-minus":987532,"qrcode-plus":987531,"qrcode-remove":987533,"qrcode-scan":984115,"quadcopter":984116,"quality-high":984117,"quality-low":985612,"quality-medium":985613,"quora":986409,"rabbit":985351,"racing-helmet":986515,"racquetball":986516,"radar":984119,"radiator":984120,"radiator-disabled":985815,"radiator-off":985816,"radio":984121,"radio-am":986302,"radio-fm":986303,"radio-handheld":984122,"radio-off":987676,"radio-tower":984123,"radioactive":984124,"radioactive-off":986817,"radiobox-blank":984125,"radiobox-marked":984126,"radiology-box":988357,"radiology-box-outline":988358,"radius":986304,"radius-outline":986305,"railroad-light":986910,"raspberry-pi":984127,"ray-end":984128,"ray-end-arrow":984129,"ray-start":984130,"ray-start-arrow":984131,"ray-start-end":984132,"ray-vertex":984133,"react":984840,"read":984135,"receipt":984137,"record":984138,"record-circle":986818,"record-circle-outline":986819,"record-player":985498,"record-rec":984139,"rectangle":986718,"rectangle-outline":986719,"recycle":984140,"recycle-variant":988061,"reddit":984141,"redhat":987419,"redo":984142,"redo-variant":984143,"reflect-horizontal":985614,"reflect-vertical":985615,"refresh":984144,"refresh-circle":988023,"regex":984145,"registered-trademark":985703,"relation-many-to-many":988310,"relation-many-to-one":988311,"relation-many-to-one-or-many":988312,"relation-many-to-only-one":988313,"relation-many-to-zero-or-many":988314,"relation-many-to-zero-or-one":988315,"relation-one-or-many-to-many":988316,"relation-one-or-many-to-one":988317,"relation-one-or-many-to-one-or-many":988318,"relation-one-or-many-to-only-one":988319,"relation-one-or-many-to-zero-or-many":988320,"relation-one-or-many-to-zero-or-one":988321,"relation-one-to-many":988322,"relation-one-to-one":988323,"relation-one-to-one-or-many":988324,"relation-one-to-only-one":988325,"relation-one-to-zero-or-many":988326,"relation-one-to-zero-or-one":988327,"relation-only-one-to-many":988328,"relation-only-one-to-one":988329,"relation-only-one-to-one-or-many":988330,"relation-only-one-to-only-one":988331,"relation-only-one-to-zero-or-many":988332,"relation-only-one-to-zero-or-one":988333,"relation-zero-or-many-to-many":988334,"relation-zero-or-many-to-one":988335,"relation-zero-or-many-to-one-or-many":988336,"relation-zero-or-many-to-only-one":988337,"relation-zero-or-many-to-zero-or-many":988338,"relation-zero-or-many-to-zero-or-one":988339,"relation-zero-or-one-to-many":988340,"relation-zero-or-one-to-one":988341,"relation-zero-or-one-to-one-or-many":988342,"relation-zero-or-one-to-only-one":988343,"relation-zero-or-one-to-zero-or-many":988344,"relation-zero-or-one-to-zero-or-one":988345,"relative-scale":984146,"reload":984147,"reload-alert":987403,"reminder":985228,"remote":984148,"remote-desktop":985273,"remote-off":986820,"remote-tv":986821,"remote-tv-off":986822,"rename-box":984149,"reorder-horizontal":984712,"reorder-vertical":984713,"repeat":984150,"repeat-off":984151,"repeat-once":984152,"replay":984153,"reply":984154,"reply-all":984155,"reply-all-outline":986911,"reply-circle":987566,"reply-outline":986912,"reproduction":984156,"resistor":985924,"resistor-nodes":985925,"resize":985704,"resize-bottom-right":984157,"responsive":984158,"restart":984841,"restart-alert":987404,"restart-off":986517,"restore":985499,"restore-alert":987405,"rewind":984159,"rewind-10":986410,"rewind-30":986518,"rewind-5":987641,"rewind-outline":984842,"rhombus":984843,"rhombus-medium":985616,"rhombus-medium-outline":988380,"rhombus-outline":984844,"rhombus-split":985617,"rhombus-split-outline":988381,"ribbon":984160,"rice":985066,"ring":985067,"rivet":986720,"road":984161,"road-variant":984162,"robber":987224,"robot":984745,"robot-industrial":985926,"robot-mower":987639,"robot-mower-outline":987635,"robot-vacuum":984845,"robot-vacuum-variant":985352,"rocket":984163,"rocket-launch":988382,"rocket-launch-outline":988383,"rocket-outline":988079,"rodent":987943,"roller-skate":986411,"roller-skate-off":983365,"rollerblade":986412,"rollerblade-off":983086,"rollupjs":986048,"roman-numeral-1":987272,"roman-numeral-10":987281,"roman-numeral-2":987273,"roman-numeral-3":987274,"roman-numeral-4":987275,"roman-numeral-5":987276,"roman-numeral-6":987277,"roman-numeral-7":987278,"roman-numeral-8":987279,"roman-numeral-9":987280,"room-service":985229,"room-service-outline":986519,"rotate-3d":986823,"rotate-3d-variant":984164,"rotate-left":984165,"rotate-left-variant":984166,"rotate-orbit":986520,"rotate-right":984167,"rotate-right-variant":984168,"rounded-corner":984583,"router":987618,"router-network":987271,"router-wireless":984169,"router-wireless-settings":985705,"routes":984170,"routes-clock":987225,"rowing":984584,"rss":984171,"rss-box":984172,"rss-off":986913,"rug":988277,"rugby":986521,"ruler":984173,"ruler-square":986306,"ruler-square-compass":986814,"run":984846,"run-fast":984174,"rv-truck":987604,"sack":986414,"sack-percent":986415,"safe":985706,"safe-square":987772,"safe-square-outline":987773,"safety-goggles":986416,"sail-boat":986824,"sale":984175,"salesforce":985230,"sass":985068,"satellite":984176,"satellite-uplink":985353,"satellite-variant":984177,"sausage":985274,"saw-blade":986721,"sawtooth-wave":988282,"saxophone":984585,"scale":984178,"scale-balance":984529,"scale-bathroom":984179,"scale-off":987226,"scan-helper":988120,"scanner":984747,"scanner-off":985354,"scatter-plot":986825,"scatter-plot-outline":986826,"school":984180,"school-outline":987520,"scissors-cutting":985707,"scooter":987625,"scoreboard":987774,"scoreboard-outline":987775,"screen-rotation":984181,"screen-rotation-lock":984184,"screw-flat-top":986611,"screw-lag":986612,"screw-machine-flat-top":986613,"screw-machine-round-top":986614,"screw-round-top":986615,"screwdriver":984182,"script":986049,"script-outline":984183,"script-text":986050,"script-text-outline":986051,"sd":984185,"seal":984186,"seal-variant":987097,"search-web":984847,"seat":986307,"seat-flat":984187,"seat-flat-angled":984188,"seat-individual-suite":984189,"seat-legroom-extra":984190,"seat-legroom-normal":984191,"seat-legroom-reduced":984192,"seat-outline":986308,"seat-passenger":987721,"seat-recline-extra":984193,"seat-recline-normal":984194,"seatbelt":986309,"security":984195,"security-network":984196,"seed":986722,"seed-off":988157,"seed-off-outline":988158,"seed-outline":986723,"segment":986827,"select":984197,"select-all":984198,"select-color":986417,"select-compare":985817,"select-drag":985708,"select-group":987010,"select-inverse":984199,"select-marker":987776,"select-multiple":987777,"select-multiple-marker":987778,"select-off":984200,"select-place":987098,"select-search":987652,"selection":984201,"selection-drag":985709,"selection-ellipse":986418,"selection-ellipse-arrow-inside":986914,"selection-marker":987779,"selection-multiple":987781,"selection-multiple-marker":987780,"selection-off":984951,"selection-search":987653,"semantic-web":987926,"send":984202,"send-check":987489,"send-check-outline":987490,"send-circle":986616,"send-circle-outline":986617,"send-clock":987491,"send-clock-outline":987492,"send-lock":985069,"send-lock-outline":987494,"send-outline":987493,"serial-port":984668,"server":984203,"server-minus":984204,"server-network":984205,"server-network-off":984206,"server-off":984207,"server-plus":984208,"server-remove":984209,"server-security":984210,"set-all":984952,"set-center":984953,"set-center-right":984954,"set-left":984955,"set-left-center":984956,"set-left-right":984957,"set-merge":988384,"set-none":984958,"set-right":984959,"set-split":988385,"set-square":988253,"set-top-box":985503,"settings-helper":985710,"shaker":987406,"shaker-outline":987407,"shape":985137,"shape-circle-plus":984669,"shape-outline":985138,"shape-oval-plus":987642,"shape-plus":984213,"shape-polygon-plus":984670,"shape-rectangle-plus":984671,"shape-square-plus":984672,"share":984214,"share-all":987636,"share-all-outline":987637,"share-circle":987565,"share-off":986915,"share-off-outline":986916,"share-outline":985394,"share-variant":984215,"sheep":986310,"shield":984216,"shield-account":985231,"shield-account-outline":985618,"shield-airplane":984763,"shield-airplane-outline":986311,"shield-alert":986828,"shield-alert-outline":986829,"shield-bug":988122,"shield-bug-outline":988123,"shield-car":987011,"shield-check":984421,"shield-check-outline":986312,"shield-cross":986313,"shield-cross-outline":986314,"shield-edit":987552,"shield-edit-outline":987553,"shield-half":988000,"shield-half-full":984960,"shield-home":984714,"shield-home-outline":986315,"shield-key":986052,"shield-key-outline":986053,"shield-link-variant":986419,"shield-link-variant-outline":986420,"shield-lock":985501,"shield-lock-outline":986316,"shield-off":985502,"shield-off-outline":985500,"shield-outline":984217,"shield-plus":985818,"shield-plus-outline":985819,"shield-refresh":983210,"shield-refresh-outline":983520,"shield-remove":985820,"shield-remove-outline":985821,"shield-search":986522,"shield-star":987451,"shield-star-outline":987452,"shield-sun":987229,"shield-sun-outline":987230,"shield-sync":987554,"shield-sync-outline":987555,"ship-wheel":985139,"shoe-formal":985927,"shoe-heel":985928,"shoe-print":986618,"shopping":984218,"shopping-music":984219,"shopping-outline":987605,"shopping-search":987012,"shovel":984848,"shovel-off":984849,"shower":985504,"shower-head":985505,"shredder":984220,"shuffle":984221,"shuffle-disabled":984222,"shuffle-variant":984223,"shuriken":988031,"sigma":984224,"sigma-lower":984619,"sign-caution":984225,"sign-direction":984961,"sign-direction-minus":987136,"sign-direction-plus":987100,"sign-direction-remove":987101,"sign-real-estate":987416,"sign-text":984962,"signal":984226,"signal-2g":984850,"signal-3g":984851,"signal-4g":984852,"signal-5g":985711,"signal-cellular-1":985276,"signal-cellular-2":985277,"signal-cellular-3":985278,"signal-cellular-outline":985279,"signal-distance-variant":986724,"signal-hspa":984853,"signal-hspa-plus":984854,"signal-off":984963,"signal-variant":984586,"signature":986619,"signature-freehand":986620,"signature-image":986621,"signature-text":986622,"silo":985929,"silverware":984227,"silverware-clean":987102,"silverware-fork":984228,"silverware-fork-knife":985712,"silverware-spoon":984229,"silverware-variant":984230,"sim":984231,"sim-alert":984232,"sim-off":984233,"simple-icons":987933,"sina-weibo":985823,"sine-wave":985435,"sitemap":984234,"size-l":988070,"size-m":988069,"size-s":988068,"size-xl":988071,"size-xs":988067,"size-xxl":988072,"size-xxs":988066,"size-xxxl":988073,"skate":986421,"skateboard":988354,"skew-less":986422,"skew-more":986423,"ski":987908,"ski-cross-country":987909,"ski-water":987910,"skip-backward":984235,"skip-backward-outline":986917,"skip-forward":984236,"skip-forward-outline":986918,"skip-next":984237,"skip-next-circle":984673,"skip-next-circle-outline":984674,"skip-next-outline":986919,"skip-previous":984238,"skip-previous-circle":984675,"skip-previous-circle-outline":984676,"skip-previous-outline":986920,"skull":984716,"skull-crossbones":986054,"skull-crossbones-outline":986055,"skull-outline":986056,"skull-scan":988359,"skull-scan-outline":988360,"skype":984239,"skype-business":984240,"slack":984241,"slash-forward":987103,"slash-forward-box":987104,"sleep":984242,"sleep-off":984243,"slope-downhill":986623,"slope-uphill":986624,"slot-machine":987412,"slot-machine-outline":987413,"smart-card":987325,"smart-card-outline":987326,"smart-card-reader":987327,"smart-card-reader-outline":987328,"smog":985713,"smoke-detector":983954,"smoking":984244,"smoking-off":984245,"smoking-pipe":988173,"smoking-pipe-off":988200,"snapchat":984246,"snowboard":987911,"snowflake":984855,"snowflake-alert":986921,"snowflake-melt":987851,"snowflake-variant":986922,"snowman":984247,"soccer":984248,"soccer-field":985140,"sofa":984249,"solar-panel":986523,"solar-panel-large":986524,"solar-power":985714,"soldering-iron":987282,"solid":984717,"sony-playstation":984084,"sort":984250,"sort-alphabetical-ascending":984509,"sort-alphabetical-ascending-variant":987464,"sort-alphabetical-descending":984511,"sort-alphabetical-descending-variant":987465,"sort-alphabetical-variant":984251,"sort-ascending":984252,"sort-bool-ascending":988037,"sort-bool-ascending-variant":988038,"sort-bool-descending":988039,"sort-bool-descending-variant":988040,"sort-descending":984253,"sort-numeric-ascending":988041,"sort-numeric-ascending-variant":985357,"sort-numeric-descending":988042,"sort-numeric-descending-variant":985810,"sort-numeric-variant":984254,"sort-reverse-variant":983868,"sort-variant":984255,"sort-variant-lock":986317,"sort-variant-lock-open":986318,"sort-variant-remove":987463,"soundcloud":984256,"source-branch":984620,"source-branch-check":988367,"source-branch-minus":988363,"source-branch-plus":988362,"source-branch-refresh":988365,"source-branch-remove":988364,"source-branch-sync":988366,"source-commit":984856,"source-commit-end":984857,"source-commit-end-local":984858,"source-commit-local":984859,"source-commit-next-local":984860,"source-commit-start":984861,"source-commit-start-next-local":984862,"source-fork":984257,"source-merge":984621,"source-pull":984258,"source-repository":986319,"source-repository-multiple":986320,"soy-sauce":985070,"soy-sauce-off":988156,"spa":986321,"spa-outline":986322,"space-invaders":986057,"space-station":988035,"spade":986725,"speaker":984259,"speaker-bluetooth":985506,"speaker-multiple":986424,"speaker-off":984260,"speaker-wireless":984863,"speedometer":984261,"speedometer-medium":987013,"speedometer-slow":987014,"spellcheck":984262,"spider":987626,"spider-thread":987627,"spider-web":986058,"spoon-sugar":988201,"spotify":984263,"spotlight":984264,"spotlight-beam":984265,"spray":984677,"spray-bottle":985824,"sprinkler":987231,"sprinkler-variant":987232,"sprout":986726,"sprout-outline":986727,"square":984932,"square-edit-outline":985356,"square-medium":985619,"square-medium-outline":985620,"square-off":987886,"square-off-outline":987887,"square-outline":984931,"square-root":984964,"square-root-box":985507,"square-small":985621,"square-wave":988283,"squeegee":985825,"ssh":985280,"stack-exchange":984587,"stack-overflow":984268,"stackpath":983897,"stadium":987129,"stadium-variant":984864,"stairs":984269,"stairs-box":988062,"stairs-down":987838,"stairs-up":987837,"stamper":986425,"standard-definition":985071,"star":984270,"star-box":985715,"star-box-multiple":987782,"star-box-multiple-outline":987783,"star-box-outline":985716,"star-circle":984271,"star-circle-outline":985508,"star-face":985509,"star-four-points":985826,"star-four-points-outline":985827,"star-half":983622,"star-half-full":984272,"star-off":984273,"star-outline":984274,"star-three-points":985828,"star-three-points-outline":985829,"state-machine":987631,"steam":984275,"steering":984276,"steering-off":985358,"step-backward":984277,"step-backward-2":984278,"step-forward":984279,"step-forward-2":984280,"stethoscope":984281,"sticker":988004,"sticker-alert":988005,"sticker-alert-outline":988006,"sticker-check":988007,"sticker-check-outline":988008,"sticker-circle-outline":984528,"sticker-emoji":984965,"sticker-minus":988009,"sticker-minus-outline":988010,"sticker-outline":988011,"sticker-plus":988012,"sticker-plus-outline":988013,"sticker-remove":988014,"sticker-remove-outline":988015,"stocking":984282,"stomach":987283,"stop":984283,"stop-circle":984678,"stop-circle-outline":984679,"store":984284,"store-24-hour":984285,"store-outline":988001,"storefront":985031,"storefront-outline":987329,"stove":984286,"strategy":987606,"stretch-to-page":986923,"stretch-to-page-outline":986924,"string-lights":987834,"string-lights-off":987835,"subdirectory-arrow-left":984588,"subdirectory-arrow-right":984589,"subtitles":985622,"subtitles-outline":985623,"subway":984748,"subway-alert-variant":986525,"subway-variant":984287,"summit":984966,"sunglasses":984288,"surround-sound":984517,"surround-sound-2-0":985072,"surround-sound-3-1":985073,"surround-sound-5-1":985074,"surround-sound-7-1":985075,"svg":984865,"swap-horizontal":984289,"swap-horizontal-bold":986061,"swap-horizontal-circle":987105,"swap-horizontal-circle-outline":987106,"swap-horizontal-variant":985281,"swap-vertical":984290,"swap-vertical-bold":986062,"swap-vertical-circle":987107,"swap-vertical-circle-outline":987108,"swap-vertical-variant":985282,"swim":984291,"switch":984292,"sword":984293,"sword-cross":984967,"syllabary-hangul":987955,"syllabary-hiragana":987956,"syllabary-katakana":987957,"syllabary-katakana-halfwidth":987958,"symfony":985830,"sync":984294,"sync-alert":984295,"sync-circle":988024,"sync-off":984296,"tab":984297,"tab-minus":985931,"tab-plus":984924,"tab-remove":985932,"tab-unselected":984298,"table":984299,"table-account":988089,"table-alert":988090,"table-arrow-down":988091,"table-arrow-left":988092,"table-arrow-right":988093,"table-arrow-up":988094,"table-border":985624,"table-cancel":988095,"table-chair":987233,"table-check":988096,"table-clock":988097,"table-cog":988098,"table-column":985141,"table-column-plus-after":984300,"table-column-plus-before":984301,"table-column-remove":984302,"table-column-width":984303,"table-edit":984304,"table-eye":987284,"table-eye-off":988099,"table-furniture":984508,"table-headers-eye":987677,"table-headers-eye-off":987678,"table-heart":988100,"table-key":988101,"table-large":984305,"table-large-plus":987015,"table-large-remove":987016,"table-lock":988102,"table-merge-cells":985510,"table-minus":988103,"table-multiple":988104,"table-network":988105,"table-of-contents":985142,"table-off":988106,"table-plus":985717,"table-refresh":988064,"table-remove":985718,"table-row":985143,"table-row-height":984306,"table-row-plus-after":984307,"table-row-plus-before":984308,"table-row-remove":984309,"table-search":985359,"table-settings":985144,"table-split-cell":988202,"table-star":988107,"table-sync":988065,"table-tennis":986728,"tablet":984310,"tablet-android":984311,"tablet-cellphone":985511,"tablet-dashboard":986830,"tablet-ipad":984312,"taco":984930,"tag":984313,"tag-faces":984314,"tag-heart":984715,"tag-heart-outline":986063,"tag-minus":985360,"tag-minus-outline":987679,"tag-multiple":984315,"tag-multiple-outline":987895,"tag-off":987680,"tag-off-outline":987681,"tag-outline":984316,"tag-plus":984866,"tag-plus-outline":987682,"tag-remove":984867,"tag-remove-outline":987683,"tag-text":987684,"tag-text-outline":984317,"tailwind":988159,"tank":986426,"tanker-truck":987109,"tape-measure":985933,"target":984318,"target-account":986064,"target-variant":985719,"taxi":984319,"tea":986526,"tea-outline":986527,"teach":985232,"teamviewer":984320,"telegram":984321,"telescope":985934,"television":984322,"television-ambient-light":987990,"television-box":985145,"television-classic":985076,"television-classic-off":985146,"television-clean":987408,"television-guide":984323,"television-off":985147,"television-pause":987017,"television-play":986831,"television-stop":987018,"temperature-celsius":984324,"temperature-fahrenheit":984325,"temperature-kelvin":984326,"tennis":986528,"tennis-ball":984327,"tent":984328,"terraform":987234,"terrain":984329,"test-tube":984680,"test-tube-empty":985361,"test-tube-off":985362,"text":985512,"text-box":983578,"text-box-check":986790,"text-box-check-outline":986791,"text-box-minus":986792,"text-box-minus-outline":986793,"text-box-multiple":985783,"text-box-multiple-outline":985784,"text-box-outline":985581,"text-box-plus":986794,"text-box-plus-outline":986795,"text-box-remove":986796,"text-box-remove-outline":986797,"text-box-search":986798,"text-box-search-outline":986799,"text-recognition":987453,"text-search":988088,"text-shadow":984681,"text-short":985513,"text-subject":985514,"text-to-speech":984330,"text-to-speech-off":984331,"texture":984332,"texture-box":987110,"theater":984333,"theme-light-dark":984334,"thermometer":984335,"thermometer-alert":986625,"thermometer-chevron-down":986626,"thermometer-chevron-up":986627,"thermometer-high":987330,"thermometer-lines":984336,"thermometer-low":987331,"thermometer-minus":986628,"thermometer-plus":986629,"thermostat":983955,"thermostat-box":985233,"thought-bubble":985078,"thought-bubble-outline":985079,"thumb-down":984337,"thumb-down-outline":984338,"thumb-up":984339,"thumb-up-outline":984340,"thumbs-up-down":984341,"ticket":984342,"ticket-account":984343,"ticket-confirmation":984344,"ticket-confirmation-outline":988074,"ticket-outline":985363,"ticket-percent":984868,"ticket-percent-outline":988203,"tie":984345,"tilde":984869,"timelapse":984346,"timeline":986065,"timeline-alert":987029,"timeline-alert-outline":987032,"timeline-clock":987643,"timeline-clock-outline":987644,"timeline-help":987033,"timeline-help-outline":987034,"timeline-outline":986066,"timeline-plus":987030,"timeline-plus-outline":987031,"timeline-text":986067,"timeline-text-outline":986068,"timer":988075,"timer-10":984348,"timer-3":984349,"timer-off":988076,"timer-off-outline":984350,"timer-outline":984347,"timer-sand":984351,"timer-sand-empty":984749,"timer-sand-full":984972,"timetable":984352,"toaster":987235,"toaster-off":987575,"toaster-oven":986323,"toggle-switch":984353,"toggle-switch-off":984354,"toggle-switch-off-outline":985625,"toggle-switch-outline":985626,"toilet":985515,"toolbox":985516,"toolbox-outline":985517,"tools":987236,"tooltip":984355,"tooltip-account":983052,"tooltip-edit":984356,"tooltip-edit-outline":987845,"tooltip-image":984357,"tooltip-image-outline":986069,"tooltip-outline":984358,"tooltip-plus":986070,"tooltip-plus-outline":984359,"tooltip-text":984360,"tooltip-text-outline":986071,"tooth":985283,"tooth-outline":984361,"toothbrush":987433,"toothbrush-electric":987436,"toothbrush-paste":987434,"tortoise":986427,"toslink":987832,"tournament":985518,"tow-truck":985148,"tower-beach":984705,"tower-fire":984706,"toy-brick":987784,"toy-brick-marker":987785,"toy-brick-marker-outline":987786,"toy-brick-minus":987787,"toy-brick-minus-outline":987788,"toy-brick-outline":987789,"toy-brick-plus":987790,"toy-brick-plus-outline":987791,"toy-brick-remove":987792,"toy-brick-remove-outline":987793,"toy-brick-search":987794,"toy-brick-search-outline":987795,"track-light":985364,"trackpad":985080,"trackpad-lock":985395,"tractor":985234,"tractor-variant":988356,"trademark":985720,"traffic-cone":988028,"traffic-light":984363,"train":984364,"train-car":986072,"train-variant":985284,"tram":984365,"tram-side":987111,"transcribe":984366,"transcribe-close":984367,"transfer":987237,"transfer-down":986529,"transfer-left":986530,"transfer-right":984368,"transfer-up":986531,"transit-connection":986428,"transit-connection-variant":986429,"transit-detour":987019,"transit-transfer":984750,"transition":985365,"transition-masked":985366,"translate":984522,"translate-off":986630,"transmission-tower":986430,"trash-can":985721,"trash-can-outline":985722,"tray":987796,"tray-alert":987797,"tray-full":987798,"tray-minus":987799,"tray-plus":987800,"tray-remove":987801,"treasure-chest":984870,"tree":984369,"tree-outline":986729,"trello":984370,"trending-down":984371,"trending-neutral":984372,"trending-up":984373,"triangle":984374,"triangle-outline":984375,"triangle-wave":988284,"triforce":986073,"trophy":984376,"trophy-award":984377,"trophy-broken":986532,"trophy-outline":984378,"trophy-variant":984379,"trophy-variant-outline":984380,"truck":984381,"truck-check":986324,"truck-check-outline":987802,"truck-delivery":984382,"truck-delivery-outline":987803,"truck-fast":984968,"truck-fast-outline":987804,"truck-outline":987805,"truck-trailer":984871,"trumpet":987286,"tshirt-crew":985723,"tshirt-crew-outline":984383,"tshirt-v":985724,"tshirt-v-outline":984384,"tumble-dryer":985367,"tumble-dryer-alert":987578,"tumble-dryer-off":987579,"tune":984622,"tune-vertical":984682,"turnstile":986325,"turnstile-outline":986326,"turtle":986327,"twitch":984387,"twitter":984388,"twitter-retweet":984391,"two-factor-authentication":985519,"typewriter":986925,"ubisoft":986074,"ubuntu":984392,"ufo":987332,"ufo-outline":987333,"ultra-high-definition":985081,"umbraco":984393,"umbrella":984394,"umbrella-closed":985520,"umbrella-closed-outline":988130,"umbrella-closed-variant":988129,"umbrella-outline":984395,"undo":984396,"undo-variant":984397,"unfold-less-horizontal":984398,"unfold-less-vertical":984928,"unfold-more-horizontal":984399,"unfold-more-vertical":984929,"ungroup":984400,"unicode":986832,"unity":984751,"unreal":985521,"untappd":984401,"update":984752,"upload":984402,"upload-lock":988019,"upload-lock-outline":988020,"upload-multiple":985149,"upload-network":984822,"upload-network-outline":986328,"upload-off":987334,"upload-off-outline":987335,"upload-outline":986631,"usb":984403,"usb-flash-drive":987806,"usb-flash-drive-outline":987807,"usb-port":987632,"valve":987238,"valve-closed":987239,"valve-open":987240,"van-passenger":985082,"van-utility":985083,"vanish":985084,"vanity-light":987617,"variable":985831,"variable-box":987409,"vector-arrange-above":984404,"vector-arrange-below":984405,"vector-bezier":985832,"vector-circle":984406,"vector-circle-variant":984407,"vector-combine":984408,"vector-curve":984409,"vector-difference":984410,"vector-difference-ab":984411,"vector-difference-ba":984412,"vector-ellipse":985235,"vector-intersection":984413,"vector-line":984414,"vector-link":987112,"vector-point":984415,"vector-polygon":984416,"vector-polyline":984417,"vector-polyline-edit":987685,"vector-polyline-minus":987686,"vector-polyline-plus":987687,"vector-polyline-remove":987688,"vector-radius":984906,"vector-rectangle":984518,"vector-selection":984418,"vector-square":983041,"vector-triangle":984419,"vector-union":984420,"vhs":985627,"vibrate":984422,"vibrate-off":986329,"video":984423,"video-3d":985085,"video-3d-off":988121,"video-3d-variant":986833,"video-4k-box":985150,"video-account":985369,"video-box":983293,"video-box-off":983294,"video-check":987241,"video-check-outline":987242,"video-image":985370,"video-input-antenna":985151,"video-input-component":985152,"video-input-hdmi":985153,"video-input-scart":987020,"video-input-svideo":985154,"video-minus":985522,"video-minus-outline":983738,"video-off":984424,"video-off-outline":986075,"video-outline":986076,"video-plus":985523,"video-plus-outline":983507,"video-stabilization":985371,"video-switch":984425,"video-switch-outline":984976,"video-vintage":985628,"video-wireless":986834,"video-wireless-outline":986835,"view-agenda":984426,"view-agenda-outline":987608,"view-array":984427,"view-array-outline":988293,"view-carousel":984428,"view-carousel-outline":988294,"view-column":984429,"view-column-outline":988295,"view-comfy":986730,"view-comfy-outline":988296,"view-compact":986731,"view-compact-outline":986732,"view-dashboard":984430,"view-dashboard-outline":985629,"view-dashboard-variant":985155,"view-dashboard-variant-outline":988297,"view-day":984431,"view-day-outline":988298,"view-grid":984432,"view-grid-outline":987609,"view-grid-plus":987021,"view-grid-plus-outline":987610,"view-headline":984433,"view-list":984434,"view-list-outline":988299,"view-module":984435,"view-module-outline":988300,"view-parallel":984872,"view-parallel-outline":988301,"view-quilt":984436,"view-quilt-outline":988302,"view-sequential":984873,"view-sequential-outline":988303,"view-split-horizontal":986059,"view-split-vertical":986060,"view-stream":984437,"view-stream-outline":988304,"view-week":984438,"view-week-outline":988305,"vimeo":984439,"violin":984591,"virtual-reality":985236,"virus":988086,"virus-outline":988087,"vk":984441,"vlc":984444,"voice-off":986836,"voicemail":984445,"volleyball":985524,"volume-high":984446,"volume-low":984447,"volume-medium":984448,"volume-minus":984926,"volume-mute":984927,"volume-off":984449,"volume-plus":984925,"volume-source":987424,"volume-variant-off":986632,"volume-vibrate":987425,"vote":985631,"vote-outline":985632,"vpn":984450,"vuejs":985156,"vuetify":986733,"walk":984451,"wall":985086,"wall-sconce":985372,"wall-sconce-flat":985373,"wall-sconce-flat-variant":984092,"wall-sconce-round":984904,"wall-sconce-round-variant":985374,"wallet":984452,"wallet-giftcard":984453,"wallet-membership":984454,"wallet-outline":986077,"wallet-plus":987022,"wallet-plus-outline":987023,"wallet-travel":984455,"wallpaper":986633,"wan":984456,"wardrobe":987024,"wardrobe-outline":987025,"warehouse":987009,"washing-machine":984874,"washing-machine-alert":987580,"washing-machine-off":987581,"watch":984457,"watch-export":984458,"watch-export-variant":985237,"watch-import":984459,"watch-import-variant":985238,"watch-variant":985239,"watch-vibrate":984753,"watch-vibrate-off":986330,"water":984460,"water-boiler":987026,"water-boiler-alert":987571,"water-boiler-off":987572,"water-off":984461,"water-outline":986634,"water-percent":984462,"water-polo":987808,"water-pump":984463,"water-pump-off":987027,"water-well":987243,"water-well-outline":987244,"watering-can":988289,"watering-can-outline":988290,"watermark":984594,"wave":986926,"waveform":988285,"waves":984973,"waze":986078,"weather-cloudy":984464,"weather-cloudy-alert":986927,"weather-cloudy-arrow-right":986734,"weather-fog":984465,"weather-hail":984466,"weather-hazy":986928,"weather-hurricane":985240,"weather-lightning":984467,"weather-lightning-rainy":984702,"weather-night":984468,"weather-night-partly-cloudy":986929,"weather-partly-cloudy":984469,"weather-partly-lightning":986930,"weather-partly-rainy":986931,"weather-partly-snowy":986932,"weather-partly-snowy-rainy":986933,"weather-pouring":984470,"weather-rainy":984471,"weather-snowy":984472,"weather-snowy-heavy":986934,"weather-snowy-rainy":984703,"weather-sunny":984473,"weather-sunny-alert":986935,"weather-sunset":984474,"weather-sunset-down":984475,"weather-sunset-up":984476,"weather-tornado":986936,"weather-windy":984477,"weather-windy-variant":984478,"web":984479,"web-box":987028,"web-clock":987722,"webcam":984480,"webhook":984623,"webpack":984875,"webrtc":987720,"wechat":984593,"weight":984481,"weight-gram":986431,"weight-kilogram":984482,"weight-lifter":987485,"weight-pound":985525,"whatsapp":984483,"wheelchair-accessibility":984484,"whistle":985526,"whistle-outline":987836,"white-balance-auto":984485,"white-balance-incandescent":984486,"white-balance-iridescent":984487,"white-balance-sunny":984488,"widgets":984876,"widgets-outline":987989,"wifi":984489,"wifi-off":984490,"wifi-star":986635,"wifi-strength-1":985375,"wifi-strength-1-alert":985376,"wifi-strength-1-lock":985377,"wifi-strength-2":985378,"wifi-strength-2-alert":985379,"wifi-strength-2-lock":985380,"wifi-strength-3":985381,"wifi-strength-3-alert":985382,"wifi-strength-3-lock":985383,"wifi-strength-4":985384,"wifi-strength-4-alert":985385,"wifi-strength-4-lock":985386,"wifi-strength-alert-outline":985387,"wifi-strength-lock-outline":985388,"wifi-strength-off":985389,"wifi-strength-off-outline":985390,"wifi-strength-outline":985391,"wikipedia":984492,"wind-turbine":986533,"window-close":984493,"window-closed":984494,"window-closed-variant":987611,"window-maximize":984495,"window-minimize":984496,"window-open":984497,"window-open-variant":987612,"window-restore":984498,"window-shutter":987420,"window-shutter-alert":987421,"window-shutter-open":987422,"wiper":985833,"wiper-wash":986534,"wizard-hat":988279,"wordpress":984500,"wrap":984502,"wrap-disabled":986079,"wrench":984503,"wrench-outline":986080,"xamarin":985157,"xamarin-outline":985158,"xing":984510,"xml":984512,"xmpp":985087,"y-combinator":984612,"yahoo":985935,"yeast":984513,"yin-yang":984704,"yoga":987516,"youtube":984515,"youtube-gaming":985160,"youtube-studio":985159,"youtube-subscription":986432,"youtube-tv":984136,"z-wave":985834,"zend":985835,"zigbee":986433,"zip-box":984516,"zip-box-outline":987130,"zip-disk":985635,"zodiac-aquarius":985725,"zodiac-aries":985726,"zodiac-cancer":985727,"zodiac-capricorn":985728,"zodiac-gemini":985729,"zodiac-leo":985730,"zodiac-libra":985731,"zodiac-pisces":985732,"zodiac-sagittarius":985733,"zodiac-scorpio":985734,"zodiac-taurus":985735,"zodiac-virgo":985736,"blank":63116}')},function(e,t,n){e.exports=n.p+"./fonts/MaterialCommunityIcons.ttf"},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(8),i=n.n(r),o=n(0),a={};function s(e){var t=o.useRef(a),n=o.useRef(!1),r=o.useRef(!0);o.useEffect((function(){return r.current=!0,function(){r.current=!1}}),[]),t.current===a&&(t.current="function"===typeof e?e():e);var s=o.useState(t.current),l=i()(s,2),c=l[0],u=l[1],h=o.useCallback((function(){return t.current}),[]),d=o.useCallback((function(e){e!==t.current&&r.current&&(t.current=e,n.current||u(e))}),[]),f=o.useCallback((function(e){n.current=!0;try{e()}finally{n.current=!1}}),[]),p=o.useCallback((function(){r.current&&u(t.current)}),[]);c!==t.current&&u(t.current);var m=t.current;return o.useDebugValue(m),[m,h,d,f,p]}},function(e,t,n){"use strict";e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(378)),o=r(n(381)),a=r(n(383)),s=r(n(159)),l=r(n(392)),c=r(n(393)),u=r(n(394)),h=r(n(397)),d=r(n(208)),f=r(n(399)),p=r(n(400)),m=r(n(410)),g=r(n(113)),v=r(n(411)),y=r(n(412)),b=r(n(413)),w=r(n(415)),x=r(n(416)),_=r(n(163)),E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},A=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(a,s)}l((r=r.apply(e,t||[])).next())}))},S=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},M=x([[w,b],[y(Number),b],[v,function(e){return Number(e)}]]),T=g(3,(function(e,t,n){var r=y(Number);return r(e)&&r(t)&&r(n)&&m(n,e)&&m(t,n)})),C=g(2,(function(e,t){return p(t,e)})),O=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},R={Accept:"application/json","Content-Type":"application/json"},k={timeout:0},P=["ECONNABORTED"],L=["ENOTFOUND","ECONNREFUSED","ECONNRESET"],D=T(200,299),I=T(400,499),N=T(500,599),j=f(w,d(void 0),h("status")),B=function(e){return"Network Error"===e.message?"NETWORK_ERROR":_.isCancel(e)?"CANCEL_ERROR":x([[w,function(){return F(j(e.response))}],[C(P),d("TIMEOUT_ERROR")],[C(L),d("CONNECTION_ERROR")],[v,d("UNKNOWN_ERROR")]])(e.code)},F=function(e){return x([[w,d("UNKNOWN_ERROR")],[D,d(null)],[I,d("CLIENT_ERROR")],[N,d("SERVER_ERROR")],[v,d("UNKNOWN_ERROR")]])(e)},z=function(e){var t,n=u(R,e.headers||{});if(e.axiosInstance)t=e.axiosInstance;else{var r=u(k,c("headers",e));t=_.create(r)}var h=[],d=[],f=[],p=[],m=[],g=function(e,r){return n[e]=r,t},v=function(e,t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),b(u({url:t,params:n,method:e},r))},y=function(e,t,n,r){return void 0===n&&(n=null),void 0===r&&(r={}),b(u({url:t,method:e,data:n},r))},b=function(e){return A(void 0,void 0,void 0,(function(){var r,i,o;return S(this,(function(s){switch(s.label){case 0:if(e.headers=E({},n,e.headers),d.length>0&&l((function(t){return t(e)}),d),!(f.length>0))return[3,6];r=0,s.label=1;case 1:return r<f.length?(i=f[r](e),O(i)?[4,i]:[3,3]):[3,6];case 2:return s.sent(),[3,5];case 3:return[4,i(e)];case 4:s.sent(),s.label=5;case 5:return r++,[3,1];case 6:return o=a(x(M(new Date)),w),[2,t.request(e).then(o).catch(o)]}}))}))},w=function(e){return h.forEach((function(t){try{t(e)}catch(e){}})),e},x=o((function(e,t){return A(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,c,u,h,d,f,g,v,y,b,w;return S(this,(function(x){switch(x.label){case 0:if(n=M(new Date),r=n-e,i=t instanceof Error||_.isCancel(t),o=t,a=t,s=i?a.response:o,c=s&&s.status||null,u=i?B(t):F(c),h=i?a:null,d=D(c),f=t.config||null,g=s&&s.headers||null,v=s&&s.data||null,y={duration:r,problem:u,originalError:h,ok:d,status:c,headers:g,config:f,data:v},p.length>0&&l((function(e){return e(y)}),p),!(m.length>0))return[3,6];b=0,x.label=1;case 1:return b<m.length?(w=m[b](y),O(w)?[4,w]:[3,3]):[3,6];case 2:return x.sent(),[3,5];case 3:return[4,w(y)];case 4:x.sent(),x.label=5;case 5:return b++,[3,1];case 6:return[2,y]}}))}))}));return{axiosInstance:t,monitors:h,addMonitor:function(e){h.push(e)},requestTransforms:d,asyncRequestTransforms:f,responseTransforms:p,asyncResponseTransforms:m,addRequestTransform:function(e){return d.push(e)},addAsyncRequestTransform:function(e){return f.push(e)},addResponseTransform:function(e){return p.push(e)},addAsyncResponseTransform:function(e){return m.push(e)},setHeader:g,setHeaders:function(e){return l((function(t){return g(t,e[t])}),s(e)),t},deleteHeader:function(e){return delete n[e],t},headers:n,setBaseURL:function(e){return t.defaults.baseURL=e,t},getBaseURL:function(){return t.defaults.baseURL},any:b,get:i(v,["get"]),delete:i(v,["delete"]),head:i(v,["head"]),post:i(y,["post"]),put:i(y,["put"]),patch:i(y,["patch"]),link:i(v,["link"]),unlink:i(v,["unlink"])}},H=_.isCancel,U=_.CancelToken,V={DEFAULT_HEADERS:R,NONE:null,CLIENT_ERROR:"CLIENT_ERROR",SERVER_ERROR:"SERVER_ERROR",TIMEOUT_ERROR:"TIMEOUT_ERROR",CONNECTION_ERROR:"CONNECTION_ERROR",NETWORK_ERROR:"NETWORK_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR",create:z,isCancel:H,CancelToken:U};t.DEFAULT_HEADERS=R,t.NONE=null,t.CLIENT_ERROR="CLIENT_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.CONNECTION_ERROR="CONNECTION_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.CANCEL_ERROR="CANCEL_ERROR",t.getProblemFromError=B,t.getProblemFromStatus=F,t.create=z,t.isCancel=H,t.CancelToken=U,t.default=V},function(e,t,n){"use strict";var r=n(447),i=n(451),o=[].slice,a=["keyword","gray","hex"],s={};Object.keys(i).forEach((function(e){s[o.call(i[e].labels).sort().join("")]=e}));var l={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw new Error("Unknown model: "+t);var n,u;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"===typeof e){var h=r.get(e);if(null===h)throw new Error("Unable to parse color from string: "+e);this.model=h.model,u=i[this.model].channels,this.color=h.value.slice(0,u),this.valpha="number"===typeof h.value[u]?h.value[u]:1}else if(e.length){this.model=t||"rgb",u=i[this.model].channels;var d=o.call(e,0,u);this.color=f(d,u),this.valpha="number"===typeof e[u]?e[u]:1}else if("number"===typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var p=Object.keys(e);"alpha"in e&&(p.splice(p.indexOf("alpha"),1),this.valpha="number"===typeof e.alpha?e.alpha:0);var m=p.sort().join("");if(!(m in s))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=s[m];var g=i[this.model].labels,v=[];for(n=0;n<g.length;n++)v.push(e[g[n]]);this.color=f(v)}if(l[this.model])for(u=i[this.model].channels,n=0;n<u;n++){var y=l[this.model][n];y&&(this.color[n]=y(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function u(e,t,n){return(e=Array.isArray(e)?e:[e]).forEach((function(e){(l[e]||(l[e]=[]))[t]=n})),e=e[0],function(r){var i;return arguments.length?(n&&(r=n(r)),(i=this[e]()).color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function h(e){return function(t){return Math.max(0,Math.min(e,t))}}function d(e){return Array.isArray(e)?e:[e]}function f(e,t){for(var n=0;n<t;n++)"number"!==typeof e[n]&&(e[n]=0);return e}c.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in r.to?this:this.rgb(),n=1===(t=t.round("number"===typeof e?e:1)).valpha?t.color:t.color.concat(this.valpha);return r.to[t.model](n)},percentString:function(e){var t=this.rgb().round("number"===typeof e?e:1),n=1===t.valpha?t.color:t.color.concat(this.valpha);return r.to.rgb.percent(n)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},t=i[this.model].channels,n=i[this.model].labels,r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new c(this.color.map(function(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}(e)).concat(this.valpha),this.model)},alpha:function(e){return arguments.length?new c(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:u("rgb",0,h(255)),green:u("rgb",1,h(255)),blue:u("rgb",2,h(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:u("hsl",1,h(100)),lightness:u("hsl",2,h(100)),saturationv:u("hsv",1,h(100)),value:u("hsv",2,h(100)),chroma:u("hcg",1,h(100)),gray:u("hcg",2,h(100)),white:u("hwb",1,h(100)),wblack:u("hwb",2,h(100)),cyan:u("cmyk",0,h(100)),magenta:u("cmyk",1,h(100)),yellow:u("cmyk",2,h(100)),black:u("cmyk",3,h(100)),x:u("xyz",0,h(100)),y:u("xyz",1,h(100)),z:u("xyz",2,h(100)),l:u("lab",0,h(100)),a:u("lab",1),b:u("lab",2),keyword:function(e){return arguments.length?new c(e):i[this.model].keyword(this.color)},hex:function(e){return arguments.length?new c(e):r.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){for(var e=this.rgb().color,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),i=void 0===t?.5:t,o=2*i-1,a=n.alpha()-r.alpha(),s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}},Object.keys(i).forEach((function(e){if(-1===a.indexOf(e)){var t=i[e].channels;c.prototype[e]=function(){if(this.model===e)return new c(this);if(arguments.length)return new c(arguments,e);var n="number"===typeof arguments[t]?t:this.valpha;return new c(d(i[this.model][e].raw(this.color)).concat(n),e)},c[e]=function(n){return"number"===typeof n&&(n=f(o.call(arguments),t)),new c(n,e)}}})),e.exports=c},,function(t,n,r){"use strict";r.d(n,"a",(function(){return M}));var i=r(19),o=r.n(i),a=r(0),s=r(103),l=r(6),c=r.n(l),u=r(21),h=r.n(u),d=r(23),f=r.n(d),p=r(24),m=r.n(p),g=r(25),v=r.n(g),y=r(18),b=r.n(y);var w=r(83);var x={get name(){return"ExpoErrorRecovery"},saveRecoveryProps:function(t){if(w.canUseDOM)try{localStorage.setItem("EXPO_ERROR_RECOVERY_STORAGE",t)}catch(e){}},recoveredProps:function(){if(!w.canUseDOM)return null;try{var t=localStorage.getItem("EXPO_ERROR_RECOVERY_STORAGE");return localStorage.removeItem("EXPO_ERROR_RECOVERY_STORAGE"),t}catch(e){}return null}()},_=function(){if(x.recoveredProps)return JSON.parse(x.recoveredProps);return null}();function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}function M(e){var t,n,r=(n=e,function(e){m()(r,e);var t=S(r);function r(){return h()(this,r),t.apply(this,arguments)}return f()(r,[{key:"render",value:function(){var e=A(A({},this.props),{},{exp:A(A({},this.props.exp),{},{errorRecovery:_})});return a.createElement(n,o()({},e))}}]),r}(a.Component)),i=function(e){return a.createElement(r,o()({},e))};s.a.registerComponent("main",(function(){return i}));var l=null!=(t=document.getElementById("root"))?t:document.getElementById("main");s.a.runApplication("main",{rootTag:l})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(6),n(17);var r=n(7),i=n.n(r),o=n(8),a=n.n(o),s=n(267),l=n(224),c={get isRTL(){var e;return null!=(e=l.isRtlLang(this.locale))&&e},get locale(){return s.a.isDOMAvailable?navigator.language||navigator.systemLanguage||navigator.browserLanguage||navigator.userLanguage||this.locales[0]:""},get locales(){if(!s.a.isDOMAvailable)return[];var e=navigator.languages,t=void 0===e?[]:e;return Array.from(t)},get timezone(){return"undefined"===typeof Intl?"Etc/UTC":Intl.DateTimeFormat().resolvedOptions().timeZone||"Etc/UTC"},get isoCurrencyCodes(){return[]},get region(){var e=this.locale;if("string"===typeof e){var t=e.split("-"),n=a()(t,2)[1];return n?n.toUpperCase():null}return null},getLocalizationAsync:function(){var e,t,n,r,o,a;return i.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return e=this.region,t=this.isoCurrencyCodes,n=this.timezone,r=this.locales,o=this.locale,a=this.isRTL,i.abrupt("return",{region:e,isoCurrencyCodes:t,timezone:n,locales:r,locale:o,isRTL:a});case 2:case"end":return i.stop()}}),null,this,null,Promise)}};var u=function(e){return e.replace("_","-")},h=u(c.locale);c.locales.map(u),c.timezone,c.isoCurrencyCodes,c.region,c.isRTL},function(e,t,n){"use strict";var r,i=n(9),o="undefined"!==typeof window&&!(null==(r=window.document)||!r.createElement),a={OS:i.a.OS,select:i.a.select,isDOMAvailable:o};t.a=a},function(t,n,r){"use strict";r.d(n,"a",(function(){return L}));var i=r(17),o=r.n(i),a=r(20),s=r.n(a),l=r(19),c=r.n(l),u=r(21),h=r.n(u),d=r(23),f=r.n(d),p=r(24),m=r.n(p),g=r(25),v=r.n(g),y=r(18),b=r.n(y),w=r(0),x=r.n(w),_=r(3),E=r(123),A=r(72),S=r(12),M=r(14);function T(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}var C=["easeInOut","easeOut","easeIn"],O=function(e){m()(n,e);var t=T(n);function n(e){var r;return h()(this,n),(r=t.call(this,e)).contentHandle=null,r._handleRef=function(e){r.contentHandle=e},r._handleLayoutChange=function(e){var t=e.nativeEvent.layout.height;r.state.animating||r.props.collapsed||r.state.measuring||r.state.contentHeight===t||(r.state.height.setValue(t),r.setState({contentHeight:t}))},r.state={measuring:!1,measured:!1,height:new S.a.Value(e.collapsedHeight),contentHeight:0,animating:!1},r}return f()(n,[{key:"componentDidUpdate",value:function(e){var t=this;e.collapsed!==this.props.collapsed?this.setState({measured:!1},(function(){return t._componentDidUpdate(e)})):this._componentDidUpdate(e)}},{key:"componentWillUnmount",value:function(){this.unmounted=!0}},{key:"_componentDidUpdate",value:function(e){e.collapsed!==this.props.collapsed?this._toggleCollapsed(this.props.collapsed):this.props.collapsed&&e.collapsedHeight!==this.props.collapsedHeight&&this.state.height.setValue(this.props.collapsedHeight)}},{key:"_measureContent",value:function(e){var t=this;this.setState({measuring:!0},(function(){requestAnimationFrame((function(){t.contentHandle?("function"===typeof t.contentHandle.measure?t.contentHandle:t.contentHandle.getNode()).measure((function(n,r,i,o){t.setState({measuring:!1,measured:!0,contentHeight:o},(function(){return e(o)}))})):t.setState({measuring:!1},(function(){return e(t.props.collapsedHeight)}))}))}))}},{key:"_toggleCollapsed",value:function(e){var t=this;if(e)this._transitionToHeight(this.props.collapsedHeight);else{if(!this.contentHandle)return void(this.state.measured&&this._transitionToHeight(this.state.contentHeight));this._measureContent((function(e){t._transitionToHeight(e)}))}}},{key:"_transitionToHeight",value:function(e){var t=this,n=this.props.duration,r=this.props.easing;if("string"===typeof r){for(var i,o=!1,a=0;a<C.length;a++)if(i=C[a],r.substr(0,i.length)===i){r=r.substr(i.length,1).toLowerCase()+r.substr(i.length+1),i=i.substr(4,1).toLowerCase()+i.substr(5),r=M.a[i](M.a[r||"ease"]),o=!0;break}if(o||(r=M.a[r]),!r)throw new Error('Invalid easing type "'+this.props.easing+'"')}this._animation&&this._animation.stop(),this.setState({animating:!0}),this._animation=S.a.timing(this.state.height,{useNativeDriver:!1,toValue:e||0,duration:n,easing:r}).start((function(){t.unmounted||t.setState({animating:!1},(function(){t.unmounted||t.props.onAnimationEnd()}))}))}},{key:"render",value:function(){var e=this.props,t=e.collapsed,n=e.enablePointerEvents,r=e.renderChildrenCollapsed,i=this.state,o=i.height,a=i.contentHeight,s=i.measuring,l=i.measured,c=i.animating,u=!s&&(l||t)&&{overflow:"hidden",height:o},h={};s?(h.position="absolute",h.opacity=0):"center"===this.props.align?h.transform=[{translateY:o.interpolate({inputRange:[0,a],outputRange:[a/-2,0]})}]:"bottom"===this.props.align&&(h.transform=[{translateY:o.interpolate({inputRange:[0,a],outputRange:[-a,0]})}]),c&&(h.height=a);var d=r||(!t||t&&c)&&(c||s||l);return x.a.createElement(S.a.View,{style:u,pointerEvents:!n&&t?"none":"auto"},x.a.createElement(S.a.View,{ref:this._handleRef,style:[this.props.style,h],onLayout:this.state.animating?void 0:this._handleLayoutChange},d&&this.props.children))}}]),n}(w.Component);O.defaultProps={align:"top",collapsed:!0,collapsedHeight:0,enablePointerEvents:!1,duration:300,easing:"easeOutCubic",onAnimationEnd:function(){return null},renderChildrenCollapsed:!0};var R=["activeSections","expandMultiple","onChange","containerStyle","sectionContainerStyle","expandFromBottom","sections","underlayColor","touchableProps","touchableComponent","onAnimationEnd","renderContent","renderHeader","renderFooter","renderSectionTitle","disabled","renderAsFlatList","keyExtractor"];function k(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}var P=["align","collapsed","collapsedHeight","renderChildrenCollapsed","enablePointerEvents","duration","easing","style","onAnimationEnd"],L=function(e){m()(n,e);var t=k(n);function n(){var e;h()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i)))._renderContainer=function(t,n,r){var i=e.props,o=i.activeSections,a=i.sectionContainerStyle,s=i.expandFromBottom,l=i.sections,u=i.underlayColor,h=i.touchableProps,d=i.touchableComponent,f=i.renderHeader,p=i.renderFooter,m=i.renderSectionTitle;return x.a.createElement(_.a,{key:n,style:a},m(t,n,o.includes(n)),s&&r(t,n),x.a.createElement(d,c()({onPress:function(){return e._toggleSection(n)},underlayColor:u},h,{accessibilityState:{expanded:o.includes(n)}}),f(t,n,o.includes(n),l)),!s&&r(t,n),p&&p(t,n,o.includes(n),l))},e}return f()(n,[{key:"_toggleSection",value:function(e){if(!this.props.disabled){var t=this.props,n=t.activeSections,r=t.expandMultiple,i=t.onChange,o=[];o=n.includes(e)?n.filter((function(t){return t!==e})):r?[].concat(s()(n),[e]):[e],i&&i(o)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.activeSections,r=(t.expandMultiple,t.onChange,t.containerStyle),i=(t.sectionContainerStyle,t.expandFromBottom,t.sections),a=(t.underlayColor,t.touchableProps,t.touchableComponent,t.onAnimationEnd),s=t.renderContent,l=(t.renderHeader,t.renderFooter,t.renderSectionTitle,t.disabled,t.renderAsFlatList),u=t.keyExtractor,h=o()(t,R),d={},f={};Object.keys(h).forEach((function(e){P.includes(e)?f[e]=h[e]:d[e]=h[e]}));var p=function(e,t){return x.a.createElement(O,c()({collapsed:!n.includes(t)},f,{onAnimationEnd:function(){return a(e,t)}}),s(e,t,n.includes(t),i))};return l?x.a.createElement(A.a,c()({style:r,data:i,extraData:n,nestedScrollEnabled:!0,keyExtractor:u,renderItem:function(t){var n=t.item,r=t.index,i=n,o=u(n,r);return e._renderContainer(i,o,p)}},d)):x.a.createElement(_.a,c()({style:r},d),i.map((function(t,n){var r=u(t,n);return e._renderContainer(t,r,p)})))}}]),n}(w.Component);L.defaultProps={underlayColor:"black",disabled:!1,expandFromBottom:!1,expandMultiple:!1,touchableComponent:E.a,keyExtractor:function(e,t){return t},renderSectionTitle:function(){return null},onAnimationEnd:function(){return null},sectionContainerStyle:{},renderAsFlatList:!1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));function r(e,t,n,r,i){if(isNaN(t)||isNaN(n)||isNaN(r))return e;var o,a,s,l,c,u,h,d,f,p,m,g,v=e._root,y={data:i},b=e._x0,w=e._y0,x=e._z0,_=e._x1,E=e._y1,A=e._z1;if(!v)return e._root=y,e;for(;v.length;)if((d=t>=(a=(b+_)/2))?b=a:_=a,(f=n>=(s=(w+E)/2))?w=s:E=s,(p=r>=(l=(x+A)/2))?x=l:A=l,o=v,!(v=v[m=p<<2|f<<1|d]))return o[m]=y,e;if(c=+e._x.call(null,v.data),u=+e._y.call(null,v.data),h=+e._z.call(null,v.data),t===c&&n===u&&r===h)return y.next=v,o?o[m]=y:e._root=y,e;do{o=o?o[m]=new Array(8):e._root=new Array(8),(d=t>=(a=(b+_)/2))?b=a:_=a,(f=n>=(s=(w+E)/2))?w=s:E=s,(p=r>=(l=(x+A)/2))?x=l:A=l}while((m=p<<2|f<<1|d)===(g=(h>=l)<<2|(u>=s)<<1|c>=a));return o[g]=v,o[m]=y,e}var i=function(e,t,n,r,i,o,a){this.node=e,this.x0=t,this.y0=n,this.z0=r,this.x1=i,this.y1=o,this.z1=a};function o(e){return e[0]}function a(e){return e[1]}function s(e){return e[2]}function l(e,t,n,r){var i=new c(null==t?o:t,null==n?a:n,null==r?s:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function c(e,t,n,r,i,o,a,s,l){this._x=e,this._y=t,this._z=n,this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=s,this._z1=l,this._root=void 0}function u(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var h=l.prototype=c.prototype;h.copy=function(){var e,t,n=new c(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root;if(!r)return n;if(!r.length)return n._root=u(r),n;for(e=[{source:r,target:n._root=new Array(8)}];r=e.pop();)for(var i=0;i<8;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(8)}):r.target[i]=u(t));return n},h.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e),i=+this._z.call(null,e);return r(this.cover(t,n,i),t,n,i,e)},h.addAll=function(e){var t,n,i,o,a,s=e.length,l=new Array(s),c=new Array(s),u=new Array(s),h=1/0,d=1/0,f=1/0,p=-1/0,m=-1/0,g=-1/0;for(n=0;n<s;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||isNaN(a=+this._z.call(null,t))||(l[n]=i,c[n]=o,u[n]=a,i<h&&(h=i),i>p&&(p=i),o<d&&(d=o),o>m&&(m=o),a<f&&(f=a),a>g&&(g=a));if(h>p||d>m||f>g)return this;for(this.cover(h,d,f).cover(p,m,g),n=0;n<s;++n)r(this,l[n],c[n],u[n],e[n]);return this},h.cover=function(e,t,n){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._z0,a=this._x1,s=this._y1,l=this._z1;if(isNaN(r))a=(r=Math.floor(e))+1,s=(i=Math.floor(t))+1,l=(o=Math.floor(n))+1;else{for(var c,u,h=a-r||1,d=this._root;r>e||e>=a||i>t||t>=s||o>n||n>=l;)switch(u=(n<o)<<2|(t<i)<<1|e<r,(c=new Array(8))[u]=d,d=c,h*=2,u){case 0:a=r+h,s=i+h,l=o+h;break;case 1:r=a-h,s=i+h,l=o+h;break;case 2:a=r+h,i=s-h,l=o+h;break;case 3:r=a-h,i=s-h,l=o+h;break;case 4:a=r+h,s=i+h,o=l-h;break;case 5:r=a-h,s=i+h,o=l-h;break;case 6:a=r+h,i=s-h,o=l-h;break;case 7:r=a-h,i=s-h,o=l-h}this._root&&this._root.length&&(this._root=d)}return this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=s,this._z1=l,this},h.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},h.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},h.find=function(e,t,n,r){var o,a,s,l,c,u,h,d,f,p=this._x0,m=this._y0,g=this._z0,v=this._x1,y=this._y1,b=this._z1,w=[],x=this._root;for(x&&w.push(new i(x,p,m,g,v,y,b)),null==r?r=1/0:(p=e-r,m=t-r,g=n-r,v=e+r,y=t+r,b=n+r,r*=r);d=w.pop();)if(!(!(x=d.node)||(a=d.x0)>v||(s=d.y0)>y||(l=d.z0)>b||(c=d.x1)<p||(u=d.y1)<m||(h=d.z1)<g))if(x.length){var _=(a+c)/2,E=(s+u)/2,A=(l+h)/2;w.push(new i(x[7],_,E,A,c,u,h),new i(x[6],a,E,A,_,u,h),new i(x[5],_,s,A,c,E,h),new i(x[4],a,s,A,_,E,h),new i(x[3],_,E,l,c,u,A),new i(x[2],a,E,l,_,u,A),new i(x[1],_,s,l,c,E,A),new i(x[0],a,s,l,_,E,A)),(f=(n>=A)<<2|(t>=E)<<1|e>=_)&&(d=w[w.length-1],w[w.length-1]=w[w.length-1-f],w[w.length-1-f]=d)}else{var S=e-+this._x.call(null,x.data),M=t-+this._y.call(null,x.data),T=n-+this._z.call(null,x.data),C=S*S+M*M+T*T;if(C<r){var O=Math.sqrt(r=C);p=e-O,m=t-O,g=n-O,v=e+O,y=t+O,b=n+O,o=x.data}}return o},h.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e))||isNaN(s=+this._z.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u,h,d,f,p,m,g=this._root,v=this._x0,y=this._y0,b=this._z0,w=this._x1,x=this._y1,_=this._z1;if(!g)return this;if(g.length)for(;;){if((h=o>=(l=(v+w)/2))?v=l:w=l,(d=a>=(c=(y+x)/2))?y=c:x=c,(f=s>=(u=(b+_)/2))?b=u:_=u,t=g,!(g=g[p=f<<2|d<<1|h]))return this;if(!g.length)break;(t[p+1&7]||t[p+2&7]||t[p+3&7]||t[p+4&7]||t[p+5&7]||t[p+6&7]||t[p+7&7])&&(n=t,m=p)}for(;g.data!==e;)if(r=g,!(g=g.next))return this;return(i=g.next)&&delete g.next,r?(i?r.next=i:delete r.next,this):t?(i?t[p]=i:delete t[p],(g=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&g===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!g.length&&(n?n[m]=g:this._root=g),this):(this._root=i,this)},h.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},h.root=function(){return this._root},h.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},h.visit=function(e){var t,n,r,o,a,s,l,c,u=[],h=this._root;for(h&&u.push(new i(h,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=u.pop();)if(!e(h=t.node,r=t.x0,o=t.y0,a=t.z0,s=t.x1,l=t.y1,c=t.z1)&&h.length){var d=(r+s)/2,f=(o+l)/2,p=(a+c)/2;(n=h[7])&&u.push(new i(n,d,f,p,s,l,c)),(n=h[6])&&u.push(new i(n,r,f,p,d,l,c)),(n=h[5])&&u.push(new i(n,d,o,p,s,f,c)),(n=h[4])&&u.push(new i(n,r,o,p,d,f,c)),(n=h[3])&&u.push(new i(n,d,f,a,s,l,p)),(n=h[2])&&u.push(new i(n,r,f,a,d,l,p)),(n=h[1])&&u.push(new i(n,d,o,a,s,f,p)),(n=h[0])&&u.push(new i(n,r,o,a,d,f,p))}return this},h.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=n.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.y0,c=t.z0,u=t.x1,h=t.y1,d=t.z1,f=(s+u)/2,p=(l+h)/2,m=(c+d)/2;(a=o[0])&&n.push(new i(a,s,l,c,f,p,m)),(a=o[1])&&n.push(new i(a,f,l,c,u,p,m)),(a=o[2])&&n.push(new i(a,s,p,c,f,h,m)),(a=o[3])&&n.push(new i(a,f,p,c,u,h,m)),(a=o[4])&&n.push(new i(a,s,l,m,f,p,d)),(a=o[5])&&n.push(new i(a,f,l,m,u,p,d)),(a=o[6])&&n.push(new i(a,s,p,m,f,h,d)),(a=o[7])&&n.push(new i(a,f,p,m,u,h,d))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.z0,t.x1,t.y1,t.z1);return this},h.x=function(e){return arguments.length?(this._x=e,this):this._x},h.y=function(e){return arguments.length?(this._y=e,this):this._y},h.z=function(e){return arguments.length?(this._z=e,this):this._z}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));function r(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,a,s,l,c,u,h,d,f=e._root,p={data:r},m=e._x0,g=e._y0,v=e._x1,y=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(o=(m+v)/2))?m=o:v=o,(u=n>=(a=(g+y)/2))?g=a:y=a,i=f,!(f=f[h=u<<1|c]))return i[h]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&n===l)return p.next=f,i?i[h]=p:e._root=p,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(c=t>=(o=(m+v)/2))?m=o:v=o,(u=n>=(a=(g+y)/2))?g=a:y=a}while((h=u<<1|c)===(d=(l>=a)<<1|s>=o));return i[d]=f,i[h]=p,e}var i=function(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i};function o(e){return e[0]}function a(e){return e[1]}function s(e,t,n){var r=new l(null==t?o:t,null==n?a:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function l(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function c(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var u=s.prototype=l.prototype;u.copy=function(){var e,t,n=new l(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=c(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=c(t));return n},u.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return r(this.cover(t,n),t,n,e)},u.addAll=function(e){var t,n,i,o,a=e.length,s=new Array(a),l=new Array(a),c=1/0,u=1/0,h=-1/0,d=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(s[n]=i,l[n]=o,i<c&&(c=i),i>h&&(h=i),o<u&&(u=o),o>d&&(d=o));if(c>h||u>d)return this;for(this.cover(c,u).cover(h,d),n=0;n<a;++n)r(this,s[n],l[n],e[n]);return this},u.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a,s,l=i-n||1,c=this._root;n>e||e>=i||r>t||t>=o;)switch(s=(t<r)<<1|e<n,(a=new Array(4))[s]=c,c=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},u.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},u.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},u.find=function(e,t,n){var r,o,a,s,l,c,u,h=this._x0,d=this._y0,f=this._x1,p=this._y1,m=[],g=this._root;for(g&&m.push(new i(g,h,d,f,p)),null==n?n=1/0:(h=e-n,d=t-n,f=e+n,p=t+n,n*=n);c=m.pop();)if(!(!(g=c.node)||(o=c.x0)>f||(a=c.y0)>p||(s=c.x1)<h||(l=c.y1)<d))if(g.length){var v=(o+s)/2,y=(a+l)/2;m.push(new i(g[3],v,y,s,l),new i(g[2],o,y,v,l),new i(g[1],v,a,s,y),new i(g[0],o,a,v,y)),(u=(t>=y)<<1|e>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var b=e-+this._x.call(null,g.data),w=t-+this._y.call(null,g.data),x=b*b+w*w;if(x<n){var _=Math.sqrt(n=x);h=e-_,d=t-_,f=e+_,p=t+_,r=g.data}}return r},u.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u,h,d,f=this._root,p=this._x0,m=this._y0,g=this._x1,v=this._y1;if(!f)return this;if(f.length)for(;;){if((c=o>=(s=(p+g)/2))?p=s:g=s,(u=a>=(l=(m+v)/2))?m=l:v=l,t=f,!(f=f[h=u<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;f.data!==e;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},u.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},u.root=function(){return this._root},u.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},u.visit=function(e){var t,n,r,o,a,s,l=[],c=this._root;for(c&&l.push(new i(c,this._x0,this._y0,this._x1,this._y1));t=l.pop();)if(!e(c=t.node,r=t.x0,o=t.y0,a=t.x1,s=t.y1)&&c.length){var u=(r+a)/2,h=(o+s)/2;(n=c[3])&&l.push(new i(n,u,h,a,s)),(n=c[2])&&l.push(new i(n,r,h,u,s)),(n=c[1])&&l.push(new i(n,u,o,a,h)),(n=c[0])&&l.push(new i(n,r,o,u,h))}return this},u.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.y0,c=t.x1,u=t.y1,h=(s+c)/2,d=(l+u)/2;(a=o[0])&&n.push(new i(a,s,l,h,d)),(a=o[1])&&n.push(new i(a,h,l,c,d)),(a=o[2])&&n.push(new i(a,s,d,h,u)),(a=o[3])&&n.push(new i(a,h,d,c,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},u.x=function(e){return arguments.length?(this._x=e,this):this._x},u.y=function(e){return arguments.length?(this._y=e,this):this._y}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));function r(e,t,n){if(isNaN(t))return e;var r,i,o,a,s,l,c=e._root,u={data:n},h=e._x0,d=e._x1;if(!c)return e._root=u,e;for(;c.length;)if((a=t>=(i=(h+d)/2))?h=i:d=i,r=c,!(c=c[s=+a]))return r[s]=u,e;if(t===(o=+e._x.call(null,c.data)))return u.next=c,r?r[s]=u:e._root=u,e;do{r=r?r[s]=new Array(2):e._root=new Array(2),(a=t>=(i=(h+d)/2))?h=i:d=i}while((s=+a)===(l=+(o>=i)));return r[l]=c,r[s]=u,e}var i=function(e,t,n){this.node=e,this.x0=t,this.x1=n};function o(e){return e[0]}function a(e,t){var n=new s(null==t?o:t,NaN,NaN);return null==e?n:n.addAll(e)}function s(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function l(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var c=a.prototype=s.prototype;c.copy=function(){var e,t,n=new s(this._x,this._x0,this._x1),r=this._root;if(!r)return n;if(!r.length)return n._root=l(r),n;for(e=[{source:r,target:n._root=new Array(2)}];r=e.pop();)for(var i=0;i<2;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(2)}):r.target[i]=l(t));return n},c.add=function(e){var t=+this._x.call(null,e);return r(this.cover(t),t,e)},c.addAll=function(e){var t,n,i=e.length,o=new Array(i),a=1/0,s=-1/0;for(t=0;t<i;++t)isNaN(n=+this._x.call(null,e[t]))||(o[t]=n,n<a&&(a=n),n>s&&(s=n));if(a>s)return this;for(this.cover(a).cover(s),t=0;t<i;++t)r(this,o[t],e[t]);return this},c.cover=function(e){if(isNaN(e=+e))return this;var t=this._x0,n=this._x1;if(isNaN(t))n=(t=Math.floor(e))+1;else{for(var r,i,o=n-t||1,a=this._root;t>e||e>=n;)switch(i=+(e<t),(r=new Array(2))[i]=a,a=r,o*=2,i){case 0:n=t+o;break;case 1:t=n-o}this._root&&this._root.length&&(this._root=a)}return this._x0=t,this._x1=n,this},c.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},c.extent=function(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},c.find=function(e,t){var n,r,o,a,s,l=this._x0,c=this._x1,u=[],h=this._root;for(h&&u.push(new i(h,l,c)),null==t?t=1/0:(l=e-t,c=e+t);a=u.pop();)if(!(!(h=a.node)||(r=a.x0)>c||(o=a.x1)<l))if(h.length){var d=(r+o)/2;u.push(new i(h[1],d,o),new i(h[0],r,d)),(s=+(e>=d))&&(a=u[u.length-1],u[u.length-1]=u[u.length-1-s],u[u.length-1-s]=a)}else{var f=Math.abs(e-+this._x.call(null,h.data));f<t&&(t=f,l=e-f,c=e+f,n=h.data)}return n},c.remove=function(e){if(isNaN(o=+this._x.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u=this._root,h=this._x0,d=this._x1;if(!u)return this;if(u.length)for(;;){if((s=o>=(a=(h+d)/2))?h=a:d=a,t=u,!(u=u[l=+s]))return this;if(!u.length)break;t[l+1&1]&&(n=t,c=l)}for(;u.data!==e;)if(r=u,!(u=u.next))return this;return(i=u.next)&&delete u.next,r?(i?r.next=i:delete r.next,this):t?(i?t[l]=i:delete t[l],(u=t[0]||t[1])&&u===(t[1]||t[0])&&!u.length&&(n?n[c]=u:this._root=u),this):(this._root=i,this)},c.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},c.root=function(){return this._root},c.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},c.visit=function(e){var t,n,r,o,a=[],s=this._root;for(s&&a.push(new i(s,this._x0,this._x1));t=a.pop();)if(!e(s=t.node,r=t.x0,o=t.x1)&&s.length){var l=(r+o)/2;(n=s[1])&&a.push(new i(n,l,o)),(n=s[0])&&a.push(new i(n,r,l))}return this},c.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._x1));t=n.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.x1,c=(s+l)/2;(a=o[0])&&n.push(new i(a,s,c)),(a=o[1])&&n.push(new i(a,c,l))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.x1);return this},c.x=function(e){return arguments.length?(this._x=e,this):this._x}},,,,,,,,,,,,,,,,,,,function(e,t,n){(function(t){var n;n=function(){"use strict";var e=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),n="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,r="undefined"!==typeof t&&t.Math===Math?t:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),i="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},o=["top","right","bottom","left","width","height","size","weight"],a="undefined"!==typeof MutationObserver,s=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function a(){n&&(n=!1,e()),r&&l()}function s(){i(a)}function l(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);o=e}return l}(this.refresh.bind(this),20)};s.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},s.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},s.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},s.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},s.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},s.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},s.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),o.some((function(e){return!!~t.indexOf(e)}))&&this.refresh()},s.getInstance=function(){return this.instance_||(this.instance_=new s),this.instance_},s.instance_=null;var l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||r},u=g(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function f(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return u;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),l=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(l+a)!==n&&(l-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var f=Math.round(s+o)-t,p=Math.round(l+a)-n;1!==Math.abs(f)&&(s-=f),1!==Math.abs(p)&&(l-=p)}return g(i.left,i.top,s,l)}var p="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"===typeof e.getBBox};function m(e){return n?p(e)?function(e){var t=e.getBBox();return g(0,0,t.width,t.height)}(e):f(e):u}function g(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e};v.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},v.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var y=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return l(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);l(this,{target:e,contentRect:n})},b=function(t,n,r){if(this.activeObservations_=[],this.observations_=new e,"function"!==typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r};b.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},b.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},b.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},b.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},b.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new y(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},b.prototype.clearActive=function(){this.activeObservations_.splice(0)},b.prototype.hasActive=function(){return this.activeObservations_.length>0};var w="undefined"!==typeof WeakMap?new WeakMap:new e,x=function(e){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=s.getInstance(),n=new b(e,t,this);w.set(this,n)};return["observe","unobserve","disconnect"].forEach((function(e){x.prototype[e]=function(){return(t=w.get(this))[e].apply(t,arguments);var t}})),"undefined"!==typeof r.ResizeObserver?r.ResizeObserver:(r.ResizeObserver=x,x)},e.exports=n()}).call(this,n(46))},function(e,t,n){"use strict";n.r(t);var r=n(265),i=n(264);Object(r.a)(i.a)},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(M){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=l;var u={};function h(){}function d(){}function f(){}var p={};p[i]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(A([])));g&&g!==t&&n.call(g,i)&&(p=g);var v=f.prototype=h.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"===typeof h&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function A(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=v.constructor=f,f.constructor=d,d.displayName=s(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=A,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r,i=r={_regexEscape:/([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g,_regexParseLocale:/^([a-zA-Z]*)([_\-a-zA-Z]*)$/,_escapeRegExpPattern:function(e){return"string"!==typeof e?e:e.replace(r._regexEscape,"\\$1")},_toLowerCase:function(e,t){return"string"!==typeof e?t&&e:e.toLowerCase()},_toUpperCase:function(e,t){return"string"!==typeof e?t&&e:e.toUpperCase()},_trim:function(e,t,n){var i,o=[],a=function(e){o.push("^"+e+"+|"+e+"+$")};if("boolean"===typeof t&&(n=t,t=null),"string"!==typeof e)return n&&e;if(Array.isArray(t)&&t.map((function(e){var t=r._escapeRegExpPattern(e);a(t)})),"string"===typeof t){var s=r._escapeRegExpPattern(t);a(s)}t||a("\\s");var l="("+o.join("|")+")";for(i=new RegExp(l,"g");e.match(i);)e=e.replace(i,"");return e},_parseLocale:function(e){var t,n=r._regexParseLocale.exec(e);if(e&&n)return n[2]=r._trim(n[2],["-","_"]),{lang:r._toLowerCase(n[1]),countryCode:t=r._toUpperCase(n[2])||t}},isRtlLang:function(e){var t=r._parseLocale(e);if(t)return r._BIDI_RTL_LANGS.indexOf(t.lang)>=0},getLangDir:function(e){return r.isRtlLang(e)?"rtl":"ltr"}};Object.defineProperty(r,"_BIDI_RTL_LANGS",{value:["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","ku","mzn","nqo","pnb","ps","sd","ug","ur"],writable:!1,enumerable:!0,configurable:!1}),e.exports=i},function(e,t,n){"use strict";var r=n(152),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.suspense"):60113,p=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,g="function"===typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function x(){}function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var E=_.prototype=new x;E.constructor=_,r(E,w.prototype),E.isPureReactComponent=!0;var A={current:null},S=Object.prototype.hasOwnProperty,M={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,r)&&!M.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:A.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var O=/\/+/g,R=[];function k(e,t,n,r){if(R.length){var i=R.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function P(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function L(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case a:l=!0}}if(l)return r(i,t,""===n?"."+D(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+D(s=t[c],c);l+=e(s,u,r,i)}else if(null===t||"object"!==typeof t?u=null:u="function"===typeof(u=g&&t[g]||t["@@iterator"])?u:null,"function"===typeof u)for(t=u.call(t),c=0;!(s=t.next()).done;)l+=e(s=s.value,u=n+D(s,c++),r,i);else if("object"===s)throw r=""+t,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return l}(e,"",t,n)}function D(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function I(e,t){e.func.call(e.context,t,e.count++)}function N(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?j(e,r,n,(function(e){return e})):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n)),r.push(e))}function j(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(O,"$&/")+"/"),L(e,N,t=k(t,o,r,i)),P(t)}var B={current:null};function F(){var e=B.current;if(null===e)throw Error(v(321));return e}var z={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:A,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return j(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;L(e,I,t=k(null,null,t,n)),P(t)},count:function(e){return L(e,(function(){return null}),null)},toArray:function(e){var t=[];return j(e,t,null,(function(e){return e})),t},only:function(e){if(!C(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=_,t.StrictMode=l,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(v(267,e));var i=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=A.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)S.call(t,u)&&!M.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var h=0;h<u;h++)c[h]=arguments[h+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},function(t,n,r){"use strict";var i=r(0),o=r(152),a=r(301);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!i)throw Error(s(227));var l=new Set,c={};function u(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(c[e]=t,e=0;e<t.length;e++)l.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},g={};function v(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function w(e){return e[1].toUpperCase()}function x(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!p.call(g,e)||!p.call(m,e)&&(f.test(e)?g[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,A=60106,S=60107,M=60108,T=60114,C=60109,O=60110,R=60112,k=60113,P=60120,L=60115,D=60116,I=60121,N=60128,j=60129,B=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var z=Symbol.for;E=z("react.element"),A=z("react.portal"),S=z("react.fragment"),M=z("react.strict_mode"),T=z("react.profiler"),C=z("react.provider"),O=z("react.context"),R=z("react.forward_ref"),k=z("react.suspense"),P=z("react.suspense_list"),L=z("react.memo"),D=z("react.lazy"),I=z("react.block"),z("react.scope"),N=z("react.opaque.id"),j=z("react.debug_trace_mode"),B=z("react.offscreen"),F=z("react.legacy_hidden")}var H,U="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function G(e){if(void 0===H)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||""}return"\n"+H+e}var W=!1;function q(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?G(e):""}function X(e){switch(e.tag){case 5:return G(e.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1);case 11:return e=q(e.type.render,!1);case 22:return e=q(e.type._render,!1);case 1:return e=q(e.type,!0);default:return""}}function Y(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case A:return"Portal";case T:return"Profiler";case M:return"StrictMode";case k:return"Suspense";case P:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case R:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case L:return Y(e.type);case I:return Y(e._render);case D:t=e._payload,e=e._init;try{return Y(e(t))}catch(n){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=Q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function J(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function $(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function te(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function ne(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function re(e,t){ne(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ie(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&$(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ae(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return i.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function se(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(s(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ce(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(s(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(s(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ue(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function he(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",fe="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ge,ve=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==fe||"innerHTML"in e)e.innerHTML=t;else{for((ge=ge||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ge.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function xe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function _e(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=xe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ae(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(s(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(s(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(s(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Me(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,Ce=null,Oe=null;function Re(e){if(e=$r(e)){if("function"!==typeof Te)throw Error(s(280));var t=e.stateNode;t&&(t=ti(t),Te(e.stateNode,e.type,t))}}function ke(e){Ce?Oe?Oe.push(e):Oe=[e]:Ce=e}function Pe(){if(Ce){var e=Ce,t=Oe;if(Oe=Ce=null,Re(e),t)for(e=0;e<t.length;e++)Re(t[e])}}function Le(e,t){return e(t)}function De(e,t,n,r,i){return e(t,n,r,i)}function Ie(){}var Ne=Le,je=!1,Be=!1;function Fe(){null===Ce&&null===Oe||(Ie(),Pe())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=ti(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var He=!1;if(d)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){He=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch(ac){He=!1}function Ve(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Ge=!1,We=null,qe=!1,Xe=null,Ye={onError:function(e){Ge=!0,We=e}};function Ke(e,t,n,r,i,o,a,s,l){Ge=!1,We=null,Ve.apply(Ye,arguments)}function Qe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if(Qe(e)!==e)throw Error(s(188))}function $e(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Qe(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Je(i),e;if(o===r)return Je(i),t;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,ot=!1,at=[],st=null,lt=null,ct=null,ut=new Map,ht=new Map,dt=[],ft="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":ut.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ht.delete(t.pointerId)}}function gt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=$r(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function vt(e){var t=Jr(e.target);if(null!==t){var n=Qe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ze(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){a.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=$r(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function wt(){for(ot=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=$r(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==lt&&yt(lt)&&(lt=null),null!==ct&&yt(ct)&&(ct=null),ut.forEach(bt),ht.forEach(bt)}function xt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,wt)))}function _t(e){function t(t){return xt(t,e)}if(0<at.length){xt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&xt(st,e),null!==lt&&xt(lt,e),null!==ct&&xt(ct,e),ut.forEach(t),ht.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)vt(n),null===n.blockedOn&&dt.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var At={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},St={},Mt={};function Tt(e){if(St[e])return St[e];if(!At[e])return e;var t,n=At[e];for(t in n)if(n.hasOwnProperty(t)&&t in Mt)return St[e]=n[t];return e}d&&(Mt=document.createElement("div").style,"AnimationEvent"in window||(delete At.animationend.animation,delete At.animationiteration.animation,delete At.animationstart.animation),"TransitionEvent"in window||delete At.transitionend.transition);var Ct=Tt("animationend"),Ot=Tt("animationiteration"),Rt=Tt("animationstart"),kt=Tt("transitionend"),Pt=new Map,Lt=new Map,Dt=["abort","abort",Ct,"animationEnd",Ot,"animationIteration",Rt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",kt,"transitionEnd","waiting","waiting"];function It(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Lt.set(r,t),Pt.set(r,i),u(i,[r])}}(0,a.unstable_now)();var Nt=8;function jt(e){if(0!==(1&e))return Nt=15,1;if(0!==(2&e))return Nt=14,2;if(0!==(4&e))return Nt=13,4;var t=24&e;return 0!==t?(Nt=12,t):0!==(32&e)?(Nt=11,32):0!==(t=192&e)?(Nt=10,t):0!==(256&e)?(Nt=9,256):0!==(t=3584&e)?(Nt=8,t):0!==(4096&e)?(Nt=7,4096):0!==(t=4186112&e)?(Nt=6,t):0!==(t=62914560&e)?(Nt=5,t):67108864&e?(Nt=4,67108864):0!==(134217728&e)?(Nt=3,134217728):0!==(t=805306368&e)?(Nt=2,t):0!==(1073741824&e)?(Nt=1,1073741824):(Nt=8,e)}function Bt(e,t){var n=e.pendingLanes;if(0===n)return Nt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Nt=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=jt(l),i=Nt):0!==(s&=o)&&(r=jt(s),i=Nt)}else 0!==(o=n&~a)?(r=jt(o),i=Nt):0!==s&&(r=jt(s),i=Nt);if(0===r)return 0;if(r=n&((0>(r=31-Gt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(jt(t),i<=Nt)return t;Nt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Gt(t)),r|=e[n],t&=~i;return r}function Ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ht(24&~t))?zt(10,t):e;case 10:return 0===(e=Ht(192&~t))?zt(8,t):e;case 8:return 0===(e=Ht(3584&~t))&&(0===(e=Ht(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ht(805306368&~t))&&(t=268435456),t}throw Error(s(358,e))}function Ht(e){return e&-e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Gt(t)]=n}var Gt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/qt|0)|0},Wt=Math.log,qt=Math.LN2;var Xt=a.unstable_UserBlockingPriority,Yt=a.unstable_runWithPriority,Kt=!0;function Qt(e,t,n,r){je||Ie();var i=Jt,o=je;je=!0;try{De(i,e,t,n,r)}finally{(je=o)||Fe()}}function Zt(e,t,n,r){Yt(Xt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var i;if(Kt)if((i=0===(4&t))&&0<at.length&&-1<ft.indexOf(e))e=pt(null,e,t,n,r),at.push(e);else{var o=$t(e,t,n,r);if(null===o)i&&mt(e,r);else{if(i){if(-1<ft.indexOf(e))return e=pt(o,e,t,n,r),void at.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return st=gt(st,e,t,n,r,i),!0;case"dragenter":return lt=gt(lt,e,t,n,r,i),!0;case"mouseover":return ct=gt(ct,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ut.set(o,gt(ut.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ht.set(o,gt(ht.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;mt(e,r)}kr(e,t,r,null,n)}}}function $t(e,t,n,r){var i=Me(r);if(null!==(i=Jr(i))){var o=Qe(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Ze(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return kr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function ln(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,un,hn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=ln(dn),pn=o({},dn,{view:0,detail:0}),mn=ln(pn),gn=o({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hn&&(hn&&"mousemove"===e.type?(cn=e.screenX-hn.screenX,un=e.screenY-hn.screenY):un=cn=0,hn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:un}}),vn=ln(gn),yn=ln(o({},gn,{dataTransfer:0})),bn=ln(o({},pn,{relatedTarget:0})),wn=ln(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=ln(o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),_n=ln(o({},dn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},An={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Tn(){return Mn}var Cn=ln(o({},pn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?An[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),On=ln(o({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=ln(o({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),kn=ln(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=ln(o({},gn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=[9,13,27,32],Dn=d&&"CompositionEvent"in window,In=null;d&&"documentMode"in document&&(In=document.documentMode);var Nn=d&&"TextEvent"in window&&!In,jn=d&&(!Dn||In&&8<In&&11>=In),Bn=String.fromCharCode(32),Fn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Wn(e,t,n,r){ke(r),0<(t=Lr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Xn=null;function Yn(e){Sr(e,0)}function Kn(e){if(J(ei(e)))return e}function Qn(e,t){if("change"===e)return t}var Zn=!1;if(d){var Jn;if(d){var $n="oninput"in document;if(!$n){var er=document.createElement("div");er.setAttribute("oninput","return;"),$n="function"===typeof er.oninput}Jn=$n}else Jn=!1;Zn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Xn=qn=null)}function nr(e){if("value"===e.propertyName&&Kn(Xn)){var t=[];if(Wn(t,Xn,e,Me(e)),e=Yn,je)e(t);else{je=!0;try{Le(e,t)}finally{je=!1,Fe()}}}}function rr(e,t,n){"focusin"===e?(tr(),Xn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Xn)}function or(e,t){if("click"===e)return Kn(t)}function ar(e,t){if("input"===e||"change"===e)return Kn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},lr=Object.prototype.hasOwnProperty;function cr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!lr.call(t,n[r])||!sr(e[n[r]],t[n[r]]))return!1;return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(){for(var e=window,t=$();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=$((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=d&&"documentMode"in document&&11>=document.documentMode,mr=null,gr=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==mr||mr!==$(r)||("selectionStart"in(r=mr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&cr(vr,r)||(vr=r,0<(r=Lr(gr,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}It("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),It("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),It(Dt,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xr<wr.length;xr++)Lt.set(wr[xr],0);h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Er=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,l,c){if(Ke.apply(this,arguments),Ge){if(!Ge)throw Error(s(198));var u=We;Ge=!1,We=null,qe||(qe=!0,Xe=u)}}(r,t,void 0,e),e.currentTarget=null}function Sr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Ar(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Ar(i,s,c),o=l}}}if(qe)throw e=Xe,qe=!1,Xe=null,e}function Mr(e,t){var n=ni(t),r=e+"__bubble";n.has(r)||(Rr(t,e,2,!1),n.add(r))}var Tr="_reactListening"+Math.random().toString(36).slice(2);function Cr(e){e[Tr]||(e[Tr]=!0,l.forEach((function(t){Er.has(t)||Or(t,!1,e,null),Or(t,!0,e,null)})))}function Or(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Er.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=ni(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Rr(o,e,i,t),a.add(s))}function Rr(e,t,n,r){var i=Lt.get(t);switch(void 0===i?2:i){case 0:i=Qt;break;case 1:i=Zt;break;default:i=Jt}n=i.bind(null,t,n,e),i=void 0,!He||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function kr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Jr(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Be)return e(t,n);Be=!0;try{Ne(e,t,n)}finally{Be=!1,Fe()}}((function(){var r=o,i=Me(n),a=[];e:{var s=Pt.get(e);if(void 0!==s){var l=fn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":l=Cn;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=vn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Rn;break;case Ct:case Ot:case Rt:l=wn;break;case kt:l=kn;break;case"scroll":l=mn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=On}var u=0!==(4&t),h=!u&&"scroll"===e,d=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==d&&(null!=(m=ze(p,d))&&u.push(Pr(p,m,f)))),h)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!Jr(c)&&!c[Qr])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Jr(c):null)&&(c!==(h=Qe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=vn,m="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=On,m="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?s:ei(l),f=null==c?s:ei(c),(s=new u(m,p+"leave",l,n,i)).target=h,s.relatedTarget=f,m=null,Jr(i)===r&&((u=new u(d,p+"enter",c,n,i)).target=f,u.relatedTarget=h,m=u),h=m,l&&c)e:{for(d=c,p=0,f=u=l;f;f=Dr(f))p++;for(f=0,m=d;m;m=Dr(m))f++;for(;0<p-f;)u=Dr(u),p--;for(;0<f-p;)d=Dr(d),f--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break e;u=Dr(u),d=Dr(d)}u=null}else u=null;null!==l&&Ir(a,s,l,u,!1),null!==c&&null!==h&&Ir(a,h,c,u,!0)}if("select"===(l=(s=r?ei(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Qn;else if(Gn(s))if(Zn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Wn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&oe(s,"number",s.value)),v=r?ei(r):window,e){case"focusin":(Gn(v)||"true"===v.contentEditable)&&(mr=v,gr=r,vr=null);break;case"focusout":vr=gr=mr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,br(a,n,i);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":br(a,n,i)}var y;if(Dn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?zn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(jn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=rn()):(tn="value"in(en=i)?en.value:en.textContent,Un=!0)),0<(v=Lr(r,b)).length&&(b=new _n(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Hn(n))&&(b.data=y))),(y=Nn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Bn);case"textInput":return(e=t.data)===Bn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Dn&&zn(e,t)?(e=rn(),nn=tn=en=null,Un=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Lr(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Sr(a,t)}))}function Pr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=ze(e,n))&&r.unshift(Pr(e,o,i)),null!=(o=ze(e,t))&&r.push(Pr(e,o,i))),e=e.return}return r}function Dr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ir(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=ze(n,o))&&a.unshift(Pr(n,l,s)):i||null!=(l=ze(n,o))&&a.push(Pr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Nr(){}var jr=null,Br=null;function Fr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function zr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Hr="function"===typeof setTimeout?setTimeout:void 0,Ur="function"===typeof clearTimeout?clearTimeout:void 0;function Vr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var qr=0;var Xr=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Xr,Kr="__reactProps$"+Xr,Qr="__reactContainer$"+Xr,Zr="__reactEvents$"+Xr;function Jr(e){var t=e[Yr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qr]||n[Yr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[Yr])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function $r(e){return!(e=e[Yr]||e[Qr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ei(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(s(33))}function ti(e){return e[Kr]||null}function ni(e){var t=e[Zr];return void 0===t&&(t=e[Zr]=new Set),t}var ri=[],ii=-1;function oi(e){return{current:e}}function ai(e){0>ii||(e.current=ri[ii],ri[ii]=null,ii--)}function si(e,t){ii++,ri[ii]=e.current,e.current=t}var li={},ci=oi(li),ui=oi(!1),hi=li;function di(e,t){var n=e.type.contextTypes;if(!n)return li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function pi(){ai(ui),ai(ci)}function mi(e,t,n){if(ci.current!==li)throw Error(s(168));si(ci,t),si(ui,n)}function gi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(s(108,Y(t)||"Unknown",i));return o({},n,r)}function vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,hi=ci.current,si(ci,e),si(ui,ui.current),!0}function yi(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=gi(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,ai(ui),ai(ci),si(ci,e)):ai(ui),si(ui,n)}var bi=null,wi=null,xi=a.unstable_runWithPriority,_i=a.unstable_scheduleCallback,Ei=a.unstable_cancelCallback,Ai=a.unstable_shouldYield,Si=a.unstable_requestPaint,Mi=a.unstable_now,Ti=a.unstable_getCurrentPriorityLevel,Ci=a.unstable_ImmediatePriority,Oi=a.unstable_UserBlockingPriority,Ri=a.unstable_NormalPriority,ki=a.unstable_LowPriority,Pi=a.unstable_IdlePriority,Li={},Di=void 0!==Si?Si:function(){},Ii=null,Ni=null,ji=!1,Bi=Mi(),Fi=1e4>Bi?Mi:function(){return Mi()-Bi};function zi(){switch(Ti()){case Ci:return 99;case Oi:return 98;case Ri:return 97;case ki:return 96;case Pi:return 95;default:throw Error(s(332))}}function Hi(e){switch(e){case 99:return Ci;case 98:return Oi;case 97:return Ri;case 96:return ki;case 95:return Pi;default:throw Error(s(332))}}function Ui(e,t){return e=Hi(e),xi(e,t)}function Vi(e,t,n){return e=Hi(e),_i(e,t,n)}function Gi(){if(null!==Ni){var e=Ni;Ni=null,Ei(e)}Wi()}function Wi(){if(!ji&&null!==Ii){ji=!0;var e=0;try{var t=Ii;Ui(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ii=null}catch(n){throw null!==Ii&&(Ii=Ii.slice(e+1)),_i(Ci,Gi),n}finally{ji=!1}}}var qi=_.ReactCurrentBatchConfig;function Xi(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Yi=oi(null),Ki=null,Qi=null,Zi=null;function Ji(){Zi=Qi=Ki=null}function $i(e){var t=Yi.current;ai(Yi),e.type._context._currentValue=t}function eo(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function to(e,t){Ki=e,Zi=Qi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(La=!0),e.firstContext=null)}function no(e,t){if(Zi!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Zi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qi){if(null===Ki)throw Error(s(308));Qi=t,Ki.dependencies={lanes:0,firstContext:t,responders:null}}else Qi=Qi.next=t;return e._currentValue}var ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function oo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ao(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function so(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function co(e,t,n,r){var i=e.updateQueue;ro=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var h=e.alternate;if(null!==h){var d=(h=h.updateQueue).lastBaseUpdate;d!==s&&(null===d?h.firstBaseUpdate=u:d.next=u,h.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,s=0,h=u=c=null;;){l=a.lane;var f=a.eventTime;if((r&l)===l){null!==h&&(h=h.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(l=t,f=n,m.tag){case 1:if("function"===typeof(p=m.payload)){d=p.call(f,d,l);break e}d=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(l="function"===typeof(p=m.payload)?p.call(f,d,l):p)||void 0===l)break e;d=o({},d,l);break e;case 2:ro=!0}}null!==a.callback&&(e.flags|=32,null===(l=i.effects)?i.effects=[a]:l.push(a))}else f={eventTime:f,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===h?(u=h=f,c=d):h=h.next=f,s|=l;if(null===(a=a.next)){if(null===(l=i.shared.pending))break;a=l.next,l.next=null,i.lastBaseUpdate=l,i.shared.pending=null}}null===h&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=h,Is|=s,e.lanes=s,e.memoizedState=d}}function uo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(s(191,i));i.call(r)}}}var ho=(new i.Component).refs;function fo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var po={isMounted:function(e){return!!(e=e._reactInternals)&&Qe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=al(),i=sl(e),o=ao(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),so(e,o),ll(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=al(),i=sl(e),o=ao(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),so(e,o),ll(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=al(),r=sl(e),i=ao(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),so(e,i),ll(e,r,n)}};function mo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,o))}function go(e,t,n){var r=!1,i=li,o=t.contextType;return"object"===typeof o&&null!==o?o=no(o):(i=fi(t)?hi:ci.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?di(e,i):li),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=po,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function vo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&po.enqueueReplaceState(t,t.state,null)}function yo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ho,io(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=no(o):(o=fi(t)?hi:ci.current,i.context=di(e,o)),co(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(fo(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&po.enqueueReplaceState(i,i.state,null),co(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var bo=Array.isArray;function wo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ho&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!==typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function xo(e,t){if("textarea"!==e.type)throw Error(s(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function _o(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=zl(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function a(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Gl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=wo(e,t,n),r.return=e,r):((r=Hl(n.type,n.key,n.props,null,e.mode,r)).ref=wo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Wl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,o){return null===t||7!==t.tag?((t=Ul(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Gl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Hl(t.type,t.key,t.props,null,e.mode,n)).ref=wo(e,null,t),n.return=e,n;case A:return(t=Wl(t,e.mode,n)).return=e,t}if(bo(t)||V(t))return(t=Ul(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===i?n.type===S?h(e,t,n.props.children,r,i):c(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null}if(bo(n)||V(n))return null!==i?null:h(e,t,n,r,null);xo(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===S?h(t,e,r.props.children,i,r.key):c(t,e,r,i);case A:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(bo(r)||V(r))return h(t,e=e.get(n)||null,r,i,null);xo(t,r)}return null}function m(i,a,s,l){for(var c=null,u=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(i,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(i,h),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,h=g}if(m===s.length)return n(i,h),c;if(null===h){for(;m<s.length;m++)null!==(h=d(i,s[m],l))&&(a=o(h,a,m),null===u?c=h:u.sibling=h,u=h);return c}for(h=r(i,h);m<s.length;m++)null!==(g=p(h,i,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(i,e)})),c}function g(i,a,l,c){var u=V(l);if("function"!==typeof u)throw Error(s(150));if(null==(l=u.call(l)))throw Error(s(151));for(var h=u=null,m=a,g=a=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),a=o(b,a,g),null===h?u=b:h.sibling=b,h=b,m=v}if(y.done)return n(i,m),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=d(i,y.value,c))&&(a=o(y,a,g),null===h?u=y:h.sibling=y,h=y);return u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),a=o(y,a,g),null===h?u=y:h.sibling=y,h=y);return e&&m.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var c="object"===typeof o&&null!==o&&o.type===S&&null===o.key;c&&(o=o.props.children);var u="object"===typeof o&&null!==o;if(u)switch(o.$$typeof){case E:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){switch(c.tag){case 7:if(o.type===S){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}break;default:if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=wo(e,c,o),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}o.type===S?((r=Ul(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Hl(o.type,o.key,o.props,null,e.mode,l)).ref=wo(e,r,o),l.return=e,e=l)}return a(e);case A:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Wl(o,e.mode,l)).return=e,e=r}return a(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Gl(o,e.mode,l)).return=e,e=r),a(e);if(bo(o))return m(e,r,o,l);if(V(o))return g(e,r,o,l);if(u&&xo(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(s(152,Y(e.type)||"Component"))}return n(e,r)}}var Eo=_o(!0),Ao=_o(!1),So={},Mo=oi(So),To=oi(So),Co=oi(So);function Oo(e){if(e===So)throw Error(s(174));return e}function Ro(e,t){switch(si(Co,t),si(To,e),si(Mo,So),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:me(null,"");break;default:t=me(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ai(Mo),si(Mo,t)}function ko(){ai(Mo),ai(To),ai(Co)}function Po(e){Oo(Co.current);var t=Oo(Mo.current),n=me(t,e.type);t!==n&&(si(To,e),si(Mo,n))}function Lo(e){To.current===e&&(ai(Mo),ai(To))}var Do=oi(0);function Io(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var No=null,jo=null,Bo=!1;function Fo(e,t){var n=Bl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function zo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ho(e){if(Bo){var t=jo;if(t){var n=t;if(!zo(e,t)){if(!(t=Gr(n.nextSibling))||!zo(e,t))return e.flags=-1025&e.flags|2,Bo=!1,void(No=e);Fo(No,n)}No=e,jo=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,Bo=!1,No=e}}function Uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;No=e}function Vo(e){if(e!==No)return!1;if(!Bo)return Uo(e),Bo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!zr(t,e.memoizedProps))for(t=jo;t;)Fo(e,t),t=Gr(t.nextSibling);if(Uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){jo=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}jo=null}}else jo=No?Gr(e.stateNode.nextSibling):null;return!0}function Go(){jo=No=null,Bo=!1}var Wo=[];function qo(){for(var e=0;e<Wo.length;e++)Wo[e]._workInProgressVersionPrimary=null;Wo.length=0}var Xo=_.ReactCurrentDispatcher,Yo=_.ReactCurrentBatchConfig,Ko=0,Qo=null,Zo=null,Jo=null,$o=!1,ea=!1;function ta(){throw Error(s(321))}function na(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ra(e,t,n,r,i,o){if(Ko=o,Qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xo.current=null===e||null===e.memoizedState?Oa:Ra,e=n(r,i),ea){o=0;do{if(ea=!1,!(25>o))throw Error(s(301));o+=1,Jo=Zo=null,t.updateQueue=null,Xo.current=ka,e=n(r,i)}while(ea)}if(Xo.current=Ca,t=null!==Zo&&null!==Zo.next,Ko=0,Jo=Zo=Qo=null,$o=!1,t)throw Error(s(300));return e}function ia(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Jo?Qo.memoizedState=Jo=e:Jo=Jo.next=e,Jo}function oa(){if(null===Zo){var e=Qo.alternate;e=null!==e?e.memoizedState:null}else e=Zo.next;var t=null===Jo?Qo.memoizedState:Jo.next;if(null!==t)Jo=t,Zo=e;else{if(null===e)throw Error(s(310));e={memoizedState:(Zo=e).memoizedState,baseState:Zo.baseState,baseQueue:Zo.baseQueue,queue:Zo.queue,next:null},null===Jo?Qo.memoizedState=Jo=e:Jo=Jo.next=e}return Jo}function aa(e,t){return"function"===typeof t?t(e):t}function sa(e){var t=oa(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=Zo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=a=o=null,c=i;do{var u=c.lane;if((Ko&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var h={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(a=l=h,o=r):l=l.next=h,Qo.lanes|=u,Is|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=a,sr(r,t.memoizedState)||(La=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function la(e){var t=oa(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);sr(o,t.memoizedState)||(La=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ca(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Ko&e)===e)&&(t._workInProgressVersionPrimary=r,Wo.push(t))),e)return n(t._source);throw Wo.push(t),Error(s(350))}function ua(e,t,n,r){var i=Ts;if(null===i)throw Error(s(349));var o=t._getVersion,a=o(t._source),l=Xo.current,c=l.useState((function(){return ca(i,t,n)})),u=c[1],h=c[0];c=Jo;var d=e.memoizedState,f=d.refs,p=f.getSnapshot,m=d.source;d=d.subscribe;var g=Qo;return e.memoizedState={refs:f,source:t,subscribe:r},l.useEffect((function(){f.getSnapshot=n,f.setSnapshot=u;var e=o(t._source);if(!sr(a,e)){e=n(t._source),sr(h,e)||(u(e),e=sl(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,s=e;0<s;){var l=31-Gt(s),c=1<<l;r[l]|=e,s&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=f.getSnapshot,n=f.setSnapshot;try{n(e(t._source));var r=sl(g);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),sr(p,n)&&sr(m,t)&&sr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:aa,lastRenderedState:h}).dispatch=u=Ta.bind(null,Qo,e),c.queue=e,c.baseQueue=null,h=ca(i,t,n),c.memoizedState=c.baseState=h),h}function ha(e,t,n){return ua(oa(),e,t,n)}function da(e){var t=ia();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:aa,lastRenderedState:e}).dispatch=Ta.bind(null,Qo,e),[t.memoizedState,e]}function fa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Qo.updateQueue)?(t={lastEffect:null},Qo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function pa(e){return e={current:e},ia().memoizedState=e}function ma(){return oa().memoizedState}function ga(e,t,n,r){var i=ia();Qo.flags|=e,i.memoizedState=fa(1|t,n,void 0,void 0===r?null:r)}function va(e,t,n,r){var i=oa();r=void 0===r?null:r;var o=void 0;if(null!==Zo){var a=Zo.memoizedState;if(o=a.destroy,null!==r&&na(r,a.deps))return void fa(t,n,o,r)}Qo.flags|=e,i.memoizedState=fa(1|t,n,o,r)}function ya(e,t){return ga(516,4,e,t)}function ba(e,t){return va(516,4,e,t)}function wa(e,t){return va(4,2,e,t)}function xa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function _a(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,va(4,2,xa.bind(null,t,e),n)}function Ea(){}function Aa(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&na(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sa(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&na(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ma(e,t){var n=zi();Ui(98>n?98:n,(function(){e(!0)})),Ui(97<n?97:n,(function(){var n=Yo.transition;Yo.transition=1;try{e(!1),t()}finally{Yo.transition=n}}))}function Ta(e,t,n){var r=al(),i=sl(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Qo||null!==a&&a===Qo)ea=$o=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,sr(l,s))return}catch(c){}ll(e,i,r)}}var Ca={readContext:no,useCallback:ta,useContext:ta,useEffect:ta,useImperativeHandle:ta,useLayoutEffect:ta,useMemo:ta,useReducer:ta,useRef:ta,useState:ta,useDebugValue:ta,useDeferredValue:ta,useTransition:ta,useMutableSource:ta,useOpaqueIdentifier:ta,unstable_isNewReconciler:!1},Oa={readContext:no,useCallback:function(e,t){return ia().memoizedState=[e,void 0===t?null:t],e},useContext:no,useEffect:ya,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ga(4,2,xa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ga(4,2,e,t)},useMemo:function(e,t){var n=ia();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ia();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ta.bind(null,Qo,e),[r.memoizedState,e]},useRef:pa,useState:da,useDebugValue:Ea,useDeferredValue:function(e){var t=da(e),n=t[0],r=t[1];return ya((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=da(!1),t=e[0];return pa(e=Ma.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ia();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ua(r,e,t,n)},useOpaqueIdentifier:function(){if(Bo){var e=!1,t=function(e){return{$$typeof:N,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(qr++).toString(36))),Error(s(355))})),n=da(t)[1];return 0===(2&Qo.mode)&&(Qo.flags|=516,fa(5,(function(){n("r:"+(qr++).toString(36))}),void 0,null)),t}return da(t="r:"+(qr++).toString(36)),t},unstable_isNewReconciler:!1},Ra={readContext:no,useCallback:Aa,useContext:no,useEffect:ba,useImperativeHandle:_a,useLayoutEffect:wa,useMemo:Sa,useReducer:sa,useRef:ma,useState:function(){return sa(aa)},useDebugValue:Ea,useDeferredValue:function(e){var t=sa(aa),n=t[0],r=t[1];return ba((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=sa(aa)[0];return[ma().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return sa(aa)[0]},unstable_isNewReconciler:!1},ka={readContext:no,useCallback:Aa,useContext:no,useEffect:ba,useImperativeHandle:_a,useLayoutEffect:wa,useMemo:Sa,useReducer:la,useRef:ma,useState:function(){return la(aa)},useDebugValue:Ea,useDeferredValue:function(e){var t=la(aa),n=t[0],r=t[1];return ba((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=la(aa)[0];return[ma().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return la(aa)[0]},unstable_isNewReconciler:!1},Pa=_.ReactCurrentOwner,La=!1;function Da(e,t,n,r){t.child=null===e?Ao(t,null,n,r):Eo(t,e.child,n,r)}function Ia(e,t,n,r,i){n=n.render;var o=t.ref;return to(t,i),r=ra(e,t,n,r,o,i),null===e||La?(t.flags|=1,Da(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ts(e,t,i))}function Na(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||Fl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Hl(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ja(e,t,a,r,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:cr)(i,r)&&e.ref===t.ref)?ts(e,t,o):(t.flags|=1,(e=zl(a,r)).ref=t.ref,e.return=t,t.child=e)}function ja(e,t,n,r,i,o){if(null!==e&&cr(e.memoizedProps,r)&&e.ref===t.ref){if(La=!1,0===(o&i))return t.lanes=e.lanes,ts(e,t,o);0!==(16384&e.flags)&&(La=!0)}return za(e,t,n,r,o)}function Ba(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},gl(t,n);else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},gl(t,e),null;t.memoizedState={baseLanes:0},gl(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,gl(t,r);return Da(e,t,i,n),t.child}function Fa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function za(e,t,n,r,i){var o=fi(n)?hi:ci.current;return o=di(t,o),to(t,i),n=ra(e,t,n,r,o,i),null===e||La?(t.flags|=1,Da(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ts(e,t,i))}function Ha(e,t,n,r,i){if(fi(n)){var o=!0;vi(t)}else o=!1;if(to(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),go(t,n,r),yo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=no(c):c=di(t,c=fi(n)?hi:ci.current);var u=n.getDerivedStateFromProps,h="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;h||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&vo(t,a,r,c),ro=!1;var d=t.memoizedState;a.state=d,co(t,r,a,i),l=t.memoizedState,s!==r||d!==l||ui.current||ro?("function"===typeof u&&(fo(t,n,u,r),l=t.memoizedState),(s=ro||mo(t,n,s,r,d,l,c))?(h||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,oo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xi(t.type,s),a.props=c,h=t.pendingProps,d=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=no(l):l=di(t,l=fi(n)?hi:ci.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==h||d!==l)&&vo(t,a,r,l),ro=!1,d=t.memoizedState,a.state=d,co(t,r,a,i);var p=t.memoizedState;s!==h||d!==p||ui.current||ro?("function"===typeof f&&(fo(t,n,f,r),p=t.memoizedState),(c=ro||mo(t,n,c,r,d,p,l))?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Ua(e,t,n,r,o,i)}function Ua(e,t,n,r,i,o){Fa(e,t);var a=0!==(64&t.flags);if(!r&&!a)return i&&yi(t,n,!1),ts(e,t,o);r=t.stateNode,Pa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Eo(t,e.child,null,o),t.child=Eo(t,null,s,o)):Da(e,t,s,o),t.memoizedState=r.state,i&&yi(t,n,!0),t.child}function Va(e){var t=e.stateNode;t.pendingContext?mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&mi(0,t.context,!1),Ro(e,t.containerInfo)}var Ga,Wa,qa,Xa={dehydrated:null,retryLane:0};function Ya(e,t,n){var r,i=t.pendingProps,o=Do.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),si(Do,1&o),null===e?(void 0!==i.fallback&&Ho(t),e=i.children,o=i.fallback,a?(e=Ka(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,e):"number"===typeof i.unstable_expectedLoadTime?(e=Ka(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,t.lanes=33554432,e):((n=Vl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=Za(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Xa,i):(n=Qa(e,t,i.children,n),t.memoizedState=null,n))}function Ka(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Vl(t,i,0,null),n=Ul(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function Qa(e,t,n,r){var i=e.child;return e=i.sibling,n=zl(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Za(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=zl(a,s),null!==e?r=zl(e,r):(r=Ul(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Ja(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),eo(e.return,t)}function $a(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function es(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Da(e,t,r.children,n),0!==(2&(r=Do.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ja(e,n);else if(19===e.tag)Ja(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(si(Do,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Io(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$a(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Io(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$a(t,!0,n,null,o,t.lastEffect);break;case"together":$a(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ts(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Is|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=zl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=zl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ns(e,t){if(!Bo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rs(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return fi(t.type)&&pi(),null;case 3:return ko(),ai(ui),ai(ci),qo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Vo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Lo(t);var i=Oo(Co.current);if(n=t.type,null!==e&&null!=t.stateNode)Wa(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(s(166));return null}if(e=Oo(Mo.current),Vo(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Yr]=t,r[Kr]=a,n){case"dialog":Mr("cancel",r),Mr("close",r);break;case"iframe":case"object":case"embed":Mr("load",r);break;case"video":case"audio":for(e=0;e<_r.length;e++)Mr(_r[e],r);break;case"source":Mr("error",r);break;case"img":case"image":case"link":Mr("error",r),Mr("load",r);break;case"details":Mr("toggle",r);break;case"input":te(r,a),Mr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Mr("invalid",r);break;case"textarea":ce(r,a),Mr("invalid",r)}for(var l in Ae(n,a),e=null,a)a.hasOwnProperty(l)&&(i=a[l],"children"===l?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):c.hasOwnProperty(l)&&null!=i&&"onScroll"===l&&Mr("scroll",r));switch(n){case"input":Z(r),ie(r,a,!0);break;case"textarea":Z(r),he(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Nr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(l=9===i.nodeType?i:i.ownerDocument,e===de&&(e=pe(n)),e===de?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Yr]=t,e[Kr]=r,Ga(e,t),t.stateNode=e,l=Se(n,r),n){case"dialog":Mr("cancel",e),Mr("close",e),i=r;break;case"iframe":case"object":case"embed":Mr("load",e),i=r;break;case"video":case"audio":for(i=0;i<_r.length;i++)Mr(_r[i],e);i=r;break;case"source":Mr("error",e),i=r;break;case"img":case"image":case"link":Mr("error",e),Mr("load",e),i=r;break;case"details":Mr("toggle",e),i=r;break;case"input":te(e,r),i=ee(e,r),Mr("invalid",e);break;case"option":i=ae(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Mr("invalid",e);break;case"textarea":ce(e,r),i=le(e,r),Mr("invalid",e);break;default:i=r}Ae(n,i);var u=i;for(a in u)if(u.hasOwnProperty(a)){var h=u[a];"style"===a?_e(e,h):"dangerouslySetInnerHTML"===a?null!=(h=h?h.__html:void 0)&&ve(e,h):"children"===a?"string"===typeof h?("textarea"!==n||""!==h)&&ye(e,h):"number"===typeof h&&ye(e,""+h):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(c.hasOwnProperty(a)?null!=h&&"onScroll"===a&&Mr("scroll",e):null!=h&&x(e,a,h,l))}switch(n){case"input":Z(e),ie(e,r,!1);break;case"textarea":Z(e),he(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?se(e,!!r.multiple,a,!1):null!=r.defaultValue&&se(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Nr)}Fr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)qa(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));n=Oo(Co.current),Oo(Mo.current),Vo(t)?(r=t.stateNode,n=t.memoizedProps,r[Yr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Yr]=t,t.stateNode=r)}return null;case 13:return ai(Do),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Vo(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Do.current)?0===Ps&&(Ps=3):(0!==Ps&&3!==Ps||(Ps=4),null===Ts||0===(134217727&Is)&&0===(134217727&Ns)||dl(Ts,Os))),(r||n)&&(t.flags|=4),null);case 4:return ko(),null===e&&Cr(t.stateNode.containerInfo),null;case 10:return $i(t),null;case 17:return fi(t.type)&&pi(),null;case 19:if(ai(Do),null===(r=t.memoizedState))return null;if(a=0!==(64&t.flags),null===(l=r.rendering))if(a)ns(r,!1);else{if(0!==Ps||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(l=Io(e))){for(t.flags|=64,ns(r,!1),null!==(a=l.updateQueue)&&(t.updateQueue=a,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return si(Do,1&Do.current|2),t.child}e=e.sibling}null!==r.tail&&Fi()>zs&&(t.flags|=64,a=!0,ns(r,!1),t.lanes=33554432)}else{if(!a)if(null!==(e=Io(l))){if(t.flags|=64,a=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ns(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate&&!Bo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Fi()-r.renderingStartTime>zs&&1073741824!==n&&(t.flags|=64,a=!0,ns(r,!1),t.lanes=33554432);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Fi(),n.sibling=null,t=Do.current,si(Do,a?1&t|2:1&t),n):null;case 23:case 24:return vl(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(s(156,t.tag))}function is(e){switch(e.tag){case 1:fi(e.type)&&pi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(ko(),ai(ui),ai(ci),qo(),0!==(64&(t=e.flags)))throw Error(s(285));return e.flags=-4097&t|64,e;case 5:return Lo(e),null;case 13:return ai(Do),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ai(Do),null;case 4:return ko(),null;case 10:return $i(e),null;case 23:case 24:return vl(),null;default:return null}}function os(e,t){try{var n="",r=t;do{n+=X(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function as(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Oo(Mo.current);var a,s=null;switch(n){case"input":i=ee(e,i),r=ee(e,r),s=[];break;case"option":i=ae(e,i),r=ae(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=le(e,i),r=le(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Nr)}for(h in Ae(n,r),n=null,i)if(!r.hasOwnProperty(h)&&i.hasOwnProperty(h)&&null!=i[h])if("style"===h){var l=i[h];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(c.hasOwnProperty(h)?s||(s=[]):(s=s||[]).push(h,null));for(h in r){var u=r[h];if(l=null!=i?i[h]:void 0,r.hasOwnProperty(h)&&u!==l&&(null!=u||null!=l))if("style"===h)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(h,n)),n=u;else"dangerouslySetInnerHTML"===h?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(h,u)):"children"===h?"string"!==typeof u&&"number"!==typeof u||(s=s||[]).push(h,""+u):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(c.hasOwnProperty(h)?(null!=u&&"onScroll"===h&&Mr("scroll",e),s||l===u||(s=[])):"object"===typeof u&&null!==u&&u.$$typeof===N?u.toString():(s=s||[]).push(h,u))}n&&(s=s||[]).push("style",n);var h=s;(t.updateQueue=h)&&(t.flags|=4)}},qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var ss="function"===typeof WeakMap?WeakMap:Map;function ls(e,t,n){(n=ao(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gs||(Gs=!0,Ws=r),as(0,t)},n}function cs(e,t,n){(n=ao(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return as(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===qs?qs=new Set([this]):qs.add(this),as(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var us="function"===typeof WeakSet?WeakSet:Set;function hs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Dl(e,n)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Vr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(s(163))}function fs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(kl(n,e),Rl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&uo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}uo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Fr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&_t(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(s(163))}function ps(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=xe("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ms(e,t){if(wi&&"function"===typeof wi.onCommitFiberUnmount)try{wi.onCommitFiberUnmount(bi,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))kl(t,n);else{r=t;try{i()}catch(o){Dl(r,o)}}n=n.next}while(n!==e)}break;case 1:if(hs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Dl(t,o)}break;case 5:hs(t);break;case 4:bs(e,t)}}function gs(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function vs(e){return 5===e.tag||3===e.tag||4===e.tag}function ys(e){e:{for(var t=e.return;null!==t;){if(vs(t))break e;t=t.return}throw Error(s(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(s(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||vs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=Nr));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function bs(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(s(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var a=e,l=i,c=l;;)if(ms(a,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(a=n,l=i.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(ms(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function ws(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Kr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&ne(n,r),Se(e,i),t=Se(e,r),i=0;i<o.length;i+=2){var a=o[i],l=o[i+1];"style"===a?_e(n,l):"dangerouslySetInnerHTML"===a?ve(n,l):"children"===a?ye(n,l):x(n,a,l,t)}switch(e){case"input":re(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?se(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?se(n,!!r.multiple,r.defaultValue,!0):se(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(s(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,_t(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(Fs=Fi(),ps(t.child,!0)),void xs(t);case 19:return void xs(t);case 17:return;case 23:case 24:return void ps(t,null!==t.memoizedState)}throw Error(s(163))}function xs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new us),t.forEach((function(t){var r=Nl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _s(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Es=Math.ceil,As=_.ReactCurrentDispatcher,Ss=_.ReactCurrentOwner,Ms=0,Ts=null,Cs=null,Os=0,Rs=0,ks=oi(0),Ps=0,Ls=null,Ds=0,Is=0,Ns=0,js=0,Bs=null,Fs=0,zs=1/0;function Hs(){zs=Fi()+500}var Us,Vs=null,Gs=!1,Ws=null,qs=null,Xs=!1,Ys=null,Ks=90,Qs=[],Zs=[],Js=null,$s=0,el=null,tl=-1,nl=0,rl=0,il=null,ol=!1;function al(){return 0!==(48&Ms)?Fi():-1!==tl?tl:tl=Fi()}function sl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===zi()?1:2;if(0===nl&&(nl=Ds),0!==qi.transition){0!==rl&&(rl=null!==Bs?Bs.pendingLanes:0),e=nl;var t=4186112&~rl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=zi(),0!==(4&Ms)&&98===e?e=zt(12,nl):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),nl),e}function ll(e,t,n){if(50<$s)throw $s=0,el=null,Error(s(185));if(null===(e=cl(e,t)))return null;Vt(e,t,n),e===Ts&&(Ns|=t,4===Ps&&dl(e,Os));var r=zi();1===t?0!==(8&Ms)&&0===(48&Ms)?fl(e):(ul(e,n),0===Ms&&(Hs(),Gi())):(0===(4&Ms)||98!==r&&99!==r||(null===Js?Js=new Set([e]):Js.add(e)),ul(e,n)),Bs=e}function cl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function ul(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var l=31-Gt(a),c=1<<l,u=o[l];if(-1===u){if(0===(c&r)||0!==(c&i)){u=t,jt(c);var h=Nt;o[l]=10<=h?u+250:6<=h?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);a&=~c}if(r=Bt(e,e===Ts?Os:0),t=Nt,0===r)null!==n&&(n!==Li&&Ei(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Li&&Ei(n)}15===t?(n=fl.bind(null,e),null===Ii?(Ii=[n],Ni=_i(Ci,Wi)):Ii.push(n),n=Li):14===t?n=Vi(99,fl.bind(null,e)):n=Vi(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(s(358,e))}}(t),hl.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function hl(e){if(tl=-1,rl=nl=0,0!==(48&Ms))throw Error(s(327));var t=e.callbackNode;if(Ol()&&e.callbackNode!==t)return null;var n=Bt(e,e===Ts?Os:0);if(0===n)return null;var r=n,i=Ms;Ms|=16;var o=wl();for(Ts===e&&Os===r||(Hs(),yl(e,r));;)try{El();break}catch(l){bl(e,l)}if(Ji(),As.current=o,Ms=i,null!==Cs?r=0:(Ts=null,Os=0,r=Ps),0!==(Ds&Ns))yl(e,0);else if(0!==r){if(2===r&&(Ms|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(n=Ft(e))&&(r=xl(e,n))),1===r)throw t=Ls,yl(e,0),dl(e,n),ul(e,Fi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(s(345));case 2:Ml(e);break;case 3:if(dl(e,n),(62914560&n)===n&&10<(r=Fs+500-Fi())){if(0!==Bt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){al(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Hr(Ml.bind(null,e),r);break}Ml(e);break;case 4:if(dl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var a=31-Gt(n);o=1<<a,(a=r[a])>i&&(i=a),n&=~o}if(n=i,10<(n=(120>(n=Fi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Es(n/1960))-n)){e.timeoutHandle=Hr(Ml.bind(null,e),n);break}Ml(e);break;case 5:Ml(e);break;default:throw Error(s(329))}}return ul(e,Fi()),e.callbackNode===t?hl.bind(null,e):null}function dl(e,t){for(t&=~js,t&=~Ns,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gt(t),r=1<<n;e[n]=-1,t&=~r}}function fl(e){if(0!==(48&Ms))throw Error(s(327));if(Ol(),e===Ts&&0!==(e.expiredLanes&Os)){var t=Os,n=xl(e,t);0!==(Ds&Ns)&&(n=xl(e,t=Bt(e,t)))}else n=xl(e,t=Bt(e,0));if(0!==e.tag&&2===n&&(Ms|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(t=Ft(e))&&(n=xl(e,t))),1===n)throw n=Ls,yl(e,0),dl(e,t),ul(e,Fi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ml(e),ul(e,Fi()),null}function pl(e,t){var n=Ms;Ms|=1;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}}function ml(e,t){var n=Ms;Ms&=-2,Ms|=8;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}}function gl(e,t){si(ks,Rs),Rs|=t,Ds|=t}function vl(){Rs=ks.current,ai(ks)}function yl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ur(n)),null!==Cs)for(n=Cs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&pi();break;case 3:ko(),ai(ui),ai(ci),qo();break;case 5:Lo(r);break;case 4:ko();break;case 13:case 19:ai(Do);break;case 10:$i(r);break;case 23:case 24:vl()}n=n.return}Ts=e,Cs=zl(e.current,null),Os=Rs=Ds=t,Ps=0,Ls=null,js=Ns=Is=0}function bl(e,t){for(;;){var n=Cs;try{if(Ji(),Xo.current=Ca,$o){for(var r=Qo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}$o=!1}if(Ko=0,Jo=Zo=Qo=null,ea=!1,Ss.current=null,null===n||null===n.return){Ps=1,Ls=t,Cs=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Os,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l;if(0===(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var h=0!==(1&Do.current),d=a;do{var f;if(f=13===d.tag){var p=d.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var m=d.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!h)}}if(f){var g=d.updateQueue;if(null===g){var v=new Set;v.add(c),d.updateQueue=v}else g.add(c);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=ao(-1,1);y.tag=2,so(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new ss,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(s)){l.add(s);var w=Il.bind(null,o,c,s);c.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);l=Error((Y(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ps&&(Ps=2),l=os(l,s),d=a;do{switch(d.tag){case 3:o=l,d.flags|=4096,t&=-t,d.lanes|=t,lo(d,ls(0,o,t));break e;case 1:o=l;var x=d.type,_=d.stateNode;if(0===(64&d.flags)&&("function"===typeof x.getDerivedStateFromError||null!==_&&"function"===typeof _.componentDidCatch&&(null===qs||!qs.has(_)))){d.flags|=4096,t&=-t,d.lanes|=t,lo(d,cs(d,o,t));break e}}d=d.return}while(null!==d)}Sl(n)}catch(E){t=E,Cs===n&&null!==n&&(Cs=n=n.return);continue}break}}function wl(){var e=As.current;return As.current=Ca,null===e?Ca:e}function xl(t,n){var r=Ms;Ms|=16;var i=wl();for(Ts===t&&Os===n||yl(t,n);;)try{_l();break}catch(e){bl(t,e)}if(Ji(),Ms=r,As.current=i,null!==Cs)throw Error(s(261));return Ts=null,Os=0,Ps}function _l(){for(;null!==Cs;)Al(Cs)}function El(){for(;null!==Cs&&!Ai();)Al(Cs)}function Al(e){var t=Us(e.alternate,e,Rs);e.memoizedProps=e.pendingProps,null===t?Sl(e):Cs=t,Ss.current=null}function Sl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=rs(n,t,Rs)))return void(Cs=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Rs)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=is(t)))return n.flags&=2047,void(Cs=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Cs=t);Cs=t=e}while(null!==t);0===Ps&&(Ps=5)}function Ml(e){var t=zi();return Ui(99,Tl.bind(null,e,t)),null}function Tl(e,t){do{Ol()}while(null!==Ys);if(0!==(48&Ms))throw Error(s(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var a=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-Gt(o),u=1<<c;i[c]=0,a[c]=-1,l[c]=-1,o&=~u}if(null!==Js&&0===(24&r)&&Js.has(e)&&Js.delete(e),e===Ts&&(Cs=Ts=null,Os=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ms,Ms|=32,Ss.current=null,jr=Kt,fr(a=dr())){if("selectionStart"in a)l={start:a.selectionStart,end:a.selectionEnd};else e:if(l=(l=a.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&0!==u.rangeCount){l=u.anchorNode,o=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch(M){l=null;break e}var h=0,d=-1,f=-1,p=0,m=0,g=a,v=null;t:for(;;){for(var y;g!==l||0!==o&&3!==g.nodeType||(d=h+o),g!==c||0!==u&&3!==g.nodeType||(f=h+u),3===g.nodeType&&(h+=g.nodeValue.length),null!==(y=g.firstChild);)v=g,g=y;for(;;){if(g===a)break t;if(v===l&&++p===o&&(d=h),v===c&&++m===u&&(f=h),null!==(y=g.nextSibling))break;v=(g=v).parentNode}g=y}l=-1===d||-1===f?null:{start:d,end:f}}else l=null;l=l||{start:0,end:0}}else l=null;Br={focusedElem:a,selectionRange:l},Kt=!1,il=null,ol=!1,Vs=r;do{try{Cl()}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);il=null,Vs=r;do{try{for(a=e;null!==Vs;){var b=Vs.flags;if(16&b&&ye(Vs.stateNode,""),128&b){var w=Vs.alternate;if(null!==w){var x=w.ref;null!==x&&("function"===typeof x?x(null):x.current=null)}}switch(1038&b){case 2:ys(Vs),Vs.flags&=-3;break;case 6:ys(Vs),Vs.flags&=-3,ws(Vs.alternate,Vs);break;case 1024:Vs.flags&=-1025;break;case 1028:Vs.flags&=-1025,ws(Vs.alternate,Vs);break;case 4:ws(Vs.alternate,Vs);break;case 8:bs(a,l=Vs);var _=l.alternate;gs(l),null!==_&&gs(_)}Vs=Vs.nextEffect}}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);if(x=Br,w=dr(),b=x.focusedElem,a=x.selectionRange,w!==b&&b&&b.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(b.ownerDocument.documentElement,b)){null!==a&&fr(b)&&(w=a.start,void 0===(x=a.end)&&(x=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(x,b.value.length)):(x=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(x=x.getSelection(),l=b.textContent.length,_=Math.min(a.start,l),a=void 0===a.end?_:Math.min(a.end,l),!x.extend&&_>a&&(l=a,a=_,_=l),l=hr(b,_),o=hr(b,a),l&&o&&(1!==x.rangeCount||x.anchorNode!==l.node||x.anchorOffset!==l.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)&&((w=w.createRange()).setStart(l.node,l.offset),x.removeAllRanges(),_>a?(x.addRange(w),x.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),x.addRange(w))))),w=[];for(x=b;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(x=w[b]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Kt=!!jr,Br=jr=null,e.current=n,Vs=r;do{try{for(b=e;null!==Vs;){var E=Vs.flags;if(36&E&&fs(b,Vs.alternate,Vs),128&E){w=void 0;var A=Vs.ref;if(null!==A){var S=Vs.stateNode;switch(Vs.tag){case 5:w=S;break;default:w=S}"function"===typeof A?A(w):A.current=w}}Vs=Vs.nextEffect}}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);Vs=null,Di(),Ms=i}else e.current=n;if(Xs)Xs=!1,Ys=e,Ks=t;else for(Vs=r;null!==Vs;)t=Vs.nextEffect,Vs.nextEffect=null,8&Vs.flags&&((E=Vs).sibling=null,E.stateNode=null),Vs=t;if(0===(r=e.pendingLanes)&&(qs=null),1===r?e===el?$s++:($s=0,el=e):$s=0,n=n.stateNode,wi&&"function"===typeof wi.onCommitFiberRoot)try{wi.onCommitFiberRoot(bi,n,void 0,64===(64&n.current.flags))}catch(M){}if(ul(e,Fi()),Gs)throw Gs=!1,e=Ws,Ws=null,e;return 0!==(8&Ms)||Gi(),null}function Cl(){for(;null!==Vs;){var e=Vs.alternate;ol||null===il||(0!==(8&Vs.flags)?et(Vs,il)&&(ol=!0):13===Vs.tag&&_s(e,Vs)&&et(Vs,il)&&(ol=!0));var t=Vs.flags;0!==(256&t)&&ds(e,Vs),0===(512&t)||Xs||(Xs=!0,Vi(97,(function(){return Ol(),null}))),Vs=Vs.nextEffect}}function Ol(){if(90!==Ks){var e=97<Ks?97:Ks;return Ks=90,Ui(e,Pl)}return!1}function Rl(e,t){Qs.push(t,e),Xs||(Xs=!0,Vi(97,(function(){return Ol(),null})))}function kl(e,t){Zs.push(t,e),Xs||(Xs=!0,Vi(97,(function(){return Ol(),null})))}function Pl(){if(null===Ys)return!1;var e=Ys;if(Ys=null,0!==(48&Ms))throw Error(s(331));var t=Ms;Ms|=32;var n=Zs;Zs=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],a=i.destroy;if(i.destroy=void 0,"function"===typeof a)try{a()}catch(c){if(null===o)throw Error(s(330));Dl(o,c)}}for(n=Qs,Qs=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(c){if(null===o)throw Error(s(330));Dl(o,c)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Ms=t,Gi(),!0}function Ll(e,t,n){so(e,t=ls(0,t=os(n,t),1)),t=al(),null!==(e=cl(e,1))&&(Vt(e,1,t),ul(e,t))}function Dl(e,t){if(3===e.tag)Ll(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Ll(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===qs||!qs.has(r))){var i=cs(n,e=os(t,e),1);if(so(n,i),i=al(),null!==(n=cl(n,1)))Vt(n,1,i),ul(n,i);else if("function"===typeof r.componentDidCatch&&(null===qs||!qs.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Il(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=al(),e.pingedLanes|=e.suspendedLanes&n,Ts===e&&(Os&n)===n&&(4===Ps||3===Ps&&(62914560&Os)===Os&&500>Fi()-Fs?yl(e,0):js|=n),ul(e,t)}function Nl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===zi()?1:2:(0===nl&&(nl=Ds),0===(t=Ht(62914560&~nl))&&(t=4194304))),n=al(),null!==(e=cl(e,t))&&(Vt(e,t,n),ul(e,n))}function jl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bl(e,t,n,r){return new jl(e,t,n,r)}function Fl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zl(e,t){var n=e.alternate;return null===n?((n=Bl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hl(e,t,n,r,i,o){var a=2;if(r=e,"function"===typeof e)Fl(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case S:return Ul(n.children,i,o,t);case j:a=8,i|=16;break;case M:a=8,i|=1;break;case T:return(e=Bl(12,n,t,8|i)).elementType=T,e.type=T,e.lanes=o,e;case k:return(e=Bl(13,n,t,i)).type=k,e.elementType=k,e.lanes=o,e;case P:return(e=Bl(19,n,t,i)).elementType=P,e.lanes=o,e;case B:return Vl(n,i,o,t);case F:return(e=Bl(24,n,t,i)).elementType=F,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:a=10;break e;case O:a=9;break e;case R:a=11;break e;case L:a=14;break e;case D:a=16,r=null;break e;case I:a=22;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Bl(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ul(e,t,n,r){return(e=Bl(7,e,r,t)).lanes=n,e}function Vl(e,t,n,r){return(e=Bl(23,e,r,t)).elementType=B,e.lanes=n,e}function Gl(e,t,n){return(e=Bl(6,e,null,t)).lanes=n,e}function Wl(e,t,n){return(t=Bl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ql(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.mutableSourceEagerHydrationData=null}function Xl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Yl(e,t,n,r){var i=t.current,o=al(),a=sl(i);e:if(n){t:{if(Qe(n=n._reactInternals)!==n||1!==n.tag)throw Error(s(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(fi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(s(171))}if(1===n.tag){var c=n.type;if(fi(c)){n=gi(n,c,l);break e}}n=l}else n=li;return null===t.context?t.context=n:t.pendingContext=n,(t=ao(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),so(i,t),ll(i,a,o),a}function Kl(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Ql(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Zl(e,t){Ql(e,t),(e=e.alternate)&&Ql(e,t)}function Jl(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new ql(e,t,null!=n&&!0===n.hydrate),t=Bl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,io(t),e[Qr]=n.current,Cr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function $l(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ec(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=Kl(a);s.call(e)}}Yl(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Jl(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var l=i;i=function(){var e=Kl(a);l.call(e)}}ml((function(){Yl(t,a,e,i)}))}return Kl(a)}function tc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!$l(t))throw Error(s(200));return Xl(e,t,null,n)}Us=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||ui.current)La=!0;else{if(0===(n&r)){switch(La=!1,t.tag){case 3:Va(t),Go();break;case 5:Po(t);break;case 1:fi(t.type)&&vi(t);break;case 4:Ro(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;si(Yi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Ya(e,t,n):(si(Do,1&Do.current),null!==(t=ts(e,t,n))?t.sibling:null);si(Do,1&Do.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return es(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),si(Do,Do.current),r)break;return null;case 23:case 24:return t.lanes=0,Ba(e,t,n)}return ts(e,t,n)}La=0!==(16384&e.flags)}else La=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=di(t,ci.current),to(t,n),i=ra(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,fi(r)){var o=!0;vi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,io(t);var a=r.getDerivedStateFromProps;"function"===typeof a&&fo(t,r,a,e),i.updater=po,t.stateNode=i,i._reactInternals=t,yo(t,r,e,n),t=Ua(null,t,r,!0,o,n)}else t.tag=0,Da(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return Fl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===R)return 11;if(e===L)return 14}return 2}(i),e=Xi(i,e),o){case 0:t=za(null,t,i,e,n);break e;case 1:t=Ha(null,t,i,e,n);break e;case 11:t=Ia(null,t,i,e,n);break e;case 14:t=Na(null,t,i,Xi(i.type,e),r,n);break e}throw Error(s(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,za(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ha(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 3:if(Va(t),r=t.updateQueue,null===e||null===r)throw Error(s(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,oo(e,t),co(t,r,null,n),(r=t.memoizedState.element)===i)Go(),t=ts(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(jo=Gr(t.stateNode.containerInfo.firstChild),No=t,o=Bo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Wo.push(o);for(n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Da(e,t,r,n),Go();t=t.child}return t;case 5:return Po(t),null===e&&Ho(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,zr(r,i)?a=null:null!==o&&zr(r,o)&&(t.flags|=16),Fa(e,t),Da(e,t,a,n),t.child;case 6:return null===e&&Ho(t),null;case 13:return Ya(e,t,n);case 4:return Ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Eo(t,null,r,n):Da(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ia(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 7:return Da(e,t,t.pendingProps,n),t.child;case 8:case 12:return Da(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value;var l=t.type._context;if(si(Yi,l._currentValue),l._currentValue=o,null!==a)if(l=a.value,0===(o=sr(l,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(a.children===i.children&&!ui.current){t=ts(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){a=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!==(u.observedBits&o)){1===l.tag&&((u=ao(-1,n&-n)).tag=2,so(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),eo(l.return,n),c.lanes|=n;break}u=u.next}}else a=10===l.tag&&l.type===t.type?null:l.child;if(null!==a)a.return=l;else for(a=l;null!==a;){if(a===t){a=null;break}if(null!==(l=a.sibling)){l.return=a.return,a=l;break}a=a.return}l=a}Da(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,to(t,n),r=r(i=no(i,o.unstable_observedBits)),t.flags|=1,Da(e,t,r,n),t.child;case 14:return o=Xi(i=t.type,t.pendingProps),Na(e,t,i,o=Xi(i.type,o),r,n);case 15:return ja(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,fi(r)?(e=!0,vi(t)):e=!1,to(t,n),go(t,r,i),yo(t,r,i,n),Ua(null,t,r,!0,e,n);case 19:return es(e,t,n);case 23:case 24:return Ba(e,t,n)}throw Error(s(156,t.tag))},Jl.prototype.render=function(e){Yl(e,this._internalRoot,null,null)},Jl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Yl(null,e,null,(function(){t[Qr]=null}))},tt=function(e){13===e.tag&&(ll(e,4,al()),Zl(e,4))},nt=function(e){13===e.tag&&(ll(e,67108864,al()),Zl(e,67108864))},rt=function(e){if(13===e.tag){var t=al(),n=sl(e);ll(e,n,t),Zl(e,n)}},it=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(re(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ti(r);if(!i)throw Error(s(90));J(r),re(r,i)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&se(e,!!n.multiple,t,!1)}},Le=pl,De=function(e,t,n,r,i){var o=Ms;Ms|=4;try{return Ui(98,e.bind(null,t,n,r,i))}finally{0===(Ms=o)&&(Hs(),Gi())}},Ie=function(){0===(49&Ms)&&(function(){if(null!==Js){var e=Js;Js=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,ul(e,Fi())}))}Gi()}(),Ol())},Ne=function(e,t){var n=Ms;Ms|=2;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}};var nc={Events:[$r,ei,ti,ke,Pe,Ol,{current:!1}]},rc={findFiberByHostInstance:Jr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},ic={bundleType:rc.bundleType,version:rc.version,rendererPackageName:rc.rendererPackageName,rendererConfig:rc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=$e(e))?null:e.stateNode},findFiberByHostInstance:rc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{bi=oc.inject(ic),wi=oc}catch(ac){}}n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nc,n.createPortal=tc,n.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw Error(s(268,Object.keys(e)))}return e=null===(e=$e(t))?null:e.stateNode},n.flushSync=function(e,t){var n=Ms;if(0!==(48&n))return e(t);Ms|=1;try{if(e)return Ui(99,e.bind(null,t))}finally{Ms=n,Gi()}},n.hydrate=function(e,t,n){if(!$l(t))throw Error(s(200));return ec(null,e,t,!0,n)},n.render=function(e,t,n){if(!$l(t))throw Error(s(200));return ec(null,e,t,!1,n)},n.unmountComponentAtNode=function(e){if(!$l(e))throw Error(s(40));return!!e._reactRootContainer&&(ml((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[Qr]=null}))})),!0)},n.unstable_batchedUpdates=pl,n.unstable_createPortal=function(e,t){return tc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},n.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$l(n))throw Error(s(200));if(null==e||void 0===e._reactInternals)throw Error(s(38));return ec(e,t,n,!1,r)},n.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(302)},function(e,t,n){"use strict";var r,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,h=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(n){throw setTimeout(d,0),n}};r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},i=function(e,t){h=setTimeout(e,t)},o=function(){clearTimeout(h)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var m=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,v=null,y=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,_=x.port2;x.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();w=e+b;try{v(!0,e)?_.postMessage(null):(g=!1,v=null)}catch(n){throw _.postMessage(null),n}}else g=!1},r=function(e){v=e,g||(g=!0,_.postMessage(null))},i=function(e,n){y=f((function(){e(t.unstable_now())}),n)},o=function(){p(y),y=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<M(i,t)))break e;e[r]=t,e[n]=i,n=r}}function A(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>M(a,n))void 0!==l&&0>M(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>M(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],C=[],O=1,R=null,k=3,P=!1,L=!1,D=!1;function I(e){for(var t=A(C);null!==t;){if(null===t.callback)S(C);else{if(!(t.startTime<=e))break;S(C),t.sortIndex=t.expirationTime,E(T,t)}t=A(C)}}function N(e){if(D=!1,I(e),!L)if(null!==A(T))L=!0,r(j);else{var t=A(C);null!==t&&i(N,t.startTime-e)}}function j(e,n){L=!1,D&&(D=!1,o()),P=!0;var r=k;try{for(I(n),R=A(T);null!==R&&(!(R.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=R.callback;if("function"===typeof a){R.callback=null,k=R.priorityLevel;var s=a(R.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?R.callback=s:R===A(T)&&S(T),I(n)}else S(T);R=A(T)}if(null!==R)var l=!0;else{var c=A(C);null!==c&&i(N,c.startTime-n),l=!1}return l}finally{R=null,k=r,P=!1}}var B=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||P||(L=!0,r(j))},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return A(T)},t.unstable_next=function(e){switch(k){case 1:case 2:case 3:var t=3;break;default:t=k}var n=k;k=t;try{return e()}finally{k=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=k;k=e;try{return t()}finally{k=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:O++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,E(C,e),null===A(T)&&e===A(C)&&(D?o():D=!0,i(N,a-s))):(e.sortIndex=l,E(T,e),L||P||(L=!0,r(j))),e},t.unstable_wrapCallback=function(e){var t=k;return function(){var n=k;k=t;try{return e.apply(this,arguments)}finally{k=n}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e.hasOwnProperty(t)){for(var r={},i=e[t],a=(0,o.default)(t),s=Object.keys(n),l=0;l<s.length;l++){var c=s[l];if(c===t)for(var u=0;u<i.length;u++)r[i[u]+a]=n[t];r[c]=n[c]}return r}return n};var r,i=n(182),o=(r=i)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,i){for(var o=0,a=e.length;o<a;++o){var s=e[o](t,n,r,i);if(s)return s}}},function(e,t,n){"use strict";function r(e,t){-1===e.indexOf(t)&&e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(Array.isArray(t))for(var n=0,i=t.length;n<i;++n)r(e,t[n]);else r(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e instanceof Object&&!Array.isArray(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e)};var r,i=n(161),o=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},,,function(e,t,n){"use strict";var r=n(152),i={};function o(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}e.exports=function(e,t,n){var a=[],s={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},l={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},c={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)h(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=f(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(o(!(n in c),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return o("DEFINE_MANY_MERGED"===(l.hasOwnProperty(n)?l[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=f(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function u(e,t){var n=s.hasOwnProperty(t)?s[t]:null;y.hasOwnProperty(t)&&o("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&o("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function h(e,n){if(n){o("function"!==typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),o(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;for(var a in n.hasOwnProperty("mixins")&&c.mixins(e,n.mixins),n)if(n.hasOwnProperty(a)&&"mixins"!==a){var l=n[a],h=r.hasOwnProperty(a);if(u(h,a),c.hasOwnProperty(a))c[a](e,l);else{var d=s.hasOwnProperty(a);if("function"===typeof l&&!d&&!h&&!1!==n.autobind)i.push(a,l),r[a]=l;else if(h){var m=s[a];o(d&&("DEFINE_MANY_MERGED"===m||"DEFINE_MANY"===m),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,a),"DEFINE_MANY_MERGED"===m?r[a]=f(r[a],l):"DEFINE_MANY"===m&&(r[a]=p(r[a],l))}else r[a]=l}}}else;}function d(e,t){for(var n in o(e&&t&&"object"===typeof e&&"object"===typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(o(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function f(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return d(i,n),d(i,r),i}}function p(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function m(e,t){return t.bind(e)}var g={componentDidMount:function(){this.__isMounted=!0}},v={componentWillUnmount:function(){this.__isMounted=!1}},y={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},b=function(){};return r(b.prototype,e.prototype,y),function(e){var t=function(e,r,a){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=m(e,i)}}(this),this.props=e,this.context=r,this.refs=i,this.updater=a||n,this.state=null;var s=this.getInitialState?this.getInitialState():null;o("object"===typeof s&&!Array.isArray(s),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=s};for(var r in t.prototype=new b,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],a.forEach(h.bind(null,t)),h(t,g),h(t,e),h(t,v),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),o(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),s)t.prototype[r]||(t.prototype[r]=null);return t}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";var r=n(313);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(e,t,n){var r=n(180);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(t,n,r){(function(n){t.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){var r=Object.prototype.toString;t.exports=function(e){return e.BYTES_PER_ELEMENT&&"[object ArrayBuffer]"===r.call(e.buffer)||Array.isArray(e)}},{}],2:[function(e,t,n){t.exports=function(e,t){return"number"===typeof e?e:"number"===typeof t?t:0}},{}],3:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],s=new o(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),l=0,u=a>0?r-4:r,h=0;h<u;h+=4)t=i[e.charCodeAt(h)]<<18|i[e.charCodeAt(h+1)]<<12|i[e.charCodeAt(h+2)]<<6|i[e.charCodeAt(h+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,s[l++]=255&t),1===a&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(u(e,a,a+16383>s?s:a+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],4:[function(e,t,n){"use strict";t.exports={createLink:function(e,t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("link");for(var i in r.href=e,r.rel="stylesheet",t)if(t.hasOwnProperty(i)){var o=t[i];r.setAttribute("data-"+i,o)}n.appendChild(r)},createStyle:function(e,t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");for(var i in r.type="text/css",t)if(t.hasOwnProperty(i)){var o=t[i];r.setAttribute("data-"+i,o)}r.sheet?(r.innerHTML=e,r.sheet.cssText=e,n.appendChild(r)):r.styleSheet?(n.appendChild(r),r.styleSheet.cssText=e):(r.appendChild(document.createTextNode(e)),n.appendChild(r))}}},{}],5:[function(e,t,n){var r=e("buffer").Buffer;t.exports=function(e,t){if(r.isBuffer(e)&&r.isBuffer(t)){if("function"===typeof e.equals)return e.equals(t);if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}}},{buffer:6}],6:[function(t,r,i){(function(n,r){"use strict";var o=t("base64-js"),a=t("ieee754"),s=t("isarray");function l(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e,t){if(l()<t)throw new RangeError("Invalid typed array length");return r.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=r.prototype:(null===e&&(e=new r(t)),e.length=t),e}function r(e,t,n){if(!r.TYPED_ARRAY_SUPPORT&&!(this instanceof r))return new r(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return u(this,e,t,n)}function u(e,t,n,i){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i),r.TYPED_ARRAY_SUPPORT?(e=t).__proto__=r.prototype:e=f(e,t),e}(e,t,n,i):"string"===typeof t?function(e,t,n){if("string"===typeof n&&""!==n||(n="utf8"),!r.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|m(t,n),o=(e=c(e,i)).write(t,n);return o!==i&&(e=e.slice(0,o)),e}(e,t,n):function(e,t){if(r.isBuffer(t)){var n=0|p(t.length);return 0===(e=c(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(i=t.length)!==i?c(e,0):f(e,t);if("Buffer"===t.type&&s(t.data))return f(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(h(t),e=c(e,t<0?0:0|p(t)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=c(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return 0|e}function m(e,t){if(r.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(i)return z(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return M(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,i,o){if(0===e.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=r.from(t,i)),r.isBuffer(t))return 0===t.length?-1:b(e,t,n,i,o);if("number"===typeof t)return t&=255,r.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function x(e,t,n,r){return U(z(t,e.length-n),e,n,r)}function _(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return _(e,t,n,r)}function A(e,t,n,r){return U(H(t),e,n,r)}function S(e,t,n,r){return U(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function M(e,t,n){return 0===t&&n===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128===(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function R(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",a=t;a<n;++a)o+=(r=e[a])<16?"0"+r.toString(16):r.toString(16);return o}function k(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,i,o,a){if(!r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||N(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||N(e,0,n,8),a.write(e,t,n,r,52,8),n+8}i.Buffer=r,i.SlowBuffer=function(e){return+e!=e&&(e=0),r.alloc(+e)},i.INSPECT_MAX_BYTES=50,r.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),i.kMaxLength=l(),r.poolSize=8192,r._augment=function(e){return e.__proto__=r.prototype,e},r.from=function(e,t,n){return u(null,e,t,n)},r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0})),r.alloc=function(e,t,n){return function(e,t,n,r){return h(t),t<=0?c(e,t):void 0!==n?"string"===typeof r?c(e,t).fill(n,r):c(e,t).fill(n):c(e,t)}(null,e,t,n)},r.allocUnsafe=function(e){return d(null,e)},r.allocUnsafeSlow=function(e){return d(null,e)},r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!s(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return r.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=r.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!r.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i},r.byteLength=m,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},r.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},r.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},r.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=i.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},r.prototype.compare=function(e,t,n,i,o){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(a,s),c=this.slice(i,o),u=e.slice(t,n),h=0;h<l;++h)if(c[h]!==u[h]){a=c[h],s=u[h];break}return a<s?-1:s<a?1:0},r.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},r.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},r.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},r.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),r.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=r.prototype;else{var o=t-e;n=new r(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+e]}return n},r.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},r.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},r.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},r.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},r.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),a.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),a.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),a.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),a.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},r.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o,a=i-n;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!r.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},r.prototype.fill=function(e,t,n,i){if("string"===typeof e){if("string"===typeof t?(i=t,t=0,n=this.length):"string"===typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!==typeof i)throw new TypeError("encoding must be a string");if("string"===typeof i&&!r.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=r.isBuffer(e)?e:z(new r(e,i).toString()),l=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%l]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function z(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){return o.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},t("buffer").Buffer)},{"base64-js":3,buffer:6,ieee754:29,isarray:35}],7:[function(t,n,r){!function(){if("undefined"!==typeof window)try{var t=new window.CustomEvent("test",{cancelable:!0});if(t.preventDefault(),!0!==t.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var n=function(e,n){var r,i;return(n=n||{}).bubbles=!!n.bubbles,n.cancelable=!!n.cancelable,(r=document.createEvent("CustomEvent")).initCustomEvent(e,n.bubbles,n.cancelable,n.detail),i=r.preventDefault,r.preventDefault=function(){i.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(t){this.defaultPrevented=!0}},r};n.prototype=window.Event.prototype,window.CustomEvent=n}}()},{}],8:[function(t,n,r){function i(){var t;try{t=r.storage.debug}catch(e){}return t}(r=n.exports=t("./debug")).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" "),!t)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var r=0,i=0;return e[0].replace(/%[a-z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,n),e},r.save=function(t){try{null==t?r.storage.removeItem("debug"):r.storage.debug=t}catch(e){}},r.load=i,r.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31},r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){return JSON.stringify(e)},r.enable(i())},{"./debug":9}],9:[function(e,t,n){(n=t.exports=function(e){function t(){}function r(){var e=r;null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=i());var t=Array.prototype.slice.call(arguments);t[0]=n.coerce(t[0]),"string"!==typeof t[0]&&(t=["%o"].concat(t));var o=0;t[0]=t[0].replace(/%([a-z%])/g,(function(r,i){if("%%"===r)return r;o++;var a=n.formatters[i];if("function"===typeof a){var s=t[o];r=a.call(e,s),t.splice(o,1),o--}return r})),"function"===typeof n.formatArgs&&(t=n.formatArgs.apply(e,t));var a=r.log||n.log||console.log.bind(console);a.apply(e,t)}t.enabled=!1,r.enabled=!0;var o=n.enabled(e)?r:t;return o.namespace=e,o}).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.names=[],n.skips=[],n.formatters={};var r=0;function i(){return n.colors[r++%n.colors.length]}},{}],10:[function(e,t,n){"use strict";var r=e("is-obj"),i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Sources cannot be null or undefined");return Object(e)}function s(e,t,n){var o=t[n];if(void 0!==o&&null!==o){if(i.call(e,n)&&(void 0===e[n]||null===e[n]))throw new TypeError("Cannot convert undefined or null to object ("+n+")");i.call(e,n)&&r(o)?e[n]=l(Object(e[n]),t[n]):e[n]=o}}function l(e,t){if(e===t)return e;for(var n in t=Object(t))i.call(t,n)&&s(e,t,n);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),a=0;a<r.length;a++)o.call(t,r[a])&&s(e,t,r[a]);return e}t.exports=function(e){e=a(e);for(var t=1;t<arguments.length;t++)l(e,arguments[t]);return e}},{"is-obj":34}],11:[function(t,n,r){"use strict";var i=t("object-keys"),o="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),a=Object.prototype.toString,s=Array.prototype.concat,l=Object.defineProperty,c=l&&function(){var t={};try{for(var n in l(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(e){return!1}}(),u=function(e,t,n,r){var i;(!(t in e)||"function"===typeof(i=r)&&"[object Function]"===a.call(i)&&r())&&(c?l(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},h=function(e,t){var n=arguments.length>2?arguments[2]:{},r=i(t);o&&(r=s.call(r,Object.getOwnPropertySymbols(t)));for(var a=0;a<r.length;a+=1)u(e,r[a],t[r[a]],n[r[a]])};h.supportsDescriptors=!!c,n.exports=h},{"object-keys":41}],12:[function(t,n,r){!function(t,n,r,i){"use strict";function o(e,t){for(var n=0,r=e.length;n<r;n++)m(e[n],t)}function a(e){return function(t){ne(t)&&(m(t,e),o(t.querySelectorAll(F),e))}}function s(e){var t=oe.call(e,"is"),n=e.nodeName.toUpperCase(),r=H.call(j,t?D+t.toUpperCase():L+n);return t&&-1<r&&!l(n,t)?-1:r}function l(e,t){return-1<F.indexOf(e+'[is="'+t+'"]')}function c(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;me&&(!i||i===t)&&t.attributeChangedCallback&&"style"!==r&&e.prevValue!==e.newValue&&t.attributeChangedCallback(r,n===e[T]?null:e.prevValue,n===e[O]?null:e.newValue)}function u(e){var t=a(e);return function(e){g.push(t,e.target)}}function h(e){pe&&(pe=!1,e.currentTarget.removeEventListener(k,h)),o((e.target||n).querySelectorAll(F),e.detail===S?S:A),te&&function(){for(var e,t=0,n=re.length;t<n;t++)e=re[t],z.contains(e)||(n--,re.splice(t--,1),m(e,S))}()}function d(e,t){var n=this;ae.call(n,e,t),v.call(n,{target:n})}function f(e,t){J(e,t),w?w.observe(e,ce):(fe&&(e.setAttribute=d,e[E]=b(e),e.addEventListener(P,v)),e.addEventListener(R,c)),e.createdCallback&&me&&(e.created=!0,e.createdCallback(),e.created=!1)}function p(e){throw new Error("A "+e+" type is already registered")}function m(e,t){var n,r=s(e);-1<r&&(x(e,B[r]),r=0,t!==A||e[A]?t===S&&!e[S]&&(e[A]=!1,e[S]=!0,r=1):(e[S]=!1,e[A]=!0,r=1,te&&H.call(re,e)<0&&re.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}if(!(i in n)){var g,v,y,b,w,x,_,E="__"+i+(1e5*Math.random()>>0),A="attached",S="detached",M="extends",T="ADDITION",C="MODIFICATION",O="REMOVAL",R="DOMAttrModified",k="DOMContentLoaded",P="DOMSubtreeModified",L="<",D="=",I=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,N=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],j=[],B=[],F="",z=n.documentElement,H=j.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},U=r.prototype,V=U.hasOwnProperty,G=U.isPrototypeOf,W=r.defineProperty,q=r.getOwnPropertyDescriptor,X=r.getOwnPropertyNames,Y=r.getPrototypeOf,K=r.setPrototypeOf,Q=!!r.__proto__,Z=r.create||function e(t){return t?(e.prototype=t,new e):this},J=K||(Q?function(e,t){return e.__proto__=t,e}:X&&q?function(){function e(e,t){for(var n,r=X(t),i=0,o=r.length;i<o;i++)n=r[i],V.call(e,n)||W(e,n,q(t,n))}return function(t,n){do{e(t,n)}while((n=Y(n))&&!G.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),$=t.MutationObserver||t.WebKitMutationObserver,ee=(t.HTMLElement||t.Element||t.Node).prototype,te=!G.call(ee,z),ne=te?function(e){return 1===e.nodeType}:function(e){return G.call(ee,e)},re=te&&[],ie=ee.cloneNode,oe=ee.getAttribute,ae=ee.setAttribute,se=ee.removeAttribute,le=n.createElement,ce=$&&{attributes:!0,characterData:!0,attributeOldValue:!0},ue=$||function(e){fe=!1,z.removeEventListener(R,ue)},he=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,10)},de=!1,fe=!0,pe=!0,me=!0;K||Q?(x=function(e,t){G.call(t,e)||f(e,t)},_=f):_=x=function(e,t){e[E]||(e[E]=r(!0),f(e,t))},te?(fe=!1,function(){var t=q(ee,"addEventListener"),n=t.value,r=function(e){var t=new CustomEvent(R,{bubbles:!0});t.attrName=e,t.prevValue=oe.call(this,e),t.newValue=null,t[O]=t.attrChange=2,se.call(this,e),this.dispatchEvent(t)},i=function(t,n){var r=this.hasAttribute(t),i=r&&oe.call(this,t);e=new CustomEvent(R,{bubbles:!0}),ae.call(this,t,n),e.attrName=t,e.prevValue=r?i:null,e.newValue=n,r?e[C]=e.attrChange=1:e[T]=e.attrChange=0,this.dispatchEvent(e)},o=function(e){var t,n=e.currentTarget,r=n[E],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],(t=new CustomEvent(R,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[T]=t.attrChange=0:t[C]=t.attrChange=1,n.dispatchEvent(t))};t.value=function(e,t,a){e===R&&this.attributeChangedCallback&&this.setAttribute!==i&&(this[E]={className:{name:"class",value:this.className}},this.setAttribute=i,this.removeAttribute=r,n.call(this,"propertychange",o)),n.call(this,e,t,a)},W(ee,"addEventListener",t)}()):$||(z.addEventListener(R,ue),z.setAttribute(E,1),z.removeAttribute(E),fe&&(v=function(e){var t,n,r,i=this;if(i===e.target){for(r in t=i[E],i[E]=n=b(i),n){if(!(r in t))return y(0,i,r,t[r],n[r],T);if(n[r]!==t[r])return y(1,i,r,t[r],n[r],C)}for(r in t)if(!(r in n))return y(2,i,r,t[r],n[r],O)}},y=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,c(a)},b=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;o<a;o++)"setAttribute"!==(n=(t=i[o]).name)&&(r[n]=t.value);return r})),n[i]=function(e,t){if(r=e.toUpperCase(),de||(de=!0,$?(w=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new $((function(r){for(var i,o,a,s=0,l=r.length;s<l;s++)"childList"===(i=r[s]).type?(n(i.addedNodes,e),n(i.removedNodes,t)):(o=i.target,me&&o.attributeChangedCallback&&"style"!==i.attributeName&&(a=oe.call(o,i.attributeName))!==i.oldValue&&o.attributeChangedCallback(i.attributeName,i.oldValue,a))}))}(a(A),a(S))).observe(n,{childList:!0,subtree:!0}):(g=[],he((function e(){for(;g.length;)g.shift().call(null,g.shift());he(e)})),n.addEventListener("DOMNodeInserted",u(A)),n.addEventListener("DOMNodeRemoved",u(S))),n.addEventListener(k,h),n.addEventListener("readystatechange",h),n.createElement=function(e,t){var r=le.apply(n,arguments),i=""+e,o=H.call(j,(t?D:L)+(t||i).toUpperCase()),a=-1<o;return t&&(r.setAttribute("is",t=t.toLowerCase()),a&&(a=l(i.toUpperCase(),t))),me=!n.createElement.innerHTMLHelper,a&&_(r,B[o]),r},ee.cloneNode=function(e){var t=ie.call(this,!!e),n=s(t);return-1<n&&_(t,B[n]),e&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],_(t,B[s(t)])}(t.querySelectorAll(F)),t}),-2<H.call(j,D+r)+H.call(j,L+r)&&p(e),!I.test(r)||-1<H.call(N,r))throw new Error("The type "+e+" is invalid");var r,i,c=function(){return f?n.createElement(m,r):n.createElement(m)},d=t||U,f=V.call(d,M),m=f?t[M].toUpperCase():r;return f&&-1<H.call(j,L+m)&&p(m),i=j.push((f?D:L)+r)-1,F=F.concat(F.length?",":"",f?m+'[is="'+e.toLowerCase()+'"]':m),c.prototype=B[i]=V.call(d,"prototype")?d.prototype:Z(ee),o(n.querySelectorAll(F),A),c}}}(window,document,Object,"registerElement")},{}],13:[function(e,t,n){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],14:[function(e,t,n){"use strict";var r=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator,o=Object.getPrototypeOf||function(e){return e.__proto__},a=void 0,s="undefined"===typeof Uint8Array?void 0:o(Uint8Array),l={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":i?o([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":a&&i&&Symbol.asyncIterator?a[Symbol.asyncIterator]():void 0,"$ %Atomics%":"undefined"===typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"===typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"===typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"===typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"===typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"===typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"===typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"===typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"===typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"===typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"===typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"===typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"===typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":i?o(o([][Symbol.iterator]())):void 0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"===typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!==typeof Map&&i?o((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"===typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"===typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"===typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"===typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"===typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"===typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"===typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"===typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"===typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"===typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!==typeof Set&&i?o((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"===typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":i?o(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":i?Symbol:void 0,"$ %SymbolPrototype%":i?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":r,"$ %TypedArray%":s,"$ %TypedArrayPrototype%":s?s.prototype:void 0,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"===typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"===typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"===typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"===typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"===typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"===typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"===typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"===typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"===typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"===typeof WeakSet?void 0:WeakSet.prototype};t.exports=function(e,t){if(arguments.length>1&&"boolean"!==typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var n="$ "+e;if(!(n in l))throw new SyntaxError("intrinsic "+e+" does not exist!");if("undefined"===typeof l[n]&&!t)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return l[n]}},{}],15:[function(e,t,n){"use strict";var r=e("./GetIntrinsic"),i=r("%Object%"),o=r("%TypeError%"),a=r("%String%"),s=e("./helpers/assertRecord"),l=e("./helpers/isNaN"),c=e("./helpers/isFinite"),u=e("./helpers/sign"),h=e("./helpers/mod"),d=e("is-callable"),f=e("es-to-primitive/es5"),p=e("has"),m={ToPrimitive:f,ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return l(t)?0:0!==t&&c(t)?u(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);if(l(t)||0===t||!c(t))return 0;var n=u(t)*Math.floor(Math.abs(t));return h(n,65536)},ToString:function(e){return a(e)},ToObject:function(e){return this.CheckObjectCoercible(e),i(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new o(t||"Cannot call method on "+e);return e},IsCallable:d,SameValue:function(e,t){return e===t?0!==e||1/e===1/t:l(e)&&l(t)},Type:function(e){return null===e?"Null":"undefined"===typeof e?"Undefined":"function"===typeof e||"object"===typeof e?"Object":"number"===typeof e?"Number":"boolean"===typeof e?"Boolean":"string"===typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(p(e,n)&&!t[n])return!1;var r=p(e,"[[Value]]"),i=p(e,"[[Get]]")||p(e,"[[Set]]");if(r&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!(!p(e,"[[Get]]")&&!p(e,"[[Set]]")))},IsDataDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!(!p(e,"[[Value]]")&&!p(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if("undefined"===typeof e)return e;if(s(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new o("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(p(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),p(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),p(e,"value")&&(t["[[Value]]"]=e.value),p(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),p(e,"get")){var n=e.get;if("undefined"!==typeof n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(p(e,"set")){var r=e.set;if("undefined"!==typeof r&&!this.IsCallable(r))throw new o("setter must be a function");t["[[Set]]"]=r}if((p(t,"[[Get]]")||p(t,"[[Set]]"))&&(p(t,"[[Value]]")||p(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}};t.exports=m},{"./GetIntrinsic":14,"./helpers/assertRecord":16,"./helpers/isFinite":17,"./helpers/isNaN":18,"./helpers/mod":19,"./helpers/sign":20,"es-to-primitive/es5":21,has:28,"is-callable":32}],16:[function(e,t,n){"use strict";var r=e("../GetIntrinsic"),i=r("%TypeError%"),o=r("%SyntaxError%"),a=e("has"),s={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(a(t,r)&&!n[r])return!1;var o=a(t,"[[Value]]"),s=a(t,"[[Get]]")||a(t,"[[Set]]");if(o&&s)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}};t.exports=function(e,t,n,r){var a=s[t];if("function"!==typeof a)throw new o("unknown record type: "+t);if(!a(e,r))throw new i(n+" must be a "+t);console.log(a(e,r),r)}},{"../GetIntrinsic":14,has:28}],17:[function(e,t,n){var r=Number.isNaN||function(e){return e!==e};t.exports=Number.isFinite||function(e){return"number"===typeof e&&!r(e)&&e!==1/0&&e!==-1/0}},{}],18:[function(e,t,n){t.exports=Number.isNaN||function(e){return e!==e}},{}],19:[function(e,t,n){t.exports=function(e,t){var n=e%t;return Math.floor(n>=0?n:n+t)}},{}],20:[function(e,t,n){t.exports=function(e){return e>=0?1:-1}},{}],21:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=e("./helpers/isPrimitive"),o=e("is-callable"),a=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===r.call(e)?String:Number)===String||t===Number){var n,a,s=t===String?["toString","valueOf"]:["valueOf","toString"];for(a=0;a<s.length;++a)if(o(e[s[a]])&&(n=e[s[a]](),i(n)))return n;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")};t.exports=function(e){return i(e)?e:arguments.length>1?a(e,arguments[1]):a(e)}},{"./helpers/isPrimitive":22,"is-callable":32}],22:[function(e,t,n){t.exports=function(e){return null===e||"function"!==typeof e&&"object"!==typeof e}},{}],23:[function(e,t,n){var r=e("dtype");t.exports=function(e,t,n){if(!e)throw new TypeError("must specify data as first parameter");if(n=0|+(n||0),Array.isArray(e)&&e[0]&&"number"===typeof e[0][0]){var i,o,a,s,l=e[0].length,c=e.length*l;t&&"string"!==typeof t||(t=new(r(t||"float32"))(c+n));var u=t.length-n;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(i=0,a=n;i<e.length;i++)for(o=0;o<l;o++)t[a++]=null===e[i][o]?NaN:e[i][o]}else if(t&&"string"!==typeof t)t.set(e,n);else{var h=r(t||"float32");if(Array.isArray(e)||"array"===t)for(t=new h(e.length+n),i=0,a=n,s=t.length;a<s;a++,i++)t[a]=null===e[i]?NaN:e[i];else 0===n?t=new h(e):(t=new h(e.length+n)).set(e,n)}return t}},{dtype:13}],24:[function(e,t,n){"use strict";var r=e("is-callable"),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,i=e.length;r<i;r++)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},s=function(e,t,n){for(var r=0,i=e.length;r<i;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},l=function(e,t,n){for(var r in e)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};t.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=n),"[object Array]"===i.call(e)?a(e,t,o):"string"===typeof e?s(e,t,o):l(e,t,o)}},{"is-callable":32}],25:[function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;t.exports=function(e){var t=this;if("function"!==typeof t||"[object Function]"!==o.call(t))throw new TypeError(r+t);for(var n,a=i.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,a.concat(i.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(i.call(arguments)))},l=Math.max(0,t.length-a.length),c=[],u=0;u<l;u++)c.push("$"+u);if(n=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var h=function(){};h.prototype=t.prototype,n.prototype=new h,h.prototype=null}return n}},{}],26:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=Function.prototype.bind||r},{"./implementation":25}],27:[function(e,t,r){(function(e){var n;n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},t.exports=n}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],28:[function(e,t,n){"use strict";var r=e("function-bind");t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":26}],29:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*m}},{}],30:[function(e,t,n){"function"===typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],31:[function(e,t,n){function r(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],32:[function(t,n,r){"use strict";var i=Function.prototype.toString,o=/^\s*class\b/,a=function(t){try{var n=i.call(t);return o.test(n)}catch(e){return!1}},s=Object.prototype.toString,l="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;n.exports=function(t){if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;if("function"===typeof t&&!t.prototype)return!0;if(l)return function(t){try{return!a(t)&&(i.call(t),!0)}catch(e){return!1}}(t);if(a(t))return!1;var n=s.call(t);return"[object Function]"===n||"[object GeneratorFunction]"===n}},{}],33:[function(e,t,n){t.exports=function(e){var t=r.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var r=Object.prototype.toString},{}],34:[function(e,t,n){"use strict";t.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},{}],35:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],36:[function(e,t,n){var r=e("word-wrapper"),i=e("xtend"),o=e("as-number"),a=["x","e","a","o","n","s","r","c","u","m","v","w","z"],s=["m","w"],l=["H","I","N","E","F","K","L","T","U","V","W","X","Y","Z"],c="\t".charCodeAt(0),u=" ".charCodeAt(0);function h(e){this.glyphs=[],this._measure=this.computeMetrics.bind(this),this.update(e)}function d(e){return new Function(["return function "+e+"() {"," return this._"+e,"}"].join("\n"))()}function f(e,t){if(!e.chars||0===e.chars.length)return null;var n=m(e.chars,t);return n>=0?e.chars[n]:null}function p(e,t,n){if(!e.kernings||0===e.kernings.length)return 0;for(var r=e.kernings,i=0;i<r.length;i++){var o=r[i];if(o.first===t&&o.second===n)return o.amount}return 0}function m(e,t,n){for(var r=n=n||0;r<e.length;r++)if(e[r].id===t)return r;return-1}t.exports=function(e){return new h(e)},h.prototype.update=function(e){if(e=i({measure:this._measure},e),this._opt=e,this._opt.tabSize=o(this._opt.tabSize,4),!e.font)throw new Error("must provide a valid bitmap font");var t=this.glyphs,n=e.text||"",s=e.font;this._setupSpaceGlyphs(s);var c=r.lines(n,e),u=e.width||0;t.length=0;var h=c.reduce((function(e,t){return Math.max(e,t.width,u)}),0),d=0,f=0,g=o(e.lineHeight,s.common.lineHeight),v=s.common.base,y=g-v,b=e.letterSpacing||0,w=g*c.length-y,x=function(e){return"center"===e?1:"right"===e?2:0}(this._opt.align);f-=w,this._width=h,this._height=w,this._descender=g-v,this._baseline=v,this._xHeight=function(e){for(var t=0;t<a.length;t++){var n=a[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r].height}return 0}(s),this._capHeight=function(e){for(var t=0;t<l.length;t++){var n=l[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r].height}return 0}(s),this._lineHeight=g,this._ascender=g-y-this._xHeight;var _=this;c.forEach((function(e,r){for(var i,o=e.start,a=e.end,l=e.width,c=o;c<a;c++){var u=n.charCodeAt(c),m=_.getGlyph(s,u);if(m){i&&(d+=p(s,i.id,m.id));var v=d;1===x?v+=(h-l)/2:2===x&&(v+=h-l),t.push({position:[v,f],data:m,index:c,line:r}),d+=m.xadvance+b,i=m}}f+=g,d=0})),this._linesTotal=c.length},h.prototype._setupSpaceGlyphs=function(e){if(this._fallbackSpaceGlyph=null,this._fallbackTabGlyph=null,e.chars&&0!==e.chars.length){var t=f(e,u)||function(e){for(var t=0;t<s.length;t++){var n=s[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r]}return 0}(e)||e.chars[0],n=this._opt.tabSize*t.xadvance;this._fallbackSpaceGlyph=t,this._fallbackTabGlyph=i(t,{x:0,y:0,xadvance:n,id:c,xoffset:0,yoffset:0,width:0,height:0})}},h.prototype.getGlyph=function(e,t){var n=f(e,t);return n||(t===c?this._fallbackTabGlyph:t===u?this._fallbackSpaceGlyph:null)},h.prototype.computeMetrics=function(e,t,n,r){var i,o=this._opt.letterSpacing||0,a=this._opt.font,s=0,l=0,c=0;if(!a.chars||0===a.chars.length)return{start:t,end:t,width:0};n=Math.min(e.length,n);for(var u=t;u<n;u++){var h,d=e.charCodeAt(u);if(h=this.getGlyph(a,d)){h.xoffset;var f=(s+=i?p(a,i.id,h.id):0)+h.xadvance+o,m=s+h.width;if(m>=r||f>=r)break;s=f,l=m,i=h}c++}return i&&(l+=i.xoffset),{start:t,end:t+c,width:l}},["width","height","descender","ascender","xHeight","baseline","capHeight","lineHeight"].forEach((function(e){Object.defineProperty(h.prototype,e,{get:d(e),configurable:!0})}))},{"as-number":2,"word-wrapper":69,xtend:72}],37:[function(t,n,r){(function(r){var i=t("xhr"),o=function(){},a=t("parse-bmfont-ascii"),s=t("parse-bmfont-xml"),l=t("parse-bmfont-binary"),c=t("./lib/is-binary"),u=t("xtend"),h=self.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest;n.exports=function(t,n){n="function"===typeof n?n:o,"string"===typeof t?t={uri:t}:t||(t={}),t.binary&&(t=function(e){if(h)return u(e,{responseType:"arraybuffer"});if("undefined"===typeof self.XMLHttpRequest)throw new Error("your browser does not support XHR loading");var t=new self.XMLHttpRequest;return t.overrideMimeType("text/plain; charset=x-user-defined"),u({xhr:t},e)}(t)),i(t,(function(i,u,h){if(i)return n(i);if(!/^2/.test(u.statusCode))return n(new Error("http status code: "+u.statusCode));if(!h)return n(new Error("no body result"));var d,f,p=!1;if(d=h,"[object ArrayBuffer]"===Object.prototype.toString.call(d)){var m=new Uint8Array(h);h=new r(m,"binary")}c(h)&&(p=!0,"string"===typeof h&&(h=new r(h,"binary"))),p||(r.isBuffer(h)&&(h=h.toString(t.encoding)),h=h.trim());try{var g=u.headers["content-type"];f=p?l(h):/json/.test(g)||"{"===h.charAt(0)?JSON.parse(h):/xml/.test(g)||"<"===h.charAt(0)?s(h):a(h)}catch(e){n(new Error("error parsing font "+e.message)),n=o}n(null,f)}))}}).call(this,t("buffer").Buffer)},{"./lib/is-binary":38,buffer:6,"parse-bmfont-ascii":43,"parse-bmfont-binary":44,"parse-bmfont-xml":45,xhr:70,xtend:72}],38:[function(e,t,n){(function(n){var r=e("buffer-equal"),i=new n([66,77,70,3]);t.exports=function(e){return"string"===typeof e?"BMF"===e.substring(0,3):e.length>4&&r(e.slice(0,4),i)}}).call(this,e("buffer").Buffer)},{buffer:6,"buffer-equal":5}],39:[function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(l[s[h]]=n[s[h]])}}return l}},{}],40:[function(t,n,r){"use strict";var i;if(!Object.keys){var o=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=t("./isArguments"),l=Object.prototype.propertyIsEnumerable,c=!l.call({toString:null},"toString"),u=l.call((function(){}),"prototype"),h=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"===typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"===typeof window[t])try{d(window[t])}catch(e){return!0}}catch(e){return!0}return!1}();i=function(t){var n=null!==t&&"object"===typeof t,r="[object Function]"===a.call(t),i=s(t),l=n&&"[object String]"===a.call(t),f=[];if(!n&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var m=u&&r;if(l&&t.length>0&&!o.call(t,0))for(var g=0;g<t.length;++g)f.push(String(g));if(i&&t.length>0)for(var v=0;v<t.length;++v)f.push(String(v));else for(var y in t)m&&"prototype"===y||!o.call(t,y)||f.push(String(y));if(c)for(var b=function(t){if("undefined"===typeof window||!p)return d(t);try{return d(t)}catch(e){return!1}}(t),w=0;w<h.length;++w)b&&"constructor"===h[w]||!o.call(t,h[w])||f.push(h[w]);return f}}n.exports=i},{"./isArguments":42}],41:[function(e,t,n){"use strict";var r=Array.prototype.slice,i=e("./isArguments"),o=Object.keys,a=o?function(e){return o(e)}:e("./implementation"),s=Object.keys;a.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(r.call(e)):s(e)}):Object.keys=a,Object.keys||a},t.exports=a},{"./implementation":40,"./isArguments":42}],42:[function(e,t,n){"use strict";var r=Object.prototype.toString;t.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},{}],43:[function(e,t,n){function r(e,t){if(!(e=e.replace(/\t+/g," ").trim()))return null;var n=e.indexOf(" ");if(-1===n)throw new Error("no named row at line "+t);var r=e.substring(0,n);e=(e=(e=(e=e.substring(n+1)).replace(/letter=[\'\"]\S+[\'\"]/gi,"")).split("=")).map((function(e){return e.trim().match(/(".*?"|[^"\s]+)+(?=\s*|\s*$)/g)}));for(var o=[],a=0;a<e.length;a++){var s=e[a];0===a?o.push({key:s[0],data:""}):a===e.length-1?o[o.length-1].data=i(s[0]):(o[o.length-1].data=i(s[0]),o.push({key:s[1],data:""}))}var l={key:r,data:{}};return o.forEach((function(e){l.data[e.key]=e.data})),l}function i(e){return e&&0!==e.length?0===e.indexOf('"')||0===e.indexOf("'")?e.substring(1,e.length-1):-1!==e.indexOf(",")?function(e){return e.split(",").map((function(e){return parseInt(e,10)}))}(e):parseInt(e,10):""}t.exports=function(e){if(!e)throw new Error("no data provided");var t={pages:[],chars:[],kernings:[]},n=(e=e.toString().trim()).split(/\r\n?|\n/g);if(0===n.length)throw new Error("no data in BMFont file");for(var i=0;i<n.length;i++){var o=r(n[i],i);if(o)if("page"===o.key){if("number"!==typeof o.data.id)throw new Error("malformed file at line "+i+" -- needs page id=N");if("string"!==typeof o.data.file)throw new Error("malformed file at line "+i+' -- needs page file="path"');t.pages[o.data.id]=o.data.file}else"chars"===o.key||"kernings"===o.key||("char"===o.key?t.chars.push(o.data):"kerning"===o.key?t.kernings.push(o.data):t[o.key]=o.data)}return t}},{}],44:[function(e,t,n){var r=[66,77,70];function i(e,t,n){if(n>t.length-1)return 0;var r=t.readUInt8(n++),i=t.readInt32LE(n);switch(n+=4,r){case 1:e.info=function(e,t){var n={};n.size=e.readInt16LE(t);var r=e.readUInt8(t+2);return n.smooth=r>>7&1,n.unicode=r>>6&1,n.italic=r>>5&1,n.bold=r>>4&1,r>>3&1&&(n.fixedHeight=1),n.charset=e.readUInt8(t+3)||"",n.stretchH=e.readUInt16LE(t+4),n.aa=e.readUInt8(t+6),n.padding=[e.readInt8(t+7),e.readInt8(t+8),e.readInt8(t+9),e.readInt8(t+10)],n.spacing=[e.readInt8(t+11),e.readInt8(t+12)],n.outline=e.readUInt8(t+13),n.face=function(e,t){return o(e,t).toString("utf8")}(e,t+14),n}(t,n);break;case 2:e.common=function(e,t){var n={};return n.lineHeight=e.readUInt16LE(t),n.base=e.readUInt16LE(t+2),n.scaleW=e.readUInt16LE(t+4),n.scaleH=e.readUInt16LE(t+6),n.pages=e.readUInt16LE(t+8),e.readUInt8(t+10),n.packed=0,n.alphaChnl=e.readUInt8(t+11),n.redChnl=e.readUInt8(t+12),n.greenChnl=e.readUInt8(t+13),n.blueChnl=e.readUInt8(t+14),n}(t,n);break;case 3:e.pages=function(e,t,n){for(var r=[],i=o(e,t),a=i.length+1,s=n/a,l=0;l<s;l++)r[l]=e.slice(t,t+i.length).toString("utf8"),t+=a;return r}(t,n,i);break;case 4:e.chars=function(e,t,n){for(var r=[],i=n/20,o=0;o<i;o++){var a={},s=20*o;a.id=e.readUInt32LE(t+0+s),a.x=e.readUInt16LE(t+4+s),a.y=e.readUInt16LE(t+6+s),a.width=e.readUInt16LE(t+8+s),a.height=e.readUInt16LE(t+10+s),a.xoffset=e.readInt16LE(t+12+s),a.yoffset=e.readInt16LE(t+14+s),a.xadvance=e.readInt16LE(t+16+s),a.page=e.readUInt8(t+18+s),a.chnl=e.readUInt8(t+19+s),r[o]=a}return r}(t,n,i);break;case 5:e.kernings=function(e,t,n){for(var r=[],i=n/10,o=0;o<i;o++){var a={},s=10*o;a.first=e.readUInt32LE(t+0+s),a.second=e.readUInt32LE(t+4+s),a.amount=e.readInt16LE(t+8+s),r[o]=a}return r}(t,n,i)}return 5+i}function o(e,t){for(var n=t;n<e.length&&0!==e[n];n++);return e.slice(t,n)}t.exports=function(e){if(e.length<6)throw new Error("invalid buffer length for BMFont");if(!r.every((function(t,n){return e.readUInt8(n)===t})))throw new Error("BMFont missing BMF byte header");var t=3;if(e.readUInt8(t++)>3)throw new Error("Only supports BMFont Binary v3 (BMFont App v1.10)");for(var n={kernings:[],chars:[]},o=0;o<5;o++)t+=i(n,e,t);return n}},{}],45:[function(e,t,n){var r=e("./parse-attribs"),i=e("xml-parse-from-string"),o={scaleh:"scaleH",scalew:"scaleW",stretchh:"stretchH",lineheight:"lineHeight",alphachnl:"alphaChnl",redchnl:"redChnl",greenchnl:"greenChnl",bluechnl:"blueChnl"};function a(e){return function(e){for(var t=[],n=0;n<e.attributes.length;n++)t.push(e.attributes[n]);return t}(e).reduce((function(e,t){var n;return e[(n=t.nodeName,o[n.toLowerCase()]||n)]=t.nodeValue,e}),{})}t.exports=function(e){e=e.toString();var t=i(e),n={pages:[],chars:[],kernings:[]};["info","common"].forEach((function(e){var i=t.getElementsByTagName(e)[0];i&&(n[e]=r(a(i)))}));var o=t.getElementsByTagName("pages")[0];if(!o)throw new Error("malformed file -- no <pages> element");for(var s=o.getElementsByTagName("page"),l=0;l<s.length;l++){var c=s[l],u=parseInt(c.getAttribute("id"),10),h=c.getAttribute("file");if(isNaN(u))throw new Error('malformed file -- page "id" attribute is NaN');if(!h)throw new Error('malformed file -- needs page "file" attribute');n.pages[parseInt(u,10)]=h}return["chars","kernings"].forEach((function(e){var i=t.getElementsByTagName(e)[0];if(i)for(var o=e.substring(0,e.length-1),s=i.getElementsByTagName(o),l=0;l<s.length;l++){var c=s[l];n[e].push(r(a(c)))}})),n}},{"./parse-attribs":46,"xml-parse-from-string":71}],46:[function(e,t,n){t.exports=function(e){for(var t in"chasrset"in e&&(e.charset=e.chasrset,delete e.chasrset),e)"face"!==t&&"charset"!==t&&(e[t]="padding"===t||"spacing"===t?e[t].split(",").map((function(e){return parseInt(e,10)})):parseInt(e[t],10));return e}},{}],47:[function(e,t,n){var r=e("string.prototype.trim"),i=e("for-each");t.exports=function(e){if(!e)return{};var t={};return i(r(e).split("\n"),(function(e){var n,i=e.indexOf(":"),o=r(e.slice(0,i)).toLowerCase(),a=r(e.slice(i+1));"undefined"===typeof t[o]?t[o]=a:(n=t[o],"[object Array]"===Object.prototype.toString.call(n)?t[o].push(a):t[o]=[t[o],a])})),t}},{"for-each":24,"string.prototype.trim":53}],48:[function(e,t,r){(function(e){var n=e.performance||{},r=function(){for(var e=["now","webkitNow","msNow","mozNow","oNow"];e.length;){var t=e.shift();if(t in n)return n[t].bind(n)}var r=Date.now||function(){return(new Date).getTime()},i=(n.timing||{}).navigationStart||r();return function(){return r()-i}}();r.performanceNow=n.now,r.noConflict=function(){n.now=r.performanceNow},r.conflict=function(){n.now=r},r.conflict(),t.exports=r}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],49:[function(t,n,r){var i,o,a=n.exports={};function s(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function c(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"===typeof setTimeout?setTimeout:s}catch(e){i=s}try{o="function"===typeof clearTimeout?clearTimeout:l}catch(e){o=l}}();var u,h=[],d=!1,f=-1;function p(){d&&u&&(d=!1,u.length?h=u.concat(h):f=-1,h.length&&m())}function m(){if(!d){var t=c(p);d=!0;for(var n=h.length;n;){for(u=h,h=[];++f<n;)u&&u[f].run();f=-1,n=h.length}u=null,d=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===l||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function g(e,t){this.fun=e,this.array=t}function v(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new g(e,t)),1!==h.length||d||c(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],50:[function(t,n,r){(function(t){!function(r){var i=setTimeout,o="function"===typeof t&&t||function(e){i(e,1)};function a(e,t){return function(){e.apply(t,arguments)}}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function l(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],p(e,a(u,this),a(h,this))}function c(t){var n=this;null!==this._state?o((function(){var r=n._state?t.onFulfilled:t.onRejected;if(null!==r){var i;try{i=r(n._value)}catch(e){return void t.reject(e)}t.resolve(i)}else(n._state?t.resolve:t.reject)(n._value)})):this._deferreds.push(t)}function u(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===typeof t||"function"===typeof t)){var n=t.then;if("function"===typeof n)return void p(a(n,t),a(u,this),a(h,this))}this._state=!0,this._value=t,d.call(this)}catch(e){h.call(this,e)}}function h(e){this._state=!1,this._value=e,d.call(this)}function d(){for(var e=0,t=this._deferreds.length;e<t;e++)c.call(this,this._deferreds[e]);this._deferreds=null}function f(e,t,n,r){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.resolve=n,this.reject=r}function p(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(i){if(r)return;r=!0,n(i)}}l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){var n=this;return new l((function(r,i){c.call(n,new f(e,t,r,i))}))},l.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&s(arguments[0])?arguments[0]:arguments);return new l((function(t,n){if(0===e.length)return t([]);var r=e.length;function i(o,a){try{if(a&&("object"===typeof a||"function"===typeof a)){var s=a.then;if("function"===typeof s)return void s.call(a,(function(e){i(o,e)}),n)}e[o]=a,0===--r&&t(e)}catch(l){n(l)}}for(var o=0;o<e.length;o++)i(o,e[o])}))},l.resolve=function(e){return e&&"object"===typeof e&&e.constructor===l?e:new l((function(t){t(e)}))},l.reject=function(e){return new l((function(t,n){n(e)}))},l.race=function(e){return new l((function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)}))},l._setImmediateFn=function(e){o=e},"undefined"!==typeof n&&n.exports?n.exports=l:r.Promise||(r.Promise=l)}(this)}).call(this,t("timers").setImmediate)},{timers:67}],51:[function(e,t,n){var r=e("dtype"),i=e("an-array"),o=e("is-buffer"),a=[0,2,3],s=[2,1,3];t.exports=function(e,t){e&&(i(e)||o(e))||(t=e||{},e=null);for(var n="string"===typeof(t="number"===typeof t?{count:t}:t||{}).type?t.type:"uint16",l="number"===typeof t.count?t.count:1,c=t.start||0,u=!1!==t.clockwise?a:s,h=u[0],d=u[1],f=u[2],p=6*l,m=e||new(r(n))(p),g=0,v=0;g<p;g+=6,v+=4){var y=g+c;m[y+0]=v+0,m[y+1]=v+1,m[y+2]=v+2,m[y+3]=v+h,m[y+4]=v+d,m[y+5]=v+f}return m}},{"an-array":1,dtype:13,"is-buffer":31}],52:[function(e,t,n){"use strict";var r=e("function-bind"),i=e("es-abstract/es5"),o=r.call(Function.call,String.prototype.replace),a=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var e=i.ToString(i.CheckObjectCoercible(this));return o(o(e,a,""),s,"")}},{"es-abstract/es5":15,"function-bind":26}],53:[function(e,t,n){"use strict";var r=e("function-bind"),i=e("define-properties"),o=e("./implementation"),a=e("./polyfill"),s=e("./shim"),l=r.call(Function.call,a());i(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},{"./implementation":52,"./polyfill":54,"./shim":55,"define-properties":11,"function-bind":26}],54:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:r}},{"./implementation":52}],55:[function(e,t,n){"use strict";var r=e("define-properties"),i=e("./polyfill");t.exports=function(){var e=i();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},{"./polyfill":54,"define-properties":11}],56:[function(t,n,r){"use strict";var i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},o={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},a=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],s={CSS:{},springs:{}};function l(e,t,n){return Math.min(Math.max(e,t),n)}function c(e,t){return e.indexOf(t)>-1}function u(e,t){return e.apply(null,t)}var h=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,d=/^rgb/,f=/^hsl/,p={arr:function(e){return Array.isArray(e)},obj:function(e){return c(Object.prototype.toString.call(e),"Object")},pth:function(e){return p.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||p.svg(e)},str:function(e){return"string"===typeof e},fnc:function(e){return"function"===typeof e},und:function(e){return"undefined"===typeof e},hex:function(e){return h.test(e)},rgb:function(e){return d.test(e)},hsl:function(e){return f.test(e)},col:function(e){return p.hex(e)||p.rgb(e)||p.hsl(e)},key:function(e){return!i.hasOwnProperty(e)&&!o.hasOwnProperty(e)&&"targets"!==e&&"keyframes"!==e}},m=/\(([^)]+)\)/;function g(e){var t=m.exec(e);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function v(e,t){var n=g(e),r=l(p.und(n[0])?1:n[0],.1,100),i=l(p.und(n[1])?100:n[1],.1,100),o=l(p.und(n[2])?10:n[2],.1,100),a=l(p.und(n[3])?0:n[3],.1,100),c=Math.sqrt(i/r),u=o/(2*Math.sqrt(i*r)),h=u<1?c*Math.sqrt(1-u*u):0,d=u<1?(u*c-a)/h:-a+c;function f(e){var n=t?t*e/1e3:e;return n=u<1?Math.exp(-n*u*c)*(1*Math.cos(h*n)+d*Math.sin(h*n)):(1+d*n)*Math.exp(-n*c),0===e||1===e?e:1-n}return t?f:function(){var t=s.springs[e];if(t)return t;for(var n=0,r=0;;)if(1===f(n+=1/6)){if(++r>=16)break}else r=0;var i=n*(1/6)*1e3;return s.springs[e]=i,i}}function y(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var n=l(e,1,10),r=l(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-r/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/r)}}function b(e){return void 0===e&&(e=10),function(t){return Math.round(t*e)*(1/e)}}var w=function(){function e(e,t){return 1-3*t+3*e}function t(e,t){return 3*t-6*e}function n(e){return 3*e}function r(r,i,o){return((e(i,o)*r+t(i,o))*r+n(i))*r}function i(r,i,o){return 3*e(i,o)*r*r+2*t(i,o)*r+n(i)}return function(e,t,n,o){if(0<=e&&e<=1&&0<=n&&n<=1){var a=new Float32Array(11);if(e!==t||n!==o)for(var s=0;s<11;++s)a[s]=r(.1*s,e,n);return function(i){return e===t&&n===o||0===i||1===i?i:r(l(i),t,o)}}function l(t){for(var o=0,s=1;10!==s&&a[s]<=t;++s)o+=.1;--s;var l=o+(t-a[s])/(a[s+1]-a[s])*.1,c=i(l,e,n);return c>=.001?function(e,t,n,o){for(var a=0;a<4;++a){var s=i(t,n,o);if(0===s)return t;t-=(r(t,n,o)-e)/s}return t}(t,l,e,n):0===c?l:function(e,t,n,i,o){var a,s,l=0;do{(a=r(s=t+(n-t)/2,i,o)-e)>0?n=s:t=s}while(Math.abs(a)>1e-7&&++l<10);return s}(t,o,o+.1,e,n)}}}(),x=function(){var e=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"],t={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],y],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,t){return function(n){return 1-y(e,t)(1-n)}}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,t){return function(n){return n<.5?y(e,t)(2*n)/2:1-y(e,t)(-2*n+2)/2}}]},n={linear:[.25,.25,.75,.75]};for(var r in t)for(var i=0,o=t[r].length;i<o;i++)n["ease"+r+e[i]]=t[r][i];return n}();function _(e,t){if(p.fnc(e))return e;var n=e.split("(")[0],r=x[n],i=g(e);switch(n){case"spring":return v(e,t);case"cubicBezier":return u(w,i);case"steps":return u(b,i);default:return p.fnc(r)?u(r,i):u(w,r)}}function E(t){try{return document.querySelectorAll(t)}catch(e){return}}var A=[];function S(e,t){for(var n=A,r=e.length,i=arguments.length>=2?arguments[1]:void 0,o=0;o<r;o++)if(o in e){var a=e[o];t.call(i,a,o,e)&&n.push(a)}return(A=e).length=0,n}function M(e,t){t||(t=[]);for(var n=0,r=e.length;n<r;n++){var i=e[n];Array.isArray(i)?M(i,t):t.push(i)}return t}function T(e){return p.arr(e)?e:(p.str(e)&&(e=E(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function C(e,t){return e.some((function(e){return e===t}))}function O(e){var t={};for(var n in e)t[n]=e[n];return t}function R(e,t){var n=O(e);for(var r in e)n[r]=t.hasOwnProperty(r)?t[r]:e[r];return n}function k(e,t){var n=O(e);for(var r in t)n[r]=p.und(e[r])?t[r]:e[r];return n}var P=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g,L=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,D=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,I=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g,N=/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g;function j(e){return p.rgb(e)?function(e){var t=P.exec(e);return t?"rgba("+t[1]+",1)":e}(e):p.hex(e)?function(e){var t=e.replace(L,(function(e,t,n,r){return t+t+n+n+r+r})),n=D.exec(t);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}(e):p.hsl(e)?function(e){var t,n,r,i=I.exec(e)||N.exec(e),o=parseInt(i[1],10)/360,a=parseInt(i[2],10)/100,s=parseInt(i[3],10)/100,l=i[4]||1;function c(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(0==a)t=n=r=s;else{var u=s<.5?s*(1+a):s+a-s*a,h=2*s-u;t=c(h,u,o+1/3),n=c(h,u,o),r=c(h,u,o-1/3)}return"rgba("+255*t+","+255*n+","+255*r+","+l+")"}(e):void 0}var B=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/;function F(e){var t=B.exec(e);if(t)return t[2]}function z(e,t){return p.fnc(e)?e(t.target,t.id,t.total):e}function H(e,t){return e.getAttribute(t)}function U(e,t,n){if(C([n,"deg","rad","turn"],F(t)))return t;var r=s.CSS[t+n];if(!p.und(r))return r;var i=document.createElement(e.tagName),o=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;o.appendChild(i),i.style.position="absolute",i.style.width=100+n;var a=100/i.offsetWidth;o.removeChild(i);var l=a*parseFloat(t);return s.CSS[t+n]=l,l}function V(e,t,n){if(t in e.style){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=e.style[t]||getComputedStyle(e).getPropertyValue(r)||"0";return n?U(e,i,n):i}}function G(e,t){return p.dom(e)&&!p.inp(e)&&(H(e,t)||p.svg(e)&&e[t])?"attribute":p.dom(e)&&C(a,t)?"transform":p.dom(e)&&"transform"!==t&&V(e,t)?"css":null!=e[t]?"object":void 0}var W=/(\w+)\(([^)]*)\)/g;function q(e){if(p.dom(e)){for(var t,n=e.style.transform||"",r=new Map;t=W.exec(n);)r.set(t[1],t[2]);return r}}function X(e,t,n,r){var i=c(t,"scale")?1:0+function(e){return c(e,"translate")||"perspective"===e?"px":c(e,"rotate")||c(e,"skew")?"deg":void 0}(t),o=q(e).get(t)||i;return n&&(n.transforms.list.set(t,o),n.transforms.last=t),r?U(e,o,r):o}function Y(e,t,n,r){switch(G(e,t)){case"transform":return X(e,t,r,n);case"css":return V(e,t,n);case"attribute":return H(e,t);default:return e[t]||0}}var K=/^(\*=|\+=|-=)/;function Q(e,t){var n=K.exec(e);if(!n)return e;var r=F(e)||0,i=parseFloat(t),o=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return i+o+r;case"-":return i-o+r;case"*":return i*o+r}}var Z=/\s/g;function J(e,t){if(p.col(e))return j(e);var n=F(e),r=n?e.substr(0,e.length-n.length):e;return t&&!Z.test(e)?r+t:r}function $(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ee(e){for(var t,n=e.points,r=0,i=0;i<n.numberOfItems;i++){var o=n.getItem(i);i>0&&(r+=$(t,o)),t=o}return r}function te(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return function(e){return 2*Math.PI*H(e,"r")}(e);case"rect":return function(e){return 2*H(e,"width")+2*H(e,"height")}(e);case"line":return function(e){return $({x:H(e,"x1"),y:H(e,"y1")},{x:H(e,"x2"),y:H(e,"y2")})}(e);case"polyline":return ee(e);case"polygon":return function(e){var t=e.points;return ee(e)+$(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function ne(e,t){var n=t||{},r=n.el||function(e){for(var t=e.parentNode;p.svg(t)&&(t=t.parentNode,p.svg(t.parentNode)););return t}(e),i=r.getBoundingClientRect(),o=H(r,"viewBox"),a=i.width,s=i.height,l=n.viewBox||(o?o.split(" "):[0,0,a,s]);return{el:r,viewBox:l,x:l[0]/1,y:l[1]/1,w:a/l[2],h:s/l[3]}}function re(e,t){function n(n){void 0===n&&(n=0);var r=t+n>=1?t+n:0;return e.el.getPointAtLength(r)}var r=ne(e.el,e.svg),i=n(),o=n(-1),a=n(1);switch(e.property){case"x":return(i.x-r.x)*r.w;case"y":return(i.y-r.y)*r.h;case"angle":return 180*Math.atan2(a.y-o.y,a.x-o.x)/Math.PI}}var ie=/-?\d*\.?\d+/g;function oe(e,t){var n=J(p.pth(e)?e.totalLength:e,t)+"";return{original:n,numbers:n.match(ie)?n.match(ie).map(Number):[0],strings:p.str(e)||t?n.split(ie):[]}}function ae(e){return S(e?M(p.arr(e)?e.map(T):T(e)):[],(function(e,t,n){return n.indexOf(e)===t}))}function se(e){var t=ae(e);return t.map((function(e,n){return{target:e,id:n,total:t.length,transforms:{list:q(e)}}}))}var le=/^spring/;function ce(e,t){var n=O(t);if(le.test(n.easing)&&(n.duration=v(n.easing)),p.arr(e)){var r=e.length;2!==r||p.obj(e[0])?p.fnc(t.duration)||(n.duration=t.duration/r):e={value:e}}var i=p.arr(e)?e:[e];return i.map((function(e,n){var r=p.obj(e)&&!p.pth(e)?e:{value:e};return p.und(r.delay)&&(r.delay=n?0:t.delay),p.und(r.endDelay)&&(r.endDelay=n===i.length-1?t.endDelay:0),r})).map((function(e){return k(e,n)}))}function ue(e,t){var n=[],r=t.keyframes;for(var i in r&&(t=k(function(e){for(var t=S(M(e.map((function(e){return Object.keys(e)}))),(function(e){return p.key(e)})).reduce((function(e,t){return e.indexOf(t)<0&&e.push(t),e}),[]),n={},r=function(r){var i=t[r];n[i]=e.map((function(e){var t={};for(var n in e)p.key(n)?n==i&&(t.value=e[n]):t[n]=e[n];return t}))},i=0;i<t.length;i++)r(i);return n}(r),t)),t)p.key(i)&&n.push({name:i,tweens:ce(t[i],e)});return n}function he(e,t){var n;return e.tweens.map((function(r){var i=function(e,t){var n={};for(var r in e){var i=z(e[r],t);p.arr(i)&&1===(i=i.map((function(e){return z(e,t)}))).length&&(i=i[0]),n[r]=i}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(r,t),o=i.value,a=p.arr(o)?o[1]:o,s=F(a),l=Y(t.target,e.name,s,t),c=n?n.to.original:l,u=p.arr(o)?o[0]:c,h=F(u)||F(l),d=s||h;return p.und(a)&&(a=c),i.from=oe(u,d),i.to=oe(Q(a,u),d),i.start=n?n.end:0,i.end=i.start+i.delay+i.duration+i.endDelay,i.easing=_(i.easing,i.duration),i.isPath=p.pth(o),i.isColor=p.col(i.from.original),i.isColor&&(i.round=1),n=i,i}))}var de={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,r,i){if(r.list.set(t,n),t===r.last||i){var o="";r.list.forEach((function(e,t){o+=t+"("+e+") "})),e.style.transform=o}}};function fe(e,t){for(var n=se(e),r=0,i=n.length;r<i;r++){var o=n[r];for(var a in t){var s=z(t[a],o),l=o.target,c=F(s),u=Y(l,a,c,o),h=Q(J(s,c||F(u)),u),d=G(l,a);de[d](l,a,h,o.transforms,!0)}}}function pe(e,t){return S(M(e.map((function(e){return t.map((function(t){return function(e,t){var n=G(e.target,t.name);if(n){var r=he(t,e),i=r[r.length-1];return{type:n,property:t.name,animatable:e,tweens:r,duration:i.end,delay:r[0].delay,endDelay:i.endDelay}}}(e,t)}))}))),(function(e){return!p.und(e)}))}function me(e,t){var n=e.length,r=function(e){return e.timelineOffset?e.timelineOffset:0},i={};return i.duration=n?Math.max.apply(Math,e.map((function(e){return r(e)+e.duration}))):t.duration,i.delay=n?Math.min.apply(Math,e.map((function(e){return r(e)+e.delay}))):t.delay,i.endDelay=n?i.duration-Math.max.apply(Math,e.map((function(e){return r(e)+e.duration-e.endDelay}))):t.endDelay,i}var ge,ve=0,ye=[],be=[],we=function(){function e(){ge=requestAnimationFrame(t)}function t(t){var n=ye.length;if(n){for(var r=0;r<n;){var i=ye[r];if(i.paused){var o=ye.indexOf(i);o>-1&&(ye.splice(o,1),n=ye.length)}else i.tick(t);r++}e()}else ge=cancelAnimationFrame(ge)}return e}();function xe(e){void 0===e&&(e={});var t,n=0,r=0,a=0,s=0,c=null;function u(){return window.Promise&&new Promise((function(e){return c=e}))}var h=u(),d=function(e){var t=R(i,e),n=R(o,e),r=ue(n,e),a=se(e.targets),s=pe(a,r),l=me(s,n),c=ve;return ve++,k(t,{id:c,children:[],animatables:a,animations:s,duration:l.duration,delay:l.delay,endDelay:l.endDelay})}(e);function f(){d.reversed=!d.reversed;for(var e=0,n=t.length;e<n;e++)t[e].reversed=d.reversed}function p(e){return d.reversed?d.duration-e:e}function m(){n=0,r=p(d.currentTime)*(1/xe.speed)}function g(e,t){t&&t.seek(e-t.timelineOffset)}function v(e){for(var t=0,n=d.animations,r=n.length;t<r;){var i=n[t],o=i.animatable,a=i.tweens,s=a.length-1,c=a[s];s&&(c=S(a,(function(t){return e<t.end}))[0]||c);for(var u=l(e-c.start-c.delay,0,c.duration)/c.duration,h=isNaN(u)?1:c.easing(u),f=c.to.strings,p=c.round,m=[],g=c.to.numbers.length,v=void 0,y=0;y<g;y++){var b=void 0,w=c.to.numbers[y],x=c.from.numbers[y]||0;b=c.isPath?re(c.value,h*w):x+h*(w-x),p&&(c.isColor&&y>2||(b=Math.round(b*p)/p)),m.push(b)}var _=f.length;if(_){v=f[0];for(var E=0;E<_;E++){f[E];var A=f[E+1],M=m[E];isNaN(M)||(v+=A?M+A:M+" ")}}else v=m[0];de[i.type](o.target,i.property,v,o.transforms),i.currentValue=v,t++}}function y(e){d[e]&&!d.passThrough&&d[e](d)}function b(e){var i=d.duration,o=d.delay,m=i-d.endDelay,b=p(e);d.progress=l(b/i*100,0,100),d.reversePlayback=b<d.currentTime,t&&function(e){if(d.reversePlayback)for(var n=s;n--;)g(e,t[n]);else for(var r=0;r<s;r++)g(e,t[r])}(b),!d.began&&d.currentTime>0&&(d.began=!0,y("begin"),y("loopBegin")),b<=o&&0!==d.currentTime&&v(0),(b>=m&&d.currentTime!==i||!i)&&v(i),b>o&&b<m?(d.changeBegan||(d.changeBegan=!0,d.changeCompleted=!1,y("changeBegin")),y("change"),v(b)):d.changeBegan&&(d.changeCompleted=!0,d.changeBegan=!1,y("changeComplete")),d.currentTime=l(b,0,i),d.began&&y("update"),e>=i&&(r=0,d.remaining&&!0!==d.remaining&&d.remaining--,d.remaining?(n=a,y("loopComplete"),y("loopBegin"),"alternate"===d.direction&&f()):(d.paused=!0,d.completed||(d.completed=!0,y("loopComplete"),y("complete"),"Promise"in window&&(c(),h=u()))))}return d.reset=function(){var e=d.direction;d.passThrough=!1,d.currentTime=0,d.progress=0,d.paused=!0,d.began=!1,d.changeBegan=!1,d.completed=!1,d.changeCompleted=!1,d.reversePlayback=!1,d.reversed="reverse"===e,d.remaining=d.loop,t=d.children;for(var n=s=t.length;n--;)d.children[n].reset();(d.reversed&&!0!==d.loop||"alternate"===e&&1===d.loop)&&d.remaining++,v(0)},d.set=function(e,t){return fe(e,t),d},d.tick=function(e){a=e,n||(n=a),b((a+(r-n))*xe.speed)},d.seek=function(e){b(p(e))},d.pause=function(){d.paused=!0,m()},d.play=function(){d.paused&&(d.paused=!1,ye.push(d),m(),ge||we())},d.reverse=function(){f(),m()},d.restart=function(){d.reset(),d.play()},d.finished=h,d.reset(),d.autoplay&&d.play(),d}function _e(e,t){for(var n=t.length;n--;)C(e,t[n].animatable.target)&&t.splice(n,1)}document.addEventListener("visibilitychange",(function(){if(document.hidden){for(var e=0,t=ye.length;e<t;e++)activeInstance[e].pause();be=ye.slice(0),ye=[]}else for(var n=0,r=be.length;n<r;n++)be[n].play()})),xe.version="3.0.0",xe.speed=1,xe.running=ye,xe.remove=function(e){for(var t=ae(e),n=ye.length;n--;){var r=ye[n],i=r.animations,o=r.children;_e(t,i);for(var a=o.length;a--;){var s=o[a],l=s.animations;_e(t,l),l.length||s.children.length||o.splice(a,1)}i.length||o.length||r.pause()}},xe.get=Y,xe.set=fe,xe.convertPx=U,xe.path=function(e,t){var n=p.str(e)?E(e)[0]:e,r=t||100;return function(e){return{property:e,el:n,svg:ne(n),totalLength:te(n)*(r/100)}}},xe.setDashoffset=function(e){var t=te(e);return e.setAttribute("stroke-dasharray",t),t},xe.stagger=function(e,t){void 0===t&&(t={});var n=t.direction||"normal",r=t.easing?_(t.easing):null,i=t.grid,o=t.axis,a=t.from||0,s="first"===a,l="center"===a,c="last"===a,u=p.arr(e),h=u?parseFloat(e[0]):parseFloat(e),d=u?parseFloat(e[1]):0,f=F(u?e[1]:e)||0,m=t.start||0+(u?h:0),g=[],v=0;return function(e,t,p){if(s&&(a=0),l&&(a=(p-1)/2),c&&(a=p-1),!g.length){for(var y=0;y<p;y++){if(i){var b=l?(i[0]-1)/2:a%i[0],w=l?(i[1]-1)/2:Math.floor(a/i[0]),x=b-y%i[0],_=w-Math.floor(y/i[0]),E=Math.sqrt(x*x+_*_);"x"===o&&(E=-x),"y"===o&&(E=-_),g.push(E)}else g.push(Math.abs(a-y));v=Math.max.apply(Math,g)}r&&(g=g.map((function(e){return r(e/v)*v}))),"reverse"===n&&(g=g.map((function(e){return o?e<0?-1*e:-e:Math.abs(v-e)})))}return m+(u?(d-h)/v:h)*(Math.round(100*g[t])/100)+f}},xe.timeline=function(e){void 0===e&&(e={});var t=xe(e);return t.duration=0,t.add=function(n,r){var i=ye.indexOf(t),a=t.children;function s(e){e.passThrough=!0}i>-1&&ye.splice(i,1);for(var l=0;l<a.length;l++)s(a[l]);var c=k(n,R(o,e));c.targets=c.targets||e.targets;var u=t.duration;c.autoplay=!1,c.direction=t.direction,c.timelineOffset=p.und(r)?u:Q(r,u),s(t),t.seek(c.timelineOffset);var h=xe(c);s(h),a.push(h);var d=me(a,e);return t.delay=d.delay,t.endDelay=d.endDelay,t.duration=d.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},xe.easing=_,xe.penner=x,xe.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},n.exports=xe},{}],57:[function(t,n,r){!function(e,t){t("object"===typeof r&&"undefined"!==typeof n?r:(e="undefined"!==typeof globalThis?globalThis:e||self).THREE={})}(this,(function(t){"use strict";void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),"name"in Function.prototype===!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t});var r=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(M){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=l;var u={};function h(){}function d(){}function f(){}var p={};p[i]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(A([])));g&&g!==t&&n.call(g,i)&&(p=g);var v=f.prototype=h.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"===typeof h&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function A(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=v.constructor=f,f.constructor=d,d.displayName=s(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=A,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}("object"===typeof n?n.exports:{});try{regeneratorRuntime=r}catch(cu){Function("r","regeneratorRuntime = r")(r)}function i(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,i)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function h(){}Object.assign(h.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var n=this._listeners[e];if(void 0!==n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var n=t.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,e)}}}});for(var d=[],f=0;f<256;f++)d[f]=(f<16?"0":"")+f.toString(16);var p,m=1234567,g={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(d[255&e]+d[e>>8&255]+d[e>>16&255]+d[e>>24&255]+"-"+d[255&t]+d[t>>8&255]+"-"+d[t>>16&15|64]+d[t>>24&255]+"-"+d[63&n|128]+d[n>>8&255]+"-"+d[n>>16&255]+d[n>>24&255]+d[255&r]+d[r>>8&255]+d[r>>16&255]+d[r>>24&255]).toUpperCase()},clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},damp:function(e,t,n,r){return g.lerp(e,t,1-Math.exp(-n*r))},pingpong:function(e,t){return void 0===t&&(t=1),t-Math.abs(g.euclideanModulo(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){return void 0!==e&&(m=e%2147483647),((m=16807*m%2147483647)-1)/2147483646},degToRad:function(e){return e*g.DEG2RAD},radToDeg:function(e){return e*g.RAD2DEG},isPowerOfTwo:function(e){return 0===(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){var o=Math.cos,a=Math.sin,s=o(n/2),l=a(n/2),c=o((t+r)/2),u=a((t+r)/2),h=o((t-r)/2),d=a((t-r)/2),f=o((r-t)/2),p=a((r-t)/2);switch(i){case"XYX":e.set(s*u,l*h,l*d,s*c);break;case"YZY":e.set(l*d,s*u,l*h,s*c);break;case"ZXZ":e.set(l*h,l*d,s*u,s*c);break;case"XZX":e.set(s*u,l*p,l*f,s*c);break;case"YXY":e.set(l*f,s*u,l*p,s*c);break;case"ZYZ":e.set(l*p,l*f,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}},v=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),Object.defineProperty(this,"isVector2",{value:!0}),this.x=e,this.y=t}var t=e.prototype;return t.set=function(e,t){return this.x=e,this.y=t,this},t.setScalar=function(e){return this.x=e,this.y=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.setComponent=function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},t.getComponent=function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},t.clone=function(){return new this.constructor(this.x,this.y)},t.copy=function(e){return this.x=e.x,this.y=e.y,this},t.add=function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},t.addScalar=function(e){return this.x+=e,this.y+=e,this},t.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},t.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},t.sub=function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},t.subScalar=function(e){return this.x-=e,this.y-=e,this},t.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},t.multiply=function(e){return this.x*=e.x,this.y*=e.y,this},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this},t.divide=function(e){return this.x/=e.x,this.y/=e.y,this},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.applyMatrix3=function(e){var t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this},t.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},t.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},t.clamp=function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},t.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},t.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},t.roundToZero=function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},t.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.dot=function(e){return this.x*e.x+this.y*e.y},t.cross=function(e){return this.x*e.y-this.y*e.x},t.lengthSq=function(){return this.x*this.x+this.y*this.y},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.angle=function(){var e=Math.atan2(-this.y,-this.x)+Math.PI;return e},t.distanceTo=function(e){return Math.sqrt(this.distanceToSquared(e))},t.distanceToSquared=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},t.manhattanDistanceTo=function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this},t.equals=function(e){return e.x===this.x&&e.y===this.y},t.fromArray=function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},t.fromBufferAttribute=function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},t.rotateAround=function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this},a(e,[{key:"width",get:function(){return this.x},set:function(e){this.x=e}},{key:"height",get:function(){return this.y},set:function(e){this.y=e}}]),e}(),y=function(){function e(){Object.defineProperty(this,"isMatrix3",{value:!0}),this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}var t=e.prototype;return t.set=function(e,t,n,r,i,o,a,s,l){var c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=l,this},t.identity=function(){return this.set(1,0,0,0,1,0,0,0,1),this},t.clone=function(){return(new this.constructor).fromArray(this.elements)},t.copy=function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},t.extractBasis=function(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this},t.setFromMatrix4=function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},t.multiply=function(e){return this.multiplyMatrices(this,e)},t.premultiply=function(e){return this.multiplyMatrices(e,this)},t.multiplyMatrices=function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],l=n[1],c=n[4],u=n[7],h=n[2],d=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],w=r[2],x=r[5],_=r[8];return i[0]=o*p+a*v+s*w,i[3]=o*m+a*y+s*x,i[6]=o*g+a*b+s*_,i[1]=l*p+c*v+u*w,i[4]=l*m+c*y+u*x,i[7]=l*g+c*b+u*_,i[2]=h*p+d*v+f*w,i[5]=h*m+d*y+f*x,i[8]=h*g+d*b+f*_,this},t.multiplyScalar=function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},t.determinant=function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8];return t*o*c-t*a*l-n*i*c+n*a*s+r*i*l-r*o*s},t.invert=function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=c*o-a*l,h=a*s-c*i,d=l*i-o*s,f=t*u+n*h+r*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);var p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(a*n-r*o)*p,e[3]=h*p,e[4]=(c*t-r*s)*p,e[5]=(r*i-a*t)*p,e[6]=d*p,e[7]=(n*s-l*t)*p,e[8]=(o*t-n*i)*p,this},t.transpose=function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},t.getNormalMatrix=function(e){return this.setFromMatrix4(e).copy(this).invert().transpose()},t.transposeIntoArray=function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},t.setUvTransform=function(e,t,n,r,i,o,a){var s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*o+l*a)+o+e,-r*l,r*s,-r*(-l*o+s*a)+a+t,0,0,1),this},t.scale=function(e,t){var n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this},t.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],l=r[4],c=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*l,r[6]=t*a+n*c,r[1]=-n*i+t*s,r[4]=-n*o+t*l,r[7]=-n*a+t*c,this},t.translate=function(e,t){var n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this},t.equals=function(e){for(var t=this.elements,n=e.elements,r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},t.toArray=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e},e}(),b={getDataURL:function(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;var t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===p&&(p=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),p.width=e.width,p.height=e.height;var n=p.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=p}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},w=0;function x(e,t,n,r,i,o,a,s,l,c){void 0===e&&(e=x.DEFAULT_IMAGE),void 0===t&&(t=x.DEFAULT_MAPPING),void 0===n&&(n=1001),void 0===r&&(r=1001),void 0===i&&(i=1006),void 0===o&&(o=1008),void 0===a&&(a=1023),void 0===s&&(s=1009),void 0===l&&(l=1),void 0===c&&(c=3e3),Object.defineProperty(this,"id",{value:w++}),this.uuid=g.generateUUID(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=s,this.offset=new v(0,0),this.repeat=new v(1,1),this.center=new v(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new y,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.version=0,this.onUpdate=null}function _(e){return"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?b.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}x.DEFAULT_IMAGE=void 0,x.DEFAULT_MAPPING=300,x.prototype=Object.assign(Object.create(h.prototype),{constructor:x,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=g.generateUUID()),!t&&void 0===e.images[r.uuid]){var i;if(Array.isArray(r)){i=[];for(var o=0,a=r.length;o<a;o++)r[o].isDataTexture?i.push(_(r[o].image)):i.push(_(r[o]))}else i=_(r);e.images[r.uuid]={uuid:r.uuid,url:i}}n.image=r.uuid}return t||(e.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}}),Object.defineProperty(x.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}});var E=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),Object.defineProperty(this,"isVector4",{value:!0}),this.x=e,this.y=t,this.z=n,this.w=r}var t=e.prototype;return t.set=function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},t.setScalar=function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.setZ=function(e){return this.z=e,this},t.setW=function(e){return this.w=e,this},t.setComponent=function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},t.getComponent=function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},t.clone=function(){return new this.constructor(this.x,this.y,this.z,this.w)},t.copy=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},t.add=function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},t.addScalar=function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},t.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},t.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},t.sub=function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},t.subScalar=function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},t.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},t.multiply=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},t.applyMatrix4=function(e){var t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.setAxisAngleFromQuaternion=function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},t.setAxisAngleFromRotationMatrix=function(e){var t,n,r,i,o=e.elements,a=o[0],s=o[4],l=o[8],c=o[1],u=o[5],h=o[9],d=o[2],f=o[6],p=o[10];if(Math.abs(s-c)<.01&&Math.abs(l-d)<.01&&Math.abs(h-f)<.01){if(Math.abs(s+c)<.1&&Math.abs(l+d)<.1&&Math.abs(h+f)<.1&&Math.abs(a+u+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(a+1)/2,g=(u+1)/2,v=(p+1)/2,y=(s+c)/4,b=(l+d)/4,w=(h+f)/4;return m>g&&m>v?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):g>v?g<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(g)),i=w/r):v<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(v)),r=w/i),this.set(n,r,i,t),this}var x=Math.sqrt((f-h)*(f-h)+(l-d)*(l-d)+(c-s)*(c-s));return Math.abs(x)<.001&&(x=1),this.x=(f-h)/x,this.y=(l-d)/x,this.z=(c-s)/x,this.w=Math.acos((a+u+p-1)/2),this},t.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},t.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},t.clamp=function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},t.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},t.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},t.roundToZero=function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},t.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},t.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},t.lengthSq=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this},t.equals=function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},t.fromArray=function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},t.fromBufferAttribute=function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this},a(e,[{key:"width",get:function(){return this.z},set:function(e){this.z=e}},{key:"height",get:function(){return this.w},set:function(e){this.w=e}}]),e}(),A=function(e){function t(t,n,r){var i;return i=e.call(this)||this,Object.defineProperty(l(i),"isWebGLRenderTarget",{value:!0}),i.width=t,i.height=n,i.scissor=new E(0,0,t,n),i.scissorTest=!1,i.viewport=new E(0,0,t,n),r=r||{},i.texture=new x(void 0,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),i.texture.image={},i.texture.image.width=t,i.texture.image.height=n,i.texture.generateMipmaps=void 0!==r.generateMipmaps&&r.generateMipmaps,i.texture.minFilter=void 0!==r.minFilter?r.minFilter:1006,i.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,i.stencilBuffer=void 0!==r.stencilBuffer&&r.stencilBuffer,i.depthTexture=void 0!==r.depthTexture?r.depthTexture:null,i}s(t,e);var n=t.prototype;return n.setSize=function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.texture.image.width=e,this.texture.image.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},n.clone=function(){return(new this.constructor).copy(this)},n.copy=function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},n.dispose=function(){this.dispatchEvent({type:"dispose"})},t}(h),S=function(e){function t(t,n,r){var i;return i=e.call(this,t,n,r)||this,Object.defineProperty(l(i),"isWebGLMultisampleRenderTarget",{value:!0}),i.samples=4,i}return s(t,e),t.prototype.copy=function(t){return e.prototype.copy.call(this,t),this.samples=t.samples,this},t}(A),M=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),Object.defineProperty(this,"isQuaternion",{value:!0}),this._x=e,this._y=t,this._z=n,this._w=r}e.slerp=function(e,t,n,r){return n.copy(e).slerp(t,r)},e.slerpFlat=function(e,t,n,r,i,o,a){var s=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3],h=i[o+0],d=i[o+1],f=i[o+2],p=i[o+3];if(u!==p||s!==h||l!==d||c!==f){var m=1-a,g=s*h+l*d+c*f+u*p,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var b=Math.sqrt(y),w=Math.atan2(b,g*v);m=Math.sin(m*w)/b,a=Math.sin(a*w)/b}var x=a*v;if(s=s*m+h*x,l=l*m+d*x,c=c*m+f*x,u=u*m+p*x,m===1-a){var _=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=_,l*=_,c*=_,u*=_}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=u},e.multiplyQuaternionsFlat=function(e,t,n,r,i,o){var a=n[r],s=n[r+1],l=n[r+2],c=n[r+3],u=i[o],h=i[o+1],d=i[o+2],f=i[o+3];return e[t]=a*f+c*u+s*d-l*h,e[t+1]=s*f+c*h+l*u-a*d,e[t+2]=l*f+c*d+a*h-s*u,e[t+3]=c*f-a*u-s*h-l*d,e};var t=e.prototype;return t.set=function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},t.clone=function(){return new this.constructor(this._x,this._y,this._z,this._w)},t.copy=function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},t.setFromEuler=function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,l=a(n/2),c=a(r/2),u=a(i/2),h=s(n/2),d=s(r/2),f=s(i/2);switch(o){case"XYZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"YXZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"ZXY":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"ZYX":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"YZX":this._x=h*c*u+l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u-h*d*f;break;case"XZY":this._x=h*c*u-l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this},t.setFromAxisAngle=function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this},t.setFromRotationMatrix=function(e){var t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],l=t[2],c=t[6],u=t[10],h=n+a+u;if(h>0){var d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(c-s)*d,this._y=(i-l)*d,this._z=(o-r)*d}else if(n>a&&n>u){var f=2*Math.sqrt(1+n-a-u);this._w=(c-s)/f,this._x=.25*f,this._y=(r+o)/f,this._z=(i+l)/f}else if(a>u){var p=2*Math.sqrt(1+a-n-u);this._w=(i-l)/p,this._x=(r+o)/p,this._y=.25*p,this._z=(s+c)/p}else{var m=2*Math.sqrt(1+u-n-a);this._w=(o-r)/m,this._x=(i+l)/m,this._y=(s+c)/m,this._z=.25*m}return this._onChangeCallback(),this},t.setFromUnitVectors=function(e,t){var n=e.dot(t)+1;return n<1e-6?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()},t.angleTo=function(e){return 2*Math.acos(Math.abs(g.clamp(this.dot(e),-1,1)))},t.rotateTowards=function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this},t.identity=function(){return this.set(0,0,0,1)},t.invert=function(){return this.conjugate()},t.conjugate=function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},t.dot=function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},t.lengthSq=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},t.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},t.normalize=function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},t.multiply=function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},t.premultiply=function(e){return this.multiplyQuaternions(e,this)},t.multiplyQuaternions=function(e,t){var n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,l=t._z,c=t._w;return this._x=n*c+o*a+r*l-i*s,this._y=r*c+o*s+i*a-n*l,this._z=i*c+o*l+n*s-r*a,this._w=o*c-n*a-r*s-i*l,this._onChangeCallback(),this},t.slerp=function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=1-a*a;if(s<=Number.EPSILON){var l=1-t;return this._w=l*o+t*this._w,this._x=l*n+t*this._x,this._y=l*r+t*this._y,this._z=l*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var c=Math.sqrt(s),u=Math.atan2(c,a),h=Math.sin((1-t)*u)/c,d=Math.sin(t*u)/c;return this._w=o*h+this._w*d,this._x=n*h+this._x*d,this._y=r*h+this._y*d,this._z=i*h+this._z*d,this._onChangeCallback(),this},t.equals=function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},t.fromArray=function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},t.fromBufferAttribute=function(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this},t._onChange=function(e){return this._onChangeCallback=e,this},t._onChangeCallback=function(){},a(e,[{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"w",get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}]),e}(),T=function(){function e(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),Object.defineProperty(this,"isVector3",{value:!0}),this.x=e,this.y=t,this.z=n}var t=e.prototype;return t.set=function(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this},t.setScalar=function(e){return this.x=e,this.y=e,this.z=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.setZ=function(e){return this.z=e,this},t.setComponent=function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},t.getComponent=function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},t.clone=function(){return new this.constructor(this.x,this.y,this.z)},t.copy=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},t.add=function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},t.addScalar=function(e){return this.x+=e,this.y+=e,this.z+=e,this},t.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},t.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},t.sub=function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},t.subScalar=function(e){return this.x-=e,this.y-=e,this.z-=e,this},t.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},t.multiply=function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this.z*=e,this},t.multiplyVectors=function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},t.applyEuler=function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(O.setFromEuler(e))},t.applyAxisAngle=function(e,t){return this.applyQuaternion(O.setFromAxisAngle(e,t))},t.applyMatrix3=function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},t.applyNormalMatrix=function(e){return this.applyMatrix3(e).normalize()},t.applyMatrix4=function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this},t.applyQuaternion=function(e){var t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this},t.project=function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},t.unproject=function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},t.transformDirection=function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},t.divide=function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},t.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},t.clamp=function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},t.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},t.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},t.roundToZero=function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},t.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},t.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z},t.lengthSq=function(){return this.x*this.x+this.y*this.y+this.z*this.z},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this},t.cross=function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},t.crossVectors=function(e,t){var n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},t.projectOnVector=function(e){var t=e.lengthSq();if(0===t)return this.set(0,0,0);var n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)},t.projectOnPlane=function(e){return C.copy(this).projectOnVector(e),this.sub(C)},t.reflect=function(e){return this.sub(C.copy(e).multiplyScalar(2*this.dot(e)))},t.angleTo=function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;var n=this.dot(e)/t;return Math.acos(g.clamp(n,-1,1))},t.distanceTo=function(e){return Math.sqrt(this.distanceToSquared(e))},t.distanceToSquared=function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},t.manhattanDistanceTo=function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},t.setFromSpherical=function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},t.setFromSphericalCoords=function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},t.setFromCylindrical=function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},t.setFromCylindricalCoords=function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},t.setFromMatrixPosition=function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},t.setFromMatrixScale=function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},t.setFromMatrixColumn=function(e,t){return this.fromArray(e.elements,4*t)},t.setFromMatrix3Column=function(e,t){return this.fromArray(e.elements,3*t)},t.equals=function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},t.fromArray=function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},t.fromBufferAttribute=function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this},e}(),C=new T,O=new M,R=function(){function e(e,t){Object.defineProperty(this,"isBox3",{value:!0}),this.min=void 0!==e?e:new T(1/0,1/0,1/0),this.max=void 0!==t?t:new T(-1/0,-1/0,-1/0)}var t=e.prototype;return t.set=function(e,t){return this.min.copy(e),this.max.copy(t),this},t.setFromArray=function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,l=e.length;s<l;s+=3){var c=e[s],u=e[s+1],h=e[s+2];c<t&&(t=c),u<n&&(n=u),h<r&&(r=h),c>i&&(i=c),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},t.setFromBufferAttribute=function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,l=e.count;s<l;s++){var c=e.getX(s),u=e.getY(s),h=e.getZ(s);c<t&&(t=c),u<n&&(n=u),h<r&&(r=h),c>i&&(i=c),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},t.setFromPoints=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},t.setFromCenterAndSize=function(e,t){var n=L.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this},t.setFromObject=function(e){return this.makeEmpty(),this.expandByObject(e)},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.min.copy(e.min),this.max.copy(e.max),this},t.makeEmpty=function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},t.isEmpty=function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new T),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},t.getSize=function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new T),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},t.expandByPoint=function(e){return this.min.min(e),this.max.max(e),this},t.expandByVector=function(e){return this.min.sub(e),this.max.add(e),this},t.expandByScalar=function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},t.expandByObject=function(e){e.updateWorldMatrix(!1,!1);var t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),D.copy(t.boundingBox),D.applyMatrix4(e.matrixWorld),this.union(D));for(var n=e.children,r=0,i=n.length;r<i;r++)this.expandByObject(n[r]);return this},t.containsPoint=function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},t.containsBox=function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},t.getParameter=function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new T),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},t.intersectsBox=function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},t.intersectsSphere=function(e){return this.clampPoint(e.center,L),L.distanceToSquared(e.center)<=e.radius*e.radius},t.intersectsPlane=function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant},t.intersectsTriangle=function(e){if(this.isEmpty())return!1;this.getCenter(H),U.subVectors(this.max,H),I.subVectors(e.a,H),N.subVectors(e.b,H),j.subVectors(e.c,H),B.subVectors(N,I),F.subVectors(j,N),z.subVectors(I,j);var t=[0,-B.z,B.y,0,-F.z,F.y,0,-z.z,z.y,B.z,0,-B.x,F.z,0,-F.x,z.z,0,-z.x,-B.y,B.x,0,-F.y,F.x,0,-z.y,z.x,0];return!!k(t,I,N,j,U)&&!!k(t=[1,0,0,0,1,0,0,0,1],I,N,j,U)&&(V.crossVectors(B,F),k(t=[V.x,V.y,V.z],I,N,j,U))},t.clampPoint=function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new T),t.copy(e).clamp(this.min,this.max)},t.distanceToPoint=function(e){return L.copy(e).clamp(this.min,this.max).sub(e).length()},t.getBoundingSphere=function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(L).length(),e},t.intersect=function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},t.union=function(e){return this.min.min(e.min),this.max.max(e.max),this},t.applyMatrix4=function(e){return this.isEmpty()||(P[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),P[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),P[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),P[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),P[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),P[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),P[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),P[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(P)),this},t.translate=function(e){return this.min.add(e),this.max.add(e),this},t.equals=function(e){return e.min.equals(this.min)&&e.max.equals(this.max)},e}();function k(e,t,n,r,i){for(var o=0,a=e.length-3;o<=a;o+=3){G.fromArray(e,o);var s=i.x*Math.abs(G.x)+i.y*Math.abs(G.y)+i.z*Math.abs(G.z),l=t.dot(G),c=n.dot(G),u=r.dot(G);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>s)return!1}return!0}var P=[new T,new T,new T,new T,new T,new T,new T,new T],L=new T,D=new R,I=new T,N=new T,j=new T,B=new T,F=new T,z=new T,H=new T,U=new T,V=new T,G=new T,W=new R,q=function(){function e(e,t){this.center=void 0!==e?e:new T,this.radius=void 0!==t?t:-1}var t=e.prototype;return t.set=function(e,t){return this.center.copy(e),this.radius=t,this},t.setFromPoints=function(e,t){var n=this.center;void 0!==t?n.copy(t):W.setFromPoints(e).getCenter(n);for(var r=0,i=0,o=e.length;i<o;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.center.copy(e.center),this.radius=e.radius,this},t.isEmpty=function(){return this.radius<0},t.makeEmpty=function(){return this.center.set(0,0,0),this.radius=-1,this},t.containsPoint=function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},t.distanceToPoint=function(e){return e.distanceTo(this.center)-this.radius},t.intersectsSphere=function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},t.intersectsBox=function(e){return e.intersectsSphere(this)},t.intersectsPlane=function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},t.clampPoint=function(e,t){var n=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new T),t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},t.getBoundingBox=function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new R),this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)},t.applyMatrix4=function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},t.translate=function(e){return this.center.add(e),this},t.equals=function(e){return e.center.equals(this.center)&&e.radius===this.radius},e}(),X=new T,Y=new T,K=new T,Q=new T,Z=new T,J=new T,$=new T,ee=function(){function e(e,t){this.origin=void 0!==e?e:new T,this.direction=void 0!==t?t:new T(0,0,-1)}var t=e.prototype;return t.set=function(e,t){return this.origin.copy(e),this.direction.copy(t),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},t.at=function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new T),t.copy(this.direction).multiplyScalar(e).add(this.origin)},t.lookAt=function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},t.recast=function(e){return this.origin.copy(this.at(e,X)),this},t.closestPointToPoint=function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new T),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},t.distanceToPoint=function(e){return Math.sqrt(this.distanceSqToPoint(e))},t.distanceSqToPoint=function(e){var t=X.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(X.copy(this.direction).multiplyScalar(t).add(this.origin),X.distanceToSquared(e))},t.distanceSqToSegment=function(e,t,n,r){Y.copy(e).add(t).multiplyScalar(.5),K.copy(t).sub(e).normalize(),Q.copy(this.origin).sub(Y);var i,o,a,s,l=.5*e.distanceTo(t),c=-this.direction.dot(K),u=Q.dot(this.direction),h=-Q.dot(K),d=Q.lengthSq(),f=Math.abs(1-c*c);if(f>0)if(o=c*u-h,s=l*f,(i=c*h-u)>=0)if(o>=-s)if(o<=s){var p=1/f;a=(i*=p)*(i+c*(o*=p)+2*u)+o*(c*i+o+2*h)+d}else o=l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;else o=-l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;else o<=-s?a=-(i=Math.max(0,-(-c*l+u)))*i+(o=i>0?-l:Math.min(Math.max(-l,-h),l))*(o+2*h)+d:o<=s?(i=0,a=(o=Math.min(Math.max(-l,-h),l))*(o+2*h)+d):a=-(i=Math.max(0,-(c*l+u)))*i+(o=i>0?l:Math.min(Math.max(-l,-h),l))*(o+2*h)+d;else o=c>0?-l:l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(K).multiplyScalar(o).add(Y),a},t.intersectSphere=function(e,t){X.subVectors(e.center,this.origin);var n=X.dot(this.direction),r=X.dot(X)-n*n,i=e.radius*e.radius;if(r>i)return null;var o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)},t.intersectsSphere=function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},t.distanceToPlane=function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},t.intersectPlane=function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},t.intersectsPlane=function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},t.intersectBox=function(e,t){var n,r,i,o,a,s,l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),c>=0?(i=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(i=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),u>=0?(a=(e.min.z-h.z)*u,s=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,s=(e.min.z-h.z)*u),n>s||a>r?null:((a>n||n!==n)&&(n=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))},t.intersectsBox=function(e){return null!==this.intersectBox(e,X)},t.intersectTriangle=function(e,t,n,r,i){Z.subVectors(t,e),J.subVectors(n,e),$.crossVectors(Z,J);var o,a=this.direction.dot($);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}Q.subVectors(this.origin,e);var s=o*this.direction.dot(J.crossVectors(Q,J));if(s<0)return null;var l=o*this.direction.dot(Z.cross(Q));if(l<0)return null;if(s+l>a)return null;var c=-o*Q.dot($);return c<0?null:this.at(c/a,i)},t.applyMatrix4=function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},t.equals=function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)},e}(),te=function(){function e(){Object.defineProperty(this,"isMatrix4",{value:!0}),this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}var t=e.prototype;return t.set=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,m){var g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this},t.identity=function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},t.clone=function(){return(new e).fromArray(this.elements)},t.copy=function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},t.copyPosition=function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},t.setFromMatrix3=function(e){var t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this},t.extractBasis=function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},t.makeBasis=function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},t.extractRotation=function(e){var t=this.elements,n=e.elements,r=1/ne.setFromMatrixColumn(e,0).length(),i=1/ne.setFromMatrixColumn(e,1).length(),o=1/ne.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},t.makeRotationFromEuler=function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){var h=o*c,d=o*u,f=a*c,p=a*u;t[0]=s*c,t[4]=-s*u,t[8]=l,t[1]=d+f*l,t[5]=h-p*l,t[9]=-a*s,t[2]=p-h*l,t[6]=f+d*l,t[10]=o*s}else if("YXZ"===e.order){var m=s*c,g=s*u,v=l*c,y=l*u;t[0]=m+y*a,t[4]=v*a-g,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-a,t[2]=g*a-v,t[6]=y+m*a,t[10]=o*s}else if("ZXY"===e.order){var b=s*c,w=s*u,x=l*c,_=l*u;t[0]=b-_*a,t[4]=-o*u,t[8]=x+w*a,t[1]=w+x*a,t[5]=o*c,t[9]=_-b*a,t[2]=-o*l,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){var E=o*c,A=o*u,S=a*c,M=a*u;t[0]=s*c,t[4]=S*l-A,t[8]=E*l+M,t[1]=s*u,t[5]=M*l+E,t[9]=A*l-S,t[2]=-l,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){var T=o*s,C=o*l,O=a*s,R=a*l;t[0]=s*c,t[4]=R-T*u,t[8]=O*u+C,t[1]=u,t[5]=o*c,t[9]=-a*c,t[2]=-l*c,t[6]=C*u+O,t[10]=T-R*u}else if("XZY"===e.order){var k=o*s,P=o*l,L=a*s,D=a*l;t[0]=s*c,t[4]=-u,t[8]=l*c,t[1]=k*u+D,t[5]=o*c,t[9]=P*u-L,t[2]=L*u-P,t[6]=a*c,t[10]=D*u+k}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},t.makeRotationFromQuaternion=function(e){return this.compose(ie,e,oe)},t.lookAt=function(e,t,n){var r=this.elements;return le.subVectors(e,t),0===le.lengthSq()&&(le.z=1),le.normalize(),ae.crossVectors(n,le),0===ae.lengthSq()&&(1===Math.abs(n.z)?le.x+=1e-4:le.z+=1e-4,le.normalize(),ae.crossVectors(n,le)),ae.normalize(),se.crossVectors(le,ae),r[0]=ae.x,r[4]=se.x,r[8]=le.x,r[1]=ae.y,r[5]=se.y,r[9]=le.y,r[2]=ae.z,r[6]=se.z,r[10]=le.z,this},t.multiply=function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},t.premultiply=function(e){return this.multiplyMatrices(e,this)},t.multiplyMatrices=function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],l=n[12],c=n[1],u=n[5],h=n[9],d=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],w=n[15],x=r[0],_=r[4],E=r[8],A=r[12],S=r[1],M=r[5],T=r[9],C=r[13],O=r[2],R=r[6],k=r[10],P=r[14],L=r[3],D=r[7],I=r[11],N=r[15];return i[0]=o*x+a*S+s*O+l*L,i[4]=o*_+a*M+s*R+l*D,i[8]=o*E+a*T+s*k+l*I,i[12]=o*A+a*C+s*P+l*N,i[1]=c*x+u*S+h*O+d*L,i[5]=c*_+u*M+h*R+d*D,i[9]=c*E+u*T+h*k+d*I,i[13]=c*A+u*C+h*P+d*N,i[2]=f*x+p*S+m*O+g*L,i[6]=f*_+p*M+m*R+g*D,i[10]=f*E+p*T+m*k+g*I,i[14]=f*A+p*C+m*P+g*N,i[3]=v*x+y*S+b*O+w*L,i[7]=v*_+y*M+b*R+w*D,i[11]=v*E+y*T+b*k+w*I,i[15]=v*A+y*C+b*P+w*N,this},t.multiplyScalar=function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},t.determinant=function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],l=e[13],c=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*s*u-r*l*u-i*a*h+n*l*h+r*a*d-n*s*d)+e[7]*(+t*s*d-t*l*h+i*o*h-r*o*d+r*l*c-i*s*c)+e[11]*(+t*l*u-t*a*d-i*o*u+n*o*d+i*a*c-n*l*c)+e[15]*(-r*a*c-t*s*u+t*a*h+r*o*u-n*o*h+n*s*c)},t.transpose=function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},t.setPosition=function(e,t,n){var r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this},t.invert=function(){var e=this.elements,t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i,this},t.getMaxScaleOnAxis=function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))},t.makeTranslation=function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},t.makeRotationX=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this},t.makeRotationY=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this},t.makeRotationZ=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this},t.makeRotationAxis=function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,l=i*o,c=i*a;return this.set(l*o+n,l*a-r*s,l*s+r*a,0,l*a+r*s,c*a+n,c*s-r*o,0,l*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this},t.makeScale=function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},t.makeShear=function(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this},t.compose=function(e,t,n){var r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,l=i+i,c=o+o,u=a+a,h=i*l,d=i*c,f=i*u,p=o*c,m=o*u,g=a*u,v=s*l,y=s*c,b=s*u,w=n.x,x=n.y,_=n.z;return r[0]=(1-(p+g))*w,r[1]=(d+b)*w,r[2]=(f-y)*w,r[3]=0,r[4]=(d-b)*x,r[5]=(1-(h+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*_,r[9]=(m-v)*_,r[10]=(1-(h+p))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this},t.decompose=function(e,t,n){var r=this.elements,i=ne.set(r[0],r[1],r[2]).length(),o=ne.set(r[4],r[5],r[6]).length(),a=ne.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],re.copy(this);var s=1/i,l=1/o,c=1/a;return re.elements[0]*=s,re.elements[1]*=s,re.elements[2]*=s,re.elements[4]*=l,re.elements[5]*=l,re.elements[6]*=l,re.elements[8]*=c,re.elements[9]*=c,re.elements[10]*=c,t.setFromRotationMatrix(re),n.x=i,n.y=o,n.z=a,this},t.makePerspective=function(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),u=(n+r)/(n-r),h=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},t.makeOrthographic=function(e,t,n,r,i,o){var a=this.elements,s=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*s,h=(n+r)*l,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},t.equals=function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},t.toArray=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e},e}(),ne=new T,re=new te,ie=new T(0,0,0),oe=new T(1,1,1),ae=new T,se=new T,le=new T,ce=function(){function e(t,n,r,i){void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=e.DefaultOrder),Object.defineProperty(this,"isEuler",{value:!0}),this._x=t,this._y=n,this._z=r,this._order=i}var t=e.prototype;return t.set=function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this._onChangeCallback(),this},t.clone=function(){return new this.constructor(this._x,this._y,this._z,this._order)},t.copy=function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this},t.setFromRotationMatrix=function(e,t,n){var r=g.clamp,i=e.elements,o=i[0],a=i[4],s=i[8],l=i[1],c=i[5],u=i[9],h=i[2],d=i[6],f=i[10];switch(t=t||this._order){case"XYZ":this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-r(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(r(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-h,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(r(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,f));break;case"XZY":this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!1!==n&&this._onChangeCallback(),this},t.setFromQuaternion=function(e,t,n){return ue.makeRotationFromQuaternion(e),this.setFromRotationMatrix(ue,t,n)},t.setFromVector3=function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},t.reorder=function(e){return he.setFromEuler(this),this.setFromQuaternion(he,e)},t.equals=function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},t.fromArray=function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},t.toVector3=function(e){return e?e.set(this._x,this._y,this._z):new T(this._x,this._y,this._z)},t._onChange=function(e){return this._onChangeCallback=e,this},t._onChangeCallback=function(){},a(e,[{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()}}]),e}();ce.DefaultOrder="XYZ",ce.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var ue=new te,he=new M,de=function(){function e(){this.mask=1}var t=e.prototype;return t.set=function(e){this.mask=1<<e|0},t.enable=function(e){this.mask|=1<<e|0},t.enableAll=function(){this.mask=-1},t.toggle=function(e){this.mask^=1<<e|0},t.disable=function(e){this.mask&=~(1<<e|0)},t.disableAll=function(){this.mask=0},t.test=function(e){return 0!==(this.mask&e.mask)},e}(),fe=0,pe=new T,me=new M,ge=new te,ve=new T,ye=new T,be=new T,we=new M,xe=new T(1,0,0),_e=new T(0,1,0),Ee=new T(0,0,1),Ae={type:"added"},Se={type:"removed"};function Me(){Object.defineProperty(this,"id",{value:fe++}),this.uuid=g.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Me.DefaultUp.clone();var e=new T,t=new ce,n=new M,r=new T(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new te},normalMatrix:{value:new y}}),this.matrix=new te,this.matrixWorld=new te,this.matrixAutoUpdate=Me.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new de,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}Me.DefaultUp=new T(0,1,0),Me.DefaultMatrixAutoUpdate=!0,Me.prototype=Object.assign(Object.create(h.prototype),{constructor:Me,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:function(e,t){return me.setFromAxisAngle(e,t),this.quaternion.multiply(me),this},rotateOnWorldAxis:function(e,t){return me.setFromAxisAngle(e,t),this.quaternion.premultiply(me),this},rotateX:function(e){return this.rotateOnAxis(xe,e)},rotateY:function(e){return this.rotateOnAxis(_e,e)},rotateZ:function(e){return this.rotateOnAxis(Ee,e)},translateOnAxis:function(e,t){return pe.copy(e).applyQuaternion(this.quaternion),this.position.add(pe.multiplyScalar(t)),this},translateX:function(e){return this.translateOnAxis(xe,e)},translateY:function(e){return this.translateOnAxis(_e,e)},translateZ:function(e){return this.translateOnAxis(Ee,e)},localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(e){return e.applyMatrix4(ge.copy(this.matrixWorld).invert())},lookAt:function(e,t,n){e.isVector3?ve.copy(e):ve.set(e,t,n);var r=this.parent;this.updateWorldMatrix(!0,!1),ye.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ge.lookAt(ye,ve,this.up):ge.lookAt(ve,ye,this.up),this.quaternion.setFromRotationMatrix(ge),r&&(ge.extractRotation(r.matrixWorld),me.setFromRotationMatrix(ge),this.quaternion.premultiply(me.invert()))},add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(Ae)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var n=this.children.indexOf(e);return-1!==n&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(Se)),this},clear:function(){for(var e=0;e<this.children.length;e++){var t=this.children[e];t.parent=null,t.dispatchEvent(Se)}return this.children.length=0,this},attach:function(e){return this.updateWorldMatrix(!0,!1),ge.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),ge.multiply(e.parent.matrixWorld)),e.applyMatrix4(ge),e.updateWorldMatrix(!1,!1),this.add(e),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new T),this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new M),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ye,e,be),e},getWorldScale:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new T),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ye,we,e),e},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new T),this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()},raycast:function(){},traverse:function(e){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)},updateWorldMatrix:function(e,t){var n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t)for(var r=this.children,i=0,o=r.length;i<o;i++)r[i].updateWorldMatrix(!1,!0)},toJSON:function(e){var t=void 0===e||"string"===typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON()),this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,l=a.length;s<l;s++){var c=a[s];i(e.shapes,c)}else i(e.shapes,a)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){for(var u=[],h=0,d=this.material.length;h<d;h++)u.push(i(e.materials,this.material[h]));r.material=u}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(var f=0;f<this.children.length;f++)r.children.push(this.children[f].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(var p=0;p<this.animations.length;p++){var m=this.animations[p];r.animations.push(i(e.animations,m))}}if(t){var g=E(e.geometries),v=E(e.materials),y=E(e.textures),b=E(e.images),w=E(e.shapes),x=E(e.skeletons),_=E(e.animations);g.length>0&&(n.geometries=g),v.length>0&&(n.materials=v),y.length>0&&(n.textures=y),b.length>0&&(n.images=b),w.length>0&&(n.shapes=w),x.length>0&&(n.skeletons=x),_.length>0&&(n.animations=_)}return n.object=r,n;function E(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;n<e.children.length;n++){var r=e.children[n];this.add(r.clone())}return this}});var Te=new T,Ce=new T,Oe=new y,Re=function(){function e(e,t){Object.defineProperty(this,"isPlane",{value:!0}),this.normal=void 0!==e?e:new T(1,0,0),this.constant=void 0!==t?t:0}var t=e.prototype;return t.set=function(e,t){return this.normal.copy(e),this.constant=t,this},t.setComponents=function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},t.setFromNormalAndCoplanarPoint=function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},t.setFromCoplanarPoints=function(e,t,n){var r=Te.subVectors(n,t).cross(Ce.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},t.normalize=function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},t.negate=function(){return this.constant*=-1,this.normal.negate(),this},t.distanceToPoint=function(e){return this.normal.dot(e)+this.constant},t.distanceToSphere=function(e){return this.distanceToPoint(e.center)-e.radius},t.projectPoint=function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new T),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},t.intersectLine=function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new T);var n=e.delta(Te),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?void 0:t.copy(n).multiplyScalar(i).add(e.start)},t.intersectsLine=function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},t.intersectsBox=function(e){return e.intersectsPlane(this)},t.intersectsSphere=function(e){return e.intersectsPlane(this)},t.coplanarPoint=function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new T),e.copy(this.normal).multiplyScalar(-this.constant)},t.applyMatrix4=function(e,t){var n=t||Oe.getNormalMatrix(e),r=this.coplanarPoint(Te).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this},t.translate=function(e){return this.constant-=e.dot(this.normal),this},t.equals=function(e){return e.normal.equals(this.normal)&&e.constant===this.constant},e}(),ke=new T,Pe=new T,Le=new T,De=new T,Ie=new T,Ne=new T,je=new T,Be=new T,Fe=new T,ze=new T,He=function(){function e(e,t,n){this.a=void 0!==e?e:new T,this.b=void 0!==t?t:new T,this.c=void 0!==n?n:new T}e.getNormal=function(e,t,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new T),r.subVectors(n,t),ke.subVectors(e,t),r.cross(ke);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)},e.getBarycoord=function(e,t,n,r,i){ke.subVectors(r,t),Pe.subVectors(n,t),Le.subVectors(e,t);var o=ke.dot(ke),a=ke.dot(Pe),s=ke.dot(Le),l=Pe.dot(Pe),c=Pe.dot(Le),u=o*l-a*a;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new T),0===u)return i.set(-2,-1,-1);var h=1/u,d=(l*s-a*c)*h,f=(o*c-a*s)*h;return i.set(1-d-f,f,d)},e.containsPoint=function(e,t,n,r){return this.getBarycoord(e,t,n,r,De),De.x>=0&&De.y>=0&&De.x+De.y<=1},e.getUV=function(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,De),s.set(0,0),s.addScaledVector(i,De.x),s.addScaledVector(o,De.y),s.addScaledVector(a,De.z),s},e.isFrontFacing=function(e,t,n,r){return ke.subVectors(n,t),Pe.subVectors(e,t),ke.cross(Pe).dot(r)<0};var t=e.prototype;return t.set=function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},t.setFromPointsAndIndices=function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},t.getArea=function(){return ke.subVectors(this.c,this.b),Pe.subVectors(this.a,this.b),.5*ke.cross(Pe).length()},t.getMidpoint=function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new T),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},t.getNormal=function(t){return e.getNormal(this.a,this.b,this.c,t)},t.getPlane=function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new Re),e.setFromCoplanarPoints(this.a,this.b,this.c)},t.getBarycoord=function(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)},t.getUV=function(t,n,r,i,o){return e.getUV(t,this.a,this.b,this.c,n,r,i,o)},t.containsPoint=function(t){return e.containsPoint(t,this.a,this.b,this.c)},t.isFrontFacing=function(t){return e.isFrontFacing(this.a,this.b,this.c,t)},t.intersectsBox=function(e){return e.intersectsTriangle(this)},t.closestPointToPoint=function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new T);var n,r,i=this.a,o=this.b,a=this.c;Ie.subVectors(o,i),Ne.subVectors(a,i),Be.subVectors(e,i);var s=Ie.dot(Be),l=Ne.dot(Be);if(s<=0&&l<=0)return t.copy(i);Fe.subVectors(e,o);var c=Ie.dot(Fe),u=Ne.dot(Fe);if(c>=0&&u<=c)return t.copy(o);var h=s*u-c*l;if(h<=0&&s>=0&&c<=0)return n=s/(s-c),t.copy(i).addScaledVector(Ie,n);ze.subVectors(e,a);var d=Ie.dot(ze),f=Ne.dot(ze);if(f>=0&&d<=f)return t.copy(a);var p=d*l-s*f;if(p<=0&&l>=0&&f<=0)return r=l/(l-f),t.copy(i).addScaledVector(Ne,r);var m=c*f-d*u;if(m<=0&&u-c>=0&&d-f>=0)return je.subVectors(a,o),r=(u-c)/(u-c+(d-f)),t.copy(o).addScaledVector(je,r);var g=1/(m+p+h);return n=p*g,r=h*g,t.copy(i).addScaledVector(Ie,n).addScaledVector(Ne,r)},t.equals=function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)},e}(),Ue={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ve={h:0,s:0,l:0},Ge={h:0,s:0,l:0};function We(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function qe(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Xe(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}var Ye=function(){function e(e,t,n){return Object.defineProperty(this,"isColor",{value:!0}),void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}var t=e.prototype;return t.set=function(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this},t.setScalar=function(e){return this.r=e,this.g=e,this.b=e,this},t.setHex=function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},t.setRGB=function(e,t,n){return this.r=e,this.g=t,this.b=n,this},t.setHSL=function(e,t,n){if(e=g.euclideanModulo(e,1),t=g.clamp(t,0,1),n=g.clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=We(i,r,e+1/3),this.g=We(i,r,e),this.b=We(i,r,e-1/3)}return this},t.setStyle=function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[4]),this;if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[4]),this;break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,l=parseInt(r[3],10)/100;return t(r[4]),this.setHSL(a,s,l)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){var c=n[1],u=c.length;if(3===u)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this},t.setColorName=function(e){var t=Ue[e];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this},t.clone=function(){return new this.constructor(this.r,this.g,this.b)},t.copy=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},t.copyGammaToLinear=function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},t.copyLinearToGamma=function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},t.convertGammaToLinear=function(e){return this.copyGammaToLinear(this,e),this},t.convertLinearToGamma=function(e){return this.copyLinearToGamma(this,e),this},t.copySRGBToLinear=function(e){return this.r=qe(e.r),this.g=qe(e.g),this.b=qe(e.b),this},t.copyLinearToSRGB=function(e){return this.r=Xe(e.r),this.g=Xe(e.g),this.b=Xe(e.b),this},t.convertSRGBToLinear=function(){return this.copySRGBToLinear(this),this},t.convertLinearToSRGB=function(){return this.copyLinearToSRGB(this),this},t.getHex=function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},t.getHexString=function(){return("000000"+this.getHex().toString(16)).slice(-6)},t.getHSL=function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),l=(s+a)/2;if(s===a)t=0,n=0;else{var c=a-s;switch(n=l<=.5?c/(a+s):c/(2-a-s),a){case r:t=(i-o)/c+(i<o?6:0);break;case i:t=(o-r)/c+2;break;case o:t=(r-i)/c+4}t/=6}return e.h=t,e.s=n,e.l=l,e},t.getStyle=function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},t.offsetHSL=function(e,t,n){return this.getHSL(Ve),Ve.h+=e,Ve.s+=t,Ve.l+=n,this.setHSL(Ve.h,Ve.s,Ve.l),this},t.add=function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},t.addColors=function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},t.addScalar=function(e){return this.r+=e,this.g+=e,this.b+=e,this},t.sub=function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},t.multiply=function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},t.multiplyScalar=function(e){return this.r*=e,this.g*=e,this.b*=e,this},t.lerp=function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},t.lerpColors=function(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this},t.lerpHSL=function(e,t){this.getHSL(Ve),e.getHSL(Ge);var n=g.lerp(Ve.h,Ge.h,t),r=g.lerp(Ve.s,Ge.s,t),i=g.lerp(Ve.l,Ge.l,t);return this.setHSL(n,r,i),this},t.equals=function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},t.fromArray=function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},t.fromBufferAttribute=function(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this},t.toJSON=function(){return this.getHex()},e}();Ye.NAMES=Ue,Ye.prototype.r=1,Ye.prototype.g=1,Ye.prototype.b=1;var Ke=function(){function e(e,t,n,r,i,o){void 0===o&&(o=0),this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new T,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new Ye,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=o}var t=e.prototype;return t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,n=e.vertexNormals.length;t<n;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(var r=0,i=e.vertexColors.length;r<i;r++)this.vertexColors[r]=e.vertexColors[r].clone();return this},e}(),Qe=0;function Ze(){Object.defineProperty(this,"id",{value:Qe++}),this.uuid=g.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}function Je(e){Ze.call(this),this.type="MeshBasicMaterial",this.color=new Ye(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.setValues(e)}Ze.prototype=Object.assign(Object.create(h.prototype),{constructor:Ze,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var i=r(e.textures),o=r(e.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Ze.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Je.prototype=Object.create(Ze.prototype),Je.prototype.constructor=Je,Je.prototype.isMeshBasicMaterial=!0,Je.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this};var $e=new T,et=new v;function tt(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}function nt(e,t,n){tt.call(this,new Int8Array(e),t,n)}function rt(e,t,n){tt.call(this,new Uint8Array(e),t,n)}function it(e,t,n){tt.call(this,new Uint8ClampedArray(e),t,n)}function ot(e,t,n){tt.call(this,new Int16Array(e),t,n)}function at(e,t,n){tt.call(this,new Uint16Array(e),t,n)}function st(e,t,n){tt.call(this,new Int32Array(e),t,n)}function lt(e,t,n){tt.call(this,new Uint32Array(e),t,n)}function ct(e,t,n){tt.call(this,new Uint16Array(e),t,n)}function ut(e,t,n){tt.call(this,new Float32Array(e),t,n)}function ht(e,t,n){tt.call(this,new Float64Array(e),t,n)}function dt(e){if(0===e.length)return-1/0;for(var t=e[0],n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}Object.defineProperty(tt.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(tt.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new Ye),t[n++]=o.r,t[n++]=o.g,t[n++]=o.b}return this},copyVector2sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new v),t[n++]=o.x,t[n++]=o.y}return this},copyVector3sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new T),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z}return this},copyVector4sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new E),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z,t[n++]=o.w}return this},applyMatrix3:function(e){if(2===this.itemSize)for(var t=0,n=this.count;t<n;t++)et.fromBufferAttribute(this,t),et.applyMatrix3(e),this.setXY(t,et.x,et.y);else if(3===this.itemSize)for(var r=0,i=this.count;r<i;r++)$e.fromBufferAttribute(this,r),$e.applyMatrix3(e),this.setXYZ(r,$e.x,$e.y,$e.z);return this},applyMatrix4:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.applyMatrix4(e),this.setXYZ(t,$e.x,$e.y,$e.z);return this},applyNormalMatrix:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.applyNormalMatrix(e),this.setXYZ(t,$e.x,$e.y,$e.z);return this},transformDirection:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.transformDirection(e),this.setXYZ(t,$e.x,$e.y,$e.z);return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}}),nt.prototype=Object.create(tt.prototype),nt.prototype.constructor=nt,rt.prototype=Object.create(tt.prototype),rt.prototype.constructor=rt,it.prototype=Object.create(tt.prototype),it.prototype.constructor=it,ot.prototype=Object.create(tt.prototype),ot.prototype.constructor=ot,at.prototype=Object.create(tt.prototype),at.prototype.constructor=at,st.prototype=Object.create(tt.prototype),st.prototype.constructor=st,lt.prototype=Object.create(tt.prototype),lt.prototype.constructor=lt,ct.prototype=Object.create(tt.prototype),ct.prototype.constructor=ct,ct.prototype.isFloat16BufferAttribute=!0,ut.prototype=Object.create(tt.prototype),ut.prototype.constructor=ut,ht.prototype=Object.create(tt.prototype),ht.prototype.constructor=ht;var ft={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!==typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function pt(e,t){return new ft[e](t)}var mt=0,gt=new te,vt=new Me,yt=new T,bt=new R,wt=new R,xt=new T;function _t(){Object.defineProperty(this,"id",{value:mt++}),this.uuid=g.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}_t.prototype=Object.assign(Object.create(h.prototype),{constructor:_t,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){return Array.isArray(e)?this.index=new(dt(e)>65535?lt:at)(e,1):this.index=e,this},getAttribute:function(e){return this.attributes[e]},setAttribute:function(e,t){return this.attributes[e]=t,this},deleteAttribute:function(e){return delete this.attributes[e],this},hasAttribute:function(e){return void 0!==this.attributes[e]},addGroup:function(e,t,n){void 0===n&&(n=0),this.groups.push({start:e,count:t,materialIndex:n})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix4:function(e){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){var r=(new y).getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}var i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(e){return gt.makeRotationX(e),this.applyMatrix4(gt),this},rotateY:function(e){return gt.makeRotationY(e),this.applyMatrix4(gt),this},rotateZ:function(e){return gt.makeRotationZ(e),this.applyMatrix4(gt),this},translate:function(e,t,n){return gt.makeTranslation(e,t,n),this.applyMatrix4(gt),this},scale:function(e,t,n){return gt.makeScale(e,t,n),this.applyMatrix4(gt),this},lookAt:function(e){return vt.lookAt(e),vt.updateMatrix(),this.applyMatrix4(vt.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(yt).negate(),this.translate(yt.x,yt.y,yt.z),this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new ut(t,3)),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new R);var e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new T(-1/0,-1/0,-1/0),new T(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var n=0,r=t.length;n<r;n++){var i=t[n];bt.setFromBufferAttribute(i),this.morphTargetsRelative?(xt.addVectors(this.boundingBox.min,bt.min),this.boundingBox.expandByPoint(xt),xt.addVectors(this.boundingBox.max,bt.max),this.boundingBox.expandByPoint(xt)):(this.boundingBox.expandByPoint(bt.min),this.boundingBox.expandByPoint(bt.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new q);var e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new T,1/0);if(e){var n=this.boundingSphere.center;if(bt.setFromBufferAttribute(e),t)for(var r=0,i=t.length;r<i;r++){var o=t[r];wt.setFromBufferAttribute(o),this.morphTargetsRelative?(xt.addVectors(bt.min,wt.min),bt.expandByPoint(xt),xt.addVectors(bt.max,wt.max),bt.expandByPoint(xt)):(bt.expandByPoint(wt.min),bt.expandByPoint(wt.max))}bt.getCenter(n);for(var a=0,s=0,l=e.count;s<l;s++)xt.fromBufferAttribute(e,s),a=Math.max(a,n.distanceToSquared(xt));if(t)for(var c=0,u=t.length;c<u;c++)for(var h=t[c],d=this.morphTargetsRelative,f=0,p=h.count;f<p;f++)xt.fromBufferAttribute(h,f),d&&(yt.fromBufferAttribute(e,f),xt.add(yt)),a=Math.max(a,n.distanceToSquared(xt));this.boundingSphere.radius=Math.sqrt(a),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeTangents:function(){var e=this.index,t=this.attributes;if(null!==e&&void 0!==t.position&&void 0!==t.normal&&void 0!==t.uv){var n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new tt(new Float32Array(4*a),4));for(var s=t.tangent.array,l=[],c=[],u=0;u<a;u++)l[u]=new T,c[u]=new T;var h=new T,d=new T,f=new T,p=new v,m=new v,g=new v,y=new T,b=new T,w=this.groups;0===w.length&&(w=[{start:0,count:n.length}]);for(var x=0,_=w.length;x<_;++x)for(var E=w[x],A=E.start,S=A,M=A+E.count;S<M;S+=3)B(n[S+0],n[S+1],n[S+2]);for(var C=new T,O=new T,R=new T,k=new T,P=0,L=w.length;P<L;++P)for(var D=w[P],I=D.start,N=I,j=I+D.count;N<j;N+=3)F(n[N+0]),F(n[N+1]),F(n[N+2])}else console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");function B(e,t,n){h.fromArray(r,3*e),d.fromArray(r,3*t),f.fromArray(r,3*n),p.fromArray(o,2*e),m.fromArray(o,2*t),g.fromArray(o,2*n),d.sub(h),f.sub(h),m.sub(p),g.sub(p);var i=1/(m.x*g.y-g.x*m.y);isFinite(i)&&(y.copy(d).multiplyScalar(g.y).addScaledVector(f,-m.y).multiplyScalar(i),b.copy(f).multiplyScalar(m.x).addScaledVector(d,-g.x).multiplyScalar(i),l[e].add(y),l[t].add(y),l[n].add(y),c[e].add(b),c[t].add(b),c[n].add(b))}function F(e){R.fromArray(i,3*e),k.copy(R);var t=l[e];C.copy(t),C.sub(R.multiplyScalar(R.dot(t))).normalize(),O.crossVectors(k,t);var n=O.dot(c[e])<0?-1:1;s[4*e]=C.x,s[4*e+1]=C.y,s[4*e+2]=C.z,s[4*e+3]=n}},computeVertexNormals:function(){var e=this.index,t=this.getAttribute("position");if(void 0!==t){var n=this.getAttribute("normal");if(void 0===n)n=new tt(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(var r=0,i=n.count;r<i;r++)n.setXYZ(r,0,0,0);var o=new T,a=new T,s=new T,l=new T,c=new T,u=new T,h=new T,d=new T;if(e)for(var f=0,p=e.count;f<p;f+=3){var m=e.getX(f+0),g=e.getX(f+1),v=e.getX(f+2);o.fromBufferAttribute(t,m),a.fromBufferAttribute(t,g),s.fromBufferAttribute(t,v),h.subVectors(s,a),d.subVectors(o,a),h.cross(d),l.fromBufferAttribute(n,m),c.fromBufferAttribute(n,g),u.fromBufferAttribute(n,v),l.add(h),c.add(h),u.add(h),n.setXYZ(m,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z),n.setXYZ(v,u.x,u.y,u.z)}else for(var y=0,b=t.count;y<b;y+=3)o.fromBufferAttribute(t,y+0),a.fromBufferAttribute(t,y+1),s.fromBufferAttribute(t,y+2),h.subVectors(s,a),d.subVectors(o,a),h.cross(d),n.setXYZ(y+0,h.x,h.y,h.z),n.setXYZ(y+1,h.x,h.y,h.z),n.setXYZ(y+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==e.attributes[r])for(var i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,l=Math.min(a.length,i.length-s),c=0,u=s;c<l;c++,u++)i[u]=a[c];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){for(var e=this.attributes.normal,t=0,n=e.count;t<n;t++)xt.fromBufferAttribute(e,t),xt.normalize(),e.setXYZ(t,xt.x,xt.y,xt.z)},toNonIndexed:function(){function e(e,t){for(var n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r),a=0,s=0,l=0,c=t.length;l<c;l++){a=t[l]*r;for(var u=0;u<r;u++)o[s++]=n[a++]}return new tt(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;var t=new _t,n=this.index.array,r=this.attributes;for(var i in r){var o=e(r[i],n);t.setAttribute(i,o)}var a=this.morphAttributes;for(var s in a){for(var l=[],c=a[s],u=0,h=c.length;u<h;u++){var d=e(c[u],n);l.push(d)}t.morphAttributes[s]=l}t.morphTargetsRelative=this.morphTargetsRelative;for(var f=this.groups,p=0,m=f.length;p<m;p++){var g=f[p];t.addGroup(g.start,g.count,g.materialIndex)}return t},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;null!==r&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});var i=this.attributes;for(var o in i){var a=i[o],s=a.toJSON(e.data);""!==a.name&&(s.name=a.name),e.data.attributes[o]=s}var l={},c=!1;for(var u in this.morphAttributes){for(var h=this.morphAttributes[u],d=[],f=0,p=h.length;f<p;f++){var m=h[f],g=m.toJSON(e.data);""!==m.name&&(g.name=m.name),d.push(g)}d.length>0&&(l[u]=d,c=!0)}c&&(e.data.morphAttributes=l,e.data.morphTargetsRelative=this.morphTargetsRelative);var v=this.groups;v.length>0&&(e.data.groups=JSON.parse(JSON.stringify(v)));var y=this.boundingSphere;return null!==y&&(e.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),e},clone:function(){return(new _t).copy(this)},copy:function(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;var t={};this.name=e.name;var n=e.index;null!==n&&this.setIndex(n.clone(t));var r=e.attributes;for(var i in r){var o=r[i];this.setAttribute(i,o.clone(t))}var a=e.morphAttributes;for(var s in a){for(var l=[],c=a[s],u=0,h=c.length;u<h;u++)l.push(c[u].clone(t));this.morphAttributes[s]=l}this.morphTargetsRelative=e.morphTargetsRelative;for(var d=e.groups,f=0,p=d.length;f<p;f++){var m=d[f];this.addGroup(m.start,m.count,m.materialIndex)}var g=e.boundingBox;null!==g&&(this.boundingBox=g.clone());var v=e.boundingSphere;return null!==v&&(this.boundingSphere=v.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Et=new te,At=new ee,St=new q,Mt=new T,Tt=new T,Ct=new T,Ot=new T,Rt=new T,kt=new T,Pt=new T,Lt=new T,Dt=new T,It=new v,Nt=new v,jt=new v,Bt=new T,Ft=new T;function zt(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new Je),Me.call(this),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}function Ht(e,t,n,r,i,o,a,s,l,c,u,h){Mt.fromBufferAttribute(i,c),Tt.fromBufferAttribute(i,u),Ct.fromBufferAttribute(i,h);var d=e.morphTargetInfluences;if(t.morphTargets&&o&&d){Pt.set(0,0,0),Lt.set(0,0,0),Dt.set(0,0,0);for(var f=0,p=o.length;f<p;f++){var m=d[f],g=o[f];0!==m&&(Ot.fromBufferAttribute(g,c),Rt.fromBufferAttribute(g,u),kt.fromBufferAttribute(g,h),a?(Pt.addScaledVector(Ot,m),Lt.addScaledVector(Rt,m),Dt.addScaledVector(kt,m)):(Pt.addScaledVector(Ot.sub(Mt),m),Lt.addScaledVector(Rt.sub(Tt),m),Dt.addScaledVector(kt.sub(Ct),m)))}Mt.add(Pt),Tt.add(Lt),Ct.add(Dt)}e.isSkinnedMesh&&(e.boneTransform(c,Mt),e.boneTransform(u,Tt),e.boneTransform(h,Ct));var y=function(e,t,n,r,i,o,a,s){if(null===(1===t.side?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,2!==t.side,s)))return null;Ft.copy(s),Ft.applyMatrix4(e.matrixWorld);var l=n.ray.origin.distanceTo(Ft);return l<n.near||l>n.far?null:{distance:l,point:Ft.clone(),object:e}}(e,t,n,r,Mt,Tt,Ct,Bt);if(y){s&&(It.fromBufferAttribute(s,c),Nt.fromBufferAttribute(s,u),jt.fromBufferAttribute(s,h),y.uv=He.getUV(Bt,Mt,Tt,Ct,It,Nt,jt,new v)),l&&(It.fromBufferAttribute(l,c),Nt.fromBufferAttribute(l,u),jt.fromBufferAttribute(l,h),y.uv2=He.getUV(Bt,Mt,Tt,Ct,It,Nt,jt,new v));var b=new Ke(c,u,h);He.getNormal(Mt,Tt,Ct,b.normal),y.face=b}return y}zt.prototype=Object.assign(Object.create(Me.prototype),{constructor:zt,isMesh:!0,copy:function(e){return Me.prototype.copy.call(this,e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(e,t){var n,r=this.geometry,i=this.material,o=this.matrixWorld;if(void 0!==i&&(null===r.boundingSphere&&r.computeBoundingSphere(),St.copy(r.boundingSphere),St.applyMatrix4(o),!1!==e.ray.intersectsSphere(St)&&(Et.copy(o).invert(),At.copy(e.ray).applyMatrix4(Et),null===r.boundingBox||!1!==At.intersectsBox(r.boundingBox))))if(r.isBufferGeometry){var a=r.index,s=r.attributes.position,l=r.morphAttributes.position,c=r.morphTargetsRelative,u=r.attributes.uv,h=r.attributes.uv2,d=r.groups,f=r.drawRange;if(null!==a)if(Array.isArray(i))for(var p=0,m=d.length;p<m;p++)for(var g=d[p],v=i[g.materialIndex],y=Math.max(g.start,f.start),b=Math.min(g.start+g.count,f.start+f.count);y<b;y+=3){var w=a.getX(y),x=a.getX(y+1),_=a.getX(y+2);(n=Ht(this,v,e,At,s,l,c,u,h,w,x,_))&&(n.faceIndex=Math.floor(y/3),n.face.materialIndex=g.materialIndex,t.push(n))}else for(var E=Math.max(0,f.start),A=Math.min(a.count,f.start+f.count);E<A;E+=3){var S=a.getX(E),M=a.getX(E+1),T=a.getX(E+2);(n=Ht(this,i,e,At,s,l,c,u,h,S,M,T))&&(n.faceIndex=Math.floor(E/3),t.push(n))}else if(void 0!==s)if(Array.isArray(i))for(var C=0,O=d.length;C<O;C++)for(var R=d[C],k=i[R.materialIndex],P=Math.max(R.start,f.start),L=Math.min(R.start+R.count,f.start+f.count);P<L;P+=3)(n=Ht(this,k,e,At,s,l,c,u,h,P,P+1,P+2))&&(n.faceIndex=Math.floor(P/3),n.face.materialIndex=R.materialIndex,t.push(n));else for(var D=Math.max(0,f.start),I=Math.min(s.count,f.start+f.count);D<I;D+=3)(n=Ht(this,i,e,At,s,l,c,u,h,D,D+1,D+2))&&(n.faceIndex=Math.floor(D/3),t.push(n))}else r.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}});var Ut=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1),void 0===o&&(o=1),void 0===a&&(a=1),(s=e.call(this)||this).type="BoxGeometry",s.parameters={width:t,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:a};var c=l(s);i=Math.floor(i),o=Math.floor(o),a=Math.floor(a);var u=[],h=[],d=[],f=[],p=0,m=0;function g(e,t,n,r,i,o,a,s,l,g,v){for(var y=o/l,b=a/g,w=o/2,x=a/2,_=s/2,E=l+1,A=g+1,S=0,M=0,C=new T,O=0;O<A;O++)for(var R=O*b-x,k=0;k<E;k++){var P=k*y-w;C[e]=P*r,C[t]=R*i,C[n]=_,h.push(C.x,C.y,C.z),C[e]=0,C[t]=0,C[n]=s>0?1:-1,d.push(C.x,C.y,C.z),f.push(k/l),f.push(1-O/g),S+=1}for(var L=0;L<g;L++)for(var D=0;D<l;D++){var I=p+D+E*L,N=p+D+E*(L+1),j=p+(D+1)+E*(L+1),B=p+(D+1)+E*L;u.push(I,N,B),u.push(N,j,B),M+=6}c.addGroup(m,M,v),m+=M,p+=S}return g("z","y","x",-1,-1,r,n,t,a,o,0),g("z","y","x",1,-1,r,n,-t,a,o,1),g("x","z","y",1,1,t,r,n,i,a,2),g("x","z","y",1,-1,t,r,-n,i,a,3),g("x","y","z",1,-1,t,n,r,i,o,4),g("x","y","z",-1,-1,t,n,-r,i,o,5),s.setIndex(u),s.setAttribute("position",new ut(h,3)),s.setAttribute("normal",new ut(d,3)),s.setAttribute("uv",new ut(f,2)),s}return s(t,e),t}(_t);function Vt(e){var t={};for(var n in e)for(var r in t[n]={},e[n]){var i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}return t}function Gt(e){for(var t={},n=0;n<e.length;n++){var r=Vt(e[n]);for(var i in r)t[i]=r[i]}return t}var Wt={clone:Vt,merge:Gt};function qt(e){Ze.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function Xt(){Me.call(this),this.type="Camera",this.matrixWorldInverse=new te,this.projectionMatrix=new te,this.projectionMatrixInverse=new te}function Yt(e,t,n,r){void 0===e&&(e=50),void 0===t&&(t=1),void 0===n&&(n=.1),void 0===r&&(r=2e3),Xt.call(this),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Kt(e,t,n){if(Me.call(this),this.type="CubeCamera",!0===n.isWebGLCubeRenderTarget){this.renderTarget=n;var r=new Yt(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new T(1,0,0)),this.add(r);var i=new Yt(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new T(-1,0,0)),this.add(i);var o=new Yt(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new T(0,1,0)),this.add(o);var a=new Yt(90,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new T(0,-1,0)),this.add(a);var s=new Yt(90,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new T(0,0,1)),this.add(s);var l=new Yt(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new T(0,0,-1)),this.add(l),this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var c=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;var h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=c}}else console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.")}function Qt(e,t,n,r,i,o,a,s,l,c){e=void 0!==e?e:[],t=void 0!==t?t:301,a=void 0!==a?a:1022,x.call(this,e,t,n,r,i,o,a,s,l,c),this.flipY=!1,this._needsFlipEnvMap=!0}qt.prototype=Object.create(Ze.prototype),qt.prototype.constructor=qt,qt.prototype.isShaderMaterial=!0,qt.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Vt(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this},qt.prototype.toJSON=function(e){var t=Ze.prototype.toJSON.call(this,e);for(var n in t.glslVersion=this.glslVersion,t.uniforms={},this.uniforms){var r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var i={};for(var o in this.extensions)!0===this.extensions[o]&&(i[o]=!0);return Object.keys(i).length>0&&(t.extensions=i),t},Xt.prototype=Object.assign(Object.create(Me.prototype),{constructor:Xt,isCamera:!0,copy:function(e,t){return Me.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new T),this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){Me.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()},updateWorldMatrix:function(e,t){Me.prototype.updateWorldMatrix.call(this,e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()},clone:function(){return(new this.constructor).copy(this)}}),Yt.prototype=Object.assign(Object.create(Xt.prototype),{constructor:Yt,isPerspectiveCamera:!0,copy:function(e,t){return Xt.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*g.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*g.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*g.RAD2DEG*Math.atan(Math.tan(.5*g.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*g.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,t-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var l=this.filmOffset;0!==l&&(i+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),Kt.prototype=Object.create(Me.prototype),Kt.prototype.constructor=Kt,Qt.prototype=Object.create(x.prototype),Qt.prototype.constructor=Qt,Qt.prototype.isCubeTexture=!0,Object.defineProperty(Qt.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var Zt=function(e){function t(t,n,r){var i;return Number.isInteger(n)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),n=r),i=e.call(this,t,t,n)||this,Object.defineProperty(l(i),"isWebGLCubeRenderTarget",{value:!0}),n=n||{},i.texture=new Qt(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),i.texture._needsFlipEnvMap=!1,i}s(t,e);var n=t.prototype;return n.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=1023,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;var n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",o=new Ut(5,5,5),a=new qt({name:"CubemapFromEquirect",uniforms:Vt(n),vertexShader:r,fragmentShader:i,side:1,blending:0});a.uniforms.tEquirect.value=t;var s=new zt(o,a),l=t.minFilter;return 1008===t.minFilter&&(t.minFilter=1006),new Kt(1,10,this).update(e,s),t.minFilter=l,s.geometry.dispose(),s.material.dispose(),this},n.clear=function(e,t,n,r){for(var i=e.getRenderTarget(),o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(i)},t}(A);function Jt(e,t,n,r,i,o,a,s,l,c,u,h){x.call(this,null,o,a,s,l,c,r,i,u,h),this.image={data:e||null,width:t||1,height:n||1},this.magFilter=void 0!==l?l:1003,this.minFilter=void 0!==c?c:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}Jt.prototype=Object.create(x.prototype),Jt.prototype.constructor=Jt,Jt.prototype.isDataTexture=!0;var $t=new q,en=new T,tn=function(){function e(e,t,n,r,i,o){this.planes=[void 0!==e?e:new Re,void 0!==t?t:new Re,void 0!==n?n:new Re,void 0!==r?r:new Re,void 0!==i?i:new Re,void 0!==o?o:new Re]}var t=e.prototype;return t.set=function(e,t,n,r,i,o){var a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},t.setFromProjectionMatrix=function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(a-r,u-s,p-h,y-m).normalize(),t[1].setComponents(a+r,u+s,p+h,y+m).normalize(),t[2].setComponents(a+i,u+l,p+d,y+g).normalize(),t[3].setComponents(a-i,u-l,p-d,y-g).normalize(),t[4].setComponents(a-o,u-c,p-f,y-v).normalize(),t[5].setComponents(a+o,u+c,p+f,y+v).normalize(),this},t.intersectsObject=function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),$t.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere($t)},t.intersectsSprite=function(e){return $t.center.set(0,0,0),$t.radius=.7071067811865476,$t.applyMatrix4(e.matrixWorld),this.intersectsSphere($t)},t.intersectsSphere=function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++)if(t[i].distanceToPoint(n)<r)return!1;return!0},t.intersectsBox=function(e){for(var t=this.planes,n=0;n<6;n++){var r=t[n];if(en.x=r.normal.x>0?e.max.x:e.min.x,en.y=r.normal.y>0?e.max.y:e.min.y,en.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(en)<0)return!1}return!0},t.containsPoint=function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0},e}();function nn(){var e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function rn(e,t){var n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);var n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){var o=r.get(t);(!o||o.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version})}else{t.isInterleavedBufferAttribute&&(t=t.data);var a=r.get(t);void 0===a?r.set(t,function(t,r){var i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();var s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:i instanceof Uint8Array&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):a.version<t.version&&(function(t,r,i){var o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(a.buffer,t,i),a.version=t.version)}}}}var on=function(e){function t(t,n,r,i){var o;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1),(o=e.call(this)||this).type="PlaneGeometry",o.parameters={width:t,height:n,widthSegments:r,heightSegments:i};for(var a=t/2,s=n/2,l=Math.floor(r),c=Math.floor(i),u=l+1,h=c+1,d=t/l,f=n/c,p=[],m=[],g=[],v=[],y=0;y<h;y++)for(var b=y*f-s,w=0;w<u;w++){var x=w*d-a;m.push(x,-b,0),g.push(0,0,1),v.push(w/l),v.push(1-y/c)}for(var _=0;_<c;_++)for(var E=0;E<l;E++){var A=E+u*_,S=E+u*(_+1),M=E+1+u*(_+1),T=E+1+u*_;p.push(A,S,T),p.push(S,M,T)}return o.setIndex(p),o.setAttribute("position",new ut(m,3)),o.setAttribute("normal",new ut(g,3)),o.setAttribute("uv",new ut(v,2)),o}return s(t,e),t}(_t),an={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor.xyz *= color.xyz;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(\t\t0, 1,\t\t0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(\t1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,\t1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,\t1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmissionmap_fragment:"#ifdef USE_TRANSMISSIONMAP\n\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\n#endif",transmissionmap_pars_fragment:"#ifdef USE_TRANSMISSIONMAP\n\tuniform sampler2D transmissionMap;\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSMISSION\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSMISSION\n\tuniform float transmission;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <transmissionmap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#ifdef TRANSMISSION\n\t\tfloat totalTransmission = transmission;\n\t#endif\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <transmissionmap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSMISSION\n\t\tdiffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},sn={common:{diffuse:{value:new Ye(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new y},uv2Transform:{value:new y},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new v(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ye(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ye(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new y}},sprite:{diffuse:{value:new Ye(15658734)},opacity:{value:1},center:{value:new v(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new y}}},ln={basic:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.fog]),vertexShader:an.meshbasic_vert,fragmentShader:an.meshbasic_frag},lambert:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.fog,sn.lights,{emissive:{value:new Ye(0)}}]),vertexShader:an.meshlambert_vert,fragmentShader:an.meshlambert_frag},phong:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)},specular:{value:new Ye(1118481)},shininess:{value:30}}]),vertexShader:an.meshphong_vert,fragmentShader:an.meshphong_frag},standard:{uniforms:Gt([sn.common,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.roughnessmap,sn.metalnessmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:an.meshphysical_vert,fragmentShader:an.meshphysical_frag},toon:{uniforms:Gt([sn.common,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.gradientmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)}}]),vertexShader:an.meshtoon_vert,fragmentShader:an.meshtoon_frag},matcap:{uniforms:Gt([sn.common,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.fog,{matcap:{value:null}}]),vertexShader:an.meshmatcap_vert,fragmentShader:an.meshmatcap_frag},points:{uniforms:Gt([sn.points,sn.fog]),vertexShader:an.points_vert,fragmentShader:an.points_frag},dashed:{uniforms:Gt([sn.common,sn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:an.linedashed_vert,fragmentShader:an.linedashed_frag},depth:{uniforms:Gt([sn.common,sn.displacementmap]),vertexShader:an.depth_vert,fragmentShader:an.depth_frag},normal:{uniforms:Gt([sn.common,sn.bumpmap,sn.normalmap,sn.displacementmap,{opacity:{value:1}}]),vertexShader:an.normal_vert,fragmentShader:an.normal_frag},sprite:{uniforms:Gt([sn.sprite,sn.fog]),vertexShader:an.sprite_vert,fragmentShader:an.sprite_frag},background:{uniforms:{uvTransform:{value:new y},t2D:{value:null}},vertexShader:an.background_vert,fragmentShader:an.background_frag},cube:{uniforms:Gt([sn.envmap,{opacity:{value:1}}]),vertexShader:an.cube_vert,fragmentShader:an.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:an.equirect_vert,fragmentShader:an.equirect_frag},distanceRGBA:{uniforms:Gt([sn.common,sn.displacementmap,{referencePosition:{value:new T},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:an.distanceRGBA_vert,fragmentShader:an.distanceRGBA_frag},shadow:{uniforms:Gt([sn.lights,sn.fog,{color:{value:new Ye(0)},opacity:{value:1}}]),vertexShader:an.shadow_vert,fragmentShader:an.shadow_frag}};function cn(e,t,n,r,i){var o,a,s=new Ye(0),l=0,c=null,u=0,h=null;function d(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return s},setClearColor:function(e,t){void 0===t&&(t=1),s.set(e),d(s,l=t)},getClearAlpha:function(){return l},setClearAlpha:function(e){d(s,l=e)},render:function(n,i,f,p){var m=!0===i.isScene?i.background:null;m&&m.isTexture&&(m=t.get(m));var g=e.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?d(s,l):m&&m.isColor&&(d(m,1),p=!0),(e.autoClear||p)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||m.isWebGLCubeRenderTarget||306===m.mapping)?(void 0===a&&((a=new zt(new Ut(1,1,1),new qt({name:"BackgroundCubeMaterial",uniforms:Vt(ln.cube.uniforms),vertexShader:ln.cube.vertexShader,fragmentShader:ln.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),a.geometry.deleteAttribute("uv"),a.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(a.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(a)),m.isWebGLCubeRenderTarget&&(m=m.texture),a.material.uniforms.envMap.value=m,a.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m._needsFlipEnvMap?-1:1,c===m&&u===m.version&&h===e.toneMapping||(a.material.needsUpdate=!0,c=m,u=m.version,h=e.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null)):m&&m.isTexture&&(void 0===o&&((o=new zt(new on(2,2),new qt({name:"BackgroundMaterial",uniforms:Vt(ln.background.uniforms),vertexShader:ln.background.vertexShader,fragmentShader:ln.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(o)),o.material.uniforms.t2D.value=m,!0===m.matrixAutoUpdate&&m.updateMatrix(),o.material.uniforms.uvTransform.value.copy(m.matrix),c===m&&u===m.version&&h===e.toneMapping||(o.material.needsUpdate=!0,c=m,u=m.version,h=e.toneMapping),n.unshift(o,o.geometry,o.material,0,0,null))}}}function un(e,t,n,r){var i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},l=d(null),c=l;function u(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function d(e){for(var t=[],n=[],r=[],o=0;o<i;o++)t[o]=0,n[o]=0,r[o]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){for(var e=c.newAttributes,t=0,n=e.length;t<n;t++)e[t]=0}function p(e){m(e,0)}function m(n,i){var o=c.newAttributes,a=c.enabledAttributes,s=c.attributeDivisors;o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i&&((r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i)}function g(){for(var t=c.newAttributes,n=c.enabledAttributes,r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function y(){b(),c!==l&&u((c=l).object)}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,y,b){var w=!1;if(a){var x=function(t,n,i){var a=!0===i.wireframe,l=s[t.id];void 0===l&&(l={},s[t.id]=l);var c=l[n.id];void 0===c&&(c={},l[n.id]=c);var u=c[a];return void 0===u&&(u=d(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[a]=u),u}(y,h,l);c!==x&&u((c=x).object),(w=function(e,t){var n=c.attributes,r=e.attributes,i=0;for(var o in r){var a=n[o],s=r[o];if(void 0===a)return!0;if(a.attribute!==s)return!0;if(a.data!==s.data)return!0;i++}return c.attributesNum!==i||c.index!==t}(y,b))&&function(e,t){var n={},r=e.attributes,i=0;for(var o in r){var a=r[o],s={};s.attribute=a,a.data&&(s.data=a.data),n[o]=s,i++}c.attributes=n,c.attributesNum=i,c.index=t}(y,b)}else{var _=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===_||(c.geometry=y.id,c.program=h.id,c.wireframe=_,w=!0)}!0===i.isInstancedMesh&&(w=!0),null!==b&&n.update(b,34963),w&&(function(i,o,a,s){if(!1!==r.isWebGL2||!i.isInstancedMesh&&!s.isInstancedBufferGeometry||null!==t.get("ANGLE_instanced_arrays")){f();var l=s.attributes,c=a.getAttributes(),u=o.defaultAttributeValues;for(var h in c){var d=c[h];if(d>=0){var y=l[h];if(void 0!==y){var b=y.normalized,w=y.itemSize,x=n.get(y);if(void 0===x)continue;var _=x.buffer,E=x.type,A=x.bytesPerElement;if(y.isInterleavedBufferAttribute){var S=y.data,M=S.stride,T=y.offset;S&&S.isInstancedInterleavedBuffer?(m(d,S.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=S.meshPerAttribute*S.count)):p(d),e.bindBuffer(34962,_),v(d,w,E,b,M*A,T*A)}else y.isInstancedBufferAttribute?(m(d,y.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=y.meshPerAttribute*y.count)):p(d),e.bindBuffer(34962,_),v(d,w,E,b,0,0)}else if("instanceMatrix"===h){var C=n.get(i.instanceMatrix);if(void 0===C)continue;var O=C.buffer,R=C.type;m(d+0,1),m(d+1,1),m(d+2,1),m(d+3,1),e.bindBuffer(34962,O),e.vertexAttribPointer(d+0,4,R,!1,64,0),e.vertexAttribPointer(d+1,4,R,!1,64,16),e.vertexAttribPointer(d+2,4,R,!1,64,32),e.vertexAttribPointer(d+3,4,R,!1,64,48)}else if("instanceColor"===h){var k=n.get(i.instanceColor);if(void 0===k)continue;var P=k.buffer,L=k.type;m(d,1),e.bindBuffer(34962,P),e.vertexAttribPointer(d,3,L,!1,12,0)}else if(void 0!==u){var D=u[h];if(void 0!==D)switch(D.length){case 2:e.vertexAttrib2fv(d,D);break;case 3:e.vertexAttrib3fv(d,D);break;case 4:e.vertexAttrib4fv(d,D);break;default:e.vertexAttrib1fv(d,D)}}}}g()}}(i,l,h,y),null!==b&&e.bindBuffer(34963,n.get(b).buffer))},reset:y,resetDefaultState:b,dispose:function(){for(var e in y(),s){var t=s[e];for(var n in t){var r=t[n];for(var i in r)h(r[i].object),delete r[i];delete t[n]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0!==s[e.id]){var t=s[e.id];for(var n in t){var r=t[n];for(var i in r)h(r[i].object),delete r[i];delete t[n]}delete s[e.id]}},releaseStatesOfProgram:function(e){for(var t in s){var n=s[t];if(void 0!==n[e.id]){var r=n[e.id];for(var i in r)h(r[i].object),delete r[i];delete n[e.id]}}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:g}}function hn(e,t,n,r){var i,o=r.isWebGL2;this.setMode=function(e){i=e},this.render=function(t,r){e.drawArrays(i,t,r),n.update(r,i,1)},this.renderInstances=function(r,a,s){if(0!==s){var l,c;if(o)l=e,c="drawArraysInstanced";else if(c="drawArraysInstancedANGLE",null===(l=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](i,r,a,s),n.update(a,i,s)}}}function dn(e,t,n){var r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var o="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext,a=void 0!==n.precision?n.precision:"highp",s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var l=!0===n.logarithmicDepthBuffer,c=e.getParameter(34930),u=e.getParameter(35660),h=e.getParameter(3379),d=e.getParameter(34076),f=e.getParameter(34921),p=e.getParameter(36347),m=e.getParameter(36348),g=e.getParameter(36349),v=u>0,y=o||!!t.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(void 0!==r)return r;var n=t.get("EXT_texture_filter_anisotropic");return r=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:l,maxTextures:c,maxVertexTextures:u,maxTextureSize:h,maxCubemapSize:d,maxAttributes:f,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?e.getParameter(36183):0}}function fn(e){var t=this,n=null,r=0,i=!1,o=!1,a=new Re,s=new y,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){var o=null!==e?e.length:0,c=null;if(0!==o){if(c=l.value,!0!==i||null===c){var u=r+4*o,h=n.matrixWorldInverse;s.getNormalMatrix(h),(null===c||c.length<u)&&(c=new Float32Array(u));for(var d=0,f=r;d!==o;++d,f+=4)a.copy(e[d]).applyMatrix4(h,s),a.normal.toArray(c,f),c[f+3]=a.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){var a=0!==e.length||t||0!==r||i;return i=t,n=u(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,a,s){var h=t.clippingPlanes,d=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===h||0===h.length||o&&!f)o?u(null):c();else{var m=o?0:r,g=4*m,v=p.clippingState||null;l.value=v,v=u(h,a,g,s);for(var y=0;y!==g;++y)v[y]=n[y];p.clippingState=v,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=m}}}function pn(e){var t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function r(e){var n=e.target;n.removeEventListener("dispose",r);var i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){var o=i.mapping;if(303===o||304===o){if(t.has(i))return n(t.get(i).texture,i.mapping);var a=i.image;if(a&&a.height>0){var s=e.getRenderList(),l=e.getRenderTarget(),c=new Zt(a.height/2);return c.fromEquirectangularTexture(e,i),t.set(i,c),e.setRenderTarget(l),e.setRenderList(s),i.addEventListener("dispose",r),n(c.texture,i.mapping)}return null}}return i},dispose:function(){t=new WeakMap}}}function mn(e){var t={};function n(n){if(void 0!==t[n])return t[n];var r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(e){var t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function gn(e,t,n,r){var i={},o=new WeakMap;function a(e){var s=e.target;for(var l in null!==s.index&&t.remove(s.index),s.attributes)t.remove(s.attributes[l]);s.removeEventListener("dispose",a),delete i[s.id];var c=o.get(s);c&&(t.remove(c),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){var n=[],r=e.index,i=e.attributes.position,a=0;if(null!==r){var s=r.array;a=r.version;for(var l=0,c=s.length;l<c;l+=3){var u=s[l+0],h=s[l+1],d=s[l+2];n.push(u,h,h,d,d,u)}}else{var f=i.array;a=i.version;for(var p=0,m=f.length/3-1;p<m;p+=3){var g=p+0,v=p+1,y=p+2;n.push(g,v,v,y,y,g)}}var b=new(dt(n)>65535?lt:at)(n,1);b.version=a;var w=o.get(e);w&&t.remove(w),o.set(e,b)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){var n=e.attributes;for(var r in n)t.update(n[r],34962);var i=e.morphAttributes;for(var o in i)for(var a=i[o],s=0,l=a.length;s<l;s++)t.update(a[s],34962)},getWireframeAttribute:function(e){var t=o.get(e);if(t){var n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function vn(e,t,n,r){var i,o,a,s=r.isWebGL2;this.setMode=function(e){i=e},this.setIndex=function(e){o=e.type,a=e.bytesPerElement},this.render=function(t,r){e.drawElements(i,r,o,t*a),n.update(r,i,1)},this.renderInstances=function(r,l,c){if(0!==c){var u,h;if(s)u=e,h="drawElementsInstanced";else if(h="drawElementsInstancedANGLE",null===(u=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[h](i,l,o,r*a,c),n.update(l,i,c)}}}function yn(e){var t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function bn(e,t){return e[0]-t[0]}function wn(e,t){return Math.abs(t[1])-Math.abs(e[1])}function xn(e){for(var t={},n=new Float32Array(8),r=[],i=0;i<8;i++)r[i]=[i,0];return{update:function(i,o,a,s){var l=i.morphTargetInfluences,c=void 0===l?0:l.length,u=t[o.id];if(void 0===u){u=[];for(var h=0;h<c;h++)u[h]=[h,0];t[o.id]=u}for(var d=0;d<c;d++){var f=u[d];f[0]=d,f[1]=l[d]}u.sort(wn);for(var p=0;p<8;p++)p<c&&u[p][1]?(r[p][0]=u[p][0],r[p][1]=u[p][1]):(r[p][0]=Number.MAX_SAFE_INTEGER,r[p][1]=0);r.sort(bn);for(var m=a.morphTargets&&o.morphAttributes.position,g=a.morphNormals&&o.morphAttributes.normal,v=0,y=0;y<8;y++){var b=r[y],w=b[0],x=b[1];w!==Number.MAX_SAFE_INTEGER&&x?(m&&o.getAttribute("morphTarget"+y)!==m[w]&&o.setAttribute("morphTarget"+y,m[w]),g&&o.getAttribute("morphNormal"+y)!==g[w]&&o.setAttribute("morphNormal"+y,g[w]),n[y]=x,v+=x):(m&&!0===o.hasAttribute("morphTarget"+y)&&o.deleteAttribute("morphTarget"+y),g&&!0===o.hasAttribute("morphNormal"+y)&&o.deleteAttribute("morphNormal"+y),n[y]=0)}var _=o.morphTargetsRelative?1:1-v;s.getUniforms().setValue(e,"morphTargetBaseInfluence",_),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function _n(e,t,n,r){var i=new WeakMap;function o(e){var t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){var a=r.render.frame,s=e.geometry,l=t.get(e,s);return i.get(l)!==a&&(t.update(l),i.set(l,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}function En(e,t,n,r){void 0===e&&(e=null),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),x.call(this,null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function An(e,t,n,r){void 0===e&&(e=null),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),x.call(this,null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}ln.physical={uniforms:Gt([ln.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new v(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Ye(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:an.meshphysical_vert,fragmentShader:an.meshphysical_frag},En.prototype=Object.create(x.prototype),En.prototype.constructor=En,En.prototype.isDataTexture2DArray=!0,An.prototype=Object.create(x.prototype),An.prototype.constructor=An,An.prototype.isDataTexture3D=!0;var Sn=new x,Mn=new En,Tn=new An,Cn=new Qt,On=[],Rn=[],kn=new Float32Array(16),Pn=new Float32Array(9),Ln=new Float32Array(4);function Dn(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,o=On[i];if(void 0===o&&(o=new Float32Array(i),On[i]=o),0!==t){r.toArray(o,0);for(var a=1,s=0;a!==t;++a)s+=n,e[a].toArray(o,s)}return o}function In(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function Nn(e,t){for(var n=0,r=t.length;n<r;n++)e[n]=t[n]}function jn(e,t){var n=Rn[t];void 0===n&&(n=new Int32Array(t),Rn[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function Bn(e,t){var n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Fn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(In(n,t))return;e.uniform2fv(this.addr,t),Nn(n,t)}}function zn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(In(n,t))return;e.uniform3fv(this.addr,t),Nn(n,t)}}function Hn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(In(n,t))return;e.uniform4fv(this.addr,t),Nn(n,t)}}function Un(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;Ln.set(r),e.uniformMatrix2fv(this.addr,!1,Ln),Nn(n,r)}}function Vn(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;Pn.set(r),e.uniformMatrix3fv(this.addr,!1,Pn),Nn(n,r)}}function Gn(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;kn.set(r),e.uniformMatrix4fv(this.addr,!1,kn),Nn(n,r)}}function Wn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||Sn,i)}function qn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||Mn,i)}function Xn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||Tn,i)}function Yn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||Cn,i)}function Kn(e,t){var n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Qn(e,t){var n=this.cache;In(n,t)||(e.uniform2iv(this.addr,t),Nn(n,t))}function Zn(e,t){var n=this.cache;In(n,t)||(e.uniform3iv(this.addr,t),Nn(n,t))}function Jn(e,t){var n=this.cache;In(n,t)||(e.uniform4iv(this.addr,t),Nn(n,t))}function $n(e,t){var n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function er(e,t){e.uniform1fv(this.addr,t)}function tr(e,t){e.uniform1iv(this.addr,t)}function nr(e,t){e.uniform2iv(this.addr,t)}function rr(e,t){e.uniform3iv(this.addr,t)}function ir(e,t){e.uniform4iv(this.addr,t)}function or(e,t){var n=Dn(t,this.size,2);e.uniform2fv(this.addr,n)}function ar(e,t){var n=Dn(t,this.size,3);e.uniform3fv(this.addr,n)}function sr(e,t){var n=Dn(t,this.size,4);e.uniform4fv(this.addr,n)}function lr(e,t){var n=Dn(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function cr(e,t){var n=Dn(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function ur(e,t){var n=Dn(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function hr(e,t,n){var r=t.length,i=jn(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.safeSetTexture2D(t[o]||Sn,i[o])}function dr(e,t,n){var r=t.length,i=jn(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.safeSetTextureCube(t[o]||Cn,i[o])}function fr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Bn;case 35664:return Fn;case 35665:return zn;case 35666:return Hn;case 35674:return Un;case 35675:return Vn;case 35676:return Gn;case 5124:case 35670:return Kn;case 35667:case 35671:return Qn;case 35668:case 35672:return Zn;case 35669:case 35673:return Jn;case 5125:return $n;case 35678:case 36198:case 36298:case 36306:case 35682:return Wn;case 35679:case 36299:case 36307:return Xn;case 35680:case 36300:case 36308:case 36293:return Yn;case 36289:case 36303:case 36311:case 36292:return qn}}(t.type)}function pr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return er;case 35664:return or;case 35665:return ar;case 35666:return sr;case 35674:return lr;case 35675:return cr;case 35676:return ur;case 5124:case 35670:return tr;case 35667:case 35671:return nr;case 35668:case 35672:return rr;case 35669:case 35673:return ir;case 35678:case 36198:case 36298:case 36306:case 35682:return hr;case 35680:case 36300:case 36308:case 36293:return dr}}(t.type)}function mr(e){this.id=e,this.seq=[],this.map={}}pr.prototype.updateCache=function(e){var t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Nn(t,e)},mr.prototype.setValue=function(e,t,n){for(var r=this.seq,i=0,o=r.length;i!==o;++i){var a=r[i];a.setValue(e,t[a.id],n)}};var gr=/(\w+)(\])?(\[|\.)?/g;function vr(e,t){e.seq.push(t),e.map[t.id]=t}function yr(e,t,n){var r=e.name,i=r.length;for(gr.lastIndex=0;;){var o=gr.exec(r),a=gr.lastIndex,s=o[1],l="]"===o[2],c=o[3];if(l&&(s|=0),void 0===c||"["===c&&a+2===i){vr(n,void 0===c?new fr(s,e,t):new pr(s,e,t));break}var u=n.map[s];void 0===u&&vr(n,u=new mr(s)),n=u}}function br(e,t){this.seq=[],this.map={};for(var n=e.getProgramParameter(t,35718),r=0;r<n;++r){var i=e.getActiveUniform(t,r);yr(i,e.getUniformLocation(t,i.name),this)}}function wr(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}br.prototype.setValue=function(e,t,n,r){var i=this.map[t];void 0!==i&&i.setValue(e,n,r)},br.prototype.setOptional=function(e,t,n){var r=t[n];void 0!==r&&this.setValue(e,n,r)},br.upload=function(e,t,n,r){for(var i=0,o=t.length;i!==o;++i){var a=t[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,r)}},br.seqWithValue=function(e,t){for(var n=[],r=0,i=e.length;r!==i;++r){var o=e[r];o.id in t&&n.push(o)}return n};var xr=0;function _r(e){switch(e){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Er(e,t,n){var r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return r&&""===i?"":"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(e.getShaderSource(t))}function Ar(e,t){var n=_r(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Sr(e,t){var n=_r(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Mr(e,t){var n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Tr(e){return""!==e}function Cr(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Or(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var Rr=/^[ \t]*#include +<([\w\d./]+)>/gm;function kr(e){return e.replace(Rr,Pr)}function Pr(e,t){var n=an[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return kr(n)}var Lr=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Dr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ir(e){return e.replace(Dr,jr).replace(Lr,Nr)}function Nr(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),jr(0,t,n,r)}function jr(e,t,n,r){for(var i="",o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function Br(e){var t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Fr(e,t,n,r){var i,o,a=e.getContext(),s=n.defines,l=n.vertexShader,c=n.fragmentShader,u=function(e){var t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),h=function(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),d=function(e){var t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case 302:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),f=function(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),p=e.gammaFactor>0?e.gammaFactor:1,m=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Tr).join("\n")}(n),g=function(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(s),v=a.createProgram(),y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?((i=[g].filter(Tr).join("\n")).length>0&&(i+="\n"),(o=[m,g].filter(Tr).join("\n")).length>0&&(o+="\n")):(i=[Br(n),"#define SHADER_NAME "+n.shaderName,g,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Tr).join("\n"),o=[m,Br(n),"#define SHADER_NAME "+n.shaderName,g,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+p,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",n.envMap?"#define "+d:"",n.envMap?"#define "+f:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?an.tonemapping_pars_fragment:"",0!==n.toneMapping?Mr("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",an.encodings_pars_fragment,n.map?Ar("mapTexelToLinear",n.mapEncoding):"",n.matcap?Ar("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Ar("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Ar("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?Ar("lightMapTexelToLinear",n.lightMapEncoding):"",Sr("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Tr).join("\n")),l=Or(l=Cr(l=kr(l),n),n),c=Or(c=Cr(c=kr(c),n),n),l=Ir(l),c=Ir(c),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",i=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+i,o=["#define varying in","300 es"===n.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+o);var b,w,x=y+o+c,_=wr(a,35633,y+i+l),E=wr(a,35632,x);if(a.attachShader(v,_),a.attachShader(v,E),void 0!==n.index0AttributeName?a.bindAttribLocation(v,0,n.index0AttributeName):!0===n.morphTargets&&a.bindAttribLocation(v,0,"position"),a.linkProgram(v),e.debug.checkShaderErrors){var A=a.getProgramInfoLog(v).trim(),S=a.getShaderInfoLog(_).trim(),M=a.getShaderInfoLog(E).trim(),T=!0,C=!0;if(!1===a.getProgramParameter(v,35714)){T=!1;var O=Er(a,_,"vertex"),R=Er(a,E,"fragment");console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(v,35715),"gl.getProgramInfoLog",A,O,R)}else""!==A?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",A):""!==S&&""!==M||(C=!1);C&&(this.diagnostics={runnable:T,programLog:A,vertexShader:{log:S,prefix:i},fragmentShader:{log:M,prefix:o}})}return a.deleteShader(_),a.deleteShader(E),this.getUniforms=function(){return void 0===b&&(b=new br(a,v)),b},this.getAttributes=function(){return void 0===w&&(w=function(e,t){for(var n={},r=e.getProgramParameter(t,35721),i=0;i<r;i++){var o=e.getActiveAttrib(t,i).name;n[o]=e.getAttribLocation(t,o)}return n}(a,v)),w},this.destroy=function(){r.releaseStatesOfProgram(this),a.deleteProgram(v),this.program=void 0},this.name=n.shaderName,this.id=xr++,this.cacheKey=t,this.usedTimes=1,this.program=v,this.vertexShader=_,this.fragmentShader=E,this}function zr(e,t,n,r,i,o){var a=[],s=r.isWebGL2,l=r.logarithmicDepthBuffer,c=r.floatVertexTextures,u=r.maxVertexUniforms,h=r.vertexTextures,d=r.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},p=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmissionMap"];function m(e){var t;return e&&e.isTexture?t=e.encoding:e&&e.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=3e3,t}return{getParameters:function(i,a,p,g,v){var y,b,w=g.fog,x=i.isMeshStandardMaterial?g.environment:null,_=t.get(i.envMap||x),E=f[i.type],A=v.isSkinnedMesh?function(e){var t=e.skeleton.bones;if(c)return 1024;var n=u,r=Math.floor((n-20)/4),i=Math.min(r,t.length);return i<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+i+"."),0):i}(v):0;if(null!==i.precision&&(d=r.getMaxPrecision(i.precision))!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",d,"instead."),E){var S=ln[E];y=S.vertexShader,b=S.fragmentShader}else y=i.vertexShader,b=i.fragmentShader;var M=e.getRenderTarget();return{isWebGL2:s,shaderID:E,shaderName:i.type,vertexShader:y,fragmentShader:b,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:d,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:h,outputEncoding:null!==M?m(M.texture):e.outputEncoding,map:!!i.map,mapEncoding:m(i.map),matcap:!!i.matcap,matcapEncoding:m(i.matcap),envMap:!!_,envMapMode:_&&_.mapping,envMapEncoding:m(_),envMapCubeUV:!!_&&(306===_.mapping||307===_.mapping),lightMap:!!i.lightMap,lightMapEncoding:m(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:m(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:1===i.normalMapType,tangentSpaceNormalMap:0===i.normalMapType,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmissionMap:!!i.transmissionMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexUvs:!!i.map||!!i.bumpMap||!!i.normalMap||!!i.specularMap||!!i.alphaMap||!!i.emissiveMap||!!i.roughnessMap||!!i.metalnessMap||!!i.clearcoatMap||!!i.clearcoatRoughnessMap||!!i.clearcoatNormalMap||!!i.displacementMap||!!i.transmissionMap,uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmissionMap)&&!!i.displacementMap,fog:!!w,useFog:i.fog,fogExp2:w&&w.isFogExp2,flatShading:i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:l,skinning:i.skinning&&A>0,maxBones:A,useVertexTexture:c,morphTargets:i.morphTargets,morphNormals:i.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&p.length>0,shadowMapType:e.shadowMap.type,toneMapping:i.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:2===i.side,flipSided:1===i.side,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:s||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:s||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:s||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){var n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(var r in t.defines)n.push(r),n.push(t.defines[r]);if(!1===t.isRawShaderMaterial){for(var i=0;i<p.length;i++)n.push(t[p[i]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){var t,n=f[e.type];if(n){var r=ln[n];t=Wt.clone(r.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){for(var r,o=0,s=a.length;o<s;o++){var l=a[o];if(l.cacheKey===n){++(r=l).usedTimes;break}}return void 0===r&&(r=new Fr(e,n,t,i),a.push(r)),r},releaseProgram:function(e){if(0===--e.usedTimes){var t=a.indexOf(e);a[t]=a[a.length-1],a.pop(),e.destroy()}},programs:a}}function Hr(){var e=new WeakMap;return{get:function(t){var n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Ur(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Vr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Gr(e){var t=[],n=0,r=[],i=[],o={id:-1};function a(r,i,a,s,l,c){var u=t[n],h=e.get(a);return void 0===u?(u={id:r.id,object:r,geometry:i,material:a,program:h.program||o,groupOrder:s,renderOrder:r.renderOrder,z:l,group:c},t[n]=u):(u.id=r.id,u.object=r,u.geometry=i,u.material=a,u.program=h.program||o,u.groupOrder=s,u.renderOrder=r.renderOrder,u.z=l,u.group=c),n++,u}return{opaque:r,transparent:i,init:function(){n=0,r.length=0,i.length=0},push:function(e,t,n,o,s,l){var c=a(e,t,n,o,s,l);(!0===n.transparent?i:r).push(c)},unshift:function(e,t,n,o,s,l){var c=a(e,t,n,o,s,l);(!0===n.transparent?i:r).unshift(c)},finish:function(){for(var e=n,r=t.length;e<r;e++){var i=t[e];if(null===i.id)break;i.id=null,i.object=null,i.geometry=null,i.material=null,i.program=null,i.group=null}},sort:function(e,t){r.length>1&&r.sort(e||Ur),i.length>1&&i.sort(t||Vr)}}}function Wr(e){var t=new WeakMap;return{get:function(n,r){var i,o=t.get(n);return void 0===o?(i=new Gr(e),t.set(n,new WeakMap),t.get(n).set(r,i)):void 0===(i=o.get(r))&&(i=new Gr(e),o.set(r,i)),i},dispose:function(){t=new WeakMap}}}function qr(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new T,color:new Ye};break;case"SpotLight":n={position:new T,direction:new T,color:new Ye,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new T,color:new Ye,distance:0,decay:0};break;case"HemisphereLight":n={direction:new T,skyColor:new Ye,groundColor:new Ye};break;case"RectAreaLight":n={color:new Ye,position:new T,halfWidth:new T,halfHeight:new T}}return e[t.id]=n,n}}}var Xr=0;function Yr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Kr(e,t){for(var n=new qr,r=function(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new v};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new v,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},o=0;o<9;o++)i.probe.push(new T);var a=new T,s=new te,l=new te;return{setup:function(o){for(var a=0,s=0,l=0,c=0;c<9;c++)i.probe[c].set(0,0,0);var u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0;o.sort(Yr);for(var y=0,b=o.length;y<b;y++){var w=o[y],x=w.color,_=w.intensity,E=w.distance,A=w.shadow&&w.shadow.map?w.shadow.map.texture:null;if(w.isAmbientLight)a+=x.r*_,s+=x.g*_,l+=x.b*_;else if(w.isLightProbe)for(var S=0;S<9;S++)i.probe[S].addScaledVector(w.sh.coefficients[S],_);else if(w.isDirectionalLight){var M=n.get(w);if(M.color.copy(w.color).multiplyScalar(w.intensity),w.castShadow){var T=w.shadow,C=r.get(w);C.shadowBias=T.bias,C.shadowNormalBias=T.normalBias,C.shadowRadius=T.radius,C.shadowMapSize=T.mapSize,i.directionalShadow[u]=C,i.directionalShadowMap[u]=A,i.directionalShadowMatrix[u]=w.shadow.matrix,m++}i.directional[u]=M,u++}else if(w.isSpotLight){var O=n.get(w);if(O.position.setFromMatrixPosition(w.matrixWorld),O.color.copy(x).multiplyScalar(_),O.distance=E,O.coneCos=Math.cos(w.angle),O.penumbraCos=Math.cos(w.angle*(1-w.penumbra)),O.decay=w.decay,w.castShadow){var R=w.shadow,k=r.get(w);k.shadowBias=R.bias,k.shadowNormalBias=R.normalBias,k.shadowRadius=R.radius,k.shadowMapSize=R.mapSize,i.spotShadow[d]=k,i.spotShadowMap[d]=A,i.spotShadowMatrix[d]=w.shadow.matrix,v++}i.spot[d]=O,d++}else if(w.isRectAreaLight){var P=n.get(w);P.color.copy(x).multiplyScalar(_),P.halfWidth.set(.5*w.width,0,0),P.halfHeight.set(0,.5*w.height,0),i.rectArea[f]=P,f++}else if(w.isPointLight){var L=n.get(w);if(L.color.copy(w.color).multiplyScalar(w.intensity),L.distance=w.distance,L.decay=w.decay,w.castShadow){var D=w.shadow,I=r.get(w);I.shadowBias=D.bias,I.shadowNormalBias=D.normalBias,I.shadowRadius=D.radius,I.shadowMapSize=D.mapSize,I.shadowCameraNear=D.camera.near,I.shadowCameraFar=D.camera.far,i.pointShadow[h]=I,i.pointShadowMap[h]=A,i.pointShadowMatrix[h]=w.shadow.matrix,g++}i.point[h]=L,h++}else if(w.isHemisphereLight){var N=n.get(w);N.skyColor.copy(w.color).multiplyScalar(_),N.groundColor.copy(w.groundColor).multiplyScalar(_),i.hemi[p]=N,p++}}f>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=sn.LTC_FLOAT_1,i.rectAreaLTC2=sn.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=sn.LTC_HALF_1,i.rectAreaLTC2=sn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=l;var j=i.hash;j.directionalLength===u&&j.pointLength===h&&j.spotLength===d&&j.rectAreaLength===f&&j.hemiLength===p&&j.numDirectionalShadows===m&&j.numPointShadows===g&&j.numSpotShadows===v||(i.directional.length=u,i.spot.length=d,i.rectArea.length=f,i.point.length=h,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotShadowMatrix.length=v,j.directionalLength=u,j.pointLength=h,j.spotLength=d,j.rectAreaLength=f,j.hemiLength=p,j.numDirectionalShadows=m,j.numPointShadows=g,j.numSpotShadows=v,i.version=Xr++)},setupView:function(e,t){for(var n=0,r=0,o=0,c=0,u=0,h=t.matrixWorldInverse,d=0,f=e.length;d<f;d++){var p=e[d];if(p.isDirectionalLight){var m=i.directional[n];m.direction.setFromMatrixPosition(p.matrixWorld),a.setFromMatrixPosition(p.target.matrixWorld),m.direction.sub(a),m.direction.transformDirection(h),n++}else if(p.isSpotLight){var g=i.spot[o];g.position.setFromMatrixPosition(p.matrixWorld),g.position.applyMatrix4(h),g.direction.setFromMatrixPosition(p.matrixWorld),a.setFromMatrixPosition(p.target.matrixWorld),g.direction.sub(a),g.direction.transformDirection(h),o++}else if(p.isRectAreaLight){var v=i.rectArea[c];v.position.setFromMatrixPosition(p.matrixWorld),v.position.applyMatrix4(h),l.identity(),s.copy(p.matrixWorld),s.premultiply(h),l.extractRotation(s),v.halfWidth.set(.5*p.width,0,0),v.halfHeight.set(0,.5*p.height,0),v.halfWidth.applyMatrix4(l),v.halfHeight.applyMatrix4(l),c++}else if(p.isPointLight){var y=i.point[r];y.position.setFromMatrixPosition(p.matrixWorld),y.position.applyMatrix4(h),r++}else if(p.isHemisphereLight){var b=i.hemi[u];b.direction.setFromMatrixPosition(p.matrixWorld),b.direction.transformDirection(h),b.direction.normalize(),u++}}},state:i}}function Qr(e,t){var n=new Kr(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Zr(e,t){var n=new WeakMap;return{get:function(r,i){var o;return void 0===i&&(i=0),!1===n.has(r)?(o=new Qr(e,t),n.set(r,[]),n.get(r).push(o)):i>=n.get(r).length?(o=new Qr(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}function Jr(e){Ze.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}function $r(e){Ze.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new T,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}function ei(e,t,n){var r=new tn,i=new v,o=new v,a=new E,s=[],l=[],c={},u={0:1,1:0,2:2},h=new qt({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new v},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),d=h.clone();d.defines.HORIZONTAL_PASS=1;var f=new _t;f.setAttribute("position",new tt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var p=new zt(f,h),m=this;function g(n,r){var i=t.update(p);h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,h,p,null),d.uniforms.shadow_pass.value=n.mapPass.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,d,p,null)}function y(e,t,n){var r=e<<0|t<<1|n<<2,i=s[r];return void 0===i&&(i=new Jr({depthPacking:3201,morphTargets:e,skinning:t}),s[r]=i),i}function b(e,t,n){var r=e<<0|t<<1|n<<2,i=l[r];return void 0===i&&(i=new $r({morphTargets:e,skinning:t}),l[r]=i),i}function w(t,n,r,i,o,a,s){var l=null,h=y,d=t.customDepthMaterial;if(!0===i.isPointLight&&(h=b,d=t.customDistanceMaterial),void 0===d){var f=!1;!0===r.morphTargets&&(f=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0);var p=!1;!0===t.isSkinnedMesh&&(!0===r.skinning?p=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t)),l=h(f,p,!0===t.isInstancedMesh)}else l=d;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){var m=l.uuid,g=r.uuid,v=c[m];void 0===v&&(v={},c[m]=v);var w=v[g];void 0===w&&(w=l.clone(),v[g]=w),l=w}return l.visible=r.visible,l.wireframe=r.wireframe,l.side=3===s?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:u[r.side],l.clipShadows=r.clipShadows,l.clippingPlanes=r.clippingPlanes,l.clipIntersection=r.clipIntersection,l.wireframeLinewidth=r.wireframeLinewidth,l.linewidth=r.linewidth,!0===i.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(i.matrixWorld),l.nearDistance=o,l.farDistance=a),l}function x(n,i,o,a,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var l=t.update(n),c=n.material;if(Array.isArray(c))for(var u=l.groups,h=0,d=u.length;h<d;h++){var f=u[h],p=c[f.materialIndex];if(p&&p.visible){var m=w(n,l,p,a,o.near,o.far,s);e.renderBufferDirect(o,null,l,m,n,f)}}else if(c.visible){var g=w(n,l,c,a,o.near,o.far,s);e.renderBufferDirect(o,null,l,g,n,null)}}for(var v=n.children,y=0,b=v.length;y<b;y++)x(v[y],i,o,a,s)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,s,l){if(!1!==m.enabled&&(!1!==m.autoUpdate||!1!==m.needsUpdate)&&0!==t.length){var c=e.getRenderTarget(),u=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),d=e.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(var f=0,p=t.length;f<p;f++){var v=t[f],y=v.shadow;if(void 0!==y){if(!1!==y.autoUpdate||!1!==y.needsUpdate){i.copy(y.mapSize);var b=y.getFrameExtents();if(i.multiply(b),o.copy(y.mapSize),(i.x>n||i.y>n)&&(i.x>n&&(o.x=Math.floor(n/b.x),i.x=o.x*b.x,y.mapSize.x=o.x),i.y>n&&(o.y=Math.floor(n/b.y),i.y=o.y*b.y,y.mapSize.y=o.y)),null===y.map&&!y.isPointLightShadow&&3===this.type){var w={minFilter:1006,magFilter:1006,format:1023};y.map=new A(i.x,i.y,w),y.map.texture.name=v.name+".shadowMap",y.mapPass=new A(i.x,i.y,w),y.camera.updateProjectionMatrix()}if(null===y.map){var _={minFilter:1003,magFilter:1003,format:1023};y.map=new A(i.x,i.y,_),y.map.texture.name=v.name+".shadowMap",y.camera.updateProjectionMatrix()}e.setRenderTarget(y.map),e.clear();for(var E=y.getViewportCount(),S=0;S<E;S++){var M=y.getViewport(S);a.set(o.x*M.x,o.y*M.y,o.x*M.z,o.y*M.w),d.viewport(a),y.updateMatrices(v,S),r=y.getFrustum(),x(s,l,y.camera,v,this.type)}y.isPointLightShadow||3!==this.type||g(y,l),y.needsUpdate=!1}}else console.warn("THREE.WebGLShadowMap:",v,"has no shadow.")}m.needsUpdate=!1,e.setRenderTarget(c,u,h)}}}function ti(e,t,n){var r,i,o=n.isWebGL2,a=new function(){var t=!1,n=new E,r=null,i=new E(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},s=new function(){var t=!1,n=null,r=null,i=null;return{setTest:function(e){e?N(2929):j(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},l=new function(){var t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?N(2960):j(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&l===r||(e.stencilOp(t,n,r),a=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null}}},c={},u=null,h=null,d=null,f=null,p=null,m=null,g=null,v=null,y=null,b=!1,w=null,x=null,_=null,A=null,S=null,M=e.getParameter(35661),T=!1,C=0,O=e.getParameter(7938);-1!==O.indexOf("WebGL")?(C=parseFloat(/^WebGL (\d)/.exec(O)[1]),T=C>=1):-1!==O.indexOf("OpenGL ES")&&(C=parseFloat(/^OpenGL ES (\d)/.exec(O)[1]),T=C>=2);var R=null,k={},P=new E,L=new E;function D(t,n,r){var i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var a=0;a<r;a++)e.texImage2D(n+a,0,6408,1,1,0,6408,5121,i);return o}var I={};function N(t){!0!==c[t]&&(e.enable(t),c[t]=!0)}function j(t){!1!==c[t]&&(e.disable(t),c[t]=!1)}I[3553]=D(3553,3553,1),I[34067]=D(34067,34069,6),a.setClear(0,0,0,1),s.setClear(1),l.setClear(0),N(2929),s.setFunc(3),U(!1),V(1),N(2884),H(0);var B=((r={})[100]=32774,r[101]=32778,r[102]=32779,r);if(o)B[103]=32775,B[104]=32776;else{var F=t.get("EXT_blend_minmax");null!==F&&(B[103]=F.MIN_EXT,B[104]=F.MAX_EXT)}var z=((i={})[200]=0,i[201]=1,i[202]=768,i[204]=770,i[210]=776,i[208]=774,i[206]=772,i[203]=769,i[205]=771,i[209]=775,i[207]=773,i);function H(t,n,r,i,o,a,s,l){if(0!==t){if(h||(N(3042),h=!0),5===t)o=o||n,a=a||r,s=s||i,n===f&&o===g||(e.blendEquationSeparate(B[n],B[o]),f=n,g=o),r===p&&i===m&&a===v&&s===y||(e.blendFuncSeparate(z[r],z[i],z[a],z[s]),p=r,m=i,v=a,y=s),d=t,b=null;else if(t!==d||l!==b){if(100===f&&100===g||(e.blendEquation(32774),f=100,g=100),l)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,0,769,771);break;case 4:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFunc(0,769);break;case 4:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}p=null,m=null,v=null,y=null,d=t,b=l}}else h&&(j(3042),h=!1)}function U(t){w!==t&&(t?e.frontFace(2304):e.frontFace(2305),w=t)}function V(t){0!==t?(N(2884),t!==x&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):j(2884),x=t}function G(t,n,r){t?(N(32823),A===n&&S===r||(e.polygonOffset(n,r),A=n,S=r)):j(32823)}function W(t){void 0===t&&(t=33984+M-1),R!==t&&(e.activeTexture(t),R=t)}return{buffers:{color:a,depth:s,stencil:l},enable:N,disable:j,useProgram:function(t){return u!==t&&(e.useProgram(t),u=t,!0)},setBlending:H,setMaterial:function(e,t){2===e.side?j(2884):N(2884);var n=1===e.side;t&&(n=!n),U(n),1===e.blending&&!1===e.transparent?H(0):H(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),s.setFunc(e.depthFunc),s.setTest(e.depthTest),s.setMask(e.depthWrite),a.setMask(e.colorWrite);var r=e.stencilWrite;l.setTest(r),r&&(l.setMask(e.stencilWriteMask),l.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),l.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),G(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:U,setCullFace:V,setLineWidth:function(t){t!==_&&(T&&e.lineWidth(t),_=t)},setPolygonOffset:G,setScissorTest:function(e){e?N(3089):j(3089)},activeTexture:W,bindTexture:function(t,n){null===R&&W();var r=k[R];void 0===r&&(r={type:void 0,texture:void 0},k[R]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||I[t]),r.type=t,r.texture=n)},unbindTexture:function(){var t=k[R];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===P.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),P.copy(t))},viewport:function(t){!1===L.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),L.copy(t))},reset:function(){c={},R=null,k={},u=null,h=null,d=null,f=null,p=null,m=null,g=null,v=null,y=null,b=!1,w=null,x=null,_=null,A=null,S=null,a.reset(),s.reset(),l.reset()}}}function ni(e,t,n,r,i,o,a){var s,l,c,u=i.isWebGL2,h=i.maxTextures,d=i.maxCubemapSize,f=i.maxTextureSize,p=i.maxSamples,m=new WeakMap,v=!1;try{v="undefined"!==typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(H){}function y(e,t){return v?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function b(e,t,n,r){var i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){var o=t?g.floorPowerOfTwo:Math.floor,a=o(i*e.width),s=o(i*e.height);void 0===c&&(c=y(a,s));var l=n?y(a,s):c;return l.width=a,l.height=s,l.getContext("2d").drawImage(e,0,0,a,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+s+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function w(e){return g.isPowerOfTwo(e.width)&&g.isPowerOfTwo(e.height)}function x(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&1006!==e.minFilter}function _(t,n,i,o){e.generateMipmap(t),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function E(n,r,i){if(!1===u)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}var o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function A(e){return 1003===e||1004===e||1005===e?9728:9729}function S(t){var n=t.target;n.removeEventListener("dispose",S),function(t){var n=r.get(t);void 0!==n.__webglInit&&(e.deleteTexture(n.__webglTexture),r.remove(t))}(n),n.isVideoTexture&&m.delete(n),a.memory.textures--}function M(t){var n=t.target;n.removeEventListener("dispose",M),function(t){var n=r.get(t),i=r.get(t.texture);if(t){if(void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(var o=0;o<6;o++)e.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[o]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&e.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer&&e.deleteRenderbuffer(n.__webglColorRenderbuffer),n.__webglDepthRenderbuffer&&e.deleteRenderbuffer(n.__webglDepthRenderbuffer);r.remove(t.texture),r.remove(t)}}(n),a.memory.textures--}var T=0;function C(e,t){var i=r.get(e);if(e.isVideoTexture&&function(e){var t=a.render.frame;m.get(e)!==t&&(m.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){var o=e.image;if(void 0===o)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==o.complete)return void D(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function O(t,i){var a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6===r.image.length){L(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment);for(var a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),s=r.image[0]&&r.image[0].isDataTexture,l=[],c=0;c<6;c++)l[c]=a||s?s?r.image[c].image:r.image[c]:b(r.image[c],!1,!0,d);var h,f=l[0],p=w(f)||u,m=o.convert(r.format),g=o.convert(r.type),v=E(r.internalFormat,m,g);if(P(34067,r,p),a){for(var y=0;y<6;y++){h=l[y].mipmaps;for(var A=0;A<h.length;A++){var S=h[A];1023!==r.format&&1022!==r.format?null!==m?n.compressedTexImage2D(34069+y,A,v,S.width,S.height,0,S.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+y,A,v,S.width,S.height,0,m,g,S.data)}}t.__maxMipLevel=h.length-1}else{h=r.mipmaps;for(var M=0;M<6;M++)if(s){n.texImage2D(34069+M,0,v,l[M].width,l[M].height,0,m,g,l[M].data);for(var T=0;T<h.length;T++){var C=h[T].image[M].image;n.texImage2D(34069+M,T+1,v,C.width,C.height,0,m,g,C.data)}}else{n.texImage2D(34069+M,0,v,m,g,l[M]);for(var O=0;O<h.length;O++){var R=h[O];n.texImage2D(34069+M,O+1,v,m,g,R.image[M])}}t.__maxMipLevel=h.length}x(r,p)&&_(34067,r,f.width,f.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}var R=((s={})[1e3]=10497,s[1001]=33071,s[1002]=33648,s),k=((l={})[1003]=9728,l[1004]=9984,l[1005]=9986,l[1006]=9729,l[1007]=9985,l[1008]=9987,l);function P(n,o,a){a?(e.texParameteri(n,10242,R[o.wrapS]),e.texParameteri(n,10243,R[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,R[o.wrapR]),e.texParameteri(n,10240,k[o.magFilter]),e.texParameteri(n,10241,k[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,A(o.magFilter)),e.texParameteri(n,10241,A(o.minFilter)),1003!==o.minFilter&&1006!==o.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));var s=t.get("EXT_texture_filter_anisotropic");if(s){if(1015===o.type&&null===t.get("OES_texture_float_linear"))return;if(1016===o.type&&null===(u||t.get("OES_texture_half_float_linear")))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function L(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",S),t.__webglTexture=e.createTexture(),a.memory.textures++)}function D(t,r,i){var a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),L(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment);var s,l=function(e){return!u&&(1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&1006!==e.minFilter)}(r)&&!1===w(r.image),c=b(r.image,l,!1,f),h=w(c)||u,d=o.convert(r.format),p=o.convert(r.type),m=E(r.internalFormat,d,p);P(a,r,h);var g=r.mipmaps;if(r.isDepthTexture)m=6402,u?m=1015===r.type?36012:1014===r.type?33190:1020===r.type?35056:33189:1015===r.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===r.format&&6402===m&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,p=o.convert(r.type)),1027===r.format&&6402===m&&(m=34041,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,p=o.convert(r.type))),n.texImage2D(3553,0,m,c.width,c.height,0,d,p,null);else if(r.isDataTexture)if(g.length>0&&h){for(var v=0,y=g.length;v<y;v++)s=g[v],n.texImage2D(3553,v,m,s.width,s.height,0,d,p,s.data);r.generateMipmaps=!1,t.__maxMipLevel=g.length-1}else n.texImage2D(3553,0,m,c.width,c.height,0,d,p,c.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(var A=0,S=g.length;A<S;A++)s=g[A],1023!==r.format&&1022!==r.format?null!==d?n.compressedTexImage2D(3553,A,m,s.width,s.height,0,s.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,A,m,s.width,s.height,0,d,p,s.data);t.__maxMipLevel=g.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,m,c.width,c.height,c.depth,0,d,p,c.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,m,c.width,c.height,c.depth,0,d,p,c.data),t.__maxMipLevel=0;else if(g.length>0&&h){for(var M=0,T=g.length;M<T;M++)s=g[M],n.texImage2D(3553,M,m,d,p,s);r.generateMipmaps=!1,t.__maxMipLevel=g.length-1}else n.texImage2D(3553,0,m,d,p,c),t.__maxMipLevel=0;x(r,h)&&_(a,r,c.width,c.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function I(t,i,a,s){var l=o.convert(i.texture.format),c=o.convert(i.texture.type),u=E(i.texture.internalFormat,l,c);n.texImage2D(s,0,u,i.width,i.height,0,l,c,null),e.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,a,s,r.get(i.texture).__webglTexture,0),e.bindFramebuffer(36160,null)}function N(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){var i=33189;if(r){var a=n.depthTexture;a&&a.isDepthTexture&&(1015===a.type?i=36012:1014===a.type&&(i=33190));var s=B(n);e.renderbufferStorageMultisample(36161,s,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(r){var l=B(n);e.renderbufferStorageMultisample(36161,l,35056,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{var c=o.convert(n.texture.format),u=o.convert(n.texture.type),h=E(n.texture.internalFormat,c,u);if(r){var d=B(n);e.renderbufferStorageMultisample(36161,d,h,n.width,n.height)}else e.renderbufferStorage(36161,h,n.width,n.height)}e.bindRenderbuffer(36161,null)}function j(t){var n=r.get(t),i=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,n){if(n&&n.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),C(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(1026===n.depthTexture.format)e.framebufferTexture2D(36160,36096,3553,i,0);else{if(1027!==n.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,i,0)}}(n.__webglFramebuffer,t)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(36160,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),N(n.__webglDepthbuffer[o],t,!1)}else e.bindFramebuffer(36160,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),N(n.__webglDepthbuffer,t,!1);e.bindFramebuffer(36160,null)}function B(e){return u&&e.isWebGLMultisampleRenderTarget?Math.min(p,e.samples):0}var F=!1,z=!1;this.allocateTextureUnit=function(){var e=T;return e>=h&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+h),T+=1,e},this.resetTextureUnits=function(){T=0},this.setTexture2D=C,this.setTexture2DArray=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=O,this.setupRenderTarget=function(t){var i=r.get(t),s=r.get(t.texture);t.addEventListener("dispose",M),s.__webglTexture=e.createTexture(),a.memory.textures++;var l=!0===t.isWebGLCubeRenderTarget,c=!0===t.isWebGLMultisampleRenderTarget,h=w(t)||u;if(!u||1022!==t.texture.format||1015!==t.texture.type&&1016!==t.texture.type||(t.texture.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),l){i.__webglFramebuffer=[];for(var d=0;d<6;d++)i.__webglFramebuffer[d]=e.createFramebuffer()}else if(i.__webglFramebuffer=e.createFramebuffer(),c)if(u){i.__webglMultisampledFramebuffer=e.createFramebuffer(),i.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,i.__webglColorRenderbuffer);var f=o.convert(t.texture.format),p=o.convert(t.texture.type),m=E(t.texture.internalFormat,f,p),g=B(t);e.renderbufferStorageMultisample(36161,g,m,t.width,t.height),e.bindFramebuffer(36160,i.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,i.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(i.__webglDepthRenderbuffer=e.createRenderbuffer(),N(i.__webglDepthRenderbuffer,t,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(l){n.bindTexture(34067,s.__webglTexture),P(34067,t.texture,h);for(var v=0;v<6;v++)I(i.__webglFramebuffer[v],t,36064,34069+v);x(t.texture,h)&&_(34067,t.texture,t.width,t.height),n.bindTexture(34067,null)}else n.bindTexture(3553,s.__webglTexture),P(3553,t.texture,h),I(i.__webglFramebuffer,t,36064,3553),x(t.texture,h)&&_(3553,t.texture,t.width,t.height),n.bindTexture(3553,null);t.depthBuffer&&j(t)},this.updateRenderTargetMipmap=function(e){var t=e.texture;if(x(t,w(e)||u)){var i=e.isWebGLCubeRenderTarget?34067:3553,o=r.get(t).__webglTexture;n.bindTexture(i,o),_(i,t,e.width,e.height),n.bindTexture(i,null)}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(u){var n=r.get(t);e.bindFramebuffer(36008,n.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,n.__webglFramebuffer);var i=t.width,o=t.height,a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),e.bindFramebuffer(36160,n.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===F&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),F=!0),e=e.texture),C(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===z&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),z=!0),e=e.texture),O(e,t)}}function ri(e,t,n){var r=n.isWebGL2;return{convert:function(e){var n;if(1009===e)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1019===e)return 33635;if(1010===e)return 5120;if(1011===e)return 5122;if(1012===e)return 5123;if(1013===e)return 5124;if(1014===e)return 5125;if(1015===e)return 5126;if(1016===e)return r?5131:null!==(n=t.get("OES_texture_half_float"))?n.HALF_FLOAT_OES:null;if(1021===e)return 6406;if(1022===e)return 6407;if(1023===e)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(1026===e)return 6402;if(1027===e)return 34041;if(1028===e)return 6403;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1032===e)return 36248;if(1033===e)return 36249;if(33776===e||33777===e||33778===e||33779===e){if(null===(n=t.get("WEBGL_compressed_texture_s3tc")))return null;if(33776===e)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===e)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===e)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===e)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(null===(n=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(35840===e)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return null!==(n=t.get("WEBGL_compressed_texture_etc1"))?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((37492===e||37496===e)&&null!==(n=t.get("WEBGL_compressed_texture_etc"))){if(37492===e)return n.COMPRESSED_RGB8_ETC2;if(37496===e)return n.COMPRESSED_RGBA8_ETC2_EAC}return 37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e||37840===e||37841===e||37842===e||37843===e||37844===e||37845===e||37846===e||37847===e||37848===e||37849===e||37850===e||37851===e||37852===e||37853===e?null!==(n=t.get("WEBGL_compressed_texture_astc"))?e:null:36492===e?null!==(n=t.get("EXT_texture_compression_bptc"))?e:null:1020===e?r?34042:null!==(n=t.get("WEBGL_depth_texture"))?n.UNSIGNED_INT_24_8_WEBGL:null:void 0}}}function ii(){Me.call(this),this.type="Group"}function oi(e){void 0===e&&(e=[]),Yt.call(this),this.cameras=e}Jr.prototype=Object.create(Ze.prototype),Jr.prototype.constructor=Jr,Jr.prototype.isMeshDepthMaterial=!0,Jr.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},$r.prototype=Object.create(Ze.prototype),$r.prototype.constructor=$r,$r.prototype.isMeshDistanceMaterial=!0,$r.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this},ii.prototype=Object.assign(Object.create(Me.prototype),{constructor:ii,isGroup:!0}),oi.prototype=Object.assign(Object.create(Yt.prototype),{constructor:oi,isArrayCamera:!0});var ai=new T,si=new T;function li(e){var t,n,r=this,i=null,o=null,a=null,s=[],l=new te,c=new te,u=1,h="local-floor";"undefined"!==typeof window&&"VRFrameData"in window&&(o=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",x,!1));var d=new te,f=new M,p=new T,m=new Yt;m.viewport=new E,m.layers.enable(1);var g=new Yt;g.viewport=new E,g.layers.enable(2);var y=new oi([m,g]);y.layers.enable(1),y.layers.enable(2);var b,w=new v;function x(){if(r.isPresenting=null!==i&&!0===i.isPresenting){var o=i.getEyeParameters("left");t=2*o.renderWidth*u,n=o.renderHeight*u,b=e.getPixelRatio(),e.getSize(w),e.setDrawingBufferSize(t,n,1),m.viewport.set(0,0,t/2,n),g.viewport.set(t/2,0,t/2,n),O.start(),r.dispatchEvent({type:"sessionstart"})}else r.enabled&&e.setDrawingBufferSize(w.width,w.height,b),O.stop(),r.dispatchEvent({type:"sessionend"})}var _=[],A=[];function S(e){for(var t=navigator.getGamepads&&navigator.getGamepads(),n=0,r=t.length;n<r;n++){var i=t[n];if(i&&("Daydream Controller"===i.id||"Gear VR Controller"===i.id||"Oculus Go Controller"===i.id||"OpenVR Gamepad"===i.id||i.id.startsWith("Oculus Touch")||i.id.startsWith("HTC Vive Focus")||i.id.startsWith("Spatial Controller"))){var o=i.hand;if(0===e&&(""===o||"right"===o))return i;if(1===e&&"left"===o)return i}}}function C(e,r){null!==r&&4===r.length&&e.set(r[0]*t,r[1]*n,r[2]*t,r[3]*n)}this.enabled=!1,this.getController=function(e){var t=s[e];return void 0===t&&((t=new ii).matrixAutoUpdate=!1,t.visible=!1,s[e]=t),t},this.getDevice=function(){return i},this.setDevice=function(e){void 0!==e&&(i=e),O.setContext(e)},this.setFramebufferScaleFactor=function(e){u=e},this.setReferenceSpaceType=function(e){h=e},this.setPoseTarget=function(e){void 0!==e&&(a=e)},this.getCamera=function(e){var t="local-floor"===h?1.6:0;if(i.depthNear=e.near,i.depthFar=e.far,i.getFrameData(o),"local-floor"===h){var n=i.stageParameters;n?l.fromArray(n.sittingToStandingTransform):l.makeTranslation(0,t,0)}var r=o.pose,u=null!==a?a:e;u.matrix.copy(l),u.matrix.decompose(u.position,u.quaternion,u.scale),null!==r.orientation&&(f.fromArray(r.orientation),u.quaternion.multiply(f)),null!==r.position&&(f.setFromRotationMatrix(l),p.fromArray(r.position),p.applyQuaternion(f),u.position.add(p)),u.updateMatrixWorld();for(var v=u.children,b=0,w=v.length;b<w;b++)v[b].updateMatrixWorld(!0);m.near=e.near,g.near=e.near,m.far=e.far,g.far=e.far,m.matrixWorldInverse.fromArray(o.leftViewMatrix),g.matrixWorldInverse.fromArray(o.rightViewMatrix),c.getInverse(l),"local-floor"===h&&(m.matrixWorldInverse.multiply(c),g.matrixWorldInverse.multiply(c));var x=u.parent;null!==x&&(d.getInverse(x.matrixWorld),m.matrixWorldInverse.multiply(d),g.matrixWorldInverse.multiply(d)),m.matrixWorld.getInverse(m.matrixWorldInverse),g.matrixWorld.getInverse(g.matrixWorldInverse),m.projectionMatrix.fromArray(o.leftProjectionMatrix),g.projectionMatrix.fromArray(o.rightProjectionMatrix),function(e,t,n){ai.setFromMatrixPosition(t.matrixWorld),si.setFromMatrixPosition(n.matrixWorld);var r=ai.distanceTo(si),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.getInverse(e.matrixWorld);var g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(y,m,g);var E=i.getLayers();if(E.length){var M=E[0];C(m.viewport,M.leftBounds),C(g.viewport,M.rightBounds)}return function(){for(var e=0;e<s.length;e++){var t=s[e],n=S(e);if(void 0!==n&&void 0!==n.pose){if(null===n.pose)return;var r=n.pose;!1===r.hasPosition&&t.position.set(.2,-.6,-.05),null!==r.position&&t.position.fromArray(r.position),null!==r.orientation&&t.quaternion.fromArray(r.orientation),t.matrix.compose(t.position,t.quaternion,t.scale),t.matrix.premultiply(l),t.matrix.decompose(t.position,t.quaternion,t.scale),t.matrixWorldNeedsUpdate=!0,t.visible=!0;var i="Daydream Controller"===n.id?0:1;void 0===_[e]&&(_[e]=!1),_[e]!==n.buttons[i].pressed&&(_[e]=n.buttons[i].pressed,!0===_[e]?t.dispatchEvent({type:"selectstart"}):(t.dispatchEvent({type:"selectend"}),t.dispatchEvent({type:"select"}))),i=2,void 0===A[e]&&(A[e]=!1),void 0!==n.buttons[i]&&A[e]!==n.buttons[i].pressed&&(A[e]=n.buttons[i].pressed,!0===A[e]?t.dispatchEvent({type:"squeezestart"}):(t.dispatchEvent({type:"squeezeend"}),t.dispatchEvent({type:"squeeze"})))}else t.visible=!1}}(),y},this.getStandingMatrix=function(){return l},this.isPresenting=!1;var O=new nn;this.setAnimationLoop=function(e){O.setAnimationLoop(e),this.isPresenting&&O.start()},this.submitFrame=function(){this.isPresenting&&i.submitFrame()},this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",x)},this.setFrameOfReferenceType=function(){console.warn("THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.")}}function ci(){this._targetRay=null,this._grip=null,this._hand=null}function ui(e,t){var n,r=this,o=null,a=1,s=null,l="local-floor",c=null,u=null,h=[],d=new Map,f=[],p=new Yt;p.layers.enable(1),p.viewport=new E;var m=new Yt;m.layers.enable(2),m.viewport=new E;var g=[p,m],v=new oi;v.layers.enable(1),v.layers.enable(2);var y=null,b=null;function w(e){var t=d.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function x(){d.forEach((function(e,t){e.disconnect(t)})),d.clear(),y=null,b=null,e.setFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),O.stop(),r.isPresenting=!1,r.dispatchEvent({type:"sessionend"})}function _(e){for(var t=o.inputSources,n=0;n<h.length;n++)d.set(t[n],h[n]);for(var r=0;r<e.removed.length;r++){var i=e.removed[r],a=d.get(i);a&&(a.dispatchEvent({type:"disconnected",data:i}),d.delete(i))}for(var s=0;s<e.added.length;s++){var l=e.added[s],c=d.get(l);c&&c.dispatchEvent({type:"connected",data:l})}}this.layersEnabled=!1,this.enabled=!1,this.isPresenting=!1,this.getCameraPose=function(){return c},this.getController=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getGripSpace()},this.getHand=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){a=e,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){l=e,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getSession=function(){return o},this.setSession=function(){var e,c=(e=regeneratorRuntime.mark((function e(i){var c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(o=i)){e.next=24;break}if(o.addEventListener("select",w),o.addEventListener("selectstart",w),o.addEventListener("selectend",w),o.addEventListener("squeeze",w),o.addEventListener("squeezestart",w),o.addEventListener("squeezeend",w),o.addEventListener("end",x),o.addEventListener("inputsourceschange",_),!0===(c=t.getContextAttributes()).xrCompatible){e.next=14;break}return e.next=14,t.makeXRCompatible();case 14:return u={antialias:c.antialias,alpha:c.alpha,depth:c.depth,stencil:c.stencil,framebufferScaleFactor:a},n=new XRWebGLLayer(o,t,u),window.XRWebGLBinding&&this.layersEnabled?this.addLayer(n):o.updateRenderState({baseLayer:n}),e.next=19,o.requestReferenceSpace(l);case 19:s=e.sent,O.setContext(o),O.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"});case 24:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))});return function(e){return c.apply(this,arguments)}}(),this.addLayer=function(e){window.XRWebGLBinding&&this.layersEnabled&&o&&(f.push(e),o.updateRenderState({layers:f}))},this.removeLayer=function(e){window.XRWebGLBinding&&this.layersEnabled&&o&&(f.splice(f.indexOf(e),1),o.updateRenderState({layers:f}))};var A=new T,S=new T;function M(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.setPoseTarget=function(e){void 0!==e&&(u=e)},this.getCamera=function(e){v.near=m.near=p.near=e.near,v.far=m.far=p.far=e.far,y===v.near&&b===v.far||(o.updateRenderState({depthNear:v.near,depthFar:v.far}),y=v.near,b=v.far);var t=e.parent,n=v.cameras,r=u||e;M(v,t);for(var i=0;i<n.length;i++)M(n[i],t);r.matrixWorld.copy(v.matrixWorld);for(var a=r.children,s=0,l=a.length;s<l;s++)a[s].updateMatrixWorld(!0);return 2===n.length?function(e,t,n){A.setFromMatrixPosition(t.matrixWorld),S.setFromMatrixPosition(n.matrixWorld);var r=A.distanceTo(S),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();var g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(v,p,m):v.projectionMatrix.copy(p.projectionMatrix),v};var C=null,O=new nn;O.setAnimationLoop((function(t,r){if(null!==(c=r.getViewerPose(s))){var i=c.views;e.setFramebuffer(n.framebuffer);var a=!1;i.length!==v.cameras.length&&(v.cameras.length=0,a=!0);for(var l=0;l<i.length;l++){var u=i[l],d=n.getViewport(u),f=g[l];f.matrix.fromArray(u.transform.matrix),f.projectionMatrix.fromArray(u.projectionMatrix),f.viewport.set(d.x,d.y,d.width,d.height),0===l&&v.matrix.copy(f.matrix),!0===a&&v.cameras.push(f)}}for(var p=o.inputSources,m=0;m<h.length;m++){var y=h[m],b=p[m];y.update(b,r,s)}C&&C(t,r)})),this.setAnimationLoop=function(e){C=e},this.dispose=function(){}}function hi(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap);var r,i,o=e.get(n).envMap;if(o){t.envMap.value=o,t.flipEnvMap.value=o.isCubeTexture&&o._needsFlipEnvMap?-1:1,t.reflectivity.value=n.reflectivity,t.refractionRatio.value=n.refractionRatio;var a=e.get(o).__maxMipLevel;void 0!==a&&(t.maxMipLevel.value=a)}n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?r=n.map:n.specularMap?r=n.specularMap:n.displacementMap?r=n.displacementMap:n.normalMap?r=n.normalMap:n.bumpMap?r=n.bumpMap:n.roughnessMap?r=n.roughnessMap:n.metalnessMap?r=n.metalnessMap:n.alphaMap?r=n.alphaMap:n.emissiveMap?r=n.emissiveMap:n.clearcoatMap?r=n.clearcoatMap:n.clearcoatNormalMap?r=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(r=n.clearcoatRoughnessMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix)),n.aoMap?i=n.aoMap:n.lightMap&&(i=n.lightMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uv2Transform.value.copy(i.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,1===n.side&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),1===n.side&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias),e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t){n(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen),t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,1===t.side&&e.clearcoatNormalScale.value.negate()),e.transmission.value=t.transmission,t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap)}(e,r):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){var i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){var n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function di(e){var t=void 0!==(e=e||{}).canvas?e.canvas:function(){var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,a=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat,h=null,d=null,f=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p=this,m=!1,y=null,b=0,w=0,x=null,_=null,A=-1,S=null,M=new E,C=new E,O=null,R=t.width,k=t.height,P=1,L=null,D=null,I=new E(0,0,R,k),N=new E(0,0,R,k),j=!1,B=new tn,F=!1,z=!1,H=new te,U=new T,V={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function G(){return null===x?P:1}var W,q,X,Y,K,Q,Z,J,$,ee,ne,re,ie,oe,ae,se,le,ce,ue,he,de,fe=n;function pe(e,n){for(var r=0;r<e.length;r++){var i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{var me={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if(t.addEventListener("webglcontextlost",we,!1),t.addEventListener("webglcontextrestored",xe,!1),null===fe){var ge=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&ge.shift(),null===(fe=pe(ge,me)))throw pe(ge)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===fe.getShaderPrecisionFormat&&(fe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(ke){throw console.error("THREE.WebGLRenderer: "+ke.message),ke}function ve(){W=new mn(fe),q=new dn(fe,W,e),W.init(q),he=new ri(fe,W,q),(X=new ti(fe,W,q)).scissor(C.copy(N).multiplyScalar(P).floor()),X.viewport(M.copy(I).multiplyScalar(P).floor()),Y=new yn(fe),K=new Hr,Q=new ni(fe,W,X,K,q,he,Y),Z=new pn(p),J=new rn(fe,q),de=new un(fe,W,J,q),$=new gn(fe,J,Y,de),ee=new _n(fe,$,J,Y),le=new xn(fe),ae=new fn(K),ne=new zr(p,Z,W,q,de,ae),re=new hi(K),ie=new Wr(K),oe=new Zr(W,q),se=new cn(p,Z,X,ee,s),ce=new hn(fe,W,Y,q),ue=new vn(fe,W,Y,q),Y.programs=ne.programs,p.capabilities=q,p.extensions=W,p.properties=K,p.renderLists=ie,p.state=X,p.info=Y}ve();var ye="undefined"!==typeof navigator&&"xr"in navigator?new ui(p,fe):new li(p);this.xr=ye;var be=new ei(p,ee,q.maxTextureSize);function we(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),m=!0}function xe(){console.log("THREE.WebGLRenderer: Context Restored."),m=!1,ve()}function _e(e){var t=e.target;t.removeEventListener("dispose",_e),function(e){Ee(e),K.remove(e)}(t)}function Ee(e){var t=K.get(e).program;void 0!==t&&ne.releaseProgram(t)}this.shadowMap=be,this.getContext=function(){return fe},this.getContextAttributes=function(){return fe.getContextAttributes()},this.forceContextLoss=function(){var e=W.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=W.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return P},this.setPixelRatio=function(e){void 0!==e&&(P=e,this.setSize(R,k,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new v),e.set(R,k)},this.setSize=function(e,n,r){ye.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=e,k=n,t.width=Math.floor(e*P),t.height=Math.floor(n*P),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new v),e.set(R*P,k*P).floor()},this.setDrawingBufferSize=function(e,n,r){R=e,k=n,P=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new E),e.copy(M)},this.getViewport=function(e){return e.copy(I)},this.setViewport=function(e,t,n,r){e.isVector4?I.set(e.x,e.y,e.z,e.w):I.set(e,t,n,r),X.viewport(M.copy(I).multiplyScalar(P).floor())},this.getScissor=function(e){return e.copy(N)},this.setScissor=function(e,t,n,r){e.isVector4?N.set(e.x,e.y,e.z,e.w):N.set(e,t,n,r),X.scissor(C.copy(N).multiplyScalar(P).floor())},this.getScissorTest=function(){return j},this.setScissorTest=function(e){X.setScissorTest(j=e)},this.setOpaqueSort=function(e){L=e},this.setTransparentSort=function(e){D=e},this.getClearColor=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getClearColor() now requires a Color as an argument"),e=new Ye),e.copy(se.getClearColor())},this.setClearColor=function(){se.setClearColor.apply(se,arguments)},this.getClearAlpha=function(){return se.getClearAlpha()},this.setClearAlpha=function(){se.setClearAlpha.apply(se,arguments)},this.clear=function(e,t,n){var r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),fe.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",we,!1),t.removeEventListener("webglcontextrestored",xe,!1),ie.dispose(),oe.dispose(),K.dispose(),Z.dispose(),ee.dispose(),de.dispose(),ye.dispose(),Se.stop()},this.renderBufferImmediate=function(e,t){de.initAttributes();var n=K.get(e);e.hasPositions&&!n.position&&(n.position=fe.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=fe.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=fe.createBuffer()),e.hasColors&&!n.color&&(n.color=fe.createBuffer());var r=t.getAttributes();e.hasPositions&&(fe.bindBuffer(34962,n.position),fe.bufferData(34962,e.positionArray,35048),de.enableAttribute(r.position),fe.vertexAttribPointer(r.position,3,5126,!1,0,0)),e.hasNormals&&(fe.bindBuffer(34962,n.normal),fe.bufferData(34962,e.normalArray,35048),de.enableAttribute(r.normal),fe.vertexAttribPointer(r.normal,3,5126,!1,0,0)),e.hasUvs&&(fe.bindBuffer(34962,n.uv),fe.bufferData(34962,e.uvArray,35048),de.enableAttribute(r.uv),fe.vertexAttribPointer(r.uv,2,5126,!1,0,0)),e.hasColors&&(fe.bindBuffer(34962,n.color),fe.bufferData(34962,e.colorArray,35048),de.enableAttribute(r.color),fe.vertexAttribPointer(r.color,3,5126,!1,0,0)),de.disableUnusedAttributes(),fe.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=V);var a=i.isMesh&&i.matrixWorld.determinant()<0,s=Re(e,t,r,i);X.setMaterial(r,a);var l=n.index,c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;var u,h=1;!0===r.wireframe&&(l=$.getWireframeAttribute(n),h=2),(r.morphTargets||r.morphNormals)&&le.update(i,n,r,s),de.setup(i,r,s,n,l);var d=ce;null!==l&&(u=J.get(l),(d=ue).setIndex(u));var f=null!==l?l.count:c.count,p=n.drawRange.start*h,m=n.drawRange.count*h,g=null!==o?o.start*h:0,v=null!==o?o.count*h:1/0,y=Math.max(p,g),b=Math.min(f,p+m,g+v)-1,w=Math.max(0,b-y+1);if(0!==w){if(i.isMesh)!0===r.wireframe?(X.setLineWidth(r.wireframeLinewidth*G()),d.setMode(1)):d.setMode(4);else if(i.isLine){var x=r.linewidth;void 0===x&&(x=1),X.setLineWidth(x*G()),i.isLineSegments?d.setMode(1):i.isLineLoop?d.setMode(2):d.setMode(3)}else i.isPoints?d.setMode(0):i.isSprite&&d.setMode(4);if(i.isInstancedMesh)d.renderInstances(y,w,i.count);else if(n.isInstancedBufferGeometry){var _=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(y,w,_)}else d.render(y,w)}},this.compile=function(e,t){(d=oe.get(e)).init(),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(d.pushLight(e),e.castShadow&&d.pushShadow(e))})),d.setupLights();var n=new WeakMap;e.traverse((function(t){var r=t.material;if(r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var o=r[i];!1===n.has(o)&&(Oe(o,e,t),n.set(o))}else!1===n.has(r)&&(Oe(r,e,t),n.set(r))}))};var Ae=null,Se=new nn;function Me(e,t,n,r){if(!1!==e.visible){if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)d.pushLight(e),e.castShadow&&d.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||B.intersectsSprite(e)){r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);var i=ee.update(e),o=e.material;o.visible&&h.push(e,i,o,n,U.z,null)}}else if(e.isImmediateRenderObject)r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H),h.push(e,null,e.material,n,U.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==Y.render.frame&&(e.skeleton.update(),e.skeleton.frame=Y.render.frame),!e.frustumCulled||B.intersectsObject(e))){r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);var a=ee.update(e),s=e.material;if(Array.isArray(s))for(var l=a.groups,c=0,u=l.length;c<u;c++){var f=l[c],p=s[f.materialIndex];p&&p.visible&&h.push(e,a,p,n,U.z,f)}else s.visible&&h.push(e,a,s,n,U.z,null)}for(var m=e.children,g=0,v=m.length;g<v;g++)Me(m[g],t,n,r)}}function Te(e,t,n){for(var r=!0===t.isScene?t.overrideMaterial:null,i=0,o=e.length;i<o;i++){var a=e[i],s=a.object,l=a.geometry,c=null===r?a.material:r,u=a.group;if(n.isArrayCamera)for(var h=n.cameras,f=0,p=h.length;f<p;f++){var m=h[f];s.layers.test(m.layers)&&(X.viewport(M.copy(m.viewport)),d.setupLightsView(m),Ce(s,t,m,l,c,u))}else Ce(s,t,n,l,c,u)}}function Ce(e,t,n,r,i,o){if(e.onBeforeRender(p,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var a=Re(n,t,i,e);X.setMaterial(i),de.reset(),function(e,t){e.render((function(e){p.renderBufferImmediate(e,t)}))}(e,a)}else p.renderBufferDirect(n,t,r,i,e,o);e.onAfterRender(p,t,n,r,i,o)}function Oe(e,t,n){!0!==t.isScene&&(t=V);var r=K.get(e),i=d.state.lights,o=d.state.shadowsArray,a=i.state.version,s=ne.getParameters(e,i.state,o,t,n),l=ne.getProgramCacheKey(s),c=r.program,u=!0;if(r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=Z.get(e.envMap||r.environment),void 0===c)e.addEventListener("dispose",_e);else if(c.cacheKey!==l)Ee(e);else if(r.lightsStateVersion!==a)u=!1;else{if(void 0!==s.shaderID)return;u=!1}u&&(s.uniforms=ne.getUniforms(e),e.onBeforeCompile(s,p),c=ne.acquireProgram(s,l),r.program=c,r.uniforms=s.uniforms,r.outputEncoding=s.outputEncoding);var h=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=ae.numPlanes,r.numIntersection=ae.numIntersection,h.clippingPlanes=ae.uniform),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotShadowMatrix.value=i.state.spotShadowMatrix,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix);var f=r.program.getUniforms(),m=br.seqWithValue(f.seq,h);r.uniformsList=m}function Re(e,t,n,r){!0!==t.isScene&&(t=V),Q.resetTextureUnits();var i=t.fog,o=n.isMeshStandardMaterial?t.environment:null,a=null===x?p.outputEncoding:x.texture.encoding,s=Z.get(n.envMap||o),l=K.get(n),c=d.state.lights;if(!0===F&&(!0===z||e!==S)){var u=e===S&&n.id===A;ae.setState(n,e,u)}n.version===l.__version?n.fog&&l.fog!==i||l.environment!==o||l.needsLights&&l.lightsStateVersion!==c.state.version?Oe(n,t,r):void 0===l.numClippingPlanes||l.numClippingPlanes===ae.numPlanes&&l.numIntersection===ae.numIntersection?(l.outputEncoding!==a||l.envMap!==s)&&Oe(n,t,r):Oe(n,t,r):(Oe(n,t,r),l.__version=n.version);var h=!1,f=!1,m=!1,v=l.program,y=v.getUniforms(),b=l.uniforms;if(X.useProgram(v.program)&&(h=!0,f=!0,m=!0),n.id!==A&&(A=n.id,f=!0),h||S!==e){if(y.setValue(fe,"projectionMatrix",e.projectionMatrix),q.logarithmicDepthBuffer&&y.setValue(fe,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),S!==e&&(S=e,f=!0,m=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){var w=y.map.cameraPosition;void 0!==w&&w.setValue(fe,U.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(fe,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||n.skinning)&&y.setValue(fe,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){y.setOptional(fe,r,"bindMatrix"),y.setOptional(fe,r,"bindMatrixInverse");var _=r.skeleton;if(_){var E=_.bones;if(q.floatVertexTextures){if(null===_.boneTexture){var M=Math.sqrt(4*E.length);M=g.ceilPowerOfTwo(M),M=Math.max(M,4);var T=new Float32Array(M*M*4);T.set(_.boneMatrices);var C=new Jt(T,M,M,1023,1015);_.boneMatrices=T,_.boneTexture=C,_.boneTextureSize=M}y.setValue(fe,"boneTexture",_.boneTexture,Q),y.setValue(fe,"boneTextureSize",_.boneTextureSize)}else y.setOptional(fe,_,"boneMatrices")}}return(f||l.receiveShadow!==r.receiveShadow)&&(l.receiveShadow=r.receiveShadow,y.setValue(fe,"receiveShadow",r.receiveShadow)),f&&(y.setValue(fe,"toneMappingExposure",p.toneMappingExposure),l.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(b,m),i&&n.fog&&re.refreshFogUniforms(b,i),re.refreshMaterialUniforms(b,n,P,k),br.upload(fe,l.uniformsList,b,Q)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(br.upload(fe,l.uniformsList,b,Q),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(fe,"center",r.center),y.setValue(fe,"modelViewMatrix",r.modelViewMatrix),y.setValue(fe,"normalMatrix",r.normalMatrix),y.setValue(fe,"modelMatrix",r.matrixWorld),v}Se.setAnimationLoop((function(e){ye.isPresenting||Ae&&Ae(e)})),"undefined"!==typeof window&&Se.setContext(window),this.setAnimationLoop=function(e){Ae=e,ye.setAnimationLoop(e),null===e?Se.stop():Se.start()},this.render=function(e,t){var n,r;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),r=arguments[3]),void 0===t||!0===t.isCamera){if(!0!==m){de.resetDefaultState(),A=-1,S=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===ye.enabled&&!0===ye.isPresenting&&(t=ye.getCamera(t)),!0===e.isScene&&e.onBeforeRender(p,e,t,n||x),(d=oe.get(e,f.length)).init(),f.push(d),H.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),B.setFromProjectionMatrix(H),z=this.localClippingEnabled,F=ae.init(this.clippingPlanes,z,t),(h=ie.get(e,t)).init(),Me(e,t,0,p.sortObjects),h.finish(),!0===p.sortObjects&&h.sort(L,D),!0===F&&ae.beginShadows();var i=d.state.shadowsArray;be.render(i,e,t),d.setupLights(),d.setupLightsView(t),!0===F&&ae.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),se.render(h,e,t,r);var o=h.opaque,a=h.transparent;o.length>0&&Te(o,e,t),a.length>0&&Te(a,e,t),!0===e.isScene&&e.onAfterRender(p,e,t),null!==x&&(Q.updateRenderTargetMipmap(x),Q.updateMultisampleRenderTarget(x)),X.buffers.depth.setTest(!0),X.buffers.depth.setMask(!0),X.buffers.color.setMask(!0),X.setPolygonOffset(!1),ye.enabled&&ye.submitFrame&&ye.submitFrame(),f.pop(),d=f.length>0?f[f.length-1]:null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setTexture2D=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTarget&&(e||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),Q.setTexture2D(t,n)}}(),this.setFramebuffer=function(e){y!==e&&null===x&&fe.bindFramebuffer(36160,e),y=e},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return w},this.getRenderList=function(){return h},this.setRenderList=function(e){h=e},this.getRenderTarget=function(){return x},this.setRenderTarget=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),x=e,b=t,w=n,e&&void 0===K.get(e).__webglFramebuffer&&Q.setupRenderTarget(e);var r=y,i=!1;if(e){var o=K.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=o[t],i=!0):r=e.isWebGLMultisampleRenderTarget?K.get(e).__webglMultisampledFramebuffer:o,M.copy(e.viewport),C.copy(e.scissor),O=e.scissorTest}else M.copy(I).multiplyScalar(P).floor(),C.copy(N).multiplyScalar(P).floor(),O=j;if(_!==r&&(fe.bindFramebuffer(36160,r),_=r),X.viewport(M),X.scissor(C),X.setScissorTest(O),i){var a=K.get(e.texture);fe.framebufferTexture2D(36160,36064,34069+t,a.__webglTexture,n)}},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(e&&e.isWebGLRenderTarget){var s=K.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){var l=!1;s!==_&&(fe.bindFramebuffer(36160,s),l=!0);try{var c=e.texture,u=c.format,h=c.type;if(1023!==u&&he.convert(u)!==fe.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");var d=1016===h&&(W.has("EXT_color_buffer_half_float")||q.isWebGL2&&W.has("EXT_color_buffer_float"));if(1009!==h&&he.convert(h)!==fe.getParameter(35738)&&(1015!==h||!(q.isWebGL2||W.has("OES_texture_float")||W.has("WEBGL_color_buffer_float")))&&!d)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===fe.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&fe.readPixels(t,n,r,i,he.convert(u),he.convert(h),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{l&&fe.bindFramebuffer(36160,_)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){void 0===n&&(n=0);var r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r),a=he.convert(t.format);Q.setTexture2D(t,0),fe.copyTexImage2D(3553,n,a,e.x,e.y,i,o,0),X.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r){void 0===r&&(r=0);var i=t.image.width,o=t.image.height,a=he.convert(n.format),s=he.convert(n.type);Q.setTexture2D(n,0),fe.pixelStorei(37440,n.flipY),fe.pixelStorei(37441,n.premultiplyAlpha),fe.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?fe.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?fe.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):fe.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&fe.generateMipmap(3553),X.unbindTexture()},this.initTexture=function(e){Q.setTexture2D(e,0),X.unbindTexture()},this.resetState=function(){X.reset(),de.reset()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function fi(e){di.call(this,e)}Object.assign(li.prototype,h.prototype),Object.assign(ci.prototype,{constructor:ci,getHandSpace:function(){return null===this._hand&&(this._hand=new ii,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand},getTargetRaySpace:function(){return null===this._targetRay&&(this._targetRay=new ii,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1),this._targetRay},getGripSpace:function(){return null===this._grip&&(this._grip=new ii,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1),this._grip},dispatchEvent:function(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this},disconnect:function(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this},update:function(e,t,n){var r=null,i=null,o=null,a=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(l&&e.hand){o=!0;for(var c,h=u(e.hand.values());!(c=h()).done;){var d=c.value,f=t.getJointPose(d,n);if(void 0===l.joints[d.jointName]){var p=new ii;p.matrixAutoUpdate=!1,p.visible=!1,l.joints[d.jointName]=p,l.add(p)}var m=l.joints[d.jointName];null!==f&&(m.matrix.fromArray(f.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.jointRadius=f.radius),m.visible=null!==f}var g=l.joints["index-finger-tip"],v=l.joints["thumb-tip"],y=g.position.distanceTo(v.position);l.inputState.pinching&&y>.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&y<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==a&&null!==(r=t.getPose(e.targetRaySpace,n))&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale)),null!==s&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,n))&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==o),this}}),Object.assign(ui.prototype,h.prototype),fi.prototype=Object.assign(Object.create(di.prototype),{constructor:fi,isWebGL1Renderer:!0});var pi=function(){function e(e,t){Object.defineProperty(this,"isFogExp2",{value:!0}),this.name="",this.color=new Ye(e),this.density=void 0!==t?t:25e-5}var t=e.prototype;return t.clone=function(){return new e(this.color,this.density)},t.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},e}(),mi=function(){function e(e,t,n){Object.defineProperty(this,"isFog",{value:!0}),this.name="",this.color=new Ye(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}var t=e.prototype;return t.clone=function(){return new e(this.color,this.near,this.far)},t.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},e}(),gi=function(e){function t(){var t;return t=e.call(this)||this,Object.defineProperty(l(t),"isScene",{value:!0}),t.type="Scene",t.background=null,t.environment=null,t.fog=null,t.overrideMaterial=null,t.autoUpdate=!0,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:l(t)})),t}s(t,e);var n=t.prototype;return n.copy=function(t,n){return e.prototype.copy.call(this,t,n),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},n.toJSON=function(t){var n=e.prototype.toJSON.call(this,t);return null!==this.background&&(n.object.background=this.background.toJSON(t)),null!==this.environment&&(n.object.environment=this.environment.toJSON(t)),null!==this.fog&&(n.object.fog=this.fog.toJSON()),n},t}(Me);function vi(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=g.generateUUID()}Object.defineProperty(vi.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(vi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=g.generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);var t=new vi(new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),this.stride);return t.setUsage(this.usage),t},onUpload:function(e){return this.onUploadCallback=e,this},toJSON:function(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=g.generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}});var yi,bi=new T;function wi(e,t,n,r){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function xi(e){Ze.call(this),this.type="SpriteMaterial",this.color=new Ye(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}Object.defineProperties(wi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}},needsUpdate:{set:function(e){this.data.needsUpdate=e}}}),Object.assign(wi.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(e){for(var t=0,n=this.data.count;t<n;t++)bi.x=this.getX(t),bi.y=this.getY(t),bi.z=this.getZ(t),bi.applyMatrix4(e),this.setXYZ(t,bi.x,bi.y,bi.z);return this},setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this},clone:function(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");for(var t=[],n=0;n<this.count;n++)for(var r=n*this.data.stride+this.offset,i=0;i<this.itemSize;i++)t.push(this.data.array[r+i]);return new tt(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new wi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)},toJSON:function(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");for(var t=[],n=0;n<this.count;n++)for(var r=n*this.data.stride+this.offset,i=0;i<this.itemSize;i++)t.push(this.data.array[r+i]);return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}),xi.prototype=Object.create(Ze.prototype),xi.prototype.constructor=xi,xi.prototype.isSpriteMaterial=!0,xi.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this};var _i=new T,Ei=new T,Ai=new T,Si=new v,Mi=new v,Ti=new te,Ci=new T,Oi=new T,Ri=new T,ki=new v,Pi=new v,Li=new v;function Di(e){if(Me.call(this),this.type="Sprite",void 0===yi){yi=new _t;var t=new vi(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);yi.setIndex([0,1,2,0,2,3]),yi.setAttribute("position",new wi(t,3,0,!1)),yi.setAttribute("uv",new wi(t,2,3,!1))}this.geometry=yi,this.material=void 0!==e?e:new xi,this.center=new v(.5,.5)}function Ii(e,t,n,r,i,o){Si.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Mi.x=o*Si.x-i*Si.y,Mi.y=i*Si.x+o*Si.y):Mi.copy(Si),e.copy(t),e.x+=Mi.x,e.y+=Mi.y,e.applyMatrix4(Ti)}Di.prototype=Object.assign(Object.create(Me.prototype),{constructor:Di,isSprite:!0,raycast:function(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ei.setFromMatrixScale(this.matrixWorld),Ti.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ai.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Ei.multiplyScalar(-Ai.z);var n,r,i=this.material.rotation;0!==i&&(r=Math.cos(i),n=Math.sin(i));var o=this.center;Ii(Ci.set(-.5,-.5,0),Ai,o,Ei,n,r),Ii(Oi.set(.5,-.5,0),Ai,o,Ei,n,r),Ii(Ri.set(.5,.5,0),Ai,o,Ei,n,r),ki.set(0,0),Pi.set(1,0),Li.set(1,1);var a=e.ray.intersectTriangle(Ci,Oi,Ri,!1,_i);if(null!==a||(Ii(Oi.set(-.5,.5,0),Ai,o,Ei,n,r),Pi.set(0,1),null!==(a=e.ray.intersectTriangle(Ci,Ri,Oi,!1,_i)))){var s=e.ray.origin.distanceTo(_i);s<e.near||s>e.far||t.push({distance:s,point:_i.clone(),uv:He.getUV(_i,Ci,Oi,Ri,ki,Pi,Li,new v),face:null,object:this})}},copy:function(e){return Me.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}});var Ni=new T,ji=new T;function Bi(){Me.call(this),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}Bi.prototype=Object.assign(Object.create(Me.prototype),{constructor:Bi,isLOD:!0,copy:function(e){Me.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n<r;n++){var i=t[n];this.addLevel(i.object.clone(),i.distance)}return this.autoUpdate=e.autoUpdate,this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);var n,r=this.levels;for(n=0;n<r.length&&!(t<r[n].distance);n++);return r.splice(n,0,{distance:t,object:e}),this.add(e),this},getCurrentLevel:function(){return this._currentLevel},getObjectForDistance:function(e){var t=this.levels;if(t.length>0){var n,r;for(n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object}return null},raycast:function(e,t){if(this.levels.length>0){Ni.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(Ni);this.getObjectForDistance(n).raycast(e,t)}},update:function(e){var t=this.levels;if(t.length>1){Ni.setFromMatrixPosition(e.matrixWorld),ji.setFromMatrixPosition(this.matrixWorld);var n,r,i=Ni.distanceTo(ji)/e.zoom;for(t[0].object.visible=!0,n=1,r=t.length;n<r&&i>=t[n].distance;n++)t[n-1].object.visible=!1,t[n].object.visible=!0;for(this._currentLevel=n-1;n<r;n++)t[n].object.visible=!1}},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}});var Fi=new T,zi=new E,Hi=new E,Ui=new T,Vi=new te;function Gi(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),zt.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new te,this.bindMatrixInverse=new te}function Wi(){Me.call(this),this.type="Bone"}Gi.prototype=Object.assign(Object.create(zt.prototype),{constructor:Gi,isSkinnedMesh:!0,copy:function(e){return zt.prototype.copy.call(this,e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this},bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var e=new E,t=this.geometry.attributes.skinWeight,n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);var i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(e){zt.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},boneTransform:function(e,t){var n=this.skeleton,r=this.geometry;zi.fromBufferAttribute(r.attributes.skinIndex,e),Hi.fromBufferAttribute(r.attributes.skinWeight,e),Fi.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(var i=0;i<4;i++){var o=Hi.getComponent(i);if(0!==o){var a=zi.getComponent(i);Vi.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(Ui.copy(Fi).applyMatrix4(Vi),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}),Wi.prototype=Object.assign(Object.create(Me.prototype),{constructor:Wi,isBone:!0});var qi=new te,Xi=new te;function Yi(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.uuid=g.generateUUID(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}Object.assign(Yi.prototype,{init:function(){var e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new te)}},calculateInverses:function(){this.boneInverses.length=0;for(var e=0,t=this.bones.length;e<t;e++){var n=new te;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}},pose:function(){for(var e=0,t=this.bones.length;e<t;e++){var n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(var r=0,i=this.bones.length;r<i;r++){var o=this.bones[r];o&&(o.parent&&o.parent.isBone?(o.matrix.copy(o.parent.matrixWorld).invert(),o.matrix.multiply(o.matrixWorld)):o.matrix.copy(o.matrixWorld),o.matrix.decompose(o.position,o.quaternion,o.scale))}},update:function(){for(var e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=e.length;i<o;i++){var a=e[i]?e[i].matrixWorld:Xi;qi.multiplyMatrices(a,t[i]),qi.toArray(n,16*i)}null!==r&&(r.needsUpdate=!0)},clone:function(){return new Yi(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,n=this.bones.length;t<n;t++){var r=this.bones[t];if(r.name===e)return r}},dispose:function(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)},fromJSON:function(e,t){this.uuid=e.uuid;for(var n=0,r=e.bones.length;n<r;n++){var i=e.bones[n],o=t[i];void 0===o&&(console.warn("THREE.Skeleton: No bone found with UUID:",i),o=new Wi),this.bones.push(o),this.boneInverses.push((new te).fromArray(e.boneInverses[n]))}return this.init(),this},toJSON:function(){var e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;for(var t=this.bones,n=this.boneInverses,r=0,i=t.length;r<i;r++){var o=t[r];e.bones.push(o.uuid);var a=n[r];e.boneInverses.push(a.toArray())}return e}});var Ki=new te,Qi=new te,Zi=[],Ji=new zt;function $i(e,t,n){zt.call(this,e,t),this.instanceMatrix=new tt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}function eo(e){Ze.call(this),this.type="LineBasicMaterial",this.color=new Ye(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}$i.prototype=Object.assign(Object.create(zt.prototype),{constructor:$i,isInstancedMesh:!0,copy:function(e){return zt.prototype.copy.call(this,e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this},getColorAt:function(e,t){t.fromArray(this.instanceColor.array,3*e)},getMatrixAt:function(e,t){t.fromArray(this.instanceMatrix.array,16*e)},raycast:function(e,t){var n=this.matrixWorld,r=this.count;if(Ji.geometry=this.geometry,Ji.material=this.material,void 0!==Ji.material)for(var i=0;i<r;i++){this.getMatrixAt(i,Ki),Qi.multiplyMatrices(n,Ki),Ji.matrixWorld=Qi,Ji.raycast(e,Zi);for(var o=0,a=Zi.length;o<a;o++){var s=Zi[o];s.instanceId=i,s.object=this,t.push(s)}Zi.length=0}},setColorAt:function(e,t){null===this.instanceColor&&(this.instanceColor=new tt(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)},setMatrixAt:function(e,t){t.toArray(this.instanceMatrix.array,16*e)},updateMorphTargets:function(){},dispose:function(){this.dispatchEvent({type:"dispose"})}}),eo.prototype=Object.create(Ze.prototype),eo.prototype.constructor=eo,eo.prototype.isLineBasicMaterial=!0,eo.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this};var to=new T,no=new T,ro=new te,io=new ee,oo=new q;function ao(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new eo),Me.call(this),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}ao.prototype=Object.assign(Object.create(Me.prototype),{constructor:ao,isLine:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.material=e.material,this.geometry=e.geometry,this},computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;r<i;r++)to.fromBufferAttribute(t,r-1),no.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=to.distanceTo(no);e.setAttribute("lineDistance",new ut(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this},raycast:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),oo.copy(n.boundingSphere),oo.applyMatrix4(r),oo.radius+=i,!1!==e.ray.intersectsSphere(oo)){ro.copy(r).invert(),io.copy(e.ray).applyMatrix4(ro);var o=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,s=new T,l=new T,c=new T,u=new T,h=this.isLineSegments?2:1;if(n.isBufferGeometry){var d=n.index,f=n.attributes.position;if(null!==d)for(var p=d.array,m=0,g=p.length-1;m<g;m+=h){var v=p[m],y=p[m+1];if(s.fromBufferAttribute(f,v),l.fromBufferAttribute(f,y),!(io.distanceSqToSegment(s,l,u,c)>a)){u.applyMatrix4(this.matrixWorld);var b=e.ray.origin.distanceTo(u);b<e.near||b>e.far||t.push({distance:b,point:c.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}else for(var w=0,x=f.count-1;w<x;w+=h)if(s.fromBufferAttribute(f,w),l.fromBufferAttribute(f,w+1),!(io.distanceSqToSegment(s,l,u,c)>a)){u.applyMatrix4(this.matrixWorld);var _=e.ray.origin.distanceTo(u);_<e.near||_>e.far||t.push({distance:_,point:c.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}});var so=new T,lo=new T;function co(e,t){ao.call(this,e,t),this.type="LineSegments"}function uo(e,t){ao.call(this,e,t),this.type="LineLoop"}function ho(e){Ze.call(this),this.type="PointsMaterial",this.color=new Ye(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}co.prototype=Object.assign(Object.create(ao.prototype),{constructor:co,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;r<i;r+=2)so.fromBufferAttribute(t,r),lo.fromBufferAttribute(t,r+1),n[r]=0===r?0:n[r-1],n[r+1]=n[r]+so.distanceTo(lo);e.setAttribute("lineDistance",new ut(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}),uo.prototype=Object.assign(Object.create(ao.prototype),{constructor:uo,isLineLoop:!0}),ho.prototype=Object.create(Ze.prototype),ho.prototype.constructor=ho,ho.prototype.isPointsMaterial=!0,ho.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this};var fo=new te,po=new ee,mo=new q,go=new T;function vo(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new ho),Me.call(this),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}function yo(e,t,n,r,i,o,a){var s=po.distanceSqToPoint(e);if(s<n){var l=new T;po.closestPointToPoint(e,l),l.applyMatrix4(r);var c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:a})}}function bo(e,t,n,r,i,o,a,s,l){x.call(this,e,t,n,r,i,o,a,s,l),this.format=void 0!==a?a:1022,this.minFilter=void 0!==o?o:1006,this.magFilter=void 0!==i?i:1006,this.generateMipmaps=!1;var c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}function wo(e,t,n,r,i,o,a,s,l,c,u,h){x.call(this,null,o,a,s,l,c,r,i,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function xo(e,t,n,r,i,o,a,s,l){x.call(this,e,t,n,r,i,o,a,s,l),this.needsUpdate=!0}function _o(e,t,n,r,i,o,a,s,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===c&&(n=1012),void 0===n&&1027===c&&(n=1020),x.call(this,null,r,i,o,a,s,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==a?a:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}vo.prototype=Object.assign(Object.create(Me.prototype),{constructor:vo,isPoints:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.material=e.material,this.geometry=e.geometry,this},raycast:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),mo.copy(n.boundingSphere),mo.applyMatrix4(r),mo.radius+=i,!1!==e.ray.intersectsSphere(mo)){fo.copy(r).invert(),po.copy(e.ray).applyMatrix4(fo);var o=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o;if(n.isBufferGeometry){var s=n.index,l=n.attributes.position;if(null!==s)for(var c=s.array,u=0,h=c.length;u<h;u++){var d=c[u];go.fromBufferAttribute(l,d),yo(go,d,a,r,e,t,this)}else for(var f=0,p=l.count;f<p;f++)go.fromBufferAttribute(l,f),yo(go,f,a,r,e,t,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}),bo.prototype=Object.assign(Object.create(x.prototype),{constructor:bo,clone:function(){return new this.constructor(this.image).copy(this)},isVideoTexture:!0,update:function(){var e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),wo.prototype=Object.create(x.prototype),wo.prototype.constructor=wo,wo.prototype.isCompressedTexture=!0,xo.prototype=Object.create(x.prototype),xo.prototype.constructor=xo,xo.prototype.isCanvasTexture=!0,_o.prototype=Object.create(x.prototype),_o.prototype.constructor=_o,_o.prototype.isDepthTexture=!0;var Eo=function(e){function t(t,n,r,i){var o;void 0===t&&(t=1),void 0===n&&(n=8),void 0===r&&(r=0),void 0===i&&(i=2*Math.PI),(o=e.call(this)||this).type="CircleGeometry",o.parameters={radius:t,segments:n,thetaStart:r,thetaLength:i},n=Math.max(3,n);var a=[],s=[],l=[],c=[],u=new T,h=new v;s.push(0,0,0),l.push(0,0,1),c.push(.5,.5);for(var d=0,f=3;d<=n;d++,f+=3){var p=r+d/n*i;u.x=t*Math.cos(p),u.y=t*Math.sin(p),s.push(u.x,u.y,u.z),l.push(0,0,1),h.x=(s[f]/t+1)/2,h.y=(s[f+1]/t+1)/2,c.push(h.x,h.y)}for(var m=1;m<=n;m++)a.push(m,m+1,0);return o.setIndex(a),o.setAttribute("position",new ut(s,3)),o.setAttribute("normal",new ut(l,3)),o.setAttribute("uv",new ut(c,2)),o}return s(t,e),t}(_t),Ao=function(e){function t(t,n,r,i,o,a,s,c){var u;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=8),void 0===o&&(o=1),void 0===a&&(a=!1),void 0===s&&(s=0),void 0===c&&(c=2*Math.PI),(u=e.call(this)||this).type="CylinderGeometry",u.parameters={radiusTop:t,radiusBottom:n,height:r,radialSegments:i,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:c};var h=l(u);i=Math.floor(i),o=Math.floor(o);var d=[],f=[],p=[],m=[],g=0,y=[],b=r/2,w=0;function x(e){for(var r=g,o=new v,a=new T,l=0,u=!0===e?t:n,y=!0===e?1:-1,x=1;x<=i;x++)f.push(0,b*y,0),p.push(0,y,0),m.push(.5,.5),g++;for(var _=g,E=0;E<=i;E++){var A=E/i*c+s,S=Math.cos(A),M=Math.sin(A);a.x=u*M,a.y=b*y,a.z=u*S,f.push(a.x,a.y,a.z),p.push(0,y,0),o.x=.5*S+.5,o.y=.5*M*y+.5,m.push(o.x,o.y),g++}for(var C=0;C<i;C++){var O=r+C,R=_+C;!0===e?d.push(R,R+1,O):d.push(R+1,R,O),l+=3}h.addGroup(w,l,!0===e?1:2),w+=l}return function(){for(var e=new T,a=new T,l=0,u=(n-t)/r,v=0;v<=o;v++){for(var x=[],_=v/o,E=_*(n-t)+t,A=0;A<=i;A++){var S=A/i,M=S*c+s,C=Math.sin(M),O=Math.cos(M);a.x=E*C,a.y=-_*r+b,a.z=E*O,f.push(a.x,a.y,a.z),e.set(C,u,O).normalize(),p.push(e.x,e.y,e.z),m.push(S,1-_),x.push(g++)}y.push(x)}for(var R=0;R<i;R++)for(var k=0;k<o;k++){var P=y[k][R],L=y[k+1][R],D=y[k+1][R+1],I=y[k][R+1];d.push(P,L,I),d.push(L,D,I),l+=6}h.addGroup(w,l,0),w+=l}(),!1===a&&(t>0&&x(!0),n>0&&x(!1)),u.setIndex(d),u.setAttribute("position",new ut(f,3)),u.setAttribute("normal",new ut(p,3)),u.setAttribute("uv",new ut(m,2)),u}return s(t,e),t}(_t),So=function(e){function t(t,n,r,i,o,a,s){var l;return void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=8),void 0===i&&(i=1),void 0===o&&(o=!1),void 0===a&&(a=0),void 0===s&&(s=2*Math.PI),(l=e.call(this,0,t,n,r,i,o,a,s)||this).type="ConeGeometry",l.parameters={radius:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},l}return s(t,e),t}(Ao),Mo=function(e){function t(t,n,r,i){var o;void 0===r&&(r=1),void 0===i&&(i=0),(o=e.call(this)||this).type="PolyhedronGeometry",o.parameters={vertices:t,indices:n,radius:r,detail:i};var a=[],s=[];function l(e,t,n,r){for(var i=r+1,o=[],a=0;a<=i;a++){o[a]=[];for(var s=e.clone().lerp(n,a/i),l=t.clone().lerp(n,a/i),u=i-a,h=0;h<=u;h++)o[a][h]=0===h&&a===i?s:s.clone().lerp(l,h/u)}for(var d=0;d<i;d++)for(var f=0;f<2*(i-d)-1;f++){var p=Math.floor(f/2);f%2===0?(c(o[d][p+1]),c(o[d+1][p]),c(o[d][p])):(c(o[d][p+1]),c(o[d+1][p+1]),c(o[d+1][p]))}}function c(e){a.push(e.x,e.y,e.z)}function u(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function h(e,t,n,r){r<0&&1===e.x&&(s[t]=e.x-1),0===n.x&&0===n.z&&(s[t]=r/2/Math.PI+.5)}function d(e){return Math.atan2(e.z,-e.x)}return function(e){for(var t=new T,r=new T,i=new T,o=0;o<n.length;o+=3)u(n[o+0],t),u(n[o+1],r),u(n[o+2],i),l(t,r,i,e)}(i),function(e){for(var t=new T,n=0;n<a.length;n+=3)t.x=a[n+0],t.y=a[n+1],t.z=a[n+2],t.normalize().multiplyScalar(e),a[n+0]=t.x,a[n+1]=t.y,a[n+2]=t.z}(r),function(){for(var e=new T,t=0;t<a.length;t+=3){e.x=a[t+0],e.y=a[t+1],e.z=a[t+2];var n=d(e)/2/Math.PI+.5,r=(i=e,Math.atan2(-i.y,Math.sqrt(i.x*i.x+i.z*i.z))/Math.PI+.5);s.push(n,1-r)}var i;(function(){for(var e=new T,t=new T,n=new T,r=new T,i=new v,o=new v,l=new v,c=0,u=0;c<a.length;c+=9,u+=6){e.set(a[c+0],a[c+1],a[c+2]),t.set(a[c+3],a[c+4],a[c+5]),n.set(a[c+6],a[c+7],a[c+8]),i.set(s[u+0],s[u+1]),o.set(s[u+2],s[u+3]),l.set(s[u+4],s[u+5]),r.copy(e).add(t).add(n).divideScalar(3);var f=d(r);h(i,u+0,e,f),h(o,u+2,t,f),h(l,u+4,n,f)}})(),function(){for(var e=0;e<s.length;e+=6){var t=s[e+0],n=s[e+2],r=s[e+4],i=Math.max(t,n,r),o=Math.min(t,n,r);i>.9&&o<.1&&(t<.2&&(s[e+0]+=1),n<.2&&(s[e+2]+=1),r<.2&&(s[e+4]+=1))}}()}(),o.setAttribute("position",new ut(a,3)),o.setAttribute("normal",new ut(a.slice(),3)),o.setAttribute("uv",new ut(s,2)),0===i?o.computeVertexNormals():o.normalizeNormals(),o}return s(t,e),t}(_t),To=function(e){function t(t,n){var r;void 0===t&&(t=1),void 0===n&&(n=0);var i=(1+Math.sqrt(5))/2,o=1/i,a=[-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,-o,-i,0,-o,i,0,o,-i,0,o,i,-o,-i,0,-o,i,0,o,-i,0,o,i,0,-i,0,-o,i,0,-o,-i,0,o,i,0,o];return(r=e.call(this,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],t,n)||this).type="DodecahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),Co=new T,Oo=new T,Ro=new T,ko=new He,Po=function(e){function t(t,n){var r;if((r=e.call(this)||this).type="EdgesGeometry",r.parameters={thresholdAngle:n},n=void 0!==n?n:1,!0===t.isGeometry)return console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),l(r);for(var i=Math.pow(10,4),o=Math.cos(g.DEG2RAD*n),a=t.getIndex(),s=t.getAttribute("position"),c=a?a.count:s.count,u=[0,0,0],h=["a","b","c"],d=new Array(3),f={},p=[],m=0;m<c;m+=3){a?(u[0]=a.getX(m),u[1]=a.getX(m+1),u[2]=a.getX(m+2)):(u[0]=m,u[1]=m+1,u[2]=m+2);var v=ko.a,y=ko.b,b=ko.c;if(v.fromBufferAttribute(s,u[0]),y.fromBufferAttribute(s,u[1]),b.fromBufferAttribute(s,u[2]),ko.getNormal(Ro),d[0]=Math.round(v.x*i)+","+Math.round(v.y*i)+","+Math.round(v.z*i),d[1]=Math.round(y.x*i)+","+Math.round(y.y*i)+","+Math.round(y.z*i),d[2]=Math.round(b.x*i)+","+Math.round(b.y*i)+","+Math.round(b.z*i),d[0]!==d[1]&&d[1]!==d[2]&&d[2]!==d[0])for(var w=0;w<3;w++){var x=(w+1)%3,_=d[w],E=d[x],A=ko[h[w]],S=ko[h[x]],M=_+"_"+E,T=E+"_"+_;T in f&&f[T]?(Ro.dot(f[T].normal)<=o&&(p.push(A.x,A.y,A.z),p.push(S.x,S.y,S.z)),f[T]=null):M in f||(f[M]={index0:u[w],index1:u[x],normal:Ro.clone()})}}for(var C in f)if(f[C]){var O=f[C],R=O.index0,k=O.index1;Co.fromBufferAttribute(s,R),Oo.fromBufferAttribute(s,k),p.push(Co.x,Co.y,Co.z),p.push(Oo.x,Oo.y,Oo.z)}return r.setAttribute("position",new ut(p,3)),r}return s(t,e),t}(_t),Lo=function(e,t,n){n=n||2;var r,i,o,a,s,l,c,u=t&&t.length,h=u?t[0]*n:e.length,d=Do(e,0,h,n,!0),f=[];if(!d||d.next===d.prev)return f;if(u&&(d=function(e,t,n,r){var i,o,a,s,l,c=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,s=i<o-1?t[i+1]*r:e.length,(l=Do(e,a,s,r,!1))===l.next&&(l.steiner=!0),c.push(Wo(l));for(c.sort(Ho),i=0;i<c.length;i++)Uo(c[i],n),n=Io(n,n.next);return n}(e,t,d,n)),e.length>80*n){r=o=e[0],i=a=e[1];for(var p=n;p<h;p+=n)(s=e[p])<r&&(r=s),(l=e[p+1])<i&&(i=l),s>o&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-r,a-i))?1/c:0}return No(d,f,n,r,i,c),f};function Do(e,t,n,r,i){var o,a;if(i===function(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=ta(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=ta(o,e[o],e[o+1],a);return a&&Ko(a,a.next)&&(na(a),a=a.next),a}function Io(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Ko(r,r.next)&&0!==Yo(r.prev,r,r.next))r=r.next;else{if(na(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function No(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=Go(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Bo(e,r,i,o):jo(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),na(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?No(e=Fo(Io(e),t,n),t,n,r,i,o,2):2===a&&zo(e,t,n,r,i,o):No(Io(e),t,n,r,i,o,1);break}}}function jo(e){var t=e.prev,n=e,r=e.next;if(Yo(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(qo(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Yo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Bo(e,t,n,r){var i=e.prev,o=e,a=e.next;if(Yo(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Go(s,l,t,n,r),d=Go(c,u,t,n,r),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Yo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Yo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Yo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Yo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Fo(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Ko(i,o)&&Qo(i,r,r.next,o)&&$o(i,o)&&$o(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),na(r),na(r.next),r=e=o),r=r.next}while(r!==e);return Io(r)}function zo(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Xo(a,s)){var l=ea(a,s);return a=Io(a,a.next),l=Io(l,l.next),No(a,t,n,r,i,o),void No(l,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function Ho(e,t){return e.x-t.x}function Uo(e,t){if(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n;var l,c=n,u=n.x,h=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&qo(o<h?i:a,o,u,h,o<h?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),$o(r,e)&&(l<d||l===d&&(r.x>n.x||r.x===n.x&&Vo(n,r)))&&(n=r,d=l)),r=r.next}while(r!==c);return n}(e,t)){var n=ea(t,e);Io(t,t.next),Io(n,n.next)}}function Vo(e,t){return Yo(e.prev,e,t.prev)<0&&Yo(t.next,e,e.next)<0}function Go(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Wo(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function qo(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Xo(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Qo(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&($o(e,t)&&$o(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Yo(e.prev,e,t.prev)||Yo(e,t.prev,t))||Ko(e,t)&&Yo(e.prev,e,e.next)>0&&Yo(t.prev,t,t.next)>0)}function Yo(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Ko(e,t){return e.x===t.x&&e.y===t.y}function Qo(e,t,n,r){var i=Jo(Yo(e,t,n)),o=Jo(Yo(e,t,r)),a=Jo(Yo(n,r,e)),s=Jo(Yo(n,r,t));return i!==o&&a!==s||!(0!==i||!Zo(e,n,t))||!(0!==o||!Zo(e,r,t))||!(0!==a||!Zo(n,e,r))||!(0!==s||!Zo(n,t,r))}function Zo(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Jo(e){return e>0?1:e<0?-1:0}function $o(e,t){return Yo(e.prev,e,e.next)<0?Yo(e,t,e.next)>=0&&Yo(e,e.prev,t)>=0:Yo(e,t,e.prev)<0||Yo(e,e.next,t)<0}function ea(e,t){var n=new ra(e.i,e.x,e.y),r=new ra(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function ta(e,t,n,r){var i=new ra(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function na(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function ra(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var ia={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n},isClockWise:function(e){return ia.area(e)<0},triangulateShape:function(e,t){var n=[],r=[],i=[];oa(e),aa(n,e);var o=e.length;t.forEach(oa);for(var a=0;a<t.length;a++)r.push(o),o+=t[a].length,aa(n,t[a]);for(var s=Lo(n,r),l=0;l<s.length;l+=3)i.push(s.slice(l,l+3));return i}};function oa(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function aa(e,t){for(var n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}var sa=function(e){function t(t,n){var r;(r=e.call(this)||this).type="ExtrudeGeometry",r.parameters={shapes:t,options:n},t=Array.isArray(t)?t:[t];for(var i=l(r),o=[],a=[],s=0,c=t.length;s<c;s++)u(t[s]);function u(e){var t=[],r=void 0!==n.curveSegments?n.curveSegments:12,s=void 0!==n.steps?n.steps:1,l=void 0!==n.depth?n.depth:100,c=void 0===n.bevelEnabled||n.bevelEnabled,u=void 0!==n.bevelThickness?n.bevelThickness:6,h=void 0!==n.bevelSize?n.bevelSize:u-2,d=void 0!==n.bevelOffset?n.bevelOffset:0,f=void 0!==n.bevelSegments?n.bevelSegments:3,p=n.extrudePath,m=void 0!==n.UVGenerator?n.UVGenerator:la;void 0!==n.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=n.amount);var g,y,b,w,x,_=!1;p&&(g=p.getSpacedPoints(s),_=!0,c=!1,y=p.computeFrenetFrames(s,!1),b=new T,w=new T,x=new T),c||(f=0,u=0,h=0,d=0);var E=e.extractPoints(r),A=E.shape,S=E.holes;if(!ia.isClockWise(A)){A=A.reverse();for(var M=0,C=S.length;M<C;M++){var O=S[M];ia.isClockWise(O)&&(S[M]=O.reverse())}}for(var R=ia.triangulateShape(A,S),k=A,P=0,L=S.length;P<L;P++){var D=S[P];A=A.concat(D)}function I(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}var N=A.length,j=R.length;function B(e,t,n){var r,i,o,a=e.x-t.x,s=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=a*a+s*s,h=a*c-s*l;if(Math.abs(h)>Number.EPSILON){var d=Math.sqrt(u),f=Math.sqrt(l*l+c*c),p=t.x-s/d,m=t.y+a/d,g=((n.x-c/f-p)*c-(n.y+l/f-m)*l)/(a*c-s*l),y=(r=p+a*g-e.x)*r+(i=m+s*g-e.y)*i;if(y<=2)return new v(r,i);o=Math.sqrt(y/2)}else{var b=!1;a>Number.EPSILON?l>Number.EPSILON&&(b=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(c)&&(b=!0),b?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new v(r/o,i/o)}for(var F=[],z=0,H=k.length,U=H-1,V=z+1;z<H;z++,U++,V++)U===H&&(U=0),V===H&&(V=0),F[z]=B(k[z],k[U],k[V]);for(var G,W=[],q=F.concat(),X=0,Y=S.length;X<Y;X++){var K=S[X];G=[];for(var Q=0,Z=K.length,J=Z-1,$=Q+1;Q<Z;Q++,J++,$++)J===Z&&(J=0),$===Z&&($=0),G[Q]=B(K[Q],K[J],K[$]);W.push(G),q=q.concat(G)}for(var ee=0;ee<f;ee++){for(var te=ee/f,ne=u*Math.cos(te*Math.PI/2),re=h*Math.sin(te*Math.PI/2)+d,ie=0,oe=k.length;ie<oe;ie++){var ae=I(k[ie],F[ie],re);Le(ae.x,ae.y,-ne)}for(var se=0,le=S.length;se<le;se++){var ce=S[se];G=W[se];for(var ue=0,he=ce.length;ue<he;ue++){var de=I(ce[ue],G[ue],re);Le(de.x,de.y,-ne)}}}for(var fe=h+d,pe=0;pe<N;pe++){var me=c?I(A[pe],q[pe],fe):A[pe];_?(w.copy(y.normals[0]).multiplyScalar(me.x),b.copy(y.binormals[0]).multiplyScalar(me.y),x.copy(g[0]).add(w).add(b),Le(x.x,x.y,x.z)):Le(me.x,me.y,0)}for(var ge=1;ge<=s;ge++)for(var ve=0;ve<N;ve++){var ye=c?I(A[ve],q[ve],fe):A[ve];_?(w.copy(y.normals[ge]).multiplyScalar(ye.x),b.copy(y.binormals[ge]).multiplyScalar(ye.y),x.copy(g[ge]).add(w).add(b),Le(x.x,x.y,x.z)):Le(ye.x,ye.y,l/s*ge)}for(var be=f-1;be>=0;be--){for(var we=be/f,xe=u*Math.cos(we*Math.PI/2),_e=h*Math.sin(we*Math.PI/2)+d,Ee=0,Ae=k.length;Ee<Ae;Ee++){var Se=I(k[Ee],F[Ee],_e);Le(Se.x,Se.y,l+xe)}for(var Me=0,Te=S.length;Me<Te;Me++){var Ce=S[Me];G=W[Me];for(var Oe=0,Re=Ce.length;Oe<Re;Oe++){var ke=I(Ce[Oe],G[Oe],_e);_?Le(ke.x,ke.y+g[s-1].y,g[s-1].x+xe):Le(ke.x,ke.y,l+xe)}}}function Pe(e,t){for(var n=e.length;--n>=0;){var r=n,i=n-1;i<0&&(i=e.length-1);for(var o=0,a=s+2*f;o<a;o++){var l=N*o,c=N*(o+1);Ie(t+r+l,t+i+l,t+i+c,t+r+c)}}}function Le(e,n,r){t.push(e),t.push(n),t.push(r)}function De(e,t,n){Ne(e),Ne(t),Ne(n);var r=o.length/3,a=m.generateTopUV(i,o,r-3,r-2,r-1);je(a[0]),je(a[1]),je(a[2])}function Ie(e,t,n,r){Ne(e),Ne(t),Ne(r),Ne(t),Ne(n),Ne(r);var a=o.length/3,s=m.generateSideWallUV(i,o,a-6,a-3,a-2,a-1);je(s[0]),je(s[1]),je(s[3]),je(s[1]),je(s[2]),je(s[3])}function Ne(e){o.push(t[3*e+0]),o.push(t[3*e+1]),o.push(t[3*e+2])}function je(e){a.push(e.x),a.push(e.y)}!function(){var e=o.length/3;if(c){for(var t=0,n=N*t,r=0;r<j;r++){var a=R[r];De(a[2]+n,a[1]+n,a[0]+n)}n=N*(t=s+2*f);for(var l=0;l<j;l++){var u=R[l];De(u[0]+n,u[1]+n,u[2]+n)}}else{for(var h=0;h<j;h++){var d=R[h];De(d[2],d[1],d[0])}for(var p=0;p<j;p++){var m=R[p];De(m[0]+N*s,m[1]+N*s,m[2]+N*s)}}i.addGroup(e,o.length/3-e,0)}(),function(){var e=o.length/3,t=0;Pe(k,t),t+=k.length;for(var n=0,r=S.length;n<r;n++){var a=S[n];Pe(a,t),t+=a.length}i.addGroup(e,o.length/3-e,1)}()}return r.setAttribute("position",new ut(o,3)),r.setAttribute("uv",new ut(a,2)),r.computeVertexNormals(),r}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(var r=0,i=e.length;r<i;r++){var o=e[r];n.shapes.push(o.uuid)}else n.shapes.push(e.uuid);return void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)},t}(_t),la={generateTopUV:function(e,t,n,r,i){var o=t[3*n],a=t[3*n+1],s=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new v(o,a),new v(s,l),new v(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){var a=t[3*n],s=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*o],g=t[3*o+1],y=t[3*o+2];return Math.abs(s-u)<.01?[new v(a,1-l),new v(c,1-h),new v(d,1-p),new v(m,1-y)]:[new v(s,1-l),new v(u,1-h),new v(f,1-p),new v(g,1-y)]}},ca=function(e){function t(t,n){var r;void 0===t&&(t=1),void 0===n&&(n=0);var i=(1+Math.sqrt(5))/2,o=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1];return(r=e.call(this,o,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,n)||this).type="IcosahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),ua=function(e){function t(t,n,r,i){var o;void 0===n&&(n=12),void 0===r&&(r=0),void 0===i&&(i=2*Math.PI),(o=e.call(this)||this).type="LatheGeometry",o.parameters={points:t,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=g.clamp(i,0,2*Math.PI);for(var a=[],s=[],l=[],c=1/n,u=new T,h=new v,d=0;d<=n;d++)for(var f=r+d*c*i,p=Math.sin(f),m=Math.cos(f),y=0;y<=t.length-1;y++)u.x=t[y].x*p,u.y=t[y].y,u.z=t[y].x*m,s.push(u.x,u.y,u.z),h.x=d/n,h.y=y/(t.length-1),l.push(h.x,h.y);for(var b=0;b<n;b++)for(var w=0;w<t.length-1;w++){var x=w+b*t.length,_=x,E=x+t.length,A=x+t.length+1,S=x+1;a.push(_,E,S),a.push(E,A,S)}if(o.setIndex(a),o.setAttribute("position",new ut(s,3)),o.setAttribute("uv",new ut(l,2)),o.computeVertexNormals(),i===2*Math.PI)for(var M=o.attributes.normal.array,C=new T,O=new T,R=new T,k=n*t.length*3,P=0,L=0;P<t.length;P++,L+=3)C.x=M[L+0],C.y=M[L+1],C.z=M[L+2],O.x=M[k+L+0],O.y=M[k+L+1],O.z=M[k+L+2],R.addVectors(C,O).normalize(),M[L+0]=M[k+L+0]=R.x,M[L+1]=M[k+L+1]=R.y,M[L+2]=M[k+L+2]=R.z;return o}return s(t,e),t}(_t),ha=function(e){function t(t,n){var r;return void 0===t&&(t=1),void 0===n&&(n=0),(r=e.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,n)||this).type="OctahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo);function da(e,t,n){_t.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n};var r=[],i=[],o=[],a=[],s=1e-5,l=new T,c=new T,u=new T,h=new T,d=new T;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var f=t+1,p=0;p<=n;p++)for(var m=p/n,g=0;g<=t;g++){var v=g/t;e(v,m,c),i.push(c.x,c.y,c.z),v-s>=0?(e(v-s,m,u),h.subVectors(c,u)):(e(v+s,m,u),h.subVectors(u,c)),m-s>=0?(e(v,m-s,u),d.subVectors(c,u)):(e(v,m+s,u),d.subVectors(u,c)),l.crossVectors(h,d).normalize(),o.push(l.x,l.y,l.z),a.push(v,m)}for(var y=0;y<n;y++)for(var b=0;b<t;b++){var w=y*f+b,x=y*f+b+1,_=(y+1)*f+b+1,E=(y+1)*f+b;r.push(w,x,E),r.push(x,_,E)}this.setIndex(r),this.setAttribute("position",new ut(i,3)),this.setAttribute("normal",new ut(o,3)),this.setAttribute("uv",new ut(a,2))}da.prototype=Object.create(_t.prototype),da.prototype.constructor=da;var fa=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=.5),void 0===n&&(n=1),void 0===r&&(r=8),void 0===i&&(i=1),void 0===o&&(o=0),void 0===a&&(a=2*Math.PI),(s=e.call(this)||this).type="RingGeometry",s.parameters={innerRadius:t,outerRadius:n,thetaSegments:r,phiSegments:i,thetaStart:o,thetaLength:a},r=Math.max(3,r);for(var l=[],c=[],u=[],h=[],d=t,f=(n-t)/(i=Math.max(1,i)),p=new T,m=new v,g=0;g<=i;g++){for(var y=0;y<=r;y++){var b=o+y/r*a;p.x=d*Math.cos(b),p.y=d*Math.sin(b),c.push(p.x,p.y,p.z),u.push(0,0,1),m.x=(p.x/n+1)/2,m.y=(p.y/n+1)/2,h.push(m.x,m.y)}d+=f}for(var w=0;w<i;w++)for(var x=w*(r+1),_=0;_<r;_++){var E=_+x,A=E,S=E+r+1,M=E+r+2,C=E+1;l.push(A,S,C),l.push(S,M,C)}return s.setIndex(l),s.setAttribute("position",new ut(c,3)),s.setAttribute("normal",new ut(u,3)),s.setAttribute("uv",new ut(h,2)),s}return s(t,e),t}(_t),pa=function(e){function t(t,n){var r;void 0===n&&(n=12),(r=e.call(this)||this).type="ShapeGeometry",r.parameters={shapes:t,curveSegments:n};var i=[],o=[],a=[],s=[],l=0,c=0;if(!1===Array.isArray(t))h(t);else for(var u=0;u<t.length;u++)h(t[u]),r.addGroup(l,c,u),l+=c,c=0;function h(e){var t=o.length/3,r=e.extractPoints(n),l=r.shape,u=r.holes;!1===ia.isClockWise(l)&&(l=l.reverse());for(var h=0,d=u.length;h<d;h++){var f=u[h];!0===ia.isClockWise(f)&&(u[h]=f.reverse())}for(var p=ia.triangulateShape(l,u),m=0,g=u.length;m<g;m++){var v=u[m];l=l.concat(v)}for(var y=0,b=l.length;y<b;y++){var w=l[y];o.push(w.x,w.y,0),a.push(0,0,1),s.push(w.x,w.y)}for(var x=0,_=p.length;x<_;x++){var E=p[x],A=E[0]+t,S=E[1]+t,M=E[2]+t;i.push(A,S,M),c+=3}}return r.setIndex(i),r.setAttribute("position",new ut(o,3)),r.setAttribute("normal",new ut(a,3)),r.setAttribute("uv",new ut(s,2)),r}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return function(e,t){if(t.shapes=[],Array.isArray(e))for(var n=0,r=e.length;n<r;n++){var i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)},t}(_t),ma=function(e){function t(t,n,r,i,o,a,s){var l;void 0===t&&(t=1),void 0===n&&(n=8),void 0===r&&(r=6),void 0===i&&(i=0),void 0===o&&(o=2*Math.PI),void 0===a&&(a=0),void 0===s&&(s=Math.PI),(l=e.call(this)||this).type="SphereGeometry",l.parameters={radius:t,widthSegments:n,heightSegments:r,phiStart:i,phiLength:o,thetaStart:a,thetaLength:s},n=Math.max(3,Math.floor(n)),r=Math.max(2,Math.floor(r));for(var c=Math.min(a+s,Math.PI),u=0,h=[],d=new T,f=new T,p=[],m=[],g=[],v=[],y=0;y<=r;y++){var b=[],w=y/r,x=0;0==y&&0==a?x=.5/n:y==r&&c==Math.PI&&(x=-.5/n);for(var _=0;_<=n;_++){var E=_/n;d.x=-t*Math.cos(i+E*o)*Math.sin(a+w*s),d.y=t*Math.cos(a+w*s),d.z=t*Math.sin(i+E*o)*Math.sin(a+w*s),m.push(d.x,d.y,d.z),f.copy(d).normalize(),g.push(f.x,f.y,f.z),v.push(E+x,1-w),b.push(u++)}h.push(b)}for(var A=0;A<r;A++)for(var S=0;S<n;S++){var M=h[A][S+1],C=h[A][S],O=h[A+1][S],R=h[A+1][S+1];(0!==A||a>0)&&p.push(M,C,R),(A!==r-1||c<Math.PI)&&p.push(C,O,R)}return l.setIndex(p),l.setAttribute("position",new ut(m,3)),l.setAttribute("normal",new ut(g,3)),l.setAttribute("uv",new ut(v,2)),l}return s(t,e),t}(_t),ga=function(e){function t(t,n){var r;return void 0===t&&(t=1),void 0===n&&(n=0),(r=e.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,n)||this).type="TetrahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),va=function(e){function t(t,n){var r;void 0===n&&(n={});var i=n.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new _t||l(r);var o=i.generateShapes(t,n.size);return n.depth=void 0!==n.height?n.height:50,void 0===n.bevelThickness&&(n.bevelThickness=10),void 0===n.bevelSize&&(n.bevelSize=8),void 0===n.bevelEnabled&&(n.bevelEnabled=!1),(r=e.call(this,o,n)||this).type="TextGeometry",r}return s(t,e),t}(sa),ya=function(e){function t(t,n,r,i,o){var a;void 0===t&&(t=1),void 0===n&&(n=.4),void 0===r&&(r=8),void 0===i&&(i=6),void 0===o&&(o=2*Math.PI),(a=e.call(this)||this).type="TorusGeometry",a.parameters={radius:t,tube:n,radialSegments:r,tubularSegments:i,arc:o},r=Math.floor(r),i=Math.floor(i);for(var s=[],l=[],c=[],u=[],h=new T,d=new T,f=new T,p=0;p<=r;p++)for(var m=0;m<=i;m++){var g=m/i*o,v=p/r*Math.PI*2;d.x=(t+n*Math.cos(v))*Math.cos(g),d.y=(t+n*Math.cos(v))*Math.sin(g),d.z=n*Math.sin(v),l.push(d.x,d.y,d.z),h.x=t*Math.cos(g),h.y=t*Math.sin(g),f.subVectors(d,h).normalize(),c.push(f.x,f.y,f.z),u.push(m/i),u.push(p/r)}for(var y=1;y<=r;y++)for(var b=1;b<=i;b++){var w=(i+1)*y+b-1,x=(i+1)*(y-1)+b-1,_=(i+1)*(y-1)+b,E=(i+1)*y+b;s.push(w,x,E),s.push(x,_,E)}return a.setIndex(s),a.setAttribute("position",new ut(l,3)),a.setAttribute("normal",new ut(c,3)),a.setAttribute("uv",new ut(u,2)),a}return s(t,e),t}(_t),ba=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=1),void 0===n&&(n=.4),void 0===r&&(r=64),void 0===i&&(i=8),void 0===o&&(o=2),void 0===a&&(a=3),(s=e.call(this)||this).type="TorusKnotGeometry",s.parameters={radius:t,tube:n,tubularSegments:r,radialSegments:i,p:o,q:a},r=Math.floor(r),i=Math.floor(i);for(var l=[],c=[],u=[],h=[],d=new T,f=new T,p=new T,m=new T,g=new T,v=new T,y=new T,b=0;b<=r;++b){var w=b/r*o*Math.PI*2;P(w,o,a,t,p),P(w+.01,o,a,t,m),v.subVectors(m,p),y.addVectors(m,p),g.crossVectors(v,y),y.crossVectors(g,v),g.normalize(),y.normalize();for(var x=0;x<=i;++x){var _=x/i*Math.PI*2,E=-n*Math.cos(_),A=n*Math.sin(_);d.x=p.x+(E*y.x+A*g.x),d.y=p.y+(E*y.y+A*g.y),d.z=p.z+(E*y.z+A*g.z),c.push(d.x,d.y,d.z),f.subVectors(d,p).normalize(),u.push(f.x,f.y,f.z),h.push(b/r),h.push(x/i)}}for(var S=1;S<=r;S++)for(var M=1;M<=i;M++){var C=(i+1)*(S-1)+(M-1),O=(i+1)*S+(M-1),R=(i+1)*S+M,k=(i+1)*(S-1)+M;l.push(C,O,k),l.push(O,R,k)}function P(e,t,n,r,i){var o=Math.cos(e),a=Math.sin(e),s=n/t*e,l=Math.cos(s);i.x=r*(2+l)*.5*o,i.y=r*(2+l)*a*.5,i.z=r*Math.sin(s)*.5}return s.setIndex(l),s.setAttribute("position",new ut(c,3)),s.setAttribute("normal",new ut(u,3)),s.setAttribute("uv",new ut(h,2)),s}return s(t,e),t}(_t),wa=function(e){function t(t,n,r,i,o){var a;void 0===n&&(n=64),void 0===r&&(r=1),void 0===i&&(i=8),void 0===o&&(o=!1),(a=e.call(this)||this).type="TubeGeometry",a.parameters={path:t,tubularSegments:n,radius:r,radialSegments:i,closed:o};var s=t.computeFrenetFrames(n,o);a.tangents=s.tangents,a.normals=s.normals,a.binormals=s.binormals;var l=new T,c=new T,u=new v,h=new T,d=[],f=[],p=[],m=[];function g(e){h=t.getPointAt(e/n,h);for(var o=s.normals[e],a=s.binormals[e],u=0;u<=i;u++){var p=u/i*Math.PI*2,m=Math.sin(p),g=-Math.cos(p);c.x=g*o.x+m*a.x,c.y=g*o.y+m*a.y,c.z=g*o.z+m*a.z,c.normalize(),f.push(c.x,c.y,c.z),l.x=h.x+r*c.x,l.y=h.y+r*c.y,l.z=h.z+r*c.z,d.push(l.x,l.y,l.z)}}return function(){for(var e=0;e<n;e++)g(e);g(!1===o?n:0),function(){for(var e=0;e<=n;e++)for(var t=0;t<=i;t++)u.x=e/n,u.y=t/i,p.push(u.x,u.y)}(),function(){for(var e=1;e<=n;e++)for(var t=1;t<=i;t++){var r=(i+1)*(e-1)+(t-1),o=(i+1)*e+(t-1),a=(i+1)*e+t,s=(i+1)*(e-1)+t;m.push(r,o,s),m.push(o,a,s)}}()}(),a.setIndex(m),a.setAttribute("position",new ut(d,3)),a.setAttribute("normal",new ut(f,3)),a.setAttribute("uv",new ut(p,2)),a}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},t}(_t),xa=function(e){function t(t){var n;if((n=e.call(this)||this).type="WireframeGeometry",!0===t.isGeometry)return console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),l(n);var r=[],i=[0,0],o={},a=new T;if(null!==t.index){var s=t.attributes.position,c=t.index,u=t.groups;0===u.length&&(u=[{start:0,count:c.count,materialIndex:0}]);for(var h=0,d=u.length;h<d;++h)for(var f=u[h],p=f.start,m=p,g=p+f.count;m<g;m+=3)for(var v=0;v<3;v++){var y=c.getX(m+v),b=c.getX(m+(v+1)%3);i[0]=Math.min(y,b),i[1]=Math.max(y,b);var w=i[0]+","+i[1];void 0===o[w]&&(o[w]={index1:i[0],index2:i[1]})}for(var x in o){var _=o[x];a.fromBufferAttribute(s,_.index1),r.push(a.x,a.y,a.z),a.fromBufferAttribute(s,_.index2),r.push(a.x,a.y,a.z)}}else for(var E=t.attributes.position,A=0,S=E.count/3;A<S;A++)for(var M=0;M<3;M++){var C=3*A+M;a.fromBufferAttribute(E,C),r.push(a.x,a.y,a.z);var O=3*A+(M+1)%3;a.fromBufferAttribute(E,O),r.push(a.x,a.y,a.z)}return n.setAttribute("position",new ut(r,3)),n}return s(t,e),t}(_t),_a=Object.freeze({__proto__:null,BoxGeometry:Ut,BoxBufferGeometry:Ut,CircleGeometry:Eo,CircleBufferGeometry:Eo,ConeGeometry:So,ConeBufferGeometry:So,CylinderGeometry:Ao,CylinderBufferGeometry:Ao,DodecahedronGeometry:To,DodecahedronBufferGeometry:To,EdgesGeometry:Po,ExtrudeGeometry:sa,ExtrudeBufferGeometry:sa,IcosahedronGeometry:ca,IcosahedronBufferGeometry:ca,LatheGeometry:ua,LatheBufferGeometry:ua,OctahedronGeometry:ha,OctahedronBufferGeometry:ha,ParametricGeometry:da,ParametricBufferGeometry:da,PlaneGeometry:on,PlaneBufferGeometry:on,PolyhedronGeometry:Mo,PolyhedronBufferGeometry:Mo,RingGeometry:fa,RingBufferGeometry:fa,ShapeGeometry:pa,ShapeBufferGeometry:pa,SphereGeometry:ma,SphereBufferGeometry:ma,TetrahedronGeometry:ga,TetrahedronBufferGeometry:ga,TextGeometry:va,TextBufferGeometry:va,TorusGeometry:ya,TorusBufferGeometry:ya,TorusKnotGeometry:ba,TorusKnotBufferGeometry:ba,TubeGeometry:wa,TubeBufferGeometry:wa,WireframeGeometry:xa});function Ea(e){Ze.call(this),this.type="ShadowMaterial",this.color=new Ye(0),this.transparent=!0,this.setValues(e)}function Aa(e){qt.call(this,e),this.type="RawShaderMaterial"}function Sa(e){Ze.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ye(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.vertexTangents=!1,this.setValues(e)}function Ma(e){Sa.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new v(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(e){this.reflectivity=g.clamp(2.5*(e-1)/(e+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.setValues(e)}function Ta(e){Ze.call(this),this.type="MeshPhongMaterial",this.color=new Ye(16777215),this.specular=new Ye(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ca(e){Ze.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ye(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Oa(e){Ze.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ra(e){Ze.call(this),this.type="MeshLambertMaterial",this.color=new Ye(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ka(e){Ze.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ye(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Pa(e){eo.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}Ea.prototype=Object.create(Ze.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isShadowMaterial=!0,Ea.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this},Aa.prototype=Object.create(qt.prototype),Aa.prototype.constructor=Aa,Aa.prototype.isRawShaderMaterial=!0,Sa.prototype=Object.create(Ze.prototype),Sa.prototype.constructor=Sa,Sa.prototype.isMeshStandardMaterial=!0,Sa.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.vertexTangents=e.vertexTangents,this},Ma.prototype=Object.create(Sa.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isMeshPhysicalMaterial=!0,Ma.prototype.copy=function(e){return Sa.prototype.copy.call(this,e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new Ye).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this},Ta.prototype=Object.create(Ze.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshPhongMaterial=!0,Ta.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Ca.prototype=Object.create(Ze.prototype),Ca.prototype.constructor=Ca,Ca.prototype.isMeshToonMaterial=!0,Ca.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Oa.prototype=Object.create(Ze.prototype),Oa.prototype.constructor=Oa,Oa.prototype.isMeshNormalMaterial=!0,Oa.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Ra.prototype=Object.create(Ze.prototype),Ra.prototype.constructor=Ra,Ra.prototype.isMeshLambertMaterial=!0,Ra.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ka.prototype=Object.create(Ze.prototype),ka.prototype.constructor=ka,ka.prototype.isMeshMatcapMaterial=!0,ka.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Pa.prototype=Object.create(eo.prototype),Pa.prototype.constructor=Pa,Pa.prototype.isLineDashedMaterial=!0,Pa.prototype.copy=function(e){return eo.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var La=Object.freeze({__proto__:null,ShadowMaterial:Ea,SpriteMaterial:xi,RawShaderMaterial:Aa,ShaderMaterial:qt,PointsMaterial:ho,MeshPhysicalMaterial:Ma,MeshStandardMaterial:Sa,MeshPhongMaterial:Ta,MeshToonMaterial:Ca,MeshNormalMaterial:Oa,MeshLambertMaterial:Ra,MeshDepthMaterial:Jr,MeshDistanceMaterial:$r,MeshBasicMaterial:Je,MeshMatcapMaterial:ka,LineDashedMaterial:Pa,LineBasicMaterial:eo,Material:Ze}),Da={arraySlice:function(e,t,n){return Da.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"===typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,n=new Array(t),r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*t,l=0;l!==t;++l)i[a++]=e[s+l];return i},flattenJSON:function(e,t,n,r){for(var i=1,o=e[0];void 0!==o&&void 0===o[r];)o=e[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)}},subclip:function(e,t,n,r,i){void 0===i&&(i=30);var o=e.clone();o.name=t;for(var a=[],s=0;s<o.tracks.length;++s){for(var l=o.tracks[s],c=l.getValueSize(),u=[],h=[],d=0;d<l.times.length;++d){var f=l.times[d]*i;if(!(f<n||f>=r)){u.push(l.times[d]);for(var p=0;p<c;++p)h.push(l.values[d*c+p])}}0!==u.length&&(l.times=Da.convertArray(u,l.times.constructor),l.values=Da.convertArray(h,l.values.constructor),a.push(l))}o.tracks=a;for(var m=1/0,g=0;g<o.tracks.length;++g)m>o.tracks[g].times[0]&&(m=o.tracks[g].times[0]);for(var v=0;v<o.tracks.length;++v)o.tracks[v].shift(-1*m);return o.resetDuration(),o},makeClipAdditive:function(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=e),void 0===r&&(r=30),r<=0&&(r=30);for(var i=n.tracks.length,o=t/r,a=function(t){var r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)return"continue";var a=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===a)return"continue";var s=0,l=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);var c=0,u=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);var h=r.times.length-1,d=void 0;if(o<=r.times[0]){var f=s,p=l-s;d=Da.arraySlice(r.values,f,p)}else if(o>=r.times[h]){var m=h*l+s,g=m+l-s;d=Da.arraySlice(r.values,m,g)}else{var v=r.createInterpolant(),y=s,b=l-s;v.evaluate(o),d=Da.arraySlice(v.resultBuffer,y,b)}"quaternion"===i&&(new M).fromArray(d).normalize().conjugate().toArray(d);for(var w=a.times.length,x=0;x<w;++x){var _=x*u+c;if("quaternion"===i)M.multiplyQuaternionsFlat(a.values,_,d,0,a.values,_);else for(var E=u-2*c,A=0;A<E;++A)a.values[_+A]-=d[A]}},s=0;s<i;++s)a(s);return e.blendMode=2501,e}};function Ia(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function Na(e,t,n,r){Ia.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function ja(e,t,n,r){Ia.call(this,e,t,n,r)}function Ba(e,t,n,r){Ia.call(this,e,t,n,r)}function Fa(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Da.convertArray(t,this.TimeBufferType),this.values=Da.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}function za(e,t,n){Fa.call(this,e,t,n)}function Ha(e,t,n,r){Fa.call(this,e,t,n,r)}function Ua(e,t,n,r){Fa.call(this,e,t,n,r)}function Va(e,t,n,r){Ia.call(this,e,t,n,r)}function Ga(e,t,n,r){Fa.call(this,e,t,n,r)}function Wa(e,t,n,r){Fa.call(this,e,t,n,r)}function qa(e,t,n,r){Fa.call(this,e,t,n,r)}function Xa(e,t,n,r){void 0===t&&(t=-1),void 0===r&&(r=2500),this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=g.generateUUID(),this.duration<0&&this.resetDuration()}function Ya(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ua;case"vector":case"vector2":case"vector3":case"vector4":return qa;case"color":return Ha;case"quaternion":return Ga;case"bool":case"boolean":return za;case"string":return Wa}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){var n=[],r=[];Da.flattenJSON(e.keys,n,r,"value"),e.times=n,e.values=r}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}Object.assign(Ia.prototype,{evaluate:function(e){var t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{var o;n:{r:if(!(e<r)){for(var a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===a)break;if(i=r,e<(r=t[++n]))break t}o=t.length;break n}if(e>=i)break e;var s=t[1];e<s&&(n=2,i=s);for(var l=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===l)break;if(r=i,e>=(i=t[--n-1]))break t}o=n,n=0}for(;n<o;){var c=n+o>>>1;e<t[c]?o=c:n=c+1}if(r=t[n],void 0===(i=t[n-1]))return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r,o=0;o!==r;++o)t[o]=n[i+o];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Ia.prototype,{beforeStart_:Ia.prototype.copySampleValue_,afterEnd_:Ia.prototype.copySampleValue_}),Na.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Na,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(e,t,n){var r=this.parameterPositions,i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:i=e,a=2*t-n;break;case 2402:a=t+r[i=r.length-2]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:o=e,s=2*n-t;break;case 2402:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}var l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-a),this._weightNext=l/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c},interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-h*m+2*h*p-h*f,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*f+1,y=(-1-d)*m+(1.5+d)*p+.5*f,b=d*m-d*p,w=0;w!==a;++w)i[w]=g*o[c+w]+v*o[l+w]+y*o[s+w]+b*o[u+w];return i}}),ja.prototype=Object.assign(Object.create(Ia.prototype),{constructor:ja,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=(n-t)/(r-t),u=1-c,h=0;h!==a;++h)i[h]=o[l+h]*u+o[s+h]*c;return i}}),Ba.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Ba,interpolate_:function(e){return this.copySampleValue_(e-1)}}),Object.assign(Fa,{toJSON:function(e){var t,n=e.constructor;if(void 0!==n.toJSON)t=n.toJSON(e);else{t={name:e.name,times:Da.convertArray(e.times,Array),values:Da.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t}}),Object.assign(Fa.prototype,{constructor:Fa,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(e){return new Ba(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new ja(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new Na(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]*=e;return this},trim:function(e,t){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Da.arraySlice(n,i,o),this.values=Da.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"===typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),e=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),e=!1;break}o=s}if(void 0!==r&&Da.isTypedArray(r))for(var l=0,c=r.length;l!==c;++l){var u=r[l];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,u),e=!1;break}}return e},optimize:function(){for(var e=Da.arraySlice(this.times),t=Da.arraySlice(this.values),n=this.getValueSize(),r=2302===this.getInterpolation(),i=e.length-1,o=1,a=1;a<i;++a){var s=!1,l=e[a];if(l!==e[a+1]&&(1!==a||l!==e[0]))if(r)s=!0;else for(var c=a*n,u=c-n,h=c+n,d=0;d!==n;++d){var f=t[c+d];if(f!==t[u+d]||f!==t[h+d]){s=!0;break}}if(s){if(a!==o){e[o]=e[a];for(var p=a*n,m=o*n,g=0;g!==n;++g)t[m+g]=t[p+g]}++o}}if(i>0){e[o]=e[i];for(var v=i*n,y=o*n,b=0;b!==n;++b)t[y+b]=t[v+b];++o}return o!==e.length?(this.times=Da.arraySlice(e,0,o),this.values=Da.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this},clone:function(){var e=Da.arraySlice(this.times,0),t=Da.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),za.prototype=Object.assign(Object.create(Fa.prototype),{constructor:za,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ha.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ha,ValueTypeName:"color"}),Ua.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ua,ValueTypeName:"number"}),Va.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Va,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t),l=e*a,c=l+a;l!==c;l+=4)M.slerpFlat(i,0,o,l-a,o,l,s);return i}}),Ga.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ga,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new Va(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),Wa.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Wa,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),qa.prototype=Object.assign(Object.create(Fa.prototype),{constructor:qa,ValueTypeName:"vector"}),Object.assign(Xa,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,o=n.length;i!==o;++i)t.push(Ya(n[i]).scale(r));var a=new Xa(e.name,e.duration,t,e.blendMode);return a.uuid=e.uuid,a},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode},i=0,o=n.length;i!==o;++i)t.push(Fa.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,o=[],a=0;a<i;a++){var s=[],l=[];s.push((a+i-1)%i,a,(a+1)%i),l.push(0,1,0);var c=Da.getKeyframeOrder(s);s=Da.sortedArray(s,1,c),l=Da.sortedArray(l,1,c),r||0!==s[0]||(s.push(i),l.push(l[0])),o.push(new Ua(".morphTargetInfluences["+t[a].name+"]",s,l).scale(1/n))}return new Xa(e,-1,o)},findByName:function(e,t){var n=e;if(!Array.isArray(e)){var r=e;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null},CreateClipsFromMorphTargetSequences:function(e,t,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=e.length;o<a;o++){var s=e[o],l=s.name.match(i);if(l&&l.length>1){var c=l[1],u=r[c];u||(r[c]=u=[]),u.push(s)}}var h=[];for(var d in r)h.push(Xa.CreateFromMorphTargetSequence(d,r[d],t,n));return h},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var o=[],a=[];Da.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode,s=e.length||-1,l=e.hierarchy||[],c=0;c<l.length;c++){var u=l[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){var h={},d=void 0;for(d=0;d<u.length;d++)if(u[d].morphTargets)for(var f=0;f<u[d].morphTargets.length;f++)h[u[d].morphTargets[f]]=-1;for(var p in h){for(var m=[],g=[],v=0;v!==u[d].morphTargets.length;++v){var y=u[d];m.push(y.time),g.push(y.morphTarget===p?1:0)}r.push(new Ua(".morphTargetInfluence["+p+"]",m,g))}s=h.length*(o||1)}else{var b=".bones["+t[c].name+"]";n(qa,b+".position",u,"pos",r),n(Ga,b+".quaternion",u,"rot",r),n(qa,b+".scale",u,"scl",r)}}return 0===r.length?null:new Xa(i,s,r,a)}}),Object.assign(Xa.prototype,{resetDuration:function(){for(var e=0,t=0,n=this.tracks.length;t!==n;++t){var r=this.tracks[t];e=Math.max(e,r.times[r.times.length-1])}return this.duration=e,this},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},validate:function(){for(var e=!0,t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this},clone:function(){for(var e=[],t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new Xa(this.name,this.duration,e,this.blendMode)},toJSON:function(){return Xa.toJSON(this)}});var Ka={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function Qa(e,t,n){var r=this,i=!1,o=0,a=0,s=void 0,l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===i&&void 0!==r.onStart&&r.onStart(e,o,a),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){var t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(var t=0,n=l.length;t<n;t+=2){var r=l[t],i=l[t+1];if(r.global&&(r.lastIndex=0),r.test(e))return i}return null}}var Za=new Qa;function Ja(e){this.manager=void 0!==e?e:Za,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}Object.assign(Ja.prototype,{load:function(){},loadAsync:function(e,t){var n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))},parse:function(){},setCrossOrigin:function(e){return this.crossOrigin=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}});var $a={};function es(e){Ja.call(this,e)}function ts(e){Ja.call(this,e)}function ns(e){Ja.call(this,e)}function rs(e){Ja.call(this,e)}function is(e){Ja.call(this,e)}function os(e){Ja.call(this,e)}function as(e){Ja.call(this,e)}function ss(){this.type="Curve",this.arcLengthDivisions=200}function ls(e,t,n,r,i,o,a,s){ss.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function cs(e,t,n,r,i,o){ls.call(this,e,t,n,n,r,i,o),this.type="ArcCurve"}function us(){var e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){var l=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(r-t)/(a+s)+(r-n)/s;i(t,n,l*=a,c*=a)},calc:function(i){var o=i*i;return e+t*i+n*o+r*(o*i)}}}es.prototype=Object.assign(Object.create(Ja.prototype),{constructor:es,load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=Ka.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;if(void 0===$a[e]){var a,s=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(s){var l=s[1],c=!!s[2],u=s[3];u=decodeURIComponent(u),c&&(u=atob(u));try{var h,d=(this.responseType||"").toLowerCase();switch(d){case"arraybuffer":case"blob":for(var f=new Uint8Array(u.length),p=0;p<u.length;p++)f[p]=u.charCodeAt(p);h="blob"===d?new Blob([f.buffer],{type:l}):f.buffer;break;case"document":var m=new DOMParser;h=m.parseFromString(u,l);break;case"json":h=JSON.parse(u);break;default:h=u}setTimeout((function(){t&&t(h),i.manager.itemEnd(e)}),0)}catch(v){setTimeout((function(){r&&r(v),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{for(var g in $a[e]=[],$a[e].push({onLoad:t,onProgress:n,onError:r}),(a=new XMLHttpRequest).open("GET",e,!0),a.addEventListener("load",(function(t){var n=this.response,r=$a[e];if(delete $a[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),Ka.add(e,n);for(var o=0,a=r.length;o<a;o++){var s=r[o];s.onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else{for(var l=0,c=r.length;l<c;l++){var u=r[l];u.onError&&u.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),a.addEventListener("progress",(function(t){for(var n=$a[e],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(t)}}),!1),a.addEventListener("error",(function(t){var n=$a[e];delete $a[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),a.addEventListener("abort",(function(t){var n=$a[e];delete $a[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(a.responseType=this.responseType),void 0!==this.withCredentials&&(a.withCredentials=this.withCredentials),a.overrideMimeType&&a.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)a.setRequestHeader(g,this.requestHeader[g]);a.send(null)}return i.manager.itemStart(e),a}$a[e].push({onLoad:t,onProgress:n,onError:r})},setResponseType:function(e){return this.responseType=e,this},setMimeType:function(e){return this.mimeType=e,this}}),ts.prototype=Object.assign(Object.create(Ja.prototype),{constructor:ts,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},parse:function(e){for(var t=[],n=0;n<e.length;n++){var r=Xa.parse(e[n]);t.push(r)}return t}}),ns.prototype=Object.assign(Object.create(Ja.prototype),{constructor:ns,load:function(e,t,n,r){var i=this,o=[],a=new wo,s=new es(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(i.withCredentials);var l=0;function c(c){s.load(e[c],(function(e){var n=i.parse(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(l+=1)&&(1===n.mipmapCount&&(a.minFilter=1006),a.image=o,a.format=n.format,a.needsUpdate=!0,t&&t(a))}),n,r)}if(Array.isArray(e))for(var u=0,h=e.length;u<h;++u)c(u);else s.load(e,(function(e){var n=i.parse(e,!0);if(n.isCubemap){for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var l=0;l<n.mipmapCount;l++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+l]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}a.image=o}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=1006),a.format=n.format,a.needsUpdate=!0,t&&t(a)}),n,r);return a}}),rs.prototype=Object.assign(Object.create(Ja.prototype),{constructor:rs,load:function(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=Ka.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),Ka.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return a.addEventListener("load",s,!1),a.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}),is.prototype=Object.assign(Object.create(Ja.prototype),{constructor:is,load:function(e,t,n,r){var i=new Qt,o=new rs(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,6===++a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(var l=0;l<e.length;++l)s(l);return i}}),os.prototype=Object.assign(Object.create(Ja.prototype),{constructor:os,load:function(e,t,n,r){var i=this,o=new Jt,a=new es(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(i.withCredentials),a.load(e,(function(e){var n=i.parse(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:1001,o.wrapT=void 0!==n.wrapT?n.wrapT:1001,o.magFilter=void 0!==n.magFilter?n.magFilter:1006,o.minFilter=void 0!==n.minFilter?n.minFilter:1006,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=1008),1===n.mipmapCount&&(o.minFilter=1006),o.needsUpdate=!0,t&&t(o,n))}),n,r),o}}),as.prototype=Object.assign(Object.create(Ja.prototype),{constructor:as,load:function(e,t,n,r){var i=new x,o=new rs(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;var r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:1023,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}),Object.assign(ss.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n=[],r=this.getPoint(0),i=0;n.push(0);for(var o=1;o<=e;o++)i+=(t=this.getPoint(o/e)).distanceTo(r),n.push(i),r=t;return this.cacheArcLengths=n,n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,o=r.length;n=t||e*r[o-1];for(var a,s=0,l=o-1;s<=l;)if((a=r[i=Math.floor(s+(l-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(r[i=l]===n)return i/(o-1);var c=r[i];return(i+(n-c)/(r[i+1]-c))/(o-1)},getTangent:function(e,t){var n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);var i=this.getPoint(n),o=this.getPoint(r),a=t||(i.isVector2?new v:new T);return a.copy(o).sub(i).normalize(),a},getTangentAt:function(e,t){var n=this.getUtoTmapping(e);return this.getTangent(n,t)},computeFrenetFrames:function(e,t){for(var n=new T,r=[],i=[],o=[],a=new T,s=new te,l=0;l<=e;l++){var c=l/e;r[l]=this.getTangentAt(c,new T),r[l].normalize()}i[0]=new T,o[0]=new T;var u=Number.MAX_VALUE,h=Math.abs(r[0].x),d=Math.abs(r[0].y),f=Math.abs(r[0].z);h<=u&&(u=h,n.set(1,0,0)),d<=u&&(u=d,n.set(0,1,0)),f<=u&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(var p=1;p<=e;p++){if(i[p]=i[p-1].clone(),o[p]=o[p-1].clone(),a.crossVectors(r[p-1],r[p]),a.length()>Number.EPSILON){a.normalize();var m=Math.acos(g.clamp(r[p-1].dot(r[p]),-1,1));i[p].applyMatrix4(s.makeRotationAxis(a,m))}o[p].crossVectors(r[p],i[p])}if(!0===t){var v=Math.acos(g.clamp(i[0].dot(i[e]),-1,1));v/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(v=-v);for(var y=1;y<=e;y++)i[y].applyMatrix4(s.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],i[y])}return{tangents:r,normals:i,binormals:o}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),ls.prototype=Object.create(ss.prototype),ls.prototype.constructor=ls,ls.prototype.isEllipseCurve=!0,ls.prototype.getPoint=function(e,t){for(var n=t||new v,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(a),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var c=Math.cos(this.aRotation),u=Math.sin(this.aRotation),h=s-this.aX,d=l-this.aY;s=h*c-d*u+this.aX,l=h*u+d*c+this.aY}return n.set(s,l)},ls.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},ls.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},ls.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},cs.prototype=Object.create(ls.prototype),cs.prototype.constructor=cs,cs.prototype.isArcCurve=!0;var hs=new T,ds=new us,fs=new us,ps=new us;function ms(e,t,n,r){void 0===e&&(e=[]),void 0===t&&(t=!1),void 0===n&&(n="centripetal"),void 0===r&&(r=.5),ss.call(this),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}function gs(e,t,n,r,i){var o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function vs(e,t,n,r){return function(e,t){var n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function ys(e,t,n,r,i){return function(e,t){var n=1-e;return n*n*n*t}(e,t)+function(e,t){var n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}function bs(e,t,n,r){void 0===e&&(e=new v),void 0===t&&(t=new v),void 0===n&&(n=new v),void 0===r&&(r=new v),ss.call(this),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}function ws(e,t,n,r){void 0===e&&(e=new T),void 0===t&&(t=new T),void 0===n&&(n=new T),void 0===r&&(r=new T),ss.call(this),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}function xs(e,t){void 0===e&&(e=new v),void 0===t&&(t=new v),ss.call(this),this.type="LineCurve",this.v1=e,this.v2=t}function _s(e,t){void 0===e&&(e=new T),void 0===t&&(t=new T),ss.call(this),this.type="LineCurve3",this.v1=e,this.v2=t}function Es(e,t,n){void 0===e&&(e=new v),void 0===t&&(t=new v),void 0===n&&(n=new v),ss.call(this),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}function As(e,t,n){void 0===e&&(e=new T),void 0===t&&(t=new T),void 0===n&&(n=new T),ss.call(this),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}function Ss(e){void 0===e&&(e=[]),ss.call(this),this.type="SplineCurve",this.points=e}ms.prototype=Object.create(ss.prototype),ms.prototype.constructor=ms,ms.prototype.isCatmullRomCurve3=!0,ms.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n,r,i=t,o=this.points,a=o.length,s=(a-(this.closed?0:1))*e,l=Math.floor(s),c=s-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/a)+1)*a:0===c&&l===a-1&&(l=a-2,c=1),this.closed||l>0?n=o[(l-1)%a]:(hs.subVectors(o[0],o[1]).add(o[0]),n=hs);var u=o[l%a],h=o[(l+1)%a];if(this.closed||l+2<a?r=o[(l+2)%a]:(hs.subVectors(o[a-1],o[a-2]).add(o[a-1]),r=hs),"centripetal"===this.curveType||"chordal"===this.curveType){var d="chordal"===this.curveType?.5:.25,f=Math.pow(n.distanceToSquared(u),d),p=Math.pow(u.distanceToSquared(h),d),m=Math.pow(h.distanceToSquared(r),d);p<1e-4&&(p=1),f<1e-4&&(f=p),m<1e-4&&(m=p),ds.initNonuniformCatmullRom(n.x,u.x,h.x,r.x,f,p,m),fs.initNonuniformCatmullRom(n.y,u.y,h.y,r.y,f,p,m),ps.initNonuniformCatmullRom(n.z,u.z,h.z,r.z,f,p,m)}else"catmullrom"===this.curveType&&(ds.initCatmullRom(n.x,u.x,h.x,r.x,this.tension),fs.initCatmullRom(n.y,u.y,h.y,r.y,this.tension),ps.initCatmullRom(n.z,u.z,h.z,r.z,this.tension));return i.set(ds.calc(c),fs.calc(c),ps.calc(c)),i},ms.prototype.copy=function(e){ss.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},ms.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},ms.prototype.fromJSON=function(e){ss.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new T).fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},bs.prototype=Object.create(ss.prototype),bs.prototype.constructor=bs,bs.prototype.isCubicBezierCurve=!0,bs.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(ys(e,r.x,i.x,o.x,a.x),ys(e,r.y,i.y,o.y,a.y)),n},bs.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},bs.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},bs.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},ws.prototype=Object.create(ss.prototype),ws.prototype.constructor=ws,ws.prototype.isCubicBezierCurve3=!0,ws.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(ys(e,r.x,i.x,o.x,a.x),ys(e,r.y,i.y,o.y,a.y),ys(e,r.z,i.z,o.z,a.z)),n},ws.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},ws.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},ws.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},xs.prototype=Object.create(ss.prototype),xs.prototype.constructor=xs,xs.prototype.isLineCurve=!0,xs.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},xs.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},xs.prototype.getTangent=function(e,t){var n=t||new v;return n.copy(this.v2).sub(this.v1).normalize(),n},xs.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},xs.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},xs.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},_s.prototype=Object.create(ss.prototype),_s.prototype.constructor=_s,_s.prototype.isLineCurve3=!0,_s.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},_s.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},_s.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},_s.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},_s.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Es.prototype=Object.create(ss.prototype),Es.prototype.constructor=Es,Es.prototype.isQuadraticBezierCurve=!0,Es.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(vs(e,r.x,i.x,o.x),vs(e,r.y,i.y,o.y)),n},Es.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Es.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Es.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},As.prototype=Object.create(ss.prototype),As.prototype.constructor=As,As.prototype.isQuadraticBezierCurve3=!0,As.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(vs(e,r.x,i.x,o.x),vs(e,r.y,i.y,o.y),vs(e,r.z,i.z,o.z)),n},As.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},As.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},As.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ss.prototype=Object.create(ss.prototype),Ss.prototype.constructor=Ss,Ss.prototype.isSplineCurve=!0,Ss.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],l=r[o],c=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(gs(a,s.x,l.x,c.x,u.x),gs(a,s.y,l.y,c.y,u.y)),n},Ss.prototype.copy=function(e){ss.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this},Ss.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e},Ss.prototype.fromJSON=function(e){ss.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new v).fromArray(r))}return this};var Ms=Object.freeze({__proto__:null,ArcCurve:cs,CatmullRomCurve3:ms,CubicBezierCurve:bs,CubicBezierCurve3:ws,EllipseCurve:ls,LineCurve:xs,LineCurve3:_s,QuadraticBezierCurve:Es,QuadraticBezierCurve3:As,SplineCurve:Ss});function Ts(){ss.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Cs(e){Ts.call(this),this.type="Path",this.currentPoint=new v,e&&this.setFromPoints(e)}function Os(e){Cs.call(this,e),this.uuid=g.generateUUID(),this.type="Shape",this.holes=[]}function Rs(e,t){void 0===t&&(t=1),Me.call(this),this.type="Light",this.color=new Ye(e),this.intensity=t}function ks(e,t,n){Rs.call(this,e,n),this.type="HemisphereLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.groundColor=new Ye(t)}function Ps(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new v(512,512),this.map=null,this.mapPass=null,this.matrix=new te,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new tn,this._frameExtents=new v(1,1),this._viewportCount=1,this._viewports=[new E(0,0,1,1)]}function Ls(){Ps.call(this,new Yt(50,1,.5,500)),this.focus=1}function Ds(e,t,n,r,i,o){Rs.call(this,e,t),this.type="SpotLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.target=new Me,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new Ls}function Is(){Ps.call(this,new Yt(90,1,.5,500)),this._frameExtents=new v(4,2),this._viewportCount=6,this._viewports=[new E(2,1,1,1),new E(0,1,1,1),new E(3,1,1,1),new E(1,1,1,1),new E(3,0,1,1),new E(1,0,1,1)],this._cubeDirections=[new T(1,0,0),new T(-1,0,0),new T(0,0,1),new T(0,0,-1),new T(0,1,0),new T(0,-1,0)],this._cubeUps=[new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,0,1),new T(0,0,-1)]}function Ns(e,t,n,r){Rs.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new Is}function js(e,t,n,r,i,o){void 0===e&&(e=-1),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=-1),void 0===i&&(i=.1),void 0===o&&(o=2e3),Xt.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}function Bs(){Ps.call(this,new js(-5,5,5,-5,.5,500))}function Fs(e,t){Rs.call(this,e,t),this.type="DirectionalLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.target=new Me,this.shadow=new Bs}function zs(e,t){Rs.call(this,e,t),this.type="AmbientLight"}function Hs(e,t,n,r){Rs.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}Ts.prototype=Object.assign(Object.create(ss.prototype),{constructor:Ts,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new xs(t,e))},getPoint:function(e){for(var t=e*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=t){var i=n[r]-t,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.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 e=[],t=0,n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){void 0===e&&(e=12);for(var t,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*e:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a),l=0;l<s.length;l++){var c=s[l];t&&t.equals(c)||(n.push(c),t=c)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){ss.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=ss.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,n=this.curves.length;t<n;t++){var r=this.curves[t];e.curves.push(r.toJSON())}return e},fromJSON:function(e){ss.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push((new Ms[r.type]).fromJSON(r))}return this}}),Cs.prototype=Object.assign(Object.create(Ts.prototype),{constructor:Cs,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this},moveTo:function(e,t){return this.currentPoint.set(e,t),this},lineTo:function(e,t){var n=new xs(this.currentPoint.clone(),new v(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this},quadraticCurveTo:function(e,t,n,r){var i=new Es(this.currentPoint.clone(),new v(e,t),new v(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this},bezierCurveTo:function(e,t,n,r,i,o){var a=new bs(this.currentPoint.clone(),new v(e,t),new v(n,r),new v(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this},splineThru:function(e){var t=new Ss([this.currentPoint.clone()].concat(e));return this.curves.push(t),this.currentPoint.copy(e[e.length-1]),this},arc:function(e,t,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this},absarc:function(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this},ellipse:function(e,t,n,r,i,o,a,s){var l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,a,s),this},absellipse:function(e,t,n,r,i,o,a,s){var l=new ls(e,t,n,r,i,o,a,s);if(this.curves.length>0){var c=l.getPoint(0);c.equals(this.currentPoint)||this.lineTo(c.x,c.y)}this.curves.push(l);var u=l.getPoint(1);return this.currentPoint.copy(u),this},copy:function(e){return Ts.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=Ts.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return Ts.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Os.prototype=Object.assign(Object.create(Cs.prototype),{constructor:Os,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){Cs.prototype.copy.call(this,e),this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push(r.clone())}return this},toJSON:function(){var e=Cs.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,n=this.holes.length;t<n;t++){var r=this.holes[t];e.holes.push(r.toJSON())}return e},fromJSON:function(e){Cs.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push((new Cs).fromJSON(r))}return this}}),Rs.prototype=Object.assign(Object.create(Me.prototype),{constructor:Rs,isLight:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),ks.prototype=Object.assign(Object.create(Rs.prototype),{constructor:ks,isHemisphereLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(Ps.prototype,{_projScreenMatrix:new te,_lightPositionWorld:new T,_lookTarget:new T,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(e){var t=this.camera,n=this.matrix,r=this._projScreenMatrix,i=this._lookTarget,o=this._lightPositionWorld;o.setFromMatrixPosition(e.matrixWorld),t.position.copy(o),i.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(i),t.updateMatrixWorld(),r.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(r),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)},getViewport:function(e){return this._viewports[e]},getFrameExtents:function(){return this._frameExtents},copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),Ls.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Ls,isSpotLightShadow:!0,updateMatrices:function(e){var t=this.camera,n=2*g.RAD2DEG*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),Ps.prototype.updateMatrices.call(this,e)}}),Ds.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Ds,isSpotLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Is.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Is,isPointLightShadow:!0,updateMatrices:function(e,t){void 0===t&&(t=0);var n=this.camera,r=this.matrix,i=this._lightPositionWorld,o=this._lookTarget,a=this._projScreenMatrix;i.setFromMatrixPosition(e.matrixWorld),n.position.copy(i),o.copy(n.position),o.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(o),n.updateMatrixWorld(),r.makeTranslation(-i.x,-i.y,-i.z),a.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(a)}}),Ns.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Ns,isPointLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),js.prototype=Object.assign(Object.create(Xt.prototype),{constructor:js,isOrthographicCamera:!0,copy:function(e,t){return Xt.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){var l=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o=(i+=l*this.view.offsetX)+l*this.view.width,s=(a-=c*this.view.offsetY)-c*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),Bs.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Bs,isDirectionalLightShadow:!0,updateMatrices:function(e){Ps.prototype.updateMatrices.call(this,e)}}),Fs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Fs,isDirectionalLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),zs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:zs,isAmbientLight:!0}),Hs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Hs,isRectAreaLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=Rs.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}});var Us=function(){function e(){Object.defineProperty(this,"isSphericalHarmonics3",{value:!0}),this.coefficients=[];for(var e=0;e<9;e++)this.coefficients.push(new T)}var t=e.prototype;return t.set=function(e){for(var t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this},t.zero=function(){for(var e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this},t.getAt=function(e,t){var n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t},t.getIrradianceAt=function(e,t){var n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t},t.add=function(e){for(var t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this},t.addScaledSH=function(e,t){for(var n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this},t.scale=function(e){for(var t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this},t.lerp=function(e,t){for(var n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this},t.equals=function(e){for(var t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0},t.copy=function(e){return this.set(e.coefficients)},t.clone=function(){return(new this.constructor).copy(this)},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=this.coefficients,r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this},t.toArray=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);for(var n=this.coefficients,r=0;r<9;r++)n[r].toArray(e,t+3*r);return e},e.getBasisAt=function(e,t){var n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)},e}();function Vs(e,t){Rs.call(this,void 0,t),this.type="LightProbe",this.sh=void 0!==e?e:new Us}function Gs(e){Ja.call(this,e),this.textures={}}Vs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Vs,isLightProbe:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.sh.copy(e.sh),this},fromJSON:function(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this},toJSON:function(e){var t=Rs.prototype.toJSON.call(this,e);return t.object.sh=this.sh.toArray(),t}}),Gs.prototype=Object.assign(Object.create(Ja.prototype),{constructor:Gs,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},parse:function(e){var t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var r=new La[e.type];if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=(new Ye).setHex(e.sheen)),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(r.skinning=e.skinning),void 0!==e.morphTargets&&(r.morphTargets=e.morphTargets),void 0!==e.morphNormals&&(r.morphNormals=e.morphNormals),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.vertexTangents&&(r.vertexTangents=e.vertexTangents),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"===typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(var i in e.uniforms){var o=e.uniforms[i];switch(r.uniforms[i]={},o.type){case"t":r.uniforms[i].value=n(o.value);break;case"c":r.uniforms[i].value=(new Ye).setHex(o.value);break;case"v2":r.uniforms[i].value=(new v).fromArray(o.value);break;case"v3":r.uniforms[i].value=(new T).fromArray(o.value);break;case"v4":r.uniforms[i].value=(new E).fromArray(o.value);break;case"m3":r.uniforms[i].value=(new y).fromArray(o.value);break;case"m4":r.uniforms[i].value=(new te).fromArray(o.value);break;default:r.uniforms[i].value=o.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(var a in e.extensions)r.extensions[a]=e.extensions[a];if(void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){var s=e.normalScale;!1===Array.isArray(s)&&(s=[s,s]),r.normalScale=(new v).fromArray(s)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new v).fromArray(e.clearcoatNormalScale)),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),r},setTextures:function(e){return this.textures=e,this}});var Ws={decodeText:function(t){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(t);for(var n="",r=0,i=t.length;r<i;r++)n+=String.fromCharCode(t[r]);try{return decodeURIComponent(escape(n))}catch(e){return n}},extractUrlBase:function(e){var t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}};function qs(){_t.call(this),this.type="InstancedBufferGeometry",this.instanceCount=1/0}function Xs(e,t,n,r){"number"===typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),tt.call(this,e,t,n),this.meshPerAttribute=r||1}function Ys(e){Ja.call(this,e)}qs.prototype=Object.assign(Object.create(_t.prototype),{constructor:qs,isInstancedBufferGeometry:!0,copy:function(e){return _t.prototype.copy.call(this,e),this.instanceCount=e.instanceCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e=_t.prototype.toJSON.call(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}),Xs.prototype=Object.assign(Object.create(tt.prototype),{constructor:Xs,isInstancedBufferAttribute:!0,copy:function(e){return tt.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},toJSON:function(){var e=tt.prototype.toJSON.call(this);return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}),Ys.prototype=Object.assign(Object.create(Ja.prototype),{constructor:Ys,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},parse:function(e){var t={},n={};function r(e,r){if(void 0!==t[r])return t[r];var i=e.interleavedBuffers[r],o=function(e,t){if(void 0!==n[t])return n[t];var r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),a=new vi(pt(i.type,o),i.stride);return a.uuid=i.uuid,t[r]=a,a}var i=e.isInstancedBufferGeometry?new qs:new _t,o=e.data.index;if(void 0!==o){var a=pt(o.type,o.array);i.setIndex(new tt(a,1))}var s=e.data.attributes;for(var l in s){var c=s[l],u=void 0;if(c.isInterleavedBufferAttribute)u=new wi(r(e.data,c.data),c.itemSize,c.offset,c.normalized);else{var h=pt(c.type,c.array);u=new(c.isInstancedBufferAttribute?Xs:tt)(h,c.itemSize,c.normalized)}void 0!==c.name&&(u.name=c.name),i.setAttribute(l,u)}var d=e.data.morphAttributes;if(d)for(var f in d){for(var p=d[f],m=[],g=0,v=p.length;g<v;g++){var y=p[g],b=void 0;b=y.isInterleavedBufferAttribute?new wi(r(e.data,y.data),y.itemSize,y.offset,y.normalized):new tt(pt(y.type,y.array),y.itemSize,y.normalized),void 0!==y.name&&(b.name=y.name),m.push(b)}i.morphAttributes[f]=m}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);var w=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==w)for(var x=0,_=w.length;x!==_;++x){var E=w[x];i.addGroup(E.start,E.count,E.materialIndex)}var A=e.data.boundingSphere;if(void 0!==A){var S=new T;void 0!==A.center&&S.fromArray(A.center),i.boundingSphere=new q(S,A.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}});var Ks=function(e){function t(t){return e.call(this,t)||this}s(t,e);var n=t.prototype;return n.load=function(e,t,n,r){var i=this,o=""===this.path?Ws.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;var a=new es(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){var o=null;try{o=JSON.parse(n)}catch(s){return void 0!==r&&r(s),void console.error("THREE:ObjectLoader: Can't parse "+e+".",s.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,t):console.error("THREE.ObjectLoader: Can't load "+e)}),n,r)},n.parse=function(e,t){var n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),a=this.parseTextures(e.textures,o),s=this.parseMaterials(e.materials,a),l=this.parseObject(e.object,i,s,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){var u=!1;for(var h in o)if(o[h]instanceof HTMLImageElement){u=!0;break}!1===u&&t(l)}return l},n.parseShapes=function(e){var t={};if(void 0!==e)for(var n=0,r=e.length;n<r;n++){var i=(new Os).fromJSON(e[n]);t[i.uuid]=i}return t},n.parseSkeletons=function(e,t){var n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(var i=0,o=e.length;i<o;i++){var a=(new Yi).fromJSON(e[i],r);n[a.uuid]=a}return n},n.parseGeometries=function(e,t){var n,r={};if(void 0!==e)for(var i=new Ys,o=0,a=e.length;o<a;o++){var s=void 0,l=e[o];switch(l.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new _a[l.type](l.width,l.height,l.widthSegments,l.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":s=new _a[l.type](l.width,l.height,l.depth,l.widthSegments,l.heightSegments,l.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new _a[l.type](l.radius,l.segments,l.thetaStart,l.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new _a[l.type](l.radiusTop,l.radiusBottom,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new _a[l.type](l.radius,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new _a[l.type](l.radius,l.widthSegments,l.heightSegments,l.phiStart,l.phiLength,l.thetaStart,l.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new _a[l.type](l.radius,l.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new _a[l.type](l.innerRadius,l.outerRadius,l.thetaSegments,l.phiSegments,l.thetaStart,l.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new _a[l.type](l.radius,l.tube,l.radialSegments,l.tubularSegments,l.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new _a[l.type](l.radius,l.tube,l.tubularSegments,l.radialSegments,l.p,l.q);break;case"TubeGeometry":case"TubeBufferGeometry":s=new _a[l.type]((new Ms[l.path.type]).fromJSON(l.path),l.tubularSegments,l.radius,l.radialSegments,l.closed);break;case"LatheGeometry":case"LatheBufferGeometry":s=new _a[l.type](l.points,l.segments,l.phiStart,l.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new _a[l.type](l.vertices,l.indices,l.radius,l.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":n=[];for(var c=0,u=l.shapes.length;c<u;c++){var h=t[l.shapes[c]];n.push(h)}s=new _a[l.type](n,l.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":n=[];for(var d=0,f=l.shapes.length;d<f;d++){var p=t[l.shapes[d]];n.push(p)}var m=l.options.extrudePath;void 0!==m&&(l.options.extrudePath=(new Ms[m.type]).fromJSON(m)),s=new _a[l.type](n,l.options);break;case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(l);break;case"Geometry":"THREE"in window&&"LegacyJSONLoader"in THREE?s=(new THREE.LegacyJSONLoader).parse(l,this.resourcePath).geometry:console.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+l.type+'"');continue}s.uuid=l.uuid,void 0!==l.name&&(s.name=l.name),!0===s.isBufferGeometry&&void 0!==l.userData&&(s.userData=l.userData),r[l.uuid]=s}return r},n.parseMaterials=function(e,t){var n={},r={};if(void 0!==e){var i=new Gs;i.setTextures(t);for(var o=0,a=e.length;o<a;o++){var s=e[o];if("MultiMaterial"===s.type){for(var l=[],c=0;c<s.materials.length;c++){var u=s.materials[c];void 0===n[u.uuid]&&(n[u.uuid]=i.parse(u)),l.push(n[u.uuid])}r[s.uuid]=l}else void 0===n[s.uuid]&&(n[s.uuid]=i.parse(s)),r[s.uuid]=n[s.uuid]}}return r},n.parseAnimations=function(e){var t={};if(void 0!==e)for(var n=0;n<e.length;n++){var r=e[n],i=Xa.parse(r);t[i.uuid]=i}return t},n.parseImages=function(e,t){var n,r=this,i={};function o(e){if("string"===typeof e){var t=e;return function(e){return r.manager.itemStart(e),n.load(e,(function(){r.manager.itemEnd(e)}),void 0,(function(){r.manager.itemError(e),r.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:r.resourcePath+t)}return e.data?{data:pt(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){var a=new Qa(t);(n=new rs(a)).setCrossOrigin(this.crossOrigin);for(var s=0,l=e.length;s<l;s++){var c=e[s],u=c.url;if(Array.isArray(u)){i[c.uuid]=[];for(var h=0,d=u.length;h<d;h++){var f=o(u[h]);null!==f&&(f instanceof HTMLImageElement?i[c.uuid].push(f):i[c.uuid].push(new Jt(f.data,f.width,f.height)))}}else{var p=o(c.url);null!==p&&(i[c.uuid]=p)}}}return i},n.parseTextures=function(e,t){function n(e,t){return"number"===typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var r={};if(void 0!==e)for(var i=0,o=e.length;i<o;i++){var a=e[i];void 0===a.image&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),void 0===t[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=void 0,l=t[a.image];Array.isArray(l)?(s=new Qt(l),6===l.length&&(s.needsUpdate=!0)):(s=l&&l.data?new Jt(l.data,l.width,l.height):new x(l),l&&(s.needsUpdate=!0)),s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Qs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],Zs),s.wrapT=n(a.wrap[1],Zs)),void 0!==a.format&&(s.format=a.format),void 0!==a.type&&(s.type=a.type),void 0!==a.encoding&&(s.encoding=a.encoding),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Js)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Js)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),void 0!==a.premultiplyAlpha&&(s.premultiplyAlpha=a.premultiplyAlpha),void 0!==a.unpackAlignment&&(s.unpackAlignment=a.unpackAlignment),r[a.uuid]=s}return r},n.parseObject=function(e,t,n,r){var i,o,a;function s(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function l(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],r=0,i=e.length;r<i;r++){var o=e[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),t.push(n[o])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}switch(e.type){case"Scene":i=new gi,void 0!==e.background&&Number.isInteger(e.background)&&(i.background=new Ye(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?i.fog=new mi(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(i.fog=new pi(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":i=new Yt(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(i.focus=e.focus),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.filmGauge&&(i.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(i.filmOffset=e.filmOffset),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"OrthographicCamera":i=new js(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"AmbientLight":i=new zs(e.color,e.intensity);break;case"DirectionalLight":i=new Fs(e.color,e.intensity);break;case"PointLight":i=new Ns(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":i=new Hs(e.color,e.intensity,e.width,e.height);break;case"SpotLight":i=new Ds(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":i=new ks(e.color,e.groundColor,e.intensity);break;case"LightProbe":i=(new Vs).fromJSON(e);break;case"SkinnedMesh":i=new Gi(o=s(e.geometry),a=l(e.material)),void 0!==e.bindMode&&(i.bindMode=e.bindMode),void 0!==e.bindMatrix&&i.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(i.skeleton=e.skeleton);break;case"Mesh":i=new zt(o=s(e.geometry),a=l(e.material));break;case"InstancedMesh":o=s(e.geometry),a=l(e.material);var c=e.count,u=e.instanceMatrix;(i=new $i(o,a,c)).instanceMatrix=new tt(new Float32Array(u.array),16);break;case"LOD":i=new Bi;break;case"Line":i=new ao(s(e.geometry),l(e.material));break;case"LineLoop":i=new uo(s(e.geometry),l(e.material));break;case"LineSegments":i=new co(s(e.geometry),l(e.material));break;case"PointCloud":case"Points":i=new vo(s(e.geometry),l(e.material));break;case"Sprite":i=new Di(l(e.material));break;case"Group":i=new ii;break;case"Bone":i=new Wi;break;default:i=new Me}if(i.uuid=e.uuid,void 0!==e.name&&(i.name=e.name),void 0!==e.matrix?(i.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(i.matrixAutoUpdate=e.matrixAutoUpdate),i.matrixAutoUpdate&&i.matrix.decompose(i.position,i.quaternion,i.scale)):(void 0!==e.position&&i.position.fromArray(e.position),void 0!==e.rotation&&i.rotation.fromArray(e.rotation),void 0!==e.quaternion&&i.quaternion.fromArray(e.quaternion),void 0!==e.scale&&i.scale.fromArray(e.scale)),void 0!==e.castShadow&&(i.castShadow=e.castShadow),void 0!==e.receiveShadow&&(i.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(i.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(i.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(i.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&i.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(i.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.frustumCulled&&(i.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(i.renderOrder=e.renderOrder),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.layers&&(i.layers.mask=e.layers),void 0!==e.children)for(var h=e.children,d=0;d<h.length;d++)i.add(this.parseObject(h[d],t,n,r));if(void 0!==e.animations)for(var f=e.animations,p=0;p<f.length;p++){var m=f[p];i.animations.push(r[m])}if("LOD"===e.type){void 0!==e.autoUpdate&&(i.autoUpdate=e.autoUpdate);for(var g=e.levels,v=0;v<g.length;v++){var y=g[v],b=i.getObjectByProperty("uuid",y.object);void 0!==b&&i.addLevel(b,y.distance)}}return i},n.bindSkeletons=function(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){var n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))},n.setTexturePath=function(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)},t}(Ja),Qs={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Zs={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Js={NearestFilter:1003,NearestMipmapNearestFilter:1004,NearestMipmapLinearFilter:1005,LinearFilter:1006,LinearMipmapNearestFilter:1007,LinearMipmapLinearFilter:1008};function $s(e){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),Ja.call(this,e),this.options={premultiplyAlpha:"none"}}function el(){this.type="ShapePath",this.color=new Ye,this.subPaths=[],this.currentPath=null}$s.prototype=Object.assign(Object.create(Ja.prototype),{constructor:$s,isImageBitmapLoader:!0,setOptions:function(e){return this.options=e,this},load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=Ka.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;var a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,i.options)})).then((function(n){Ka.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}),Object.assign(el.prototype,{moveTo:function(e,t){return this.currentPath=new Cs,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this},lineTo:function(e,t){return this.currentPath.lineTo(e,t),this},quadraticCurveTo:function(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this},bezierCurveTo:function(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this},splineThru:function(e){return this.currentPath.splineThru(e),this},toShapes:function(e,t){function n(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n],o=new Os;o.curves=i.curves,t.push(o)}return t}function r(e,t){for(var n=t.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=t[i],s=t[o],l=s.x-a.x,c=s.y-a.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(a=t[o],l=-l,s=t[i],c=-c),e.y<a.y||e.y>s.y)continue;if(e.y===a.y){if(e.x===a.x)return!0}else{var u=c*(e.x-a.x)-l*(e.y-a.y);if(0===u)return!0;if(u<0)continue;r=!r}}else{if(e.y!==a.y)continue;if(s.x<=e.x&&e.x<=a.x||a.x<=e.x&&e.x<=s.x)return!0}}return r}var i,o,a,s=ia.isClockWise,l=this.subPaths;if(0===l.length)return[];if(!0===t)return n(l);var c=[];if(1===l.length)return o=l[0],(a=new Os).curves=o.curves,c.push(a),c;var u=!s(l[0].getPoints());u=e?!u:u;var h,d,f=[],p=[],m=[],g=0;p[g]=void 0,m[g]=[];for(var v=0,y=l.length;v<y;v++)i=s(h=(o=l[v]).getPoints()),(i=e?!i:i)?(!u&&p[g]&&g++,p[g]={s:new Os,p:h},p[g].s.curves=o.curves,u&&g++,m[g]=[]):m[g].push({h:o,p:h[0]});if(!p[0])return n(l);if(p.length>1){for(var b=!1,w=[],x=0,_=p.length;x<_;x++)f[x]=[];for(var E=0,A=p.length;E<A;E++)for(var S=m[E],M=0;M<S.length;M++){for(var T=S[M],C=!0,O=0;O<p.length;O++)r(T.p,p[O].p)&&(E!==O&&w.push({froms:E,tos:O,hole:M}),C?(C=!1,f[O].push(T)):b=!0);C&&f[E].push(T)}w.length>0&&(b||(m=f))}for(var R=0,k=p.length;R<k;R++){a=p[R].s,c.push(a);for(var P=0,L=(d=m[R]).length;P<L;P++)a.holes.push(d[P].h)}return c}});var tl,nl=function(){function e(e){Object.defineProperty(this,"isFont",{value:!0}),this.type="Font",this.data=e}return e.prototype.generateShapes=function(e,t){void 0===t&&(t=100);for(var n=[],r=function(e,t,n){for(var r=Array.from?Array.from(e):String(e).split(""),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[],s=0,l=0,c=0;c<r.length;c++){var u=r[c];if("\n"===u)s=0,l-=o;else{var h=rl(u,i,s,l,n);s+=h.offsetX,a.push(h.path)}}return a}(e,t,this.data),i=0,o=r.length;i<o;i++)Array.prototype.push.apply(n,r[i].toShapes());return n},e}();function rl(e,t,n,r,i){var o=i.glyphs[e]||i.glyphs["?"];if(o){var a,s,l,c,u,h,d,f,p=new el;if(o.o)for(var m=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),g=0,v=m.length;g<v;)switch(m[g++]){case"m":a=m[g++]*t+n,s=m[g++]*t+r,p.moveTo(a,s);break;case"l":a=m[g++]*t+n,s=m[g++]*t+r,p.lineTo(a,s);break;case"q":l=m[g++]*t+n,c=m[g++]*t+r,u=m[g++]*t+n,h=m[g++]*t+r,p.quadraticCurveTo(u,h,l,c);break;case"b":l=m[g++]*t+n,c=m[g++]*t+r,u=m[g++]*t+n,h=m[g++]*t+r,d=m[g++]*t+n,f=m[g++]*t+r,p.bezierCurveTo(u,h,d,f,l,c)}return{offsetX:o.ha*t,path:p}}console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".")}function il(e){Ja.call(this,e)}il.prototype=Object.assign(Object.create(Ja.prototype),{constructor:il,load:function(t,n,r,i){var o=this,a=new es(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(t){var r;try{r=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),r=JSON.parse(t.substring(65,t.length-2))}var i=o.parse(r);n&&n(i)}),r,i)},parse:function(e){return new nl(e)}});var ol={getContext:function(){return void 0===tl&&(tl=new(window.AudioContext||window.webkitAudioContext)),tl},setContext:function(e){tl=e}};function al(e){Ja.call(this,e)}function sl(e,t,n){Vs.call(this,void 0,n);var r=(new Ye).set(e),i=(new Ye).set(t),o=new T(r.r,r.g,r.b),a=new T(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(l)}function ll(e,t){Vs.call(this,void 0,t);var n=(new Ye).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}al.prototype=Object.assign(Object.create(Ja.prototype),{constructor:al,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setResponseType("arraybuffer"),a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{var a=r.slice(0);ol.getContext().decodeAudioData(a,(function(e){n(e)}))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)}}),sl.prototype=Object.assign(Object.create(Vs.prototype),{constructor:sl,isHemisphereLightProbe:!0,copy:function(e){return Vs.prototype.copy.call(this,e),this},toJSON:function(e){return Vs.prototype.toJSON.call(this,e)}}),ll.prototype=Object.assign(Object.create(Vs.prototype),{constructor:ll,isAmbientLightProbe:!0,copy:function(e){return Vs.prototype.copy.call(this,e),this},toJSON:function(e){return Vs.prototype.toJSON.call(this,e)}});var cl=new te,ul=new te;function hl(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Yt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Yt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}Object.assign(hl.prototype,{update:function(e){var t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;var n,r,i=e.projectionMatrix.clone(),o=t.eyeSep/2,a=o*t.near/t.focus,s=t.near*Math.tan(g.DEG2RAD*t.fov*.5)/t.zoom;ul.elements[12]=-o,cl.elements[12]=o,n=-s*t.aspect+a,r=s*t.aspect+a,i.elements[0]=2*t.near/(r-n),i.elements[8]=(r+n)/(r-n),this.cameraL.projectionMatrix.copy(i),n=-s*t.aspect-a,r=s*t.aspect-a,i.elements[0]=2*t.near/(r-n),i.elements[8]=(r+n)/(r-n),this.cameraR.projectionMatrix.copy(i)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ul),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(cl)}});var dl=function(){function e(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}var t=e.prototype;return t.start=function(){this.startTime=fl(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},t.stop=function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},t.getElapsedTime=function(){return this.getDelta(),this.elapsedTime},t.getDelta=function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=fl();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e},e}();function fl(){return("undefined"===typeof performance?Date:performance).now()}var pl=new T,ml=new M,gl=new T,vl=new T,yl=function(e){function t(){var t;return(t=e.call(this)||this).type="AudioListener",t.context=ol.getContext(),t.gain=t.context.createGain(),t.gain.connect(t.context.destination),t.filter=null,t.timeDelta=0,t._clock=new dl,t}s(t,e);var n=t.prototype;return n.getInput=function(){return this.gain},n.removeFilter=function(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},n.getFilter=function(){return this.filter},n.setFilter=function(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},n.getMasterVolume=function(){return this.gain.gain.value},n.setMasterVolume=function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},n.updateMatrixWorld=function(t){e.prototype.updateMatrixWorld.call(this,t);var n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(pl,ml,gl),vl.set(0,0,-1).applyQuaternion(ml),n.positionX){var i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(pl.x,i),n.positionY.linearRampToValueAtTime(pl.y,i),n.positionZ.linearRampToValueAtTime(pl.z,i),n.forwardX.linearRampToValueAtTime(vl.x,i),n.forwardY.linearRampToValueAtTime(vl.y,i),n.forwardZ.linearRampToValueAtTime(vl.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(pl.x,pl.y,pl.z),n.setOrientation(vl.x,vl.y,vl.z,r.x,r.y,r.z)},t}(Me),bl=function(e){function t(t){var n;return(n=e.call(this)||this).type="Audio",n.listener=t,n.context=t.context,n.gain=n.context.createGain(),n.gain.connect(t.getInput()),n.autoplay=!1,n.buffer=null,n.detune=0,n.loop=!1,n.loopStart=0,n.loopEnd=0,n.offset=0,n.duration=void 0,n.playbackRate=1,n.isPlaying=!1,n.hasPlaybackControl=!0,n.source=null,n.sourceType="empty",n._startedAt=0,n._progress=0,n._connected=!1,n.filters=[],n}s(t,e);var n=t.prototype;return n.getOutput=function(){return this.gain},n.setNodeSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},n.setMediaElementSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this},n.setMediaStreamSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this},n.setBuffer=function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},n.play=function(e){if(void 0===e&&(e=0),!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){this._startedAt=this.context.currentTime+e;var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},n.pause=function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},n.stop=function(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},n.connect=function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this},n.disconnect=function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this},n.getFilters=function(){return this.filters},n.setFilters=function(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this},n.setDetune=function(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this},n.getDetune=function(){return this.detune},n.getFilter=function(){return this.getFilters()[0]},n.setFilter=function(e){return this.setFilters(e?[e]:[])},n.setPlaybackRate=function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")},n.getPlaybackRate=function(){return this.playbackRate},n.onEnded=function(){this.isPlaying=!1},n.getLoop=function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},n.setLoop=function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},n.setLoopStart=function(e){return this.loopStart=e,this},n.setLoopEnd=function(e){return this.loopEnd=e,this},n.getVolume=function(){return this.gain.gain.value},n.setVolume=function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},t}(Me),wl=new T,xl=new M,_l=new T,El=new T,Al=function(e){function t(t){var n;return(n=e.call(this,t)||this).panner=n.context.createPanner(),n.panner.panningModel="HRTF",n.panner.connect(n.gain),n}s(t,e);var n=t.prototype;return n.getOutput=function(){return this.panner},n.getRefDistance=function(){return this.panner.refDistance},n.setRefDistance=function(e){return this.panner.refDistance=e,this},n.getRolloffFactor=function(){return this.panner.rolloffFactor},n.setRolloffFactor=function(e){return this.panner.rolloffFactor=e,this},n.getDistanceModel=function(){return this.panner.distanceModel},n.setDistanceModel=function(e){return this.panner.distanceModel=e,this},n.getMaxDistance=function(){return this.panner.maxDistance},n.setMaxDistance=function(e){return this.panner.maxDistance=e,this},n.setDirectionalCone=function(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this},n.updateMatrixWorld=function(t){if(e.prototype.updateMatrixWorld.call(this,t),!0!==this.hasPlaybackControl||!1!==this.isPlaying){this.matrixWorld.decompose(wl,xl,_l),El.set(0,0,1).applyQuaternion(xl);var n=this.panner;if(n.positionX){var r=this.context.currentTime+this.listener.timeDelta;n.positionX.linearRampToValueAtTime(wl.x,r),n.positionY.linearRampToValueAtTime(wl.y,r),n.positionZ.linearRampToValueAtTime(wl.z,r),n.orientationX.linearRampToValueAtTime(El.x,r),n.orientationY.linearRampToValueAtTime(El.y,r),n.orientationZ.linearRampToValueAtTime(El.z,r)}else n.setPosition(wl.x,wl.y,wl.z),n.setOrientation(El.x,El.y,El.z)}},t}(bl),Sl=function(){function e(e,t){void 0===t&&(t=2048),this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}var t=e.prototype;return t.getFrequencyData=function(){return this.analyser.getByteFrequencyData(this.data),this.data},t.getAverageFrequency=function(){for(var e=0,t=this.getFrequencyData(),n=0;n<t.length;n++)e+=t[n];return e/t.length},e}();function Ml(e,t,n){var r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}Object.assign(Ml.prototype,{accumulate:function(e,t){var n=this.buffer,r=this.valueSize,i=e*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=t}else{var s=t/(o+=t);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},accumulateAdditive:function(e){var t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e},apply:function(e){var t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){var s=t*this._origIndex;this._mixBufferRegion(n,r,s,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(var l=t,c=t+t;l!==c;++l)if(n[l]!==n[l+t]){a.setValue(n,r);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(var i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_setAdditiveIdentityNumeric:function(){for(var e=this._addIndex*this.valueSize,t=e+this.valueSize,n=e;n<t;n++)this.buffer[n]=0},_setAdditiveIdentityQuaternion:function(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1},_setAdditiveIdentityOther:function(){for(var e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize,n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]},_select:function(e,t,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)e[t+o]=e[n+o]},_slerp:function(e,t,n,r){M.slerpFlat(e,t,e,t,e,n,r)},_slerpAdditive:function(e,t,n,r,i){var o=this._workIndex*i;M.multiplyQuaternionsFlat(e,o,e,t,e,n),M.slerpFlat(e,t,e,t,e,o,r)},_lerp:function(e,t,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=t+a;e[s]=e[s]*o+e[n+a]*r}},_lerpAdditive:function(e,t,n,r,i){for(var o=0;o!==i;++o){var a=t+o;e[a]=e[a]+e[n+o]*r}}});var Tl=new RegExp("[\\[\\]\\.:\\/]","g"),Cl="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Ol=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Rl=/(WCOD+)?/.source.replace("WCOD",Cl),kl=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Pl=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ll=new RegExp("^"+Ol+Rl+kl+Pl+"$"),Dl=["material","materials","bones"];function Il(e,t,n){var r=n||Nl.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function Nl(e,t,n){this.path=t,this.parsedPath=n||Nl.parseTrackName(t),this.node=Nl.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function jl(){this.uuid=g.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}Object.assign(Il.prototype,{getValue:function(e,t){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)},setValue:function(e,t){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}),Object.assign(Nl,{Composite:Il,create:function(e,t,n){return e&&e.isAnimationObjectGroup?new Nl.Composite(e,t,n):new Nl(e,t,n)},sanitizeNodeName:function(e){return e.replace(/\s/g,"_").replace(Tl,"")},parseTrackName:function(e){var t=Ll.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==Dl.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n},findNode:function(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){var n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){var r=function e(n){for(var r=0;r<n.length;r++){var i=n[r];if(i.name===t||i.uuid===t)return i;var o=e(i.children);if(o)return o}return null}(e.children);if(r)return r}return null}}),Object.assign(Nl.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)e[t++]=n[r]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,n=t.objectName,r=t.propertyName,i=t.propertyIndex;if(e||(e=Nl.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(n){var o=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var a=0;a<e.length;a++)if(e[a].name===o){o=a;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==o){if(void 0===e[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[o]}}var s=e[r];if(void 0!==s){var l=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);var c=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}c=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(c=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][l]}else{var u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+r+" but it wasn't found.",e)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Nl.prototype,{_getValue_unbound:Nl.prototype.getValue,_setValue_unbound:Nl.prototype.setValue}),Object.assign(jl.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length,a=void 0,s=e.length,l=this.nCachedObjects_,c=0,u=arguments.length;c!==u;++c){var h=arguments[c],d=h.uuid,f=t[d];if(void 0===f){f=s++,t[d]=f,e.push(h);for(var p=0,m=o;p!==m;++p)i[p].push(new Nl(h,n[p],r[p]))}else if(f<l){a=e[f];var g=--l,v=e[g];t[v.uuid]=f,e[f]=v,t[d]=g,e[g]=h;for(var y=0,b=o;y!==b;++y){var w=i[y],x=w[g],_=w[f];w[f]=x,void 0===_&&(_=new Nl(h,n[y],r[y])),w[g]=_}}else e[f]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l},remove:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],l=s.uuid,c=t[l];if(void 0!==c&&c>=i){var u=i++,h=e[u];t[h.uuid]=c,e[c]=h,t[l]=u,e[u]=s;for(var d=0,f=r;d!==f;++d){var p=n[d],m=p[u],g=p[c];p[c]=m,p[u]=g}}}this.nCachedObjects_=i},uncache:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,o=e.length,a=0,s=arguments.length;a!==s;++a){var l=arguments[a],c=l.uuid,u=t[c];if(void 0!==u)if(delete t[c],u<i){var h=--i,d=e[h],f=--o,p=e[f];t[d.uuid]=u,e[u]=d,t[p.uuid]=h,e[h]=p,e.pop();for(var m=0,g=r;m!==g;++m){var v=n[m],y=v[h],b=v[f];v[u]=y,v[h]=b,v.pop()}}else{var w=--o,x=e[w];w>0&&(t[x.uuid]=u),e[u]=x,e.pop();for(var _=0,E=r;_!==E;++_){var A=n[_];A[u]=A[w],A.pop()}}}this.nCachedObjects_=i},subscribe_:function(e,t){var n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(u);for(var h=c,d=s.length;h!==d;++h){var f=s[h];u[h]=new Nl(f,e,t)}return u},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}});var Bl=function(){function e(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=t.blendMode),this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;for(var i=t.tracks,o=i.length,a=new Array(o),s={endingStart:2400,endingEnd:2400},l=0;l!==o;++l){var c=i[l].createInterpolant(null);a[l]=c,c.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}var t=e.prototype;return t.play=function(){return this._mixer._activateAction(this),this},t.stop=function(){return this._mixer._deactivateAction(this),this.reset()},t.reset=function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},t.isRunning=function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},t.isScheduled=function(){return this._mixer._isActiveAction(this)},t.startAt=function(e){return this._startTime=e,this},t.setLoop=function(e,t){return this.loop=e,this.repetitions=t,this},t.setEffectiveWeight=function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},t.getEffectiveWeight=function(){return this._effectiveWeight},t.fadeIn=function(e){return this._scheduleFading(e,0,1)},t.fadeOut=function(e){return this._scheduleFading(e,1,0)},t.crossFadeFrom=function(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){var r=this._clip.duration,i=e._clip.duration,o=i/r,a=r/i;e.warp(1,o,t),this.warp(a,1,t)}return this},t.crossFadeTo=function(e,t,n){return e.crossFadeFrom(this,t,n)},t.stopFading=function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},t.setEffectiveTimeScale=function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},t.getEffectiveTimeScale=function(){return this._effectiveTimeScale},t.setDuration=function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},t.syncWith=function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},t.halt=function(e){return this.warp(this._effectiveTimeScale,0,e)},t.warp=function(e,t,n){var r=this._mixer,i=r.time,o=this.timeScale,a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);var s=a.parameterPositions,l=a.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/o,l[1]=t/o,this},t.stopWarping=function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},t.getMixer=function(){return this._mixer},t.getClip=function(){return this._clip},t.getRoot=function(){return this._localRoot||this._mixer._root},t._update=function(e,t,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(e-i)*n;if(o<0||0===n)return;this._startTime=null,t=n*o}t*=this._updateTimeScale(e);var a=this._updateTime(t),s=this._updateWeight(e);if(s>0){var l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case 2501:for(var u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulateAdditive(s);break;case 2500:default:for(var d=0,f=l.length;d!==f;++d)l[d].evaluate(a),c[d].accumulate(r,s)}}}else this._updateWeight(e)},t._updateWeight=function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},t._updateTimeScale=function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t},t._updateTime=function(e){var t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,o=2202===n;if(0===e)return-1===i?r:o&&1===(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){var a=Math.floor(r/t);r-=t*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var l=e<0;this._setEndings(l,!l,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&1===(1&i))return t-r}return r},t._setEndings=function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)},t._scheduleFading=function(e,t,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this},e}();function Fl(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}Fl.prototype=Object.assign(Object.create(h.prototype),{constructor:Fl,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName,c=l[s];void 0===c&&(c={},l[s]=c);for(var u=0;u!==i;++u){var h=r[u],d=h.name,f=c[d];if(void 0!==f)o[u]=f;else{if(void 0!==(f=o[u])){null===f._cacheIndex&&(++f.referenceCount,this._addInactiveBinding(f,s,d));continue}var p=t&&t._propertyBindings[u].binding.parsedPath;++(f=new Ml(Nl.create(n,d,p),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(f,s,d),o[u]=f}a[u].resultBuffer=f.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0===--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,n){var r=this._actions,i=this._actionsByClip,o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{var a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e},_removeInactiveAction:function(e){var t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;var i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null,delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0===--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(e){var t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackAction:function(e){var t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_addInactiveBinding:function(e,t,n){var r=this._bindingsByRootAndName,i=this._bindings,o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]},_lendBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return void 0===n&&((n=new ja(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=t,e[t]=n),n},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t,n){var r=t||this._root,i=r.uuid,o="string"===typeof e?Xa.findByName(r,e):e,a=null!==o?o.uuid:e,s=this._actionsByClip[a],l=null;if(void 0===n&&(n=null!==o?o.blendMode:2500),void 0!==s){var c=s.actionByRoot[i];if(void 0!==c&&c.blendMode===n)return c;l=s.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;var u=new Bl(this,o,t,n);return this._bindAction(u,l),this._addInactiveAction(u,a,i),u},existingAction:function(e,t){var n=t||this._root,r=n.uuid,i="string"===typeof e?Xa.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){for(var e=this._actions,t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this},update:function(e){e*=this.timeScale;for(var t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1,a=0;a!==n;++a)t[a]._update(r,e,i,o);for(var s=this._bindings,l=this._nActiveBindings,c=0;c!==l;++c)s[c].apply(o);return this},setTime:function(e){this.time=0;for(var t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var l=o[a];this._deactivateAction(l);var c=l._cacheIndex,u=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,u._cacheIndex=c,t[c]=u,t.pop(),this._removeInactiveBindingsForAction(l)}delete r[n]}},uncacheRoot:function(e){var t=e.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[t];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[t];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(e,t){var n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}});var zl=function(){function e(e){"string"===typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}return e.prototype.clone=function(){return new e(void 0===this.value.clone?this.value:this.value.clone())},e}();function Hl(e,t,n){vi.call(this,e,t),this.meshPerAttribute=n||1}function Ul(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}function Vl(e,t,n,r){this.ray=new ee(e,t),this.near=n||0,this.far=r||1/0,this.camera=null,this.layers=new de,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function Gl(e,t){return e.distance-t.distance}function Wl(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r)for(var i=e.children,o=0,a=i.length;o<a;o++)Wl(i[o],t,n,!0)}Hl.prototype=Object.assign(Object.create(vi.prototype),{constructor:Hl,isInstancedInterleavedBuffer:!0,copy:function(e){return vi.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},clone:function(e){var t=vi.prototype.clone.call(this,e);return t.meshPerAttribute=this.meshPerAttribute,t},toJSON:function(e){var t=vi.prototype.toJSON.call(this,e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}),Object.defineProperty(Ul.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Ul.prototype,{isGLBufferAttribute:!0,setBuffer:function(e){return this.buffer=e,this},setType:function(e,t){return this.type=e,this.elementSize=t,this},setItemSize:function(e){return this.itemSize=e,this},setCount:function(e){return this.count=e,this}}),Object.assign(Vl.prototype,{set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)},intersectObject:function(e,t,n){var r=n||[];return Wl(e,this,r,t),r.sort(Gl),r},intersectObjects:function(e,t,n){var r=n||[];if(!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=e.length;i<o;i++)Wl(e[i],this,r,t);return r.sort(Gl),r}});var ql=function(){function e(e,t,n){return void 0===e&&(e=1),void 0===t&&(t=0),void 0===n&&(n=0),this.radius=e,this.phi=t,this.theta=n,this}var t=e.prototype;return t.set=function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},t.makeSafe=function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},t.setFromVector3=function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},t.setFromCartesianCoords=function(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(g.clamp(t/this.radius,-1,1))),this},e}(),Xl=function(){function e(e,t,n){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==n?n:0,this}var t=e.prototype;return t.set=function(e,t,n){return this.radius=e,this.theta=t,this.y=n,this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},t.setFromVector3=function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},t.setFromCartesianCoords=function(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this},e}(),Yl=new v,Kl=function(){function e(e,t){Object.defineProperty(this,"isBox2",{value:!0}),this.min=void 0!==e?e:new v(1/0,1/0),this.max=void 0!==t?t:new v(-1/0,-1/0)}var t=e.prototype;return t.set=function(e,t){return this.min.copy(e),this.max.copy(t),this},t.setFromPoints=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},t.setFromCenterAndSize=function(e,t){var n=Yl.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.min.copy(e.min),this.max.copy(e.max),this},t.makeEmpty=function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},t.isEmpty=function(){return this.max.x<this.min.x||this.max.y<this.min.y},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new v),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},t.getSize=function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new v),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},t.expandByPoint=function(e){return this.min.min(e),this.max.max(e),this},t.expandByVector=function(e){return this.min.sub(e),this.max.add(e),this},t.expandByScalar=function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},t.containsPoint=function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},t.containsBox=function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},t.getParameter=function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new v),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},t.intersectsBox=function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},t.clampPoint=function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new v),t.copy(e).clamp(this.min,this.max)},t.distanceToPoint=function(e){return Yl.copy(e).clamp(this.min,this.max).sub(e).length()},t.intersect=function(e){return this.min.max(e.min),this.max.min(e.max),this},t.union=function(e){return this.min.min(e.min),this.max.max(e.max),this},t.translate=function(e){return this.min.add(e),this.max.add(e),this},t.equals=function(e){return e.min.equals(this.min)&&e.max.equals(this.max)},e}(),Ql=new T,Zl=new T,Jl=function(){function e(e,t){this.start=void 0!==e?e:new T,this.end=void 0!==t?t:new T}var t=e.prototype;return t.set=function(e,t){return this.start.copy(e),this.end.copy(t),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.start.copy(e.start),this.end.copy(e.end),this},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new T),e.addVectors(this.start,this.end).multiplyScalar(.5)},t.delta=function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new T),e.subVectors(this.end,this.start)},t.distanceSq=function(){return this.start.distanceToSquared(this.end)},t.distance=function(){return this.start.distanceTo(this.end)},t.at=function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new T),this.delta(t).multiplyScalar(e).add(this.start)},t.closestPointToPointParameter=function(e,t){Ql.subVectors(e,this.start),Zl.subVectors(this.end,this.start);var n=Zl.dot(Zl),r=Zl.dot(Ql)/n;return t&&(r=g.clamp(r,0,1)),r},t.closestPointToPoint=function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new T),this.delta(n).multiplyScalar(r).add(this.start)},t.applyMatrix4=function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},t.equals=function(e){return e.start.equals(this.start)&&e.end.equals(this.end)},e}();function $l(e){Me.call(this),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}$l.prototype=Object.create(Me.prototype),$l.prototype.constructor=$l,$l.prototype.isImmediateRenderObject=!0;var ec=new T,tc=function(e){function t(t,n){var r;(r=e.call(this)||this).light=t,r.light.updateMatrixWorld(),r.matrix=t.matrixWorld,r.matrixAutoUpdate=!1,r.color=n;for(var i=new _t,o=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],a=0,s=1;a<32;a++,s++){var l=a/32*Math.PI*2,c=s/32*Math.PI*2;o.push(Math.cos(l),Math.sin(l),1,Math.cos(c),Math.sin(c),1)}i.setAttribute("position",new ut(o,3));var u=new eo({fog:!1,toneMapped:!1});return r.cone=new co(i,u),r.add(r.cone),r.update(),r}s(t,e);var n=t.prototype;return n.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},n.update=function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),ec.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(ec),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)},t}(Me),nc=new T,rc=new te,ic=new te,oc=function(e){function t(t){for(var n,r=function e(t){var n=[];t&&t.isBone&&n.push(t);for(var r=0;r<t.children.length;r++)n.push.apply(n,e(t.children[r]));return n}(t),i=new _t,o=[],a=[],s=new Ye(0,0,1),l=new Ye(0,1,0),c=0;c<r.length;c++){var u=r[c];u.parent&&u.parent.isBone&&(o.push(0,0,0),o.push(0,0,0),a.push(s.r,s.g,s.b),a.push(l.r,l.g,l.b))}i.setAttribute("position",new ut(o,3)),i.setAttribute("color",new ut(a,3));var h=new eo({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});return(n=e.call(this,i,h)||this).type="SkeletonHelper",n.isSkeletonHelper=!0,n.root=t,n.bones=r,n.matrix=t.matrixWorld,n.matrixAutoUpdate=!1,n}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=this.bones,r=this.geometry,i=r.getAttribute("position");ic.copy(this.root.matrixWorld).invert();for(var o=0,a=0;o<n.length;o++){var s=n[o];s.parent&&s.parent.isBone&&(rc.multiplyMatrices(ic,s.matrixWorld),nc.setFromMatrixPosition(rc),i.setXYZ(a,nc.x,nc.y,nc.z),rc.multiplyMatrices(ic,s.parent.matrixWorld),nc.setFromMatrixPosition(rc),i.setXYZ(a+1,nc.x,nc.y,nc.z),a+=2)}r.getAttribute("position").needsUpdate=!0,e.prototype.updateMatrixWorld.call(this,t)},t}(co),ac=function(e){function t(t,n,r){var i,o=new ma(n,4,2),a=new Je({wireframe:!0,fog:!1,toneMapped:!1});return(i=e.call(this,o,a)||this).light=t,i.light.updateMatrixWorld(),i.color=r,i.type="PointLightHelper",i.matrix=i.light.matrixWorld,i.matrixAutoUpdate=!1,i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.geometry.dispose(),this.material.dispose()},n.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},t}(zt),sc=new T,lc=new Ye,cc=new Ye,uc=function(e){function t(t,n,r){var i;(i=e.call(this)||this).light=t,i.light.updateMatrixWorld(),i.matrix=t.matrixWorld,i.matrixAutoUpdate=!1,i.color=r;var o=new ha(n);o.rotateY(.5*Math.PI),i.material=new Je({wireframe:!0,fog:!1,toneMapped:!1}),void 0===i.color&&(i.material.vertexColors=!0);var a=o.getAttribute("position"),s=new Float32Array(3*a.count);return o.setAttribute("color",new tt(s,3)),i.add(new zt(o,i.material)),i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},n.update=function(){var e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var t=e.geometry.getAttribute("color");lc.copy(this.light.color),cc.copy(this.light.groundColor);for(var n=0,r=t.count;n<r;n++){var i=n<r/2?lc:cc;t.setXYZ(n,i.r,i.g,i.b)}t.needsUpdate=!0}e.lookAt(sc.setFromMatrixPosition(this.light.matrixWorld).negate())},t}(Me),hc=function(e){function t(t,n,r,i){var o;void 0===t&&(t=10),void 0===n&&(n=10),void 0===r&&(r=4473924),void 0===i&&(i=8947848),r=new Ye(r),i=new Ye(i);for(var a=n/2,s=t/n,l=t/2,c=[],u=[],h=0,d=0,f=-l;h<=n;h++,f+=s){c.push(-l,0,f,l,0,f),c.push(f,0,-l,f,0,l);var p=h===a?r:i;p.toArray(u,d),d+=3,p.toArray(u,d),d+=3,p.toArray(u,d),d+=3,p.toArray(u,d),d+=3}var m=new _t;m.setAttribute("position",new ut(c,3)),m.setAttribute("color",new ut(u,3));var g=new eo({vertexColors:!0,toneMapped:!1});return(o=e.call(this,m,g)||this).type="GridHelper",o}return s(t,e),t}(co),dc=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=10),void 0===n&&(n=16),void 0===r&&(r=8),void 0===i&&(i=64),void 0===o&&(o=4473924),void 0===a&&(a=8947848),o=new Ye(o),a=new Ye(a);for(var l=[],c=[],u=0;u<=n;u++){var h=u/n*(2*Math.PI),d=Math.sin(h)*t,f=Math.cos(h)*t;l.push(0,0,0),l.push(d,0,f);var p=1&u?o:a;c.push(p.r,p.g,p.b),c.push(p.r,p.g,p.b)}for(var m=0;m<=r;m++)for(var g=1&m?o:a,v=t-t/r*m,y=0;y<i;y++){var b=y/i*(2*Math.PI),w=Math.sin(b)*v,x=Math.cos(b)*v;l.push(w,0,x),c.push(g.r,g.g,g.b),b=(y+1)/i*(2*Math.PI),w=Math.sin(b)*v,x=Math.cos(b)*v,l.push(w,0,x),c.push(g.r,g.g,g.b)}var _=new _t;_.setAttribute("position",new ut(l,3)),_.setAttribute("color",new ut(c,3));var E=new eo({vertexColors:!0,toneMapped:!1});return(s=e.call(this,_,E)||this).type="PolarGridHelper",s}return s(t,e),t}(co),fc=new T,pc=new T,mc=new T,gc=function(e){function t(t,n,r){var i;(i=e.call(this)||this).light=t,i.light.updateMatrixWorld(),i.matrix=t.matrixWorld,i.matrixAutoUpdate=!1,i.color=r,void 0===n&&(n=1);var o=new _t;o.setAttribute("position",new ut([-n,n,0,n,n,0,n,-n,0,-n,-n,0,-n,n,0],3));var a=new eo({fog:!1,toneMapped:!1});return i.lightPlane=new ao(o,a),i.add(i.lightPlane),(o=new _t).setAttribute("position",new ut([0,0,0,0,0,1],3)),i.targetLine=new ao(o,a),i.add(i.targetLine),i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},n.update=function(){fc.setFromMatrixPosition(this.light.matrixWorld),pc.setFromMatrixPosition(this.light.target.matrixWorld),mc.subVectors(pc,fc),this.lightPlane.lookAt(pc),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(pc),this.targetLine.scale.z=mc.length()},t}(Me),vc=new T,yc=new Xt,bc=function(e){function t(t){var n,r=new _t,i=new eo({color:16777215,vertexColors:!0,toneMapped:!1}),o=[],a=[],s={},l=new Ye(16755200),c=new Ye(16711680),u=new Ye(43775),h=new Ye(16777215),d=new Ye(3355443);function f(e,t,n){p(e,n),p(t,n)}function p(e,t){o.push(0,0,0),a.push(t.r,t.g,t.b),void 0===s[e]&&(s[e]=[]),s[e].push(o.length/3-1)}return f("n1","n2",l),f("n2","n4",l),f("n4","n3",l),f("n3","n1",l),f("f1","f2",l),f("f2","f4",l),f("f4","f3",l),f("f3","f1",l),f("n1","f1",l),f("n2","f2",l),f("n3","f3",l),f("n4","f4",l),f("p","n1",c),f("p","n2",c),f("p","n3",c),f("p","n4",c),f("u1","u2",u),f("u2","u3",u),f("u3","u1",u),f("c","t",h),f("p","c",d),f("cn1","cn2",d),f("cn3","cn4",d),f("cf1","cf2",d),f("cf3","cf4",d),r.setAttribute("position",new ut(o,3)),r.setAttribute("color",new ut(a,3)),(n=e.call(this,r,i)||this).type="CameraHelper",n.camera=t,n.camera.updateProjectionMatrix&&n.camera.updateProjectionMatrix(),n.matrix=t.matrixWorld,n.matrixAutoUpdate=!1,n.pointMap=s,n.update(),n}return s(t,e),t.prototype.update=function(){var e=this.geometry,t=this.pointMap;yc.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),wc("c",t,e,yc,0,0,-1),wc("t",t,e,yc,0,0,1),wc("n1",t,e,yc,-1,-1,-1),wc("n2",t,e,yc,1,-1,-1),wc("n3",t,e,yc,-1,1,-1),wc("n4",t,e,yc,1,1,-1),wc("f1",t,e,yc,-1,-1,1),wc("f2",t,e,yc,1,-1,1),wc("f3",t,e,yc,-1,1,1),wc("f4",t,e,yc,1,1,1),wc("u1",t,e,yc,.7,1.1,-1),wc("u2",t,e,yc,-.7,1.1,-1),wc("u3",t,e,yc,0,2,-1),wc("cf1",t,e,yc,-1,0,1),wc("cf2",t,e,yc,1,0,1),wc("cf3",t,e,yc,0,-1,1),wc("cf4",t,e,yc,0,1,1),wc("cn1",t,e,yc,-1,0,-1),wc("cn2",t,e,yc,1,0,-1),wc("cn3",t,e,yc,0,-1,-1),wc("cn4",t,e,yc,0,1,-1),e.getAttribute("position").needsUpdate=!0},t}(co);function wc(e,t,n,r,i,o,a){vc.set(i,o,a).unproject(r);var s=t[e];if(void 0!==s)for(var l=n.getAttribute("position"),c=0,u=s.length;c<u;c++)l.setXYZ(s[c],vc.x,vc.y,vc.z)}var xc,_c,Ec,Ac=new R,Sc=function(e){function t(t,n){var r;void 0===n&&(n=16776960);var i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),o=new Float32Array(24),a=new _t;return a.setIndex(new tt(i,1)),a.setAttribute("position",new tt(o,3)),(r=e.call(this,a,new eo({color:n,toneMapped:!1}))||this).object=t,r.type="BoxHelper",r.matrixAutoUpdate=!1,r.update(),r}s(t,e);var n=t.prototype;return n.update=function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&Ac.setFromObject(this.object),!Ac.isEmpty()){var t=Ac.min,n=Ac.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}},n.setFromObject=function(e){return this.object=e,this.update(),this},n.copy=function(e){return co.prototype.copy.call(this,e),this.object=e.object,this},t}(co),Mc=function(e){function t(t,n){var r;void 0===n&&(n=16776960);var i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),o=new _t;return o.setIndex(new tt(i,1)),o.setAttribute("position",new ut([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),(r=e.call(this,o,new eo({color:n,toneMapped:!1}))||this).box=t,r.type="Box3Helper",r.geometry.computeBoundingSphere(),r}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=this.box;n.isEmpty()||(n.getCenter(this.position),n.getSize(this.scale),this.scale.multiplyScalar(.5),e.prototype.updateMatrixWorld.call(this,t))},t}(co),Tc=function(e){function t(t,n,r){var i;void 0===n&&(n=1),void 0===r&&(r=16776960);var o=r,a=new _t;a.setAttribute("position",new ut([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),a.computeBoundingSphere(),(i=e.call(this,a,new eo({color:o,toneMapped:!1}))||this).type="PlaneHelper",i.plane=t,i.size=n;var s=new _t;return s.setAttribute("position",new ut([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),s.computeBoundingSphere(),i.add(new zt(s,new Je({color:o,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1}))),i}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=-this.plane.constant;Math.abs(n)<1e-8&&(n=1e-8),this.scale.set(.5*this.size,.5*this.size,n),this.children[0].material.side=n<0?1:0,this.lookAt(this.plane.normal),e.prototype.updateMatrixWorld.call(this,t)},t}(ao),Cc=new T,Oc=function(e){function t(t,n,r,i,o,a){var s;return(s=e.call(this)||this).type="ArrowHelper",void 0===t&&(t=new T(0,0,1)),void 0===n&&(n=new T(0,0,0)),void 0===r&&(r=1),void 0===i&&(i=16776960),void 0===o&&(o=.2*r),void 0===a&&(a=.2*o),void 0===xc&&((xc=new _t).setAttribute("position",new ut([0,0,0,0,1,0],3)),(_c=new Ao(0,.5,1,5,1)).translate(0,-.5,0)),s.position.copy(n),s.line=new ao(xc,new eo({color:i,toneMapped:!1})),s.line.matrixAutoUpdate=!1,s.add(s.line),s.cone=new zt(_c,new Je({color:i,toneMapped:!1})),s.cone.matrixAutoUpdate=!1,s.add(s.cone),s.setDirection(t),s.setLength(r,o,a),s}s(t,e);var n=t.prototype;return n.setDirection=function(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Cc.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Cc,t)}},n.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},n.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},n.copy=function(t){return e.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},t}(Me),Rc=function(e){function t(t){var n;void 0===t&&(t=1);var r=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],i=new _t;i.setAttribute("position",new ut(r,3)),i.setAttribute("color",new ut([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var o=new eo({vertexColors:!0,toneMapped:!1});return(n=e.call(this,i,o)||this).type="AxesHelper",n}return s(t,e),t}(co),kc=new Float32Array(1),Pc=new Int32Array(kc.buffer),Lc={toHalfFloat:function(e){kc[0]=e;var t=Pc[0],n=t>>16&32768,r=t>>12&2047,i=t>>23&255;return i<103?n:i>142?(n|=31744,n|=(255==i?0:1)&&8388607&t):i<113?n|=((r|=2048)>>114-i)+(r>>113-i&1):(n|=i-112<<10|r>>1,n+=1&r)}},Dc=Math.pow(2,8),Ic=[.125,.215,.35,.446,.526,.582],Nc=5+Ic.length,jc=((Ec={})[3e3]=0,Ec[3001]=1,Ec[3002]=2,Ec[3004]=3,Ec[3005]=4,Ec[3006]=5,Ec[3007]=6,Ec),Bc=new Je({side:1,depthWrite:!1,depthTest:!1}),Fc=new zt(new Ut,Bc),zc=new js,Hc=$c(),Uc=Hc._lodPlanes,Vc=Hc._sizeLods,Gc=Hc._sigmas,Wc=new Ye,qc=null,Xc=(1+Math.sqrt(5))/2,Yc=1/Xc,Kc=[new T(1,1,1),new T(-1,1,1),new T(1,1,-1),new T(-1,1,-1),new T(0,Xc,Yc),new T(0,Xc,-Yc),new T(Yc,0,Xc),new T(-Yc,0,Xc),new T(Xc,Yc,0),new T(-Xc,Yc,0)];function Qc(e){var t=Math.max(e.r,e.g,e.b),n=Math.min(Math.max(Math.ceil(Math.log2(t)),-128),127);return e.multiplyScalar(Math.pow(2,-n)),(n+128)/255}var Zc=function(){function e(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(e){var t=new Float32Array(e),n=new T(0,1,0);return new Aa({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(20),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}var t=e.prototype;return t.fromScene=function(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=.1),void 0===r&&(r=100),qc=this._renderer.getRenderTarget();var i=this._allocateTargets();return this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i},t.fromEquirectangular=function(e){return this._fromTexture(e)},t.fromCubemap=function(e){return this._fromTexture(e)},t.compileCubemapShader=function(){null===this._cubemapShader&&(this._cubemapShader=ru(),this._compileMaterial(this._cubemapShader))},t.compileEquirectangularShader=function(){null===this._equirectShader&&(this._equirectShader=nu(),this._compileMaterial(this._equirectShader))},t.dispose=function(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(var e=0;e<Uc.length;e++)Uc[e].dispose()},t._cleanup=function(e){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(qc),e.scissorTest=!1,tu(e,0,0,e.width,e.height)},t._fromTexture=function(e){qc=this._renderer.getRenderTarget();var t=this._allocateTargets(e);return this._textureToCubeUV(e,t),this._applyPMREM(t),this._cleanup(t),t},t._allocateTargets=function(e){var t={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:1009,format:1023,encoding:Jc(e)?e.encoding:3002,depthBuffer:!1},n=eu(t);return n.depthBuffer=!e,this._pingPongRenderTarget=eu(t),n},t._compileMaterial=function(e){var t=new zt(Uc[0],e);this._renderer.compile(t,zc)},t._sceneToCubeUV=function(e,t,n,r){var i=new Yt(90,1,t,n),o=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],s=this._renderer,l=s.autoClear,c=s.outputEncoding,u=s.toneMapping;s.getClearColor(Wc),s.toneMapping=0,s.outputEncoding=3e3,s.autoClear=!1;var h=!1,d=e.background;if(d){if(d.isColor){Bc.color.copy(d).convertSRGBToLinear(),e.background=null;var f=Qc(Bc.color);Bc.opacity=f,h=!0}}else{Bc.color.copy(Wc).convertSRGBToLinear();var p=Qc(Bc.color);Bc.opacity=p,h=!0}for(var m=0;m<6;m++){var g=m%3;0==g?(i.up.set(0,o[m],0),i.lookAt(a[m],0,0)):1==g?(i.up.set(0,0,o[m]),i.lookAt(0,a[m],0)):(i.up.set(0,o[m],0),i.lookAt(0,0,a[m])),tu(r,g*Dc,m>2?Dc:0,Dc,Dc),s.setRenderTarget(r),h&&s.render(Fc,i),s.render(e,i)}s.toneMapping=u,s.outputEncoding=c,s.autoClear=l},t._textureToCubeUV=function(e,t){var n=this._renderer;e.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=ru()):null==this._equirectShader&&(this._equirectShader=nu());var r=e.isCubeTexture?this._cubemapShader:this._equirectShader,i=new zt(Uc[0],r),o=r.uniforms;o.envMap.value=e,e.isCubeTexture||o.texelSize.value.set(1/e.image.width,1/e.image.height),o.inputEncoding.value=jc[e.encoding],o.outputEncoding.value=jc[t.texture.encoding],tu(t,0,0,3*Dc,2*Dc),n.setRenderTarget(t),n.render(i,zc)},t._applyPMREM=function(e){var t=this._renderer,n=t.autoClear;t.autoClear=!1;for(var r=1;r<Nc;r++){var i=Math.sqrt(Gc[r]*Gc[r]-Gc[r-1]*Gc[r-1]),o=Kc[(r-1)%Kc.length];this._blur(e,r-1,r,i,o)}t.autoClear=n},t._blur=function(e,t,n,r,i){var o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)},t._halfBlur=function(e,t,n,r,i,o,a){var s=this._renderer,l=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");var c=new zt(Uc[r],l),u=l.uniforms,h=Vc[n]-1,d=isFinite(i)?Math.PI/(2*h):2*Math.PI/39,f=i/d,p=isFinite(i)?1+Math.floor(3*f):20;p>20&&console.warn("sigmaRadians, "+i+", is too large and will clip, as it requested "+p+" samples when the maximum is set to 20");for(var m=[],g=0,v=0;v<20;++v){var y=v/f,b=Math.exp(-y*y/2);m.push(b),0==v?g+=b:v<p&&(g+=2*b)}for(var w=0;w<m.length;w++)m[w]=m[w]/g;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=m,u.latitudinal.value="latitudinal"===o,a&&(u.poleAxis.value=a),u.dTheta.value=d,u.mipInt.value=8-n,u.inputEncoding.value=jc[e.texture.encoding],u.outputEncoding.value=jc[e.texture.encoding];var x=Vc[r];tu(t,3*Math.max(0,Dc-2*x),(0===r?0:2*Dc)+2*x*(r>4?r-8+4:0),3*x,2*x),s.setRenderTarget(t),s.render(c,zc)},e}();function Jc(e){return void 0!==e&&1009===e.type&&(3e3===e.encoding||3001===e.encoding||3007===e.encoding)}function $c(){for(var e=[],t=[],n=[],r=8,i=0;i<Nc;i++){var o=Math.pow(2,r);t.push(o);var a=1/o;i>4?a=Ic[i-8+4-1]:0==i&&(a=0),n.push(a);for(var s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=new Float32Array(108),d=new Float32Array(72),f=new Float32Array(36),p=0;p<6;p++){var m=p%3*2/3-1,g=p>2?0:-1,v=[m,g,0,m+2/3,g,0,m+2/3,g+1,0,m,g,0,m+2/3,g+1,0,m,g+1,0];h.set(v,18*p),d.set(u,12*p);var y=[p,p,p,p,p,p];f.set(y,6*p)}var b=new _t;b.setAttribute("position",new tt(h,3)),b.setAttribute("uv",new tt(d,2)),b.setAttribute("faceIndex",new tt(f,1)),e.push(b),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function eu(e){var t=new A(3*Dc,3*Dc,e);return t.texture.mapping=306,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function tu(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function nu(){return new Aa({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:new v(1,1)},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function ru(){return new Aa({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function iu(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom",this.closed=!0}function ou(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom"}function au(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom"}ss.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(ss.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(Cs.prototype,{fromPoints:function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),iu.prototype=Object.create(ms.prototype),ou.prototype=Object.create(ms.prototype),au.prototype=Object.create(ms.prototype),Object.assign(au.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),hc.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},oc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Ja.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Ws.extractUrlBase(e)}}),Ja.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Object.assign(Kl.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(R.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(q.prototype,{empty:function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()}}),tn.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Jl.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(g,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),g.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),g.ceilPowerOfTwo(e)}}),Object.assign(y.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},getInverse:function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()}}),Object.assign(te.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new T).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},getInverse:function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()}}),Re.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Object.assign(M.prototype,{multiplyVector3:function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},inverse:function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()}}),Object.assign(ee.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(He.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(He,{barycoordFromPoint:function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),He.getBarycoord(e,t,n,r,i)},normal:function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),He.getNormal(e,t,n,r)}}),Object.assign(Os.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new sa(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new pa(this,e)}}),Object.assign(v.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(T.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(E.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Me.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(Me.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.assign(zt.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}),Object.defineProperties(zt.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Object.defineProperties(Bi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Yi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Gi.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(ss.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),Yt.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Rs.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(tt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),35048===this.usage},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),Object.assign(tt.prototype,{setDynamic:function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},setArray:function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(_t.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addAttribute:function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new tt(arguments[1],arguments[2])))},addDrawCall:function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},removeAttribute:function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},applyMatrix:function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(_t.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties(qs.prototype,{maxInstancedCount:{get:function(){return console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount},set:function(e){console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount=e}}}),Object.defineProperties(Vl.prototype,{linePrecision:{get:function(){return console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold},set:function(e){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold=e}}}),Object.defineProperties(vi.prototype,{dynamic:{get:function(){return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),35048===this.usage},set:function(e){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.setUsage(e)}}}),Object.assign(vi.prototype,{setDynamic:function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},setArray:function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(sa.prototype,{getArrays:function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")}}),Object.assign(gi.prototype,{dispose:function(){console.error("THREE.Scene: .dispose() has been removed.")}}),Object.defineProperties(zl.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Ze.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ye}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Ta.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Ma.prototype,{transparency:{get:function(){return console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission},set:function(e){console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission=e}}}),Object.defineProperties(qt.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign(di.prototype,{clearTarget:function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},animate:function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},getActiveMipMapLevel:function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()}}),Object.defineProperties(di.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(ei.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(A.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(bl.prototype,{load:{value:function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new al).load(e,(function(e){t.setBuffer(e)})),this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}}),Sl.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Kt.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Kt.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)};var su={merge:function(e,t,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),t.isMesh&&(t.matrixAutoUpdate&&t.updateMatrix(),r=t.matrix,t=t.geometry),e.merge(t,r,n)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}};b.crossOrigin=void 0,b.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new as;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},b.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new is;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},b.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},b.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};var lu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"125"}})),"undefined"!==typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="125"),t.ACESFilmicToneMapping=4,t.AddEquation=100,t.AddOperation=2,t.AdditiveAnimationBlendMode=2501,t.AdditiveBlending=2,t.AlphaFormat=1021,t.AlwaysDepth=1,t.AlwaysStencilFunc=519,t.AmbientLight=zs,t.AmbientLightProbe=ll,t.AnimationClip=Xa,t.AnimationLoader=ts,t.AnimationMixer=Fl,t.AnimationObjectGroup=jl,t.AnimationUtils=Da,t.ArcCurve=cs,t.ArrayCamera=oi,t.ArrowHelper=Oc,t.Audio=bl,t.AudioAnalyser=Sl,t.AudioContext=ol,t.AudioListener=yl,t.AudioLoader=al,t.AxesHelper=Rc,t.AxisHelper=function(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Rc(e)},t.BackSide=1,t.BasicDepthPacking=3200,t.BasicShadowMap=0,t.BinaryTextureLoader=function(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new os(e)},t.Bone=Wi,t.BooleanKeyframeTrack=za,t.BoundingBoxHelper=function(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Sc(e,t)},t.Box2=Kl,t.Box3=R,t.Box3Helper=Mc,t.BoxBufferGeometry=Ut,t.BoxGeometry=Ut,t.BoxHelper=Sc,t.BufferAttribute=tt,t.BufferGeometry=_t,t.BufferGeometryLoader=Ys,t.ByteType=1010,t.Cache=Ka,t.Camera=Xt,t.CameraHelper=bc,t.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},t.CanvasTexture=xo,t.CatmullRomCurve3=ms,t.CineonToneMapping=3,t.CircleBufferGeometry=Eo,t.CircleGeometry=Eo,t.ClampToEdgeWrapping=1001,t.Clock=dl,t.ClosedSplineCurve3=iu,t.Color=Ye,t.ColorKeyframeTrack=Ha,t.CompressedTexture=wo,t.CompressedTextureLoader=ns,t.ConeBufferGeometry=So,t.ConeGeometry=So,t.CubeCamera=Kt,t.CubeReflectionMapping=301,t.CubeRefractionMapping=302,t.CubeTexture=Qt,t.CubeTextureLoader=is,t.CubeUVReflectionMapping=306,t.CubeUVRefractionMapping=307,t.CubicBezierCurve=bs,t.CubicBezierCurve3=ws,t.CubicInterpolant=Na,t.CullFaceBack=1,t.CullFaceFront=2,t.CullFaceFrontBack=3,t.CullFaceNone=0,t.Curve=ss,t.CurvePath=Ts,t.CustomBlending=5,t.CustomToneMapping=5,t.CylinderBufferGeometry=Ao,t.CylinderGeometry=Ao,t.Cylindrical=Xl,t.DataTexture=Jt,t.DataTexture2DArray=En,t.DataTexture3D=An,t.DataTextureLoader=os,t.DataUtils=Lc,t.DecrementStencilOp=7683,t.DecrementWrapStencilOp=34056,t.DefaultLoadingManager=Za,t.DepthFormat=1026,t.DepthStencilFormat=1027,t.DepthTexture=_o,t.DirectionalLight=Fs,t.DirectionalLightHelper=gc,t.DiscreteInterpolant=Ba,t.DodecahedronBufferGeometry=To,t.DodecahedronGeometry=To,t.DoubleSide=2,t.DstAlphaFactor=206,t.DstColorFactor=208,t.DynamicBufferAttribute=function(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new tt(e,t).setUsage(35048)},t.DynamicCopyUsage=35050,t.DynamicDrawUsage=35048,t.DynamicReadUsage=35049,t.EdgesGeometry=Po,t.EdgesHelper=function(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new co(new Po(e.geometry),new eo({color:void 0!==t?t:16777215}))},t.EllipseCurve=ls,t.EqualDepth=4,t.EqualStencilFunc=514,t.EquirectangularReflectionMapping=303,t.EquirectangularRefractionMapping=304,t.Euler=ce,t.EventDispatcher=h,t.ExtrudeBufferGeometry=sa,t.ExtrudeGeometry=sa,t.Face3=Ke,t.Face4=function(e,t,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Ke(e,t,n,i,o,a)},t.FaceColors=1,t.FileLoader=es,t.FlatShading=1,t.Float16BufferAttribute=ct,t.Float32Attribute=function(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ut(e,t)},t.Float32BufferAttribute=ut,t.Float64Attribute=function(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new ht(e,t)},t.Float64BufferAttribute=ht,t.FloatType=1015,t.Fog=mi,t.FogExp2=pi,t.Font=nl,t.FontLoader=il,t.FrontSide=0,t.Frustum=tn,t.GLBufferAttribute=Ul,t.GLSL1="100",t.GLSL3="300 es",t.GammaEncoding=3007,t.GeometryUtils=su,t.GreaterDepth=6,t.GreaterEqualDepth=5,t.GreaterEqualStencilFunc=518,t.GreaterStencilFunc=516,t.GridHelper=hc,t.Group=ii,t.HalfFloatType=1016,t.HemisphereLight=ks,t.HemisphereLightHelper=uc,t.HemisphereLightProbe=sl,t.IcosahedronBufferGeometry=ca,t.IcosahedronGeometry=ca,t.ImageBitmapLoader=$s,t.ImageLoader=rs,t.ImageUtils=b,t.ImmediateRenderObject=$l,t.IncrementStencilOp=7682,t.IncrementWrapStencilOp=34055,t.InstancedBufferAttribute=Xs,t.InstancedBufferGeometry=qs,t.InstancedInterleavedBuffer=Hl,t.InstancedMesh=$i,t.Int16Attribute=function(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new ot(e,t)},t.Int16BufferAttribute=ot,t.Int32Attribute=function(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new st(e,t)},t.Int32BufferAttribute=st,t.Int8Attribute=function(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new nt(e,t)},t.Int8BufferAttribute=nt,t.IntType=1013,t.InterleavedBuffer=vi,t.InterleavedBufferAttribute=wi,t.Interpolant=Ia,t.InterpolateDiscrete=2300,t.InterpolateLinear=2301,t.InterpolateSmooth=2302,t.InvertStencilOp=5386,t.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")},t.KeepStencilOp=7680,t.KeyframeTrack=Fa,t.LOD=Bi,t.LatheBufferGeometry=ua,t.LatheGeometry=ua,t.Layers=de,t.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")},t.LessDepth=2,t.LessEqualDepth=3,t.LessEqualStencilFunc=515,t.LessStencilFunc=513,t.Light=Rs,t.LightProbe=Vs,t.Line=ao,t.Line3=Jl,t.LineBasicMaterial=eo,t.LineCurve=xs,t.LineCurve3=_s,t.LineDashedMaterial=Pa,t.LineLoop=uo,t.LinePieces=1,t.LineSegments=co,t.LineStrip=0,t.LinearEncoding=3e3,t.LinearFilter=1006,t.LinearInterpolant=ja,t.LinearMipMapLinearFilter=1008,t.LinearMipMapNearestFilter=1007,t.LinearMipmapLinearFilter=1008,t.LinearMipmapNearestFilter=1007,t.LinearToneMapping=1,t.Loader=Ja,t.LoaderUtils=Ws,t.LoadingManager=Qa,t.LogLuvEncoding=3003,t.LoopOnce=2200,t.LoopPingPong=2202,t.LoopRepeat=2201,t.LuminanceAlphaFormat=1025,t.LuminanceFormat=1024,t.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},t.Material=Ze,t.MaterialLoader=Gs,t.Math=g,t.MathUtils=g,t.Matrix3=y,t.Matrix4=te,t.MaxEquation=104,t.Mesh=zt,t.MeshBasicMaterial=Je,t.MeshDepthMaterial=Jr,t.MeshDistanceMaterial=$r,t.MeshFaceMaterial=function(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e},t.MeshLambertMaterial=Ra,t.MeshMatcapMaterial=ka,t.MeshNormalMaterial=Oa,t.MeshPhongMaterial=Ta,t.MeshPhysicalMaterial=Ma,t.MeshStandardMaterial=Sa,t.MeshToonMaterial=Ca,t.MinEquation=103,t.MirroredRepeatWrapping=1002,t.MixOperation=1,t.MultiMaterial=function(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e},t.MultiplyBlending=4,t.MultiplyOperation=0,t.NearestFilter=1003,t.NearestMipMapLinearFilter=1005,t.NearestMipMapNearestFilter=1004,t.NearestMipmapLinearFilter=1005,t.NearestMipmapNearestFilter=1004,t.NeverDepth=0,t.NeverStencilFunc=512,t.NoBlending=0,t.NoColors=0,t.NoToneMapping=0,t.NormalAnimationBlendMode=2500,t.NormalBlending=1,t.NotEqualDepth=7,t.NotEqualStencilFunc=517,t.NumberKeyframeTrack=Ua,t.Object3D=Me,t.ObjectLoader=Ks,t.ObjectSpaceNormalMap=1,t.OctahedronBufferGeometry=ha,t.OctahedronGeometry=ha,t.OneFactor=201,t.OneMinusDstAlphaFactor=207,t.OneMinusDstColorFactor=209,t.OneMinusSrcAlphaFactor=205,t.OneMinusSrcColorFactor=203,t.OrthographicCamera=js,t.PCFShadowMap=1,t.PCFSoftShadowMap=2,t.PMREMGenerator=Zc,t.ParametricBufferGeometry=da,t.ParametricGeometry=da,t.Particle=function(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Di(e)},t.ParticleBasicMaterial=function(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.ParticleSystem=function(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new vo(e,t)},t.ParticleSystemMaterial=function(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.Path=Cs,t.PerspectiveCamera=Yt,t.Plane=Re,t.PlaneBufferGeometry=on,t.PlaneGeometry=on,t.PlaneHelper=Tc,t.PointCloud=function(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new vo(e,t)},t.PointCloudMaterial=function(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.PointLight=Ns,t.PointLightHelper=ac,t.Points=vo,t.PointsMaterial=ho,t.PolarGridHelper=dc,t.PolyhedronBufferGeometry=Mo,t.PolyhedronGeometry=Mo,t.PositionalAudio=Al,t.PropertyBinding=Nl,t.PropertyMixer=Ml,t.QuadraticBezierCurve=Es,t.QuadraticBezierCurve3=As,t.Quaternion=M,t.QuaternionKeyframeTrack=Ga,t.QuaternionLinearInterpolant=Va,t.REVISION="125",t.RGBADepthPacking=3201,t.RGBAFormat=1023,t.RGBAIntegerFormat=1033,t.RGBA_ASTC_10x10_Format=37819,t.RGBA_ASTC_10x5_Format=37816,t.RGBA_ASTC_10x6_Format=37817,t.RGBA_ASTC_10x8_Format=37818,t.RGBA_ASTC_12x10_Format=37820,t.RGBA_ASTC_12x12_Format=37821,t.RGBA_ASTC_4x4_Format=37808,t.RGBA_ASTC_5x4_Format=37809,t.RGBA_ASTC_5x5_Format=37810,t.RGBA_ASTC_6x5_Format=37811,t.RGBA_ASTC_6x6_Format=37812,t.RGBA_ASTC_8x5_Format=37813,t.RGBA_ASTC_8x6_Format=37814,t.RGBA_ASTC_8x8_Format=37815,t.RGBA_BPTC_Format=36492,t.RGBA_ETC2_EAC_Format=37496,t.RGBA_PVRTC_2BPPV1_Format=35843,t.RGBA_PVRTC_4BPPV1_Format=35842,t.RGBA_S3TC_DXT1_Format=33777,t.RGBA_S3TC_DXT3_Format=33778,t.RGBA_S3TC_DXT5_Format=33779,t.RGBDEncoding=3006,t.RGBEEncoding=3002,t.RGBEFormat=1023,t.RGBFormat=1022,t.RGBIntegerFormat=1032,t.RGBM16Encoding=3005,t.RGBM7Encoding=3004,t.RGB_ETC1_Format=36196,t.RGB_ETC2_Format=37492,t.RGB_PVRTC_2BPPV1_Format=35841,t.RGB_PVRTC_4BPPV1_Format=35840,t.RGB_S3TC_DXT1_Format=33776,t.RGFormat=1030,t.RGIntegerFormat=1031,t.RawShaderMaterial=Aa,t.Ray=ee,t.Raycaster=Vl,t.RectAreaLight=Hs,t.RedFormat=1028,t.RedIntegerFormat=1029,t.ReinhardToneMapping=2,t.RepeatWrapping=1e3,t.ReplaceStencilOp=7681,t.ReverseSubtractEquation=102,t.RingBufferGeometry=fa,t.RingGeometry=fa,t.SRGB8_ALPHA8_ASTC_10x10_Format=37851,t.SRGB8_ALPHA8_ASTC_10x5_Format=37848,t.SRGB8_ALPHA8_ASTC_10x6_Format=37849,t.SRGB8_ALPHA8_ASTC_10x8_Format=37850,t.SRGB8_ALPHA8_ASTC_12x10_Format=37852,t.SRGB8_ALPHA8_ASTC_12x12_Format=37853,t.SRGB8_ALPHA8_ASTC_4x4_Format=37840,t.SRGB8_ALPHA8_ASTC_5x4_Format=37841,t.SRGB8_ALPHA8_ASTC_5x5_Format=37842,t.SRGB8_ALPHA8_ASTC_6x5_Format=37843,t.SRGB8_ALPHA8_ASTC_6x6_Format=37844,t.SRGB8_ALPHA8_ASTC_8x5_Format=37845,t.SRGB8_ALPHA8_ASTC_8x6_Format=37846,t.SRGB8_ALPHA8_ASTC_8x8_Format=37847,t.Scene=gi,t.SceneUtils=lu,t.ShaderChunk=an,t.ShaderLib=ln,t.ShaderMaterial=qt,t.ShadowMaterial=Ea,t.Shape=Os,t.ShapeBufferGeometry=pa,t.ShapeGeometry=pa,t.ShapePath=el,t.ShapeUtils=ia,t.ShortType=1011,t.Skeleton=Yi,t.SkeletonHelper=oc,t.SkinnedMesh=Gi,t.SmoothShading=2,t.Sphere=q,t.SphereBufferGeometry=ma,t.SphereGeometry=ma,t.Spherical=ql,t.SphericalHarmonics3=Us,t.Spline=au,t.SplineCurve=Ss,t.SplineCurve3=ou,t.SpotLight=Ds,t.SpotLightHelper=tc,t.Sprite=Di,t.SpriteMaterial=xi,t.SrcAlphaFactor=204,t.SrcAlphaSaturateFactor=210,t.SrcColorFactor=202,t.StaticCopyUsage=35046,t.StaticDrawUsage=35044,t.StaticReadUsage=35045,t.StereoCamera=hl,t.StreamCopyUsage=35042,t.StreamDrawUsage=35040,t.StreamReadUsage=35041,t.StringKeyframeTrack=Wa,t.SubtractEquation=101,t.SubtractiveBlending=3,t.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},t.TangentSpaceNormalMap=0,t.TetrahedronBufferGeometry=ga,t.TetrahedronGeometry=ga,t.TextBufferGeometry=va,t.TextGeometry=va,t.Texture=x,t.TextureLoader=as,t.TorusBufferGeometry=ya,t.TorusGeometry=ya,t.TorusKnotBufferGeometry=ba,t.TorusKnotGeometry=ba,t.Triangle=He,t.TriangleFanDrawMode=2,t.TriangleStripDrawMode=1,t.TrianglesDrawMode=0,t.TubeBufferGeometry=wa,t.TubeGeometry=wa,t.UVMapping=300,t.Uint16Attribute=function(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new at(e,t)},t.Uint16BufferAttribute=at,t.Uint32Attribute=function(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new lt(e,t)},t.Uint32BufferAttribute=lt,t.Uint8Attribute=function(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new rt(e,t)},t.Uint8BufferAttribute=rt,t.Uint8ClampedAttribute=function(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new it(e,t)},t.Uint8ClampedBufferAttribute=it,t.Uniform=zl,t.UniformsLib=sn,t.UniformsUtils=Wt,t.UnsignedByteType=1009,t.UnsignedInt248Type=1020,t.UnsignedIntType=1014,t.UnsignedShort4444Type=1017,t.UnsignedShort5551Type=1018,t.UnsignedShort565Type=1019,t.UnsignedShortType=1012,t.VSMShadowMap=3,t.Vector2=v,t.Vector3=T,t.Vector4=E,t.VectorKeyframeTrack=qa,t.Vertex=function(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new T(e,t,n)},t.VertexColors=2,t.VideoTexture=bo,t.WebGL1Renderer=fi,t.WebGLCubeRenderTarget=Zt,t.WebGLMultisampleRenderTarget=S,t.WebGLRenderTarget=A,t.WebGLRenderTargetCube=function(e,t,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Zt(e,n)},t.WebGLRenderer=di,t.WebGLUtils=ri,t.WireframeGeometry=xa,t.WireframeHelper=function(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new co(new xa(e.geometry),new eo({color:void 0!==t?t:16777215}))},t.WrapAroundEnding=2402,t.XHRLoader=function(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new es(e)},t.ZeroCurvatureEnding=2400,t.ZeroFactor=200,t.ZeroSlopeEnding=2401,t.ZeroStencilOp=0,t.sRGBEncoding=3001,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],58:[function(e,t,n){THREE.DRACOLoader=function(e){THREE.Loader.call(this,e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}},THREE.DRACOLoader.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:THREE.DRACOLoader,setDecoderPath:function(e){return this.decoderPath=e,this},setDecoderConfig:function(e){return this.decoderConfig=e,this},setWorkerLimit:function(e){return this.workerLimit=e,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(e,t,n,r){var i=new THREE.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>{var n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)},n,r)},decodeDracoFile:function(e,t,n,r){var i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)},decodeGeometry:function(e,t){for(var n in t.attributeTypes){var r=t.attributeTypes[n];void 0!==r.BYTES_PER_ELEMENT&&(t.attributeTypes[n]=r.name)}var i,o=JSON.stringify(t);if(THREE.DRACOLoader.taskCache.has(e)){var a=THREE.DRACOLoader.taskCache.get(e);if(a.key===o)return a.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var s=this.workerNextTaskID++,l=e.byteLength,c=this._getWorker(s,l).then(n=>(i=n,new Promise((n,r)=>{i._callbacks[s]={resolve:n,reject:r},i.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return c.catch(()=>!0).then(()=>{i&&s&&this._releaseTask(i,s)}),THREE.DRACOLoader.taskCache.set(e,{key:o,promise:c}),c},_createGeometry:function(e){var t=new THREE.BufferGeometry;e.index&&t.setIndex(new THREE.BufferAttribute(e.index.array,1));for(var n=0;n<e.attributes.length;n++){var r=e.attributes[n],i=r.name,o=r.array,a=r.itemSize;t.setAttribute(i,new THREE.BufferAttribute(o,a))}return t},_loadLibrary:function(e,t){var n=new THREE.FileLoader(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((t,r)=>{n.load(e,t,void 0,r)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var e="object"!==typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(t=>{var n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);var r=THREE.DRACOLoader.DRACOWorker.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending},_getWorker:function(e,t){return this._initDecoder().then(()=>{var n;return this.workerPool.length<this.workerLimit?((n=new Worker(this.workerSourceURL))._callbacks={},n._taskCosts={},n._taskLoad=0,n.postMessage({type:"init",decoderConfig:this.decoderConfig}),n.onmessage=function(e){var t=e.data;switch(t.type){case"decode":n._callbacks[t.id].resolve(t);break;case"error":n._callbacks[t.id].reject(t);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+t.type+'"')}},this.workerPool.push(n)):this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1})),(n=this.workerPool[this.workerPool.length-1])._taskCosts[e]=t,n._taskLoad+=t,n})},_releaseTask:function(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]},debug:function(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))},dispose:function(){for(var e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}),THREE.DRACOLoader.DRACOWorker=function(){var e,t;function n(e,t,n,r,i,o){var a=o.num_components(),s=n.num_points()*a,l=s*i.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,o,c,l,u);var h=new i(e.HEAPF32.buffer,u,s).slice();return e._free(u),{name:r,array:h,itemSize:a}}onmessage=function(r){var i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":var o=i.buffer,a=i.taskConfig;t.then(e=>{var t=e.draco,r=new t.Decoder,s=new t.DecoderBuffer;s.Init(new Int8Array(o),o.byteLength);try{var l=function(e,t,r,i){var o,a,s=i.attributeIDs,l=i.attributeTypes,c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)o=new e.Mesh,a=t.DecodeBufferToMesh(r,o);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new e.PointCloud,a=t.DecodeBufferToPointCloud(r,o)}if(!a.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+a.error_msg());var u={index:null,attributes:[]};for(var h in s){var d,f,p=self[l[h]];if(i.useUniqueIDs)f=s[h],d=t.GetAttributeByUniqueId(o,f);else{if(-1===(f=t.GetAttributeId(o,e[s[h]])))continue;d=t.GetAttribute(o,f)}u.attributes.push(n(e,t,o,h,p,d))}return c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){var r=3*n.num_faces(),i=4*r,o=e._malloc(i);t.GetTrianglesUInt32Array(n,i,o);var a=new Uint32Array(e.HEAPF32.buffer,o,r).slice();return e._free(o),{array:a,itemSize:1}}(e,t,o)),e.destroy(o),u}(t,r,s,a),c=l.attributes.map(e=>e.array.buffer);l.index&&c.push(l.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:l},c)}catch(u){console.error(u),self.postMessage({type:"error",id:i.id,error:u.message})}finally{t.destroy(s),t.destroy(r)}})}}},THREE.DRACOLoader.taskCache=new WeakMap,THREE.DRACOLoader.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},THREE.DRACOLoader.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},THREE.DRACOLoader.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},THREE.DRACOLoader.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")}},{}],59:[function(t,n,r){THREE.GLTFLoader=function(){function t(e){THREE.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new s(e)})),this.register((function(e){return new c(e)})),this.register((function(e){return new u(e)})),this.register((function(e){return new l(e)})),this.register((function(e){return new o(e)})),this.register((function(e){return new h(e)}))}function n(){var e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}t.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:t,load:function(t,n,r,i){var o,a=this;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),this.manager.itemStart(t);var s=function(e){i?i(e):console.error(e),a.manager.itemError(t),a.manager.itemEnd(t)},l=new THREE.FileLoader(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,(function(r){try{a.parse(r,o,(function(e){n(e),a.manager.itemEnd(t)}),s)}catch(e){s(e)}}),r,s)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},setKTX2Loader:function(e){return this.ktx2Loader=e,this},setMeshoptDecoder:function(e){return this.meshoptDecoder=e,this},register:function(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this},unregister:function(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this},parse:function(e,t,n,o){var s,l={},c={};if("string"===typeof e)s=e;else if(THREE.LoaderUtils.decodeText(new Uint8Array(e,0,4))===d){try{l[r.KHR_BINARY_GLTF]=new m(e)}catch(_){return void(o&&o(_))}s=l[r.KHR_BINARY_GLTF].content}else s=THREE.LoaderUtils.decodeText(new Uint8Array(e));var u=JSON.parse(s);if(void 0===u.asset||u.asset.version[0]<2)o&&o(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));else{var h=new W(u,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});h.fileLoader.setRequestHeader(this.requestHeader);for(var f=0;f<this.pluginCallbacks.length;f++){var p=this.pluginCallbacks[f](h);c[p.name]=p,l[p.name]=!0}if(u.extensionsUsed)for(f=0;f<u.extensionsUsed.length;++f){var y=u.extensionsUsed[f],x=u.extensionsRequired||[];switch(y){case r.KHR_MATERIALS_UNLIT:l[y]=new a;break;case r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:l[y]=new b;break;case r.KHR_DRACO_MESH_COMPRESSION:l[y]=new g(u,this.dracoLoader);break;case r.MSFT_TEXTURE_DDS:l[y]=new i(this.ddsLoader);break;case r.KHR_TEXTURE_TRANSFORM:l[y]=new v;break;case r.KHR_MESH_QUANTIZATION:l[y]=new w;break;default:x.indexOf(y)>=0&&void 0===c[y]&&console.warn('THREE.GLTFLoader: Unknown extension "'+y+'".')}}h.setExtensions(l),h.setPlugins(c),h.parse(n,o)}}});var r={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function i(e){if(!e)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=r.MSFT_TEXTURE_DDS,this.ddsLoader=e}function o(e){this.parser=e,this.name=r.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}function a(){this.name=r.KHR_MATERIALS_UNLIT}function s(e){this.parser=e,this.name=r.KHR_MATERIALS_CLEARCOAT}function l(e){this.parser=e,this.name=r.KHR_MATERIALS_TRANSMISSION}function c(e){this.parser=e,this.name=r.KHR_TEXTURE_BASISU}function u(e){this.parser=e,this.name=r.EXT_TEXTURE_WEBP,this.isSupported=null}function h(e){this.name=r.EXT_MESHOPT_COMPRESSION,this.parser=e}o.prototype._markDefs=function(){for(var e=this.parser,t=this.parser.json.nodes||[],n=0,r=t.length;n<r;n++){var i=t[n];i.extensions&&i.extensions[this.name]&&void 0!==i.extensions[this.name].light&&e._addNodeRef(this.cache,i.extensions[this.name].light)}},o.prototype._loadLight=function(e){var t=this.parser,n="light:"+e,r=t.cache.get(n);if(r)return r;var i,o=t.json,a=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e],s=new THREE.Color(16777215);void 0!==a.color&&s.fromArray(a.color);var l=void 0!==a.range?a.range:0;switch(a.type){case"directional":(i=new THREE.DirectionalLight(s)).target.position.set(0,0,-1),i.add(i.target);break;case"point":(i=new THREE.PointLight(s)).distance=l;break;case"spot":(i=new THREE.SpotLight(s)).distance=l,a.spot=a.spot||{},a.spot.innerConeAngle=void 0!==a.spot.innerConeAngle?a.spot.innerConeAngle:0,a.spot.outerConeAngle=void 0!==a.spot.outerConeAngle?a.spot.outerConeAngle:Math.PI/4,i.angle=a.spot.outerConeAngle,i.penumbra=1-a.spot.innerConeAngle/a.spot.outerConeAngle,i.target.position.set(0,0,-1),i.add(i.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+a.type)}return i.position.set(0,0,0),i.decay=2,void 0!==a.intensity&&(i.intensity=a.intensity),i.name=t.createUniqueName(a.name||"light_"+e),r=Promise.resolve(i),t.cache.add(n,r),r},o.prototype.createNodeAttachment=function(e){var t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))},a.prototype.getMaterialType=function(){return THREE.MeshBasicMaterial},a.prototype.extendParams=function(e,t,n){var r=[];e.color=new THREE.Color(1,1,1),e.opacity=1;var i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;e.color.fromArray(o),e.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture))}return Promise.all(r)},s.prototype.getMaterialType=function(e){var t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?THREE.MeshPhysicalMaterial:null},s.prototype.extendMaterialParams=function(e,t){var n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var i=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){var a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new THREE.Vector2(a,-a)}return Promise.all(i)},l.prototype.getMaterialType=function(e){var t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?THREE.MeshPhysicalMaterial:null},l.prototype.extendMaterialParams=function(e,t){var n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var i=[],o=r.extensions[this.name];return void 0!==o.transmissionFactor&&(t.transmission=o.transmissionFactor),void 0!==o.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(i)},c.prototype.loadTexture=function(e){var t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;var i=r.extensions[this.name],o=n.images[i.source],a=t.options.ktx2Loader;if(!a){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,o,a)},u.prototype.loadTexture=function(e){var t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;var o=i.extensions[t],a=r.images[o.source],s=a.uri?n.options.manager.getHandler(a.uri):n.textureLoader;return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,a,s);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))},u.prototype.detectSupport=function(){return this.isSupported||(this.isSupported=new Promise((function(e){var t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported},h.prototype.loadBufferView=function(e){var t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){var r=n.extensions[this.name],i=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return Promise.all([i,o.ready]).then((function(e){var t=r.byteOffset||0,n=r.byteLength||0,i=r.count,a=r.byteStride,s=new ArrayBuffer(i*a),l=new Uint8Array(e[0],t,n);return o.decodeGltfBuffer(new Uint8Array(s),i,a,l,r.mode,r.filter),s}))}return null};var d="glTF",f=1313821514,p=5130562;function m(e){this.name=r.KHR_BINARY_GLTF,this.content=null,this.body=null;var t=new DataView(e,0,12);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==d)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");for(var n=this.header.length-12,i=new DataView(e,12),o=0;o<n;){var a=i.getUint32(o,!0);o+=4;var s=i.getUint32(o,!0);if(o+=4,s===f){var l=new Uint8Array(e,12+o,a);this.content=THREE.LoaderUtils.decodeText(l)}else if(s===p){var c=12+o;this.body=e.slice(c,c+a)}o+=a}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}function g(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=r.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}function v(){this.name=r.KHR_TEXTURE_TRANSFORM}function y(e){THREE.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var t=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),n=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),r=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\ttexelSpecular = sRGBToLinear( texelSpecular );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),i=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor;"].join("\n"),a={specular:{value:(new THREE.Color).setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=a,this.onBeforeCompile=function(e){for(var s in a)e.uniforms[s]=a[s];e.fragmentShader=e.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",n).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",i).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return a.specular.value},set:function(e){a.specular.value=e}},specularMap:{get:function(){return a.specularMap.value},set:function(e){a.specularMap.value=e,e?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return a.glossiness.value},set:function(e){a.glossiness.value=e}},glossinessMap:{get:function(){return a.glossinessMap.value},set:function(e){a.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}function b(){return{name:r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return y},extendParams:function(e,t,n){var r=t.extensions[this.name];e.color=new THREE.Color(1,1,1),e.opacity=1;var i=[];if(Array.isArray(r.diffuseFactor)){var o=r.diffuseFactor;e.color.fromArray(o),e.opacity=o[3]}if(void 0!==r.diffuseTexture&&i.push(n.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new THREE.Color(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var a=r.specularGlossinessTexture;i.push(n.assignTexture(e,"glossinessMap",a)),i.push(n.assignTexture(e,"specularMap",a))}return Promise.all(i)},createMaterial:function(e){var t=new y(e);return t.fog=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,t.normalMapType=THREE.TangentSpaceNormalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t}}}function w(){this.name=r.KHR_MESH_QUANTIZATION}function x(e,t,n,r){THREE.Interpolant.call(this,e,t,n,r)}g.prototype.decodePrimitive=function(e,t){var n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},s={},l={};for(var c in o){var u=L[c]||c.toLowerCase();a[u]=o[c]}for(c in e.attributes)if(u=L[c]||c.toLowerCase(),void 0!==o[c]){var h=n.accessors[e.attributes[c]],d=O[h.componentType];l[u]=d,s[u]=!0===h.normalized}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(var n in e.attributes){var r=e.attributes[n],i=s[n];void 0!==i&&(r.normalized=i)}t(e)}),a,l)}))}))},v.prototype.extendTexture=function(e,t){return e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),e.needsUpdate=!0,e},y.prototype=Object.create(THREE.MeshStandardMaterial.prototype),y.prototype.constructor=y,y.prototype.copy=function(e){return THREE.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this},x.prototype=Object.create(THREE.Interpolant.prototype),x.prototype.constructor=x,x.prototype.copySampleValue_=function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r,o=0;o!==r;o++)t[o]=n[i+o];return t},x.prototype.beforeStart_=x.prototype.copySampleValue_,x.prototype.afterEnd_=x.prototype.copySampleValue_,x.prototype.interpolate_=function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,l=3*a,c=r-t,u=(n-t)/c,h=u*u,d=h*u,f=e*l,p=f-l,m=-2*d+3*h,g=d-h,v=1-m,y=g-h+u,b=0;b!==a;b++){var w=o[p+b+a],x=o[p+b+s]*c,_=o[f+b+a],E=o[f+b]*c;i[b]=v*w+y*x+m*_+g*E}return i};var _=0,E=1,A=2,S=3,M=4,T=5,C=6,O={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},R={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipmapNearestFilter,9985:THREE.LinearMipmapNearestFilter,9986:THREE.NearestMipmapLinearFilter,9987:THREE.LinearMipmapLinearFilter},k={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},P={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},L={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},D={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},I={CUBICSPLINE:void 0,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},N="OPAQUE",j="MASK",B="BLEND";function F(e,t){return"string"!==typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}function z(e,t,n){for(var r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function H(e,t){void 0!==t.extras&&("object"===typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function U(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(var n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){var i=t.extras.targetNames;if(e.morphTargetInfluences.length===i.length)for(e.morphTargetDictionary={},n=0,r=i.length;n<r;n++)e.morphTargetDictionary[i[n]]=n;else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function V(e){var t=e.extensions&&e.extensions[r.KHR_DRACO_MESH_COMPRESSION];return t?"draco:"+t.bufferView+":"+t.indices+":"+G(t.attributes):e.indices+":"+G(e.attributes)+":"+e.mode}function G(e){for(var t="",n=Object.keys(e).sort(),r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function W(e,t){this.json=e||{},this.extensions={},this.plugins={},this.options=t||{},this.cache=new n,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.nodeNamesUsed={},"undefined"!==typeof createImageBitmap&&!1===/Firefox/.test(navigator.userAgent)?this.textureLoader=new THREE.ImageBitmapLoader(this.options.manager):this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}function q(e,t,n){var r=t.attributes,i=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(var a in r){var s=L[a]||a.toLowerCase();s in e.attributes||i.push(o(r[a],s))}if(void 0!==t.indices&&!e.index){var l=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(l)}return H(e,t),function(e,t,n){var r=t.attributes,i=new THREE.Box3;if(void 0!==r.POSITION){var o=(d=n.json.accessors[r.POSITION]).min,a=d.max;if(void 0!==o&&void 0!==a){i.set(new THREE.Vector3(o[0],o[1],o[2]),new THREE.Vector3(a[0],a[1],a[2]));var s=t.targets;if(void 0!==s){for(var l=new THREE.Vector3,c=new THREE.Vector3,u=0,h=s.length;u<h;u++){var d,f=s[u];void 0!==f.POSITION&&(o=(d=n.json.accessors[f.POSITION]).min,a=d.max,void 0!==o&&void 0!==a?(c.setX(Math.max(Math.abs(o[0]),Math.abs(a[0]))),c.setY(Math.max(Math.abs(o[1]),Math.abs(a[1]))),c.setZ(Math.max(Math.abs(o[2]),Math.abs(a[2]))),l.max(c)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION."))}i.expandByVector(l)}e.boundingBox=i;var p=new THREE.Sphere;i.getCenter(p.center),p.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=p}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}(e,t,n),Promise.all(i).then((function(){return void 0!==t.targets?function(e,t,n){for(var r=!1,i=!1,o=0,a=t.length;o<a&&(void 0!==(c=t[o]).POSITION&&(r=!0),void 0!==c.NORMAL&&(i=!0),!r||!i);o++);if(!r&&!i)return Promise.resolve(e);var s=[],l=[];for(o=0,a=t.length;o<a;o++){var c=t[o];if(r){var u=void 0!==c.POSITION?n.getDependency("accessor",c.POSITION):e.attributes.position;s.push(u)}i&&(u=void 0!==c.NORMAL?n.getDependency("accessor",c.NORMAL):e.attributes.normal,l.push(u))}return Promise.all([Promise.all(s),Promise.all(l)]).then((function(t){var n=t[0],o=t[1];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=o),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}function X(e,t){var n=e.getIndex();if(null===n){var r=[],i=e.getAttribute("position");if(void 0===i)return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(var o=0;o<i.count;o++)r.push(o);e.setIndex(r),n=e.getIndex()}var a=n.count-2,s=[];if(t===THREE.TriangleFanDrawMode)for(o=1;o<=a;o++)s.push(n.getX(0)),s.push(n.getX(o)),s.push(n.getX(o+1));else for(o=0;o<a;o++)o%2===0?(s.push(n.getX(o)),s.push(n.getX(o+1)),s.push(n.getX(o+2))):(s.push(n.getX(o+2)),s.push(n.getX(o+1)),s.push(n.getX(o)));s.length/3!==a&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var l=e.clone();return l.setIndex(s),l}return W.prototype.setExtensions=function(e){this.extensions=e},W.prototype.setPlugins=function(e){this.plugins=e},W.prototype.parse=function(e,t){var n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then((function(t){var o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};z(i,o,r),H(o,r),e(o)})).catch(t)},W.prototype._markDefs=function(){for(var e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[],r=0,i=t.length;r<i;r++)for(var o=t[r].joints,a=0,s=o.length;a<s;a++)e[o[a]].isBone=!0;for(var l=0,c=e.length;l<c;l++){var u=e[l];void 0!==u.mesh&&(this._addNodeRef(this.meshCache,u.mesh),void 0!==u.skin&&(n[u.mesh].isSkinnedMesh=!0)),void 0!==u.camera&&this._addNodeRef(this.cameraCache,u.camera)}},W.prototype._addNodeRef=function(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)},W.prototype._getNodeRef=function(e,t,n){if(e.refs[t]<=1)return n;var r=n.clone();return r.name+="_instance_"+e.uses[t]++,r},W.prototype._invokeOne=function(e){var t=Object.values(this.plugins);t.push(this);for(var n=0;n<t.length;n++){var r=e(t[n]);if(r)return r}},W.prototype._invokeAll=function(e){var t=Object.values(this.plugins);t.unshift(this);for(var n=[],r=0;r<t.length;r++){var i=e(t[r]);i&&n.push(i)}return n},W.prototype.getDependency=function(e,t){var n=e+":"+t,r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this.loadAnimation(t);break;case"camera":r=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r},W.prototype.getDependencies=function(e){var t=this.cache.get(e);if(!t){var n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t},W.prototype.loadBuffer=function(e){var t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[r.KHR_BINARY_GLTF].body);var i=this.options;return new Promise((function(e,r){n.load(F(t.uri,i.path),e,void 0,(function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))},W.prototype.loadBufferView=function(e){var t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){var n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))},W.prototype.loadAccessor=function(e){var t=this,n=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse)return Promise.resolve(null);var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){var i,o,a=e[0],s=P[r.type],l=O[r.componentType],c=l.BYTES_PER_ELEMENT,u=c*s,h=r.byteOffset||0,d=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,f=!0===r.normalized;if(d&&d!==u){var p=Math.floor(h/d),m="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+p+":"+r.count,g=t.cache.get(m);g||(i=new l(a,p*d,r.count*d/c),g=new THREE.InterleavedBuffer(i,d/c),t.cache.add(m,g)),o=new THREE.InterleavedBufferAttribute(g,s,h%d/c,f)}else i=null===a?new l(r.count*s):new l(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,f);if(void 0!==r.sparse){var v=P.SCALAR,y=O[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,w=r.sparse.values.byteOffset||0,x=new y(e[1],b,r.sparse.count*v),_=new l(e[2],w,r.sparse.count*s);null!==a&&(o=new THREE.BufferAttribute(o.array.slice(),o.itemSize,o.normalized));for(var E=0,A=x.length;E<A;E++){var S=x[E];if(o.setX(S,_[E*s]),s>=2&&o.setY(S,_[E*s+1]),s>=3&&o.setZ(S,_[E*s+2]),s>=4&&o.setW(S,_[E*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o}))},W.prototype.loadTexture=function(e){var t,n,i=this.json,o=this.options,a=i.textures[e],s=a.extensions||{};return(t=s[r.MSFT_TEXTURE_DDS]?i.images[s[r.MSFT_TEXTURE_DDS].source]:i.images[a.source]).uri&&(n=o.manager.getHandler(t.uri)),n||(n=s[r.MSFT_TEXTURE_DDS]?this.extensions[r.MSFT_TEXTURE_DDS].ddsLoader:this.textureLoader),this.loadTextureImage(e,t,n)},W.prototype.loadTextureImage=function(e,t,n){var r=this,i=this.json,o=this.options,a=i.textures[e],s=self.URL||self.webkitURL,l=t.uri,c=!1,u=!0;return"image/jpeg"===t.mimeType&&(u=!1),void 0!==t.bufferView&&(l=r.getDependency("bufferView",t.bufferView).then((function(e){if("image/png"===t.mimeType){var n=new DataView(e,25,1).getUint8(0,!1);u=6===n||4===n||3===n}c=!0;var r=new Blob([e],{type:t.mimeType});return l=s.createObjectURL(r)}))),Promise.resolve(l).then((function(e){return new Promise((function(t,r){var i=t;!0===n.isImageBitmapLoader&&(i=function(e){t(new THREE.CanvasTexture(e))}),n.load(F(e,o.path),i,void 0,r)}))})).then((function(t){!0===c&&s.revokeObjectURL(l),t.flipY=!1,a.name&&(t.name=a.name),u||(t.format=THREE.RGBFormat);var n=(i.samplers||{})[a.sampler]||{};return t.magFilter=R[n.magFilter]||THREE.LinearFilter,t.minFilter=R[n.minFilter]||THREE.LinearMipmapLinearFilter,t.wrapS=k[n.wrapS]||THREE.RepeatWrapping,t.wrapT=k[n.wrapT]||THREE.RepeatWrapping,r.associations.set(t,{type:"textures",index:e}),t}))},W.prototype.assignTexture=function(e,t,n){var i=this;return this.getDependency("texture",n.index).then((function(o){if(void 0===n.texCoord||0==n.texCoord||"aoMap"===t&&1==n.texCoord||console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+t+" not yet supported."),i.extensions[r.KHR_TEXTURE_TRANSFORM]){var a=void 0!==n.extensions?n.extensions[r.KHR_TEXTURE_TRANSFORM]:void 0;if(a){var s=i.associations.get(o);o=i.extensions[r.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),i.associations.set(o,s)}}e[t]=o}))},W.prototype.assignFinalMaterial=function(e){var t=e.geometry,n=e.material,r=void 0!==t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal,a=!0===e.isSkinnedMesh,s=Object.keys(t.morphAttributes).length>0,l=s&&void 0!==t.morphAttributes.normal;if(e.isPoints){var c="PointsMaterial:"+n.uuid,u=this.cache.get(c);u||(u=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(u,n),u.color.copy(n.color),u.map=n.map,u.sizeAttenuation=!1,this.cache.add(c,u)),n=u}else if(e.isLine){c="LineBasicMaterial:"+n.uuid;var h=this.cache.get(c);h||(h=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(h,n),h.color.copy(n.color),this.cache.add(c,h)),n=h}if(r||i||o||a||s){c="ClonedMaterial:"+n.uuid+":",n.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),a&&(c+="skinning:"),r&&(c+="vertex-tangents:"),i&&(c+="vertex-colors:"),o&&(c+="flat-shading:"),s&&(c+="morph-targets:"),l&&(c+="morph-normals:");var d=this.cache.get(c);d||(d=n.clone(),a&&(d.skinning=!0),i&&(d.vertexColors=!0),o&&(d.flatShading=!0),s&&(d.morphTargets=!0),l&&(d.morphNormals=!0),r&&(d.vertexTangents=!0,n.normalScale&&(n.normalScale.y*=-1),n.clearcoatNormalScale&&(n.clearcoatNormalScale.y*=-1)),this.cache.add(c,d),this.associations.set(d,this.associations.get(n))),n=d}n.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=n},W.prototype.getMaterialType=function(){return THREE.MeshStandardMaterial},W.prototype.loadMaterial=function(e){var t,n=this,i=this.json,o=this.extensions,a=i.materials[e],s={},l=a.extensions||{},c=[];if(l[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var u=o[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];t=u.getMaterialType(),c.push(u.extendParams(s,a,n))}else if(l[r.KHR_MATERIALS_UNLIT]){var h=o[r.KHR_MATERIALS_UNLIT];t=h.getMaterialType(),c.push(h.extendParams(s,a,n))}else{var d=a.pbrMetallicRoughness||{};if(s.color=new THREE.Color(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){var f=d.baseColorFactor;s.color.fromArray(f),s.opacity=f[3]}void 0!==d.baseColorTexture&&c.push(n.assignTexture(s,"map",d.baseColorTexture)),s.metalness=void 0!==d.metallicFactor?d.metallicFactor:1,s.roughness=void 0!==d.roughnessFactor?d.roughnessFactor:1,void 0!==d.metallicRoughnessTexture&&(c.push(n.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),c.push(n.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture))),t=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),c.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)}))))}!0===a.doubleSided&&(s.side=THREE.DoubleSide);var p=a.alphaMode||N;return p===B?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,p===j&&(s.alphaTest=void 0!==a.alphaCutoff?a.alphaCutoff:.5)),void 0!==a.normalTexture&&t!==THREE.MeshBasicMaterial&&(c.push(n.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new THREE.Vector2(1,-1),void 0!==a.normalTexture.scale&&s.normalScale.set(a.normalTexture.scale,-a.normalTexture.scale)),void 0!==a.occlusionTexture&&t!==THREE.MeshBasicMaterial&&(c.push(n.assignTexture(s,"aoMap",a.occlusionTexture)),void 0!==a.occlusionTexture.strength&&(s.aoMapIntensity=a.occlusionTexture.strength)),void 0!==a.emissiveFactor&&t!==THREE.MeshBasicMaterial&&(s.emissive=(new THREE.Color).fromArray(a.emissiveFactor)),void 0!==a.emissiveTexture&&t!==THREE.MeshBasicMaterial&&c.push(n.assignTexture(s,"emissiveMap",a.emissiveTexture)),Promise.all(c).then((function(){var i;return i=t===y?o[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):new t(s),a.name&&(i.name=a.name),i.map&&(i.map.encoding=THREE.sRGBEncoding),i.emissiveMap&&(i.emissiveMap.encoding=THREE.sRGBEncoding),H(i,a),n.associations.set(i,{type:"materials",index:e}),a.extensions&&z(o,i,a),i}))},W.prototype.createUniqueName=function(e){for(var t=THREE.PropertyBinding.sanitizeNodeName(e||""),n=t,r=1;this.nodeNamesUsed[n];++r)n=t+"_"+r;return this.nodeNamesUsed[n]=!0,n},W.prototype.loadGeometries=function(e){var t=this,n=this.extensions,i=this.primitiveCache;function o(e){return n[r.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return q(n,e,t)}))}for(var a=[],s=0,l=e.length;s<l;s++){var c,u=e[s],h=V(u),d=i[h];d?a.push(d.promise):(c=u.extensions&&u.extensions[r.KHR_DRACO_MESH_COMPRESSION]?o(u):q(new THREE.BufferGeometry,u,t),i[h]={primitive:u,promise:c},a.push(c))}return Promise.all(a)},W.prototype.loadMesh=function(e){for(var t,n=this,r=this.json,i=this.extensions,o=r.meshes[e],a=o.primitives,s=[],l=0,c=a.length;l<c;l++){var u=void 0===a[l].material?(void 0===(t=this.cache).DefaultMaterial&&(t.DefaultMaterial=new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide})),t.DefaultMaterial):this.getDependency("material",a[l].material);s.push(u)}return s.push(n.loadGeometries(a)),Promise.all(s).then((function(t){for(var r=t.slice(0,t.length-1),s=t[t.length-1],l=[],c=0,u=s.length;c<u;c++){var h,d=s[c],f=a[c],p=r[c];if(f.mode===M||f.mode===T||f.mode===C||void 0===f.mode)h=!0===o.isSkinnedMesh?new THREE.SkinnedMesh(d,p):new THREE.Mesh(d,p),!0===p.isMeshStandardMaterial&&p.side===THREE.DoubleSide&&null!==d.getIndex()&&!0===d.hasAttribute("position")&&!0===d.hasAttribute("normal")&&!0===d.hasAttribute("uv")&&!1===d.hasAttribute("tangent")&&(d.computeTangents(),p.vertexTangents=!0),!0!==h.isSkinnedMesh||h.geometry.attributes.skinWeight.normalized||h.normalizeSkinWeights(),f.mode===T?h.geometry=X(h.geometry,THREE.TriangleStripDrawMode):f.mode===C&&(h.geometry=X(h.geometry,THREE.TriangleFanDrawMode));else if(f.mode===E)h=new THREE.LineSegments(d,p);else if(f.mode===S)h=new THREE.Line(d,p);else if(f.mode===A)h=new THREE.LineLoop(d,p);else{if(f.mode!==_)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+f.mode);h=new THREE.Points(d,p)}Object.keys(h.geometry.morphAttributes).length>0&&U(h,o),h.name=n.createUniqueName(o.name||"mesh_"+e),H(h,o),f.extensions&&z(i,h,f),n.assignFinalMaterial(h),l.push(h)}if(1===l.length)return l[0];var m=new THREE.Group;for(c=0,u=l.length;c<u;c++)m.add(l[c]);return m}))},W.prototype.loadCamera=function(e){var t,n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new THREE.PerspectiveCamera(THREE.MathUtils.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new THREE.OrthographicCamera(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),H(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")},W.prototype.loadSkin=function(e){var t=this.json.skins[e],n={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return n.inverseBindMatrices=e,n}))},W.prototype.loadAnimation=function(e){for(var t=this.json.animations[e],n=[],r=[],i=[],o=[],a=[],s=0,l=t.channels.length;s<l;s++){var c=t.channels[s],u=t.samplers[c.sampler],h=c.target,d=void 0!==h.node?h.node:h.id,f=void 0!==t.parameters?t.parameters[u.input]:u.input,p=void 0!==t.parameters?t.parameters[u.output]:u.output;n.push(this.getDependency("node",d)),r.push(this.getDependency("accessor",f)),i.push(this.getDependency("accessor",p)),o.push(u),a.push(h)}return Promise.all([Promise.all(n),Promise.all(r),Promise.all(i),Promise.all(o),Promise.all(a)]).then((function(n){for(var r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=[],c=0,u=r.length;c<u;c++){var h=r[c],d=i[c],f=o[c],p=a[c],m=s[c];if(void 0!==h){var g;switch(h.updateMatrix(),h.matrixAutoUpdate=!0,D[m.path]){case D.weights:g=THREE.NumberKeyframeTrack;break;case D.rotation:g=THREE.QuaternionKeyframeTrack;break;case D.position:case D.scale:default:g=THREE.VectorKeyframeTrack}var v=h.name?h.name:h.uuid,y=void 0!==p.interpolation?I[p.interpolation]:THREE.InterpolateLinear,b=[];D[m.path]===D.weights?h.traverse((function(e){!0===e.isMesh&&e.morphTargetInfluences&&b.push(e.name?e.name:e.uuid)})):b.push(v);var w=f.array;if(f.normalized){var _;if(w.constructor===Int8Array)_=1/127;else if(w.constructor===Uint8Array)_=1/255;else if(w.constructor==Int16Array)_=1/32767;else{if(w.constructor!==Uint16Array)throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");_=1/65535}for(var E=new Float32Array(w.length),A=0,S=w.length;A<S;A++)E[A]=w[A]*_;w=E}for(A=0,S=b.length;A<S;A++){var M=new g(b[A]+"."+D[m.path],d.array,w,y);"CUBICSPLINE"===p.interpolation&&(M.createInterpolant=function(e){return new x(this.times,this.values,this.getValueSize()/3,e)},M.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(M)}}}var T=t.name?t.name:"animation_"+e;return new THREE.AnimationClip(T,void 0,l)}))},W.prototype.loadNode=function(e){var t=this.json,n=this.extensions,r=this,i=t.nodes[e],o=i.name?r.createUniqueName(i.name):"";return function(){var t=[];return void 0!==i.mesh&&t.push(r.getDependency("mesh",i.mesh).then((function(e){var t=r._getNodeRef(r.meshCache,i.mesh,e);return void 0!==i.weights&&t.traverse((function(e){if(e.isMesh)for(var t=0,n=i.weights.length;t<n;t++)e.morphTargetInfluences[t]=i.weights[t]})),t}))),void 0!==i.camera&&t.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)})),Promise.all(t)}().then((function(t){var a;if((a=!0===i.isBone?new THREE.Bone:t.length>1?new THREE.Group:1===t.length?t[0]:new THREE.Object3D)!==t[0])for(var s=0,l=t.length;s<l;s++)a.add(t[s]);if(i.name&&(a.userData.name=i.name,a.name=o),H(a,i),i.extensions&&z(n,a,i),void 0!==i.matrix){var c=new THREE.Matrix4;c.fromArray(i.matrix),a.applyMatrix4(c)}else void 0!==i.translation&&a.position.fromArray(i.translation),void 0!==i.rotation&&a.quaternion.fromArray(i.rotation),void 0!==i.scale&&a.scale.fromArray(i.scale);return r.associations.set(a,{type:"nodes",index:e}),a}))},W.prototype.loadScene=function(){function e(t,n,r,i){var o=r.nodes[t];return i.getDependency("node",t).then((function(e){return void 0===o.skin?e:i.getDependency("skin",o.skin).then((function(e){for(var n=[],r=0,o=(t=e).joints.length;r<o;r++)n.push(i.getDependency("node",t.joints[r]));return Promise.all(n)})).then((function(n){return e.traverse((function(e){if(e.isMesh){for(var r=[],i=[],o=0,a=n.length;o<a;o++){var s=n[o];if(s){r.push(s);var l=new THREE.Matrix4;void 0!==t.inverseBindMatrices&&l.fromArray(t.inverseBindMatrices.array,16*o),i.push(l)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[o])}e.bind(new THREE.Skeleton(r,i),e.matrixWorld)}})),e}));var t})).then((function(t){n.add(t);var a=[];if(o.children)for(var s=o.children,l=0,c=s.length;l<c;l++){var u=s[l];a.push(e(u,t,r,i))}return Promise.all(a)}))}return function(t){var n=this.json,r=this.extensions,i=this.json.scenes[t],o=new THREE.Group;i.name&&(o.name=this.createUniqueName(i.name)),H(o,i),i.extensions&&z(r,o,i);for(var a=i.nodes||[],s=[],l=0,c=a.length;l<c;l++)s.push(e(a[l],o,n,this));return Promise.all(s).then((function(){return o}))}}(),t}()},{}],60:[function(t,n,r){THREE.MTLLoader=function(e){THREE.Loader.call(this,e)},THREE.MTLLoader.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:THREE.MTLLoader,load:function(t,n,r,i){var o=this,a=""===this.path?THREE.LoaderUtils.extractUrlBase(t):this.path,s=new THREE.FileLoader(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(function(r){try{n(o.parse(r,a))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},setMaterialOptions:function(e){return this.materialOptions=e,this},parse:function(e,t){for(var n=e.split("\n"),r={},i=/\s+/,o={},a=0;a<n.length;a++){var s=n[a];if(0!==(s=s.trim()).length&&"#"!==s.charAt(0)){var l=s.indexOf(" "),c=l>=0?s.substring(0,l):s;c=c.toLowerCase();var u=l>=0?s.substring(l+1):"";if(u=u.trim(),"newmtl"===c)r={name:u},o[u]=r;else if("ka"===c||"kd"===c||"ks"===c||"ke"===c){var h=u.split(i,3);r[c]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else r[c]=u}}var d=new THREE.MTLLoader.MaterialCreator(this.resourcePath||t,this.materialOptions);return d.setCrossOrigin(this.crossOrigin),d.setManager(this.manager),d.setMaterials(o),d}}),THREE.MTLLoader.MaterialCreator=function(e,t){this.baseUrl=e||"",this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"anonymous",setCrossOrigin:function(e){return this.crossOrigin=e,this},setManager:function(e){this.manager=e},setMaterials:function(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(e){if(!this.options)return e;var t={};for(var n in e){var r=e[n],i={};for(var o in t[n]=i,r){var a=!0,s=r[o],l=o.toLowerCase();switch(l){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[l]=s)}}return t},preload:function(){for(var e in this.materialsInfo)this.create(e)},getIndex:function(e){return this.nameLookup[e]},getAsArray:function(){var e=0;for(var t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray},create:function(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]},createMaterial_:function(e){var t=this,n=this.materialsInfo[e],r={name:e,side:this.side};function i(e,n){if(!r[e]){var i,o,a=t.getTextureParams(n,r),s=t.loadTexture((i=t.baseUrl,"string"!==typeof(o=a.url)||""===o?"":/^https?:\/\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=t.wrap,s.wrapT=t.wrap,r[e]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"ke":r.emissive=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"map_ke":i("emissiveMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"map_d":i("alphaMap",s),r.transparent=!0;break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[e]=new THREE.MeshPhongMaterial(r),this.materials[e]},getTextureParams:function(e,t){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=e.split(/\s+/);return(n=i.indexOf("-bm"))>=0&&(t.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(e,t,n,r,i){var o,a=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager,s=a.getHandler(e);return null===s&&(s=new THREE.TextureLoader(a)),s.setCrossOrigin&&s.setCrossOrigin(this.crossOrigin),o=s.load(e,n,r,i),void 0!==t&&(o.mapping=t),o}}},{}],61:[function(t,n,r){THREE.OBJLoader=function(){var t=/^[og]\s*(.+)?/,n=/^mtllib /,r=/^usemtl /,i=/^usemap /,o=new THREE.Vector3,a=new THREE.Vector3,s=new THREE.Vector3,l=new THREE.Vector3,c=new THREE.Vector3;function u(){var e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);var n=this.object&&"function"===typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){var t={index:"number"===typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"===typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){var n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){var n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){var n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(e,t,n){var r=this.vertices,i=this.object.geometry.normals;o.fromArray(r,e),a.fromArray(r,t),s.fromArray(r,n),c.subVectors(s,a),l.subVectors(o,a),c.cross(l),c.normalize(),i.push(c.x,c.y,c.z),i.push(c.x,c.y,c.z),i.push(c.x,c.y,c.z)},addColor:function(e,t,n){var r=this.colors,i=this.object.geometry.colors;void 0!==r[e]&&i.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&i.push(r[t+0],r[t+1],r[t+2]),void 0!==r[n]&&i.push(r[n+0],r[n+1],r[n+2])},addUV:function(e,t,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[e+0],r[e+1]),i.push(r[t+0],r[t+1]),i.push(r[n+0],r[n+1])},addDefaultUV:function(){var e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,r,i,o,a,s,l){var c=this.vertices.length,u=this.parseVertexIndex(e,c),h=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(u,h,d),this.addColor(u,h,d),void 0!==a&&""!==a){var f=this.normals.length;u=this.parseNormalIndex(a,f),h=this.parseNormalIndex(s,f),d=this.parseNormalIndex(l,f),this.addNormal(u,h,d)}else this.addFaceNormal(u,h,d);if(void 0!==r&&""!==r){var p=this.uvs.length;u=this.parseUVIndex(r,p),h=this.parseUVIndex(i,p),d=this.parseUVIndex(o,p),this.addUV(u,h,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";for(var t=this.vertices.length,n=0,r=e.length;n<r;n++){var i=this.parseVertexIndex(e[n],t);this.addVertexPoint(i),this.addColor(i)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=e.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(e[i],n));var a=0;for(o=t.length;a<o;a++)this.addUVLine(this.parseUVIndex(t[a],r))}};return e.startObject("",!1),e}function h(e){THREE.Loader.call(this,e),this.materials=null}return h.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:h,load:function(t,n,r,i){var o=this,a=new THREE.FileLoader(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(r){try{n(o.parse(r))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},setMaterials:function(e){return this.materials=e,this},parse:function(e){var o=new u;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));for(var a=e.split("\n"),s="",l="",c=[],h="function"===typeof"".trimLeft,d=0,f=a.length;d<f;d++)if(s=a[d],0!==(s=h?s.trimLeft():s.trim()).length&&"#"!==(l=s.charAt(0)))if("v"===l){var p=s.split(/\s+/);switch(p[0]){case"v":o.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),p.length>=7?o.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6])):o.colors.push(void 0,void 0,void 0);break;case"vn":o.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":o.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===l){for(var m=s.substr(1).trim().split(/\s+/),g=[],v=0,y=m.length;v<y;v++){var b=m[v];if(b.length>0){var w=b.split("/");g.push(w)}}var x=g[0];for(v=1,y=g.length-1;v<y;v++){var _=g[v],E=g[v+1];o.addFace(x[0],_[0],E[0],x[1],_[1],E[1],x[2],_[2],E[2])}}else if("l"===l){var A=s.substring(1).trim().split(" "),S=[],M=[];if(-1===s.indexOf("/"))S=A;else for(var T=0,C=A.length;T<C;T++){var O=A[T].split("/");""!==O[0]&&S.push(O[0]),""!==O[1]&&M.push(O[1])}o.addLineGeometry(S,M)}else if("p"===l){var R=s.substr(1).trim().split(" ");o.addPointGeometry(R)}else if(null!==(c=t.exec(s))){var k=(" "+c[0].substr(1).trim()).substr(1);o.startObject(k)}else if(r.test(s))o.object.startMaterial(s.substring(7).trim(),o.materialLibraries);else if(n.test(s))o.materialLibraries.push(s.substring(7).trim());else if(i.test(s))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===l){if((c=s.split(" ")).length>1){var P=c[1].trim().toLowerCase();o.object.smooth="0"!==P&&"off"!==P}else o.object.smooth=!0;(W=o.object.currentMaterial())&&(W.smooth=o.object.smooth)}else{if("\0"===s)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+s+'"')}o.finalize();var L=new THREE.Group;if(L.materialLibraries=[].concat(o.materialLibraries),!0===!(1===o.objects.length&&0===o.objects[0].geometry.vertices.length))for(d=0,f=o.objects.length;d<f;d++){var D=o.objects[d],I=D.geometry,N=D.materials,j="Line"===I.type,B="Points"===I.type,F=!1;if(0!==I.vertices.length){(K=new THREE.BufferGeometry).setAttribute("position",new THREE.Float32BufferAttribute(I.vertices,3)),I.normals.length>0&&K.setAttribute("normal",new THREE.Float32BufferAttribute(I.normals,3)),I.colors.length>0&&(F=!0,K.setAttribute("color",new THREE.Float32BufferAttribute(I.colors,3))),!0===I.hasUVIndices&&K.setAttribute("uv",new THREE.Float32BufferAttribute(I.uvs,2));for(var z,H=[],U=0,V=N.length;U<V;U++){var G=(Y=N[U]).name+"_"+Y.smooth+"_"+F,W=o.materials[G];if(null!==this.materials)if(W=this.materials.create(Y.name),!j||!W||W instanceof THREE.LineBasicMaterial){if(B&&W&&!(W instanceof THREE.PointsMaterial)){var q=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});THREE.Material.prototype.copy.call(q,W),q.color.copy(W.color),q.map=W.map,W=q}}else{var X=new THREE.LineBasicMaterial;THREE.Material.prototype.copy.call(X,W),X.color.copy(W.color),W=X}void 0===W&&((W=j?new THREE.LineBasicMaterial:B?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=Y.name,W.flatShading=!Y.smooth,W.vertexColors=F,o.materials[G]=W),H.push(W)}if(H.length>1){for(U=0,V=N.length;U<V;U++){var Y=N[U];K.addGroup(Y.groupStart,Y.groupCount,U)}z=j?new THREE.LineSegments(K,H):B?new THREE.Points(K,H):new THREE.Mesh(K,H)}else z=j?new THREE.LineSegments(K,H[0]):B?new THREE.Points(K,H[0]):new THREE.Mesh(K,H[0]);z.name=D.name,L.add(z)}}else if(o.vertices.length>0){var K;W=new THREE.PointsMaterial({size:1,sizeAttenuation:!1}),(K=new THREE.BufferGeometry).setAttribute("position",new THREE.Float32BufferAttribute(o.vertices,3)),o.colors.length>0&&void 0!==o.colors[0]&&(K.setAttribute("color",new THREE.Float32BufferAttribute(o.colors,3)),W.vertexColors=!0);var Q=new THREE.Points(K,W);L.add(Q)}return L}}),h}()},{}],62:[function(e,t,n){THREE.BufferGeometryUtils={computeTangents:function(e){e.computeTangents(),console.warn("THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.")},mergeBufferGeometries:function(e,t){for(var n=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),i=new Set(Object.keys(e[0].morphAttributes)),o={},a={},s=e[0].morphTargetsRelative,l=new THREE.BufferGeometry,c=0,u=0;u<e.length;++u){var h=e[u],d=0;if(n!==(null!==h.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(var f in h.attributes){if(!r.has(f))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+'. All geometries must have compatible attributes; make sure "'+f+'" attribute exists among all geometries, or in none of them.'),null;void 0===o[f]&&(o[f]=[]),o[f].push(h.attributes[f]),d++}if(d!==r.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". Make sure all geometries have the same number of attributes."),null;if(s!==h.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(var f in h.morphAttributes){if(!i.has(f))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". .morphAttributes must be consistent throughout all geometries."),null;void 0===a[f]&&(a[f]=[]),a[f].push(h.morphAttributes[f])}if(l.userData.mergedUserData=l.userData.mergedUserData||[],l.userData.mergedUserData.push(h.userData),t){var p;if(n)p=h.index.count;else{if(void 0===h.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". The geometry must have either an index or a position attribute"),null;p=h.attributes.position.count}l.addGroup(c,p,u),c+=p}}if(n){var m=0,g=[];for(u=0;u<e.length;++u){for(var v=e[u].index,y=0;y<v.count;++y)g.push(v.getX(y)+m);m+=e[u].attributes.position.count}l.setIndex(g)}for(var f in o){var b=this.mergeBufferAttributes(o[f]);if(!b)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+f+" attribute."),null;l.setAttribute(f,b)}for(var f in a){var w=a[f][0].length;if(0===w)break;for(l.morphAttributes=l.morphAttributes||{},l.morphAttributes[f]=[],u=0;u<w;++u){var x=[];for(y=0;y<a[f].length;++y)x.push(a[f][y][u]);var _=this.mergeBufferAttributes(x);if(!_)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+f+" morphAttribute."),null;l.morphAttributes[f].push(_)}}return l},mergeBufferAttributes:function(e){for(var t,n,r,i=0,o=0;o<e.length;++o){var a=e[o];if(a.isInterleavedBufferAttribute)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported."),null;if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;i+=a.array.length}var s=new t(i),l=0;for(o=0;o<e.length;++o)s.set(e[o].array,l),l+=e[o].array.length;return new THREE.BufferAttribute(s,n,r)},interleaveAttributes:function(e){for(var t,n=0,r=0,i=0,o=e.length;i<o;++i){var a=e[i];if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return console.error("AttributeBuffers of different types cannot be interleaved"),null;n+=a.array.length,r+=a.itemSize}var s=new THREE.InterleavedBuffer(new t(n),r),l=0,c=[],u=["getX","getY","getZ","getW"],h=["setX","setY","setZ","setW"],d=0;for(o=e.length;d<o;d++){var f=(a=e[d]).itemSize,p=a.count,m=new THREE.InterleavedBufferAttribute(s,f,l,a.normalized);c.push(m),l+=f;for(var g=0;g<p;g++)for(var v=0;v<f;v++)m[h[v]](g,a[u[v]](g))}return c},estimateBytesUsed:function(e){var t=0;for(var n in e.attributes){var r=e.getAttribute(n);t+=r.count*r.itemSize*r.array.BYTES_PER_ELEMENT}var i=e.getIndex();return t+=i?i.count*i.itemSize*i.array.BYTES_PER_ELEMENT:0},mergeVertices:function(e,t=1e-4){t=Math.max(t,Number.EPSILON);for(var n={},r=e.getIndex(),i=e.getAttribute("position"),o=r?r.count:i.count,a=0,s=Object.keys(e.attributes),l={},c={},u=[],h=["getX","getY","getZ","getW"],d=0,f=s.length;d<f;d++)l[b=s[d]]=[],(E=e.morphAttributes[b])&&(c[b]=new Array(E.length).fill().map(()=>[]));var p=Math.log10(1/t),m=Math.pow(10,p);for(d=0;d<o;d++){var g=r?r.getX(d):d,v="",y=0;for(f=s.length;y<f;y++)for(var b=s[y],w=(_=e.getAttribute(b)).itemSize,x=0;x<w;x++)v+=~~(_[h[x]](g)*m)+",";if(v in n)u.push(n[v]);else{for(y=0,f=s.length;y<f;y++){b=s[y];var _=e.getAttribute(b),E=e.morphAttributes[b],A=(w=_.itemSize,l[b]),S=c[b];for(x=0;x<w;x++){var M=h[x];if(A.push(_[M](g)),E)for(var T=0,C=E.length;T<C;T++)S[T].push(E[T][M](g))}}n[v]=a,u.push(a),a++}}const O=e.clone();for(d=0,f=s.length;d<f;d++){b=s[d];var R=e.getAttribute(b),k=new R.array.constructor(l[b]);if(_=new THREE.BufferAttribute(k,R.itemSize,R.normalized),O.setAttribute(b,_),b in c)for(y=0;y<c[b].length;y++){var P=e.morphAttributes[b][y],L=(k=new P.array.constructor(c[b][y]),new THREE.BufferAttribute(k,P.itemSize,P.normalized));O.morphAttributes[b][y]=L}}return O.setIndex(u),O},toTrianglesDrawMode:function(e,t){if(t===THREE.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===THREE.TriangleFanDrawMode||t===THREE.TriangleStripDrawMode){var n=e.getIndex();if(null===n){var r=[],i=e.getAttribute("position");if(void 0===i)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(var o=0;o<i.count;o++)r.push(o);e.setIndex(r),n=e.getIndex()}var a=n.count-2,s=[];if(t===THREE.TriangleFanDrawMode)for(o=1;o<=a;o++)s.push(n.getX(0)),s.push(n.getX(o)),s.push(n.getX(o+1));else for(o=0;o<a;o++)o%2===0?(s.push(n.getX(o)),s.push(n.getX(o+1)),s.push(n.getX(o+2))):(s.push(n.getX(o+2)),s.push(n.getX(o+1)),s.push(n.getX(o)));s.length/3!==a&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var l=e.clone();return l.setIndex(s),l.clearGroups(),l}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e},computeMorphedAttributes:function(e){if(!0!==e.geometry.isBufferGeometry)return console.error("THREE.BufferGeometryUtils: Geometry is not of type THREE.BufferGeometry."),null;var t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3,i=new THREE.Vector3,o=new THREE.Vector3,a=new THREE.Vector3,s=new THREE.Vector3,l=new THREE.Vector3,c=new THREE.Vector3;function u(e,u,h,d,f,p,m,g,v){t.fromBufferAttribute(h,p),n.fromBufferAttribute(h,m),r.fromBufferAttribute(h,g);var y=e.morphTargetInfluences;if(u.morphTargets&&d&&y){s.set(0,0,0),l.set(0,0,0),c.set(0,0,0);for(var b=0,w=d.length;b<w;b++){var x=y[b];d=d[b],0!==x&&(i.fromBufferAttribute(d,p),o.fromBufferAttribute(d,m),a.fromBufferAttribute(d,g),f?(s.addScaledVector(i,x),l.addScaledVector(o,x),c.addScaledVector(a,x)):(s.addScaledVector(i.sub(t),x),l.addScaledVector(o.sub(n),x),c.addScaledVector(a.sub(r),x)))}t.add(s),n.add(l),r.add(c)}e.isSkinnedMesh&&(e.boneTransform(p,t),e.boneTransform(m,n),e.boneTransform(g,r)),v[3*p+0]=t.x,v[3*p+1]=t.y,v[3*p+2]=t.z,v[3*m+0]=n.x,v[3*m+1]=n.y,v[3*m+2]=n.z,v[3*g+0]=r.x,v[3*g+1]=r.y,v[3*g+2]=r.z}var h,d,f,p,m,g,v,y,b,w=e.geometry,x=e.material,_=w.index,E=w.attributes.position,A=w.morphAttributes.position,S=w.morphTargetsRelative,M=w.attributes.normal,T=w.morphAttributes.position,C=w.groups,O=w.drawRange,R=new Float32Array(E.count*E.itemSize),k=new Float32Array(M.count*M.itemSize);if(null!==_)if(Array.isArray(x))for(p=0,g=C.length;p<g;p++)for(b=x[(y=C[p]).materialIndex],m=Math.max(y.start,O.start),v=Math.min(y.start+y.count,O.start+O.count);m<v;m+=3)u(e,b,E,A,S,h=_.getX(m),d=_.getX(m+1),f=_.getX(m+2),R),u(e,b,M,T,S,h,d,f,k);else for(p=Math.max(0,O.start),g=Math.min(_.count,O.start+O.count);p<g;p+=3)u(e,x,E,A,S,h=_.getX(p),d=_.getX(p+1),f=_.getX(p+2),R),u(e,x,M,T,S,h,d,f,k);else if(void 0!==E)if(Array.isArray(x))for(p=0,g=C.length;p<g;p++)for(b=x[(y=C[p]).materialIndex],m=Math.max(y.start,O.start),v=Math.min(y.start+y.count,O.start+O.count);m<v;m+=3)u(e,b,E,A,S,h=m,d=m+1,f=m+2,R),u(e,b,M,T,S,h,d,f,k);else for(p=Math.max(0,O.start),g=Math.min(E.count,O.start+O.count);p<g;p+=3)u(e,x,E,A,S,h=p,d=p+1,f=p+2,R),u(e,x,M,T,S,h,d,f,k);return{positionAttribute:E,normalAttribute:M,morphedPositionAttribute:new THREE.Float32BufferAttribute(R,3),morphedNormalAttribute:new THREE.Float32BufferAttribute(k,3)}}}},{}],63:[function(e,t,n){var r=e("layout-bmfont-text"),i=e("inherits"),o=e("quad-indices"),a=e("three-buffer-vertex-data"),s=e("object-assign"),l=e("./lib/vertices"),c=e("./lib/utils"),u=THREE.BufferGeometry;function h(e){u.call(this),"string"===typeof e&&(e={text:e}),this._opt=s({},e),e&&this.update(e)}t.exports=function(e){return new h(e)},i(h,u),h.prototype.update=function(e){if("string"===typeof e&&(e={text:e}),!(e=s({},this._opt,e)).font)throw new TypeError("must specify a { font } in options");this.layout=r(e);var t=!1!==e.flipY,n=e.font,i=n.common.scaleW,c=n.common.scaleH,u=this.layout.glyphs.filter((function(e){var t=e.data;return t.width*t.height>0}));this.visibleGlyphs=u;var h=l.positions(u),d=l.uvs(u,i,c,t),f=o({clockwise:!0,type:"uint16",count:u.length});if(a.index(this,f,1,"uint16"),a.attr(this,"position",h,2),a.attr(this,"uv",d,2),!e.multipage&&"page"in this.attributes)this.removeAttribute("page");else if(e.multipage){var p=l.pages(u);a.attr(this,"page",p,1)}},h.prototype.computeBoundingSphere=function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var e=this.attributes.position.array,t=this.attributes.position.itemSize;if(!e||!t||e.length<2)return this.boundingSphere.radius=0,void this.boundingSphere.center.set(0,0,0);c.computeSphere(e,this.boundingSphere),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.')},h.prototype.computeBoundingBox=function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var e=this.boundingBox,t=this.attributes.position.array,n=this.attributes.position.itemSize;!t||!n||t.length<2?e.makeEmpty():c.computeBox(t,e)}},{"./lib/utils":64,"./lib/vertices":65,inherits:30,"layout-bmfont-text":36,"object-assign":39,"quad-indices":51,"three-buffer-vertex-data":66}],64:[function(e,t,n){var r={min:[0,0],max:[0,0]};function i(e){var t=e.length/2;r.min[0]=e[0],r.min[1]=e[1],r.max[0]=e[0],r.max[1]=e[1];for(var n=0;n<t;n++){var i=e[2*n+0],o=e[2*n+1];r.min[0]=Math.min(i,r.min[0]),r.min[1]=Math.min(o,r.min[1]),r.max[0]=Math.max(i,r.max[0]),r.max[1]=Math.max(o,r.max[1])}}t.exports.computeBox=function(e,t){i(e),t.min.set(r.min[0],r.min[1],0),t.max.set(r.max[0],r.max[1],0)},t.exports.computeSphere=function(e,t){i(e);var n=r.min[0],o=r.min[1],a=r.max[0]-n,s=r.max[1]-o,l=Math.sqrt(a*a+s*s);t.center.set(n+a/2,o+s/2,0),t.radius=l/2}},{}],65:[function(e,t,n){t.exports.pages=function(e){var t=new Float32Array(4*e.length*1),n=0;return e.forEach((function(e){var r=e.data.page||0;t[n++]=r,t[n++]=r,t[n++]=r,t[n++]=r})),t},t.exports.uvs=function(e,t,n,r){var i=new Float32Array(4*e.length*2),o=0;return e.forEach((function(e){var a=e.data,s=a.x+a.width,l=a.y+a.height,c=a.x/t,u=a.y/n,h=s/t,d=l/n;r&&(u=(n-a.y)/n,d=(n-l)/n),i[o++]=c,i[o++]=u,i[o++]=c,i[o++]=d,i[o++]=h,i[o++]=d,i[o++]=h,i[o++]=u})),i},t.exports.positions=function(e){var t=new Float32Array(4*e.length*2),n=0;return e.forEach((function(e){var r=e.data,i=e.position[0]+r.xoffset,o=e.position[1]+r.yoffset,a=r.width,s=r.height;t[n++]=i,t[n++]=o,t[n++]=i,t[n++]=o+s,t[n++]=i+a,t[n++]=o+s,t[n++]=i+a,t[n++]=o})),t}},{}],66:[function(e,t,n){var r=e("flatten-vertex-data");function i(e,t,n,i){return t=r(t=t||[],i),(e=new THREE.BufferAttribute(t,n)).itemSize=n,e.needsUpdate=!0,e}t.exports.attr=function(e,t,n,r,o){if("number"!==typeof r&&(r=3),"string"!==typeof o&&(o="float32"),Array.isArray(n)&&Array.isArray(n[0])&&n[0].length!==r)throw new Error("Nested vertex array has unexpected size; expected "+r+" but found "+n[0].length);var a=i(e.getAttribute(t),n,r,o);e.setAttribute(t,a)},t.exports.index=function(e,t,n,r){"number"!==typeof n&&(n=1),"string"!==typeof r&&(r="uint16");var o=!e.index&&"function"!==typeof e.setIndex,a=i(o?e.getAttribute("index"):e.index,t,n,r);a&&(o?e.addAttribute("index",a):e.index=a)}},{"flatten-vertex-data":23}],67:[function(e,t,n){(function(t,r){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"===typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"===typeof r?r:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":49,timers:67}],68:[function(e,t,r){(function(e){!function(e,n){"object"===typeof r&&"undefined"!==typeof t?t.exports=n():e.WebVRPolyfill=n()}(this,(function(){"use strict";var t,n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},r=function(){return/Android/i.test(navigator.userAgent)||/iPhone|iPad|iPod/i.test(navigator.userAgent)},i=function(e,t){for(var n=0,r=e.length;n<r;n++)t[n]=e[n]},o=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},a=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function(){var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(e,t,n){return e+(t-e)*n},i=function(){var e=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return e}}(),o=function(){var e=-1!==navigator.userAgent.indexOf("Version")&&-1!==navigator.userAgent.indexOf("Android")&&-1!==navigator.userAgent.indexOf("Chrome");return function(){return e}}(),a=function(){var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return e}}(),s=function(){var e=-1!==navigator.userAgent.indexOf("Firefox")&&-1!==navigator.userAgent.indexOf("Android");return function(){return e}}(),l=function(){var e=navigator.userAgent.match(/.*Chrome\/([0-9]+)/),t=e?parseInt(e[1],10):null;return function(){return t}}(),c=function(){var e;return e=i()&&a()&&-1!==navigator.userAgent.indexOf("13_4"),function(){return e}}(),u=function(){var e=!1;if(65===l()){var n=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(n){var r=n[1].split("."),i=t(r,4),o=(i[0],i[1],i[2]),a=i[3];e=3325===parseInt(o,10)&&parseInt(a,10)<148}}return function(){return e}}(),h=function(){var e=-1!==navigator.userAgent.indexOf("R7 Build");return function(){return e}}(),d=function(){var e=90==window.orientation||-90==window.orientation;return h()?!e:e},f=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},p=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},m=function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},g=function(e,t,n,r){var i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t),e.compileShader(i);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,n),e.compileShader(o);var a=e.createProgram();for(var s in e.attachShader(a,i),e.attachShader(a,o),r)e.bindAttribLocation(a,r[s],s);return e.linkProgram(a),e.deleteShader(i),e.deleteShader(o),a},v=function(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i="",o=0;o<r;o++)n[i=e.getActiveUniform(t,o).name.replace("[0]","")]=e.getUniformLocation(t,i);return n},y=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t},b=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},w=function(e){if(i()){var t=e.style.width,n=e.style.height;e.style.width=parseInt(t)+1+"px",e.style.height=parseInt(n)+"px",setTimeout((function(){e.style.width=t,e.style.height=n}),100)}window.canvas=e},x=function(){var e=Math.PI/180,t=.25*Math.PI,n=new Float32Array([0,0,0,1]),r=new Float32Array([0,0,0]);function i(i,o,a,s,l,c){!function(n,r,i,o){var a=Math.tan(r?r.upDegrees*e:t),s=Math.tan(r?r.downDegrees*e:t),l=Math.tan(r?r.leftDegrees*e:t),c=Math.tan(r?r.rightDegrees*e:t),u=2/(l+c),h=2/(a+s);n[0]=u,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=h,n[6]=0,n[7]=0,n[8]=-(l-c)*u*.5,n[9]=(a-s)*h*.5,n[10]=o/(i-o),n[11]=-1,n[12]=0,n[13]=0,n[14]=o*i/(i-o),n[15]=0}(i,s||null,c.depthNear,c.depthFar),function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=r+r,l=i+i,c=o+o,u=r*s,h=r*l,d=r*c,f=i*l,p=i*c,m=o*c,g=a*s,v=a*l,y=a*c;e[0]=1-(f+m),e[1]=h+y,e[2]=d-v,e[3]=0,e[4]=h-y,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=d+v,e[9]=p-g,e[10]=1-(u+f),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1}(o,a.orientation||n,a.position||r),l&&function(e,t,n){var r,i,o,a,s,l,c,u,h,d,f,p,m=n[0],g=n[1],v=n[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=r*m+s*g+h*v+t[12],e[13]=i*m+l*g+d*v+t[13],e[14]=o*m+c*g+f*v+t[14],e[15]=a*m+u*g+p*v+t[15])}(o,o,l),function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,w=n*c-o*a,x=r*l-i*s,_=r*c-o*s,E=i*c-o*l,A=u*m-h*p,S=u*g-d*p,M=u*v-f*p,T=h*g-d*m,C=h*v-f*m,O=d*v-f*g,R=y*O-b*C+w*T+x*M-_*S+E*A;R&&(R=1/R,e[0]=(s*O-l*C+c*T)*R,e[1]=(i*C-r*O-o*T)*R,e[2]=(m*E-g*_+v*x)*R,e[3]=(d*_-h*E-f*x)*R,e[4]=(l*M-a*O-c*S)*R,e[5]=(n*O-i*M+o*S)*R,e[6]=(g*w-p*E-v*b)*R,e[7]=(u*E-d*w+f*b)*R,e[8]=(a*C-s*M+c*A)*R,e[9]=(r*M-n*C-o*A)*R,e[10]=(p*_-m*w+v*y)*R,e[11]=(h*w-u*_-f*y)*R,e[12]=(s*S-a*T-l*A)*R,e[13]=(n*T-r*S+i*A)*R,e[14]=(m*b-p*x-g*y)*R,e[15]=(u*x-h*b+d*y)*R)}(o,o)}return function(e,t,n){return!(!e||!t)&&(e.pose=t,e.timestamp=t.timestamp,i(e.leftProjectionMatrix,e.leftViewMatrix,t,n._getFieldOfView("left"),n._getEyeOffset("left"),n),i(e.rightProjectionMatrix,e.rightViewMatrix,t,n._getFieldOfView("right"),n._getEyeOffset("right"),n),!0)}}(),_=function(e){var t,n=e.indexOf("://");t=-1!==n?n+3:0;var r=e.indexOf("/",t);return-1===r&&(r=e.length),e.substring(0,r)},E=function(){var e={};return function(t,n){void 0===e[t]&&(console.warn("webvr-polyfill: "+n),e[t]=!0)}}(),A=function(e,t){E(e,e+" has been deprecated. This may not work on native WebVR displays. "+(t?"Please use "+t+" instead.":""))},S=function(e,t,n){if(t){for(var r=[],i=null,o=0;o<t.length;++o)switch(a=t[o]){case e.TEXTURE_BINDING_2D:case e.TEXTURE_BINDING_CUBE_MAP:if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31){console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit"),r.push(null,null);break}i||(i=e.getParameter(e.ACTIVE_TEXTURE)),e.activeTexture(l),r.push(e.getParameter(a),null);break;case e.ACTIVE_TEXTURE:i=e.getParameter(e.ACTIVE_TEXTURE),r.push(null);break;default:r.push(e.getParameter(a))}for(n(e),o=0;o<t.length;++o){var a=t[o],s=r[o];switch(a){case e.ACTIVE_TEXTURE:break;case e.ARRAY_BUFFER_BINDING:e.bindBuffer(e.ARRAY_BUFFER,s);break;case e.COLOR_CLEAR_VALUE:e.clearColor(s[0],s[1],s[2],s[3]);break;case e.COLOR_WRITEMASK:e.colorMask(s[0],s[1],s[2],s[3]);break;case e.CURRENT_PROGRAM:e.useProgram(s);break;case e.ELEMENT_ARRAY_BUFFER_BINDING:e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,s);break;case e.FRAMEBUFFER_BINDING:e.bindFramebuffer(e.FRAMEBUFFER,s);break;case e.RENDERBUFFER_BINDING:e.bindRenderbuffer(e.RENDERBUFFER,s);break;case e.TEXTURE_BINDING_2D:if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31)break;e.activeTexture(l),e.bindTexture(e.TEXTURE_2D,s);break;case e.TEXTURE_BINDING_CUBE_MAP:var l;if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31)break;e.activeTexture(l),e.bindTexture(e.TEXTURE_CUBE_MAP,s);break;case e.VIEWPORT:e.viewport(s[0],s[1],s[2],s[3]);break;case e.BLEND:case e.CULL_FACE:case e.DEPTH_TEST:case e.SCISSOR_TEST:case e.STENCIL_TEST:s?e.enable(a):e.disable(a);break;default:console.log("No GL restore behavior for 0x"+a.toString(16))}i&&e.activeTexture(i)}}else n(e)},M=["attribute vec2 position;","attribute vec3 texCoord;","varying vec2 vTexCoord;","uniform vec4 viewportOffsetScale[2];","void main() {"," vec4 viewport = viewportOffsetScale[int(texCoord.z)];"," vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;"," gl_Position = vec4( position, 1.0, 1.0 );","}"].join("\n"),T=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {"," gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");function C(e,t,n,r){this.gl=e,this.cardboardUI=t,this.bufferScale=n,this.dirtySubmitFrameBindings=r,this.ctxAttribs=e.getContextAttributes(),this.instanceExt=e.getExtension("ANGLE_instanced_arrays"),this.meshWidth=20,this.meshHeight=20,this.bufferWidth=e.drawingBufferWidth,this.bufferHeight=e.drawingBufferHeight,this.realBindFramebuffer=e.bindFramebuffer,this.realEnable=e.enable,this.realDisable=e.disable,this.realColorMask=e.colorMask,this.realClearColor=e.clearColor,this.realViewport=e.viewport,i()||(this.realCanvasWidth=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"width"),this.realCanvasHeight=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"height")),this.isPatched=!1,this.lastBoundFramebuffer=null,this.cullFace=!1,this.depthTest=!1,this.blend=!1,this.scissorTest=!1,this.stencilTest=!1,this.viewport=[0,0,0,0],this.colorMask=[!0,!0,!0,!0],this.clearColor=[0,0,0,0],this.attribs={position:0,texCoord:1},this.program=g(e,M,T,this.attribs),this.uniforms=v(e,this.program),this.viewportOffsetScale=new Float32Array(8),this.setTextureBounds(),this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.indexCount=0,this.renderTarget=e.createTexture(),this.framebuffer=e.createFramebuffer(),this.depthStencilBuffer=null,this.depthBuffer=null,this.stencilBuffer=null,this.ctxAttribs.depth&&this.ctxAttribs.stencil?this.depthStencilBuffer=e.createRenderbuffer():this.ctxAttribs.depth?this.depthBuffer=e.createRenderbuffer():this.ctxAttribs.stencil&&(this.stencilBuffer=e.createRenderbuffer()),this.patch(),this.onResize()}C.prototype.destroy=function(){var e=this.gl;this.unpatch(),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.indexBuffer),e.deleteTexture(this.renderTarget),e.deleteFramebuffer(this.framebuffer),this.depthStencilBuffer&&e.deleteRenderbuffer(this.depthStencilBuffer),this.depthBuffer&&e.deleteRenderbuffer(this.depthBuffer),this.stencilBuffer&&e.deleteRenderbuffer(this.stencilBuffer),this.cardboardUI&&this.cardboardUI.destroy()},C.prototype.onResize=function(){var e=this.gl,t=this,n=[e.RENDERBUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0];S(e,n,(function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.framebuffer),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.texImage2D(e.TEXTURE_2D,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,t.bufferWidth,t.bufferHeight,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.renderTarget,0),t.ctxAttribs.depth&&t.ctxAttribs.stencil?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t.depthStencilBuffer)):t.ctxAttribs.depth?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.depthBuffer)):t.ctxAttribs.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,t.stencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.STENCIL_INDEX8,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,t.stencilBuffer)),!e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer incomplete!"),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),t.realClearColor.apply(e,t.clearColor)})),this.cardboardUI&&this.cardboardUI.onResize()},C.prototype.patch=function(){if(!this.isPatched){var e=this,t=this.gl.canvas,n=this.gl;i()||(t.width=f()*this.bufferScale,t.height=p()*this.bufferScale,Object.defineProperty(t,"width",{configurable:!0,enumerable:!0,get:function(){return e.bufferWidth},set:function(n){e.bufferWidth=n,e.realCanvasWidth.set.call(t,n),e.onResize()}}),Object.defineProperty(t,"height",{configurable:!0,enumerable:!0,get:function(){return e.bufferHeight},set:function(n){e.bufferHeight=n,e.realCanvasHeight.set.call(t,n),e.onResize()}})),this.lastBoundFramebuffer=n.getParameter(n.FRAMEBUFFER_BINDING),null==this.lastBoundFramebuffer&&(this.lastBoundFramebuffer=this.framebuffer,this.gl.bindFramebuffer(n.FRAMEBUFFER,this.framebuffer)),this.gl.bindFramebuffer=function(t,r){e.lastBoundFramebuffer=r||e.framebuffer,e.realBindFramebuffer.call(n,t,e.lastBoundFramebuffer)},this.cullFace=n.getParameter(n.CULL_FACE),this.depthTest=n.getParameter(n.DEPTH_TEST),this.blend=n.getParameter(n.BLEND),this.scissorTest=n.getParameter(n.SCISSOR_TEST),this.stencilTest=n.getParameter(n.STENCIL_TEST),n.enable=function(t){switch(t){case n.CULL_FACE:e.cullFace=!0;break;case n.DEPTH_TEST:e.depthTest=!0;break;case n.BLEND:e.blend=!0;break;case n.SCISSOR_TEST:e.scissorTest=!0;break;case n.STENCIL_TEST:e.stencilTest=!0}e.realEnable.call(n,t)},n.disable=function(t){switch(t){case n.CULL_FACE:e.cullFace=!1;break;case n.DEPTH_TEST:e.depthTest=!1;break;case n.BLEND:e.blend=!1;break;case n.SCISSOR_TEST:e.scissorTest=!1;break;case n.STENCIL_TEST:e.stencilTest=!1}e.realDisable.call(n,t)},this.colorMask=n.getParameter(n.COLOR_WRITEMASK),n.colorMask=function(t,r,i,o){e.colorMask[0]=t,e.colorMask[1]=r,e.colorMask[2]=i,e.colorMask[3]=o,e.realColorMask.call(n,t,r,i,o)},this.clearColor=n.getParameter(n.COLOR_CLEAR_VALUE),n.clearColor=function(t,r,i,o){e.clearColor[0]=t,e.clearColor[1]=r,e.clearColor[2]=i,e.clearColor[3]=o,e.realClearColor.call(n,t,r,i,o)},this.viewport=n.getParameter(n.VIEWPORT),n.viewport=function(t,r,i,o){e.viewport[0]=t,e.viewport[1]=r,e.viewport[2]=i,e.viewport[3]=o,e.realViewport.call(n,t,r,i,o)},this.isPatched=!0,w(t)}},C.prototype.unpatch=function(){if(this.isPatched){var e=this.gl,t=this.gl.canvas;i()||(Object.defineProperty(t,"width",this.realCanvasWidth),Object.defineProperty(t,"height",this.realCanvasHeight)),t.width=this.bufferWidth,t.height=this.bufferHeight,e.bindFramebuffer=this.realBindFramebuffer,e.enable=this.realEnable,e.disable=this.realDisable,e.colorMask=this.realColorMask,e.clearColor=this.realClearColor,e.viewport=this.realViewport,this.lastBoundFramebuffer==this.framebuffer&&e.bindFramebuffer(e.FRAMEBUFFER,null),this.isPatched=!1,setTimeout((function(){w(t)}),1)}},C.prototype.setTextureBounds=function(e,t){e||(e=[0,0,.5,1]),t||(t=[.5,0,.5,1]),this.viewportOffsetScale[0]=e[0],this.viewportOffsetScale[1]=e[1],this.viewportOffsetScale[2]=e[2],this.viewportOffsetScale[3]=e[3],this.viewportOffsetScale[4]=t[0],this.viewportOffsetScale[5]=t[1],this.viewportOffsetScale[6]=t[2],this.viewportOffsetScale[7]=t[3]},C.prototype.submitFrame=function(){var e=this.gl,t=this,n=[];if(this.dirtySubmitFrameBindings||n.push(e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0),S(e,n,(function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null);var n=0,r=0;t.instanceExt&&(n=e.getVertexAttrib(t.attribs.position,t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),r=e.getVertexAttrib(t.attribs.texCoord,t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE)),t.cullFace&&t.realDisable.call(e,e.CULL_FACE),t.depthTest&&t.realDisable.call(e,e.DEPTH_TEST),t.blend&&t.realDisable.call(e,e.BLEND),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realDisable.call(e,e.STENCIL_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),(t.ctxAttribs.alpha||i())&&(t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)),e.useProgram(t.program),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexBuffer),e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.enableVertexAttribArray(t.attribs.position),e.enableVertexAttribArray(t.attribs.texCoord),e.vertexAttribPointer(t.attribs.position,2,e.FLOAT,!1,20,0),e.vertexAttribPointer(t.attribs.texCoord,3,e.FLOAT,!1,20,8),t.instanceExt&&(0!=n&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.position,0),0!=r&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.texCoord,0)),e.activeTexture(e.TEXTURE0),e.uniform1i(t.uniforms.diffuse,0),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.uniform4fv(t.uniforms.viewportOffsetScale,t.viewportOffsetScale),e.drawElements(e.TRIANGLES,t.indexCount,e.UNSIGNED_SHORT,0),t.cardboardUI&&t.cardboardUI.renderNoState(),t.realBindFramebuffer.call(t.gl,e.FRAMEBUFFER,t.framebuffer),t.ctxAttribs.preserveDrawingBuffer||(t.realClearColor.call(e,0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),t.dirtySubmitFrameBindings||t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.cullFace&&t.realEnable.call(e,e.CULL_FACE),t.depthTest&&t.realEnable.call(e,e.DEPTH_TEST),t.blend&&t.realEnable.call(e,e.BLEND),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realEnable.call(e,e.STENCIL_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),!t.ctxAttribs.alpha&&t.ctxAttribs.preserveDrawingBuffer||t.realClearColor.apply(e,t.clearColor),t.instanceExt&&(0!=n&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.position,n),0!=r&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.texCoord,r))})),i()){var r=e.canvas;r.width==t.bufferWidth&&r.height==t.bufferHeight||(t.bufferWidth=r.width,t.bufferHeight=r.height,t.onResize())}},C.prototype.updateDeviceInfo=function(e){var t=this.gl,n=this,r=[t.ARRAY_BUFFER_BINDING,t.ELEMENT_ARRAY_BUFFER_BINDING];S(t,r,(function(t){var r=n.computeMeshVertices_(n.meshWidth,n.meshHeight,e);if(t.bindBuffer(t.ARRAY_BUFFER,n.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,r,t.STATIC_DRAW),!n.indexCount){var i=n.computeMeshIndices_(n.meshWidth,n.meshHeight);t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,i,t.STATIC_DRAW),n.indexCount=i.length}}))},C.prototype.computeMeshVertices_=function(e,t,n){for(var i=new Float32Array(2*e*t*5),o=n.getLeftEyeVisibleTanAngles(),a=n.getLeftEyeNoLensTanAngles(),s=n.getLeftEyeVisibleScreenRect(a),l=0,c=0;c<2;c++){for(var u=0;u<t;u++)for(var h=0;h<e;h++,l++){var d=h/(e-1),f=u/(t-1),p=d,m=f,g=r(o[0],o[2],d),v=r(o[3],o[1],f),y=Math.sqrt(g*g+v*v),b=n.distortion.distortInverse(y),w=v*b/y;d=(g*b/y-a[0])/(a[2]-a[0]),f=(w-a[3])/(a[1]-a[3]),d=2*(s.x+d*s.width-.5),f=2*(s.y+f*s.height-.5),i[5*l+0]=d,i[5*l+1]=f,i[5*l+2]=p,i[5*l+3]=m,i[5*l+4]=c}var x=o[2]-o[0];o[0]=-(x+o[0]),o[2]=x-o[2],x=a[2]-a[0],a[0]=-(x+a[0]),a[2]=x-a[2],s.x=1-(s.x+s.width)}return i},C.prototype.computeMeshIndices_=function(e,t){for(var n=new Uint16Array(2*(e-1)*(t-1)*6),r=e/2,i=t/2,o=0,a=0,s=0;s<2;s++)for(var l=0;l<t;l++)for(var c=0;c<e;c++,o++)0!=c&&0!=l&&(c<=r==l<=i?(n[a++]=o,n[a++]=o-e-1,n[a++]=o-e,n[a++]=o-e-1,n[a++]=o,n[a++]=o-1):(n[a++]=o-1,n[a++]=o-e,n[a++]=o,n[a++]=o-e,n[a++]=o-1,n[a++]=o-e-1));return n},C.prototype.getOwnPropertyDescriptor_=function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return void 0!==n.get&&void 0!==n.set||(n.configurable=!0,n.enumerable=!0,n.get=function(){return this.getAttribute(t)},n.set=function(e){this.setAttribute(t,e)}),n};var O=["attribute vec2 position;","uniform mat4 projectionMat;","void main() {"," gl_Position = projectionMat * vec4( position, -1.0, 1.0 );","}"].join("\n"),R=["precision mediump float;","uniform vec4 color;","void main() {"," gl_FragColor = color;","}"].join("\n"),k=Math.PI/180;function P(e){this.gl=e,this.attribs={position:0},this.program=g(e,O,R,this.attribs),this.uniforms=v(e,this.program),this.vertexBuffer=e.createBuffer(),this.gearOffset=0,this.gearVertexCount=0,this.arrowOffset=0,this.arrowVertexCount=0,this.projMat=new Float32Array(16),this.listener=null,this.onResize()}function L(e){this.coefficients=e}P.prototype.destroy=function(){var e=this.gl;this.listener&&e.canvas.removeEventListener("click",this.listener,!1),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer)},P.prototype.listen=function(e,t){var n=this.gl.canvas;this.listener=function(r){var i=n.clientWidth/2;r.clientX>i-42&&r.clientX<i+42&&r.clientY>n.clientHeight-42?e(r):r.clientX<42&&r.clientY<42&&t(r)},n.addEventListener("click",this.listener,!1)},P.prototype.onResize=function(){var e=this.gl,t=this,n=[e.ARRAY_BUFFER_BINDING];S(e,n,(function(e){var n=[],r=e.drawingBufferWidth/2,i=Math.max(screen.width,screen.height)*window.devicePixelRatio,o=e.drawingBufferWidth/i*window.devicePixelRatio,a=4*o/2,s=42*o,l=28*o/2,c=14*o;function u(e,t){var i=(90-e)*k,o=Math.cos(i),a=Math.sin(i);n.push(.3125*o*l+r,.3125*a*l+l),n.push(t*o*l+r,t*a*l+l)}n.push(r-a,s),n.push(r-a,e.drawingBufferHeight),n.push(r+a,s),n.push(r+a,e.drawingBufferHeight),t.gearOffset=n.length/2;for(var h=0;h<=6;h++){var d=60*h;u(d,1),u(d+12,1),u(d+20,.75),u(d+40,.75),u(d+48,1)}function f(t,r){n.push(c+t,e.drawingBufferHeight-c-r)}t.gearVertexCount=n.length/2-t.gearOffset,t.arrowOffset=n.length/2;var p=a/Math.sin(45*k);f(0,l),f(l,0),f(l+p,p),f(p,l+p),f(p,l-p),f(0,l),f(l,2*l),f(l+p,2*l-p),f(p,l-p),f(0,l),f(p,l-a),f(28*o,l-a),f(p,l+a),f(28*o,l+a),t.arrowVertexCount=n.length/2-t.arrowOffset,e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(n),e.STATIC_DRAW)}))},P.prototype.render=function(){var e=this.gl,t=this,n=[e.CULL_FACE,e.DEPTH_TEST,e.BLEND,e.SCISSOR_TEST,e.STENCIL_TEST,e.COLOR_WRITEMASK,e.VIEWPORT,e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING];S(e,n,(function(e){e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.BLEND),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.colorMask(!0,!0,!0,!0),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.renderNoState()}))},P.prototype.renderNoState=function(){var e=this.gl;e.useProgram(this.program),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.enableVertexAttribArray(this.attribs.position),e.vertexAttribPointer(this.attribs.position,2,e.FLOAT,!1,8,0),e.uniform4f(this.uniforms.color,1,1,1,1),function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),c=1/(o-a);e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*c,e[15]=1}(this.projMat,0,e.drawingBufferWidth,0,e.drawingBufferHeight,.1,1024),e.uniformMatrix4fv(this.uniforms.projectionMat,!1,this.projMat),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.drawArrays(e.TRIANGLE_STRIP,this.gearOffset,this.gearVertexCount),e.drawArrays(e.TRIANGLE_STRIP,this.arrowOffset,this.arrowVertexCount)},L.prototype.distortInverse=function(e){for(var t=0,n=1,r=e-this.distort(t);Math.abs(n-t)>1e-4;){var i=e-this.distort(n),o=n-i*((n-t)/(i-r));t=n,n=o,r=i}return n},L.prototype.distort=function(e){for(var t=e*e,n=0,r=0;r<this.coefficients.length;r++)n=t*(n+this.coefficients[r]);return(n+1)*e};var D=Math.PI/180,I=180/Math.PI,N=function(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0};N.prototype={constructor:N,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var e=this.length();if(0!==e){var t=1/e;this.multiplyScalar(t)}else this.x=0,this.y=0,this.z=0;return this},multiplyScalar:function(e){this.x*=e,this.y*=e,this.z*=e},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this}};var j=function(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1};function B(e){this.width=e.width||f(),this.height=e.height||p(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}j.prototype={constructor:j,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},setFromEulerXYZ:function(e,t,n){var r=Math.cos(e/2),i=Math.cos(t/2),o=Math.cos(n/2),a=Math.sin(e/2),s=Math.sin(t/2),l=Math.sin(n/2);return this.x=a*i*o+r*s*l,this.y=r*s*o-a*i*l,this.z=r*i*l+a*s*o,this.w=r*i*o-a*s*l,this},setFromEulerYXZ:function(e,t,n){var r=Math.cos(e/2),i=Math.cos(t/2),o=Math.cos(n/2),a=Math.sin(e/2),s=Math.sin(t/2),l=Math.sin(n/2);return this.x=a*i*o+r*s*l,this.y=r*s*o-a*i*l,this.z=r*i*l-a*s*o,this.w=r*i*o+a*s*l,this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this.x=e.x*r,this.y=e.y*r,this.z=e.z*r,this.w=Math.cos(n),this},multiply:function(e){return this.multiplyQuaternions(this,e)},multiplyQuaternions:function(e,t){var n=e.x,r=e.y,i=e.z,o=e.w,a=t.x,s=t.y,l=t.z,c=t.w;return this.x=n*c+o*a+r*l-i*s,this.y=r*c+o*s+i*a-n*l,this.z=i*c+o*l+n*s-r*a,this.w=o*c-n*a-r*s-i*l,this},inverse:function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.normalize(),this},normalize:function(){var e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(e=1/e,this.x=this.x*e,this.y=this.y*e,this.z=this.z*e,this.w=this.w*e),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this.x,r=this.y,i=this.z,o=this.w,a=o*e.w+n*e.x+r*e.y+i*e.z;if(a<0?(this.w=-e.w,this.x=-e.x,this.y=-e.y,this.z=-e.z,a=-a):this.copy(e),a>=1)return this.w=o,this.x=n,this.y=r,this.z=i,this;var s=Math.acos(a),l=Math.sqrt(1-a*a);if(Math.abs(l)<.001)return this.w=.5*(o+this.w),this.x=.5*(n+this.x),this.y=.5*(r+this.y),this.z=.5*(i+this.z),this;var c=Math.sin((1-t)*s)/l,u=Math.sin(t*s)/l;return this.w=o*c+this.w*u,this.x=n*c+this.x*u,this.y=r*c+this.y*u,this.z=i*c+this.z*u,this},setFromUnitVectors:function(){var e,t;return function(n,r){return void 0===e&&(e=new N),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this.x=e.x,this.y=e.y,this.z=e.z,this.w=t,this.normalize(),this}}()};var F=new B({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),z=new B({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004}),H={CardboardV1:new V({id:"CardboardV1",label:"Cardboard I/O 2014",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new V({id:"CardboardV2",label:"Cardboard I/O 2015",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};function U(e,t){this.viewer=H.CardboardV2,this.updateDeviceParams(e),this.distortion=new L(this.viewer.distortionCoefficients);for(var n=0;n<t.length;n++){var r=t[n];H[r.id]=new V(r)}}function V(e){this.id=e.id,this.label=e.label,this.fov=e.fov,this.interLensDistance=e.interLensDistance,this.baselineLensDistance=e.baselineLensDistance,this.screenLensDistance=e.screenLensDistance,this.distortionCoefficients=e.distortionCoefficients,this.inverseCoefficients=e.inverseCoefficients}U.prototype.updateDeviceParams=function(e){this.device=this.determineDevice_(e)||this.device},U.prototype.getDevice=function(){return this.device},U.prototype.setViewer=function(e){this.viewer=e,this.distortion=new L(this.viewer.distortionCoefficients)},U.prototype.determineDevice_=function(e){if(!e)return i()?(console.warn("Using fallback iOS device measurements."),z):(console.warn("Using fallback Android device measurements."),F);var t=.0254/e.xdpi,n=.0254/e.ydpi;return new B({widthMeters:t*f(),heightMeters:n*p(),bevelMeters:.001*e.bevelMm})},U.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.viewer,t=this.device,n=this.distortion,r=e.screenLensDistance,i=(t.widthMeters-e.interLensDistance)/2,o=e.interLensDistance/2,a=e.baselineLensDistance-t.bevelMeters,s=t.heightMeters-a,l=I*Math.atan(n.distort(i/r)),c=I*Math.atan(n.distort(o/r)),u=I*Math.atan(n.distort(a/r)),h=I*Math.atan(n.distort(s/r));return{leftDegrees:Math.min(l,e.fov),rightDegrees:Math.min(c,e.fov),downDegrees:Math.min(u,e.fov),upDegrees:Math.min(h,e.fov)}},U.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.viewer,t=this.device,n=this.distortion,r=Math.tan(-D*e.fov),i=Math.tan(D*e.fov),o=Math.tan(D*e.fov),a=Math.tan(-D*e.fov),s=t.widthMeters/4,l=t.heightMeters/2,c=e.baselineLensDistance-t.bevelMeters-l,u=e.interLensDistance/2-s,h=-c,d=e.screenLensDistance,f=n.distort((u-s)/d),p=n.distort((h+l)/d),m=n.distort((u+s)/d),g=n.distort((h-l)/d),v=new Float32Array(4);return v[0]=Math.max(r,f),v[1]=Math.min(i,p),v[2]=Math.min(o,m),v[3]=Math.max(a,g),v},U.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.viewer,t=this.device,n=this.distortion,r=new Float32Array(4),i=n.distortInverse(Math.tan(-D*e.fov)),o=n.distortInverse(Math.tan(D*e.fov)),a=n.distortInverse(Math.tan(D*e.fov)),s=n.distortInverse(Math.tan(-D*e.fov)),l=t.widthMeters/4,c=t.heightMeters/2,u=e.baselineLensDistance-t.bevelMeters-c,h=e.interLensDistance/2-l,d=-u,f=e.screenLensDistance,p=(h-l)/f,m=(d+c)/f,g=(h+l)/f,v=(d-c)/f;return r[0]=Math.max(i,p),r[1]=Math.min(o,m),r[2]=Math.min(a,g),r[3]=Math.max(s,v),r},U.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.viewer,n=this.device,r=t.screenLensDistance,i=(n.widthMeters-t.interLensDistance)/2,o=t.baselineLensDistance-n.bevelMeters,a=(e[0]*r+i)/n.widthMeters,s=(e[1]*r+o)/n.heightMeters,l=(e[2]*r+i)/n.widthMeters,c=(e[3]*r+o)/n.heightMeters;return{x:a,y:c,width:l-a,height:s-c}},U.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},U.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.rightDegrees,rightDegrees:t.leftDegrees,upDegrees:t.upDegrees,downDegrees:t.downDegrees}},U.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:I*Math.atan(e.outerDist),rightDegrees:I*Math.atan(e.innerDist),downDegrees:I*Math.atan(e.bottomDist),upDegrees:I*Math.atan(e.topDist)}},U.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.viewer,n=this.device,r=t.screenLensDistance,i=n.widthMeters/r,o=n.heightMeters/r,a=n.width/i,s=n.height/o,l=Math.round((e.eyePosX-e.outerDist)*a),c=Math.round((e.eyePosY-e.bottomDist)*s);return{x:l,y:c,width:Math.round((e.eyePosX+e.innerDist)*a)-l,height:Math.round((e.eyePosY+e.topDist)*s)-c}},U.prototype.getUndistortedParams_=function(){var e=this.viewer,t=this.device,n=this.distortion,r=e.screenLensDistance,i=e.interLensDistance/2/r,o=t.widthMeters/r,a=t.heightMeters/r,s=o/2-i,l=(e.baselineLensDistance-t.bevelMeters)/r,c=e.fov,u=n.distortInverse(Math.tan(D*c)),h=Math.min(s,u),d=Math.min(i,u),f=Math.min(l,u);return{outerDist:h,innerDist:d,topDist:Math.min(a-l,u),bottomDist:f,eyePosX:s,eyePosY:l}},U.Viewers=H;var G={format:1,last_updated:"2019-11-09T17:36:14Z",devices:[{type:"android",rules:[{mdmh:"asus/*/Nexus 7/*"},{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_X00PD/*"},{ua:"ASUS_X00PD"}],dpi:245,bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_X008D/*"},{ua:"ASUS_X008D"}],dpi:282,bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_Z00AD/*"},{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 2 XL/*"},{ua:"Pixel 2 XL"}],dpi:537.9,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 3 XL/*"},{ua:"Pixel 3 XL"}],dpi:[558.5,553.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel XL/*"},{ua:"Pixel XL"}],dpi:[537.9,533],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 3/*"},{ua:"Pixel 3"}],dpi:442.4,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 2/*"},{ua:"Pixel 2"}],dpi:441,bw:3,ac:500},{type:"android",rules:[{mdmh:"Google/*/Pixel/*"},{ua:"Pixel"}],dpi:[432.6,436.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC6435LVW/*"},{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC One XL/*"},{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"htc/*/Nexus 9/*"},{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One M9/*"},{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One_M8/*"},{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One/*"},{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/Nexus 6P/*"},{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/BLN-L24/*"},{ua:"HONORBLN-L24"}],dpi:480,bw:4,ac:500},{type:"android",rules:[{mdmh:"Huawei/*/BKL-L09/*"},{ua:"BKL-L09"}],dpi:403,bw:3.47,ac:500},{type:"android",rules:[{mdmh:"LENOVO/*/Lenovo PB2-690Y/*"},{ua:"Lenovo PB2-690Y"}],dpi:[457.2,454.713],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5X/*"},{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS345/*"},{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D800/*"},{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D850/*"},{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/VS985 4G/*"},{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5/*"},{ua:"Nexus 5 B"}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 4/*"},{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LG-P769/*"},{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS323/*"},{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGLS996/*"},{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/4560MMX/*"},{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/A250/*"},{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/Micromax AQ4501/*"},{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/G5/*"},{ua:"Moto G (5) Plus"}],dpi:[403.4,403],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/DROID RAZR/*"},{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT830C/*"},{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1021/*"},{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1023/*"},{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1028/*"},{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1034/*"},{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1053/*"},{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1562/*"},{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/Nexus 6/*"},{ua:"Nexus 6 B"}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1063/*"},{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1064/*"},{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1092/*"},{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1095/*"},{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/G4/*"},{ua:"Moto G (4)"}],dpi:401,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/A0001/*"},{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1001/*"},{ua:"ONE E1001"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1003/*"},{ua:"ONE E1003"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1005/*"},{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2001/*"},{ua:"ONE A2001"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2003/*"},{ua:"ONE A2003"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2005/*"},{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3000/*"},{ua:"ONEPLUS A3000"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3003/*"},{ua:"ONEPLUS A3003"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3010/*"},{ua:"ONEPLUS A3010"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A5000/*"},{ua:"ONEPLUS A5000 "}],dpi:[403.411,399.737],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A5010/*"},{ua:"ONEPLUS A5010"}],dpi:[403,400],bw:2,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6000/*"},{ua:"ONEPLUS A6000"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6003/*"},{ua:"ONEPLUS A6003"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6010/*"},{ua:"ONEPLUS A6010"}],dpi:401,bw:2,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6013/*"},{ua:"ONEPLUS A6013"}],dpi:401,bw:2,ac:500},{type:"android",rules:[{mdmh:"OPPO/*/X909/*"},{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9082/*"},{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G360P/*"},{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Nexus S/*"},{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-T230NU/*"},{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SGH-T399/*"},{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SGH-M919/*"},{ua:"SGH-M919"}],dpi:[440.8,437.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N9005/*"},{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SM-N900A/*"},{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9500/*"},{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/GT-I9505/*"},{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900F/*"},{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900M/*"},{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G800F/*"},{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G906S/*"},{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-T535/*"},{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-N920C/*"},{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920P/*"},{ua:"SM-N920P"}],dpi:[386.3655,390.144],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920W8/*"},{ua:"SM-N920W8"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300I/*"},{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9195/*"},{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SPH-L520/*"},{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SGH-I717/*"},{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SPH-D710/*"},{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-N7100/*"},{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SCH-I605/*"},{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Galaxy Nexus/*"},{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910H/*"},{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910C/*"},{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G130M/*"},{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G928I/*"},{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G920F/*"},{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G920P/*"},{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G925F/*"},{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G925V/*"},{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G930F/*"},{ua:"SM-G930F"}],dpi:576.6,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G935F/*"},{ua:"SM-G935F"}],dpi:533,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G950F/*"},{ua:"SM-G950F"}],dpi:[562.707,565.293],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G955U/*"},{ua:"SM-G955U"}],dpi:[522.514,525.762],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G955F/*"},{ua:"SM-G955F"}],dpi:[522.514,525.762],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G960F/*"},{ua:"SM-G960F"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G9600/*"},{ua:"SM-G9600"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960T/*"},{ua:"SM-G960T"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960N/*"},{ua:"SM-G960N"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960U/*"},{ua:"SM-G960U"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G9608/*"},{ua:"SM-G9608"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960FD/*"},{ua:"SM-G960FD"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960W/*"},{ua:"SM-G960W"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G965F/*"},{ua:"SM-G965F"}],dpi:529,bw:2,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/C6903/*"},{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/D6653/*"},{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6653/*"},{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6853/*"},{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/SGP321/*"},{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"TCT/*/ALCATEL ONE TOUCH Fierce/*"},{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"THL/*/thl 5000/*"},{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Fly/*/IQ4412/*"},{ua:"IQ4412"}],dpi:307.9,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"ZTE/*/ZTE Blade L2/*"},{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"BENEVE/*/VR518/*"},{ua:"VR518"}],dpi:480,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2001]}],dpi:[410.9,415.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2436]}],dpi:458,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/EML-L29/*"},{ua:"EML-L29"}],dpi:428,bw:3.45,ac:500},{type:"android",rules:[{mdmh:"Nokia/*/Nokia 7.1/*"},{ua:"Nokia 7.1"}],dpi:[432,431.9],bw:3,ac:500},{type:"ios",rules:[{res:[1242,2688]}],dpi:458,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G570M/*"},{ua:"SM-G570M"}],dpi:320,bw:3.684,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G970F/*"},{ua:"SM-G970F"}],dpi:438,bw:2.281,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G973F/*"},{ua:"SM-G973F"}],dpi:550,bw:2.002,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G975F/*"},{ua:"SM-G975F"}],dpi:522,bw:2.054,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G977F/*"},{ua:"SM-G977F"}],dpi:505,bw:2.334,ac:500},{type:"ios",rules:[{res:[828,1792]}],dpi:326,bw:5,ac:500}]};function W(e,t){if(this.dpdb=G,this.recalculateDeviceParams_(),e){this.onDeviceParamsUpdated=t;var n=new XMLHttpRequest,r=this;n.open("GET",e,!0),n.addEventListener("load",(function(){r.loading=!1,n.status>=200&&n.status<=299?(r.dpdb=JSON.parse(n.response),r.recalculateDeviceParams_()):console.error("Error loading online DPDB!")})),n.send()}}function q(e){this.xdpi=e.xdpi,this.ydpi=e.ydpi,this.bevelMm=e.bevelMm}function X(e,t){this.set(e,t)}function Y(e,t){this.kFilter=e,this.isDebug=t,this.currentAccelMeasurement=new X,this.currentGyroMeasurement=new X,this.previousGyroMeasurement=new X,i()?this.filterQ=new j(-1,0,0,1):this.filterQ=new j(1,0,0,1),this.previousFilterQ=new j,this.previousFilterQ.copy(this.filterQ),this.accelQ=new j,this.isOrientationInitialized=!1,this.estimatedGravity=new N,this.measuredGravity=new N,this.gyroIntegralQ=new j}function K(e,t){this.predictionTimeS=e,this.isDebug=t,this.previousQ=new j,this.previousTimestampS=null,this.deltaQ=new j,this.outQ=new j}function Q(e,t,n,r){this.yawOnly=n,this.accelerometer=new N,this.gyroscope=new N,this.filter=new Y(e,r),this.posePredictor=new K(t,r),this.isFirefoxAndroid=s(),this.isIOS=i();var o=l();this.isDeviceMotionInRadians=!this.isIOS&&o&&o<66,this.isWithoutDeviceMotion=u()||c(),this.filterToWorldQ=new j,i()?this.filterToWorldQ.setFromAxisAngle(new N(1,0,0),Math.PI/2):this.filterToWorldQ.setFromAxisAngle(new N(1,0,0),-Math.PI/2),this.inverseWorldToScreenQ=new j,this.worldToScreenQ=new j,this.originalPoseAdjustQ=new j,this.originalPoseAdjustQ.setFromAxisAngle(new N(0,0,1),-window.orientation*Math.PI/180),this.setScreenTransform_(),d()&&this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),this.resetQ=new j,this.orientationOut_=new Float32Array(4),this.start()}W.prototype.getDeviceParams=function(){return this.deviceParams},W.prototype.recalculateDeviceParams_=function(){var e=this.calcDeviceParams_();e?(this.deviceParams=e,this.onDeviceParamsUpdated&&this.onDeviceParamsUpdated(this.deviceParams)):console.error("Failed to recalculate device parameters.")},W.prototype.calcDeviceParams_=function(){var e=this.dpdb;if(!e)return console.error("DPDB not available."),null;if(1!=e.format)return console.error("DPDB has unexpected format version."),null;if(!e.devices||!e.devices.length)return console.error("DPDB does not have a devices section."),null;var t=navigator.userAgent||navigator.vendor||window.opera,n=f(),r=p();if(!e.devices)return console.error("DPDB has no devices section."),null;for(var o=0;o<e.devices.length;o++){var a=e.devices[o];if(a.rules)if("ios"==a.type||"android"==a.type){if(i()==("ios"==a.type)){for(var s=!1,l=0;l<a.rules.length;l++){var c=a.rules[l];if(this.ruleMatches_(c,t,n,r)){s=!0;break}}if(s)return new q({xdpi:a.dpi[0]||a.dpi,ydpi:a.dpi[1]||a.dpi,bevelMm:a.bw})}}else console.warn("Device["+o+"] has invalid type.");else console.warn("Device["+o+"] has no rules section.")}return console.warn("No DPDB device match."),null},W.prototype.ruleMatches_=function(e,t,n,r){if(!e.ua&&!e.res)return!1;if(e.ua&&"SM"===e.ua.substring(0,2)&&(e.ua=e.ua.substring(0,7)),e.ua&&t.indexOf(e.ua)<0)return!1;if(e.res){if(!e.res[0]||!e.res[1])return!1;var i=e.res[0],o=e.res[1];if(Math.min(n,r)!=Math.min(i,o)||Math.max(n,r)!=Math.max(i,o))return!1}return!0},X.prototype.set=function(e,t){this.sample=e,this.timestampS=t},X.prototype.copy=function(e){this.set(e.sample,e.timestampS)},Y.prototype.addAccelMeasurement=function(e,t){this.currentAccelMeasurement.set(e,t)},Y.prototype.addGyroMeasurement=function(e,t){this.currentGyroMeasurement.set(e,t);var n,r=t-this.previousGyroMeasurement.timestampS;n=r,isNaN(n)||n<=.001||n>1||this.run_(),this.previousGyroMeasurement.copy(this.currentGyroMeasurement)},Y.prototype.run_=function(){if(!this.isOrientationInitialized)return this.accelQ=this.accelToQuaternion_(this.currentAccelMeasurement.sample),this.previousFilterQ.copy(this.accelQ),void(this.isOrientationInitialized=!0);var e=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS,t=this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample,e);this.gyroIntegralQ.multiply(t),this.filterQ.copy(this.previousFilterQ),this.filterQ.multiply(t);var n=new j;n.copy(this.filterQ),n.inverse(),this.estimatedGravity.set(0,0,-1),this.estimatedGravity.applyQuaternion(n),this.estimatedGravity.normalize(),this.measuredGravity.copy(this.currentAccelMeasurement.sample),this.measuredGravity.normalize();var r,i=new j;i.setFromUnitVectors(this.estimatedGravity,this.measuredGravity),i.inverse(),this.isDebug&&console.log("Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",I*((r=i).w>1?(console.warn("getQuaternionAngle: w > 1"),0):2*Math.acos(r.w)),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1));var o=new j;o.copy(this.filterQ),o.multiply(i),this.filterQ.slerp(o,1-this.kFilter),this.previousFilterQ.copy(this.filterQ)},Y.prototype.getOrientation=function(){return this.filterQ},Y.prototype.accelToQuaternion_=function(e){var t=new N;t.copy(e),t.normalize();var n=new j;return n.setFromUnitVectors(new N(0,0,-1),t),n.inverse(),n},Y.prototype.gyroToQuaternionDelta_=function(e,t){var n=new j,r=new N;return r.copy(e),r.normalize(),n.setFromAxisAngle(r,e.length()*t),n},K.prototype.getPrediction=function(e,t,n){if(!this.previousTimestampS)return this.previousQ.copy(e),this.previousTimestampS=n,e;var r=new N;r.copy(t),r.normalize();var i=t.length();if(i<20*D)return this.isDebug&&console.log("Moving slowly, at %s deg/s: no prediction",(I*i).toFixed(1)),this.outQ.copy(e),this.previousQ.copy(e),this.outQ;var o=i*this.predictionTimeS;return this.deltaQ.setFromAxisAngle(r,o),this.outQ.copy(this.previousQ),this.outQ.multiply(this.deltaQ),this.previousQ.copy(e),this.previousTimestampS=n,this.outQ},Q.prototype.getPosition=function(){return null},Q.prototype.getOrientation=function(){var e=void 0;if(this.isWithoutDeviceMotion&&this._deviceOrientationQ)return this.deviceOrientationFixQ=this.deviceOrientationFixQ||function(){var e=(new j).setFromAxisAngle(new N(0,0,-1),0),t=new j;return-90===window.orientation?t.setFromAxisAngle(new N(0,1,0),Math.PI/-2):t.setFromAxisAngle(new N(0,1,0),Math.PI/2),e.multiply(t)}(),this.deviceOrientationFilterToWorldQ=this.deviceOrientationFilterToWorldQ||function(){var e=new j;return e.setFromAxisAngle(new N(1,0,0),-Math.PI/2),e}(),e=this._deviceOrientationQ,(t=new j).copy(e),t.multiply(this.deviceOrientationFilterToWorldQ),t.multiply(this.resetQ),t.multiply(this.worldToScreenQ),t.multiplyQuaternions(this.deviceOrientationFixQ,t),this.yawOnly&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_;var t,n=this.filter.getOrientation();return e=this.posePredictor.getPrediction(n,this.gyroscope,this.previousTimestampS),(t=new j).copy(this.filterToWorldQ),t.multiply(this.resetQ),t.multiply(e),t.multiply(this.worldToScreenQ),this.yawOnly&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_},Q.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation()),this.resetQ.x=0,this.resetQ.y=0,this.resetQ.z*=-1,this.resetQ.normalize(),d()&&this.resetQ.multiply(this.inverseWorldToScreenQ),this.resetQ.multiply(this.originalPoseAdjustQ)},Q.prototype.onDeviceOrientation_=function(e){this._deviceOrientationQ=this._deviceOrientationQ||new j;var t=e.alpha,n=e.beta,r=e.gamma;t=(t||0)*Math.PI/180,n=(n||0)*Math.PI/180,r=(r||0)*Math.PI/180,this._deviceOrientationQ.setFromEulerYXZ(n,t,-r)},Q.prototype.onDeviceMotion_=function(e){this.updateDeviceMotion_(e)},Q.prototype.updateDeviceMotion_=function(e){var t=e.accelerationIncludingGravity,n=e.rotationRate,r=e.timeStamp/1e3,i=r-this.previousTimestampS;return i<0?(E("fusion-pose-sensor:invalid:non-monotonic","Invalid timestamps detected: non-monotonic timestamp from devicemotion"),void(this.previousTimestampS=r)):i<=.001||i>1?(E("fusion-pose-sensor:invalid:outside-threshold","Invalid timestamps detected: Timestamp from devicemotion outside expected range."),void(this.previousTimestampS=r)):(this.accelerometer.set(-t.x,-t.y,-t.z),n&&(h()?this.gyroscope.set(-n.beta,n.alpha,n.gamma):this.gyroscope.set(n.alpha,n.beta,n.gamma),this.isDeviceMotionInRadians||this.gyroscope.multiplyScalar(Math.PI/180),this.filter.addGyroMeasurement(this.gyroscope,r)),this.filter.addAccelMeasurement(this.accelerometer,r),void(this.previousTimestampS=r))},Q.prototype.onOrientationChange_=function(e){this.setScreenTransform_()},Q.prototype.onMessage_=function(e){var t=e.data;t&&t.type&&"devicemotion"===t.type.toLowerCase()&&this.updateDeviceMotion_(t.deviceMotionEvent)},Q.prototype.setScreenTransform_=function(){switch(this.worldToScreenQ.set(0,0,0,1),window.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new N(0,0,1),-Math.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new N(0,0,1),Math.PI/2)}this.inverseWorldToScreenQ.copy(this.worldToScreenQ),this.inverseWorldToScreenQ.inverse()},Q.prototype.start=function(){this.onDeviceMotionCallback_=this.onDeviceMotion_.bind(this),this.onOrientationChangeCallback_=this.onOrientationChange_.bind(this),this.onMessageCallback_=this.onMessage_.bind(this),this.onDeviceOrientationCallback_=this.onDeviceOrientation_.bind(this),i()&&function(){var e=window.self!==window.top,t=_(document.referrer),n=_(window.location.href);return e&&t!==n}()&&window.addEventListener("message",this.onMessageCallback_),window.addEventListener("orientationchange",this.onOrientationChangeCallback_),this.isWithoutDeviceMotion?window.addEventListener("deviceorientation",this.onDeviceOrientationCallback_):window.addEventListener("devicemotion",this.onDeviceMotionCallback_)},Q.prototype.stop=function(){window.removeEventListener("devicemotion",this.onDeviceMotionCallback_),window.removeEventListener("deviceorientation",this.onDeviceOrientationCallback_),window.removeEventListener("orientationchange",this.onOrientationChangeCallback_),window.removeEventListener("message",this.onMessageCallback_)};var Z=new N(1,0,0),J=new N(0,0,1),$=new j;$.setFromAxisAngle(Z,-Math.PI/2),$.multiply((new j).setFromAxisAngle(J,Math.PI/2));var ee=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=e,this.sensor=null,this.fusionSensor=null,this._out=new Float32Array(4),this.api=null,this.errors=[],this._sensorQ=new j,this._outQ=new j,this._onSensorRead=this._onSensorRead.bind(this),this._onSensorError=this._onSensorError.bind(this),this.init()}return e(t,[{key:"init",value:function(){var e=null;try{(e=new RelativeOrientationSensor({frequency:60,referenceFrame:"screen"})).addEventListener("error",this._onSensorError)}catch(t){this.errors.push(t),"SecurityError"===t.name?(console.error("Cannot construct sensors due to the Feature Policy"),console.warn('Attempting to fall back using "devicemotion"; however this will fail in the future without correct permissions.'),this.useDeviceMotion()):"ReferenceError"===t.name?this.useDeviceMotion():console.error(t)}e&&(this.api="sensor",this.sensor=e,this.sensor.addEventListener("reading",this._onSensorRead),this.sensor.start())}},{key:"useDeviceMotion",value:function(){this.api="devicemotion",this.fusionSensor=new Q(this.config.K_FILTER,this.config.PREDICTION_TIME_S,this.config.YAW_ONLY,this.config.DEBUG),this.sensor&&(this.sensor.removeEventListener("reading",this._onSensorRead),this.sensor.removeEventListener("error",this._onSensorError),this.sensor=null)}},{key:"getOrientation",value:function(){if(this.fusionSensor)return this.fusionSensor.getOrientation();if(!this.sensor||!this.sensor.quaternion)return this._out[0]=this._out[1]=this._out[2]=0,this._out[3]=1,this._out;var e=this.sensor.quaternion;this._sensorQ.set(e[0],e[1],e[2],e[3]);var t=this._outQ;return t.copy($),t.multiply(this._sensorQ),this.config.YAW_ONLY&&(t.x=t.z=0,t.normalize()),this._out[0]=t.x,this._out[1]=t.y,this._out[2]=t.z,this._out[3]=t.w,this._out}},{key:"_onSensorError",value:function(e){this.errors.push(e.error),"NotAllowedError"===e.error.name?console.error("Permission to access sensor was denied"):"NotReadableError"===e.error.name?console.error("Sensor could not be read"):console.error(e.error),this.useDeviceMotion()}},{key:"_onSensorRead",value:function(){}}]),t}();function te(){this.loadIcon_();var e=document.createElement("div");(o=e.style).position="fixed",o.top=0,o.right=0,o.bottom=0,o.left=0,o.backgroundColor="gray",o.fontFamily="sans-serif",o.zIndex=1e6;var t=document.createElement("img");t.src=this.icon,(o=t.style).marginLeft="25%",o.marginTop="25%",o.width="50%",e.appendChild(t);var n=document.createElement("div");(o=n.style).textAlign="center",o.fontSize="16px",o.lineHeight="24px",o.margin="24px 25%",o.width="50%",n.innerHTML="Place your phone into your Cardboard viewer.",e.appendChild(n);var r=document.createElement("div");(o=r.style).backgroundColor="#CFD8DC",o.position="fixed",o.bottom=0,o.width="100%",o.height="48px",o.padding="14px 24px",o.boxSizing="border-box",o.color="#656A6B",e.appendChild(r);var i=document.createElement("div");i.style.float="left",i.innerHTML="No Cardboard viewer?";var o,a=document.createElement("a");a.href="https://www.google.com/get/cardboard/get-cardboard/",a.innerHTML="get one",a.target="_blank",(o=a.style).float="right",o.fontWeight=600,o.textTransform="uppercase",o.borderLeft="1px solid gray",o.paddingLeft="24px",o.textDecoration="none",o.color="#656A6B",r.appendChild(i),r.appendChild(a),this.overlay=e,this.text=n,this.hide()}function ne(e){try{this.selectedKey=localStorage.getItem("WEBVR_CARDBOARD_VIEWER")}catch(t){console.error("Failed to load viewer profile: %s",t)}this.selectedKey||(this.selectedKey=e||"CardboardV1"),this.dialog=this.createDialog_(U.Viewers),this.root=null,this.onChangeCallbacks_=[]}te.prototype.show=function(e){e||this.overlay.parentElement?e&&(this.overlay.parentElement&&this.overlay.parentElement!=e&&this.overlay.parentElement.removeChild(this.overlay),e.appendChild(this.overlay)):document.body.appendChild(this.overlay),this.overlay.style.display="block";var t=this.overlay.querySelector("img").style;d()?(t.width="20%",t.marginLeft="40%",t.marginTop="3%"):(t.width="50%",t.marginLeft="25%",t.marginTop="25%")},te.prototype.hide=function(){this.overlay.style.display="none"},te.prototype.showTemporarily=function(e,t){this.show(t),this.timer=setTimeout(this.hide.bind(this),e)},te.prototype.disableShowTemporarily=function(){clearTimeout(this.timer)},te.prototype.update=function(){this.disableShowTemporarily(),!d()&&y()?this.show():this.hide()},te.prototype.loadIcon_=function(){this.icon="data:image/svg+xml,"+encodeURIComponent("<svg width='198' height='240' viewBox='0 0 198 240' xmlns='http://www.w3.org/2000/svg'><g fill='none' fill-rule='evenodd'><path d='M149.625 109.527l6.737 3.891v.886c0 .177.013.36.038.549.01.081.02.162.027.242.14 1.415.974 2.998 2.105 3.999l5.72 5.062.081-.09s4.382-2.53 5.235-3.024l25.97 14.993v54.001c0 .771-.386 1.217-.948 1.217-.233 0-.495-.076-.772-.236l-23.967-13.838-.014.024-27.322 15.775-.85-1.323c-4.731-1.529-9.748-2.74-14.951-3.61a.27.27 0 0 0-.007.024l-5.067 16.961-7.891 4.556-.037-.063v27.59c0 .772-.386 1.217-.948 1.217-.232 0-.495-.076-.772-.236l-42.473-24.522c-.95-.549-1.72-1.877-1.72-2.967v-1.035l-.021.047a5.111 5.111 0 0 0-1.816-.399 5.682 5.682 0 0 0-.546.001 13.724 13.724 0 0 1-1.918-.041c-1.655-.153-3.2-.6-4.404-1.296l-46.576-26.89.005.012-10.278-18.75c-1.001-1.827-.241-4.216 1.698-5.336l56.011-32.345a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.659 3.227 1.853l.005-.003.227.413-.006.004a9.63 9.63 0 0 0 1.477 2.018l.277.27c1.914 1.85 4.468 2.801 7.113 2.801 1.949 0 3.948-.517 5.775-1.572.013 0 7.319-4.219 7.319-4.219a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.658 3.226 1.853l3.25 5.928.022-.018 6.785 3.917-.105-.182 46.881-26.965m0-1.635c-.282 0-.563.073-.815.218l-46.169 26.556-5.41-3.124-3.005-5.481c-.913-1.667-2.699-2.702-4.66-2.703-1.011 0-2.02.274-2.917.792a3825 3825 0 0 1-7.275 4.195l-.044.024a9.937 9.937 0 0 1-4.957 1.353c-2.292 0-4.414-.832-5.976-2.342l-.252-.245a7.992 7.992 0 0 1-1.139-1.534 1.379 1.379 0 0 0-.06-.122l-.227-.414a1.718 1.718 0 0 0-.095-.154c-.938-1.574-2.673-2.545-4.571-2.545-1.011 0-2.02.274-2.917.792L3.125 155.502c-2.699 1.559-3.738 4.94-2.314 7.538l10.278 18.75c.177.323.448.563.761.704l46.426 26.804c1.403.81 3.157 1.332 5.072 1.508a15.661 15.661 0 0 0 2.146.046 4.766 4.766 0 0 1 .396 0c.096.004.19.011.283.022.109 1.593 1.159 3.323 2.529 4.114l42.472 24.522c.524.302 1.058.455 1.59.455 1.497 0 2.583-1.2 2.583-2.852v-26.562l7.111-4.105a1.64 1.64 0 0 0 .749-.948l4.658-15.593c4.414.797 8.692 1.848 12.742 3.128l.533.829a1.634 1.634 0 0 0 2.193.531l26.532-15.317L193 192.433c.523.302 1.058.455 1.59.455 1.497 0 2.583-1.199 2.583-2.852v-54.001c0-.584-.312-1.124-.818-1.416l-25.97-14.993a1.633 1.633 0 0 0-1.636.001c-.606.351-2.993 1.73-4.325 2.498l-4.809-4.255c-.819-.725-1.461-1.933-1.561-2.936a7.776 7.776 0 0 0-.033-.294 2.487 2.487 0 0 1-.023-.336v-.886c0-.584-.312-1.123-.817-1.416l-6.739-3.891a1.633 1.633 0 0 0-.817-.219' fill='#455A64'/><path d='M96.027 132.636l46.576 26.891c1.204.695 1.979 1.587 2.242 2.541l-.01.007-81.374 46.982h-.001c-1.654-.152-3.199-.6-4.403-1.295l-46.576-26.891 83.546-48.235' fill='#FAFAFA'/><path d='M63.461 209.174c-.008 0-.015 0-.022-.002-1.693-.156-3.228-.609-4.441-1.309l-46.576-26.89a.118.118 0 0 1 0-.203l83.546-48.235a.117.117 0 0 1 .117 0l46.576 26.891c1.227.708 2.021 1.612 2.296 2.611a.116.116 0 0 1-.042.124l-.021.016-81.375 46.981a.11.11 0 0 1-.058.016zm-50.747-28.303l46.401 26.79c1.178.68 2.671 1.121 4.32 1.276l81.272-46.922c-.279-.907-1.025-1.73-2.163-2.387l-46.517-26.857-83.313 48.1z' fill='#607D8B'/><path d='M148.327 165.471a5.85 5.85 0 0 1-.546.001c-1.894-.083-3.302-1.038-3.145-2.132a2.693 2.693 0 0 0-.072-1.105l-81.103 46.822c.628.058 1.272.073 1.918.042.182-.009.364-.009.546-.001 1.894.083 3.302 1.038 3.145 2.132l79.257-45.759' fill='#FFF'/><path d='M69.07 211.347a.118.118 0 0 1-.115-.134c.045-.317-.057-.637-.297-.925-.505-.61-1.555-1.022-2.738-1.074a5.966 5.966 0 0 0-.535.001 14.03 14.03 0 0 1-1.935-.041.117.117 0 0 1-.103-.092.116.116 0 0 1 .055-.126l81.104-46.822a.117.117 0 0 1 .171.07c.104.381.129.768.074 1.153-.045.316.057.637.296.925.506.61 1.555 1.021 2.739 1.073.178.008.357.008.535-.001a.117.117 0 0 1 .064.218l-79.256 45.759a.114.114 0 0 1-.059.016zm-3.405-2.372c.089 0 .177.002.265.006 1.266.056 2.353.488 2.908 1.158.227.274.35.575.36.882l78.685-45.429c-.036 0-.072-.001-.107-.003-1.267-.056-2.354-.489-2.909-1.158-.282-.34-.402-.724-.347-1.107a2.604 2.604 0 0 0-.032-.91L63.846 208.97a13.91 13.91 0 0 0 1.528.012c.097-.005.194-.007.291-.007z' fill='#607D8B'/><path d='M2.208 162.134c-1.001-1.827-.241-4.217 1.698-5.337l56.011-32.344c1.939-1.12 4.324-.546 5.326 1.281l.232.41a9.344 9.344 0 0 0 1.47 2.021l.278.27c3.325 3.214 8.583 3.716 12.888 1.23l7.319-4.22c1.94-1.119 4.324-.546 5.325 1.282l3.25 5.928-83.519 48.229-10.278-18.75z' fill='#FAFAFA'/><path d='M12.486 181.001a.112.112 0 0 1-.031-.005.114.114 0 0 1-.071-.056L2.106 162.19c-1.031-1.88-.249-4.345 1.742-5.494l56.01-32.344a4.328 4.328 0 0 1 2.158-.588c1.415 0 2.65.702 3.311 1.882.01.008.018.017.024.028l.227.414a.122.122 0 0 1 .013.038 9.508 9.508 0 0 0 1.439 1.959l.275.266c1.846 1.786 4.344 2.769 7.031 2.769 1.977 0 3.954-.538 5.717-1.557a.148.148 0 0 1 .035-.013l7.284-4.206a4.321 4.321 0 0 1 2.157-.588c1.427 0 2.672.716 3.329 1.914l3.249 5.929a.116.116 0 0 1-.044.157l-83.518 48.229a.116.116 0 0 1-.059.016zm49.53-57.004c-.704 0-1.41.193-2.041.557l-56.01 32.345c-1.882 1.086-2.624 3.409-1.655 5.179l10.221 18.645 83.317-48.112-3.195-5.829c-.615-1.122-1.783-1.792-3.124-1.792a4.08 4.08 0 0 0-2.04.557l-7.317 4.225a.148.148 0 0 1-.035.013 11.7 11.7 0 0 1-5.801 1.569c-2.748 0-5.303-1.007-7.194-2.835l-.278-.27a9.716 9.716 0 0 1-1.497-2.046.096.096 0 0 1-.013-.037l-.191-.347a.11.11 0 0 1-.023-.029c-.615-1.123-1.783-1.793-3.124-1.793z' fill='#607D8B'/><path d='M42.434 155.808c-2.51-.001-4.697-1.258-5.852-3.365-1.811-3.304-.438-7.634 3.059-9.654l12.291-7.098a7.599 7.599 0 0 1 3.789-1.033c2.51 0 4.697 1.258 5.852 3.365 1.811 3.304.439 7.634-3.059 9.654l-12.291 7.098a7.606 7.606 0 0 1-3.789 1.033zm13.287-20.683a7.128 7.128 0 0 0-3.555.971l-12.291 7.098c-3.279 1.893-4.573 5.942-2.883 9.024 1.071 1.955 3.106 3.122 5.442 3.122a7.13 7.13 0 0 0 3.556-.97l12.291-7.098c3.279-1.893 4.572-5.942 2.883-9.024-1.072-1.955-3.106-3.123-5.443-3.123z' fill='#607D8B'/><path d='M149.588 109.407l6.737 3.89v.887c0 .176.013.36.037.549.011.081.02.161.028.242.14 1.415.973 2.998 2.105 3.999l7.396 6.545c.177.156.358.295.541.415 1.579 1.04 2.95.466 3.062-1.282.049-.784.057-1.595.023-2.429l-.003-.16v-1.151l25.987 15.003v54c0 1.09-.77 1.53-1.72.982l-42.473-24.523c-.95-.548-1.72-1.877-1.72-2.966v-34.033' fill='#FAFAFA'/><path d='M194.553 191.25c-.257 0-.54-.085-.831-.253l-42.472-24.521c-.981-.567-1.779-1.943-1.779-3.068v-34.033h.234v34.033c0 1.051.745 2.336 1.661 2.866l42.473 24.521c.424.245.816.288 1.103.122.285-.164.442-.52.442-1.002v-53.933l-25.753-14.868.003 1.106c.034.832.026 1.654-.024 2.439-.054.844-.396 1.464-.963 1.746-.619.309-1.45.173-2.28-.373a5.023 5.023 0 0 1-.553-.426l-7.397-6.544c-1.158-1.026-1.999-2.625-2.143-4.076a9.624 9.624 0 0 0-.027-.238 4.241 4.241 0 0 1-.038-.564v-.82l-6.68-3.856.117-.202 6.738 3.89.058.034v.954c0 .171.012.351.036.533.011.083.021.165.029.246.138 1.395.948 2.935 2.065 3.923l7.397 6.545c.173.153.35.289.527.406.758.499 1.504.63 2.047.359.49-.243.786-.795.834-1.551.05-.778.057-1.591.024-2.417l-.004-.163v-1.355l.175.1 25.987 15.004.059.033v54.068c0 .569-.198.996-.559 1.204a1.002 1.002 0 0 1-.506.131' fill='#607D8B'/><path d='M145.685 163.161l24.115 13.922-25.978 14.998-1.462-.307c-6.534-2.17-13.628-3.728-21.019-4.616-4.365-.524-8.663 1.096-9.598 3.62a2.746 2.746 0 0 0-.011 1.928c1.538 4.267 4.236 8.363 7.995 12.135l.532.845-25.977 14.997-24.115-13.922 75.518-43.6' fill='#FFF'/><path d='M94.282 220.818l-.059-.033-24.29-14.024.175-.101 75.577-43.634.058.033 24.29 14.024-26.191 15.122-.045-.01-1.461-.307c-6.549-2.174-13.613-3.725-21.009-4.614a13.744 13.744 0 0 0-1.638-.097c-3.758 0-7.054 1.531-7.837 3.642a2.62 2.62 0 0 0-.01 1.848c1.535 4.258 4.216 8.326 7.968 12.091l.016.021.526.835.006.01.064.102-.105.061-25.977 14.998-.058.033zm-23.881-14.057l23.881 13.788 24.802-14.32c.546-.315.846-.489 1.017-.575l-.466-.74c-3.771-3.787-6.467-7.881-8.013-12.168a2.851 2.851 0 0 1 .011-2.008c.815-2.199 4.203-3.795 8.056-3.795.557 0 1.117.033 1.666.099 7.412.891 14.491 2.445 21.041 4.621.836.175 1.215.254 1.39.304l25.78-14.884-23.881-13.788-75.284 43.466z' fill='#607D8B'/><path d='M167.23 125.979v50.871l-27.321 15.773-6.461-14.167c-.91-1.996-3.428-1.738-5.624.574a10.238 10.238 0 0 0-2.33 4.018l-6.46 21.628-27.322 15.774v-50.871l75.518-43.6' fill='#FFF'/><path d='M91.712 220.567a.127.127 0 0 1-.059-.016.118.118 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.519-43.6a.117.117 0 0 1 .175.101v50.871c0 .041-.023.08-.059.1l-27.321 15.775a.118.118 0 0 1-.094.01.12.12 0 0 1-.071-.063l-6.46-14.168c-.375-.822-1.062-1.275-1.934-1.275-1.089 0-2.364.686-3.5 1.881a10.206 10.206 0 0 0-2.302 3.972l-6.46 21.627a.118.118 0 0 1-.054.068L91.77 220.551a.12.12 0 0 1-.058.016zm.117-50.92v50.601l27.106-15.65 6.447-21.583a10.286 10.286 0 0 1 2.357-4.065c1.18-1.242 2.517-1.954 3.669-1.954.969 0 1.731.501 2.146 1.411l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M168.543 126.213v50.87l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.624.574a10.248 10.248 0 0 0-2.33 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6' fill='#FFF'/><path d='M93.025 220.8a.123.123 0 0 1-.059-.015.12.12 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.518-43.6a.112.112 0 0 1 .117 0c.036.02.059.059.059.1v50.871a.116.116 0 0 1-.059.101l-27.321 15.774a.111.111 0 0 1-.094.01.115.115 0 0 1-.071-.062l-6.46-14.168c-.375-.823-1.062-1.275-1.935-1.275-1.088 0-2.363.685-3.499 1.881a10.19 10.19 0 0 0-2.302 3.971l-6.461 21.628a.108.108 0 0 1-.053.067l-27.322 15.775a.12.12 0 0 1-.058.015zm.117-50.919v50.6l27.106-15.649 6.447-21.584a10.293 10.293 0 0 1 2.357-4.065c1.179-1.241 2.516-1.954 3.668-1.954.969 0 1.732.502 2.147 1.412l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M169.8 177.083l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.625.574a10.246 10.246 0 0 0-2.329 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6v50.87z' fill='#FAFAFA'/><path d='M94.282 220.917a.234.234 0 0 1-.234-.233v-50.871c0-.083.045-.161.117-.202l75.518-43.601a.234.234 0 1 1 .35.202v50.871a.233.233 0 0 1-.116.202l-27.322 15.775a.232.232 0 0 1-.329-.106l-6.461-14.168c-.36-.789-.992-1.206-1.828-1.206-1.056 0-2.301.672-3.415 1.844a10.099 10.099 0 0 0-2.275 3.924l-6.46 21.628a.235.235 0 0 1-.107.136l-27.322 15.774a.23.23 0 0 1-.116.031zm.233-50.969v50.331l26.891-15.525 6.434-21.539a10.41 10.41 0 0 1 2.384-4.112c1.201-1.265 2.569-1.991 3.753-1.991 1.018 0 1.818.526 2.253 1.48l6.354 13.934 26.982-15.578v-50.331l-75.051 43.331z' fill='#607D8B'/><path d='M109.894 199.943c-1.774 0-3.241-.725-4.244-2.12a.224.224 0 0 1 .023-.294.233.233 0 0 1 .301-.023c.78.547 1.705.827 2.75.827 1.323 0 2.754-.439 4.256-1.306 5.311-3.067 9.631-10.518 9.631-16.611 0-1.927-.442-3.56-1.278-4.724a.232.232 0 0 1 .323-.327c1.671 1.172 2.591 3.381 2.591 6.219 0 6.242-4.426 13.863-9.865 17.003-1.574.908-3.084 1.356-4.488 1.356zm-2.969-1.542c.813.651 1.82.877 2.968.877h.001c1.321 0 2.753-.327 4.254-1.194 5.311-3.067 9.632-10.463 9.632-16.556 0-1.979-.463-3.599-1.326-4.761.411 1.035.625 2.275.625 3.635 0 6.243-4.426 13.883-9.865 17.023-1.574.909-3.084 1.317-4.49 1.317-.641 0-1.243-.149-1.799-.341z' fill='#607D8B'/><path d='M113.097 197.23c5.384-3.108 9.748-10.636 9.748-16.814 0-2.051-.483-3.692-1.323-4.86-1.784-1.252-4.374-1.194-7.257.47-5.384 3.108-9.748 10.636-9.748 16.814 0 2.051.483 3.692 1.323 4.86 1.784 1.252 4.374 1.194 7.257-.47' fill='#FAFAFA'/><path d='M108.724 198.614c-1.142 0-2.158-.213-3.019-.817-.021-.014-.04.014-.055-.007-.894-1.244-1.367-2.948-1.367-4.973 0-6.242 4.426-13.864 9.865-17.005 1.574-.908 3.084-1.363 4.49-1.363 1.142 0 2.158.309 3.018.913a.23.23 0 0 1 .056.056c.894 1.244 1.367 2.972 1.367 4.997 0 6.243-4.426 13.783-9.865 16.923-1.574.909-3.084 1.276-4.49 1.276zm-2.718-1.109c.774.532 1.688.776 2.718.776 1.323 0 2.754-.413 4.256-1.28 5.311-3.066 9.631-10.505 9.631-16.598 0-1.909-.434-3.523-1.255-4.685-.774-.533-1.688-.799-2.718-.799-1.323 0-2.755.441-4.256 1.308-5.311 3.066-9.631 10.506-9.631 16.599 0 1.909.434 3.517 1.255 4.679z' fill='#607D8B'/><path d='M149.318 114.262l-9.984 8.878 15.893 11.031 5.589-6.112-11.498-13.797' fill='#FAFAFA'/><path d='M169.676 120.84l-9.748 5.627c-3.642 2.103-9.528 2.113-13.147.024-3.62-2.089-3.601-5.488.041-7.591l9.495-5.608-6.729-3.885-81.836 47.071 45.923 26.514 3.081-1.779c.631-.365.869-.898.618-1.39-2.357-4.632-2.593-9.546-.683-14.262 5.638-13.92 24.509-24.815 48.618-28.07 8.169-1.103 16.68-.967 24.704.394.852.145 1.776.008 2.407-.357l3.081-1.778-25.825-14.91' fill='#FAFAFA'/><path d='M113.675 183.459a.47.47 0 0 1-.233-.062l-45.924-26.515a.468.468 0 0 1 .001-.809l81.836-47.071a.467.467 0 0 1 .466 0l6.729 3.885a.467.467 0 0 1-.467.809l-6.496-3.75-80.9 46.533 44.988 25.973 2.848-1.644c.192-.111.62-.409.435-.773-2.416-4.748-2.658-9.814-.7-14.65 2.806-6.927 8.885-13.242 17.582-18.263 8.657-4.998 19.518-8.489 31.407-10.094 8.198-1.107 16.79-.97 24.844.397.739.125 1.561.007 2.095-.301l2.381-1.374-25.125-14.506a.467.467 0 0 1 .467-.809l25.825 14.91a.467.467 0 0 1 0 .809l-3.081 1.779c-.721.417-1.763.575-2.718.413-7.963-1.351-16.457-1.486-24.563-.392-11.77 1.589-22.512 5.039-31.065 9.977-8.514 4.916-14.456 11.073-17.183 17.805-1.854 4.578-1.623 9.376.666 13.875.37.725.055 1.513-.8 2.006l-3.081 1.78a.476.476 0 0 1-.234.062' fill='#455A64'/><path d='M153.316 128.279c-2.413 0-4.821-.528-6.652-1.586-1.818-1.049-2.82-2.461-2.82-3.975 0-1.527 1.016-2.955 2.861-4.02l9.493-5.607a.233.233 0 1 1 .238.402l-9.496 5.609c-1.696.979-2.628 2.263-2.628 3.616 0 1.34.918 2.608 2.585 3.571 3.549 2.049 9.343 2.038 12.914-.024l9.748-5.628a.234.234 0 0 1 .234.405l-9.748 5.628c-1.858 1.072-4.296 1.609-6.729 1.609' fill='#607D8B'/><path d='M113.675 182.992l-45.913-26.508M113.675 183.342a.346.346 0 0 1-.175-.047l-45.913-26.508a.35.35 0 1 1 .35-.607l45.913 26.508a.35.35 0 0 1-.175.654' fill='#455A64'/><path d='M67.762 156.484v54.001c0 1.09.77 2.418 1.72 2.967l42.473 24.521c.95.549 1.72.11 1.72-.98v-54.001' fill='#FAFAFA'/><path d='M112.727 238.561c-.297 0-.62-.095-.947-.285l-42.473-24.521c-1.063-.613-1.895-2.05-1.895-3.27v-54.001a.35.35 0 1 1 .701 0v54.001c0 .96.707 2.18 1.544 2.663l42.473 24.522c.344.198.661.243.87.122.206-.119.325-.411.325-.799v-54.001a.35.35 0 1 1 .7 0v54.001c0 .655-.239 1.154-.675 1.406a1.235 1.235 0 0 1-.623.162' fill='#455A64'/><path d='M112.86 147.512h-.001c-2.318 0-4.499-.522-6.142-1.471-1.705-.984-2.643-2.315-2.643-3.749 0-1.445.952-2.791 2.68-3.788l12.041-6.953c1.668-.962 3.874-1.493 6.212-1.493 2.318 0 4.499.523 6.143 1.472 1.704.984 2.643 2.315 2.643 3.748 0 1.446-.952 2.791-2.68 3.789l-12.042 6.952c-1.668.963-3.874 1.493-6.211 1.493zm12.147-16.753c-2.217 0-4.298.497-5.861 1.399l-12.042 6.952c-1.502.868-2.33 1.998-2.33 3.182 0 1.173.815 2.289 2.293 3.142 1.538.889 3.596 1.378 5.792 1.378h.001c2.216 0 4.298-.497 5.861-1.399l12.041-6.953c1.502-.867 2.33-1.997 2.33-3.182 0-1.172-.814-2.288-2.292-3.142-1.539-.888-3.596-1.377-5.793-1.377z' fill='#607D8B'/><path d='M165.63 123.219l-5.734 3.311c-3.167 1.828-8.286 1.837-11.433.02-3.147-1.817-3.131-4.772.036-6.601l5.734-3.31 11.397 6.58' fill='#FAFAFA'/><path d='M154.233 117.448l9.995 5.771-4.682 2.704c-1.434.827-3.352 1.283-5.399 1.283-2.029 0-3.923-.449-5.333-1.263-1.29-.744-2-1.694-2-2.674 0-.991.723-1.955 2.036-2.713l5.383-3.108m0-.809l-5.734 3.31c-3.167 1.829-3.183 4.784-.036 6.601 1.568.905 3.623 1.357 5.684 1.357 2.077 0 4.159-.46 5.749-1.377l5.734-3.311-11.397-6.58M145.445 179.667c-1.773 0-3.241-.85-4.243-2.245-.067-.092-.057-.275.023-.356.08-.081.207-.12.3-.055.781.548 1.706.812 2.751.811 1.322 0 2.754-.446 4.256-1.313 5.31-3.066 9.631-10.522 9.631-16.615 0-1.927-.442-3.562-1.279-4.726a.235.235 0 0 1 .024-.301.232.232 0 0 1 .3-.027c1.67 1.172 2.59 3.38 2.59 6.219 0 6.242-4.425 13.987-9.865 17.127-1.573.908-3.083 1.481-4.488 1.481zM142.476 178c.814.651 1.82 1.002 2.969 1.002 1.322 0 2.753-.452 4.255-1.32 5.31-3.065 9.631-10.523 9.631-16.617 0-1.98-.463-3.63-1.325-4.793.411 1.035.624 2.26.624 3.62 0 6.242-4.425 13.875-9.865 17.015-1.573.909-3.084 1.376-4.489 1.376a5.49 5.49 0 0 1-1.8-.283z' fill='#607D8B'/><path d='M148.648 176.704c5.384-3.108 9.748-10.636 9.748-16.813 0-2.052-.483-3.693-1.322-4.861-1.785-1.252-4.375-1.194-7.258.471-5.383 3.108-9.748 10.636-9.748 16.813 0 2.051.484 3.692 1.323 4.86 1.785 1.253 4.374 1.195 7.257-.47' fill='#FAFAFA'/><path d='M144.276 178.276c-1.143 0-2.158-.307-3.019-.911a.217.217 0 0 1-.055-.054c-.895-1.244-1.367-2.972-1.367-4.997 0-6.241 4.425-13.875 9.865-17.016 1.573-.908 3.084-1.369 4.489-1.369 1.143 0 2.158.307 3.019.91a.24.24 0 0 1 .055.055c.894 1.244 1.367 2.971 1.367 4.997 0 6.241-4.425 13.875-9.865 17.016-1.573.908-3.084 1.369-4.489 1.369zm-2.718-1.172c.773.533 1.687.901 2.718.901 1.322 0 2.754-.538 4.256-1.405 5.31-3.066 9.631-10.567 9.631-16.661 0-1.908-.434-3.554-1.256-4.716-.774-.532-1.688-.814-2.718-.814-1.322 0-2.754.433-4.256 1.3-5.31 3.066-9.631 10.564-9.631 16.657 0 1.91.434 3.576 1.256 4.738z' fill='#607D8B'/><path d='M150.72 172.361l-.363-.295a24.105 24.105 0 0 0 2.148-3.128 24.05 24.05 0 0 0 1.977-4.375l.443.149a24.54 24.54 0 0 1-2.015 4.46 24.61 24.61 0 0 1-2.19 3.189M115.917 191.514l-.363-.294a24.174 24.174 0 0 0 2.148-3.128 24.038 24.038 0 0 0 1.976-4.375l.443.148a24.48 24.48 0 0 1-2.015 4.461 24.662 24.662 0 0 1-2.189 3.188M114 237.476V182.584 237.476' fill='#607D8B'/><g><path d='M81.822 37.474c.017-.135-.075-.28-.267-.392-.327-.188-.826-.21-1.109-.045l-6.012 3.471c-.131.076-.194.178-.191.285.002.132.002.461.002.578v.043l-.007.128-6.591 3.779c-.001 0-2.077 1.046-2.787 5.192 0 0-.912 6.961-.898 19.745.015 12.57.606 17.07 1.167 21.351.22 1.684 3.001 2.125 3.001 2.125.331.04.698-.027 1.08-.248l75.273-43.551c1.808-1.069 2.667-3.719 3.056-6.284 1.213-7.99 1.675-32.978-.275-39.878-.196-.693-.51-1.083-.868-1.282l-2.086-.79c-.727.028-1.416.467-1.534.535L82.032 37.072l-.21.402' fill='#FFF'/><path d='M144.311 1.701l2.085.79c.358.199.672.589.868 1.282 1.949 6.9 1.487 31.887.275 39.878-.39 2.565-1.249 5.215-3.056 6.284L69.21 93.486a1.78 1.78 0 0 1-.896.258l-.183-.011c0 .001-2.782-.44-3.003-2.124-.56-4.282-1.151-8.781-1.165-21.351-.015-12.784.897-19.745.897-19.745.71-4.146 2.787-5.192 2.787-5.192l6.591-3.779.007-.128v-.043c0-.117 0-.446-.002-.578-.003-.107.059-.21.191-.285l6.012-3.472a.98.98 0 0 1 .481-.11c.218 0 .449.053.627.156.193.112.285.258.268.392l.211-.402 60.744-34.836c.117-.068.806-.507 1.534-.535m0-.997l-.039.001c-.618.023-1.283.244-1.974.656l-.021.012-60.519 34.706a2.358 2.358 0 0 0-.831-.15c-.365 0-.704.084-.98.244l-6.012 3.471c-.442.255-.699.69-.689 1.166l.001.15-6.08 3.487c-.373.199-2.542 1.531-3.29 5.898l-.006.039c-.009.07-.92 7.173-.906 19.875.014 12.62.603 17.116 1.172 21.465l.002.015c.308 2.355 3.475 2.923 3.836 2.98l.034.004c.101.013.204.019.305.019a2.77 2.77 0 0 0 1.396-.392l75.273-43.552c1.811-1.071 2.999-3.423 3.542-6.997 1.186-7.814 1.734-33.096-.301-40.299-.253-.893-.704-1.527-1.343-1.882l-.132-.062-2.085-.789a.973.973 0 0 0-.353-.065' fill='#455A64'/><path d='M128.267 11.565l1.495.434-56.339 32.326' fill='#FFF'/><path d='M74.202 90.545a.5.5 0 0 1-.25-.931l18.437-10.645a.499.499 0 1 1 .499.864L74.451 90.478l-.249.067M75.764 42.654l-.108-.062.046-.171 5.135-2.964.17.045-.045.171-5.135 2.964-.063.017M70.52 90.375V46.421l.063-.036L137.84 7.554v43.954l-.062.036L70.52 90.375zm.25-43.811v43.38l66.821-38.579V7.985L70.77 46.564z' fill='#607D8B'/><path d='M86.986 83.182c-.23.149-.612.384-.849.523l-11.505 6.701c-.237.139-.206.252.068.252h.565c.275 0 .693-.113.93-.252L87.7 83.705c.237-.139.428-.253.425-.256a11.29 11.29 0 0 1-.006-.503c0-.274-.188-.377-.418-.227l-.715.463' fill='#607D8B'/><path d='M75.266 90.782H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.236-.138.615-.371.844-.519l.715-.464a.488.488 0 0 1 .266-.089c.172 0 .345.13.345.421 0 .214.001.363.003.437l.006.004-.004.069c-.003.075-.003.075-.486.356l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.108.866-.234l11.505-6.702c.168-.098.294-.173.361-.214-.004-.084-.004-.218-.004-.437l-.095-.171-.131.049-.714.463c-.232.15-.616.386-.854.525l-11.505 6.702-.029.018z' fill='#607D8B'/><path d='M75.266 89.871H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.258-.151.694-.268.993-.268h.565c.2 0 .316.056.346.166.03.11-.043.217-.215.317l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.107.866-.234l11.505-6.702.03-.018-.035-.001h-.565c-.252 0-.649.108-.867.234l-11.505 6.702-.029.018zM74.37 90.801v-1.247 1.247' fill='#607D8B'/><path d='M68.13 93.901c-.751-.093-1.314-.737-1.439-1.376-.831-4.238-1.151-8.782-1.165-21.352-.015-12.784.897-19.745.897-19.745.711-4.146 2.787-5.192 2.787-5.192l74.859-43.219c.223-.129 2.487-1.584 3.195.923 1.95 6.9 1.488 31.887.275 39.878-.389 2.565-1.248 5.215-3.056 6.283L69.21 93.653c-.382.221-.749.288-1.08.248 0 0-2.781-.441-3.001-2.125-.561-4.281-1.152-8.781-1.167-21.351-.014-12.784.898-19.745.898-19.745.71-4.146 2.787-5.191 2.787-5.191l6.598-3.81.871-.119 6.599-3.83.046-.461L68.13 93.901' fill='#FAFAFA'/><path d='M68.317 94.161l-.215-.013h-.001l-.244-.047c-.719-.156-2.772-.736-2.976-2.292-.568-4.34-1.154-8.813-1.168-21.384-.014-12.654.891-19.707.9-19.777.725-4.231 2.832-5.338 2.922-5.382l6.628-3.827.87-.119 6.446-3.742.034-.334a.248.248 0 0 1 .273-.223.248.248 0 0 1 .223.272l-.059.589-6.752 3.919-.87.118-6.556 3.785c-.031.016-1.99 1.068-2.666 5.018-.007.06-.908 7.086-.894 19.702.014 12.539.597 16.996 1.161 21.305.091.691.689 1.154 1.309 1.452a1.95 1.95 0 0 1-.236-.609c-.781-3.984-1.155-8.202-1.17-21.399-.014-12.653.891-19.707.9-19.777.725-4.231 2.832-5.337 2.922-5.382-.004.001 74.444-42.98 74.846-43.212l.028-.017c.904-.538 1.72-.688 2.36-.433.555.221.949.733 1.172 1.52 2.014 7.128 1.46 32.219.281 39.983-.507 3.341-1.575 5.515-3.175 6.462L69.335 93.869a2.023 2.023 0 0 1-1.018.292zm-.147-.507c.293.036.604-.037.915-.217l75.273-43.551c1.823-1.078 2.602-3.915 2.934-6.106 1.174-7.731 1.731-32.695-.268-39.772-.178-.631-.473-1.032-.876-1.192-.484-.193-1.166-.052-1.921.397l-.034.021-74.858 43.218c-.031.017-1.989 1.069-2.666 5.019-.007.059-.908 7.085-.894 19.702.015 13.155.386 17.351 1.161 21.303.09.461.476.983 1.037 1.139.114.025.185.037.196.039h.001z' fill='#455A64'/><path d='M69.317 68.982c.489-.281.885-.056.885.505 0 .56-.396 1.243-.885 1.525-.488.282-.884.057-.884-.504 0-.56.396-1.243.884-1.526' fill='#FFF'/><path d='M68.92 71.133c-.289 0-.487-.228-.487-.625 0-.56.396-1.243.884-1.526a.812.812 0 0 1 .397-.121c.289 0 .488.229.488.626 0 .56-.396 1.243-.885 1.525a.812.812 0 0 1-.397.121m.794-2.459a.976.976 0 0 0-.49.147c-.548.317-.978 1.058-.978 1.687 0 .486.271.812.674.812a.985.985 0 0 0 .491-.146c.548-.317.978-1.057.978-1.687 0-.486-.272-.813-.675-.813' fill='#8097A2'/><path d='M68.92 70.947c-.271 0-.299-.307-.299-.439 0-.491.361-1.116.79-1.363a.632.632 0 0 1 .303-.096c.272 0 .301.306.301.438 0 .491-.363 1.116-.791 1.364a.629.629 0 0 1-.304.096m.794-2.086a.812.812 0 0 0-.397.121c-.488.283-.884.966-.884 1.526 0 .397.198.625.487.625a.812.812 0 0 0 .397-.121c.489-.282.885-.965.885-1.525 0-.397-.199-.626-.488-.626' fill='#8097A2'/><path d='M69.444 85.35c.264-.152.477-.031.477.272 0 .303-.213.67-.477.822-.263.153-.477.031-.477-.271 0-.302.214-.671.477-.823' fill='#FFF'/><path d='M69.23 86.51c-.156 0-.263-.123-.263-.337 0-.302.214-.671.477-.823a.431.431 0 0 1 .214-.066c.156 0 .263.124.263.338 0 .303-.213.67-.477.822a.431.431 0 0 1-.214.066m.428-1.412c-.1 0-.203.029-.307.09-.32.185-.57.618-.57.985 0 .309.185.524.449.524a.63.63 0 0 0 .308-.09c.32-.185.57-.618.57-.985 0-.309-.185-.524-.45-.524' fill='#8097A2'/><path d='M69.23 86.322l-.076-.149c0-.235.179-.544.384-.661l.12-.041.076.151c0 .234-.179.542-.383.66l-.121.04m.428-1.038a.431.431 0 0 0-.214.066c-.263.152-.477.521-.477.823 0 .214.107.337.263.337a.431.431 0 0 0 .214-.066c.264-.152.477-.519.477-.822 0-.214-.107-.338-.263-.338' fill='#8097A2'/><path d='M139.278 7.769v43.667L72.208 90.16V46.493l67.07-38.724' fill='#455A64'/><path d='M72.083 90.375V46.421l.063-.036 67.257-38.831v43.954l-.062.036-67.258 38.831zm.25-43.811v43.38l66.821-38.579V7.985L72.333 46.564z' fill='#607D8B'/></g><path d='M125.737 88.647l-7.639 3.334V84l-11.459 4.713v8.269L99 100.315l13.369 3.646 13.368-15.314' fill='#455A64'/></g></svg>")},ne.prototype.show=function(e){this.root=e,e.appendChild(this.dialog),this.dialog.querySelector("#"+this.selectedKey).checked=!0,this.dialog.style.display="block"},ne.prototype.hide=function(){this.root&&this.root.contains(this.dialog)&&this.root.removeChild(this.dialog),this.dialog.style.display="none"},ne.prototype.getCurrentViewer=function(){return U.Viewers[this.selectedKey]},ne.prototype.getSelectedKey_=function(){var e=this.dialog.querySelector("input[name=field]:checked");return e?e.id:null},ne.prototype.onChange=function(e){this.onChangeCallbacks_.push(e)},ne.prototype.fireOnChange_=function(e){for(var t=0;t<this.onChangeCallbacks_.length;t++)this.onChangeCallbacks_[t](e)},ne.prototype.onSave_=function(){if(this.selectedKey=this.getSelectedKey_(),this.selectedKey&&U.Viewers[this.selectedKey]){this.fireOnChange_(U.Viewers[this.selectedKey]);try{localStorage.setItem("WEBVR_CARDBOARD_VIEWER",this.selectedKey)}catch(e){console.error("Failed to save viewer profile: %s",e)}this.hide()}else console.error("ViewerSelector.onSave_: this should never happen!")},ne.prototype.createDialog_=function(e){var t=document.createElement("div");t.classList.add("webvr-polyfill-viewer-selector"),t.style.display="none";var n=document.createElement("div");(i=n.style).position="fixed",i.left=0,i.top=0,i.width="100%",i.height="100%",i.background="rgba(0, 0, 0, 0.3)",n.addEventListener("click",this.hide.bind(this));var r=document.createElement("div"),i=r.style;for(var o in i.boxSizing="border-box",i.position="fixed",i.top="24px",i.left="50%",i.marginLeft="-140px",i.width="280px",i.padding="24px",i.overflow="hidden",i.background="#fafafa",i.fontFamily="'Roboto', sans-serif",i.boxShadow="0px 5px 20px #666",r.appendChild(this.createH1_("Select your viewer")),e)r.appendChild(this.createChoice_(o,e[o].label));return r.appendChild(this.createButton_("Save",this.onSave_.bind(this))),t.appendChild(n),t.appendChild(r),t},ne.prototype.createH1_=function(e){var t=document.createElement("h1"),n=t.style;return n.color="black",n.fontSize="20px",n.fontWeight="bold",n.marginTop=0,n.marginBottom="24px",t.innerHTML=e,t},ne.prototype.createChoice_=function(e,t){var n=document.createElement("div");n.style.marginTop="8px",n.style.color="black";var r=document.createElement("input");r.style.fontSize="30px",r.setAttribute("id",e),r.setAttribute("type","radio"),r.setAttribute("value",e),r.setAttribute("name","field");var i=document.createElement("label");return i.style.marginLeft="4px",i.setAttribute("for",e),i.innerHTML=t,n.appendChild(r),n.appendChild(i),n},ne.prototype.createButton_=function(e,t){var n=document.createElement("button");n.innerHTML=e;var r=n.style;return r.float="right",r.textTransform="uppercase",r.color="#1094f7",r.fontSize="14px",r.letterSpacing=0,r.border=0,r.background="none",r.marginTop="16px",n.addEventListener("click",t),n},"undefined"!==typeof window?window:"undefined"!==typeof n||"undefined"!==typeof self&&self;var re,ie=(re=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){!function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),o="undefined"!==typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("playsinline",""),this.noSleepVideo.setAttribute("src",i),this.noSleepVideo.addEventListener("timeupdate",function(e){this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}.bind(this)))}return r(e,[{key:"enable",value:function(){o?(this.disable(),this.noSleepTimer=window.setInterval((function(){window.location.href="/",window.setTimeout(window.stop,0)}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){o?this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=a},function(e,t,n){e.exports="data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9j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dHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}])}))})))&&re.__esModule&&Object.prototype.hasOwnProperty.call(re,"default")?re.default:re,oe=1e3,ae=[0,0,.5,1],se=[.5,0,.5,1],le=window.requestAnimationFrame,ce=window.cancelAnimationFrame;function ue(e){Object.defineProperties(this,{hasPosition:{writable:!1,enumerable:!0,value:e.hasPosition},hasExternalDisplay:{writable:!1,enumerable:!0,value:e.hasExternalDisplay},canPresent:{writable:!1,enumerable:!0,value:e.canPresent},maxLayers:{writable:!1,enumerable:!0,value:e.maxLayers},hasOrientation:{enumerable:!0,get:function(){return A("VRDisplayCapabilities.prototype.hasOrientation","VRDisplay.prototype.getFrameData"),e.hasOrientation}}})}function he(e){var t=!("wakelock"in(e=e||{}))||e.wakelock;this.isPolyfilled=!0,this.displayId=oe++,this.displayName="",this.depthNear=.01,this.depthFar=1e4,this.isPresenting=!1,Object.defineProperty(this,"isConnected",{get:function(){return A("VRDisplay.prototype.isConnected","VRDisplayCapabilities.prototype.hasExternalDisplay"),!1}}),this.capabilities=new ue({hasPosition:!1,hasOrientation:!1,hasExternalDisplay:!1,canPresent:!1,maxLayers:1}),this.stageParameters=null,this.waitingForPresent_=!1,this.layer_=null,this.originalParent_=null,this.fullscreenElement_=null,this.fullscreenWrapper_=null,this.fullscreenElementCachedStyle_=null,this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null,t&&y()&&(this.wakelock_=new ie)}he.prototype.getFrameData=function(e){return x(e,this._getPose(),this)},he.prototype.getPose=function(){return A("VRDisplay.prototype.getPose","VRDisplay.prototype.getFrameData"),this._getPose()},he.prototype.resetPose=function(){return A("VRDisplay.prototype.resetPose"),this._resetPose()},he.prototype.getImmediatePose=function(){return A("VRDisplay.prototype.getImmediatePose","VRDisplay.prototype.getFrameData"),this._getPose()},he.prototype.requestAnimationFrame=function(e){return le(e)},he.prototype.cancelAnimationFrame=function(e){return ce(e)},he.prototype.wrapForFullscreen=function(e){if(i())return e;if(!this.fullscreenWrapper_){this.fullscreenWrapper_=document.createElement("div");var t=["height: "+Math.min(screen.height,screen.width)+"px !important","top: 0 !important","left: 0 !important","right: 0 !important","border: 0","margin: 0","padding: 0","z-index: 999999 !important","position: fixed"];this.fullscreenWrapper_.setAttribute("style",t.join("; ")+";"),this.fullscreenWrapper_.classList.add("webvr-polyfill-fullscreen-wrapper")}if(this.fullscreenElement_==e)return this.fullscreenWrapper_;if(this.fullscreenElement_&&(this.originalParent_?this.originalParent_.appendChild(this.fullscreenElement_):this.fullscreenElement_.parentElement.removeChild(this.fullscreenElement_)),this.fullscreenElement_=e,this.originalParent_=e.parentElement,this.originalParent_||document.body.appendChild(e),!this.fullscreenWrapper_.parentElement){var n=this.fullscreenElement_.parentElement;n.insertBefore(this.fullscreenWrapper_,this.fullscreenElement_),n.removeChild(this.fullscreenElement_)}this.fullscreenWrapper_.insertBefore(this.fullscreenElement_,this.fullscreenWrapper_.firstChild),this.fullscreenElementCachedStyle_=this.fullscreenElement_.getAttribute("style");var r=this;return function(){if(r.fullscreenElement_){var e=["position: absolute","top: 0","left: 0","width: "+Math.max(screen.width,screen.height)+"px","height: "+Math.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0"];r.fullscreenElement_.setAttribute("style",e.join("; ")+";")}}(),this.fullscreenWrapper_},he.prototype.removeFullscreenWrapper=function(){if(this.fullscreenElement_){var e=this.fullscreenElement_;this.fullscreenElementCachedStyle_?e.setAttribute("style",this.fullscreenElementCachedStyle_):e.removeAttribute("style"),this.fullscreenElement_=null,this.fullscreenElementCachedStyle_=null;var t=this.fullscreenWrapper_.parentElement;return this.fullscreenWrapper_.removeChild(e),this.originalParent_===t?t.insertBefore(e,this.fullscreenWrapper_):this.originalParent_&&this.originalParent_.appendChild(e),t.removeChild(this.fullscreenWrapper_),e}},he.prototype.requestPresent=function(e){var t=this.isPresenting,n=this;return e instanceof Array||(A("VRDisplay.prototype.requestPresent with non-array argument","an array of VRLayers as the first argument"),e=[e]),new Promise((function(r,a){if(n.capabilities.canPresent)if(0==e.length||e.length>n.capabilities.maxLayers)a(new Error("Invalid number of layers."));else{var s=e[0];if(s.source){var l=s.leftBounds||ae,c=s.rightBounds||se;if(t){var u=n.layer_;u.source!==s.source&&(u.source=s.source);for(var h=0;h<4;h++)u.leftBounds[h]=l[h],u.rightBounds[h]=c[h];return n.wrapForFullscreen(n.layer_.source),n.updatePresent_(),void r()}if(n.layer_={predistorted:s.predistorted,source:s.source,leftBounds:l.slice(0),rightBounds:c.slice(0)},n.waitingForPresent_=!1,n.layer_&&n.layer_.source){var d=n.wrapForFullscreen(n.layer_.source);n.addFullscreenListeners_(d,(function(){var e=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;n.isPresenting=d===e,n.isPresenting?(screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape-primary").catch((function(e){console.error("screen.orientation.lock() failed due to",e.message)})),n.waitingForPresent_=!1,n.beginPresent_(),r()):(screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),n.removeFullscreenWrapper(),n.disableWakeLock(),n.endPresent_(),n.removeFullscreenListeners_()),n.fireVRDisplayPresentChange_()}),(function(){n.waitingForPresent_&&(n.removeFullscreenWrapper(),n.removeFullscreenListeners_(),n.disableWakeLock(),n.waitingForPresent_=!1,n.isPresenting=!1,a(new Error("Unable to present.")))})),function(e){if(o())return!1;if(e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else{if(!e.msRequestFullscreen)return!1;e.msRequestFullscreen()}return!0}(d)?(n.enableWakeLock(),n.waitingForPresent_=!0):(i()||o())&&(n.enableWakeLock(),n.isPresenting=!0,n.beginPresent_(),n.fireVRDisplayPresentChange_(),r())}n.waitingForPresent_||i()||(m(),a(new Error("Unable to present.")))}else r()}else a(new Error("VRDisplay is not capable of presenting."))}))},he.prototype.exitPresent=function(){var e=this.isPresenting,t=this;return this.isPresenting=!1,this.layer_=null,this.disableWakeLock(),new Promise((function(n,r){e?(!m()&&i()&&(t.endPresent_(),t.fireVRDisplayPresentChange_()),o()&&(t.removeFullscreenWrapper(),t.removeFullscreenListeners_(),t.endPresent_(),t.fireVRDisplayPresentChange_()),n()):r(new Error("Was not presenting to VRDisplay."))}))},he.prototype.getLayers=function(){return this.layer_?[this.layer_]:[]},he.prototype.fireVRDisplayPresentChange_=function(){var e=new CustomEvent("vrdisplaypresentchange",{detail:{display:this}});window.dispatchEvent(e)},he.prototype.fireVRDisplayConnect_=function(){var e=new CustomEvent("vrdisplayconnect",{detail:{display:this}});window.dispatchEvent(e)},he.prototype.addFullscreenListeners_=function(e,t,n){this.removeFullscreenListeners_(),this.fullscreenEventTarget_=e,this.fullscreenChangeHandler_=t,this.fullscreenErrorHandler_=n,t&&(document.fullscreenEnabled?e.addEventListener("fullscreenchange",t,!1):document.webkitFullscreenEnabled?e.addEventListener("webkitfullscreenchange",t,!1):document.mozFullScreenEnabled?document.addEventListener("mozfullscreenchange",t,!1):document.msFullscreenEnabled&&e.addEventListener("msfullscreenchange",t,!1)),n&&(document.fullscreenEnabled?e.addEventListener("fullscreenerror",n,!1):document.webkitFullscreenEnabled?e.addEventListener("webkitfullscreenerror",n,!1):document.mozFullScreenEnabled?document.addEventListener("mozfullscreenerror",n,!1):document.msFullscreenEnabled&&e.addEventListener("msfullscreenerror",n,!1))},he.prototype.removeFullscreenListeners_=function(){if(this.fullscreenEventTarget_){var e=this.fullscreenEventTarget_;if(this.fullscreenChangeHandler_){var t=this.fullscreenChangeHandler_;e.removeEventListener("fullscreenchange",t,!1),e.removeEventListener("webkitfullscreenchange",t,!1),document.removeEventListener("mozfullscreenchange",t,!1),e.removeEventListener("msfullscreenchange",t,!1)}if(this.fullscreenErrorHandler_){var n=this.fullscreenErrorHandler_;e.removeEventListener("fullscreenerror",n,!1),e.removeEventListener("webkitfullscreenerror",n,!1),document.removeEventListener("mozfullscreenerror",n,!1),e.removeEventListener("msfullscreenerror",n,!1)}this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null}},he.prototype.enableWakeLock=function(){this.wakelock_&&this.wakelock_.enable()},he.prototype.disableWakeLock=function(){this.wakelock_&&this.wakelock_.disable()},he.prototype.beginPresent_=function(){},he.prototype.endPresent_=function(){},he.prototype.submitFrame=function(e){},he.prototype.getEyeParameters=function(e){return null};var de={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:"",MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1},fe="left",pe="right";function me(e){var t=b({},de);e=b(t,e||{}),he.call(this,{wakelock:e.MOBILE_WAKE_LOCK}),this.config=e,this.displayName="Cardboard VRDisplay",this.capabilities=new ue({hasPosition:!1,hasOrientation:!0,hasExternalDisplay:!1,canPresent:!0,maxLayers:1}),this.stageParameters=null,this.bufferScale_=this.config.BUFFER_SCALE,this.poseSensor_=new ee(this.config),this.distorter_=null,this.cardboardUI_=null,this.dpdb_=new W(this.config.DPDB_URL,this.onDeviceParamsUpdated_.bind(this)),this.deviceInfo_=new U(this.dpdb_.getDeviceParams(),e.ADDITIONAL_VIEWERS),this.viewerSelector_=new ne(e.DEFAULT_VIEWER),this.viewerSelector_.onChange(this.onViewerChanged_.bind(this)),this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer()),this.config.ROTATE_INSTRUCTIONS_DISABLED||(this.rotateInstructions_=new te),i()&&window.addEventListener("resize",this.onResize_.bind(this))}return me.prototype=Object.create(he.prototype),me.prototype._getPose=function(){return{position:null,orientation:this.poseSensor_.getOrientation(),linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},me.prototype._resetPose=function(){this.poseSensor_.resetPose&&this.poseSensor_.resetPose()},me.prototype._getFieldOfView=function(e){var t;if(e==fe)t=this.deviceInfo_.getFieldOfViewLeftEye();else{if(e!=pe)return console.error("Invalid eye provided: %s",e),null;t=this.deviceInfo_.getFieldOfViewRightEye()}return t},me.prototype._getEyeOffset=function(e){var t;if(e==fe)t=[.5*-this.deviceInfo_.viewer.interLensDistance,0,0];else{if(e!=pe)return console.error("Invalid eye provided: %s",e),null;t=[.5*this.deviceInfo_.viewer.interLensDistance,0,0]}return t},me.prototype.getEyeParameters=function(e){var t=this._getEyeOffset(e),n=this._getFieldOfView(e),r={offset:t,renderWidth:.5*this.deviceInfo_.device.width*this.bufferScale_,renderHeight:this.deviceInfo_.device.height*this.bufferScale_};return Object.defineProperty(r,"fieldOfView",{enumerable:!0,get:function(){return A("VRFieldOfView","VRFrameData's projection matrices"),n}}),r},me.prototype.onDeviceParamsUpdated_=function(e){this.config.DEBUG&&console.log("DPDB reported that device params were updated."),this.deviceInfo_.updateDeviceParams(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_)},me.prototype.updateBounds_=function(){this.layer_&&this.distorter_&&(this.layer_.leftBounds||this.layer_.rightBounds)&&this.distorter_.setTextureBounds(this.layer_.leftBounds,this.layer_.rightBounds)},me.prototype.beginPresent_=function(){var e=this.layer_.source.getContext("webgl");e||(e=this.layer_.source.getContext("experimental-webgl")),e||(e=this.layer_.source.getContext("webgl2")),e&&(this.layer_.predistorted?this.config.CARDBOARD_UI_DISABLED||(e.canvas.width=f()*this.bufferScale_,e.canvas.height=p()*this.bufferScale_,this.cardboardUI_=new P(e)):(this.config.CARDBOARD_UI_DISABLED||(this.cardboardUI_=new P(e)),this.distorter_=new C(e,this.cardboardUI_,this.config.BUFFER_SCALE,this.config.DIRTY_SUBMIT_FRAME_BINDINGS),this.distorter_.updateDeviceInfo(this.deviceInfo_)),this.cardboardUI_&&this.cardboardUI_.listen(function(e){this.viewerSelector_.show(this.layer_.source.parentElement),e.stopPropagation(),e.preventDefault()}.bind(this),function(e){this.exitPresent(),e.stopPropagation(),e.preventDefault()}.bind(this)),this.rotateInstructions_&&(d()&&y()?this.rotateInstructions_.showTemporarily(3e3,this.layer_.source.parentElement):this.rotateInstructions_.update()),this.orientationHandler=this.onOrientationChange_.bind(this),window.addEventListener("orientationchange",this.orientationHandler),this.vrdisplaypresentchangeHandler=this.updateBounds_.bind(this),window.addEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler),this.fireVRDisplayDeviceParamsChange_())},me.prototype.endPresent_=function(){this.distorter_&&(this.distorter_.destroy(),this.distorter_=null),this.cardboardUI_&&(this.cardboardUI_.destroy(),this.cardboardUI_=null),this.rotateInstructions_&&this.rotateInstructions_.hide(),this.viewerSelector_.hide(),window.removeEventListener("orientationchange",this.orientationHandler),window.removeEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler)},me.prototype.updatePresent_=function(){this.endPresent_(),this.beginPresent_()},me.prototype.submitFrame=function(e){if(this.distorter_)this.updateBounds_(),this.distorter_.submitFrame();else if(this.cardboardUI_&&this.layer_){var t=this.layer_.source.getContext("webgl");t||(t=this.layer_.source.getContext("experimental-webgl")),t||(t=this.layer_.source.getContext("webgl2"));var n=t.canvas;n.width==this.lastWidth&&n.height==this.lastHeight||this.cardboardUI_.onResize(),this.lastWidth=n.width,this.lastHeight=n.height,this.cardboardUI_.render()}},me.prototype.onOrientationChange_=function(e){this.viewerSelector_.hide(),this.rotateInstructions_&&this.rotateInstructions_.update(),this.onResize_()},me.prototype.onResize_=function(e){if(this.layer_){var t=this.layer_.source.getContext("webgl");t||(t=this.layer_.source.getContext("experimental-webgl")),t||(t=this.layer_.source.getContext("webgl2")),t.canvas.setAttribute("style",["position: absolute","top: 0","left: 0","width: 100vw","height: 100vh","border: 0","margin: 0","padding: 0px","box-sizing: content-box"].join("; ")+";"),w(t.canvas)}},me.prototype.onViewerChanged_=function(e){this.deviceInfo_.setViewer(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_),this.fireVRDisplayDeviceParamsChange_()},me.prototype.fireVRDisplayDeviceParamsChange_=function(){var e=new CustomEvent("vrdisplaydeviceparamschange",{detail:{vrdisplay:this,deviceInfo:this.deviceInfo_}});window.dispatchEvent(e)},me.VRFrameData=function(){this.leftProjectionMatrix=new Float32Array(16),this.leftViewMatrix=new Float32Array(16),this.rightProjectionMatrix=new Float32Array(16),this.rightViewMatrix=new Float32Array(16),this.pose=null},me.VRDisplay=he,me}()})),s=(t=a)&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,l={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:"",PROVIDE_MOBILE_VRDISPLAY:!0,MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1};function c(e){this.config=o(o({},l),e),this.polyfillDisplays=[],this.enabled=!1,this.hasNative="getVRDisplays"in navigator,this.native={},this.native.getVRDisplays=navigator.getVRDisplays,this.native.VRFrameData=window.VRFrameData,this.native.VRDisplay=window.VRDisplay,(!this.hasNative||this.config.PROVIDE_MOBILE_VRDISPLAY&&r())&&(this.enable(),this.getVRDisplays().then((function(e){e&&e[0]&&e[0].fireVRDisplayConnect_&&e[0].fireVRDisplayConnect_()})))}c.prototype.getPolyfillDisplays=function(){if(this._polyfillDisplaysPopulated)return this.polyfillDisplays;if(r()){var e=new s({ADDITIONAL_VIEWERS:this.config.ADDITIONAL_VIEWERS,DEFAULT_VIEWER:this.config.DEFAULT_VIEWER,MOBILE_WAKE_LOCK:this.config.MOBILE_WAKE_LOCK,DEBUG:this.config.DEBUG,DPDB_URL:this.config.DPDB_URL,CARDBOARD_UI_DISABLED:this.config.CARDBOARD_UI_DISABLED,K_FILTER:this.config.K_FILTER,PREDICTION_TIME_S:this.config.PREDICTION_TIME_S,ROTATE_INSTRUCTIONS_DISABLED:this.config.ROTATE_INSTRUCTIONS_DISABLED,YAW_ONLY:this.config.YAW_ONLY,BUFFER_SCALE:this.config.BUFFER_SCALE,DIRTY_SUBMIT_FRAME_BINDINGS:this.config.DIRTY_SUBMIT_FRAME_BINDINGS});this.polyfillDisplays.push(e)}return this._polyfillDisplaysPopulated=!0,this.polyfillDisplays},c.prototype.enable=function(){if(this.enabled=!0,this.hasNative&&this.native.VRFrameData){var e=this.native.VRFrameData,t=new this.native.VRFrameData,n=this.native.VRDisplay.prototype.getFrameData;window.VRDisplay.prototype.getFrameData=function(r){r instanceof e?n.call(this,r):(n.call(this,t),r.pose=t.pose,i(t.leftProjectionMatrix,r.leftProjectionMatrix),i(t.rightProjectionMatrix,r.rightProjectionMatrix),i(t.leftViewMatrix,r.leftViewMatrix),i(t.rightViewMatrix,r.rightViewMatrix))}}navigator.getVRDisplays=this.getVRDisplays.bind(this),window.VRDisplay=s.VRDisplay,window.VRFrameData=s.VRFrameData},c.prototype.getVRDisplays=function(){var e=this;return this.config,this.hasNative?this.native.getVRDisplays.call(navigator).then((function(t){return t.length>0?t:e.getPolyfillDisplays()})):Promise.resolve(this.getPolyfillDisplays())},c.version="0.10.12",c.VRFrameData=s.VRFrameData,c.VRDisplay=s.VRDisplay;var u=Object.freeze({default:c}),h=u&&c||u;return"undefined"!==typeof n&&n.window&&(n.document||(n.document=n.window.document),n.navigator||(n.navigator=n.window.navigator)),h}))}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],69:[function(e,t,n){var r=/\n/,i=/\s/;function o(e,t,n,r){var i=e.indexOf(t,n);return-1===i||i>r?r:i}function a(e){return i.test(e)}function s(e,t,n,r){return{start:t,end:t+Math.min(r,n-t)}}t.exports=function(e,n){return t.exports.lines(e,n).map((function(t){return e.substring(t.start,t.end)})).join("\n")},t.exports.lines=function(e,t){if(0===(t=t||{}).width&&"nowrap"!==t.mode)return[];e=e||"";var n="number"===typeof t.width?t.width:Number.MAX_VALUE,i=Math.max(0,t.start||0),l="number"===typeof t.end?t.end:e.length,c=t.mode,u=t.measure||s;return"pre"===c?function(e,t,n,i,o){for(var a=[],s=n,l=n;l<i&&l<t.length;l++){var c=t.charAt(l),u=r.test(c);if(u||l===i-1){var h=e(t,s,u?l:l+1,o);a.push(h),s=l+1}}return a}(u,e,i,l,n):function(e,t,n,r,i,s){var l=[],c=i;for("nowrap"===s&&(c=Number.MAX_VALUE);n<r&&n<t.length;){for(var u=o(t,"\n",n,r);n<u&&a(t.charAt(n));)n++;var h=e(t,n,u,c),d=n+(h.end-h.start),f=d+"\n".length;if(d<u){for(;d>n&&!a(t.charAt(d));)d--;if(d===n)f>n+"\n".length&&f--,d=f;else for(f=d;d>n&&a(t.charAt(d-"\n".length));)d--}if(d>=n){var p=e(t,n,d,c);l.push(p)}n=f}return l}(u,e,i,l,n,c)}},{}],70:[function(t,n,r){"use strict";var i=t("global/window"),o=t("is-function"),a=t("parse-headers"),s=t("xtend");function l(e,t,n){var r=e;return o(t)?(n=t,"string"===typeof e&&(r={uri:e})):r=s(t,{uri:e}),r.callback=n,r}function c(e,t,n){return u(t=l(e,t,n))}function u(t){if("undefined"===typeof t.callback)throw new Error("callback argument missing");var n=!1,r=function(e,r,i){n||(n=!0,t.callback(e,r,i))};function i(){var t=void 0;if(t=h.response?h.response:h.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var n=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!n)return t.responseXML}catch(e){}return null}(h),y)try{t=JSON.parse(t)}catch(e){}return t}function o(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,b)}function s(){if(!u){var e;clearTimeout(d),e=t.useXDR&&void 0===h.status?200:1223===h.status?204:h.status;var n=b,o=null;return 0!==e?(n={body:i(),statusCode:e,method:p,headers:{},url:f,rawRequest:h},h.getAllResponseHeaders&&(n.headers=a(h.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),r(o,n,n.body)}}var l,u,h=t.xhr||null;h||(h=t.cors||t.useXDR?new c.XDomainRequest:new c.XMLHttpRequest);var d,f=h.url=t.uri||t.url,p=h.method=t.method||"GET",m=t.body||t.data,g=h.headers=t.headers||{},v=!!t.sync,y=!1,b={body:void 0,headers:{},statusCode:0,method:p,url:f,rawRequest:h};if("json"in t&&!1!==t.json&&(y=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),m=JSON.stringify(!0===t.json?m:t.json))),h.onreadystatechange=function(){4===h.readyState&&setTimeout(s,0)},h.onload=s,h.onerror=o,h.onprogress=function(){},h.onabort=function(){u=!0},h.ontimeout=o,h.open(p,f,!v,t.username,t.password),v||(h.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(d=setTimeout((function(){if(!u){u=!0,h.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",o(e)}}),t.timeout)),h.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&h.setRequestHeader(l,g[l]);else if(t.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(h.responseType=t.responseType),"beforeSend"in t&&"function"===typeof t.beforeSend&&t.beforeSend(h),h.send(m||null),h}n.exports=c,n.exports.default=c,c.XMLHttpRequest=i.XMLHttpRequest||function(){},c.XDomainRequest="withCredentials"in new c.XMLHttpRequest?c.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){c["delete"===e?"del":e]=function(t,n,r){return(n=l(t,n,r)).method=e.toUpperCase(),u(n)}}))},{"global/window":27,"is-function":33,"parse-headers":47,xtend:72}],71:[function(e,t,n){t.exports="undefined"!==typeof self.DOMParser?function(e){return(new self.DOMParser).parseFromString(e,"application/xml")}:"undefined"!==typeof self.ActiveXObject&&new self.ActiveXObject("Microsoft.XMLDOM")?function(e){var t=new self.ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t}:function(e){var t=document.createElement("div");return t.innerHTML=e,t}},{}],72:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty},{}],73:[function(e,t,n){t.exports={name:"aframe",version:"1.2.0",description:"A web framework for building virtual reality experiences.",homepage:"https://aframe.io/",main:"dist/aframe-master.js",scripts:{browserify:"browserify src/index.js -s 'AFRAME' -p browserify-derequire",build:"shx mkdir -p build/ && npm run browserify -- --debug -t [ envify --INSPECTOR_VERSION dev ] -o build/aframe.js",codecov:"codecov",dev:"npm run build && cross-env INSPECTOR_VERSION=dev node ./scripts/budo -t envify",dist:"node scripts/updateVersionLog.js && npm run dist:min && npm run dist:max","dist:max":"npm run browserify -s -- --debug | exorcist dist/aframe-master.js.map > dist/aframe-master.js","dist:min":"npm run browserify -s -- --debug -p [ minifyify --map aframe-master.min.js.map --output dist/aframe-master.min.js.map ] -o dist/aframe-master.min.js",docs:"markserv --dir docs --port 9001",preghpages:"node ./scripts/preghpages.js",ghpages:"ghpages -p gh-pages/",lint:"semistandard -v | snazzy","lint:fix":"semistandard --fix",precommit:"npm run lint",prepush:"node scripts/testOnlyCheck.js",prerelease:"node scripts/release.js 1.0.4 1.1.0",start:"npm run dev","start:https":"cross-env SSL=true npm run dev",test:"karma start ./tests/karma.conf.js","test:docs":"node scripts/docsLint.js","test:firefox":"npm test -- --browsers Firefox","test:chrome":"npm test -- --browsers Chrome","test:nobrowser":"NO_BROWSER=true npm test","test:node":"mocha --ui tdd tests/node"},repository:"aframevr/aframe",license:"MIT",files:["dist/*","docs/**/*","src/**/*","vendor/**/*"],dependencies:{"custom-event-polyfill":"^1.0.6",debug:"ngokevin/debug#noTimestamp","deep-assign":"^2.0.0","document-register-element":"dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90","load-bmfont":"^1.2.3","object-assign":"^4.0.1",present:"0.0.6","promise-polyfill":"^3.1.0","super-animejs":"^3.1.0","super-three":"^0.125.1","three-bmfont-text":"dmarcos/three-bmfont-text#1babdf8507c731a18f8af3b807292e2b9740955e","webvr-polyfill":"^0.10.12"},devDependencies:{browserify:"^13.1.0","browserify-css":"^0.8.4","browserify-derequire":"^0.9.4","browserify-istanbul":"^2.0.0",budo:"^9.2.0",chai:"^3.5.0","chai-shallow-deep-equal":"^1.4.0",chalk:"^1.1.3",codecov:"^1.0.1","cross-env":"^5.0.1",envify:"^3.4.1",exorcist:"^0.4.0",ghpages:"0.0.8","git-rev":"^0.2.1",glob:"^7.1.1",husky:"^0.11.7",istanbul:"^0.4.5",jsdom:"^9.11.0",karma:"1.4.1","karma-browserify":"^5.1.0","karma-chai-shallow-deep-equal":"0.0.4","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.1.1","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.2.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.1.0","karma-sinon-chai":"1.2.4",lolex:"^1.5.1",markserv:"github:sukima/markserv#feature/fix-broken-websoketio-link",minifyify:"^7.3.3",mocha:"^3.0.2","mozilla-download":"^1.1.1","replace-in-file":"^2.5.3",semistandard:"^9.0.0",shelljs:"^0.7.7",shx:"^0.2.2",sinon:"^1.17.5","sinon-chai":"2.8.0",snazzy:"^5.0.0","too-wordy":"ngokevin/too-wordy",uglifyjs:"^2.4.10","write-good":"^0.9.1"},link:!0,browserify:{transform:["browserify-css","envify"]},semistandard:{ignore:["build/**","dist/**","examples/**/shaders/*.js","**/vendor/**"]},keywords:["3d","aframe","cardboard","components","oculus","three","three.js","rift","vive","vr","web-components","webvr"],"browserify-css":{minify:!0},engines:{node:">= 4.6.0",npm:"^2.15.9"}}},{}],74:[function(e,t,n){var r=e("super-animejs"),i=e("../core/component").components,o=e("../core/component").registerComponent,a=e("../lib/three"),s=e("../utils"),l=new a.Color,c=new a.Color,u=s.entity.getComponentProperty,h=s.entity.setComponentProperty,d={};function f(e){e.x=a.Math.degToRad(e.x),e.y=a.Math.degToRad(e.y),e.z=a.Math.degToRad(e.z)}function p(e,t,n){var r;for(r=0;r<t.length;r++)e.addEventListener(t[r],n)}function m(e,t,n){var r;for(r=0;r<t.length;r++)e.removeEventListener(t[r],n)}function g(e,t){var n,r,i;for(r=y(t),i=e,n=0;n<r.length;n++)i=i[r[n]];if(void 0===i)throw console.log(e),new Error("[animation] property ("+t+") could not be found");return i}function v(e,t,n,r){var i,o,s,l;for(t.startsWith("object3D.rotation")&&(n=a.Math.degToRad(n)),o=y(t),l=e,i=0;i<o.length-1;i++)l=l[o[i]];s=o[o.length-1],"color"!==r?l[s]=n:"r"in l[s]?(l[s].r=n.r,l[s].g=n.g,l[s].b=n.b):(l[s].x=n.r,l[s].y=n.g,l[s].z=n.b)}function y(e){return e in d||(d[e]=e.split(".")),d[e]}function b(e){return e.isRawProperty||e.property.startsWith("components")||e.property.startsWith("object3D")}t.exports.Component=o("animation",{schema:{autoplay:{default:!0},delay:{default:0},dir:{default:""},dur:{default:1e3},easing:{default:"easeInQuad"},elasticity:{default:400},enabled:{default:!0},from:{default:""},loop:{default:0,parse:function(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&parseInt(e,10)}},property:{default:""},startEvents:{type:"array"},pauseEvents:{type:"array"},resumeEvents:{type:"array"},round:{default:!1},to:{default:""},type:{default:""},isRawProperty:{default:!1}},multiple:!0,init:function(){var e=this;this.eventDetail={name:this.attrName},this.time=0,this.animation=null,this.animationIsPlaying=!1,this.onStartEvent=this.onStartEvent.bind(this),this.beginAnimation=this.beginAnimation.bind(this),this.pauseAnimation=this.pauseAnimation.bind(this),this.resumeAnimation=this.resumeAnimation.bind(this),this.fromColor={},this.toColor={},this.targets={},this.targetsArray=[],this.updateConfigForDefault=this.updateConfigForDefault.bind(this),this.updateConfigForRawColor=this.updateConfigForRawColor.bind(this),this.config={complete:function(){e.animationIsPlaying=!1,e.el.emit("animationcomplete",e.eventDetail,!1),e.id&&e.el.emit("animationcomplete__"+e.id,e.eventDetail,!1)}}},update:function(e){var t=this.config,n=this.data;this.animationIsPlaying=!1,this.data.enabled&&n.property&&(t.autoplay=!1,t.direction=n.dir,t.duration=n.dur,t.easing=n.easing,t.elasticity=n.elasticity,t.loop=n.loop,t.round=n.round,this.createAndStartAnimation())},tick:function(e,t){this.animationIsPlaying&&(this.time+=t,this.animation.tick(this.time))},remove:function(){this.pauseAnimation(),this.removeEventListeners()},pause:function(){this.paused=!0,this.pausedWasPlaying=this.animationIsPlaying,this.pauseAnimation(),this.removeEventListeners()},play:function(){this.paused&&(this.paused=!1,this.addEventListeners(),this.pausedWasPlaying&&(this.resumeAnimation(),this.pausedWasPlaying=!1))},createAndStartAnimation:function(){var e=this.data;this.updateConfig(),this.animationIsPlaying=!1,this.animation=r(this.config),this.animation.began=!0,this.removeEventListeners(),this.addEventListeners(),!e.autoplay||e.startEvents&&e.startEvents.length||(e.delay?setTimeout(this.beginAnimation,e.delay):this.beginAnimation())},beginAnimation:function(){this.updateConfig(),this.animation.began=!0,this.time=0,this.animationIsPlaying=!0,this.stopRelatedAnimations(),this.el.emit("animationbegin",this.eventDetail,!1)},pauseAnimation:function(){this.animationIsPlaying=!1},resumeAnimation:function(){this.animationIsPlaying=!0},onStartEvent:function(){this.data.enabled&&(this.updateConfig(),this.animation&&this.animation.pause(),this.animation=r(this.config),this.data.delay?setTimeout(this.beginAnimation,this.data.delay):this.beginAnimation())},updateConfigForRawColor:function(){var e,t,n,r=this.config,i=this.data,o=this.el;if(!this.waitComponentInitRawProperty(this.updateConfigForRawColor)){for(t in e=""===i.from?g(o,i.property):i.from,n=i.to,this.setColorConfig(e,n),e=this.fromColor,n=this.toColor,this.targetsArray.length=0,this.targetsArray.push(e),r.targets=this.targetsArray,n)r[t]=n[t];r.update=function(){var e={};return function(t){var n;(n=t.animatables[0].target).r===e.r&&n.g===e.g&&n.b===e.b||v(o,i.property,n,i.type)}}()}},updateConfigForDefault:function(){var e,t,n,r=this.config,i=this.data,o=this.el;this.waitComponentInitRawProperty(this.updateConfigForDefault)||(e=""===i.from?b(i)?g(o,i.property):u(o,i.property):i.from,n=i.to,isNaN(e||n)?(e=e?e.toString():e,n=n?n.toString():n):(e=parseFloat(e),n=parseFloat(n)),(t="true"===i.to||"false"===i.to||!0===i.to||!1===i.to)&&(e="true"===i.from||!0===i.from?1:0,n="true"===i.to||!0===i.to?1:0),this.targets.aframeProperty=e,r.targets=this.targets,r.aframeProperty=n,r.update=function(){var e;return function(n){var r;(r=n.animatables[0].target.aframeProperty)!==e&&(e=r,t&&(r=r>=1),b(i)?v(o,i.property,r,i.type):h(o,i.property,r))}}())},updateConfigForVector:function(){var e,t,n,r=this.config,i=this.data,o=this.el;for(e in t=""!==i.from?s.coordinates.parse(i.from):u(o,i.property),n=s.coordinates.parse(i.to),"rotation"===i.property&&(f(t),f(n)),this.targetsArray.length=0,this.targetsArray.push(t),r.targets=this.targetsArray,n)r[e]=n[e];"position"!==i.property&&"rotation"!==i.property&&"scale"!==i.property?r.update=function(){var e={};return function(t){var n=t.animatables[0].target;n.x===e.x&&n.y===e.y&&n.z===e.z||(e.x=n.x,e.y=n.y,e.z=n.z,h(o,i.property,n))}}():r.update=function(){var e={};return function(t){var n=t.animatables[0].target;"scale"===i.property&&(n.x=Math.max(1e-4,n.x),n.y=Math.max(1e-4,n.y),n.z=Math.max(1e-4,n.z)),n.x===e.x&&n.y===e.y&&n.z===e.z||(e.x=n.x,e.y=n.y,e.z=n.z,o.object3D[i.property].set(n.x,n.y,n.z))}}()},updateConfig:function(){var e;e=function(e,t){var n,r,o,a;return o=t.split("."),r=o[0],a=o[1],(n=e.components[r]||i[r])?a&&!n.schema[a]?null:a?n.schema[a].type:n.schema.type:null}(this.el,this.data.property),b(this.data)&&"color"===this.data.type?this.updateConfigForRawColor():"vec2"===e||"vec3"===e||"vec4"===e?this.updateConfigForVector():this.updateConfigForDefault()},waitComponentInitRawProperty:function(e){var t,n=this.data,i=this.el,o=this;return""===n.from&&!!n.property.startsWith("components")&&(t=y(n.property)[1],!i.components[t]&&(i.addEventListener("componentinitialized",(function n(a){a.detail.name===t&&(e(),o.animation=r(o.config),i.removeEventListener("componentinitialized",n))})),!0))},stopRelatedAnimations:function(){var e,t;for(t in this.el.components)e=this.el.components[t],t!==this.attrName&&"animation"===e.name&&e.animationIsPlaying&&e.data.property===this.data.property&&(e.animationIsPlaying=!1)},addEventListeners:function(){var e=this.data,t=this.el;p(t,e.startEvents,this.onStartEvent),p(t,e.pauseEvents,this.pauseAnimation),p(t,e.resumeEvents,this.resumeAnimation)},removeEventListeners:function(){var e=this.data,t=this.el;m(t,e.startEvents,this.onStartEvent),m(t,e.pauseEvents,this.pauseAnimation),m(t,e.resumeEvents,this.resumeAnimation)},setColorConfig:function(e,t){l.set(e),c.set(t),e=this.fromColor,t=this.toColor,e.r=l.r,e.g=l.g,e.b=l.b,t.r=c.r,t.g=c.g,t.b=c.b}})},{"../core/component":131,"../lib/three":179,"../utils":205,"super-animejs":56}],75:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three");t.exports.Component=r("camera",{schema:{active:{default:!0},far:{default:1e4},fov:{default:80,min:0},near:{default:.005,min:0},spectator:{default:!1},zoom:{default:1,min:0}},init:function(){var e,t=this.el;e=this.camera=new i.PerspectiveCamera,t.setObject3D("camera",e)},update:function(e){var t=this.data,n=this.camera;n.aspect=t.aspect||window.innerWidth/window.innerHeight,n.far=t.far,n.fov=t.fov,n.near=t.near,n.zoom=t.zoom,n.updateProjectionMatrix(),this.updateActiveCamera(e),this.updateSpectatorCamera(e)},updateActiveCamera:function(e){var t=this.data,n=this.el,r=this.system;e&&e.active===t.active||t.spectator||(t.active&&r.activeCameraEl!==n?r.setActiveCamera(n):t.active||r.activeCameraEl!==n||r.disableActiveCamera())},updateSpectatorCamera:function(e){var t=this.data,n=this.el,r=this.system;e&&e.spectator===t.spectator||(t.spectator&&r.spectatorCameraEl!==n?r.setSpectatorCamera(n):t.spectator||r.spectatorCameraEl!==n||r.disableSpectatorCamera())},remove:function(){this.el.removeObject3D("camera")}})},{"../core/component":131,"../lib/three":179}],76:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/"),o=i.bind,a="click",s="fusing",l="mouseenter",c="mousedown",u="mouseleave",h="mouseup",d="cursor-fusing",f="cursor-hovering",p="cursor-hovered",m={DOWN:["mousedown","touchstart"],UP:["mouseup","touchend"]},g={DOWN:["selectstart"],UP:["selectend"]};t.exports.Component=r("cursor",{dependencies:["raycaster"],schema:{downEvents:{default:[]},fuse:{default:i.device.isMobile()},fuseTimeout:{default:1500,min:0},mouseCursorStylesEnabled:{default:!0},upEvents:{default:[]},rayOrigin:{default:"entity",oneOf:["mouse","entity"]}},init:function(){var e=this;this.fuseTimeout=void 0,this.cursorDownEl=null,this.intersectedEl=null,this.canvasBounds=document.body.getBoundingClientRect(),this.isCursorDown=!1,this.updateCanvasBounds=i.debounce((function(){e.canvasBounds=e.el.sceneEl.canvas.getBoundingClientRect()}),500),this.eventDetail={},this.intersectedEventDetail={cursorEl:this.el},this.onCursorDown=o(this.onCursorDown,this),this.onCursorUp=o(this.onCursorUp,this),this.onIntersection=o(this.onIntersection,this),this.onIntersectionCleared=o(this.onIntersectionCleared,this),this.onMouseMove=o(this.onMouseMove,this),this.onEnterVR=o(this.onEnterVR,this)},update:function(e){this.data.rayOrigin!==e.rayOrigin&&this.updateMouseEventListeners()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){var e=this.el;e.removeState(f),e.removeState(d),clearTimeout(this.fuseTimeout),this.intersectedEl&&this.intersectedEl.removeState(p),this.removeEventListeners()},addEventListeners:function(){var e,t=this.data,n=this.el,r=this;function i(){e=n.sceneEl.canvas,t.downEvents.length||t.upEvents.length||(m.DOWN.forEach((function(t){e.addEventListener(t,r.onCursorDown)})),m.UP.forEach((function(t){e.addEventListener(t,r.onCursorUp)})))}(e=n.sceneEl.canvas)?i():n.sceneEl.addEventListener("render-target-loaded",i),t.downEvents.forEach((function(e){n.addEventListener(e,r.onCursorDown)})),t.upEvents.forEach((function(e){n.addEventListener(e,r.onCursorUp)})),n.addEventListener("raycaster-intersection",this.onIntersection),n.addEventListener("raycaster-intersection-cleared",this.onIntersectionCleared),n.sceneEl.addEventListener("rendererresize",this.updateCanvasBounds),n.sceneEl.addEventListener("enter-vr",this.onEnterVR),window.addEventListener("resize",this.updateCanvasBounds),window.addEventListener("scroll",this.updateCanvasBounds),this.updateMouseEventListeners()},removeEventListeners:function(){var e,t=this.data,n=this.el,r=this;!(e=n.sceneEl.canvas)||t.downEvents.length||t.upEvents.length||(m.DOWN.forEach((function(t){e.removeEventListener(t,r.onCursorDown)})),m.UP.forEach((function(t){e.removeEventListener(t,r.onCursorUp)}))),t.downEvents.forEach((function(e){n.removeEventListener(e,r.onCursorDown)})),t.upEvents.forEach((function(e){n.removeEventListener(e,r.onCursorUp)})),n.removeEventListener("raycaster-intersection",this.onIntersection),n.removeEventListener("raycaster-intersection-cleared",this.onIntersectionCleared),e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("touchstart",this.onMouseMove),e.removeEventListener("touchmove",this.onMouseMove),n.sceneEl.removeEventListener("rendererresize",this.updateCanvasBounds),n.sceneEl.removeEventListener("enter-vr",this.onEnterVR),window.removeEventListener("resize",this.updateCanvasBounds),window.removeEventListener("scroll",this.updateCanvasBounds)},updateMouseEventListeners:function(){var e,t=this.el;(e=t.sceneEl.canvas).removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("touchmove",this.onMouseMove),t.setAttribute("raycaster","useWorldCoordinates",!1),"mouse"===this.data.rayOrigin&&(e.addEventListener("mousemove",this.onMouseMove,!1),e.addEventListener("touchmove",this.onMouseMove,!1),t.setAttribute("raycaster","useWorldCoordinates",!0),this.updateCanvasBounds())},onMouseMove:function(){var e=new THREE.Vector3,t=new THREE.Vector2,n=new THREE.Vector3,r={origin:n,direction:e};return function(i){var o,a,s,l=this.canvasBounds,c=this.el.sceneEl.camera;c.parent.updateMatrixWorld(),o=(a="touchmove"===i.type||"touchstart"===i.type?i.touches.item(0):i).clientX-l.left,s=a.clientY-l.top,t.x=o/l.width*2-1,t.y=-s/l.height*2+1,n.setFromMatrixPosition(c.matrixWorld),e.set(t.x,t.y,.5).unproject(c).sub(n).normalize(),this.el.setAttribute("raycaster",r),"touchmove"===i.type&&i.preventDefault()}}(),onCursorDown:function(e){this.isCursorDown=!0,"mouse"===this.data.rayOrigin&&"touchstart"===e.type&&(this.onMouseMove(e),this.el.components.raycaster.checkIntersections(),e.preventDefault()),this.twoWayEmit(c),this.cursorDownEl=this.intersectedEl},onCursorUp:function(e){if(this.isCursorDown){this.isCursorDown=!1;var t=this.data;this.twoWayEmit(h),this.cursorDownEl&&this.cursorDownEl!==this.intersectedEl&&(this.intersectedEventDetail.intersection=null,this.cursorDownEl.emit(h,this.intersectedEventDetail)),t.fuse&&"mouse"!==t.rayOrigin||!this.intersectedEl||this.cursorDownEl!==this.intersectedEl||this.twoWayEmit(a),this.cursorDownEl=null,"touchend"===e.type&&e.preventDefault()}},onIntersection:function(e){var t,n,r,i,o=this.el;n=e.detail.els[0]===o?1:0,i=e.detail.intersections[n],(r=e.detail.els[n])&&this.intersectedEl!==r&&(this.intersectedEl&&(t=this.el.components.raycaster.getIntersection(this.intersectedEl))&&t.distance<=i.distance||(this.clearCurrentIntersection(!0),this.setIntersection(r,i)))},onIntersectionCleared:function(e){-1!==e.detail.clearedEls.indexOf(this.intersectedEl)&&this.clearCurrentIntersection()},onEnterVR:function(){this.clearCurrentIntersection(!0);var e=this.el.sceneEl.xrSession,t=this;e&&"mouse"!==this.data.rayOrigin&&(g.DOWN.forEach((function(n){e.addEventListener(n,t.onCursorDown)})),g.UP.forEach((function(n){e.addEventListener(n,t.onCursorUp)})))},setIntersection:function(e,t){var n=this.el,r=this.data,i=this;this.intersectedEl!==e&&(this.intersectedEl=e,n.addState(f),e.addState(p),this.twoWayEmit(l),this.data.mouseCursorStylesEnabled&&"mouse"===this.data.rayOrigin&&this.el.sceneEl.canvas.classList.add("a-mouse-cursor-hover"),0!==r.fuseTimeout&&r.fuse&&(n.addState(d),this.twoWayEmit(s),this.fuseTimeout=setTimeout((function(){n.removeState(d),i.twoWayEmit(a)}),r.fuseTimeout)))},clearCurrentIntersection:function(e){var t,n,r=this.el;this.intersectedEl&&(this.intersectedEl.removeState(p),r.removeState(f),r.removeState(d),this.twoWayEmit(u),this.data.mouseCursorStylesEnabled&&"mouse"===this.data.rayOrigin&&this.el.sceneEl.canvas.classList.remove("a-mouse-cursor-hover"),this.intersectedEl=null,clearTimeout(this.fuseTimeout),!0!==e&&0!==(n=this.el.components.raycaster.intersections).length&&(t=n[n[0].object.el===r?1:0])&&this.setIntersection(t.object.el,t))},twoWayEmit:function(e){var t,n=this.el,r=this.intersectedEl;t=this.el.components.raycaster.getIntersection(r),this.eventDetail.intersectedEl=r,this.eventDetail.intersection=t,n.emit(e,this.eventDetail),r&&(this.intersectedEventDetail.intersection=t,r.emit(e,this.intersectedEventDetail))}})},{"../core/component":131,"../utils/":205}],77:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"google-daydream":"Daydream Controller",h=c?{axes:{touchpad:[0,1]},buttons:["none","none","touchpad","menu","system"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","menu","system"]};t.exports.Component=r("daydream-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#000000"},buttonTouchedColor:{type:"color",default:"#777777"},buttonHighlightColor:{type:"color",default:"#FFFFFF"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,id:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/google/vr_controller_daydream.obj",mtl:"https://cdn.aframe.io/controllers/google/vr_controller_daydream.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).menu=n.getObjectByName("AppButton_AppButton_Cylinder.004"),t.system=n.getObjectByName("HomeButton_HomeButton_Cylinder.005"),t.trackpad=n.getObjectByName("TouchPad_TouchPad_Cylinder.003"),t.touchpad=n.getObjectByName("TouchPad_TouchPad_Cylinder.003"),n.position.set(0,0,-.04))},onAxisMoved:function(e){s(this,this.mapping.axes,e)},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}n[e].material.color.set(r)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],78:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"samsung-gearvr":"Gear VR",h=c?{axes:{touchpad:[0,1]},buttons:["trigger","none","touchpad","none","menu"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]};t.exports.Component=r("gearvr-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#000000"},buttonTouchedColor:{type:"color",default:"#777777"},buttonHighlightColor:{type:"color",default:"#FFFFFF"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,id:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/samsung/gear_vr_controller.obj",mtl:"https://cdn.aframe.io/controllers/samsung/gear_vr_controller.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.children[2],t.trackpad=n.children[1],t.touchpad=n.children[1])},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}n[e].material.color.set(r)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],79:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=r("generic-tracked-controller-controls",{schema:{hand:{default:""},defaultModel:{default:!0},defaultModelColor:{default:"gray"},orientationOffset:{type:"vec3"},disabled:{default:!1}},mapping:{axes:{touchpad:[0,1],thumbstick:[2,3]},buttons:["trigger","squeeze","touchpad","thumbstick"]},bindMethods:function(){this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.wasControllerConnected=!1,this.lastControllerCheck=0,this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods(),this.el.addEventListener("controllerconnected",(function(t){t.detail.name!==e.name&&(e.wasControllerConnected=!0,e.removeEventListeners(),e.removeControllersUpdateListener())}))},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data,t=e.hand?e.hand:void 0;a(this,"generic",{hand:t,iterateControllerProfiles:!0})},play:function(){this.wasControllerConnected||(this.checkIfControllerPresent(),this.addControllersUpdateListener())},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;this.el.components["tracked-controls"]?this.removeEventListeners():(e.setAttribute("tracked-controls",{hand:t.hand,idPrefix:"generic",orientationOffset:t.orientationOffset,iterateControllerProfiles:!0}),this.data.defaultModel&&this.initDefaultModel())},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},initDefaultModel:function(){var e=this.modelEl=document.createElement("a-entity");e.setAttribute("geometry",{primitive:"sphere",radius:.03}),e.setAttribute("material",{color:this.data.color}),this.el.appendChild(e)}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],80:[function(e,t,n){var r=e("../core/geometry").geometries,i=e("../core/geometry").geometryNames,o=e("../core/component").registerComponent,a=e("../lib/three"),s=new a.BufferGeometry;t.exports.Component=o("geometry",{schema:{buffer:{default:!0},primitive:{default:"box",oneOf:i,schemaChange:!0},skipCache:{default:!1}},init:function(){this.geometry=null},update:function(e){var t,n=this.data,r=this.el,i=this.system;this.geometry&&(i.unuseGeometry(e),this.geometry=null),this.geometry=i.getOrCreateGeometry(n),(t=r.getObject3D("mesh"))?t.geometry=this.geometry:((t=new a.Mesh).geometry=this.geometry,this.el.getAttribute("material")||(t.material=new a.MeshStandardMaterial({color:16777215*Math.random(),metalness:0,roughness:.5})),r.setObject3D("mesh",t))},remove:function(){this.system.unuseGeometry(this.data),this.el.getObject3D("mesh").geometry=s,this.geometry=null},updateSchema:function(e){var t=this.oldData&&this.oldData.primitive,n=e.primitive,i=r[n]&&r[n].schema;if(!i)throw new Error("Unknown geometry schema `"+n+"`");t&&t===n||this.extendSchema(i)}})},{"../core/component":131,"../core/geometry":132,"../lib/three":179}],81:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/").debug("components:gltf-model:warn");t.exports.Component=r("gltf-model",{schema:{type:"model"},init:function(){var e=this.system.getDRACOLoader();this.model=null,this.loader=new i.GLTFLoader,e&&this.loader.setDRACOLoader(e)},update:function(){var e=this,t=this.el,n=this.data;n&&(this.remove(),this.loader.load(n,(function(n){e.model=n.scene||n.scenes[0],e.model.animations=n.animations,t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"gltf",model:e.model})}),void 0,(function(e){var r=e&&e.message?e.message:"Failed to load glTF model";o(r),t.emit("model-error",{format:"gltf",src:n})})))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],82:[function(e,t,n){var r=e("../core/component").registerComponent,i={toonLeft:"https://cdn.aframe.io/controllers/hands/leftHand.glb",toonRight:"https://cdn.aframe.io/controllers/hands/rightHand.glb",lowPolyLeft:"https://cdn.aframe.io/controllers/hands/leftHandLow.glb",lowPolyRight:"https://cdn.aframe.io/controllers/hands/rightHandLow.glb",highPolyLeft:"https://cdn.aframe.io/controllers/hands/leftHandHigh.glb",highPolyRight:"https://cdn.aframe.io/controllers/hands/rightHandHigh.glb"},o="Open",a="Point",s="Point + Thumb",l="Fist",c="Hold",u="Thumb Up",h={};function d(e,t){var n;if(e)return"grip"===(n=h[e])?n+(t?"close":"open"):"point"===n?n+(t?"up":"down"):"pointing"===n||"pistol"===n?n+(t?"start":"end"):void 0}h[l]="grip",h[u]="pistol",h[a]="pointing",t.exports.Component=r("hand-controls",{schema:{color:{default:"white",type:"color"},hand:{default:"left"},handModelStyle:{default:"lowPoly",oneOf:["lowPoly","highPoly","toon"]}},init:function(){var e=this,t=this.el;this.gesture=o,this.pressedButtons={},this.touchedButtons={},this.loader=new THREE.GLTFLoader,this.loader.setCrossOrigin("anonymous"),this.onGripDown=function(){e.handleButton("grip","down")},this.onGripUp=function(){e.handleButton("grip","up")},this.onTrackpadDown=function(){e.handleButton("trackpad","down")},this.onTrackpadUp=function(){e.handleButton("trackpad","up")},this.onTrackpadTouchStart=function(){e.handleButton("trackpad","touchstart")},this.onTrackpadTouchEnd=function(){e.handleButton("trackpad","touchend")},this.onTriggerDown=function(){e.handleButton("trigger","down")},this.onTriggerUp=function(){e.handleButton("trigger","up")},this.onTriggerTouchStart=function(){e.handleButton("trigger","touchstart")},this.onTriggerTouchEnd=function(){e.handleButton("trigger","touchend")},this.onGripTouchStart=function(){e.handleButton("grip","touchstart")},this.onGripTouchEnd=function(){e.handleButton("grip","touchend")},this.onThumbstickDown=function(){e.handleButton("thumbstick","down")},this.onThumbstickUp=function(){e.handleButton("thumbstick","up")},this.onAorXTouchStart=function(){e.handleButton("AorX","touchstart")},this.onAorXTouchEnd=function(){e.handleButton("AorX","touchend")},this.onBorYTouchStart=function(){e.handleButton("BorY","touchstart")},this.onBorYTouchEnd=function(){e.handleButton("BorY","touchend")},this.onSurfaceTouchStart=function(){e.handleButton("surface","touchstart")},this.onSurfaceTouchEnd=function(){e.handleButton("surface","touchend")},this.onControllerConnected=this.onControllerConnected.bind(this),this.onControllerDisconnected=this.onControllerDisconnected.bind(this),t.addEventListener("controllerconnected",this.onControllerConnected),t.addEventListener("controllerdisconnected",this.onControllerDisconnected),t.object3D.visible=!1},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},tick:function(e,t){var n=this.el.getObject3D("mesh");n&&n.mixer&&n.mixer.update(t/1e3)},onControllerConnected:function(){this.el.object3D.visible=!0},onControllerDisconnected:function(){this.el.object3D.visible=!1},addEventListeners:function(){var e=this.el;e.addEventListener("gripdown",this.onGripDown),e.addEventListener("gripup",this.onGripUp),e.addEventListener("trackpaddown",this.onTrackpadDown),e.addEventListener("trackpadup",this.onTrackpadUp),e.addEventListener("trackpadtouchstart",this.onTrackpadTouchStart),e.addEventListener("trackpadtouchend",this.onTrackpadTouchEnd),e.addEventListener("triggerdown",this.onTriggerDown),e.addEventListener("triggerup",this.onTriggerUp),e.addEventListener("triggertouchstart",this.onTriggerTouchStart),e.addEventListener("triggertouchend",this.onTriggerTouchEnd),e.addEventListener("griptouchstart",this.onGripTouchStart),e.addEventListener("griptouchend",this.onGripTouchEnd),e.addEventListener("thumbstickdown",this.onThumbstickDown),e.addEventListener("thumbstickup",this.onThumbstickUp),e.addEventListener("abuttontouchstart",this.onAorXTouchStart),e.addEventListener("abuttontouchend",this.onAorXTouchEnd),e.addEventListener("bbuttontouchstart",this.onBorYTouchStart),e.addEventListener("bbuttontouchend",this.onBorYTouchEnd),e.addEventListener("xbuttontouchstart",this.onAorXTouchStart),e.addEventListener("xbuttontouchend",this.onAorXTouchEnd),e.addEventListener("ybuttontouchstart",this.onBorYTouchStart),e.addEventListener("ybuttontouchend",this.onBorYTouchEnd),e.addEventListener("surfacetouchstart",this.onSurfaceTouchStart),e.addEventListener("surfacetouchend",this.onSurfaceTouchEnd)},removeEventListeners:function(){var e=this.el;e.removeEventListener("gripdown",this.onGripDown),e.removeEventListener("gripup",this.onGripUp),e.removeEventListener("trackpaddown",this.onTrackpadDown),e.removeEventListener("trackpadup",this.onTrackpadUp),e.removeEventListener("trackpadtouchstart",this.onTrackpadTouchStart),e.removeEventListener("trackpadtouchend",this.onTrackpadTouchEnd),e.removeEventListener("triggerdown",this.onTriggerDown),e.removeEventListener("triggerup",this.onTriggerUp),e.removeEventListener("triggertouchstart",this.onTriggerTouchStart),e.removeEventListener("triggertouchend",this.onTriggerTouchEnd),e.removeEventListener("griptouchstart",this.onGripTouchStart),e.removeEventListener("griptouchend",this.onGripTouchEnd),e.removeEventListener("thumbstickdown",this.onThumbstickDown),e.removeEventListener("thumbstickup",this.onThumbstickUp),e.removeEventListener("abuttontouchstart",this.onAorXTouchStart),e.removeEventListener("abuttontouchend",this.onAorXTouchEnd),e.removeEventListener("bbuttontouchstart",this.onBorYTouchStart),e.removeEventListener("bbuttontouchend",this.onBorYTouchEnd),e.removeEventListener("xbuttontouchstart",this.onAorXTouchStart),e.removeEventListener("xbuttontouchend",this.onAorXTouchEnd),e.removeEventListener("ybuttontouchstart",this.onBorYTouchStart),e.removeEventListener("ybuttontouchend",this.onBorYTouchEnd),e.removeEventListener("surfacetouchstart",this.onSurfaceTouchStart),e.removeEventListener("surfacetouchend",this.onSurfaceTouchEnd)},update:function(e){var t,n=this.el,r=this.data.hand,o=this.data.handModelStyle,a=this.data.color,s=this;if(t={hand:r,model:!1},r!==e){var l=i[o+r.charAt(0).toUpperCase()+r.slice(1)];this.loader.load(l,(function(e){var i=e.scene.children[0],o="left"===r?Math.PI/2:-Math.PI/2;i.mixer=new THREE.AnimationMixer(i),s.clips=e.animations,n.setObject3D("mesh",i),i.children[1].material.color=new THREE.Color(a),i.position.set(0,0,0),i.rotation.set(0,0,o),n.setAttribute("magicleap-controls",t),n.setAttribute("vive-controls",t),n.setAttribute("oculus-touch-controls",t),n.setAttribute("windows-motion-controls",t)}))}},remove:function(){this.el.removeObject3D("mesh")},handleButton:function(e,t){var n,r="down"===t,i="touchstart"===t;if(0===t.indexOf("touch")){if(i===this.touchedButtons[e])return;this.touchedButtons[e]=i}else{if(r===this.pressedButtons[e])return;this.pressedButtons[e]=r}n=this.gesture,this.gesture=this.determineGesture(),this.gesture!==n&&(this.animateGesture(this.gesture,n),this.emitGestureEvents(this.gesture,n))},determineGesture:function(){var e,t=this.pressedButtons.grip,n=this.pressedButtons.surface||this.touchedButtons.surface,r=this.pressedButtons.trackpad||this.touchedButtons.trackpad,i=this.pressedButtons.trigger||this.touchedButtons.trigger,o=this.touchedButtons.AorX||this.touchedButtons.BorY;return function(e){var t=e&&e.controller;return t&&(t.id&&0===t.id.indexOf("OpenVR ")||t.profiles&&t.profiles[0]&&"htc-vive-controller-mv"===t.profiles[0])}(this.el.components["tracked-controls"])?t||i?e=l:r&&(e=a):t?e=n||o||r?i?l:a:i?u:s:i&&(e=c),e},getClip:function(e){var t,n;for(n=0;n<this.clips.length;n++)if((t=this.clips[n]).name===e)return t},animateGesture:function(e,t){e?this.playAnimation(e||o,t,!1):this.playAnimation(t,t,!0)},emitGestureEvents:function(e,t){var n,r=this.el;t!==e&&((n=d(t,!1))&&r.emit(n),(n=d(e,!0))&&r.emit(n))},playAnimation:function(e,t,n){var r,i,o,a=this.el.getObject3D("mesh");if(a){if(a.mixer.stopAllAction(),r=this.getClip(e),(o=a.mixer.clipAction(r)).clampWhenFinished=!0,o.loop=THREE.LoopRepeat,o.repetitions=0,o.timeScale=n?-1:1,o.time=n?r.duration:0,o.weight=1,!t||e===t)return a.mixer.stopAllAction(),void o.play();r=this.getClip(t),(i=a.mixer.clipAction(r)).weight=.15,i.play(),o.play(),i.crossFadeTo(o,.15,!0)}}})},{"../core/component":131}],83:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls").checkControllerPresentAndSetup,a={left:"b_l_",right:"b_r_"},s=["wrist","thumb-metacarpal","thumb-phalanx-proximal","thumb-phalanx-distal","thumb-tip","index-finger-metacarpal","index-finger-phalanx-proximal","index-finger-phalanx-intermediate","index-finger-phalanx-distal","index-finger-tip","middle-finger-metacarpal","middle-finger-phalanx-proximal","middle-finger-phalanx-intermediate","middle-finger-phalanx-distal","middle-finger-tip","ring-finger-metacarpal","ring-finger-phalanx-proximal","ring-finger-phalanx-intermediate","ring-finger-phalanx-distal","ring-finger-tip","pinky-finger-metacarpal","pinky-finger-phalanx-proximal","pinky-finger-phalanx-intermediate","pinky-finger-phalanx-distal","pinky-finger-tip"],l={wrist:"wrist","thumb-metacarpal":"thumb1","thumb-phalanx-proximal":"thumb2","thumb-phalanx-distal":"thumb3","thumb-tip":"thumb_null","index-finger-phalanx-proximal":"index1","index-finger-phalanx-intermediate":"index2","index-finger-phalanx-distal":"index3","index-finger-tip":"index_null","middle-finger-phalanx-proximal":"middle1","middle-finger-phalanx-intermediate":"middle2","middle-finger-phalanx-distal":"middle3","middle-finger-tip":"middle_null","ring-finger-phalanx-proximal":"ring1","ring-finger-phalanx-intermediate":"ring2","ring-finger-phalanx-distal":"ring3","ring-finger-tip":"ring_null","pinky-finger-metacarpal":"pinky0","pinky-finger-phalanx-proximal":"pinky1","pinky-finger-phalanx-intermediate":"pinky2","pinky-finger-phalanx-distal":"pinky3","pinky-finger-tip":"pinky_null"};t.exports.Component=r("hand-tracking-controls",{schema:{hand:{default:"right",oneOf:["left","right"]},modelStyle:{default:"mesh",oneOf:["dots","mesh"]},modelColor:{default:"white"}},bindMethods:function(){this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this)},addEventListeners:function(){this.el.addEventListener("model-loaded",this.onModelLoaded);for(var e=0;e<this.jointEls.length;++e)this.jointEls[e].object3D.visible=!0},removeEventListeners:function(){this.el.removeEventListener("model-loaded",this.onModelLoaded);for(var e=0;e<this.jointEls.length;++e)this.jointEls[e].object3D.visible=!1},init:function(){var e=this.el.sceneEl,t=e.getAttribute("webxr").optionalFeatures;t.push("hand-tracking"),e.setAttribute("webxr",{optionalFeatures:t}),this.onModelLoaded=this.onModelLoaded.bind(this),this.jointEls=[],this.controllerPresent=!1,this.isPinched=!1,this.pinchEventDetail={position:new THREE.Vector3},this.indexTipPosition=new THREE.Vector3,this.bindMethods(),this.updateReferenceSpace=this.updateReferenceSpace.bind(this),this.el.sceneEl.addEventListener("enter-vr",this.updateReferenceSpace),this.el.sceneEl.addEventListener("exit-vr",this.updateReferenceSpace)},updateReferenceSpace:function(){var e=this,t=this.el.sceneEl.xrSession;if(this.referenceSpace=void 0,t){var n=e.el.sceneEl.systems.webxr.sessionReferenceSpaceType;t.requestReferenceSpace(n).then((function(t){e.referenceSpace=t.getOffsetReferenceSpace(new XRRigidTransform({x:0,y:1.5,z:0}))})).catch((function(t){throw e.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(n,"tracked-controls-webxr uses reference space "+n),t}))}},checkIfControllerPresent:function(){var e=this.data,t=e.hand?e.hand:void 0;o(this,"",{hand:t,iterateControllerProfiles:!0,handTracking:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},tick:function(){var e=this.el.sceneEl,t=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,n=e.frame,r=this.el.components["tracked-controls-webxr"];t&&n&&r&&t.hand&&(this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0),n.getJointPose&&this.updateHandModel(),this.detectGesture())},updateHandModel:function(){"dots"===this.data.modelStyle&&this.updateHandDotsModel(),"mesh"===this.data.modelStyle&&this.updateHandMeshModel()},getBone:function(e){for(var t=this.bones,n=0;n<t.length;n++)if(t[n].name===e)return t[n];return null},updateHandMeshModel:function(){var e=this.el.sceneEl.frame,t=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,n=this.referenceSpace;if(t&&this.mesh&&n)for(var r of(this.mesh.visible=!1,t.hand.values())){var i,o,s;o=e.getJointPose(r,n),l[r.jointName]&&null!=(i=this.getBone(a[this.data.hand]+l[r.jointName]))&&o&&(s=o.transform,this.mesh.visible=!0,i.position.copy(s.position).multiplyScalar(100),i.quaternion.set(s.orientation.x,s.orientation.y,s.orientation.z,s.orientation.w))}},updateHandDotsModel:function(){var e,t,n,r=this.el.sceneEl.frame,i=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,o=this.el.components["tracked-controls-webxr"].system.referenceSpace,a=0;for(var s of i.hand.values())t=(e=this.jointEls[a++]).object3D,n=r.getJointPose(s,o),e.object3D.visible=!!n,n&&(t.matrix.elements=n.transform.matrix,t.matrix.decompose(t.position,t.rotation,t.scale),e.setAttribute("scale",{x:n.radius,y:n.radius,z:n.radius}))},detectGesture:function(){this.detectPinch()},detectPinch:function(){var e=new THREE.Vector3;return function(){var t=this.el.sceneEl.frame,n=this.indexTipPosition,r=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,i=this.el.components["tracked-controls-webxr"],o=this.referenceSpace||i.system.referenceSpace,a=r.hand.get("index-finger-tip"),s=r.hand.get("thumb-tip");if(a&&s){var l=t.getJointPose(a,o),c=t.getJointPose(s,o);if(l&&c){e.copy(c.transform.position),n.copy(l.transform.position);var u=n.distanceTo(e);u<.015&&!1===this.isPinched&&(this.isPinched=!0,this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchstarted",this.pinchEventDetail)),u>.03&&!0===this.isPinched&&(this.isPinched=!1,this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchended",this.pinchEventDetail)),this.isPinched&&(this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchmoved",this.pinchEventDetail)),n.y+=1.5}}}}(),pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{hand:t.hand,iterateControllerProfiles:!0,handTrackingEnabled:!0}),this.initDefaultModel()},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){var e;this.checkIfControllerPresent(),e=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,this.el.getObject3D("mesh")&&(e&&e.hand&&e.hand[0]||(this.el.getObject3D("mesh").visible=!1))},initDefaultModel:function(){this.el.getObject3D("mesh")||("dots"===this.data.modelStyle&&this.initDotsModel(),"mesh"===this.data.modelStyle&&this.initMeshHandModel())},initDotsModel:function(){if(0===this.jointEls.length)for(var e=0;e<s.length;++e){var t=this.jointEl=document.createElement("a-entity");t.setAttribute("geometry",{primitive:"sphere",radius:1}),t.setAttribute("material",{color:this.data.modelColor}),t.object3D.visible=!1,this.el.appendChild(t),this.jointEls.push(t)}},initMeshHandModel:function(){var e="left"===this.data.hand?"https://cdn.aframe.io/controllers/oculus-hands/unity/left.glb":"https://cdn.aframe.io/controllers/oculus-hands/unity/right.glb";this.el.setAttribute("gltf-model",e)},onModelLoaded:function(){var e=this.mesh=this.el.getObject3D("mesh").children[0],t=this.skinnedMesh=e.children[24];this.skinnedMesh&&(this.bones=t.skeleton.bones,this.el.removeObject3D("mesh"),e.position.set(0,1.5,0),e.rotation.set(0,0,0),t.frustumCulled=!1,t.material=new THREE.MeshStandardMaterial({skinning:!0,color:this.data.modelColor}),this.el.setObject3D("mesh",e))}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],84:[function(e,t,n){e("./animation"),e("./camera"),e("./cursor"),e("./daydream-controls"),e("./gearvr-controls"),e("./geometry"),e("./generic-tracked-controller-controls"),e("./gltf-model"),e("./hand-tracking-controls"),e("./hand-controls"),e("./layer"),e("./laser-controls"),e("./light"),e("./line"),e("./link"),e("./look-controls"),e("./magicleap-controls"),e("./material"),e("./obj-model"),e("./oculus-go-controls"),e("./oculus-touch-controls"),e("./position"),e("./raycaster"),e("./rotation"),e("./scale"),e("./shadow"),e("./sound"),e("./text"),e("./tracked-controls"),e("./tracked-controls-webvr"),e("./tracked-controls-webxr"),e("./visible"),e("./valve-index-controls"),e("./vive-controls"),e("./vive-focus-controls"),e("./wasd-controls"),e("./windows-motion-controls"),e("./scene/background"),e("./scene/debug"),e("./scene/device-orientation-permission-ui"),e("./scene/embedded"),e("./scene/inspector"),e("./scene/fog"),e("./scene/keyboard-shortcuts"),e("./scene/pool"),e("./scene/screenshot"),e("./scene/stats"),e("./scene/vr-mode-ui")},{"./animation":74,"./camera":75,"./cursor":76,"./daydream-controls":77,"./gearvr-controls":78,"./generic-tracked-controller-controls":79,"./geometry":80,"./gltf-model":81,"./hand-controls":82,"./hand-tracking-controls":83,"./laser-controls":85,"./layer":86,"./light":87,"./line":88,"./link":89,"./look-controls":90,"./magicleap-controls":91,"./material":92,"./obj-model":93,"./oculus-go-controls":94,"./oculus-touch-controls":95,"./position":96,"./raycaster":97,"./rotation":98,"./scale":99,"./scene/background":100,"./scene/debug":101,"./scene/device-orientation-permission-ui":102,"./scene/embedded":103,"./scene/fog":104,"./scene/inspector":105,"./scene/keyboard-shortcuts":106,"./scene/pool":107,"./scene/screenshot":108,"./scene/stats":109,"./scene/vr-mode-ui":110,"./shadow":111,"./sound":112,"./text":113,"./tracked-controls":116,"./tracked-controls-webvr":114,"./tracked-controls-webxr":115,"./valve-index-controls":117,"./visible":118,"./vive-controls":119,"./vive-focus-controls":120,"./wasd-controls":121,"./windows-motion-controls":122}],85:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/");r("laser-controls",{schema:{hand:{default:"right"},model:{default:!0},defaultModelColor:{type:"color",default:"grey"}},init:function(){var e=this.config,t=this.data,n=this.el,r=this,o={hand:t.hand,model:t.model};function a(t){var o=e[t.detail.name];if(o){var a=i.extend({showLine:!0},o.raycaster||{});t.detail.rayOrigin&&(a.origin=t.detail.rayOrigin.origin,a.direction=t.detail.rayOrigin.direction,a.showLine=!0),t.detail.rayOrigin||!r.modelReady?n.setAttribute("raycaster",a):n.setAttribute("raycaster","showLine",!0),n.setAttribute("cursor",i.extend({fuse:!1},o.cursor))}}n.setAttribute("daydream-controls",o),n.setAttribute("gearvr-controls",o),n.setAttribute("magicleap-controls",o),n.setAttribute("oculus-go-controls",o),n.setAttribute("oculus-touch-controls",o),n.setAttribute("valve-index-controls",o),n.setAttribute("vive-controls",o),n.setAttribute("vive-focus-controls",o),n.setAttribute("windows-motion-controls",o),n.setAttribute("generic-tracked-controller-controls",o),n.addEventListener("controllerconnected",a),n.addEventListener("controllerdisconnected",(function(){n.setAttribute("raycaster","showLine",!1)})),n.addEventListener("controllermodelready",(function(e){a(e),r.modelReady=!0}))},config:{"daydream-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"gearvr-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:.001,z:0}}},"generic-tracked-controller-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"magicleap-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"oculus-go-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:5e-4,z:0}}},"oculus-touch-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:0,z:0}}},"valve-index-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"vive-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"vive-focus-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"windows-motion-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{showLine:!1}}}})},{"../core/component":131,"../utils/":205}],86:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/").debug("components:layer:warn");t.exports.Component=r("layer",{schema:{type:{default:"quad",oneOf:["quad","monocubemap","stereocubemap"]},src:{type:"map"},rotateCubemap:{default:!1},width:{default:0},height:{default:0}},init:function(){var e=this.el.sceneEl.renderer.getContext();this.quaternion=new THREE.Quaternion,this.position=new THREE.Vector3,this.bindMethods(),this.needsRedraw=!1,this.frameBuffer=e.createFramebuffer();var t=this.el.sceneEl.getAttribute("webxr").requiredFeatures;t.push("layers"),this.el.sceneEl.getAttribute("webxr","requiredFeatures",t),this.el.sceneEl.addEventListener("enter-vr",this.onEnterVR),this.el.sceneEl.addEventListener("exit-vr",this.onExitVR)},bindMethods:function(){this.onRequestedReferenceSpace=this.onRequestedReferenceSpace.bind(this),this.onEnterVR=this.onEnterVR.bind(this),this.onExitVR=this.onExitVR.bind(this)},update:function(e){this.data.src!==e.src&&this.updateSrc()},updateSrc:function(){var e=this.data.type;this.texture=void 0,"quad"!==e?"monocubemap"!==e&&"stereocubemap"!==e||this.loadCubeMapImages():this.loadQuadImage()},loadCubeMapImages:function(){var e,t=this.data.type,n=this.xrGLFactory,r=this.el.sceneEl.frame,i=this.data.src;this.visibilityChanged=!1,this.layer&&(i.complete?this.pendingCubeMapUpdate=!1:this.pendingCubeMapUpdate=!0,this.loadingScreen?this.loadingScreen=!1:this.loadingScreen=!0,"monocubemap"===t?(e=n.getSubImage(this.layer,r),this.loadCubeMapImage(e.colorTexture,i,0)):(e=n.getSubImage(this.layer,r,"left"),this.loadCubeMapImage(e.colorTexture,i,0),e=n.getSubImage(this.layer,r,"right"),this.loadCubeMapImage(e.colorTexture,i,6)))},loadQuadImage:function(){var e=this.data.src,t=this;this.el.sceneEl.systems.material.loadTexture(e,{src:e},(function(n){t.el.sceneEl.renderer.initTexture(n),t.texture=n,"VIDEO"===e.tagName&&setTimeout((function(){t.textureIsVideo=!0}),1e3),t.layer&&(t.layer.height=t.data.height/2||t.texture.image.height/1e3,t.layer.width=t.data.width/2||t.texture.image.width/1e3,t.needsRedraw=!0),t.updateQuadPanel()}))},preGenerateCubeMapTextures:function(e,t){"monocubemap"===this.data.type?this.generateCubeMapTextures(e,0,t):(this.generateCubeMapTextures(e,0,t),this.generateCubeMapTextures(e,6,t))},generateCubeMapTextures:function(e,t,n){for(var r,i,o=this.data,a=this.cubeFaceSize,s=Math.min(e.width,e.height),l=[],c=0;c<6;c++){var u=document.createElement("CANVAS");u.width=u.height=a;var h=u.getContext("2d");o.rotateCubemap&&(2!==c&&3!==c||(h.save(),h.translate(a,a),h.rotate(Math.PI))),h.drawImage(e,(c+t)*s,0,s,s,0,0,a,a),h.restore(),n&&n(),l.push(u)}return o.rotateCubemap&&(r=l[0],i=l[1],l[0]=i,l[1]=r,r=l[4],i=l[5],l[4]=i,l[5]=r),n&&n(),l},loadCubeMapImage:function(e,t,n){var r,i=this.el.sceneEl.renderer.getContext();i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.bindTexture(i.TEXTURE_CUBE_MAP,e),r=!t.complete||this.loadingScreen?this.loadingScreenImages:this.generateCubeMapTextures(t,n);var o=0;r.forEach((function(e,t){i.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,i.RGBA,i.UNSIGNED_BYTE,e),o=i.getError()})),0!==o&&console.log("renderingError, WebGL Error Code: "+o),i.bindTexture(i.TEXTURE_CUBE_MAP,null)},tick:function(){this.el.sceneEl.xrSession&&(!this.layer&&this.el.sceneEl.is("vr-mode")&&this.initLayer(),this.updateTransform(),this.data.src.complete&&(this.pendingCubeMapUpdate||this.loadingScreen||this.visibilityChanged)&&this.loadCubeMapImages(),(this.needsRedraw||this.layer.needsRedraw||this.textureIsVideo)&&("quad"===this.data.type&&this.draw(),this.needsRedraw=!1))},initLayer:function(){var e=this,t=this.data.type;this.el.sceneEl.xrSession.onvisibilitychange=function(t){e.visibilityChanged="hidden"!==t.session.visibilityState},"quad"!==t?"monocubemap"!==t&&"stereocubemap"!==t||this.initCubeMapLayer():this.initQuadLayer()},initQuadLayer:function(){var e=this.el.sceneEl,t=e.renderer.getContext(),n=this.xrGLFactory=new XRWebGLBinding(e.xrSession,t);this.texture&&(this.layer=n.createQuadLayer({space:this.referenceSpace,viewPixelHeight:2048,viewPixelWidth:2048,height:this.data.height/2||this.texture.image.height/1e3,width:this.data.width/2||this.texture.image.width/1e3}),e.renderer.xr.addLayer(this.layer))},initCubeMapLayer:function(){var e=this.data.src,t=this.el.sceneEl,n=t.renderer.getContext(),r=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),i=this.cubeFaceSize=Math.min(r,Math.min(e.width,e.height)),o=this.xrGLFactory=new XRWebGLBinding(t.xrSession,n);this.layer=o.createCubeLayer({space:this.referenceSpace,viewPixelWidth:i,viewPixelHeight:i,layout:"monocubemap"===this.data.type?"mono":"stereo",isStatic:!1}),this.initLoadingScreenImages(),this.loadCubeMapImages(),t.renderer.xr.addLayer(this.layer)},initLoadingScreenImages:function(){for(var e=this.cubeFaceSize,t=this.loadingScreenImages=[],n=0;n<6;n++){var r=document.createElement("CANVAS");r.width=r.height=e;var i=r.getContext("2d");r.width=r.height=e,i.fillStyle="black",i.fillRect(0,0,e,e),2!==n&&3!==n&&(i.translate(e,0),i.scale(-1,1),i.fillStyle="white",i.font="30px Arial",i.fillText("Loading",e/2,e/2)),t.push(r)}},destroyLayer:function(){this.layer&&(this.el.sceneEl.renderer.xr.removeLayer(this.layer),this.layer.destroy(),this.layer=void 0)},toggleCompositorLayer:function(){this.enableCompositorLayer(!this.layerEnabled)},enableCompositorLayer:function(e){this.layerEnabled=e,this.quadPanelEl.object3D.visible=!this.layerEnabled},updateQuadPanel:function(){var e=this.quadPanelEl;this.quadPanelEl||(e=this.quadPanelEl=document.createElement("a-entity"),this.el.appendChild(e)),e.setAttribute("material",{shader:"flat",src:this.data.src,transparent:!0}),e.setAttribute("geometry",{primitive:"plane",height:this.data.height||this.texture.image.height/1e3,width:this.data.width||this.texture.image.height/1e3})},draw:function(){var e=this.el.sceneEl,t=this.el.sceneEl.renderer.getContext(),n=this.xrGLFactory.getSubImage(this.layer,e.frame),r=e.renderer.properties.get(this.texture).__webglTexture,i=t.getParameter(t.FRAMEBUFFER_BINDING);t.viewport(n.viewport.x,n.viewport.y,n.viewport.width,n.viewport.height),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n.colorTexture,0),function(e,t,n,r){var i=e.createFramebuffer();let o=n.viewport.x,a=n.viewport.y,s=n.viewport.x+n.viewport.width,l=n.viewport.y+n.viewport.height;"VIDEO"===r.tagName&&(e.bindTexture(e.TEXTURE_2D,t),e.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,e.RGB,e.UNSIGNED_BYTE,r)),e.bindFramebuffer(e.READ_FRAMEBUFFER,i),e.framebufferTexture2D(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),e.readBuffer(e.COLOR_ATTACHMENT0),e.blitFramebuffer(0,0,r.width,r.height,o,a,s,l,e.COLOR_BUFFER_BIT,e.NEAREST),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.deleteFramebuffer(i)}(t,r,n,this.data.src),t.bindFramebuffer(t.FRAMEBUFFER,i)},updateTransform:function(){var e=this.el,t=this.position,n=this.quaternion;e.object3D.updateMatrixWorld(),t.setFromMatrixPosition(e.object3D.matrixWorld),n.setFromRotationMatrix(e.object3D.matrixWorld),this.layerEnabled||t.set(0,0,1e8),this.layer.transform=new XRRigidTransform(t,n)},onEnterVR:function(){var e=this.el.sceneEl,t=e.xrSession;e.hasWebXR&&XRWebGLBinding&&t?(t.requestReferenceSpace("local").then(this.onRequestedReferenceSpace),this.needsRedraw=!0,this.layerEnabled=!0,this.quadPanelEl&&(this.quadPanelEl.object3D.visible=!1),this.data.src.play&&this.data.src.play()):i("The layer component requires WebXR and the layers API enabled")},onExitVR:function(){this.quadPanelEl&&(this.quadPanelEl.object3D.visible=!0),this.destroyLayer()},onRequestedReferenceSpace:function(e){this.referenceSpace=e}})},{"../core/component":131,"../utils/":205}],87:[function(e,t,n){var r=e("../utils/bind"),i=e("../utils").diff,o=e("../utils/debug"),a=e("../core/component").registerComponent,s=e("../lib/three"),l=s.Math.degToRad,c=o("components:light:warn");t.exports.Component=a("light",{schema:{angle:{default:60,if:{type:["spot"]}},color:{type:"color"},groundColor:{type:"color",if:{type:["hemisphere"]}},decay:{default:1,if:{type:["point","spot"]}},distance:{default:0,min:0,if:{type:["point","spot"]}},intensity:{default:1,min:0,if:{type:["ambient","directional","hemisphere","point","spot"]}},penumbra:{default:0,min:0,max:1,if:{type:["spot"]}},type:{default:"directional",oneOf:["ambient","directional","hemisphere","point","spot"],schemaChange:!0},target:{type:"selector",if:{type:["spot","directional"]}},castShadow:{default:!1,if:{type:["point","spot","directional"]}},shadowBias:{default:0,if:{castShadow:!0}},shadowCameraFar:{default:500,if:{castShadow:!0}},shadowCameraFov:{default:90,if:{castShadow:!0}},shadowCameraNear:{default:.5,if:{castShadow:!0}},shadowCameraTop:{default:5,if:{castShadow:!0}},shadowCameraRight:{default:5,if:{castShadow:!0}},shadowCameraBottom:{default:-5,if:{castShadow:!0}},shadowCameraLeft:{default:-5,if:{castShadow:!0}},shadowCameraVisible:{default:!1,if:{castShadow:!0}},shadowMapHeight:{default:512,if:{castShadow:!0}},shadowMapWidth:{default:512,if:{castShadow:!0}},shadowRadius:{default:1,if:{castShadow:!0}}},init:function(){var e=this.el;this.light=null,this.defaultTarget=null,this.rendererSystem=this.el.sceneEl.systems.renderer,this.system.registerLight(e)},update:function(e){var t=this.data,n=i(t,e),o=this.light,a=this.rendererSystem,s=this;if(!o||"type"in n)this.setLight(this.data),this.updateShadow();else{var c=!1;Object.keys(n).forEach((function(e){var n=t[e];switch(e){case"color":o.color.set(n),a.applyColorCorrection(o.color);break;case"groundColor":o.groundColor.set(n),a.applyColorCorrection(o.groundColor);break;case"angle":o.angle=l(n);break;case"target":null===n?"spot"!==t.type&&"directional"!==t.type||(o.target=s.defaultTarget):n.hasLoaded?s.onSetTarget(n,o):n.addEventListener("loaded",r(s.onSetTarget,s,n,o));break;case"castShadow":case"shadowBias":case"shadowCameraFar":case"shadowCameraFov":case"shadowCameraNear":case"shadowCameraTop":case"shadowCameraRight":case"shadowCameraBottom":case"shadowCameraLeft":case"shadowCameraVisible":case"shadowMapHeight":case"shadowMapWidth":case"shadowRadius":c||(s.updateShadow(),c=!0);break;default:o[e]=n}}))}},setLight:function(e){var t=this.el,n=this.getLight(e);n&&(this.light&&t.removeObject3D("light"),this.light=n,this.light.el=t,t.setObject3D("light",this.light),"spot"!==e.type&&"directional"!==e.type&&"hemisphere"!==e.type||t.getObject3D("light").translateY(-1),"spot"===e.type&&(t.setObject3D("light-target",this.defaultTarget),t.getObject3D("light-target").position.set(0,0,-1)))},updateShadow:function(){var e=this.el,t=this.data,n=this.light;n.castShadow=t.castShadow;var r=e.getObject3D("cameraHelper");if(t.shadowCameraVisible&&!r?e.setObject3D("cameraHelper",new s.CameraHelper(n.shadow.camera)):!t.shadowCameraVisible&&r&&e.removeObject3D("cameraHelper"),!t.castShadow)return n;n.shadow.bias=t.shadowBias,n.shadow.radius=t.shadowRadius,n.shadow.mapSize.height=t.shadowMapHeight,n.shadow.mapSize.width=t.shadowMapWidth,n.shadow.camera.near=t.shadowCameraNear,n.shadow.camera.far=t.shadowCameraFar,n.shadow.camera instanceof s.OrthographicCamera?(n.shadow.camera.top=t.shadowCameraTop,n.shadow.camera.right=t.shadowCameraRight,n.shadow.camera.bottom=t.shadowCameraBottom,n.shadow.camera.left=t.shadowCameraLeft):n.shadow.camera.fov=t.shadowCameraFov,n.shadow.camera.updateProjectionMatrix(),r&&r.update()},getLight:function(e){var t=e.angle,n=new s.Color(e.color);this.rendererSystem.applyColorCorrection(n),n=n.getHex();var i=e.decay,o=e.distance,a=new s.Color(e.groundColor);this.rendererSystem.applyColorCorrection(a),a=a.getHex();var u=e.intensity,h=e.type,d=e.target,f=null;switch(h.toLowerCase()){case"ambient":return new s.AmbientLight(n,u);case"directional":return f=new s.DirectionalLight(n,u),this.defaultTarget=f.target,d&&(d.hasLoaded?this.onSetTarget(d,f):d.addEventListener("loaded",r(this.onSetTarget,this,d,f))),f;case"hemisphere":return new s.HemisphereLight(n,a,u);case"point":return new s.PointLight(n,u,o,i);case"spot":return f=new s.SpotLight(n,u,o,l(t),e.penumbra,i),this.defaultTarget=f.target,d&&(d.hasLoaded?this.onSetTarget(d,f):d.addEventListener("loaded",r(this.onSetTarget,this,d,f))),f;default:c("%s is not a valid light type. Choose from ambient, directional, hemisphere, point, spot.",h)}},onSetTarget:function(e,t){t.target=e.object3D},remove:function(){var e=this.el;e.removeObject3D("light"),e.getObject3D("cameraHelper")&&e.removeObject3D("cameraHelper")}})},{"../core/component":131,"../lib/three":179,"../utils":205,"../utils/bind":199,"../utils/debug":201}],88:[function(e,t,n){var r=e("../core/component").registerComponent;function i(e,t){return!(!e||!t)&&e.x===t.x&&e.y===t.y&&e.z===t.z}t.exports.Component=r("line",{schema:{start:{type:"vec3",default:{x:0,y:0,z:0}},end:{type:"vec3",default:{x:0,y:0,z:0}},color:{type:"color",default:"#74BEC1"},opacity:{type:"number",default:1},visible:{default:!0}},multiple:!0,init:function(){var e,t,n=this.data;this.rendererSystem=this.el.sceneEl.systems.renderer,t=this.material=new THREE.LineBasicMaterial({color:n.color,opacity:n.opacity,transparent:n.opacity<1,visible:n.visible}),(e=this.geometry=new THREE.BufferGeometry).setAttribute("position",new THREE.BufferAttribute(new Float32Array(6),3)),this.rendererSystem.applyColorCorrection(t.color),this.line=new THREE.Line(e,t),this.el.setObject3D(this.attrName,this.line)},update:function(e){var t=this.data,n=this.geometry,r=!1,o=this.material,a=n.attributes.position.array;i(t.start,e.start)||(a[0]=t.start.x,a[1]=t.start.y,a[2]=t.start.z,r=!0),i(t.end,e.end)||(a[3]=t.end.x,a[4]=t.end.y,a[5]=t.end.z,r=!0),r&&(n.attributes.position.needsUpdate=!0,n.computeBoundingSphere()),o.color.setStyle(t.color),this.rendererSystem.applyColorCorrection(o.color),o.opacity=t.opacity,o.transparent=t.opacity<1,o.visible=t.visible},remove:function(){this.el.removeObject3D("line",this.line)}})},{"../core/component":131}],89:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../core/shader").registerShader,o=e("../lib/three");t.exports.Component=r("link",{schema:{backgroundColor:{default:"red",type:"color"},borderColor:{default:"white",type:"color"},highlighted:{default:!1},highlightedColor:{default:"#24CAFF",type:"color"},href:{default:""},image:{type:"asset"},on:{default:"click"},peekMode:{default:!1},title:{default:""},titleColor:{default:"white",type:"color"},visualAspectEnabled:{default:!1}},init:function(){this.navigate=this.navigate.bind(this),this.previousQuaternion=void 0,this.quaternionClone=new o.Quaternion,this.hiddenEls=[]},update:function(e){var t,n,r=this.data,i=this.el;r.visualAspectEnabled&&(this.initVisualAspect(),t=r.highlighted?r.highlightedColor:r.backgroundColor,n=r.highlighted?r.highlightedColor:r.borderColor,i.setAttribute("material","backgroundColor",t),i.setAttribute("material","strokeColor",n),r.on!==e.on&&this.updateEventListener(),void 0!==e.peekMode&&r.peekMode!==e.peekMode&&this.updatePeekMode(),r.image&&e.image!==r.image&&i.setAttribute("material","pano","string"===typeof r.image?r.image:r.image.src))},updatePeekMode:function(){var e=this.el,t=this.sphereEl;this.data.peekMode?(this.hideAll(),e.getObject3D("mesh").visible=!1,t.setAttribute("visible",!0)):(this.showAll(),e.getObject3D("mesh").visible=!0,t.setAttribute("visible",!1))},play:function(){this.updateEventListener()},pause:function(){this.removeEventListener()},updateEventListener:function(){var e=this.el;e.isPlaying&&(this.removeEventListener(),e.addEventListener(this.data.on,this.navigate))},removeEventListener:function(){var e=this.data.on;e&&this.el.removeEventListener(e,this.navigate)},initVisualAspect:function(){var e,t,n,r=this.el;this.data.visualAspectEnabled&&!this.visualAspectInitialized&&(n=this.textEl=this.textEl||document.createElement("a-entity"),t=this.sphereEl=this.sphereEl||document.createElement("a-entity"),e=this.semiSphereEl=this.semiSphereEl||document.createElement("a-entity"),r.setAttribute("geometry",{primitive:"circle",radius:1,segments:64}),r.setAttribute("material",{shader:"portal",pano:this.data.image,side:"double"}),n.setAttribute("text",{color:this.data.titleColor,align:"center",font:"kelsonsans",value:this.data.title||this.data.href,width:4}),n.setAttribute("position","0 1.5 0"),r.appendChild(n),e.setAttribute("geometry",{primitive:"sphere",radius:1,phiStart:0,segmentsWidth:64,segmentsHeight:64,phiLength:180,thetaStart:0,thetaLength:360}),e.setAttribute("material",{shader:"portal",borderEnabled:0,pano:this.data.image,side:"back"}),e.setAttribute("rotation","0 180 0"),e.setAttribute("position","0 0 0"),e.setAttribute("visible",!1),r.appendChild(e),t.setAttribute("geometry",{primitive:"sphere",radius:10,segmentsWidth:64,segmentsHeight:64}),t.setAttribute("material",{shader:"portal",borderEnabled:0,pano:this.data.image,side:"back"}),t.setAttribute("visible",!1),r.appendChild(t),this.visualAspectInitialized=!0)},navigate:function(){window.location=this.data.href},tick:function(){var e=new o.Vector3,t=new o.Vector3,n=new o.Quaternion,r=new o.Vector3;return function(){var i,o,a=this.el,s=a.object3D,l=a.sceneEl.camera,c=this.textEl;if(this.data.visualAspectEnabled)if(s.updateMatrixWorld(),l.parent.updateMatrixWorld(),l.updateMatrixWorld(),s.matrix.decompose(t,n,r),t.setFromMatrixPosition(s.matrixWorld),e.setFromMatrixPosition(l.matrixWorld),(o=t.distanceTo(e))>20)this.previousQuaternion||(this.quaternionClone.copy(n),this.previousQuaternion=this.quaternionClone),s.lookAt(e);else{if(i=this.calculateCameraPortalOrientation(),o<.5){if(!0===this.semiSphereEl.getAttribute("visible"))return;c.setAttribute("text","width",1.5),i<=0?(c.setAttribute("position","0 0 0.75"),c.setAttribute("rotation","0 180 0"),this.semiSphereEl.setAttribute("rotation","0 0 0")):(c.setAttribute("position","0 0 -0.75"),c.setAttribute("rotation","0 0 0"),this.semiSphereEl.setAttribute("rotation","0 180 0")),a.getObject3D("mesh").visible=!1,this.semiSphereEl.setAttribute("visible",!0),this.peekCameraPortalOrientation=i}else i<=0?c.setAttribute("rotation","0 180 0"):c.setAttribute("rotation","0 0 0"),c.setAttribute("text","width",5),c.setAttribute("position","0 1.5 0"),a.getObject3D("mesh").visible=!0,this.semiSphereEl.setAttribute("visible",!1),this.peekCameraPortalOrientation=void 0;this.previousQuaternion&&(s.quaternion.copy(this.previousQuaternion),this.previousQuaternion=void 0)}}}(),hideAll:function(){var e=this.el,t=this.hiddenEls,n=this;t.length>0||e.sceneEl.object3D.traverse((function(r){r&&r.el&&r.el.hasAttribute("link-controls")||r.el&&r!==e.sceneEl.object3D&&r.el!==e&&r.el!==n.sphereEl&&r.el!==e.sceneEl.cameraEl&&!1!==r.el.getAttribute("visible")&&r.el!==n.textEl&&r.el!==n.semiSphereEl&&(r.el.setAttribute("visible",!1),t.push(r.el))}))},showAll:function(){this.hiddenEls.forEach((function(e){e.setAttribute("visible",!0)})),this.hiddenEls=[]},calculateCameraPortalOrientation:function(){var e=new o.Matrix4,t=new o.Vector3,n=new o.Vector3(0,0,1),r=new o.Vector3(0,0,0);return function(){var i=this.el,o=i.sceneEl.camera;return t.set(0,0,0),n.set(0,0,1),r.set(0,0,0),i.object3D.matrixWorld.extractRotation(e),n.applyMatrix4(e),i.object3D.updateMatrixWorld(),i.object3D.localToWorld(r),o.parent.parent.updateMatrixWorld(),o.parent.updateMatrixWorld(),o.updateMatrixWorld(),o.localToWorld(t),t.sub(r).normalize(),n.normalize(),Math.sign(n.dot(t))}}(),remove:function(){this.removeEventListener()}}),i("portal",{schema:{borderEnabled:{default:1,type:"int",is:"uniform"},backgroundColor:{default:"red",type:"color",is:"uniform"},pano:{type:"map",is:"uniform"},strokeColor:{default:"white",type:"color",is:"uniform"}},vertexShader:["vec3 portalPosition;","varying vec3 vWorldPosition;","varying float vDistanceToCenter;","varying float vDistance;","void main() {","vDistanceToCenter = clamp(length(position - vec3(0.0, 0.0, 0.0)), 0.0, 1.0);","portalPosition = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;","vDistance = length(portalPosition - cameraPosition);","vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI2 0.15915494","uniform sampler2D pano;","uniform vec3 strokeColor;","uniform vec3 backgroundColor;","uniform float borderEnabled;","varying float vDistanceToCenter;","varying float vDistance;","varying vec3 vWorldPosition;","void main() {","vec3 direction = normalize(vWorldPosition - cameraPosition);","vec2 sampleUV;","float borderThickness = clamp(exp(-vDistance / 50.0), 0.6, 0.95);","sampleUV.y = clamp(direction.y * 0.5 + 0.5, 0.0, 1.0);","sampleUV.x = atan(direction.z, -direction.x) * -RECIPROCAL_PI2 + 0.5;","if (vDistanceToCenter > borderThickness && borderEnabled == 1.0) {","gl_FragColor = vec4(strokeColor, 1.0);","} else {","gl_FragColor = mix(texture2D(pano, sampleUV), vec4(backgroundColor, 1.0), clamp(pow((vDistance / 15.0), 2.0), 0.0, 1.0));","}","}"].join("\n")})},{"../core/component":131,"../core/shader":141,"../lib/three":179}],90:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/"),a=o.bind,s=Math.PI/2;t.exports.Component=r("look-controls",{dependencies:["position","rotation"],schema:{enabled:{default:!0},magicWindowTrackingEnabled:{default:!0},pointerLockEnabled:{default:!1},reverseMouseDrag:{default:!1},reverseTouchDrag:{default:!1},touchEnabled:{default:!0},mouseEnabled:{default:!0}},init:function(){this.deltaYaw=0,this.previousHMDPosition=new i.Vector3,this.hmdQuaternion=new i.Quaternion,this.magicWindowAbsoluteEuler=new i.Euler,this.magicWindowDeltaEuler=new i.Euler,this.position=new i.Vector3,this.magicWindowObject=new i.Object3D,this.rotation={},this.deltaRotation={},this.savedPose=null,this.pointerLocked=!1,this.setupMouseControls(),this.bindMethods(),this.previousMouseEvent={},this.setupMagicWindowControls(),this.savedPose={position:new i.Vector3,rotation:new i.Euler},this.el.sceneEl.is("vr-mode")&&this.onEnterVR()},setupMagicWindowControls:function(){var e,t=this.data;o.device.isMobile()&&(e=this.magicWindowControls=new i.DeviceOrientationControls(this.magicWindowObject),"undefined"!==typeof DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission&&(e.enabled=!1,this.el.sceneEl.components["device-orientation-permission-ui"].permissionGranted?e.enabled=t.magicWindowTrackingEnabled:this.el.sceneEl.addEventListener("deviceorientationpermissiongranted",(function(){e.enabled=t.magicWindowTrackingEnabled}))))},update:function(e){var t=this.data;t.enabled!==e.enabled&&this.updateGrabCursor(t.enabled),e&&!t.magicWindowTrackingEnabled&&e.magicWindowTrackingEnabled&&(this.magicWindowAbsoluteEuler.set(0,0,0),this.magicWindowDeltaEuler.set(0,0,0)),this.magicWindowControls&&(this.magicWindowControls.enabled=t.magicWindowTrackingEnabled),e&&!t.pointerLockEnabled!==e.pointerLockEnabled&&(this.removeEventListeners(),this.addEventListeners(),this.pointerLocked&&this.exitPointerLock())},tick:function(e){this.data.enabled&&this.updateOrientation()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.pointerLocked&&this.exitPointerLock()},remove:function(){this.removeEventListeners(),this.pointerLocked&&this.exitPointerLock()},bindMethods:function(){this.onMouseDown=a(this.onMouseDown,this),this.onMouseMove=a(this.onMouseMove,this),this.onMouseUp=a(this.onMouseUp,this),this.onTouchStart=a(this.onTouchStart,this),this.onTouchMove=a(this.onTouchMove,this),this.onTouchEnd=a(this.onTouchEnd,this),this.onEnterVR=a(this.onEnterVR,this),this.onExitVR=a(this.onExitVR,this),this.onPointerLockChange=a(this.onPointerLockChange,this),this.onPointerLockError=a(this.onPointerLockError,this)},setupMouseControls:function(){this.mouseDown=!1,this.pitchObject=new i.Object3D,this.yawObject=new i.Object3D,this.yawObject.position.y=10,this.yawObject.add(this.pitchObject)},addEventListeners:function(){var e=this.el.sceneEl,t=e.canvas;t?(t.addEventListener("mousedown",this.onMouseDown,!1),window.addEventListener("mousemove",this.onMouseMove,!1),window.addEventListener("mouseup",this.onMouseUp,!1),t.addEventListener("touchstart",this.onTouchStart),window.addEventListener("touchmove",this.onTouchMove),window.addEventListener("touchend",this.onTouchEnd),e.addEventListener("enter-vr",this.onEnterVR),e.addEventListener("exit-vr",this.onExitVR),this.data.pointerLockEnabled&&(document.addEventListener("pointerlockchange",this.onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",this.onPointerLockChange,!1),document.addEventListener("pointerlockerror",this.onPointerLockError,!1))):e.addEventListener("render-target-loaded",a(this.addEventListeners,this))},removeEventListeners:function(){var e=this.el.sceneEl,t=e&&e.canvas;t&&(t.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("touchstart",this.onTouchStart),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd),e.removeEventListener("enter-vr",this.onEnterVR),e.removeEventListener("exit-vr",this.onExitVR),document.removeEventListener("pointerlockchange",this.onPointerLockChange,!1),document.removeEventListener("mozpointerlockchange",this.onPointerLockChange,!1),document.removeEventListener("pointerlockerror",this.onPointerLockError,!1))},updateOrientation:function(){var e=new i.Matrix4;return function(){var t,n=this.el.object3D,r=this.pitchObject,i=this.yawObject,o=this.el.sceneEl;o.is("vr-mode")&&o.checkHeadsetConnected()?o.hasWebXR&&(t=o.renderer.xr.getCameraPose())&&(e.elements=t.transform.matrix,e.decompose(n.position,n.rotation,n.scale)):(this.updateMagicWindowOrientation(),n.rotation.x=this.magicWindowDeltaEuler.x+r.rotation.x,n.rotation.y=this.magicWindowDeltaEuler.y+i.rotation.y,n.rotation.z=this.magicWindowDeltaEuler.z)}}(),updateMagicWindowOrientation:function(){var e=this.magicWindowAbsoluteEuler,t=this.magicWindowDeltaEuler;this.magicWindowControls&&this.magicWindowControls.enabled&&(this.magicWindowControls.update(),e.setFromQuaternion(this.magicWindowObject.quaternion,"YXZ"),this.previousMagicWindowYaw||0===e.y||(this.previousMagicWindowYaw=e.y),this.previousMagicWindowYaw&&(t.x=e.x,t.y+=e.y-this.previousMagicWindowYaw,t.z=e.z,this.previousMagicWindowYaw=e.y))},onMouseMove:function(e){var t,n,r,i=this.pitchObject,o=this.previousMouseEvent,a=this.yawObject;this.data.enabled&&(this.mouseDown||this.pointerLocked)&&(this.pointerLocked?(n=e.movementX||e.mozMovementX||0,r=e.movementY||e.mozMovementY||0):(n=e.screenX-o.screenX,r=e.screenY-o.screenY),this.previousMouseEvent.screenX=e.screenX,this.previousMouseEvent.screenY=e.screenY,t=this.data.reverseMouseDrag?1:-1,a.rotation.y+=.002*n*t,i.rotation.x+=.002*r*t,i.rotation.x=Math.max(-s,Math.min(s,i.rotation.x)))},onMouseDown:function(e){var t=this.el.sceneEl;if(this.data.enabled&&this.data.mouseEnabled&&(!t.is("vr-mode")||!t.checkHeadsetConnected())&&0===e.button){var n=t&&t.canvas;this.mouseDown=!0,this.previousMouseEvent.screenX=e.screenX,this.previousMouseEvent.screenY=e.screenY,this.showGrabbingCursor(),this.data.pointerLockEnabled&&!this.pointerLocked&&(n.requestPointerLock?n.requestPointerLock():n.mozRequestPointerLock&&n.mozRequestPointerLock())}},showGrabbingCursor:function(){this.el.sceneEl.canvas.style.cursor="grabbing"},hideGrabbingCursor:function(){this.el.sceneEl.canvas.style.cursor=""},onMouseUp:function(){this.mouseDown=!1,this.hideGrabbingCursor()},onTouchStart:function(e){1===e.touches.length&&this.data.touchEnabled&&!this.el.sceneEl.is("vr-mode")&&(this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY},this.touchStarted=!0)},onTouchMove:function(e){var t,n,r=this.el.sceneEl.canvas,i=this.yawObject;this.touchStarted&&this.data.touchEnabled&&(n=2*Math.PI*(e.touches[0].pageX-this.touchStart.x)/r.clientWidth,t=this.data.reverseTouchDrag?1:-1,i.rotation.y-=.5*n*t,this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY})},onTouchEnd:function(){this.touchStarted=!1},onEnterVR:function(){var e=this.el.sceneEl;e.checkHeadsetConnected()&&(this.saveCameraPose(),this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0),e.hasWebXR&&(this.el.object3D.matrixAutoUpdate=!1,this.el.object3D.updateMatrix()))},onExitVR:function(){this.el.sceneEl.checkHeadsetConnected()&&(this.restoreCameraPose(),this.previousHMDPosition.set(0,0,0),this.el.object3D.matrixAutoUpdate=!0)},onPointerLockChange:function(){this.pointerLocked=!(!document.pointerLockElement&&!document.mozPointerLockElement)},onPointerLockError:function(){this.pointerLocked=!1},exitPointerLock:function(){document.exitPointerLock(),this.pointerLocked=!1},updateGrabCursor:function(e){var t=this.el.sceneEl;function n(){t.canvas.classList.add("a-grab-cursor")}function r(){t.canvas.classList.remove("a-grab-cursor")}t.canvas?e?n():r():e?t.addEventListener("render-target-loaded",n):t.addEventListener("render-target-loaded",r)},saveCameraPose:function(){var e=this.el;this.savedPose.position.copy(e.object3D.position),this.savedPose.rotation.copy(e.object3D.rotation),this.hasSavedPose=!0},restoreCameraPose:function(){var e=this.el,t=this.savedPose;this.hasSavedPose&&(e.object3D.position.copy(t.position),e.object3D.rotation.copy(t.rotation),this.hasSavedPose=!1)}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],91:[function(e,t,n){var r=e("../utils/bind"),i=e("../core/component").registerComponent,o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=i("magicleap-controls",{schema:{hand:{default:"none"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:{axes:{touchpad:[0,1]},buttons:["trigger","grip","touchpad","menu"]},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex="right"===e.hand?0:"left"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;a(this,"magicleap-one",{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:"magicleap-one",hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/magicleap/magicleap-one-controller.glb")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id];n&&("trigger"===n&&(t=e.detail.state.value,console.log("analog value of trigger press: "+t)),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){e.detail.model.scale.set(.01,.01,.01)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){},setButtonColor:function(e,t){}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],92:[function(e,t,n){var r=e("../utils/"),i=e("../core/component"),o=e("../lib/three"),a=e("../core/shader"),s=r.debug("components:material:error"),l=i.registerComponent,c=a.shaders,u=a.shaderNames;function h(e,t){e.dispose(),t.unregisterMaterial(e)}t.exports.Component=l("material",{schema:{alphaTest:{default:0,min:0,max:1},depthTest:{default:!0},depthWrite:{default:!0},flatShading:{default:!1},npot:{default:!1},offset:{type:"vec2",default:{x:0,y:0}},opacity:{default:1,min:0,max:1},repeat:{type:"vec2",default:{x:1,y:1}},shader:{default:"standard",oneOf:u,schemaChange:!0},side:{default:"front",oneOf:["front","back","double"]},transparent:{default:!1},vertexColors:{type:"string",default:"none",oneOf:["face","vertex"]},visible:{default:!0},blending:{default:"normal",oneOf:["none","normal","additive","subtractive","multiply"]},dithering:{default:!0}},init:function(){this.material=null},update:function(e){var t=this.data;this.shader&&t.shader===e.shader||this.updateShader(t.shader),this.shader.update(this.data),this.updateMaterial(e)},updateSchema:function(e){var t,n,r,i;n=e&&e.shader,t=this.oldData&&this.oldData.shader,(r=c[i=n||t]&&c[i].schema)||s("Unknown shader schema "+i),t&&n===t||(this.extendSchema(r),this.updateBehavior())},updateBehavior:function(){var e,t,n=this.el.sceneEl,r=this.schema,i=this;function o(e,n){var r;for(r in t)t[r]=e;i.shader.update(t)}for(e in this.tick=void 0,t={},r)"time"===r[e].type&&(this.tick=o,t[e]=!0);n&&(this.tick?n.addBehavior(this):n.removeBehavior(this))},updateShader:function(e){var t,n=this.data,r=c[e]&&c[e].Shader;if(!r)throw new Error("Unknown shader "+e);(t=this.shader=new r).el=this.el,t.init(n),this.setMaterial(t.material),this.updateSchema(n)},updateMaterial:function(e){var t,n=this.data,r=this.material;for(t in r.alphaTest=n.alphaTest,r.depthTest=!1!==n.depthTest,r.depthWrite=!1!==n.depthWrite,r.opacity=n.opacity,r.flatShading=n.flatShading,r.side=function(e){switch(e){case"back":return o.BackSide;case"double":return o.DoubleSide;default:return o.FrontSide}}(n.side),r.transparent=!1!==n.transparent||n.opacity<1,r.vertexColors=function(e){switch(e){case"face":return o.FaceColors;case"vertex":return o.VertexColors;default:return o.NoColors}}(n.vertexColors),r.visible=n.visible,r.blending=function(e){switch(e){case"none":return o.NoBlending;case"additive":return o.AdditiveBlending;case"subtractive":return o.SubtractiveBlending;case"multiply":return o.MultiplyBlending;default:return o.NormalBlending}}(n.blending),r.dithering=n.dithering,e)break;!t||e.alphaTest===n.alphaTest&&e.side===n.side&&e.vertexColors===n.vertexColors||(r.needsUpdate=!0)},remove:function(){var e=new o.MeshBasicMaterial,t=this.material,n=this.el.getObject3D("mesh");n&&(n.material=e),h(t,this.system)},setMaterial:function(e){var t,n=this.el,r=this.system;this.material&&h(this.material,r),this.material=e,r.registerMaterial(e),(t=n.getObject3D("mesh"))?t.material=e:n.addEventListener("object3dset",(function t(r){"mesh"===r.detail.type&&r.target===n&&(n.getObject3D("mesh").material=e,n.removeEventListener("object3dset",t))}))}})},{"../core/component":131,"../core/shader":141,"../lib/three":179,"../utils/":205}],93:[function(e,t,n){var r=e("../utils/debug"),i=e("../core/component").registerComponent,o=e("../lib/three"),a=r("components:obj-model:warn");t.exports.Component=i("obj-model",{schema:{mtl:{type:"model"},obj:{type:"model"}},init:function(){var e=this;this.model=null,this.objLoader=new o.OBJLoader,this.mtlLoader=new o.MTLLoader(this.objLoader.manager),this.mtlLoader.crossOrigin="",this.el.addEventListener("componentinitialized",(function(t){e.model&&"material"===t.detail.name&&e.applyMaterial()}))},update:function(){var e=this.data;e.obj&&(this.resetMesh(),this.loadObj(e.obj,e.mtl))},remove:function(){this.model&&this.resetMesh()},resetMesh:function(){this.el.removeObject3D("mesh")},loadObj:function(e,t){var n=this,r=this.el,i=this.mtlLoader,o=this.objLoader,s=this.el.sceneEl.systems.renderer,l=t.substr(0,t.lastIndexOf("/")+1);if(t)return r.hasAttribute("material")&&a("Material component properties are ignored when a .MTL is provided"),i.setResourcePath(l),void i.load(t,(function(t){t.preload(),o.setMaterials(t),o.load(e,(function(e){n.model=e,n.model.traverse((function(e){if(e.isMesh){var t=e.material;t.color&&s.applyColorCorrection(t.color),t.map&&s.applyColorCorrection(t.map),t.emissive&&s.applyColorCorrection(t.emissive),t.emissiveMap&&s.applyColorCorrection(t.emissiveMap)}})),r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})}))}));o.load(e,(function(e){n.model=e,n.applyMaterial(),r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})}))},applyMaterial:function(){var e=this.el.components.material;e&&this.model.traverse((function(t){t instanceof o.Mesh&&(t.material=e.material)}))}})},{"../core/component":131,"../lib/three":179,"../utils/debug":201}],94:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"oculus-go":"Oculus Go",h=c?{axes:{touchpad:[0,1]},buttons:["trigger","none","touchpad"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]};t.exports.Component=r("oculus-go-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#FFFFFF"},buttonTouchedColor:{type:"color",default:"#BBBBBB"},buttonHighlightColor:{type:"color",default:"#7A7A7A"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/oculus/go/oculus-go-controller.gltf")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.getObjectByName("oculus_go_button_trigger"),t.trackpad=n.getObjectByName("oculus_go_touchpad"),t.touchpad=n.getObjectByName("oculus_go_touchpad"))},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r,i;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}(i=n[e]).material.color.set(r),this.rendererSystem.applyColorCorrection(i.material.color)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],95:[function(e,t,n){var r=e("../utils/bind"),i=e("../core/component").registerComponent,o=e("../lib/three"),a=e("../utils/tracked-controls"),s=a.checkControllerPresentAndSetup,l=a.emitIfAxesChanged,c=a.onButtonEvent,u=e("../utils/").device.isWebXRAvailable,h=u?"oculus-touch":"Oculus Touch",d="https://cdn.aframe.io/controllers/oculus/oculus-touch-controller-",f={left:{modelUrl:d+"left.gltf",rayOrigin:{origin:{x:.008,y:-.01,z:0},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(-.005,.003,-.055),modelPivotRotation:new o.Euler(0,0,0)},right:{modelUrl:d+"right.gltf",rayOrigin:{origin:{x:-.008,y:-.01,z:0},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(.005,.003,-.055),modelPivotRotation:new o.Euler(0,0,0)}},p={left:{modelUrl:d+"left.gltf",rayOrigin:{origin:{x:.002,y:-.005,z:-.03},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(-.005,.036,-.037),modelPivotRotation:new o.Euler(Math.PI/4.5,0,0)},right:{modelUrl:d+"right.gltf",rayOrigin:{origin:{x:-.002,y:-.005,z:-.03},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(.005,.036,-.037),modelPivotRotation:new o.Euler(Math.PI/4.5,0,0)}},m={"oculus-touch":u?p:f,"oculus-touch-v2":{left:{modelUrl:d+"gen2-left.gltf",rayOrigin:{origin:{x:-.01,y:0,z:-.02},direction:{x:0,y:-.5,z:-1}},modelPivotOffset:new o.Vector3(0,0,0),modelPivotRotation:new o.Euler(0,0,0)},right:{modelUrl:d+"gen2-right.gltf",rayOrigin:{origin:{x:.01,y:0,z:-.02},direction:{x:0,y:-.5,z:-1}},modelPivotOffset:new o.Vector3(0,0,0),modelPivotRotation:new o.Euler(0,0,0)}},"oculus-touch-v3":{left:{modelUrl:d+"v3-left.glb",rayOrigin:{origin:{x:.015,y:.005,z:0},direction:{x:0,y:0,z:-1}},modelPivotOffset:new o.Vector3(.01,-.01,.05),modelPivotRotation:new o.Euler(Math.PI/4,0,0)},right:{modelUrl:d+"v3-right.glb",rayOrigin:{origin:{x:-.015,y:.005,z:0},direction:{x:0,y:0,z:-1}},modelPivotOffset:new o.Vector3(-.01,-.01,.05),modelPivotRotation:new o.Euler(Math.PI/4,0,0)}}},g=u?{left:{axes:{thumbstick:[2,3]},buttons:["trigger","grip","none","thumbstick","xbutton","ybutton","surface"]},right:{axes:{thumbstick:[2,3]},buttons:["trigger","grip","none","thumbstick","abutton","bbutton","surface"]}}:{left:{axes:{thumbstick:[0,1]},buttons:["thumbstick","trigger","grip","xbutton","ybutton","surface"]},right:{axes:{thumbstick:[0,1]},buttons:["thumbstick","trigger","grip","abutton","bbutton","surface"]}};t.exports.Component=i("oculus-touch-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#999"},buttonTouchColor:{type:"color",default:"#8AB"},buttonHighlightColor:{type:"color",default:"#2DF"},model:{default:!0},controllerType:{default:"auto",oneOf:["auto","oculus-touch","oculus-touch-v2","oculus-touch-v3"]},orientationOffset:{type:"vec3",default:{x:43,y:0,z:0}}},mapping:g,bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.onAxisMoved=r(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,"down",e,e.data.hand)},this.onButtonUp=function(t){c(t.detail.id,"up",e,e.data.hand)},this.onButtonTouchStart=function(t){c(t.detail.id,"touchstart",e,e.data.hand)},this.onButtonTouchEnd=function(t){c(t.detail.id,"touchend",e,e.data.hand)},this.controllerPresent=!1,this.lastControllerCheck=0,this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){s(this,h,{hand:this.data.hand})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},loadModel:function(e){var t,n=this.data;if(n.model){if(this.displayModel=m[n.controllerType]||m["oculus-touch"],"auto"===n.controllerType){var r=this.el.sceneEl.systems["tracked-controls-webvr"];if(r&&r.vrDisplay){var i=r.vrDisplay.displayName;/^Oculus Quest$/.test(i)&&(this.displayModel=m["oculus-touch-v2"])}else t="oculus-touch",t=-1!==e.profiles.indexOf("oculus-touch-v2")?"oculus-touch-v2":t,t=-1!==e.profiles.indexOf("oculus-touch-v3")?"oculus-touch-v3":t,this.displayModel=m[t]}var o=this.displayModel[n.hand].modelUrl;this.el.setAttribute("gltf-model",o)}},injectTrackedControls:function(e){var t=this.data,n="right"===t.hand?"Oculus Touch (Right)":"Oculus Touch (Left)",r=u?"oculus-touch":n;this.el.setAttribute("tracked-controls",{id:r,hand:t.hand,orientationOffset:t.orientationOffset,handTrackingEnabled:!1}),this.loadModel(e)},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping[this.data.hand].buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"!==n&&"grip"!==n||(t=e.detail.state.value),r&&("trigger"===n&&r.trigger&&(r.trigger.rotation.x=this.originalXRotationTrigger-t*(Math.PI/26)),"grip"===n&&r.grip&&(r.grip.position.x=this.originalXPositionGrip+("left"===this.data.hand?-1:1)*t*.004)),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=this.controllerObject3D=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).grip=n.getObjectByName("buttonHand"),this.originalXPositionGrip=t.grip&&t.grip.position.x,t.thumbstick=n.getObjectByName("stick"),t.trigger=n.getObjectByName("buttonTrigger"),this.originalXRotationTrigger=t.trigger&&t.trigger.rotation.x,t.xbutton=n.getObjectByName("buttonX"),t.abutton=n.getObjectByName("buttonA"),t.ybutton=n.getObjectByName("buttonY"),t.bbutton=n.getObjectByName("buttonB"),n.position.copy(this.displayModel[this.data.hand].modelPivotOffset),n.rotation.copy(this.displayModel[this.data.hand].modelPivotRotation),this.el.emit("controllermodelready",{name:"oculus-touch-controls",model:this.data.model,rayOrigin:this.displayModel[this.data.hand].rayOrigin}))},onAxisMoved:function(e){l(this,this.mapping[this.data.hand].axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n,r="up"===t||"touchend"===t?this.data.buttonColor:"touchstart"===t?this.data.buttonTouchColor:this.data.buttonHighlightColor,i=this.buttonMeshes;this.data.model&&i&&i[e]&&((n=i[e]).material.color.set(r),this.rendererSystem.applyColorCorrection(n.material.color))}})},{"../core/component":131,"../lib/three":179,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],96:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("position",{schema:{type:"vec3"},update:function(){var e=this.el.object3D,t=this.data;e.position.set(t.x,t.y,t.z)},remove:function(){this.el.object3D.position.set(0,0,0)}})},{"../core/component":131}],97:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/").debug("components:raycaster:warn"),a=/^[\w\s-.,[\]#]*$/,s={childList:!0,attributes:!0,subtree:!0},l="raycaster-intersected",c="raycaster-intersection",u="raycaster-intersected-cleared",h="raycaster-intersection-cleared";function d(e,t){var n;for(e.length=t.length,n=0;n<t.length;n++)e[n]=t[n]}t.exports.Component=r("raycaster",{schema:{autoRefresh:{default:!0},direction:{type:"vec3",default:{x:0,y:0,z:-1}},enabled:{default:!0},far:{default:1e3},interval:{default:0},near:{default:0},objects:{default:""},origin:{type:"vec3"},showLine:{default:!1},lineColor:{default:"white"},lineOpacity:{default:1},useWorldCoordinates:{default:!1}},multiple:!0,init:function(){this.clearedIntersectedEls=[],this.unitLineEndVec3=new i.Vector3,this.intersectedEls=[],this.intersections=[],this.newIntersectedEls=[],this.newIntersections=[],this.objects=[],this.prevCheckTime=void 0,this.prevIntersectedEls=[],this.rawIntersections=[],this.raycaster=new i.Raycaster,this.updateOriginDirection(),this.setDirty=this.setDirty.bind(this),this.updateLine=this.updateLine.bind(this),this.observer=new MutationObserver(this.setDirty),this.dirty=!0,this.lineEndVec3=new i.Vector3,this.otherLineEndVec3=new i.Vector3,this.lineData={end:this.lineEndVec3},this.getIntersection=this.getIntersection.bind(this),this.intersectedDetail={el:this.el,getIntersection:this.getIntersection},this.intersectedClearedDetail={el:this.el},this.intersectionClearedDetail={clearedEls:this.clearedIntersectedEls},this.intersectionDetail={}},update:function(e){var t=this.data,n=this.el,r=this.raycaster;r.far=t.far,r.near=t.near,!t.showLine||t.far===e.far&&t.origin===e.origin&&t.direction===e.direction&&e.showLine||(this.unitLineEndVec3.copy(t.origin).add(t.direction).normalize(),this.drawLine()),!t.showLine&&e.showLine&&n.removeAttribute("line"),t.objects===e.objects||a.test(t.objects)||o('[raycaster] Selector "'+t.objects+'" may not update automatically with DOM changes.'),t.objects||o('[raycaster] For performance, please define raycaster.objects when using raycaster or cursor components to whitelist which entities to intersect with. e.g., raycaster="objects: [data-raycastable]".'),t.autoRefresh!==e.autoRefresh&&n.isPlaying&&(t.autoRefresh?this.addEventListeners():this.removeEventListeners()),e.enabled&&!t.enabled&&this.clearAllIntersections(),this.setDirty()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){this.data.showLine&&this.el.removeAttribute("line"),this.clearAllIntersections()},addEventListeners:function(){this.data.autoRefresh&&(this.observer.observe(this.el.sceneEl,s),this.el.sceneEl.addEventListener("object3dset",this.setDirty),this.el.sceneEl.addEventListener("object3dremove",this.setDirty))},removeEventListeners:function(){this.observer.disconnect(),this.el.sceneEl.removeEventListener("object3dset",this.setDirty),this.el.sceneEl.removeEventListener("object3dremove",this.setDirty)},setDirty:function(){this.dirty=!0},refreshObjects:function(){var e,t=this.data;e=t.objects?this.el.sceneEl.querySelectorAll(t.objects):this.el.sceneEl.querySelectorAll("*"),this.objects=this.flattenObject3DMaps(e),this.dirty=!1},tock:function(e){var t=this.data,n=this.prevCheckTime;t.enabled&&(n&&e-n<t.interval||(this.prevCheckTime=e,this.checkIntersections()))},checkIntersections:function(){var e,t,n=this.clearedIntersectedEls,r=this.el,i=this.data,o=this.intersectedEls,a=this.intersections,s=this.newIntersectedEls,f=this.newIntersections,p=this.prevIntersectedEls,m=this.rawIntersections;for(this.dirty&&this.refreshObjects(),d(this.prevIntersectedEls,this.intersectedEls),this.updateOriginDirection(),m.length=0,this.raycaster.intersectObjects(this.objects,!0,m),a.length=0,o.length=0,e=0;e<m.length;e++)t=m[e],i.showLine&&t.object===r.getObject3D("line")||t.object.el&&(a.push(t),o.push(t.object.el));for(f.length=0,s.length=0,e=0;e<a.length;e++)-1===p.indexOf(a[e].object.el)&&(f.push(a[e]),s.push(a[e].object.el));for(n.length=0,e=0;e<p.length;e++)-1===o.indexOf(p[e])&&(p[e].emit(u,this.intersectedClearedDetail),n.push(p[e]));for(n.length&&r.emit(h,this.intersectionClearedDetail),e=0;e<s.length;e++)s[e].emit(l,this.intersectedDetail);f.length&&(this.intersectionDetail.els=s,this.intersectionDetail.intersections=f,r.emit(c,this.intersectionDetail)),i.showLine&&setTimeout(this.updateLine)},updateLine:function(){var e,t=this.el,n=this.intersections;n.length&&(e=n[0].object.el===t&&n[1]?n[1].distance:n[0].distance),this.drawLine(e)},getIntersection:function(e){var t,n;for(t=0;t<this.intersections.length;t++)if((n=this.intersections[t]).object.el===e)return n;return null},updateOriginDirection:function(){var e=new i.Vector3,t=new i.Vector3;return function(){var n=this.el,r=this.data;r.useWorldCoordinates?this.raycaster.set(r.origin,r.direction):(n.object3D.updateMatrixWorld(),t.setFromMatrixPosition(n.object3D.matrixWorld),0===r.origin.x&&0===r.origin.y&&0===r.origin.z||(t=n.object3D.localToWorld(t.copy(r.origin))),e.copy(r.direction).transformDirection(n.object3D.matrixWorld).normalize(),this.raycaster.set(t,e))}}(),drawLine:function(e){var t,n=this.data,r=this.el;t=this.lineData.end===this.lineEndVec3?this.otherLineEndVec3:this.lineEndVec3,void 0===e&&(e=n.far===1/0?1e3:n.far),this.lineData.start=n.origin,this.lineData.end=t.copy(this.unitLineEndVec3).multiplyScalar(e),this.lineData.color=n.lineColor,this.lineData.opacity=n.lineOpacity,r.setAttribute("line",this.lineData)},flattenObject3DMaps:function(e){var t,n,r=this.objects;for(r.length=0,n=0;n<e.length;n++)if(e[n].isEntity&&e[n].object3D)for(t in e[n].object3DMap)r.push(e[n].getObject3D(t));return r},clearAllIntersections:function(){var e;for(e=0;e<this.intersectedEls.length;e++)this.intersectedEls[e].emit(u,this.intersectedClearedDetail);d(this.clearedIntersectedEls,this.intersectedEls),this.intersectedEls.length=0,this.intersections.length=0,this.el.emit(h,this.intersectionClearedDetail)}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],98:[function(e,t,n){var r=e("../lib/three").Math.degToRad,i=e("../core/component").registerComponent;t.exports.Component=i("rotation",{schema:{type:"vec3"},update:function(){var e=this.data,t=this.el.object3D;t.rotation.set(r(e.x),r(e.y),r(e.z)),t.rotation.order="YXZ"},remove:function(){this.el.object3D.rotation.set(0,0,0)}})},{"../core/component":131,"../lib/three":179}],99:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("scale",{schema:{type:"vec3",default:{x:1,y:1,z:1}},update:function(){var e=this.data,t=this.el.object3D,n=0===e.x?1e-5:e.x,r=0===e.y?1e-5:e.y,i=0===e.z?1e-5:e.z;t.scale.set(n,r,i)},remove:function(){this.el.object3D.scale.set(1,1,1)}})},{"../core/component":131}],100:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../core/component").components;t.exports.Component=r("background",{schema:{color:{type:"color",default:"black"},transparent:{default:!1}},update:function(){var e=this.data,t=this.el.object3D;e.transparent?t.background=null:t.background=new THREE.Color(e.color)},remove:function(){var e=this.data,t=this.el.object3D;e.transparent?t.background=null:t.background=i[this.name].schema.color.default}})},{"../../core/component":131}],101:[function(e,t,n){var r=e("../../core/component").registerComponent;t.exports.Component=r("debug",{schema:{default:!0}})},{"../../core/component":131}],102:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../utils/"),o=i.bind,a=e("../../constants/");function s(e,t,n){var r,i;return(r=document.createElement("div")).classList.add("a-dialog-buttons-container"),(i=document.createElement("button")).classList.add("a-dialog-button","a-dialog-ok-button"),i.setAttribute(a.AFRAME_INJECTED,""),i.innerHTML=e,r.appendChild(i),i.addEventListener("click",(function(e){e.stopPropagation(),n()})),l(t,r)}function l(e,t){var n,r,i,o;return(n=document.createElement("div")).classList.add("a-modal"),n.setAttribute(a.AFRAME_INJECTED,""),(r=document.createElement("div")).className="a-dialog",r.setAttribute(a.AFRAME_INJECTED,""),n.appendChild(r),(i=document.createElement("div")).classList.add("a-dialog-text-container"),r.appendChild(i),(o=document.createElement("div")).classList.add("a-dialog-text"),o.innerHTML=e,i.appendChild(o),r.appendChild(t),n}t.exports.Component=r("device-orientation-permission-ui",{schema:{enabled:{default:!0},deviceMotionMessage:{default:"This immersive website requires access to your device motion sensors."},mobileDesktopMessage:{default:"Set your browser to request the mobile version of the site and reload the page to enjoy immersive mode."},httpsMessage:{default:"Access this site over HTTPS to enter VR mode and grant access to the device sensors."},denyButtonText:{default:"Deny"},allowButtonText:{default:"Allow"},cancelButtonText:{default:"Cancel"}},init:function(){var e=this;this.data.enabled&&("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&"http:"===location.protocol&&this.showHTTPAlert(),i.device.isMobileDeviceRequestingDesktopSite()?this.showMobileDesktopModeAlert():"undefined"!==typeof DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?(this.onDeviceMotionDialogAllowClicked=o(this.onDeviceMotionDialogAllowClicked,this),this.onDeviceMotionDialogDenyClicked=o(this.onDeviceMotionDialogDenyClicked,this),DeviceOrientationEvent.requestPermission().catch((function(){e.devicePermissionDialogEl=function(e,t,n,r,i){var o,s,c;return(o=document.createElement("div")).classList.add("a-dialog-buttons-container"),(s=document.createElement("button")).classList.add("a-dialog-button","a-dialog-deny-button"),s.setAttribute(a.AFRAME_INJECTED,""),s.innerHTML=e,o.appendChild(s),(c=document.createElement("button")).classList.add("a-dialog-button","a-dialog-allow-button"),c.setAttribute(a.AFRAME_INJECTED,""),c.innerHTML=t,o.appendChild(c),c.addEventListener("click",(function(e){e.stopPropagation(),r()})),s.addEventListener("click",(function(e){e.stopPropagation(),i()})),l(n,o)}(e.data.denyButtonText,e.data.allowButtonText,e.data.deviceMotionMessage,e.onDeviceMotionDialogAllowClicked,e.onDeviceMotionDialogDenyClicked),e.el.appendChild(e.devicePermissionDialogEl)})).then((function(){e.el.emit("deviceorientationpermissiongranted"),e.permissionGranted=!0}))):this.permissionGranted=!0)},remove:function(){this.devicePermissionDialogEl&&this.el.removeChild(this.devicePermissionDialogEl)},onDeviceMotionDialogDenyClicked:function(){this.remove()},showMobileDesktopModeAlert:function(){var e=this,t=s(e.data.cancelButtonText,e.data.mobileDesktopMessage,(function(){e.el.removeChild(t)}));this.el.appendChild(t)},showHTTPAlert:function(){var e=this,t=s(e.data.cancelButtonText,e.data.httpsMessage,(function(){e.el.removeChild(t)}));this.el.appendChild(t)},onDeviceMotionDialogAllowClicked:function(){var e=this;this.el.emit("deviceorientationpermissionrequested"),DeviceOrientationEvent.requestPermission().then((function(t){"granted"===t?(e.el.emit("deviceorientationpermissiongranted"),e.permissionGranted=!0):e.el.emit("deviceorientationpermissionrejected"),e.remove()})).catch(console.error)}})},{"../../constants/":123,"../../core/component":131,"../../utils/":205}],103:[function(e,t,n){var r=e("../../core/component").registerComponent;t.exports.Component=r("embedded",{dependencies:["vr-mode-ui"],schema:{default:!0},update:function(){var e=this.el,t=e.querySelector(".a-enter-vr");!0===this.data?(t&&t.classList.add("embedded"),e.removeFullScreenStyles()):(t&&t.classList.remove("embedded"),e.addFullScreenStyles())}})},{"../../core/component":131}],104:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=e("../../utils/debug")("components:fog:warn");t.exports.Component=r("fog",{schema:{color:{type:"color",default:"#000"},density:{default:25e-5},far:{default:1e3,min:0},near:{default:1,min:0},type:{default:"linear",oneOf:["linear","exponential"]}},update:function(){var e=this.data,t=this.el,n=this.el.object3D.fog;if(t.isScene)return n&&e.type===n.name?void Object.keys(this.schema).forEach((function(t){var r=e[t];"color"===t&&(r=new i.Color(r)),n[t]=r})):(t.object3D.fog=function(e){var t;return(t="exponential"===e.type?new i.FogExp2(e.color,e.density):new i.Fog(e.color,e.near,e.far)).name=e.type,t}(e),void t.systems.material.updateMaterials());o("Fog component can only be applied to <a-scene>")},remove:function(){var e=this.el.object3D.fog;e&&(e.far=0,e.near=.1)}})},{"../../core/component":131,"../../lib/three":179,"../../utils/debug":201}],105:[function(e,t,n){(function(n){var r=e("../../constants").AFRAME_INJECTED,i=e("../../../package"),o=e("../../core/component").registerComponent,a=e("../../utils/"),s="https://unpkg.com/aframe-inspector@"+function(e){var t=e.split(".");return t[2]="x",t.join(".")}(i.version)+"/dist/aframe-inspector.min.js",l="dev"===n.env.INSPECTOR_VERSION?"https://aframe.io/aframe-inspector/dist/aframe-inspector.js":s;t.exports.Component=o("inspector",{schema:{url:{default:l}},init:function(){this.firstPlay=!0,this.onKeydown=this.onKeydown.bind(this),this.onMessage=this.onMessage.bind(this),this.initOverlay(),window.addEventListener("keydown",this.onKeydown),window.addEventListener("message",this.onMessage)},play:function(){var e;this.firstPlay&&"false"!==(e=a.getUrlParameter("inspector"))&&e&&(this.openInspector(),this.firstPlay=!1)},initOverlay:function(){this.loadingMessageEl=document.createElement("div"),this.loadingMessageEl.classList.add("a-inspector-loader"),this.loadingMessageEl.innerHTML='Loading Inspector<span class="dots"><span>.</span><span>.</span><span>.</span></span>'},remove:function(){this.removeEventListeners()},onKeydown:function(e){73===e.keyCode&&(e.ctrlKey&&e.altKey||e.getModifierState("AltGraph"))&&this.openInspector()},showLoader:function(){document.body.appendChild(this.loadingMessageEl)},hideLoader:function(){document.body.removeChild(this.loadingMessageEl)},onMessage:function(e){"INJECT_AFRAME_INSPECTOR"===e.data&&this.openInspector()},openInspector:function(e){var t,n=this;AFRAME.INSPECTOR||AFRAME.inspectorInjected?AFRAME.INSPECTOR.open(e):(this.showLoader(),(t=document.createElement("script")).src=this.data.url,t.setAttribute("data-name","aframe-inspector"),t.setAttribute(r,""),t.onload=function(){AFRAME.INSPECTOR.open(e),n.hideLoader(),n.removeEventListeners()},t.onerror=function(){n.loadingMessageEl.innerHTML="Error loading Inspector"},document.head.appendChild(t),AFRAME.inspectorInjected=!0)},removeEventListeners:function(){window.removeEventListener("keydown",this.onKeydown),window.removeEventListener("message",this.onMessage)}})}).call(this,e("_process"))},{"../../../package":73,"../../constants":123,"../../core/component":131,"../../utils/":205,_process:49}],106:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../utils/").shouldCaptureKeyEvent;t.exports.Component=r("keyboard-shortcuts",{schema:{enterVR:{default:!0},exitVR:{default:!0}},init:function(){this.onKeyup=this.onKeyup.bind(this)},update:function(e){var t=this.data;this.enterVREnabled=t.enterVR},play:function(){window.addEventListener("keyup",this.onKeyup,!1)},pause:function(){window.removeEventListener("keyup",this.onKeyup)},onKeyup:function(e){var t=this.el;i(e)&&(this.enterVREnabled&&70===e.keyCode&&t.enterVR(),this.enterVREnabled&&27===e.keyCode&&t.exitVR())}})},{"../../core/component":131,"../../utils/":205}],107:[function(e,t,n){var r=e("../../utils/debug"),i=e("../../core/component").registerComponent,o=r("components:pool:warn");t.exports.Component=i("pool",{schema:{container:{default:""},mixin:{default:""},size:{default:0},dynamic:{default:!1}},multiple:!0,initPool:function(){var e;for(this.availableEls=[],this.usedEls=[],this.data.mixin||o("No mixin provided for pool component."),this.data.container&&(this.container=document.querySelector(this.data.container),this.container||o("Container "+this.data.container+" not found.")),this.container=this.container||this.el,e=0;e<this.data.size;++e)this.createEntity()},update:function(e){var t=this.data;e.mixin===t.mixin&&e.size===t.size||this.initPool()},createEntity:function(){var e;(e=document.createElement("a-entity")).play=this.wrapPlay(e.play),e.setAttribute("mixin",this.data.mixin),e.object3D.visible=!1,e.pause(),this.container.appendChild(e),this.availableEls.push(e)},wrapPlay:function(e){var t=this.usedEls;return function(){-1!==t.indexOf(this)&&e.call(this)}},requestEntity:function(){var e;if(0===this.availableEls.length){if(!1===this.data.dynamic)return void o("Requested entity from empty pool: "+this.attrName);o("Requested entity from empty pool. This pool is dynamic and will resize automatically. You might want to increase its initial size: "+this.attrName),this.createEntity()}return e=this.availableEls.shift(),this.usedEls.push(e),e.object3D.visible=!0,e},returnEntity:function(e){var t=this.usedEls.indexOf(e);if(-1!==t)return this.usedEls.splice(t,1),this.availableEls.push(e),e.object3D.visible=!1,e.pause(),e;o("The returned entity was not previously pooled from "+this.attrName)}})},{"../../core/component":131,"../../utils/debug":201}],108:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=["attribute vec3 position;","attribute vec2 uv;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","varying vec2 vUv;","void main() {"," vUv = vec2( 1.- uv.x, uv.y );"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),a=["precision mediump float;","uniform samplerCube map;","varying vec2 vUv;","#define M_PI 3.141592653589793238462643383279","void main() {"," vec2 uv = vUv;"," float longitude = uv.x * 2. * M_PI - M_PI + M_PI / 2.;"," float latitude = uv.y * M_PI;"," vec3 dir = vec3("," - sin( longitude ) * sin( latitude ),"," cos( latitude ),"," - cos( longitude ) * sin( latitude )"," );"," normalize( dir );"," gl_FragColor = vec4( textureCube( map, dir ).rgb, 1.0 );","}"].join("\n");t.exports.Component=r("screenshot",{schema:{width:{default:4096},height:{default:2048},camera:{type:"selector"}},init:function(){var e=this.el,t=this;function n(){var n=e.renderer.getContext();n&&(t.cubeMapSize=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),t.material=new i.RawShaderMaterial({uniforms:{map:{type:"t",value:null}},vertexShader:o,fragmentShader:a,side:i.DoubleSide}),t.quad=new i.Mesh(new i.PlaneBufferGeometry(1,1),t.material),t.quad.visible=!1,t.camera=new i.OrthographicCamera(-.5,.5,.5,-.5,-1e4,1e4),t.canvas=document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),e.object3D.add(t.quad),t.onKeyDown=t.onKeyDown.bind(t))}e.renderer?n():e.addEventListener("render-target-loaded",n)},getRenderTarget:function(e,t){return new i.WebGLRenderTarget(e,t,{minFilter:i.LinearFilter,magFilter:i.LinearFilter,wrapS:i.ClampToEdgeWrapping,wrapT:i.ClampToEdgeWrapping,format:i.RGBAFormat,type:i.UnsignedByteType})},resize:function(e,t){this.quad.scale.set(e,t,1),this.camera.left=-1*e/2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=-1*t/2,this.camera.updateProjectionMatrix(),this.canvas.width=e,this.canvas.height=t},play:function(){window.addEventListener("keydown",this.onKeyDown)},onKeyDown:function(e){var t=83===e.keyCode&&e.ctrlKey&&e.altKey;if(this.data&&t){var n=e.shiftKey?"equirectangular":"perspective";this.capture(n)}},setCapture:function(e){var t,n,r,o,a=this.el;return"perspective"===e?(this.quad.visible=!1,n=this.data.camera&&this.data.camera.components.camera.camera||a.camera,t={width:this.data.width,height:this.data.height}):(n=this.camera,o=new i.WebGLCubeRenderTarget(Math.min(this.cubeMapSize,2048),{format:i.RGBFormat,generateMipmaps:!0,minFilter:i.LinearMipmapLinearFilter,encoding:i.sRGBEncoding}),r=new i.CubeCamera(a.camera.near,a.camera.far,o),a.camera.getWorldPosition(r.position),a.camera.getWorldQuaternion(r.quaternion),r.update(a.renderer,a.object3D),this.quad.material.uniforms.map.value=r.renderTarget.texture,t={width:this.data.width,height:this.data.height},this.quad.visible=!0),{camera:n,size:t,projection:e}},capture:function(e){var t,n=this.el.renderer.xr.enabled,r=this.el.renderer;r.xr.enabled=!1,t=this.setCapture(e),this.renderCapture(t.camera,t.size,t.projection),this.saveCapture(),r.xr.enabled=n},getCanvas:function(e){var t=this.el.renderer.xr.enabled,n=this.el.renderer,r=this.setCapture(e);return n.xr.enabled=!1,this.renderCapture(r.camera,r.size,r.projection),n.xr.enabled=t,this.canvas},renderCapture:function(e,t,n){var r,i,o,a=this.el.renderer.autoClear,s=this.el,l=s.renderer;i=this.getRenderTarget(t.width,t.height),o=new Uint8Array(4*t.width*t.height),this.resize(t.width,t.height),l.autoClear=!0,l.clear(),l.setRenderTarget(i),l.render(s.object3D,e),l.autoClear=a,l.readRenderTargetPixels(i,0,0,t.width,t.height,o),l.setRenderTarget(null),"perspective"===n&&(o=this.flipPixelsVertically(o,t.width,t.height)),r=new ImageData(new Uint8ClampedArray(o),t.width,t.height),this.quad.visible=!1,this.ctx.putImageData(r,0,0)},flipPixelsVertically:function(e,t,n){for(var r=e.slice(0),i=0;i<t;++i)for(var o=0;o<n;++o)r[4*i+o*t*4]=e[4*i+(n-o)*t*4],r[4*i+1+o*t*4]=e[4*i+1+(n-o)*t*4],r[4*i+2+o*t*4]=e[4*i+2+(n-o)*t*4],r[4*i+3+o*t*4]=e[4*i+3+(n-o)*t*4];return r},saveCapture:function(){this.canvas.toBlob((function(e){var t="screenshot-"+document.title.toLowerCase()+"-"+Date.now()+".png",n=document.createElement("a"),r=URL.createObjectURL(e);n.href=r,n.setAttribute("download",t),n.innerHTML="downloading...",n.style.display="none",document.body.appendChild(n),setTimeout((function(){n.click(),document.body.removeChild(n)}),1)}),"image/png")}})},{"../../core/component":131,"../../lib/three":179}],109:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../../vendor/rStats"),o=e("../../utils");e("../../../vendor/rStats.extras"),e("../../lib/rStatsAframe");var a=window.aframeStats,s=o.bind,l=window.threeStats;t.exports.Component=r("stats",{schema:{default:!0},init:function(){var e=this.el;"false"!==o.getUrlParameter("stats")&&(this.stats=function(e){var t=new l(e.renderer),n=new a(e),r=e.isMobile?[]:[t,n];return new i({css:[],values:{fps:{caption:"fps",below:30}},groups:[{caption:"Framerate",values:["fps","raf"]}],plugins:r})}(e),this.statsEl=document.querySelector(".rs-base"),this.hideBound=s(this.hide,this),this.showBound=s(this.show,this),e.addEventListener("enter-vr",this.hideBound),e.addEventListener("exit-vr",this.showBound))},update:function(){if(this.stats)return this.data?this.show():this.hide()},remove:function(){this.el.removeEventListener("enter-vr",this.hideBound),this.el.removeEventListener("exit-vr",this.showBound),this.statsEl&&this.statsEl.parentNode.removeChild(this.statsEl)},tick:function(){var e=this.stats;e&&(e("rAF").tick(),e("FPS").frame(),e().update())},hide:function(){this.statsEl.classList.add("a-hidden")},show:function(){this.statsEl.classList.remove("a-hidden")}})},{"../../../vendor/rStats":217,"../../../vendor/rStats.extras":216,"../../core/component":131,"../../lib/rStatsAframe":178,"../../utils":205}],110:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../constants/"),o=e("../../utils/"),a=o.bind;function s(e){e.addEventListener("touchstart",(function(){e.classList.remove("resethover")})),e.addEventListener("touchend",(function(){e.classList.add("resethover")}))}t.exports.Component=r("vr-mode-ui",{dependencies:["canvas"],schema:{enabled:{default:!0},enterVRButton:{default:""},enterARButton:{default:""}},init:function(){var e=this,t=this.el;"false"!==o.getUrlParameter("ui")&&(this.insideLoader=!1,this.enterVREl=null,this.enterAREl=null,this.orientationModalEl=null,this.bindMethods(),t.addEventListener("enter-vr",this.updateEnterInterfaces),t.addEventListener("exit-vr",this.updateEnterInterfaces),t.addEventListener("update-vr-devices",this.updateEnterInterfaces),window.addEventListener("message",(function(t){"loaderReady"===t.data.type&&(e.insideLoader=!0,e.remove())})),window.addEventListener("orientationchange",this.toggleOrientationModalIfNeeded))},bindMethods:function(){this.onEnterVRButtonClick=a(this.onEnterVRButtonClick,this),this.onEnterARButtonClick=a(this.onEnterARButtonClick,this),this.onModalClick=a(this.onModalClick,this),this.toggleOrientationModalIfNeeded=a(this.toggleOrientationModalIfNeeded,this),this.updateEnterInterfaces=a(this.updateEnterInterfaces,this)},onModalClick:function(){this.el.exitVR()},onEnterVRButtonClick:function(){this.el.enterVR()},onEnterARButtonClick:function(){this.el.enterAR()},update:function(){var e=this.data,t=this.el;if(!e.enabled||this.insideLoader||"false"===o.getUrlParameter("ui"))return this.remove();this.enterVREl||this.enterAREl||this.orientationModalEl||(e.enterVRButton?(this.enterVREl=document.querySelector(e.enterVRButton),this.enterVREl.addEventListener("click",this.onEnterVRButtonClick)):(this.enterVREl=function(e){var t,n;return(n=document.createElement("div")).classList.add("a-enter-vr"),n.setAttribute(i.AFRAME_INJECTED,""),(t=document.createElement("button")).className="a-enter-vr-button",t.setAttribute("title","Enter VR mode with a headset or fullscreen mode on a desktop. Visit https://webvr.rocks or https://webvr.info for more information."),t.setAttribute(i.AFRAME_INJECTED,""),o.device.isMobile()&&s(t),n.appendChild(t),t.addEventListener("click",(function(t){e(),t.stopPropagation()})),n}(this.onEnterVRButtonClick),t.appendChild(this.enterVREl)),e.enterARButton?(this.enterAREl=document.querySelector(e.enterARButton),this.enterAREl.addEventListener("click",this.onEnterARButtonClick)):(this.enterAREl=function(e){var t,n;return(n=document.createElement("div")).classList.add("a-enter-ar"),n.setAttribute(i.AFRAME_INJECTED,""),(t=document.createElement("button")).className="a-enter-ar-button",t.setAttribute("title","Enter AR mode with a headset or handheld device. Visit https://webvr.rocks or https://webvr.info for more information."),t.setAttribute(i.AFRAME_INJECTED,""),o.device.isMobile()&&s(t),n.appendChild(t),t.addEventListener("click",(function(t){e(),t.stopPropagation()})),n}(this.onEnterARButtonClick),t.appendChild(this.enterAREl)),this.orientationModalEl=function(e){var t=document.createElement("div");t.className="a-orientation-modal",t.classList.add("a-hidden"),t.setAttribute(i.AFRAME_INJECTED,"");var n=document.createElement("button");return n.setAttribute(i.AFRAME_INJECTED,""),n.innerHTML="Exit VR",n.addEventListener("click",e),t.appendChild(n),t}(this.onModalClick),t.appendChild(this.orientationModalEl),this.updateEnterInterfaces())},remove:function(){[this.enterVREl,this.enterAREl,this.orientationModalEl].forEach((function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})),this.enterVREl=void 0,this.enterAREl=void 0,this.orientationModalEl=void 0},updateEnterInterfaces:function(){this.toggleEnterVRButtonIfNeeded(),this.toggleEnterARButtonIfNeeded(),this.toggleOrientationModalIfNeeded()},toggleEnterVRButtonIfNeeded:function(){var e=this.el;this.enterVREl&&(e.is("vr-mode")?this.enterVREl.classList.add("a-hidden"):this.enterVREl.classList.remove("a-hidden"))},toggleEnterARButtonIfNeeded:function(){var e=this.el;this.enterAREl&&(e.is("vr-mode")||!o.device.checkARSupport()?this.enterAREl.classList.add("a-hidden"):this.enterAREl.classList.remove("a-hidden"))},toggleOrientationModalIfNeeded:function(){var e=this.el,t=this.orientationModalEl;t&&e.isMobile&&(!o.device.isLandscape()&&e.is("vr-mode")?t.classList.remove("a-hidden"):t.classList.add("a-hidden"))}})},{"../../constants/":123,"../../core/component":131,"../../utils/":205}],111:[function(e,t,n){var r=e("../core/component"),i=e("../lib/three"),o=e("../utils/bind"),a=r.registerComponent;t.exports.Component=a("shadow",{schema:{cast:{default:!0},receive:{default:!0}},init:function(){this.onMeshChanged=o(this.update,this),this.el.addEventListener("object3dset",this.onMeshChanged),this.system.setShadowMapEnabled(!0)},update:function(){var e=this.data;this.updateDescendants(e.cast,e.receive)},remove:function(){this.el.removeEventListener("object3dset",this.onMeshChanged),this.updateDescendants(!1,!1)},updateDescendants:function(e,t){var n=this.el.sceneEl;this.el.object3D.traverse((function(r){if(r instanceof i.Mesh&&(r.castShadow=e,r.receiveShadow=t,n.hasLoaded&&r.material))for(var o=Array.isArray(r.material)?r.material:[r.material],a=0;a<o.length;a++)o[a].needsUpdate=!0}))}})},{"../core/component":131,"../lib/three":179,"../utils/bind":199}],112:[function(t,n,r){var i=t("../core/component").registerComponent,o=t("../utils/debug"),a=t("../lib/three"),s=o("components:sound:warn");n.exports.Component=i("sound",{schema:{autoplay:{default:!1},distanceModel:{default:"inverse",oneOf:["linear","inverse","exponential"]},loop:{default:!1},maxDistance:{default:1e4},on:{default:""},poolSize:{default:1},positional:{default:!0},refDistance:{default:1},rolloffFactor:{default:1},src:{type:"audio"},volume:{default:1}},multiple:!0,init:function(){var e=this;this.listener=null,this.audioLoader=new a.AudioLoader,this.pool=new a.Group,this.loaded=!1,this.mustPlay=!1,this.playSoundBound=function(){e.playSound()}},update:function(e){var t,n,r=this.data,i=r.src!==e.src;if(i){if(!r.src)return;this.setupSound()}for(t=0;t<this.pool.children.length;t++)n=this.pool.children[t],r.positional&&(n.setDistanceModel(r.distanceModel),n.setMaxDistance(r.maxDistance),n.setRefDistance(r.refDistance),n.setRolloffFactor(r.rolloffFactor)),n.setLoop(r.loop),n.setVolume(r.volume),n.isPaused=!1;if(r.on!==e.on&&this.updateEventListener(e.on),i){var o=this;this.loaded=!1,this.audioLoader.load(r.src,(function(e){for(t=0;t<o.pool.children.length;t++)(n=o.pool.children[t]).setBuffer(e);o.loaded=!0,a.Cache.remove(r.src),(o.data.autoplay||o.mustPlay)&&o.playSound(),o.el.emit("sound-loaded",o.evtDetail,!1)}))}},pause:function(){this.stopSound(),this.removeEventListener()},play:function(){this.data.autoplay&&this.playSound(),this.updateEventListener()},remove:function(){var t;this.removeEventListener(),this.el.getObject3D(this.attrName)&&this.el.removeObject3D(this.attrName);try{for(t=0;t<this.pool.children.length;t++)this.pool.children[t].disconnect()}catch(e){s("Audio source not properly disconnected")}},updateEventListener:function(e){var t=this.el;e&&t.removeEventListener(e,this.playSoundBound),t.addEventListener(this.data.on,this.playSoundBound)},removeEventListener:function(){this.el.removeEventListener(this.data.on,this.playSoundBound)},setupSound:function(){var e,t,n=this.el,r=n.sceneEl,i=this;this.pool.children.length>0&&(this.stopSound(),n.removeObject3D("sound"));var o=this.listener=r.audioListener||new a.AudioListener;for(r.audioListener=o,r.camera&&r.camera.add(o),r.addEventListener("camera-set-active",(function(e){e.detail.cameraEl.getObject3D("camera").add(o)})),this.pool=new a.Group,e=0;e<this.data.poolSize;e++)t=this.data.positional?new a.PositionalAudio(o):new a.Audio(o),this.pool.add(t);for(n.setObject3D(this.attrName,this.pool),e=0;e<this.pool.children.length;e++)(t=this.pool.children[e]).onEnded=function(){this.isPlaying=!1,i.el.emit("sound-ended",i.evtDetail,!1)}},pauseSound:function(){var e,t;for(this.isPlaying=!1,e=0;e<this.pool.children.length;e++)(t=this.pool.children[e]).source&&t.source.buffer&&t.isPlaying&&!t.isPaused&&(t.isPaused=!0,t.pause())},playSound:function(e){var t,n,r;if(!this.loaded)return s("Sound not loaded yet. It will be played once it finished loading"),void(this.mustPlay=!0);for(t=!1,this.isPlaying=!0,n=0;n<this.pool.children.length;n++)(r=this.pool.children[n]).isPlaying||!r.buffer||t||(e&&e(r),r.play(),r.isPaused=!1,t=!0);t?this.mustPlay=!1:s("All the sounds are playing. If you need to play more sounds simultaneously consider increasing the size of pool with the `poolSize` attribute.",this.el)},stopSound:function(){var e,t;for(this.isPlaying=!1,e=0;e<this.pool.children.length;e++){if(!(t=this.pool.children[e]).source||!t.source.buffer)return;t.stop()}}})},{"../core/component":131,"../lib/three":179,"../utils/debug":201}],113:[function(e,t,n){var r=e("three-bmfont-text"),i=e("load-bmfont"),o=e("../core/component").registerComponent,a=e("../core/shader"),s=e("../lib/three"),l=e("../utils/"),c=l.debug("components:text:error"),u=a.shaders,h=l.debug("components:text:warn"),d="https://cdn.aframe.io/fonts/",f={aileronsemibold:d+"Aileron-Semibold.fnt",dejavu:d+"DejaVu-sdf.fnt",exo2bold:d+"Exo2Bold.fnt",exo2semibold:d+"Exo2SemiBold.fnt",kelsonsans:d+"KelsonSans.fnt",monoid:d+"Monoid.fnt",mozillavr:d+"mozillavr.fnt",roboto:d+"Roboto-msdf.json",sourcecodepro:d+"SourceCodePro.fnt"},p=["roboto"];t.exports.FONTS=f;var m=new function(){var e=this.cache={};this.get=function(t,n){return t in e||(e[t]=n()),e[t]}},g={},v={},y=/^\w+:/;function b(e,t,n){return e||(.5+t)*n}t.exports.Component=o("text",{multiple:!0,schema:{align:{type:"string",default:"left",oneOf:["left","right","center"]},alphaTest:{default:.5},anchor:{default:"center",oneOf:["left","right","center","align"]},baseline:{default:"center",oneOf:["top","center","bottom"]},color:{type:"color",default:"#FFF"},font:{type:"string",default:"roboto"},fontImage:{type:"string"},height:{type:"number"},letterSpacing:{type:"number",default:0},lineHeight:{type:"number"},negate:{type:"boolean",default:!0},opacity:{type:"number",default:1},shader:{default:"sdf",oneOf:u},side:{default:"front",oneOf:["front","back","double"]},tabSize:{default:4},transparent:{default:!0},value:{type:"string"},whiteSpace:{default:"normal",oneOf:["normal","pre","nowrap"]},width:{type:"number"},wrapCount:{type:"number",default:40},wrapPixels:{type:"number"},xOffset:{type:"number",default:0},yOffset:{type:"number",default:0},zOffset:{type:"number",default:.001}},init:function(){this.shaderData={},this.geometry=r(),this.createOrUpdateMaterial()},update:function(e){var t=this.data,n=this.currentFont;v[t.font]?this.texture=v[t.font]:(this.texture=v[t.font]=new s.Texture,this.texture.anisotropy=16),this.createOrUpdateMaterial(),e.font===t.font?n&&(this.updateGeometry(this.geometry,n),this.updateLayout()):this.updateFont()},remove:function(){this.geometry.dispose(),this.geometry=null,this.el.removeObject3D(this.attrName),this.material.dispose(),this.material=null,this.texture.dispose(),this.texture=null,this.shaderObject&&delete this.shaderObject},createOrUpdateMaterial:function(){var e,t,n,r=this.data,i=this.material,o=this.shaderData;if(n=r.shader,-1!==p.indexOf(r.font)||r.font.indexOf("-msdf.")>=0?n="msdf":r.font in f&&-1===p.indexOf(r.font)&&(n="sdf"),e=(this.shaderObject&&this.shaderObject.name)!==n,o.alphaTest=r.alphaTest,o.color=r.color,o.map=this.texture,o.opacity=r.opacity,o.side=function(e){switch(e){case"back":return s.FrontSide;case"double":return s.DoubleSide;default:return s.BackSide}}(r.side),o.transparent=r.transparent,o.negate=r.negate,!e)return this.shaderObject.update(o),i.transparent=o.transparent,void(i.side=o.side);t=function(e,t,n){var r,i;return(i=new u[t].Shader).el=e,i.init(n),i.update(n),(r=i.material).transparent=n.transparent,{material:r,shader:i}}(this.el,n,o),this.material=t.material,this.shaderObject=t.shader,this.material.side=o.side,this.mesh&&(this.mesh.material=this.material)},updateFont:function(){var e,t=this.data,n=this.el,r=this.geometry,o=this;t.font||h("No font specified. Using the default font."),this.mesh&&(this.mesh.visible=!1),e=this.lookupFont(t.font||"roboto")||t.font,m.get(e,(function(){return n=e,r=t.yOffset,new Promise((function(e,t){i(n,(function(i,o){if(i)return c("Error loading font",n),void t(i);n.indexOf("/Roboto-msdf.json")>=0&&(r=30),r&&o.chars.map((function(e){e.yoffset+=r})),e(o)}))}));var n,r})).then((function(i){var a;if(1!==i.pages.length)throw new Error("Currently only single-page bitmap fonts are supported.");g[e]||(i.widthFactor=g[i]=function(e){var t=0,n=0,r=0;return e.chars.map((function(e){t+=e.xadvance,e.id>=48&&e.id<=57&&(r++,n+=e.xadvance)})),r?n/r:t/e.chars.length}(i)),o.currentFont=i,a=o.getFontImageSrc(),m.get(a,(function(){return e=a,new Promise((function(t,n){(new s.ImageLoader).load(e,(function(e){t(e)}),void 0,(function(){c("Error loading font image",e),n(null)}))}));var e})).then((function(e){var a=o.texture;a.image=e,a.needsUpdate=!0,v[t.font]=a,o.texture=a,o.initMesh(),o.currentFont=i,o.updateGeometry(r,i),o.updateLayout(),o.mesh.visible=!0,n.emit("textfontset",{font:t.font,fontObj:i})})).catch((function(e){c(e.message),c(e.stack)}))})).catch((function(e){c(e.message),c(e.stack)}))},initMesh:function(){this.mesh||(this.mesh=new s.Mesh(this.geometry,this.material),this.el.setObject3D(this.attrName,this.mesh))},getFontImageSrc:function(){if(this.data.fontImage)return this.data.fontImage;var e=this.lookupFont(this.data.font||"roboto")||this.data.font,t=this.currentFont.pages[0];return t.match(y)&&0!==t.indexOf("http")?e.replace(/(\.fnt)|(\.json)/,".png"):s.LoaderUtils.extractUrlBase(e)+t},updateLayout:function(){var e,t,n,r,i,o,a,s,l,c=this.el,u=this.data,h=this.geometry,d=this.mesh;if(d&&h.layout){if(n=c.getAttribute("geometry"),r=(o=(a=u.width||n&&n.width||1)/b(u.wrapPixels,u.wrapCount,this.currentFont.widthFactor))*((i=h.layout).height+i.descender),n&&"plane"===n.primitive&&(n.width||c.setAttribute("geometry","width",a),n.height||c.setAttribute("geometry","height",r)),"left"===(e="align"===u.anchor?u.align:u.anchor))s=0;else if("right"===e)s=-1*i.width;else{if("center"!==e)throw new TypeError("Invalid text.anchor property value",e);s=-1*i.width/2}if("bottom"===(t=u.baseline))l=0;else if("top"===t)l=-1*i.height+i.ascender;else{if("center"!==t)throw new TypeError("Invalid text.baseline property value",t);l=-1*i.height/2}d.position.x=s*o+u.xOffset,d.position.y=l*o,d.position.z=u.zOffset,d.scale.set(o,-1*o,o)}},lookupFont:function(e){return f[e]},updateGeometry:function(){var e={},t={},n=/\\n/g,r=/\\t/g;return function(i,o){var a=this.data;t.font=o,t.lineHeight=a.lineHeight&&isFinite(a.lineHeight)?a.lineHeight:o.common.lineHeight,t.text=a.value.toString().replace(n,"\n").replace(r,"\t"),t.width=b(a.wrapPixels,a.wrapCount,o.widthFactor),i.update(l.extend(e,a,t))}}()})},{"../core/component":131,"../core/shader":141,"../lib/three":179,"../utils/":205,"load-bmfont":37,"three-bmfont-text":63}],114:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/tracked-controls"),o=e("../constants").DEFAULT_CAMERA_HEIGHT,a=e("../lib/three"),s=e("../constants").DEFAULT_HANDEDNESS,l=.175,c=-.3,u=-.03,h=0,d=0,f=-.175,p={touches:[]},m="axismove",g="buttonchanged",v="buttondown",y="buttonup",b="touchstart",w="touchend";t.exports.Component=r("tracked-controls-webvr",{schema:{autoHide:{default:!0},controller:{default:0},id:{type:"string",default:""},hand:{type:"string",default:""},idPrefix:{type:"string",default:""},orientationOffset:{type:"vec3"},armModel:{default:!1},headElement:{type:"selector"}},init:function(){this.axis=this.el.components["tracked-controls"].axis=[0,0,0],this.buttonStates=this.el.components["tracked-controls"].buttonStates={},this.changedAxes=[],this.targetControllerNumber=this.data.controller,this.axisMoveEventDetail={axis:this.axis,changed:this.changedAxes},this.deltaControllerPosition=new a.Vector3,this.controllerQuaternion=new a.Quaternion,this.controllerEuler=new a.Euler,this.updateGamepad(),this.buttonEventDetails={}},tick:function(e,t){var n=this.el.getObject3D("mesh");n&&n.update&&n.update(t/1e3),this.updateGamepad(),this.updatePose(),this.updateButtons()},defaultUserHeight:function(){return o},getHeadElement:function(){return this.data.headElement||this.el.sceneEl.camera.el},updateGamepad:function(){var e=this.data,t=i.findMatchingControllerWebVR(this.system.controllers,e.id,e.idPrefix,e.hand,e.controller);this.controller=t,this.el.components["tracked-controls"].controller=t,this.data.autoHide&&(this.el.object3D.visible=!!this.controller)},applyArmModel:function(e){var t,n,r,i,o=this.controller,a=this.controllerEuler,p=this.controllerQuaternion,m=this.deltaControllerPosition;n=this.getHeadElement().object3D,i=this.defaultUserHeight(),r=o.pose,t=(o?o.hand:void 0)||s,e.copy(n.position),m.set(l*("left"===t?-1:"right"===t?1:0),c,u),m.multiplyScalar(i),m.applyAxisAngle(n.up,n.rotation.y),e.add(m),m.set(h,d,f),m.multiplyScalar(i),r.orientation?p.fromArray(r.orientation):p.copy(n.quaternion),a.setFromQuaternion(p),a.set(a.x,a.y,0),m.applyEuler(a),e.add(m)},updatePose:function(){var e,t,n=this.controller,r=this.data,i=this.el.object3D,o=this.system.vrDisplay;n&&((e=n.pose).position?i.position.fromArray(e.position):r.armModel&&this.applyArmModel(i.position),e.orientation&&i.quaternion.fromArray(e.orientation),o&&e.position&&(t=this.el.sceneEl.renderer.xr.getStandingMatrix(),i.matrix.compose(i.position,i.quaternion,i.scale),i.matrix.multiplyMatrices(t,i.matrix),i.matrix.decompose(i.position,i.quaternion,i.scale)),i.rotateX(this.data.orientationOffset.x*a.Math.DEG2RAD),i.rotateY(this.data.orientationOffset.y*a.Math.DEG2RAD),i.rotateZ(this.data.orientationOffset.z*a.Math.DEG2RAD))},updateButtons:function(){var e,t,n=this.controller;if(n){for(t=0;t<n.buttons.length;++t)this.buttonStates[t]||(this.buttonStates[t]={pressed:!1,touched:!1,value:0}),this.buttonEventDetails[t]||(this.buttonEventDetails[t]={id:t,state:this.buttonStates[t]}),e=n.buttons[t],this.handleButton(t,e);this.handleAxes()}},handleButton:function(e,t){return!!(this.handlePress(e,t)|this.handleTouch(e,t)|this.handleValue(e,t))&&(this.el.emit(g,this.buttonEventDetails[e],!1),!0)},handleAxes:function(){var e,t=!1,n=this.controller.axes,r=this.axis,i=this.changedAxes;for(this.changedAxes.splice(0,this.changedAxes.length),e=0;e<n.length;++e)i.push(r[e]!==n[e]),i[e]&&(t=!0);if(!t)return!1;for(this.axis.splice(0,this.axis.length),e=0;e<n.length;e++)this.axis.push(n[e]);return this.el.emit(m,this.axisMoveEventDetail,!1),!0},handlePress:function(e,t){var n,r=this.buttonStates[e];return t.pressed!==r.pressed&&(n=t.pressed?v:y,this.el.emit(n,this.buttonEventDetails[e],!1),r.pressed=t.pressed,!0)},handleTouch:function(e,t){var n,r=this.buttonStates[e];return t.touched!==r.touched&&(n=t.touched?b:w,this.el.emit(n,this.buttonEventDetails[e],!1,p),r.touched=t.touched,!0)},handleValue:function(e,t){var n=this.buttonStates[e];return t.value!==n.value&&(n.value=t.value,!0)}})},{"../constants":123,"../core/component":131,"../lib/three":179,"../utils/tracked-controls":214}],115:[function(e,t,n){var r=e("../utils/tracked-controls"),i=e("../core/component").registerComponent,o="axismove",a="buttonchanged",s="buttondown",l="buttonup",c="touchstart",u="touchend";t.exports.Component=i("tracked-controls-webxr",{schema:{id:{type:"string",default:""},hand:{type:"string",default:""},handTrackingEnabled:{default:!1},index:{type:"int",default:-1},iterateControllerProfiles:{default:!1}},init:function(){this.updateController=this.updateController.bind(this),this.buttonEventDetails={},this.buttonStates=this.el.components["tracked-controls"].buttonStates={},this.axis=this.el.components["tracked-controls"].axis=[0,0,0],this.changedAxes=[],this.axisMoveEventDetail={axis:this.axis,changed:this.changedAxes}},update:function(){this.updateController()},play:function(){var e=this.el.sceneEl;this.updateController(),e.addEventListener("controllersupdated",this.updateController)},pause:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.updateController)},isControllerPresent:function(e){return!(!this.controller||this.controller.gamepad)&&("none"===e.inputSource.handedness||e.inputSource.handedness===this.data.hand)},updateController:function(){this.controller=r.findMatchingControllerWebXR(this.system.controllers,this.data.id,this.data.hand,this.data.index,this.data.iterateControllerProfiles,this.data.handTrackingEnabled),this.el.components["tracked-controls"].controller=this.controller,this.data.autoHide&&(this.el.object3D.visible=!!this.controller)},tick:function(){var e=this.el.sceneEl,t=this.controller,n=e.frame;t&&e.frame&&this.system.referenceSpace&&(t.hand||(this.pose=n.getPose(t.targetRaySpace,this.system.referenceSpace),this.updatePose(),this.updateButtons()))},updatePose:function(){var e=this.el.object3D,t=this.pose;t&&(e.matrix.elements=t.transform.matrix,e.matrix.decompose(e.position,e.rotation,e.scale))},updateButtons:function(){var e,t,n,r=this.controller;if(r&&r.gamepad){for(n=r.gamepad,t=0;t<n.buttons.length;++t)this.buttonStates[t]||(this.buttonStates[t]={pressed:!1,touched:!1,value:0}),this.buttonEventDetails[t]||(this.buttonEventDetails[t]={id:t,state:this.buttonStates[t]}),e=n.buttons[t],this.handleButton(t,e);this.handleAxes()}},handleButton:function(e,t){return!!(this.handlePress(e,t)|this.handleTouch(e,t)|this.handleValue(e,t))&&(this.el.emit(a,this.buttonEventDetails[e],!1),!0)},handleAxes:function(){var e,t=!1,n=this.controller.gamepad.axes,r=this.axis,i=this.changedAxes;for(this.changedAxes.splice(0,this.changedAxes.length),e=0;e<n.length;++e)i.push(r[e]!==n[e]),i[e]&&(t=!0);if(!t)return!1;for(this.axis.splice(0,this.axis.length),e=0;e<n.length;e++)this.axis.push(n[e]);return this.el.emit(o,this.axisMoveEventDetail,!1),!0},handlePress:function(e,t){var n,r=this.buttonStates[e];return t.pressed!==r.pressed&&(n=t.pressed?s:l,this.el.emit(n,this.buttonEventDetails[e],!1),r.pressed=t.pressed,!0)},handleTouch:function(e,t){var n,r=this.buttonStates[e];return t.touched!==r.touched&&(n=t.touched?c:u,this.el.emit(n,this.buttonEventDetails[e],!1),r.touched=t.touched,!0)},handleValue:function(e,t){var n=this.buttonStates[e];return t.value!==n.value&&(n.value=t.value,!0)}})},{"../core/component":131,"../utils/tracked-controls":214}],116:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("tracked-controls",{schema:{autoHide:{default:!0},controller:{default:-1},id:{type:"string",default:""},hand:{type:"string",default:""},idPrefix:{type:"string",default:""},handTrackingEnabled:{default:!1},orientationOffset:{type:"vec3"},armModel:{default:!1},headElement:{type:"selector"},iterateControllerProfiles:{default:!1}},update:function(){var e=this.data,t=this.el;t.sceneEl.hasWebXR?t.setAttribute("tracked-controls-webxr",{id:e.id,hand:e.hand,index:e.controller,iterateControllerProfiles:e.iterateControllerProfiles,handTrackingEnabled:e.handTrackingEnabled}):t.setAttribute("tracked-controls-webvr",e)}})},{"../core/component":131}],117:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../lib/three"),a=e("../utils/tracked-controls"),s=a.checkControllerPresentAndSetup,l=a.emitIfAxesChanged,c=a.onButtonEvent,u={left:"https://cdn.aframe.io/controllers/valve/index/valve-index-left.glb",right:"https://cdn.aframe.io/controllers/valve/index/valve-index-right.glb"},h=e("../utils/").device.isWebXRAvailable,d={left:{_x:Math.PI/3,_y:0,_z:0,_order:"XYZ"},right:{_x:Math.PI/3,_y:0,_z:0,_order:"XYZ"}},f=h?d:{left:{_x:.692295102620542,_y:-.0627618864318427,_z:-.06265893149611756,_order:"XYZ"},right:{_x:.6484021229942998,_y:-.032563619881892894,_z:-.1327973171917482,_order:"XYZ"}},p=h?{left:{x:0,y:-.05,z:.06},right:{x:0,y:-.05,z:.06}}:{left:{x:-.00023692678902063457,y:.04724540367838371,z:-.061959880395271096},right:{x:.002471558599671131,y:.055765208987076195,z:-.061068168708348844}};t.exports.Component=r("valve-index-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#FAFAFA"},buttonHighlightColor:{type:"color",default:"#22D1EE"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:{axes:{trackpad:[0,1],thumbstick:[2,3]},buttons:["trigger","grip","trackpad","thumbstick","abutton"]},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,"down",e)},this.onButtonUp=function(t){c(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){c(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){c(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data,t="right"===e.hand?0:"left"===e.hand?1:2;s(this,"valve",{index:t,iterateControllerProfiles:!0,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:"valve",controller:"right"===t.hand?1:"left"===t.hand?0:2,hand:t.hand,orientationOffset:t.orientationOffset}),this.loadModel()},loadModel:function(){var e=this.data;e.model&&this.el.setAttribute("gltf-model",""+u[e.hand])},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"===n&&(t=e.detail.state.value,r&&r.trigger&&(r.trigger.rotation.x=this.triggerOriginalRotationX-t*(Math.PI/40))),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=e.detail.model,r=this;this.data.model&&((t=this.buttonMeshes={}).grip={left:n.getObjectByName("leftgrip"),right:n.getObjectByName("rightgrip")},t.menu=n.getObjectByName("menubutton"),t.system=n.getObjectByName("systembutton"),t.trackpad=n.getObjectByName("touchpad"),t.trigger=n.getObjectByName("trigger"),this.triggerOriginalRotationX=t.trigger.rotation.x,Object.keys(t).forEach((function(e){r.setButtonColor(e,r.data.buttonColor)})),n.position.copy(p[this.data.hand]),n.rotation.copy(f[this.data.hand]),this.el.emit("controllermodelready",{name:"valve-index-controlls",model:this.data.model,rayOrigin:new o.Vector3(0,0,0)}))},onAxisMoved:function(e){l(this,this.mapping.axes,e)},updateModel:function(e,t){var n;this.data.model&&(-1!==t.indexOf("touch")||(n="up"===t?this.data.buttonColor:this.data.buttonHighlightColor,this.setButtonColor(e,n)))},setButtonColor:function(e,t){}})},{"../core/component":131,"../lib/three":179,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],118:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("visible",{schema:{default:!0},update:function(){this.el.object3D.visible=this.data}})},{"../core/component":131}],119:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"htc-vive-controller-mv":"OpenVR ",h=c?{axes:{thumbstick:[0,1]},buttons:["trigger","grip","trackpad","none","menu"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger","grip","menu","system"]};t.exports.Component=r("vive-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#FAFAFA"},buttonHighlightColor:{type:"color",default:"#22D1EE"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:h,init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex="right"===e.hand?0:"left"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;a(this,u,{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:u,hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/vive/vr_controller_vive.obj",mtl:"https://cdn.aframe.io/controllers/vive/vr_controller_vive.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"===n&&(t=e.detail.state.value,r&&r.trigger&&(r.trigger.rotation.x=-t*(Math.PI/12))),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=e.detail.model,r=this;this.data.model&&((t=this.buttonMeshes={}).grip={left:n.getObjectByName("leftgrip"),right:n.getObjectByName("rightgrip")},t.menu=n.getObjectByName("menubutton"),t.system=n.getObjectByName("systembutton"),t.trackpad=n.getObjectByName("touchpad"),t.trigger=n.getObjectByName("trigger"),Object.keys(t).forEach((function(e){r.setButtonColor(e,r.data.buttonColor)})),n.position.set(0,-.015,.04))},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){var n;this.data.model&&(-1!==t.indexOf("touch")||(n="up"===t?this.data.buttonColor:this.data.buttonHighlightColor,this.setButtonColor(e,n)))},setButtonColor:function(e,t){var n=this.buttonMeshes,r=this.rendererSystem;if(n){if("grip"===e)return n.grip.left.material.color.set(t),n.grip.right.material.color.set(t),r.applyColorCorrection(n.grip.left.material.color),void r.applyColorCorrection(n.grip.right.material.color);n[e].material.color.set(t),r.applyColorCorrection(n[e].material.color)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],120:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=r("vive-focus-controls",{schema:{hand:{default:""},buttonTouchedColor:{type:"color",default:"#BBBBBB"},buttonHighlightColor:{type:"color",default:"#7A7A7A"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0,this.addControllersUpdateListener()},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1,this.removeControllersUpdateListener()},checkIfControllerPresent:function(){a(this,"HTC Vive Focus",this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,idPrefix:"HTC Vive Focus",orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/vive/focus-controller/focus-controller.gltf")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.getObjectByName("BumperKey"),t.triggerPressed=n.getObjectByName("BumperKey_Press"),t.triggerPressed&&(t.triggerPressed.visible=!1),t.trackpad=n.getObjectByName("TouchPad"),t.trackpadPressed=n.getObjectByName("TouchPad_Press"),t.trackpadPressed&&(t.trackpadPressed.visible=!1))},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes,r=e+"Pressed";if(n&&n[e]&&n[r]){var i;switch(t){case"down":i=this.data.buttonHighlightColor;break;case"touchstart":i=this.data.buttonTouchedColor}i&&n[r].material.color.set(i),n[r].visible=!!i,n[e].visible=!i}}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],121:[function(e,t,n){var r=e("../constants").keyboardevent.KEYCODE_TO_CODE,i=e("../core/component").registerComponent,o=e("../lib/three"),a=e("../utils/"),s=a.bind,l=a.shouldCaptureKeyEvent,c=["KeyW","KeyA","KeyS","KeyD","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"];t.exports.Component=i("wasd-controls",{schema:{acceleration:{default:65},adAxis:{default:"x",oneOf:["x","y","z"]},adEnabled:{default:!0},adInverted:{default:!1},enabled:{default:!0},fly:{default:!1},wsAxis:{default:"z",oneOf:["x","y","z"]},wsEnabled:{default:!0},wsInverted:{default:!1}},init:function(){this.keys={},this.easing=1.1,this.velocity=new o.Vector3,this.onBlur=s(this.onBlur,this),this.onContextMenu=s(this.onContextMenu,this),this.onFocus=s(this.onFocus,this),this.onKeyDown=s(this.onKeyDown,this),this.onKeyUp=s(this.onKeyUp,this),this.onVisibilityChange=s(this.onVisibilityChange,this),this.attachVisibilityEventListeners()},tick:function(e,t){var n=this.data,r=this.el,i=this.velocity;(i[n.adAxis]||i[n.wsAxis]||!function(e){var t;for(t in e)return!1;return!0}(this.keys))&&(t/=1e3,this.updateVelocity(t),(i[n.adAxis]||i[n.wsAxis])&&r.object3D.position.add(this.getMovementVector(t)))},remove:function(){this.removeKeyEventListeners(),this.removeVisibilityEventListeners()},play:function(){this.attachKeyEventListeners()},pause:function(){this.keys={},this.removeKeyEventListeners()},updateVelocity:function(e){var t,n,r,i,o,a=this.data,s=this.keys,l=this.velocity;if(n=a.adAxis,i=a.wsAxis,e>.2)return l[n]=0,void(l[i]=0);var c=Math.pow(1/this.easing,60*e);0!==l[n]&&(l[n]=l[n]*c),0!==l[i]&&(l[i]=l[i]*c),Math.abs(l[n])<1e-5&&(l[n]=0),Math.abs(l[i])<1e-5&&(l[i]=0),a.enabled&&(t=a.acceleration,a.adEnabled&&(r=a.adInverted?-1:1,(s.KeyA||s.ArrowLeft)&&(l[n]-=r*t*e),(s.KeyD||s.ArrowRight)&&(l[n]+=r*t*e)),a.wsEnabled&&(o=a.wsInverted?-1:1,(s.KeyW||s.ArrowUp)&&(l[i]-=o*t*e),(s.KeyS||s.ArrowDown)&&(l[i]+=o*t*e)))},getMovementVector:function(){var e=new o.Vector3(0,0,0),t=new o.Euler(0,0,0,"YXZ");return function(n){var r,i=this.el.getAttribute("rotation"),a=this.velocity;return e.copy(a),e.multiplyScalar(n),i?(r=this.data.fly?i.x:0,t.set(o.Math.degToRad(r),o.Math.degToRad(i.y),0),e.applyEuler(t),e):e}}(),attachVisibilityEventListeners:function(){window.oncontextmenu=this.onContextMenu,window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus),document.addEventListener("visibilitychange",this.onVisibilityChange)},removeVisibilityEventListeners:function(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),document.removeEventListener("visibilitychange",this.onVisibilityChange)},attachKeyEventListeners:function(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp)},removeKeyEventListeners:function(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)},onContextMenu:function(){for(var e=Object.keys(this.keys),t=0;t<e.length;t++)delete this.keys[e[t]]},onBlur:function(){this.pause()},onFocus:function(){this.play()},onVisibilityChange:function(){document.hidden?this.onBlur():this.onFocus()},onKeyDown:function(e){var t;l(e)&&(t=e.code||r[e.keyCode],-1!==c.indexOf(t)&&(this.keys[t]=!0))},onKeyUp:function(e){var t;t=e.code||r[e.keyCode],delete this.keys[t]}})},{"../constants":123,"../core/component":131,"../lib/three":179,"../utils/":205}],122:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/"),u=c.debug("components:windows-motion-controls:debug"),h=c.debug("components:windows-motion-controls:warn"),d=e("../constants").DEFAULT_HANDEDNESS,f={left:"left.glb",right:"right.glb",default:"universal.glb"},p=e("../utils/").device.isWebXRAvailable,m=/([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/,g=p?"windows-mixed-reality":"Spatial Controller (Spatial Interaction Source) ",v=p?{axes:{touchpad:[0,1],thumbstick:[2,3]},buttons:["trigger","squeeze","touchpad","thumbstick","menu"],axisMeshNames:["TOUCHPAD_TOUCH_X","TOUCHPAD_TOUCH_X","THUMBSTICK_X","THUMBSTICK_Y"],buttonMeshNames:{trigger:"SELECT",menu:"MENU",squeeze:"GRASP",thumbstick:"THUMBSTICK_PRESS",touchpad:"TOUCHPAD_PRESS"},pointingPoseMeshName:"POINTING_POSE"}:{axes:{thumbstick:[0,1],trackpad:[2,3]},buttons:["thumbstick","trigger","grip","menu","trackpad"],axisMeshNames:["THUMBSTICK_X","THUMBSTICK_Y","TOUCHPAD_TOUCH_X","TOUCHPAD_TOUCH_Y"],buttonMeshNames:{trigger:"SELECT",menu:"MENU",grip:"GRASP",thumbstick:"THUMBSTICK_PRESS",trackpad:"TOUCHPAD_PRESS"},pointingPoseMeshName:"POINTING_POSE"};t.exports.Component=r("windows-motion-controls",{schema:{hand:{default:d},pair:{default:0},model:{default:!0},hideDisconnected:{default:!0}},mapping:v,bindMethods:function(){this.onModelError=i(this.onModelError,this),this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this,t=this.el;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onControllerConnected=function(){e.setModelVisibility(!0)},this.onControllerDisconnected=function(){e.setModelVisibility(!1)},this.controllerPresent=!1,this.lastControllerCheck=0,this.previousButtonValues={},this.bindMethods(),this.loadedMeshInfo={buttonMeshes:null,axisMeshes:null},this.rayOrigin={origin:new THREE.Vector3,direction:new THREE.Vector3(0,0,-1),createdFromMesh:!1},t.addEventListener("controllerconnected",this.onControllerConnected),t.addEventListener("controllerdisconnected",this.onControllerDisconnected)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-error",this.onModelError),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-error",this.onModelError),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,g,{hand:this.data.hand,index:this.data.pair,iterateControllerProfiles:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},updateControllerModel:function(){if(this.data.model&&!this.rayOrigin.createdFromMesh){var e=this.createControllerModelUrl();this.loadModel(e)}else this.modelReady()},createControllerModelUrl:function(e){var t=this.el.components["tracked-controls"],n=t?t.controller:null,r="default",i=this.data.hand;if(n&&!window.hasNativeWebXRImplementation&&(i=n.hand,!e)){var o=n.id.match(m);r=o&&o[0]||r}return"https://cdn.aframe.io/controllers/microsoft/"+r+"/"+(f[i]||f.default)},injectTrackedControls:function(){var e=this.data;this.el.setAttribute("tracked-controls",{idPrefix:g,controller:e.pair,hand:e.hand,armModel:!1}),this.updateControllerModel()},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelError:function(e){var t=this.createControllerModelUrl(!0);e.detail.src!==t?(h("Failed to load controller model for device, attempting to load default."),this.loadModel(t)):h("Failed to load default controller model.")},loadModel:function(e){this.el.setAttribute("gltf-model","url("+e+")")},onModelLoaded:function(e){var t,n,r,i,o=this.controllerModel=e.detail.model,a=this.loadedMeshInfo;if(u("Processing model"),a.buttonMeshes={},a.axisMeshes={},o){for(t=0;t<this.mapping.buttons.length;t++)(n=this.mapping.buttonMeshNames[this.mapping.buttons[t]])?(r=o.getObjectByName(n))?(i={index:t,value:s(r,"VALUE"),pressed:s(r,"PRESSED"),unpressed:s(r,"UNPRESSED")}).value&&i.pressed&&i.unpressed?a.buttonMeshes[this.mapping.buttons[t]]=i:h("Missing button submesh under mesh with name: "+n+"(VALUE: "+!!i.value+", PRESSED: "+!!i.pressed+", UNPRESSED:"+!!i.unpressed+")"):h("Missing button mesh with name: "+n):u("Skipping unknown button at index: "+t+" with mapped name: "+this.mapping.buttons[t]);for(t=0;t<this.mapping.axisMeshNames.length;t++)(n=this.mapping.axisMeshNames[t])?(r=o.getObjectByName(n))?(i={index:t,value:s(r,"VALUE"),min:s(r,"MIN"),max:s(r,"MAX")}).value&&i.min&&i.max?a.axisMeshes[t]=i:h("Missing axis submesh under mesh with name: "+n+"(VALUE: "+!!i.value+", MIN: "+!!i.min+", MAX:"+!!i.max+")"):h("Missing axis mesh with name: "+n):u("Skipping unknown axis at index: "+t);this.calculateRayOriginFromMesh(o),this.setModelVisibility()}function s(e,t){for(var n=0,r=e.children.length;n<r;n++){var i=e.children[n];if(i&&i.name===t)return i}}u("Model load complete.")},calculateRayOriginFromMesh:function(){var e=new THREE.Quaternion;return function(t){var n;if(this.rayOrigin.origin.set(0,0,0),this.rayOrigin.direction.set(0,0,-1),this.rayOrigin.createdFromMesh=!0,n=t.getObjectByName(this.mapping.pointingPoseMeshName)){var r=t.parent;r&&(t.parent=null,t.updateMatrixWorld(!0),t.parent=r),n.getWorldPosition(this.rayOrigin.origin),n.getWorldQuaternion(e),this.rayOrigin.direction.applyQuaternion(e),r&&t.updateMatrixWorld(!0)}else u("Mesh does not contain pointing origin data, defaulting to none.");this.modelReady()}}(),lerpAxisTransform:function(){var e=new THREE.Quaternion;return function(t,n){var r=this.loadedMeshInfo.axisMeshes[t];if(r){var i=r.min,o=r.max,a=r.value,s=.5*n+.5;a.setRotationFromQuaternion(e.copy(i.quaternion).slerp(o.quaternion,s)),a.position.lerpVectors(i.position,o.position,s)}}}(),lerpButtonTransform:function(){var e=new THREE.Quaternion;return function(t,n){var r=this.loadedMeshInfo.buttonMeshes[t];if(r){var i=r.unpressed,o=r.pressed,a=r.value;a.setRotationFromQuaternion(e.copy(i.quaternion).slerp(o.quaternion,n)),a.position.lerpVectors(i.position,o.position,n)}}}(),modelReady:function(){this.el.emit("controllermodelready",{name:"windows-motion-controls",model:this.data.model,rayOrigin:this.rayOrigin})},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&(this.loadedMeshInfo&&this.loadedMeshInfo.buttonMeshes&&this.lerpButtonTransform(t,e.detail.state.value),this.el.emit(t+"changed",e.detail.state))},onAxisMoved:function(e){var t=this.mapping.axisMeshNames.length;if(this.loadedMeshInfo&&this.loadedMeshInfo.axisMeshes)for(var n=0;n<t;n++)this.lerpAxisTransform(n,e.detail.axis[n]||0);s(this,this.mapping.axes,e)},setModelVisibility:function(e){var t=this.el.getObject3D("mesh");e=void 0!==e?e:this.modelVisible,this.modelVisible=e,t&&(t.visible=e)}})},{"../constants":123,"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],123:[function(e,t,n){t.exports={AFRAME_INJECTED:"aframe-injected",DEFAULT_CAMERA_HEIGHT:1.6,DEFAULT_HANDEDNESS:"right",keyboardevent:e("./keyboardevent")}},{"./keyboardevent":124}],124:[function(e,t,n){t.exports={KEYCODE_TO_CODE:{38:"ArrowUp",37:"ArrowLeft",40:"ArrowDown",39:"ArrowRight",87:"KeyW",65:"KeyA",83:"KeyS",68:"KeyD"}}},{}],125:[function(e,t,n){var r=e("./a-node"),i=e("../utils/bind"),o=e("../utils/debug"),a=e("./a-register-element").registerElement,s=e("../lib/three"),l=new s.FileLoader,c=o("core:a-assets:warn");function u(e){if(e.hasAttribute("autoplay")||"auto"===e.getAttribute("preload"))return new Promise((function(t,n){if(4===e.readyState)return t();if(e.error)return n();function r(){for(var n=0,r=0;r<e.buffered.length;r++)n+=e.buffered.end(r)-e.buffered.start(r);n>=e.duration&&("VIDEO"===e.tagName&&(s.Cache.files[e.getAttribute("src")]=e),t())}e.addEventListener("loadeddata",r,!1),e.addEventListener("progress",r,!1),e.addEventListener("error",n,!1)}))}function h(e){var t=function(e){var t;if(e.hasAttribute("crossorigin"))return e;if(null!==(t=e.getAttribute("src"))){if(-1===t.indexOf("://"))return e;if(function(e){var t=e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0];return t.substring(0,t.indexOf(":"))}(t)===window.location.host)return e}return c('Cross-origin element (e.g., <img>) was requested without `crossorigin` set. A-Frame will re-request the asset with `crossorigin` attribute set. Please set `crossorigin` on the element (e.g., <img crossorigin="anonymous">)',t),e.crossOrigin="anonymous",e.cloneNode(!0)}(e);return t.tagName&&"video"===t.tagName.toLowerCase()&&(t.setAttribute("playsinline",""),t.setAttribute("webkit-playsinline","")),t!==e&&(e.parentNode.appendChild(t),e.parentNode.removeChild(e)),t}function d(e){var t=f(e),n=t.lastIndexOf(".");return n>=0&&".glb"===t.slice(n,e.search(/\?|#|$/))?"arraybuffer":"text"}function f(e){var t=document.createElement("a");t.href=e;var n=t.search.replace(/^\?/,""),r=e.replace(n,"").replace("?","");return r.substring(r.lastIndexOf("/")+1)}t.exports=a("a-assets",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.isAssets=!0,this.fileLoader=l,this.timeout=null}},attachedCallback:{value:function(){var e,t,n,r,o,a,l=this,d=[];if(!this.parentNode.isScene)throw new Error("<a-assets> must be a child of a <a-scene>.");for(o=this.querySelectorAll("img"),e=0;e<o.length;e++)r=h(o[e]),d.push(new Promise((function(t,n){s.Cache.files[o[e].getAttribute("src")]=r,r.onload=t,r.onerror=n})));for(n=this.querySelectorAll("audio, video"),e=0;e<n.length;e++)(t=h(n[e])).src||t.srcObject||c("Audio/video asset has neither `src` nor `srcObject` attributes."),d.push(u(t));Promise.all(d).then(i(this.load,this)),a=parseInt(this.getAttribute("timeout"),10)||3e3,this.timeout=setTimeout((function(){l.hasLoaded||(c("Asset loading timed out in ",a,"ms"),l.emit("timeout"),l.load())}),a)}},detachedCallback:{value:function(){this.timeout&&clearTimeout(this.timeout)}},load:{value:function(){r.prototype.load.call(this,null,(function(e){return e.isAssetItem&&e.hasAttribute("src")}))}}})}),a("a-asset-item",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.data=null,this.isAssetItem=!0}},attachedCallback:{value:function(){var e=this,t=this.getAttribute("src");l.setResponseType(this.getAttribute("response-type")||d(t)),l.load(t,(function(t){e.data=t,setTimeout((function(){r.prototype.load.call(e)}))}),(function(t){e.emit("progress",{loadedBytes:t.loaded,totalBytes:t.total,xhr:t})}),(function(t){e.emit("error",{xhr:t})}))}}})}),t.exports.inferResponseType=d,t.exports.getFileNameFromURL=f},{"../lib/three":179,"../utils/bind":199,"../utils/debug":201,"./a-node":129,"./a-register-element":130}],126:[function(e,t,n){var r=e("../utils/debug"),i=e("./a-register-element").registerElement,o=r("core:cubemap:warn");t.exports=i("a-cubemap",{prototype:Object.create(window.HTMLElement.prototype,{attachedCallback:{value:function(){this.srcs=this.validate()},writable:window.debug},validate:{value:function(){var e,t=this.querySelectorAll("[src]"),n=[];if(6===t.length){for(e=0;e<t.length;e++)n.push(t[e].getAttribute("src"));return n}o("<a-cubemap> did not contain exactly six elements each with a `src` attribute.")},writable:window.debug}})})},{"../utils/debug":201,"./a-register-element":130}],127:[function(e,t,n){var r,i=e("./a-node"),o=e("./component").components,a=e("./a-register-element").registerElement,s=e("../lib/three"),l=e("../utils/"),c=l.debug("core:a-entity:debug"),u=l.debug("core:a-entity:warn"),h=["position","rotation","scale","visible"],d={once:!0},f=Object.create(i.prototype,{createdCallback:{value:function(){this.components={},this.initializingComponents={},this.componentsToUpdate={},this.isEntity=!0,this.isPlaying=!1,this.object3D=new s.Group,this.object3D.el=this,this.object3DMap={},this.parentEl=null,this.rotationObj={},this.states=[]}},attributeChangedCallback:{value:function(e,t,n){var r=this.components[e];r&&r.justInitialized&&""===n?delete r.justInitialized:(r||null!==n)&&this.setEntityAttribute(e,t,n)}},attachedCallback:{value:function(){var e,t=this.sceneEl,n=this;this.addToParent(),this.isScene||(t?!(e=t.querySelector("a-assets"))||e.hasLoaded?this.load():e.addEventListener("loaded",(function(){n.load()})):this.load())}},detachedCallback:{value:function(){var e;if(this.parentEl){for(e in this.components)this.removeComponent(e,!1);this.isScene||(this.removeFromParent(),i.prototype.detachedCallback.call(this),this.object3D.el=null)}}},getObject3D:{value:function(e){return this.object3DMap[e]}},setObject3D:{value:function(e,t){var n,r=this;if(!(t instanceof s.Object3D))throw new Error("`Entity.setObject3D` was called with an object that was not an instance of THREE.Object3D.");(n=this.getObject3D(e))&&this.object3D.remove(n),t.el=this,t.children.length&&t.traverse((function(e){e.el=r})),this.object3D.add(t),this.object3DMap[e]=t,this.emit("object3dset",{object:t,type:e})}},removeObject3D:{value:function(e){var t=this.getObject3D(e);t?(this.object3D.remove(t),delete this.object3DMap[e],this.emit("object3dremove",{type:e})):u("Tried to remove `Object3D` of type:",e,"which was not defined.")}},getOrCreateObject3D:{value:function(e,t){var n=this.getObject3D(e);return!n&&t&&(n=new t,this.setObject3D(e,n)),u("`getOrCreateObject3D` has been deprecated. Use `setObject3D()` and `object3dset` event instead."),n}},add:{value:function(e){if(!e.object3D)throw new Error("Trying to add an element that doesn't have an `object3D`");this.object3D.add(e.object3D),this.emit("child-attached",{el:e})}},addToParent:{value:function(){var e=this.parentEl=this.parentNode;e&&e.add&&!this.attachedToParent&&(e.add(this),this.attachedToParent=!0)}},removeFromParent:{value:function(){var e=this.parentEl;this.parentEl.remove(this),this.attachedToParent=!1,this.parentEl=null,e.emit("child-detached",{el:this})}},load:{value:function(){var e=this;!this.hasLoaded&&this.parentEl&&i.prototype.load.call(this,(function(){e.parentEl&&(e.updateComponents(),(e.isScene||e.parentEl.isPlaying)&&e.play())}))},writable:window.debug},remove:{value:function(e){e?this.object3D.remove(e.object3D):this.parentNode.removeChild(this)}},getChildEntities:{value:function(){for(var e=this.children,t=[],n=0;n<e.length;n++){var i=e[n];i instanceof r&&t.push(i)}return t}},initComponent:{value:function(e,t,n){var r,i,a,s;if(s=(a=l.split(e,"__"))[0],i=a.length>2?a.slice(1).join("__"):a[1],o[s]&&(p(this,e)||void 0!==t||n)&&!(e in this.components)){if(this.initComponentDependencies(s),i&&!o[s].multiple)throw new Error("Trying to initialize multiple components of type `"+s+"`. There can only be one component of this type per entity.");r=new o[s].Component(this,t,i),this.isPlaying&&r.play(),this.hasAttribute(e)||(r.justInitialized=!0,window.HTMLElement.prototype.setAttribute.call(this,e,"")),c("Component initialized: %s",e)}},writable:window.debug},initComponentDependencies:{value:function(e){var t,n;if(o[e]&&(t=o[e].dependencies))for(n=0;n<t.length;n++)this.initComponent(t[n],window.HTMLElement.prototype.getAttribute.call(this,t[n])||void 0,!0)}},removeComponent:{value:function(e,t){var n;(n=this.components[e])&&(n.initialized?(n.pause(),n.remove(),t&&(n.destroy(),delete this.components[e]),this.emit("componentremoved",n.evtDetail,!1)):this.addEventListener("componentinitialized",(function n(r){r.detail.name===e&&(this.removeComponent(e,t),this.removeEventListener("componentinitialized",n))})))},writable:window.debug},updateComponents:{value:function(){var e,t,n,r,i,o,a=this.componentsToUpdate;if(this.hasLoaded){for(n=0;n<this.mixinEls.length;n++)for(r in this.mixinEls[n].componentCache)m(r)&&(a[r]=!0);if(this.getExtraComponents)for(r in t=this.getExtraComponents())m(r)&&(a[r]=!0);for(n=0;n<this.attributes.length;++n)r=this.attributes[n].name,-1===h.indexOf(r)&&m(r)&&(a[r]=!0);for(n=0;n<h.length;n++)r=h[n],this.hasAttribute(r)&&this.updateComponent(r,this.getDOMAttribute(r));for(r in a)i=this.getDOMAttribute(r),o=t&&t[r],e=o?o.constructor===Object?l.extend(o,l.styleParser.parse(i||{})):i||o:i,this.updateComponent(r,e),delete a[r]}},writable:window.debug},updateComponent:{value:function(e,t,n){var r=this.components[e];if(r)return null!==t||p(this,e)?void r.updateProperties(t,n):void this.removeComponent(e,!0);this.initComponent(e,t,!1)}},removeAttribute:{value:function(e,t){var n=this.components[e];n&&void 0===t&&this.removeComponent(e,!0),n&&void 0!==t?n.resetProperty(t):("mixin"===e&&this.mixinUpdate(""),window.HTMLElement.prototype.removeAttribute.call(this,e))}},play:{value:function(){var e,t,n;if(!this.isPlaying&&this.hasLoaded){for(n in this.isPlaying=!0,this.components)this.components[n].play();for(e=this.getChildEntities(),t=0;t<e.length;t++)e[t].play();this.emit("play")}},writable:!0},pause:{value:function(){var e,t,n;if(this.isPlaying){for(n in this.isPlaying=!1,this.components)this.components[n].pause();for(e=this.getChildEntities(),t=0;t<e.length;t++)e[t].pause();this.emit("pause")}},writable:!0},setEntityAttribute:{value:function(e,t,n){if(o[e]||this.components[e])this.updateComponent(e,n);else if("mixin"===e){if(n===this.computedMixinStr)return;this.mixinUpdate(n,t)}}},mixinUpdate:{value:function(){var e=[];return function(t,n){var r,i,o,a,s=this;if(this.hasLoaded){for(n=n||this.getAttribute("mixin"),o=this.updateMixins(t,n),e.length=0,a=0;a<this.mixinEls.length;a++)for(r in this.mixinEls[a].componentCache)-1===e.indexOf(r)&&(this.components[r]?this.components[r].handleMixinUpdate():this.initComponent(r,null),e.push(r));for(a=0;a<o.oldMixinIds.length;a++)if(i=document.getElementById(o.oldMixinIds[a]))for(r in i.componentCache)-1===e.indexOf(r)&&this.components[r]&&(this.getDOMAttribute(r)?this.components[r].handleMixinUpdate():this.removeComponent(r,!0))}else this.addEventListener("loaded",(function(){s.mixinUpdate(t,n)}),d)}}()},setAttribute:{value:function(){var e={};return function(t,n,r){var a,s,c,u,h;if(c=(u=t.indexOf("__"))>0?t.substring(0,u):t,!o[c])return"mixin"===t&&this.mixinUpdate(n),void i.prototype.setAttribute.call(this,t,n);if(!this.components[t]&&this.hasAttribute(t)&&this.updateComponent(t,window.HTMLElement.prototype.getAttribute.call(this,t)),"undefined"!==typeof r&&"string"===typeof n&&n.length>0&&"string"===typeof l.styleParser.parse(n)){for(h in e)delete e[h];(a=e)[n]=r,s=!1}else a=n,s=!0===r;this.updateComponent(t,a,s),this.sceneEl&&this.sceneEl.getAttribute("debug")&&this.components[t].flushToDOM()}}(),writable:window.debug},flushToDOM:{value:function(e){var t,n,r,i=this.components,o=this.children;for(r in i)i[r].flushToDOM();if(e)for(n=0;n<o.length;++n)(t=o[n]).flushToDOM&&t.flushToDOM(e)}},getAttribute:{value:function(e){var t;return"position"===e?this.object3D.position:"rotation"===e?function(e){var t=s.Math.radToDeg,n=e.object3D.rotation,r=e.rotationObj;return r.x=t(n.x),r.y=t(n.y),r.z=t(n.z),r}(this):"scale"===e?this.object3D.scale:"visible"===e?this.object3D.visible:(t=this.components[e])?t.data:window.HTMLElement.prototype.getAttribute.call(this,e)},writable:window.debug},getDOMAttribute:{value:function(e){var t=this.components[e];return t?t.attrValue:window.HTMLElement.prototype.getAttribute.call(this,e)},writable:window.debug},addState:{value:function(e){this.is(e)||(this.states.push(e),this.emit("stateadded",e))}},removeState:{value:function(e){var t=this.states.indexOf(e);-1!==t&&(this.states.splice(t,1),this.emit("stateremoved",e))}},is:{value:function(e){return-1!==this.states.indexOf(e)}},inspect:{value:function(){this.sceneEl.components.inspector.openInspector(this)}},destroy:{value:function(){var e;if(this.parentNode)u("Entity can only be destroyed if detached from scenegraph.");else for(e in this.components)this.components[e].destroy()}}});function p(e,t){return!(!e.components[t]||!e.components[t].attrValue)||function(e,t){var n,r=!1;for(n=0;n<t.length&&!(r=t[n].hasAttribute(e));++n);return r}(t,e.mixinEls)}function m(e){return-1!==e.indexOf("__")&&(e=l.split(e,"__")[0]),!!o[e]}r=a("a-entity",{prototype:f}),t.exports=r},{"../lib/three":179,"../utils/":205,"./a-node":129,"./a-register-element":130,"./component":131}],128:[function(e,t,n){var r=e("./a-node"),i=e("./a-register-element").registerElement,o=e("./component").components,a=e("../utils");t.exports=i("a-mixin",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.componentCache={},this.id=this.getAttribute("id"),this.isMixin=!0}},attributeChangedCallback:{value:function(e,t,n){this.cacheAttribute(e,n),this.updateEntities()}},attachedCallback:{value:function(){this.sceneEl=this.closestScene(),this.cacheAttributes(),this.updateEntities(),this.load()}},setAttribute:{value:function(e,t){window.HTMLElement.prototype.setAttribute.call(this,e,t),this.cacheAttribute(e,t)}},cacheAttribute:{value:function(e,t){var n,r;r=a.split(e,"__")[0],(n=o[r])&&(void 0===t&&(t=window.HTMLElement.prototype.getAttribute.call(this,e)),this.componentCache[e]=n.parseAttrValueForCache(t))}},getAttribute:{value:function(e){return this.componentCache[e]||window.HTMLElement.prototype.getAttribute.call(this,e)}},cacheAttributes:{value:function(){var e,t,n=this.attributes;for(t=0;t<n.length;t++)e=n[t].name,this.cacheAttribute(e)}},updateEntities:{value:function(){var e,t,n;if(this.sceneEl)for(t=this.sceneEl.querySelectorAll("[mixin~="+this.id+"]"),n=0;n<t.length;n++)(e=t[n]).hasLoaded&&!e.isMixin&&e.mixinUpdate(this.id)}}})})},{"../utils":205,"./a-node":129,"./a-register-element":130,"./component":131}],129:[function(e,t,n){var r=e("./a-register-element").registerElement,i=e("./a-register-element").isNode,o=e("../utils/"),a=o.debug("core:a-node:warn"),s=o.debug("core:a-node:error");t.exports=r("a-node",{prototype:Object.create(window.HTMLElement.prototype,{createdCallback:{value:function(){this.computedMixinStr="",this.hasLoaded=!1,this.isNode=!0,this.mixinEls=[]},writable:window.debug},attachedCallback:{value:function(){var e;this.sceneEl=this.closestScene(),this.sceneEl||a("You are attempting to attach <"+this.tagName+"> outside of an A-Frame scene. Append this element to `<a-scene>` instead."),this.hasLoaded=!1,this.emit("nodeready",void 0,!1),this.isMixin||(e=this.getAttribute("mixin"))&&this.updateMixins(e)},writable:window.debug},attributeChangedCallback:{value:function(e,t,n){n!==this.computedMixinStr&&("mixin"!==e||this.isMixin||this.updateMixins(n,t))}},closestScene:{value:function(){for(var e=this;e&&!e.isScene;)e=e.parentElement;return e}},closest:{value:function(e){for(var t=this.matches||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector,n=this;n&&!t.call(n,e);)n=n.parentElement;return n}},detachedCallback:{value:function(){this.hasLoaded=!1}},load:{value:function(e,t){var n,r=this;this.hasLoaded||(t=t||i,n=this.getChildren().filter(t).map((function(e){return new Promise((function(t){if(e.hasLoaded)return t();e.addEventListener("loaded",t)}))})),Promise.all(n).then((function(){r.hasLoaded=!0,e&&e(),r.emit("loaded",void 0,!1)})).catch((function(e){s("Failure loading node: ",e)})))},writable:!0},getChildren:{value:function(){return Array.prototype.slice.call(this.children,0)}},updateMixins:{value:function(){var e=[],t=[],n={};return function(r,i){var a,s,l;for(e.length=0,t.length=0,s=r?o.split(r.trim(),/\s+/):e,l=i?o.split(i.trim(),/\s+/):t,n.newMixinIds=s,n.oldMixinIds=l,a=0;a<l.length;a++)-1===s.indexOf(l[a])&&this.unregisterMixin(l[a]);for(this.computedMixinStr="",this.mixinEls.length=0,a=0;a<s.length;a++)this.registerMixin(document.getElementById(s[a]));return this.computedMixinStr&&(this.computedMixinStr=this.computedMixinStr.trim(),window.HTMLElement.prototype.setAttribute.call(this,"mixin",this.computedMixinStr)),n}}()},registerMixin:{value:function(e){var t,n,r;if(e){if(r=e.getAttribute("mixin"))for(t=o.split(r.trim(),/\s+/),n=0;n<t.length;n++)this.registerMixin(document.getElementById(t[n]));this.computedMixinStr=this.computedMixinStr+" "+e.id,this.mixinEls.push(e)}}},setAttribute:{value:function(e,t){"mixin"===e&&this.updateMixins(t),window.HTMLElement.prototype.setAttribute.call(this,e,t)}},unregisterMixin:{value:function(e){var t,n=this.mixinEls;for(t=0;t<n.length;++t)if(e===n[t].id){n.splice(t,1);break}}},emit:{value:function(){var e={};return function(t,n,r,i){void 0===r&&(r=!0),e.bubbles=!!r,e.detail=n,i&&(e=o.extend({},i,e)),this.dispatchEvent(new CustomEvent(t,e))}}(),writable:window.debug}})})},{"../utils/":205,"./a-register-element":130}],130:[function(e,t,n){var r,i;e("document-register-element");var o=t.exports.knownTags={};function a(e,t,n,r){t.forEach((function(t){!function(e,t,n,r){var i=n[t],o=r[t];i&&o&&i!==o&&(e[t]={value:function(){return o.apply(this,arguments),i.apply(this,arguments)},writable:window.debug})}(e,t,n,r)}))}function s(e,t){Object.getOwnPropertyNames(e).forEach((function(n){var r;t[n]||(r=Object.getOwnPropertyDescriptor(e,n),t[n]={value:e[n],writable:r.writable})}))}t.exports.isNode=function(e){return e.tagName.toLowerCase()in o||e.isNode},t.exports.registerElement=function(e,t){var n=Object.getPrototypeOf(t.prototype),l=t,c=r&&n===r.prototype,u=i&&n===i.prototype;return(c||u)&&function(e){o[e.toLowerCase()]=!0}(e),c&&(l=function(e){var t={};return a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,r.prototype),s(e,t),t}(t.prototype),l={prototype:Object.create(n,l)}),u&&(l=function(e){var t={};return a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,r.prototype),a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,i.prototype),s(e,t),t}(t.prototype),l={prototype:Object.create(n,l)}),Object.getOwnPropertyNames(l.prototype).forEach((function(e){var t=l.prototype[e];"function"===typeof t&&(t.displayName=e)})),document.registerElement(e,l)},t.exports.wrapMethods=a,r=e("./a-node"),i=e("./a-entity")},{"./a-entity":127,"./a-node":129,"document-register-element":12}],131:[function(e,t,n){var r=e("./schema"),i=e("./scene/scenes"),o=e("./system"),a=e("../utils/"),s=t.exports.components={},l=r.parseProperties,c=r.parseProperty,u=r.process,h=r.isSingleProperty,d=r.stringifyProperties,f=r.stringifyProperty,p=a.styleParser,m=a.debug("core:component:warn"),g=document.currentScript,v=new RegExp("[A-Z]+"),y={},b=t.exports.Component=function(e,t,n){var r=this;this.el=e,this.id=n,this.attrName=this.name+(n?"__"+n:""),this.evtDetail={id:this.id,name:this.name},this.initialized=!1,this.isSingleProperty=h(this.schema),this.isSinglePropertyObject=this.isSingleProperty&&A(c(void 0,this.schema))&&!(this.schema.default instanceof window.HTMLElement),this.isObjectBased=!this.isSingleProperty||this.isSinglePropertyObject,this.el.components[this.attrName]=this,this.objectPool=y[this.name];const i=this.events;this.events={},function(e,t){var n;for(n in t)e.events[n]=t[n].bind(e)}(this,i),this.attrValue=void 0,this.isObjectBased?(this.nextData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.nextData,this.schema),this.oldData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.oldData,this.schema),this.previousOldData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.previousOldData,this.schema),this.parsingAttrValue=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.parsingAttrValue,this.schema)):(this.nextData=void 0,this.oldData=void 0,this.previousOldData=void 0,this.parsingAttrValue=void 0),this.throttledEmitComponentChanged=a.throttle((function(){e.emit("componentchanged",r.evtDetail,!1)}),200),this.updateProperties(t)};if(b.prototype={schema:{},init:function(){},events:{},update:function(e){},updateSchema:void 0,tick:void 0,tock:void 0,play:function(){},pause:function(){},remove:function(){},parse:function(e,t){var n=this.schema;return this.isSingleProperty?c(e,n):l(p.parse(e),n,!0,this.name,t)},stringify:function(e){var t=this.schema;return"string"===typeof e?e:this.isSingleProperty?f(e,t):(e=d(e,t),p.stringify(e))},updateCachedAttrValue:function(e,t){var n,r,i;if(void 0!==e){if(null===e)return this.isObjectBased&&this.attrValue&&this.objectPool.recycle(this.attrValue),void(this.attrValue=void 0);if(e instanceof Object&&!(e instanceof window.HTMLElement)?(r=this.objectPool.use(),n=a.extend(r,e)):n=this.parseAttrValueForCache(e),this.isObjectBased&&!t&&this.attrValue)for(i in this.attrValue)void 0===n[i]&&(n[i]=this.attrValue[i]);this.isObjectBased&&!this.attrValue&&(this.attrValue=this.objectPool.use()),a.objectPool.clearObject(this.attrValue),this.attrValue=_(this.attrValue,n,this.isObjectBased),a.objectPool.clearObject(r)}},parseAttrValueForCache:function(e){var t;return"string"!==typeof e?e:(this.isSingleProperty?"string"===typeof(t=this.schema.parse(e))&&(t=e):(a.objectPool.clearObject(this.parsingAttrValue),t=p.parse(e,this.parsingAttrValue)),t)},flushToDOM:function(e){var t=e?this.data:this.attrValue;null!==t&&void 0!==t&&window.HTMLElement.prototype.setAttribute.call(this.el,this.attrName,this.stringify(t))},updateProperties:function(e,t){this.el.hasLoaded?(null!==e&&(e=this.parseAttrValueForCache(e)),this.updateCachedAttrValue(e,t),this.initialized?(this.updateComponent(e,t),this.callUpdateHandler()):this.initComponent()):this.updateCachedAttrValue(e)},initComponent:function(){var e,t=this.el;this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!1,!0)),this.data=this.buildData(this.attrValue),t.initializingComponents[this.name]||(t.initializingComponents[this.name]=!0,this.init(),this.initialized=!0,delete t.initializingComponents[this.name],this.oldData=_(this.oldData,this.data,this.isObjectBased),e=this.isObjectBased?this.objectPool.use():void 0,this.update(e),this.isObjectBased&&this.objectPool.recycle(e),t.isPlaying&&this.play(),t.emit("componentinitialized",this.evtDetail,!1))},updateComponent:function(e,t){var n,r;if(t)return this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!0,!0)),void(this.data=this.buildData(this.attrValue,!0,!1));if(this.isSingleProperty)return this.isObjectBased&&c(e,this.schema),void(this.data=e);if(l(e,this.schema,!0,this.name),this.schemaChangeKeys.length)for(n in e)if(this.schema[n].schemaChange){r=!0;break}if(r)return this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!0,!0)),void(this.data=this.buildData(this.attrValue,!0,!1));for(n in e)void 0!==e[n]&&(this.data[n]=e[n])},callUpdateHandler:function(){var e;this.previousOldData instanceof Object&&a.objectPool.clearObject(this.previousOldData),this.isObjectBased?x(this.previousOldData,this.oldData):this.previousOldData=this.oldData,e=!a.deepEqual(this.oldData,this.data),(this.isPositionRotationScale||e)&&(this.oldData instanceof Object&&a.objectPool.clearObject(this.oldData),this.oldData=_(this.oldData,this.data,this.isObjectBased),this.update(this.previousOldData),this.throttledEmitComponentChanged())},handleMixinUpdate:function(){this.data=this.buildData(this.attrValue),this.callUpdateHandler()},resetProperty:function(e){if(this.isObjectBased){if(!(e in this.attrValue))return;delete this.attrValue[e],this.data[e]=this.schema[e].default}else this.attrValue=this.schema.default,this.data=this.schema.default;this.updateProperties(this.attrValue)},extendSchema:function(e){var t;t=a.extend({},s[this.name].schema),a.extend(t,e),this.schema=u(t),this.el.emit("schemachanged",this.evtDetail)},buildData:function(e,t,n){var r,i,o,s,u,h,d,f=this.nextData,p=this.schema,m=this.el.mixinEls;if(r=e&&e.constructor===Array?e.length:void 0!==e&&null!==e,this.isObjectBased&&a.objectPool.clearObject(f),this.isSingleProperty)i=this.isObjectBased?x(f,p.default):S(p.default)?a.clone(p.default):p.default;else for(s in i=(d=!t&&this.attrValue)instanceof Object?x(f,d):f,p)o=p[s].default,void 0===i[s]&&(i[s]=S(o)?a.clone(o):o);for(h=0;h<m.length;h++)(u=m[h].getAttribute(this.attrName))&&(i=_(i,u,this.isObjectBased));if(r){if(this.isSingleProperty)return A(e)?(x(this.parsingAttrValue,e),c(this.parsingAttrValue,p)):c(e,p);i=_(i,e,this.isObjectBased)}else if(this.isSingleProperty)return c(i,p);return l(i,p,void 0,this.name,n)},eventsAttach:function(){var e;for(e in this.eventsDetach(),this.events)this.el.addEventListener(e,this.events[e])},eventsDetach:function(){var e;for(e in this.events)this.el.removeEventListener(e,this.events[e])},destroy:function(){this.objectPool.recycle(this.attrValue),this.objectPool.recycle(this.oldData),this.objectPool.recycle(this.parsingAttrValue),this.attrValue=this.oldData=this.parsingAttrValue=void 0}},window.debug)var w=t.exports.registrationOrderWarnings={};function x(e,t){var n,r;for(r in t)void 0!==t[r]&&(n=t[r],e[r]=S(n)?a.clone(n):n);return e}function _(e,t,n){var r;if(n&&t.constructor===Object){for(r in t)void 0!==t[r]&&(t[r]&&t[r].constructor===Object?e[r]=a.clone(t[r]):e[r]=t[r]);return e}return t}function E(e){return e.tick||e.tock}function A(e){return e&&e.constructor===Object&&!(e instanceof window.HTMLElement)}function S(e){return e&&(e.constructor===Object||e.constructor===Array)&&!(e instanceof window.HTMLElement)}t.exports.registerComponent=function(e,t){var n,r,l,c,d,f,p={};if(document.currentScript&&document.currentScript!==g&&i.forEach((function(t){t.hasLoaded||document.currentScript.compareDocumentPosition(t)!==Node.DOCUMENT_POSITION_FOLLOWING&&(m("The component `"+e+"` was registered in a <script> tag after the scene. Component <script> tags in an HTML file should be declared *before* the scene such that the component is available to entities during scene initialization."),window.debug&&(w[e]=!0))})),!0===v.test(e)&&m("The component name `"+e+"` contains uppercase characters, but HTML will ignore the capitalization of attribute names. Change the name to be lowercase: `"+e.toLowerCase()+"`"),-1!==e.indexOf("__"))throw new Error("The component name `"+e+"` is not allowed. The sequence __ (double underscore) is reserved to specify an id for multiple components of the same type");if(Object.keys(t).forEach((function(e){p[e]={value:t[e],writable:!0}})),s[e])throw new Error("The component `"+e+"` has been already registered. Check that you are not loading two versions of the same component or two different components of the same name.");if(((n=function(e,t,n){b.call(this,e,t,n)}).prototype=Object.create(b.prototype,p)).name=e,n.prototype.isPositionRotationScale="position"===e||"rotation"===e||"scale"===e,n.prototype.constructor=n,n.prototype.system=o&&o.systems[e],n.prototype.play=(d=n.prototype.play,function(){var e=this.el.sceneEl,t=this.el.isPlaying&&!this.isPlaying;this.initialized&&t&&(d.call(this),this.isPlaying=!0,this.eventsAttach(),E(this)&&e.addBehavior(this))}),n.prototype.pause=(f=n.prototype.pause,function(){var e=this.el.sceneEl;this.isPlaying&&(f.call(this),this.isPlaying=!1,this.eventsDetach(),E(this)&&e.removeBehavior(this))}),l=a.extend(u(n.prototype.schema,n.prototype.name)),!(c=h(n.prototype.schema)))for(r in n.prototype.schemaChangeKeys=[],l)l[r].schemaChange&&n.prototype.schemaChangeKeys.push(r);return y[e]=a.objectPool.createPool(),s[e]={Component:n,dependencies:n.prototype.dependencies,isSingleProp:c,multiple:n.prototype.multiple,name:e,parse:n.prototype.parse,parseAttrValueForCache:n.prototype.parseAttrValueForCache,schema:l,stringify:n.prototype.stringify,type:n.prototype.type},n}},{"../utils/":205,"./scene/scenes":138,"./schema":140,"./system":142}],132:[function(e,t,n){var r=e("./schema").process,i=t.exports.geometries={},o=t.exports.geometryNames=[],a=e("../lib/three"),s=t.exports.Geometry=function(){};s.prototype={schema:{},init:function(e){return this.geometry=new a.BufferGeometry,this.geometry},update:function(e){}},t.exports.registerGeometry=function(e,t){var n,a={};if(Object.keys(t).forEach((function(e){a[e]={value:t[e],writable:!0}})),i[e])throw new Error("The geometry `"+e+"` has been already registered");return((n=function(){s.call(this)}).prototype=Object.create(s.prototype,a)).name=e,n.prototype.constructor=n,i[e]={Geometry:n,schema:r(n.prototype.schema)},o.push(e),n}},{"../lib/three":179,"./schema":140}],133:[function(e,t,n){var r=e("../utils/coordinates"),i=e("debug"),o=i("core:propertyTypes:warn"),a=i("core:propertyTypes:warn"),s=t.exports.propertyTypes={},l=/[,> .[\]:]/,c=/\url\((.+)\)/;function u(e,t,n,r){"type"in s?o("Property type "+e+" is already registered."):s[e]={default:t,parse:n||d,stringify:r||f}}function h(e){var t,n;return"string"!==typeof e?e:(n=e.match(c))?n[1]:"#"===e.charAt(0)?(t=document.getElementById(e.substring(1)))?"CANVAS"===t.tagName||"VIDEO"===t.tagName||"IMG"===t.tagName?t:t.getAttribute("src"):void a('"'+e+'" asset not found.'):e}function d(e){return e}function f(e){return null===e?"null":e.toString()}function p(e){return parseInt(e,10)}function m(e){return r.parse(e,this.default)}function g(e,t){if(null===e)return!0;if("object"!==typeof e)return!1;if(Object.keys(e).length!==t)return!1;var n=e.x,r=e.y,i=e.z,o=e.w;return"number"===typeof n&&"number"===typeof r&&!(t>2&&"number"!==typeof i)&&!(t>3&&"number"!==typeof o)}u("audio","",h),u("array",[],(function(e){return Array.isArray(e)?e:e&&"string"===typeof e?e.split(",").map((function(e){return e.trim()})):[]}),(function(e){return e.join(", ")})),u("asset","",h),u("boolean",!1,(function(e){return"false"!==e&&!1!==e})),u("color","#FFF",d,f),u("int",0,p),u("number",0,(function(e){return parseFloat(e,10)})),u("map","",h),u("model","",h),u("selector",null,(function(e){return e?"string"!==typeof e?e:"#"!==e[0]||l.test(e)?document.querySelector(e):document.getElementById(e.substring(1)):null}),(function(e){return e.getAttribute?"#"+e.getAttribute("id"):f(e)})),u("selectorAll",null,(function(e){return e?"string"!==typeof e?e:Array.prototype.slice.call(document.querySelectorAll(e),0):null}),(function(e){return e instanceof Array?e.map((function(e){return"#"+e.getAttribute("id")})).join(", "):f(e)})),u("src","",(function(e){return a("`src` property type is deprecated. Use `asset` instead."),h(e)})),u("string","",d,f),u("time",0,p),u("vec2",{x:0,y:0},m,r.stringify),u("vec3",{x:0,y:0,z:0},m,r.stringify),u("vec4",{x:0,y:0,z:0,w:1},m,r.stringify),t.exports.registerPropertyType=u,t.exports.isValidDefaultValue=function(e,t){return("audio"!==e||"string"===typeof t)&&!("array"===e&&!Array.isArray(t))&&("asset"!==e||"string"===typeof t)&&("boolean"!==e||"boolean"===typeof t)&&("color"!==e||"string"===typeof t)&&("int"!==e||"number"===typeof t)&&("number"!==e||"number"===typeof t)&&("map"!==e||"string"===typeof t)&&("model"!==e||"string"===typeof t)&&("selector"!==e||"string"===typeof t||null===t)&&("selectorAll"!==e||"string"===typeof t||null===t)&&("src"!==e||"string"===typeof t)&&("string"!==e||"string"===typeof t)&&("time"!==e||"number"===typeof t)&&("vec2"===e?g(t,2):"vec3"===e?g(t,3):"vec4"!==e||g(t,4))},t.exports.isValidDefaultCoordinate=g},{"../utils/coordinates":200,debug:8}],134:[function(e,t,n){var r=e("./metaTags").inject,i=e("./wakelock"),o=e("./loadingScreen"),a=e("../a-register-element"),s=e("./scenes"),l=e("../system").systems,c=e("../../lib/three"),u=e("../../utils/"),h=e("../a-entity"),d=e("../a-node"),f=e("./postMessage"),p=u.bind,m=u.device.isIOS(),g=u.device.isMobile(),v=u.device.isWebXRAvailable,y=a.registerElement,b=u.debug("core:a-scene:warn");function w(e,t,n,r){return e.parentElement?t?{height:e.parentElement.offsetHeight,width:e.parentElement.offsetWidth}:function(e,t){var n,r,i=window.devicePixelRatio;return r={height:document.body.offsetHeight,width:document.body.offsetWidth},!e||t||-1===e.width&&-1===e.height||r.width*i<e.width&&r.height*i<e.height||(n=r.width/r.height,r.width*i>e.width&&-1!==e.width&&(r.width=Math.round(e.width/i),r.height=Math.round(e.width/n/i)),r.height*i>e.height&&-1!==e.height&&(r.height=Math.round(e.height/i),r.width=Math.round(e.height*n/i))),r}(n,r):{height:0,width:0}}function x(e){var t;function n(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||e.exitVR(),document.activeElement.blur(),document.body.focus()}(t=document.createElement("canvas")).classList.add("a-canvas"),t.dataset.aframeCanvas=!0,e.appendChild(t),document.addEventListener("fullscreenchange",n),document.addEventListener("mozfullscreenchange",n),document.addEventListener("webkitfullscreenchange",n),document.addEventListener("MSFullscreenChange",n),t.addEventListener("touchmove",(function(e){e.preventDefault()})),e.canvas=t,e.emit("render-target-loaded",{target:t}),setTimeout(p(e.resize,e),0)}m&&e("../../utils/ios-orientationchange-blank-bug"),t.exports.AScene=y("a-scene",{prototype:Object.create(h.prototype,{createdCallback:{value:function(){this.clock=new c.Clock,this.isIOS=m,this.isMobile=g,this.hasWebXR=v,this.isAR=!1,this.isScene=!0,this.object3D=new c.Scene;var e=this;this.object3D.onAfterRender=function(t,n,r){e.isPlaying&&e.tock(e.time,e.delta,r)},this.resize=p(this.resize,this),this.render=p(this.render,this),this.systems={},this.systemNames=[],this.time=this.delta=0,this.behaviors={tick:[],tock:[]},this.hasLoaded=!1,this.isPlaying=!1,this.originalHTML=this.innerHTML,this.setAttribute("inspector",""),this.setAttribute("keyboard-shortcuts",""),this.setAttribute("screenshot",""),this.setAttribute("vr-mode-ui",""),this.setAttribute("device-orientation-permission-ui","")}},addFullScreenStyles:{value:function(){document.documentElement.classList.add("a-fullscreen")}},removeFullScreenStyles:{value:function(){document.documentElement.classList.remove("a-fullscreen")}},attachedCallback:{value:function(){var e=this,t=this.hasAttribute("embedded");x(this),this.setupRenderer(),o.setup(this,w),this.resize(),t||this.addFullScreenStyles(),f(this),r(this),i(this),this.onVRPresentChangeBound=p(this.onVRPresentChange,this),window.addEventListener("vrdisplaypresentchange",this.onVRPresentChangeBound),this.enterVRBound=function(){e.enterVR()},this.exitVRBound=function(){e.exitVR()},this.exitVRTrueBound=function(){e.exitVR(!0)},this.pointerRestrictedBound=function(){e.pointerRestricted()},this.pointerUnrestrictedBound=function(){e.pointerUnrestricted()},v||(window.addEventListener("vrdisplaydeactivate",this.exitVRBound),window.addEventListener("vrdisplaydisconnect",this.exitVRTrueBound),window.addEventListener("vrdisplaypointerrestricted",this.pointerRestrictedBound),window.addEventListener("vrdisplaypointerunrestricted",this.pointerUnrestrictedBound)),window.addEventListener("sessionend",this.resize),this.addEventListener("cameraready",(function(){e.attachedCallbackPostCamera()})),this.initSystems(),this.hasWebXR&&navigator.xr&&navigator.xr.addEventListener&&navigator.xr.addEventListener("sessiongranted",(function(){e.enterVR()}))}},attachedCallbackPostCamera:{value:function(){var e=this;window.addEventListener("load",void 0),window.addEventListener("resize",(function(){e.isIOS?setTimeout(e.resize,100):e.resize()})),this.play(),s.push(this)},writable:window.debug},initSystems:{value:function(){var e;for(e in this.initSystem("camera"),l)"camera"!==e&&this.initSystem(e)}},initSystem:{value:function(e){this.systems[e]||(this.systems[e]=new l[e](this),this.systemNames.push(e))}},detachedCallback:{value:function(){var e=s.indexOf(this);s.splice(e,1),window.removeEventListener("vrdisplaypresentchange",this.onVRPresentChangeBound),window.removeEventListener("vrdisplayactivate",this.enterVRBound),window.removeEventListener("vrdisplaydeactivate",this.exitVRBound),window.removeEventListener("vrdisplayconnect",this.enterVRBound),window.removeEventListener("vrdisplaydisconnect",this.exitVRTrueBound),window.removeEventListener("vrdisplaypointerrestricted",this.pointerRestrictedBound),window.removeEventListener("vrdisplaypointerunrestricted",this.pointerUnrestrictedBound),window.removeEventListener("sessionend",this.resize),this.renderer.xr.dispose()}},addBehavior:{value:function(e){var t,n,r=this.behaviors;for(n in r)e[n]&&-1===(t=this.behaviors[n]).indexOf(e)&&t.push(e)}},getPointerLockElement:{value:function(){return document.pointerLockElement},writable:window.debug},checkHeadsetConnected:{value:u.device.checkHeadsetConnected,writable:window.debug},enterAR:{value:function(){var e;if(!this.hasWebXR)throw e="Failed to enter AR mode, WebXR not supported.",new Error(e);if(!u.device.checkARSupport())throw e="Failed to enter AR, WebXR immersive-ar mode not supported in your browser or device.",new Error(e);return this.enterVR(!0)}},enterVR:{value:function(e){var t,n,r=this,i=r.renderer.xr;if(this.is("vr-mode"))return Promise.resolve("Already in VR.");if(this.checkHeadsetConnected()||this.isMobile){if(i.enabled=!0,this.hasWebXR){this.xrSession&&this.xrSession.removeEventListener("end",this.exitVRBound);var o=this.sceneEl.systems.webxr.sessionReferenceSpaceType;i.setReferenceSpaceType(o);var a=e?"immersive-ar":"immersive-vr";return n=this.sceneEl.systems.webxr.sessionConfiguration,new Promise((function(e,t){navigator.xr.requestSession(a,n).then((function(t){r.xrSession=t,i.layersEnabled=-1!==n.requiredFeatures.indexOf("layers"),i.setSession(t),t.addEventListener("end",r.exitVRBound),c(e)}),(function(e){throw new Error("Failed to enter "+("immersive-ar"===a?"AR":"VR")+" mode (`requestSession`) "+e)}))}))}if(t=u.device.getVRDisplay(),i.setDevice(t),t.isPresenting&&!window.hasNativeWebVRImplementation)return c(),Promise.resolve();var s=this.getAttribute("renderer"),l={highRefreshRate:s.highRefreshRate,foveationLevel:s.foveationLevel};return t.requestPresent([{source:this.canvas,attributes:l}]).then(c,(function(e){throw r.removeState("vr-mode"),e&&e.message?new Error("Failed to enter VR mode (`requestPresent`): "+e.message):new Error("Failed to enter VR mode (`requestPresent`).")}))}return c(),Promise.resolve();function c(t){var n,i;window.hasNativeWebVRImplementation&&!window.hasNativeWebXRImplementation&&(n=new CustomEvent("vrdisplaypresentchange",{detail:{display:u.device.getVRDisplay()}}),window.dispatchEvent(n)),e?r.addState("ar-mode"):r.addState("vr-mode"),r.emit("enter-vr",{target:r}),!v&&r.isMobile&&screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape"),r.addFullScreenStyles(),r.isMobile||r.checkHeadsetConnected()||((i=r.canvas).requestFullscreen||i.webkitRequestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen).apply(i,[{navigationUI:"hide"}]),r.renderer.setAnimationLoop(r.render),r.resize(),t&&t()}},writable:!0},exitVR:{value:function(){var e,t=this,n=this.renderer.xr;if(!this.is("vr-mode")&&!this.is("ar-mode"))return Promise.resolve("Not in immersive mode.");if(this.checkHeadsetConnected()||this.isMobile){if(n.enabled=!1,e=u.device.getVRDisplay(),this.hasWebXR)this.xrSession.removeEventListener("end",this.exitVRBound),this.xrSession.end().then((function(){}),(function(){})),this.xrSession=void 0,n.setSession(null);else if(e.isPresenting)return e.exitPresent().then(r,(function(e){throw e&&e.message?new Error("Failed to exit VR mode (`exitPresent`): "+e.message):new Error("Failed to exit VR mode (`exitPresent`).")}))}else(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen());return r(),Promise.resolve();function r(){t.removeState("vr-mode"),t.removeState("ar-mode"),t.isMobile&&screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),t.hasAttribute("embedded")&&t.removeFullScreenStyles(),t.resize(),t.isIOS&&u.forceCanvasResizeSafariMobile(t.canvas),t.renderer.setPixelRatio(window.devicePixelRatio),t.emit("exit-vr",{target:t})}},writable:!0},pointerRestricted:{value:function(){if(this.canvas){var e=this.getPointerLockElement();e&&e!==this.canvas&&document.exitPointerLock&&document.exitPointerLock(),this.canvas.requestPointerLock&&this.canvas.requestPointerLock()}}},pointerUnrestricted:{value:function(){var e=this.getPointerLockElement();e&&e===this.canvas&&document.exitPointerLock&&document.exitPointerLock()}},onVRPresentChange:{value:function(e){var t=e.display||e.detail.display;t&&t.isPresenting?this.enterVR():this.exitVR()}},getAttribute:{value:function(e){var t=this.systems[e];return t?t.data:h.prototype.getAttribute.call(this,e)}},getComputedAttribute:{value:function(e){b("`getComputedAttribute` is deprecated. Use `getAttribute` instead."),this.getAttribute(e)}},getDOMAttribute:{value:function(e){var t=this.systems[e];return t?t.data:h.prototype.getDOMAttribute.call(this,e)}},setAttribute:{value:function(e,t,n){var r=this.systems[e];if(r)return d.prototype.setAttribute.call(this,e,t),void r.updateProperties(t);h.prototype.setAttribute.call(this,e,t,n)}},removeBehavior:{value:function(e){var t,n,r,i=this.behaviors;for(n in i)e[n]&&-1!==(r=(t=this.behaviors[n]).indexOf(e))&&t.splice(r,1)}},resize:{value:function(){var e,t,n=this.camera,r=this.canvas,i=this.renderer.xr.isPresenting;e=this.renderer.xr.enabled&&i,!n||!r||this.is("vr-mode")&&(this.isMobile||e)||(t=w(r,this.getAttribute("embedded")&&!this.is("vr-mode"),this.maxCanvasSize,this.is("vr-mode")),n.aspect=t.width/t.height,n.updateProjectionMatrix(),this.renderer.setSize(t.width,t.height,!1),this.emit("rendererresize",null,!1))},writable:!0},setupRenderer:{value:function(){var e,t,n,r,i=this;r={alpha:!0,antialias:!g,canvas:this.canvas,logarithmicDepthBuffer:!1,powerPreference:"high-performance"},this.maxCanvasSize={height:1920,width:1920},this.hasAttribute("renderer")&&(n=this.getAttribute("renderer"),(t=u.styleParser.parse(n)).precision&&(r.precision=t.precision+"p"),t.antialias&&"auto"!==t.antialias&&(r.antialias="true"===t.antialias),t.logarithmicDepthBuffer&&"auto"!==t.logarithmicDepthBuffer&&(r.logarithmicDepthBuffer="true"===t.logarithmicDepthBuffer),t.alpha&&(r.alpha="true"===t.alpha),this.maxCanvasSize={width:t.maxCanvasWidth?parseInt(t.maxCanvasWidth):this.maxCanvasSize.width,height:t.maxCanvasHeight?parseInt(t.maxCanvasHeight):this.maxCanvasSize.height}),(e=this.renderer=new c.WebGLRenderer(r)).setPixelRatio(window.devicePixelRatio),e.sortObjects=!1,this.camera&&e.xr.setPoseTarget(this.camera.el.object3D),this.addEventListener("camera-set-active",(function(){e.xr.setPoseTarget(i.camera.el.object3D)}))},writable:window.debug},play:{value:function(){var e=this,t=this;this.renderStarted?h.prototype.play.call(this):(this.addEventListener("loaded",(function(){var e,n=this.renderer,r=this.renderer.xr;h.prototype.play.call(this),t.renderStarted||(t.resize(),t.renderer&&(window.performance&&window.performance.mark("render-started"),o.remove(),(e=u.device.getVRDisplay())&&e.isPresenting&&(r.setDevice(e),r.enabled=!0,t.enterVR()),n.setAnimationLoop(this.render),t.renderStarted=!0,t.emit("renderstart")))})),setTimeout((function(){h.prototype.load.call(e)})))}},updateComponent:{value:function(e){e in l||h.prototype.updateComponent.apply(this,arguments)}},tick:{value:function(e,t){var n,r=this.systems;for(n=0;n<this.behaviors.tick.length;n++)this.behaviors.tick[n].el.isPlaying&&this.behaviors.tick[n].tick(e,t);for(n=0;n<this.systemNames.length;n++)r[this.systemNames[n]].tick&&r[this.systemNames[n]].tick(e,t)}},tock:{value:function(e,t,n){var r,i=this.systems;for(r=0;r<this.behaviors.tock.length;r++)this.behaviors.tock[r].el.isPlaying&&this.behaviors.tock[r].tock(e,t,n);for(r=0;r<this.systemNames.length;r++)i[this.systemNames[r]].tock&&i[this.systemNames[r]].tock(e,t,n)}},render:{value:function(e,t){var n=this.renderer;this.frame=t,this.delta=1e3*this.clock.getDelta(),this.time=1e3*this.clock.elapsedTime,this.isPlaying&&this.tick(this.time,this.delta);var r=null;this.is("ar-mode")&&(r=this.object3D.background,this.object3D.background=null),n.render(this.object3D,this.camera),r&&(this.object3D.background=r)},writable:!0}})}),t.exports.setupCanvas=x},{"../../lib/three":179,"../../utils/":205,"../../utils/ios-orientationchange-blank-bug":206,"../a-entity":127,"../a-node":129,"../a-register-element":130,"../system":142,"./loadingScreen":135,"./metaTags":136,"./postMessage":137,"./scenes":138,"./wakelock":139}],135:[function(e,t,n){var r,i,o,a=e("../../utils/").styleParser;function s(e){var t=r.hasAttribute("embedded"),n=o(r.canvas,t,r.maxCanvasSize,r.is("vr-mode"));e.aspect=n.width/n.height,e.updateProjectionMatrix(),r.renderer.setSize(n.width,n.height,!1)}t.exports.setup=function(e,t){o=t;var n,l,c,u,h,d,f,p,m,g,v=(r=e).hasAttribute("loading-screen")?a.parse(r.getAttribute("loading-screen")):void 0,y=v&&v.dotsColor||"white",b=v&&v.backgroundColor||"#24CAFF";(void 0===v||"true"===v.enabled||void 0===v.enabled)&&(n=new THREE.Scene,l=new THREE.SphereGeometry(.2,36,18,0,2*Math.PI,0,Math.PI),c=new THREE.MeshBasicMaterial({color:y}),u=new THREE.Mesh(l,c),h=u.clone(),d=u.clone(),f=new THREE.PerspectiveCamera(80,window.innerWidth/window.innerHeight,5e-4,1e4),p=new THREE.Clock,m=0,g=function(){r.renderer.render(n,f),m=p.getElapsedTime()%4,u.visible=m>=1,h.visible=m>=2,d.visible=m>=3},n.background=new THREE.Color(b),n.add(f),u.position.set(-1,0,-15),h.position.set(0,0,-15),d.position.set(1,0,-15),f.add(u),f.add(h),f.add(d),(i=document.createElement("div")).className="a-loader-title",i.innerHTML=document.title,i.style.display="none",r.appendChild(i),setTimeout((function(){r.hasLoaded||(s(f),i.style.display="block",window.addEventListener("resize",(function(){s(f)})),r.renderer.setAnimationLoop(g))}),200))},t.exports.remove=function(){window.removeEventListener("resize",s),i&&(i.style.display="none")}},{"../../utils/":205}],136:[function(e,t,n){var r,i=e("../../constants/"),o=e("../../utils").extend,a=t.exports.MOBILE_HEAD_TAGS=[l({name:"viewport",content:"width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no,user-scalable=no,minimal-ui,viewport-fit=cover"}),l({name:"mobile-web-app-capable",content:"yes"}),l({name:"theme-color",content:"black"})],s=[l({name:"apple-mobile-web-app-capable",content:"yes"}),l({name:"apple-mobile-web-app-status-bar-style",content:"black"}),(r={rel:"apple-touch-icon",href:"https://aframe.io/images/aframe-logo-152.png"},{tagName:"link",attributes:r,exists:function(){return document.querySelector('link[rel="'+r.rel+'"]')}})];function l(e){return{tagName:"meta",attributes:e,exists:function(){return document.querySelector('meta[name="'+e.name+'"]')}}}t.exports.inject=function(e){var t,n=document.head,r=n.querySelector("script"),l=[];return a.forEach(c),e.isIOS&&s.forEach(c),l;function c(e){e&&!e.exists()&&(t=function(e){if(e&&e.tagName){var t=document.createElement(e.tagName);return t.setAttribute(i.AFRAME_INJECTED,""),o(t,e.attributes)}}(e))&&(r?r.parentNode.insertBefore(t,r):n.appendChild(t),l.push(t))}}},{"../../constants/":123,"../../utils":205}],137:[function(e,t,n){var r=e("../../utils/bind"),i=e("../../utils/").isIframed;function o(e){if(e.data)switch(e.data.type){case"vr":switch(e.data.data){case"enter":this.enterVR();break;case"exit":this.exitVR()}}}t.exports=function(e){i()&&window.addEventListener("message",r(o,e))}},{"../../utils/":205,"../../utils/bind":199}],138:[function(e,t,n){t.exports=[]},{}],139:[function(e,t,n){var r=e("../../../vendor/wakelock/wakelock");t.exports=function(e){if(e.isMobile){var t=e.wakelock=new r;e.addEventListener("enter-vr",(function(){t.request()})),e.addEventListener("exit-vr",(function(){t.release()}))}}},{"../../../vendor/wakelock/wakelock":220}],140:[function(e,t,n){var r=e("../utils/"),i=e("./propertyTypes"),o=r.debug,a=i.isValidDefaultValue,s=i.propertyTypes,l=o("core:schema:warn");function c(e){return"type"in e?"string"===typeof e.type:"default"in e}function u(e,t){var n,r,i=e.default,o=e.type;return e.type?"bool"===e.type?o="boolean":"float"===e.type&&(o="number"):o=void 0===i||"boolean"!==typeof i&&"number"!==typeof i?Array.isArray(i)?"array":"string":typeof i,(r=s[o])||l("Unknown property type for component `"+t+"`: "+o),n=!!e.parse,e.parse=e.parse||r.parse,e.stringify=e.stringify||r.stringify,e.type=o,"default"in e?n||a(o,i)||l("Default value `"+i+"` does not match type `"+o+"` in component `"+t+"`"):e.default=r.default,e}function h(e,t){return void 0!==e&&null!==e&&""!==e||(e=t.default,Array.isArray(e)&&(e=e.slice())),t.parse(e,t.default)}function d(e,t){return"object"!==typeof e?e:t&&null!==e?t.stringify(e):JSON.stringify(e)}t.exports.isSingleProperty=c,t.exports.process=function(e,t){var n;if(c(e))return u(e,t);for(n in e)e[n]=u(e[n],t);return e},t.exports.processPropertyDefinition=u,t.exports.parseProperties=function(){var e=[];return function(t,n,r,i,o){var a,s,c,u;for(s in e.length=0,r?t:n)r&&void 0===t[s]||e.push(s);if(null===t||"object"!==typeof t)return t;for(s in t)void 0===t[s]||n[s]||o||l("Unknown property `"+s+"` for component/system `"+i+"`.");for(a=0;a<e.length;a++){if(c=n[s=e[a]],u=t[s],!n[s])return;t[s]=h(u,c)}return t}}(),t.exports.parseProperty=h,t.exports.stringifyProperties=function(e,t){var n,r,i,o,a={};for(n in e)r=t[n],"object"===typeof(o=i=e[n])&&(o=d(i,r),r||l("Unknown component property: "+n)),a[n]=o;return a},t.exports.stringifyProperty=d},{"../utils/":205,"./propertyTypes":133}],141:[function(e,t,n){var r=e("./schema").process,i=t.exports.shaders={},o=t.exports.shaderNames=[],a=e("../lib/three"),s=e("../utils"),l={array:"v3",color:"v3",int:"i",number:"f",map:"t",time:"f",vec2:"v2",vec3:"v3",vec4:"v4"},c=t.exports.Shader=function(){};c.prototype={schema:{},vertexShader:"void main() {gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);}",fragmentShader:"void main() {gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);}",init:function(e){return this.attributes=this.initVariables(e,"attribute"),this.uniforms=this.initVariables(e,"uniform"),this.material=new(this.raw?a.RawShaderMaterial:a.ShaderMaterial)({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader}),this.material},initVariables:function(e,t){var n,r,i=this.schema,o={};for(n in i)i[n].is===t&&(r=l[i[n].type],o[n]={type:r,value:void 0});return o},update:function(e){this.updateVariables(e,"attribute"),this.updateVariables(e,"uniform")},updateVariables:function(e,t){var n,r,i,o=this.schema;for(n in i="uniform"===t?this.uniforms:this.attributes,e)if(o[n]&&o[n].is===t)if("map"!==o[n].type)i[n].value=this.parseValue(o[n].type,e[n]),i[n].needsUpdate=!0;else{if(!i[n]||i[n].value===e[n])continue;r="_texture_"+n,this.setMapOnTextureLoad(i,n,r),s.material.updateMapMaterialFromData(r,n,this,e)}},parseValue:function(e,t){var n;switch(e){case"vec2":return new a.Vector2(t.x,t.y);case"vec3":return new a.Vector3(t.x,t.y,t.z);case"vec4":return new a.Vector4(t.x,t.y,t.z,t.w);case"color":return n=new a.Color(t),new a.Vector3(n.r,n.g,n.b);case"map":return a.ImageUtils.loadTexture(t);default:return t}},setMapOnTextureLoad:function(e,t,n){var r=this;this.el.addEventListener("materialtextureloaded",(function(){e[t].value=r.material[n],e[t].needsUpdate=!0}))}},t.exports.registerShader=function(e,t){var n,a={};if(Object.keys(t).forEach((function(e){a[e]={value:t[e],writable:!0}})),i[e])throw new Error("The shader "+e+" has been already registered");return((n=function(){c.call(this)}).prototype=Object.create(c.prototype,a)).name=e,n.prototype.constructor=n,i[e]={Shader:n,schema:r(n.prototype.schema)},o.push(e),n}},{"../lib/three":179,"../utils":205,"./schema":140}],142:[function(e,t,n){var r=e("./component"),i=e("./schema"),o=e("../utils/"),a=i.parseProperties,s=i.parseProperty,l=i.process,c=i.isSingleProperty,u=o.styleParser,h=t.exports.systems={},d=t.exports.System=function(e){var t=r&&r.components[this.name];this.el=e,this.sceneEl=e,t&&(t.Component.prototype.system=this),this.buildData(),this.init(),this.update({})};d.prototype={schema:{},init:function(){},update:function(e){},updateProperties:function(e){var t=this.data;Object.keys(i).length&&(this.buildData(e),this.update(t))},buildData:function(e){var t=this.schema;Object.keys(t).length&&(e=e||window.HTMLElement.prototype.getAttribute.call(this.sceneEl,this.name),c(t)?this.data=s(e,t):this.data=a(u.parse(e)||{},t))},tick:void 0,tock:void 0,play:function(){},pause:function(){}},t.exports.registerSystem=function(e,t){var n,r,i={},a=o.findAllScenes(document);if(Object.keys(t).forEach((function(e){i[e]={value:t[e],writable:!0}})),h[e])throw new Error("The system `"+e+"` has been already registered. Check that you are not loading two versions of the same system or two different systems of the same name.");for(((r=function(e){d.call(this,e)}).prototype=Object.create(d.prototype,i)).name=e,r.prototype.constructor=r,r.prototype.schema=o.extend(l(r.prototype.schema)),h[e]=r,n=0;n<a.length;n++)a[n].initSystem(e)}},{"../utils/":205,"./component":131,"./schema":140}],143:[function(e,t,n){e("./pivot")},{"./pivot":144}],144:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=new i.Vector3,a=new i.Vector3;r("pivot",{dependencies:["position"],schema:{type:"vec3"},init:function(){var e=this.data,t=this.el,n=t.object3D.parent,r=t.object3D,s=new i.Group;o.copy(r.position),a.copy(r.rotation),n.remove(r),s.add(r),n.add(s),t.object3D=s,r.position.set(-1*e.x,-1*e.y,-1*e.z),s.position.set(e.x+o.x,e.y+o.y,e.z+o.z),s.rotation.copy(r.rotation),r.rotation.set(0,0,0)}})},{"../../core/component":131,"../../lib/three":179}],145:[function(e,t,n){var r=e("../../core/component").components,i=e("../../core/shader").shaders,o=e("../../utils/"),a={};function s(e){var t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();"fog"===e&&(t="material-fog"),"visible"===e&&(t="material-visible"),a[t]="material."+e}Object.keys(r.material.schema).forEach(s),Object.keys(i.standard.schema).forEach(s),t.exports=function(){return{defaultComponents:{material:{}},mappings:o.extend({},a)}}},{"../../core/component":131,"../../core/shader":141,"../../utils/":205}],146:[function(e,t,n){e("./primitives/a-camera"),e("./primitives/a-cursor"),e("./primitives/a-curvedimage"),e("./primitives/a-gltf-model"),e("./primitives/a-image"),e("./primitives/a-light"),e("./primitives/a-link"),e("./primitives/a-obj-model"),e("./primitives/a-sky"),e("./primitives/a-sound"),e("./primitives/a-text"),e("./primitives/a-video"),e("./primitives/a-videosphere"),e("./primitives/meshPrimitives")},{"./primitives/a-camera":148,"./primitives/a-cursor":149,"./primitives/a-curvedimage":150,"./primitives/a-gltf-model":151,"./primitives/a-image":152,"./primitives/a-light":153,"./primitives/a-link":154,"./primitives/a-obj-model":155,"./primitives/a-sky":156,"./primitives/a-sound":157,"./primitives/a-text":158,"./primitives/a-video":159,"./primitives/a-videosphere":160,"./primitives/meshPrimitives":161}],147:[function(e,t,n){var r=e("../../core/a-entity"),i=e("../../core/component").components,o=e("../../core/a-register-element").registerElement,a=e("../../utils/"),s=a.debug,l=a.entity.setComponentProperty,c=s("extras:primitives:debug"),u=s("extras:primitives:warn"),h=t.exports.primitives={};t.exports.registerPrimitive=function(e,t){e=e.toLowerCase(),c("Registering <%s>",e),t.defaultAttributes&&u("The 'defaultAttributes' object is deprecated. Use 'defaultComponents' instead.");var n=o(e,{prototype:Object.create(r.prototype,{defaultComponentsFromPrimitive:{value:t.defaultComponents||t.defaultAttributes||{}},deprecated:{value:t.deprecated||null},deprecatedMappings:{value:t.deprecatedMappings||{}},mappings:{value:t.mappings||{}},createdCallback:{value:function(){t.deprecated&&console.warn(t.deprecated),this.resolveMappingCollisions()}},resolveMappingCollisions:{value:function(){var e=this.mappings,t=this;Object.keys(e).forEach((function(n){var r;n!==n.toLowerCase()&&u("Mapping keys should be specified in lower case. The mapping key "+n+" may not be recognized"),i[n]&&(r=e[n].replace(".","-"),e[r]=e[n],delete e[n],console.warn("The primitive "+t.tagName.toLowerCase()+" has a mapping collision. The attribute "+n+" has the same name as a registered component and has been renamed to "+r))}))}},getExtraComponents:{value:function(){var e,t,n,r,i,o,s=this;for(t=a.clone(this.defaultComponentsFromPrimitive),(i=this.getAttribute("mixin"))&&(i=i.trim().split(" ")).forEach((function(e){var n=s.sceneEl.querySelector("#"+e).componentCache;Object.keys(n).forEach((function(e){var r,i;t[e]=(r=t[e],i=n[e],l(r)?c(i):l(i)?c(r):u(r)&&u(i)?a.extendDeep(r,i):c(i))}))})),n=0;n<this.attributes.length;n++)e=this.attributes[n],(r=this.mappings[e.name])&&((o=a.entity.getComponentPropertyPath(r)).constructor===Array?(t[o[0]]=t[o[0]]||{},t[o[0]][o[1]]=e.value.trim()):t[o]=e.value.trim());return t;function l(e){return"undefined"===typeof e}function c(e){return u(e)?a.extendDeep({},e):e}function u(e){return null!==e&&e.constructor===Object}}},attributeChangedCallback:{value:function(e,t,n){var r=this.mappings[e];e in this.deprecatedMappings&&console.warn(this.deprecatedMappings[e]),e&&r&&l(this,r,n)}}})});return h[e]=n,n},t.exports.definePrimitive=function(e,n,r){r=r||{},Object.keys(n).map((function(e){!function(e,t){var n=i[e].schema;Object.keys(n).map((function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();void 0!==t[r]&&(r=e+"-"+n),t[r]=e+"."+n}))}(e,r)})),t.exports.registerPrimitive(e,a.extendDeep({},null,{defaultComponents:n,mappings:r}))}},{"../../core/a-entity":127,"../../core/a-register-element":130,"../../core/component":131,"../../utils/":205}],148:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-camera",{defaultComponents:{camera:{},"look-controls":{},"wasd-controls":{},position:{x:0,y:1.6,z:0}},mappings:{active:"camera.active",far:"camera.far",fov:"camera.fov","look-controls-enabled":"look-controls.enabled",near:"camera.near","pointer-lock-enabled":"look-controls.pointerLockEnabled","wasd-controls-enabled":"wasd-controls.enabled","reverse-mouse-drag":"look-controls.reverseMouseDrag",zoom:"camera.zoom"}})},{"../primitives":147}],149:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-cursor",e("../../../utils/").extendDeep({},r(),{defaultComponents:{cursor:{},geometry:{primitive:"ring",radiusOuter:.016,radiusInner:.01,segmentsTheta:32},material:{color:"#000",shader:"flat",opacity:.8},position:{x:0,y:0,z:-1}},mappings:{far:"raycaster.far",fuse:"cursor.fuse","fuse-timeout":"cursor.fuseTimeout",interval:"raycaster.interval",objects:"raycaster.objects"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],150:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-curvedimage",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{height:1,primitive:"cylinder",radius:2,segmentsRadial:48,thetaLength:270,openEnded:!0,thetaStart:0},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0,repeat:"-1 1"}},mappings:{height:"geometry.height","open-ended":"geometry.openEnded",radius:"geometry.radius",segments:"geometry.segmentsRadial",start:"geometry.thetaStart","theta-length":"geometry.thetaLength","theta-start":"geometry.thetaStart",width:"geometry.thetaLength"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],151:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-gltf-model",{mappings:{src:"gltf-model"}})},{"../primitives":147}],152:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-image",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],153:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-light",{defaultComponents:{light:{}},mappings:{angle:"light.angle",color:"light.color","ground-color":"light.groundColor",decay:"light.decay",distance:"light.distance",intensity:"light.intensity",penumbra:"light.penumbra",type:"light.type",target:"light.target"}})},{"../primitives":147}],154:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-link",{defaultComponents:{link:{visualAspectEnabled:!0}},mappings:{href:"link.href",image:"link.image",title:"link.title"}})},{"../primitives":147}],155:[function(e,t,n){var r=e("../getMeshMixin")();(0,e("../primitives").registerPrimitive)("a-obj-model",e("../../../utils/").extendDeep({},r,{defaultComponents:{"obj-model":{}},mappings:{src:"obj-model.obj",mtl:"obj-model.mtl"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],156:[function(e,t,n){var r=e("../getMeshMixin"),i=e("../primitives").registerPrimitive,o=e("../../../utils/"),a=e("./meshPrimitives");i("a-sky",o.extendDeep({},r(),{defaultComponents:{geometry:{primitive:"sphere",radius:500,segmentsWidth:64,segmentsHeight:32},material:{color:"#FFF",side:"back",shader:"flat",npot:!0},scale:"-1 1 1"},mappings:o.extendDeep({},a["a-sphere"].prototype.mappings)}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147,"./meshPrimitives":161}],157:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-sound",{defaultComponents:{sound:{}},mappings:{src:"sound.src",on:"sound.on",autoplay:"sound.autoplay",loop:"sound.loop",volume:"sound.volume"}})},{"../primitives":147}],158:[function(e,t,n){(0,e("../primitives").definePrimitive)("a-text",{text:{anchor:"align",width:5}})},{"../primitives":147}],159:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-video",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],160:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-videosphere",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"sphere",radius:500,segmentsWidth:64,segmentsHeight:32},material:{color:"#FFF",shader:"flat",side:"back",npot:!0},scale:"-1 1 1"},mappings:{radius:"geometry.radius","segments-height":"geometry.segmentsHeight","segments-width":"geometry.segmentsWidth"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],161:[function(e,t,n){var r=e("../getMeshMixin"),i=e("../../../core/geometry").geometries,o=e("../../../core/geometry").geometryNames,a=e("../primitives").registerPrimitive,s=e("../../../utils/"),l=t.exports={};function c(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}o.forEach((function(e){var t=i[e],n=c(e),o={};Object.keys(t.schema).forEach((function(e){o[c(e)]="geometry."+e}));var u="a-"+n,h=a(u,s.extendDeep({},r(),{defaultComponents:{geometry:{primitive:e}},mappings:o}));l[u]=h}))},{"../../../core/geometry":132,"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],162:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("box",{schema:{depth:{default:1,min:0},height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:"int"},segmentsWidth:{default:1,min:1,max:20,type:"int"},segmentsDepth:{default:1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new i.BoxGeometry(e.width,e.height,e.depth,e.segmentsWidth,e.segmentsHeight,e.segmentsDepth)}})},{"../core/geometry":132,"../lib/three":179}],163:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("circle",{schema:{radius:{default:1,min:0},segments:{default:32,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CircleGeometry(e.radius,e.segments,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],164:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("cone",{schema:{height:{default:1,min:0},openEnded:{default:!1},radiusBottom:{default:1,min:0},radiusTop:{default:.01,min:0},segmentsHeight:{default:18,min:1,type:"int"},segmentsRadial:{default:36,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CylinderGeometry(e.radiusTop,e.radiusBottom,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],165:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("cylinder",{schema:{height:{default:1,min:0},openEnded:{default:!1},radius:{default:1,min:0},segmentsHeight:{default:18,min:1,type:"int"},segmentsRadial:{default:36,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CylinderGeometry(e.radius,e.radius,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],166:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("dodecahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.DodecahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],167:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("icosahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.IcosahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],168:[function(e,t,n){e("./box.js"),e("./circle.js"),e("./cone.js"),e("./cylinder.js"),e("./dodecahedron.js"),e("./icosahedron.js"),e("./octahedron.js"),e("./plane.js"),e("./ring.js"),e("./sphere.js"),e("./tetrahedron.js"),e("./torus.js"),e("./torusKnot.js"),e("./triangle.js")},{"./box.js":162,"./circle.js":163,"./cone.js":164,"./cylinder.js":165,"./dodecahedron.js":166,"./icosahedron.js":167,"./octahedron.js":169,"./plane.js":170,"./ring.js":171,"./sphere.js":172,"./tetrahedron.js":173,"./torus.js":174,"./torusKnot.js":175,"./triangle.js":176}],169:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("octahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.OctahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],170:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("plane",{schema:{height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:"int"},segmentsWidth:{default:1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new i.PlaneGeometry(e.width,e.height,e.segmentsWidth,e.segmentsHeight)}})},{"../core/geometry":132,"../lib/three":179}],171:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("ring",{schema:{radiusInner:{default:.8,min:0},radiusOuter:{default:1.2,min:0},segmentsPhi:{default:10,min:1,type:"int"},segmentsTheta:{default:32,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.RingGeometry(e.radiusInner,e.radiusOuter,e.segmentsTheta,e.segmentsPhi,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],172:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("sphere",{schema:{radius:{default:1,min:0},phiLength:{default:360},phiStart:{default:0,min:0},thetaLength:{default:180,min:0},thetaStart:{default:0},segmentsHeight:{default:18,min:2,type:"int"},segmentsWidth:{default:36,min:3,type:"int"}},init:function(e){this.geometry=new i.SphereGeometry(e.radius,e.segmentsWidth,e.segmentsHeight,o(e.phiStart),o(e.phiLength),o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],173:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("tetrahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.TetrahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],174:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("torus",{schema:{arc:{default:360},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:36,min:2,type:"int"},segmentsTubular:{default:32,min:3,type:"int"}},init:function(e){this.geometry=new i.TorusGeometry(e.radius,2*e.radiusTubular,e.segmentsRadial,e.segmentsTubular,o(e.arc))}})},{"../core/geometry":132,"../lib/three":179}],175:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("torusKnot",{schema:{p:{default:2,min:1},q:{default:3,min:1},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:8,min:3,type:"int"},segmentsTubular:{default:100,min:3,type:"int"}},init:function(e){this.geometry=new i.TorusKnotGeometry(e.radius,2*e.radiusTubular,e.segmentsTubular,e.segmentsRadial,e.p,e.q)}})},{"../core/geometry":132,"../lib/three":179}],176:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=new i.Quaternion,a=new i.Vector3(0,0,1),s=new i.Vector2,l=new i.Vector2,c=new i.Vector2;r("triangle",{schema:{vertexA:{type:"vec3",default:{x:0,y:.5,z:0}},vertexB:{type:"vec3",default:{x:-.5,y:-.5,z:0}},vertexC:{type:"vec3",default:{x:.5,y:-.5,z:0}}},init:function(e){var t,n,r,u,h,d,f,p,m;(r=new i.Triangle).a.set(e.vertexA.x,e.vertexA.y,e.vertexA.z),r.b.set(e.vertexB.x,e.vertexB.y,e.vertexB.z),r.c.set(e.vertexC.x,e.vertexC.y,e.vertexC.z),n=r.getNormal(new i.Vector3),o.setFromUnitVectors(n,a),u=r.a.clone().applyQuaternion(o),h=r.b.clone().applyQuaternion(o),d=r.c.clone().applyQuaternion(o),s.set(Math.min(u.x,h.x,d.x),Math.min(u.y,h.y,d.y)),l.set(Math.max(u.x,h.x,d.x),Math.max(u.y,h.y,d.y)),c.set(0,0).subVectors(l,s),u=(new i.Vector2).subVectors(u,s).divide(c),h=(new i.Vector2).subVectors(h,s).divide(c),d=(new i.Vector2).subVectors(d,s).divide(c),t=this.geometry=new i.BufferGeometry,f=[r.a.x,r.a.y,r.a.z,r.b.x,r.b.y,r.b.z,r.c.x,r.c.y,r.c.z],p=[n.x,n.y,n.z,n.x,n.y,n.z,n.x,n.y,n.z],m=[u.x,u.y,h.x,h.y,d.x,d.y],t.setAttribute("position",new i.Float32BufferAttribute(f,3)),t.setAttribute("normal",new i.Float32BufferAttribute(p,3)),t.setAttribute("uv",new i.Float32BufferAttribute(m,2))}})},{"../core/geometry":132,"../lib/three":179}],177:[function(e,t,n){if(window.Promise=window.Promise||e("promise-polyfill"),window.hasNativeWebVRImplementation=!!window.navigator.getVRDisplays||!!window.navigator.getVRDevices,window.hasNativeWebXRImplementation=void 0!==navigator.xr,!window.hasNativeWebXRImplementation&&!window.hasNativeWebVRImplementation){var r=e("./utils/isIOSOlderThan10")(window.navigator.userAgent)?1/window.devicePixelRatio:1,i=e("webvr-polyfill"),o={BUFFER_SCALE:r,CARDBOARD_UI_DISABLED:!0,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!!window.cordova};window.webvrpolyfill=new i(o)}var a=e("./utils/"),s=a.debug;a.isIE11&&(e("custom-event-polyfill"),e("../vendor/starts-with-polyfill"));var l=s("A-Frame:error"),c=s("A-Frame:warn");window.document.currentScript&&window.document.currentScript.parentNode!==window.document.head&&!window.debug&&c("Put the A-Frame <script> tag in the <head> of the HTML *before* the scene to ensure everything for A-Frame is properly registered before they are used from HTML."),window.cordova||"file:"!==window.location.protocol||l("This HTML file is currently being served via the file:// protocol. Assets, textures, and models WILL NOT WORK due to cross-origin policy! Please use a local or hosted server: https://aframe.io/docs/0.5.0/introduction/getting-started.html#using-a-local-server."),e("present"),a.device.isBrowserEnvironment&&(e("./style/aframe.css"),e("./style/rStats.css"));var u=e("./core/scene/a-scene").AScene,h=e("./core/component").components,d=e("./core/component").registerComponent,f=e("./core/geometry").registerGeometry,p=e("./extras/primitives/primitives").registerPrimitive,m=e("./core/shader").registerShader,g=e("./core/system").registerSystem,v=e("./core/shader").shaders,y=e("./core/system").systems,b=window.THREE=e("./lib/three"),w=e("../package");e("./components/index"),e("./geometries/index"),e("./shaders/index"),e("./systems/index");var x=e("./core/a-node"),_=e("./core/a-entity");e("./core/a-assets"),e("./core/a-cubemap"),e("./core/a-mixin"),e("./extras/components/"),e("./extras/primitives/"),console.log("A-Frame Version: 1.2.0 (Date 2021-02-05, Commit #b220fa00)"),console.log("THREE Version (https://github.com/supermedium/three.js):",w.dependencies["super-three"]),console.log("WebVR Polyfill Version:",w.dependencies["webvr-polyfill"]),t.exports=window.AFRAME={AComponent:e("./core/component").Component,AEntity:_,ANode:x,ANIME:e("super-animejs"),AScene:u,components:h,coreComponents:Object.keys(h),geometries:e("./core/geometry").geometries,registerComponent:d,registerElement:e("./core/a-register-element").registerElement,registerGeometry:f,registerPrimitive:p,registerShader:m,registerSystem:g,primitives:{getMeshMixin:e("./extras/primitives/getMeshMixin"),primitives:e("./extras/primitives/primitives").primitives},scenes:e("./core/scene/scenes"),schema:e("./core/schema"),shaders:v,systems:y,THREE:b,utils:a,version:w.version}},{"../package":73,"../vendor/starts-with-polyfill":218,"./components/index":84,"./core/a-assets":125,"./core/a-cubemap":126,"./core/a-entity":127,"./core/a-mixin":128,"./core/a-node":129,"./core/a-register-element":130,"./core/component":131,"./core/geometry":132,"./core/scene/a-scene":134,"./core/scene/scenes":138,"./core/schema":140,"./core/shader":141,"./core/system":142,"./extras/components/":143,"./extras/primitives/":146,"./extras/primitives/getMeshMixin":145,"./extras/primitives/primitives":147,"./geometries/index":168,"./lib/three":179,"./shaders/index":181,"./style/aframe.css":186,"./style/rStats.css":187,"./systems/index":191,"./utils/":205,"./utils/isIOSOlderThan10":208,"custom-event-polyfill":7,present:48,"promise-polyfill":50,"super-animejs":56,"webvr-polyfill":68}],178:[function(e,t,n){window.aframeStats=function(e){var t=null,n=e;return{update:function(){t("te").set(function(){var e=n.querySelectorAll("*");return Array.prototype.slice.call(e).filter((function(e){return e.isEntity})),e.length}()),window.performance.getEntriesByName&&t("lt").set(window.performance.getEntriesByName("render-started")[0].startTime.toFixed(0))},start:function(){},end:function(){},attach:function(e){t=e},values:{te:{caption:"Entities"},lt:{caption:"Load Time"}},groups:[{caption:"A-Frame",values:["te","lt"]}],fractions:[]}},"object"===typeof t&&(t.exports={aframeStats:window.aframeStats})},{}],179:[function(e,t,r){(function(n){var r=n.THREE=e("super-three");r.TextureLoader&&(r.TextureLoader.prototype.crossOrigin="anonymous"),r.ImageLoader&&(r.ImageLoader.prototype.crossOrigin="anonymous"),r.Cache&&(r.Cache.enabled=!0),e("../../vendor/DeviceOrientationControls"),e("super-three/examples/js/loaders/DRACOLoader"),e("super-three/examples/js/loaders/GLTFLoader"),e("super-three/examples/js/loaders/OBJLoader"),e("super-three/examples/js/loaders/MTLLoader"),e("super-three/examples/js/utils/BufferGeometryUtils"),r.DRACOLoader.prototype.crossOrigin="anonymous",r.GLTFLoader.prototype.crossOrigin="anonymous",r.MTLLoader.prototype.crossOrigin="anonymous",r.OBJLoader.prototype.crossOrigin="anonymous",t.exports=r}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../vendor/DeviceOrientationControls":215,"super-three":57,"super-three/examples/js/loaders/DRACOLoader":58,"super-three/examples/js/loaders/GLTFLoader":59,"super-three/examples/js/loaders/MTLLoader":60,"super-three/examples/js/loaders/OBJLoader":61,"super-three/examples/js/utils/BufferGeometryUtils":62}],180:[function(e,t,n){var r=e("../core/shader").registerShader,i=e("../lib/three"),o=e("../utils/");function a(e,t){return t.color.set(e.color),t.fog=e.fog,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,t}t.exports.Shader=r("flat",{schema:{color:{type:"color"},fog:{default:!0},height:{default:256},offset:{type:"vec2",default:{x:0,y:0}},repeat:{type:"vec2",default:{x:1,y:1}},src:{type:"map"},width:{default:512},wireframe:{default:!1},wireframeLinewidth:{default:2}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new i.Color},this.textureSrc=null,a(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.material=new i.MeshBasicMaterial(this.materialData),o.material.updateMap(this,e)},update:function(e){this.updateMaterial(e),o.material.updateMap(this,e)},updateMaterial:function(e){var t;for(t in a(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.materialData)this.material[t]=this.materialData[t]}})},{"../core/shader":141,"../lib/three":179,"../utils/":205}],181:[function(e,t,n){e("./flat"),e("./standard"),e("./sdf"),e("./msdf"),e("./ios10hls")},{"./flat":180,"./ios10hls":182,"./msdf":183,"./sdf":184,"./standard":185}],182:[function(e,t,n){var r=e("../core/shader").registerShader;t.exports.Shader=r("ios10hls",{schema:{src:{type:"map",is:"uniform"},opacity:{type:"number",is:"uniform",default:1}},vertexShader:["varying vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),fragmentShader:["uniform sampler2D src;","uniform float opacity;","varying vec2 vUV;","void main() {"," vec2 offset = vec2(0, 0);"," vec2 repeat = vec2(1, 1);"," vec4 color = texture2D(src, vec2(vUV.x / repeat.x + offset.x, (1.0 - vUV.y) / repeat.y + offset.y)).bgra;"," gl_FragColor = vec4(color.rgb, opacity);","}"].join("\n")})},{"../core/shader":141}],183:[function(e,t,n){var r=e("../core/shader").registerShader,i=!!document.createElement("canvas").getContext("webgl2"),o=["attribute vec2 uv;","attribute vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","varying vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),a=["#version 300 es","in vec2 uv;","in vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","out vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),s=i?a:o,l=["#ifdef GL_OES_standard_derivatives","#extension GL_OES_standard_derivatives: enable","#endif","precision highp float;","uniform bool negate;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","varying vec2 vUV;","float median(float r, float g, float b) {"," return max(min(r, g), min(max(r, g), b));","}","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","void main() {"," vec3 sampleColor = texture2D(map, vUV).rgb;"," if (negate) { sampleColor = 1.0 - sampleColor; }"," float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;"," float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," // Do modified alpha test."," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);"," }"," // Do modified alpha test."," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," gl_FragColor = vec4(color.xyz, alpha * opacity);","}"].join("\n"),c=["#version 300 es","precision highp float;","uniform bool negate;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","in vec2 vUV;","out vec4 fragColor;","float median(float r, float g, float b) {"," return max(min(r, g), min(max(r, g), b));","}","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","void main() {"," vec3 sampleColor = texture(map, vUV).rgb;"," if (negate) { sampleColor = 1.0 - sampleColor; }"," float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;"," float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," // Do modified alpha test."," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);"," }"," // Do modified alpha test."," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," fragColor = vec4(color.xyz, alpha * opacity);","}"].join("\n"),u=i?c:l;t.exports.Shader=r("msdf",{schema:{alphaTest:{type:"number",is:"uniform",default:.5},color:{type:"color",is:"uniform",default:"white"},map:{type:"map",is:"uniform"},negate:{type:"boolean",is:"uniform",default:!0},opacity:{type:"number",is:"uniform",default:1}},raw:!0,vertexShader:s,fragmentShader:u})},{"../core/shader":141}],184:[function(e,t,n){var r=e("../core/shader").registerShader;t.exports.Shader=r("sdf",{schema:{alphaTest:{type:"number",is:"uniform",default:.5},color:{type:"color",is:"uniform",default:"white"},map:{type:"map",is:"uniform"},opacity:{type:"number",is:"uniform",default:1}},raw:!0,vertexShader:["#version 300 es","in vec2 uv;","in vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","out vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),fragmentShader:["#version 300 es","precision highp float;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","in vec2 vUV;","out vec4 fragColor;","#ifdef GL_OES_standard_derivatives"," float contour(float width, float value) {"," return smoothstep(0.5 - value, 0.5 + value, width);"," }","#else"," float aastep(float value, float afwidth) {"," return smoothstep(0.5 - afwidth, 0.5 + afwidth, value);"," }","#endif","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","#define ALL_SMOOTH 0.4","#define ALL_ROUGH 0.02","#define DISCARD_ALPHA (alphaTest / (2.2 - 1.2 * ratio))","void main() {"," #ifdef GL_OES_standard_derivatives"," vec2 uv = vUV;"," vec4 texColor = texture(map, uv);"," float dist = texColor.a;"," float width = fwidth(dist);"," float alpha = contour(dist, width);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(uv) + dFdy(uv));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * dist;"," }"," if (isBigEnough <= BIG_ENOUGH) {"," vec4 box = vec4 (uv - duv, uv + duv);"," alpha = (alpha + 0.5 * ("," contour(texture(map, box.xy).a, width)"," + contour(texture(map, box.zw).a, width)"," + contour(texture(map, box.xw).a, width)"," + contour(texture(map, box.zy).a, width)"," )) / 3.0;"," }"," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," #else"," vec4 texColor = texture(map, vUV);"," float value = texColor.a;"," float afwidth = (1.0 / 32.0) * (1.4142135623730951 / (2.0 * gl_FragCoord.w));"," float alpha = aastep(value, afwidth);"," float ratio = (gl_FragCoord.w >= ALL_SMOOTH) ? 1.0 : (gl_FragCoord.w < ALL_ROUGH) ? 0.0 : (gl_FragCoord.w - ALL_ROUGH) / (ALL_SMOOTH - ALL_ROUGH);"," if (alpha < alphaTest) { if (ratio >= 1.0) { discard; return; } alpha = 0.0; }"," alpha = alpha * ratio + (1.0 - ratio) * value;"," if (ratio < 1.0 && alpha <= DISCARD_ALPHA) { discard; return; }"," #endif"," fragColor = vec4(color, opacity * alpha);","}"].join("\n")})},{"../core/shader":141}],185:[function(e,t,n){var r=e("../core/shader").registerShader,i=e("../lib/three"),o=e("../utils/"),a=new i.CubeTextureLoader,s={};function l(e,t){return t.color.set(e.color),t.emissive.set(e.emissive),t.emissiveIntensity=e.emissiveIntensity,t.fog=e.fog,t.metalness=e.metalness,t.roughness=e.roughness,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,e.normalMap&&(t.normalScale=e.normalScale),e.ambientOcclusionMap&&(t.aoMapIntensity=e.ambientOcclusionMapIntensity),e.displacementMap&&(t.displacementScale=e.displacementScale,t.displacementBias=e.displacementBias),t}t.exports.Shader=r("standard",{schema:{ambientOcclusionMap:{type:"map"},ambientOcclusionMapIntensity:{default:1},ambientOcclusionTextureOffset:{type:"vec2"},ambientOcclusionTextureRepeat:{type:"vec2",default:{x:1,y:1}},color:{type:"color"},displacementMap:{type:"map"},displacementScale:{default:1},displacementBias:{default:.5},displacementTextureOffset:{type:"vec2"},displacementTextureRepeat:{type:"vec2",default:{x:1,y:1}},emissive:{type:"color",default:"#000"},emissiveIntensity:{default:1},envMap:{default:""},fog:{default:!0},height:{default:256},metalness:{default:0,min:0,max:1},metalnessMap:{type:"map"},metalnessTextureOffset:{type:"vec2"},metalnessTextureRepeat:{type:"vec2",default:{x:1,y:1}},normalMap:{type:"map"},normalScale:{type:"vec2",default:{x:1,y:1}},normalTextureOffset:{type:"vec2"},normalTextureRepeat:{type:"vec2",default:{x:1,y:1}},offset:{type:"vec2",default:{x:0,y:0}},repeat:{type:"vec2",default:{x:1,y:1}},roughness:{default:.5,min:0,max:1},roughnessMap:{type:"map"},roughnessTextureOffset:{type:"vec2"},roughnessTextureRepeat:{type:"vec2",default:{x:1,y:1}},sphericalEnvMap:{type:"map"},src:{type:"map"},width:{default:512},wireframe:{default:!1},wireframeLinewidth:{default:2}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new i.Color,emissive:new i.Color},l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.rendererSystem.applyColorCorrection(this.materialData.emissive),this.material=new i.MeshStandardMaterial(this.materialData),o.material.updateMap(this,e),e.normalMap&&o.material.updateDistortionMap("normal",this,e),e.displacementMap&&o.material.updateDistortionMap("displacement",this,e),e.ambientOcclusionMap&&o.material.updateDistortionMap("ambientOcclusion",this,e),e.metalnessMap&&o.material.updateDistortionMap("metalness",this,e),e.roughnessMap&&o.material.updateDistortionMap("roughness",this,e),this.updateEnvMap(e)},update:function(e){this.updateMaterial(e),o.material.updateMap(this,e),e.normalMap&&o.material.updateDistortionMap("normal",this,e),e.displacementMap&&o.material.updateDistortionMap("displacement",this,e),e.ambientOcclusionMap&&o.material.updateDistortionMap("ambientOcclusion",this,e),e.metalnessMap&&o.material.updateDistortionMap("metalness",this,e),e.roughnessMap&&o.material.updateDistortionMap("roughness",this,e),this.updateEnvMap(e)},updateMaterial:function(e){var t,n=this.material;for(t in l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.rendererSystem.applyColorCorrection(this.materialData.emissive),this.materialData)n[t]=this.materialData[t]},updateEnvMap:function(e){var t=this,n=this.material,r=e.envMap,l=e.sphericalEnvMap;if(!r&&!l||this.isLoadingEnvMap)return n.envMap=null,void(n.needsUpdate=!0);this.isLoadingEnvMap=!0,l?this.el.sceneEl.systems.material.loadTexture(l,{src:l},(function(e){t.isLoadingEnvMap=!1,e.mapping=i.SphericalReflectionMapping,n.envMap=e,o.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):s[r]?s[r].then((function(e){t.isLoadingEnvMap=!1,n.envMap=e,o.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):s[r]=new Promise((function(e){o.srcLoader.validateCubemapSrc(r,(function(r){a.load(r,(function(r){t.isLoadingEnvMap=!1,n.envMap=r,o.material.handleTextureEvents(t.el,r),e(r)}))}))}))}})},{"../core/shader":141,"../lib/three":179,"../utils/":205}],186:[function(e,t,n){var r="html.a-fullscreen{bottom:0;left:0;position:fixed;right:0;top:0}html.a-fullscreen body{height:100%;margin:0;overflow:hidden;padding:0;width:100%}html.a-fullscreen .a-canvas{width:100%!important;height:100%!important;top:0!important;left:0!important;right:0!important;bottom:0!important;position:fixed!important}html:not(.a-fullscreen) .a-enter-ar,html:not(.a-fullscreen) .a-enter-vr{right:5px;bottom:5px}:-webkit-full-screen{background-color:transparent}.a-hidden{display:none!important}.a-canvas{height:100%;left:0;position:absolute;top:0;width:100%}.a-canvas.a-grab-cursor:hover{cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}canvas.a-canvas.a-mouse-cursor-hover:hover{cursor:pointer}.a-inspector-loader{background-color:#ed3160;position:fixed;left:3px;top:3px;padding:6px 10px;color:#fff;text-decoration:none;font-size:12px;font-family:Roboto,sans-serif;text-align:center;z-index:99999;width:204px}@keyframes dots-1{from{opacity:0}25%{opacity:1}}@keyframes dots-2{from{opacity:0}50%{opacity:1}}@keyframes dots-3{from{opacity:0}75%{opacity:1}}@-webkit-keyframes dots-1{from{opacity:0}25%{opacity:1}}@-webkit-keyframes dots-2{from{opacity:0}50%{opacity:1}}@-webkit-keyframes dots-3{from{opacity:0}75%{opacity:1}}.a-inspector-loader .dots span{animation:dots-1 2s infinite steps(1);-webkit-animation:dots-1 2s infinite steps(1)}.a-inspector-loader .dots span:first-child+span{animation-name:dots-2;-webkit-animation-name:dots-2}.a-inspector-loader .dots span:first-child+span+span{animation-name:dots-3;-webkit-animation-name:dots-3}a-scene{display:block;position:relative;height:100%;width:100%}a-assets,a-scene audio,a-scene img,a-scene video{display:none}.a-enter-vr-modal,.a-orientation-modal{font-family:Consolas,Andale Mono,Courier New,monospace}.a-enter-vr-modal a{border-bottom:1px solid #fff;padding:2px 0;text-decoration:none;transition:.1s color ease-in}.a-enter-vr-modal a:hover{background-color:#fff;color:#111;padding:2px 4px;position:relative;left:-4px}.a-enter-ar,.a-enter-vr{font-family:sans-serif,monospace;font-size:13px;width:100%;font-weight:200;line-height:16px;position:absolute;right:20px;bottom:20px}.a-enter-ar{right:80px}.a-enter-vr-button,.a-enter-vr-modal,.a-enter-vr-modal a{color:#fff;user-select:none;outline:0}.a-enter-vr-button{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z' fill='%23fff'/%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z' fill='%23fff'/%3E%3C/svg%3E\") 50% 50% no-repeat rgba(0,0,0,.35)}.a-enter-ar-button{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z' fill='%23fff'/%3E%3Cpath d='M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z' fill='%23fff'/%3E%3Cpath d='M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z' fill='%23fff'/%3E%3C/svg%3E\") 50% 50% no-repeat rgba(0,0,0,.2)}.a-enter-ar-button,.a-enter-vr-button{background-size:90% 90%;border:0;bottom:0;cursor:pointer;min-width:58px;min-height:34px;padding-right:0;padding-top:0;position:absolute;right:0;transition:background-color .05s ease;-webkit-transition:background-color .05s ease;z-index:9999;border-radius:8px;touch-action:manipulation}.a-enter-ar-button{background-size:100% 90%;margin-right:10px;border-radius:7px}.a-enter-ar-button:active,.a-enter-ar-button:hover,.a-enter-vr-button:active,.a-enter-vr-button:hover{background-color:#ef2d5e}.a-enter-vr-button.resethover{background-color:rgba(0,0,0,.35)}[data-a-enter-vr-no-webvr] .a-enter-vr-button{border-color:#666;opacity:.65}[data-a-enter-vr-no-webvr] .a-enter-vr-button:active,[data-a-enter-vr-no-webvr] .a-enter-vr-button:hover{background-color:rgba(0,0,0,.35);cursor:not-allowed}.a-enter-vr-modal{background-color:#666;border-radius:0;display:none;min-height:32px;margin-right:70px;padding:9px;width:280px;right:2%;position:absolute}.a-enter-vr-modal:after{border-bottom:10px solid transparent;border-left:10px solid #666;border-top:10px solid transparent;display:inline-block;content:'';position:absolute;right:-5px;top:5px;width:0;height:0}.a-enter-vr-modal a,.a-enter-vr-modal p{display:inline}.a-enter-vr-modal p{margin:0}.a-enter-vr-modal p:after{content:' '}[data-a-enter-vr-no-headset].a-enter-vr:hover .a-enter-vr-modal,[data-a-enter-vr-no-webvr].a-enter-vr:hover .a-enter-vr-modal{display:block}.a-orientation-modal{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E) center/50% 50% no-repeat rgba(244,244,244,1);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-orientation-modal:after{color:#666;content:\"Insert phone into Cardboard holder.\";display:block;position:absolute;text-align:center;top:70%;transform:translateY(-70%);width:100%}.a-orientation-modal button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E) no-repeat;border:none;height:50px;text-indent:-9999px;width:50px}.a-loader-title{background-color:rgba(0,0,0,.6);font-family:sans-serif,monospace;text-align:center;font-size:20px;height:50px;font-weight:300;line-height:50px;position:absolute;right:0;left:0;top:0;color:#fff}.a-modal{background:0 0/50% 50% rgba(0,0,0,.6);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-dialog{position:relative;left:50%;top:50%;transform:translate(-50%,-50%);z-index:199995;width:300px;height:200px;background-size:contain;background-color:#fff;font-family:sans-serif,monospace;font-size:20px;border-radius:3px;padding:6px}.a-dialog-text-container{width:100%;height:70%;align-self:flex-start;display:flex;justify-content:center;align-content:center;flex-direction:column}.a-dialog-text{display:inline-block;font-weight:400;font-size:14pt;margin:8px}.a-dialog-buttons-container{display:inline-flex;align-self:flex-end;width:100%;height:30%}.a-dialog-button{cursor:pointer;align-self:center;opacity:.9;height:80%;width:50%;font-size:12pt;margin:4px;border-radius:2px;text-align:center;border:none;display:inline-block;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);user-select:none}.a-dialog-permission-button:hover{box-shadow:0 7px 14px rgba(0,0,0,.2),0 2px 2px rgba(0,0,0,.2)}.a-dialog-allow-button{background-color:#00ceff}.a-dialog-deny-button{background-color:#ff005b}.a-dialog-ok-button{background-color:#00ceff;width:100%}";e("browserify-css").createStyle(r,{href:"src/style/aframe.css"}),t.exports=r},{"browserify-css":4}],187:[function(e,t,n){var r=".rs-base{background-color:#333;color:#fafafa;border-radius:0;font:10px monospace;left:5px;line-height:1em;opacity:.85;overflow:hidden;padding:10px;position:fixed;top:5px;width:300px;z-index:10000}.rs-base div.hidden{display:none}.rs-base h1{color:#fff;cursor:pointer;font-size:1.4em;font-weight:300;margin:0 0 5px;padding:0}.rs-group{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;margin-bottom:5px}.rs-group:last-child{margin-bottom:0}.rs-counter-base{align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;height:10px;-webkit-justify-content:space-between;justify-content:space-between;margin:2px 0}.rs-counter-base.alarm{color:#b70000;text-shadow:0 0 0 #b70000,0 0 1px #fff,0 0 1px #fff,0 0 2px #fff,0 0 2px #fff,0 0 3px #fff,0 0 3px #fff,0 0 4px #fff,0 0 4px #fff}.rs-counter-id{font-weight:300;-webkit-box-ordinal-group:0;-webkit-order:0;order:0;width:54px}.rs-counter-value{font-weight:300;-webkit-box-ordinal-group:1;-webkit-order:1;order:1;text-align:right;width:35px}.rs-canvas{-webkit-box-ordinal-group:2;-webkit-order:2;order:2}@media (min-width:480px){.rs-base{left:20px;top:20px}}";e("browserify-css").createStyle(r,{href:"src/style/rStats.css"}),t.exports=r},{"browserify-css":4}],188:[function(e,t,n){var r=e("../constants/"),i=e("../core/system").registerSystem;t.exports.System=i("camera",{init:function(){this.activeCameraEl=null,this.render=this.render.bind(this),this.unwrapRender=this.unwrapRender.bind(this),this.wrapRender=this.wrapRender.bind(this),this.initialCameraFound=!1,this.numUserCameras=0,this.numUserCamerasChecked=0,this.setupInitialCamera()},setupInitialCamera:function(){var e,t,n=this.sceneEl,r=this;if(!n.camera||n.camera.el.getAttribute("camera").spectator)if((e=n.querySelectorAll("a-camera, [camera]")).length)for(this.numUserCameras=e.length,t=0;t<e.length;t++)e[t].addEventListener("object3dset",(function(e){"camera"===e.detail.type&&r.checkUserCamera(this)})),e[t].isNode?e[t].load():e[t].addEventListener("nodeready",(function(){this.load()}));else this.createDefaultCamera();else n.emit("cameraready",{cameraEl:n.camera.el})},checkUserCamera:function(e){var t,n=this.el.sceneEl;this.numUserCamerasChecked++,this.initialCameraFound||((t=e.getAttribute("camera")).active&&!t.spectator?(this.initialCameraFound=!0,n.camera=e.getObject3D("camera"),n.emit("cameraready",{cameraEl:e})):this.numUserCamerasChecked===this.numUserCameras&&this.createDefaultCamera())},createDefaultCamera:function(){var e,t=this.sceneEl;(e=document.createElement("a-entity")).setAttribute("camera",{active:!0}),e.setAttribute("position",{x:0,y:r.DEFAULT_CAMERA_HEIGHT,z:0}),e.setAttribute("wasd-controls",""),e.setAttribute("look-controls",""),e.setAttribute(r.AFRAME_INJECTED,""),e.addEventListener("object3dset",(function(n){"camera"===n.detail.type&&(t.camera=n.detail.object,t.emit("cameraready",{cameraEl:e}))})),t.appendChild(e)},disableActiveCamera:function(){var e;(e=this.sceneEl.querySelectorAll("[camera]"))[e.length-1].setAttribute("camera","active",!0)},setActiveCamera:function(e){var t,n,r,i,o=this.activeCameraEl,a=this.sceneEl;if((i=e.getObject3D("camera"))&&e!==this.activeCameraEl){var s=a.querySelector("[data-aframe-default-camera]");for(e!==(s&&s.querySelector("[camera]"))&&function(e){var t;e.camera&&(t=e.querySelector("[data-aframe-default-camera]"))&&e.removeChild(t)}(a),this.activeCameraEl=e,this.activeCameraEl.play(),a.camera=i,o&&o.setAttribute("camera","active",!1),n=a.querySelectorAll("[camera]"),r=0;r<n.length;r++)(t=n[r]).isEntity&&e!==t&&(t.setAttribute("camera","active",!1),t.pause());a.emit("camera-set-active",{cameraEl:e})}},setSpectatorCamera:function(e){var t,n=this.spectatorCameraEl,r=this.sceneEl;e.getObject3D("camera")&&e!==this.spectatorCameraEl&&(n&&n.setAttribute("camera","spectator",!1),t=this.spectatorCameraEl=e,r.addEventListener("enter-vr",this.wrapRender),r.addEventListener("exit-vr",this.unwrapRender),t.setAttribute("camera","active",!1),t.play(),r.emit("camera-set-spectator",{cameraEl:e}))},disableSpectatorCamera:function(){this.spectatorCameraEl=void 0},wrapRender:function(){this.spectatorCameraEl&&!this.originalRender&&(this.originalRender=this.sceneEl.renderer.render,this.sceneEl.renderer.render=this.render)},unwrapRender:function(){this.originalRender&&(this.sceneEl.renderer.render=this.originalRender,this.originalRender=void 0)},render:function(e,t){var n,r,i=this.sceneEl;n=i.renderer.xr.enabled,this.originalRender.call(i.renderer,e,t),this.spectatorCameraEl&&!i.isMobile&&n&&(r=this.spectatorCameraEl.components.camera.camera,i.renderer.xr.enabled=!1,this.originalRender.call(i.renderer,e,r),i.renderer.xr.enabled=n)}})},{"../constants/":123,"../core/system":142}],189:[function(e,t,n){var r=e("../core/geometry").geometries,i=e("../core/system").registerSystem;function o(e){var t=e.primitive,n=r[t]&&r[t].Geometry,i=new n;if(!n)throw new Error("Unknown geometry `"+t+"`");return i.init(e),i.geometry}t.exports.System=i("geometry",{init:function(){this.cache={},this.cacheCount={}},clearCache:function(){this.cache={},this.cacheCount={}},getOrCreateGeometry:function(e){var t,n,r=this.cache;return e.skipCache?o(e):(t=r[n=this.hash(e)],function(e,t){e[t]=void 0===e[t]?1:e[t]+1}(this.cacheCount,n),t||(t=o(e),r[n]=t,t))},unuseGeometry:function(e){var t,n=this.cache,r=this.cacheCount;e.skipCache||n[t=this.hash(e)]&&(function(e,t){e[t]--}(r,t),r[t]>0||(n[t].dispose(),delete n[t],delete r[t]))},hash:function(e){return JSON.stringify(e)}})},{"../core/geometry":132,"../core/system":142}],190:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three");t.exports.System=r("gltf-model",{schema:{dracoDecoderPath:{default:""}},init:function(){var e=this.data.dracoDecoderPath;this.dracoLoader=new i.DRACOLoader,this.dracoLoader.setDecoderPath(e)},update:function(){var e;this.dracoLoader||(e=this.data.dracoDecoderPath,this.dracoLoader=new i.DRACOLoader,this.dracoLoader.setDecoderPath(e))},getDRACOLoader:function(){return this.dracoLoader}})},{"../core/system":142,"../lib/three":179}],191:[function(e,t,n){e("./camera"),e("./geometry"),e("./gltf-model"),e("./light"),e("./material"),e("./renderer"),e("./shadow"),e("./tracked-controls-webvr"),e("./tracked-controls-webxr"),e("./webxr")},{"./camera":188,"./geometry":189,"./gltf-model":190,"./light":192,"./material":193,"./renderer":194,"./shadow":195,"./tracked-controls-webvr":196,"./tracked-controls-webxr":197,"./webxr":198}],192:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/bind"),o=e("../constants/");t.exports.System=r("light",{schema:{defaultLightsEnabled:{default:!0}},init:function(){this.defaultLights=!1,this.userDefinedLights=!1,this.sceneEl.addEventListener("loaded",i(this.setupDefaultLights,this))},registerLight:function(e){e.hasAttribute("data-aframe-default-light")||(this.removeDefaultLights(),this.userDefinedLights=!0)},removeDefaultLights:function(){var e,t=this.sceneEl;if(this.defaultLights){e=document.querySelectorAll("[data-aframe-default-light]");for(var n=0;n<e.length;n++)t.removeChild(e[n]);this.defaultLights=!1}},setupDefaultLights:function(){var e,t,n=this.sceneEl;this.userDefinedLights||this.defaultLights||!this.data.defaultLightsEnabled||((e=document.createElement("a-entity")).setAttribute("light",{color:"#BBB",type:"ambient"}),e.setAttribute("data-aframe-default-light",""),e.setAttribute(o.AFRAME_INJECTED,""),n.appendChild(e),(t=document.createElement("a-entity")).setAttribute("light",{color:"#FFF",intensity:.6,castShadow:!0}),t.setAttribute("position",{x:-.5,y:1,z:1}),t.setAttribute("data-aframe-default-light",""),t.setAttribute(o.AFRAME_INJECTED,""),n.appendChild(t),this.defaultLights=!0)}})},{"../constants/":123,"../core/system":142,"../utils/bind":199}],193:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three"),o=e("../utils/"),a=e("../utils/material").isHLS,s=o.bind,l=o.debug,c=l("components:texture:error"),u=new i.TextureLoader,h=l("components:texture:warn");function d(e,t){var n=t.offset||{x:0,y:0},r=t.repeat||{x:1,y:1};!!t.npot&&(e.wrapS=i.ClampToEdgeWrapping,e.wrapT=i.ClampToEdgeWrapping,e.magFilter=i.LinearFilter,e.minFilter=i.LinearFilter),1===r.x&&1===r.y||(e.wrapS=i.RepeatWrapping,e.wrapT=i.RepeatWrapping,e.repeat.set(r.x,r.y)),0===n.x&&0===n.y||e.offset.set(n.x,n.y)}u.setCrossOrigin("anonymous"),t.exports.System=r("material",{init:function(){this.materials={},this.textureCounts={},this.textureCache={},this.sceneEl.addEventListener("materialtextureloaded",s(this.onMaterialTextureLoaded,this))},clearTextureCache:function(){this.textureCache={}},loadTexture:function(e,t,n){var r=this;if("CANVAS"!==e.tagName){if("VIDEO"===e.tagName)return e.src||e.srcObject||e.childElementCount||h("Video element was defined with neither `source` elements nor `src` / `srcObject` attributes."),void this.loadVideo(e,t,n);o.srcLoader.validateSrc(e,(function(e){r.loadImage(e,t,n)}),(function(e){r.loadVideo(e,t,n)}))}else this.loadCanvas(e,t,n)},loadImage:function(e,t,n){var r=this.hash(t),o=this.textureCache;o[r]||(o[r]=function(e,t){return new Promise((function(n,r){function o(e){d(e,t),e.needsUpdate=!0,n(e)}"string"===typeof e?u.load(e,o,(function(){}),(function(e){c("`$s` could not be fetched (Error code: %s; Response: %s)",e.status,e.statusText)})):o(new i.Texture(e))}))}(e,t)),o[r].then(n)},loadCanvas:function(e,t,n){var r;d(r=new i.CanvasTexture(e),t),n(r)},loadVideo:function(e,t,n){var r,o,s,l,c=this.textureCache;function u(e){e.texture.needsUpdate=!0,n(e.texture,e.videoEl)}if("string"!==typeof e){if(s=e,c[r=this.hashVideo(t,s)])return void c[r].then(u);!function(e){e.autoplay=e.hasAttribute("autoplay")&&"false"!==e.getAttribute("autoplay"),e.controls=e.hasAttribute("controls")&&"false"!==e.getAttribute("controls"),"false"===e.getAttribute("loop")&&e.removeAttribute("loop"),"false"===e.getAttribute("preload")&&(e.preload="none"),e.crossOrigin=e.crossOrigin||"anonymous",e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline","")}(s)}s=s||function(e,t,n){var r=document.createElement("video");return r.width=t,r.height=n,r.setAttribute("playsinline",""),r.setAttribute("webkit-playsinline",""),r.autoplay=!0,r.loop=!0,r.crossOrigin="anonymous",r.addEventListener("error",(function(){h("`$s` is not a valid video",e)}),!0),r.src=e,r}(e,t.width,t.height),c[r=this.hashVideo(t,s)]?c[r].then(u):((o=new i.VideoTexture(s)).minFilter=i.LinearFilter,d(o,t),this.sceneEl.isIOS&&a(s.src||s.getAttribute("src"),s.type||s.getAttribute("type"))&&(o.format=i.RGBAFormat,o.needsCorrectionBGRA=!0,o.flipY=!1,o.needsCorrectionFlipY=!0),l={texture:o,videoEl:s},c[r]=Promise.resolve(l),u(l))},hash:function(e){return e.src.tagName&&((e=o.extendDeep({},e)).src=e.src.src),JSON.stringify(e)},hashVideo:function(e,t){return function(e,t){var n,r,i,o=t.getAttribute("id");if(o)return o;for(r="",i=e||{},n=0;n<t.attributes.length;n++)i[t.attributes[n].name]=t.attributes[n].value;return Object.keys(i).sort().forEach((function(e){r+=e+":"+i[e]+";"})),r}(e,t)},registerMaterial:function(e){this.materials[e.uuid]=e},unregisterMaterial:function(e){delete this.materials[e.uuid];var t=this.textureCounts;Object.keys(e).filter((function(t){return e[t]&&e[t].isTexture})).forEach((function(n){t[e[n].uuid]--,t[e[n].uuid]<=0&&e[n].dispose()}))},updateMaterials:function(e){var t=this.materials;Object.keys(t).forEach((function(e){t[e].needsUpdate=!0}))},onMaterialTextureLoaded:function(e){this.textureCounts[e.detail.texture.uuid]||(this.textureCounts[e.detail.texture.uuid]=0),this.textureCounts[e.detail.texture.uuid]++}})},{"../core/system":142,"../lib/three":179,"../utils/":205,"../utils/material":209}],194:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/"),o=e("../lib/three"),a=(0,i.debug)("components:renderer:warn");t.exports.System=r("renderer",{schema:{antialias:{default:"auto",oneOf:["true","false","auto"]},highRefreshRate:{default:i.device.isOculusBrowser()},logarithmicDepthBuffer:{default:"auto",oneOf:["true","false","auto"]},maxCanvasWidth:{default:1920},maxCanvasHeight:{default:1920},physicallyCorrectLights:{default:!1},precision:{default:"high",oneOf:["high","medium","low"]},sortObjects:{default:!1},colorManagement:{default:!1},gammaOutput:{default:!1},alpha:{default:!0},foveationLevel:{default:0}},init:function(){var e=this.data,t=this.el,n=t.renderer;n.sortObjects=e.sortObjects,n.physicallyCorrectLights=e.physicallyCorrectLights,(e.colorManagement||e.gammaOutput)&&(n.outputEncoding=o.sRGBEncoding,e.gammaOutput&&a('Property `gammaOutput` is deprecated. Use `renderer="colorManagement: true;"` instead.')),t.hasAttribute("antialias")&&a('Component `antialias` is deprecated. Use `renderer="antialias: true"` instead.'),t.hasAttribute("logarithmicDepthBuffer")&&a('Component `logarithmicDepthBuffer` is deprecated. Use `renderer="logarithmicDepthBuffer: true"` instead.')},applyColorCorrection:function(e){this.data.colorManagement&&e&&(e.isColor?e.convertSRGBToLinear():e.isTexture&&(e.encoding=o.sRGBEncoding))}})},{"../core/system":142,"../lib/three":179,"../utils/":205}],195:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three"),o={basic:i.BasicShadowMap,pcf:i.PCFShadowMap,pcfsoft:i.PCFSoftShadowMap};t.exports.System=r("shadow",{schema:{enabled:{default:!0},autoUpdate:{default:!0},type:{default:"pcf",oneOf:["basic","pcf","pcfsoft"]}},init:function(){var e=this.sceneEl,t=this.data;this.shadowMapEnabled=!1,e.renderer&&(e.renderer.shadowMap.type=o[t.type],e.renderer.shadowMap.autoUpdate=t.autoUpdate,this.setShadowMapEnabled(this.shadowMapEnabled))},update:function(e){e.enabled!==this.data.enabled&&this.setShadowMapEnabled(this.data.enabled)},setShadowMapEnabled:function(e){var t=this.sceneEl.renderer;this.shadowMapEnabled=this.data.enabled&&e,t&&(t.shadowMap.enabled=this.shadowMapEnabled)}})},{"../core/system":142,"../lib/three":179}],196:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils"),o=i.device.isWebXRAvailable;t.exports.System=r("tracked-controls-webvr",{init:function(){var e=this;this.controllers=[],this.isChrome=-1!==navigator.userAgent.indexOf("Chrome"),this.updateControllerList(),this.throttledUpdateControllerList=i.throttle(this.updateControllerList,500,this),o||navigator.getVRDisplays&&this.sceneEl.addEventListener("enter-vr",(function(){navigator.getVRDisplays().then((function(t){t.length&&(e.vrDisplay=t[0])}))}))},tick:function(){this.isChrome?this.updateControllerList():this.throttledUpdateControllerList()},updateControllerList:function(){var e,t,n,r,i=this.controllers;if(t=navigator.getGamepads&&navigator.getGamepads()){for(r=i.length,i.length=0,n=0;n<t.length;++n)(e=t[n])&&e.pose&&i.push(e);i.length!==r&&this.el.emit("controllersupdated",void 0,!1)}}})},{"../core/system":142,"../utils":205}],197:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils");t.exports.System=r("tracked-controls-webxr",{init:function(){this.controllers=[],this.oldControllers=[],this.oldControllersLength=0,this.throttledUpdateControllerList=i.throttle(this.updateControllerList,500,this),this.updateReferenceSpace=this.updateReferenceSpace.bind(this),this.el.addEventListener("enter-vr",this.updateReferenceSpace),this.el.addEventListener("exit-vr",this.updateReferenceSpace)},tick:function(){this.throttledUpdateControllerList()},updateReferenceSpace:function(){var e=this,t=this.el.xrSession;if(!t)return this.referenceSpace=void 0,this.controllers=[],void(this.oldControllersLength>0&&(this.oldControllersLength=0,this.el.emit("controllersupdated",void 0,!1)));var n=e.el.sceneEl.systems.webxr.sessionReferenceSpaceType;t.requestReferenceSpace(n).then((function(t){e.referenceSpace=t})).catch((function(t){throw e.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(n,'tracked-controls-webxr uses reference space "'+n+'".'),t}))},updateControllerList:function(){var e,t=this.el.xrSession,n=this.oldControllers;if(!t){if(0===this.oldControllersLength)return;return this.oldControllersLength=0,this.controllers=[],void this.el.emit("controllersupdated",void 0,!1)}if(t.inputSources){if(this.controllers=t.inputSources,this.oldControllersLength===this.controllers.length){var r=!0;for(e=0;e<this.controllers.length;++e)if(this.controllers[e]!==n[e]||this.controllers[e].gamepad!==n[e].gamepad){r=!1;break}if(r)return}for(n.length=0,e=0;e<this.controllers.length;e++)n.push(this.controllers[e]);this.oldControllersLength=this.controllers.length,this.el.emit("controllersupdated",void 0,!1)}}})},{"../core/system":142,"../utils":205}],198:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/").debug("systems:webxr:warn");t.exports.System=r("webxr",{schema:{referenceSpaceType:{type:"string",default:"local-floor"},requiredFeatures:{type:"array",default:["local-floor"]},optionalFeatures:{type:"array",default:["bounded-floor"]},overlayElement:{type:"selector"}},update:function(){var e=this.data;this.sessionConfiguration={requiredFeatures:e.requiredFeatures,optionalFeatures:e.optionalFeatures},this.sessionReferenceSpaceType=e.referenceSpaceType,e.overlayElement&&(this.warnIfFeatureNotRequested("dom-overlay"),this.sessionConfiguration.domOverlay={root:e.overlayElement})},wasFeatureRequested:function(e){return"viewer"===e||"local"===e||!(!this.sessionConfiguration.requiredFeatures.includes(e)&&!this.sessionConfiguration.optionalFeatures.includes(e))},warnIfFeatureNotRequested:function(e,t){this.wasFeatureRequested(e)||i((t?t+" ":"")+'Please add the feature "'+e+"\" to a-scene's webxr system options in requiredFeatures/optionalFeatures.")}})},{"../core/system":142,"../utils/":205}],199:[function(e,t,n){t.exports=function(e,t){return n=Array.prototype.slice.call(arguments,2),function(){var r=n.concat(Array.prototype.slice.call(arguments,0));return e.apply(t,r)};var n}},{}],200:[function(e,t,n){var r=e("./debug"),i=e("object-assign"),o=r("utils:coordinates:warn"),a=["x","y","z","w"],s=/^\s*((-?\d*\.{0,1}\d+(e-?\d+)?)\s+){2,3}(-?\d*\.{0,1}\d+(e-?\d+)?)\s*$/;t.exports.regex=s;var l=/\s+/g;function c(e){return s.test(e)}function u(e){return null!==e&&void 0!==e&&e.constructor===String?parseFloat(e,10):e}t.exports.parse=function(e,t){var n,r,o,s,c,h,d,f,p;if(e&&e instanceof Object)return h=void 0===e.x?t&&t.x:e.x,d=void 0===e.y?t&&t.y:e.y,f=void 0===e.z?t&&t.z:e.z,p=void 0===e.w?t&&t.w:e.w,void 0!==h&&null!==h&&(e.x=u(h)),void 0!==d&&null!==d&&(e.y=u(d)),void 0!==f&&null!==f&&(e.z=u(f)),void 0!==p&&null!==p&&(e.w=u(p)),e;if(null===e||void 0===e)return"object"===typeof t?i({},t):t;for(n=e.trim().split(l),c={},s=0;s<a.length;s++)if(o=a[s],n[s])c[o]=parseFloat(n[s],10);else{if(void 0===(r=t&&t[o]))continue;c[o]=u(r)}return c},t.exports.stringify=function(e){var t;return"object"!==typeof e?e:(t=e.x+" "+e.y,null!=e.z&&(t+=" "+e.z),null!=e.w&&(t+=" "+e.w),t)},t.exports.isCoordinates=c,t.exports.isCoordinate=function(e){return o("`AFRAME.utils.isCoordinate` has been renamed to `AFRAME.utils.isCoordinates`"),c(e)},t.exports.toVector3=function(e){return new THREE.Vector3(e.x,e.y,e.z)}},{"./debug":201,"object-assign":39}],201:[function(t,n,r){(function(r){var i=t("debug"),o=t("object-assign"),a={colors:{debug:"gray",error:"red",info:"gray",warn:"orange"}},s=function(e){var t=i(e);return t.color=function(e){var t=function(e){var t=e.split(":");return t[t.length-1]}(e);return a.colors&&a.colors[t]||null}(e),t};o(s,i);var l=function(){try{return window.localStorage}catch(e){}}();l&&(parseInt(l.logs,10)||"true"===l.logs)?s.enable("*"):s.enable("*:error,*:info,*:warn"),r.browser&&(window.logs=s),n.exports=s}).call(this,t("_process"))},{_process:49,debug:8,"object-assign":39}],202:[function(e,t,n){(function(n){var r,i=e("debug")("device:error"),o=!1,a=!1,s=t.exports.isWebXRAvailable=!window.debug&&void 0!==navigator.xr;if(window.addEventListener("vrdisplayactivate",(function(e){var t;s||(t=document.createElement("canvas"),r=e.display,t.getContext("webgl",{}),r.requestPresent([{source:t}]).then((function(){}),(function(){})))})),s){var l=function(){var e=document.querySelector("a-scene");e?e.hasLoaded?e.components["vr-mode-ui"].updateEnterInterfaces():e.addEventListener("loaded",l):window.addEventListener("DOMContentLoaded",l)},c=function(e){i("WebXR session support error: "+e.message)};navigator.xr.isSessionSupported?(navigator.xr.isSessionSupported("immersive-vr").then((function(e){o=e,l()})).catch(c),navigator.xr.isSessionSupported("immersive-ar").then((function(e){a=e,l()})).catch((function(){}))):navigator.xr.supportsSession?(navigator.xr.supportsSession("immersive-vr").then((function(){o=!0,l()})).catch(c),navigator.xr.supportsSession("immersive-ar").then((function(){a=!0,l()})).catch((function(){}))):i("WebXR has neither isSessionSupported or supportsSession?!")}else navigator.getVRDisplays&&navigator.getVRDisplays().then((function(e){var t=document.querySelector("a-scene");r=e.length&&e[0],t&&t.emit("displayconnected",{vrDisplay:r})}));function u(){return r}t.exports.getVRDisplay=u,t.exports.checkHeadsetConnected=function(){return o||a||!!u()},t.exports.checkARSupport=function(){return a};var h=function(){var e,t=!1;return e=window.navigator.userAgent||window.navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),(f()||d()||v())&&(t=!0),g()&&(t=!1),function(){return t}}();function d(e){var t=e||window.navigator.userAgent;return/ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle/i.test(t)}function f(){return/iPad|iPhone|iPod/.test(window.navigator.platform)}function p(){return/(OculusBrowser)/i.test(window.navigator.userAgent)}function m(){return/(Mobile VR)/i.test(window.navigator.userAgent)}function g(){return p()||m()}function v(){return/R7 Build/.test(window.navigator.userAgent)}t.exports.isMobile=h,t.exports.isTablet=d,t.exports.isIOS=f,t.exports.isMobileDeviceRequestingDesktopSite=function(){return!h()&&!g()&&void 0!==window.orientation},t.exports.isOculusBrowser=p,t.exports.isFirefoxReality=m,t.exports.isMobileVR=g,t.exports.isR7=v,t.exports.isLandscape=function(){var e=window.orientation;return v()&&(e+=90),90===e||-90===e},t.exports.isBrowserEnvironment=!(n&&!n.browser),t.exports.isNodeEnvironment=!t.exports.isBrowserEnvironment}).call(this,e("_process"))},{_process:49,debug:8}],203:[function(e,t,n){var r={};function i(e,t){return r[t=t||"."]||(r[t]={}),-1!==e.indexOf(t)?r[t][e]=e.split(t):r[t][e]=e,r[t][e]}t.exports.getComponentPropertyPath=i,t.exports.propertyPathCache=r,t.exports.getComponentProperty=function(e,t,n){var r;return n=n||".",-1!==t.indexOf(n)?(r=i(t,n)).constructor===String?e.getAttribute(r):e.getAttribute(r[0])[r[1]]:e.getAttribute(t)},t.exports.setComponentProperty=function(e,t,n,r){var o;r=r||".",-1===t.indexOf(r)?e.setAttribute(t,n):(o=i(t,r)).constructor===String?e.setAttribute(o,n):e.setAttribute(o[0],o[1],n)}},{}],204:[function(e,t,n){t.exports=function(e){var t=e.style.width,n=e.style.height;e.style.width=parseInt(t,10)+1+"px",e.style.height=parseInt(n,10)+1+"px",setTimeout((function(){e.style.width=t,e.style.height=n}),200)}},{}],205:[function(e,t,n){var r=e("./debug"),i=e("deep-assign"),o=e("./device"),a=e("object-assign"),s=e("./object-pool"),l=r("utils:warn");t.exports.bind=e("./bind"),t.exports.coordinates=e("./coordinates"),t.exports.debug=r,t.exports.device=o,t.exports.entity=e("./entity"),t.exports.forceCanvasResizeSafariMobile=e("./forceCanvasResizeSafariMobile"),t.exports.isIE11=e("./is-ie11"),t.exports.material=e("./material"),t.exports.objectPool=s,t.exports.split=e("./split").split,t.exports.styleParser=e("./styleParser"),t.exports.trackedControls=e("./tracked-controls"),t.exports.checkHeadsetConnected=function(){return l("`utils.checkHeadsetConnected` has moved to `utils.device.checkHeadsetConnected`"),o.checkHeadsetConnected(arguments)},t.exports.isGearVR=t.exports.device.isGearVR=function(){l("`utils.isGearVR` has been deprecated, use `utils.device.isMobileVR`")},t.exports.isIOS=function(){return l("`utils.isIOS` has moved to `utils.device.isIOS`"),o.isIOS(arguments)},t.exports.isOculusGo=t.exports.device.isOculusGo=function(){l("`utils.isOculusGo` has been deprecated, use `utils.device.isMobileVR`")},t.exports.isMobile=function(){return l("`utils.isMobile has moved to `utils.device.isMobile`"),o.isMobile(arguments)},t.exports.throttle=function(e,n,r){var i;return r&&(e=t.exports.bind(e,r)),function(){var t=Date.now(),r="undefined"===typeof i?n:t-i;("undefined"===typeof i||r>=n)&&(i=t,e.apply(null,arguments))}},t.exports.throttleTick=function(e,n,r){var i;return r&&(e=t.exports.bind(e,r)),function(t,r){var o="undefined"===typeof i?r:t-i;("undefined"===typeof i||o>=n)&&(i=t,e(t,o))}},t.exports.debounce=function(e,t,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||e.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,t),s&&e.apply(i,o)}},t.exports.extend=a,t.exports.extendDeep=i,t.exports.clone=function(e){return JSON.parse(JSON.stringify(e))};var c=function(){var e=s.createPool((function(){return[]}));return function(t,n){var r,i,o,a,s,l;if(void 0===t||void 0===n||null===t||null===n||!(t&&n&&t.constructor===Object&&n.constructor===Object||t.constructor===Array&&n.constructor===Array))return t===n;for(r in i=e.use(),o=e.use(),i.length=0,o.length=0,t)i.push(r);for(r in n)o.push(r);if(i.length!==o.length)return e.recycle(i),e.recycle(o),!1;for(a=0;a<i.length;++a)if(s=t[i[a]],l=n[i[a]],"object"===typeof s||"object"===typeof l||Array.isArray(s)&&Array.isArray(l)){if(s===l)continue;if(!c(s,l))return e.recycle(i),e.recycle(o),!1}else if(s!==l)return e.recycle(i),e.recycle(o),!1;return e.recycle(i),e.recycle(o),!0}}();t.exports.deepEqual=c,t.exports.diff=function(){var e=[];return function(t,n,r){var i,o,a,s,l,u,h;for(l in s=r||{},e.length=0,t)e.push(l);if(!n)return s;for(a in n)-1===e.indexOf(a)&&e.push(a);for(u=0;u<e.length;u++)i=t[l=e[u]],o=n[l],((h=i&&o&&i.constructor===Object&&o.constructor===Object)&&!c(i,o)||!h&&i!==o)&&(s[l]=o);return s}}(),t.exports.shouldCaptureKeyEvent=function(e){return!e.metaKey&&document.activeElement===document.body},t.exports.splitString=function(e,t){"undefined"===typeof t&&(t=" ");var n=new RegExp(t,"g");return(e=(e||"").replace(n,t)).split(t)},t.exports.getElData=function(e,t){t=t||{};var n={};return Object.keys(t).forEach((function(t){e.hasAttribute(t)&&(n[t]=e.getAttribute(t))})),n},t.exports.getUrlParameter=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},t.exports.isIframed=function(){return window.top!==window.self},t.exports.findAllScenes=function(e){for(var t=[],n=e.getElementsByTagName("*"),r=0,i=n.length;r<i;r++)n[r].isScene&&t.push(n[r]);return t},t.exports.srcLoader=e("./src-loader")},{"./bind":199,"./coordinates":200,"./debug":201,"./device":202,"./entity":203,"./forceCanvasResizeSafariMobile":204,"./is-ie11":207,"./material":209,"./object-pool":210,"./split":211,"./src-loader":212,"./styleParser":213,"./tracked-controls":214,"deep-assign":10,"object-assign":39}],206:[function(e,t,n){window.addEventListener("orientationchange",(function(){document.documentElement.style.height="initial",setTimeout((function(){document.documentElement.style.height="100%",setTimeout((function(){window.scrollTo(0,1)}),500)}),500)}))},{}],207:[function(e,t,n){t.exports=11===function(){var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):"Netscape"===navigator.appName&&null!=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e}()},{}],208:[function(e,t,n){t.exports=function(e){return/(iphone|ipod|ipad).*os.(7_|8_|9_)/i.test(e)}},{}],209:[function(e,t,n){var r=e("../lib/three"),i=["application/x-mpegurl","application/vnd.apple.mpegurl"],o=new Set(["emissiveMap","envMap","map","specularMap"]);function a(e,t){t&&(e.emit("materialtextureloaded",{src:t.image,texture:t}),t.image&&"VIDEO"===t.image.tagName&&(t.image.addEventListener("loadeddata",(function(){e.components&&e.components.material&&(t.needsCorrectionBGRA&&t.needsCorrectionFlipY&&-1!==["standard","flat"].indexOf(e.components.material.data.shader)&&e.setAttribute("material","shader","ios10hls"),e.emit("materialvideoloadeddata",{src:t.image,texture:t}))})),t.image.addEventListener("ended",(function(){e.emit("materialvideoended",{src:t.image,texture:t})}))))}t.exports.updateMapMaterialFromData=function(e,t,n,i){var s=n.el,l=n.material,c=s.sceneEl.systems.renderer,u=i[t];if(n.materialSrcs||(n.materialSrcs={}),!u)return delete n.materialSrcs[e],void h(null);function h(t){l[e]=t,t&&o.has(e)&&c.applyColorCorrection(t),l.needsUpdate=!0,a(s,t)}u!==n.materialSrcs[e]&&(n.materialSrcs[e]=u,u instanceof r.Texture?h(u):s.sceneEl.systems.material.loadTexture(u,{src:u,repeat:i.repeat,offset:i.offset,npot:i.npot},(function(t){n.materialSrcs[e]===u&&h(t)})))},t.exports.updateMap=function(e,n){return t.exports.updateMapMaterialFromData("map","src",e,n)},t.exports.updateDistortionMap=function(e,t,n){var r=e;"ambientOcclusion"===e&&(r="ao");var i=t.el,s=t.material,l=i.sceneEl.systems.renderer,c=n[e+"Map"],u={};if(u.src=c,u.offset=n[e+"TextureOffset"],u.repeat=n[e+"TextureRepeat"],u.wrap=n[e+"TextureWrap"],c){if(c===t[e+"TextureSrc"])return;return t[e+"TextureSrc"]=c,void i.sceneEl.systems.material.loadTexture(c,u,h)}function h(e){var t=r+"Map";s[t]=e,e&&o.has(t)&&l.applyColorCorrection(e),s.needsUpdate=!0,a(i,e)}s.map&&h(null)},t.exports.handleTextureEvents=a,t.exports.isHLS=function(e,t){return!(!t||!i.includes(t.toLowerCase()))||!!(e&&e.toLowerCase().indexOf(".m3u8")>0)}},{"../lib/three":179}],210:[function(e,t,n){var r=Object.freeze(Object.create(null));function i(){return{}}function o(e){var t;if(e&&e.constructor===Object)for(t in e)e[t]=void 0}t.exports.createPool=function(e){var t=[],n=null;function a(r){var i,o;if((r=void 0===r?t.length:r)>0&&null==n&&(n=0),r>0)for(i=t.length,t.length+=Number(r),o=i;o<t.length;o++)t[o]=e();return t.length}return e=e||i,{grow:a,pool:t,recycle:function(e){e instanceof Object&&(null!==n&&-1!==n?t[--n]=e:t[t.length]=e)},size:function(){return t.length},use:function(){var e;return null!==n&&n!==t.length||a(t.length||5),e=t[n],t[n++]=r,o(e),e}}},t.exports.clearObject=o,t.exports.removeUnusedKeys=function(e,t){var n;if(e&&e.constructor===Object)for(n in e)n in t||delete e[n]}},{}],211:[function(e,t,n){t.exports.split=function(){var e={};return function(t,n){return n in e||(e[n]={}),t in e[n]||(e[n][t]=t.split(n)),e[n][t]}}()},{}],212:[function(t,n,r){var i=t("./debug")("utils:src-loader:warn");function o(e,t,n){!function(e,t){var n;e.tagName?t("IMG"===e.tagName):((n=new XMLHttpRequest).open("HEAD",e),n.addEventListener("load",(function(r){var i;n.status>=200&&n.status<300?null==(i=n.getResponseHeader("Content-Type"))?s(e,t):i.startsWith("image")?t(!0):t(!1):s(e,t),n.abort()})),n.send())}(e,(function(r){r?t(e):n(e)}))}function a(e){var t=e.match(/\url\((.+)\)/);if(t)return t[1]}function s(e,t){var n=new Image;n.addEventListener("load",(function(){t(!0)})),n.addEventListener("error",(function(){t(!1)})),n.src=e}n.exports={parseUrl:a,validateSrc:o,validateCubemapSrc:function(t,n){var r,s,l,c="",u=[];for(s=0;s<5;s++)c+="(url\\((?:[^\\)]+)\\),\\s*)";function h(e){u.push(e),6===u.length&&n(u)}if(c+="(url\\((?:[^\\)]+)\\)\\s*)",l=t.match(new RegExp(c)))for(s=1;s<7;s++)o(a(l[s]),h);else if(r=function(t){try{var n=document.querySelector(t);return n||i('No element was found matching the selector: "%s"',t),n}catch(e){return void i('"%s" is not a valid selector',t)}}(t))return"A-CUBEMAP"===r.tagName&&r.srcs?n(r.srcs):void i('Selector "%s" does not point to <a-cubemap>',t)}}},{"./debug":201}],213:[function(e,t,n){var r=/-([a-z])/g;function i(e){return e.replace(r,s)}function o(e){var t,n;for(n in e)n!==(t=i(n))&&(e[t]=e[n],delete e[n]);return e}t.exports.parse=function(e,t){var n;return"string"!==typeof e||(n=function(e,t){var n,r,i,o,s,l;for(t=t||{},n=a(e),r=0;r<n.length;r++)(i=n[r])&&(o=i.indexOf(":"),s=i.substr(0,o).trim(),l=i.substr(o+1).trim(),t[s]=l);return t}(e,t))[""]?e:o(n)},t.exports.stringify=function(e){return"string"===typeof e?e:function(e){var t,n=0,r=0,i="";for(t in e)n++;for(t in e)i+=t+": "+e[t],r<n-1&&(i+="; "),r++;return i}(e)},t.exports.toCamelCase=i,t.exports.transformKeysToCamelCase=o;var a=function(){var e=[],t=/url\([^)]+$/;return function(n){var r,i="",o=0;for(e.length=0;o<n.length;)-1===(r=n.indexOf(";",o))&&(r=n.length),i+=n.substring(o,r),t.test(i)?(i+=";",o=r+1):(e.push(i.trim()),i="",o=r+1);return e}}();function s(e){return e[1].toUpperCase()}},{}],214:[function(e,t,n){var r=e("../constants").DEFAULT_HANDEDNESS,i=["x","y","z","w"];function o(e,t,n){var r,i,o=e.el.sceneEl,a=n.index||0;return!!t&&!!(i=o&&o.systems["tracked-controls-webvr"])&&!!(r=i.controllers).length&&!!s(r,null,t,n.hand,a)}function a(e,t,n){var r,i=e.el.sceneEl,o=i&&i.systems["tracked-controls-webxr"];return!!o&&!(!(r=o.controllers)||!r.length)&&l(r,t,n.hand,n.index,n.iterateControllerProfiles,n.handTracking)}function s(e,t,n,i,o){var a,s,l=0;for(s=0;s<e.length;s++)if(a=e[s],(!n||a.id.startsWith(n))&&(n||a.id===t)&&(!i||!a.hand||i===a.hand)){if(!i||a.hand)return a;if(l===2*o+(i===r?0:1))return a;++l}}function l(e,t,n,r,i,o){var a,s,l,c,u=!1;for(a=0;a<e.length;a++){if(c=(l=e[a]).profiles,o)u=l.hand;else if(i)for(s=0;s<c.length&&!(u=c[s].startsWith(t));s++);else u=c.length>0&&c[0].startsWith(t);if(u)if("right"===l.handedness||"left"===l.handedness){if(l.handedness===n)return e[a]}else if(a===r)return e[a]}}t.exports.checkControllerPresentAndSetup=function(e,t,n){var r,i,s=e.el,l=s.sceneEl.hasWebXR;if(i=!!(r=(l?a:o)(e,t,n)),!e.controllerPresent||e.controllerEventsActive||l||e.addEventListeners(),i===e.controllerPresent)return i;e.controllerPresent=i,i?(e.addEventListeners(),e.injectTrackedControls(r),s.emit("controllerconnected",{name:e.name,component:e})):(e.removeEventListeners(),s.emit("controllerdisconnected",{name:e.name,component:e}))},t.exports.isControllerPresentWebVR=o,t.exports.isControllerPresentWebXR=a,t.exports.findMatchingControllerWebVR=s,t.exports.findMatchingControllerWebXR=l,t.exports.emitIfAxesChanged=function(e,t,n){var r,o,a,s,l;for(o in t){for(r=t[o],a=!1,l=0;l<r.length;l++)n.detail.changed[r[l]]&&(a=!0);if(a){for(s={},l=0;l<r.length;l++)s[i[l]]=n.detail.axis[r[l]];e.el.emit(o+"moved",s)}}},t.exports.onButtonEvent=function(e,t,n,r){var i=(r?n.mapping[r]:n.mapping).buttons[e];n.el.emit(i+t),n.updateModel&&n.updateModel(i,t)}},{"../constants":123}],215:[function(e,t,n){THREE.DeviceOrientationControls=function(e){var t=this;this.object=e,this.object.rotation.reorder("YXZ"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alphaOffset=0;var n=function(e){t.deviceOrientation=e},r=function(){t.screenOrientation=window.orientation||0},i=function(){var e=new THREE.Vector3(0,0,1),t=new THREE.Euler,n=new THREE.Quaternion,r=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5));return function(i,o,a,s,l){t.set(a,o,-s,"YXZ"),i.setFromEuler(t),i.multiply(r),i.multiply(n.setFromAxisAngle(e,-l))}}();this.connect=function(){r(),window.addEventListener("orientationchange",r,!1),window.addEventListener("deviceorientation",n,!1),t.enabled=!0},this.disconnect=function(){window.removeEventListener("orientationchange",r,!1),window.removeEventListener("deviceorientation",n,!1),t.enabled=!1},this.update=function(){if(!1!==t.enabled){var e=t.deviceOrientation;if(e){var n=e.alpha?THREE.Math.degToRad(e.alpha)+t.alphaOffset:0,r=e.beta?THREE.Math.degToRad(e.beta):0,o=e.gamma?THREE.Math.degToRad(e.gamma):0,a=t.screenOrientation?THREE.Math.degToRad(t.screenOrientation):0;i(t.object.quaternion,n,r,o,a)}}},this.dispose=function(){t.disconnect()},this.connect()}},{}],216:[function(e,t,n){window.glStats=function(){var e=null,t=0,n=0,r=0,i=0,o=0,a=0,s=0;function l(e,t){return function(){t.apply(this,arguments),e.apply(this,arguments)}}return WebGLRenderingContext.prototype.drawArrays=l(WebGLRenderingContext.prototype.drawArrays,(function(){t++,arguments[0]==this.POINTS?a+=arguments[2]:o+=arguments[2]})),WebGLRenderingContext.prototype.drawElements=l(WebGLRenderingContext.prototype.drawElements,(function(){n++,i+=arguments[1]/3,o+=arguments[1]})),WebGLRenderingContext.prototype.useProgram=l(WebGLRenderingContext.prototype.useProgram,(function(){r++})),WebGLRenderingContext.prototype.bindTexture=l(WebGLRenderingContext.prototype.bindTexture,(function(){s++})),{update:function(){e("allcalls").set(t+n),e("drawElements").set(n),e("drawArrays").set(t),e("bindTexture").set(s),e("useProgram").set(r),e("glfaces").set(i),e("glvertices").set(o),e("glpoints").set(a)},start:function(){t=0,n=0,r=0,i=0,o=0,a=0,s=0},end:function(){},attach:function(t){e=t},values:{allcalls:{over:3e3,caption:"Calls (hook)"},drawelements:{caption:"drawElements (hook)"},drawarrays:{caption:"drawArrays (hook)"}},groups:[{caption:"WebGL",values:["allcalls","drawelements","drawarrays","useprogram","bindtexture","glfaces","glvertices","glpoints"]}],fractions:[{base:"allcalls",steps:["drawelements","drawarrays"]}]}},window.threeStats=function(e){var t=null;return{update:function(){t("renderer.info.memory.geometries").set(e.info.memory.geometries),t("renderer.info.programs").set(e.info.programs.length),t("renderer.info.memory.textures").set(e.info.memory.textures),t("renderer.info.render.calls").set(e.info.render.calls),t("renderer.info.render.triangles").set(e.info.render.triangles),t("renderer.info.render.points").set(e.info.render.points)},start:function(){},end:function(){},attach:function(e){t=e},values:{"renderer.info.memory.geometries":{caption:"Geometries"},"renderer.info.memory.textures":{caption:"Textures"},"renderer.info.programs":{caption:"Programs"},"renderer.info.render.calls":{caption:"Calls"},"renderer.info.render.triangles":{caption:"Triangles",over:1e3},"renderer.info.render.points":{caption:"Points"}},groups:[{caption:"Three.js - Memory",values:["renderer.info.memory.geometries","renderer.info.programs","renderer.info.memory.textures"]},{caption:"Three.js - Render",values:["renderer.info.render.calls","renderer.info.render.triangles","renderer.info.render.points"]}],fractions:[]}},window.BrowserStats=function(){var e=null,t=0,n=0;window.performance&&!performance.memory&&(performance.memory={usedJSHeapSize:0,totalJSHeapSize:0}),0===performance.memory.totalJSHeapSize&&console.warn("totalJSHeapSize === 0... performance.memory is only available in Chrome .");var r=Math.log(1024);function i(e){var t=Math.floor(Math.log(e)/r);return Math.round(100*e/Math.pow(1024,t))/100}return{update:function(){t=i(performance.memory.usedJSHeapSize),n=i(performance.memory.totalJSHeapSize),e("memory").set(t),e("total").set(n)},start:function(){t=0},end:function(){},attach:function(t){e=t},values:{memory:{caption:"Used Memory",average:!0,avgMs:1e3,over:22},total:{caption:"Total Memory"}},groups:[{caption:"Browser",values:["memory","total"]}],fractions:[{base:"total",steps:["memory"]}]}},"object"===typeof t&&(t.exports={glStats:window.glStats,threeStats:window.threeStats,BrowserStats:window.BrowserStats})},{}],217:[function(e,t,n){"use strict";!function(){"performance"in window==0&&(window.performance={});var e=window.performance;if("now"in e==0){var t=Date.now();e.timing&&e.timing.navigationStart&&(t=e.timing.navigationStart),e.now=function(){return Date.now()-t}}e.mark||(e.mark=function(){}),e.measure||(e.measure=function(){})}(),window.rStats=function(e){function t(e,t){for(var n=Object.keys(e),r=0,i=n.length;r<i;r++)t(n[r])}var n=e||{},r=n.colours||["#850700","#c74900","#fcb300","#284280","#4c7c0c"],i=(n.CSSPath?n.CSSPath:"")+"rStats.css";(n.css||["https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300",i]).forEach((function(e){!function(e){var t=document.createElement("link");t.href=e,t.rel="stylesheet",t.type="text/css",document.getElementsByTagName("head")[0].appendChild(t)}(e)})),n.values||(n.values={});var o,a,s={};function l(e,t,n){var r=n||{},i=document.createElement("canvas"),o=i.getContext("2d"),a=0,s=0,l=r.color?r.color:"#666666",c=document.createElement("canvas"),u=c.getContext("2d");c.width=1,c.height=20,u.fillStyle="#444444",u.fillRect(0,0,1,20),u.fillStyle=l,u.fillRect(0,10,1,10),u.fillStyle="#ffffff",u.globalAlpha=.5,u.fillRect(0,10,1,1),u.globalAlpha=1;var h=document.createElement("canvas"),d=h.getContext("2d");return h.width=1,h.height=20,d.fillStyle="#444444",d.fillRect(0,0,1,20),d.fillStyle="#b70000",d.fillRect(0,10,1,10),d.globalAlpha=.5,d.fillStyle="#ffffff",d.fillRect(0,10,1,1),d.globalAlpha=1,i.width=200,i.height=10,i.style.width=i.width+"px",i.style.height=i.height+"px",i.className="rs-canvas",e.appendChild(i),o.fillStyle="#444444",o.fillRect(0,0,i.width,i.height),{draw:function(e,t){(s+=.1*(e-s))>(a*=.99)&&(a=s),o.drawImage(i,1,0,i.width-1,i.height,0,0,i.width-1,i.height),t?o.drawImage(h,i.width-1,i.height-s*i.height/a-10):o.drawImage(c,i.width-1,i.height-s*i.height/a-10)}}}function c(e,n){var i=document.createElement("canvas"),o=i.getContext("2d");return i.width=200,i.height=10*n,i.style.width=i.width+"px",i.style.height=i.height+"px",i.className="rs-canvas",e.appendChild(i),o.fillStyle="#444444",o.fillRect(0,0,i.width,i.height),{draw:function(e){o.drawImage(i,1,0,i.width-1,i.height,0,0,i.width-1,i.height);var n=0;t(e,(function(t){var a=e[t]*i.height;o.fillStyle=r[t],o.fillRect(i.width-1,n,1,a),n+=a}))}}}function u(e,t){var r,i=e,o=0,s=0,c=0,u=0,h=performance.now(),d=0,f=document.createElement("div"),p=document.createElement("span"),m=document.createElement("div"),g=document.createTextNode(""),v=n?n.values[i.toLowerCase()]:null,y=new l(f,i,v),b=!1;function w(e){if(v&&v.average){u+=e,d++;var t=performance.now();t-h>=(v.avgMs||1e3)&&(c=u/d,u=0,h=t,d=0)}}function x(){r=performance.now(),n.userTimingAPI&&performance.mark(i+"-start"),b=!0}function _(){o=performance.now()-r,n.userTimingAPI&&(performance.mark(i+"-end"),b&&performance.measure(i,i+"-start",i+"-end")),w(o)}return p.className="rs-counter-id",p.textContent=v&&v.caption?v.caption:i,m.className="rs-counter-value",m.appendChild(g),f.appendChild(p),f.appendChild(m),t?t.div.appendChild(f):a.appendChild(f),r=performance.now(),{set:function(e){w(o=e)},start:x,tick:function(){_(),x()},end:_,frame:function(){var e=performance.now(),t=e-r;s++,t>1e3&&(o=v&&!1===v.interpolate?s:1e3*s/t,s=0,r=e,w(o))},value:function(){return o},draw:function(){var e=v&&v.average?c:o;g.nodeValue=Math.round(100*e)/100;var t=v&&(v.below&&o<v.below||v.over&&o>v.over);y.draw(o,t),f.className=t?"rs-counter-base alarm":"rs-counter-base"}}}function h(e){var r=e.toLowerCase();if(void 0===r&&(r="default"),s[r])return s[r];var i=null;n&&n.groups&&t(n.groups,(function(e){var t=n.groups[parseInt(e,10)];i||-1===t.values.indexOf(r.toLowerCase())||(i=t)}));var o=new u(r,i);return s[r]=o,o}function d(){t(n.plugins,(function(e){n.plugins[e].update()})),t(s,(function(e){s[e].draw()})),n&&n.fractions&&t(n.fractions,(function(e){var r=n.fractions[parseInt(e,10)],i=[],o=s[r.base.toLowerCase()];o&&(o=o.value(),t(n.fractions[e].steps,(function(t){var r=n.fractions[e].steps[parseInt(t,10)].toLowerCase(),a=s[r];a&&i.push(a.value()/o)}))),r.graph.draw(i)}))}return function(){if(n.plugins){n.values||(n.values={}),n.groups||(n.groups=[]),n.fractions||(n.fractions=[]);for(var e=0;e<n.plugins.length;e++)n.plugins[e].attach(h),t(n.plugins[e].values,(function(t){n.values[t]=n.plugins[e].values[t]})),n.groups=n.groups.concat(n.plugins[e].groups),n.fractions=n.fractions.concat(n.plugins[e].fractions)}else n.plugins={};(o=document.createElement("div")).className="rs-base",(a=document.createElement("div")).className="rs-container",a.style.height="auto",o.appendChild(a),document.body.appendChild(o),n&&(n.groups&&t(n.groups,(function(e){var t=n.groups[parseInt(e,10)],r=document.createElement("div");r.className="rs-group",t.div=r;var i=document.createElement("h1");i.textContent=t.caption,i.addEventListener("click",function(e){this.classList.toggle("hidden"),e.preventDefault()}.bind(r)),a.appendChild(i),a.appendChild(r)})),n.fractions&&t(n.fractions,(function(e){var i=n.fractions[parseInt(e,10)],o=document.createElement("div");o.className="rs-fraction";var s=document.createElement("div");s.className="rs-legend";var l=0;t(n.fractions[e].steps,(function(t){var i=document.createElement("p");i.textContent=n.fractions[e].steps[t],i.style.color=r[l],s.appendChild(i),l++})),o.appendChild(s),o.style.height=10*l+"px",i.div=o;var u=new c(o,l);i.graph=u,a.appendChild(o)})))}(),function(e){return e?h(e):{element:o,update:d}}},"object"===typeof t&&(t.exports=window.rStats)},{}],218:[function(e,t,n){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e})},{}],219:[function(t,n,r){var i={base64:function(e,t){return"data:"+e+";base64,"+t},isMobile:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t},isIOS:function(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)},isIFrame:function(){try{return window.self!==window.top}catch(e){return!0}},appendQueryParameter:function(e,t,n){var r=e.indexOf("?")<0?"?":"&";return e+=r+t+"="+n},getQueryParameter:function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},isLandscapeMode:function(){return 90==window.orientation||-90==window.orientation}};n.exports=i},{}],220:[function(e,t,n){var r=e("./util.js");function i(){var e=document.createElement("video");e.addEventListener("ended",(function(){e.play()})),this.request=function(){e.paused&&(e.src=r.base64("video/webm","GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAAH4xFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsggfG7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU2LjQwLjEwMVdBjUxhdmY1Ni40MC4xMDFzpJAGSJTMbsLpDt/ySkipgX1fRImIQO1MAAAAAAAWVK5rAQAAAAAAADuuAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDmDgQEj44OEO5rKAOABAAAAAAAABrCBsLqBkB9DtnUBAAAAAAAAo+eBAKOmgQAAgKJJg0IAAV4BHsAHBIODCoAACmH2MAAAZxgz4dPSTFi5JACjloED6ACmAECSnABMQAADYAAAWi0quoCjloEH0ACmAECSnABNwAADYAAAWi0quoCjloELuACmAECSnABNgAADYAAAWi0quoCjloEPoACmAECSnABNYAADYAAAWi0quoCjloETiACmAECSnABNIAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTnghdwo5aBAAAApgBAkpwATOAAA2AAAFotKrqAo5aBA+gApgBAkpwATMAAA2AAAFotKrqAo5aBB9AApgBAkpwATIAAA2AAAFotKrqAo5aBC7gApgBAkpwATEAAA2AAAFotKrqAo5aBD6AApgDAkpwAQ2AAA2AAAFotKrqAo5aBE4gApgBAkpwATCAAA2AAAFotKrqAH0O2dQEAAAAAAACU54Iu4KOWgQAAAKYAQJKcAEvAAANgAABaLSq6gKOWgQPoAKYAQJKcAEtgAANgAABaLSq6gKOWgQfQAKYAQJKcAEsAAANgAABaLSq6gKOWgQu4AKYAQJKcAEqAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEogAANgAABaLSq6gKOWgROIAKYAQJKcAEnAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCRlCjloEAAACmAECSnABJgAADYAAAWi0quoCjloED6ACmAECSnABJIAADYAAAWi0quoCjloEH0ACmAMCSnABDYAADYAAAWi0quoCjloELuACmAECSnABI4AADYAAAWi0quoCjloEPoACmAECSnABIoAADYAAAWi0quoCjloETiACmAECSnABIYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngl3Ao5aBAAAApgBAkpwASCAAA2AAAFotKrqAo5aBA+gApgBAkpwASAAAA2AAAFotKrqAo5aBB9AApgBAkpwAR8AAA2AAAFotKrqAo5aBC7gApgBAkpwAR4AAA2AAAFotKrqAo5aBD6AApgBAkpwAR2AAA2AAAFotKrqAo5aBE4gApgBAkpwARyAAA2AAAFotKrqAH0O2dQEAAAAAAACU54J1MKOWgQAAAKYAwJKcAENgAANgAABaLSq6gKOWgQPoAKYAQJKcAEbgAANgAABaLSq6gKOWgQfQAKYAQJKcAEagAANgAABaLSq6gKOWgQu4AKYAQJKcAEaAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEZAAANgAABaLSq6gKOWgROIAKYAQJKcAEYAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCjKCjloEAAACmAECSnABF4AADYAAAWi0quoCjloED6ACmAECSnABFwAADYAAAWi0quoCjloEH0ACmAECSnABFoAADYAAAWi0quoCjloELuACmAECSnABFgAADYAAAWi0quoCjloEPoACmAMCSnABDYAADYAAAWi0quoCjloETiACmAECSnABFYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngqQQo5aBAAAApgBAkpwARUAAA2AAAFotKrqAo5aBA+gApgBAkpwARSAAA2AAAFotKrqAo5aBB9AApgBAkpwARQAAA2AAAFotKrqAo5aBC7gApgBAkpwARQAAA2AAAFotKrqAo5aBD6AApgBAkpwAROAAA2AAAFotKrqAo5aBE4gApgBAkpwARMAAA2AAAFotKrqAH0O2dQEAAAAAAACU54K7gKOWgQAAAKYAQJKcAESgAANgAABaLSq6gKOWgQPoAKYAQJKcAESAAANgAABaLSq6gKOWgQfQAKYAwJKcAENgAANgAABaLSq6gKOWgQu4AKYAQJKcAERgAANgAABaLSq6gKOWgQ+gAKYAQJKcAERAAANgAABaLSq6gKOWgROIAKYAQJKcAEQgAANgAABaLSq6gB9DtnUBAAAAAAAAlOeC0vCjloEAAACmAECSnABEIAADYAAAWi0quoCjloED6ACmAECSnABEAAADYAAAWi0quoCjloEH0ACmAECSnABD4AADYAAAWi0quoCjloELuACmAECSnABDwAADYAAAWi0quoCjloEPoACmAECSnABDoAADYAAAWi0quoCjloETiACmAECSnABDgAADYAAAWi0quoAcU7trAQAAAAAAABG7j7OBALeK94EB8YIBd/CBAw=="),e.play())},this.release=function(){e.pause(),e.src=""}}function o(){var e=null;this.request=function(){e||(e=setInterval((function(){window.location.href="/",setTimeout(window.stop,0)}),15e3))},this.release=function(){e&&(clearInterval(e),e=null)}}t.exports=function(){var e=navigator.userAgent||navigator.vendor||window.opera;return e.match(/iPhone/i)||e.match(/iPod/i)?o:i}()},{"./util.js":219}]},{},[177])(177)}).call(this,r(46))},function(e,t,n){n(320),n(330),n(339),n(348),n(353)},function(e,t,n){n(321),n(322),n(325),n(327),n(328),n(329)},function(e,t){e.exports=AFRAME.registerComponent("checkpoint-controls",{schema:{enabled:{default:!0},mode:{default:"teleport",oneOf:["teleport","animate"]},animateSpeed:{default:3}},init:function(){this.active=!0,this.checkpoint=null,this.isNavMeshConstrained=!1,this.offset=new THREE.Vector3,this.position=new THREE.Vector3,this.targetPosition=new THREE.Vector3},play:function(){this.active=!0},pause:function(){this.active=!1},setCheckpoint:function(e){const t=this.el;this.active&&this.checkpoint!==e&&(this.checkpoint&&t.emit("navigation-end",{checkpoint:this.checkpoint}),this.checkpoint=e,this.sync(),this.position.distanceTo(this.targetPosition)<.1?this.checkpoint=null:(t.emit("navigation-start",{checkpoint:e}),"teleport"===this.data.mode&&(this.el.setAttribute("position",this.targetPosition),this.checkpoint=null,t.emit("navigation-end",{checkpoint:e}),t.components["movement-controls"].updateNavLocation())))},isVelocityActive:function(){return!(!this.active||!this.checkpoint)},getVelocity:function(){if(!this.active)return;const e=this.data,t=this.offset,n=this.position,r=this.targetPosition,i=this.checkpoint;return this.sync(),n.distanceTo(r)<.1?(this.checkpoint=null,this.el.emit("navigation-end",{checkpoint:i}),t.set(0,0,0)):(t.setLength(e.animateSpeed),t)},sync:function(){const e=this.offset,t=this.position,n=this.targetPosition;t.copy(this.el.getAttribute("position")),this.checkpoint.object3D.getWorldPosition(n),n.add(this.checkpoint.components.checkpoint.getOffset()),e.copy(n).sub(t)}})},function(e,t,n){const r=n(323),i=n(324),o="left",a="right",s=1,l=2;e.exports=AFRAME.registerComponent("gamepad-controls",{GamepadButton:r,schema:{enabled:{default:!0},camera:{default:"[camera]",type:"selector"},rotationSensitivity:{default:2}},init:function(){const e=this.el.sceneEl;this.system=e.systems["tracked-controls-webxr"]||{controllers:[]},this.prevTime=window.performance.now(),this.buttons={};const t=this.el.object3D.rotation;this.pitch=new THREE.Object3D,this.pitch.rotation.x=THREE.Math.degToRad(t.x),this.yaw=new THREE.Object3D,this.yaw.position.y=10,this.yaw.rotation.y=THREE.Math.degToRad(t.y),this.yaw.add(this.pitch),this._lookVector=new THREE.Vector2,this._moveVector=new THREE.Vector2,this._dpadVector=new THREE.Vector2,e.addBehavior(this)},update:function(){this.tick()},tick:function(e,t){this.updateButtonState(),this.updateRotation(t)},remove:function(){},isVelocityActive:function(){if(!this.data.enabled||!this.isConnected())return!1;const e=this._dpadVector,t=this._moveVector;this.getDpad(e),this.getJoystick(s,t);const n=e.x||t.x,r=e.y||t.y;return Math.abs(n)>.2||Math.abs(r)>.2},getVelocityDelta:function(){const e=this._dpadVector,t=this._moveVector;this.getDpad(e),this.getJoystick(s,t);const n=e.x||t.x,r=e.y||t.y,i=new THREE.Vector3;return Math.abs(n)>.2&&(i.x+=n),Math.abs(r)>.2&&(i.z+=r),i},isRotationActive:function(){if(!this.data.enabled||!this.isConnected())return!1;const e=this._lookVector;return this.getJoystick(l,e),Math.abs(e.x)>.2||Math.abs(e.y)>.2},updateRotation:function(e){if(!this.isRotationActive())return;const t=this.data,n=this.yaw,r=this.pitch,i=t.camera.components["look-controls"],o=i&&i.pitchObject&&i.yawObject;o&&(r.rotation.copy(i.pitchObject.rotation),n.rotation.copy(i.yawObject.rotation));const a=this._lookVector;this.getJoystick(l,a),Math.abs(a.x)<=.2&&(a.x=0),Math.abs(a.y)<=.2&&(a.y=0),a.multiplyScalar(t.rotationSensitivity*e/1e3),n.rotation.y-=a.x,r.rotation.x-=a.y,r.rotation.x=Math.max(-Math.PI/2,Math.min(Math.PI/2,r.rotation.x)),t.camera.object3D.rotation.set(r.rotation.x,n.rotation.y,0),o&&(i.pitchObject.rotation.copy(r.rotation),i.yawObject.rotation.copy(n.rotation))},updateButtonState:function(){const e=this.getGamepad(a);if(this.data.enabled&&e)for(var t=0;t<e.buttons.length;t++)e.buttons[t].pressed&&!this.buttons[t]?this.emit(new i("gamepadbuttondown",t,e.buttons[t])):!e.buttons[t].pressed&&this.buttons[t]&&this.emit(new i("gamepadbuttonup",t,e.buttons[t])),this.buttons[t]=e.buttons[t].pressed;else Object.keys(this.buttons)&&(this.buttons={})},emit:function(e){this.el.emit(e.type,e),this.el.emit(e.type+":"+e.index,new i(e.type,e.index,e))},getGamepad:function(){const e=[],t=[];return function(n){const r=this.el.sceneEl.components["proxy-controls"],i=r&&r.isConnected()&&r.getGamepad(0);if(i)return i;e.length=0;for(let t=0;t<this.system.controllers.length;t++){const r=this.system.controllers[t],i=r?r.gamepad:null;if(e.push(i),i&&i.handedness===n)return i}const o=navigator.getGamepads?navigator.getGamepads():t;for(let e=0;e<o.length;e++){const t=o[e];if(t&&t.hand===n)return t}return e[0]||o[0]}}(),getButton:function(e){return this.getGamepad(a).buttons[e]},getAxis:function(e){return this.getGamepad(e>1?a:o).axes[e]},getJoystick:function(e,t){const n=this.getGamepad(e===s?o:a);if("xr-standard"===n.mapping)switch(e){case s:return t.set(n.axes[2],n.axes[3]);case l:return t.set(n.axes[0],n.axes[1])}else switch(e){case s:return t.set(n.axes[0],n.axes[1]);case l:return t.set(n.axes[2],n.axes[3])}throw new Error('Unexpected joystick index "%d".',e)},getDpad:function(e){const t=this.getGamepad(o);return t.buttons[r.DPAD_RIGHT]?e.set((t.buttons[r.DPAD_RIGHT].pressed?1:0)+(t.buttons[r.DPAD_LEFT].pressed?-1:0),(t.buttons[r.DPAD_UP].pressed?-1:0)+(t.buttons[r.DPAD_DOWN].pressed?1:0)):e.set(0,0)},isConnected:function(){const e=this.getGamepad(o);return!(!e||!e.connected)},getID:function(){return this.getGamepad(o).id}})},function(e,t){e.exports=Object.assign((function(){}),{FACE_1:0,FACE_2:1,FACE_3:2,FACE_4:3,L_SHOULDER_1:4,R_SHOULDER_1:5,L_SHOULDER_2:6,R_SHOULDER_2:7,SELECT:8,START:9,DPAD_UP:12,DPAD_DOWN:13,DPAD_LEFT:14,DPAD_RIGHT:15,VENDOR:16})},function(e,t){e.exports=function(e,t,n){this.type=e,this.index=t,this.pressed=n.pressed,this.value=n.value}},function(e,t,n){n(326);const r=window.KeyboardEvent;e.exports=AFRAME.registerComponent("keyboard-controls",{schema:{enabled:{default:!0},debug:{default:!1}},init:function(){this.dVelocity=new THREE.Vector3,this.localKeys={},this.listeners={keydown:this.onKeyDown.bind(this),keyup:this.onKeyUp.bind(this),blur:this.onBlur.bind(this)},this.attachEventListeners()},isVelocityActive:function(){return this.data.enabled&&!!Object.keys(this.getKeys()).length},getVelocityDelta:function(){const e=this.data,t=this.getKeys();return this.dVelocity.set(0,0,0),e.enabled&&((t.KeyW||t.ArrowUp)&&(this.dVelocity.z-=1),(t.KeyA||t.ArrowLeft)&&(this.dVelocity.x-=1),(t.KeyS||t.ArrowDown)&&(this.dVelocity.z+=1),(t.KeyD||t.ArrowRight)&&(this.dVelocity.x+=1)),this.dVelocity.clone()},play:function(){this.attachEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){this.pause()},attachEventListeners:function(){window.addEventListener("keydown",this.listeners.keydown,!1),window.addEventListener("keyup",this.listeners.keyup,!1),window.addEventListener("blur",this.listeners.blur,!1)},removeEventListeners:function(){window.removeEventListener("keydown",this.listeners.keydown),window.removeEventListener("keyup",this.listeners.keyup),window.removeEventListener("blur",this.listeners.blur)},onKeyDown:function(e){AFRAME.utils.shouldCaptureKeyEvent(e)&&(this.localKeys[e.code]=!0,this.emit(e))},onKeyUp:function(e){AFRAME.utils.shouldCaptureKeyEvent(e)&&(delete this.localKeys[e.code],this.emit(e))},onBlur:function(){for(let e in this.localKeys)this.localKeys.hasOwnProperty(e)&&delete this.localKeys[e]},emit:function(e){"__keyboard-controls-proxy"in e&&this.el.emit(e.type,e),this.el.emit(e.type+":"+e.code,new r(e.type,e)),this.data.debug&&console.log(e.type+":"+e.code)},isPressed:function(e){return e in this.getKeys()},getKeys:function(){return this.isProxied()?this.el.sceneEl.components["proxy-controls"].getKeyboard():this.localKeys},isProxied:function(){const e=this.el.sceneEl.components["proxy-controls"];return e&&e.isConnected()}})},function(e,t,n){!function(e){var t="KeyboardEvent"in e;t||(e.KeyboardEvent=function(){throw TypeError("Illegal constructor")}),"DOM_KEY_LOCATION_STANDARD"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_STANDARD=0),"DOM_KEY_LOCATION_LEFT"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_LEFT=1),"DOM_KEY_LOCATION_RIGHT"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_RIGHT=2),"DOM_KEY_LOCATION_NUMPAD"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD=3);var n=window.KeyboardEvent.DOM_KEY_LOCATION_STANDARD,r=window.KeyboardEvent.DOM_KEY_LOCATION_LEFT,i=window.KeyboardEvent.DOM_KEY_LOCATION_RIGHT,o=window.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;function a(e,t){return-1!==String(e).indexOf(t)}var s=a(navigator.platform,"Win")?"win":a(navigator.platform,"Mac")?"mac":a(navigator.platform,"CrOS")?"cros":a(navigator.platform,"Linux")?"linux":a(navigator.userAgent,"iPad")||a(navigator.platform,"iPod")||a(navigator.platform,"iPhone")?"ios":"",l=a(navigator.userAgent,"Chrome/")?"chrome":a(navigator.vendor,"Apple")?"safari":a(navigator.userAgent,"MSIE")?"ie":a(navigator.userAgent,"Gecko/")?"moz":a(navigator.userAgent,"Opera/")?"opera":"",c=l+"-"+s;function u(e,t,n){c!==t&&l!==t&&s!==t||Object.keys(n).forEach((function(t){e[t]=n[t]}))}var h={3:{code:"Cancel"},6:{code:"Help"},8:{code:"Backspace"},9:{code:"Tab"},12:{code:"Clear"},13:{code:"Enter"},16:{code:"Shift"},17:{code:"Control"},18:{code:"Alt"},19:{code:"Pause"},20:{code:"CapsLock"},21:{code:"KanaMode"},22:{code:"HangulMode"},23:{code:"JunjaMode"},24:{code:"FinalMode"},25:{code:"KanjiMode"},27:{code:"Escape"},28:{code:"Convert"},29:{code:"NonConvert"},30:{code:"Accept"},31:{code:"ModeChange"},32:{code:"Space"},33:{code:"PageUp"},34:{code:"PageDown"},35:{code:"End"},36:{code:"Home"},37:{code:"ArrowLeft"},38:{code:"ArrowUp"},39:{code:"ArrowRight"},40:{code:"ArrowDown"},41:{code:"Select"},42:{code:"Print"},43:{code:"Execute"},44:{code:"PrintScreen"},45:{code:"Insert"},46:{code:"Delete"},47:{code:"Help"},48:{code:"Digit0",keyCap:"0"},49:{code:"Digit1",keyCap:"1"},50:{code:"Digit2",keyCap:"2"},51:{code:"Digit3",keyCap:"3"},52:{code:"Digit4",keyCap:"4"},53:{code:"Digit5",keyCap:"5"},54:{code:"Digit6",keyCap:"6"},55:{code:"Digit7",keyCap:"7"},56:{code:"Digit8",keyCap:"8"},57:{code:"Digit9",keyCap:"9"},65:{code:"KeyA",keyCap:"a"},66:{code:"KeyB",keyCap:"b"},67:{code:"KeyC",keyCap:"c"},68:{code:"KeyD",keyCap:"d"},69:{code:"KeyE",keyCap:"e"},70:{code:"KeyF",keyCap:"f"},71:{code:"KeyG",keyCap:"g"},72:{code:"KeyH",keyCap:"h"},73:{code:"KeyI",keyCap:"i"},74:{code:"KeyJ",keyCap:"j"},75:{code:"KeyK",keyCap:"k"},76:{code:"KeyL",keyCap:"l"},77:{code:"KeyM",keyCap:"m"},78:{code:"KeyN",keyCap:"n"},79:{code:"KeyO",keyCap:"o"},80:{code:"KeyP",keyCap:"p"},81:{code:"KeyQ",keyCap:"q"},82:{code:"KeyR",keyCap:"r"},83:{code:"KeyS",keyCap:"s"},84:{code:"KeyT",keyCap:"t"},85:{code:"KeyU",keyCap:"u"},86:{code:"KeyV",keyCap:"v"},87:{code:"KeyW",keyCap:"w"},88:{code:"KeyX",keyCap:"x"},89:{code:"KeyY",keyCap:"y"},90:{code:"KeyZ",keyCap:"z"},91:{code:"OSLeft",location:r},92:{code:"OSRight",location:i},93:{code:"ContextMenu"},95:{code:"Standby"},96:{code:"Numpad0",keyCap:"0",location:o},97:{code:"Numpad1",keyCap:"1",location:o},98:{code:"Numpad2",keyCap:"2",location:o},99:{code:"Numpad3",keyCap:"3",location:o},100:{code:"Numpad4",keyCap:"4",location:o},101:{code:"Numpad5",keyCap:"5",location:o},102:{code:"Numpad6",keyCap:"6",location:o},103:{code:"Numpad7",keyCap:"7",location:o},104:{code:"Numpad8",keyCap:"8",location:o},105:{code:"Numpad9",keyCap:"9",location:o},106:{code:"NumpadMultiply",keyCap:"*",location:o},107:{code:"NumpadAdd",keyCap:"+",location:o},108:{code:"NumpadComma",keyCap:",",location:o},109:{code:"NumpadSubtract",keyCap:"-",location:o},110:{code:"NumpadDecimal",keyCap:".",location:o},111:{code:"NumpadDivide",keyCap:"/",location:o},112:{code:"F1"},113:{code:"F2"},114:{code:"F3"},115:{code:"F4"},116:{code:"F5"},117:{code:"F6"},118:{code:"F7"},119:{code:"F8"},120:{code:"F9"},121:{code:"F10"},122:{code:"F11"},123:{code:"F12"},124:{code:"F13"},125:{code:"F14"},126:{code:"F15"},127:{code:"F16"},128:{code:"F17"},129:{code:"F18"},130:{code:"F19"},131:{code:"F20"},132:{code:"F21"},133:{code:"F22"},134:{code:"F23"},135:{code:"F24"},144:{code:"NumLock",location:o},145:{code:"ScrollLock"},160:{code:"ShiftLeft",location:r},161:{code:"ShiftRight",location:i},162:{code:"ControlLeft",location:r},163:{code:"ControlRight",location:i},164:{code:"AltLeft",location:r},165:{code:"AltRight",location:i},166:{code:"BrowserBack"},167:{code:"BrowserForward"},168:{code:"BrowserRefresh"},169:{code:"BrowserStop"},170:{code:"BrowserSearch"},171:{code:"BrowserFavorites"},172:{code:"BrowserHome"},173:{code:"VolumeMute"},174:{code:"VolumeDown"},175:{code:"VolumeUp"},176:{code:"MediaTrackNext"},177:{code:"MediaTrackPrevious"},178:{code:"MediaStop"},179:{code:"MediaPlayPause"},180:{code:"LaunchMail"},181:{code:"MediaSelect"},182:{code:"LaunchApp1"},183:{code:"LaunchApp2"},186:{code:"Semicolon",keyCap:";"},187:{code:"Equal",keyCap:"="},188:{code:"Comma",keyCap:","},189:{code:"Minus",keyCap:"-"},190:{code:"Period",keyCap:"."},191:{code:"Slash",keyCap:"/"},192:{code:"Backquote",keyCap:"`"},219:{code:"BracketLeft",keyCap:"["},220:{code:"Backslash",keyCap:"\\"},221:{code:"BracketRight",keyCap:"]"},222:{code:"Quote",keyCap:"'"},226:{code:"IntlBackslash",keyCap:"\\"},229:{code:"Process"},246:{code:"Attn"},247:{code:"CrSel"},248:{code:"ExSel"},249:{code:"EraseEof"},250:{code:"Play"},251:{code:"ZoomToggle"},254:{code:"Clear"}};u(h,"moz",{59:{code:"Semicolon",keyCap:";"},61:{code:"Equal",keyCap:"="},107:{code:"Equal",keyCap:"="},109:{code:"Minus",keyCap:"-"},187:{code:"NumpadAdd",keyCap:"+",location:o},189:{code:"NumpadSubtract",keyCap:"-",location:o}}),u(h,"moz-mac",{12:{code:"NumLock",location:o},173:{code:"Minus",keyCap:"-"}}),u(h,"moz-win",{173:{code:"Minus",keyCap:"-"}}),u(h,"chrome-mac",{93:{code:"OSRight",location:i}}),u(h,"safari",{3:{code:"Enter"},25:{code:"Tab"}}),u(h,"ios",{10:{code:"Enter",location:n}}),u(h,"safari-mac",{91:{code:"OSLeft",location:r},93:{code:"OSRight",location:i},229:{code:"KeyQ",keyCap:"Q"}});var d={};"cros"===s&&(d["U+00A0"]={code:"ShiftLeft",location:r},d["U+00A1"]={code:"ShiftRight",location:i},d["U+00A2"]={code:"ControlLeft",location:r},d["U+00A3"]={code:"ControlRight",location:i},d["U+00A4"]={code:"AltLeft",location:r},d["U+00A5"]={code:"AltRight",location:i}),"chrome-mac"===c&&(d["U+0010"]={code:"ContextMenu"}),"safari-mac"===c&&(d["U+0010"]={code:"ContextMenu"}),"ios"===s&&(d["U+0010"]={code:"Function"},d["U+001C"]={code:"ArrowLeft"},d["U+001D"]={code:"ArrowRight"},d["U+001E"]={code:"ArrowUp"},d["U+001F"]={code:"ArrowDown"},d["U+0001"]={code:"Home"},d["U+0004"]={code:"End"},d["U+000B"]={code:"PageUp"},d["U+000C"]={code:"PageDown"});var f=[];f[r]={16:{code:"ShiftLeft",location:r},17:{code:"ControlLeft",location:r},18:{code:"AltLeft",location:r}},f[i]={16:{code:"ShiftRight",location:i},17:{code:"ControlRight",location:i},18:{code:"AltRight",location:i}},f[o]={13:{code:"NumpadEnter",location:o}},u(f[o],"moz",{109:{code:"NumpadSubtract",location:o},107:{code:"NumpadAdd",location:o}}),u(f[r],"moz-mac",{224:{code:"OSLeft",location:r}}),u(f[i],"moz-mac",{224:{code:"OSRight",location:i}}),u(f[i],"moz-win",{91:{code:"OSRight",location:i}}),u(f[i],"mac",{93:{code:"OSRight",location:i}}),u(f[o],"chrome-mac",{12:{code:"NumLock",location:o}}),u(f[o],"safari-mac",{12:{code:"NumLock",location:o},187:{code:"NumpadAdd",location:o},189:{code:"NumpadSubtract",location:o},190:{code:"NumpadDecimal",location:o},191:{code:"NumpadDivide",location:o}});var p={ShiftLeft:{key:"Shift"},ShiftRight:{key:"Shift"},ControlLeft:{key:"Control"},ControlRight:{key:"Control"},AltLeft:{key:"Alt"},AltRight:{key:"Alt"},OSLeft:{key:"OS"},OSRight:{key:"OS"},NumpadEnter:{key:"Enter"},Space:{key:" "},Digit0:{key:"0",shiftKey:")"},Digit1:{key:"1",shiftKey:"!"},Digit2:{key:"2",shiftKey:"@"},Digit3:{key:"3",shiftKey:"#"},Digit4:{key:"4",shiftKey:"$"},Digit5:{key:"5",shiftKey:"%"},Digit6:{key:"6",shiftKey:"^"},Digit7:{key:"7",shiftKey:"&"},Digit8:{key:"8",shiftKey:"*"},Digit9:{key:"9",shiftKey:"("},KeyA:{key:"a",shiftKey:"A"},KeyB:{key:"b",shiftKey:"B"},KeyC:{key:"c",shiftKey:"C"},KeyD:{key:"d",shiftKey:"D"},KeyE:{key:"e",shiftKey:"E"},KeyF:{key:"f",shiftKey:"F"},KeyG:{key:"g",shiftKey:"G"},KeyH:{key:"h",shiftKey:"H"},KeyI:{key:"i",shiftKey:"I"},KeyJ:{key:"j",shiftKey:"J"},KeyK:{key:"k",shiftKey:"K"},KeyL:{key:"l",shiftKey:"L"},KeyM:{key:"m",shiftKey:"M"},KeyN:{key:"n",shiftKey:"N"},KeyO:{key:"o",shiftKey:"O"},KeyP:{key:"p",shiftKey:"P"},KeyQ:{key:"q",shiftKey:"Q"},KeyR:{key:"r",shiftKey:"R"},KeyS:{key:"s",shiftKey:"S"},KeyT:{key:"t",shiftKey:"T"},KeyU:{key:"u",shiftKey:"U"},KeyV:{key:"v",shiftKey:"V"},KeyW:{key:"w",shiftKey:"W"},KeyX:{key:"x",shiftKey:"X"},KeyY:{key:"y",shiftKey:"Y"},KeyZ:{key:"z",shiftKey:"Z"},Numpad0:{key:"0"},Numpad1:{key:"1"},Numpad2:{key:"2"},Numpad3:{key:"3"},Numpad4:{key:"4"},Numpad5:{key:"5"},Numpad6:{key:"6"},Numpad7:{key:"7"},Numpad8:{key:"8"},Numpad9:{key:"9"},NumpadMultiply:{key:"*"},NumpadAdd:{key:"+"},NumpadComma:{key:","},NumpadSubtract:{key:"-"},NumpadDecimal:{key:"."},NumpadDivide:{key:"/"},Semicolon:{key:";",shiftKey:":"},Equal:{key:"=",shiftKey:"+"},Comma:{key:",",shiftKey:"<"},Minus:{key:"-",shiftKey:"_"},Period:{key:".",shiftKey:">"},Slash:{key:"/",shiftKey:"?"},Backquote:{key:"`",shiftKey:"~"},BracketLeft:{key:"[",shiftKey:"{"},Backslash:{key:"\\",shiftKey:"|"},BracketRight:{key:"]",shiftKey:"}"},Quote:{key:"'",shiftKey:'"'},IntlBackslash:{key:"\\",shiftKey:"|"}};u(p,"mac",{OSLeft:{key:"Meta"},OSRight:{key:"Meta"}});var m={Esc:"Escape",Nonconvert:"NonConvert",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Menu:"ContextMenu",MediaNextTrack:"MediaTrackNext",MediaPreviousTrack:"MediaTrackPrevious",SelectMedia:"MediaSelect",HalfWidth:"Hankaku",FullWidth:"Zenkaku",RomanCharacters:"Romaji",Crsel:"CrSel",Exsel:"ExSel",Zoom:"ZoomToggle"},g=function(e,t){var n={};return Object.keys(e).forEach((function(r){var i=e[r];t in i&&(n[i[t]]=i)})),n}(h,"code");try{var v=t&&"location"in new KeyboardEvent("")}catch(b){}function y(e){var t="keyCode"in e?e.keyCode:"which"in e?e.which:0,n=function(){if(v||"keyLocation"in e){var n=v?e.location:e.keyLocation;if(n&&t in f[n])return f[n][t]}return"keyIdentifier"in e&&e.keyIdentifier in d?d[e.keyIdentifier]:t in h?h[t]:null}();if(!n)return null;var r=function(){var t=p[n.code];return t?e.shiftKey&&"shiftKey"in t?t.shiftKey:t.key:n.code}();return{code:n.code,key:r,location:n.location,keyCap:n.keyCap}}"KeyboardEvent"in e&&"defineProperty"in Object&&function(){function e(e,t,n){t in e||Object.defineProperty(e,t,n)}if(e(KeyboardEvent.prototype,"code",{get:function(){var e=y(this);return e?e.code:""}}),"key"in KeyboardEvent.prototype){var t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,"key");Object.defineProperty(KeyboardEvent.prototype,"key",{get:function(){var e=t.get.call(this);return m.hasOwnProperty(e)?m[e]:e}})}e(KeyboardEvent.prototype,"key",{get:function(){var e=y(this);return e&&"key"in e?e.key:"Unidentified"}}),e(KeyboardEvent.prototype,"location",{get:function(){var e=y(this);return e&&"location"in e?e.location:n}}),e(KeyboardEvent.prototype,"locale",{get:function(){return""}})}(),"queryKeyCap"in e.KeyboardEvent||(e.KeyboardEvent.queryKeyCap=function(e,t){if(e=String(e),!g.hasOwnProperty(e))return"Undefined";if(t&&"en-us"!==String(t).toLowerCase())throw Error("Unsupported locale");var n=g[e];return n.keyCap||n.code||"Undefined"}),e.identifyKey=function(e){if(!("code"in e)){var t=y(e);e.code=t?t.code:"",e.key=t&&"key"in t?t.key:"Unidentified",e.location="location"in e?e.location:"keyLocation"in e?e.keyLocation:t&&"location"in t?t.location:n,e.locale=""}}}(window)},function(e,t){e.exports=AFRAME.registerComponent("touch-controls",{schema:{enabled:{default:!0},reverseEnabled:{default:!0}},init:function(){this.dVelocity=new THREE.Vector3,this.bindMethods(),this.direction=0},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.dVelocity.set(0,0,0)},remove:function(){this.pause()},addEventListeners:function(){const e=this.el.sceneEl,t=e.canvas;t?(t.addEventListener("touchstart",this.onTouchStart),t.addEventListener("touchend",this.onTouchEnd)):e.addEventListener("render-target-loaded",this.addEventListeners.bind(this))},removeEventListeners:function(){const e=this.el.sceneEl&&this.el.sceneEl.canvas;e&&(e.removeEventListener("touchstart",this.onTouchStart),e.removeEventListener("touchend",this.onTouchEnd))},isVelocityActive:function(){return this.data.enabled&&!!this.direction},getVelocityDelta:function(){return this.dVelocity.z=this.direction,this.dVelocity.clone()},bindMethods:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)},onTouchStart:function(e){this.direction=-1,this.data.reverseEnabled&&2===e.touches.length&&(this.direction=1),e.preventDefault()},onTouchEnd:function(e){this.direction=0,e.preventDefault()}})},function(e,t){e.exports=AFRAME.registerComponent("movement-controls",{dependencies:["rotation"],schema:{enabled:{default:!0},controls:{default:["gamepad","trackpad","keyboard","touch"]},speed:{default:.3,min:0},fly:{default:!1},constrainToNavMesh:{default:!1},camera:{default:"[movement-controls] [camera]",type:"selector"}},init:function(){const e=this.el;this.velocityCtrl=null,this.velocity=new THREE.Vector3,this.heading=new THREE.Quaternion,this.navGroup=null,this.navNode=null,e.sceneEl.hasLoaded?this.injectControls():e.sceneEl.addEventListener("loaded",this.injectControls.bind(this))},update:function(e){const t=this.el,n=this.data,r=t.sceneEl.systems.nav;t.sceneEl.hasLoaded&&this.injectControls(),r&&n.constrainToNavMesh!==e.constrainToNavMesh&&(n.constrainToNavMesh?r.addAgent(this):r.removeAgent(this))},injectControls:function(){const e=this.data;var t;for(let n=0;n<e.controls.length;n++)t=e.controls[n]+"-controls",this.el.components[t]||this.el.setAttribute(t,"")},updateNavLocation:function(){this.navGroup=null,this.navNode=null},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i){if(!i)return;const o=this.el,a=this.data;if(!a.enabled)return;this.updateVelocityCtrl();const s=this.velocityCtrl,l=this.velocity;if(s)if(i/1e3>.2?l.set(0,0,0):this.updateVelocity(i),a.constrainToNavMesh&&!1!==s.isNavMeshConstrained){if(l.lengthSq()<1e-5)return;e.copy(o.object3D.position),t.copy(l).multiplyScalar(i/1e3).add(e);const r=o.sceneEl.systems.nav;this.navGroup=null===this.navGroup?r.getGroup(e):this.navGroup,this.navNode=this.navNode||r.getNode(e,this.navGroup),this.navNode=r.clampStep(e,t,this.navGroup,this.navNode,n),o.object3D.position.copy(n)}else o.hasAttribute("velocity")?o.setAttribute("velocity",l):(o.object3D.position.x+=l.x*i/1e3,o.object3D.position.y+=l.y*i/1e3,o.object3D.position.z+=l.z*i/1e3)}}(),updateVelocityCtrl:function(){const e=this.data;if(e.enabled){for(let t=0,n=e.controls.length;t<n;t++){const n=this.el.components[e.controls[t]+"-controls"];if(n&&n.isVelocityActive())return void(this.velocityCtrl=n)}this.velocityCtrl=null}},updateVelocity:function(){const e=new THREE.Vector2,t=new THREE.Quaternion;return function(n){let r;const i=this.el,o=this.velocityCtrl,a=this.velocity,s=this.data;if(o){if(!o.getVelocityDelta){if(o.getVelocity)return void a.copy(o.getVelocity());if(o.getPositionDelta)return void a.copy(o.getPositionDelta(n).multiplyScalar(1e3/n));throw new Error("Incompatible movement controls: ",o)}r=o.getVelocityDelta(n)}if(i.hasAttribute("velocity")&&!s.constrainToNavMesh&&a.copy(this.el.getAttribute("velocity")),r&&s.enabled){const n=s.camera;t.copy(n.object3D.quaternion),t.premultiply(i.object3D.quaternion),r.applyQuaternion(t);const o=r.length();s.fly?(a.copy(r),a.multiplyScalar(16.66667*this.data.speed)):(e.set(r.x,r.z),e.setLength(o*this.data.speed*16.66667),a.x=e.x,a.z=e.y)}}}()})},function(e,t){e.exports=AFRAME.registerComponent("trackpad-controls",{schema:{enabled:{default:!0},enableNegX:{default:!0},enablePosX:{default:!0},enableNegZ:{default:!0},enablePosZ:{default:!0},mode:{default:"touch",oneOf:["swipe","touch","press"]}},init:function(){this.dVelocity=new THREE.Vector3,this.zVel=0,this.xVel=0,this.bindMethods()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.dVelocity.set(0,0,0)},remove:function(){this.pause()},addEventListeners:function(){const e=this.data,t=this.el.sceneEl;switch(t.addEventListener("axismove",this.onAxisMove),e.mode){case"swipe":case"touch":t.addEventListener("trackpadtouchstart",this.onTouchStart),t.addEventListener("trackpadtouchend",this.onTouchEnd);break;case"press":t.addEventListener("trackpaddown",this.onTouchStart),t.addEventListener("trackpadup",this.onTouchEnd)}},removeEventListeners:function(){const e=this.el.sceneEl;e.removeEventListener("axismove",this.onAxisMove),e.removeEventListener("trackpadtouchstart",this.onTouchStart),e.removeEventListener("trackpadtouchend",this.onTouchEnd),e.removeEventListener("trackpaddown",this.onTouchStart),e.removeEventListener("trackpadup",this.onTouchEnd)},isVelocityActive:function(){return this.data.enabled&&this.isMoving},getVelocityDelta:function(){return this.dVelocity.z=this.isMoving?-this.zVel:1,this.dVelocity.x=this.isMoving?this.xVel:1,this.dVelocity.clone()},bindMethods:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onAxisMove=this.onAxisMove.bind(this)},onTouchStart:function(e){switch(this.data.mode){case"swipe":this.canRecordAxis=!0,this.startingAxisData=[];break;case"touch":case"press":this.isMoving=!0}e.preventDefault()},onTouchEnd:function(e){"swipe"==this.data.mode&&(this.startingAxisData=[]),this.isMoving=!1,e.preventDefault()},onAxisMove:function(e){switch(this.data.mode){case"swipe":return this.handleSwipeAxis(e);case"touch":case"press":return this.handleTouchAxis(e)}},handleSwipeAxis:function(e){const t=this.data,n=e.detail.axis;if(0===this.startingAxisData.length&&this.canRecordAxis&&(this.canRecordAxis=!1,this.startingAxisData[0]=n[0],this.startingAxisData[1]=n[1]),this.startingAxisData.length>0){let e=0,r=0;t.enableNegX&&n[0]<this.startingAxisData[0]&&(e=-1),t.enablePosX&&n[0]>this.startingAxisData[0]&&(e=1),t.enablePosZ&&n[1]>this.startingAxisData[1]&&(r=-1),t.enableNegZ&&n[1]<this.startingAxisData[1]&&(r=1);const i=Math.abs(this.startingAxisData[1]-n[1]);Math.abs(this.startingAxisData[0]-n[0])>i?(this.zVel=0,this.xVel=e,this.isMoving=!0):(this.xVel=0,this.zVel=r,this.isMoving=!0)}},handleTouchAxis:function(e){const t=this.data,n=e.detail.axis;let r=0,i=0;t.enableNegX&&n[0]<0&&(r=-1),t.enablePosX&&n[0]>0&&(r=1),t.enablePosZ&&n[1]>0&&(i=-1),t.enableNegZ&&n[1]<0&&(i=1),Math.abs(n[0])>Math.abs(n[1])?(this.zVel=0,this.xVel=r):(this.xVel=0,this.zVel=i)}})},function(e,t,n){n(331),n(332),n(334),n(336),n(338)},function(e,t){const n={once:THREE.LoopOnce,repeat:THREE.LoopRepeat,pingpong:THREE.LoopPingPong};function r(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}e.exports=AFRAME.registerComponent("animation-mixer",{schema:{clip:{default:"*"},duration:{default:0},clampWhenFinished:{default:!1,type:"boolean"},crossFadeDuration:{default:0},loop:{default:"repeat",oneOf:Object.keys(n)},repetitions:{default:1/0,min:0},timeScale:{default:1}},init:function(){this.model=null,this.mixer=null,this.activeActions=[];const e=this.el.getObject3D("mesh");e?this.load(e):this.el.addEventListener("model-loaded",e=>{this.load(e.detail.model)})},load:function(e){const t=this.el;this.model=e,this.mixer=new THREE.AnimationMixer(e),this.mixer.addEventListener("loop",e=>{t.emit("animation-loop",{action:e.action,loopDelta:e.loopDelta})}),this.mixer.addEventListener("finished",e=>{t.emit("animation-finished",{action:e.action,direction:e.direction})}),this.data.clip&&this.update({})},remove:function(){this.mixer&&this.mixer.stopAllAction()},update:function(e){if(!e)return;const t=this.data,r=AFRAME.utils.diff(t,e);if("clip"in r)return this.stopAction(),void(t.clip&&this.playAction());this.activeActions.forEach(e=>{"duration"in r&&t.duration&&e.setDuration(t.duration),"clampWhenFinished"in r&&(e.clampWhenFinished=t.clampWhenFinished),("loop"in r||"repetitions"in r)&&e.setLoop(n[t.loop],t.repetitions),"timeScale"in r&&e.setEffectiveTimeScale(t.timeScale)})},stopAction:function(){const e=this.data;for(let t=0;t<this.activeActions.length;t++)e.crossFadeDuration?this.activeActions[t].fadeOut(e.crossFadeDuration):this.activeActions[t].stop();this.activeActions.length=0},playAction:function(){if(!this.mixer)return;const e=this.model,t=this.data,i=e.animations||(e.geometry||{}).animations||[];if(!i.length)return;const o=(a=t.clip,new RegExp("^"+a.split(/\*+/).map(r).join(".*")+"$"));var a;for(let r,s=0;r=i[s];s++)if(r.name.match(o)){const i=this.mixer.clipAction(r,e);i.enabled=!0,i.clampWhenFinished=t.clampWhenFinished,t.duration&&i.setDuration(t.duration),1!==t.timeScale&&i.setEffectiveTimeScale(t.timeScale),i.setLoop(n[t.loop],t.repetitions).fadeIn(t.crossFadeDuration).play(),this.activeActions.push(i)}},tick:function(e,t){this.mixer&&!isNaN(t)&&this.mixer.update(t/1e3)}})},function(e,t,n){THREE.ColladaLoader=n(333),e.exports.Component=AFRAME.registerComponent("collada-model-legacy",{schema:{type:"asset"},init:function(){this.model=null,this.loader=new THREE.ColladaLoader},update:function(){var e=this,t=this.el,n=this.data,r=this.el.sceneEl.systems.renderer;n&&(this.remove(),this.loader.load(n,(function(n){e.model=n.scene,e.model.traverse((function(e){if(e.isMesh){var t=e.material;t.color&&r.applyColorCorrection(t.color),t.map&&r.applyColorCorrection(t.map),t.emissive&&r.applyColorCorrection(t.emissive),t.emissiveMap&&r.applyColorCorrection(t.emissiveMap)}})),t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"collada",model:e.model})})))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t){e.exports=THREE.ColladaLoader=function(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager},THREE.ColladaLoader.prototype={constructor:THREE.ColladaLoader,crossOrigin:"anonymous",load:function(e,t,n,r){var i=this,o=void 0===i.path?THREE.LoaderUtils.extractUrlBase(e):i.path,a=new THREE.FileLoader(i.manager);a.setPath(i.path),a.load(e,(function(e){t(i.parse(e,o))}),n,r)},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},options:{set convertUpAxis(e){console.warn("THREE.ColladaLoader: options.convertUpAxis() has been removed. Up axis is converted automatically.")}},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(e,t){function n(e,t){for(var n=[],r=e.childNodes,i=0,o=r.length;i<o;i++){var a=r[i];a.nodeName===t&&n.push(a)}return n}function r(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=t[r];return n}function i(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=parseFloat(t[r]);return n}function o(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=parseInt(t[r]);return n}function a(e){return e.substring(1)}function s(e){return 0===Object.keys(e).length}function l(e){return void 0!==e&&!0===e.hasAttribute("meter")?parseFloat(e.getAttribute("meter")):1}function c(e){return void 0!==e?e.textContent:"Y_UP"}function u(e,t,r,i){var o=n(e,t)[0];if(void 0!==o)for(var a=n(o,r),s=0;s<a.length;s++)i(a[s])}function h(e,t){for(var n in e){e[n].build=t(e[n])}}function d(e,t){return void 0!==e.build||(e.build=t(e)),e.build}function f(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var o=a(i.getAttribute("source")),s=i.getAttribute("semantic");t.inputs[s]=o}}return t}function p(e){var t={},n=e.getAttribute("target").split("/"),r=n.shift(),i=n.shift(),o=-1!==i.indexOf("("),s=-1!==i.indexOf(".");if(s)n=i.split("."),i=n.shift(),t.member=n.shift();else if(o){var l=i.split("(");i=l.shift();for(var c=0;c<l.length;c++)l[c]=parseInt(l[c].replace(/\)/,""));t.indices=l}return t.id=r,t.sid=i,t.arraySyntax=o,t.memberSyntax=s,t.sampler=a(e.getAttribute("source")),t}function m(e){var t=[],n=e.channels,r=e.samplers,i=e.sources;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=r[a.sampler],l=s.inputs.INPUT,c=s.inputs.OUTPUT;x(v(a,i[l],i[c]),t)}return t}function g(e){return d(qe.animations[e],m)}function v(e,t,n){var r,i,o,a,s,l,c=qe.nodes[e.id],u=Ie(c.id),h=c.transforms[e.sid],d=c.matrix.clone().transpose(),f={};switch(h){case"matrix":for(o=0,a=t.array.length;o<a;o++)if(r=t.array[o],i=o*n.stride,void 0===f[r]&&(f[r]={}),!0===e.arraySyntax){var p=n.array[i],m=e.indices[0]+4*e.indices[1];f[r][m]=p}else for(s=0,l=n.stride;s<l;s++)f[r][s]=n.array[i+s];break;case"translate":case"rotate":case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',h)}var g=function(e,t){var n=[];for(var r in e)n.push({time:parseFloat(r),value:e[r]});n.sort((function(e,t){return e.time-t.time}));for(var i=0;i<16;i++)_(n,i,t.elements[i]);return n}(f,d);return{name:u.uuid,keyframes:g}}var y=new THREE.Vector3,b=new THREE.Vector3,w=new THREE.Quaternion;function x(e,t){for(var n=e.keyframes,r=e.name,i=[],o=[],a=[],s=[],l=0,c=n.length;l<c;l++){var u=n[l],h=u.time,d=u.value;Ae.fromArray(d).transpose(),Ae.decompose(y,w,b),i.push(h),o.push(y.x,y.y,y.z),a.push(w.x,w.y,w.z,w.w),s.push(b.x,b.y,b.z)}return o.length>0&&t.push(new THREE.VectorKeyframeTrack(r+".position",i,o)),a.length>0&&t.push(new THREE.QuaternionKeyframeTrack(r+".quaternion",i,a)),s.length>0&&t.push(new THREE.VectorKeyframeTrack(r+".scale",i,s)),t}function _(e,t,n){var r,i,o,a=!0;for(i=0,o=e.length;i<o;i++)void 0===(r=e[i]).value[t]?r.value[t]=null:a=!1;if(!0===a)for(i=0,o=e.length;i<o;i++)(r=e[i]).value[t]=n;else!function(e,t){for(var n,r,i=0,o=e.length;i<o;i++){var a=e[i];if(null===a.value[t]){if(n=E(e,i,t),r=A(e,i,t),null===n){a.value[t]=r.value[t];continue}if(null===r){a.value[t]=n.value[t];continue}S(a,n,r,t)}}}(e,t)}function E(e,t,n){for(;t>=0;){var r=e[t];if(null!==r.value[n])return r;t--}return null}function A(e,t,n){for(;t<e.length;){var r=e[t];if(null!==r.value[n])return r;t++}return null}function S(e,t,n,r){n.time-t.time!==0?e.value[r]=(e.time-t.time)*(n.value[r]-t.value[r])/(n.time-t.time)+t.value[r]:e.value[r]=t.value[r]}function M(e){for(var t=[],n=e.name,r=e.end-e.start||-1,i=e.animations,o=0,a=i.length;o<a;o++)for(var s=g(i[o]),l=0,c=s.length;l<c;l++)t.push(s[l]);return new THREE.AnimationClip(n,r,t)}function T(e){return d(qe.clips[e],M)}function C(e){for(var t={sources:{}},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"bind_shape_matrix":t.bindShapeMatrix=i(o.textContent);break;case"source":var a=o.getAttribute("id");t.sources[a]=ie(o);break;case"joints":t.joints=O(o);break;case"vertex_weights":t.vertexWeights=R(o)}}return t}function O(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var o=i.getAttribute("semantic"),s=a(i.getAttribute("source"));t.inputs[o]=s}}return t}function R(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var s=i.getAttribute("semantic"),l=a(i.getAttribute("source")),c=parseInt(i.getAttribute("offset"));t.inputs[s]={id:l,offset:c};break;case"vcount":t.vcount=o(i.textContent);break;case"v":t.v=o(i.textContent)}}return t}function k(e){var t={id:e.id},n=qe.geometries[t.id];return void 0!==e.skin&&(t.skin=function(e){var t,n,r,i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},o=e.sources,a=e.vertexWeights,s=a.vcount,l=a.v,c=a.inputs.JOINT.offset,u=a.inputs.WEIGHT.offset,h=e.sources[e.joints.inputs.JOINT],d=e.sources[e.joints.inputs.INV_BIND_MATRIX],f=o[a.inputs.WEIGHT.id].array,p=0;for(t=0,r=s.length;t<r;t++){var m=s[t],g=[];for(n=0;n<m;n++){var v=l[p+c],y=l[p+u],b=f[y];g.push({index:v,weight:b}),p+=2}for(g.sort(E),n=0;n<4;n++){var w=g[n];void 0!==w?(i.indices.array.push(w.index),i.weights.array.push(w.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}e.bindShapeMatrix?i.bindMatrix=(new THREE.Matrix4).fromArray(e.bindShapeMatrix).transpose():i.bindMatrix=(new THREE.Matrix4).identity();for(t=0,r=h.array.length;t<r;t++){var x=h.array[t],_=(new THREE.Matrix4).fromArray(d.array,t*d.stride).transpose();i.joints.push({name:x,boneInverse:_})}return i;function E(e,t){return t.weight-e.weight}}(e.skin),n.sources.skinIndices=t.skin.indices,n.sources.skinWeights=t.skin.weights),t}function P(e){return void 0!==e.build?e.build:e.init_from}function L(e){var t=qe.images[e];return void 0!==t?d(t,P):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",e),null)}function D(e){for(var t={surfaces:{},samplers:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"newparam":I(i,t);break;case"technique":t.technique=B(i);break;case"extra":t.extra=G(i)}}return t}function I(e,t){for(var n=e.getAttribute("sid"),r=0,i=e.childNodes.length;r<i;r++){var o=e.childNodes[r];if(1===o.nodeType)switch(o.nodeName){case"surface":t.surfaces[n]=N(o);break;case"sampler2D":t.samplers[n]=j(o)}}}function N(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"init_from":t.init_from=i.textContent}}return t}function j(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"source":t.source=i.textContent}}return t}function B(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"constant":case"lambert":case"blinn":case"phong":t.type=i.nodeName,t.parameters=F(i)}}return t}function F(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":t[i.nodeName]=z(i);break;case"transparent":t[i.nodeName]={opaque:i.getAttribute("opaque"),data:z(i)}}}return t}function z(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"color":t[o.nodeName]=i(o.textContent);break;case"float":t[o.nodeName]=parseFloat(o.textContent);break;case"texture":t[o.nodeName]={id:o.getAttribute("texture"),extra:H(o)}}}return t}function H(e){for(var t={technique:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"extra":U(i,t)}}return t}function U(e,t){for(var n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique":V(i,t)}}}function V(e,t){for(var n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":t.technique[i.nodeName]=parseFloat(i.textContent);break;case"wrapU":case"wrapV":"TRUE"===i.textContent.toUpperCase()?t.technique[i.nodeName]=1:"FALSE"===i.textContent.toUpperCase()?t.technique[i.nodeName]=0:t.technique[i.nodeName]=parseInt(i.textContent)}}}function G(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique":t.technique=W(i)}}return t}function W(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"double_sided":t[i.nodeName]=parseInt(i.textContent)}}return t}function q(e){return e}function X(e){var t,n,r=(t=e.url,d(qe.effects[t],q)),i=r.profile.technique,o=r.profile.extra;switch(i.type){case"phong":case"blinn":n=new THREE.MeshPhongMaterial;break;case"lambert":n=new THREE.MeshLambertMaterial;break;default:n=new THREE.MeshBasicMaterial}function a(e){var t=r.profile.samplers[e.id],n=null;void 0!==t?n=L(r.profile.surfaces[t.source].init_from):(console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),n=L(e.id));if(null!==n){var i=function(e){var t,n=e.slice(2+(e.lastIndexOf(".")-1>>>0));switch(n=n.toLowerCase()){case"tga":t=ze;break;default:t=Ue}return t}(n);if(void 0!==i){var o=i.load(n),a=e.extra;if(void 0!==a&&void 0!==a.technique&&!1===s(a.technique)){var l=a.technique;o.wrapS=l.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,o.wrapT=l.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,o.offset.set(l.offsetU||0,l.offsetV||0),o.repeat.set(l.repeatU||1,l.repeatV||1)}else o.wrapS=THREE.RepeatWrapping,o.wrapT=THREE.RepeatWrapping;return o}return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",n),null}return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",e.id),null}n.name=e.name;var l=i.parameters;for(var c in l){var u=l[c];switch(c){case"diffuse":u.color&&n.color.fromArray(u.color),u.texture&&(n.map=a(u.texture));break;case"specular":u.color&&n.specular&&n.specular.fromArray(u.color),u.texture&&(n.specularMap=a(u.texture));break;case"bump":u.texture&&(n.normalMap=a(u.texture));break;case"ambient":u.texture&&(n.lightMap=a(u.texture));break;case"shininess":u.float&&n.shininess&&(n.shininess=u.float);break;case"emission":u.color&&n.emissive&&n.emissive.fromArray(u.color),u.texture&&(n.emissiveMap=a(u.texture))}}var h=l.transparent,f=l.transparency;if(void 0===f&&h&&(f={float:1}),void 0===h&&f&&(h={opaque:"A_ONE",data:{color:[1,1,1,1]}}),h&&f)if(h.data.texture)n.transparent=!0;else{var p=h.data.color;switch(h.opaque){case"A_ONE":n.opacity=p[3]*f.float;break;case"RGB_ZERO":n.opacity=1-p[0]*f.float;break;case"A_ZERO":n.opacity=1-p[3]*f.float;break;case"RGB_ONE":n.opacity=p[0]*f.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',h.opaque)}n.opacity<1&&(n.transparent=!0)}return void 0!==o&&void 0!==o.technique&&1===o.technique.double_sided&&(n.side=THREE.DoubleSide),n}function Y(e){return d(qe.materials[e],X)}function K(e){for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];switch(n.nodeName){case"technique_common":return Q(n)}}return{}}function Q(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"perspective":case"orthographic":t.technique=r.nodeName,t.parameters=Z(r)}}return t}function Z(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":t[r.nodeName]=parseFloat(r.textContent)}}return t}function J(e){var t;switch(e.optics.technique){case"perspective":t=new THREE.PerspectiveCamera(e.optics.parameters.yfov,e.optics.parameters.aspect_ratio,e.optics.parameters.znear,e.optics.parameters.zfar);break;case"orthographic":var n=e.optics.parameters.ymag,r=e.optics.parameters.xmag,i=e.optics.parameters.aspect_ratio;r=void 0===r?n*i:r,n=void 0===n?r/i:n,r*=.5,n*=.5,t=new THREE.OrthographicCamera(-r,r,n,-n,e.optics.parameters.znear,e.optics.parameters.zfar);break;default:t=new THREE.PerspectiveCamera}return t.name=e.name,t}function $(e){var t=qe.cameras[e];return void 0!==t?d(t,J):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",e),null)}function ee(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"directional":case"point":case"spot":case"ambient":t.technique=i.nodeName,t.parameters=te(i)}}return t}function te(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"color":var a=i(o.textContent);t.color=(new THREE.Color).fromArray(a);break;case"falloff_angle":t.falloffAngle=parseFloat(o.textContent);break;case"quadratic_attenuation":var s=parseFloat(o.textContent);t.distance=s?Math.sqrt(1/s):0}}return t}function ne(e){var t;switch(e.technique){case"directional":t=new THREE.DirectionalLight;break;case"point":t=new THREE.PointLight;break;case"spot":t=new THREE.SpotLight;break;case"ambient":t=new THREE.AmbientLight}return e.parameters.color&&t.color.copy(e.parameters.color),e.parameters.distance&&(t.distance=e.parameters.distance),t}function re(e){var t=qe.lights[e];return void 0!==t?d(t,ne):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",e),null)}function ie(e){for(var t={array:[],stride:3},o=0;o<e.childNodes.length;o++){var a=e.childNodes[o];if(1===a.nodeType)switch(a.nodeName){case"float_array":t.array=i(a.textContent);break;case"Name_array":t.array=r(a.textContent);break;case"technique_common":var s=n(a,"accessor")[0];void 0!==s&&(t.stride=parseInt(s.getAttribute("stride")))}}return t}function oe(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];1===r.nodeType&&(t[r.getAttribute("semantic")]=a(r.getAttribute("source")))}return t}function ae(e){for(var t={type:e.nodeName,material:e.getAttribute("material"),count:parseInt(e.getAttribute("count")),inputs:{},stride:0,hasUV:!1},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var s=a(i.getAttribute("source")),l=i.getAttribute("semantic"),c=parseInt(i.getAttribute("offset")),u=parseInt(i.getAttribute("set")),h=u>0?l+u:l;t.inputs[h]={id:s,offset:c},t.stride=Math.max(t.stride,c+1),"TEXCOORD"===l&&(t.hasUV=!0);break;case"vcount":t.vcount=o(i.textContent);break;case"p":t.p=o(i.textContent)}}return t}function se(e){for(var t=0,n=0,r=e.length;n<r;n++){!0===e[n].hasUV&&t++}t>0&&t<e.length&&(e.uvsNeedsFix=!0)}function le(e){var t={},n=e.sources,r=e.vertices,i=e.primitives;if(0===i.length)return{};var o=function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];void 0===t[r.type]&&(t[r.type]=[]),t[r.type].push(r)}return t}(i);for(var a in o){var s=o[a];se(s),t[a]=ce(s,n,r)}return t}function ce(e,t,n){for(var r={},i={array:[],stride:0},o={array:[],stride:0},a={array:[],stride:0},s={array:[],stride:0},l={array:[],stride:0},c=[],u=4,h=[],d=4,f=new THREE.BufferGeometry,p=[],m=0,g=0;g<e.length;g++){var v=e[g],y=v.inputs,b=0;switch(v.type){case"lines":case"linestrips":b=2*v.count;break;case"triangles":b=3*v.count;break;case"polylist":for(var w=0;w<v.count;w++){var x=v.vcount[w];switch(x){case 3:b+=3;break;case 4:b+=6;break;default:b+=3*(x-2)}}break;default:console.warn("THREE.ColladaLoader: Unknow primitive type:",v.type)}for(var _ in f.addGroup(m,b,g),m+=b,v.material&&p.push(v.material),y){var E=y[_];switch(_){case"VERTEX":for(var A in n){var S=n[A];switch(A){case"POSITION":var M=i.array.length;if(ue(v,t[S],E.offset,i.array),i.stride=t[S].stride,t.skinWeights&&t.skinIndices&&(ue(v,t.skinIndices,E.offset,c),ue(v,t.skinWeights,E.offset,h)),!1===v.hasUV&&!0===e.uvsNeedsFix){b=(i.array.length-M)/i.stride;for(var T=0;T<b;T++)a.array.push(0,0)}break;case"NORMAL":ue(v,t[S],E.offset,o.array),o.stride=t[S].stride;break;case"COLOR":ue(v,t[S],E.offset,l.array),l.stride=t[S].stride;break;case"TEXCOORD":ue(v,t[S],E.offset,a.array),a.stride=t[S].stride;break;case"TEXCOORD1":ue(v,t[S],E.offset,s.array),a.stride=t[S].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',A)}}break;case"NORMAL":ue(v,t[E.id],E.offset,o.array),o.stride=t[E.id].stride;break;case"COLOR":ue(v,t[E.id],E.offset,l.array),l.stride=t[E.id].stride;break;case"TEXCOORD":ue(v,t[E.id],E.offset,a.array),a.stride=t[E.id].stride;break;case"TEXCOORD1":ue(v,t[E.id],E.offset,s.array),s.stride=t[E.id].stride}}}return i.array.length>0&&f.addAttribute("position",new THREE.Float32BufferAttribute(i.array,i.stride)),o.array.length>0&&f.addAttribute("normal",new THREE.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&f.addAttribute("color",new THREE.Float32BufferAttribute(l.array,l.stride)),a.array.length>0&&f.addAttribute("uv",new THREE.Float32BufferAttribute(a.array,a.stride)),s.array.length>0&&f.addAttribute("uv2",new THREE.Float32BufferAttribute(s.array,s.stride)),c.length>0&&f.addAttribute("skinIndex",new THREE.Float32BufferAttribute(c,u)),h.length>0&&f.addAttribute("skinWeight",new THREE.Float32BufferAttribute(h,d)),r.data=f,r.type=e[0].type,r.materialKeys=p,r}function ue(e,t,n,r){var i=e.p,o=e.stride,a=e.vcount;function s(e){for(var t=i[e+n]*c,o=t+c;t<o;t++)r.push(l[t])}var l=t.array,c=t.stride;if(void 0!==e.vcount)for(var u=0,h=0,d=a.length;h<d;h++){var f=a[h];if(4===f){var p=u+1*o,m=u+2*o,g=u+3*o;s(u+0*o),s(p),s(g),s(p),s(m),s(g)}else if(3===f){p=u+1*o,m=u+2*o;s(u+0*o),s(p),s(m)}else if(f>4)for(var v=1,y=f-2;v<=y;v++){p=u+o*v,m=u+o*(v+1);s(u+0*o),s(p),s(m)}u+=o*f}else for(h=0,d=i.length;h<d;h+=o)s(h)}function he(e){return d(qe.geometries[e],le)}function de(e){return void 0!==e.build?e.build:e}function fe(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"joint":t.joints[r.getAttribute("sid")]=pe(r);break;case"link":t.links.push(ge(r))}}}function pe(e){for(var t,n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"prismatic":case"revolute":t=me(r)}}return t}function me(e,t){t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",axis:new THREE.Vector3,limits:{min:0,max:0},type:e.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"axis":var o=i(r.textContent);t.axis.fromArray(o);break;case"limits":var a=r.getElementsByTagName("max")[0],s=r.getElementsByTagName("min")[0];t.limits.max=parseFloat(a.textContent),t.limits.min=parseFloat(s.textContent)}}return t.limits.min>=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}function ge(e){for(var t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",attachments:[],transforms:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"attachment_full":t.attachments.push(ve(r));break;case"matrix":case"translate":case"rotate":t.transforms.push(ye(r))}}return t}function ve(e){for(var t={joint:e.getAttribute("joint").split("/").pop(),transforms:[],links:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"link":t.links.push(ge(r));break;case"matrix":case"translate":case"rotate":t.transforms.push(ye(r))}}return t}function ye(e){var t={type:e.nodeName},n=i(e.textContent);switch(t.type){case"matrix":t.obj=new THREE.Matrix4,t.obj.fromArray(n).transpose();break;case"translate":t.obj=new THREE.Vector3,t.obj.fromArray(n);break;case"rotate":t.obj=new THREE.Vector3,t.obj.fromArray(n),t.angle=THREE.Math.degToRad(n[3])}return t}function be(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"technique_common":we(r,t)}}}function we(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"inertia":t.inertia=i(r.textContent);break;case"mass":t.mass=i(r.textContent)[0]}}}function xe(e){for(var t={target:e.getAttribute("target").split("/").pop()},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"axis":var i=r.getElementsByTagName("param")[0];t.axis=i.textContent;var o=t.axis.split("inst_").pop().split("axis")[0];t.jointIndex=o.substr(0,o.length-1)}}return t}function _e(e){return void 0!==e.build?e.build:e}function Ee(e){for(var t=[],n=Be.querySelector('[id="'+e.id+'"]'),r=0;r<n.childNodes.length;r++){var o=n.childNodes[r];if(1===o.nodeType)switch(o.nodeName){case"matrix":var a=i(o.textContent),s=(new THREE.Matrix4).fromArray(a).transpose();t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:s});break;case"translate":case"scale":a=i(o.textContent);var l=(new THREE.Vector3).fromArray(a);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:l});break;case"rotate":a=i(o.textContent),l=(new THREE.Vector3).fromArray(a);var c=THREE.Math.degToRad(a[3]);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:l,angle:c})}}return t}var Ae=new THREE.Matrix4,Se=new THREE.Vector3;function Me(e){for(var t={name:e.getAttribute("name")||"",type:e.getAttribute("type"),id:e.getAttribute("id"),sid:e.getAttribute("sid"),matrix:new THREE.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"node":t.nodes.push(r.getAttribute("id")),Me(r);break;case"instance_camera":t.instanceCameras.push(a(r.getAttribute("url")));break;case"instance_controller":t.instanceControllers.push(Te(r));break;case"instance_light":t.instanceLights.push(a(r.getAttribute("url")));break;case"instance_geometry":t.instanceGeometries.push(Te(r));break;case"instance_node":t.instanceNodes.push(a(r.getAttribute("url")));break;case"matrix":var o=i(r.textContent);t.matrix.multiply(Ae.fromArray(o).transpose()),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"translate":o=i(r.textContent);Se.fromArray(o),t.matrix.multiply(Ae.makeTranslation(Se.x,Se.y,Se.z)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"rotate":o=i(r.textContent);var s=THREE.Math.degToRad(o[3]);t.matrix.multiply(Ae.makeRotationAxis(Se.fromArray(o),s)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"scale":o=i(r.textContent);t.matrix.scale(Se.fromArray(o)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"extra":break;default:console.log(r)}}return De(t.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",t.id):qe.nodes[t.id]=t,t}function Te(e){for(var t={id:a(e.getAttribute("url")),materials:{},skeletons:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"bind_material":for(var i=r.getElementsByTagName("instance_material"),o=0;o<i.length;o++){var s=i[o],l=s.getAttribute("symbol"),c=s.getAttribute("target");t.materials[l]=a(c)}break;case"skeleton":t.skeletons.push(a(r.textContent))}}return t}function Ce(e,t){var n,r,i,o=[],a=[];for(n=0;n<e.length;n++){var s=e[n];if(De(s))Oe(Ie(s),t,o);else if(i=s,void 0!==qe.visualScenes[i])for(var l=qe.visualScenes[s].children,c=0;c<l.length;c++){var u=l[c];if("JOINT"===u.type)Oe(Ie(u.id),t,o)}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",s)}for(n=0;n<t.length;n++)for(c=0;c<o.length;c++)if((r=o[c]).bone.name===t[n].name){a[n]=r,r.processed=!0;break}for(n=0;n<o.length;n++)!1===(r=o[n]).processed&&(a.push(r),r.processed=!0);var h=[],d=[];for(n=0;n<a.length;n++)r=a[n],h.push(r.bone),d.push(r.boneInverse);return new THREE.Skeleton(h,d)}function Oe(e,t,n){e.traverse((function(e){if(!0===e.isBone){for(var r,i=0;i<t.length;i++){var o=t[i];if(o.name===e.name){r=o.boneInverse;break}}void 0===r&&(r=new THREE.Matrix4),n.push({bone:e,boneInverse:r,processed:!1})}}))}function Re(e){for(var t,n=[],r=e.matrix,i=e.nodes,o=e.type,a=e.instanceCameras,s=e.instanceControllers,l=e.instanceLights,c=e.instanceGeometries,u=e.instanceNodes,h=0,f=i.length;h<f;h++)n.push(Ie(i[h]));for(h=0,f=a.length;h<f;h++){var p=$(a[h]);null!==p&&n.push(p.clone())}for(h=0,f=s.length;h<f;h++)for(var m=s[h],g=(t=m.id,d(qe.controllers[t],k)),v=Le(he(g.id),m.materials),y=Ce(m.skeletons,g.skin.joints),b=0,w=v.length;b<w;b++){var x;(x=v[b]).isSkinnedMesh&&(x.bind(y,g.skin.bindMatrix),x.normalizeSkinWeights()),n.push(x)}for(h=0,f=l.length;h<f;h++){var _=re(l[h]);null!==_&&n.push(_.clone())}for(h=0,f=c.length;h<f;h++)for(b=0,w=(v=Le(he((m=c[h]).id),m.materials)).length;b<w;b++)n.push(v[b]);for(h=0,f=u.length;h<f;h++)n.push(Ie(u[h]).clone());if(0===i.length&&1===n.length)x=n[0];else{x="JOINT"===o?new THREE.Bone:new THREE.Group;for(h=0;h<n.length;h++)x.add(n[h])}return""===x.name&&(x.name="JOINT"===o?e.sid:e.name),x.matrix.copy(r),x.matrix.decompose(x.position,x.quaternion,x.scale),x}var ke=new THREE.MeshBasicMaterial({color:16711935});function Pe(e,t){for(var n=[],r=0,i=e.length;r<i;r++){var o=t[e[r]];void 0===o?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",e[r]),n.push(ke)):n.push(Y(o))}return n}function Le(e,t){var n=[];for(var r in e){var i=e[r],o=Pe(i.materialKeys,t);0===o.length&&("lines"===r||"linestrips"===r?o.push(new THREE.LineBasicMaterial):o.push(new THREE.MeshPhongMaterial));var a=void 0!==i.data.attributes.skinIndex;if(a)for(var s=0,l=o.length;s<l;s++)o[s].skinning=!0;var c,u=1===o.length?o[0]:o;switch(r){case"lines":c=new THREE.LineSegments(i.data,u);break;case"linestrips":c=new THREE.Line(i.data,u);break;case"triangles":case"polylist":c=a?new THREE.SkinnedMesh(i.data,u):new THREE.Mesh(i.data,u)}n.push(c)}return n}function De(e){return void 0!==qe.nodes[e]}function Ie(e){return d(qe.nodes[e],Re)}function Ne(e){var t=new THREE.Group;t.name=e.name;for(var n=e.children,r=0;r<n.length;r++){var i=n[r];t.add(Ie(i.id))}return t}function je(e){return d(qe.visualScenes[e],Ne)}if(0===e.length)return{scene:new THREE.Scene};var Be=n((new DOMParser).parseFromString(e,"application/xml"),"COLLADA")[0],Fe=Be.getAttribute("version");console.log("THREE.ColladaLoader: File version",Fe);var ze,He=function(e){return{unit:l(n(e,"unit")[0]),upAxis:c(n(e,"up_axis")[0])}}(n(Be,"asset")[0]),Ue=new THREE.TextureLoader(this.manager);Ue.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin),THREE.TGALoader&&(ze=new THREE.TGALoader(this.manager)).setPath(this.resourcePath||t);var Ve=[],Ge={},We=0,qe={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};u(Be,"library_animations","animation",(function(e){for(var t={sources:{},samplers:{},channels:{}},n=0,r=e.childNodes.length;n<r;n++){var i,o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"source":i=o.getAttribute("id"),t.sources[i]=ie(o);break;case"sampler":i=o.getAttribute("id"),t.samplers[i]=f(o);break;case"channel":i=o.getAttribute("target"),t.channels[i]=p(o);break;default:console.log(o)}}qe.animations[e.getAttribute("id")]=t})),u(Be,"library_animation_clips","animation_clip",(function(e){for(var t={name:e.getAttribute("id")||"default",start:parseFloat(e.getAttribute("start")||0),end:parseFloat(e.getAttribute("end")||0),animations:[]},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"instance_animation":t.animations.push(a(i.getAttribute("url")))}}qe.clips[e.getAttribute("id")]=t})),u(Be,"library_controllers","controller",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"skin":t.id=a(i.getAttribute("source")),t.skin=C(i);break;case"morph":t.id=a(i.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.")}}qe.controllers[e.getAttribute("id")]=t})),u(Be,"library_images","image",(function(e){var t={init_from:n(e,"init_from")[0].textContent};qe.images[e.getAttribute("id")]=t})),u(Be,"library_effects","effect",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"profile_COMMON":t.profile=D(i)}}qe.effects[e.getAttribute("id")]=t})),u(Be,"library_materials","material",(function(e){for(var t={name:e.getAttribute("name")},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"instance_effect":t.url=a(i.getAttribute("url"))}}qe.materials[e.getAttribute("id")]=t})),u(Be,"library_cameras","camera",(function(e){for(var t={name:e.getAttribute("name")},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"optics":t.optics=K(i)}}qe.cameras[e.getAttribute("id")]=t})),u(Be,"library_lights","light",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique_common":t=ee(i)}}qe.lights[e.getAttribute("id")]=t})),u(Be,"library_geometries","geometry",(function(e){var t={name:e.getAttribute("name"),sources:{},vertices:{},primitives:[]},r=n(e,"mesh")[0];if(void 0!==r){for(var i=0;i<r.childNodes.length;i++){var o=r.childNodes[i];if(1===o.nodeType){var a=o.getAttribute("id");switch(o.nodeName){case"source":t.sources[a]=ie(o);break;case"vertices":t.vertices=oe(o);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",o.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":t.primitives.push(ae(o));break;default:console.log(o)}}}qe.geometries[e.getAttribute("id")]=t}})),u(Be,"library_nodes","node",Me),u(Be,"library_visual_scenes","visual_scene",(function(e){var t={name:e.getAttribute("name"),children:[]};!function(e){for(var t=e.getElementsByTagName("node"),n=0;n<t.length;n++){var r=t[n];!1===r.hasAttribute("id")&&r.setAttribute("id","three_default_"+We++)}}(e);for(var r=n(e,"node"),i=0;i<r.length;i++)t.children.push(Me(r[i]));qe.visualScenes[e.getAttribute("id")]=t})),u(Be,"library_kinematics_models","kinematics_model",(function(e){for(var t={name:e.getAttribute("name")||"",joints:{},links:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"technique_common":fe(r,t)}}qe.kinematicsModels[e.getAttribute("id")]=t})),u(Be,"library_physics_models","physics_model",(function(e){for(var t={name:e.getAttribute("name")||"",rigidBodies:{}},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"rigid_body":t.rigidBodies[r.getAttribute("name")]={},be(r,t.rigidBodies[r.getAttribute("name")])}}qe.physicsModels[e.getAttribute("id")]=t})),u(Be,"scene","instance_kinematics_scene",(function(e){for(var t={bindJointAxis:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"bind_joint_axis":t.bindJointAxis.push(xe(r))}}qe.kinematicsScenes[a(e.getAttribute("url"))]=t})),h(qe.animations,m),h(qe.clips,M),h(qe.controllers,k),h(qe.images,P),h(qe.effects,q),h(qe.materials,X),h(qe.cameras,J),h(qe.lights,ne),h(qe.geometries,le),h(qe.visualScenes,Ne),function(){var e=qe.clips;if(!0===s(e)){if(!1===s(qe.animations)){var t=[];for(var n in qe.animations)for(var r=g(n),i=0,o=r.length;i<o;i++)t.push(r[i]);Ve.push(new THREE.AnimationClip("default",-1,t))}}else for(var n in e)Ve.push(T(n))}(),function(){var e=Object.keys(qe.kinematicsModels)[0],t=Object.keys(qe.kinematicsScenes)[0],n=Object.keys(qe.visualScenes)[0];if(void 0!==e&&void 0!==t){for(var r,i=(r=e,d(qe.kinematicsModels[r],de)),o=function(e){return d(qe.kinematicsScenes[e],_e)}(t),a=je(n),s=o.bindJointAxis,l={},c=0,u=s.length;c<u;c++){var h=s[c],f=Be.querySelector('[sid="'+h.target+'"]');if(f){var p=f.parentElement;g(h.jointIndex,p)}}var m=new THREE.Matrix4;Ge={joints:i&&i.joints,getJointValue:function(e){var t=l[e];if(t)return t.position;console.warn("THREE.ColladaLoader: Joint "+e+" doesn't exist.")},setJointValue:function(e,t){var n=l[e];if(n){var r=n.joint;if(t>r.limits.max||t<r.limits.min)console.warn("THREE.ColladaLoader: Joint "+e+" value "+t+" outside of limits (min: "+r.limits.min+", max: "+r.limits.max+").");else if(r.static)console.warn("THREE.ColladaLoader: Joint "+e+" is static.");else{var i=n.object,o=r.axis,a=n.transforms;Ae.identity();for(var s=0;s<a.length;s++){var c=a[s];if(c.sid&&-1!==c.sid.indexOf(e))switch(r.type){case"revolute":Ae.multiply(m.makeRotationAxis(o,THREE.Math.degToRad(t)));break;case"prismatic":Ae.multiply(m.makeTranslation(o.x*t,o.y*t,o.z*t));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+r.type)}else switch(c.type){case"matrix":Ae.multiply(c.obj);break;case"translate":Ae.multiply(m.makeTranslation(c.obj.x,c.obj.y,c.obj.z));break;case"scale":Ae.scale(c.obj);break;case"rotate":Ae.multiply(m.makeRotationAxis(c.obj,c.angle))}}i.matrix.copy(Ae),i.matrix.decompose(i.position,i.quaternion,i.scale),l[e].position=t}}else console.log("THREE.ColladaLoader: "+e+" does not exist.")}}}function g(e,t){var n=t.getAttribute("name"),r=i.joints[e];a.traverse((function(i){i.name===n&&(l[e]={object:i,transforms:Ee(t),joint:r,position:r.zeroPosition})}))}}();var Xe=function(e){return je(a(n(e,"instance_visual_scene")[0].getAttribute("url")))}(n(Be,"scene")[0]);return"Z_UP"===He.upAxis&&Xe.quaternion.setFromEuler(new THREE.Euler(-Math.PI/2,0,0)),Xe.scale.multiplyScalar(He.unit),{animations:Ve,kinematics:Ge,library:qe,scene:Xe}}}},function(e,t,n){THREE.FBXLoader=n(335),e.exports=AFRAME.registerComponent("fbx-model",{schema:{src:{type:"asset"},crossorigin:{default:""}},init:function(){this.model=null},update:function(){const e=this.data;if(!e.src)return;this.remove();const t=new THREE.FBXLoader;e.crossorigin&&t.setCrossOrigin(e.crossorigin),t.load(e.src,this.load.bind(this))},load:function(e){this.model=e,this.el.setObject3D("mesh",e),this.el.emit("model-loaded",{format:"fbx",model:e})},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t){e.exports=THREE.FBXLoader=function(){var e,t,n;function r(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager}function i(e){this.textureLoader=e}function o(){}function a(){}function s(){}function l(){}function c(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t}function u(){}function h(e){var t=e.match(/FBXVersion: (\d+)/);if(t)return parseInt(t[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function d(e){return e/46186158e3}r.prototype={constructor:r,crossOrigin:"anonymous",load:function(e,t,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(e),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(e,(function(n){try{var a=i.parse(n,o);t(a)}catch(s){setTimeout((function(){r&&r(s),i.manager.itemError(e)}),0)}}),n,r)},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(t,n){if(function(e){var t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===E(e,0,t.length)}(t))e=(new l).parse(t);else{var r=E(t);if(!function(e){var t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],n=0;function r(t){var r=e[t-1];return e=e.slice(n+t),n++,r}for(var i=0;i<t.length;++i){if(r(1)===t[i])return!1}return!0}(r))throw new Error("THREE.FBXLoader: Unknown format.");if(h(r)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+h(r));e=(new s).parse(r)}return new i(new THREE.TextureLoader(this.manager).setPath(n).setCrossOrigin(this.crossOrigin)).parse(e)}},i.prototype={constructor:i,parse:function(){t=this.parseConnections();var e=this.parseImages(),r=this.parseTextures(e),i=this.parseMaterials(r),a=this.parseDeformers(),s=(new o).parse(a);return this.parseScene(a,s,i),n},parseConnections:function(){var t=new Map;"Connections"in e&&e.Connections.connections.forEach((function(e){var n=e[0],r=e[1],i=e[2];t.has(n)||t.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};t.get(n).parents.push(o),t.has(r)||t.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};t.get(r).children.push(a)}));return t},parseImages:function(){var t={},n={};if("Video"in e.Objects){var r=e.Objects.Video;for(var i in r){var o=r[i];if(t[c=parseInt(i)]=o.RelativeFilename||o.Filename,"Content"in o){var a=o.Content instanceof ArrayBuffer&&o.Content.byteLength>0,s="string"===typeof o.Content&&""!==o.Content;if(a||s){var l=this.parseImage(r[i]);n[o.RelativeFilename||o.Filename]=l}}}}for(var c in t){var u=t[c];void 0!==n[u]?t[c]=n[u]:t[c]=t[c].split("\\").pop()}return t},parseImage:function(e){var t,n=e.Content,r=e.RelativeFilename||e.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":t="image/bmp";break;case"jpg":case"jpeg":t="image/jpeg";break;case"png":t="image/png";break;case"tif":t="image/tiff";break;case"tga":if("function"!==typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\.tga$/i,new THREE.TGALoader),t="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+i+'" is not supported.')}if("string"===typeof n)return"data:"+t+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:t}))},parseTextures:function(t){var n=new Map;if("Texture"in e.Objects){var r=e.Objects.Texture;for(var i in r){var o=this.parseTexture(r[i],t);n.set(parseInt(i),o)}}return n},parseTexture:function(e,t){var n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;var r=e.WrapModeU,i=e.WrapModeV,o=void 0!==r?r.value:0,a=void 0!==i?i.value:0;if(n.wrapS=0===o?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,n.wrapT=0===a?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in e){var s=e.Scaling.value;n.repeat.x=s[0],n.repeat.y=s[1]}return n},loadTexture:function(e,n){var r,i,o=this.textureLoader.path,a=t.get(e.id).children;void 0!==a&&a.length>0&&void 0!==n[a[0].ID]&&(0!==(r=n[a[0].ID]).indexOf("blob:")&&0!==r.indexOf("data:")||this.textureLoader.setPath(void 0));var s=e.FileName.slice(-3).toLowerCase();if("tga"===s){var l=THREE.Loader.Handlers.get(".tga");null===l?(console.warn("FBXLoader: TGALoader not found, creating empty placeholder texture for",r),i=new THREE.Texture):i=l.load(r)}else"psd"===s?(console.warn("FBXLoader: PSD textures are not supported, creating empty placeholder texture for",r),i=new THREE.Texture):i=this.textureLoader.load(r);return this.textureLoader.setPath(o),i},parseMaterials:function(t){var n=new Map;if("Material"in e.Objects){var r=e.Objects.Material;for(var i in r){var o=this.parseMaterial(r[i],t);null!==o&&n.set(parseInt(i),o)}}return n},parseMaterial:function(e,n){var r=e.id,i=e.attrName,o=e.ShadingModel;if("object"===typeof o&&(o=o.value),!t.has(r))return null;var a,s=this.parseParameters(e,n,r);switch(o.toLowerCase()){case"phong":a=new THREE.MeshPhongMaterial;break;case"lambert":a=new THREE.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',o),a=new THREE.MeshPhongMaterial({color:3342591})}return a.setValues(s),a.name=i,a},parseParameters:function(e,n,r){var i={};e.BumpFactor&&(i.bumpScale=e.BumpFactor.value),e.Diffuse?i.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(i.color=(new THREE.Color).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(i.displacementScale=e.DisplacementFactor.value),e.Emissive?i.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(i.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(i.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(i.opacity=parseFloat(e.Opacity.value)),i.opacity<1&&(i.transparent=!0),e.ReflectionFactor&&(i.reflectivity=e.ReflectionFactor.value),e.Shininess&&(i.shininess=e.Shininess.value),e.Specular?i.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(i.specular=(new THREE.Color).fromArray(e.SpecularColor.value));var o=this;return t.get(r).children.forEach((function(e){var t=e.relationship;switch(t){case"Bump":i.bumpMap=o.getTexture(n,e.ID);break;case"DiffuseColor":i.map=o.getTexture(n,e.ID);break;case"DisplacementColor":i.displacementMap=o.getTexture(n,e.ID);break;case"EmissiveColor":i.emissiveMap=o.getTexture(n,e.ID);break;case"NormalMap":i.normalMap=o.getTexture(n,e.ID);break;case"ReflectionColor":i.envMap=o.getTexture(n,e.ID),i.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":i.specularMap=o.getTexture(n,e.ID);break;case"TransparentColor":i.alphaMap=o.getTexture(n,e.ID),i.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",t)}})),i},getTexture:function(n,r){return"LayeredTexture"in e.Objects&&r in e.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),r=t.get(r).children[0].ID),n.get(r)},parseDeformers:function(){var n={},r={};if("Deformer"in e.Objects){var i=e.Objects.Deformer;for(var o in i){var a=i[o],s=t.get(parseInt(o));if("Skin"===a.attrType){var l=this.parseSkeleton(s,i);l.ID=o,s.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=s.parents[0].ID,n[o]=l}else if("BlendShape"===a.attrType){var c={id:o};c.rawTargets=this.parseMorphTargets(s,i),c.id=o,s.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),r[o]=c}}}return{skeletons:n,morphTargets:r}},parseSkeleton:function(e,t){var n=[];return e.children.forEach((function(e){var r=t[e.ID];if("Cluster"===r.attrType){var i={ID:e.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}})),{rawBones:n,bones:[]}},parseMorphTargets:function(e,n){for(var r=[],i=0;i<e.children.length;i++){if(8===i){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var o=e.children[i],a=n[o.ID],s={name:a.attrName,initialWeight:a.DeformPercent,id:a.id,fullWeights:a.FullWeights.a};if("BlendShapeChannel"!==a.attrType)return;t.get(parseInt(o.ID)).children.forEach((function(e){void 0===e.relationship&&(s.geoID=e.ID)})),r.push(s)}return r},parseScene:function(r,i,o){n=new THREE.Group;var s=this.parseModels(r.skeletons,i,o),l=e.Objects.Model,c=this;s.forEach((function(e){var r=l[e.ID];c.setLookAtProperties(e,r),t.get(e.ID).parents.forEach((function(t){var n=s.get(t.ID);void 0!==n&&n.add(e)})),null===e.parent&&n.add(e)})),this.bindSkeleton(r.skeletons,i,s),this.createAmbientLight(),this.setupMorphMaterials();var u=(new a).parse();1===n.children.length&&n.children[0].isGroup&&(n.children[0].animations=u,n=n.children[0]),n.animations=u},parseModels:function(n,r,i){var o=new Map,a=e.Objects.Model;for(var s in a){var l=parseInt(s),c=a[s],u=t.get(l),h=this.buildSkeleton(u,n,l,c.attrName);if(!h){switch(c.attrType){case"Camera":h=this.createCamera(u);break;case"Light":h=this.createLight(u);break;case"Mesh":h=this.createMesh(u,r,i);break;case"NurbsCurve":h=this.createCurve(u,r);break;case"LimbNode":case"Null":default:h=new THREE.Group}h.name=THREE.PropertyBinding.sanitizeNodeName(c.attrName),h.ID=l}this.setModelTransforms(h,c),o.set(l,h)}return o},buildSkeleton:function(e,t,n,r){var i=null;return e.parents.forEach((function(e){for(var o in t){var a=t[o];a.rawBones.forEach((function(t,o){if(t.ID===e.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(t.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}}))}})),i},createCamera:function(t){var n,r;if(t.children.forEach((function(t){var n=e.Objects.NodeAttribute[t.ID];void 0!==n&&(r=n)})),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,l=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,l=r.AspectHeight.value);var c=s/l,u=45;void 0!==r.FieldOfView&&(u=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(u,c,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,l/2,-l/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n},createLight:function(t){var n,r;if(t.children.forEach((function(t){var n=e.Objects.NodeAttribute[t.ID];void 0!==n&&(r=n)})),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var l=Math.PI/3;void 0!==r.InnerAngle&&(l=THREE.Math.degToRad(r.InnerAngle.value));var c=0;void 0!==r.OuterAngle&&(c=THREE.Math.degToRad(r.OuterAngle.value),c=Math.max(c,1)),n=new THREE.SpotLight(o,a,s,l,c,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n},createMesh:function(e,t,n){var r,i=null,o=null,a=[];return e.children.forEach((function(e){t.has(e.ID)&&(i=t.get(e.ID)),n.has(e.ID)&&a.push(n.get(e.ID))})),a.length>1?o=a:a.length>0?o=a[0]:(o=new THREE.MeshPhongMaterial({color:13421772}),a.push(o)),"color"in i.attributes&&a.forEach((function(e){e.vertexColors=THREE.VertexColors})),i.FBX_Deformer?(a.forEach((function(e){e.skinning=!0})),r=new THREE.SkinnedMesh(i,o)):r=new THREE.Mesh(i,o),r},createCurve:function(e,t){var n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)},setModelTransforms:function(e,t){var n={};"RotationOrder"in t&&(n.eulerOrder=parseInt(t.RotationOrder.value)),"Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value);var r=w(n);e.applyMatrix(r)},setLookAtProperties:function(r,i){"LookAtProperty"in i&&t.get(r.ID).children.forEach((function(t){if("LookAtProperty"===t.relationship){var i=e.Objects.Model[t.ID];if("Lcl_Translation"in i){var o=i.Lcl_Translation.value;void 0!==r.target?(r.target.position.fromArray(o),n.add(r.target)):r.lookAt((new THREE.Vector3).fromArray(o))}}}))},bindSkeleton:function(e,n,r){var i=this.parsePoseNodes();for(var o in e){var a=e[o];t.get(parseInt(a.ID)).parents.forEach((function(e){if(n.has(e.ID)){var o=e.ID;t.get(o).parents.forEach((function(e){r.has(e.ID)&&r.get(e.ID).bind(new THREE.Skeleton(a.bones),i[e.ID])}))}}))}},parsePoseNodes:function(){var t={};if("Pose"in e.Objects){var n=e.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach((function(e){t[e.Node]=(new THREE.Matrix4).fromArray(e.Matrix.a)})):t[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return t},createAmbientLight:function(){if("GlobalSettings"in e&&"AmbientColor"in e.GlobalSettings){var t=e.GlobalSettings.AmbientColor.value,r=t[0],i=t[1],o=t[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);n.add(new THREE.AmbientLight(a,1))}}},setupMorphMaterials:function(){n.traverse((function(e){if(e.isMesh&&(e.geometry.morphAttributes.position||e.geometry.morphAttributes.normal)){var t=e.uuid,r=e.material.uuid,i=!1;n.traverse((function(e){e.isMesh&&e.material.uuid===r&&e.uuid!==t&&(i=!0)})),!0===i&&(e.material=e.material.clone()),e.material.morphTargets=!0}}))}},o.prototype={constructor:o,parse:function(n){var r=new Map;if("Geometry"in e.Objects){var i=e.Objects.Geometry;for(var o in i){var a=t.get(parseInt(o)),s=this.parseGeometry(a,i[o],n);r.set(parseInt(o),s)}}return r},parseGeometry:function(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}},parseMeshGeometry:function(t,n,r){var i=r.skeletons,o=r.morphTargets,a=t.parents.map((function(t){return e.Objects.Model[t.ID]}));if(0!==a.length){var s=t.children.reduce((function(e,t){return void 0!==i[t.ID]&&(e=i[t.ID]),e}),null),l=t.children.reduce((function(e,t){return void 0!==o[t.ID]&&(e=o[t.ID]),e}),null),c=a[0],u={};"RotationOrder"in c&&(u.eulerOrder=c.RotationOrder.value),"GeometricTranslation"in c&&(u.translation=c.GeometricTranslation.value),"GeometricRotation"in c&&(u.rotation=c.GeometricRotation.value),"GeometricScaling"in c&&(u.scale=c.GeometricScaling.value);var h=w(u);return this.genGeometry(n,s,l,h)}},genGeometry:function(e,t,n,r){var i=new THREE.BufferGeometry;e.attrName&&(i.name=e.attrName);var o=this.parseGeoNode(e,t),a=this.genBuffers(o),s=new THREE.Float32BufferAttribute(a.vertex,3);if(r.applyToBufferAttribute(s),i.addAttribute("position",s),a.colors.length>0&&i.addAttribute("color",new THREE.Float32BufferAttribute(a.colors,3)),t&&(i.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(a.weightsIndices,4)),i.addAttribute("skinWeight",new THREE.Float32BufferAttribute(a.vertexWeights,4)),i.FBX_Deformer=t),a.normal.length>0){var l=new THREE.Float32BufferAttribute(a.normal,3);(new THREE.Matrix3).getNormalMatrix(r).applyToBufferAttribute(l),i.addAttribute("normal",l)}if(a.uvs.forEach((function(e,t){var n="uv"+(t+1).toString();0===t&&(n="uv"),i.addAttribute(n,new THREE.Float32BufferAttribute(a.uvs[t],2))})),o.material&&"AllSame"!==o.material.mappingType){var c=a.materialIndex[0],u=0;if(a.materialIndex.forEach((function(e,t){e!==c&&(i.addGroup(u,t-u,c),c=e,u=t)})),i.groups.length>0){var h=i.groups[i.groups.length-1],d=h.start+h.count;d!==a.materialIndex.length&&i.addGroup(d,a.materialIndex.length-d,c)}0===i.groups.length&&i.addGroup(0,a.materialIndex.length,a.materialIndex[0])}return this.addMorphTargets(i,e,n,r),i},parseGeoNode:function(e,t){var n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];for(var r=0;e.LayerElementUV[r];)n.uv.push(this.parseUVs(e.LayerElementUV[r])),r++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:t,weight:e.weights[i]})}))}))),n},genBuffers:function(e){var t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],l=[],c=[],u=[],h=this;return e.vertexIndices.forEach((function(d,f){var m=!1;d<0&&(d^=-1,m=!0);var g=[],v=[];if(o.push(3*d,3*d+1,3*d+2),e.color){var y=p(f,n,d,e.color);s.push(y[0],y[1],y[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){v.push(e.weight),g.push(e.id)})),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var b=[0,0,0,0],w=[0,0,0,0];v.forEach((function(e,t){var n=e,r=g[t];w.forEach((function(e,t,i){if(n>e){i[t]=n,n=e;var o=b[t];b[t]=r,r=o}}))})),g=b,v=w}for(;v.length<4;)v.push(0),g.push(0);for(var x=0;x<4;++x)c.push(v[x]),u.push(g[x])}if(e.normal){y=p(f,n,d,e.normal);a.push(y[0],y[1],y[2])}if(e.material&&"AllSame"!==e.material.mappingType)var _=p(f,n,d,e.material)[0];e.uv&&e.uv.forEach((function(e,t){var r=p(f,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(r[0]),l[t].push(r[1])})),r++,m&&(h.genFace(t,e,o,_,a,s,l,c,u,r),n++,r=0,o=[],a=[],s=[],l=[],c=[],u=[])})),t},genFace:function(e,t,n,r,i,o,a,s,l,c){for(var u=2;u<c;u++)e.vertex.push(t.vertexPositions[n[0]]),e.vertex.push(t.vertexPositions[n[1]]),e.vertex.push(t.vertexPositions[n[2]]),e.vertex.push(t.vertexPositions[n[3*(u-1)]]),e.vertex.push(t.vertexPositions[n[3*(u-1)+1]]),e.vertex.push(t.vertexPositions[n[3*(u-1)+2]]),e.vertex.push(t.vertexPositions[n[3*u]]),e.vertex.push(t.vertexPositions[n[3*u+1]]),e.vertex.push(t.vertexPositions[n[3*u+2]]),t.skeleton&&(e.vertexWeights.push(s[0]),e.vertexWeights.push(s[1]),e.vertexWeights.push(s[2]),e.vertexWeights.push(s[3]),e.vertexWeights.push(s[4*(u-1)]),e.vertexWeights.push(s[4*(u-1)+1]),e.vertexWeights.push(s[4*(u-1)+2]),e.vertexWeights.push(s[4*(u-1)+3]),e.vertexWeights.push(s[4*u]),e.vertexWeights.push(s[4*u+1]),e.vertexWeights.push(s[4*u+2]),e.vertexWeights.push(s[4*u+3]),e.weightsIndices.push(l[0]),e.weightsIndices.push(l[1]),e.weightsIndices.push(l[2]),e.weightsIndices.push(l[3]),e.weightsIndices.push(l[4*(u-1)]),e.weightsIndices.push(l[4*(u-1)+1]),e.weightsIndices.push(l[4*(u-1)+2]),e.weightsIndices.push(l[4*(u-1)+3]),e.weightsIndices.push(l[4*u]),e.weightsIndices.push(l[4*u+1]),e.weightsIndices.push(l[4*u+2]),e.weightsIndices.push(l[4*u+3])),t.color&&(e.colors.push(o[0]),e.colors.push(o[1]),e.colors.push(o[2]),e.colors.push(o[3*(u-1)]),e.colors.push(o[3*(u-1)+1]),e.colors.push(o[3*(u-1)+2]),e.colors.push(o[3*u]),e.colors.push(o[3*u+1]),e.colors.push(o[3*u+2])),t.material&&"AllSame"!==t.material.mappingType&&(e.materialIndex.push(r),e.materialIndex.push(r),e.materialIndex.push(r)),t.normal&&(e.normal.push(i[0]),e.normal.push(i[1]),e.normal.push(i[2]),e.normal.push(i[3*(u-1)]),e.normal.push(i[3*(u-1)+1]),e.normal.push(i[3*(u-1)+2]),e.normal.push(i[3*u]),e.normal.push(i[3*u+1]),e.normal.push(i[3*u+2])),t.uv&&t.uv.forEach((function(t,n){void 0===e.uvs[n]&&(e.uvs[n]=[]),e.uvs[n].push(a[n][0]),e.uvs[n].push(a[n][1]),e.uvs[n].push(a[n][2*(u-1)]),e.uvs[n].push(a[n][2*(u-1)+1]),e.uvs[n].push(a[n][2*u]),e.uvs[n].push(a[n][2*u+1])}))},addMorphTargets:function(t,n,r,i){if(null!==r){t.morphAttributes.position=[],t.morphAttributes.normal=[];var o=this;r.rawTargets.forEach((function(r){var a=e.Objects.Geometry[r.geoID];void 0!==a&&o.genMorphGeometry(t,n,a,i)}))}},genMorphGeometry:function(e,t,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],a=void 0!==t.Vertices?t.Vertices.a.slice():[],s=void 0!==n.Vertices?n.Vertices.a:[],l=void 0!==n.Indexes?n.Indexes.a:[],c=0;c<l.length;c++){var u=3*l[c];a[u]+=s[3*c],a[u+1]+=s[3*c+1],a[u+2]+=s[3*c+2]}var h={vertexIndices:o,vertexPositions:a},d=this.genBuffers(h),f=new THREE.Float32BufferAttribute(d.vertex,3);f.name=n.attrName,r.applyToBufferAttribute(f),e.morphAttributes.position.push(f)},parseNormals:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.Normals.a,i=[];return"IndexToDirect"===n&&("NormalIndex"in e?i=e.NormalIndex.a:"NormalsIndex"in e&&(i=e.NormalsIndex.a)),{dataSize:3,buffer:r,indices:i,mappingType:t,referenceType:n}},parseUVs:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.UV.a,i=[];return"IndexToDirect"===n&&(i=e.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:t,referenceType:n}},parseVertexColors:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.Colors.a,i=[];return"IndexToDirect"===n&&(i=e.ColorIndex.a),{dataSize:4,buffer:r,indices:i,mappingType:t,referenceType:n}},parseMaterialIndices:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=e.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:t,referenceType:n}},parseNurbsGeometry:function(e){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var t=parseInt(e.Order);if(isNaN(t))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new THREE.BufferGeometry;for(var n,r,i=t-1,o=e.KnotVector.a,a=[],s=e.Points.a,l=0,c=s.length;l<c;l+=4)a.push((new THREE.Vector4).fromArray(s,l));if("Closed"===e.Form)a.push(a[0]);else if("Periodic"===e.Form){n=i,r=o.length-1-n;for(l=0;l<i;++l)a.push(a[l])}var u=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*u.length);u.forEach((function(e,t){e.toArray(h,3*t)}));var d=new THREE.BufferGeometry;return d.addAttribute("position",new THREE.BufferAttribute(h,3)),d}},a.prototype={constructor:a,parse:function(){var e=[],t=this.parseClips();if(void 0===t)return e;for(var n in t){var r=t[n],i=this.addClip(r);e.push(i)}return e},parseClips:function(){if(void 0!==e.Objects.AnimationCurve){var t=this.parseAnimationCurveNodes();this.parseAnimationCurves(t);var n=this.parseAnimationLayers(t);return this.parseAnimStacks(n)}},parseAnimationCurveNodes:function(){var t=e.Objects.AnimationCurveNode,n=new Map;for(var r in t){var i=t[r];if(null!==i.attrName.match(/S|R|T|DeformPercent/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n},parseAnimationCurves:function(n){var r=e.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(d),values:r[i].KeyValueFloat.a},a=t.get(o.id);if(void 0!==a){var s=a.parents[0].ID,l=a.parents[0].relationship;l.match(/X/)?n.get(s).curves.x=o:l.match(/Y/)?n.get(s).curves.y=o:l.match(/Z/)?n.get(s).curves.z=o:l.match(/d|DeformPercent/)&&n.has(s)&&(n.get(s).curves.morph=o)}}},parseAnimationLayers:function(n){var r=e.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=t.get(parseInt(o));if(void 0!==s){var l=s.children,c=this;l.forEach((function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){t.get(r.ID).parents.forEach((function(e){void 0!==e.relationship&&(f=e.ID)}));var s=e.Objects.Model[f.toString()],l={modelName:THREE.PropertyBinding.sanitizeNodeName(s.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1],transform:c.getModelAnimTransform(s)};"PreRotation"in s&&(l.preRotations=s.PreRotation.value),"PostRotation"in s&&(l.postRotations=s.PostRotation.value),a[i]=l}a[i][o.attr]=o}else if(void 0!==o.curves.morph){if(void 0===a[i]){var u;t.get(r.ID).parents.forEach((function(e){void 0!==e.relationship&&(u=e.ID)}));var h=t.get(u).parents[0].ID,d=t.get(h).parents[0].ID,f=t.get(d).parents[0].ID;s=e.Objects.Model[f],l={modelName:THREE.PropertyBinding.sanitizeNodeName(s.attrName),morphName:e.Objects.Deformer[u].attrName};a[i]=l}a[i][o.attr]=o}}})),i.set(parseInt(o),a)}}return i},getModelAnimTransform:function(e){var t={};return"RotationOrder"in e&&(t.eulerOrder=parseInt(e.RotationOrder.value)),"Lcl_Translation"in e&&(t.translation=e.Lcl_Translation.value),"RotationOffset"in e&&(t.rotationOffset=e.RotationOffset.value),"Lcl_Rotation"in e&&(t.rotation=e.Lcl_Rotation.value),"PreRotation"in e&&(t.preRotation=e.PreRotation.value),"PostRotation"in e&&(t.postRotation=e.PostRotation.value),"Lcl_Scaling"in e&&(t.scale=e.Lcl_Scaling.value),w(t)},parseAnimStacks:function(n){var r=e.Objects.AnimationStack,i={};for(var o in r){var a=t.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i},addClip:function(e){var t=[],n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new THREE.AnimationClip(e.name,-1,t)},generateTracks:function(e){var t=[],n=new THREE.Vector3,r=new THREE.Quaternion,i=new THREE.Vector3;if(e.transform&&e.transform.decompose(n,r,i),n=n.toArray(),r=(new THREE.Euler).setFromQuaternion(r).toArray(),i=i.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){var o=this.generateVectorTrack(e.modelName,e.T.curves,n,"position");void 0!==o&&t.push(o)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){var a=this.generateRotationTrack(e.modelName,e.R.curves,r,e.preRotations,e.postRotations);void 0!==a&&t.push(a)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){var s=this.generateVectorTrack(e.modelName,e.S.curves,i,"scale");void 0!==s&&t.push(s)}if(void 0!==e.DeformPercent){var l=this.generateMorphTrack(e);void 0!==l&&t.push(l)}return t},generateVectorTrack:function(e,t,n,r){var i=this.getTimesForAllAxes(t),o=this.getKeyframeTrackValues(i,t,n);return new THREE.VectorKeyframeTrack(e+"."+r,i,o)},generateRotationTrack:function(e,t,n,r,i){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(THREE.Math.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(THREE.Math.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(THREE.Math.degToRad));var o=this.getTimesForAllAxes(t),a=this.getKeyframeTrackValues(o,t,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r)),void 0!==i&&((i=i.map(THREE.Math.degToRad)).push("ZYX"),i=(new THREE.Euler).fromArray(i),i=(new THREE.Quaternion).setFromEuler(i).inverse());for(var s=new THREE.Quaternion,l=new THREE.Euler,c=[],u=0;u<a.length;u+=3)l.set(a[u],a[u+1],a[u+2],"ZYX"),s.setFromEuler(l),void 0!==r&&s.premultiply(r),void 0!==i&&s.multiply(i),s.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(e+".quaternion",o,c)},generateMorphTrack:function(e){var t=e.DeformPercent.curves.morph,r=t.values.map((function(e){return e/100})),i=n.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new THREE.NumberKeyframeTrack(e.modelName+".morphTargetInfluences["+i+"]",t.times,r)},getTimesForAllAxes:function(e){var t=[];return void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})).filter((function(e,t,n){return n.indexOf(e)==t}))},getKeyframeTrackValues:function(e,t,n){var r=n,i=[],o=-1,a=-1,s=-1;return e.forEach((function(e){if(t.x&&(o=t.x.times.indexOf(e)),t.y&&(a=t.y.times.indexOf(e)),t.z&&(s=t.z.times.indexOf(e)),-1!==o){var n=t.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var l=t.y.values[a];i.push(l),r[1]=l}else i.push(r[1]);if(-1!==s){var c=t.z.values[s];i.push(c),r[2]=c}else i.push(r[2])})),i},interpolateRotations:function(e){for(var t=1;t<e.values.length;t++){var n=e.values[t-1],r=e.values[t]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,l=e.times[t-1],c=(e.times[t]-l)/o,u=l+c,h=[],d=[];u<e.times[t];)h.push(u),u+=c,d.push(s),s+=a;e.times=A(e.times,t,h),e.values=A(e.values,t,d)}}}},s.prototype={constructor:s,getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(e){this.nodeStack.push(e),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(e,t){this.currentProp=e,this.currentPropName=t},parse:function(e){this.currentIndent=0,console.log("FBXTree: ",u),this.allNodes=new u,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var t=this,n=e.split(/[\r\n]+/);return n.forEach((function(e,r){var i=e.match(/^[\s\t]*;/),o=e.match(/^[\s\t]*$/);if(!i&&!o){var a=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),s=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");a?t.parseNodeBegin(e,a):s?t.parseNodeProperty(e,s,n[++r]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)}})),this.allNodes},parseNodeBegin:function(e,t){var n=t[1].trim().replace(/^"/,"").replace(/"$/,""),r=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"===typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"===typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(e){var t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));var n="",r="";return e.length>1&&(n=e[1].replace(/^(\w+)::/,""),r=e[2]),{id:t,name:n,type:r}},parseNodeProperty:function(e,t,n){var r=t[1].replace(/^"/,"").replace(/"$/,"").trim(),i=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),l=parseInt(a[1]),c=i.split(",").slice(3);r="connections",function(e,t){for(var n=0,r=e.length,i=t.length;n<i;n++,r++)e[r]=t[n]}(i=[s,l],c=c.map((function(e){return e.trim().replace(/^"/,"")}))),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=_(i))}else this.parseNodeSpecialProperty(e,r,i)},parseNodePropertyContinued:function(e){var t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=_(t.a))},parseNodeSpecialProperty:function(e,t,n){var r=n.split('",').map((function(e){return e.trim().replace(/^\"/,"").replace(/\s/,"_")})),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":l=parseFloat(l);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":l=_(l)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:l},this.setCurrentProp(this.getPrevNode(),i)}},l.prototype={constructor:l,parse:function(e){var t=new c(e);t.skip(23);var n=t.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new u;!this.endOfContent(t);){var i=this.parseNode(t,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(e){return e.size()%16===0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()},parseNode:function(e,t){var n={},r=t>=7500?e.getUint64():e.getUint32(),i=t>=7500?e.getUint64():e.getUint32(),o=(t>=7500?e.getUint64():e.getUint32(),e.getUint8()),a=e.getString(o);if(0===r)return null;for(var s=[],l=0;l<i;l++)s.push(this.parseProperty(e));var c=s.length>0?s[0]:"",u=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&e.getOffset()===r;r>e.getOffset();){var d=this.parseNode(e,t);null!==d&&this.parseSubNode(a,n,d)}return n.propertyList=s,"number"===typeof c&&(n.id=c),""!==u&&(n.attrName=u),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(e,t,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(t[n.name]=n,n.a=r):t[n.name]=r}else if("Connections"===e&&"C"===n.name){var i=[];n.propertyList.forEach((function(e,t){0!==t&&i.push(e)})),void 0===t.connections&&(t.connections=[]),t.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],l=n.propertyList[2],c=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[a]={type:s,type2:l,flag:c,value:o}}else void 0===t[n.name]?"number"===typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)},parseProperty:function(e){var t=e.getString(1);switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":var n=e.getUint32();return e.getArrayBuffer(n);case"S":n=e.getUint32();return e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=e.getUint32(),i=e.getUint32(),o=e.getUint32();if(0===i)switch(t){case"b":case"c":return e.getBooleanArray(r);case"d":return e.getFloat64Array(r);case"f":return e.getFloat32Array(r);case"i":return e.getInt32Array(r);case"l":return e.getInt64Array(r)}"undefined"===typeof Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new c(new Zlib.Inflate(new Uint8Array(e.getArrayBuffer(o))).decompress().buffer);switch(t){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}},c.prototype={constructor:c,getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(e){this.offset+=e},getBoolean:function(){return 1===(1&this.getUint8())},getBooleanArray:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getBoolean());return t},getUint8:function(){var e=this.dv.getUint8(this.offset);return this.offset+=1,e},getInt16:function(){var e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},getInt32:function(){var e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},getInt32Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getInt32());return t},getUint32:function(){var e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},getInt64:function(){var e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),2147483648&t?(t=4294967295&~t,4294967295===(e=4294967295&~e)&&(t=t+1&4294967295),-(4294967296*t+(e=e+1&4294967295))):4294967296*t+e},getInt64Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getInt64());return t},getUint64:function(){var e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),4294967296*t+e},getFloat32:function(){var e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},getFloat32Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getFloat32());return t},getFloat64:function(){var e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},getFloat64Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getFloat64());return t},getArrayBuffer:function(e){var t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t},getString:function(e){for(var t=[],n=0;n<e;n++)t[n]=this.getUint8();var r=t.indexOf(0);return r>=0&&(t=t.slice(0,r)),THREE.LoaderUtils.decodeText(new Uint8Array(t))}},u.prototype={constructor:u,add:function(e,t){this[e]=t}};var f=[];function p(e,t,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=e;break;case"ByPolygon":i=t;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(e,t,n,r){for(var i=n,o=0;i<r;i++,o++)e[o]=t[i];return e}(f,r.buffer,o,a)}var m=new THREE.Matrix4,g=new THREE.Euler,v=new THREE.Vector3,y=new THREE.Vector3,b=new THREE.Matrix4;function w(e){var t=new THREE.Matrix4;y.set(0,0,0),b.identity();var n,r=e.eulerOrder?x(e.eulerOrder):x(0);(e.translation&&y.fromArray(e.translation),e.rotationOffset&&y.add(v.fromArray(e.rotationOffset)),e.rotation)&&((n=e.rotation.map(THREE.Math.degToRad)).push(r),b.makeRotationFromEuler(g.fromArray(n)));e.preRotation&&((n=e.preRotation.map(THREE.Math.degToRad)).push(r),m.makeRotationFromEuler(g.fromArray(n)),b.premultiply(m));e.postRotation&&((n=e.postRotation.map(THREE.Math.degToRad)).push(r),m.makeRotationFromEuler(g.fromArray(n)),m.getInverse(m),b.multiply(m));return e.scale&&t.scale(v.fromArray(e.scale)),t.setPosition(y),t.multiply(b),t}function x(e){var t=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return 6===e?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),t[0]):t[e]}function _(e){return e.split(",").map((function(e){return parseFloat(e)}))}function E(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(e,t,n))}function A(e,t,n){return e.slice(0,t).concat(n).concat(e.slice(t))}return r}()},function(e,t,n){const r=n(337)(),i=function(){let e;return function(){return e=e||r("https://cdn.jsdelivr.net/gh/mrdoob/three.js@r86/examples/js/loaders/GLTFLoader.js"),e}}();e.exports=AFRAME.registerComponent("gltf-model-legacy",{schema:{type:"model"},init:function(){this.model=null,this.loader=null,this.loaderPromise=i().then(()=>{this.loader=new THREE.GLTFLoader,this.loader.setCrossOrigin("Anonymous")})},update:function(){const e=this,t=this.el,n=this.data;n&&(this.remove(),this.loaderPromise.then(()=>{this.loader.load(n,(function(n){e.model=n.scene,e.model.animations=n.animations,t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"gltf",model:e.model})}))}))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(t,n){function r(t){const n=document.getElementById(t),r=n.parentNode;try{r&&r.removeChild(n)}catch(e){}}function i(e,t,n){return new n((function(n,i){const o=t.timeout||5e3,a="script_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),s=function(e,t){var n=document.createElement("script");return n.type="text/javascript",n.async=!0,n.id=t,n.src=e,n}(e,a),l=setTimeout((function(){i(new Error("Script request to "+e+" timed out")),r(a)}),o),c=function(e){clearTimeout(e)};s.addEventListener("load",(function(e){n({ok:!0}),c(l),r(a)})),s.addEventListener("error",(function(t){i(new Error("Script request to "+e+" failed "+t)),c(l),r(a)})),function(e){const t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(s)}))}t.exports=function(e){return e=e||{},function(t,n){return i(t,n=n||{},e.Promise||Promise)}}},function(e,t){e.exports=AFRAME.registerComponent("object-model",{schema:{src:{type:"asset"},crossorigin:{default:""}},init:function(){this.model=null},update:function(){let e;const t=this.data;t.src&&(this.remove(),e=new THREE.ObjectLoader,t.crossorigin&&e.setCrossOrigin(t.crossorigin),e.load(t.src,e=>{e.traverse(e=>{e instanceof THREE.SkinnedMesh&&e.material&&(e.material.skinning=!!(e.geometry&&e.geometry.bones||[]).length)}),this.load(e)}))},load:function(e){this.model=e,this.el.setObject3D("mesh",e),this.el.emit("model-loaded",{format:"json",model:e})},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t,n){n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347)},function(e,t){e.exports=AFRAME.registerComponent("checkpoint",{schema:{offset:{default:{x:0,y:0,z:0},type:"vec3"}},init:function(){this.active=!1,this.targetEl=null,this.fire=this.fire.bind(this),this.offset=new THREE.Vector3},update:function(){this.offset.copy(this.data.offset)},play:function(){this.el.addEventListener("click",this.fire)},pause:function(){this.el.removeEventListener("click",this.fire)},remove:function(){this.pause()},fire:function(){const e=this.el.sceneEl.querySelector("[checkpoint-controls]");if(!e)throw new Error("No `checkpoint-controls` component found.");e.components["checkpoint-controls"].setCheckpoint(this.el)},getOffset:function(){return this.offset.copy(this.data.offset)}})},function(e,t){function n(e,t,n,r){e&&(t=t||[],e.traverse(e=>{if(!e.isMesh)return;var i;((i=e.material)?Array.isArray(i)?i:i.materials?i.materials:[i]:[]).forEach(e=>{e&&!("envMap"in e)||t.length&&-1===t.indexOf(e.name)||(e.envMap=n,e.reflectivity=r,e.needsUpdate=!0)})}))}e.exports=AFRAME.registerComponent("cube-env-map",{multiple:!0,schema:{path:{default:""},extension:{default:"jpg",oneOf:["jpg","png"]},format:{default:"RGBFormat",oneOf:["RGBFormat","RGBAFormat"]},enableBackground:{default:!1},reflectivity:{default:1,min:0,max:1},materials:{default:[]}},init:function(){const e=this.data;this.texture=(new THREE.CubeTextureLoader).load([e.path+"posx."+e.extension,e.path+"negx."+e.extension,e.path+"posy."+e.extension,e.path+"negy."+e.extension,e.path+"posz."+e.extension,e.path+"negz."+e.extension]),this.texture.format=THREE[e.format],this.object3dsetHandler=()=>{const e=this.el.getObject3D("mesh"),t=this.data;n(e,t.materials,this.texture,t.reflectivity)},this.el.addEventListener("object3dset",this.object3dsetHandler)},update:function(e){const t=this.data,r=this.el.getObject3D("mesh");let i=[],o=[];if(t.materials.length&&(e.materials?(i=t.materials.filter(t=>!e.materials.includes(t)),o=e.materials.filter(e=>!t.materials.includes(e))):i=t.materials),i.length&&n(r,i,this.texture,t.reflectivity),o.length&&n(r,o,null,1),e.materials&&t.reflectivity!==e.reflectivity){const i=t.materials.filter(t=>e.materials.includes(t));i.length&&n(r,i,this.texture,t.reflectivity)}this.data.enableBackground&&!e.enableBackground?this.setBackground(this.texture):!this.data.enableBackground&&e.enableBackground&&this.setBackground(null)},remove:function(){this.el.removeEventListener("object3dset",this.object3dsetHandler);const e=this.el.getObject3D("mesh"),t=this.data;n(e,t.materials,null,1),t.enableBackground&&this.setBackground(null)},setBackground:function(e){this.el.sceneEl.object3D.background=e}})},function(e,t){e.exports=AFRAME.registerComponent("grab",{init:function(){this.system=this.el.sceneEl.systems.physics,this.GRABBED_STATE="grabbed",this.grabbing=!1,this.hitEl=null,this.physics=this.el.sceneEl.systems.physics,this.constraint=null,this.onHit=this.onHit.bind(this),this.onGripOpen=this.onGripOpen.bind(this),this.onGripClose=this.onGripClose.bind(this)},play:function(){const e=this.el;e.addEventListener("hit",this.onHit),e.addEventListener("gripdown",this.onGripClose),e.addEventListener("gripup",this.onGripOpen),e.addEventListener("trackpaddown",this.onGripClose),e.addEventListener("trackpadup",this.onGripOpen),e.addEventListener("triggerdown",this.onGripClose),e.addEventListener("triggerup",this.onGripOpen)},pause:function(){const e=this.el;e.removeEventListener("hit",this.onHit),e.removeEventListener("gripdown",this.onGripClose),e.removeEventListener("gripup",this.onGripOpen),e.removeEventListener("trackpaddown",this.onGripClose),e.removeEventListener("trackpadup",this.onGripOpen),e.removeEventListener("triggerdown",this.onGripClose),e.removeEventListener("triggerup",this.onGripOpen)},onGripClose:function(){this.grabbing=!0},onGripOpen:function(){const e=this.hitEl;this.grabbing=!1,e&&(e.removeState(this.GRABBED_STATE),this.hitEl=void 0,this.system.removeConstraint(this.constraint),this.constraint=null)},onHit:function(e){const t=e.detail.el;t&&!t.is(this.GRABBED_STATE)&&this.grabbing&&!this.hitEl&&(t.addState(this.GRABBED_STATE),this.hitEl=t,this.constraint=new CANNON.LockConstraint(this.el.body,t.body),this.system.addConstraint(this.constraint))}})},function(e,t){e.exports=AFRAME.registerComponent("jump-ability",{dependencies:["velocity"],schema:{on:{default:"keydown:Space gamepadbuttondown:0"},playerHeight:{default:1.764},maxJumps:{default:1},distance:{default:5},debug:{default:!1}},init:function(){this.velocity=0,this.numJumps=0;const e=this.beginJump.bind(this),t=this.data.on.split(" ");this.bindings={};for(let n=0;n<t.length;n++)this.bindings[t[n]]=e,this.el.addEventListener(t[n],e);this.bindings.collide=this.onCollide.bind(this),this.el.addEventListener("collide",this.bindings.collide)},remove:function(){for(var e in this.bindings)this.bindings.hasOwnProperty(e)&&(this.el.removeEventListener(e,this.bindings[e]),delete this.bindings[e]);this.el.removeEventListener("collide",this.bindings.collide),delete this.bindings.collide},beginJump:function(){if(this.numJumps<this.data.maxJumps){const e=this.data,t=Math.sqrt(-2*e.distance*-24.8),n=this.el.getAttribute("velocity");this.el.setAttribute("velocity",{x:n.x,y:t,z:n.z}),this.numJumps++,this.el.emit("jumpstart")}},onCollide:function(){this.numJumps>0&&this.el.emit("jumpend"),this.numJumps=0}})},function(e,t){e.exports=AFRAME.registerComponent("kinematic-body",{dependencies:["velocity"],schema:{mass:{default:5},radius:{default:1.3},linearDamping:{default:.05},enableSlopes:{default:!0},enableJumps:{default:!1}},init:function(){this.system=this.el.sceneEl.systems.physics,this.system.addComponent(this);const e=this.el,t=this.data,n=(new CANNON.Vec3).copy(e.object3D.getWorldPosition(new THREE.Vector3));this.body=new CANNON.Body({material:this.system.getMaterial("staticMaterial"),position:n,mass:t.mass,linearDamping:t.linearDamping,fixedRotation:!0}),this.body.addShape(new CANNON.Sphere(t.radius),new CANNON.Vec3(0,t.radius,0)),this.body.el=this.el,this.el.body=this.body,this.system.addBody(this.body),e.hasAttribute("wasd-controls")&&console.warn("[kinematic-body] Not compatible with wasd-controls, use movement-controls.")},remove:function(){this.system.removeBody(this.body),this.system.removeComponent(this),delete this.el.body},beforeStep:function(e,t){if(!t)return;const n=this.el,r=this.data,i=this.body;r.enableJumps||i.velocity.set(0,0,0),i.position.copy(n.getAttribute("position"))},step:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3;return function(i,o){if(!o)return;let a,s,l=this.body,c=this.data,u=!1,h=-1/0,d=this.system.getContacts();o=Math.min(o,1e3*this.system.data.maxInterval),r.set(0,0,0),e.copy(this.el.getAttribute("velocity")),l.velocity.copy(e);for(var f,p=0;f=d[p];p++)if(f.enabled){if(l.id===f.bi.id)f.ni.negate(n);else{if(l.id!==f.bj.id)continue;n.copy(f.ni)}u=l.velocity.dot(n)<-1e-6,u&&n.y<=.5?e.projectOnPlane(n):n.y>.5&&(a=l.id===f.bi.id?Math.abs(f.rj.y+f.bj.position.y):Math.abs(f.ri.y+f.bi.position.y),a>h&&(h=a,r.copy(n),s=l.id===f.bi.id?f.bj:f.bi))}t.copy(e).normalize(),s&&(!c.enableJumps||t.y<.5)?(c.enableSlopes?r.y<.999999&&r.copy(this.raycastToGround(s,r)):r.set(0,1,0),e.projectOnPlane(r)):this.system.driver.world&&e.add(this.system.driver.world.gravity.scale(4*o/1e3)),l.velocity.copy(e),this.el.setAttribute("velocity",l.velocity),this.el.setAttribute("position",l.position)}}(),raycastToGround:function(e,t){let n,r,i=this.body.position,o=this.body.position.clone();return n=new CANNON.Ray(i,o),n._updateDirection(),n.intersectBody(e),n.hasHit?(r=n.result.hitNormalWorld,Math.abs(r.y)>Math.abs(t.y)?r:t):t}})},function(e,t){e.exports=AFRAME.registerComponent("mesh-smooth",{init:function(){this.el.addEventListener("model-loaded",e=>{e.detail.model.traverse(e=>{e.isMesh&&e.geometry.computeVertexNormals()})})}})},function(e,t){e.exports=AFRAME.registerComponent("normal-material",{init:function(){this.material=new THREE.MeshNormalMaterial({flatShading:!0}),this.applyMaterial=this.applyMaterial.bind(this),this.el.addEventListener("object3dset",this.applyMaterial)},remove:function(){this.el.removeEventListener("object3dset",this.applyMaterial)},applyMaterial:function(){this.el.object3D.traverse(e=>{e.isMesh&&(e.material=this.material)})}})},function(e,t){e.exports=AFRAME.registerComponent("sphere-collider",{schema:{objects:{default:""},state:{default:"collided"},radius:{default:.05},watch:{default:!0}},init:function(){this.observer=null,this.els=[],this.collisions=[],this.handleHit=this.handleHit.bind(this),this.handleHitEnd=this.handleHitEnd.bind(this)},remove:function(){this.pause()},play:function(){const e=this.el.sceneEl;this.data.watch&&(this.observer=new MutationObserver(this.update.bind(this,null)),this.observer.observe(e,{childList:!0,subtree:!0}))},pause:function(){this.observer&&(this.observer.disconnect(),this.observer=null)},update:function(){const e=this.data;let t;t=e.objects?this.el.sceneEl.querySelectorAll(e.objects):this.el.sceneEl.children,this.els=Array.prototype.slice.call(t)},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3,i=new THREE.Box3,o=new Map;return function(){const a=this.el,s=this.data,l=a.getObject3D("mesh"),c=[];let u;var h;l&&(o.clear(),a.object3D.getWorldPosition(e),a.object3D.getWorldScale(n),u=s.radius*(h=n,Math.max.apply(null,h.toArray())),this.els.forEach((function(n){let a,s,l,h;if(!n.isEntity)return;if(s=n.getObject3D("mesh"),!s)return;if(i.setFromObject(s).getSize(r),h=Math.max(r.x,r.y,r.z)/2,a=Math.sqrt(2*h*h),i.getCenter(t),!a)return;l=e.distanceTo(t),l<a+u&&(c.push(n),o.set(n,l))})),c.sort((e,t)=>o.get(e)>o.get(t)?1:-1).forEach(this.handleHit),0===c.length&&a.emit("hit",{el:null}),this.collisions.filter(e=>!o.has(e)).forEach(this.handleHitEnd),this.collisions=c)}}(),handleHit:function(e){e.emit("hit"),e.addState(this.data.state),this.el.emit("hit",{el:e})},handleHitEnd:function(e){e.emit("hitend"),e.removeState(this.data.state),this.el.emit("hitend",{el:e})}})},function(e,t,n){n(349),n(350),n(351)},function(e,t){e.exports=AFRAME.registerComponent("nav-mesh",{init:function(){this.system=this.el.sceneEl.systems.nav,this.hasLoadedNavMesh=!1,this.el.addEventListener("object3dset",this.loadNavMesh.bind(this))},play:function(){this.hasLoadedNavMesh||this.loadNavMesh()},loadNavMesh:function(){const e=this.el.getObject3D("mesh"),t=this.el.sceneEl.object3D;if(!e)return;let n;if(e.traverse(e=>{e.isMesh&&(n=e)}),!n)return;const r=n.geometry.isBufferGeometry?(new THREE.Geometry).fromBufferGeometry(n.geometry):n.geometry.clone();t.updateMatrixWorld(),r.applyMatrix(n.matrixWorld),this.system.setNavMeshGeometry(r),this.hasLoadedNavMesh=!0}})},function(e,t){e.exports=AFRAME.registerComponent("nav-agent",{schema:{destination:{type:"vec3"},active:{default:!1},speed:{default:2}},init:function(){this.system=this.el.sceneEl.systems.nav,this.system.addAgent(this),this.group=null,this.path=[],this.raycaster=new THREE.Raycaster},remove:function(){this.system.removeAgent(this)},update:function(){this.path.length=0},updateNavLocation:function(){this.group=null,this.path=[]},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i){const o=this.el,a=this.data,s=this.raycaster,l=a.speed*i/1e3;if(!a.active)return;if(!this.path.length){const t=this.el.object3D.position;this.group=this.group||this.system.getGroup(t),this.path=this.system.getPath(t,e.copy(a.destination),this.group)||[],o.emit("navigation-start")}if(!this.path.length)return console.warn("[nav] Unable to find path to %o.",a.destination),this.el.setAttribute("nav-agent",{active:!1}),void o.emit("navigation-end");const c=o.object3D.position,u=this.path[0];t.subVectors(u,c);let h;if(t.length()<l){if(this.path.shift(),!this.path.length)return this.el.setAttribute("nav-agent",{active:!1}),void o.emit("navigation-end");n.copy(c),h=this.path[0]}else n.copy(t.setLength(l)).add(c),h=u;h.y=c.y,o.object3D.lookAt(h),s.ray.origin.copy(n),s.ray.origin.y+=1.5,s.ray.direction.y=-1;const d=s.intersectObject(this.system.getNavMesh());d.length?(t.subVectors(d[0].point,c),c.add(t.setLength(l))):c.copy(n)}}()})},function(e,t,n){const{Pathfinding:r}=n(352),i=new r,o="level";e.exports=AFRAME.registerSystem("nav",{init:function(){this.navMesh=null,this.agents=new Set},setNavMeshGeometry:function(e){this.navMesh=new THREE.Mesh(e),i.setZoneData(o,r.createZone(e)),Array.from(this.agents).forEach(e=>e.updateNavLocation())},getNavMesh:function(){return this.navMesh},addAgent:function(e){this.agents.add(e)},removeAgent:function(e){this.agents.delete(e)},getPath:function(e,t,n){return this.navMesh?i.findPath(e,t,o,n):null},getGroup:function(e){return this.navMesh?i.getGroup(o,e):null},getNode:function(e,t){return this.navMesh?i.getClosestNode(e,o,t,!0):null},clampStep:function(e,t,n,r,a){return this.navMesh?r?i.clampStep(e,t,r,o,n,a):(a.copy(t),this.getNode(t,n)):(a.copy(t),null)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"Pathfinding",(function(){return m}));var r=function(){};r.computeCentroids=function(e){var t,n,r;for(t=0,n=e.faces.length;t<n;t++)(r=e.faces[t]).centroid=new THREE.Vector3(0,0,0),r.centroid.add(e.vertices[r.a]),r.centroid.add(e.vertices[r.b]),r.centroid.add(e.vertices[r.c]),r.centroid.divideScalar(3)},r.roundNumber=function(e,t){return Number(e.toFixed(t))},r.sample=function(e){return e[Math.floor(Math.random()*e.length)]},r.mergeVertexIds=function(e,t){var n=[];if(e.forEach((function(e){t.indexOf(e)>=0&&n.push(e)})),n.length<2)return[];n.includes(e[0])&&n.includes(e[e.length-1])&&e.push(e.shift()),n.includes(t[0])&&n.includes(t[t.length-1])&&t.push(t.shift()),n=[],e.forEach((function(e){t.includes(e)&&n.push(e)}));for(var r=n[1],i=n[0],o=e.slice();o[0]!==r;)o.push(o.shift());for(var a=0,s=t.slice();s[0]!==i;)if(s.push(s.shift()),a++>10)throw new Error("Unexpected state");return s.shift(),s.pop(),o.concat(s)},r.setPolygonCentroid=function(e,t){var n=new THREE.Vector3,r=t.vertices;e.vertexIds.forEach((function(e){n.add(r[e])})),n.divideScalar(e.vertexIds.length),e.centroid.copy(n)},r.cleanPolygon=function(e,t){for(var n=[],r=t.vertices,i=0;i<e.vertexIds.length;i++){var o,a,s,l=r[e.vertexIds[i]];0===i?(o=e.vertexIds[1],a=e.vertexIds[e.vertexIds.length-1]):i===e.vertexIds.length-1?(o=e.vertexIds[0],a=e.vertexIds[e.vertexIds.length-2]):(o=e.vertexIds[i+1],a=e.vertexIds[i-1]),s=r[a];var c=r[o].clone().sub(l),u=s.clone().sub(l),h=c.angleTo(u);if(h>Math.PI-.01&&h<Math.PI+.01){var d=[];e.neighbours.forEach((function(t){t.vertexIds.includes(e.vertexIds[i])||d.push(t)})),e.neighbours=d}else n.push(e.vertexIds[i])}e.vertexIds=n,this.setPolygonCentroid(e,t)},r.isConvex=function(e,t){var n=t.vertices;if(e.vertexIds.length<3)return!1;for(var r=!0,i=[],o=0;o<e.vertexIds.length;o++){var a,s,l=n[e.vertexIds[o]];0===o?(a=n[e.vertexIds[1]],s=n[e.vertexIds[e.vertexIds.length-1]]):o===e.vertexIds.length-1?(a=n[e.vertexIds[0]],s=n[e.vertexIds[e.vertexIds.length-2]]):(a=n[e.vertexIds[o+1]],s=n[e.vertexIds[o-1]]);var c=a.clone().sub(l),u=s.clone().sub(l),h=c.angleTo(u);if(h===Math.PI||0===h)return!1;var d=c.cross(u).y;i.push(d)}return i.forEach((function(e){0===e&&(r=!1)})),i.forEach(i[0]>0?function(e){e<0&&(r=!1)}:function(e){e>0&&(r=!1)}),r},r.distanceToSquared=function(e,t){var n=e.x-t.x,r=e.y-t.y,i=e.z-t.z;return n*n+r*r+i*i},r.isPointInPoly=function(e,t){for(var n=!1,r=-1,i=e.length,o=i-1;++r<i;o=r)(e[r].z<=t.z&&t.z<e[o].z||e[o].z<=t.z&&t.z<e[r].z)&&t.x<(e[o].x-e[r].x)*(t.z-e[r].z)/(e[o].z-e[r].z)+e[r].x&&(n=!n);return n},r.isVectorInPolygon=function(e,t,n){var r=1e5,i=-1e5,o=[];return t.vertexIds.forEach((function(e){r=Math.min(n[e].y,r),i=Math.max(n[e].y,i),o.push(n[e])})),!!(e.y<i+.5&&e.y>r-.5&&this.isPointInPoly(o,e))},r.triarea2=function(e,t,n){return(n.x-e.x)*(t.z-e.z)-(t.x-e.x)*(n.z-e.z)},r.vequal=function(e,t){return this.distanceToSquared(e,t)<1e-5};var i=function(e){this.content=[],this.scoreFunction=e};i.prototype.push=function(e){this.content.push(e),this.sinkDown(this.content.length-1)},i.prototype.pop=function(){var e=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.bubbleUp(0)),e},i.prototype.remove=function(e){var t=this.content.indexOf(e),n=this.content.pop();t!==this.content.length-1&&(this.content[t]=n,this.scoreFunction(n)<this.scoreFunction(e)?this.sinkDown(t):this.bubbleUp(t))},i.prototype.size=function(){return this.content.length},i.prototype.rescoreElement=function(e){this.sinkDown(this.content.indexOf(e))},i.prototype.sinkDown=function(e){for(var t=this.content[e];e>0;){var n=(e+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(t)<this.scoreFunction(r)))break;this.content[n]=t,this.content[e]=r,e=n}},i.prototype.bubbleUp=function(e){for(var t=this.content.length,n=this.content[e],r=this.scoreFunction(n);;){var i=e+1<<1,o=i-1,a=null,s=void 0;if(o<t&&(s=this.scoreFunction(this.content[o]))<r&&(a=o),i<t&&this.scoreFunction(this.content[i])<(null===a?r:s)&&(a=i),null===a)break;this.content[e]=this.content[a],this.content[a]=n,e=a}};var o=function(){};o.init=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.f=0,n.g=0,n.h=0,n.cost=1,n.visited=!1,n.closed=!1,n.parent=null}},o.cleanUp=function(e){for(var t=0;t<e.length;t++){var n=e[t];delete n.f,delete n.g,delete n.h,delete n.cost,delete n.visited,delete n.closed,delete n.parent}},o.heap=function(){return new i((function(e){return e.f}))},o.search=function(e,t,n){this.init(e);var r=this.heap();for(r.push(t);r.size()>0;){var i=r.pop();if(i===n){for(var o=i,a=[];o.parent;)a.push(o),o=o.parent;return this.cleanUp(a),a.reverse()}i.closed=!0;for(var s=this.neighbours(e,i),l=0,c=s.length;l<c;l++){var u=s[l];if(!u.closed){var h=i.g+u.cost,d=u.visited;if(!d||h<u.g){if(u.visited=!0,u.parent=i,!u.centroid||!n.centroid)throw new Error("Unexpected state");u.h=u.h||this.heuristic(u.centroid,n.centroid),u.g=h,u.f=u.g+u.h,d?r.rescoreElement(u):r.push(u)}}}}return[]},o.heuristic=function(e,t){return r.distanceToSquared(e,t)},o.neighbours=function(e,t){for(var n=[],r=0;r<t.neighbours.length;r++)n.push(e[t.neighbours[r]]);return n};var a=1,s=function(){};s.buildZone=function(e){var t=this,n=this._buildNavigationMesh(e),i={};n.vertices.forEach((function(e){e.x=r.roundNumber(e.x,2),e.y=r.roundNumber(e.y,2),e.z=r.roundNumber(e.z,2)})),i.vertices=n.vertices;var o=this._buildPolygonGroups(n);i.groups=[];var a=function(e,t){for(var n=0;n<e.length;n++)if(t===e[n])return n};return o.forEach((function(e){var n=[];e.forEach((function(i){var o=i.neighbours.map((function(t){return a(e,t)})),s=i.neighbours.map((function(e){return t._getSharedVerticesInOrder(i,e)}));i.centroid.x=r.roundNumber(i.centroid.x,2),i.centroid.y=r.roundNumber(i.centroid.y,2),i.centroid.z=r.roundNumber(i.centroid.z,2),n.push({id:a(e,i),neighbours:o,vertexIds:i.vertexIds,centroid:i.centroid,portals:s})})),i.groups.push(n)})),i},s._buildNavigationMesh=function(e){return r.computeCentroids(e),e.mergeVertices(),this._buildPolygonsFromGeometry(e)},s._buildPolygonGroups=function(e){var t=[],n=0,r=function(e){e.neighbours.forEach((function(t){void 0===t.group&&(t.group=e.group,r(t))}))};return e.polygons.forEach((function(e){void 0===e.group&&(e.group=n++,r(e)),t[e.group]||(t[e.group]=[]),t[e.group].push(e)})),t},s._buildPolygonNeighbours=function(e,t,n){var r=new Set,i=n.get(e.vertexIds[0]),o=n.get(e.vertexIds[1]),a=n.get(e.vertexIds[2]);i.forEach((function(e){(o.has(e)||a.has(e))&&r.add(t.polygons[e])})),o.forEach((function(e){a.has(e)&&r.add(t.polygons[e])})),e.neighbours=Array.from(r)},s._buildPolygonsFromGeometry=function(e){for(var t=this,n=[],r=e.vertices,i=e.faceVertexUvs,o=new Map,s=0;s<r.length;s++)o.set(s,new Set);e.faces.forEach((function(e){n.push({id:a++,vertexIds:[e.a,e.b,e.c],centroid:e.centroid,normal:e.normal,neighbours:[]}),o.get(e.a).add(n.length-1),o.get(e.b).add(n.length-1),o.get(e.c).add(n.length-1)}));var l={polygons:n,vertices:r,faceVertexUvs:i};return n.forEach((function(e){t._buildPolygonNeighbours(e,l,o)})),l},s._getSharedVerticesInOrder=function(e,t){var n=e.vertexIds,r=t.vertexIds,i=new Set;if(n.forEach((function(e){r.includes(e)&&i.add(e)})),i.size<2)return[];i.has(n[0])&&i.has(n[n.length-1])&&n.push(n.shift()),i.has(r[0])&&i.has(r[r.length-1])&&r.push(r.shift());var o=[];return n.forEach((function(e){r.includes(e)&&o.push(e)})),o};var l=function(){this.portals=[]};l.prototype.push=function(e,t){void 0===t&&(t=e),this.portals.push({left:e,right:t})},l.prototype.stringPull=function(){var e,t,n,i=this.portals,o=[],a=0,s=0,l=0;t=i[0].left,n=i[0].right,o.push(e=i[0].left);for(var c=1;c<i.length;c++){var u=i[c].left,h=i[c].right;if(r.triarea2(e,n,h)<=0){if(!(r.vequal(e,n)||r.triarea2(e,t,h)>0)){o.push(t),t=e=t,n=e,s=a=s,l=a,c=a;continue}n=h,l=c}if(r.triarea2(e,t,u)>=0){if(!(r.vequal(e,t)||r.triarea2(e,n,u)<0)){o.push(n),t=e=n,n=e,s=a=l,l=a,c=a;continue}t=u,s=c}}return 0!==o.length&&r.vequal(o[o.length-1],i[i.length-1].left)||o.push(i[i.length-1].left),this.path=o,o};var c,u,h,d,f,p,m=function(){this.zones={}};m.createZone=function(e){return s.buildZone(e)},m.prototype.setZoneData=function(e,t){this.zones[e]=t},m.prototype.getGroup=function(e,t){if(!this.zones[e])return null;var n=null,i=Math.pow(50,2);return this.zones[e].groups.forEach((function(e,o){e.forEach((function(e){var a=r.distanceToSquared(e.centroid,t);a<i&&(n=o,i=a)}))})),n},m.prototype.getRandomNode=function(e,t,n,i){if(!this.zones[e])return new THREE.Vector3;n=n||null,i=i||0;var o=[];return this.zones[e].groups[t].forEach((function(e){n&&i?r.distanceToSquared(n,e.centroid)<i*i&&o.push(e.centroid):o.push(e.centroid)})),r.sample(o)||new THREE.Vector3},m.prototype.getClosestNode=function(e,t,n,i){void 0===i&&(i=!1);var o=this.zones[t].vertices,a=null,s=1/0;return this.zones[t].groups[n].forEach((function(t){var n=r.distanceToSquared(t.centroid,e);n<s&&(!i||r.isVectorInPolygon(e,t,o))&&(a=t,s=n)})),a},m.prototype.findPath=function(e,t,n,r){var i=this.zones[n].groups[r],a=this.zones[n].vertices,s=this.getClosestNode(e,n,r),c=this.getClosestNode(t,n,r,!0);if(!s||!c)return null;var u=o.search(i,s,c),h=function(e,t){for(var n=0;n<e.neighbours.length;n++)if(e.neighbours[n]===t.id)return e.portals[n]},d=new l;d.push(e);for(var f=0;f<u.length;f++){var p=u[f+1];if(p){var m=h(u[f],p);d.push(a[m[0]],a[m[1]])}}d.push(t),d.stringPull();var g=d.path.map((function(e){return new THREE.Vector3(e.x,e.y,e.z)}));return g.shift(),g},m.prototype.clampStep=(h=new THREE.Vector3,d=new THREE.Plane,f=new THREE.Triangle,p=new THREE.Vector3,function(e,t,n,r,i,o){var a=this.zones[r].vertices,s=this.zones[r].groups[i],l=[n],m={};m[n.id]=0,c=void 0,p.set(0,0,0),u=1/0,d.setFromCoplanarPoints(a[n.vertexIds[0]],a[n.vertexIds[1]],a[n.vertexIds[2]]),d.projectPoint(t,h),t.copy(h);for(var g=l.pop();g;g=l.pop()){f.set(a[g.vertexIds[0]],a[g.vertexIds[1]],a[g.vertexIds[2]]),f.closestPointToPoint(t,h),h.distanceToSquared(t)<u&&(c=g,p.copy(h),u=h.distanceToSquared(t));var v=m[g];if(!(v>2))for(var y=0;y<g.neighbours.length;y++){var b=s[g.neighbours[y]];b.id in m||(l.push(b),m[b.id]=v+1)}}return o.copy(p),c})},function(e,t,n){n(354),n(355),n(358),n(359)},function(e,t){e.exports=AFRAME.registerPrimitive("a-grid",{defaultComponents:{geometry:{primitive:"plane",width:75,height:75},rotation:{x:-90,y:0,z:0},material:{src:"url(https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/assets/grid.png)",repeat:"75 75"}},mappings:{width:"geometry.width",height:"geometry.height",src:"material.src"}})},function(e,t,n){const r=n(356),i=n(357);e.exports.Primitive=AFRAME.registerPrimitive("a-hexgrid",{defaultComponents:{hexgrid:{}},mappings:{src:"hexgrid.src"}}),e.exports.Component=AFRAME.registerComponent("hexgrid",{dependencies:["material"],schema:{src:{type:"asset"}},init:function(){const e=this.data;e.src?fetch(e.src).then(e=>e.json()).then(e=>this.addMesh(e)):this.addMesh(i)},addMesh:function(e){const t=new r.HexGrid;t.fromJSON(e);const n=new r.Board(t);n.generateTilemap(),this.el.setObject3D("mesh",n.group),this.addMaterial()},addMaterial:function(){const e=(this.el.components.material||{}).material;e&&this.el.object3D.traverse(t=>{t.isMesh&&(t.material=e)})},remove:function(){this.el.removeObject3D("mesh")}})},function(e,t){var n=e.exports={VERSION:"0.1.1",PI:Math.PI,TAU:2*Math.PI,DEG_TO_RAD:.0174532925,RAD_TO_DEG:57.2957795,SQRT3:Math.sqrt(3),TILE:"tile",ENT:"entity",STR:"structure",HEX:"hex",SQR:"square",ABS:"abstract"};n.Board=function(e,t){if(!e)throw new Error("You must pass in a grid system for the board to use.");this.tiles=[],this.tileGroup=null,this.group=new THREE.Object3D,this.grid=null,this.overlay=null,this.finder=new n.AStarFinder(t),n.Loader.init(),this.setGrid(e)},n.Board.prototype={setEntityOnTile:function(e,t){var n=this.grid.cellToPixel(t.cell);e.position.copy(n),e.position.y+=e.heightOffset||0,e.tile&&(e.tile.entity=null),e.tile=t,t.entity=e},addTile:function(e){-1===this.tiles.indexOf(e)&&(this.tiles.push(e),this.snapTileToGrid(e),e.position.y=0,this.tileGroup.add(e.mesh),this.grid.add(e.cell),e.cell.tile=e)},removeTile:function(e){if(e){var t=this.tiles.indexOf(e);this.grid.remove(e.cell),-1!==t&&this.tiles.splice(t,1),e.dispose()}},removeAllTiles:function(){if(this.tileGroup)for(var e=this.tileGroup.children,t=0;t<e.length;t++)this.tileGroup.remove(e[t])},getTileAtCell:function(e){var t=this.grid.cellToHash(e);return e.tile||("undefined"!=typeof this.grid.cells[t]?this.grid.cells[t].tile:null)},snapToGrid:function(e){var t=this.grid.pixelToCell(e);e.copy(this.grid.cellToPixel(t))},snapTileToGrid:function(e){if(e.cell)e.position.copy(this.grid.cellToPixel(e.cell));else{var t=this.grid.pixelToCell(e.position);e.position.copy(this.grid.cellToPixel(t))}return e},getRandomTile:function(){var e=n.Tools.randomInt(0,this.tiles.length-1);return this.tiles[e]},findPath:function(e,t,n){return this.finder.findPath(e.cell,t.cell,n,this.grid)},setGrid:function(e){this.group.remove(this.tileGroup),this.grid&&e!==this.grid&&(this.removeAllTiles(),this.tiles.forEach((function(e){this.grid.remove(e.cell),e.dispose()})),this.grid.dispose()),this.grid=e,this.tiles=[],this.tileGroup=new THREE.Object3D,this.group.add(this.tileGroup)},generateOverlay:function(e){var t=new THREE.LineBasicMaterial({color:0,opacity:.3});this.overlay&&this.group.remove(this.overlay),this.overlay=new THREE.Object3D,this.grid.generateOverlay(e,this.overlay,t),this.group.add(this.overlay)},generateTilemap:function(e){this.reset();var t=this.grid.generateTiles(e);this.tiles=t,this.tileGroup=new THREE.Object3D;for(var n=0;n<t.length;n++)this.tileGroup.add(t[n].mesh);this.group.add(this.tileGroup)},reset:function(){this.removeAllTiles(),this.tileGroup&&this.group.remove(this.tileGroup)}},n.Board.prototype.constructor=n.Board,n.Cell=function(e,t,r,i){this.q=e||0,this.r=t||0,this.s=r||0,this.h=i||1,this.tile=null,this.userData={},this.walkable=!0,this._calcCost=0,this._priority=0,this._visited=!1,this._parent=null,this.uniqueID=n.LinkedList.generateID()},n.Cell.prototype={set:function(e,t,n){return this.q=e,this.r=t,this.s=n,this},copy:function(e){return this.q=e.q,this.r=e.r,this.s=e.s,this.h=e.h,this.tile=e.tile||null,this.userData=e.userData||{},this.walkable=e.walkable,this},add:function(e){return this.q+=e.q,this.r+=e.r,this.s+=e.s,this},equals:function(e){return this.q===e.q&&this.r===e.r&&this.s===e.s}},n.Cell.prototype.constructor=n.Cell,n.HexGrid=function(e){e=e||{},this.type=n.HEX,this.size=5,this.cellSize="undefined"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t,r=[];for(t=0;6>t;t++)r.push(this._createVertex(t));for(this.cellShape=new THREE.Shape,this.cellShape.moveTo(r[0].x,r[0].y),t=1;6>t;t++)this.cellShape.lineTo(r[t].x,r[t].y);this.cellShape.lineTo(r[0].x,r[0].y),this.cellShape.autoClose=!0,this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=r,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this._hashDelimeter=".",this._directions=[new n.Cell(1,-1,0),new n.Cell(1,0,-1),new n.Cell(0,1,-1),new n.Cell(-1,1,0),new n.Cell(-1,0,1),new n.Cell(0,-1,1)],this._diagonals=[new n.Cell(2,-1,-1),new n.Cell(1,1,-2),new n.Cell(-1,2,-1),new n.Cell(-2,1,1),new n.Cell(-1,-1,2),new n.Cell(1,-2,1)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new n.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},n.HexGrid.TWO_THIRDS=2/3,n.HexGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._cellWidth*.75,this._vec3.y=e.h,this._vec3.z=-(e.s-e.r)*this._cellLength*.5,this._vec3},pixelToCell:function(e){var t=e.x*(n.HexGrid.TWO_THIRDS/this.cellSize),r=(-e.x/3+n.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,r,-t-r),this._cubeRound(this._cel)},getCellAt:function(e){var t=e.x*(n.HexGrid.TWO_THIRDS/this.cellSize),r=(-e.x/3+n.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,r,-t-r),this._cubeRound(this._cel),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,n){var r,i,o=this._directions.length;for(this._list.length=0,r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._directions[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);if(t)for(r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._diagonals[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);return this._list},getRandomCell:function(){var e,t=0,r=n.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===r)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r+this._hashDelimeter+e.s},distance:function(e,t){return Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r),Math.abs(e.s-t.s))+(t.h-e.h)},clearPath:function(){var e,t;for(e in this.cells)(t=this.cells[e])._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,r){var i=Math.abs(e.h);1>i&&(i=1);var o=this._geoCache[i];o||(this.extrudeSettings.amount=i,o=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[i]=o);var a=new n.Tile({size:this.cellSize,scale:t,cell:e,geometry:o,material:r});return e.tile=a,a},generateTiles:function(e){e=e||{};var t,r,i,o=[],a={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};for(t in a=n.Tools.merge(a,e),this.cellSize=a.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this.autogenerated=!0,this.extrudeSettings=a.extrudeSettings,this.cells)i=this.cells[t],(r=this.generateTile(i,a.tileScale,a.material)).position.copy(this.cellToPixel(i)),r.position.y=0,o.push(r);return o},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,n.PI/2),t},generate:function(e){var t,r,i,o;for(e=e||{},this.size="undefined"==typeof e.size?this.size:e.size,t=-this.size;t<this.size+1;t++)for(r=-this.size;r<this.size+1;r++)i=-t-r,Math.abs(t)<=this.size&&Math.abs(r)<=this.size&&Math.abs(i)<=this.size&&(o=new n.Cell(t,r,i),this.add(o))},generateOverlay:function(e,t,r){var i,o,a,s=this.cellShape.createPointsGeometry();for(i=-e;e+1>i;i++)for(o=-e;e+1>o;o++)if(a=-i-o,Math.abs(i)<=e&&Math.abs(o)<=e&&Math.abs(a)<=e){this._cel.set(i,o,a);var l=new THREE.Line(s,r);l.position.copy(this.cellToPixel(this._cel)),l.rotation.x=90*n.DEG_TO_RAD,t.add(l)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,r){var i=this;n.Tools.getJSON({url:e,callback:function(e){i.fromJSON(e),t.call(r||null,e)},cache:!1,scope:i})},fromJSON:function(e){var t,r,i=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<i.length;t++)(r=new n.Cell).copy(i[t]),this.add(r)},toJSON:function(){var e,t,n={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},r=[];for(t in this.cells)e=this.cells[t],r.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return n.cells=r,n},_createVertex:function(e){var t=n.TAU/6*e;return new THREE.Vector3(this.cellSize*Math.cos(t),this.cellSize*Math.sin(t),0)},_cubeRound:function(e){var t=Math.round(e.q),n=Math.round(e.r),r=Math.round(e.s),i=Math.abs(t-e.q),o=Math.abs(n-e.r),a=Math.abs(r-e.s);return i>o&&i>a?t=-n-r:o>a?n=-t-r:r=-t-n,this._cel.set(t,n,r)}},n.HexGrid.prototype.constructor=n.HexGrid,n.SqrGrid=function(e){e=e||{},this.type=n.SQR,this.size=5,this.cellSize="undefined"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t=[];t.push(new THREE.Vector3),t.push(new THREE.Vector3(-this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,-this.cellSize)),this.cellShape=new THREE.Shape,this.cellShape.moveTo(-this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,-this.cellSize),this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=t,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._fullCellSize=2*this.cellSize,this._hashDelimeter=".",this._directions=[new n.Cell(1,0,0),new n.Cell(0,-1,0),new n.Cell(-1,0,0),new n.Cell(0,1,0)],this._diagonals=[new n.Cell(-1,-1,0),new n.Cell(-1,1,0),new n.Cell(1,1,0),new n.Cell(1,-1,0)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new n.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},n.SqrGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._fullCellSize,this._vec3.y=e.h,this._vec3.z=e.r*this._fullCellSize,this._vec3},pixelToCell:function(e){var t=Math.round(e.x/this._fullCellSize),n=Math.round(e.z/this._fullCellSize);return this._cel.set(t,n,0)},getCellAt:function(e){var t=Math.round(e.x/this._fullCellSize),n=Math.round(e.z/this._fullCellSize);return this._cel.set(t,n),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,n){var r,i,o=this._directions.length;for(this._list.length=0,r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._directions[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);if(t)for(r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._diagonals[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);return this._list},getRandomCell:function(){var e,t=0,r=n.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===r)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r},distance:function(e,t){return Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r))+(t.h-e.h)},clearPath:function(){var e,t;for(e in this.cells)(t=this.cells[e])._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,r){var i=Math.abs(e.h);1>i&&(i=1);var o=this._geoCache[i];o||(this.extrudeSettings.amount=i,o=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[i]=o);var a=new n.Tile({size:this.cellSize,scale:t,cell:e,geometry:o,material:r});return e.tile=a,a},generateTiles:function(e){e=e||{};var t,r,i,o=[],a={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};for(t in a=n.Tools.merge(a,e),this.cellSize=a.cellSize,this._fullCellSize=2*this.cellSize,this.autogenerated=!0,this.extrudeSettings=a.extrudeSettings,this.cells)i=this.cells[t],(r=this.generateTile(i,a.tileScale,a.material)).position.copy(this.cellToPixel(i)),r.position.y=0,o.push(r);return o},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,n.PI/2),t},generate:function(e){e=e||{},this.size="undefined"==typeof e.size?this.size:e.size;var t,r,i,o=Math.ceil(this.size/2);for(t=-o;o>t;t++)for(r=-o;o>r;r++)i=new n.Cell(t,r+1),this.add(i)},generateOverlay:function(e,t,r){var i,o,a=Math.ceil(e/2);for(i=-a;a>i;i++)for(o=-a;a>o;o++){this._cel.set(i,o);var s=new THREE.Line(this.cellGeo,r);s.position.copy(this.cellToPixel(this._cel)),s.rotation.x=90*n.DEG_TO_RAD,t.add(s)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,r){n.Tools.getJSON({url:e,callback:function(e){this.fromJSON(e),t.call(r||null,e)},cache:!1,scope:this})},fromJSON:function(e){var t,r,i=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._fullCellSize=2*this.cellSize,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<i.length;t++)(r=new n.Cell).copy(i[t]),this.add(r)},toJSON:function(){var e,t,n={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},r=[];for(t in this.cells)e=this.cells[t],r.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return n.cells=r,n}},n.SqrGrid.prototype.constructor=n.SqrGrid,n.Tile=function(e){e=e||{};var t={cell:null,geometry:null,material:null};if(!(t=n.Tools.merge(t,e)).cell||!t.geometry)throw new Error("Missing vg.Tile configuration");this.cell=t.cell,this.cell.tile&&this.cell.tile!==this&&this.cell.tile.dispose(),this.cell.tile=this,this.uniqueID=n.Tools.generateID(),this.geometry=t.geometry,this.material=t.material,this.material||(this.material=new THREE.MeshPhongMaterial({color:n.Tools.randomizeRGB("30, 30, 30",13)})),this.objectType=n.TILE,this.entity=null,this.userData={},this.selected=!1,this.highlight="0x0084cc",this.mesh=new THREE.Mesh(this.geometry,this.material),this.mesh.userData.structure=this,this.position=this.mesh.position,this.rotation=this.mesh.rotation,this.rotation.x=-90*n.DEG_TO_RAD,this.mesh.scale.set(t.scale,t.scale,1),this.material.emissive?this._emissive=this.material.emissive.getHex():this._emissive=null},n.Tile.prototype={select:function(){return this.material.emissive&&this.material.emissive.setHex(this.highlight),this.selected=!0,this},deselect:function(){return null!==this._emissive&&this.material.emissive&&this.material.emissive.setHex(this._emissive),this.selected=!1,this},toggle:function(){return this.selected?this.deselect():this.select(),this},dispose:function(){this.cell&&this.cell.tile&&(this.cell.tile=null),this.cell=null,this.position=null,this.rotation=null,this.mesh.parent&&this.mesh.parent.remove(this.mesh),this.mesh.userData.structure=null,this.mesh=null,this.material=null,this.userData=null,this.entity=null,this.geometry=null,this._emissive=null}},n.Tile.prototype.constructor=n.Tile,function(){var e=function(){this.obj=null,this.next=null,this.prev=null,this.free=!0},t=function(){this.first=null,this.last=null,this.length=0,this.objToNodeMap={},this.uniqueID=Date.now()+""+Math.floor(1e3*Math.random()),this.sortArray=[]};t.generateID=function(){return Math.random().toString(36).slice(2)+Date.now()},(t.prototype={getNode:function(e){return this.objToNodeMap[e.uniqueID]},addNode:function(n){var r=new e;if(!n.uniqueID)try{n.uniqueID=t.generateID()}catch(i){return console.error("[LinkedList.addNode] obj passed is immutable: cannot attach necessary identifier"),null}return r.obj=n,r.free=!1,this.objToNodeMap[n.uniqueID]=r,r},swapObjects:function(e,t){this.objToNodeMap[e.obj.uniqueID]=null,this.objToNodeMap[t.uniqueID]=e,e.obj=t},add:function(e){var t=this.objToNodeMap[e.uniqueID];if(t){if(!1===t.free)return;t.obj=e,t.free=!1,t.next=null,t.prev=null}else t=this.addNode(e);if(this.first){if(!this.last)throw new Error("[LinkedList.add] No last in the list -- that shouldn't happen here");this.last.next=t,t.prev=this.last,this.last=t,t.next=null}else this.first=t,this.last=t,t.next=null,t.prev=null;this.length++,this.showDebug&&this.dump("after add")},has:function(e){return!!this.objToNodeMap[e.uniqueID]},moveUp:function(e){this.dump("before move up");var t=this.getNode(e);if(!t)throw"Oops, trying to move an object that isn't in the list";if(t.prev){var n=t.prev,r=n.prev;t==this.last&&(this.last=n);var i=t.next;r&&(r.next=t),t.next=n,t.prev=n.prev,n.next=i,n.prev=t,this.first==n&&(this.first=t)}},moveDown:function(e){var t=this.getNode(e);if(!t)throw"Oops, trying to move an object that isn't in the list";if(t.next){var n=t.next;this.moveUp(n.obj),this.last==n&&(this.last=t)}},sort:function(e){var t,n,r=this.sortArray,i=this.first;for(r.length=0;i;)r.push(i.obj),i=i.next;for(this.clear(),r.sort(e),n=r.length,t=0;n>t;t++)this.add(r[t])},remove:function(e){var t=this.getNode(e);return!(!t||t.free)&&(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.prev||(this.first=t.next),t.next||(this.last=t.prev),t.free=!0,t.prev=null,t.next=null,this.length--,!0)},shift:function(){var e=this.first;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.first=e.next,e.next||(this.last=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},pop:function(){var e=this.last;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.last=e.prev,e.prev||(this.first=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},concat:function(e){for(var t=e.first;t;)this.add(t.obj),t=t.next},clear:function(){for(var e=this.first;e;)e.free=!0,e=e.next;this.first=null,this.length=0},dispose:function(){for(var e=this.first;e;)e.obj=null,e=e.next;this.first=null,this.objToNodeMap=null},dump:function(e){console.log("===================="+e+"=====================");for(var t=this.first;t;)console.log("{"+t.obj.toString()+"} previous="+(t.prev?t.prev.obj:"NULL")),t=t.next();console.log("==================================="),console.log("Last: {"+(this.last?this.last.obj:"NULL")+"} First: {"+(this.first?this.first.obj:"NULL")+"}")}}).constructor=t,n.LinkedList=t}(),function(){var e=function(e,t,n,r,i){this._listener=t,this.isOnce=n,this.context=r,this.signal=e,this._priority=i||0};(e.prototype={active:!0,params:null,execute:function(e){var t,n;return this.active&&this._listener&&(n=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,n),this.isOnce&&this.detach()),t},detach:function(){return this.isBound()?this.signal.remove(this._listener,this.context):null},isBound:function(){return!!this.signal&&!!this._listener},_destroy:function(){delete this.signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this.isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}}).constructor=e;var t=function(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){t.prototype.dispatch.apply(e,arguments)}};t.prototype={memorize:!1,_shouldPropagate:!0,active:!0,validateListener:function(e,t){if("function"!=typeof e)throw new Error("Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",t))},_registerListener:function(t,n,r,i){var o,a=this._indexOfListener(t,r);if(-1!==a){if((o=this._bindings[a]).isOnce!==n)throw new Error("You cannot add"+(n?"":"Once")+"() then add"+(n?"Once":"")+"() the same listener without removing the relationship first.")}else o=new e(this,t,n,r,i),this._addBinding(o);return this.memorize&&this._prevParams&&o.execute(this._prevParams),o},_addBinding:function(e){var t=this._bindings.length;do{t--}while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var n,r=this._bindings.length;r--;)if((n=this._bindings[r])._listener===e&&n.context===t)return r;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,n){return this.validateListener(e,"add"),this._registerListener(e,!1,t,n)},addOnce:function(e,t,n){return this.validateListener(e,"addOnce"),this._registerListener(e,!0,t,n)},remove:function(e,t){this.validateListener(e,"remove");var n=this._indexOfListener(e,t);return-1!==n&&(this._bindings[n]._destroy(),this._bindings.splice(n,1)),e},removeAll:function(e){"undefined"==typeof e&&(e=null);for(var t=this._bindings.length;t--;)e?this._bindings[t].context===e&&(this._bindings[t]._destroy(),this._bindings.splice(t,1)):this._bindings[t]._destroy();e||(this._bindings.length=0)},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(){if(this.active){var e,t=Array.prototype.slice.call(arguments),n=this._bindings.length;if(this.memorize&&(this._prevParams=t),n){e=this._bindings.slice(),this._shouldPropagate=!0;do{n--}while(e[n]&&this._shouldPropagate&&!1!==e[n].execute(t))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}},t.prototype.constructor=t,n.Signal=t}(),n.AStarFinder=function(e){e=e||{};var t={allowDiagonal:!1,heuristicFilter:null};t=n.Tools.merge(t,e),this.allowDiagonal=t.allowDiagonal,this.heuristicFilter=t.heuristicFilter,this.list=new n.LinkedList},n.AStarFinder.prototype={findPath:function(e,t,r,i){var o,a,s,l,c,u;for(r=r||this.heuristicFilter,i.clearPath(),this.list.clear(),this.list.add(e);this.list.length>0;){if(this.list.sort(this.compare),(o=this.list.shift())._visited=!0,o===t)return n.PathUtil.backtrace(t);for(c=0,u=(s=i.getNeighbors(o,this.allowDiagonal,r)).length;u>c;c++)if((l=s[c]).walkable&&(a=o._calcCost+i.distance(o,l),!l._visited||a<l._calcCost)){if(l._visited=!0,l._parent=o,l._calcCost=a,l._priority=a+i.distance(t,l),l===t)return n.PathUtil.backtrace(t);this.list.add(l)}}return null},compare:function(e,t){return e._priority-t._priority}},n.AStarFinder.prototype.constructor=n.AStarFinder,n.PathUtil={backtrace:function(e){for(var t=[e];e._parent;)e=e._parent,t.push(e);return t.reverse()},biBacktrace:function(e,t){var n=this.backtrace(e),r=this.backtrace(t);return n.concat(r.reverse())},pathLength:function(e){var t,n,r,i,o,a=0;for(t=1;t<e.length;++t)n=e[t-1],r=e[t],i=n[0]-r[0],o=n[1]-r[1],a+=Math.sqrt(i*i+o*o);return a},interpolate:function(e,t,n,r){var i,o,a,s,l,c,u=Math.abs,h=[];for(i=n>e?1:-1,o=r>t?1:-1,l=(a=u(n-e))-(s=u(r-t));e!==n||t!==r;)h.push([e,t]),(c=2*l)>-s&&(l-=s,e+=i),a>c&&(l+=a,t+=o);return h},expandPath:function(e){var t,n,r,i,o,a,s=[],l=e.length;if(2>l)return s;for(o=0;l-1>o;++o)for(t=e[o],n=e[o+1],i=(r=this.interpolate(t[0],t[1],n[0],n[1])).length,a=0;i-1>a;++a)s.push(r[a]);return s.push(e[l-1]),s},smoothenPath:function(e,t){var n,r,i,o,a,s,l,c,u,h,d,f,p=t.length,m=t[0][0],g=t[0][1],v=t[p-1][0],y=t[p-1][1];for(a=[[n=m,r=g]],l=2;p>l;++l){for(i=(u=t[l])[0],o=u[1],h=this.interpolate(n,r,i,o),f=!1,c=1;c<h.length;++c)if(d=h[c],!e.isWalkableAt(d[0],d[1])){f=!0;break}f&&(s=t[l-1],a.push(s),n=s[0],r=s[1])}return a.push([v,y]),a},compressPath:function(e){if(e.length<3)return e;var t,n,r,i,o,a,s=[],l=e[0][0],c=e[0][1],u=e[1][0],h=e[1][1],d=u-l,f=h-c;for(d/=o=Math.sqrt(d*d+f*f),f/=o,s.push([l,c]),a=2;a<e.length;a++)t=u,n=h,r=d,i=f,d=(u=e[a][0])-t,f=(h=e[a][1])-n,f/=o=Math.sqrt(d*d+f*f),((d/=o)!==r||f!==i)&&s.push([t,n]);return s.push([u,h]),s}},n.Loader={manager:null,imageLoader:null,crossOrigin:!1,init:function(e){this.crossOrigin=e||!1,this.manager=new THREE.LoadingManager((function(){}),(function(){}),(function(){console.warn("Error loading images")})),this.imageLoader=new THREE.ImageLoader(this.manager),this.imageLoader.crossOrigin=e},loadTexture:function(e,t,n,r){var i=new THREE.Texture(null,t);return this.imageLoader.load(e,(function(e){i.image=e,i.needsUpdate=!0,n&&n(i)}),null,(function(e){r&&r(e)})),i.sourceFile=e,i}},n.MouseCaster=function(e,t,r){this.down=!1,this.rightDown=!1,this.pickedObject=null,this.selectedObject=null,this.allHits=null,this.active=!0,this.shift=!1,this.ctrl=!1,this.wheel=0,this.position=new THREE.Vector3,this.screenPosition=new THREE.Vector2,this.signal=new n.Signal,this.group=e,this._camera=t,this._raycaster=new THREE.Raycaster,this._preventDefault=!1,(r=r||document).addEventListener("mousemove",this._onDocumentMouseMove.bind(this),!1),r.addEventListener("mousedown",this._onDocumentMouseDown.bind(this),!1),r.addEventListener("mouseup",this._onDocumentMouseUp.bind(this),!1),r.addEventListener("mousewheel",this._onMouseWheel.bind(this),!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel.bind(this),!1)},n.MouseCaster.OVER="over",n.MouseCaster.OUT="out",n.MouseCaster.DOWN="down",n.MouseCaster.UP="up",n.MouseCaster.CLICK="click",n.MouseCaster.WHEEL="wheel",n.MouseCaster.prototype={update:function(){if(this.active){this._raycaster.setFromCamera(this.screenPosition,this._camera);var e,t,r=this._raycaster.intersectObject(this.group,!0);r.length>0?(t=(e=r[0]).object.userData.structure,this.pickedObject!=t&&(this.pickedObject&&this.signal.dispatch(n.MouseCaster.OUT,this.pickedObject),this.pickedObject=t,this.selectedObject=null,this.signal.dispatch(n.MouseCaster.OVER,this.pickedObject)),this.position.copy(e.point),this.screenPosition.z=e.distance):(this.pickedObject&&this.signal.dispatch(n.MouseCaster.OUT,this.pickedObject),this.pickedObject=null,this.selectedObject=null),this.allHits=r}},preventDefault:function(){this._preventDefault=!0},_onDocumentMouseDown:function(e){return(e=e||window.event).preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.pickedObject&&(this.selectedObject=this.pickedObject),this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.down=1===e.which,this.rightDown=3===e.which,void this.signal.dispatch(n.MouseCaster.DOWN,this.pickedObject))},_onDocumentMouseUp:function(e){return e.preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.signal.dispatch(n.MouseCaster.UP,this.pickedObject),this.selectedObject&&this.pickedObject&&this.selectedObject.uniqueID===this.pickedObject.uniqueID&&this.signal.dispatch(n.MouseCaster.CLICK,this.pickedObject),this.down=1!==e.which&&this.down,void(this.rightDown=3!==e.which&&this.rightDown))},_onDocumentMouseMove:function(e){e.preventDefault(),this.screenPosition.x=e.clientX/window.innerWidth*2-1,this.screenPosition.y=-e.clientY/window.innerHeight*2+1},_onMouseWheel:function(e){if(this.active){e.preventDefault(),e.stopPropagation();var t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),t>0?this.wheel++:this.wheel--,this.signal.dispatch(n.MouseCaster.WHEEL,this.wheel)}}},n.MouseCaster.prototype.constructor=n.MouseCaster,n.Scene=function(e,t){var r={element:document.body,alpha:!0,antialias:!0,clearColor:"#fff",sortObjects:!1,fog:null,light:new THREE.DirectionalLight(16777215),lightPosition:null,cameraType:"PerspectiveCamera",cameraPosition:null,orthoZoom:4},i={minDistance:100,maxDistance:1e3,zoomSpeed:2,noZoom:!1};if(r=n.Tools.merge(r,e),"boolean"!=typeof t&&(i=n.Tools.merge(i,t)),this.renderer=new THREE.WebGLRenderer({alpha:r.alpha,antialias:r.antialias}),this.renderer.setClearColor(r.clearColor,0),this.renderer.sortObjects=r.sortObjects,this.width=window.innerWidth,this.height=window.innerHeight,this.orthoZoom=r.orthoZoom,this.container=new THREE.Scene,this.container.fog=r.fog,this.container.add(new THREE.AmbientLight(14540253)),r.lightPosition||r.light.position.set(-1,1,-1).normalize(),this.container.add(r.light),"OrthographicCamera"===r.cameraType){var o=window.innerWidth/this.orthoZoom,a=window.innerHeight/this.orthoZoom;this.camera=new THREE.OrthographicCamera(o/-2,o/2,a/2,a/-2,1,5e3)}else this.camera=new THREE.PerspectiveCamera(50,this.width/this.height,1,5e3);this.contolled=!!t,this.contolled&&(this.controls=new THREE.OrbitControls(this.camera,this.renderer.domElement),this.controls.minDistance=i.minDistance,this.controls.maxDistance=i.maxDistance,this.controls.zoomSpeed=i.zoomSpeed,this.controls.noZoom=i.noZoom),r.cameraPosition&&this.camera.position.copy(r.cameraPosition),window.addEventListener("resize",function(){if(this.width=window.innerWidth,this.height=window.innerHeight,"OrthographicCamera"===this.camera.type){var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2}else this.camera.aspect=this.width/this.height;this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height)}.bind(this),!1),this.attachTo(r.element)},n.Scene.prototype={attachTo:function(e){e.style.width=this.width+"px",e.style.height=this.height+"px",this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),e.appendChild(this.renderer.domElement)},add:function(e){this.container.add(e)},remove:function(e){this.container.remove(e)},render:function(){this.contolled&&this.controls.update(),this.renderer.render(this.container,this.camera)},updateOrthoZoom:function(){if(this.orthoZoom<=0)this.orthoZoom=0;else{var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2,this.camera.updateProjectionMatrix()}},focusOn:function(e){this.camera.lookAt(e.position)}},n.Scene.prototype.constructor=n.Scene,n.SelectionManager=function(e){this.mouse=e,this.onSelect=new n.Signal,this.onDeselect=new n.Signal,this.selected=null,this.toggleSelection=!1,this.mouse.signal.add(this.onMouse,this)},n.SelectionManager.prototype={select:function(e,t){e&&(t=t||!0,this.selected!==e&&this.clearSelection(t),e.selected?this.toggleSelection&&(t&&this.onDeselect.dispatch(e),e.deselect()):e.select(),this.selected=e,t&&this.onSelect.dispatch(e))},clearSelection:function(e){e=e||!0,this.selected&&(e&&this.onDeselect.dispatch(this.selected),this.selected.deselect()),this.selected=null},onMouse:function(e,t){switch(e){case n.MouseCaster.DOWN:t||this.clearSelection();break;case n.MouseCaster.CLICK:this.select(t)}}},n.SelectionManager.prototype.constructor=n.SelectionManager,n.Tools={clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},sign:function(e){return e&&e/Math.abs(e)},random:function(e,t){return 1===arguments.length?Math.random()*e-.5*e:Math.random()*(t-e)+e},randomInt:function(e,t){return 1===arguments.length?Math.random()*e-.5*e|0:Math.random()*(t-e+1)+e|0},normalize:function(e,t,n){return(e-t)/(n-t)},getShortRotation:function(e){return(e%=this.TAU)>this.PI?e-=this.TAU:e<-this.PI&&(e+=this.TAU),e},generateID:function(){return Math.random().toString(36).slice(2)+Date.now()},isPlainObject:function(e){if("object"!=typeof e||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!Object.prototype.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},merge:function(e,t){var n=this,r=Array.isArray(t),i=r&&[]||{};return r?(e=e||[],i=i.concat(e),t.forEach((function(t,r){"undefined"==typeof i[r]?i[r]=t:n.isPlainObject(t)?i[r]=n.merge(e[r],t):-1===e.indexOf(t)&&i.push(t)})),i):(e&&n.isPlainObject(e)&&Object.keys(e).forEach((function(t){i[t]=e[t]})),Object.keys(t).forEach((function(r){t[r]&&n.isPlainObject(t[r])&&e[r]?i[r]=n.merge(e[r],t[r]):i[r]=t[r]})),i)},now:function(){return window.nwf?window.nwf.system.Performance.elapsedTime:window.performance.now()},empty:function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},radixSort:function(e,t,n,r){if(r=r||31,!((t=t||0)>=(n=n||e.length)-1||0>r)){for(var i=t,o=n,a=1<<r;o>i;)if(e[i]&a){--o;var s=e[i];e[i]=e[o],e[o]=s}else++i;this.radixSort(e,t,o,r-1),this.radixSort(e,o,n,r-1)}},randomizeRGB:function(e,t){var n,r,i=e.split(","),o="rgb(";for(t=this.randomInt(t),n=0;3>n;n++)0>(r=parseInt(i[n])+t)?r=0:r>255&&(r=255),o+=r+",";return(o=o.substring(0,o.length-1))+")"},getJSON:function(e){var t=new XMLHttpRequest,n="undefined"!=typeof e.cache&&e.cache?e.url:e.url+"?t="+Math.floor(1e4*Math.random())+Date.now();t.onreadystatechange=function(){if(200!==this.status)0!==this.status&&console.warn("[Tools.getJSON] Error: "+this.status+" ("+this.statusText+") :: "+e.url);else{var t=null;try{t=JSON.parse(this.responseText)}catch(n){return}e.callback.call(e.scope||null,t)}},t.open("GET",n,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Content-Type","application/json"),t.send("")}}},function(e,t){e.exports={size:5,cellSize:10,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5},autogenerated:!0,cells:[{q:-1,r:0,s:1,h:1,walkable:!0,userData:{}},{q:0,r:-1,s:1,h:1,walkable:!0,userData:{}},{q:0,r:0,s:0,h:1,walkable:!0,userData:{}},{q:1,r:-1,s:0,h:1,walkable:!0,userData:{}},{q:-1,r:1,s:0,h:0,walkable:!0,userData:{}},{q:0,r:1,s:-1,h:0,walkable:!0,userData:{}},{q:1,r:0,s:-1,h:0,walkable:!0,userData:{}}]}},function(e,t){e.exports.Primitive=AFRAME.registerPrimitive("a-ocean",{defaultComponents:{ocean:{},rotation:{x:-90,y:0,z:0}},mappings:{width:"ocean.width",depth:"ocean.depth",density:"ocean.density",amplitude:"ocean.amplitude",amplitudeVariance:"ocean.amplitudeVariance",speed:"ocean.speed",speedVariance:"ocean.speedVariance",color:"ocean.color",opacity:"ocean.opacity"}}),e.exports.Component=AFRAME.registerComponent("ocean",{schema:{width:{default:10,min:0},depth:{default:10,min:0},density:{default:10},amplitude:{default:.1},amplitudeVariance:{default:.3},speed:{default:1},speedVariance:{default:2},color:{default:"#7AD2F7",type:"color"},opacity:{default:.8}},play:function(){const e=this.el,t=this.data;let n=e.components.material;const r=new THREE.PlaneGeometry(t.width,t.depth,t.density,t.density);r.mergeVertices(),this.waves=[];for(let i,o=0,a=r.vertices.length;o<a;o++)i=r.vertices[o],this.waves.push({z:i.z,ang:Math.random()*Math.PI*2,amp:t.amplitude+Math.random()*t.amplitudeVariance,speed:(t.speed+Math.random()*t.speedVariance)/1e3});n||(n={},n.material=new THREE.MeshPhongMaterial({color:t.color,transparent:t.opacity<1,opacity:t.opacity,shading:THREE.FlatShading})),this.mesh=new THREE.Mesh(r,n.material),e.setObject3D("mesh",this.mesh)},remove:function(){this.el.removeObject3D("mesh")},tick:function(e,t){if(!t)return;const n=this.mesh.geometry.vertices;for(let r,i,o=0;r=n[o];o++)i=this.waves[o],r.z=i.z+Math.sin(i.ang)*i.amp,i.ang+=i.speed*t;this.mesh.geometry.verticesNeedUpdate=!0}})},function(e,t){e.exports.Primitive=AFRAME.registerPrimitive("a-tube",{defaultComponents:{tube:{}},mappings:{path:"tube.path",segments:"tube.segments",radius:"tube.radius","radial-segments":"tube.radialSegments",closed:"tube.closed"}}),e.exports.Component=AFRAME.registerComponent("tube",{schema:{path:{default:[]},segments:{default:64},radius:{default:1},radialSegments:{default:8},closed:{default:!1}},init:function(){const e=this.el,t=this.data;let n=e.components.material;if(!t.path.length)return void console.error("[a-tube] `path` property expected but not found.");const r=new THREE.CatmullRomCurve3(t.path.map((function(e){return e=e.split(" "),new THREE.Vector3(Number(e[0]),Number(e[1]),Number(e[2]))}))),i=new THREE.TubeGeometry(r,t.segments,t.radius,t.radialSegments,t.closed);n||(n={},n.material=new THREE.MeshPhongMaterial),this.mesh=new THREE.Mesh(i,n.material),this.el.setObject3D("mesh",this.mesh)},update:function(e){Object.keys(e).length&&(this.remove(),this.init())},remove:function(){this.mesh&&this.el.removeObject3D("mesh")}})},function(e,t,n){const r=n(85);function i(e,t){return`\n${a(e,t)}\n${o(e)}\nreturn {Body: Body, Vector: Vector};\n`}function o(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function a(e,t){let n=r(e),i="";return t&&(i=""+n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")),`function Vector(${n("{var}",{join:", "})}) {\n ${i}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=i(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=a,e.exports.getBodyCode=o},function(e,t,n){const r=n(85),i=n(185);function o(e){let t=r(e),n=Math.pow(2,e);return`\n${u()}\n${c(e)}\n${a(e)}\n${l(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" node.")}\n node.body = null;\n node.mass = ${t("node.mass_{var} = ",{join:""})}0;\n ${t("node.min_{var} = node.max_{var} = ",{join:""})}0;\n } else {\n node = new QuadNode();\n nodesCache[currentInCache] = node;\n }\n\n ++currentInCache;\n return node;\n }\n\n function update(sourceBody) {\n var queue = updateQueue;\n var v;\n ${t("var d{var};",{indent:4})}\n var r; \n ${t("var f{var} = 0;",{indent:4})}\n var queueLength = 1;\n var shiftIdx = 0;\n var pushIdx = 1;\n\n queue[0] = root;\n\n while (queueLength) {\n var node = queue[shiftIdx];\n var body = node.body;\n\n queueLength -= 1;\n shiftIdx += 1;\n var differentBody = (body !== sourceBody);\n if (body && differentBody) {\n // If the current node is a leaf node (and it is not source body),\n // calculate the force exerted by the current node on body, and add this\n // amount to body's net force.\n ${t("d{var} = body.pos.{var} - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Poor man's protection against zero distance.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n // This is standard gravitation force calculation but we divide\n // by r^3 to save two operations when normalizing force vector.\n v = gravity * body.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:8})}\n } else if (differentBody) {\n // Otherwise, calculate the ratio s / r, where s is the width of the region\n // represented by the internal node, and r is the distance between the body\n // and the node's center-of-mass\n ${t("d{var} = node.mass_{var} / node.mass - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Sorry about code duplication. I don't want to create many functions\n // right away. Just want to see performance first.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n // If s / r < \u03b8, treat this internal node as a single body, and calculate the\n // force it exerts on sourceBody, and add this amount to sourceBody's net force.\n if ((node.max_${i(0)} - node.min_${i(0)}) / r < theta) {\n // in the if statement above we consider node's width only\n // because the region was made into square during tree creation.\n // Thus there is no difference between using width or height.\n v = gravity * node.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:10})}\n } else {\n // Otherwise, run the procedure recursively on each of the current node's children.\n\n // I intentionally unfolded this loop, to save several CPU cycles.\n${function(){let e=Array(11).join(" "),t=[];for(let r=0;r<n;++r)t.push(e+`if (node.quad${r}) {`),t.push(e+` queue[pushIdx] = node.quad${r};`),t.push(e+" queueLength += 1;"),t.push(e+" pushIdx += 1;"),t.push(e+"}");return t.join("\n")}()}\n }\n }\n }\n\n ${t("sourceBody.force.{var} += f{var};",{indent:4})}\n }\n\n function insertBodies(bodies) {\n ${t("var {var}min = Number.MAX_VALUE;",{indent:4})}\n ${t("var {var}max = Number.MIN_VALUE;",{indent:4})}\n var i = bodies.length;\n\n // To reduce quad tree depth we are looking for exact bounding box of all particles.\n while (i--) {\n var pos = bodies[i].pos;\n ${t("if (pos.{var} < {var}min) {var}min = pos.{var};",{indent:6})}\n ${t("if (pos.{var} > {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(t){let n=[],r=Array(t+1).join(" ");for(let o=0;o<e;++o)n.push(r+`if (${i(o)} > max_${i(o)}) {`),n.push(r+` quadIdx = quadIdx + ${Math.pow(2,o)};`),n.push(r+` min_${i(o)} = max_${i(o)};`),n.push(r+` max_${i(o)} = node.max_${i(o)};`),n.push(r+"}");return n.join("\n")}(8)}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function a(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n<t;++n){let t=0===n?" ":" else ";e.push(`${t}if (idx === ${n}) node.quad${n} = child;`)}return e.join("\n")}()}\n}`}function l(e){return`function getChild(node, idx) {\n${function(){let t=[],n=Math.pow(2,e);for(let e=0;e<n;++e)t.push(` if (idx === ${e}) return node.quad${e};`);return t.join("\n")}()}\n return null;\n}`}function c(e){let t=r(e),n=Math.pow(2,e);return`\nfunction QuadNode() {\n // body stored inside this node. In quad tree only leaf nodes (by construction)\n // contain bodies:\n this.body = null;\n\n // Child nodes are stored in quads. Each quad is presented by number:\n // 0 | 1\n // -----\n // 2 | 3\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" this.")}\n\n // Total mass of current node\n this.mass = 0;\n\n // Center of mass coordinates\n ${t("this.mass_{var} = 0;",{indent:2})}\n\n // bounding box coordinates\n ${t("this.min_{var} = 0;",{indent:2})}\n ${t("this.max_{var} = 0;",{indent:2})}\n}\n`}function u(){return"\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=o(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=o,e.exports.getInsertStackCode=u,e.exports.getQuadNodeCode=c,e.exports.isSamePosition=a,e.exports.getChildBodyCode=l,e.exports.setChildBodyCode=s},function(e,t,n){e.exports=function(e){let t=i(e);return new Function("bodies","settings","random",t)},e.exports.generateFunctionBody=i;const r=n(85);function i(e){let t=r(e);return`\n var boundingBox = {\n ${t("min_{var}: 0, max_{var}: 0,",{indent:4})}\n };\n\n return {\n box: boundingBox,\n\n update: updateBoundingBox,\n\n reset: resetBoundingBox,\n\n getBestNewPosition: function (neighbors) {\n var ${t("base_{var} = 0",{join:", "})};\n\n if (neighbors.length) {\n for (var i = 0; i < neighbors.length; ++i) {\n let neighborPos = neighbors[i].pos;\n ${t("base_{var} += neighborPos.{var};",{indent:10})}\n }\n\n ${t("base_{var} /= neighbors.length;",{indent:8})}\n } else {\n ${t("base_{var} = (boundingBox.min_{var} + boundingBox.max_{var}) / 2;",{indent:8})}\n }\n\n var springLength = settings.springLength;\n return {\n ${t("{var}: base_{var} + (random.nextDouble() - 0.5) * springLength,",{indent:8})}\n };\n }\n };\n\n function updateBoundingBox() {\n var i = bodies.length;\n if (i === 0) return; // No bodies - no borders.\n\n ${t("var max_{var} = -Infinity;",{indent:4})}\n ${t("var min_{var} = Infinity;",{indent:4})}\n\n while(i--) {\n // this is O(n), it could be done faster with quadtree, if we check the root node bounds\n var bodyPos = bodies[i].pos;\n ${t("if (bodyPos.{var} < min_{var}) min_{var} = bodyPos.{var};",{indent:6})}\n ${t("if (bodyPos.{var} > max_{var}) max_{var} = bodyPos.{var};",{indent:6})}\n }\n\n ${t("boundingBox.min_{var} = min_{var};",{indent:4})}\n ${t("boundingBox.max_{var} = max_{var};",{indent:4})}\n }\n\n function resetBoundingBox() {\n ${t("boundingBox.min_{var} = boundingBox.max_{var} = 0;",{indent:4})}\n }\n`}},function(e,t,n){const r=n(85);function i(e){return`\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ${r(e)("body.force.{var} -= options.dragCoefficient * body.velocity.{var};",{indent:6})}\n }\n };\n`}e.exports=function(e){let t=i(e);return new Function("options",t)},e.exports.generateCreateDragForceFunctionBody=i},function(e,t,n){const r=n(85);function i(e){let t=r(e);return`\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ${t("var d{var} = body2.pos.{var} - body1.pos.{var};",{indent:6})}\n var r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ${t("body1.force.{var} += coefficient * d{var}",{indent:6})};\n body1.springCount += 1;\n body1.springLength += r;\n\n ${t("body2.force.{var} -= coefficient * d{var}",{indent:6})};\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n`}e.exports=function(e){let t=i(e);return new Function("options","random",t)},e.exports.generateCreateSpringForceFunctionBody=i},function(e,t,n){const r=n(85);function i(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},function(e,t){e.exports=function(e,t,n,r){this.from=e,this.to=t,this.length=n,this.coefficient=r}},function(e,t){e.exports=function e(t,n){var r;t||(t={});if(n)for(r in n)if(n.hasOwnProperty(r)){var i=t.hasOwnProperty(r),o=typeof n[r];!i||typeof t[r]!==o?t[r]=n[r]:"object"===o&&(t[r]=e(t[r],n[r]))}return t}},function(e,t){function n(e){return new r("number"===typeof e?e:+new Date)}function r(e){this.seed=e}function i(e){return Math.sqrt(2*Math.PI/e)*Math.pow(1/Math.E*(e+1/(12*e-1/(10*e))),e)}function o(){var e=this.seed;return e=4294967295&(3042594569^(e=(e=4294967295&((e=(e=4294967295&(3345072700^(e=e+2127912214+(e<<12)&4294967295)^e>>>19))+374761393+(e<<5)&4294967295)+3550635116^e<<9))+4251993797+(e<<3)&4294967295)^e>>>16),this.seed=e,(268435455&e)/268435456}e.exports=n,e.exports.random=n,e.exports.randomIterator=function(e,t){var r=t||n();if("function"!==typeof r.next)throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(t){var n,i,o;for(n=e.length-1;n>0;--n)i=r.next(n+1),o=e[i],e[i]=e[n],e[n]=o,t(o);e.length&&t(e[0])},shuffle:function(){var t,n,i;for(t=e.length-1;t>0;--t)n=r.next(t+1),i=e[n],e[n]=e[t],e[t]=i;return e}}},r.prototype.next=function(e){return Math.floor(this.nextDouble()*e)},r.prototype.nextDouble=o,r.prototype.uniform=o,r.prototype.gaussian=function(){var e,t,n;do{t=2*this.nextDouble()-1,n=2*this.nextDouble()-1,e=t*t+n*n}while(e>=1||0===e);return t*Math.sqrt(-2*Math.log(e)/e)},r.prototype.levy=function(){var e=Math.pow(i(2.5)*Math.sin(1.5*Math.PI/2)/(1.5*i(1.25)*Math.pow(2,.25)),1/1.5);return this.gaussian()*e/Math.pow(Math.abs(this.gaussian()),1/1.5)}},function(e,t,n){var r=n(186),i=n(370);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(20)),a=r(n(19)),s=r(n(6)),l=r(n(8)),c=r(n(17)),u=i(n(0)),h=n(160),d="/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/RNCSliderNativeComponent.web.js";function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){(0,s.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=u.default.forwardRef((function(e,t){var n=e.value,r=e.minimumValue,i=void 0===r?0:r,o=e.maximumValue,s=void 0===o?0:o,f=e.step,m=void 0===f?1:f,v=e.minimumTrackTintColor,y=void 0===v?"#009688":v,b=e.maximumTrackTintColor,w=void 0===b?"#939393":b,x=e.thumbTintColor,_=void 0===x?"#009688":x,E=e.thumbStyle,A=void 0===E?{}:E,S=e.style,M=void 0===S?[]:S,T=e.inverted,C=void 0!==T&&T,O=e.enabled,R=void 0===O||O,k=e.trackHeight,P=void 0===k?4:k,L=e.thumbSize,D=void 0===L?20:L,I=e.onRNCSliderSlidingStart,N=void 0===I?function(){}:I,j=e.onRNCSliderSlidingComplete,B=void 0===j?function(){}:j,F=e.onRNCSliderValueChange,z=void 0===F?function(){}:F,H=(0,c.default)(e,["value","minimumValue","maximumValue","step","minimumTrackTintColor","maximumTrackTintColor","thumbTintColor","thumbStyle","style","inverted","enabled","trackHeight","thumbSize","onRNCSliderSlidingStart","onRNCSliderSlidingComplete","onRNCSliderValueChange"]),U=(0,u.useCallback)((function(e){z&&z({nativeEvent:{fromUser:!0,value:e}})}),[z]),V=(0,u.useCallback)((function(e){N&&N({nativeEvent:{fromUser:!0,value:e}})}),[N]),G=(0,u.useCallback)((function(e){B&&B({nativeEvent:{fromUser:!0,value:e}})}),[B]),W=u.default.useRef({width:0,height:0}),q=t||u.default.createRef(),X=u.default.useState(n||i),Y=(0,l.default)(X,2),K=Y[0],Q=Y[1];u.default.useLayoutEffect((function(){return ae(n)}),[n,ae]);var Z=(K-i)/(s-i),J=Z,$=1-Z,ee=h.StyleSheet.compose({flexGrow:1,flexShrink:1,flexBasis:"auto",flexDirection:"row",userSelect:"none",alignItems:"center",cursor:"pointer"},M),te={height:P,borderRadius:P/2,userSelect:"none"},ne=p({},te,{backgroundColor:y,flexGrow:100*J}),re=p({},te,{backgroundColor:w,flexGrow:100*$}),ie=h.StyleSheet.compose({width:D,height:D,backgroundColor:_,zIndex:1,borderRadius:D/2,overflow:"hidden",userSelect:"none"},A),oe=u.default.useRef(g(i,s,m));u.default.useEffect((function(){oe.current=g(i,s,m)}),[s,i,m]);var ae=(0,u.useCallback)((function(e){var t=oe.current<20?Number.parseFloat(e.toFixed(oe.current)):e,n=Math.max(i,Math.min(t,s));K!==n&&(Q(n),U(n))}),[i,s,K,U]),se=function(e){var t=(s-i)/10;switch(e.nativeEvent.actionName){case"increment":ae(K+(m||t));break;case"decrement":ae(K-(m||t))}};return u.default.useImperativeHandle(t,(function(){return{updateValue:function(e){ae(e)}}}),[ae]),u.default.createElement(h.View,(0,a.default)({ref:q,onLayout:function(e){var t=e.nativeEvent;return W.current=t.layout},accessibilityActions:[{name:"increment",label:"increment"},{name:"decrement",label:"decrement"}],onAccessibilityAction:se,accessible:!0,accessibleValue:K,accessibilityRole:"adjustable",style:ee,onStartShouldSetResponder:function(){return R},onMoveShouldSetResponder:function(){return R},onResponderGrant:function(){return V(K)},onResponderRelease:function(){G(K)},onResponderMove:function(e){var t=e.nativeEvent.locationX,n=W.current?W.current.width:1,r=C?s-(s-i)*t/n:i+(s-i)*t/n,o=m?Math.round(r/m)*m:r;ae(o)},onKeyDown:function(e){return function(e){switch(e){case"ArrowUp":case"ArrowRight":se({nativeEvent:{actionName:"increment"}});break;case"ArrowDown":case"ArrowLeft":se({nativeEvent:{actionName:"decrement"}})}}(e.nativeEvent.key)}},H,{__source:{fileName:d,lineNumber:324}}),u.default.createElement(h.View,{pointerEvents:"none",style:ne,__source:{fileName:d,lineNumber:345}}),u.default.createElement(h.View,{pointerEvents:"none",style:ie,__source:{fileName:d,lineNumber:346}}),u.default.createElement(h.View,{pointerEvents:"none",style:re,__source:{fileName:d,lineNumber:347}}))}));function g(e,t,n){if(n){var r=[e,t,n].map((function(e){return((e+"").split(".").pop()||"").length}));return Math.max.apply(Math,(0,o.default)(r))}return 1/0}m.displayName="RTCSliderWebComponent";var v=m;t.default=v},function(e,t,n){var r=n(188).default;function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=a?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(o,s,l):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(154),i=n(373);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(t,n){t.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},,function(e,t,n){"use strict";n(20)},function(e,t,n){"use strict";e.exports=n(377)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,h=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case h:case d:case a:case l:case s:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case g:case c:return e;default:return t}}case o:return t}}}function E(e){return _(e)===d}t.AsyncMode=h,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=i,t.ForwardRef=f,t.Fragment=a,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||_(e)===h},t.isConcurrentMode=E,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===a},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===g},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===l||e===s||e===p||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===w||e.$$typeof===x||e.$$typeof===y)},t.typeOf=_},function(e,t,n){var r=n(379),i=n(380)(r);e.exports=i},function(e,t){e.exports=function(e,t){var n;t=t||[];var r=(e=e||[]).length,i=t.length,o=[];for(n=0;n<r;)o[o.length]=e[n],n+=1;for(n=0;n<i;)o[o.length]=t[n],n+=1;return o}},function(e,t,n){var r=n(86),i=n(39);e.exports=function(e){return i((function(t,n){return r(Math.max(0,t.length-n.length),(function(){return t.apply(this,e(n,arguments))}))}))}},function(e,t,n){var r=n(57),i=n(113),o=r((function(e){return i(e.length,e)}));e.exports=o},function(e,t,n){var r=n(86),i=n(112);e.exports=function e(t,n,o){return function(){for(var a=[],s=0,l=t,c=0;c<n.length||s<arguments.length;){var u;c<n.length&&(!i(n[c])||s>=arguments.length)?u=n[c]:(u=arguments[s],s+=1),a[c]=u,i(u)||(l-=1),c+=1}return l<=0?o.apply(this,a):r(l,e(t,a,o))}}},function(e,t,n){var r=n(86),i=n(384),o=n(206),a=n(389);e.exports=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,o(i,arguments[0],a(arguments)))}},function(e,t){e.exports=function(e,t){return function(){var n=this;return e.apply(n,arguments).then((function(e){return t.call(n,e)}))}}},function(e,t,n){var r=n(57),i=n(157),o=n(386),a=r((function(e){return!!i(e)||!!e&&("object"===typeof e&&(!o(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}));e.exports=a},function(e,t){e.exports=function(e){return"[object String]"===Object.prototype.toString.call(e)}},function(e,t){var n=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();e.exports=function(e){return new n(e)}},function(e,t,n){var r=n(86),i=n(39)((function(e,t){return r(e.length,(function(){return e.apply(t,arguments)}))}));e.exports=i},function(e,t,n){var r=n(158),i=n(57)(r("tail",n(390)(1,1/0)));e.exports=i},function(e,t,n){var r=n(158),i=n(156)(r("slice",(function(e,t,n){return Array.prototype.slice.call(n,e,t)})));e.exports=i},function(e,t,n){var r=n(114),i=Object.prototype.toString;e.exports=function(){return"[object Arguments]"===i.call(arguments)?function(e){return"[object Arguments]"===i.call(e)}:function(e){return r("callee",e)}}},function(e,t,n){var r=n(158),i=n(39)(r("forEach",(function(e,t){for(var n=t.length,r=0;r<n;)e(t[r]),r+=1;return t})));e.exports=i},function(e,t,n){var r=n(39)((function(e,t){var n={};for(var r in t)n[r]=t[r];return delete n[e],n}));e.exports=r},function(e,t,n){var r=n(395),i=n(39)((function(e,t){return r({},e,t)}));e.exports=i},function(e,t,n){var r=n(396);e.exports="function"===typeof Object.assign?Object.assign:r},function(e,t,n){var r=n(114);e.exports=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,i=arguments.length;n<i;){var o=arguments[n];if(null!=o)for(var a in o)r(a,o)&&(t[a]=o[a]);n+=1}return t}},function(e,t,n){var r=n(39),i=n(398),o=r((function(e,t){return i([e],t)}));e.exports=o},function(e,t,n){var r=n(39)((function(e,t){for(var n=t,r=0;r<e.length;){if(null==n)return;n=n[e[r]],r+=1}return n}));e.exports=r},function(e,t,n){var r=n(156),i=n(113),o=r((function(e,t,n){return i(Math.max(e.length,t.length,n.length),(function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)}))}));e.exports=o},function(e,t,n){var r=n(401),i=n(39)(r);e.exports=i},function(e,t,n){var r=n(402);e.exports=function(e,t){return r(t,e,0)>=0}},function(e,t,n){var r=n(403);e.exports=function(e,t,n){var i,o;if("function"===typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(i=1/t;n<e.length;){if(0===(o=e[n])&&1/o===i)return n;n+=1}return-1}if(t!==t){for(;n<e.length;){if("number"===typeof(o=e[n])&&o!==o)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(null===t)return e.indexOf(t,n)}for(;n<e.length;){if(r(e[n],t))return n;n+=1}return-1}},function(e,t,n){var r=n(39),i=n(404),o=r((function(e,t){return i(e,t,[],[])}));e.exports=o},function(e,t,n){var r=n(405),i=n(406),o=n(407),a=n(114),s=n(408),l=n(159),c=n(409);function u(e,t,n,o){var a=r(e),s=r(t);function l(e,t){return h(e,t,n.slice(),o.slice())}return!i((function(e,t){return!i(l,t,e)}),s,a)}function h(e,t,n,r){if(s(e,t))return!0;var i=c(e);if(i!==c(t))return!1;if(null==e||null==t)return!1;if("function"===typeof e["fantasy-land/equals"]||"function"===typeof t["fantasy-land/equals"])return"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"===typeof e.equals||"function"===typeof t.equals)return"function"===typeof e.equals&&e.equals(t)&&"function"===typeof t.equals&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if("function"===typeof e.constructor&&"Promise"===o(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!==typeof t||!s(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!s(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var d=n.length-1;d>=0;){if(n[d]===e)return r[d]===t;d-=1}switch(i){case"Map":return e.size===t.size&&u(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&u(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=l(e);if(f.length!==l(t).length)return!1;var p=n.concat([e]),m=r.concat([t]);for(d=f.length-1;d>=0;){var g=f[d];if(!a(g,t)||!h(t[g],e[g],p,m))return!1;d-=1}return!0}e.exports=h},function(e,t){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},function(e,t){e.exports=function(e,t,n){for(var r=0,i=n.length;r<i;){if(e(t,n[r]))return!0;r+=1}return!1}},function(e,t){e.exports=function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}},function(e,t,n){var r=n(39)((function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}));e.exports=r},function(e,t,n){var r=n(57)((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));e.exports=r},function(e,t,n){var r=n(39)((function(e,t){return e>=t}));e.exports=r},function(e,t,n){var r=n(208)(!0);e.exports=r},function(e,t,n){var r=n(39)((function(e,t){return null!=t&&t.constructor===e||t instanceof e}));e.exports=r},function(e,t,n){var r=n(57)(n(414));e.exports=r},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(57)((function(e){return null==e}));e.exports=r},function(e,t,n){var r=n(86),i=n(57),o=n(417),a=n(423),s=n(206),l=i((function(e){var t=s(a,0,o((function(e){return e[0].length}),e));return r(t,(function(){for(var t=0;t<e.length;){if(e[t][0].apply(this,arguments))return e[t][1].apply(this,arguments);t+=1}}))}));e.exports=l},function(e,t,n){var r=n(39),i=n(418),o=n(420),a=n(207),s=n(421),l=n(113),c=n(159),u=r(i(["fantasy-land/map","map"],s,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return l(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return a((function(n,r){return n[r]=e(t[r]),n}),{},c(t));default:return o(e,t)}})));e.exports=u},function(e,t,n){var r=n(157),i=n(419);e.exports=function(e,t,n){return function(){if(0===arguments.length)return n();var o=Array.prototype.slice.call(arguments,0),a=o.pop();if(!r(a)){for(var s=0;s<e.length;){if("function"===typeof a[e[s]])return a[e[s]].apply(a,o);s+=1}if(i(a)){var l=t.apply(null,o);return l(a)}}return n.apply(this,arguments)}}},function(e,t){e.exports=function(e){return"function"===typeof e["@@transducer/step"]}},function(e,t){e.exports=function(e,t){for(var n=0,r=t.length,i=Array(r);n<r;)i[n]=e(t[n]),n+=1;return i}},function(e,t,n){var r=n(39),i=n(422),o=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=i.init,e.prototype["@@transducer/result"]=i.result,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),a=r((function(e,t){return new o(e,t)}));e.exports=a},function(e,t){e.exports={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}}},function(e,t,n){var r=n(39)((function(e,t){return t>e?t:e}));e.exports=r},function(e,t,n){"use strict";var r=n(52),i=n(209),o=n(425),a=n(215);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var l=s(n(212));l.Axios=o,l.create=function(e){return s(a(l.defaults,e))},l.Cancel=n(216),l.CancelToken=n(438),l.isCancel=n(211),l.all=function(e){return Promise.all(e)},l.spread=n(439),l.isAxiosError=n(440),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var r=n(52),i=n(210),o=n(426),a=n(427),s=n(215);function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){"use strict";var r=n(52);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(52),i=n(428),o=n(211),a=n(212);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(52);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(52);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(214);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(52);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(434),i=n(435);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(52),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(52);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(216);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},,,function(e,t,n){(function(e){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(444),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(46))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i=1,o={},a=!1,s=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){u(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"===typeof n.data&&0===n.data.indexOf(t)&&u(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),r=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){u(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;r=function(t){var n=s.createElement("script");n.onreadystatechange=function(){u(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():r=function(e){setTimeout(u,0,e)},l.setImmediate=function(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return o[i]=a,r(i),i++},l.clearImmediate=c}function c(e){delete o[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=o[e];if(t){a=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{c(e),a=!1}}}}}("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(this,n(46),n(111))},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLigf0exn/mkxuQjmELAAAAAD5Eq5atP6+rZeuPhGz9kZCtPxKy9fs6Zuuf60CfPn369OnTp0+fPn369OnTfx36X1vh+nO6/pytL+D1BCexy+iNhFPt6/dIOEiQIEGCBAkSJEiQ8B0k+PwoQYKhP2OXAYOvRo+vD38bvwcAAACABXF8ILs1PQqpAAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABVCAQAAAChx3/YAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfkAQMKHDc9iQjuAAACmUlEQVRo3r3ZS2sUQRAH8M5zklwWg0K8mKBB/AIqXhTEi1cTPQe9iH4AUXBNjh79EooKgggSHyCICIIQL7NV1T2bze6EFS/xoms0ie0hs+sa9zE901U79/3R8+iu+pdSnn/VfbCAz/Um2r+XV8AO0jH9pP3vvSN2COdhGX8xInbIzNMKbv1PeEPsiLmEn2i7E+EJsSN4Az+UtjoTXpBwlG7CGnQlPCA2oFtQxZ3uRG7EBnAvjHsTOREbwB2s9bpRuZHKGCzCer9V5ELi8ehuOiIzYkejBUTYTkNkREyAV5DgdzoiE2ICuoYaUxMZEBPQdYpdCGfkzbA+rUsugDNiAnOGwJVwQipj0XlCd8IBscN0wv1GOSEmCE9qyEakREyAZ4myEqkQE+hzupydSIHE4+aUjvIQfZH6hL6QbxV9kfqEnqP1vEQPxA6YA3hReyB6IOUC3vZDdEXKBVPUG36ILkhlihbxqy+iI1KZogf4xW0zd0TWDuJD+AYWLRuyOo2P0DOxB6nM4Fv87pv4B1mdxhfY8E+0IeaIfok/OIgWEs3q97DJQyTI5xn9FBpcBFqlVDgLz6CBlu9S8SS9JlYCraKlTv2qb+QdN4FWYV0AEVkJLQH/M4kn9Sv2t0vkOxH64pt7F9f22LYLVw8D9y4sdJ40T0bgPRmVUqp+iP2MF6pWkrrrPnPdJVRB7tbCVMQNZkSkqlfKDtD+kLs/Eem0xHpGoe631cdHzIhIIiGUrSQp0XHmlEgo7xJK7loZZMiMJGlqjTVNbebCRKy5cPJsLjMn3EJZvdDUQWh+krwCReZJUHOmVaqxzrSEpnNCc0ahiWlz9ksrrLNfoSn27sgf5mCZfrIiStnB8lF8rHdYEaWU+ljQV/dW0X8Ac6zWpmDZsO8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDEtMDNUMTA6Mjg6NTIrMDA6MDD7fVVWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAxLTAzVDEwOjI4OjUyKzAwOjAwiiDt6gAAAABJRU5ErkJggg=="},function(e,t,n){var r=n(448),i=n(449),o={};for(var a in r)r.hasOwnProperty(a)&&(o[r[a]]=a);var s=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function c(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}s.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=s.get.hsl(e),n="hsl";break;case"hwb":t=s.get.hwb(e),n="hwb";break;default:t=s.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},s.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var a=2*n;o[n]=parseInt(t.slice(a,a+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(t=e.match(/(\D+)/))?"transparent"===t[1]?[0,0,0,0]:(o=r[t[1]])?(o[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=i(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},s.to.rgb=function(){var e=i(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},s.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},s.to.hsl=function(){var e=i(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},s.to.hwb=function(){var e=i(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},s.to.keyword=function(e){return o[e.slice(0,3)]}},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){"use strict";var r=n(450),i=Array.prototype.concat,o=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n<a;n++){var s=e[n];r(s)?t=i.call(t,o.call(s)):t.push(s)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}},function(e,t){e.exports=function(e){return!(!e||"string"===typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},function(e,t,n){var r=n(219),i=n(453),o={};Object.keys(r).forEach((function(e){o[e]={},Object.defineProperty(o[e],"channels",{value:r[e].channels}),Object.defineProperty(o[e],"labels",{value:r[e].labels});var t=i(e);Object.keys(t).forEach((function(n){var r=t[n];o[e][n]=function(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"===typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),o[e][n].raw=function(e){var t=function(t){return void 0===t||null===t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=o},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){var r=n(219);function i(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,i=0;i<n;i++)e[t[i]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var i=n.pop(),o=Object.keys(r[i]),a=o.length,s=0;s<a;s++){var l=o[s],c=t[l];-1===c.distance&&(c.distance=t[i].distance+1,c.parent=i,n.unshift(l))}return t}function o(e,t){return function(n){return t(e(n))}}function a(e,t){for(var n=[t[e].parent,e],i=r[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),i=o(r[t[a].parent][a],i),a=t[a].parent;return i.conversion=n,i}e.exports=function(e){for(var t=i(e),n={},r=Object.keys(t),o=r.length,s=0;s<o;s++){var l=r[s];null!==t[l].parent&&(n[l]=a(l,t))}return n}},function(e,t,n){"use strict";const r=n(198),i=n(199),o=n(200),a=n(201);function s(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function c(e,t){return t.decode?i(e):e}function u(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=u(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){s((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"===typeof n&&n.includes(e.arrayFormatSeparator),o="string"===typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=o?c(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map(t=>c(t,e)):null===n?n:c(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?c(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>c(t,e));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;let[e,a]=o(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:c(a,t),n(c(e,t),a,r)}for(const i of Object.keys(r)){const e=r[i];if("object"===typeof e&&null!==e)for(const n of Object.keys(e))e[n]=d(e[n],t);else r[i]=d(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=h,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";s((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&(e=>null===e||void 0===e)(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[",i,"]"].join("")]:[...n,[l(t,e),"[",l(i,e),"]=",l(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[]"].join("")]:[...n,[l(t,e),"[]=",l(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[l(n,e),t,l(i,e)].join("")]:[[r,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,l(t,e)]:[...n,[l(t,e),"=",l(r,e)].join("")]}}(t),i={};for(const a of Object.keys(e))n(a)||(i[a]=e[a]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{const i=e[n];return void 0===i?"":null===i?l(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(n,t)+"[]":i.reduce(r(n),[]).join("&"):l(n,t)+"="+l(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=o(e,"#");return Object.assign({url:n.split("?")[0]||"",query:f(h(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:c(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=u(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query);let s=t.stringify(a,n);s&&(s="?"+s);let c=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(c="#"+l(e.fragmentIdentifier,n)),`${r}${s}${c}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:i,query:o,fragmentIdentifier:s}=t.parseUrl(e,r);return t.stringifyUrl({url:i,query:a(o,n),fragmentIdentifier:s},r)},t.exclude=(e,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,i,r)}},,,,,,,function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r={value:()=>{}};function i(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new o(r)}function o(e){this._=e}function a(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function s(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function l(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=r,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}o.prototype=i.prototype={constructor:o,on:function(e,t){var n,r=this._,i=a(e+"",r),o=-1,c=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++o<c;)if(n=(e=i[o]).type)r[n]=l(r[n],e.name,t);else if(null==t)for(n in r)r[n]=l(r[n],e.name,null);return this}for(;++o<c;)if((n=(e=i[o]).type)&&(n=s(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new o(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}},t.a=i},function(e,t,n){"use strict";var r=n(27),i=n(44);function o(e){return e.index}function a(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}t.a=function(e){var t,n,s,l,c,u,h,d=o,f=function(e){return 1/Math.min(c[e.source.index],c[e.target.index])},p=Object(r.a)(30),m=1;function g(r){for(var o=0,a=e.length;o<m;++o)for(var s,c,d,f,p,g=0,v=0,y=0,b=0;g<a;++g)c=(s=e[g]).source,v=(d=s.target).x+d.vx-c.x-c.vx||Object(i.a)(h),l>1&&(y=d.y+d.vy-c.y-c.vy||Object(i.a)(h)),l>2&&(b=d.z+d.vz-c.z-c.vz||Object(i.a)(h)),v*=f=((f=Math.sqrt(v*v+y*y+b*b))-n[g])/f*r*t[g],y*=f,b*=f,d.vx-=v*(p=u[g]),l>1&&(d.vy-=y*p),l>2&&(d.vz-=b*p),c.vx+=v*(p=1-p),l>1&&(c.vy+=y*p),l>2&&(c.vz+=b*p)}function v(){if(s){var r,i,o=s.length,l=e.length,h=new Map(s.map((e,t)=>[d(e,t,s),e]));for(r=0,c=new Array(o);r<l;++r)(i=e[r]).index=r,"object"!==typeof i.source&&(i.source=a(h,i.source)),"object"!==typeof i.target&&(i.target=a(h,i.target)),c[i.source.index]=(c[i.source.index]||0)+1,c[i.target.index]=(c[i.target.index]||0)+1;for(r=0,u=new Array(l);r<l;++r)i=e[r],u[r]=c[i.source.index]/(c[i.source.index]+c[i.target.index]);t=new Array(l),y(),n=new Array(l),b()}}function y(){if(s)for(var n=0,r=e.length;n<r;++n)t[n]=+f(e[n],n,e)}function b(){if(s)for(var t=0,r=e.length;t<r;++t)n[t]=+p(e[t],t,e)}return null==e&&(e=[]),g.initialize=function(e,...t){s=e,h=t.find(e=>"function"===typeof e)||Math.random,l=t.find(e=>[1,2,3].includes(e))||2,v()},g.links=function(t){return arguments.length?(e=t,v(),g):e},g.id=function(e){return arguments.length?(d=e,g):d},g.iterations=function(e){return arguments.length?(m=+e,g):m},g.strength=function(e){return arguments.length?(f="function"===typeof e?e:Object(r.a)(+e),y(),g):f},g.distance=function(e){return arguments.length?(p="function"===typeof e?e:Object(r.a)(+e),b(),g):p},g}},function(e,t,n){"use strict";var r=n(271),i=n(270),o=n(269),a=n(27),s=n(44),l=n(84);t.a=function(){var e,t,n,c,u,h,d=Object(a.a)(-30),f=1,p=1/0,m=.81;function g(a){var s,c=e.length,h=(1===t?Object(r.a)(e,l.b):2===t?Object(i.a)(e,l.b,l.c):3===t?Object(o.a)(e,l.b,l.c,l.d):null).visitAfter(y);for(u=a,s=0;s<c;++s)n=e[s],h.visit(b)}function v(){if(e){var t,n,r=e.length;for(h=new Array(r),t=0;t<r;++t)n=e[t],h[n.index]=+d(n,t,e)}}function y(e){var n,r,i,o,a,s,l=0,c=0,u=e.length;if(u){for(i=o=a=s=0;s<u;++s)(n=e[s])&&(r=Math.abs(n.value))&&(l+=n.value,c+=r,i+=r*(n.x||0),o+=r*(n.y||0),a+=r*(n.z||0));l*=Math.sqrt(4/u),e.x=i/c,t>1&&(e.y=o/c),t>2&&(e.z=a/c)}else{(n=e).x=n.data.x,t>1&&(n.y=n.data.y),t>2&&(n.z=n.data.z);do{l+=h[n.data.index]}while(n=n.next)}e.value=l}function b(e,r,i,o,a){if(!e.value)return!0;var l=[i,o,a][t-1],d=e.x-n.x,g=t>1?e.y-n.y:0,v=t>2?e.z-n.z:0,y=l-r,b=d*d+g*g+v*v;if(y*y/m<b)return b<p&&(0===d&&(b+=(d=Object(s.a)(c))*d),t>1&&0===g&&(b+=(g=Object(s.a)(c))*g),t>2&&0===v&&(b+=(v=Object(s.a)(c))*v),b<f&&(b=Math.sqrt(f*b)),n.vx+=d*e.value*u/b,t>1&&(n.vy+=g*e.value*u/b),t>2&&(n.vz+=v*e.value*u/b)),!0;if(!(e.length||b>=p)){(e.data!==n||e.next)&&(0===d&&(b+=(d=Object(s.a)(c))*d),t>1&&0===g&&(b+=(g=Object(s.a)(c))*g),t>2&&0===v&&(b+=(v=Object(s.a)(c))*v),b<f&&(b=Math.sqrt(f*b)));do{e.data!==n&&(y=h[e.data.index]*u/b,n.vx+=d*y,t>1&&(n.vy+=g*y),t>2&&(n.vz+=v*y))}while(e=e.next)}}return g.initialize=function(n,...r){e=n,c=r.find(e=>"function"===typeof e)||Math.random,t=r.find(e=>[1,2,3].includes(e))||2,v()},g.strength=function(e){return arguments.length?(d="function"===typeof e?e:Object(a.a)(+e),v(),g):d},g.distanceMin=function(e){return arguments.length?(f=e*e,g):Math.sqrt(f)},g.distanceMax=function(e){return arguments.length?(p=e*e,g):Math.sqrt(p)},g.theta=function(e){return arguments.length?(m=e*e,g):Math.sqrt(m)},g}},function(e,t,n){"use strict";t.a=function(e,t,n){var r,i=1;function o(){var o,a,s=r.length,l=0,c=0,u=0;for(o=0;o<s;++o)l+=(a=r[o]).x||0,c+=a.y||0,u+=a.z||0;for(l=(l/s-e)*i,c=(c/s-t)*i,u=(u/s-n)*i,o=0;o<s;++o)a=r[o],l&&(a.x-=l),c&&(a.y-=c),u&&(a.z-=u)}return null==e&&(e=0),null==t&&(t=0),null==n&&(n=0),o.initialize=function(e){r=e},o.x=function(t){return arguments.length?(e=+t,o):e},o.y=function(e){return arguments.length?(t=+e,o):t},o.z=function(e){return arguments.length?(n=+e,o):n},o.strength=function(e){return arguments.length?(i=+e,o):i},o}},function(e,t,n){"use strict";var r=n(27);t.a=function(e,t,n,i){var o,a,s,l,c=Object(r.a)(.1);function u(e){for(var r=0,c=o.length;r<c;++r){var u=o[r],h=u.x-t||1e-6,d=(u.y||0)-n||1e-6,f=(u.z||0)-i||1e-6,p=Math.sqrt(h*h+d*d+f*f),m=(l[r]-p)*s[r]*e/p;u.vx+=h*m,a>1&&(u.vy+=d*m),a>2&&(u.vz+=f*m)}}function h(){if(o){var t,n=o.length;for(s=new Array(n),l=new Array(n),t=0;t<n;++t)l[t]=+e(o[t],t,o),s[t]=isNaN(l[t])?0:+c(o[t],t,o)}}return"function"!==typeof e&&(e=Object(r.a)(+e)),null==t&&(t=0),null==n&&(n=0),null==i&&(i=0),u.initialize=function(e,...t){o=e,a=t.find(e=>[1,2,3].includes(e))||2,h()},u.strength=function(e){return arguments.length?(c="function"===typeof e?e:Object(r.a)(+e),h(),u):c},u.radius=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),h(),u):e},u.x=function(e){return arguments.length?(t=+e,u):t},u.y=function(e){return arguments.length?(n=+e,u):n},u.z=function(e){return arguments.length?(i=+e,u):i},u}},function(e,t,n){"use strict";var r=n(27);t.a=function(e){var t,n,i,o=Object(r.a)(.1);function a(e){for(var r,o=0,a=t.length;o<a;++o)(r=t[o]).vx+=(i[o]-r.x)*n[o]*e}function s(){if(t){var r,a=t.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+e(t[r],r,t))?0:+o(t[r],r,t)}}return"function"!==typeof e&&(e=Object(r.a)(null==e?0:+e)),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(o="function"===typeof e?e:Object(r.a)(+e),s(),a):o},a.x=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),s(),a):e},a}},function(e,t,n){"use strict";var r=n(27);t.a=function(e){var t,n,i,o=Object(r.a)(.1);function a(e){for(var r,o=0,a=t.length;o<a;++o)(r=t[o]).vy+=(i[o]-r.y)*n[o]*e}function s(){if(t){var r,a=t.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+e(t[r],r,t))?0:+o(t[r],r,t)}}return"function"!==typeof e&&(e=Object(r.a)(null==e?0:+e)),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(o="function"===typeof e?e:Object(r.a)(+e),s(),a):o},a.y=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),s(),a):e},a}},function(e,t,n){"use strict";var r=n(27);t.a=function(e){var t,n,i,o=Object(r.a)(.1);function a(e){for(var r,o=0,a=t.length;o<a;++o)(r=t[o]).vz+=(i[o]-r.z)*n[o]*e}function s(){if(t){var r,a=t.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+e(t[r],r,t))?0:+o(t[r],r,t)}}return"function"!==typeof e&&(e=Object(r.a)(null==e?0:+e)),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(o="function"===typeof e?e:Object(r.a)(+e),s(),a):o},a.z=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),s(),a):e},a}},function(e,t,n){"use strict";var r=n(271),i=n(270),o=n(269),a=n(27),s=n(44);function l(e){return e.x+e.vx}function c(e){return e.y+e.vy}function u(e){return e.z+e.vz}t.a=function(e){var t,n,h,d,f=1,p=1;function m(){for(var e,a,m,v,y,b,w,x,_=t.length,E=0;E<p;++E)for(a=(1===n?Object(r.a)(t,l):2===n?Object(i.a)(t,l,c):3===n?Object(o.a)(t,l,c,u):null).visitAfter(g),e=0;e<_;++e)m=t[e],w=h[m.index],x=w*w,v=m.x+m.vx,n>1&&(y=m.y+m.vy),n>2&&(b=m.z+m.vz),a.visit(A);function A(e,t,r,i,o,a,l){var c=[t,r,i,o,a,l],u=c[0],h=c[1],p=c[2],g=c[n],_=c[n+1],E=c[n+2],A=e.data,S=e.r,M=w+S;if(!A)return u>v+M||g<v-M||n>1&&(h>y+M||_<y-M)||n>2&&(p>b+M||E<b-M);if(A.index>m.index){var T=v-A.x-A.vx,C=n>1?y-A.y-A.vy:0,O=n>2?b-A.z-A.vz:0,R=T*T+C*C+O*O;R<M*M&&(0===T&&(R+=(T=Object(s.a)(d))*T),n>1&&0===C&&(R+=(C=Object(s.a)(d))*C),n>2&&0===O&&(R+=(O=Object(s.a)(d))*O),R=(M-(R=Math.sqrt(R)))/R*f,m.vx+=(T*=R)*(M=(S*=S)/(x+S)),n>1&&(m.vy+=(C*=R)*M),n>2&&(m.vz+=(O*=R)*M),A.vx-=T*(M=1-M),n>1&&(A.vy-=C*M),n>2&&(A.vz-=O*M))}}}function g(e){if(e.data)return e.r=h[e.data.index];for(var t=e.r=0;t<Math.pow(2,n);++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function v(){if(t){var n,r,i=t.length;for(h=new Array(i),n=0;n<i;++n)r=t[n],h[r.index]=+e(r,n,t)}}return"function"!==typeof e&&(e=Object(a.a)(null==e?1:+e)),m.initialize=function(e,...r){t=e,d=r.find(e=>"function"===typeof e)||Math.random,n=r.find(e=>[1,2,3].includes(e))||2,v()},m.iterations=function(e){return arguments.length?(p=+e,m):p},m.strength=function(e){return arguments.length?(f=+e,m):f},m.radius=function(t){return arguments.length?(e="function"===typeof t?t:Object(a.a)(+t),v(),m):e},m}},function(t,n,r){"use strict";r.d(n,"a",(function(){return p}));var i=r(21),o=r.n(i),a=r(24),s=r.n(a),l=r(25),c=r.n(l),u=r(18),h=r.n(u),d=r(267);function f(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=h()(t);if(n){var i=h()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c()(this,e)}}var p=function(e){s()(n,e);var t=f(n);function n(e,r){return o()(this,n),t.call(this,"ERR_UNAVAILABLE","The method or property "+e+"."+r+" is not available on "+d.a.OS+", are you sure you've linked all the native dependencies properly?")}return n}(r(255).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r=null,i=null},function(t,n,r){"use strict";var i,o,a=r(6),s=r.n(a),l=r(17),c=r.n(l),u=r(0),h=r(9),d=r(30),f=r(20),p=r.n(f),m=r(21),g=r.n(m),v=r(23),y=r.n(v),b=r(16),w=r.n(b),x=r(24),_=r.n(x),E=r(25),A=r.n(E),S=r(18),M=r.n(S),T=r(3),C=r(5),O=r(476),R=function(e){var t=e.children;return u.createElement(u.Fragment,null,t)},k=T.a,P=2,L=3,D=5,I=r(12),N=r(34),j=["active","style"],B=["enabled"],F=["enabled","active"];function z(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}try{o=r(164)}catch(e){}var U=function(e){_()(n,e);var t=z(n);function n(){return g()(this,n),t.apply(this,arguments)}return y()(n,[{key:"render",value:function(){var e=this.props,t=e.active,n=e.style,r=c()(e,j);return u.createElement(T.a,H({hidden:!t,style:[n,{display:t?"flex":"none"}]},r))}}]),n}(u.Component),V=I.a.createAnimatedComponent(U),G=null===(i=o)||void 0===i?void 0:i.shouldUseActivityState,W=function(e){var t,n=e.enabled,r=c()(e,B);return n&&"web"!==h.a.OS&&(null===(t=o)||void 0===t?void 0:t.screensEnabled())?u.createElement(o.ScreenContainer,H({enabled:n},r)):u.createElement(T.a,r)},q=function(e){var t,n=e.enabled,r=e.active,i=c()(e,F);return n&&"web"===h.a.OS?u.createElement(V,H({active:r},i)):n&&(null===(t=o)||void 0===t?void 0:t.screensEnabled())?G?u.createElement(o.Screen,H({enabled:n,activityState:r},i)):u.createElement(o.Screen,H({enabled:n,active:r},i)):u.createElement(T.a,i)},X=r(8),Y=r.n(X),K=r(36),Q=r(38),Z=r(217);function J(e){return e.children}var $=r(92),ee=r(48),te=["borderless","pressColor","style","children"];function ne(){return(ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function re(e){var t=e.borderless,n=void 0!==t&&t,r=e.pressColor,i=void 0===r?"rgba(0, 0, 0, .32)":r,o=e.style,a=e.children,s=c()(e,te);return"android"===h.a.OS&&h.a.Version>=21?u.createElement($.a,ne({},s,{useForeground:$.a.canUseNativeForeground(),background:$.a.Ripple(i,n)}),u.createElement(T.a,{style:o},u.Children.only(a))):u.createElement(ee.a,ne({style:o},s),a)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){var t=e.disabled,n=e.allowFontScaling,i=e.backImage,o=e.label,a=e.labelStyle,s=e.labelVisible,l=void 0===s?"ios"===h.a.OS:s,c=e.onLabelLayout,d=e.onPress,f=e.pressColorAndroid,p=e.screenLayout,m=e.tintColor,g=e.titleLayout,v=e.truncatedLabel,y=void 0===v?"Back":v,b=e.accessibilityLabel,w=void 0===b?o&&"Back"!==o?"".concat(o,", back"):"Go back":b,x=e.style,_=Object(Z.a)(),E=_.dark,A=_.colors,S=u.useState(void 0),M=Y()(S,2),C=M[0],O=M[1],R=void 0!==m?m:h.a.select({ios:A.primary,default:A.text}),k=void 0!==f?f:E?"rgba(255, 255, 255, .32)":"rgba(0, 0, 0, .32)",P=function(e){null===c||void 0===c||c(e),O(e.nativeEvent.layout.x+e.nativeEvent.layout.width)};return u.createElement(re,{disabled:t,accessible:!0,accessibilityRole:"button",accessibilityComponentType:"button",accessibilityLabel:w,accessibilityTraits:"button",testID:"header-back",delayPressIn:0,onPress:t?void 0:function(){return d&&requestAnimationFrame(d)},pressColor:k,style:[ae.container,t&&ae.disabled,x],hitSlop:h.a.select({ios:void 0,default:{top:16,right:16,bottom:16,left:16}}),borderless:!0},u.createElement(u.Fragment,null,i?i({tintColor:R}):u.createElement(Q.a,{style:[ae.icon,Boolean(l)&&ae.iconWithLabel,Boolean(R)&&{tintColor:R}],source:r(445),fadeDuration:0}),function(){var e=!o||C&&g&&p&&(p.width-g.width)/2<C+26?y:o;if(!l||void 0===e)return null;var t=u.createElement(T.a,{style:p?[ae.labelWrapper,{minWidth:p.width/2-27}]:null},u.createElement(I.a.Text,{accessible:!1,onLayout:e===o?P:void 0,style:[ae.label,R?{color:R}:null,a],numberOfLines:1,allowFontScaling:!!n},e));return i||"ios"!==h.a.OS?t:u.createElement(J,{maskElement:u.createElement(T.a,{style:ae.iconMaskContainer},u.createElement(Q.a,{source:r(446),style:ae.iconMask}),u.createElement(T.a,{style:ae.iconMaskFillerRect}))},t)}()))}var ae=C.a.create({container:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({alignItems:"center",flexDirection:"row"},h.a.select({ios:null,default:{marginVertical:3,marginHorizontal:11}})),disabled:{opacity:.5},label:{fontSize:17,letterSpacing:.35},labelWrapper:{flexDirection:"row",alignItems:"flex-start"},icon:h.a.select({ios:{height:21,width:13,marginLeft:8,marginRight:22,marginVertical:12,resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]},default:{height:24,width:24,margin:3,resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]}}),iconWithLabel:"ios"===h.a.OS?{marginRight:6}:{},iconMaskContainer:{flex:1,flexDirection:"row",justifyContent:"center"},iconMaskFillerRect:{flex:1,backgroundColor:"#000"},iconMask:{height:21,width:13,marginLeft:-14.5,marginVertical:12,alignSelf:"center",resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]}}),se=["style"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(){return(ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ue(e){var t=e.style,n=c()(e,se),r=Object(Z.a)().colors;return u.createElement(I.a.View,ce({style:[he.container,{backgroundColor:r.card,borderBottomColor:r.border,shadowColor:r.border},t]},n))}var he=C.a.create({container:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({flex:1},h.a.select({android:{elevation:4},ios:{shadowOpacity:.85,shadowRadius:0,shadowOffset:{width:0,height:C.a.hairlineWidth}},default:{borderBottomWidth:C.a.hairlineWidth}}))}),de=u.createContext(!1);function fe(e){var t,n;return function(){for(var r=!1,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(t){if(t.length!==o.length)r=!0;else for(var s=0;s<t.length;s++)if(t[s]!==o[s]){r=!0;break}}else r=!0;return t=o,(r||void 0===n)&&(n=e.apply(void 0,o)),n}}var pe=["height","minHeight","maxHeight","backgroundColor","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopColor","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopWidth","borderWidth","boxShadow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","opacity","transform"],me=function(e,t){var n=e.width>e.height;return("ios"===h.a.OS?n&&!h.a.isPad?32:44:"android"===h.a.OS?56:64)+t};function ge(e){var t=u.useState(void 0),n=Y()(t,2),r=n[0],i=n[1],o=u.useState(void 0),a=Y()(o,2),s=a[0],l=a[1],d=u.useContext(de),f=fe((function(e,t,n,r,i,o,a){return e({current:{progress:n},next:r&&{progress:r},layouts:{header:{height:a,width:t.width},screen:t,title:i,leftLabel:o}})})),p=e.scene,m=e.layout,g=e.insets,v=e.title,y=e.leftLabel,b=e.onGoBack,w=e.headerTitle,x=e.headerTitleAlign,_=void 0===x?h.a.select({ios:"center",default:"left"}):x,E=e.headerLeft,A=void 0===E?b?function(e){return u.createElement(oe,e)}:void 0:E,S=e.headerTransparent,M=e.headerTintColor,O=e.headerBackground,R=e.headerRight,k=e.headerBackImage,P=e.headerBackTitle,L=e.headerBackTitleVisible,D=e.headerTruncatedBackTitle,N=e.headerPressColorAndroid,j=e.headerBackAccessibilityLabel,B=e.headerBackAllowFontScaling,F=e.headerTitleAllowFontScaling,z=e.headerTitleStyle,H=e.headerBackTitleStyle,U=e.headerLeftContainerStyle,V=e.headerRightContainerStyle,G=e.headerTitleContainerStyle,W=e.headerStyle,q=e.headerStatusBarHeight,X=void 0===q?d?0:g.top:q,K=e.styleInterpolator,Q=me(m,X),Z=C.a.flatten(W||{}),J=Z.height,$=void 0===J?Q:J,ee=Z.minHeight,te=Z.maxHeight,ne=Z.backgroundColor,re=Z.borderBottomColor,ie=Z.borderBottomEndRadius,ae=Z.borderBottomLeftRadius,se=Z.borderBottomRightRadius,le=Z.borderBottomStartRadius,ce=Z.borderBottomWidth,he=Z.borderColor,ge=Z.borderEndColor,ye=Z.borderEndWidth,be=Z.borderLeftColor,we=Z.borderLeftWidth,xe=Z.borderRadius,_e=Z.borderRightColor,Ee=Z.borderRightWidth,Ae=Z.borderStartColor,Se=Z.borderStartWidth,Me=Z.borderStyle,Te=Z.borderTopColor,Ce=Z.borderTopEndRadius,Oe=Z.borderTopLeftRadius,Re=Z.borderTopRightRadius,ke=Z.borderTopStartRadius,Pe=Z.borderTopWidth,Le=Z.borderWidth,De=Z.boxShadow,Ie=Z.elevation,Ne=Z.shadowColor,je=Z.shadowOffset,Be=Z.shadowOpacity,Fe=Z.shadowRadius,ze=Z.opacity,He=Z.transform;c()(Z,pe);var Ue={backgroundColor:ne,borderBottomColor:re,borderBottomEndRadius:ie,borderBottomLeftRadius:ae,borderBottomRightRadius:se,borderBottomStartRadius:le,borderBottomWidth:ce,borderColor:he,borderEndColor:ge,borderEndWidth:ye,borderLeftColor:be,borderLeftWidth:we,borderRadius:xe,borderRightColor:_e,borderRightWidth:Ee,borderStartColor:Ae,borderStartWidth:Se,borderStyle:Me,borderTopColor:Te,borderTopEndRadius:Ce,borderTopLeftRadius:Oe,borderTopRightRadius:Re,borderTopStartRadius:ke,borderTopWidth:Pe,borderWidth:Le,boxShadow:De,elevation:Ie,shadowColor:Ne,shadowOffset:je,shadowOpacity:Be,shadowRadius:Fe,opacity:ze,transform:He};for(var Ve in Ue)void 0===Ue[Ve]&&delete Ue[Ve];var Ge=f(K,m,p.progress.current,p.progress.next,s,y?r:void 0,"number"===typeof $?$:Q),We=Ge.titleStyle,qe=Ge.leftButtonStyle,Xe=Ge.leftLabelStyle,Ye=Ge.rightButtonStyle,Ke=Ge.backgroundStyle,Qe=A?A({backImage:k,pressColorAndroid:N,accessibilityLabel:j,allowFontScaling:B,onPress:b,labelVisible:L,label:void 0!==P?P:y,truncatedLabel:D,labelStyle:[Xe,H],onLabelLayout:function(e){var t=e.nativeEvent.layout,n=t.height,o=t.width;r&&n===r.height&&o===r.width||i({height:n,width:o})},screenLayout:m,titleLayout:s,tintColor:M,canGoBack:Boolean(b)}):null,Ze=R?R({tintColor:M}):null;return u.createElement(u.Fragment,null,u.createElement(I.a.View,{pointerEvents:"box-none",style:[C.a.absoluteFill,{zIndex:0},Ke]},O?O({style:Ue}):S?null:u.createElement(ue,{style:Ue})),u.createElement(I.a.View,{pointerEvents:"box-none",style:[{height:$,minHeight:ee,maxHeight:te,opacity:ze,transform:He}]},u.createElement(T.a,{pointerEvents:"none",style:{height:X}}),u.createElement(T.a,{pointerEvents:"box-none",style:ve.content},Qe?u.createElement(I.a.View,{pointerEvents:"box-none",style:[ve.left,{left:g.left},qe,U]},Qe):null,u.createElement(I.a.View,{pointerEvents:"box-none",style:["left"===_?{position:"absolute",left:(Qe?72:16)+g.left,right:(Ze?72:16)+g.right}:{marginHorizontal:(Qe?32:16)+(Qe&&!1!==L?40:0)+Math.max(g.left,g.right)},We,G]},w({children:v,onLayout:function(e){var t=e.nativeEvent.layout,n=t.height,r=t.width;l((function(e){return e&&n===e.height&&r===e.width?e:{height:n,width:r}}))},allowFontScaling:F,tintColor:M,style:z})),Ze?u.createElement(I.a.View,{pointerEvents:"box-none",style:[ve.right,{right:g.right},Ye,V]},Ze):null)))}var ve=C.a.create({content:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center"},left:{position:"absolute",left:0,top:0,bottom:0,justifyContent:"center",alignItems:"flex-start"},right:{position:"absolute",right:0,top:0,bottom:0,justifyContent:"center",alignItems:"flex-end"}}),ye=r(55),be=r(263),we=r.n(be),xe=["enabled","layout","style"];function _e(){return(_e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ee=u.forwardRef((function(e,t){var n=e.enabled,r=e.layout,i=e.style,o=c()(e,xe),a=u.useState(!1),s=Y()(a,2),l=s[0],h=s[1];return u.useEffect((function(){if("undefined"!==typeof document&&document.body){var e=document.body.clientWidth,t=document.body.clientHeight;h(e===r.width&&t===r.height)}}),[r.height,r.width]),u.createElement(T.a,_e({},o,{ref:t,style:[n&&l?Ae.page:Ae.card,i]}))})),Ae=C.a.create({page:{minHeight:"100%"},card:{flex:1,overflow:"hidden"}}),Se=u.createContext(void 0);function Me(e){switch(e){case"vertical":return 1;case"vertical-inverted":return-1;case"horizontal":return K.a.isRTL?-1:1;case"horizontal-inverted":return K.a.isRTL?1:-1}}function Te(e,t){var n=Me(t);switch(t){case"vertical":case"vertical-inverted":return e.height*n;case"horizontal":case"horizontal-inverted":return e.width*n}}var Ce=["styleInterpolator","index","current","gesture","next","layout","insets","overlay","overlayEnabled","shadowEnabled","gestureEnabled","gestureDirection","pageOverflowEnabled","children","containerStyle","contentStyle"];function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Pe(){return(Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var De="web"!==h.a.OS,Ie=function(e){_()(n,e);var t=ke(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Le(w()(e),"isCurrentlyMounted",!1),Le(w()(e),"isClosing",new I.a.Value(0)),Le(w()(e),"inverted",new I.a.Value(Me(e.props.gestureDirection))),Le(w()(e),"layout",{width:new I.a.Value(e.props.layout.width),height:new I.a.Value(e.props.layout.height)}),Le(w()(e),"isSwiping",new I.a.Value(0)),Le(w()(e),"interactionHandle",void 0),Le(w()(e),"pendingGestureCallback",void 0),Le(w()(e),"lastToValue",void 0),Le(w()(e),"animate",(function(t){var n=t.closing,r=t.velocity,i=e.props,o=i.gesture,a=i.transitionSpec,s=i.onOpen,l=i.onClose,c=i.onTransition,u=e.getAnimateToValue(Re(Re({},e.props),{},{closing:n}));e.lastToValue=u;var h=n?a.close:a.open,d="spring"===h.animation?I.a.spring:I.a.timing;e.setPointerEventsEnabled(!n),e.handleStartInteraction(),clearTimeout(e.pendingGestureCallback),null===c||void 0===c||c({closing:n,gesture:void 0!==r}),d(o,Re(Re({},h.config),{},{velocity:r,toValue:u,useNativeDriver:De,isInteraction:!1})).start((function(t){var r=t.finished;e.handleEndInteraction(),clearTimeout(e.pendingGestureCallback),r&&(n?l():s(),e.isCurrentlyMounted&&e.forceUpdate())}))})),Le(w()(e),"getAnimateToValue",(function(e){var t=e.closing,n=e.layout,r=e.gestureDirection;return t?Te(n,r):0})),Le(w()(e),"setPointerEventsEnabled",(function(t){var n,r=t?"box-none":"none";null===(n=e.contentRef.current)||void 0===n||n.setNativeProps({pointerEvents:r})})),Le(w()(e),"handleStartInteraction",(function(){void 0===e.interactionHandle&&(e.interactionHandle=ye.a.createInteractionHandle())})),Le(w()(e),"handleEndInteraction",(function(){void 0!==e.interactionHandle&&(ye.a.clearInteractionHandle(e.interactionHandle),e.interactionHandle=void 0)})),Le(w()(e),"handleGestureStateChange",(function(t){var n=t.nativeEvent,r=e.props,i=r.layout,o=r.onClose,a=r.onGestureBegin,s=r.onGestureCanceled,l=r.onGestureEnd,c=r.gestureDirection,u=r.gestureVelocityImpact;switch(n.state){case P:e.isSwiping.setValue(1),e.handleStartInteraction(),null===a||void 0===a||a();break;case L:e.isSwiping.setValue(0),e.handleEndInteraction();var h="vertical"===c||"vertical-inverted"===c?n.velocityY:n.velocityX;e.animate({closing:e.props.closing,velocity:h}),null===s||void 0===s||s();break;case D:var d,f,p;e.isSwiping.setValue(0),"vertical"===c||"vertical-inverted"===c?(d=i.height,f=n.translationY,p=n.velocityY):(d=i.width,f=n.translationX,p=n.velocityX);var m=(f+p*u)*Me(c)>d/2?0!==p||0!==f:e.props.closing;e.animate({closing:m,velocity:p}),m&&(e.pendingGestureCallback=setTimeout((function(){o(),e.forceUpdate()}),32)),null===l||void 0===l||l()}})),Le(w()(e),"getInterpolatedStyle",fe((function(t,n,r,i,o,a,s,l,c){return t({index:n,current:{progress:r},next:i&&{progress:i},closing:e.isClosing,swiping:e.isSwiping,inverted:e.inverted,layouts:{screen:o},insets:{top:a,right:s,bottom:l,left:c}})}))),Le(w()(e),"getCardAnimationContext",fe((function(t,n,r,i,o,a,s,l){return{index:t,current:{progress:n},next:r&&{progress:r},closing:e.isClosing,swiping:e.isSwiping,inverted:e.inverted,layouts:{screen:i},insets:{top:o,right:a,bottom:s,left:l}}}))),Le(w()(e),"contentRef",u.createRef()),e}return y()(n,[{key:"componentDidMount",value:function(){this.animate({closing:this.props.closing}),this.isCurrentlyMounted=!0}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.layout,r=t.gestureDirection,i=t.closing,o=n.width,a=n.height;o!==e.layout.width&&this.layout.width.setValue(o),a!==e.layout.height&&this.layout.height.setValue(a),r!==e.gestureDirection&&this.inverted.setValue(Me(r));var s=this.getAnimateToValue(this.props);this.getAnimateToValue(e)===s&&this.lastToValue===s||this.animate({closing:i})}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.handleEndInteraction()}},{key:"gestureActivationCriteria",value:function(){var e=this.props,t=e.layout,n=e.gestureDirection,r=e.gestureResponseDistance,i="vertical"===n||"vertical-inverted"===n?void 0!==(null===r||void 0===r?void 0:r.vertical)?r.vertical:135:void 0!==(null===r||void 0===r?void 0:r.horizontal)?r.horizontal:50;if("vertical"===n)return{maxDeltaX:15,minOffsetY:5,hitSlop:{bottom:-t.height+i}};if("vertical-inverted"===n)return{maxDeltaX:15,minOffsetY:-5,hitSlop:{top:-t.height+i}};var o=-t.width+i;return 1===Me(n)?{minOffsetX:5,maxDeltaY:20,hitSlop:{right:o}}:{minOffsetX:-5,maxDeltaY:20,hitSlop:{left:o}}}},{key:"render",value:function(){var e,t=this.props,n=t.styleInterpolator,r=t.index,i=t.current,o=t.gesture,a=t.next,s=t.layout,l=t.insets,h=t.overlay,d=t.overlayEnabled,f=t.shadowEnabled,p=t.gestureEnabled,m=t.gestureDirection,g=t.pageOverflowEnabled,v=t.children,y=t.containerStyle,b=t.contentStyle,w=c()(t,Ce),x=this.getInterpolatedStyle(n,r,i,a,s,l.top,l.right,l.bottom,l.left),_=this.getCardAnimationContext(r,i,a,s,l.top,l.right,l.bottom,l.left),E=x.containerStyle,A=x.cardStyle,S=x.overlayStyle,M=x.shadowStyle,O=p?I.a.event([{nativeEvent:"vertical"===m||"vertical-inverted"===m?{translationY:o}:{translationX:o}}],{useNativeDriver:De}):void 0,k=C.a.flatten(b||{}).backgroundColor,P="string"===typeof k&&0===we()(k).alpha();return u.createElement(Se.Provider,{value:_},u.createElement(I.a.View,{style:{opacity:i},collapsable:!1}),u.createElement(T.a,Pe({pointerEvents:"box-none"},w),d?u.createElement(T.a,{pointerEvents:"box-none",style:C.a.absoluteFill},h({style:S})):null,u.createElement(I.a.View,{needsOffscreenAlphaCompositing:(e=E,!!e&&null!=C.a.flatten(e).opacity),style:[Ne.container,E,y],pointerEvents:"box-none"},u.createElement(R,Pe({enabled:0!==s.width&&p,onGestureEvent:O,onHandlerStateChange:this.handleGestureStateChange},this.gestureActivationCriteria()),u.createElement(I.a.View,{style:[Ne.container,A]},f&&M&&!P?u.createElement(I.a.View,{style:[Ne.shadow,"horizontal"===m?[Ne.shadowHorizontal,Ne.shadowLeft]:"horizontal-inverted"===m?[Ne.shadowHorizontal,Ne.shadowRight]:"vertical"===m?[Ne.shadowVertical,Ne.shadowTop]:[Ne.shadowVertical,Ne.shadowBottom],{backgroundColor:k},M],pointerEvents:"none"}):null,u.createElement(Ee,{ref:this.contentRef,enabled:g,layout:s,style:b},v))))))}}]),n}(u.Component);Le(Ie,"defaultProps",{overlayEnabled:"ios"!==h.a.OS,shadowEnabled:!0,gestureEnabled:!0,gestureVelocityImpact:.3,overlay:function(e){var t=e.style;return t?u.createElement(I.a.View,{pointerEvents:"none",style:[Ne.overlay,t]}):null}});var Ne=C.a.create({container:{flex:1},overlay:{flex:1,backgroundColor:"#000"},shadow:{position:"absolute",shadowRadius:5,shadowColor:"#000",shadowOpacity:.3},shadowHorizontal:{top:0,bottom:0,width:3,shadowOffset:{width:-1,height:1}},shadowLeft:{left:0},shadowRight:{right:0},shadowVertical:{left:0,right:0,height:3,shadowOffset:{width:1,height:-1}},shadowTop:{top:0},shadowBottom:{bottom:0}}),je=u.createContext(void 0),Be=u.createContext(void 0);var Fe=u.memo((function(e){var t=e.active,n=e.cardOverlay,r=e.cardOverlayEnabled,i=e.cardShadowEnabled,o=e.cardStyle,a=e.cardStyleInterpolator,s=e.closing,l=e.gesture,c=e.focused,h=e.gestureDirection,d=e.gestureEnabled,f=e.gestureResponseDistance,p=e.gestureVelocityImpact,m=e.getPreviousScene,g=e.getFocusedRoute,v=e.mode,y=e.headerMode,b=e.headerShown,w=e.headerStyleInterpolator,x=e.hasAbsoluteHeader,_=e.headerHeight,E=e.onHeaderHeightChange,A=e.isParentHeaderShown,S=e.index,M=e.layout,O=e.onCloseRoute,R=e.onOpenRoute,k=e.onPageChangeCancel,P=e.onPageChangeConfirm,L=e.onPageChangeStart,D=e.onGestureCancel,I=e.onGestureEnd,N=e.onGestureStart,j=e.onTransitionEnd,B=e.onTransitionStart,F=e.renderHeader,z=e.renderScene,H=e.safeAreaInsetBottom,U=e.safeAreaInsetLeft,V=e.safeAreaInsetRight,G=e.safeAreaInsetTop,W=e.scene,q=e.transitionSpec,X={top:G,right:V,bottom:H,left:U},K=Object(Z.a)().colors,Q=u.useState("box-none"),J=Y()(Q,2),$=J[0],ee=J[1];u.useEffect((function(){var e,t,n=null===(e=W.progress.next)||void 0===e||null===(t=e.addListener)||void 0===t?void 0:t.call(e,(function(e){var t=e.value;ee(t<=.1?"box-none":"none")}));return function(){var e,t;n&&(null===(e=W.progress.next)||void 0===e||null===(t=e.removeListener)||void 0===t||t.call(e,n))}}),[$,W.progress.next]);var te="none"!==y&&!1!==b,ne=m({route:W.route});return u.createElement(Ie,{index:S,gestureDirection:h,layout:M,insets:X,gesture:l,current:W.progress.current,next:W.progress.next,closing:s,onOpen:function(){var e=W.route;null===j||void 0===j||j({route:e},!1),R({route:e})},onClose:function(){var e=W.route;null===j||void 0===j||j({route:e},!0),O({route:e})},overlay:n,overlayEnabled:r,shadowEnabled:i,onTransition:function(e){var n=e.closing,r=e.gesture,i=W.route;r?t&&n?null===P||void 0===P||P(!1):null===k||void 0===k||k():null===P||void 0===P||P(!0),null===B||void 0===B||B({route:i},n)},onGestureBegin:function(){var e=W.route;null===L||void 0===L||L(),null===N||void 0===N||N({route:e})},onGestureCanceled:function(){var e=W.route;null===k||void 0===k||k(),null===D||void 0===D||D({route:e})},onGestureEnd:function(){var e=W.route;null===I||void 0===I||I({route:e})},gestureEnabled:d,gestureResponseDistance:f,gestureVelocityImpact:p,transitionSpec:q,styleInterpolator:a,accessibilityElementsHidden:!c,importantForAccessibility:c?"auto":"no-hide-descendants",pointerEvents:t?"box-none":$,pageOverflowEnabled:"screen"===y&&"card"===v,containerStyle:x?{marginTop:_}:null,contentStyle:[{backgroundColor:K.background},o],style:[{overflow:t?void 0:"hidden"},C.a.absoluteFill]},u.createElement(T.a,{style:ze.container},u.createElement(T.a,{style:ze.scene},u.createElement(Be.Provider,{value:ne},u.createElement(de.Provider,{value:A||te},u.createElement(je.Provider,{value:_},z({route:W.route}))))),"screen"===y?F({mode:"screen",layout:M,insets:X,scenes:[ne,W],getPreviousScene:m,getFocusedRoute:g,gestureDirection:h,styleInterpolator:w,onContentHeightChange:E}):null))})),ze=C.a.create({container:{flex:1,flexDirection:"column-reverse"},scene:{flex:1}}),He=r(78);function Ue(){var e=N.a.get("window");return"ios"===h.a.OS&&!h.a.isPad&&!h.a.isTVOS&&(780===e.height||780===e.width||812===e.height||812===e.width||844===e.height||844===e.width||896===e.height||896===e.width||926===e.height||926===e.width)}var Ve=I.a.add,Ge=I.a.multiply;function We(e,t,n){return Ve(Ge(e,t),Ge(e.interpolate({inputRange:[0,1],outputRange:[1,0]}),n))}var qe=I.a.add,Xe=I.a.multiply;function Ye(){return{}}var Ke=I.a.add;function Qe(e){var t=e.current,n=e.next,r=Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),i=r.interpolate({inputRange:[0,1,2],outputRange:[0,1,0]});return{leftButtonStyle:{opacity:i},rightButtonStyle:{opacity:i},titleStyle:{opacity:i},backgroundStyle:{opacity:r.interpolate({inputRange:[0,1,1.9,2],outputRange:[0,1,1,0]})}}}function Ze(e){var t=e.current,n=e.next,r=e.layouts.screen,i=[{translateX:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:K.a.isRTL?[-r.width,0,r.width]:[r.width,0,-r.width]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function Je(e){var t=e.current,n=e.next,r=e.layouts.screen,i=[{translateX:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:K.a.isRTL?[r.width,0,-r.width]:[-r.width,0,r.width]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function $e(e){var t=e.current,n=e.next,r=e.layouts.header,i=[{translateY:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:[-r.height,0,-r.height]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function et(){return{}}var tt=r(14),nt={animation:"spring",config:{stiffness:1e3,damping:500,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10}},rt={animation:"timing",config:{duration:350,easing:tt.a.out(tt.a.poly(5))}},it={animation:"timing",config:{duration:150,easing:tt.a.in(tt.a.linear)}},ot={animation:"timing",config:{duration:425,easing:tt.a.bezier(.35,.45,0,1)}},at={animation:"timing",config:{duration:400,easing:tt.a.bezier(.35,.45,0,1)}},st={gestureDirection:"horizontal",transitionSpec:{open:nt,close:nt},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.inverted,i=e.layouts.screen;return{cardStyle:{transform:[{translateX:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.width,0],extrapolate:"clamp"}),r)},{translateX:n?Xe(n.progress.interpolate({inputRange:[0,1],outputRange:[0,-.3*i.width],extrapolate:"clamp"}),r):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.07],extrapolate:"clamp"})},shadowStyle:{shadowOpacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:"clamp"})}}},headerStyleInterpolator:Qe},lt={gestureDirection:"vertical",transitionSpec:{open:nt,close:nt},cardStyleInterpolator:function(e){var t=e.current,n=e.inverted,r=e.layouts.screen;return{cardStyle:{transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[r.height,0],extrapolate:"clamp"}),n)}]}}},headerStyleInterpolator:Qe},ct={gestureDirection:"vertical",transitionSpec:{open:rt,close:it},cardStyleInterpolator:function(e){var t=e.current,n=e.inverted,r=e.layouts.screen,i=e.closing,o=Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[.08*r.height,0],extrapolate:"clamp"}),n);return{cardStyle:{opacity:We(i,t.progress,t.progress.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1]})),transform:[{translateY:o}]}}},headerStyleInterpolator:Qe},ut={gestureDirection:"vertical",transitionSpec:{open:ot,close:ot},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.inverted,i=e.layouts.screen;return{containerStyle:{overflow:"hidden",transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.height,0],extrapolate:"clamp"}),r)}]},cardStyle:{transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.height*(95.9/100)*-1,0],extrapolate:"clamp"}),r)},{translateY:n?Xe(n.progress.interpolate({inputRange:[0,1],outputRange:[0,.02*i.height*-1],extrapolate:"clamp"}),r):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,.36,1],outputRange:[0,.1,.1],extrapolate:"clamp"})}}},headerStyleInterpolator:Qe},ht={gestureDirection:"horizontal",transitionSpec:{open:at,close:at},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.closing,i=qe(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0);return{containerStyle:{opacity:i.interpolate({inputRange:[0,.75,.875,1,1.0825,1.2075,2],outputRange:[0,0,1,1,1,1,0]}),transform:[{scale:We(r,t.progress.interpolate({inputRange:[0,1],outputRange:[.9,1],extrapolate:"clamp"}),i.interpolate({inputRange:[0,1,2],outputRange:[.85,1,1.1]}))}]}}},headerStyleInterpolator:Qe},dt=h.a.select({ios:st,android:h.a.Version>=29?ht:h.a.Version>=28?ut:ct,default:ht}),ft=h.a.select({ios:lt,default:dt});function pt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(){return(vt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bt=Object.freeze({options:{}}),wt=function(e,t,n,r,i,o){return e.reduce((function(e,a){var s=(r[a.key]||{}).options,l=void 0===s?{}:s,c=C.a.flatten(l.headerStyle||{}),u="number"===typeof c.height?c.height:o[a.key],h=gt(gt({},t),l.safeAreaInsets),d=l.headerStatusBarHeight,f=void 0===d?n?0:h.top:d;return e[a.key]="number"===typeof u?u:me(i,f),e}),{})},xt=function(e,t,n){var r=((null===n||void 0===n?void 0:n.options)||{}).gestureDirection;return Te(t,void 0===r?"modal"===e?ft.gestureDirection:dt.gestureDirection:r)},_t=function(e,t,n,r){var i=xt(e,{width:Math.max(1,n.width),height:Math.max(1,n.height)},r);return i>0?t.interpolate({inputRange:[0,i],outputRange:[1,0]}):t.interpolate({inputRange:[i,0],outputRange:[0,1]})},Et=function(e){_()(n,e);var t=pt(n);function n(e){var r;g()(this,n),r=t.call(this,e),yt(w()(r),"handleLayout",(function(e){var t=e.nativeEvent.layout,n=t.height,i=t.width,o={width:i,height:n};r.setState((function(e,t){return n===e.layout.height&&i===e.layout.width?null:{layout:o,headerHeights:wt(t.routes,t.insets,t.isParentHeaderShown,e.descriptors,o,e.headerHeights)}}))})),yt(w()(r),"handleHeaderLayout",(function(e){var t=e.route,n=e.height;r.setState((function(e){var r=e.headerHeights;return r[t.key]===n?null:{headerHeights:gt(gt({},r),{},s()({},t.key,n))}}))})),yt(w()(r),"getFocusedRoute",(function(){var e=r.props.state;return e.routes[e.index]})),yt(w()(r),"getPreviousScene",(function(e){var t=e.route,n=r.props.getPreviousRoute,i=r.state.scenes,o=n({route:t});if(o)return i.find((function(e){return e.route.key===o.key}))}));var i=N.a.get("window"),o=i.height,a=void 0===o?0:o,l=i.width,c=void 0===l?0:l;return r.state={routes:[],scenes:[],gestures:{},layout:{height:a,width:c},descriptors:r.props.descriptors,headerHeights:{}},r}return y()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.mode,r=t.insets,i=t.descriptors,o=t.state,a=t.routes,s=t.closingRouteKeys,l=t.onOpenRoute,c=t.onCloseRoute,h=t.getGesturesEnabled,d=t.renderHeader,f=t.renderScene,p=t.headerMode,m=t.isParentHeaderShown,g=t.onTransitionStart,v=t.onTransitionEnd,y=t.onPageChangeStart,b=t.onPageChangeConfirm,w=t.onPageChangeCancel,x=t.onGestureStart,_=t.onGestureEnd,E=t.onGestureCancel,A=t.detachInactiveScreens,S=void 0===A?G:A,M=this.state,T=M.scenes,O=M.layout,R=M.gestures,k=M.headerHeights,P=o.routes[o.index],L=i[P.key],D=L?L.options:{},I=k[P.key],N="modal"===n?ft:dt;"screen"===p&&(N=gt(gt({},N),{},{headerStyleInterpolator:et}));for(var j=D.safeAreaInsets||{},B=j.top,F=void 0===B?r.top:B,z=j.right,H=void 0===z?r.right:z,U=j.bottom,V=void 0===U?r.bottom:U,X=j.left,Y=void 0===X?r.left:X,K=1,Q=T.length-1;Q>=0;Q--){var Z=T[Q].descriptor.options.detachPreviousScreen;if(!1!==(void 0===Z?"modal"!==n||Q!==T.length-1:Z))break;K++}var J="float"===p&&this.state.scenes.slice(-2).some((function(e){var t=e.descriptor,n=t?t.options:{},r=n.headerTransparent,i=n.headerShown;return!(!r&&!1!==(void 0===i||i))})),$="float"===p?u.createElement(u.Fragment,{key:"header"},d({mode:"float",layout:O,insets:{top:F,right:H,bottom:V,left:Y},scenes:T,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,onContentHeightChange:this.handleHeaderLayout,gestureDirection:void 0!==D.gestureDirection?D.gestureDirection:N.gestureDirection,styleInterpolator:void 0!==D.headerStyleInterpolator?D.headerStyleInterpolator:N.headerStyleInterpolator,style:[At.floating,J&&[{height:I},At.absolute]]})):null;return u.createElement(u.Fragment,null,J?null:$,u.createElement(W,{enabled:S,style:At.container,onLayout:this.handleLayout},a.map((function(t,i,o){var a=P.key===t.key,A=R[t.key],M=T[i],L=1;if(G)if(i<o.length-K-1)L=0;else{var D=T[o.length-1],I=i===o.length-1?2:i>=o.length-K?1:0;L=D?D.progress.current.interpolate({inputRange:[0,.99,1],outputRange:[1,1,I],extrapolate:"clamp"}):1}else L=M.progress.next?M.progress.next.interpolate({inputRange:[0,.99,1],outputRange:[1,1,0],extrapolate:"clamp"}):1;var j=M.descriptor?M.descriptor.options:{},B=j.safeAreaInsets,F=j.headerShown,z=void 0===F||F,H=j.headerTransparent,U=j.cardShadowEnabled,V=j.cardOverlayEnabled,W=j.cardOverlay,X=j.cardStyle,Y=j.animationEnabled,Q=j.gestureResponseDistance,Z=j.gestureVelocityImpact,$=j.gestureDirection,ee=void 0===$?N.gestureDirection:$,te=j.transitionSpec,ne=void 0===te?N.transitionSpec:te,re=j.cardStyleInterpolator,ie=void 0===re?!1===Y?Ye:N.cardStyleInterpolator:re,oe=j.headerStyleInterpolator,ae={gestureDirection:ee,transitionSpec:ne,cardStyleInterpolator:ie,headerStyleInterpolator:void 0===oe?N.headerStyleInterpolator:oe};if(i!==o.length-1){var se=T[i+1];if(se){var le=se.descriptor?se.descriptor.options:{},ce=le.animationEnabled,ue=le.gestureDirection,he=void 0===ue?N.gestureDirection:ue,de=le.transitionSpec,fe=void 0===de?N.transitionSpec:de,pe=le.cardStyleInterpolator,me=void 0===pe?!1===ce?Ye:N.cardStyleInterpolator:pe,ge=le.headerStyleInterpolator;ae={gestureDirection:he,transitionSpec:fe,cardStyleInterpolator:me,headerStyleInterpolator:void 0===ge?N.headerStyleInterpolator:ge}}}var ve=B||{},ye=ve.top,be=void 0===ye?r.top:ye,we=ve.right,xe=void 0===we?r.right:we,_e=ve.bottom,Ee=void 0===_e?r.bottom:_e,Ae=ve.left,Se=void 0===Ae?r.left:Ae,Me="none"!==p&&!1!==z?k[t.key]:0;return u.createElement(q,{key:t.key,style:C.a.absoluteFill,enabled:S,active:L,pointerEvents:"box-none"},u.createElement(Fe,vt({index:i,active:i===o.length-1,focused:a,closing:s.includes(t.key),layout:O,gesture:A,scene:M,safeAreaInsetTop:be,safeAreaInsetRight:xe,safeAreaInsetBottom:Ee,safeAreaInsetLeft:Se,cardOverlay:W,cardOverlayEnabled:V,cardShadowEnabled:U,cardStyle:X,onPageChangeStart:y,onPageChangeConfirm:b,onPageChangeCancel:w,onGestureStart:x,onGestureCancel:E,onGestureEnd:_,gestureResponseDistance:Q,headerHeight:Me,isParentHeaderShown:m,onHeaderHeightChange:e.handleHeaderLayout,getPreviousScene:e.getPreviousScene,getFocusedRoute:e.getFocusedRoute,mode:n,headerMode:p,headerShown:z,hasAbsoluteHeader:J&&!H,renderHeader:d,renderScene:f,onOpenRoute:l,onCloseRoute:c,onTransitionStart:g,onTransitionEnd:v,gestureEnabled:0!==i&&h({route:t}),gestureVelocityImpact:Z},ae)))}))),J?$:null)}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.routes===t.routes&&e.descriptors===t.descriptors)return null;var n=e.routes.reduce((function(n,r){var i=e.descriptors[r.key],o=((null===i||void 0===i?void 0:i.options)||{}).animationEnabled;return n[r.key]=t.gestures[r.key]||new I.a.Value(e.openingRouteKeys.includes(r.key)&&!1!==o?xt(e.mode,t.layout,i):0),n}),{});return{routes:e.routes,scenes:e.routes.map((function(r,i,o){var a=o[i-1],s=o[i+1],l=t.scenes[i],c=n[r.key],u=a?n[a.key]:void 0,h=s?n[s.key]:void 0,d=e.descriptors[r.key]||t.descriptors[r.key]||(l?l.descriptor:bt),f=e.descriptors[null===s||void 0===s?void 0:s.key]||t.descriptors[null===s||void 0===s?void 0:s.key],p=e.descriptors[null===a||void 0===a?void 0:a.key]||t.descriptors[null===a||void 0===a?void 0:a.key],m={route:r,descriptor:d,progress:{current:_t(e.mode,c,t.layout,d),next:h?_t(e.mode,h,t.layout,f):void 0,previous:u?_t(e.mode,u,t.layout,p):void 0},__memo:[r,t.layout,d,f,p,c,h,u]};return l&&m.__memo.every((function(e,t){return l.__memo[t]===e}))?l:m})),gestures:n,descriptors:e.descriptors,headerHeights:wt(e.routes,e.insets,e.isParentHeaderShown,t.descriptors,t.layout,t.headerHeights)}}}]),n}(u.Component),At=C.a.create({container:{flex:1},absolute:{position:"absolute",top:0,left:0,right:0},floating:{zIndex:1}}),St=r(60),Mt=r(121);function Tt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ot=function(e){_()(n,e);var t=Tt(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Ct(w()(e),"previouslyFocusedTextInput",void 0),Ct(w()(e),"startTimestamp",0),Ct(w()(e),"keyboardTimeout",void 0),Ct(w()(e),"clearKeyboardTimeout",(function(){void 0!==e.keyboardTimeout&&(clearTimeout(e.keyboardTimeout),e.keyboardTimeout=void 0)})),Ct(w()(e),"handlePageChangeStart",(function(){if(e.props.enabled){e.clearKeyboardTimeout();var t=St.a.State.currentlyFocusedInput?St.a.State.currentlyFocusedInput():St.a.State.currentlyFocusedField();St.a.State.blurTextInput(t),e.previouslyFocusedTextInput=t,e.startTimestamp=Date.now()}})),Ct(w()(e),"handlePageChangeConfirm",(function(t){if(e.props.enabled){if(e.clearKeyboardTimeout(),t)Mt.a.dismiss();else{var n=e.previouslyFocusedTextInput;n&&St.a.State.blurTextInput(n)}e.previouslyFocusedTextInput=void 0}})),Ct(w()(e),"handlePageChangeCancel",(function(){if(e.props.enabled){e.clearKeyboardTimeout();var t=e.previouslyFocusedTextInput;t&&(Date.now()-e.startTimestamp<100?e.keyboardTimeout=setTimeout((function(){St.a.State.focusTextInput(t),e.previouslyFocusedTextInput=void 0}),100):(St.a.State.focusTextInput(t),e.previouslyFocusedTextInput=void 0))}})),e}return y()(n,[{key:"componentWillUnmount",value:function(){this.clearKeyboardTimeout()}},{key:"render",value:function(){return this.props.children({onPageChangeStart:this.handlePageChangeStart,onPageChangeConfirm:this.handlePageChangeConfirm,onPageChangeCancel:this.handlePageChangeCancel})}}]),n}(u.Component),Rt=["tintColor","style"];function kt(){return(kt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Pt(e){var t=e.tintColor,n=e.style,r=c()(e,Rt),i=Object(Z.a)().colors;return u.createElement(I.a.Text,kt({accessibilityRole:"header","aria-level":"1",numberOfLines:1},r,{style:[Lt.title,{color:void 0===t?i.text:t},n]}))}var Lt=C.a.create({title:h.a.select({ios:{fontSize:17,fontWeight:"600"},android:{fontSize:20,fontFamily:"sans-serif-medium",fontWeight:"normal"},default:{fontSize:18,fontWeight:"500"}})});function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nt(){return(Nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var jt=u.memo((function(e){var t,n=e.scene,r=e.previous,i=e.layout,o=e.insets,a=e.navigation,s=e.styleInterpolator,l=n.descriptor.options,c="function"!==typeof l.headerTitle&&void 0!==l.headerTitle?l.headerTitle:void 0!==l.title?l.title:n.route.name;if(void 0!==l.headerBackTitle)t=l.headerBackTitle;else if(r){var h=r.descriptor.options;t="function"!==typeof h.headerTitle&&void 0!==h.headerTitle?h.headerTitle:void 0!==h.title?h.title:r.route.name}var f=u.useCallback(function(e,t){var n;return function(){if(!n){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];e.apply(this,i),n=setTimeout((function(){n=void 0}),t)}}}((function(){a.isFocused()&&a.canGoBack()&&a.dispatch(It(It({},d.StackActions.pop()),{},{source:n.route.key}))}),50),[a,n.route.key]);return u.createElement(ge,Nt({},l,{insets:o,layout:i,scene:n,title:c,leftLabel:t,headerTitle:"function"!==typeof l.headerTitle?function(e){return u.createElement(Pt,e)}:l.headerTitle,onGoBack:r?f:void 0,styleInterpolator:s}))}));function Bt(e){var t=e.mode,n=e.scenes,r=e.layout,i=e.insets,o=e.getPreviousScene,a=e.getFocusedRoute,s=e.onContentHeightChange,l=e.gestureDirection,c=e.styleInterpolator,h=e.style,f=a(),p=u.useContext(Be);return u.createElement(I.a.View,{pointerEvents:"box-none",style:h},n.slice(-3).map((function(e,n,a){var h;if("screen"===t&&n!==a.length-1||!e)return null;var m=e.descriptor.options||{},g=m.header,v=m.headerShown,y=void 0===v||v,b=m.headerTransparent;if(!y)return null;var w=f.key===e.route.key,x=null!==(h=o({route:e.route}))&&void 0!==h?h:p,_=a[n-1],E=a[n+1],A=((null===_||void 0===_?void 0:_.descriptor.options)||{}).headerShown,S=void 0===A||A,M=((null===E||void 0===E?void 0:E.descriptor.options)||{}).headerShown,C=!1===S&&!E||!1===(void 0===M||M),O={mode:t,layout:r,insets:i,scene:e,previous:x,navigation:e.descriptor.navigation,styleInterpolator:"float"===t?C?"vertical"===l||"vertical-inverted"===l?$e:"horizontal-inverted"===l?Je:Ze:c:et};return u.createElement(d.NavigationContext.Provider,{key:e.route.key,value:e.descriptor.navigation},u.createElement(d.NavigationRouteContext.Provider,{value:e.route},u.createElement(T.a,{onLayout:s?function(t){var n=t.nativeEvent.layout.height;s({route:e.route,height:n})}:void 0,pointerEvents:w?"box-none":"none",accessibilityElementsHidden:!w,importantForAccessibility:w?"auto":"no-hide-descendants",style:"float"===t&&!w||b?Ft.header:null},void 0!==g?g(O):u.createElement(jt,O))))})))}var Ft=C.a.create({header:{position:"absolute",top:0,left:0,right:0}}),zt=r(473);function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ut=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({top:function(e){return h.a.select({ios:(t=e?44:30,n=20,Ue()?t:n),android:He.a.currentHeight,default:0});var t,n}(!0),bottom:Ue()?34:0,right:0,left:0},zt.b);function Vt(e){var t=e.children;return u.createElement(O.a,null,(function(e){return e?t:u.createElement(O.b,{initialSafeAreaInsets:Ut},t)}))}var Gt=["state","navigation","keyboardHandlingEnabled","mode","headerMode","descriptors"];function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Yt(){return(Yt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qt=null!==k&&void 0!==k?k:T.a,Zt=function(e){_()(n,e);var t=Xt(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Kt(w()(e),"state",{routes:[],previousRoutes:[],previousDescriptors:{},openingRouteKeys:[],closingRouteKeys:[],replacingRouteKeys:[],descriptors:{}}),Kt(w()(e),"getGesturesEnabled",(function(t){var n=t.route,r=e.state.descriptors[n.key];if(r){var i=r.options,o=i.gestureEnabled;return!1!==i.animationEnabled&&!1!==o}return!1})),Kt(w()(e),"getPreviousRoute",(function(t){var n=t.route,r=e.state,i=r.closingRouteKeys,o=r.replacingRouteKeys,a=e.state.routes.filter((function(e){return e.key===n.key||!i.includes(e.key)&&!o.includes(e.key)})),s=a.findIndex((function(e){return e.key===n.key}));return a[s-1]})),Kt(w()(e),"renderScene",(function(t){var n=t.route,r=e.state.descriptors[n.key]||e.props.descriptors[n.key];return r?r.render():null})),Kt(w()(e),"renderHeader",(function(e){return u.createElement(Bt,e)})),Kt(w()(e),"handleOpenRoute",(function(t){var n=t.route,r=e.props,i=r.state,o=r.navigation,a=e.state,s=a.closingRouteKeys,l=a.replacingRouteKeys;s.some((function(e){return e===n.key}))&&l.every((function(e){return e!==n.key}))&&i.routeNames.includes(n.name)&&!i.routes.some((function(e){return e.key===n.key}))?o.navigate(n):e.setState((function(e){return{routes:e.replacingRouteKeys.length?e.routes.filter((function(t){return!e.replacingRouteKeys.includes(t.key)})):e.routes,openingRouteKeys:e.openingRouteKeys.filter((function(e){return e!==n.key})),closingRouteKeys:e.closingRouteKeys.filter((function(e){return e!==n.key})),replacingRouteKeys:[]}}))})),Kt(w()(e),"handleCloseRoute",(function(t){var n=t.route,r=e.props,i=r.state,o=r.navigation;i.routes.some((function(e){return e.key===n.key}))?o.dispatch(qt(qt({},d.StackActions.pop()),{},{source:n.key,target:i.key})):e.setState((function(e){return{routes:e.routes.filter((function(e){return e.key!==n.key})),openingRouteKeys:e.openingRouteKeys.filter((function(e){return e!==n.key})),closingRouteKeys:e.closingRouteKeys.filter((function(e){return e!==n.key}))}}))})),Kt(w()(e),"handleTransitionStart",(function(t,n){var r=t.route;return e.props.navigation.emit({type:"transitionStart",data:{closing:n},target:r.key})})),Kt(w()(e),"handleTransitionEnd",(function(t,n){var r=t.route;return e.props.navigation.emit({type:"transitionEnd",data:{closing:n},target:r.key})})),Kt(w()(e),"handleGestureStart",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureStart",target:n.key})})),Kt(w()(e),"handleGestureEnd",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureEnd",target:n.key})})),Kt(w()(e),"handleGestureCancel",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureCancel",target:n.key})})),e}return y()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.state,r=t.navigation,i=t.keyboardHandlingEnabled,o=t.mode,a=void 0===o?"card":o,s=t.headerMode,l=void 0===s?"card"===a&&"ios"===h.a.OS?"float":"screen":s,f=(t.descriptors,c()(t,Gt)),p=this.state,m=p.routes,g=p.descriptors,v=p.openingRouteKeys,y=p.closingRouteKeys;return u.createElement(d.NavigationHelpersContext.Provider,{value:r},u.createElement(Qt,{style:Jt.container},u.createElement(Vt,null,u.createElement(O.a,null,(function(t){return u.createElement(Ot,{enabled:!1!==i},(function(r){return u.createElement(de.Consumer,null,(function(i){return u.createElement(Et,Yt({mode:a,insets:t,isParentHeaderShown:i,getPreviousRoute:e.getPreviousRoute,getGesturesEnabled:e.getGesturesEnabled,routes:m,openingRouteKeys:v,closingRouteKeys:y,onOpenRoute:e.handleOpenRoute,onCloseRoute:e.handleCloseRoute,onTransitionStart:e.handleTransitionStart,onTransitionEnd:e.handleTransitionEnd,renderHeader:e.renderHeader,renderScene:e.renderScene,headerMode:l,state:n,descriptors:g,onGestureStart:e.handleGestureStart,onGestureEnd:e.handleGestureEnd,onGestureCancel:e.handleGestureCancel},f,r))}))}))})))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if((e.state.routes===t.previousRoutes||(s=e.state.routes.map((function(e){return e.key})),l=t.previousRoutes.map((function(e){return e.key})),s.length===l.length&&s.every((function(e,t){return e===l[t]}))))&&t.routes.length){var n=t.routes,r=t.previousRoutes,i=e.descriptors,o=t.previousDescriptors;if(e.descriptors!==t.previousDescriptors&&(i=t.routes.reduce((function(n,r){return n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n}),{}),o=e.descriptors),e.state.routes!==t.previousRoutes){var a=e.state.routes.reduce((function(e,t){return e[t.key]=t,e}),{});n=t.routes.map((function(e){return a[e.key]||e})),r=e.state.routes}return{routes:n,previousRoutes:r,descriptors:i,previousDescriptors:o}}var s,l,c=e.state.index<e.state.routes.length-1?e.state.routes.slice(0,e.state.index+1):e.state.routes,u=t.openingRouteKeys,h=t.closingRouteKeys,d=t.replacingRouteKeys,f=t.previousRoutes,m=f[f.length-1],g=c[c.length-1],v=function(n){var r=e.descriptors[n]||t.descriptors[n];return!r||!1!==r.options.animationEnabled};if(m&&m.key!==g.key)f.some((function(e){return e.key===g.key}))?c.some((function(e){return e.key===m.key}))||v(m.key)&&!h.includes(m.key)&&(h=[].concat(p()(h),[m.key]),u=u.filter((function(e){return e!==m.key})),d=d.filter((function(e){return e!==m.key})),c=[].concat(p()(c),[m])):v(g.key)&&!u.includes(g.key)&&(u=[].concat(p()(u),[g.key]),h=h.filter((function(e){return e!==g.key})),d=d.filter((function(e){return e!==g.key})),c.some((function(e){return e.key===m.key}))||(u=u.filter((function(e){return e!==m.key})),"pop"===function(n){var r;return null!==(r=(e.descriptors[n]||t.descriptors[n]).options.animationTypeForReplace)&&void 0!==r?r:"push"}(g.key)?(h=[].concat(p()(h),[m.key]),u=u.filter((function(e){return e!==g.key})),c=[].concat(p()(c),[m])):(d=[].concat(p()(d),[m.key]),h=h.filter((function(e){return e!==m.key})),(c=c.slice()).splice(c.length-1,0,m))));else if(d.length||h.length){var y;(y=c=c.slice()).splice.apply(y,[c.length-1,0].concat(p()(t.routes.filter((function(e){var t=e.key;return!!v(t)&&(d.includes(t)||h.includes(t))})))))}if(!c.length)throw new Error("There should always be at least one route in the navigation state.");var b=c.reduce((function(n,r){return n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n}),{});return{routes:c,previousRoutes:e.state.routes,previousDescriptors:e.descriptors,openingRouteKeys:u,closingRouteKeys:h,replacingRouteKeys:d,descriptors:b}}}]),n}(u.Component),Jt=C.a.create({container:{flex:1}}),$t=["initialRouteName","children","screenOptions"];function en(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?en(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nn(){return(nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.a=Object(d.createNavigatorFactory)((function(e){var t=e.initialRouteName,n=e.children,r=e.screenOptions,i=c()(e,$t),o={gestureEnabled:"ios"===h.a.OS,animationEnabled:"web"!==h.a.OS&&"windows"!==h.a.OS&&"macos"!==h.a.OS},a=Object(d.useNavigationBuilder)(d.StackRouter,{initialRouteName:t,children:n,screenOptions:"function"===typeof r?function(){return tn(tn({},o),r.apply(void 0,arguments))}:tn(tn({},o),r)}),s=a.state,l=a.descriptors,f=a.navigation;return u.useEffect((function(){var e;return null===(e=f.addListener)||void 0===e?void 0:e.call(f,"tabPress",(function(e){var t=f.isFocused();requestAnimationFrame((function(){s.index>0&&t&&!e.defaultPrevented&&f.dispatch(tn(tn({},d.StackActions.popToTop()),{},{target:s.key}))}))}))}),[f,s.index,s.key]),u.createElement(Zt,nn({},i,{state:s,descriptors:l,navigation:f}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));class r extends Map{constructor(e,t=s){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(i(this,e))}has(e){return super.has(i(this,e))}set(e,t){return super.set(o(this,e),t)}delete(e){return super.delete(a(this,e))}}Set;function i({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function o({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function a({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function s(e){return null!==e&&"object"===typeof e?e.valueOf():e}function l(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const c=Symbol("implicit");function u(){var e=new r,t=[],n=[],i=c;function o(r){let o=e.get(r);if(void 0===o){if(i!==c)return i;e.set(r,o=t.push(r)-1)}return n[o%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new r;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return u(t,n).unknown(i)},l.apply(o,arguments),o}},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return b})),n.d(t,"a",(function(){return w}));var r=n(8),i=n.n(r),o=n(0),a=n(34),s=n(5),l=n(3),c={WebkitTransition:"webkitTransitionEnd",Transition:"transitionEnd",MozTransition:"transitionend",MSTransition:"msTransitionEnd",OTransition:"oTransitionEnd"};function u(e){var t=e.children,n=e.style,r=e.onInsetsChange;return o.useEffect((function(){if("undefined"!==typeof document){var e=function(){var e=document.createElement("div"),t=e.style;return t.position="fixed",t.left="0",t.top="0",t.width="0",t.height="0",t.zIndex="-1",t.overflow="hidden",t.visibility="hidden",t.transitionDuration="0.05s",t.transitionProperty="padding",t.transitionDelay="0s",t.paddingTop=p("top"),t.paddingBottom=p("bottom"),t.paddingLeft=p("left"),t.paddingRight=p("right"),e}();document.body.appendChild(e);var t=function(){var t=window.getComputedStyle(e),n=t.paddingTop,i=t.paddingBottom,o=t.paddingLeft,a=t.paddingRight,s={top:n?parseInt(n,10):0,bottom:i?parseInt(i,10):0,left:o?parseInt(o,10):0,right:a?parseInt(a,10):0},l={x:0,y:0,width:document.documentElement.offsetWidth,height:document.documentElement.offsetHeight};r({nativeEvent:{insets:s,frame:l}})};return e.addEventListener(d(),t),t(),function(){document.body.removeChild(e),e.removeEventListener(d(),t)}}}),[r]),o.createElement(l.a,{style:n},t)}var h=null;function d(){if(null!==h)return h;var e=document.createElement("invalidtype");for(var t in h=c.Transition,c)if(void 0!==e.style[t]){h=c[t];break}return h}var f=null;function p(e){return"".concat(function(){if(null!==f)return f;var e=window.CSS;return f=e&&e.supports&&e.supports("top: constant(safe-area-inset-top)")?"constant":"env"}(),"(safe-area-inset-").concat(e,")")}var m=o.createContext(null),g=o.createContext(null);function v(e){var t,n,r,s,l,c=e.children,h=e.initialMetrics,d=e.initialSafeAreaInsets,f=e.style,p=o.useContext(m),v=o.useContext(g),b=o.useState(null!==(t=null!==(n=null!==(r=null===h||void 0===h?void 0:h.insets)&&void 0!==r?r:d)&&void 0!==n?n:p)&&void 0!==t?t:null),w=i()(b,2),x=w[0],_=w[1],E=o.useState(null!==(s=null!==(l=null===h||void 0===h?void 0:h.frame)&&void 0!==l?l:v)&&void 0!==s?s:{x:0,y:0,width:a.a.get("window").width,height:a.a.get("window").height}),A=i()(E,2),S=A[0],M=A[1],T=o.useCallback((function(e){var t=e.nativeEvent,n=t.frame,r=t.insets;!n||n.height===S.height&&n.width===S.width&&n.x===S.x&&n.y===S.y||M(n),x&&r.bottom===x.bottom&&r.left===x.left&&r.right===x.right&&r.top===x.top||_(r)}),[S,x]);return o.createElement(u,{style:[y.fill,f],onInsetsChange:T},null!=x?o.createElement(g.Provider,{value:S},o.createElement(m.Provider,{value:x},c)):null)}var y=s.a.create({fill:{flex:1}});function b(){var e=o.useContext(m);if(null==e)throw new Error("No safe area insets value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.");return e}var w=m.Consumer},function(e,t,n){"use strict";t.a=function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")}]]);
-//# sourceMappingURL=2.613df8c6.chunk.js.map \ No newline at end of file
diff --git a/web-build/static/js/2.613df8c6.chunk.js.LICENSE.txt b/web-build/static/js/2.613df8c6.chunk.js.LICENSE.txt
deleted file mode 100644
index 03ba9cb..0000000
--- a/web-build/static/js/2.613df8c6.chunk.js.LICENSE.txt
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-/*!
- * Determine if an object is a Buffer
- *
- * @author Feross Aboukhadijeh <https://feross.org>
- * @license MIT
- */
-
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
- * @license MIT
- */
-
-/*! (C) WebReflection Mit Style License */
-
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation.
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-***************************************************************************** */
-
-/*! fromentries. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
-
-/**
- * @license
- * Copyright 2010-2021 Three.js Authors
- * SPDX-License-Identifier: MIT
- */
-
-/**
- * @license
- * cardboard-vr-display
- * Copyright (c) 2015-2017 Google
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @license
- * gl-preserve-state
- * Copyright (c) 2016, Brandon Jones.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-/**
- * @license
- * nosleep.js
- * Copyright (c) 2017, Rich Tibbett
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-/**
- * @license
- * webvr-polyfill
- * Copyright (c) 2015-2017 Google
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @license
- * webvr-polyfill-dpdb
- * Copyright (c) 2015-2017 Google
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @license
- * webvr-polyfill-dpdb
- * Copyright (c) 2017 Google
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @license
- * wglu-preserve-state
- * Copyright (c) 2016, Brandon Jones.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-/** @license React v0.20.2
- * scheduler.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/** @license React v16.13.1
- * react-is.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/** @license React v16.13.1
- * react.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/** @license React v17.0.2
- * react-dom.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
diff --git a/web-build/static/js/2.613df8c6.chunk.js.map b/web-build/static/js/2.613df8c6.chunk.js.map
deleted file mode 100644
index be12a19..0000000
--- a/web-build/static/js/2.613df8c6.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["node_modules/react/index.js","node_modules/prop-types/index.js","node_modules/three/build/three.module.js","node_modules/react-native-web/dist/exports/View/index.js","node_modules/react-native-web/node_modules/fbjs/lib/invariant.js","node_modules/react-native-web/dist/exports/StyleSheet/StyleSheet.js","node_modules/react-native-web/dist/exports/StyleSheet/index.js","node_modules/@babel/runtime/helpers/defineProperty.js","node_modules/@babel/runtime/regenerator/index.js","node_modules/@babel/runtime/helpers/slicedToArray.js","node_modules/react-native-web/dist/exports/Platform/index.js","node_modules/mobx/dist/mobx.esm.js","node_modules/accessor-fn/dist/accessor-fn.module.js","node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedEvent.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedTransform.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedStyle.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedProps.js","node_modules/react-native-web/dist/vendor/react-native/Utilities/setAndForwardRef.js","node_modules/react-native-web/dist/vendor/react-native/Animated/createAnimatedComponent.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedFlatList.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedImage.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedScrollView.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedSectionList.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedText.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedView.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedAddition.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDivision.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedModulo.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedMultiplication.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedSubtraction.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedTracking.js","node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedImplementation.js","node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedMock.js","node_modules/react-native-web/dist/vendor/react-native/Animated/Animated.js","node_modules/react-native-web/dist/exports/Animated/index.js","node_modules/react-native-web/node_modules/fbjs/lib/ExecutionEnvironment.js","node_modules/react-native-web/dist/vendor/react-native/Animated/bezier.js","node_modules/react-native-web/dist/vendor/react-native/Animated/Easing.js","node_modules/react-native-web/dist/exports/Easing/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedHelper.js","node_modules/@babel/runtime/helpers/assertThisInitialized.js","node_modules/@babel/runtime/helpers/objectWithoutProperties.js","node_modules/@babel/runtime/helpers/getPrototypeOf.js","node_modules/@babel/runtime/helpers/extends.js","node_modules/@babel/runtime/helpers/toConsumableArray.js","node_modules/@babel/runtime/helpers/classCallCheck.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedNode.js","node_modules/@babel/runtime/helpers/createClass.js","node_modules/@babel/runtime/helpers/inherits.js","node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValue.js","node_modules/d3-force-3d/src/constant.js","node_modules/react-native-web/dist/modules/forwardedProps/index.js","node_modules/react-native-web/dist/modules/setValueForStyles/dangerousStyleValue.js","node_modules/react-native-web/dist/modules/setValueForStyles/index.js","node_modules/react-native-web/dist/exports/UIManager/index.js","index.tsx","node_modules/mobx-state-tree/dist/mobx-state-tree.module.js","node_modules/react-native-web/dist/exports/createElement/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedWithChildren.js","node_modules/react-native-web/dist/exports/Dimensions/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedInterpolation.js","node_modules/react-native-web/dist/exports/I18nManager/index.js","node_modules/react-native-web/dist/modules/useMergeRefs/index.js","node_modules/react-native-web/dist/modules/AssetRegistry/index.js","node_modules/react-native-web/dist/modules/ImageLoader/index.js","node_modules/react-native-web/dist/exports/Image/index.js","node_modules/ramda/src/internal/_curry2.js","NavigationBuilderContext.tsx","node_modules/nanoid/non-secure/index.js","node_modules/react-native-web/dist/exports/StyleSheet/constants.js","node_modules/d3-force-3d/src/jiggle.js","node_modules/@react-native-community/slider/dist/Slider.js","../../../.local/share/nvm/v15.12.0/lib/node_modules/expo-cli/node_modules/webpack/buildin/global.js","NavigationRouteContext.tsx","node_modules/react-native-web/dist/exports/TouchableOpacity/index.js","node_modules/react-native-web/dist/exports/findNodeHandle/index.js","node_modules/mobx-react-lite/es/utils/assertEnvironment.js","node_modules/mobx-react-lite/es/utils/observerBatching.js","node_modules/mobx-react-lite/es/utils/utils.js","node_modules/mobx-react-lite/es/utils/printDebugValue.js","node_modules/mobx-react-lite/es/utils/FinalizationRegistryWrapper.js","node_modules/mobx-react-lite/es/utils/reactionCleanupTrackingCommon.js","node_modules/mobx-react-lite/es/utils/createTimerBasedReactionCleanupTracking.js","node_modules/mobx-react-lite/es/utils/reactionCleanupTracking.js","node_modules/mobx-react-lite/es/utils/createReactionCleanupTrackingUsingFinalizationRegister.js","node_modules/mobx-react-lite/es/staticRendering.js","node_modules/mobx-react-lite/es/useObserver.js","node_modules/mobx-react-lite/es/observer.js","node_modules/mobx-react-lite/es/useAsObservableSource.js","node_modules/mobx-react-lite/es/index.js","node_modules/react-native-web/dist/exports/StyleSheet/normalizeValueWithProperty.js","node_modules/axios/lib/utils.js","node_modules/react-native-web/dist/modules/ScrollResponder/index.js","node_modules/react-native-web/dist/exports/ScrollView/ScrollViewBase.js","node_modules/react-native-web/dist/exports/ScrollView/index.js","node_modules/kapsule/dist/kapsule.module.js","node_modules/react-native-web/dist/modules/requestIdleCallback/index.js","node_modules/react-native-web/dist/exports/InteractionManager/index.js","node_modules/ramda/src/internal/_curry1.js","node_modules/react-native-web/dist/exports/Text/index.js","NavigationContext.tsx","node_modules/react-native-web/dist/exports/TextInput/index.js","node_modules/react-native-web/dist/modules/TextInputState/index.js","node_modules/react-native-web/dist/exports/Switch/index.js","node_modules/@tweenjs/tween.js/dist/tween.esm.js","node_modules/react-dom/index.js","node_modules/react-native-web/dist/exports/StyleSheet/css.js","node_modules/react-native-web/dist/modules/UnimplementedView/index.js","AsyncStorage.js","index.js","node_modules/react-native-web/dist/modules/useLayoutEffect/index.js","NavigationStateContext.tsx","node_modules/react-native-web/dist/vendor/react-native/emitter/_EmitterSubscription.js","node_modules/react-native-web/dist/vendor/react-native/emitter/_EventSubscription.js","node_modules/react-native-web/dist/vendor/react-native/emitter/_EventSubscriptionVendor.js","node_modules/react-native-web/dist/vendor/react-native/emitter/_EventEmitter.js","node_modules/react-native-web/dist/vendor/react-native/emitter/EventEmitter.js","node_modules/react-native-web/dist/vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter.js","useNavigation.tsx","node_modules/react-native-web/dist/vendor/react-native/deepDiffer/index.js","node_modules/react-native-web/dist/vendor/react-native/FlatList/index.js","node_modules/react-native-web/dist/exports/FlatList/index.js","node_modules/react-native-web/dist/modules/pick/index.js","node_modules/react-native-web/dist/modules/usePlatformMethods/index.js","node_modules/react-native-web/dist/modules/usePressEvents/PressResponder.js","node_modules/react-native-web/dist/modules/usePressEvents/index.js","node_modules/react-native-web/dist/vendor/react-native/Batchinator/index.js","node_modules/react-native-web/dist/vendor/react-native/ViewabilityHelper/index.js","node_modules/react-native-web/dist/vendor/react-native/infoLog/index.js","node_modules/react-native-web/dist/vendor/react-native/VirtualizeUtils/index.js","node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/VirtualizedListContext.js","node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js","node_modules/react-native-web/dist/exports/StatusBar/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValueXY.js","node_modules/react-native-web/dist/exports/BackHandler/index.js","node_modules/react-native-web/dist/exports/Text/TextAncestorContext.js","node_modules/react-native-web/dist/exports/StyleSheet/flattenStyle.js","node_modules/fbjs/lib/ExecutionEnvironment.js","node_modules/d3-force-3d/src/lcg.js","node_modules/d3-force-3d/src/simulation.js","node_modules/ngraph.forcelayout/lib/codeGenerators/createPatternBuilder.js","node_modules/ramda/src/internal/_arity.js","types.tsx","DefaultTheme.tsx","node_modules/react-native-web/dist/modules/useElementLayout/index.js","node_modules/normalize-css-color/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/animations/Animation.js","node_modules/react-native-web/dist/exports/TouchableNativeFeedback/index.js","EnsureSingleNavigator.tsx","node_modules/react-native-web/dist/exports/StyleSheet/createCompileableStyle.js","node_modules/react-native-web/dist/exports/StyleSheet/createOrderedCSSStyleSheet.js","node_modules/react-native-web/dist/modules/flattenArray/index.js","node_modules/react-native-web/dist/exports/StyleSheet/i18nStyle.js","node_modules/react-native-web/dist/exports/StyleSheet/createReactDOMStyle.js","node_modules/react-native-web/dist/vendor/hash/index.js","node_modules/react-native-web/dist/modules/prefixStyles/static.js","node_modules/react-native-web/dist/modules/prefixStyles/index.js","node_modules/react-native-web/dist/exports/StyleSheet/compile.js","node_modules/react-native-web/dist/exports/StyleSheet/initialRules.js","node_modules/react-native-web/dist/exports/StyleSheet/modality.js","node_modules/react-native-web/dist/exports/StyleSheet/createStyleResolver.js","node_modules/react-native-web/dist/exports/StyleSheet/styleResolver.js","node_modules/react-native-web/dist/exports/StyleSheet/createCSSStyleSheet.js","node_modules/react-native-web/dist/modules/useResponderEvents/ResponderEventTypes.js","node_modules/react-native-web/dist/modules/useResponderEvents/ResponderTouchHistoryStore.js","node_modules/react-native-web/dist/modules/useResponderEvents/createResponderEvent.js","node_modules/react-native-web/dist/modules/useResponderEvents/utils.js","node_modules/react-native-web/dist/modules/isSelectionValid/index.js","node_modules/react-native-web/dist/modules/useResponderEvents/ResponderSystem.js","node_modules/react-native-web/dist/modules/useResponderEvents/index.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/buttonLikeRoles.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAriaRole.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAccessibilityComponent.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/index.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/isDisabled.js","node_modules/i18n-js/app/assets/javascripts/i18n.js","node_modules/react-native-web/dist/modules/getBoundingClientRect/index.js","node_modules/react-native-web/dist/modules/multiplyStyleLengthValue/index.js","node_modules/css-in-js-utils/lib/isPrefixedValue.js","node_modules/react-native-web/dist/exports/KeyboardAvoidingView/index.js","BaseRouter.tsx","node_modules/react-native-web/dist/exports/AppRegistry/AppContainer.js","node_modules/react-native-web/dist/exports/AppRegistry/renderApplication.js","node_modules/react-native-web/dist/exports/AppRegistry/index.js","node_modules/react-native-web/dist/modules/unitlessNumbers/index.js","node_modules/react-native-web/dist/exports/StyleSheet/ReactNativePropRegistry.js","node_modules/react-native-web/dist/modules/useStable/index.js","node_modules/index-array-by/dist/index-array-by.module.js","node_modules/tinycolor2/tinycolor.js","useRouteCache.tsx","node_modules/lodash.pick/index.js","../../../.local/share/nvm/v15.12.0/lib/node_modules/expo-cli/node_modules/process/browser.js","node_modules/ramda/src/internal/_isPlaceholder.js","node_modules/ramda/src/curryN.js","node_modules/ramda/src/internal/_has.js","node_modules/react-native-web/dist/exports/processColor/index.js","node_modules/react-native-web/dist/exports/PixelRatio/index.js","node_modules/react-native-web/dist/exports/RefreshControl/index.js","node_modules/react-native-web/dist/exports/TouchableWithoutFeedback/index.js","node_modules/react-native-web/dist/exports/render/index.js","node_modules/react-native-web/dist/exports/unmountComponentAtNode/index.js","node_modules/react-native-web/dist/exports/Keyboard/index.js","node_modules/react-native-web/dist/exports/SafeAreaView/index.js","node_modules/react-native-web/dist/exports/TouchableHighlight/index.js","CurrentRenderContext.tsx","useBackButton.tsx","ThemeProvider.tsx","node_modules/react-native-web/dist/vendor/react-native/VirtualizedSectionList/index.js","node_modules/react-native-web/dist/vendor/react-native/SectionList/index.js","node_modules/react-native-web/dist/exports/SectionList/index.js","ServerContext.tsx","useLinking.tsx","node_modules/react-native-web/dist/modules/createDOMProps/index.js","node_modules/react-native-web/dist/exports/StyleSheet/resolveShadowValue.js","node_modules/react-native-web/dist/modules/mergeRefs/index.js","node_modules/react-native-web/dist/modules/dismissKeyboard/index.js","node_modules/react-native-web/dist/vendor/react-native/TurboModule/TurboModuleRegistry.js","node_modules/react-native-web/dist/vendor/react-native/NativeEventEmitter/index.js","UnhandledActionContext.tsx","useScheduleUpdate.tsx","useChildListeners.tsx","useKeyedChildListeners.tsx","useOptionsGetters.tsx","useEventEmitter.tsx","Screen.tsx","node_modules/@react-navigation/core/node_modules/query-string/index.js","checkLegacyPathConfig.tsx","ThemeContext.tsx","node_modules/ramda/es/internal/_isPlaceholder.js","node_modules/ramda/es/internal/_curry1.js","node_modules/ramda/es/adjust.js","node_modules/ramda/es/internal/_isArray.js","node_modules/ramda/es/internal/_isString.js","node_modules/ramda/es/internal/_isArrayLike.js","node_modules/ramda/es/internal/_reduce.js","node_modules/ramda/es/internal/_has.js","node_modules/ramda/es/internal/_isArguments.js","node_modules/ramda/es/keys.js","node_modules/ramda/es/internal/_isInteger.js","node_modules/ramda/es/internal/_makeFlat.js","node_modules/ramda/es/internal/_toISOString.js","node_modules/ramda/es/internal/_xdropLastWhile.js","node_modules/ramda/es/flatten.js","node_modules/ramda/es/internal/_assign.js","node_modules/ramda/es/test.js","node_modules/ramda/es/trim.js","node_modules/react-native-web/dist/modules/isWebColor/index.js","node_modules/react-native-web/dist/modules/normalizeColor/index.js","node_modules/data-joint/dist/data-joint.module.js","node_modules/three-forcegraph/dist/three-forcegraph.module.js","node_modules/object-assign/index.js","node_modules/ngraph.events/index.js","node_modules/@babel/runtime/helpers/setPrototypeOf.js","StackRouter.tsx","node_modules/ramda/src/internal/_curry3.js","node_modules/ramda/src/internal/_isArray.js","node_modules/ramda/src/internal/_checkForMethod.js","node_modules/ramda/src/keys.js","node_modules/react-native-web/dist/exports/AccessibilityInfo/index.js","node_modules/react-native-web/dist/exports/Alert/index.js","node_modules/react-native-web/dist/exports/Appearance/index.js","node_modules/react-native-web/dist/exports/AppState/index.js","node_modules/react-native-web/dist/exports/Clipboard/index.js","node_modules/react-native-web/dist/exports/DeviceInfo/index.js","node_modules/react-native-web/dist/vendor/react-native/LayoutAnimation/index.js","node_modules/react-native-web/dist/exports/LayoutAnimation/index.js","node_modules/react-native-web/dist/exports/Linking/index.js","node_modules/react-native-web/dist/exports/NativeEventEmitter/index.js","node_modules/react-native-web/dist/vendor/react-native/TouchHistoryMath/index.js","node_modules/react-native-web/dist/vendor/react-native/PanResponder/index.js","node_modules/react-native-web/dist/exports/PanResponder/index.js","node_modules/react-native-web/dist/exports/Share/index.js","node_modules/react-native-web/dist/exports/Vibration/index.js","node_modules/react-native-web/dist/exports/ActivityIndicator/index.js","node_modules/react-native-web/dist/exports/Button/index.js","node_modules/react-native-web/dist/exports/CheckBox/index.js","node_modules/react-native-web/dist/exports/ImageBackground/index.js","node_modules/react-native-web/dist/exports/Modal/ModalPortal.js","node_modules/react-native-web/dist/exports/Modal/ModalAnimation.js","node_modules/react-native-web/dist/exports/Modal/ModalContent.js","node_modules/react-native-web/dist/exports/Modal/ModalFocusTrap.js","node_modules/react-native-web/dist/exports/Modal/index.js","node_modules/react-native-web/dist/exports/Picker/index.js","node_modules/react-native-web/dist/exports/Picker/PickerItem.js","node_modules/react-native-web/dist/modules/createEventHandle/index.js","node_modules/react-native-web/dist/modules/modality/index.js","node_modules/react-native-web/dist/modules/useEvent/index.js","node_modules/react-native-web/dist/modules/useHover/index.js","node_modules/react-native-web/dist/exports/Pressable/index.js","node_modules/react-native-web/dist/exports/ProgressBar/index.js","node_modules/react-native-web/dist/vendor/react-native/PooledClass/index.js","node_modules/react-native-web/dist/exports/Touchable/BoundingDimensions.js","node_modules/react-native-web/dist/exports/Touchable/Position.js","node_modules/react-native-web/dist/exports/Touchable/index.js","node_modules/react-native-web/dist/exports/VirtualizedList/index.js","node_modules/react-native-web/dist/exports/YellowBox/index.js","node_modules/react-native-web/dist/exports/DrawerLayoutAndroid/index.js","node_modules/react-native-web/dist/exports/InputAccessoryView/index.js","node_modules/react-native-web/dist/exports/ToastAndroid/index.js","node_modules/react-native-web/dist/exports/PermissionsAndroid/index.js","node_modules/react-native-web/dist/exports/Settings/index.js","node_modules/react-native-web/dist/exports/Systrace/index.js","node_modules/react-native-web/dist/exports/TVEventHandler/index.js","node_modules/react-native-web/dist/exports/DeviceEventEmitter/index.js","node_modules/react-native-web/dist/exports/useColorScheme/index.js","node_modules/react-native-web/dist/exports/useWindowDimensions/index.js","node_modules/hyphenate-style-name/index.js","node_modules/react-native-web/node_modules/fbjs/lib/warning.js","node_modules/axios/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/animations/SpringAnimation.js","node_modules/react-native-web/dist/vendor/react-native/Animated/SpringConfig.js","node_modules/react-native-web/dist/vendor/react-native/Animated/animations/TimingAnimation.js","node_modules/fromentries/index.js","node_modules/bezier-js/dist/bezier.cjs","node_modules/jerrypick/dist/jerrypick.module.js","node_modules/react-kapsule/dist/react-kapsule.module.js","node_modules/3d-force-graph-vr/dist/3d-force-graph-vr.module.js","node_modules/3d-force-graph-ar/dist/3d-force-graph-ar.module.js","node_modules/three/examples/jsm/controls/DragControls.js","node_modules/three/examples/jsm/controls/TrackballControls.js","node_modules/three/examples/jsm/controls/OrbitControls.js","node_modules/three/examples/jsm/controls/FlyControls.js","node_modules/three/examples/jsm/shaders/CopyShader.js","node_modules/three/examples/jsm/postprocessing/Pass.js","node_modules/three/examples/jsm/postprocessing/ShaderPass.js","node_modules/three/examples/jsm/postprocessing/MaskPass.js","node_modules/three/examples/jsm/postprocessing/EffectComposer.js","node_modules/three/examples/jsm/postprocessing/RenderPass.js","node_modules/@babel/runtime/helpers/esm/extends.js","node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","node_modules/@babel/runtime/helpers/esm/construct.js","node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","node_modules/three-render-objects/node_modules/polished/dist/polished.esm.js","node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","node_modules/three-render-objects/dist/three-render-objects.module.js","node_modules/3d-force-graph/dist/3d-force-graph.module.js","node_modules/d3-selection/src/selector.js","node_modules/d3-selection/src/array.js","node_modules/d3-selection/src/selectorAll.js","node_modules/d3-selection/src/selection/selectAll.js","node_modules/d3-selection/src/matcher.js","node_modules/d3-selection/src/selection/selectChild.js","node_modules/d3-selection/src/selection/selectChildren.js","node_modules/d3-selection/src/selection/sparse.js","node_modules/d3-selection/src/selection/enter.js","node_modules/d3-selection/src/constant.js","node_modules/d3-selection/src/selection/data.js","node_modules/d3-selection/src/selection/sort.js","node_modules/d3-selection/src/selection/call.js","node_modules/d3-selection/src/namespaces.js","node_modules/d3-selection/src/namespace.js","node_modules/d3-selection/src/selection/attr.js","node_modules/d3-selection/src/window.js","node_modules/d3-selection/src/selection/style.js","node_modules/d3-selection/src/selection/property.js","node_modules/d3-selection/src/selection/classed.js","node_modules/d3-selection/src/selection/text.js","node_modules/d3-selection/src/selection/html.js","node_modules/d3-selection/src/selection/raise.js","node_modules/d3-selection/src/selection/lower.js","node_modules/d3-selection/src/creator.js","node_modules/d3-selection/src/selection/insert.js","node_modules/d3-selection/src/selection/remove.js","node_modules/d3-selection/src/selection/clone.js","node_modules/d3-selection/src/selection/on.js","node_modules/d3-selection/src/selection/dispatch.js","node_modules/d3-selection/src/selection/index.js","node_modules/d3-selection/src/selection/select.js","node_modules/d3-selection/src/selection/filter.js","node_modules/d3-selection/src/selection/exit.js","node_modules/d3-selection/src/selection/join.js","node_modules/d3-selection/src/selection/merge.js","node_modules/d3-selection/src/selection/order.js","node_modules/d3-selection/src/selection/nodes.js","node_modules/d3-selection/src/selection/node.js","node_modules/d3-selection/src/selection/size.js","node_modules/d3-selection/src/selection/empty.js","node_modules/d3-selection/src/selection/each.js","node_modules/d3-selection/src/selection/append.js","node_modules/d3-selection/src/selection/datum.js","node_modules/d3-selection/src/selection/iterator.js","node_modules/d3-selection/src/select.js","node_modules/d3-drag/src/noevent.js","node_modules/d3-drag/src/nodrag.js","node_modules/d3-interpolate/src/zoom.js","node_modules/d3-selection/src/pointer.js","node_modules/d3-selection/src/sourceEvent.js","node_modules/d3-timer/src/timeout.js","node_modules/d3-transition/src/transition/schedule.js","node_modules/d3-transition/src/interrupt.js","node_modules/d3-interpolate/src/transform/parse.js","node_modules/d3-interpolate/src/number.js","node_modules/d3-interpolate/src/transform/decompose.js","node_modules/d3-interpolate/src/transform/index.js","node_modules/d3-transition/src/transition/tween.js","node_modules/d3-color/src/define.js","node_modules/d3-color/src/color.js","node_modules/d3-interpolate/src/basis.js","node_modules/d3-interpolate/src/constant.js","node_modules/d3-interpolate/src/color.js","node_modules/d3-interpolate/src/rgb.js","node_modules/d3-interpolate/src/basisClosed.js","node_modules/d3-interpolate/src/string.js","node_modules/d3-transition/src/transition/interpolate.js","node_modules/d3-transition/src/transition/attr.js","node_modules/d3-transition/src/transition/attrTween.js","node_modules/d3-transition/src/transition/delay.js","node_modules/d3-transition/src/transition/duration.js","node_modules/d3-transition/src/transition/ease.js","node_modules/d3-transition/src/transition/on.js","node_modules/d3-transition/src/transition/remove.js","node_modules/d3-transition/src/transition/selection.js","node_modules/d3-transition/src/transition/style.js","node_modules/d3-transition/src/transition/styleTween.js","node_modules/d3-transition/src/transition/textTween.js","node_modules/d3-transition/src/transition/index.js","node_modules/d3-transition/src/transition/select.js","node_modules/d3-transition/src/transition/selectAll.js","node_modules/d3-transition/src/transition/filter.js","node_modules/d3-transition/src/transition/merge.js","node_modules/d3-transition/src/transition/transition.js","node_modules/d3-transition/src/transition/text.js","node_modules/d3-transition/src/transition/easeVarying.js","node_modules/d3-transition/src/transition/end.js","node_modules/d3-transition/src/selection/transition.js","node_modules/d3-ease/src/cubic.js","node_modules/d3-transition/src/selection/index.js","node_modules/d3-transition/src/selection/interrupt.js","node_modules/d3-zoom/src/constant.js","node_modules/d3-zoom/src/event.js","node_modules/d3-zoom/src/transform.js","node_modules/d3-zoom/src/noevent.js","node_modules/d3-zoom/src/zoom.js","node_modules/d3-drag/src/constant.js","node_modules/d3-drag/src/event.js","node_modules/d3-drag/src/drag.js","node_modules/canvas-color-tracker/dist/canvas-color-tracker.module.js","node_modules/force-graph/dist/force-graph.module.js","node_modules/react-force-graph/dist/react-force-graph.module.js","node_modules/react-native-animatable/wrapStyleTransforms.js","node_modules/react-native-animatable/flattenStyle.js","node_modules/react-native-animatable/getDefaultStyleValue.js","node_modules/react-native-animatable/getStyleValues.js","node_modules/react-native-animatable/createAnimation.js","node_modules/react-native-animatable/registry.js","node_modules/react-native-animatable/easing.js","node_modules/react-native-animatable/createAnimatableComponent.js","node_modules/react-native-animatable/definitions/attention-seekers.js","node_modules/react-native-animatable/definitions/bouncing-entrances.js","node_modules/react-native-animatable/definitions/bouncing-exits.js","node_modules/react-native-animatable/definitions/fading-entrances.js","node_modules/react-native-animatable/definitions/fading-exits.js","node_modules/react-native-animatable/definitions/flippers.js","node_modules/react-native-animatable/definitions/lightspeed.js","node_modules/react-native-animatable/definitions/sliding-entrances.js","node_modules/react-native-animatable/definitions/sliding-exits.js","node_modules/react-native-animatable/definitions/zooming-entrances.js","node_modules/react-native-animatable/definitions/zooming-exits.js","node_modules/react-native-animatable/index.js","../src/Font.types.ts","../src/ExpoFontLoader.web.ts","../src/FontLoader.web.ts","../src/Font.ts","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/ensure-native-module-available.js","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/icon-button.js","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/create-icon-set.js","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/create-icon-source-cache.js","../src/createIconSet.tsx","../src/MaterialCommunityIcons.ts","node_modules/@expo/vector-icons/MaterialCommunityIcons.js","node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","node_modules/@babel/runtime/helpers/arrayLikeToArray.js","node_modules/react-native-web/dist/exports/LogBox/index.js","node_modules/inline-style-prefixer/lib/utils/capitalizeString.js","node_modules/aframe-forcegraph-component/index.js","node_modules/ngraph.forcelayout/lib/createPhysicsSimulator.js","node_modules/ngraph.forcelayout/lib/codeGenerators/getVariableName.js","node_modules/@babel/runtime/helpers/interopRequireDefault.js","node_modules/react-native-web/dist/exports/NativeModules/index.js","node_modules/@babel/runtime/helpers/typeof.js","CommonActions.tsx","BaseNavigationContainer.tsx","createNavigatorFactory.tsx","NavigationHelpersContext.tsx","useRoute.tsx","useFocusEffect.tsx","getStateFromPath.tsx","node_modules/strict-uri-encode/index.js","node_modules/decode-uri-component/index.js","node_modules/split-on-first/index.js","node_modules/filter-obj/index.js","getPathFromState.tsx","getActionFromState.tsx","getFocusedRouteNameFromRoute.tsx","node_modules/ramda/src/reduce.js","node_modules/ramda/src/internal/_reduce.js","node_modules/ramda/src/always.js","node_modules/axios/lib/helpers/bind.js","node_modules/axios/lib/helpers/buildURL.js","node_modules/axios/lib/cancel/isCancel.js","node_modules/axios/lib/defaults.js","node_modules/axios/lib/adapters/xhr.js","node_modules/axios/lib/core/createError.js","node_modules/axios/lib/core/mergeConfig.js","node_modules/axios/lib/cancel/Cancel.js","useTheme.tsx","node_modules/color-convert/conversions.js","StaticContainer.tsx","SceneView.tsx","useDescriptors.tsx","useNavigationCache.tsx","useNavigationHelpers.tsx","useOnPreventRemove.tsx","useOnAction.tsx","isArrayEqual.tsx","useNavigationBuilder.tsx","useRegisterNavigator.tsx","useFocusEvents.tsx","useOnRouteFocus.tsx","useFocusedListenersChildrenAdapter.tsx","useOnGetState.tsx","useCurrentRender.tsx","LinkingContext.tsx","NavigationContainer.tsx","useDocumentTitle.tsx","useThenable.tsx","node_modules/rtl-detect/index.js","node_modules/deep-assign/index.js","node_modules/inline-style-prefixer/lib/createPrefixer.js","node_modules/inline-style-prefixer/lib/plugins/backgroundClip.js","node_modules/inline-style-prefixer/lib/plugins/crossFade.js","node_modules/inline-style-prefixer/lib/plugins/cursor.js","node_modules/inline-style-prefixer/lib/plugins/filter.js","node_modules/inline-style-prefixer/lib/plugins/flex.js","node_modules/inline-style-prefixer/lib/plugins/flexboxIE.js","node_modules/inline-style-prefixer/lib/plugins/flexboxOld.js","node_modules/inline-style-prefixer/lib/plugins/gradient.js","node_modules/inline-style-prefixer/lib/plugins/grid.js","node_modules/inline-style-prefixer/lib/plugins/imageSet.js","node_modules/inline-style-prefixer/lib/plugins/logical.js","node_modules/inline-style-prefixer/lib/plugins/position.js","node_modules/inline-style-prefixer/lib/plugins/sizing.js","node_modules/inline-style-prefixer/lib/plugins/transition.js","node_modules/create-react-class/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedTurboModule.js","node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedModule.js","node_modules/react-native-web/dist/vendor/react-native/Animated/animations/DecayAnimation.js","node_modules/react-native-web/dist/vendor/react-native/FillRateHelper/index.js","node_modules/ngraph.graph/index.js","node_modules/ngraph.forcelayout/index.js","node_modules/debounce/index.js","node_modules/d3-timer/src/timer.js","node_modules/lodash.throttle/index.js","node_modules/three-spritetext/dist/three-spritetext.module.js","node_modules/array-find-index/index.js","node_modules/lodash.isstring/index.js","node_modules/lodash.omit/index.js","../../src/errors/CodedError.ts","node_modules/@babel/runtime/helpers/wrapNativeSuper.js","node_modules/fontfaceobserver/fontfaceobserver.standalone.js","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf","useSyncState.tsx","node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.js","node_modules/apisauce/dist/apisauce.js","node_modules/color/index.js","../src/ExpoErrorRecovery.web.ts","../src/ErrorRecovery.ts","../../src/launch/registerRootComponent.web.tsx","../../src/launch/withExpoRoot.web.tsx","../src/ExpoLocalization.ts","../src/Localization.ts","../../src/environment/browser.web.ts","../src/Platform.ts","node_modules/react-native-collapsible/Collapsible.js","node_modules/react-native-collapsible/Accordion.js","node_modules/d3-octree/src/add.js","node_modules/d3-octree/src/cover.js","node_modules/d3-octree/src/octant.js","node_modules/d3-octree/src/x.js","node_modules/d3-octree/src/y.js","node_modules/d3-octree/src/z.js","node_modules/d3-octree/src/octree.js","node_modules/d3-octree/src/data.js","node_modules/d3-octree/src/extent.js","node_modules/d3-octree/src/find.js","node_modules/d3-octree/src/remove.js","node_modules/d3-octree/src/root.js","node_modules/d3-octree/src/size.js","node_modules/d3-octree/src/visit.js","node_modules/d3-octree/src/visitAfter.js","node_modules/d3-quadtree/src/add.js","node_modules/d3-quadtree/src/cover.js","node_modules/d3-quadtree/src/quad.js","node_modules/d3-quadtree/src/x.js","node_modules/d3-quadtree/src/y.js","node_modules/d3-quadtree/src/quadtree.js","node_modules/d3-quadtree/src/data.js","node_modules/d3-quadtree/src/extent.js","node_modules/d3-quadtree/src/find.js","node_modules/d3-quadtree/src/remove.js","node_modules/d3-quadtree/src/root.js","node_modules/d3-quadtree/src/size.js","node_modules/d3-quadtree/src/visit.js","node_modules/d3-quadtree/src/visitAfter.js","node_modules/d3-binarytree/src/add.js","node_modules/d3-binarytree/src/cover.js","node_modules/d3-binarytree/src/half.js","node_modules/d3-binarytree/src/x.js","node_modules/d3-binarytree/src/binarytree.js","node_modules/d3-binarytree/src/data.js","node_modules/d3-binarytree/src/extent.js","node_modules/d3-binarytree/src/find.js","node_modules/d3-binarytree/src/remove.js","node_modules/d3-binarytree/src/root.js","node_modules/d3-binarytree/src/size.js","node_modules/d3-binarytree/src/visit.js","node_modules/d3-binarytree/src/visitAfter.js","node_modules/resize-observer-polyfill/dist/ResizeObserver.global.js","node_modules/expo/AppEntry.js","node_modules/@babel/runtime/helpers/arrayWithHoles.js","node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","node_modules/@babel/runtime/helpers/nonIterableRest.js","node_modules/regenerator-runtime/runtime.js","node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","node_modules/rtl-detect/lib/rtl-detect.js","node_modules/react/cjs/react.production.min.js","node_modules/is-obj/index.js","node_modules/react-dom/cjs/react-dom.production.min.js","node_modules/react-dom/node_modules/scheduler/index.js","node_modules/react-dom/node_modules/scheduler/cjs/scheduler.production.min.js","node_modules/inline-style-prefixer/lib/utils/prefixProperty.js","node_modules/inline-style-prefixer/lib/utils/prefixValue.js","node_modules/inline-style-prefixer/lib/utils/addNewValuesOnly.js","node_modules/inline-style-prefixer/lib/utils/isObject.js","node_modules/css-in-js-utils/lib/hyphenateProperty.js","node_modules/create-react-class/factory.js","node_modules/react-native-web/node_modules/fbjs/lib/emptyFunction.js","node_modules/prop-types/factoryWithThrowingShims.js","node_modules/prop-types/lib/ReactPropTypesSecret.js","node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","node_modules/@babel/runtime/helpers/iterableToArray.js","node_modules/@babel/runtime/helpers/nonIterableSpread.js","node_modules/aframe/dist/aframe-master.js","node_modules/aframe-extras/index.js","node_modules/aframe-extras/src/controls/index.js","node_modules/aframe-extras/src/controls/checkpoint-controls.js","node_modules/aframe-extras/src/controls/gamepad-controls.js","node_modules/aframe-extras/lib/GamepadButton.js","node_modules/aframe-extras/lib/GamepadButtonEvent.js","node_modules/aframe-extras/src/controls/keyboard-controls.js","node_modules/aframe-extras/lib/keyboard.polyfill.js","node_modules/aframe-extras/src/controls/touch-controls.js","node_modules/aframe-extras/src/controls/movement-controls.js","node_modules/aframe-extras/src/controls/trackpad-controls.js","node_modules/aframe-extras/src/loaders/index.js","node_modules/aframe-extras/src/loaders/animation-mixer.js","node_modules/aframe-extras/src/loaders/collada-model-legacy.js","node_modules/aframe-extras/lib/ColladaLoader.js","node_modules/aframe-extras/src/loaders/fbx-model.js","node_modules/aframe-extras/lib/FBXLoader.js","node_modules/aframe-extras/src/loaders/gltf-model-legacy.js","node_modules/aframe-extras/lib/fetch-script.js","node_modules/aframe-extras/src/loaders/object-model.js","node_modules/aframe-extras/src/misc/index.js","node_modules/aframe-extras/src/misc/checkpoint.js","node_modules/aframe-extras/src/misc/cube-env-map.js","node_modules/aframe-extras/src/misc/grab.js","node_modules/aframe-extras/src/misc/jump-ability.js","node_modules/aframe-extras/src/misc/kinematic-body.js","node_modules/aframe-extras/src/misc/mesh-smooth.js","node_modules/aframe-extras/src/misc/normal-material.js","node_modules/aframe-extras/src/misc/sphere-collider.js","node_modules/aframe-extras/src/pathfinding/index.js","node_modules/aframe-extras/src/pathfinding/nav-mesh.js","node_modules/aframe-extras/src/pathfinding/nav-agent.js","node_modules/aframe-extras/src/pathfinding/system.js","node_modules/three-pathfinding/dist/three-pathfinding.module.js","node_modules/aframe-extras/src/primitives/index.js","node_modules/aframe-extras/src/primitives/a-grid.js","node_modules/aframe-extras/src/primitives/a-hexgrid.js","node_modules/aframe-extras/lib/hex-grid.min.js","node_modules/aframe-extras/lib/default-hex-grid.js","node_modules/aframe-extras/src/primitives/a-ocean.js","node_modules/aframe-extras/src/primitives/a-tube.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateBody.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateQuadTree.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateBounds.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateDragForce.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateSpringForce.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateIntegrator.js","node_modules/ngraph.forcelayout/lib/spring.js","node_modules/ngraph.merge/index.js","node_modules/ngraph.random/index.js","node_modules/@react-native-community/slider/dist/RNCSliderNativeComponent.web.js","node_modules/@babel/runtime/helpers/interopRequireWildcard.js","node_modules/@babel/runtime/helpers/isNativeFunction.js","node_modules/@babel/runtime/helpers/construct.js","node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","node_modules/react-is/index.js","node_modules/react-is/cjs/react-is.production.min.js","node_modules/ramda/src/partial.js","node_modules/ramda/src/internal/_concat.js","node_modules/ramda/src/internal/_createPartialApplicator.js","node_modules/ramda/src/curry.js","node_modules/ramda/src/internal/_curryN.js","node_modules/ramda/src/pipeP.js","node_modules/ramda/src/internal/_pipeP.js","node_modules/ramda/src/internal/_isArrayLike.js","node_modules/ramda/src/internal/_isString.js","node_modules/ramda/src/internal/_xwrap.js","node_modules/ramda/src/bind.js","node_modules/ramda/src/tail.js","node_modules/ramda/src/slice.js","node_modules/ramda/src/internal/_isArguments.js","node_modules/ramda/src/forEach.js","node_modules/ramda/src/dissoc.js","node_modules/ramda/src/merge.js","node_modules/ramda/src/internal/_assign.js","node_modules/ramda/src/internal/_objectAssign.js","node_modules/ramda/src/prop.js","node_modules/ramda/src/path.js","node_modules/ramda/src/ifElse.js","node_modules/ramda/src/contains.js","node_modules/ramda/src/internal/_contains.js","node_modules/ramda/src/internal/_indexOf.js","node_modules/ramda/src/equals.js","node_modules/ramda/src/internal/_equals.js","node_modules/ramda/src/internal/_arrayFromIterator.js","node_modules/ramda/src/internal/_containsWith.js","node_modules/ramda/src/internal/_functionName.js","node_modules/ramda/src/identical.js","node_modules/ramda/src/type.js","node_modules/ramda/src/gte.js","node_modules/ramda/src/T.js","node_modules/ramda/src/is.js","node_modules/ramda/src/identity.js","node_modules/ramda/src/internal/_identity.js","node_modules/ramda/src/isNil.js","node_modules/ramda/src/cond.js","node_modules/ramda/src/map.js","node_modules/ramda/src/internal/_dispatchable.js","node_modules/ramda/src/internal/_isTransformer.js","node_modules/ramda/src/internal/_map.js","node_modules/ramda/src/internal/_xmap.js","node_modules/ramda/src/internal/_xfBase.js","node_modules/ramda/src/max.js","node_modules/axios/lib/axios.js","node_modules/axios/lib/core/Axios.js","node_modules/axios/lib/core/InterceptorManager.js","node_modules/axios/lib/core/dispatchRequest.js","node_modules/axios/lib/core/transformData.js","node_modules/axios/lib/helpers/normalizeHeaderName.js","node_modules/axios/lib/core/settle.js","node_modules/axios/lib/core/enhanceError.js","node_modules/axios/lib/helpers/cookies.js","node_modules/axios/lib/core/buildFullPath.js","node_modules/axios/lib/helpers/isAbsoluteURL.js","node_modules/axios/lib/helpers/combineURLs.js","node_modules/axios/lib/helpers/parseHeaders.js","node_modules/axios/lib/helpers/isURLSameOrigin.js","node_modules/axios/lib/cancel/CancelToken.js","node_modules/axios/lib/helpers/spread.js","node_modules/axios/lib/helpers/isAxiosError.js","../../../.local/share/nvm/v15.12.0/lib/node_modules/expo-cli/node_modules/timers-browserify/main.js","../../../.local/share/nvm/v15.12.0/lib/node_modules/expo-cli/node_modules/setimmediate/setImmediate.js","node_modules/@react-navigation/stack/lib/module/views/assets/back-icon.png","node_modules/@react-navigation/stack/lib/module/views/assets/back-icon-mask.png","node_modules/color-string/index.js","node_modules/color-name/index.js","node_modules/simple-swizzle/index.js","node_modules/simple-swizzle/node_modules/is-arrayish/index.js","node_modules/color-convert/index.js","node_modules/color-convert/node_modules/color-name/index.js","node_modules/color-convert/route.js","node_modules/query-string/index.js","node_modules/d3-array/src/min.js","node_modules/d3-array/src/max.js","node_modules/d3-dispatch/src/dispatch.js","node_modules/d3-force-3d/src/link.js","node_modules/d3-force-3d/src/manyBody.js","node_modules/d3-force-3d/src/center.js","node_modules/d3-force-3d/src/radial.js","node_modules/d3-force-3d/src/x.js","node_modules/d3-force-3d/src/y.js","node_modules/d3-force-3d/src/z.js","node_modules/d3-force-3d/src/collide.js","../../src/errors/UnavailabilityError.ts","InitialWindow.ts","Screens.tsx","GestureHandler.tsx","MaskedView.tsx","TouchableItem.tsx","HeaderBackButton.tsx","HeaderBackground.tsx","HeaderShownContext.tsx","memoize.tsx","HeaderSegment.tsx","CardSheet.tsx","CardAnimationContext.tsx","getInvertedMultiplier.tsx","getDistanceForDirection.tsx","Card.tsx","HeaderHeightContext.tsx","PreviousSceneContext.tsx","CardContainer.tsx","node_modules/react-native-iphone-x-helper/index.js","conditional.tsx","CardStyleInterpolators.tsx","HeaderStyleInterpolators.tsx","TransitionSpecs.tsx","TransitionPresets.tsx","CardStack.tsx","KeyboardManager.tsx","HeaderTitle.tsx","Header.tsx","debounce.tsx","HeaderContainer.tsx","SafeAreaProviderCompat.tsx","StackView.tsx","createStackNavigator.tsx","node_modules/internmap/src/index.js","node_modules/d3-scale/src/init.js","node_modules/d3-scale/src/ordinal.js","NativeSafeAreaProvider.tsx","SafeAreaContext.tsx","node_modules/d3-scale-chromatic/src/categorical/Paired.js","node_modules/d3-scale-chromatic/src/colors.js"],"names":["module","exports","MOUSE","LEFT","MIDDLE","RIGHT","ROTATE","DOLLY","PAN","TOUCH","DOLLY_PAN","DOLLY_ROTATE","BackSide","LinearFilter","RGBAFormat","EventDispatcher","type","listener","undefined","this","_listeners","listeners","indexOf","push","listenerArray","index","splice","event","target","array","slice","i","l","length","call","_lut","toString","DEG2RAD","Math","PI","RAD2DEG","generateUUID","d0","random","d1","d2","d3","toUpperCase","clamp","value","min","max","euclideanModulo","n","m","lerp","x","y","t","isPowerOfTwo","floorPowerOfTwo","pow","floor","log","LN2","Vector2","scalar","Error","constructor","v","w","console","warn","addVectors","s","a","b","subVectors","multiplyScalar","e","elements","minVal","maxVal","divideScalar","ceil","round","sqrt","abs","atan2","distanceToSquared","dx","dy","normalize","alpha","v1","v2","offset","attribute","getX","getY","center","angle","c","cos","sin","prototype","isVector2","Matrix3","arguments","error","n11","n12","n13","n21","n22","n23","n31","n32","n33","te","set","me","xAxis","yAxis","zAxis","setFromMatrix3Column","multiplyMatrices","ae","be","a11","a12","a13","a21","a22","a23","a31","a32","a33","b11","b12","b13","b21","b22","b23","b31","b32","b33","d","f","g","h","t11","t12","t13","det","detInv","tmp","matrix4","setFromMatrix4","invert","transpose","r","tx","ty","sx","sy","rotation","cx","cy","theta","matrix","fromArray","_canvas","isMatrix3","ImageUtils","image","test","src","HTMLCanvasElement","canvas","document","createElementNS","width","height","context","getContext","ImageData","putImageData","drawImage","toDataURL","textureId","Texture","DEFAULT_IMAGE","mapping","DEFAULT_MAPPING","wrapS","wrapT","magFilter","minFilter","format","anisotropy","encoding","super","Object","defineProperty","uuid","name","mipmaps","internalFormat","repeat","matrixAutoUpdate","generateMipmaps","premultiplyAlpha","flipY","unpackAlignment","version","onUpdate","setUvTransform","copy","source","meta","isRootObject","textures","output","metadata","generator","wrap","images","url","Array","isArray","isDataTexture","serializeImage","dispatchEvent","uv","applyMatrix3","HTMLImageElement","ImageBitmap","getDataURL","data","isTexture","Vector4","z","q","acos","m11","m12","m13","m21","m22","m23","m31","m32","m33","xx","yy","zz","xy","xz","yz","getZ","getW","isVector4","WebGLRenderTarget","options","depth","scissor","scissorTest","viewport","texture","depthBuffer","stencilBuffer","depthTexture","dispose","clone","isWebGLRenderTarget","count","il","isWebGLMultipleRenderTargets","WebGLMultisampleRenderTarget","samples","isWebGLMultisampleRenderTarget","Quaternion","_x","_y","_z","_w","qa","qb","qm","slerpQuaternions","dst","dstOffset","src0","srcOffset0","src1","srcOffset1","x0","y0","z0","w0","x1","y1","z1","w1","dir","sqrSin","Number","EPSILON","len","tDir","_onChangeCallback","quaternion","euler","update","isEuler","order","_order","c1","c2","c3","s1","s2","s3","axis","halfAngle","trace","vFrom","vTo","dot","step","angleTo","slerp","conjugate","p","multiplyQuaternions","qax","qay","qaz","qaw","qbx","qby","qbz","qbw","cosHalfTheta","sqrSinHalfTheta","sinHalfTheta","halfTheta","ratioA","ratioB","callback","isQuaternion","Vector3","multiplyVectors","applyQuaternion","_quaternion$4","setFromEuler","setFromAxisAngle","qx","qy","qz","qw","ix","iy","iz","iw","camera","applyMatrix4","matrixWorldInverse","projectionMatrix","projectionMatrixInverse","matrixWorld","crossVectors","ax","ay","az","bx","by","bz","denominator","lengthSq","planeNormal","_vector$c","projectOnVector","sub","normal","dz","setFromSphericalCoords","radius","phi","sinPhiRadius","setFromCylindricalCoords","setFromMatrixColumn","sz","isVector3","Box3","Infinity","minX","minY","minZ","maxX","maxY","maxZ","points","makeEmpty","expandByPoint","size","halfSize","_vector$b","add","object","expandByObject","box","isEmpty","point","vector","addScalar","updateWorldMatrix","geometry","boundingBox","computeBoundingBox","_box$3","union","children","sphere","clampPoint","plane","constant","triangle","getCenter","_center","_extents","_v0$2","_v1$7","_v2$3","_f0","_f1","_f2","axes","satForAxes","_triangleNormal","getSize","_points","setFromPoints","equals","isBox3","_testAxis","v0","extents","j","p0","p1","p2","_box$2","_v1$6","_toFarthestPoint","_toPoint","Sphere","optionalCenter","maxRadiusSq","distanceTo","radiusSum","intersectsSphere","distanceToPoint","deltaLengthSq","expandByScalar","getMaxScaleOnAxis","missingRadiusHalf","_vector$a","_segCenter","_segDir","_diff","_edge1","_edge2","_normal$1","Ray","origin","direction","ray","at","directionDistance","distanceSqToPoint","optionalPointOnRay","optionalPointOnSegment","segExtent","a01","b0","b1","s0","sqrDist","extDet","invDet","tca","radius2","thc","t0","t1","distanceToPlane","distToPoint","tmin","tmax","tymin","tymax","tzmin","tzmax","invdirx","invdiry","invdirz","intersectBox","backfaceCulling","sign","DdN","DdQxE2","DdE1xQ","cross","QdN","transformDirection","Matrix4","n14","n24","n34","n41","n42","n43","n44","scaleX","_v1$5","scaleY","scaleZ","af","bf","ce","cf","de","df","ac","ad","bc","bd","compose","_zero","_one","eye","up","a14","a24","a34","a41","a42","a43","a44","b14","b24","b34","b41","b42","b43","b44","t14","scaleXSq","scaleYSq","scaleZSq","yx","zx","zy","position","scale","x2","y2","z2","wx","wy","wz","determinant","_m1$2","invSX","invSY","invSZ","setFromRotationMatrix","left","right","top","bottom","near","far","isMatrix4","_matrix$1","_quaternion$3","Euler","DefaultOrder","asin","makeRotationFromQuaternion","newOrder","setFromQuaternion","optionalResult","RotationOrders","Layers","mask","channel","layers","_object3DId","_v1$4","_q1","_m1$1","_target","_position$3","_scale$2","_quaternion$2","_xAxis","_yAxis","_zAxis","_addedEvent","_removedEvent","Object3D","parent","DefaultUp","_onChange","defineProperties","configurable","enumerable","modelViewMatrix","normalMatrix","DefaultMatrixAutoUpdate","matrixWorldNeedsUpdate","visible","castShadow","receiveShadow","frustumCulled","renderOrder","animations","userData","updateMatrix","premultiply","decompose","multiply","rotateOnAxis","distance","translateOnAxis","setFromMatrixPosition","isCamera","isLight","lookAt","extractRotation","isObject3D","remove","id","getObjectByProperty","traverse","traverseVisible","traverseAncestors","force","updateMatrixWorld","updateParents","updateChildren","geometries","materials","shapes","skeletons","serialize","library","element","toJSON","JSON","stringify","toArray","isInstancedMesh","instanceMatrix","instanceColor","isScene","background","isColor","environment","isMesh","isLine","isPoints","parameters","shape","isSkinnedMesh","bindMode","bindMatrix","skeleton","material","uuids","animation","extractFromCache","cache","values","key","recursive","parse","child","_v0$1","_v1$3","_v2$2","_v3$1","_vab","_vac","_vbc","_vap","_vbp","_vcp","Triangle","targetLengthSq","dot00","dot01","dot02","dot11","dot12","denom","invDenom","u","getBarycoord","p3","uv1","uv2","uv3","addScaledVector","i0","i1","i2","getNormal","setFromCoplanarPoints","getUV","containsPoint","isFrontFacing","intersectsTriangle","d4","vc","d5","d6","vb","va","materialId","Material","fog","blending","side","vertexColors","opacity","transparent","blendSrc","blendDst","blendEquation","blendSrcAlpha","blendDstAlpha","blendEquationAlpha","depthFunc","depthTest","depthWrite","stencilWriteMask","stencilFunc","stencilRef","stencilFuncMask","stencilFail","stencilZFail","stencilZPass","stencilWrite","clippingPlanes","clipIntersection","clipShadows","shadowSide","colorWrite","precision","polygonOffset","polygonOffsetFactor","polygonOffsetUnits","dithering","alphaTest","alphaToCoverage","premultipliedAlpha","toneMapped","onBeforeCompile","newValue","flatShading","currentValue","isRoot","color","getHex","roughness","metalness","sheen","emissive","emissiveIntensity","specular","shininess","clearcoat","clearcoatRoughness","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","clearcoatNormalScale","map","matcap","alphaMap","lightMap","lightMapIntensity","aoMap","aoMapIntensity","bumpMap","bumpScale","normalMap","normalMapType","normalScale","displacementMap","displacementScale","displacementBias","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","combine","envMapIntensity","reflectivity","refractionRatio","gradientMap","transmission","transmissionMap","thickness","thicknessMap","attenuationDistance","attenuationColor","sizeAttenuation","linewidth","dashSize","gapSize","wireframe","wireframeLinewidth","wireframeLinecap","wireframeLinejoin","morphTargets","morphNormals","srcPlanes","dstPlanes","isMaterial","_colorKeywords","_hslA","_hslB","hue2rgb","SRGBToLinear","LinearToSRGB","Color","setRGB","setHex","setStyle","hex","style","handleAlpha","string","parseFloat","exec","components","parseInt","setHSL","charAt","setColorName","toLowerCase","gammaFactor","safeInverse","copyGammaToLinear","copyLinearToGamma","copySRGBToLinear","copyLinearToSRGB","hue","saturation","lightness","delta","getHSL","color1","color2","normalized","NAMES","MeshBasicMaterial","setValues","isMeshBasicMaterial","_vector$9","_vector2$1","BufferAttribute","itemSize","TypeError","usage","updateRange","index1","index2","colors","vectors","fromBufferAttribute","setXY","setXYZ","applyNormalMatrix","onUploadCallback","isBufferAttribute","Uint16BufferAttribute","Uint16Array","Uint32BufferAttribute","Uint32Array","isFloat16BufferAttribute","Float32BufferAttribute","Float32Array","arrayMax","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Float64Array","_id","_m1","_obj","_offset","_box$1","_boxMorphTargets","_vector$8","BufferGeometry","attributes","morphAttributes","morphTargetsRelative","groups","boundingSphere","drawRange","start","materialIndex","needsUpdate","getNormalMatrix","tangent","computeBoundingSphere","makeRotationX","makeRotationY","makeRotationZ","makeTranslation","makeScale","negate","translate","setAttribute","morphAttributesPosition","isGLBufferAttribute","setFromBufferAttribute","morphAttribute","isNaN","jl","indices","positions","normals","uvs","nVertices","tangents","tan1","tan2","vA","vB","vC","uvA","uvB","uvC","sdir","tdir","handleTriangle","isFinite","group","tmp2","n2","handleVertex","positionAttribute","getAttribute","normalAttribute","pA","pB","pC","nA","nB","nC","cb","ab","normalizeNormals","isBufferGeometry","attributeArray1","attribute2","attributeArray2","attributeOffset","convertBufferAttribute","array2","isInterleavedBufferAttribute","stride","geometry2","newAttribute","morphArray","addGroup","keys","hasMorphAttributes","attributeArray","setIndex","_inverseMatrix$2","_ray$2","_sphere$3","_vA$1","_vB$1","_vC$1","_tempA","_tempB","_tempC","_morphA","_morphB","_morphC","_uvA$1","_uvB$1","_uvC$1","_intersectionPoint","_intersectionPointWorld","Mesh","updateMorphTargets","morphTargetInfluences","morphTargetDictionary","assign","ml","String","raycaster","intersects","intersectsBox","intersection","morphPosition","groupMaterial","checkBufferGeometryIntersection","faceIndex","face","isGeometry","morphInfluences","influence","boneTransform","intersect","intersectTriangle","checkIntersection","BoxGeometry","widthSegments","heightSegments","depthSegments","scope","vertices","numberOfVertices","groupStart","buildPlane","udir","vdir","gridX","gridY","segmentWidth","segmentHeight","widthHalf","heightHalf","depthHalf","gridX1","gridY1","vertexCounter","groupCount","cloneUniforms","property","mergeUniforms","uniforms","merged","UniformsUtils","merge","ShaderMaterial","defines","vertexShader","fragmentShader","lights","clipping","extensions","derivatives","fragDepth","drawBuffers","shaderTextureLOD","defaultAttributeValues","index0AttributeName","uniformsNeedUpdate","glslVersion","isShaderMaterial","Camera","PerspectiveCamera","fov","aspect","zoom","focus","view","filmGauge","filmOffset","updateProjectionMatrix","focalLength","vExtentSlope","getFilmHeight","atan","tan","fullWidth","fullHeight","enabled","offsetX","offsetY","skew","getFilmWidth","makePerspective","isPerspectiveCamera","CubeCamera","renderTarget","isWebGLCubeRenderTarget","cameraPX","cameraNX","cameraPY","cameraNY","cameraPZ","cameraNZ","renderer","scene","currentXrEnabled","xr","currentRenderTarget","getRenderTarget","setRenderTarget","render","CubeTexture","_needsFlipEnvMap","isCubeTexture","WebGLCubeRenderTarget","dummy","isInteger","shader","tEquirect","mesh","currentMinFilter","stencil","clear","_vector1","_vector2","_normalMatrix","Plane","setFromNormalAndCoplanarPoint","inverseNormalLength","line","startSign","endSign","end","intersectsPlane","optionalNormalMatrix","referencePoint","coplanarPoint","isPlane","_sphere$2","_vector$7","Frustum","p4","p5","planes","frustum","me0","me1","me2","me3","me4","me5","me6","me7","me8","me9","me10","me11","me12","me13","me14","me15","setComponents","sprite","negRadius","WebGLAnimation","isAnimating","animationLoop","requestId","onAnimationFrame","time","frame","requestAnimationFrame","stop","cancelAnimationFrame","setAnimationLoop","setContext","WebGLAttributes","gl","capabilities","isWebGL2","buffers","WeakMap","get","deleteBuffer","buffer","delete","bufferType","cached","bytesPerElement","elementSize","createBuffer","bindBuffer","bufferData","BYTES_PER_ELEMENT","bufferSubData","subarray","updateBuffer","PlaneGeometry","width_half","height_half","segment_width","segment_height","ShaderChunk","alphamap_fragment","alphamap_pars_fragment","alphatest_fragment","aomap_fragment","aomap_pars_fragment","begin_vertex","beginnormal_vertex","bsdfs","bumpmap_pars_fragment","clipping_planes_fragment","clipping_planes_pars_fragment","clipping_planes_pars_vertex","clipping_planes_vertex","color_fragment","color_pars_fragment","color_pars_vertex","color_vertex","common","cube_uv_reflection_fragment","defaultnormal_vertex","displacementmap_pars_vertex","displacementmap_vertex","emissivemap_fragment","emissivemap_pars_fragment","encodings_fragment","encodings_pars_fragment","envmap_fragment","envmap_common_pars_fragment","envmap_pars_fragment","envmap_pars_vertex","envmap_physical_pars_fragment","envmap_vertex","fog_vertex","fog_pars_vertex","fog_fragment","fog_pars_fragment","gradientmap_pars_fragment","lightmap_fragment","lightmap_pars_fragment","lights_lambert_vertex","lights_pars_begin","lights_toon_fragment","lights_toon_pars_fragment","lights_phong_fragment","lights_phong_pars_fragment","lights_physical_fragment","lights_physical_pars_fragment","lights_fragment_begin","lights_fragment_maps","lights_fragment_end","logdepthbuf_fragment","logdepthbuf_pars_fragment","logdepthbuf_pars_vertex","logdepthbuf_vertex","map_fragment","map_pars_fragment","map_particle_fragment","map_particle_pars_fragment","metalnessmap_fragment","metalnessmap_pars_fragment","morphnormal_vertex","morphtarget_pars_vertex","morphtarget_vertex","normal_fragment_begin","normal_fragment_maps","normalmap_pars_fragment","clearcoat_normal_fragment_begin","clearcoat_normal_fragment_maps","clearcoat_pars_fragment","packing","premultiplied_alpha_fragment","project_vertex","dithering_fragment","dithering_pars_fragment","roughnessmap_fragment","roughnessmap_pars_fragment","shadowmap_pars_fragment","shadowmap_pars_vertex","shadowmap_vertex","shadowmask_pars_fragment","skinbase_vertex","skinning_pars_vertex","skinning_vertex","skinnormal_vertex","specularmap_fragment","specularmap_pars_fragment","tonemapping_fragment","tonemapping_pars_fragment","transmission_fragment","transmission_pars_fragment","uv_pars_fragment","uv_pars_vertex","uv_vertex","uv2_pars_fragment","uv2_pars_vertex","uv2_vertex","worldpos_vertex","background_frag","background_vert","cube_frag","cube_vert","depth_frag","depth_vert","distanceRGBA_frag","distanceRGBA_vert","equirect_frag","equirect_vert","linedashed_frag","linedashed_vert","meshbasic_frag","meshbasic_vert","meshlambert_frag","meshlambert_vert","meshmatcap_frag","meshmatcap_vert","meshtoon_frag","meshtoon_vert","meshphong_frag","meshphong_vert","meshphysical_frag","meshphysical_vert","normal_frag","normal_vert","points_frag","points_vert","shadow_frag","shadow_vert","sprite_frag","sprite_vert","UniformsLib","diffuse","uvTransform","uv2Transform","specularmap","envmap","flipEnvMap","maxMipLevel","aomap","lightmap","emissivemap","bumpmap","normalmap","displacementmap","roughnessmap","metalnessmap","gradientmap","fogDensity","fogNear","fogFar","fogColor","ambientLightColor","lightProbe","directionalLights","properties","directionalLightShadows","shadowBias","shadowNormalBias","shadowRadius","shadowMapSize","directionalShadowMap","directionalShadowMatrix","spotLights","coneCos","penumbraCos","decay","spotLightShadows","spotShadowMap","spotShadowMatrix","pointLights","pointLightShadows","shadowCameraNear","shadowCameraFar","pointShadowMap","pointShadowMatrix","hemisphereLights","skyColor","groundColor","rectAreaLights","ltc_1","ltc_2","ShaderLib","basic","lambert","phong","standard","toon","dashed","totalSize","t2D","cube","equirect","distanceRGBA","referencePosition","nearDistance","farDistance","shadow","WebGLBackground","cubemaps","state","objects","clearColor","planeMesh","boxMesh","clearAlpha","currentBackground","currentBackgroundVersion","currentTonemapping","setClear","getClearColor","setClearColor","getClearAlpha","setClearAlpha","renderList","forceClear","session","getSession","environmentBlendMode","autoClear","autoClearColor","autoClearDepth","autoClearStencil","deleteAttribute","onBeforeRender","copyPosition","toneMapping","unshift","WebGLBindingStates","maxVertexAttributes","getParameter","extension","vaoAvailable","bindingStates","defaultState","createBindingState","currentState","bindVertexArrayObject","vao","bindVertexArray","bindVertexArrayOES","deleteVertexArrayObject","deleteVertexArray","deleteVertexArrayOES","newAttributes","enabledAttributes","attributeDivisors","program","initAttributes","enableAttribute","enableAttributeAndDivisor","meshPerAttribute","enableVertexAttribArray","disableUnusedAttributes","disableVertexAttribArray","vertexAttribPointer","vertexAttribIPointer","reset","resetDefaultState","setup","updateBuffers","programMap","stateMap","createVertexArray","createVertexArrayOES","getBindingState","cachedAttributes","geometryAttributes","attributesNum","cachedAttribute","geometryAttribute","saveCache","isInstancedBufferGeometry","programAttributes","getAttributes","materialDefaultAttributeValues","programAttribute","isInstancedInterleavedBuffer","_maxInstanceCount","isInstancedBufferAttribute","vertexAttrib2fv","vertexAttrib3fv","vertexAttrib4fv","vertexAttrib1fv","setupVertexAttributes","geometryId","programId","releaseStatesOfGeometry","releaseStatesOfProgram","WebGLBufferRenderer","info","mode","setMode","drawArrays","renderInstances","primcount","methodName","WebGLCapabilities","maxAnisotropy","getMaxPrecision","getShaderPrecisionFormat","WebGL2RenderingContext","WebGL2ComputeRenderingContext","maxPrecision","has","logarithmicDepthBuffer","maxTextures","maxVertexTextures","maxTextureSize","maxCubemapSize","maxAttributes","maxVertexUniforms","maxVaryings","maxFragmentUniforms","vertexTextures","floatFragmentTextures","getMaxAnisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT","floatVertexTextures","maxSamples","WebGLClipping","globalState","numGlobalPlanes","localClippingEnabled","renderingShadows","viewNormalMatrix","uniform","resetGlobalState","numPlanes","numIntersection","projectPlanes","skipTransform","nPlanes","dstArray","flatSize","viewMatrix","i4","init","enableLocalClipping","beginShadows","endShadows","setState","useCache","materialProperties","nGlobal","lGlobal","clippingState","WebGLCubeMaps","mapTextureMapping","onTextureDispose","removeEventListener","cubemap","fromEquirectangularTexture","addEventListener","WebGLExtensions","getExtension","WebGLGeometries","wireframeAttributes","onGeometryDispose","memory","updateWireframeAttribute","geometryIndex","geometryPosition","previousAttribute","getWireframeAttribute","currentAttribute","WebGLIndexedBufferRenderer","drawElements","WebGLInfo","calls","triangles","lines","programs","autoReset","instanceCount","numericalSort","absNumericalSort","WebGLMorphtargets","influencesList","workInfluences","objectInfluences","influences","sort","MAX_SAFE_INTEGER","morphInfluencesSum","hasAttribute","morphBaseInfluence","getUniforms","setValue","WebGLObjects","updateMap","onInstancedMeshDispose","instancedMesh","buffergeometry","hasEventListener","physical","transmissionSamplerSize","transmissionSamplerMap","DataTexture2DArray","wrapR","isDataTexture2DArray","DataTexture3D","isDataTexture3D","emptyTexture","emptyTexture2dArray","emptyTexture3d","emptyCubeTexture","arrayCacheF32","arrayCacheI32","mat4array","mat3array","mat2array","flatten","nBlocks","blockSize","firstElem","arraysEqual","copyArray","allocTexUnits","allocateTextureUnit","setValueV1f","uniform1f","addr","setValueV2f","uniform2f","uniform2fv","setValueV3f","uniform3f","uniform3fv","setValueV4f","uniform4f","uniform4fv","setValueM2","uniformMatrix2fv","setValueM3","uniformMatrix3fv","setValueM4","uniformMatrix4fv","setValueV1i","uniform1i","setValueV2i","uniform2iv","setValueV3i","uniform3iv","setValueV4i","uniform4iv","setValueV1ui","uniform1ui","setValueV2ui","uniform2uiv","setValueV3ui","uniform3uiv","setValueV4ui","uniform4uiv","setValueT1","unit","safeSetTexture2D","setValueT3D1","setTexture3D","setValueT6","safeSetTextureCube","setValueT2DArray1","setTexture2DArray","setValueV1fArray","uniform1fv","setValueV2fArray","setValueV3fArray","setValueV4fArray","setValueM2Array","setValueM3Array","setValueM4Array","setValueV1iArray","uniform1iv","setValueV2iArray","setValueV3iArray","setValueV4iArray","setValueV1uiArray","uniform1uiv","setValueV2uiArray","setValueV3uiArray","setValueV4uiArray","setValueT1Array","units","setValueT6Array","SingleUniform","activeInfo","getSingularSetter","PureArrayUniform","getPureArraySetter","StructuredUniform","seq","updateCache","RePathPart","addUniform","container","uniformObject","parseUniform","path","pathLength","lastIndex","match","matchEnd","idIsIndex","subscript","next","WebGLUniforms","getProgramParameter","getActiveUniform","getUniformLocation","WebGLShader","createShader","shaderSource","compileShader","setOptional","upload","seqWithValue","programIdCount","getEncodingComponents","getShaderErrors","status","getShaderParameter","getShaderInfoLog","trim","split","join","addLineNumbers","getShaderSource","getTexelDecodingFunction","functionName","getTexelEncodingFunction","getToneMappingFunction","toneMappingName","filterEmptyLine","replaceLightNums","replace","numDirLights","numSpotLights","numRectAreaLights","numPointLights","numHemiLights","numDirLightShadows","numSpotLightShadows","numPointLightShadows","replaceClippingPlaneNums","numClippingPlanes","numClipIntersection","includePattern","resolveIncludes","includeReplacer","include","deprecatedUnrollLoopPattern","unrollLoopPattern","unrollLoops","loopReplacer","deprecatedLoopReplacer","snippet","generatePrecision","precisionstring","WebGLProgram","cacheKey","shadowMapTypeDefine","shadowMapType","generateShadowMapTypeDefine","envMapTypeDefine","envMapMode","generateEnvMapTypeDefine","envMapModeDefine","generateEnvMapModeDefine","envMapBlendingDefine","generateEnvMapBlendingDefine","gammaFactorDefine","customExtensions","extensionDerivatives","envMapCubeUV","tangentSpaceNormalMap","shaderID","extensionFragDepth","rendererExtensionFragDepth","extensionDrawBuffers","rendererExtensionDrawBuffers","extensionShaderTextureLOD","rendererExtensionShaderTextureLod","filter","generateExtensions","customDefines","chunks","generateDefines","createProgram","prefixVertex","prefixFragment","versionString","isRawShaderMaterial","shaderName","instancing","instancingColor","supportsVertexTextures","maxBones","useFog","fogExp2","objectSpaceNormalMap","vertexTangents","vertexAlphas","vertexUvs","uvsVertexOnly","skinning","useVertexTexture","doubleSided","flipSided","shadowMapEnabled","physicallyCorrectLights","mapEncoding","matcapEncoding","envMapEncoding","emissiveMapEncoding","lightMapEncoding","outputEncoding","depthPacking","fragmentGlsl","glVertexShader","glFragmentShader","attachShader","bindAttribLocation","linkProgram","debug","checkShaderErrors","programLog","getProgramInfoLog","vertexLog","fragmentLog","runnable","haveDiagnostics","vertexErrors","fragmentErrors","getError","diagnostics","prefix","cachedUniforms","deleteShader","getActiveAttrib","getAttribLocation","fetchAttributeLocations","destroy","deleteProgram","usedTimes","WebGLPrograms","shaderIDs","MeshDepthMaterial","MeshDistanceMaterial","MeshNormalMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial","MeshStandardMaterial","MeshPhysicalMaterial","MeshMatcapMaterial","LineBasicMaterial","LineDashedMaterial","PointsMaterial","ShadowMaterial","SpriteMaterial","parameterNames","getTextureEncodingFromMap","getParameters","shadows","isMeshStandardMaterial","bones","nVertexUniforms","nVertexMatrices","getMaxBones","isFogExp2","directional","spot","rectArea","hemi","shadowMap","customProgramCacheKey","getProgramCacheKey","acquireProgram","pl","preexistingProgram","releaseProgram","pop","WebGLProperties","painterSortStable","groupOrder","reversePainterSortStable","WebGLRenderList","renderItems","renderItemsIndex","opaque","transmissive","defaultProgram","getNextRenderItem","renderItem","finish","customOpaqueSort","customTransparentSort","WebGLRenderLists","lists","renderCallDepth","list","UniformsCache","light","halfWidth","halfHeight","nextVersion","shadowCastingLightsFirst","lightA","lightB","WebGLLights","shadowCache","ShadowUniformsCache","hash","directionalLength","pointLength","spotLength","rectAreaLength","hemiLength","numDirectionalShadows","numPointShadows","numSpotShadows","ambient","probe","directionalShadow","spotShadow","rectAreaLTC1","rectAreaLTC2","pointShadow","vector3","matrix42","intensity","isAmbientLight","isLightProbe","sh","coefficients","isDirectionalLight","shadowUniforms","bias","normalBias","mapSize","isSpotLight","penumbra","isRectAreaLight","isPointLight","isHemisphereLight","LTC_FLOAT_1","LTC_FLOAT_2","LTC_HALF_1","LTC_HALF_2","setupView","identity","WebGLRenderState","lightsArray","shadowsArray","setupLights","setupLightsView","pushLight","pushShadow","shadowLight","WebGLRenderStates","renderStates","renderState","isMeshDepthMaterial","isMeshDistanceMaterial","WebGLShadowMap","_renderer","_objects","_capabilities","_frustum","_shadowMapSize","_viewportSize","_viewport","_depthMaterials","_distanceMaterials","_materialCache","_maxTextureSize","0","1","2","shadowMaterialVertical","SAMPLE_RATE","HALF_SAMPLE_RATE","shadow_pass","resolution","shadowMaterialHorizontal","HORIZONTAL_PASS","fullScreenTri","fullScreenMesh","VSMPass","mapPass","renderBufferDirect","getDepthMaterialVariant","useMorphing","getDistanceMaterialVariant","getDepthMaterial","result","getMaterialVariant","customMaterial","customDepthMaterial","customDistanceMaterial","keyA","keyB","materialsForVariant","cachedMaterial","renderObject","shadowCamera","intersectsObject","k","kl","depthMaterial","autoUpdate","activeCubeFace","getActiveCubeFace","activeMipmapLevel","getActiveMipmapLevel","_state","setBlending","setTest","setScissorTest","shadowFrameExtents","getFrameExtents","isPointLightShadow","pars","viewportCount","getViewportCount","vp","getViewport","updateMatrices","getFrustum","WebGLState","colorBuffer","locked","currentColorMask","currentColorClear","setMask","colorMask","setLocked","lock","currentDepthMask","currentDepthFunc","currentDepthClear","enable","disable","depthMask","setFunc","clearDepth","currentStencilMask","currentStencilFunc","currentStencilRef","currentStencilFuncMask","currentStencilFail","currentStencilZFail","currentStencilZPass","currentStencilClear","stencilTest","stencilMask","setOp","stencilOp","clearStencil","enabledCapabilities","xrFramebuffer","currentBoundFramebuffers","currentProgram","currentBlendingEnabled","currentBlending","currentBlendEquation","currentBlendSrc","currentBlendDst","currentBlendEquationAlpha","currentBlendSrcAlpha","currentBlendDstAlpha","currentPremultipledAlpha","currentFlipSided","currentCullFace","currentLineWidth","currentPolygonOffsetFactor","currentPolygonOffsetUnits","lineWidthAvailable","glVersion","currentTextureSlot","currentBoundTextures","scissorParam","viewportParam","currentScissor","currentViewport","createTexture","bindTexture","texParameteri","texImage2D","emptyTextures","setFlipSided","setCullFace","equationToGL","MIN_EXT","MAX_EXT","factorToGL","blendEquationSeparate","blendFuncSeparate","blendFunc","frontFace","cullFace","setPolygonOffset","factor","activeTexture","webglSlot","bindFramebuffer","framebuffer","bindXRFramebuffer","useProgram","setMaterial","frontFaceCW","setLineWidth","lineWidth","webglType","webglTexture","boundTexture","unbindTexture","compressedTexImage2D","apply","texImage3D","WebGLTextures","_gl","utils","_videoTextures","useOffscreenCanvas","OffscreenCanvas","err","createCanvas","resizeImage","needsPowerOfTwo","needsNewCanvas","maxSize","isPowerOfTwo$1","textureNeedsGenerateMipmaps","supportsMips","generateMipmap","__maxMipLevel","log2","getInternalFormat","internalFormatName","glFormat","glType","filterFallback","textureProperties","__webglInit","deleteTexture","__webglTexture","deallocateTexture","isVideoTexture","onRenderTargetDispose","renderTargetProperties","deleteFramebuffer","__webglFramebuffer","__webglDepthbuffer","deleteRenderbuffer","__webglMultisampledFramebuffer","__webglColorRenderbuffer","__webglDepthRenderbuffer","attachmentProperties","deallocateRenderTarget","textureUnits","setTexture2D","slot","updateVideoTexture","__version","complete","uploadTexture","setTextureCube","initTexture","pixelStorei","isCompressed","isCompressedTexture","cubeImage","convert","glInternalFormat","setTextureParameters","mipmap","mipmapImage","uploadCubeTexture","wrappingToGL","filterToGL","textureType","__currentAnisotropy","texParameterf","TEXTURE_MAX_ANISOTROPY_EXT","textureNeedsPowerOfTwo","isDepthTexture","setupFrameBufferTexture","attachment","textureTarget","framebufferTexture2D","setupRenderBufferStorage","renderbuffer","isMultisample","bindRenderbuffer","getRenderTargetSamples","renderbufferStorageMultisample","renderbufferStorage","framebufferRenderbuffer","setupDepthRenderbuffer","isCube","webglDepthTexture","setupDepthTexture","createRenderbuffer","warnedTexture2D","warnedTextureCube","textureUnit","resetTextureUnits","setupRenderTarget","isMultipleRenderTargets","isRenderTarget3D","createFramebuffer","glTextureType","updateRenderTargetMipmap","updateMultisampleRenderTarget","blitFramebuffer","WebGLUtils","HALF_FLOAT_OES","COMPRESSED_RGB_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT3_EXT","COMPRESSED_RGBA_S3TC_DXT5_EXT","COMPRESSED_RGB_PVRTC_4BPPV1_IMG","COMPRESSED_RGB_PVRTC_2BPPV1_IMG","COMPRESSED_RGBA_PVRTC_4BPPV1_IMG","COMPRESSED_RGBA_PVRTC_2BPPV1_IMG","COMPRESSED_RGB_ETC1_WEBGL","COMPRESSED_RGB8_ETC2","COMPRESSED_RGBA8_ETC2_EAC","UNSIGNED_INT_24_8_WEBGL","ArrayCamera","cameras","isArrayCamera","Group","isGroup","_moveEvent","WebXRController","_targetRay","_grip","_hand","joints","inputState","pinching","hasLinearVelocity","linearVelocity","hasAngularVelocity","angularVelocity","inputSource","referenceSpace","inputPose","gripPose","handPose","targetRay","grip","hand","visibilityState","getPose","targetRaySpace","transform","inputjoint","jointPose","getJointPose","jointName","joint","jointRadius","indexTip","thumbTip","distanceToPinch","threshold","handedness","gripSpace","WebXRManager","framebufferScaleFactor","referenceSpaceType","pose","glBinding","glFramebuffer","glProjLayer","controllers","inputSourcesMap","Map","cameraL","cameraR","cameraVR","_currentDepthNear","_currentDepthFar","onSessionEvent","controller","onSessionEnd","forEach","disconnect","isPresenting","onInputSourcesChange","inputSources","removed","added","cameraAutoUpdate","getController","getTargetRaySpace","getControllerGrip","getGripSpace","getHand","getHandSpace","setFramebufferScaleFactor","setReferenceSpaceType","getReferenceSpace","setSession","async","getContextAttributes","xrCompatible","makeXRCompatible","layerInit","antialias","baseLayer","XRWebGLLayer","updateRenderState","depthFormat","projectionlayerInit","colorFormat","scaleFactor","XRWebGLBinding","createProjectionLayer","requestReferenceSpace","cameraLPos","cameraRPos","updateCamera","depthNear","depthFar","ipd","projL","projR","topFov","bottomFov","leftFov","rightFov","zOffset","xOffset","translateX","translateZ","near2","far2","left2","right2","top2","bottom2","setProjectionFromUnion","getCamera","onAnimationFrameCallback","getViewerPose","views","cameraVRNeedsUpdate","glSubImage","getViewSubImage","colorTexture","depthStencilTexture","WebGLMaterials","refreshUniformsCommon","uvScaleMap","uv2ScaleMap","refreshUniformsStandard","refreshFogUniforms","isFog","density","refreshMaterialUniforms","pixelRatio","transmissionRenderTarget","isMeshLambertMaterial","refreshUniformsLambert","isMeshToonMaterial","refreshUniformsToon","isMeshPhongMaterial","refreshUniformsPhong","isMeshPhysicalMaterial","refreshUniformsPhysical","isMeshMatcapMaterial","refreshUniformsMatcap","refreshUniformsDepth","refreshUniformsDistance","isMeshNormalMaterial","refreshUniformsNormal","isLineBasicMaterial","refreshUniformsLine","isLineDashedMaterial","refreshUniformsDash","isPointsMaterial","refreshUniformsPoints","isSpriteMaterial","refreshUniformsSprites","isShadowMaterial","WebGLRenderer","display","createCanvasElement","_context","_alpha","_depth","_stencil","_antialias","_premultipliedAlpha","_preserveDrawingBuffer","preserveDrawingBuffer","_powerPreference","powerPreference","_failIfMajorPerformanceCaveat","failIfMajorPerformanceCaveat","currentRenderList","currentRenderState","renderListStack","renderStateStack","domElement","sortObjects","toneMappingExposure","_this","_isContextLost","_currentActiveCubeFace","_currentActiveMipmapLevel","_currentRenderTarget","_currentMaterialId","_currentCamera","_currentViewport","_currentScissor","_currentScissorTest","_width","_height","_pixelRatio","_opaqueSort","_transparentSort","_scissor","_scissorTest","_currentDrawBuffers","_clippingEnabled","_localClippingEnabled","_transmissionRenderTarget","_projScreenMatrix","_vector3","_emptyScene","overrideMaterial","getTargetPixelRatio","programCache","renderLists","morphtargets","bufferRenderer","indexedBufferRenderer","contextNames","contextAttributes","contextName","onContextLost","onContextRestore","isWebGL1Renderer","shift","message","initGLContext","preventDefault","infoAutoReset","shadowMapAutoUpdate","shadowMapNeedsUpdate","onMaterialDispose","releaseMaterialProgramReferences","deallocateMaterial","forceContextLoss","loseContext","forceContextRestore","restoreContext","getPixelRatio","setPixelRatio","setSize","updateStyle","setViewport","getDrawingBufferSize","setDrawingBufferSize","getCurrentViewport","getScissor","setScissor","getScissorTest","boolean","setOpaqueSort","method","setTransparentSort","bits","onXRSessionStart","onXRSessionEnd","renderBufferImmediate","hasPositions","hasNormals","hasUvs","hasColors","positionArray","normalArray","uvArray","colorArray","setProgram","rangeFactor","dataCount","rangeStart","rangeCount","drawStart","drawEnd","drawCount","isLineSegments","isLineLoop","isSprite","compile","getProgram","renderObjects","camera2","isImmediateRenderObject","renderObjectImmediate","onAfterRender","lightsStateVersion","programCacheKey","updateCommonMaterialProperties","onBuild","needsLights","materialNeedsLights","progUniforms","uniformsList","needsProgramChange","refreshProgram","refreshMaterial","refreshLights","p_uniforms","m_uniforms","uCamPos","cameraPosition","isOrthographicCamera","boneTexture","computeBoneTexture","boneTextureSize","markUniformsLightsNeedsUpdate","window","setFromProjectionMatrix","projectObject","isLOD","intersectsSprite","opaqueObjects","transmissiveObjects","transparentObjects","needsAntialias","currentToneMapping","renderTransmissiveObjects","drawBuffersWEBGL","layer","framebufferTextureLayer","readRenderTargetPixels","activeCubeFaceIndex","textureFormat","halfFloatSupportedByExt","checkFramebufferStatus","readPixels","copyFramebufferToTexture","level","levelScale","copyTexImage2D","copyTextureToTexture","srcTexture","dstTexture","texSubImage2D","compressedTexSubImage2D","copyTextureToTexture3D","sourceBox","glTarget","unpackRowLen","unpackImageHeight","unpackSkipPixels","unpackSkipRows","unpackSkipImages","texSubImage3D","compressedTexSubImage3D","resetState","__THREE_DEVTOOLS__","CustomEvent","detail","FogExp2","Fog","Scene","InterleavedBuffer","arrayBuffers","_uuid","ib","setUsage","isInterleavedBuffer","_vector$6","InterleavedBufferAttribute","interleavedBuffer","interleavedBuffers","_geometry","_intersectPoint","_worldScale","_mvPosition","_alignedPosition","_rotatedPosition","_viewWorldMatrix","_vA","_vB","_vC","_uvA","_uvB","_uvC","Sprite","float32Array","setFromMatrixScale","transformVertex","vertexPosition","mvPosition","_basePosition","_skinIndex","_skinWeight","_vector$5","_matrix","SkinnedMesh","bindMatrixInverse","calculateInverses","skinWeight","manhattanLength","setXYZW","skinIndex","weight","getComponent","boneIndex","boneInverses","Bone","isBone","DataTexture","_instanceLocalMatrix","_instanceWorldMatrix","_instanceIntersects","_mesh","InstancedMesh","raycastTimes","instanceId","getMatrixAt","raycast","linecap","linejoin","_start$1","_end$1","_inverseMatrix$1","_ray$1","_sphere$1","Line","lineDistances","params","localThreshold","localThresholdSq","vStart","vEnd","interSegment","interRay","distanceSqToSegment","_start","_end","LineSegments","LineLoop","_inverseMatrix","_ray","_sphere","_position$2","Points","testPoint","rayPointDistanceSq","intersectPoint","closestPointToPoint","distanceToRay","video","requestVideoFrameCallback","updateVideo","readyState","HAVE_CURRENT_DATA","CompressedTexture","isCanvasTexture","CylinderGeometry","radiusTop","radiusBottom","radialSegments","openEnded","thetaStart","thetaLength","indexArray","generateCap","centerIndexStart","vertex","centerIndexEnd","cosTheta","sinTheta","slope","indexRow","generateTorso","ConeGeometry","Curve","arcLengthDivisions","optionalTarget","getUtoTmapping","getPoint","divisions","getPointAt","lengths","getLengths","cacheArcLengths","current","last","sum","arcLengths","targetArcLength","comparison","low","high","lengthBefore","t2","pt1","pt2","getTangent","segments","closed","binormals","vec","mat","getTangentAt","MAX_VALUE","tz","makeRotationAxis","json","EllipseCurve","aX","aY","xRadius","yRadius","aStartAngle","aEndAngle","aClockwise","aRotation","twoPi","deltaAngle","samePoints","fromJSON","isEllipseCurve","ArcCurve","aRadius","CubicPoly","c0","initCatmullRom","x3","tension","initNonuniformCatmullRom","dt0","dt1","dt2","calc","isArcCurve","px","py","pz","CatmullRomCurve3","curveType","intPoint","CatmullRom","QuadraticBezier","QuadraticBezierP0","QuadraticBezierP1","QuadraticBezierP2","CubicBezier","CubicBezierP0","CubicBezierP1","CubicBezierP2","CubicBezierP3","isCatmullRomCurve3","CubicBezierCurve","v3","isCubicBezierCurve","CubicBezierCurve3","isCubicBezierCurve3","LineCurve","isLineCurve","QuadraticBezierCurve","isQuadraticBezierCurve","QuadraticBezierCurve3","isQuadraticBezierCurve3","SplineCurve","isSplineCurve","Curves","freeze","__proto__","LineCurve3","isLineCurve3","Earcut","holeIndices","dim","hasHoles","outerLen","outerNode","linkedList","prev","invSize","queue","steiner","getLeftmost","compareX","eliminateHole","filterPoints","eliminateHoles","earcutLinked","clockwise","signedArea","insertNode","removeNode","again","area","ear","pass","zOrder","prevZ","nextZ","tail","numMerges","pSize","qSize","inSize","sortLinked","indexCurve","isEarHashed","isEar","cureLocalIntersections","splitEarcut","pointInTriangle","minTX","minTY","maxTX","maxTY","locallyInside","isValidDiagonal","splitPolygon","hole","hx","hy","mx","my","tanMin","sectorContainsSector","findHoleBridge","leftmost","intersectsPolygon","inside","middleInside","q1","q2","o1","o2","o3","o4","onSegment","num","a2","Node","b2","an","bp","ShapeUtils","contour","pts","holes","faces","removeDupEndPts","addContour","holeIndex","ExtrudeGeometry","verticesArray","addShape","placeholder","curveSegments","steps","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","extrudePath","uvgen","UVGenerator","WorldUVGenerator","amount","extrudePts","splineTube","binormal","position2","extrudeByPath","getSpacedPoints","computeFrenetFrames","shapePoints","extractPoints","isClockWise","reverse","hl","ahole","triangulateShape","concat","scalePt2","pt","vlen","flen","getBevelVec","inPt","inPrev","inNext","v_trans_x","v_trans_y","shrink_by","v_prev_x","v_prev_y","v_next_x","v_next_y","v_prev_lensq","collinear0","v_prev_len","v_next_len","ptPrevShift_x","ptPrevShift_y","sf","v_trans_lensq","direction_eq","contourMovements","holesMovements","oneHoleMovements","verticesMovements","bs","vert","sidewalls","layeroffset","sl","slen1","slen2","f4","f3","addVertex","nextIndex","generateTopUV","addUV","generateSideWallUV","vector2","buildLidFaces","buildSideFaces","computeVertexNormals","toJSON$1","geometryShapes","indexA","indexB","indexC","a_x","a_y","b_x","b_y","c_x","c_y","indexD","a_z","b_z","c_z","d_x","d_y","d_z","ShapeGeometry","indexOffset","shapeVertices","shapeHoles","shapeHole","SphereGeometry","phiStart","phiLength","thetaEnd","grid","verticesRow","uOffset","TubeGeometry","tubularSegments","frames","P","generateSegment","N","B","generateUVs","generateIndices","generateBufferData","RawShaderMaterial","ior","AnimationUtils","arraySlice","from","to","isTypedArray","convertArray","forceClone","ArrayBuffer","isView","DataView","getKeyframeOrder","times","sortedArray","nValues","srcOffset","flattenJSON","jsonKeys","valuePropertyName","subclip","sourceClip","startFrame","endFrame","fps","clip","tracks","track","valueSize","getValueSize","minStartTime","resetDuration","makeClipAdditive","targetClip","referenceFrame","referenceClip","numTracks","referenceTime","referenceTrack","referenceTrackType","ValueTypeName","targetTrack","find","referenceOffset","referenceValueSize","createInterpolant","isInterpolantFactoryMethodGLTFCubicSpline","targetOffset","targetValueSize","referenceValue","startIndex","endIndex","interpolant","evaluate","resultBuffer","numTimes","valueStart","multiplyQuaternionsFlat","valueEnd","blendMode","Interpolant","parameterPositions","sampleValues","sampleSize","_cachedIndex","settings","DefaultSettings_","pp","validate_interval","seek","linear_scan","forward_scan","giveUpAt","afterEnd_","t1global","beforeStart_","mid","intervalChanged_","interpolate_","copySampleValue_","CubicInterpolant","_weightPrev","_offsetPrev","_weightNext","_offsetNext","endingStart","endingEnd","iPrev","iNext","tPrev","tNext","getSettings_","halfDt","o0","oP","oN","wP","wN","ppp","sP","sN","LinearInterpolant","offset1","offset0","weight1","weight0","DiscreteInterpolant","KeyframeTrack","interpolation","TimeBufferType","ValueBufferType","setInterpolation","DefaultInterpolation","trackType","getInterpolation","factoryMethod","InterpolantFactoryMethodDiscrete","InterpolantFactoryMethodLinear","InterpolantFactoryMethodSmooth","timeOffset","timeScale","startTime","endTime","nKeys","valid","prevTime","currTime","smoothInterpolation","writeIndex","keep","offsetP","offsetN","readOffset","writeOffset","TypedKeyframeTrack","BooleanKeyframeTrack","ColorKeyframeTrack","NumberKeyframeTrack","QuaternionLinearInterpolant","slerpFlat","QuaternionKeyframeTrack","StringKeyframeTrack","VectorKeyframeTrack","AnimationClip","duration","jsonTracks","frameTime","parseKeyframeTrack","clipTracks","morphTargetSequence","noLoop","numMorphTargets","objectOrClipArray","clipArray","o","animationToMorphTargets","pattern","morphTarget","parts","animationMorphTargets","clips","CreateFromMorphTargetSequence","addNonemptyTrack","trackName","animationKeys","propertyName","destTracks","clipName","hierarchyTracks","hierarchy","morphTargetNames","morphTargetName","animationKey","boneName","validate","optimize","typeName","getTrackTypeForValueTypeName","Cache","files","file","LoadingManager","onLoad","onProgress","onError","isLoading","itemsLoaded","itemsTotal","urlModifier","handlers","onStart","itemStart","itemEnd","itemError","resolveURL","setURLModifier","addHandler","regex","loader","removeHandler","getHandler","global","DefaultLoadingManager","Loader","manager","crossOrigin","withCredentials","resourcePath","requestHeader","Promise","resolve","reject","load","loading","FileLoader","setTimeout","dataUriRegexResult","request","mimeType","isBase64","decodeURIComponent","atob","response","responseType","charCodeAt","Blob","parser","DOMParser","parseFromString","XMLHttpRequest","open","callbacks","overrideMimeType","header","setRequestHeader","send","ImageLoader","onImageLoad","onImageError","substr","CubeTextureLoader","urls","setCrossOrigin","setPath","loaded","loadTexture","TextureLoader","isJPEG","search","CurvePath","curves","autoClose","curve","startPoint","endPoint","getLength","curveLengths","getCurveLengths","diff","segmentLength","lens","cacheLengths","sums","getPoints","Path","currentPoint","moveTo","lineTo","aCPx","aCPy","aCP1x","aCP1y","aCP2x","aCP2y","npts","absarc","absellipse","firstPoint","lastPoint","Shape","holesPts","getPointsHoles","Light","HemisphereLight","_projScreenMatrix$1","_lightPositionWorld$1","_lookTarget$1","LightShadow","_frameExtents","_viewportCount","_viewports","shadowMatrix","viewportIndex","SpotLightShadow","isSpotLightShadow","SpotLight","power","_lightPositionWorld","_lookTarget","PointLightShadow","_cubeDirections","_cubeUps","PointLight","OrthographicCamera","scaleW","scaleH","makeOrthographic","DirectionalLightShadow","isDirectionalLightShadow","DirectionalLight","AmbientLight","RectAreaLight","SphericalHarmonics3","coeff","shBasis","isSphericalHarmonics3","LightProbe","LoaderUtils","TextDecoder","decode","fromCharCode","escape","lastIndexOf","InstancedBufferGeometry","InstancedBufferAttribute","createImageBitmap","fetch","fetchOptions","credentials","headers","then","res","blob","colorSpaceConversion","imageBitmap","catch","isImageBitmapLoader","ShapePath","subPaths","currentPath","quadraticCurveTo","bezierCurveTo","splineThru","isCCW","noHoles","toShapesNoHoles","inSubpaths","tmpPath","tmpShape","isPointInsidePolygon","inPolygon","polyLen","edgeLowPt","edgeHighPt","edgeDx","edgeDy","perpEdge","solid","holesFirst","betterShapeHoles","newShapes","tmpPoints","tmpHoles","newShapeHoles","mainIdx","ambiguous","toChange","sIdx","sLen","sho","hIdx","ho","hole_unassigned","s2Idx","froms","tos","Font","text","paths","chars","line_height","yMax","yMin","underlineThickness","char","ret","createPath","createPaths","toShapes","glyph","glyphs","familyName","cpx","cpy","cpx1","cpy1","cpx2","cpy2","outline","_cachedOutline","ha","isFont","AudioContext","webkitAudioContext","AudioLoader","setResponseType","setWithCredentials","bufferCopy","decodeAudioData","audioBuffer","sky","ground","isHemisphereLightProbe","isAmbientLightProbe","Clock","autoStart","oldTime","elapsedTime","running","now","getElapsedTime","getDelta","newTime","performance","Date","Audio","gain","createGain","connect","getInput","autoplay","detune","loop","loopStart","loopEnd","playbackRate","isPlaying","hasPlaybackControl","sourceType","_startedAt","_progress","_connected","filters","audioNode","mediaElement","createMediaElementSource","mediaStream","createMediaStreamSource","play","delay","currentTime","createBufferSource","onended","onEnded","bind","setDetune","setPlaybackRate","getOutput","setTargetAtTime","getFilters","setFilters","PropertyMixer","binding","mixFunction","mixFunctionAdditive","setIdentity","_slerp","_slerpAdditive","_setAdditiveIdentityQuaternion","_workIndex","_select","_setAdditiveIdentityOther","_lerp","_lerpAdditive","_setAdditiveIdentityNumeric","_mixBufferRegion","_mixBufferRegionAdditive","_setIdentity","_origIndex","_addIndex","cumulativeWeight","cumulativeWeightAdditive","useCount","referenceCount","accuIndex","currentWeight","mix","weightAdditive","originalValueOffset","getValue","targetIndex","workOffset","_reservedRe","RegExp","_wordCharOrDot","_directoryRe","_nodeRe","_objectRe","_propertyRe","_trackRe","_supportedObjectNames","PropertyBinding","rootNode","parsedPath","parseTrackName","node","findNode","nodeName","_getValue_unbound","_setValue_unbound","root","isAnimationObjectGroup","Composite","matches","results","objectName","objectIndex","propertyIndex","lastDot","substring","bone","getBoneByName","searchNodeSubtree","childNode","subTreeNode","resolvedProperty","targetObject","dest","targetArray","sourceArray","_getValue_unavailable","_setValue_unavailable","nodeProperty","versioning","Versioning","None","NeedsUpdate","MatrixWorldNeedsUpdate","bindingType","BindingType","Direct","ArrayElement","HasFromToArray","EntireArray","GetterByBindingType","SetterByBindingTypeAndVersioning","targetGroup","optionalParsedPath","_targetGroup","_bindings","subscribe_","firstValidIndex","nCachedObjects_","bindings","unbind","_getValue_direct","_getValue_array","_getValue_arrayElement","_getValue_toArray","_setValue_direct","_setValue_direct_setNeedsUpdate","_setValue_direct_setMatrixWorldNeedsUpdate","_setValue_array","_setValue_array_setNeedsUpdate","_setValue_array_setMatrixWorldNeedsUpdate","_setValue_arrayElement","_setValue_arrayElement_setNeedsUpdate","_setValue_arrayElement_setMatrixWorldNeedsUpdate","_setValue_fromArray","_setValue_fromArray_setNeedsUpdate","_setValue_fromArray_setMatrixWorldNeedsUpdate","_indicesByUUID","_paths","_parsedPaths","_bindingsIndicesByPath","stats","total","indicesByUUID","parsedPaths","nBindings","knownObject","nObjects","nCachedObjects","firstActiveIndex","lastCachedObject","bindingsForPath","lastCached","lastCachedIndex","firstActiveObject","firstActive","lastObject","indicesByPath","lastBindingsIndex","lastBindings","AnimationAction","mixer","localRoot","_mixer","_clip","_localRoot","nTracks","interpolants","interpolantSettings","_interpolantSettings","_interpolants","_propertyBindings","_cacheIndex","_byClipCacheIndex","_timeScaleInterpolant","_weightInterpolant","_loopCount","_startTime","_effectiveTimeScale","_effectiveWeight","repetitions","paused","clampWhenFinished","zeroSlopeAtStart","zeroSlopeAtEnd","_activateAction","_deactivateAction","stopFading","stopWarping","_isActiveAction","_scheduleFading","fadeOutAction","warp","fadeOut","fadeIn","fadeInDuration","fadeOutDuration","startEndRatio","endStartRatio","fadeInAction","crossFadeFrom","weightInterpolant","_takeBackControlInterpolant","action","startTimeScale","endTimeScale","_lendControlInterpolant","timeScaleInterpolant","_root","deltaTime","timeDirection","_updateWeight","timeRunning","_updateTimeScale","clipTime","_updateTime","propertyMixers","accumulateAdditive","accumulate","interpolantValue","loopCount","pingPong","_setEndings","handle_stop","loopDelta","pending","atStart","atEnd","weightNow","weightThen","_initMemoryManager","_accuIndex","prototypeAction","rootUuid","bindingsByRoot","_bindingsByRootAndName","bindingsByName","_addInactiveBinding","create","clipUuid","actionsForClip","_actionsByClip","_bindAction","knownActions","_addInactiveAction","_lendBinding","saveOriginalState","_lendAction","restoreOriginalState","_takeBackBinding","_takeBackAction","_actions","_nActiveActions","_nActiveBindings","_controlInterpolants","_nActiveControlInterpolants","actions","controlInterpolants","actionsByClip","actionByRoot","lastInactiveAction","cacheIndex","knownActionsForClip","lastKnownAction","byClipCacheIndex","_removeInactiveBindingsForAction","_removeInactiveBinding","prevIndex","lastActiveIndex","firstInactiveAction","firstInactiveIndex","lastActiveAction","bindingByName","propBinding","lastInactiveBinding","firstInactiveBinding","lastActiveBinding","_controlInterpolantsResultBuffer","__cacheIndex","lastActiveInterpolant","optionalRoot","clipObject","findByName","existingAction","newAction","nActions","_update","timeInSeconds","actionsToRemove","_removeInactiveAction","Uniform","Raycaster","LOD","coords","unproject","intersectObject","ascSort","Spherical","other","setFromCartesianCoords","_vector$4","Box2","isBox2","_startP","_startEnd","_vector$2","_boneMatrix","_matrixWorldInv","_floatView","EXTRA_LOD_SIGMA","TOTAL_LODS","LOD_MAX","backgroundMaterial","_lodPlanes","_sizeLods","_sigmas","_createPlanes","lod","sizeLod","sigma","texelSize","cubeFaces","positionSize","uvSize","faceIndexSize","coordinates","fill","construct","fromPoints","setColors","getBoneList","boneList","isSkeletonHelper","extractUrlBase","Handlers","empty","isIntersectionBox","isIntersectionSphere","setFromMatrix","clampToLine","startEnd2","closestPointToPointParameter","flattenToArrayOffset","multiplyVector3","multiplyVector3Array","applyToBufferAttribute","applyToVector3Array","getInverse","extractPosition","getPosition","setRotationFromQuaternion","multiplyToArray","multiplyVector4","rotateAxis","crossVector","rotateX","rotateY","rotateZ","rotateByAxis","makeFrustum","isIntersectionLine","intersectsLine","inverse","isIntersectionPlane","getArea","barycoordFromPoint","midpoint","getMidpoint","prototypenormal","getPlane","extractAllPoints","extrude","makeGeometry","fromAttribute","distanceToManhattan","manhattanDistanceTo","lengthManhattan","setEulerFromRotationMatrix","setEulerFromQuaternion","getPositionFromMatrix","getScaleFromMatrix","getColumnFromMatrix","applyProjection","getChildByName","getObjectByName","renderDepth","getWorldRotation","applyMatrix","eulerOrder","useQuaternion","setDrawMode","drawMode","initBones","setLens","setFocalLength","onlyShadow","shadowCameraFov","shadowCameraLeft","shadowCameraRight","shadowCameraTop","shadowCameraBottom","shadowCameraVisible","shadowDarkness","shadowMapWidth","shadowMapHeight","dynamic","setDynamic","copyIndicesArray","setArray","addIndex","addAttribute","addDrawCall","clearDrawCalls","clearGroups","computeOffsets","removeAttribute","drawcalls","offsets","getArrays","addShapeList","wrapAround","overdraw","wrapRGB","shading","clearTarget","animate","getCurrentRenderTarget","getPrecision","resetGLState","supportsFloatTextures","supportsHalfFloatTextures","supportsStandardDerivatives","supportsCompressedTextureS3TC","supportsCompressedTexturePVRTC","supportsBlendMinMax","supportsInstancedArrays","enableScissorTest","initMaterial","addPrePlugin","addPostPlugin","updateShadowMap","setFaceCulling","allocTextureUnit","setTexture","getActiveMipMapLevel","shadowMapCullFace","vr","gammaInput","gammaOutput","toneMappingWhitePoint","renderReverseSided","renderSingleSided","setBuffer","audio","fftSize","analyser","createAnalyser","frequencyBinCount","getByteFrequencyData","getFrequencyData","getData","updateCubeMap","loadTextureCube","loadCompressedTexture","loadCompressedTextureCube","revision","__THREE__","ownKeys","enumerableOnly","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","_objectSpread","_defineProperty","getOwnPropertyDescriptors","obj","writable","forwardPropsList","forwardedProps","href","lang","onScroll","onWheel","pointerEvents","View","React","props","forwardedRef","hrefAttrs","onLayout","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStartShouldSetResponder","onStartShouldSetResponderCapture","hasTextAncestor","TextAncestorContext","hostRef","useElementLayout","useResponderEvents","StyleSheet","styles","inline","supportedProps","pick","pickProps","classList","download","rel","platformMethodsRef","usePlatformMethods","setRef","useMergeRefs","ref","createElement","displayName","css","alignItems","border","boxSizing","flexBasis","flexDirection","flexShrink","margin","minHeight","minWidth","padding","zIndex","validateFormat","condition","_len","args","_key","argIndex","framesToPop","absoluteFillObject","absoluteFill","ReactNativePropRegistry","register","style1","style2","flattenStyle","hairlineWidth","canUseDOM","__REACT_DEVTOOLS_GLOBAL_HOOK__","resolveRNStyle","__esModule","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","arr","Platform","OS","select","web","default","die","mockGlobal","getGlobal","globalThis","self","getDescriptor","objectPrototype","EMPTY_ARRAY","EMPTY_OBJECT","hasProxy","Proxy","plainObjectString","assertProxies","once","func","invoked","noop","isFunction","fn","isStringish","isObject","isPlainObject","_proto$constructor","proto","getPrototypeOf","addHiddenProp","propName","addHiddenFinalProp","createInstanceofPredicate","theClass","isES6Map","thing","isES6Set","Set","hasGetOwnPropertySymbols","getPlainObjectKeys","propertyIsEnumerable","Reflect","getOwnPropertyNames","toPrimitive","hasProp","prop","hasOwnProperty","_defineProperties","descriptor","_createClass","Constructor","protoProps","staticProps","_extends","_inheritsLoose","subClass","superClass","_assertThisInitialized","ReferenceError","_arrayLikeToArray","arr2","_createForOfIteratorHelperLoose","allowArrayLike","it","Symbol","iterator","minLen","_unsupportedIterableToArray","done","storedAnnotationsSymbol","createDecoratorAnnotation","annotation","storeAnnotation","annotationType_","isOverride","$mobx","Atom","name_","isPendingUnobservation_","isBeingObserved_","observers_","diffValue_","lastAccessedBy_","lowestObserverState_","IDerivationState_","NOT_TRACKING_","onBOL","onBUOL","_proto","onBO","onBUO","reportObserved","reportChanged","startBatch","propagateChanged","endBatch","isAtom","createAtom","onBecomeObservedHandler","onBecomeUnobservedHandler","arg3","atom","interceptHook","onBecomeUnobserved","comparer","structural","deepEqual","is","shallow","deepEnhancer","_","isObservable","observable","referenceEnhancer","createActionAnnotation","options_","make_","make_$1","extend_","extend_$1","adm","_this$options_$bound","_this$options_","_adm$target_$storedAn","annotated","target_","bound","actionDescriptor","createActionDescriptor","defineProperty_","isAction","_actionDescriptor","recordAnnotationApplied","proxyTrap","safeDescriptors","_annotation$options_","_annotation$options_$","_annotation$options_2","_annotation$options_$2","_annotation$options_3","_ref2","_adm$proxy_","proxy_","createAction","autoAction","isPlainObject_","createFlowAnnotation","make_$2","extend_$2","isFlow","flowDescriptor","createFlowDescriptor","_flowDescriptor","flow","createComputedAnnotation","make_$3","extend_$3","assertComputedDescriptor","defineComputedProperty_","_ref","createObservableAnnotation","make_$4","extend_$4","_this$options_$enhanc","assertObservableDescriptor","defineObservableProperty_","enhancer","_this$options_$enhanc2","_this$options_2","defaultCreateObservableOptions","deep","defaultDecorator","proxy","asCreateObservableOptions","observableAnnotation","observableRefAnnotation","observableShallowAnnotation","isObservableObject","isObservableArray","isObservableMap","isObservableSet","observableStructAnnotation","oldValue","observableDecoratorAnnotation","getEnhancerFromOptions","getEnhancerFromAnnotation","createObservable","arg2","_getDescriptor$config","_getDescriptor","ObservableValue","initialValues","useProxies","createLegacyArray","createObservableArray","ObservableMap","ObservableSet","decorators","extendObservable","asObservableObject","_target$$mobx","_target$$mobx$proxy_","objectProxyTraps","asDynamicObservableObject","struct","computedAnnotation","computedStructAnnotation","computed","arg1","opts","ComputedValue","_Symbol$toPrimitive","currentActionId","nextActionId","isFunctionNameConfigurable","tmpNameDescriptor","actionName","executeAction","isMobxAction","canRunAsDerivation","runInfo","prevDerivation_","trackingDerivation","runAsAction","prevAllowStateChanges_","allowStateChanges","untrackedStart","allowStateChangesStart","prevAllowStateReads_","allowStateReadsStart","runAsAction_","notifySpy_","startTime_","actionId_","parentActionId_","_startAction","error_","suppressReactionErrors","allowStateChangesEnd","allowStateReadsEnd","untrackedEnd","_endAction","_Symbol$toPrimitive$1","_Atom","notifySpy","hasUnreportedChange_","interceptors_","changeListeners_","value_","dehancer","dehanceValue","prepareNewValue_","UNCHANGED","setNewValue_","checkIfStateModificationsAreAllowed","hasInterceptors","change","interceptChange","UPDATE","hasListeners","notifyListeners","intercept_","handler","registerInterceptor","observe_","fireImmediately","observableKind","debugObjectName","registerListener","raw","valueOf","isObservableValue","TraceMode","dependenciesState_","observing_","newObserving_","runId_","UP_TO_DATE_","unboundDepsCount_","CaughtException","triggeredBy_","isComputing_","isRunningSetter_","derivation","setter_","isTracing_","NONE","scope_","equals_","requiresReaction_","keepAlive_","compareStructural","requiresReaction","keepAlive","onBecomeStale_","POSSIBLY_STALE_","propagateMaybeChanged","inBatch","shouldCompute","prevTrackingContext","trackingContext","trackAndCompute","STALE_","propagateChangeConfirmed","warnAboutUntrackedRead_","computeValue_","isCaughtException","cause","wasSuspended","changed","trackDerivedFunction","disableErrorBoundaries","suspend_","clearObserving","firstTime","prevValue","autorun","prevU","isComputedValue","prevAllowStateReads","prevUntracked","obs","changeDependenciesStateTo0","runId","prevTracking","prevObserving","observing","lowestNewObservingDerivationState","dep","_dep","removeObserver","_dep2","addObserver","bindDependencies","untracked","allowStateReads","MobXGlobals","mobxGuid","pendingUnobservations","pendingReactions","isRunningReactions","enforceActions","spyListeners","globalReactionErrorHandlers","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","verifyProxies","canMergeGlobalState","isolateCalled","__mobxInstanceCount","__mobxGlobals","getGlobalState","queueForUnobservation","runReactions","Reaction","onInvalidate_","errorHandler_","requiresObservable_","isDisposed_","isScheduled_","isTrackPending_","isRunning_","schedule_","isScheduled","runReaction_","reportExceptionInDerivation_","prevReaction","getDisposer_","enterBreakPoint","getAtomFromArgs","BREAK","LOG","reactionScheduler","runReactionsHelper","allReactions","iterations","remainingReactions","isReaction","actionAnnotation","actionBoundAnnotation","autoActionAnnotation","autoActionBoundAnnotation","createActionFactory","runInAction","_opts$name","_opts","reaction","scheduler","reactionRunner","requiresObservable","createSchedulerFromOptions","run","expression","effect","_opts$name2","errorHandler","baseFn","effectAction","runSync","nextValue","hook","getAtom","listenersKey","hookListeners","configure","isolateGlobalState","ea","baseScheduler","setReactionScheduler","annotations","descriptors","getDependencyTree","nodeToDependencyTree","dependencies","generatorId","FlowCancellationError","flowAnnotation","rejector","ctx","gen","pendingPromise","promise","stepId","onFulfilled","onRejected","cancel","cancelPromise","_res","yieldedPromise","isMobXFlow","interceptReads","propOrHandler","getAdministration","intercept","interceptProperty","interceptInterceptable","_isComputed","values_","isComputedProp","_isObservable","isObservableProp","keys_","entries","set_","_values","observe","propOrCb","cbOrFire","observeObservableProperty","observeObservable","transaction","thisArg","getAdm","has_","get_","_getAdm$set_","deleteProperty","_getAdm$delete_","delete_","_getAdm$definePropert","ownKeys_","preventExtensions","interceptable","interceptors","idx","listenable","makeObservable","collectStoredAnnotations","arrayTraps","getArrayLength_","arrayExtensions","setArrayLength_","ObservableArrayAdministration","owned_","legacyMode_","atom_","enhancer_","lastKnownLength_","newV","oldV","dehanceValue_","dehanceValues_","addedCount","removedCount","newLength","currentLength","newItems","spliceWithArray_","updateArrayLength_","oldLength","reserveArrayBuffer","deleteCount","lengthDelta","spliceItemsIntoValues_","notifyArraySplice_","_this$values_","oldItems","_i","notifyArrayChildUpdate_","notify","owned","spliceWithArray","_len2","items","_key2","_len3","_key3","addArrayExtension","funcName","funcFactory","simpleFunc","dehancedValues","mapLikeFunc","_this2","reduceLikeFunc","_this3","accumulator","_Symbol$iterator","_Symbol$toStringTag","isObservableArrayAdministration","ObservableMapMarker","ADD","toStringTag","_Symbol$iterator$1","_Symbol$toStringTag$1","initialData","data_","hasMap_","keysAtom_","entry","newEntry","hasKey","updateValue_","addValue_","_change","updateHasMapEntry_","makeIterable","_keys$next","_keys$next2","_step","_iterator","_step$value","_this4","_this5","_step2","_iterator2","_this6","_step3","replacementMap","dataStructure","convertToMap","orderedData","keysReportChangedCalled","_iterator3","_step4","_iterator4","_step4$value","_value","keyExisted","_value2","iter1","iter2","next1","next2","ObservableSetMarker","callbackFn","_change2","observableValues","inferredAnnotationsSymbol","descriptorCache","ObservableObjectAdministration","defaultAnnotation_","autoBind_","appliedAnnotations_","pendingKeys_","getObservablePropValue_","setObservablePropValue_","inferAnnotation_","assertAnnotable","inferAnnotationFromDescriptor","outcome","_this$target_$inferre","closestProto","deleteOutcome","notifyPropertyAddition_","cachedDescriptor","getCachedObservablePropDescriptor","_observable","_this$pendingKeys_","_this$pendingKeys_$ge","_observable2","_this$pendingKeys_2","_this$pendingKeys_2$g","_options$name","getAnnotationFromOptions","autoBind","isObservableObjectAdministration","ctor","OBSERVABLE_ARRAY_BUFFER_SIZE","StubArray","setPrototypeOf","LegacyObservableArray","_StubArray","arrays","createArrayBufferItem","createArrayEntryDescriptor","getDebugName","named","eq","aStack","bStack","className","unwrap","areArrays","aCtor","bCtor","getSelf","desc","defaultAnnotation","isGenerator","__MOBX_DEVTOOLS_GLOBAL_HOOK__","injectMobx","spy","extras","Function","attachNativeEvent","viewRef","eventName","argMapping","eventMappings","invariant","nativeEvent","AnimatedValue","__makeNative","nativeEventPath","animatedValueTag","__getNativeTag","viewTag","findNodeHandle","NativeAnimatedHelper","API","addAnimatedEventToView","detach","removeAnimatedEventFromView","AnimatedEvent","config","_argMapping","useNativeDriver","__addListener","_callListeners","_attachedEvent","__isNative","shouldUseNativeDriver","__removeListener","__attach","__detach","__getHandler","recMapping","recEvt","mappingKey","_key4","_setPrototypeOf","AnimatedTransform","_AnimatedWithChildren","transforms","_transforms","AnimatedNode","__getValue","__getAnimatedValue","__addChild","__removeChild","__getNativeConfig","transConfigs","nodeTag","transformDataType","validateTransform","AnimatedWithChildren","AnimatedStyle","_style","_walkStyleAndGetValues","updatedStyle","_walkStyleAndGetAnimatedValues","styleConfig","styleKey","validateStyles","AnimatedProps","_AnimatedNode","_props","_callback","_animatedView","__disconnectAnimatedView","__connectAnimatedView","setNativeView","animatedView","nativeViewTag","connectAnimatedNodeToView","disconnectAnimatedNodeFromView","__restoreDefaultValues","restoreDefaultValues","propsConfig","propKey","setAndForwardRef","getForwardedRef","setLocalRef","_objectWithoutPropertiesLoose","excluded","sourceKeys","animatedComponentNextId","createAnimatedComponent","Component","isReactComponent","AnimatedComponent","_React$Component","_invokeAnimatedPropsCallbackOnMount","_eventDetachers","_animatedComponentId","_isFabric","_this$_component$_int","_this$_component$_int2","_this$_component$getN","_this$_component$getN2","_this$_component$getS","_this$_component$getS2","_component","stateNode","canonical","getNativeScrollRef","getScrollResponder","_waitForUpdate","setWaitingForIdentifier","_markUpdateComplete","unsetWaitingForIdentifier","_animatedPropsCallback","setNativeProps","forceUpdate","_propsAnimated","_setComponentRef","_prevComponent","getNode","_ref$constructor$name","_attachNativeEvents","_this$_component","scrollableNode","getScrollableNode","_loop","_detachNativeEvents","_attachProps","nextProps","oldPropsAnimated","_props$collapsable","_props$nativeID","_ref$style","passthroughAnimatedPropExplicitValues","_ref2$style","passthruStyle","passthruProps","mergedStyle","forceNativeIdFabric","collapsable","collapsableProps","nativeID","UNSAFE_componentWillMount","componentDidMount","UNSAFE_componentWillReceiveProps","newProps","componentDidUpdate","prevProps","componentWillUnmount","FlatList","scrollEventThrottle","Image","ScrollView","SectionList","Text","AnimatedAddition","_a","_b","interpolate","AnimatedInterpolation","input","AnimatedDiffClamp","_min","_max","_lastValue","AnimatedDivision","_warnedAboutDivideByZero","AnimatedModulo","modulus","_modulus","AnimatedMultiplication","AnimatedSubtraction","AnimatedTracking","animationClass","animationConfig","_parent","_animationClass","_animationConfig","_useNativeDriver","toValue","__getNativeAnimationConfig","animationId","generateNewAnimationId","_combineCallbacks","onComplete","maybeVectorAnim","anim","AnimatedValueXY","configX","configY","_config$key","parallel","stopTogether","timing","_start2","animatedValue","configuration","singleValue","singleConfig","stopTracking","TimingAnimation","stopAnimation","resetAnimation","_startNativeLoop","_isUsingNativeDriver","sequence","finished","doneCount","hasEnded","endResult","Value","ValueXY","Interpolation","_start3","DecayAnimation","spring","SpringAnimation","subtract","divide","modulo","diffClamp","stagger","_temp","_ref$iterations","_ref$resetBeforeItera","resetBeforeIteration","isFinished","iterationsSoFar","restart","animatedEvent","forkEvent","unforkEvent","Event","__PropsOnlyForTests","emptyAnimation","anyValue","AnimatedImplementation","isTesting","AnimatedMock","Animated","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","attachEvent","canUseViewport","screen","isInWorker","_ease","float32ArraySupported","A","aA1","aA2","C","calcBezier","aT","getSlope","bezier","mX1","mY1","mX2","mY2","getTForX","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","_aGuessT","aGuessT","currentSlope","newtonRaphsonIterate","_aA","_aB","currentX","currentT","aA","aB","binarySubdivide","Easing","step0","step1","linear","ease","quad","cubic","poly","circle","exp","elastic","bounciness","back","bounce","_t","_t2","_bezier","in","easing","out","inOut","nativeEventEmitter","NativeAnimatedModule","RN$Bridgeless","NativeAnimatedTurboModule","NativeAnimatedNonTurboModule","__nativeAnimatedNodeTagCount","__nativeAnimationIdCount","waitingForQueuedOperations","queueOperations","tag","saveValueCallback","disableQueue","startOperationBatch","finishOperationBatch","queueOperation","createAnimatedNode","startListeningToAnimatedNodeValue","stopListeningToAnimatedNodeValue","connectAnimatedNodes","parentTag","childTag","disconnectAnimatedNodes","startAnimatingNode","endCallback","setAnimatedNodeValue","setAnimatedNodeOffset","flattenAnimatedNodeOffset","extractAnimatedNodeOffset","dropAnimatedNode","eventMapping","animatedNodeTag","SUPPORTED_STYLES","borderRadius","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","elevation","shadowOpacity","translateY","SUPPORTED_TRANSFORMS","rotate","perspective","SUPPORTED_INTERPOLATION_PARAMS","inputRange","outputRange","extrapolate","extrapolateRight","extrapolateLeft","_warnedMissingNativeAnimated","addWhitelistedStyleProp","addWhitelistedTransformProp","addWhitelistedInterpolationParam","param","configs","validateInterpolation","generateNewNodeTag","assertNativeAnimatedModule","NativeEventEmitter","objectWithoutPropertiesLoose","sourceSymbolKeys","_getPrototypeOf","arrayWithoutHoles","iterableToArray","nonIterableSpread","instance","NativeAnimatedAPI","_uniqueId","__nativeTag","__getChildren","_startListeningToNativeValueUpdates","addListener","removeListener","_stopListeningForNativeValueUpdates","removeAllListeners","__nativeAnimatedValueListener","__shouldUpdateListenersForNewNativeTag","_onAnimatedValueUpdateReceived","__callListeners","_this$__nativeTag","nativeTag","_typeof","assertThisInitialized","_startingValue","_animation","_updateValue","setOffset","flattenOffset","extractOffset","handle","__isInteraction","InteractionManager","createInteractionHandle","previousAnimation","clearInteractionHandle","_tracking","tracking","flush","animatedStyles","findAnimatedStyles","animatedStyle","_flush","defaultProps","dataSet","suppressHydrationWarning","testID","accessibilityProps","accessibilityActiveDescendant","accessibilityAtomic","accessibilityAutoComplete","accessibilityBusy","accessibilityChecked","accessibilityColumnCount","accessibilityColumnIndex","accessibilityColumnSpan","accessibilityControls","accessibilityCurrent","accessibilityDescribedBy","accessibilityDetails","accessibilityDisabled","accessibilityErrorMessage","accessibilityExpanded","accessibilityFlowTo","accessibilityHasPopup","accessibilityHidden","accessibilityInvalid","accessibilityKeyShortcuts","accessibilityLabel","accessibilityLabelledBy","accessibilityLevel","accessibilityLiveRegion","accessibilityModal","accessibilityMultiline","accessibilityMultiSelectable","accessibilityOrientation","accessibilityOwns","accessibilityPlaceholder","accessibilityPosInSet","accessibilityPressed","accessibilityReadOnly","accessibilityRequired","accessibilityRole","accessibilityRoleDescription","accessibilityRowCount","accessibilityRowIndex","accessibilityRowSpan","accessibilitySelected","accessibilitySetSize","accessibilitySort","accessibilityValueMax","accessibilityValueMin","accessibilityValueNow","accessibilityValueText","focusable","accessible","accessibilityState","accessibilityValue","clickProps","onClick","onClickCapture","onContextMenu","focusProps","onBlur","onFocus","keyboardProps","onKeyDown","onKeyDownCapture","onKeyUp","onKeyUpCapture","mouseProps","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","touchProps","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","styleProps","dangerousStyleValue","isCustomProperty","isUnitlessNumber","setValueForStyles","styleName","styleValue","setProperty","getRect","_getBoundingClientRec","getBoundingClientRect","offsetWidth","offsetHeight","_measureLayout","relativeToNativeNode","relativeNode","parentNode","relativeRect","_getRect","focusableElements","INPUT","SELECT","TEXTAREA","UIManager","blur","measure","measureInWindow","_getRect2","measureLayout","onFail","onSuccess","updateView","configureNextLayoutAnimation","onAnimationDidEnd","setLayoutAnimationEnabledExperimental","Hook","livelinessChecking","getLivelinessChecking","extendStatics","__extends","__","__assign","__values","__read","ar","__spread","getType","assertIsStateTreeNode","getStateTreeNode","onSnapshot","assertIsFunction","applyPatch","patch","assertArg","applyPatches","asArray","getSnapshot","applyPostProcess","snapshot","getRoot","storedValue","getEnv","env","BaseNode","subpath","NodeLifeCycle","INITIALIZING","baseSetParent","_subpath","_subpathUponDeath","_pathUponDeath","val","wasAlive","isAlive","aliveAtom","_hookSubscribers","emit","hookHandler","EventHandlers","_escapedSubpath","pathAtom","getEscapedPath","escapeJsonPath","DEAD","DETACHING","whenFinalized","CREATED","FINALIZED","fireHook","afterAttach","clearAll","beforeDestroy","ScalarNode","_super","simpleType","initialSnapshot","createNewInstance","finalizeCreation","fail$1","newParent","parentChanged","subpathChanged","pathUponDeath","aboutToDie","finalizeDeath","baseFinalizeCreation","baseAboutToDie","baseFinalizeDeath","fireInternalHook","TypeFlags","nextNodeId","snapshotReactionOptions","ObjectNode","complexType","initialValue","_snapshotComputed","unbox","_initialSnapshot","identifierAttribute","identifierCache","IdentifierCache","_childNodes","initializeChildNodes","identifier","unnormalizedIdentifier","normalizeIdentifier","addNodeToCache","patches","createObservableInstanceIfNeeded","_applyPatches","_applySnapshot","_observableInstanceState","createObservableInstance","e_1","parentChain","parentChain_1","parentChain_1_1","e_1_1","return","preboot","_isRunningAction","finalizeNewInstance","_addSnapshotReaction","afterCreate","beforeDetach","previousState","newEnv","newIdCache","splitCache","removeChild","mergeCache","_getActualSnapshot","_getCachedInitialSnapshot","_snapshotUponDeath","_cachedInitialSnapshotCreated","childNodes","_cachedInitialSnapshot","processInitialSnapshot","isRunningAction","_getAssertAliveError","warnError","escapedPath","actionContext","getCurrentActionContext","parentActionEvent","actionFullPath","assertAlive","_autoUnbox","getChildNode","getChildren","convertChildNodesToArray","getChildType","isProtectionEnabled","isProtected","subpathUponDeath","e_2","_c","e_2_1","afterCreationFinalization","clearParent","createActionInvoker","splitJsonPath","resolveNodeByPathParts","applyPatchLocally","applySnapshot","_internalEventsEmit","_internalEventsClear","notifyDied","_internalEventsClearAll","onChange","_internalEventsRegister","basePatch","_internalEventsHasSubscribers","stripPatch","invertPatch","splitPatch","extend","reversePatch","emitPatch","disposer","_internalEventsHas","hasDisposer","_internalEventsUnregister","middleware","middlewares","includeHooks","removeMiddleware","assertWritable","_hasSnapshotReaction","snapshotDisposer","emitSnapshot","addDisposer","_internalEvents","hasSubscribers","eventHandler","atTheBeginning","unregister","$type","BaseType","typecheckInternal","instantiate","getStateTreeNodeSafe","valueType","isAssignableFrom","typeCheckSuccess","typeCheckFailure","isValidSnapshot","ComplexType","getDefaultSnapshot","isDetaching","isStateTreeNode","isMutable","tryToReconcileNode","setParent","newNode","SimpleType","isType","assertIsType","argNumber","RunningAction","hooks","onFinish","flowsPending","currentActionContext","getNextActionId","runWithActionContext","baseIsRunningAction","previousContext","baseCall","originalFn","CollectedMiddlewares","runNextMiddleware","getNextMiddleware","call2","runMiddleWares","getParentActionContext","parentContext","parentActionContext","argsToArray","tree","rootId","parentId","allParentIds","parentEvent","_isMSTAction","$mst_middleware","arrayIndex","item","inArrayIndex","prettyPrintValue","safeStringify","toErrorString","fullPath","pathPrefix","currentTypename","isPrimitive","isSnapshotCompatible","flags","Integer","Boolean","isPrimitiveType","describe","getContextForPath","flattenTypeErrors","errors","reduce","process","ENABLE_TYPE_CHECK","valueInString","validationErrorsToString","typecheck","identifierCacheId","lcm","lastCacheModificationPerId","modificationId","cacheId","lastCacheUpdate","mobxShallow","updateLastCacheModificationPerId","nodes","basePath","modified","some","candidate","createObjectNode","existingNode","createScalarNode","isNode","$treenode","base","pathParts","failIfResolveFails","part","joinJsonPath","includeDate","EventHandler","eventHandlers","stringStartsWith","str","beginning","deprecated","msg","assertIsString","canBeEmpty","op","unescapeJsonPath","getPathStr","ids","SnapshotProcessor","_subtype","_processors","sn","preProcessor","postProcessor","nodeType","snapshotProcessorType","methods","methods_1","methods_1_1","proxyNodeTypeMethods","oldGetSnapshot","postProcessSnapshot","processedInitialValue","preProcessSnapshot","_fixNode","reconcile","processedSn","MapIdentifierMode","needsIdentifierError","MSTMap","mapNode","mapType","identifierMode","YES","mapIdentifierAttribute","isValidIdentifier","put","MapType","_subType","hookInitializers","UNKNOWN","_determineIdentifierMode","modelTypes","tryCollectModelTypes","subtypes","getSubTypes","subtypesArray","subtypesArray_1","subtypesArray_1_1","ModelType","identifierAttribute_1","NO","objNode","subType","initializer","actionInvoker","willChange","didChange","processIdentifier","expected","processed","oldSnapshot","currentKeys","ArrayType","updatedNodes","reconcileArrayChildren","index_1","addedNodes","childType","oldNodes","newValues","newPaths","nothingChanged","hasNewNode","oldNode","newPath","areSame","valueAsNode","oldMatch","getNewNode","objectTypeToString","defaultObjectOptions","initializers","toPropertiesObject","declaredProps","optional","number","DatePrimitive","getPrimitiveFactoryFromValue","cloneAndEnhance","currentPreprocessor","currentPostprocessor","propertyNames","_getIdentifierAttribute","forAllProps","propType","Identifier","instantiateActions","action2","baseAction","specializedAction_1","boundAction","instantiateVolatileState","rest","__rest","instantiateViews","computedValue","setter","applySnapshotPreProcessor","chg","oldChildValue","applySnapshotPostProcessor","preProcessedSnapshot","processor","isModelType","CoreType","checker","integer","nullType","Null","undefinedType","Undefined","_DatePrimitive","getTime","Literal","literal","Refinement","_predicate","_message","subtypeErrors","Union","_types","eager","dispatcher","_dispatcher","_eager","factory","determineType","reconcileCurrentType","allErrors","applicableTypes","optionsOrType","otherTypes","types","OptionalValue","_defaultValue","optionalValues","Optional","defaultInstanceOrSnapshot","getDefaultInstanceOrSnapshot","defaultValueOrFunction","checkOptionalPreconditions","undefinedAsOptionalValues","optionalUndefinedType","optionalNullType","maybe","Late","_definition","mustSucceed","getSubType","subtype","Frozen","isSerializable","untypedFrozenInstance","StoredReference","targetType","targetNode","normalizedId","lastCacheModification","getLastCacheModificationPerId","resolvedReference","InvalidReferenceError","updateResolvedReference","BaseReferenceType","onInvalidated","Reference","storedRefNode","referenceId","refTargetNode","storedRefParentNode","storedRefParentValue","invalidTarget","invalidId","replaceRef","newRef","removeRef","refTargetValue","refTargetNodeHook","getInvalidationCause","fireInvalidated","refTargetDetachHookDisposer","registerHook","refTargetDestroyHookDisposer","customGetSet","onRefTargetDestroyedHookDisposer","startWatching","sync","addTargetNodeWatcher","IdentifierReferenceType","resolvedValue","storedRef","watchTargetNodeForInvalidations","compareByValue","CustomReferenceType","newIdentifier","reference","getSetOptions","BaseIdentifierType","validType","IdentifierType","IdentifierNumberType","identifierNumber","CustomType","Custom","isTargetType","typeError","getValidationMessage","toSnapshot","fromSnapshot","isSnapshot","valueToStore","enumeration","realOptions","option","model","hasTypename","cur","custom","safeReference","refType","ev","acceptsUndefined","maybeNull","refinement","predicate","frozen","arg","late","nameOrType","maybeType","null","snapshotProcessor","processors","component","accessibilityComponent","AccessibilityUtil","propsToAccessibilityComponent","domProps","createDOMProps","_children","dimensions","fontScale","Dimensions","dimension","initialDimensions","win","docEl","documentElement","clientHeight","devicePixelRatio","clientWidth","_handler","createInterpolation","stringShapeRegex","checkPattern","colorToRgba","outputRanges","interpolations","shouldRound","range","startsWith","createInterpolationFromStringOutputRange","checkInfiniteRange","checkValidInputRange","findRange","inputMin","inputMax","outputMin","outputMax","normalizedColor","normalizeColor","_config","_interpolation","parentValue","__transformDataType","__createInterpolation","doLeftAndRightSwapInRTL","isPreferredLanguageRTL","isRTLAllowed","isRTLForced","isRTL","onDirectionChange","I18nManager","allowRTL","bool","forceRTL","getConstants","setPreferredLanguageRTL","swapLeftAndRightInRTL","mergeRefs","assets","getAssetByID","assetId","dataUriPattern","ImageUriCache","uri","_entries","lastUsedTimestamp","refCount","_cleanUpIfNeeded","leastRecentlyUsedKey","leastRecentlyUsedEntry","imageUris","_maximumEntries","requests","abort","onerror","onload","success","failure","interval","setInterval","clearInterval","naturalHeight","naturalWidth","onDecode","prefetch","queryCache","uris","_filterId","svgDataUriPattern","resolveAssetUri","asset","scales","preferredScale","PixelRatio","curr","scaleSuffix","httpServerLocation","svg","encodeURIComponent","blurRadius","defaultSource","draggable","onLoadEnd","onLoadStart","_React$useState","updateState","_React$useState2","layout","updateLayout","hiddenImageRef","filterRef","requestRef","shouldDisplaySource","_getFlatStyle","filterId","flatStyle","resizeMode","shadowOffset","tintColor","_filter","shadowString","resolveShadowValue","shadowColor","overlayColor","getFlatStyle","_resizeMode","selectedSource","displayImageUri","imageSizeStyle","_getAssetByID","resolveAssetDimensions","backgroundImage","backgroundSize","_hiddenImageRef$curre","_height3","_width3","getBackgroundSize","hiddenImage","alt","classes","accessibilityImage","abortPendingRequest","_layout","resizeModeStyles","visibility","floodColor","in2","operator","createTintColorSVG","ImageWithStatics","overflow","backgroundColor","backgroundPosition","backgroundRepeat","contain","cover","none","stretch","_curry1","_isPlaceholder","f2","NavigationBuilderContext","onDispatchAction","onOptionsChange","nanoid","STYLE_ELEMENT_ID","STYLE_GROUPS","modality","classicReset","classic","atomic","borderColor","borderStyle","borderWidth","flex","overscrollBehavior","marginHorizontal","marginVertical","paddingHorizontal","paddingVertical","STYLE_SHORT_FORM_EXPANSIONS","MONOSPACE_FONT_STACK","SYSTEM_FONT_STACK","_interopRequireDefault","require","_extends2","_objectWithoutProperties2","_react","_RNCSliderNativeComponent","SliderWithRef","forwardRef","_reactNative","slider","onValueChange","onSlidingStart","onSlidingComplete","localProps","onValueChangeEvent","userEvent","fromUser","onChangeEvent","onSlidingStartEvent","onSlidingCompleteEvent","thumbImage","resolveAssetSource","onRNCSliderSlidingStart","onRNCSliderSlidingComplete","onRNCSliderValueChange","disabled","__source","fileName","lineNumber","minimumValue","maximumValue","inverted","_default","NavigationContext","transitionProperty","transitionDuration","userSelect","actionable","cursor","touchAction","MemoedTouchableOpacity","activeOpacity","delayPressIn","delayPressOut","delayLongPress","onLongPress","onPress","onPressIn","onPressOut","rejectResponderTermination","useRef","_useState","useState","setDuration","_useState2","opacityOverride","setOpacityOverride","setOpacityTo","useCallback","setOpacityActive","setOpacityInactive","pressConfig","useMemo","cancelable","delayPressStart","delayPressEnd","onPressStart","isGrant","dispatchConfig","registrationName","onPressEnd","pressEventHandlers","usePressEvents","findDOMNode","defaultNoopBatch","printDebugValue","FinalizationRegistryLocal","FinalizationRegistry","createTrackingData","mounted","changedBeforeMount","cleanAt","CLEANUP_LEAKED_REACTIONS_AFTER_MILLIS","cleanupTokenToReactionTrackingMap","globalCleanupTokensCounter","registry","token","trackedReaction","addReactionToTrack","reactionTrackingRef","objectRetainedByReact","finalizationRegistryCleanupToken","recordReactionAsCommitted","reactionRef","forceCleanupTimerToRunNowForTests","resetCleanupScheduleForTests","createReactionCleanupTrackingUsingFinalizationRegister","reactionCleanupHandle","uncommittedReactionRefs","ensureCleanupTimerRunning","cleanUncommittedReactions","clearTimeout","uncommittedReactionRefs_1","uncommittedReactionRefs_1_1","createTimerBasedReactionCleanupTracking","globalIsUsingStaticRendering","isUsingStaticRendering","observerComponentNameFor","baseComponentName","ObjectToBeRetainedByReact","useObserver","setTick","tick","useForceUpdate","newReaction","trackingData_1","rendering","exception","useDebugValue","useEffect","observer","baseComponent","memoComponent","wrappedComponent","hoistBlackList","$$typeof","compare","colorProps","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","textDecorationColor","textShadowColor","normalizeValueWithProperty","returnValue","unitlessNumbers","isUndefined","isArrayBuffer","isBuffer","isFormData","FormData","isArrayBufferView","isString","isNumber","isDate","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","navigator","product","assignValue","stripBOM","content","emptyObject","ScrollResponder","Mixin","scrollResponderMixinGetInitialState","isTouching","lastMomentumScrollBeginTime","lastMomentumScrollEndTime","observedScrollSinceBecomingResponder","becameResponderWhileAnimating","scrollResponderHandleScrollShouldSetResponder","scrollResponderHandleStartShouldSetResponder","scrollResponderHandleStartShouldSetResponderCapture","scrollResponderIsAnimating","scrollResponderHandleResponderReject","warning","scrollResponderHandleTerminationRequest","scrollResponderHandleTouchEnd","touches","scrollResponderHandleResponderRelease","currentlyFocusedTextInput","TextInputState","currentlyFocusedField","keyboardShouldPersistTaps","onScrollResponderKeyboardDismissed","blurTextInput","scrollResponderHandleScroll","scrollResponderHandleResponderGrant","scrollResponderHandleScrollBeginDrag","onScrollBeginDrag","scrollResponderHandleScrollEndDrag","onScrollEndDrag","scrollResponderHandleMomentumScrollBegin","onMomentumScrollBegin","scrollResponderHandleMomentumScrollEnd","onMomentumScrollEnd","scrollResponderHandleTouchStart","scrollResponderHandleTouchMove","scrollResponderGetScrollableNode","scrollResponderScrollTo","animated","scroll","behavior","scrollLeft","scrollTop","scrollResponderZoomTo","rect","scrollResponderFlashScrollIndicators","scrollResponderScrollNativeHandleToKeyboard","nodeHandle","additionalOffset","preventNegativeScrollOffset","additionalScrollOffset","getInnerViewNode","scrollResponderTextInputFocusError","scrollResponderInputMeasureAndScrollToKeyboard","keyboardScreenY","keyboardWillOpenTo","endCoordinates","screenY","scrollOffsetY","scrollResponderKeyboardWillShow","onKeyboardWillShow","scrollResponderKeyboardWillHide","onKeyboardWillHide","scrollResponderKeyboardDidShow","onKeyboardDidShow","scrollResponderKeyboardDidHide","onKeyboardDidHide","normalizeScrollEvent","contentOffset","contentSize","scrollHeight","scrollWidth","layoutMeasurement","timeStamp","ScrollViewBase","_props$scrollEnabled","scrollEnabled","_props$scrollEventThr","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","scrollState","isScrolling","scrollLastTick","scrollTimeout","scrollRef","createPreventableScrollHandler","handleScrollTick","hideScrollbar","stopPropagation","persist","handleScrollEnd","lastTick","eventThrottle","timeSinceLastTick","shouldEmitScrollEvent","handleScrollStart","scrollDisabled","overflowX","overflowY","scrollbarWidth","createReactClass","mixins","getInitialState","flashScrollIndicators","_scrollNodeRef","getInnerViewRef","_innerViewRef","scrollTo","scrollToEnd","horizontal","scrollResponder","scrollResponderNode","_this$props","contentContainerStyle","onContentSizeChange","refreshControl","stickyHeaderIndices","pagingEnabled","keyboardDismissMode","contentSizeChangeProps","_handleContentOnLayout","hasStickyHeaderIndices","Children","isSticky","stickyHeader","pagingEnabledChild","contentContainer","_setInnerViewRef","contentContainerHorizontal","baseStyle","baseHorizontal","baseVertical","pagingEnabledStyle","pagingEnabledHorizontal","pagingEnabledVertical","_handleScroll","scrollResponderHandleTerminate","ScrollViewClass","scrollView","_setScrollNodeRef","cloneElement","_e$nativeEvent$layout","dismissKeyboard","commonStyle","flexGrow","WebkitOverflowScrolling","scrollSnapType","scrollSnapAlign","ForwardedScrollView","_slicedToArray","_arrayWithHoles","_s","_e","_arr","_n","_d","_iterableToArrayLimit","_nonIterableRest","Prop","_ref$default","defaultVal","_ref$triggerUpdate","triggerUpdate","_ref$onChange","newVal","_classCallCheck","_ref2$stateInit","stateInit","_ref2$props","rawProps","_ref2$methods","_ref2$aliases","aliases","_ref2$init","initFn","_ref2$update","updateFn","initialised","changedProps","comp","nodeElement","initStatic","digest","_ref3","_ref3$triggerUpdate","redigest","_ref3$onChange","_ref3$defaultVal","curVal","getSetProp","_methods$methodName","_ref4","_ref5","alias","resetProps","_rerender","isSupported","requestIdleCallback","didTimeout","timeRemaining","cancelIdleCallback","Events","interactionStart","interactionComplete","runAfterInteractions","task","f1","numberOfLines","selectable","textHasAncestor","textOneLine","textMultiLine","WebkitLineClamp","notSelectable","pressable","Provider","font","whiteSpace","wordWrap","maxWidth","textOverflow","WebkitBoxOrient","autoCapitalize","autoComplete","autoCorrect","autoFocus","defaultValue","maxLength","readOnly","rows","spellCheck","TextInput","inputMode","_props$autoCapitalize","autoCompleteType","_props$autoCorrect","blurOnSubmit","clearTextOnFocus","_props$editable","editable","_props$keyboardType","keyboardType","_props$multiline","multiline","_props$numberOfLines","onChangeText","onKeyPress","onSelectionChange","onSubmitEditing","placeholderTextColor","returnKeyType","_props$secureTextEntr","secureTextEntry","selection","selectTextOnFocus","handleContentSizeChange","hostNode","newHeight","newWidth","imperativeRef","isFocused","useLayoutEffect","selectionEnd","selectionStart","isSelectionStale","setSelectionRange","setSelection","activeElement","_currentlyFocusedNode","textinput","enterKeyHint","shouldBlurOnSubmit","isComposing","keyCode","isEventComposing","shiftKey","isDefaultPrevented","onSelect","State","MozAppearance","WebkitAppearance","resize","focusTextInput","textFieldNode","Switch","_props$activeThumbCol","activeThumbColor","_props$activeTrackCol","activeTrackColor","_props$disabled","_props$style","_props$thumbColor","thumbColor","_props$trackColor","trackColor","_props$value","thumbRef","handleFocusState","boxShadow","thumbDefaultBoxShadow","_StyleSheet$flatten","styleHeight","styleWidth","multiplyStyleLengthValue","trackBorderRadius","trackCurrentColor","true","false","thumbCurrentColor","thumbHeight","thumbWidth","rootStyle","cursorDefault","trackStyle","thumbStyle","thumb","thumbActive","marginStart","nativeControl","checked","cursorInherit","role","alignSelf","Linear","Quadratic","In","Out","InOut","Cubic","Quartic","Quintic","Sinusoidal","Exponential","Circular","Elastic","Back","Bounce","now$1","hrtime","_tweens","_tweensAddedDuringUpdate","getAll","tweenId","removeAll","tween","getId","preserve","tweenIds","Utils","Bezier","pw","bn","Bernstein","fc","Factorial","Sequence","nextId","_nextId","mainGroup","Tween","_object","_group","_isPaused","_pauseStart","_valuesStart","_valuesEnd","_valuesStartRepeat","_duration","_initialRepeat","_repeat","_yoyo","_isPlaying","_reversed","_delayTime","_easingFunction","_interpolationFunction","_chainedTweens","_onStartCallbackFired","_isChainStopped","_goToEnd","isPaused","_swapEndStartRepeatValues","_setupProperties","startValue","startValueIsArray","isInterpolationList","endValues","_handleRelativeValue","stopChainedTweens","_onStopCallback","pause","resume","numChainedTweens","repeatDelay","_repeatDelayTime","yoyo","easingFunction","interpolationFunction","chain","tweens","_onStartCallback","_onUpdateCallback","onRepeat","_onRepeatCallback","_onCompleteCallback","onStop","elapsed","_updateProperties","startIsArray","endIsArray","endValue","TWEEN","VERSION","checkDCE","rules","styleResolver","createCSS","UnimplementedView","unimplementedViewStyles","createPromise","createPromiseAll","promises","processResult","oldObject","newObject","mergeLocalStorageItem","numberOfKeys","AsyncStorage","keyValuePairs","useLayoutEffectImpl","MISSING_CONTEXT_ERROR","isDefault","EmitterSubscription","_EventSubscription2","emitter","subscriber","removeSubscription","_EventSubscription","EventSubscriptionVendor","_subscriptionsForType","addSubscription","eventType","subscription","removeAllSubscriptions","subscriptionsForType","getSubscriptionsForType","sparseFilterPredicate","EventEmitter","_subscriber","listenerCount","subscriptions","useNavigation","navigation","deepDiffer","one","two","maxDepth","ii","twoKey","VirtualizedList","numColumns","_React$PureComponent","_virtualizedListPairs","_captureRef","_listRef","_getItem","kk","_item","_getItemCount","_keyExtractor","keyExtractor","_this$props2","ListItemComponent","columnWrapperStyle","_item2","_index","row","separators","_checkProps","viewabilityConfigCallbackPairs","pair","viewabilityConfig","onViewableItemsChanged","_createOnViewableItemsChanged","scrollToIndex","scrollToItem","scrollToOffset","recordInteraction","getScrollRef","getItem","getItemCount","_pushMultiColumnViewable","_this$props3","viewableItems","_this$props4","restProps","nextObj","previousStyleRef","setNativePropsArgsRef","useStable","relativeToNode","nativeProps","nextDomStyle","ERROR","Transitions","NOT_RESPONDER","DELAY","RESPONDER_GRANT","RESPONDER_RELEASE","RESPONDER_TERMINATED","LONG_PRESS_DETECTED","RESPONDER_INACTIVE_PRESS_START","RESPONDER_ACTIVE_PRESS_START","RESPONDER_ACTIVE_LONG_PRESS_START","isActiveSignal","signal","isButtonRole","isPressStartSignal","PressResponder","_eventHandlers","_isPointerTouch","_longPressDelayTimeout","_longPressDispatched","_pressDelayTimeout","_pressOutDelayTimeout","_touchState","_cancelLongPressDelayTimeout","_cancelPressDelayTimeout","_cancelPressOutDelayTimeout","getEventHandlers","_createEventHandlers","shouldDelay","_selectionTerminated","_receiveSignal","normalizeDelay","_handleLongPress","keyupHandler","currentTarget","isSpacebar","isValidKeyPress","onPressMove","touch","getTouchFromResponderEvent","_touchActivatePosition","deltaX","pageX","deltaY","pageY","hypot","_this$_config","_this$_config2","altKey","_this$_config3","defaultPrevented","prevState","nextState","_performTransitionSideEffects","isTerminalSignal","isPrevActive","isNextActive","_activate","_deactivate","_this$_config4","_onLongPress","_this$_config5","onPressChange","_this$_config6","fallback","_event$nativeEvent","changedTouches","pressResponderRef","pressResponder","Batchinator","delayMS","_delay","_taskHandle","schedule","timeoutHandle","_isViewable","viewAreaMode","viewablePercentThreshold","viewportHeight","itemLength","_isEntirelyVisible","pixels","visibleHeight","_getPixelsVisible","ViewabilityHelper","viewAreaCoveragePercentThreshold","_hasInteracted","_timers","_viewableIndices","_viewableItems","computeViewableItems","itemCount","scrollOffset","getFrameMetrics","renderRange","itemVisiblePercentThreshold","viewableIndices","firstVisible","first","metrics","createViewToken","waitForInteraction","every","minimumViewTime","_onUpdateSync","resetViewableIndices","viewableIndicesToCheck","includes","prevItems","nextItems","viewable","_step2$value","_viewable","isViewable","infoLog","_console","elementsThatOverlapOffsets","outLength","trailingOffset","newRangeCount","computeWindowedRenderLimits","getFrameMetricsApprox","scrollMetrics","maxToRenderPerBatch","windowSize","velocity","visibleLength","visibleBegin","visibleEnd","overscanLength","fillPreference","overscanBegin","overscanEnd","_elementsThatOverlapO","overscanFirst","overscanLast","newCellCount","maxNewCells","firstWillAddMore","firstShouldIncrement","lastWillAddMore","lastShouldIncrement","VirtualizedListContext","VirtualizedListContextProvider","cellKey","getScrollMetrics","getOutermostParentListRef","getNestedChildState","registerAsNestedChild","unregisterAsNestedChild","debugInfo","listKey","VirtualizedListCellContextProvider","useContext","_usedIndexForKey","_keylessItemComponentName","_getScrollMetrics","_scrollMetrics","_getOutermostParentListRef","_isNestedWithSameOrientation","_getNestedChildState","existingChildData","_nestedChildLists","_registerAsNestedChild","childList","childListsInCell","_cellKeysToChildListKeys","parentDebugInfo","describeNestedLists","_unregisterAsNestedChild","_onUpdateSeparators","_cellRefs","updateSeparatorProps","_averageCellLength","_frames","_footerLength","_hasDoneInitialScroll","_hasMore","_hasWarned","_headerLength","_hiPriInProgress","_highestMeasuredFrameIndex","_indicesToKeys","_offsetFromParentVirtualizedList","_prevParentOffset","contentLength","dOffset","dt","timestamp","_scrollRef","_sentEndForContentLength","_totalCellLength","_totalCellsMeasured","_viewabilityTuples","_captureScrollRef","_defaultRenderScrollComponent","onRefresh","refreshing","RefreshControl","progressViewOffset","_onCellUnmount","inLayout","_onLayout","measureLayoutRelativeToContainingList","_selectLength","_scheduleCellsToRenderUpdate","_maybeCallOnEndReached","_onLayoutEmpty","_onLayoutFooter","_triggerRemeasureForChildListsInCell","_getFooterCellKey","_onLayoutHeader","_onContentSizeChange","initialScrollIndex","_convertParentScrollMetrics","_onScroll","_selectOffset","_this$_convertParentS","perf","prevDt","_updateViewableItems","_fillRateHelper","activate","_computeBlankness","_onScrollBeginDrag","tuple","viewabilityHelper","_onScrollEndDrag","_onMomentumScrollBegin","_onMomentumScrollEnd","_updateCellsToRender","onEndReachedThreshold","isVirtualizationDisabled","_isVirtualizationDisabled","newState","_this$_scrollMetrics","renderAhead","_getFrameMetricsApprox","newFirst","newLast","cellKeyForIndex","childListKeys","someChildHasMore","childKey","hasMore","_createViewToken","_getFrameMetrics","getItemLayout","_this$props5","FillRateHelper","_updateCellsToRenderBatcher","updateCellsBatchingPeriod","initialState","initialNumToRender","storedState","_getListKey","veryLast","onScrollToIndexFailed","viewOffset","viewPosition","averageItemLength","highestMeasuredFrameIndex","_getCellKey","_this$context","_getDebugInfo","_this$context2","deactivateAndFlush","getDerivedStateFromProps","_pushCells","cells","stickyIndicesFromProps","inversionStyle","prevCellKey","_this$props6","CellRendererComponent","ItemSeparatorComponent","stickyOffset","ListHeaderComponent","CellRenderer","fillRateHelper","onUpdateSeparators","_onCellLayout","onUnmount","parentProps","disableVirtualization","nestedContext","_this$props7","ListEmptyComponent","ListFooterComponent","_this$props8","horizontallyInverted","verticallyInverted","ListHeaderComponentStyle","spacerKey","lastInitialIndex","_this$state","firstAfterInitial","insertedStickySpacer","initBlock","stickyBlock","leadSpace","trailSpace","_initBlock","firstSpace","lastFrame","tailSpacerLength","_element","_element2","ListFooterComponentStyle","scrollProps","renderScrollComponent","_renderDebugOverlay","_this$props9","extraData","hiPriInProgress","computeBlankness","stack","framesInLayout","windowTop","frameLast","windowLen","visTop","visLen","debugOverlayBase","debugOverlay","debugOverlayFrame","debugOverlayFrameLast","debugOverlayFrameVis","_this$props10","onEndReached","_this$_scrollMetrics2","distanceFromEnd","_this$state2","_this$_scrollMetrics3","hiPri","scrollingThreshold","distTop","distBottom","contextType","separatorProps","highlighted","leadingItem","_separators","highlight","_this6$props","unhighlight","_this6$props2","updateProps","_this6$props3","_proto2","_renderElement","_this$props11","itemSeparator","cellStyle","rowReverse","columnReverse","emptyFunction","StatusBar","setBackgroundColor","setBarStyle","setHidden","setNetworkActivityIndicatorVisible","setTranslucent","valueIn","jointCallback","getLayout","getTranslateTransform","BackHandler","exitApp","createContext","getByID","getStyle","styleLength","computedStyle","initialAngleRoll","initialAngleYaw","numDimensions","simulation","nDim","alphaMin","alphaDecay","alphaTarget","velocityDecay","forces","stepper","timer","dispatch","lcg","fx","vx","fy","vy","fz","vz","initializeNodes","cbrt","rollAngle","yawAngle","initializeForce","initialize","randomSource","closest","on","getVariableName","template","indent","indentString","variableName","a0","a1","a3","a4","a5","a6","a7","a8","a9","dark","primary","card","notification","resizeObserver","ResizeObserver","unobserve","matchers","hex6","names","rgb","parse255","rgba","parse1","hex3","hex8","hex4","hsl","hslToRgb","parse360","parsePercentage","hsla","NUMBER","arrayLike","int","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","colorInt","startNativeAnimationNextId","Animation","fromValue","onEnd","__nativeId","__debouncedOnEnd","__onEnd","__startNativeAnimation","startNativeAnimationWaitId","SingleNavigatorContext","EnsureSingleNavigator","navigatorKeyRef","currentKey","defaultOffset","createCompileableStyle","textShadowOffset","textShadowRadius","nextStyles","resolvedStyle","boxShadowReducer","textShadow","textShadowReducer","createOrderedCSSStyleSheet","sheet","selectors","cssRules","cssRule","cssText","selectorText","decodeGroupRule","getSelectorText","sheetInsert","orderedGroups","getOrderedGroups","nextGroupIndex","nextGroup","isInserted","insertRule","insertRuleAt","groupNumber","previousStart","getTextContent","insert","groupValue","markerRule","encodeGroupRule","selector","flattenArray","flattenDown","PROPERTIES_FLIP","borderLeftStyle","borderLeftWidth","borderRightStyle","borderRightWidth","marginLeft","marginRight","paddingLeft","paddingRight","PROPERTIES_I18N","borderStartColor","borderStartStyle","borderStartWidth","borderEndColor","borderEndStyle","borderEndWidth","marginEnd","paddingStart","paddingEnd","PROPERTIES_VALUE","float","textAlign","additiveInverse","i18nStyle","originalStyle","_I18nManager$getConst","frozenProps","nextStyle","originalProp","originalValue","convertedProp","convertedValue","flippedValue","invertedValue","supportsCSS3TextDecoration","CSS","supports","mapTransform","createReactDOMStyle","backgroundClip","WebkitBackgroundClip","fontVariant","verticalAlign","textDecorationLine","textDecoration","resolveTransform","longFormProperties","longForm","seed","murmurhash2_32_gc","ms","wm","wms","wmms","plugins","crossFade","flexboxIE","flexboxOld","gradient","imageSet","logical","sizing","transition","prefixMap","animationDelay","animationDirection","animationFillMode","animationDuration","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","textEmphasisPosition","textEmphasis","textEmphasisStyle","textEmphasisColor","boxDecorationBreak","clipPath","maskImage","maskMode","maskRepeat","maskPosition","maskClip","maskOrigin","maskSize","maskComposite","maskBorderSource","maskBorderMode","maskBorderSlice","maskBorderWidth","maskBorderOutset","maskBorderRepeat","maskBorder","maskType","textDecorationStyle","textDecorationSkip","fontFeatureSettings","breakAfter","breakBefore","breakInside","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columns","columnSpan","columnWidth","writingMode","flexFlow","flexWrap","alignContent","justifyContent","transformOrigin","transformOriginX","transformOriginY","backfaceVisibility","perspectiveOrigin","transformStyle","transformOriginZ","backdropFilter","fontKerning","scrollSnapPointsX","scrollSnapPointsY","scrollSnapDestination","scrollSnapCoordinate","shapeImageThreshold","shapeImageMargin","shapeImageOutside","hyphens","flowInto","flowFrom","regionFragment","textOrientation","textAlignLast","tabSize","wrapFlow","wrapThrough","wrapMargin","textSizeAdjust","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","transitionDelay","transitionTimingFunction","prefixAll","createPrefixer","staticData","acc","valueString","stringifyValueWithProperty","cachedResult","_identifier","createIdentifier","_processKeyframesValu2","processKeyframesValue","animationNames","keyframesRules","block","createDeclarationBlock","_block","finalValue","_block3","_block4","_block2","_block5","_createDeclarationBlo","_block6","createAtomicRules","_cachedResult","animationKeyframes","_processKeyframesValu","prefixedStyles","prefixInlineStyles","normalizedValue","domStyle","prefixStyles","hyphenateStyleName","keyframesValue","keyframes","_createKeyframes","stepName","createKeyframes","resets","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","tel","email","password","date","month","week","datetime","metaKey","ctrlKey","isValidFocusTarget","addFocusVisibleAttribute","onPointerDown","el","tagName","isReadOnly","isContentEditable","focusTriggersKeyboardModality","removeFocusVisibleAttribute","addInitialPointerMoveListeners","querySelectorAll","removeAllFocusVisibleAttributes","onInitialPointerMove","createCacheKey","classListToString","inserted","resolved","ltr","rtl","rtlNoSwap","getElementById","head","insertBefore","firstChild","createCSSStyleSheet","rule","initialRules","_injectRegisteredStyle","_results$key","addToCache","_resolveStyle","_I18nManager$getConst2","localizedStyle","styleProp","getClassName","_atomic","_a$key","getStyleSheet","textContent","compiled","_compiled$key","nextClassList","flatArray","isArrayOfNumbers","finalProps","createStyleResolver","isStartish","isMoveish","isEndish","isCancelish","touchBank","touchHistory","numberActiveTouches","indexOfSingleActiveTouch","mostRecentTimeStamp","timestampForTouch","getTouchIdentifier","recordTouchStart","touchRecord","touchActive","startPageX","startPageY","startTimeStamp","currentPageX","currentPageY","currentTimeStamp","previousPageX","previousPageY","previousTimeStamp","resetTouchRecord","createTouchRecord","recordTouchMove","printTouch","printTouchBank","recordTouchEnd","printed","ResponderTouchHistoryStore","recordTouchTrack","topLevelType","touchTrackToCheck","emptyArray","createResponderEvent","domEvent","propagationWasStopped","domEventChangedTouches","domEventType","clientX","clientY","normalizeTouches","locationX","locationY","emulatedTouches","responderEvent","bubbles","eventPhase","isPropagationStopped","isTrusted","composedPathFallback","body","getResponderId","getResponderPaths","idPath","nodePath","eventPath","getSelection","anchorNode","composedPath","getEventPath","hasValidSelection","focusNode","isTextNode","TEXT_NODE","isSelectionValid","startRegistration","moveRegistration","shouldSetResponderEvents","touchstart","mousedown","touchmove","mousemove","emptyResponder","responderListenersMap","isEmulatingMouseEvents","trackedTouchCount","currentResponder","changeCurrentResponder","responder","getResponderConfig","eventListener","eventTarget","isStartEvent","button","buttons","noModifiers","isPrimaryPointerDown","isMoveEvent","isEndEvent","isScrollEvent","isScroll","isSelectionChangeEvent","isSelectionChange","wantsResponder","eventPaths","wasNegotiated","currentResponderIdPath","eventIdPath","lowestCommonAncestor","pathA","pathB","pathALength","pathBLength","itemA","itemB","getLowestCommonAncestor","shouldSetCallbacks","shouldSetCallbackCaptureName","shouldSetCallbackBubbleName","check","callbackName","shouldSetCallback","_node","_result","_id2","_node2","findWantsResponder","_currentResponder2","currentId","currentNode","_getResponderConfig2","_getResponderConfig3","allowTransfer","attemptTransfer","_currentResponder","_getResponderConfig","isTerminateEvent","contains","relatedTarget","isReleaseEvent","hasTargetTouches","shouldTerminate","documentEventsCapturePhase","documentEventsBubblePhase","_currentResponder3","terminateResponder","idCounter","getInitialValue","isAttachedRef","__reactResponderSystemActive","ResponderSystem","requiresResponderSystem","setResponderId","isResponder","accessibilityRoleToWebRole","adjustable","imagebutton","keyboardkey","label","link","summary","propsToAriaRole","inferredRole","roleComponents","article","banner","blockquote","code","complementary","contentinfo","deletion","emphasis","figure","insertion","form","listitem","main","region","strong","buttonLikeRoles","menuitem","isDisabled","accessibilityStates","I18n","isSet","isBoolean","isNull","decimalAdjust","NaN","lazyEvaluate","DATE","day_names","abbr_day_names","month_names","abbr_month_names","meridian","NUMBER_FORMAT","separator","delimiter","strip_insignificant_zeros","CURRENCY_FORMAT","sign_first","PERCENTAGE_FORMAT","SIZE_UNITS","DEFAULT_OPTIONS","defaultLocale","locale","defaultSeparator","fallbacks","translations","missingBehaviour","missingTranslationPrefix","initializeOptions","locales","localeParts","firstFallback","secondFallback","nullableFallbackLocale","pluralization","currentLocale","lookup","scopes","fullScope","getFullScope","pluralizationLookupWithoutFallback","pluralizerKey","pluralizerKeys","pluralizer","pluralizationLookup","am","pm","prepareOptions","subject","attr","createTranslationOptions","translationOptions","defaults","translation","usedScope","optionsWithoutDefault","translationOption","pluralize","missingTranslation","nullPlaceholder","missingPlaceholder","toNumber","formattedNumber","negative","toFixed","toCurrency","localize","toPercentage","localizedValue","toTime","parseDate","convertedDate","fraction","UTC","setTime","$1","$2","$3","$6","$4","$5","strftime","meridianOptions","weekDay","getDay","day","getDate","year","getFullYear","getMonth","hour","getHours","hour12","secs","getSeconds","mins","getMinutes","getTimezoneOffset","absOffsetHours","absOffsetMinutes","timezoneoffset","dateString","date_string","toHumanSize","obj1","obj2","CSS_UNIT_RE","multiple","KeyboardAvoidingView","relativeKeyboardHeight","keyboardFrame","keyboardY","keyboardVerticalOffset","onKeyboardChange","BaseRouter","getStateForAction","routes","route","shouldActionChangeFocus","RootTagContext","AppContainer","WrapperComponent","innerView","appContainer","rootTag","wrapperComponentProvider","runnables","componentProviderInstrumentationHook","AppRegistry","getAppKeys","getApplication","appKey","appParameters","registerComponent","componentProvider","RootComponent","initialProps","getStyleElement","dangerouslySetInnerHTML","__html","shouldHydrate","hydrate","renderFn","renderApplication","registerConfig","registerRunnable","runApplication","setComponentProviderInstrumentationHook","setWrapperComponentProvider","provider","unmountApplicationComponentAtRootTag","unmountComponentAtNode","aspectRatio","boxFlex","boxFlexGroup","boxOrdinalGroup","flexOrder","flexPositive","flexNegative","fontWeight","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","lineClamp","orphans","widows","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixes","prefixKey","uniqueID","createKey","UNINITIALIZED","_objectWithoutProperties","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","_toPropertyKey","hint","prim","_toPrimitive","keyAccessors","multiItem","flattenKeys","keyAccessor","isProp","indexedResult","iterObj","itemVal","_itemVal","propVal","accKeys","vals","trimLeft","trimRight","tinyCounter","mathRound","mathMin","mathMax","mathRandom","tinycolor","ok","hsv","hsva","parseIntFromHex","convertHexToDecimal","stringInputToObject","isValidCSSUnit","bound01","convertToPercentage","mod","hsvToRgb","boundAlpha","inputToRGB","_originalInput","_r","_g","_roundA","_format","_gradientType","gradientType","_ok","_tc_id","rgbToHsl","rgbToHsv","rgbToHex","allow3Char","pad2","rgbaToArgbHex","convertDecimalToHex","desaturate","toHsl","clamp01","saturate","greyscale","lighten","brighten","toRgb","darken","spin","complement","triad","tetrad","splitcomplement","analogous","slices","monochromatic","toHsv","modification","isDark","getBrightness","isValid","getOriginalInput","getFormat","getAlpha","getLuminance","RsRGB","GsRGB","BsRGB","setAlpha","toHsvString","toHslString","toHex","toHexString","toHex8","allow4Char","rgbaToHex","toHex8String","toRgbString","toPercentageRgb","toPercentageRgbString","toName","hexNames","toFilter","secondColor","hex8String","secondHex8String","formatSet","formattedString","hasAlpha","_applyModification","_applyCombination","fromRatio","newColor","rgb1","rgb2","readability","isReadable","wcag2","wcag2Parms","parms","validateWCAG2Parms","mostReadable","baseColor","colorList","includeFallbackColors","bestColor","bestScore","flipped","flip","isOnePointZero","processPercent","isPercentage","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","SUPPRESS_STATE_ACCESS_WARNING","useRouteCache","freeGlobal","freeSelf","arrayPush","objectProto","objectToString","spreadableSymbol","isConcatSpreadable","nativeMax","isFlattenable","isObjectLike","isLength","isArrayLike","isArrayLikeObject","isArguments","toKey","isSymbol","basePickBy","basePick","iteratee","arrayMap","baseFlatten","isStrict","otherArgs","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","marker","runClearTimeout","Item","nextTick","title","browser","argv","versions","off","prependListener","prependOnceListener","cwd","chdir","umask","_arity","_curry2","_curryN","curryN","processColor","int32Color","getFontScale","getPixelSizeForLayoutSize","layoutSize","roundToNearestPixel","ratio","progressBackgroundColor","titleColor","MemoedTouchableWithoutFeedback","only","elementProps","Keyboard","dismiss","cssFunction","SafeAreaView","paddingTop","paddingBottom","createExtraStyles","underlayColor","underlay","hasPressHandler","MemoedTouchableHighlight","onHideUnderlay","onShowUnderlay","testOnly_pressed","extraStyles","setExtraStyles","showUnderlay","hideUnderlay","CurrentRenderContext","useBackButton","ThemeProvider","VirtualizedSectionList","sections","itemIdx","section","sectionData","_subExtractor","_convertViewable","_onViewableItemsChanged","_renderItem","listItemCount","infoIndex","renderSectionHeader","renderSectionFooter","SeparatorComponent","_getSeparatorComponent","ItemWithSeparator","LeadingSeparatorComponent","SectionSeparatorComponent","leadingSection","onUpdateSeparator","_onUpdateSeparator","trailingItem","trailingSection","scrollToLocation","itemIndex","sectionIndex","stickySectionHeadersEnabled","toIndexParams","getListRef","passThroughProps","listHeaderOffset","isLastItemInList","isLastItemInSection","leadingSeparatorProps","_this3$props","leadingSeparator","_wrapperListRef","listRef","createMemoryHistory","interrupt","backIndex","go","interrupted","onPopState","listen","findMatchingState","aHistoryLength","bHistoryLength","aRoute","bRoute","aChildState","bChildState","isUsingLinking","useLinking","getStateFromPath","getPathFromState","getActionFromState","getActionFromStateDefault","enabledRef","configRef","getStateFromPathRef","getActionFromStateRef","getPathFromStateRef","server","location","thenable","onfulfilled","previousIndexRef","previousStateRef","pendingPopStatePathRef","history","previousIndex","record","rootState","handling","series","pendingPath","previousFocusedState","historyDelta","focusedState","currentIndex","uppercasePattern","toHyphenLower","processIDRefList","idRefList","listStyle","pointerEventsStyles","auto","elementType","providedStyle","isNativeInteractiveElement","contentEditable","_prop","required","dataProp","dataName","dataValue","_focusable","tabIndex","reactNativeStyle","needsCursor","finalClassList","_styleResolver$resolv","isSpacebarKey","nativeModule","_nativeModule","_this$_nativeModule","RCTDeviceEventEmitter","_this$_nativeModule2","removeListeners","_this$_nativeModule3","_this$_nativeModule4","UnhandledActionContext","ScheduleUpdateContext","scheduleUpdate","flushUpdates","useScheduleUpdate","useChildListeners","useKeyedChildListeners","keyedListeners","getState","beforeRemove","addKeyedListener","useOptionsGetters","optionsRef","optionsGettersFromChildRef","parentAddOptionsGetter","addOptionsGetter","optionsChangeListener","hasChildren","getOptionsFromListener","getCurrentOptions","optionsFromListener","useEventEmitter","listenRef","canPreventDefault","Screen","strictUriEncode","decodeComponent","splitOnFirst","filterObject","validateArrayFormatSeparator","encode","strict","removeHash","hashStart","extract","queryStart","parseValue","parseNumbers","parseBooleans","query","arrayFormat","arrayFormatSeparator","formatter","isEncodedArray","parserForArrayFormat","keysSorter","shouldFilter","skipNull","isNullOrUndefined","skipEmptyString","encoderForArrayFormat","objectCopy","parseUrl","url_","parseFragmentIdentifier","fragmentIdentifier","stringifyUrl","queryFromUrl","parsedQueryFromUrl","queryString","getHash","exclude","exclusionFilter","checkLegacyPathConfig","legacy","screens","ThemeContext","_isString","_isArray","_has","hasEnumBug","nonEnumerableProps","hasArgsEnumBug","_makeFlat","flatt","jlen","ilen","pad","toISOString","ws","isWebColor","dataBindDiff","existingObjs","_ref3$objBindAttr","objBindAttr","_ref3$dataBindAttr","dataBindAttr","idAccessor","_ref3$purge","purge","isObjValid","removeObjs","prevD","enter","exit","prevById","nextById","byId","prevSet","nextSet","diffArrays","nextD","appendObj","removeObj","_ref7","_ref7$createObj","createObj","_ref7$updateObj","updateObj","_ref7$exitObj","exitObj","_ref7$objBindAttr","_ref7$dataBindAttr","dataDiffOptions","_dataBindDiff","_objectSpread2","newObjs","createObjs","updateObjs","_inherits","_isNativeReflectConstruct","sham","_construct","Parent","Class","_possibleConstructorReturn","_createSuper","Derived","hasNativeReflectConstruct","Super","NewTarget","deallocate","materialDispose","childObj","_excluded","threeDigest","_ref$objFilter","objFilter","autoColorScale","autoColorObjects","colorByAccessor","colorField","three$1","THREE","SphereBufferGeometry","CylinderBufferGeometry","TubeBufferGeometry","ConeBufferGeometry","ngraph","graph","forcelayout","setAttributeFn","applyMatrix4Fn","threeForcegraph","kapsule","baseClass","initKapsuleWithSelf","FromKapsule","_baseClass","__kapsuleInstance","_this$__kapsuleInstan","returnVal","fromKapsule","jsonUrl","fetchingJson","onLoading","onFinishLoading","graphData","links","engineRunning","numDim","chargeForce","d3ForceLayout","eraseDimension","strength","dagMode","forceEngine","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeColor","nodeAutoColorBy","nodeOpacity","nodeVisibility","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","d3AlphaMin","d3AlphaDecay","d3AlphaTarget","d3VelocityDecay","ngraphPhysics","timeStep","gravity","springLength","springCoefficient","dragCoefficient","warmupTicks","cooldownTicks","cooldownTime","onFinishUpdate","onEngineTick","onEngineStop","refresh","_flushObjects","d3Force","forceName","forceFn","d3ReheatSimulation","resetCountdown","cntTicks","startTickTime","tickFrame","isD3Sim","__threeObj","pos","getNodePosition","linkWidthAccessor","linkCurvatureAccessor","linkCurveRotationAccessor","linkThreeObjectExtendAccessor","lineObj","__lineObj","getLinkPosition","getLink","curvature","curveRotation","vLine","cp","applyAxisAngle","endAngle","startAngle","__curve","calcLinkCurve","extendedObj","linePos","localToWorld","layoutTick","arrowRelPosAccessor","arrowLengthAccessor","nodeValAccessor","arrowObj","__arrowObj","startR","endR","arrowLength","arrowRelPos","getPosAlongLine","iplt","lineLen","posAlongLine","arrowHead","arrowTail","headVec","updateArrows","particleSpeedAccessor","cyclePhotons","__photonsObj","singleHopPhotons","__singleHopPhotonsObj","particleSpeed","getPhotonPos","photon","singleHop","__linkThreeObjType","__progressRatio","photonPosRatio","updatePhotons","emitParticle","graphScene","particleWidthAccessor","photonR","numSegments","particleGeometry","linkColorAccessor","photonColor","particleColorAccessor","materialColor","particleMaterial","getGraphBbox","nodeFilter","bboxes","getBboxes","__graphObjType","__data","bb","threeObj","hasAnyPropChanged","propList","customObjectAccessor","customObjectExtendAccessor","valAccessor","colorAccessor","visibilityAccessor","sphereGeometries","sphereMaterials","customObj","extendObj","__graphDefaultObj","_customObjectAccessor","_customObjectExtendAccessor","customMaterialAccessor","_visibilityAccessor","_colorAccessor","widthAccessor","cylinderGeometries","lambertLineMaterials","basicLineMaterials","visibleLinks","defaultObj","lineGeometry","updObj","useCylinder","materialType","lineMaterials","arrowColorAccessor","coneGeometry","particlesAccessor","particleMaterials","particleGeometries","numPhotons","curPhoton","linkForce","nodeDepths","_ref2$nodeFilter","_ref2$onLoopError","onLoopError","loopIds","skip","sourceId","getNodeId","targetId","sourceNode","foundLoops","_ref6","nodeStack","currentDepth","_ret","foundLoop","getDagDepths","getFFn","fix","fxFn","fyFn","fzFn","nodeDepth","_graph","addNode","addLink","propIsEnumerable","toObject","test1","test2","test3","letter","shouldUseNative","reservedWords","validateSubject","eventsStorage","registeredEvents","fire","fireArguments","callbackInfo","createEventsStorage","StackActions","payload","popToTop","StackRouter","router","routeParamList","initialRouteName","routeNames","stale","getRehydratedState","getStateForRouteNamesChange","getStateForRouteFocus","actionCreators","methodname","_isArguments","nIdx","ks","checkArgsLength","isScreenReaderEnabled","prefersReducedMotionMedia","matchMedia","AccessibilityInfo","isReduceMotionEnabled","setAccessibilityFocus","reactTag","announceForAccessibility","announcement","Alert","alert","listenerMapping","Appearance","getColorScheme","addChangeListener","mappedListener","colorScheme","removeChangeListener","isPrefixed","EVENT_TYPES","VISIBILITY_CHANGE_EVENT","VISIBILITY_STATE_PROPERTY","AppStates","AppState","isAvailable","listenerIndex","findIndex","clipboardAvailable","Clipboard","queryCommandSupported","getString","setString","appendChild","removeAllRanges","createRange","selectNodeContents","addRange","execCommand","DeviceInfo","_Dimensions$get","_Dimensions$get2","languages","language","deviceMemory","userAgent","configureNext","Presets","easeInEaseOut","springDamping","LayoutAnimation","Types","easeIn","easeOut","keyboard","Properties","scaleXY","checkConfig","initialURL","Linking","_eventCallbacks","filteredCallbacks","_dispatchEvent","canOpenURL","getInitialURL","openURL","_validateURL","urlToOpen","URL","TouchHistoryMath","centroidDimension","touchesChangedAfter","isXAxis","ofCurrent","oneTouchData","touchTrack","noCentroid","currentCentroidXOfTouchesChangedAfter","currentCentroidYOfTouchesChangedAfter","previousCentroidXOfTouchesChangedAfter","previousCentroidYOfTouchesChangedAfter","currentCentroidX","currentCentroidY","PanResponder","_initializeGestureState","gestureState","moveX","moveY","_accountsForMovesUpTo","_updateGestureStateOnMove","movedAfter","prevX","prevY","nextDX","nextDY","interactionState","shouldCancelClick","stateID","panHandlers","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","clearInteractionTimeout","onPanResponderGrant","onShouldBlockNativeResponder","onPanResponderReject","onPanResponderRelease","setInteractionTimeout","onPanResponderStart","onPanResponderMove","onPanResponderEnd","onPanResponderTerminate","onPanResponderTerminationRequest","getInteractionHandle","Share","share","_vibrate","vibrate","Vibration","createSvgCircle","ActivityIndicator","_props$animating","animating","_props$color","_props$hidesWhenStopp","hidesWhenStopped","_props$size","viewBox","stroke","indicatorSizes","animationPause","small","large","Button","TouchableOpacity","buttonDisabled","textDisabled","textTransform","CheckBox","fakeControl","fakeControlChecked","fakeControlDisabled","fakeControlCheckedAndDisabled","ImageBackground","imageStyle","imageRef","ModalPortal","elementRef","ReactDOM","createPortal","getAnimationStyle","animationType","animatedSlideInStyles","animatedSlideOutStyles","animatedFadeInStyles","animatedFadeOutStyles","hidden","animatedIn","ANIMATION_DURATION","animatedOut","slideIn","slideOut","ModalAnimation","onDismiss","onShow","isRendering","setIsRendering","wasVisible","isAnimated","animationEndCallback","onAnimationEnd","ModalContent","active","onRequestClose","closeOnEscape","modal","modalTransparent","modalOpaque","FocusBracket","focusBracket","attemptFocus","ModalFocusTrap","trapElementRef","focusRef","trapFocusInProgress","lastFocusedElement","trapFocus","hasFocused","focusFirstDescendant","focusLastDescendant","lastFocusedElementOutsideTrap","outlineStyle","uniqueModalIdentifier","activeModalStack","activeModalListeners","notifyActiveModalListeners","activeModalId","modalId","removeActiveModal","Modal","_props$visible","isActive","setIsActive","onDismissCallback","onShowCallback","addActiveModal","Picker","selectedValue","itemStyle","prompt","_e$target","selectedIndex","initial","fontFamily","fontSize","canUsePassiveEvents","supported","supportsPassiveEvents","cancelBubble","createEventHandle","capture","getOptions","compatListener","previousModality","previousActiveModality","activeModality","bubbleOptions","passive","captureOptions","addBlurListener","addFocusListener","addVisibilityChangeListener","addKeyDownListener","addPointerDownListener","addPointerMoveListener","addContextMenuListener","addMouseDownListener","addMouseMoveListener","addMouseUpListener","addScrollListener","addSelectiomChangeListener","addTouchCancelListener","addTouchMoveListener","addTouchStartListener","restoreModality","callListeners","onPointerish","PointerEvent","pointerType","useEvent","targetListeners","removeTargetListener","dispatchCustomEvent","createEvent","_ref$bubbles","_ref$cancelable","initCustomEvent","getPointerType","useHover","targetRef","onHoverStart","onHoverChange","onHoverUpdate","onHoverEnd","canUsePE","addMoveListener","addEnterListener","addLeaveListener","addLockListener","addUnlockListener","hoverEnd","leaveListener","moveListener","hoverStart","lockEvent","useForceableState","forced","MemoedPressable","memo","onHoverIn","onHoverOut","testOnly_hovered","_useForceableState","hovered","setHovered","_useForceableState2","focused","setFocused","_useForceableState3","pressed","setPressed","onContextMenuPress","onKeyDownPress","blurHandler","focusHandler","contextMenuHandler","keyDownHandler","ProgressBar","_props$indeterminate","indeterminate","_props$progress","progress","percentageProgress","progressRef","twoArgumentPooler","instancePool","standardReleaser","destructor","poolSize","DEFAULT_POOLER","PooledClass","addPoolingTo","CopyConstructor","pooler","NewKlass","getPooled","release","BoundingDimensions","getPooledFromElement","Position","extractSingleTouch","hasTouches","hasChangedTouches","States","baseStatesConditions","RESPONDER_INACTIVE_PRESS_IN","RESPONDER_INACTIVE_PRESS_OUT","RESPONDER_ACTIVE_PRESS_IN","RESPONDER_ACTIVE_PRESS_OUT","RESPONDER_ACTIVE_LONG_PRESS_IN","RESPONDER_ACTIVE_LONG_PRESS_OUT","IsActive","IsPressingIn","IsLongPressingIn","Signals","ENTER_PRESS_RECT","LEAVE_PRESS_RECT","TouchableMixin","_touchableNode","_touchableBlurListener","_isTouchableKeyboardActive","touchable","touchState","touchableHandleResponderTerminate","touchableDelayTimeout","longPressDelayTimeout","pressOutDelayTimeout","pressInLocation","responderID","touchableGetInitialState","touchableHandleResponderTerminationRequest","touchableHandleStartShouldSetResponder","touchableLongPressCancelsPress","touchableHandleResponderGrant","dispatchID","touchableGetHighlightDelayMS","_handleDelay","longDelayMS","touchableGetLongPressDelayMS","LONG_PRESS_THRESHOLD","_handleLongDelay","touchableHandleResponderRelease","touchableHandleResponderMove","positionOnActivate","dimensionsOnActivate","pressRectOffset","touchableGetPressRectOffset","pressExpandLeft","pressExpandTop","pressExpandRight","pressExpandBottom","hitSlop","touchableGetHitSlop","_getDistanceBetweenPoints","touchableHandleFocus","touchableHandleBlur","_remeasureMetricsOnActivation","_handleQueryLayout","globalX","globalY","curState","_performSideEffectsForTransition","_isHighlight","_savePressInLocation","bX","bY","curIsHighlight","newIsHighlight","isInitialTransition","isActiveTransition","touchableHandleLongPress","_startHighlight","_endHighlight","hasLongPressHandler","pressIsLongButStillCallOnPress","touchableHandlePress","_playTouchSound","playTouchSound","touchableHandleActivePressIn","touchableHandleActivePressOut","touchableGetPressOutDelayMS","touchableHandleKeyEvent","withoutDefaultFocusAndBlur","TouchableMixinWithoutDefaultFocusAndBlur","Touchable","TOUCH_TARGET_DEBUG","renderDebugView","debugHitSlopStyle","hexColor","YellowBox","ignoreWarnings","promiseMock","PERMISSIONS","RESULTS","checkPermission","requestPermission","requestMultiple","useColorScheme","setColorScheme","useWindowDimensions","dims","setDims","handleChange","msPattern","hName","ENABLE_SCREENS","enableScreens","shouldEnableScreens","screensEnabled","activityState","ScreenContainer","NativeScreenContainer","ScreenStack","ScreenStackHeaderBackButtonImage","fadeDuration","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderConfig","ScreenStackHeaderSubview","shouldUseActivityState","_Animation","_config$overshootClam","_config$restDisplacem","_config$restSpeedThre","_config$velocity","_config$velocity2","_config$delay","_config$isInteraction","_config$iterations","_config$stiffness","_config$damping","_config$mass","_overshootClamping","overshootClamping","_restDisplacementThreshold","restDisplacementThreshold","_restSpeedThreshold","restSpeedThreshold","_initialVelocity","_lastVelocity","_toValue","isInteraction","__iterations","stiffness","damping","mass","speed","friction","_stiffness","_damping","_mass","_config$bounciness","_config$speed","springConfig","SpringConfig","fromBouncinessAndSpeed","_config$tension","_config$friction","_springConfig","fromOrigamiTensionAndFriction","_this$_initialVelocit","initialVelocity","__active","_startPosition","_lastPosition","_onUpdate","_lastTime","_frameTime","internalState","getInternalState","lastPosition","lastVelocity","lastTime","_timeout","zeta","omega0","omega1","envelope","_envelope","isOvershooting","isVelocity","isDisplacement","_animationFrame","stiffnessFromOrigamiValue","oValue","dampingFromOrigamiValue","projectNormal","bouncyTension","bouncyFriction","b3Friction2","b3Friction3","b3Nobounce","linearInterpolation","_easeInOut","_config$easing","_config$duration","_easing","numFrames","_fromValue","iterable","omit","keySet","kapsuleComponent","comboParam","wrapperElementType","methodNames","initPropNames","_ref$wrapperElementTy","_ref$nodeMapper","nodeMapper","_ref$methodNames","_ref$initPropNames","domEl","setPrevProps","configOptions","_destructor","_call","dynamicProps","insertAt","getElementsByTagName","styleSheet","createTextNode","styleInject","innerWidth","innerHeight","showNavInfo","nodeLabel","nodeDesc","onNodeHover","onNodeClick","linkLabel","linkDesc","onLinkHover","onLinkClick","aframeComp","forcegraph","domNode","innerHTML","navInfo","cameraG","tooltipEl","subTooltipEl","mouseCursor","laser","cct","prevObj","subLabel","_ref8","_ref9","yOffset","glScale","_ref2$markerAttrs","markerAttrs","preset","arMarker","cameraEntity","_ref10","_ref11","_plane","_raycaster","_pointer","_intersection","_worldPosition","_camera","_domElement","_selected","_hovered","_intersections","onPointerMove","onPointerCancel","deactivate","updatePointer","setFromCamera","intersectPlane","intersectObjects","getWorldDirection","transformGroup","getObjects","_changeEvent","_startEvent","_endEvent","STATE","rotateSpeed","zoomSpeed","panSpeed","noRotate","noZoom","noPan","staticMoving","dynamicDampingFactor","minDistance","maxDistance","mouseButtons","lastZoom","_keyState","_touchZoomDistanceStart","_touchZoomDistanceEnd","_lastAngle","_eye","_movePrev","_moveCurr","_lastAxis","_zoomStart","_zoomEnd","_panStart","_panEnd","_pointers","_pointerPositions","target0","position0","up0","zoom0","handleResize","ownerDocument","pageXOffset","clientLeft","pageYOffset","clientTop","getMouseOnScreen","getMouseOnCircle","onPointerUp","addPointer","trackPointer","pointer","pointerId","getSecondPointerPosition","removePointer","keydown","keyup","onMouseWheel","deltaMode","contextmenu","rotateCamera","eyeDirection","objectUpDirection","objectSidewaysDirection","moveDirection","setLength","zoomCamera","panCamera","mouseChange","objectUp","pan","scale_x","scale_y","checkDistances","minZoom","maxZoom","minPolarAngle","maxPolarAngle","minAzimuthAngle","maxAzimuthAngle","enableDamping","dampingFactor","enableZoom","enableRotate","enablePan","screenSpacePanning","keyPanSpeed","autoRotate","autoRotateSpeed","UP","BOTTOM","ONE","TWO","_domElementKeyEvents","getPolarAngle","spherical","getAzimuthalAngle","listenToKeyEvents","saveState","quat","setFromUnitVectors","quatInverse","lastQuaternion","twoPI","setFromVector3","rotateLeft","sphericalDelta","makeSafe","panOffset","setFromSpherical","zoomChanged","EPS","TOUCH_ROTATE","TOUCH_PAN","TOUCH_DOLLY_PAN","TOUCH_DOLLY_ROTATE","rotateStart","rotateEnd","rotateDelta","panStart","panEnd","panDelta","dollyStart","dollyEnd","dollyDelta","pointers","pointerPositions","getZoomScale","rotateUp","panLeft","objectMatrix","panUp","targetDistance","dollyOut","dollyScale","dollyIn","handleMouseDownRotate","handleMouseDownPan","handleTouchStartRotate","handleTouchStartPan","handleTouchStartDolly","handleTouchMoveRotate","handleTouchMovePan","handleTouchMoveDolly","mouseAction","handleMouseDownDolly","handleTouchMoveDollyPan","handleTouchMoveDollyRotate","handleMouseMoveRotate","handleMouseMoveDolly","handleMouseMovePan","handleMouseWheel","handleKeyDown","movementSpeed","rollSpeed","dragToLook","autoForward","tmpQuaternion","mouseStatus","moveState","down","forward","pitchUp","pitchDown","yawLeft","yawRight","rollLeft","rollRight","moveVector","rotationVector","movementSpeedMultiplier","updateMovementVector","updateRotationVector","getContainerDimensions","mouseup","moveMult","rotMult","offsetLeft","offsetTop","_mousedown","_mousemove","_mouseup","_keydown","_keyup","CopyShader","Pass","needsSwap","renderToScreen","textureID","fsQuad","writeBuffer","readBuffer","writeValue","clearValue","REPLACE","ALWAYS","EQUAL","KEEP","renderTarget1","renderTarget2","passes","copyPass","clock","passIndex","maskActive","isLastEnabledPass","NOTEQUAL","swapBuffers","effectiveWidth","effectiveHeight","_oldClearColor","oldAutoClear","oldClearAlpha","oldOverrideMaterial","_cache","Wrapper","_Error","PolishedError","colorToInt","convertToInt","huePrime","chroma","secondComponent","lightnessModification","namedColorMap","hexRegex","hexRgbaRegex","reducedHexRegex","reducedRgbaHexRegex","rgbRegex","rgbaRegex","hslRegex","hslaRegex","parseToRgb","normalizedColorName","nameToHex","rgbMatched","rgbaMatched","hslMatched","rgbColorString","hslRgbMatched","hslaMatched","_rgbColorString","_hslRgbMatched","reduceHexValue","numberToHex","firstValue","secondValue","thirdValue","fourthValue","rgbValue","curry","curried","combined","guard","lowerBoundary","upperBoundary","opacify","parsedColor","curriedOpacify","three","prevWidth","prevHeight","backgroundImageUrl","onBackgroundImageLoaded","skyRadius","enablePointerInteraction","hoverObj","toolTipElem","lineHoverPrecision","hoverOrderComparator","hoverFilter","tooltipContent","hoverDuringDrag","clickAfterDrag","onHover","onRightClick","controls","postProcessingComposer","extraRenderers","topObject","isPointerDragging","intersectingObjects","pointerPos","topIntersect","intersectionPoint","getPointerPos","_state$pointerPos","finalPos","finalLookAt","camPos","camLookAt","getLookAt","setCameraPos","setLookAt","zoomToFit","bboxArgs","fitToBbox","getBbox","bbox","maxBoxSide","coordType","paddedFov","fitHeightDistance","fitWidthDistance","newCameraPosition","objs","getScreenCoords","project","getSceneCoords","screenX","relCoords","tbControls","_ref4$controlType","controlType","_ref4$rendererConfig","rendererConfig","_ref4$extraRenderers","_ref4$waitForLoadComp","waitForLoadComplete","orbit","trackball","fly","evType","isPointerPressed","pressure","movementX","movementY","getOffset","addPass","controlsEngaged","controlsDragging","skysphere","loadComplete","finishLoad","linkKapsule","kapsulePropName","kapsuleType","dummyK","linkProp","linkMethod","kapsuleInstance","bindFG","linkedFGProps","linkedFGMethods","bindRenderObjs","linkedRenderObjsProps","linkedRenderObjsMethods","graph2ScreenCoords","screen2GraphCoords","getGraphObj","linkHoverPrecision","renderObjs","enableNavigationControls","enableNodeDrag","onNodeDrag","onNodeDragEnd","onNodeRightClick","onLinkRightClick","onBackgroundClick","onBackgroundRightClick","_state$forceGraph","forceGraph","pauseAnimation","animationFrameRequestId","resumeAnimation","_animationCycle","roDomNode","infoElem","lastSetCameraZ","_dragControls","curNodeDrag","__initialFixedPos","__disposeControlsAfterDrag","dragControls","__initialPos","__prevPos","nodeObj","initPos","prevPos","_newPos","newPos","__dragged","initFixedPos","aObj","bObj","graphObj","prevObjType","prevObjData","objType","objData","_fn","querySelector","childMatcher","childFirst","firstElementChild","EnterNode","datum","namespaceURI","_next","__data__","bindIndex","groupLength","dataLength","bindKey","keyValue","nodeByKeyValue","keyValues","arraylike","ascending","xhtml","xlink","xml","xmlns","namespaces","space","local","attrRemove","attrRemoveNS","fullname","removeAttributeNS","attrConstant","attrConstantNS","setAttributeNS","attrFunction","attrFunctionNS","defaultView","styleRemove","removeProperty","styleConstant","priority","styleFunction","getPropertyValue","getComputedStyle","propertyRemove","propertyConstant","propertyFunction","classArray","ClassList","_names","classedAdd","classedRemove","classedTrue","classedFalse","classedFunction","textRemove","textConstant","textFunction","htmlRemove","htmlConstant","htmlFunction","raise","nextSibling","lower","previousSibling","creatorInherit","creatorFixed","namespace","constantNull","selection_cloneShallow","cloneNode","selection_cloneDeep","parseTypenames","typenames","onRemove","typename","__on","onAdd","contextListener","initEvent","dispatchConstant","dispatchFunction","Selection","parents","_groups","_parents","subgroups","subnode","subgroup","selectAll","arrayAll","selectorAll","selectChild","childFind","selectChildren","childrenFilter","matcher","enterGroup","updateGroup","exitGroup","previous","_enter","_exit","sparse","onenter","append","onupdate","onexit","groups0","groups1","m0","m1","merges","group0","group1","compareDocumentPosition","compareNode","sortgroups","sortgroup","each","getAttributeNS","classed","html","creator","before","nonpassive","nonpassivecapture","nopropagation","stopImmediatePropagation","noevent","__noselect","MozUserSelect","yesdrag","noclick","cosh","S","ux0","uy0","ux1","uy1","rho","rho4","rho2","r0","r1","coshr0","sinh","SQRT2","_1","_2","zoomRho","sourceEvent","ownerSVGElement","createSVGPoint","matrixTransform","getScreenCTM","emptyOn","emptyTween","schedules","__transition","svgNode","degrees","skewX","interpolateTransform","pxComma","pxParen","degParen","xa","ya","xb","yb","interpolateTransformCss","DOMMatrix","WebKitCSSMatrix","isIdentity","interpolateTransformSvg","baseVal","consolidate","tweenRemove","tween0","tween1","tweenFunction","tweenValue","definition","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","color_formatHex","formatHex","color_formatRgb","formatRgb","rgbn","Rgb","rgbConvert","rgb_formatHex","rgb_formatRgb","Hsl","hslConvert","hsl2rgb","m2","basis","t3","define","channels","displayable","formatHsl","brighter","darker","gamma","nogamma","exponential","rgbGamma","rgbSpline","spline","reA","reB","bm","bi","zero","value1","string00","interpolate0","string1","string0","string10","attrInterpolate","attrInterpolateNS","attrTweenNS","attrTween","delayFunction","delayConstant","durationFunction","durationConstant","easeConstant","onFunction","on0","on1","sit","styleInterpolate","styleTween","textInterpolate","textTween","Transition","_name","newId","selection_prototype","inherit","id0","id1","styleNull","listener0","styleMaybeRemove","easeVarying","that","defaultTiming","ZoomEvent","Transform","applyX","applyY","invertX","invertY","rescaleX","domain","rescaleY","__zoom","defaultFilter","defaultExtent","SVGElement","defaultTransform","defaultWheelDelta","defaultTouchable","maxTouchPoints","defaultConstrain","extent","translateExtent","dx0","dx1","dy0","dy1","touchstarting","touchfirst","touchending","constrain","wheelDelta","scaleExtent","clickDistance2","tapDistance","wheeled","mousedowned","dblclicked","touchstarted","touchmoved","touchended","centroid","gesture","clean","__zooming","Gesture","taps","wheel","mouse","wheelidled","mousemoved","mouseupped","moved","k1","started","touch0","touch1","l0","l1","dp","dl","collection","scaleBy","scaleTo","k0","translateBy","translateTo","clickDistance","DragEvent","defaultContainer","defaultSubject","rgb2Int","checksum","csBits","cs","padStart","_tinyColor$toRgb","notifyRedraw","onNeedsRedraw","CanvasForceGraph","nodeCanvasObject","nodeCanvasObjectMode","linkLineDash","linkCanvasObject","linkCanvasObjectMode","globalScale","forceLayout","isShadow","isEngineRunning","getVisibility","getColor","getWidth","getLineDash","getCurvature","getLinkCanvasObjectMode","padAmount","__controlPoints","beforeCustomLinks","afterCustomLinks","defaultPaintLinks","replaceCustomLinks","otherCustomLinks","after","save","restore","linksPerColor","linksPerWidth","lineColor","linesPerLineDash","lineDashSegments","beginPath","controlPoints","strokeStyle","setLineDash","paintLinks","getRelPos","getNodeVal","arrowColor","arrowHalfWidth","bzLine","getCoordsAlongLine","arrowTailVertex","arrowTailAngle","fillStyle","paintArrows","getNumPhotons","getSpeed","getDiameter","numCyclePhotons","__photons","photons","cyclePhotonIdx","needsCleanup","__singleHop","arc","paintPhotons","getVal","getNodeCanvasObjectMode","visibleNodes","paintNodes","canvasCtx","linkParticlesAccessor","kapsulePropNames","propNames","returnVals","bindBoth","linkedProps","linkedMethods","adjustCanvasSize","curWidth","curHeight","pxScale","shadowCanvas","__baseElem","needsRedraw","resetTransform","pxRatio","setTransform","clearCanvas","clearRect","colorTracker","__indexColor","shadowGraph","nodePointerAreaPaint","paintFn","linkPointerAreaPaint","enableZoomInteraction","enablePanInteraction","enableZoomPanInteraction","autoPauseRedraw","onZoom","onZoomEnd","onRenderFramePre","onRenderFramePost","centerAt","setCenter","getZoom","setZoom","zoomK","getR","nodesPos","lastSetZoom","shadowCtx","getObjUnderPointer","getImageData","mousedownx","mousedowny","mousemoving","gestures","drag","beforestart","nodrag","__initialDragPos","dragPos","pointerDownEvent","cbEvents","refreshShadowCanvas","doRedraw","_fn2","commonPropTypes","arrayOf","isRequired","oneOfType","oneOf","pointerBasedPropTypes","threeBasedPropTypes","ForceGraph2DPropTypes","ForceGraph3DPropTypes","ForceGraphVRPropTypes","ForceGraphARPropTypes","ForceGraphVR","propTypes","ForceGraphAR","ForceGraph3D","ForceGraph2D","TRANSFORM_STYLE_PROPERTIES","wrapStyleTransforms","wrapped","DIRECTIONAL_FALLBACKS","Top","Bottom","Vertical","Left","Right","Horizontal","DIRECTIONAL_SUFFICES","getStyleValues","suffix","getDefaultStyleValue","compareNumbers","notNull","parsePosition","parsed","createAnimation","keyframe","animationRegistry","EASING_FUNCTIONS","INTERPOLATION_STYLE_PROPERTIES","ZERO_CLAMPED_STYLE_PROPERTIES","getAnimationTarget","iteration","getAnimationOrigin","getCompiledAnimation","compiledAnimation","makeInterpolatedStyle","animationValue","transitionToValue","transitionValue","onTransitionBegin","onTransitionEnd","createAnimatableComponent","WrappedComponent","wrappedComponentName","Animatable","handleRef","animationStyle","transitionStyle","transitionValues","currentTransitionValues","initializeTransitionState","delayTimer","transitionKeys","styleValues","missingKeys","transitionState","onAnimationBegin","iterationDelay","startAnimation","endState","transitionTo","setAnimation","scheduledAnimation","iterationCount","currentIteration","fromValues","toValues","fromValuesFlat","toValuesFlat","getTransitionState","needsInterpolation","needsZeroClamping","transitionToValues","transitions","currentTransitionValue","filtered","PropTypes","0.2","0.4","0.43","0.53","0.7","0.8","0.9","flash","0.25","0.5","0.75","jello","skewY","0.111","0.222","0.333","0.444","0.555","0.666","0.777","0.888","pulse","shake","0.1","0.3","0.6","swing","rubberBand","0.65","tada","wobble","0.15","0.45","bounceIn","bounceInUp","bounceInDown","bounceInRight","bounceInLeft","bounceOut","0.55","bounceOutUp","bounceOutDown","bounceOutRight","bounceOutLeft","makeFadeInTranslation","translationType","fadeInDown","fadeInUp","fadeInLeft","fadeInRight","fadeInDownBig","fadeInUpBig","fadeInLeftBig","fadeInRightBig","makeFadeOutTranslation","fadeOutDown","fadeOutUp","fadeOutLeft","fadeOutRight","fadeOutDownBig","fadeOutUpBig","fadeOutLeftBig","fadeOutRightBig","flipInX","flipInY","flipOutX","flipOutY","lightSpeedIn","lightSpeedOut","makeSlideInTranslation","slideInDown","slideInUp","slideInLeft","slideInRight","makeSlideOutTranslation","slideOutDown","slideOutUp","slideOutLeft","slideOutRight","makeZoomInTranslation","pivotPoint","modifier","zoomIn","zoomInDown","zoomInUp","zoomInLeft","zoomInRight","makeZoomOutTranslation","definitions","zoomOut","zoomOutDown","zoomOutUp","zoomOutLeft","zoomOutRight","ANIMATION_DEFINITIONS","registerAnimation","createComponent","CoreView","CoreText","CoreImage","FontDisplay","getFontFaceStyleSheet","getFontFaceRulesMatchingResource","fontFamilyName","CSSFontFaceRule","getFontFaceRules","fontDisplay","unloadAllAsync","ID","HTMLStyleElement","unloadAsync","deleteRule","loadAsync","resource","CodedError","_createWebStyle","isFontLoadingListenerSupported","styleElement","fontStyle","AUTO","styleElementIE","textNode","isIOS","isSafari","isEdge","isIE","isFirefox","getAssetForSource","localUri","displayFromFontSource","throwInvalidSourceError","loadSingleFontAsync","downloadAsync","loadPromises","isLoaded","fontFamilyOrFontMap","fontMap","all","loadFontInNamespaceAsync","NativeIconAPI","NativeModules","RNVectorIconsManager","RNVectorIconsModule","ensureNativeModuleAvailable","icon","TEXT_PROP_NAMES","TOUCHABLE_PROP_NAMES","createIconButtonComponent","Icon","iconStyle","iconProps","touchableProps","colorStyle","blockStyle","TouchableHighlight","PureComponent","createIconSet","glyphMap","fontFile","fontBasename","fontReference","windows","android","fromCodePoint","styleDefaults","styleOverrides","allowFontScaling","imageSourceCache","setError","createIconSourceCache","resolveGlyph","TabBarItemIOS","TabBarItem","getImageSource","processedColor","getImageForFont","imagePath","getImageSourceSync","getImageForFontSync","loadFont","loadFontWithFileName","hasIcon","getRawGlyphMap","getFontFamily","fontName","expoAssetId","RNVIconComponent","_mounted","fontIsLoaded","_icon","MaterialCommunityIcons","arrayLikeToArray","LogBox","ignoreLogs","ignoreAllLogs","uninstall","install","AFRAME","accessorFn","ThreeForceGraph","parseJson","parseFn","geval","eval","parseAccessor","schema","function","infoEl","cameraEl","cameraObj","object3D","sceneEl","evt","setObject3D","hoverDetail","removeObject3D","oldData","elData","td","getIntersection","Spring","eventify","springCoeff","dragCoeff","adaptiveTimeStepWeight","dimensionalCache","Body","generateCreateBodyFunction","createQuadTree","generateQuadTreeFunction","createBounds","generateBoundsFunction","createDragForce","generateCreateDragForceFunction","createSpringForce","generateCreateSpringForceFunction","integrate","generateIntegratorFunction","bodies","springs","quadTree","bounds","springForce","dragForce","forceMap","iterationNumber","addForce","insertBodies","isPinned","updateBodyForce","publicApi","removeForce","forceIndex","getForces","movement","addBody","addBodyAt","createBody","removeBody","addSpring","body1","body2","getTotalMovement","removeSpring","getBestNewBodyPosition","neighbors","getBestNewPosition","getBBox","getBoundingBox","invalidateBBox","augment","expose","forceFunction","sourceIsNumber","goBack","navigate","setParams","NOT_INITIALIZED_ERROR","BaseNavigationContainer","useSyncState","getPartialState","isFirstMountRef","getKey","setKey","canGoBack","handled","resetRoot","CommonActions","getRootState","getCurrentRoute","dangerouslyGetState","dangerouslyGetParent","lastEmittedOptionsRef","builderContext","scheduleContext","isInitialRef","getIsInitial","onStateChangeRef","defaultOnUnhandledAction","onUnhandledAction","createNavigatorFactory","Navigator","NavigationHelpersContext","initialRoutes","compatOptions","parentScreens","remaining","parseQueryParams","createNestedStateObject","createNormalizedConfigs","aParts","bParts","aWildcardIndex","bWildcardIndex","matchAgainstConfigs","remainingPath","findFocusedRoute","findParseConfigForRoute","joinPaths","matchedParams","routeConfig","parentPattern","createConfigItem","initials","nestedConfig","routeName","findInitialRoute","sameParents","createStateObject","initialRoute","nestedState","nestedStateIndex","parseConfig","singleMatcher","multiMatcher","decodeComponents","tokens","encodedURI","replaceMap","customDecodeURIComponent","separatorIndex","isArr","allParams","focusedParams","focusedRoute","getActiveRoute","currentOptions","nestedRouteNames","hasNext","currentParams","fromEntries","getParamName","nextRoute","normalizedConfig","createNormalizedConfigItem","_curry3","_isArrayLike","_xwrap","_iterableReduce","xf","_methodReduce","symIterator","_arrayReduce","always","paramsSerializer","serializedParams","hashmarkIndex","__CANCEL__","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","adapter","getDefaultAdapter","transformRequest","transformResponse","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","auth","username","unescape","Authorization","btoa","baseURL","onreadystatechange","responseURL","responseHeaders","getAllResponseHeaders","responseText","statusText","onabort","ontimeout","timeoutErrorMessage","xsrfValue","read","onDownloadProgress","onUploadProgress","cancelToken","enhanceError","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","axiosKeys","otherKeys","Cancel","useTheme","cssKeywords","reverseKeywords","labels","hwb","cmyk","xyz","lab","lch","keyword","ansi16","ansi256","hcg","apple","rdif","gdif","bdif","diffc","reversed","currentClosestKeyword","currentClosestDistance","smin","lmin","hi","vmin","wh","bl","hr","ansi","mult","rem","colorString","mg","pure","prevPropKeys","nextPropKeys","SceneView","getCurrentState","currentRoute","setCurrentState","ScreenComponent","NavigationStateContext","useDescriptors","onAction","onRouteFocus","navigations","helpers","setOptions","useNavigationCache","routeOptions","screenOptions","NavigationRouteContext","routeState","PrivateValueStore","VISITED_ROUTE_KEYS","shouldPreventRemove","nextRouteKeys","nextRoutes","removedRoutes","currentRoutes","visitedRouteKeys","beforeRemoveAction","beforeRemoveListeners","useOnAction","routerConfigOptionsRef","visitedNavigators","isPrevented","onRouteFocusParent","shouldFocus","onActionParent","actionListeners","routeKey","useOnPreventRemove","addListenerParent","isArrayEqual","useNavigationBuilder","navigatorKey","useRegisterNavigator","createRouter","routeConfigs","getRouteConfigsFromChildren","initialParams","initialParamsFromParams","routeGetIdList","isStateValid","isStateInitialized","previousNestedParamsRef","previousParams","updatedState","shouldUpdate","initializedStateRef","lastFocusedKeyRef","currentFocusedKey","lastFocusedKey","useFocusEvents","childListeners","routerConfigOptions","sourceRouteKey","useOnRouteFocus","parentNavigationHelpers","useNavigationHelpers","focusedListeners","useFocusedListenersChildrenAdapter","getStateListeners","childState","useOnGetState","useCurrentRender","LinkingContext","NavigationContainer","theme","isLinkingEnabled","linking","refContainer","useDocumentTitle","cancelled","useThenable","linkingContext","isReady","onReadyRef","rtlDetect","isRtlLang","getLangDir","isObj","assignKey","_isObject2","combinedValue","processedValue","_prefixValue2","_addNewValuesOnly2","_processedValue","_prefixProperty2","_isPrefixedValue2","_isPrefixedValue","grab","grabbing","alternativeProps","alternativeValues","flexShorthandMappings","msFlex","flexValues","unset","WebkitBoxDirection","grad","sliceIterator","isSimplePositionValue","isComplexSpanValue","displayValues","propertyConverters","propertyConverter","alignmentValues","msGridRowAlign","msGridColumn","_value$split","_value$split2","_end$split","_end$split2","maybeSpan","maybeNumber","msGridColumnSpan","msGridRow","_value$split3","_value$split4","_end$split3","_end$split4","msGridRowSpan","gridTemplateColumns","msGridColumns","gridTemplateRows","msGridRows","justifySelf","msGridColumnAlign","alternativePropList","marginBlockStart","marginBlockEnd","marginInlineStart","marginInlineEnd","paddingBlockStart","paddingBlockEnd","paddingInlineStart","paddingInlineEnd","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderInlineStart","borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth","borderInlineEnd","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","maxHeight","propertyPrefixMap","outputValue","multipleValues","dashCaseProperty","_hyphenateProperty2","pLen","prefixMapping","prefixValue","webkitOutput","mozOutput","_capitalizeString2","WebkitTransition","WebkitTransitionProperty","MozTransition","MozTransitionProperty","Webkit","Moz","ReactNoopUpdateQueue","updater","isValidElement","TurboModuleRegistry","_config$deceleration","_deceleration","deceleration","_velocity","Info","any_blank_count","any_blank_ms","any_blank_speed_sum","mostly_blank_count","mostly_blank_ms","pixels_blank","pixels_sampled","pixels_scrolled","total_time_spent","sample_count","_minSampleCount","_sampleRate","_anyBlankStartTime","_enabled","_info","_mostlyBlankStartTime","_samplesStartTime","_resetData","setSampleRate","sampleRate","setMinSampleCount","minSampleCount","scrollSpeed","blankTop","firstFrame","blankBottom","bottomEdge","blankness","multigraph","uniqueLinkId","multiEdges","suspendEvents","createLink","fromId","toId","linkId","makeLinkId","isMultiEdge","Link","changes","recordLinkChange","recordNodeChange","enterModification","exitModification","graphPart","fromNode","toNode","addLinkToNode","removeLink","getNodeCount","getLinkCount","getLinksCount","getNodesCount","getLinks","forEachNode","forEachLinkedNode","oriented","forEachOrientedLink","linkedNodeId","forEachNonOrientedLink","forEachLink","beginUpdate","endUpdate","hasLink","hasNode","realOn","enterModificationReal","exitModificationReal","recordLinkChangeReal","recordNodeChangeReal","monitorSubscribers","changeType","prevLinks","indexOfElementInArray","fromNodeId","toNodeId","valuesIterator","physicsSettings","physicsSimulator","createSimulator","nodeMass","nodeBodies","bodiesCount","springTransform","initBody","initLink","onGraphChanged","wasStable","api","updateStableStatus","lastMove","isStableNow","getInitializedBody","setNodePosition","setPosition","getGraphRect","forEachBody","pinNode","isNodePinned","getBody","getSpring","getForceVectorLength","simulator","isStable","releaseNode","releaseLink","maxNeighbors","otherBody","getNeighborBodies","updateBodyMass","isNodeOriginallyPinned","fromBody","toBody","debounce","wait","immediate","later","debounced","callNow","taskHead","taskTail","clockLast","clockNow","clockSkew","setFrame","clearNow","Timer","_time","wake","timerFlush","sleep","nap","poke","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","nativeMin","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","isInvoking","isBinary","_three$Sprite","textHeight","_text","_textHeight","_color","_backgroundColor","_padding","_borderWidth","_borderRadius","_borderColor","_strokeWidth","_strokeColor","_fontFace","_fontSize","_fontWeight","_texture","_genCanvas","fontFace","strokeColor","relBorder","relBorderRadius","relPadding","measureText","hb","_hb","cornerWidth","_hb2","closePath","fillRect","textBaseline","drawTextStroke","lineX","lineY","strokeText","fillText","yScale","reIsHostCtor","reIsUint","arrayIncludes","fromIndex","fromRight","baseFindIndex","baseIsNaN","baseIndexOf","arrayIncludesWith","comparator","cacheHas","overArg","arrayProto","funcProto","coreJsData","maskSrcKey","uid","IE_PROTO","funcToString","reIsNative","getPrototype","nativeGetSymbols","getNative","nativeCreate","Hash","ListCache","MapCache","SetCache","arrayLikeKeys","inherited","baseTimes","skipIndexes","isIndex","assocIndexOf","baseIsNative","isHostObject","toSource","baseKeysIn","nativeKeysIn","isProto","Ctor","isPrototype","getAllKeysIn","keysFunc","symbolsFunc","baseGetAllKeys","keysIn","getSymbolsIn","getMapData","isKeyable","getSymbols","stubArray","isCommon","valuesLength","outer","valuesIndex","baseDifference","isNativeFunction","_wrapNativeSuper","family","D","E","F","J","fonts","K","L","H","vendor","G","M","race","detachEvent","I","UNINTIALIZED_STATE","stateRef","isSchedulingRef","isMountedRef","setTrackingState","trackingState","_interopDefault","_partial","_curry","_pipeP","_keys","_forEach","_dissoc","_merge","_always","_ifElse","_contains","_gte","_T","_is","_identity","_isNil","_cond","axios","__awaiter","throw","__generator","sent","trys","ops","isWithin","containsText","isPromise","DEFAULT_HEADERS","Accept","DEFAULT_CONFIG","TIMEOUT_ERROR_CODES","NODEJS_CONNECTION_ERROR_CODES","in200s","in400s","in500s","statusNil","getProblemFromError","isCancel","getProblemFromStatus","axiosInstance","R","O","T","problem","originalError","monitors","addMonitor","requestTransforms","asyncRequestTransforms","responseTransforms","asyncResponseTransforms","addRequestTransform","addAsyncRequestTransform","addResponseTransform","addAsyncResponseTransform","setHeader","setHeaders","deleteHeader","setBaseURL","getBaseURL","any","post","unlink","CancelToken","apisauce","CLIENT_ERROR","SERVER_ERROR","TIMEOUT_ERROR","CONNECTION_ERROR","NETWORK_ERROR","UNKNOWN_ERROR","CANCEL_ERROR","_slice","skippedModels","hashedModelKeys","limiters","valpha","newArr","zeroArray","hashedKeys","limit","getset","maxfn","assertArray","places","percentString","percent","unitArray","unitObject","roundTo","roundToPlace","saturationl","saturationv","wblack","rgbNumber","luminosity","lum","chan","contrast","lum1","lum2","contrastRatio","whiten","blacken","grayscale","fade","opaquer","mixinColor","w2","newAlpha","saveRecoveryProps","localStorage","setItem","recoveredProps","removeItem","_consumeRecoveryProps","_getRecoveredProps","registerRootComponent","AppRootComponent","App","errorRecovery","isDOMAvailable","Intl","DateTimeFormat","resolvedOptions","timeZone","iso","getLocalizationAsync","isoCurrencyCodes","timezone","parseLocale","ExpoLocalization","ANIMATED_EASING_PREFIXES","Collapsible","contentHandle","_handleRef","_handleLayoutChange","contentHeight","collapsed","measuring","measured","collapsedHeight","_componentDidUpdate","unmounted","_toggleCollapsed","_transitionToHeight","_measureContent","found","enablePointerEvents","renderChildrenCollapsed","contentStyle","align","shouldRenderChildren","COLLAPSIBLE_PROPS","Accordion","_renderContainer","renderCollapsible","activeSections","sectionContainerStyle","expandFromBottom","touchableComponent","renderHeader","renderFooter","renderSectionTitle","_toggleSection","expanded","expandMultiple","updatedSections","containerStyle","renderContent","renderAsFlatList","viewProps","collapsibleProps","nestedScrollEnabled","xm","ym","zm","xp","yp","zp","leaf","_x0","_y0","_z0","_x1","_y1","_z1","defaultX","defaultY","defaultZ","octree","Octree","addAll","leaf_copy","treeProto","visit","y3","z3","octs","retainer","visitAfter","quadtree","Quadtree","quads","binarytree","Binarytree","halves","MapShim","getIndex","anonymous","__entries__","prototypeAccessors","isBrowser","global$1","requestAnimationFrame$1","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","onTransitionEnd_","leadingCall","trailingCall","resolvePending","timeoutCallback","throttle","connect_","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","characterData","subtree","getInstance","instance_","defineConfigurable","getWindowOf","emptyRect","createRectInit","toFloat","getBordersSize","getHTMLElementContentRect","paddings","getPaddings","horizPad","vertPad","isDocumentElement","vertScrollbar","horizScrollbar","isSVGGraphicsElement","SVGGraphicsElement","getContentRect","getSVGContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","broadcastRect","ResizeObserverEntry","rectInit","contentRect","Constr","DOMRectReadOnly","createReadOnlyRect","ResizeObserverSPI","callbackCtx","activeObservations_","observations_","callback_","controller_","callbackCtx_","Element","observations","clearActive","this$1","observation","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","innerFn","outerFn","tryLocsList","protoGenerator","Generator","Context","_invoke","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","_sent","dispatchException","abrupt","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","__await","unwrapped","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iteratorMethod","isGeneratorFunction","genFun","mark","awrap","skipTempReset","rootRecord","rval","loc","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","RtlDetectLib","_regexEscape","_regexParseLocale","_escapeRegExpPattern","_toLowerCase","reserveReturnValue","_toUpperCase","_trim","regexp","patterns","addPatterns","patternDelimiter","_parseLocale","strLocale","countryCode","objLocale","_BIDI_RTL_LANGS","for","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","refs","isPureReactComponent","__self","_owner","Q","keyPrefix","V","U","W","aa","X","Y","Z","ba","ReactCurrentDispatcher","ReactCurrentBatchConfig","suspense","ReactCurrentOwner","IsSomeRendererActing","Fragment","Profiler","StrictMode","Suspense","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","_calculateChangedBits","_currentValue","_currentValue2","_threadCount","Consumer","createFactory","createRef","lazy","_ctor","_status","useImperativeHandle","useReducer","ca","da","fa","ia","ja","ka","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","sanitizeURL","removeEmptyString","oa","pa","ma","na","la","xlinkHref","ra","sa","ta","ua","wa","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ma","Ka","La","Na","Oa","Pa","prepareStackTrace","Qa","_render","Ra","_payload","_init","Sa","Ta","Va","_valueTracker","Ua","Wa","Xa","Ya","defaultChecked","_wrapperState","initialChecked","Za","controlled","$a","eb","db","fb","selected","defaultSelected","gb","jb","kb","lb","mb","nb","ob","MSApp","execUnsafeLocalFunction","pb","lastChild","nodeValue","gridArea","gridRowSpan","gridColumnSpan","lineHeight","rb","sb","tb","ub","br","col","embed","img","keygen","wbr","wb","srcElement","correspondingUseElement","zb","Ab","Bb","Cb","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","Ob","Pb","Qb","Rb","Sb","Tb","Ub","Vb","Wb","Xb","Zb","alternate","$b","memoizedState","dehydrated","cc","sibling","dc","ec","gc","hc","ic","jc","kc","lc","mc","nc","oc","pc","qc","rc","blockedOn","domEventName","eventSystemFlags","targetContainers","sc","tc","wc","lanePriority","unstable_runWithPriority","containerInfo","xc","yc","zc","Ac","Bc","unstable_scheduleCallback","unstable_NormalPriority","Cc","Dc","Ec","animationend","animationiteration","animationstart","transitionend","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Pc","Qc","unstable_now","Rc","Uc","pendingLanes","expiredLanes","suspendedLanes","pingedLanes","Vc","entangledLanes","entanglements","Wc","Xc","Yc","Zc","$c","eventTimes","clz32","cd","dd","unstable_UserBlockingPriority","ed","fd","gd","hd","uc","jd","kd","ld","md","nd","od","charCode","pd","qd","rd","_reactName","_targetInst","isPersistent","wd","xd","yd","sd","ud","vd","Ad","getModifierState","zd","fromElement","toElement","Bd","Dd","dataTransfer","Fd","Hd","pseudoElement","Jd","clipboardData","Ld","Md","Esc","Spacebar","Up","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","8","9","12","13","16","17","18","19","20","27","32","33","34","35","36","37","38","39","40","45","46","112","113","114","115","116","117","118","119","120","121","122","123","144","145","224","Od","Alt","Control","Meta","Shift","Pd","Rd","which","Td","tangentialPressure","tiltX","tiltY","twist","isPrimary","Vd","targetTouches","Xd","Zd","wheelDeltaX","wheelDeltaY","deltaZ","$d","documentMode","ee","fe","ge","he","ie","le","ne","oe","pe","qe","re","se","ue","ve","we","xe","ye","ze","oninput","Ae","Be","Ce","De","Ee","Fe","He","Ie","Je","Ke","Le","Ne","HTMLIFrameElement","contentWindow","Oe","Pe","Qe","Re","Se","Te","Ue","anchorOffset","focusOffset","Ve","We","Xe","Ye","Ze","Yb","$e","Nb","ef","ff","parentWindow","gf","hf","je","ke","jf","kf","lf","mf","nf","of","pf","qf","rf","tf","vf","wf","yf","zf","Af","Bf","Cf","Df","Ef","contextTypes","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Ff","childContextTypes","Gf","Hf","If","getChildContext","Jf","__reactInternalMemoizedMergedChildContext","Kf","Lf","Mf","Nf","Of","Pf","unstable_cancelCallback","Qf","unstable_shouldYield","Rf","unstable_requestPaint","Sf","Tf","unstable_getCurrentPriorityLevel","Uf","unstable_ImmediatePriority","Vf","Wf","Xf","unstable_LowPriority","Yf","unstable_IdlePriority","Zf","$f","ag","bg","cg","dg","eg","fg","gg","hg","ig","jg","kg","lg","ng","og","pg","qg","rg","sg","childLanes","tg","firstContext","lanes","ug","vg","observedBits","responders","wg","xg","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","effects","yg","zg","eventTime","lane","Ag","Bg","Cg","Dg","Eg","Fg","Gg","Kg","_reactInternals","Hg","Ig","Jg","Lg","shouldComponentUpdate","Mg","Ng","componentWillReceiveProps","Og","getSnapshotBeforeUpdate","componentWillMount","Pg","Qg","_stringRef","Rg","Sg","lastEffect","nextEffect","firstEffect","Tg","Ug","Vg","implementation","Wg","Xg","Yg","Zg","$g","ah","bh","ch","dh","eh","fh","gh","hh","ih","memoizedProps","revealOrder","jh","kh","lh","mh","nh","oh","pendingProps","ph","qh","rh","th","uh","_workInProgressVersionPrimary","vh","xh","yh","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","baseQueue","Ih","Jh","Kh","lastRenderedReducer","eagerReducer","eagerState","lastRenderedState","Lh","Mh","_getVersion","_source","mutableReadLanes","Nh","subscribe","setSnapshot","Oh","Ph","Qh","Rh","deps","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","ai","ci","di","readContext","useDeferredValue","useTransition","useMutableSource","useOpaqueIdentifier","unstable_isNewReconciler","uf","ei","fi","gi","ji","ki","li","mi","baseLanes","ni","oi","pi","UNSAFE_componentWillUpdate","componentWillUpdate","qi","getDerivedStateFromError","ri","pendingContext","Bi","Di","Ei","si","retryLane","ti","unstable_avoidThisFallback","ui","unstable_expectedLoadTime","vi","wi","xi","yi","zi","isBackwards","renderingStartTime","tailMode","Ai","Fi","Gi","wasMultiple","onclick","Hi","Ii","Ji","Ki","Li","Mi","Ni","Oi","Pi","Qi","Ri","Si","componentDidCatch","Ti","componentStack","Ui","WeakSet","Vi","Wi","Xi","__reactInternalSnapshotBeforeUpdate","Yi","Zi","$i","aj","bj","onCommitFiberUnmount","cj","dj","ej","fj","gj","_reactRootContainer","hj","ij","jj","kj","lj","mj","nj","oj","pj","qj","rj","sj","tj","uj","vj","wj","ck","xj","yj","zj","Aj","Bj","Cj","Dj","Ej","Fj","Gj","Hj","Ij","Jj","Sc","Kj","Lj","Mj","callbackNode","expirationTimes","callbackPriority","Tc","Nj","Oj","Pj","Qj","Rj","Sj","Tj","finishedWork","finishedLanes","Uj","Wj","Xj","pingCache","Yj","Zj","ak","bk","dk","focusedElem","selectionRange","ek","Me","setStart","setEnd","onCommitFiberRoot","fk","gk","ik","pendingChildren","jk","mutableSourceEagerHydrationData","lk","mk","nk","qk","hydrationOptions","mutableSources","_internalRoot","rk","tk","sk","uk","hk","unstable_observedBits","unmount","Vj","vk","wk","findFiberByHostInstance","bundleType","rendererPackageName","xk","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setSuspenseHandler","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","yk","supportsFiber","inject","flushSync","unstable_batchedUpdates","unstable_createPortal","unstable_renderSubtreeIntoContainer","MessageChannel","unstable_forceFrameRate","port2","port1","onmessage","postMessage","sortIndex","expirationTime","priorityLevel","unstable_Profiling","unstable_continueExecution","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_wrapCallback","prefixProperties","newStyle","requiredPrefixes","capitalizedProperty","styleProperty","_capitalizeString","metaData","addIfNew","_hyphenateStyleName2","_hyphenateStyleName","_assign","_invariant","ReactComponent","injectedMixins","ReactClassInterface","statics","getDefaultProps","updateComponent","ReactClassStaticInterface","RESERVED_SPEC_KEYS","mixSpecIntoComponent","createMergedResultFunction","mixStaticSpecIntoComponent","autobind","validateMethodOverride","isAlreadyDefined","specPolicy","ReactClassMixin","spec","autoBindPairs","__reactAutoBindPairs","isReactClassMethod","createChainedFunction","mergeIntoWithNoDuplicateKeys","bindAutoBindMethod","IsMountedPreMixin","__isMounted","IsMountedPostMixin","replaceState","ReactClassComponent","pairs","autoBindKey","bindAutoBindMethods","makeEmptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","ReactPropTypesSecret","emptyFunctionWithReset","resetWarningCache","shim","componentName","propFullName","secret","getShim","ReactPropTypes","symbol","instanceOf","objectOf","exact","checkPropTypes","_dereq_","def","3","byteLength","b64","getLens","validLen","placeHoldersLen","toByteArray","Arr","_byteLength","curByte","revLookup","fromByteArray","uint8","extraBytes","len2","encodeChunk","4","createStyle","5","Buffer","6","base64","ieee754","kMaxLength","TYPED_ARRAY_SUPPORT","RangeError","encodingOrOffset","allocUnsafe","byteOffset","fromArrayLike","fromArrayBuffer","isEncoding","actual","write","fromString","fromObject","assertSize","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","arrayIndexOf","indexSize","arrLength","valLength","buf","readUInt16BE","foundIndex","hexWrite","strLen","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","lo","utf16leToBytes","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","decodeCodePointsArray","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","typedArraySupport","_augment","species","allocUnsafeSlow","_isBuffer","swap16","swap32","swap64","inspect","thisStart","thisEnd","thisCopy","targetCopy","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","stringtrim","base64clean","7","origPrevent","storage","formatArgs","useColors","lastC","firebug","table","chrome","localstorage","formatters","selectColor","coerce","logFn","skips","prevColor","10","11","hasSymbols","toStr","origDefineProperty","supportsDescriptors","arePropertyDescriptorsSupported","predicates","st","gt","ut","ft","lt","attrChange","attrName","attributeChangedCallback","ct","$","ht","vt","nt","tt","createdCallback","created","mt","rt","et","isPrototypeOf","yt","WebKitMutationObserver","HTMLElement","attributeOldValue","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","removedNodes","innerHTMLHelper","ot","dtype","14","ThrowTypeError","asyncGenIterator","TypedArray","INTRINSICS","Atomics","decodeURI","encodeURI","EvalError","SharedArrayBuffer","SyntaxError","URIError","allowMissing","15","GetIntrinsic","$Object","$TypeError","$String","assertRecord","$isNaN","$isFinite","IsCallable","ES5","ToPrimitive","ToBoolean","ToNumber","ToInteger","ToInt32","ToUint32","ToUint16","posInt","ToString","ToObject","CheckObjectCoercible","optMessage","SameValue","Type","IsPropertyDescriptor","Desc","allowed","isData","IsAccessor","IsAccessorDescriptor","IsDataDescriptor","IsGenericDescriptor","FromPropertyDescriptor","ToPropertyDescriptor","Obj","getter","$SyntaxError","ES","recordType","argumentName","remain","21","isCallable","ES5internalSlots","actualHint","22","23","dstLength","24","forEachArray","receiver","forEachString","forEachObject","25","ERROR_MESSAGE","binder","boundLength","boundArgs","Empty","26","28","29","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","30","superCtor","super_","TempCtor","31","isSlowBuffer","fnToStr","constructorRegex","isES6ClassFn","fnStr","hasToStringTag","tryFunctionObject","strClass","confirm","xtend","X_HEIGHTS","M_WIDTHS","CAP_HEIGHTS","TAB_ID","SPACE_ID","TextLayout","opt","_measure","computeMetrics","wrapper","getGlyphById","glyphIdx","findChar","getKerning","kernings","kern","second","_opt","_setupSpaceGlyphs","maxLineWidth","baseline","descender","letterSpacing","getAlignType","_descender","_baseline","_xHeight","getXHeight","_capHeight","getCapHeight","_lineHeight","_ascender","lineIndex","lastGlyph","getGlyph","xadvance","_linesTotal","_fallbackSpaceGlyph","_fallbackTabGlyph","getMGlyph","tabWidth","xoffset","yoffset","curPen","nextPen","nextWidth","xhr","parseASCII","parseXML","readBinary","isBinaryFormat","xml2","binary","req","getBinaryOpts","statusCode","equal","HEADER","keysShim","isArgs","isEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","41","origKeys","originalKeys","42","callee","43","splitLine","parseData","parseIntList","pages","lineData","44","readBlock","blockID","bitField","smooth","unicode","italic","bold","fixedHeight","charset","stretchH","spacing","readNameNT","readStringNT","readInfo","packed","alphaChnl","redChnl","greenChnl","blueChnl","readCommon","readPages","page","chnl","readChars","readKernings","byte","parseAttributes","NAME_MAP","scaleh","scalew","stretchh","lineheight","alphachnl","redchnl","greenchnl","bluechnl","getAttribs","attribs","getAttribList","dict","attrib","xmlRoot","pageRoot","47","48","present","dateNow","navigationStart","performanceNow","noConflict","conflict","49","50","setImmediate","setTimeoutFunc","asap","_deferreds","doResolve","deferred","finale","Handler","reason","ex","_setImmediateFn","51","anArray","CW","CCW","numIndices","52","leftWhitespace","rightWhitespace","53","getPolyfill","boundTrim","54","55","polyfill","56","defaultInstanceSettings","begin","loopBegin","changeBegin","changeComplete","loopComplete","timelineOffset","defaultTweenSettings","endDelay","validTransforms","minMax","stringContains","applyArguments","rgbPrefixRegex","pth","inp","HTMLInputElement","dom","fnc","und","easingFunctionRegex","parseEasingParameters","solver","amplitude","period","penner","eases","parseEasings","selectString","auxArrayFilter","filterArray","NodeList","HTMLCollection","arrayContains","cloneObject","replaceObjectProps","mergeObjects","hexToRgbaHexRegex","hexToRgbaRgbRegex","hslToRgbaHsl1Regex","hslToRgbaHsl2Regex","colorToRgb","rgbToRgba","hexValue","hexToRgba","hslValue","hslToRgba","unitRegex","getUnit","getFunctionValue","animatable","convertPxToUnit","tempEl","parentEl","convertedUnit","getCSSValue","uppercasePropName","getAnimationType","transformRegex","getElementTransforms","getTransformValue","getTransformUnit","getOriginalTargetValue","operatorRegex","getRelativeValue","whitespaceRegex","validateValue","originalUnit","unitLess","getDistance","getPolylineLength","previousPos","totalLength","numberOfItems","currentPos","getTotalLength","getCircleLength","getRectLength","getLineLength","getPolygonLength","getParentSvg","pathEl","svgData","parentSvgEl","getParentSvgEl","viewBoxAttr","getPathProgress","getPointAtLength","valueRegex","decomposeValue","original","numbers","strings","parseTargets","targets","getAnimatables","springRegex","normalizePropertyTweens","tweenSettings","propArray","getProperties","newKey","flattenKeyframes","normalizeTweens","previousTween","normalizeTweenValues","toUnit","previousValue","fromUnit","isPath","setProgressValue","manual","setTargetsValue","animatables","valueUnit","animType","getAnimations","lastTween","getInstanceTimings","animLength","getTlOffset","timings","raf","instanceID","activeInstances","pausedInstances","engine","activeInstancesLength","activeInstance","instanceIndex","anime","childrenLength","makePromise","_resolve","instanceSettings","toggleInstanceDirection","adjustTime","resetTime","seekCild","setAnimationsProgress","insTime","animationsLength","tweenLength","eased","toNumbersLength","fromNumber","stringsLength","n$1","setCallback","passThrough","setInstanceProgress","engineTime","insDuration","insDelay","insEndDelay","reversePlayback","i$1","syncInstanceChildren","began","changeBegan","changeCompleted","completed","removeTargetsFromAnimations","targetsArray","len$1","childAnimations","convertPx","setDashoffset","fromFirst","fromCenter","fromLast","isRange","val1","val2","maxValue","fromX","fromY","distanceX","distanceY","timeline","tl","instanceParams","tlIndex","ins","insParams","tlDuration","57","nextKey","undefined$1","asyncGeneratorStep","_throw","_seed","MathUtils","mapLinear","damp","lambda","pingpong","smoothstep","smootherstep","randInt","randFloat","randFloatSpread","seededRandom","degToRad","radToDeg","radians","ceilPowerOfTwo","setQuaternionFromProperEuler","c13","s13","c1_3","s1_3","c3_1","s3_1","setScalar","setX","setY","setComponent","subScalar","clampScalar","clampLength","roundToZero","lerpVectors","rotateAround","extractBasis","transposeIntoArray","transformUv","setZ","setW","setAxisAngleFromQuaternion","setAxisAngleFromRotationMatrix","_EventDispatcher","_WebGLRenderTarget","_s2","_s3","rotateTowards","applyEuler","_quaternion","projectOnPlane","_vector","reflect","setFromCylindrical","setFromArray","setFromCenterAndSize","_vector$1","setFromObject","expandByVector","_box","containsBox","_v0","_v1","_v2","getBoundingSphere","_normal","recast","intersectSphere","setFromMatrix3","makeBasis","_v1$1","makeRotationFromEuler","_ce","_cf","_de","_df","_ae","_af","_be","_bf","_ac","_ad","_bc","_bd","makeShear","reorder","_quaternion$1","toVector3","enableAll","toggle","disableAll","_v1$2","_position","_scale","setRotationFromAxisAngle","setRotationFromEuler","setRotationFromMatrix","rotateOnWorldAxis","worldToLocal","attach","getObjectById","getWorldPosition","getWorldQuaternion","getWorldScale","_l","_i2","_i3","_shapes","distanceToSphere","projectPoint","intersectLine","_v2$1","_v3","setFromPointsAndIndices","convertGammaToLinear","convertLinearToGamma","convertSRGBToLinear","convertLinearToSRGB","getHexString","offsetHSL","addColors","lerpColors","lerpHSL","Face3","vertexNormals","_il","_data","_vector$3","Int8BufferAttribute","Uint8BufferAttribute","Uint8ClampedBufferAttribute","Int16BufferAttribute","Int32BufferAttribute","Float16BufferAttribute","Float64BufferAttribute","copyAt","copyColorsArray","copyVector2sArray","copyVector3sArray","copyVector4sArray","onUpload","TYPED_ARRAYS","getTypedArray","setDrawRange","_il2","_morphAttribute","computeFaceNormals","computeTangents","_i4","_il3","_j","_jl","_i5","_il4","_i6","_il5","toNonIndexed","_newAttribute","_i7","attributeData","_attribute2","_attributeData","_name2","_i8","_groupMaterial","_BufferGeometry","_iy","_ix","getFocalLength","getEffectiveFOV","setViewOffset","clearViewOffset","transmissionmap_fragment","transmissionmap_pars_fragment","_attribute","_buffer","_type","_buffer2","_type2","getRenderList","setRenderList","_array","_influence","maxMorphTargets","maxMorphNormals","_uniforms","_shadow","_shadowUniforms","_uniforms2","_uniforms3","_shadow2","_shadowUniforms2","_uniforms4","_uniforms5","_uniforms6","_uniforms7","_uniforms8","useSkinning","useInstancing","_depthMaterial","_pars","_equationToGL","_factorToGL","_wrappingToGL","_filterToGL","LOG2E","_j2","_mipmap2","_samples","_glInternalFormat","_samples2","WebVRManager","renderWidth","renderHeight","device","frameData","poseTarget","standingMatrix","standingMatrixInverse","VRFrameData","onVRDisplayPresentChange","tempQuaternion","tempPosition","currentPixelRatio","currentSize","eyeParameters","getEyeParameters","triggers","grips","findGamepad","gamepads","getGamepads","gamepad","updateViewportFromBounds","getDevice","setDevice","setPoseTarget","userHeight","getFrameData","stageParameters","sittingToStandingTransform","poseObject","orientation","leftViewMatrix","rightViewMatrix","leftProjectionMatrix","rightProjectionMatrix","getLayers","leftBounds","rightBounds","hasPosition","buttonId","updateControllers","getStandingMatrix","submitFrame","setFrameOfReferenceType","setFramebuffer","_inputSource","_controller","layersEnabled","getCameraPose","_callee","addLayer","removeLayer","_framebuffer","_currentFramebuffer","releaseMaterialProgramReference","programInfo","material2","_material","programChange","boneMatrices","warned","WebGL1Renderer","_joint","_Object3D","_currentLevel","levels","addLevel","getCurrentLevel","getObjectForDistance","normalizeSkinWeights","_offsetMatrix","_identityMatrix","Skeleton","_bone","boneInverse","getColorAt","setColorAt","setMatrixAt","computeLineDistances","_distance","_position$1","VideoTexture","CanvasTexture","DepthTexture","CircleGeometry","segment","_x2","_x3","_CylinderGeometry","PolyhedronGeometry","vertexBuffer","uvBuffer","subdivideFace","cols","pushVertex","getVertexByIndex","correctUV","azimuth","subdivide","applyRadius","azi","correctUVs","correctSeam","DodecahedronGeometry","_PolyhedronGeometry","_triangle","EdgesGeometry","thresholdAngle","thresholdDot","indexAttr","positionAttr","indexCount","indexArr","vertKeys","hashes","edgeData","jNext","vecHash0","vecHash1","reverseHash","index0","_edgeData$key","_h","_hl","_ahole","_h2","_hl2","_ahole2","_k","_bs","_h3","_hl3","_ahole3","_vert","_vert2","_vert3","_bs2","_vert4","_h4","_hl4","_ahole4","_vert5","_k2","_i9","_i10","_face","_i11","_face2","_i12","_face3","_h5","_hl5","_ahole5","_toJSON","IcosahedronGeometry","LatheGeometry","inverseSegments","n1","_base","OctahedronGeometry","ParametricGeometry","stacks","pu","pv","sliceCount","RingGeometry","innerRadius","outerRadius","thetaSegments","phiSegments","radiusStep","thetaSegmentLevel","_segment","_shapeHole","_l2","_l3","_toJSON$1","TetrahedronGeometry","TextGeometry","_ExtrudeGeometry","generateShapes","TorusGeometry","tube","TorusKnotGeometry","P1","P2","calculatePositionOnCurve","cu","su","quOverP","WireframeGeometry","edge","edges","ol","edge1","edge2","Geometries","BoxBufferGeometry","CircleBufferGeometry","DodecahedronBufferGeometry","ExtrudeBufferGeometry","IcosahedronBufferGeometry","LatheBufferGeometry","OctahedronBufferGeometry","ParametricBufferGeometry","PlaneBufferGeometry","PolyhedronBufferGeometry","RingBufferGeometry","ShapeBufferGeometry","TetrahedronBufferGeometry","TextBufferGeometry","TorusBufferGeometry","TorusKnotBufferGeometry","Materials","_startIndex","_endIndex","_startIndex2","_endIndex2","_giveUpAt","_readOffset","_writeOffset","CreateClipsFromMorphTargetSequences","parseAnimation","_m","setResourcePath","AnimationLoader","CompressedTextureLoader","DataTextureLoader","setMimeType","texDatas","mipmapCount","isCubemap","texData","updateArcLengths","_theta","ellipse","projScreenMatrix","lookTarget","lightPositionWorld","getAt","getIrradianceAt","addScaledSH","getBasisAt","MaterialLoader","getTexture","setTextures","decodeText","BufferGeometryLoader","interleavedBufferMap","arrayBufferMap","getInterleavedBuffer","arrayBuffer","getArrayBuffer","typedArray","bufferAttribute","_typedArray","_bufferAttribute","ObjectLoader","_Loader","parseAnimations","parseShapes","parseGeometries","parseImages","parseTextures","parseMaterials","parseObject","parseSkeletons","bindSkeletons","hasImages","bufferGeometryLoader","details","_shape","LegacyJSONLoader","deserializeImage","loadImage","deserializedImage","_deserializedImage","parseConstant","TEXTURE_MAPPING","TEXTURE_WRAPPING","TEXTURE_FILTER","getGeometry","getMaterial","objectAnimations","setTexturePath","UVMapping","CubeReflectionMapping","CubeRefractionMapping","EquirectangularReflectionMapping","EquirectangularRefractionMapping","CubeUVReflectionMapping","CubeUVRefractionMapping","RepeatWrapping","ClampToEdgeWrapping","MirroredRepeatWrapping","NearestFilter","NearestMipmapNearestFilter","NearestMipmapLinearFilter","LinearMipmapNearestFilter","LinearMipmapLinearFilter","ImageBitmapLoader","_tmpPath","_tmpShape","_sIdx","_sLen","FontLoader","HemisphereLightProbe","AmbientLightProbe","_eyeRight","_eyeLeft","StereoCamera","eyeSep","xmin","xmax","eyeSepHalf","eyeSepOnProjection","ymax","_scale$1","_orientation","AudioListener","destination","timeDelta","_clock","removeFilter","getFilter","setFilter","getMasterVolume","setMasterVolume","positionX","linearRampToValueAtTime","positionY","positionZ","forwardX","forwardY","forwardZ","upX","upY","upZ","setOrientation","setNodeSource","setMediaElementSource","setMediaStreamSource","getDetune","getPlaybackRate","getLoop","setLoop","setLoopStart","setLoopEnd","getVolume","setVolume","_orientation$1","PositionalAudio","_Audio","panner","createPanner","panningModel","getRefDistance","refDistance","setRefDistance","getRolloffFactor","rolloffFactor","setRolloffFactor","getDistanceModel","distanceModel","setDistanceModel","getMaxDistance","setMaxDistance","setDirectionalCone","coneInnerAngle","coneOuterAngle","coneOuterGain","orientationX","orientationY","orientationZ","AudioAnalyser","getAverageFrequency","AnimationObjectGroup","sanitizeNodeName","uncache","_lastIndex","_lastObject","_m2","_bindingsForPath","unsubscribe_","isRunning","startAt","setEffectiveWeight","getEffectiveWeight","crossFadeTo","setEffectiveTimeScale","getEffectiveTimeScale","syncWith","halt","getMixer","getClip","AnimationMixer","clipAction","stopAllAction","uncacheClip","uncacheRoot","uncacheAction","InstancedInterleavedBuffer","GLBufferAttribute","PointCloud","_intersectObject","setType","setItemSize","setCount","Cylindrical","Line3","distanceSq","ImmediateRenderObject","SpotLightHelper","cone","coneLength","coneWidth","SkeletonHelper","_LineSegments","PointLightHelper","_Mesh","sphereSize","_color1","_color2","HemisphereLightHelper","GridHelper","PolarGridHelper","radials","circles","_v","DirectionalLightHelper","lightPlane","targetLine","CameraHelper","pointMap","colorFrustum","colorCone","colorUp","colorTarget","colorCross","addLine","addPoint","setPoint","_lineGeometry","_coneGeometry","_ENCODINGS","BoxHelper","Box3Helper","PlaneHelper","_Line","_axis","ArrowHelper","headLength","headWidth","setDirection","setColor","AxesHelper","_int32View","DataUtils","toHalfFloat","SIZE_MAX","ENCODINGS","backgroundBox","_flatCamera","_createPlanes2","_clearColor","_oldTarget","PHI","INV_PHI","_axisDirections","convertLinearToRGBE","maxComponent","fExp","PMREMGenerator","_pingPongRenderTarget","_blurMaterial","weights","poleAxis","_getBlurShader","_equirectShader","_cubemapShader","_compileMaterial","fromScene","cubeUVRenderTarget","_allocateTargets","_sceneToCubeUV","_blur","_applyPMREM","_cleanup","fromEquirectangular","equirectangular","_fromTexture","fromCubemap","compileCubemapShader","_getCubemapShader","compileEquirectangularShader","_getEquirectShader","outputTarget","_setViewport","_textureToCubeUV","_isLDR","_createRenderTarget","tmpMesh","cubeCamera","upSign","forwardSign","originalAutoClear","useSolidColor","lodIn","lodOut","pingPongRenderTarget","_halfBlur","targetIn","targetOut","sigmaRadians","blurMaterial","blurMesh","blurUniforms","radiansPerPixel","sigmaPixels","outputSize","ClosedSplineCurve3","SplineCurve3","Spline","initFromArray","getControlPointsArray","reparametrizeByArcLength","random16","nearestPowerOfTwo","nextPowerOfTwo","maxInstancedCount","linePrecision","metal","transparency","GeometryUtils","geometry1","materialIndexOffset","SceneUtils","createMultiMaterialObject","ACESFilmicToneMapping","AddEquation","AddOperation","AdditiveAnimationBlendMode","AdditiveBlending","AlphaFormat","AlwaysDepth","AlwaysStencilFunc","AxisHelper","BasicDepthPacking","BasicShadowMap","BinaryTextureLoader","BoundingBoxHelper","ByteType","CanvasRenderer","CineonToneMapping","CullFaceBack","CullFaceFront","CullFaceFrontBack","CullFaceNone","CustomBlending","CustomToneMapping","DecrementStencilOp","DecrementWrapStencilOp","DepthFormat","DepthStencilFormat","DoubleSide","DstAlphaFactor","DstColorFactor","DynamicBufferAttribute","DynamicCopyUsage","DynamicDrawUsage","DynamicReadUsage","EdgesHelper","EqualDepth","EqualStencilFunc","Face4","FaceColors","FlatShading","Float32Attribute","Float64Attribute","FloatType","FrontSide","GLSL1","GLSL3","GammaEncoding","GreaterDepth","GreaterEqualDepth","GreaterEqualStencilFunc","GreaterStencilFunc","HalfFloatType","IncrementStencilOp","IncrementWrapStencilOp","Int16Attribute","Int32Attribute","Int8Attribute","IntType","InterpolateDiscrete","InterpolateLinear","InterpolateSmooth","InvertStencilOp","JSONLoader","KeepStencilOp","LensFlare","LessDepth","LessEqualDepth","LessEqualStencilFunc","LessStencilFunc","LinePieces","LineStrip","LinearEncoding","LinearMipMapLinearFilter","LinearMipMapNearestFilter","LinearToneMapping","LogLuvEncoding","LoopOnce","LoopPingPong","LoopRepeat","LuminanceAlphaFormat","LuminanceFormat","MaxEquation","MeshFaceMaterial","MinEquation","MixOperation","MultiMaterial","isMultiMaterial","MultiplyBlending","MultiplyOperation","NearestMipMapLinearFilter","NearestMipMapNearestFilter","NeverDepth","NeverStencilFunc","NoBlending","NoColors","NoToneMapping","NormalAnimationBlendMode","NormalBlending","NotEqualDepth","NotEqualStencilFunc","ObjectSpaceNormalMap","OneFactor","OneMinusDstAlphaFactor","OneMinusDstColorFactor","OneMinusSrcAlphaFactor","OneMinusSrcColorFactor","PCFShadowMap","PCFSoftShadowMap","Particle","ParticleBasicMaterial","ParticleSystem","ParticleSystemMaterial","PointCloudMaterial","REVISION","RGBADepthPacking","RGBAIntegerFormat","RGBA_ASTC_10x10_Format","RGBA_ASTC_10x5_Format","RGBA_ASTC_10x6_Format","RGBA_ASTC_10x8_Format","RGBA_ASTC_12x10_Format","RGBA_ASTC_12x12_Format","RGBA_ASTC_4x4_Format","RGBA_ASTC_5x4_Format","RGBA_ASTC_5x5_Format","RGBA_ASTC_6x5_Format","RGBA_ASTC_6x6_Format","RGBA_ASTC_8x5_Format","RGBA_ASTC_8x6_Format","RGBA_ASTC_8x8_Format","RGBA_BPTC_Format","RGBA_ETC2_EAC_Format","RGBA_PVRTC_2BPPV1_Format","RGBA_PVRTC_4BPPV1_Format","RGBA_S3TC_DXT1_Format","RGBA_S3TC_DXT3_Format","RGBA_S3TC_DXT5_Format","RGBDEncoding","RGBEEncoding","RGBEFormat","RGBFormat","RGBIntegerFormat","RGBM16Encoding","RGBM7Encoding","RGB_ETC1_Format","RGB_ETC2_Format","RGB_PVRTC_2BPPV1_Format","RGB_PVRTC_4BPPV1_Format","RGB_S3TC_DXT1_Format","RGFormat","RGIntegerFormat","RedFormat","RedIntegerFormat","ReinhardToneMapping","ReplaceStencilOp","ReverseSubtractEquation","SRGB8_ALPHA8_ASTC_10x10_Format","SRGB8_ALPHA8_ASTC_10x5_Format","SRGB8_ALPHA8_ASTC_10x6_Format","SRGB8_ALPHA8_ASTC_10x8_Format","SRGB8_ALPHA8_ASTC_12x10_Format","SRGB8_ALPHA8_ASTC_12x12_Format","SRGB8_ALPHA8_ASTC_4x4_Format","SRGB8_ALPHA8_ASTC_5x4_Format","SRGB8_ALPHA8_ASTC_5x5_Format","SRGB8_ALPHA8_ASTC_6x5_Format","SRGB8_ALPHA8_ASTC_6x6_Format","SRGB8_ALPHA8_ASTC_8x5_Format","SRGB8_ALPHA8_ASTC_8x6_Format","SRGB8_ALPHA8_ASTC_8x8_Format","ShortType","SmoothShading","SrcAlphaFactor","SrcAlphaSaturateFactor","SrcColorFactor","StaticCopyUsage","StaticDrawUsage","StaticReadUsage","StreamCopyUsage","StreamDrawUsage","StreamReadUsage","SubtractEquation","SubtractiveBlending","TangentSpaceNormalMap","TriangleFanDrawMode","TriangleStripDrawMode","TrianglesDrawMode","Uint16Attribute","Uint32Attribute","Uint8Attribute","Uint8ClampedAttribute","UnsignedByteType","UnsignedInt248Type","UnsignedIntType","UnsignedShort4444Type","UnsignedShort5551Type","UnsignedShort565Type","UnsignedShortType","VSMShadowMap","Vertex","VertexColors","WebGLRenderTargetCube","WireframeHelper","WrapAroundEnding","XHRLoader","ZeroCurvatureEnding","ZeroFactor","ZeroSlopeEnding","ZeroStencilOp","sRGBEncoding","58","DRACOLoader","decoderPath","decoderConfig","decoderBinary","decoderPending","workerLimit","workerPool","workerNextTaskID","workerSourceURL","defaultAttributeIDs","defaultAttributeTypes","setDecoderPath","setDecoderConfig","setWorkerLimit","setVerbosity","setSkipDequantization","taskConfig","attributeIDs","attributeTypes","useUniqueIDs","decodeGeometry","decodeDracoFile","worker","taskKey","taskCache","cachedTask","taskID","taskCost","geometryPending","_getWorker","_worker","_callbacks","_createGeometry","_releaseTask","geometryData","_loadLibrary","preload","_initDecoder","useJS","WebAssembly","librariesPending","libraries","jsContent","wasmBinary","DRACOWorker","createObjectURL","_taskCosts","_taskLoad","terminate","decodeAttribute","draco","decoder","dracoGeometry","attributeType","numComponents","num_components","numValues","num_points","dataType","DT_FLOAT32","DT_INT8","DT_INT16","DT_INT32","DT_UINT8","DT_UINT16","DT_UINT32","getDracoDataType","ptr","_malloc","GetAttributeDataArrayForAllPoints","HEAPF32","_free","onModuleLoaded","DracoDecoderModule","Decoder","decoderBuffer","DecoderBuffer","Init","decodingStatus","geometryType","GetEncodedGeometryType","TRIANGULAR_MESH","DecodeBufferToMesh","POINT_CLOUD","DecodeBufferToPointCloud","error_msg","attributeID","GetAttributeByUniqueId","GetAttributeId","GetAttribute","num_faces","GetTrianglesUInt32Array","decodeIndex","releaseDecoderModule","getDecoderModule","59","GLTFLoader","dracoLoader","ddsLoader","ktx2Loader","meshoptDecoder","pluginCallbacks","GLTFMaterialsClearcoatExtension","GLTFTextureBasisUExtension","GLTFTextureWebPExtension","GLTFMaterialsTransmissionExtension","GLTFLightsExtension","GLTFMeshoptCompression","GLTFRegistry","_onError","gltf","setDRACOLoader","setDDSLoader","setKTX2Loader","setMeshoptDecoder","BINARY_EXTENSION_HEADER_MAGIC","EXTENSIONS","KHR_BINARY_GLTF","GLTFBinaryExtension","GLTFParser","fileLoader","plugin","extensionsUsed","extensionName","extensionsRequired","KHR_MATERIALS_UNLIT","GLTFMaterialsUnlitExtension","KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS","GLTFMaterialsPbrSpecularGlossinessExtension","KHR_DRACO_MESH_COMPRESSION","GLTFDracoMeshCompressionExtension","MSFT_TEXTURE_DDS","GLTFTextureDDSExtension","KHR_TEXTURE_TRANSFORM","GLTFTextureTransformExtension","KHR_MESH_QUANTIZATION","GLTFMeshQuantizationExtension","setExtensions","setPlugins","KHR_LIGHTS_PUNCTUAL","KHR_MATERIALS_CLEARCOAT","KHR_MATERIALS_TRANSMISSION","KHR_TEXTURE_BASISU","EXT_TEXTURE_WEBP","EXT_MESHOPT_COMPRESSION","uses","_markDefs","nodeDefs","nodeIndex","nodeLength","nodeDef","_addNodeRef","_loadLight","lightIndex","dependency","lightNode","lightDef","innerConeAngle","outerConeAngle","createUniqueName","createNodeAttachment","_getNodeRef","getMaterialType","extendParams","materialParams","materialDef","metallicRoughness","pbrMetallicRoughness","baseColorFactor","baseColorTexture","assignTexture","extendMaterialParams","clearcoatFactor","clearcoatTexture","clearcoatRoughnessFactor","clearcoatRoughnessTexture","clearcoatNormalTexture","transmissionFactor","transmissionTexture","textureIndex","textureDef","loadTextureImage","textureLoader","detectSupport","loadBufferView","bufferView","bufferViews","extensionDef","getDependency","ready","byteStride","decodeGltfBuffer","BINARY_EXTENSION_CHUNK_TYPES","headerView","magic","getUint32","chunkContentsLength","chunkView","chunkIndex","chunkLength","chunkType","contentArray","GLTFMeshStandardSGMaterial","isGLTFSpecularGlossinessMaterial","specularMapParsFragmentChunk","glossinessMapParsFragmentChunk","specularMapFragmentChunk","glossinessMapFragmentChunk","lightPhysicalFragmentChunk","glossiness","glossinessMap","_extraUniforms","uniformName","USE_SPECULARMAP","USE_GLOSSINESSMAP","USE_UV","specularGlossinessParams","pbrSpecularGlossiness","diffuseFactor","diffuseTexture","glossinessFactor","specularFactor","specularGlossinessTexture","specGlossMapDef","createMaterial","GLTFCubicSplineInterpolant","decodePrimitive","primitive","bufferViewIndex","gltfAttributeMap","threeAttributeMap","attributeNormalizedMap","attributeTypeMap","threeAttributeName","ATTRIBUTES","accessorDef","accessors","componentType","WEBGL_COMPONENT_TYPES","extendTexture","texCoord","stride2","stride3","WEBGL_CONSTANTS","5120","5121","5122","5123","5125","5126","WEBGL_FILTERS","9728","9729","9984","9985","9986","9987","WEBGL_WRAPPINGS","33071","33648","10497","WEBGL_TYPE_SIZES","POSITION","NORMAL","TANGENT","TEXCOORD_0","TEXCOORD_1","COLOR_0","WEIGHTS_0","JOINTS_0","PATH_PROPERTIES","INTERPOLATION","CUBICSPLINE","LINEAR","STEP","ALPHA_MODES","addUnknownExtensionsToUserData","knownExtensions","objectDef","gltfExtensions","assignExtrasToUserData","gltfDef","meshDef","targetNames","createPrimitiveKey","primitiveDef","dracoExtension","createAttributesKey","attributesKey","associations","primitiveCache","meshCache","cameraCache","lightCache","nodeNamesUsed","addPrimitiveAttributes","assignAttributeAccessor","accessorIndex","accessor","gltfAttributeName","maxDisplacement","computeBounds","hasMorphPosition","hasMorphNormal","pendingPositionAccessors","pendingNormalAccessors","pendingAccessor","morphPositions","addMorphTargets","toTrianglesDrawMode","numberOfTriangles","newIndices","newGeometry","_invokeAll","getDependencies","scenes","skinDefs","skins","meshDefs","meshes","skinLength","skin","_invokeOne","loadScene","loadNode","loadMesh","loadAccessor","loadBuffer","loadMaterial","loadSkin","loadAnimation","loadCamera","defs","bufferIndex","bufferDef","bufferViewDef","pendingBufferViews","elementBytes","itemBytes","ibSlice","ibCacheKey","itemSizeIndices","SCALAR","TypedArrayIndices","byteOffsetIndices","byteOffsetValues","sparseIndices","sparseValues","textureExtensions","webkitURL","sourceURI","isObjectURL","colorType","getUint8","revokeObjectURL","sampler","samplers","mapName","mapDef","gltfReference","assignFinalMaterial","useVertexTangents","useVertexColors","useFlatShading","useMorphTargets","useMorphNormals","pointsMaterial","lineMaterial","materialExtensions","sgExtension","kmuExtension","metallicFactor","roughnessFactor","metallicRoughnessTexture","alphaMode","alphaCutoff","normalTexture","occlusionTexture","emissiveFactor","emissiveTexture","originalName","sanitizedName","loadGeometries","primitives","createDracoPrimitive","geometryPromise","meshIndex","cameraIndex","cameraDef","yfov","znear","zfar","xmag","ymag","skinDef","skinEntry","inverseBindMatrices","animationIndex","animationDef","pendingNodes","pendingInputAccessors","pendingOutputAccessors","pendingSamplers","pendingTargets","inputAccessors","outputAccessors","inputAccessor","outputAccessor","targetName","outputArray","scaled","buildNodeHierachy","parentObject","pendingJoints","jointNodes","jointNode","sceneIndex","sceneDef","nodeIds","60","MTLLoader","setMaterialOptions","materialOptions","delimiter_pattern","materialsInfo","ss","materialCreator","MaterialCreator","setManager","setMaterials","baseUrl","materialsArray","nameLookup","converted","mn","covmat","lprop","normalizeRGB","ignoreZeroRGBs","materialName","getAsArray","createMaterial_","setMapForType","texParams","getTextureParams","invertTrProperty","matParams","61","OBJLoader","object_pattern","material_library_pattern","material_use_pattern","map_use_pattern","ParserState","materialLibraries","startObject","fromDeclaration","previousMaterial","currentMaterial","_finalize","hasUVIndices","startMaterial","mtllib","groupEnd","cloned","lastMultiMaterial","declared","finalize","parseVertexIndex","parseNormalIndex","parseUVIndex","addVertexPoint","addVertexLine","addNormal","addFaceNormal","addColor","addDefaultUV","addUVLine","addFace","vLen","nLen","uvLen","addPointGeometry","addLineGeometry","uvi","lineFirstChar","vertexData","faceVertices","vertexParts","lineParts","lineVertices","lineUVs","llen","pointData","hasVertexColors","createdMaterials","miLen","materialHash","sourceMaterial","materialPoints","materialLine","62","BufferGeometryUtils","mergeBufferGeometries","useGroups","isIndexed","attributesUsed","morphAttributesUsed","mergedGeometry","attributesCount","mergedUserData","mergedIndex","mergedAttribute","mergeBufferAttributes","morphAttributesToMerge","mergedMorphAttribute","arrayLength","interleaveAttributes","getters","setters","iba","estimateBytesUsed","mem","mergeVertices","tolerance","hashToIndex","vertexCount","attributeNames","attrArrays","morphAttrsArrays","morphAttr","decimalShift","log10","shiftMultiplier","newarray","newMorphArrays","getterFunc","oldAttribute","oldMorphAttribute","computeMorphedAttributes","_calculateMorphedAttributeData","modifiedAttributeArray","morphNormal","modifiedPosition","modifiedNormal","morphedPositionAttribute","morphedNormalAttribute","63","createLayout","inherits","createIndices","Base","texWidth","texHeight","bitmap","visibleGlyphs","multipage","computeSphere","computeBox","64","65","bw","u0","u1","66","updateAttribute","newAttrib","isR69","67","clearImmediate","immediateIds","nextImmediateId","Timeout","clearFn","_clearFn","close","unref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","_onTimeout","68","WebVRPolyfill","commonjsGlobal","isMobile","cardboardVrDisplay","createCommonjsModule","createClass","slicedToArray","platform","isWebViewAndroid","isFirefoxAndroid","getChromeVersion","isSafariWithoutDeviceMotion","isChromeWithoutDeviceMotion","_match$1$split","_match$1$split2","branch","build","isR7","isLandscapeMode","rtn","getScreenWidth","getScreenHeight","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","vertexSource","fragmentSource","attribLocationMap","VERTEX_SHADER","FRAGMENT_SHADER","attribName","getProgramUniforms","uniformCount","ACTIVE_UNIFORMS","opera","safariCssSizeWorkaround","frameDataFromPose","piOver180","rad45","defaultOrientation","defaultPosition","updateEyeMatrices","projection","vrDisplay","upTan","upDegrees","downTan","downDegrees","leftTan","leftDegrees","rightTan","rightDegrees","xScale","mat4_perspectiveFromFieldOfView","mat4_fromRotationTranslation","a00","a02","a03","a10","a20","mat4_translate","a30","b00","b01","b02","b03","b04","b05","b06","b07","b08","b09","b10","mat4_invert","_getFieldOfView","_getEyeOffset","getOriginFromUrl","domainIdx","protoSepIdx","domainEndIdx","warnOnce","observedWarnings","deprecateWarning","suggested","glPreserveState","boundValues","TEXTURE_BINDING_2D","TEXTURE_BINDING_CUBE_MAP","TEXTURE0","TEXTURE31","ACTIVE_TEXTURE","boundValue","ARRAY_BUFFER_BINDING","ARRAY_BUFFER","COLOR_CLEAR_VALUE","COLOR_WRITEMASK","CURRENT_PROGRAM","ELEMENT_ARRAY_BUFFER_BINDING","ELEMENT_ARRAY_BUFFER","FRAMEBUFFER_BINDING","FRAMEBUFFER","RENDERBUFFER_BINDING","RENDERBUFFER","TEXTURE_2D","TEXTURE_CUBE_MAP","VIEWPORT","BLEND","CULL_FACE","DEPTH_TEST","SCISSOR_TEST","STENCIL_TEST","distortionVS","distortionFS","CardboardDistorter","cardboardUI","bufferScale","dirtySubmitFrameBindings","ctxAttribs","instanceExt","meshWidth","meshHeight","bufferWidth","drawingBufferWidth","bufferHeight","drawingBufferHeight","realBindFramebuffer","realEnable","realDisable","realColorMask","realClearColor","realViewport","realCanvasWidth","realCanvasHeight","isPatched","lastBoundFramebuffer","blend","viewportOffsetScale","setTextureBounds","indexBuffer","depthStencilBuffer","onResize","unpatch","glState","COLOR_BUFFER_BIT","RGBA","RGB","UNSIGNED_BYTE","TEXTURE_MAG_FILTER","TEXTURE_MIN_FILTER","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","COLOR_ATTACHMENT0","DEPTH_STENCIL","DEPTH_STENCIL_ATTACHMENT","DEPTH_COMPONENT16","DEPTH_ATTACHMENT","STENCIL_INDEX8","STENCIL_ATTACHMENT","FRAMEBUFFER_COMPLETE","pname","positionDivisor","texCoordDivisor","getVertexAttrib","VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE","FLOAT","vertexAttribDivisorANGLE","TRIANGLES","UNSIGNED_SHORT","renderNoState","updateDeviceInfo","deviceInfo","computeMeshVertices_","STATIC_DRAW","computeMeshIndices_","lensFrustum","getLeftEyeVisibleTanAngles","noLensFrustum","getLeftEyeNoLensTanAngles","getLeftEyeVisibleScreenRect","vidx","distortion","distortInverse","halfwidth","halfheight","iidx","getOwnPropertyDescriptor_","uiVS","uiFS","CardboardUI","gearOffset","gearVertexCount","arrowOffset","arrowVertexCount","projMat","Distortion","optionsCallback","backCallback","midline","kButtonWidthDp","physicalPixels","dps","buttonSize","buttonScale","buttonBorder","addGearSegment","segmentTheta","addArrowVertex","angledLineWidth","lr","bt","orthoMatrix","projectionMat","TRIANGLE_STRIP","dr0","distort","dr1","r2","invScalar","Device","widthMeters","heightMeters","bevelMeters","setFromEulerXYZ","setFromEulerYXZ","DEFAULT_ANDROID","DEFAULT_IOS","Viewers","CardboardV1","CardboardViewer","interLensDistance","baselineLensDistance","screenLensDistance","distortionCoefficients","inverseCoefficients","CardboardV2","deviceParams","additionalViewers","viewer","updateDeviceParams","determineDevice_","setViewer","metersPerPixelX","xdpi","metersPerPixelY","ydpi","bevelMm","getDistortedFieldOfViewLeftEye","eyeToScreenDistance","outerDist","innerDist","bottomDist","topDist","outerAngle","innerAngle","bottomAngle","topAngle","fovLeft","fovTop","fovRight","fovBottom","verticalLensOffset","centerX","centerY","centerZ","screenLeft","screenTop","screenRight","screenBottom","undistortedFrustum","dist","eyeX","eyeY","getFieldOfViewLeftEye","opt_isUndistorted","getUndistortedFieldOfViewLeftEye","getFieldOfViewRightEye","getUndistortedParams_","getUndistortedViewportLeftEye","screenWidth","screenHeight","xPxPerTanAngle","yPxPerTanAngle","eyePosX","eyePosY","halfLensDistance","maxFov","viewerMax","DPDB_CACHE","last_updated","devices","Dpdb","onDeviceParamsUpdated","dpdb","recalculateDeviceParams_","DeviceParams","SensorSample","sample","timestampS","ComplementaryFilter","kFilter","isDebug","currentAccelMeasurement","currentGyroMeasurement","previousGyroMeasurement","filterQ","previousFilterQ","accelQ","isOrientationInitialized","estimatedGravity","measuredGravity","gyroIntegralQ","PosePredictor","predictionTimeS","previousQ","previousTimestampS","deltaQ","outQ","FusionPoseSensor","predictionTime","yawOnly","accelerometer","gyroscope","posePredictor","chromeVersion","isDeviceMotionInRadians","isWithoutDeviceMotion","filterToWorldQ","inverseWorldToScreenQ","worldToScreenQ","originalPoseAdjustQ","setScreenTransform_","resetQ","orientationOut_","getDeviceParams","newDeviceParams","calcDeviceParams_","matched","ruleMatches_","dpi","resX","resY","sensorSample","addAccelMeasurement","addGyroMeasurement","timestampDeltaS","deltaT","run_","accelToQuaternion_","gyroDeltaQ","gyroToQuaternionDelta_","invFilterQ","targetQ","getOrientation","accel","normAccel","gyro","getPrediction","currentQ","angularSpeed","predictAngle","_deviceOrientationQ","deviceOrientationFixQ","deviceOrientationFilterToWorldQ","filterOrientation","resetPose","onDeviceOrientation_","beta","onDeviceMotion_","deviceMotion","updateDeviceMotion_","accGravity","accelerationIncludingGravity","rotRate","rotationRate","deltaS","onOrientationChange_","screenOrientation","onMessage_","deviceMotionEvent","onDeviceMotionCallback_","onOrientationChangeCallback_","onMessageCallback_","onDeviceOrientationCallback_","isFramed","refOrigin","referrer","thisOrigin","isInsideCrossOriginIFrame","X_AXIS","Z_AXIS","SENSOR_TO_VR","PoseSensor","classCallCheck","sensor","fusionSensor","_out","_sensorQ","_outQ","_onSensorRead","_onSensorError","RelativeOrientationSensor","frequency","useDeviceMotion","K_FILTER","PREDICTION_TIME_S","YAW_ONLY","DEBUG","RotateInstructions","loadIcon_","overlay","marginTop","snackbar","snackbarText","snackbarButton","borderLeft","hide","ViewerSelector","defaultViewer","selectedKey","dialog","createDialog_","onChangeCallbacks_","show","parentElement","showTemporarily","disableShowTemporarily","getCurrentViewer","getSelectedKey_","fireOnChange_","onSave_","createH1_","createChoice_","createButton_","h1","marginBottom","div","NoSleep$1","createCommonjsModule$$1","commonjsGlobal$$1","modules","installedModules","__webpack_require__","moduleId","mediaFile","oldIOS","MSStream","NoSleep","noSleepTimer","noSleepVideo","nextDisplayId","defaultLeftBounds","defaultRightBounds","caf","VRDisplayCapabilities","hasExternalDisplay","canPresent","maxLayers","hasOrientation","VRDisplay","USE_WAKELOCK","wakelock","isPolyfilled","displayId","waitingForPresent_","layer_","originalParent_","fullscreenElement_","fullscreenWrapper_","fullscreenElementCachedStyle_","fullscreenEventTarget_","fullscreenChangeHandler_","fullscreenErrorHandler_","wakelock_","_getPose","_resetPose","getImmediatePose","wrapForFullscreen","cssProperties","applyFullscreenElementStyle","removeFullscreenWrapper","requestPresent","wasPresenting","incomingLayer","updatePresent_","predistorted","fullscreenElement","addFullscreenListeners_","actualFullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","beginPresent_","unlock","disableWakeLock","endPresent_","removeFullscreenListeners_","fireVRDisplayPresentChange_","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","enableWakeLock","exitPresent","fireVRDisplayConnect_","changeHandler","fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","whichEye","ADDITIONAL_VIEWERS","DEFAULT_VIEWER","MOBILE_WAKE_LOCK","DPDB_URL","CARDBOARD_UI_DISABLED","ROTATE_INSTRUCTIONS_DISABLED","BUFFER_SCALE","DIRTY_SUBMIT_FRAME_BINDINGS","Eye","CardboardVRDisplay","config$$1","bufferScale_","poseSensor_","distorter_","cardboardUI_","dpdb_","onDeviceParamsUpdated_","deviceInfo_","viewerSelector_","onViewerChanged_","rotateInstructions_","onResize_","linearAcceleration","angularAcceleration","fieldOfView","eyeParams","newParams","updateBounds_","orientationHandler","vrdisplaypresentchangeHandler","fireVRDisplayDeviceParamsChange_","lastWidth","lastHeight","vrdisplay","DefaultConfig","PROVIDE_MOBILE_VRDISPLAY","polyfillDisplays","hasNative","native","getVRDisplays","displays","getPolyfillDisplays","_polyfillDisplaysPopulated","NativeVRFrameData","nativeFrameData","nativeGetFrameData","nativeDisplays","webvrPolyfill","require$$0","69","newline","whitespace","idxOf","chr","isWhitespace","monospace","lineStart","isNewline","pre","testWidth","newLine","lineEnd","nextStart","greedy","70","initParams","createXHR","_createXHR","called","responseXML","firefoxBugTakenEffect","getXml","isJson","errorFunc","timeoutTimer","failureResponse","loadFunc","aborted","useXDR","rawRequest","cors","XDomainRequest","onprogress","beforeSend","71","ActiveXObject","xmlDoc","loadXML","72","73","74","colorHelperFrom","colorHelperTo","getComponentProperty","entity","setComponentProperty","toRadians","addEventListeners","eventNames","removeEventListeners","getRawProperty","splitDot","setRawProperty","targetValue","isRawProperty","dur","elasticity","startEvents","pauseEvents","resumeEvents","eventDetail","animationIsPlaying","onStartEvent","beginAnimation","fromColor","toColor","updateConfigForDefault","updateConfigForRawColor","createAndStartAnimation","pausedWasPlaying","updateConfig","stopRelatedAnimations","waitComponentInitRawProperty","setColorConfig","lastValue","aframeProperty","updateConfigForVector","getPropertyType","75","spectator","updateActiveCamera","updateSpectatorCamera","system","activeCameraEl","setActiveCamera","disableActiveCamera","spectatorCameraEl","setSpectatorCamera","disableSpectatorCamera","76","EVENTS","STATES","CANVAS_EVENTS","DOWN","WEBXR_EVENTS","downEvents","fuse","fuseTimeout","mouseCursorStylesEnabled","upEvents","rayOrigin","cursorDownEl","intersectedEl","canvasBounds","isCursorDown","updateCanvasBounds","intersectedEventDetail","cursorEl","onCursorDown","onCursorUp","onIntersection","onIntersectionCleared","onEnterVR","updateMouseEventListeners","removeState","addCanvasListeners","downEvent","upEvent","rayCasterConfig","checkIntersections","twoWayEmit","currentIntersection","els","intersections","clearCurrentIntersection","setIntersection","clearedEls","xrSession","addState","ignoreRemaining","evtName","77","trackedControlsUtils","checkControllerPresentAndSetup","emitIfAxesChanged","onButtonEvent","isWebXRAvailable","GAMEPAD_ID_PREFIX","INPUT_MAPPING","touchpad","trackpad","buttonColor","buttonTouchedColor","buttonHighlightColor","orientationOffset","armModel","bindMethods","onModelLoaded","onControllersUpdate","checkIfControllerPresent","removeControllersUpdateListener","onAxisMoved","onButtonChanged","onButtonDown","onButtonUp","onButtonTouchStart","onButtonTouchEnd","controllerPresent","lastControllerCheck","controllerEventsActive","addControllersUpdateListener","injectTrackedControls","idPrefix","DAYDREAM_CONTROLLER_MODEL_BASE_URL","mtl","buttonMeshes","controllerObject3D","menu","updateModel","buttonName","updateButtonModel","78","GEARVR_CONTROLLER_MODEL_BASE_URL","trigger","79","defaultModel","defaultModelColor","thumbstick","wasControllerConnected","rendererSystem","systems","iterateControllerProfiles","initDefaultModel","modelEl","80","geometryNames","dummyGeometry","schemaChange","skipCache","previousData","unuseGeometry","getOrCreateGeometry","getObject3D","updateSchema","currentGeometryType","newGeometryType","extendSchema","81","getDRACOLoader","gltfModel","82","MODEL_URLS","toonLeft","toonRight","lowPolyLeft","lowPolyRight","highPolyLeft","highPolyRight","ANIMATIONS","getGestureEventName","handModelStyle","pressedButtons","touchedButtons","onGripDown","handleButton","onGripUp","onTrackpadDown","onTrackpadUp","onTrackpadTouchStart","onTrackpadTouchEnd","onTriggerDown","onTriggerUp","onTriggerTouchStart","onTriggerTouchEnd","onGripTouchStart","onGripTouchEnd","onThumbstickDown","onThumbstickUp","onAorXTouchStart","onAorXTouchEnd","onBorYTouchStart","onBorYTouchEnd","onSurfaceTouchStart","onSurfaceTouchEnd","onControllerConnected","onControllerDisconnected","previousHand","controlConfiguration","handColor","handmodelUrl","handModelOrientation","lastGesture","isPressed","isTouched","determineGesture","animateGesture","emitGestureEvents","isGripActive","isSurfaceActive","surface","isTrackpadActive","isTriggerActive","isABXYActive","AorX","BorY","trackedControls","profiles","isViveController","playAnimation","fromAction","toAction","83","BONE_PREFIX","JOINTS","BONE_MAPPING","modelStyle","modelColor","jointEls","webXROptionalAttributes","optionalFeatures","isPinched","pinchEventDetail","indexTipPosition","updateReferenceSpace","webxr","sessionReferenceSpaceType","getOffsetReferenceSpace","XRRigidTransform","warnIfFeatureNotRequested","handTracking","trackedControlsWebXR","updateHandModel","detectGesture","updateHandDotsModel","updateHandMeshModel","getBone","jointTransform","jointEl","detectPinch","thumbTipPosition","indexTipPose","thumbTipPose","handTrackingEnabled","initDotsModel","initMeshHandModel","modelURL","skinnedMesh","84","85","controlsConfiguration","createRay","controllerConfig","raycasterConfig","showLine","modelReady","86","rotateCubemap","frameBuffer","requiredFeatures","onExitVR","onRequestedReferenceSpace","updateSrc","loadCubeMapImages","loadQuadImage","glayer","xrGLFactory","visibilityChanged","pendingCubeMapUpdate","loadingScreen","getSubImage","loadCubeMapImage","textureIsVideo","updateQuadPanel","preGenerateCubeMapTextures","generateCubeMapTextures","faceOffset","imgTmp0","imgTmp2","cubeFaceSize","textureSourceCubeFaceSize","cubefaceTextures","tempCanvas","tempCanvasContext","layerColorTexture","UNPACK_FLIP_Y_WEBGL","loadingScreenImages","errorCode","TEXTURE_CUBE_MAP_POSITIVE_X","initLayer","updateTransform","draw","onvisibilitychange","initCubeMapLayer","initQuadLayer","createQuadLayer","viewPixelHeight","viewPixelWidth","glSizeLimit","MAX_CUBE_MAP_TEXTURE_SIZE","createCubeLayer","isStatic","initLoadingScreenImages","destroyLayer","toggleCompositorLayer","enableCompositorLayer","layerEnabled","quadPanelEl","previousFrameBuffer","subImage","textureEl","xrReadFramebuffer","x1offset","y1offset","x2offset","y2offset","READ_FRAMEBUFFER","NEAREST","blitTexture","hasWebXR","87","if","defaultTarget","registerLight","diffData","setLight","updateShadow","shadowsLoaded","applyColorCorrection","hasLoaded","onSetTarget","newLight","getLight","cameraHelper","targetEl","88","isEqualVec3","geoNeedsUpdate","89","registerShader","highlightedColor","peekMode","visualAspectEnabled","previousQuaternion","quaternionClone","hiddenEls","initVisualAspect","updateEventListener","updatePeekMode","sphereEl","hideAll","showAll","semiSphereEl","textEl","visualAspectInitialized","pano","segmentsWidth","segmentsHeight","borderEnabled","cameraWorldPosition","elWorldPosition","cameraPortalOrientation","calculateCameraPortalOrientation","peekCameraPortalOrientation","mat4","portalNormal","portalPosition","90","PI_2","magicWindowTrackingEnabled","pointerLockEnabled","reverseMouseDrag","reverseTouchDrag","touchEnabled","mouseEnabled","deltaYaw","previousHMDPosition","hmdQuaternion","magicWindowAbsoluteEuler","magicWindowDeltaEuler","magicWindowObject","deltaRotation","savedPose","pointerLocked","setupMouseControls","previousMouseEvent","setupMagicWindowControls","magicWindowControls","DeviceOrientationControls","DeviceOrientationEvent","permissionGranted","updateGrabCursor","exitPointerLock","updateOrientation","onPointerLockChange","onPointerLockError","mouseDown","pitchObject","yawObject","canvasEl","poseMatrix","checkHeadsetConnected","updateMagicWindowOrientation","previousMagicWindowYaw","mozMovementX","mozMovementY","showGrabbingCursor","requestPointerLock","mozRequestPointerLock","hideGrabbingCursor","touchStart","touchStarted","saveCameraPose","restoreCameraPose","pointerLockElement","mozPointerLockElement","enableGrabCursor","disableGrabCursor","hasSavedPose","91","previousButtonValues","controllerIndex","analogValue","setButtonColor","92","shaders","shaderNames","disposeMaterial","unregisterMaterial","npot","updateShader","updateMaterial","currentShader","newShader","updateBehavior","tickProperties","tickTime","addBehavior","removeBehavior","shaderInstance","Shader","oldDataHasKeys","parseSide","coloring","parseVertexColors","parseBlending","defaultMaterial","registerMaterial","waitForMesh","93","objLoader","mtlLoader","applyMaterial","resetMesh","loadObj","objUrl","mtlUrl","BASE_PATH","objModel","94","95","TOUCH_CONTROLLER_MODEL_BASE_URL","OCULUS_TOUCH_WEBVR","modelUrl","modelPivotOffset","modelPivotRotation","OCULUS_TOUCH_WEBXR","CONTROLLER_PROPERTIES","buttonTouchColor","controllerType","loadModel","controllerId","displayModel","trackedControlsSystem","webVRId","originalXRotationTrigger","originalXPositionGrip","xbutton","abutton","ybutton","bbutton","96","97","OBSERVER_SELECTOR_RE","OBSERVER_CONFIG","autoRefresh","lineOpacity","useWorldCoordinates","clearedIntersectedEls","unitLineEndVec3","intersectedEls","newIntersectedEls","newIntersections","prevCheckTime","prevIntersectedEls","rawIntersections","updateOriginDirection","setDirty","updateLine","dirty","lineEndVec3","otherLineEndVec3","intersectedDetail","intersectedClearedDetail","intersectionClearedDetail","intersectionDetail","drawLine","clearAllIntersections","refreshObjects","flattenObject3DMaps","tock","lineLength","originVec3","endVec3","isEntity","object3DMap","98","99","100","COMPONENTS","101","102","constants","createAlertDialog","closeText","dialogText","onOkClicked","buttonsContainer","okButton","AFRAME_INJECTED","createDialog","buttonsContainerEl","modalContainer","dialogTextContainer","deviceMotionMessage","mobileDesktopMessage","httpsMessage","denyButtonText","allowButtonText","cancelButtonText","hostname","protocol","showHTTPAlert","isMobileDeviceRequestingDesktopSite","showMobileDesktopModeAlert","onDeviceMotionDialogAllowClicked","onDeviceMotionDialogDenyClicked","devicePermissionDialogEl","denyText","allowText","onAllowClicked","onDenyClicked","denyButton","acceptButton","createPermissionDialog","safariIpadAlertEl","httpAlertEl","103","enterVREl","removeFullScreenStyles","addFullScreenStyles","104","getFog","updateMaterials","105","pkg","INSPECTOR_RELEASE_URL","getFuzzyPatchVersion","INSPECTOR_URL","INSPECTOR_VERSION","firstPlay","onKeydown","onMessage","initOverlay","urlParam","getUrlParameter","openInspector","loadingMessageEl","LOADING_MESSAGE","showLoader","hideLoader","focusEl","script","INSPECTOR","inspectorInjected","106","shouldCaptureKeyEvent","enterVR","exitVR","onKeyup","enterVREnabled","107","mixin","initPool","availableEls","usedEls","createEntity","wrapPlay","playMethod","requestEntity","returnEntity","108","cubeMapSize","shortcutPressed","setCapture","cubeRenderTarget","isVREnabled","renderCapture","saveCapture","getCanvas","imageData","flipPixelsVertically","flippedPixels","toBlob","linkEl","click","109","RStats","AFrameStats","aframeStats","ThreeStats","threeStats","caption","below","createStats","statsEl","hideBound","showBound","110","applyStickyHoverFix","buttonEl","enterVRButton","enterARButton","insideLoader","enterAREl","orientationModalEl","updateEnterInterfaces","toggleOrientationModalIfNeeded","onEnterVRButtonClick","onEnterARButtonClick","onModalClick","enterAR","vrButton","createEnterVRButton","arButton","createEnterARButton","createOrientationModal","uiElement","toggleEnterVRButtonIfNeeded","toggleEnterARButtonIfNeeded","checkARSupport","isLandscape","111","cast","receive","onMeshChanged","setShadowMapEnabled","updateDescendants","positional","volume","audioLoader","pool","mustPlay","playSoundBound","playSound","sound","srcChanged","setupSound","evtDetail","stopSound","oldEvt","audioListener","pauseSound","processSound","createTextGeometry","loadBMFont","coreShader","FONT_BASE_URL","FONTS","aileronsemibold","dejavu","exo2bold","exo2semibold","kelsonsans","monoid","mozillavr","roboto","sourcecodepro","MSDF_FONTS","promiseGenerator","fontWidthFactors","protocolRe","computeWidth","wrapPixels","wrapCount","widthFactor","anchor","fontImage","shaderData","createOrUpdateMaterial","currentFont","updateGeometry","updateFont","shaderObject","hasChangedShader","NewShader","fontSrc","lookupFont","fontImgSrc","digitsum","digits","computeFontWidthFactor","getFontImageSrc","initMesh","fontObj","imageSrc","geometryComponent","textScale","ascender","geometryUpdateBase","geometryUpdateData","newLineRegex","tabRegex","controllerUtils","DEFAULT_CAMERA_HEIGHT","DEFAULT_HANDEDNESS","EYES_TO_ELBOW","FOREARM","EMPTY_DAYDREAM_TOUCHES","autoHide","headElement","buttonStates","changedAxes","targetControllerNumber","axisMoveEventDetail","deltaControllerPosition","controllerQuaternion","controllerEuler","updateGamepad","buttonEventDetails","updatePose","updateButtons","defaultUserHeight","getHeadElement","findMatchingControllerWebVR","applyArmModel","controllerPosition","headObject3D","buttonState","touched","handleAxes","handlePress","handleTouch","handleValue","controllerAxes","previousAxis","previousButtonState","updateController","isControllerPresent","findMatchingControllerWebXR","INDEX_CONTROLLER_MODEL_URL","INDEX_CONTROLLER_MODEL_BASE_URL","INDEX_CONTROLLER_ROTATION_OFFSET_WEBXR","INDEX_CONTROLLER_ROTATION_OFFSET","INDEX_CONTROLLER_POSITION_OFFSET","triggerOriginalRotationX","triggerPressed","trackpadPressed","pressedName","KEYCODE_TO_CODE","keyboardevent","KEYS","acceleration","adAxis","adEnabled","adInverted","wsAxis","wsEnabled","wsInverted","onVisibilityChange","attachVisibilityEventListeners","isEmptyObject","updateVelocity","getMovementVector","removeKeyEventListeners","removeVisibilityEventListeners","attachKeyEventListeners","adSign","wsSign","scaledEasing","KeyA","ArrowLeft","KeyD","ArrowRight","KeyW","ArrowUp","KeyS","ArrowDown","directionVector","rotationEuler","xRotation","oncontextmenu","MODEL_FILENAMES","GAMEPAD_ID_PATTERN","axisMeshNames","buttonMeshNames","pointingPoseMeshName","hideDisconnected","onModelError","setModelVisibility","loadedMeshInfo","axisMeshes","createdFromMesh","updateControllerModel","sourceUrl","createControllerModelUrl","forceDefault","trackedControlsComponent","hasNativeWebXRImplementation","defaultUrl","meshName","meshInfo","controllerModel","getImmediateChildByName","unpressed","calculateRayOriginFromMesh","object3d","lerpAxisTransform","axisValue","axisMeshInfo","lerpValue","lerpButtonTransform","buttonValue","buttonMeshInfo","numAxes","modelVisible","124","125","ANode","registerElement","mediaElementLoaded","checkProgress","secondsBuffered","buffered","fixUpMediaElement","mediaEl","newMediaEl","extractDomain","host","inferResponseType","getFileNameFromURL","dotLastIndex","filePath","isAssets","attachedCallback","mediaEls","imgEl","imgEls","srcObject","detachedCallback","isAssetItem","loadedBytes","totalBytes","126","srcs","127","AEntity","OBJECT3D_COMPONENTS","ONCE","initializingComponents","componentsToUpdate","rotationObj","states","oldVal","justInitialized","setEntityAttribute","assetsEl","addToParent","removeComponent","removeFromParent","oldObj","getOrCreateObject3D","attachedToParent","updateComponents","getChildEntities","childEntities","initComponent","isDependency","componentId","componentInfo","checkComponentDefined","initComponentDependencies","initialized","tryRemoveLater","extraComponents","attrValue","mixinEls","componentCache","isComponent","getExtraComponents","getDOMAttribute","styleParser","clobber","updateProperties","resetProperty","mixinUpdate","entities","computedMixinStr","componentsUpdated","newMixins","oldMixins","mixinEl","mixinIds","updateMixins","handleMixinUpdate","oldMixinIds","singlePropUpdate","newAttrValue","delimiterIndex","flushToDOM","entityEl","getRotation","stateIndex","inspector","inMixin","isComponentMixedIn","128","isMixin","cacheAttribute","updateEntities","closestScene","cacheAttributes","parseAttrValueForCache","129","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","childFilter","childrenLoaded","newMixinIdArray","oldMixinIdArray","newMixinIds","unregisterMixin","registerMixin","compositedMixinIds","mixinId","130","knownTags","wrapMethods","targetObj","methodList","derivedObj","baseObj","derivedMethod","baseMethod","wrapMethod","copyProperties","newObj","isANode","isAEntity","addTagName","wrapANodeMethods","wrapAEntityMethods","131","parseProperties","parseProperty","processSchema","isSingleProp","isSingleProperty","stringifyProperties","stringifyProperty","aframeScript","currentScript","upperCaseRegExp","objectPools","isSinglePropertyObject","isObjectBased","objectPool","events","eventsBind","nextData","use","removeUnusedKeys","previousOldData","parsingAttrValue","throttledEmitComponentChanged","prevData","silent","updateCachedAttrValue","tempObject","recycle","clearObject","extendProperties","parsedValue","callUpdateHandler","initialOldData","buildData","mayNeedSchemaUpdate","schemaChangeKeys","hasComponentChanged","copyData","isPositionRotationScale","schemaAddon","extendedSchema","newData","componentDefined","mixinData","isObjectOrArray","eventsAttach","eventsDetach","registrationOrderWarnings","sourceData","parsedProperty","hasBehavior","NewComponent","schemaIsSingleProp","pauseMethod","DOCUMENT_POSITION_FOLLOWING","shouldPlay","createPool","132","Geometry","registerGeometry","NewGeometry","133","propertyTypes","nonCharRegex","urlRegex","registerPropertyType","defaultParse","defaultStringify","assetParse","parsedUrl","intParse","vecParse","isValidDefaultCoordinate","possibleCoordinates","isValidDefaultValue","134","initMetaTags","initWakelock","initPostMessageAPI","getCanvasSize","embedded","isVR","getMaxSize","setupCanvas","onFullScreenChange","dataset","aframeCanvas","AScene","isAR","systemNames","behaviors","originalHTML","setupRenderer","onVRPresentChangeBound","onVRPresentChange","enterVRBound","exitVRBound","exitVRTrueBound","pointerRestrictedBound","pointerRestricted","pointerUnrestrictedBound","pointerUnrestricted","attachedCallbackPostCamera","initSystems","initSystem","behaviorArr","behaviorType","getPointerLockElement","errorMessage","useAR","xrInit","vrManager","refspace","xrMode","sessionConfiguration","requestSession","enterVRSuccess","getVRDisplay","hasNativeWebVRImplementation","presentationAttributes","highRefreshRate","foveationLevel","navigationUI","exitVRSuccess","forceCanvasResizeSafariMobile","getComputedAttribute","componentPropValue","isVRPresenting","maxCanvasSize","rendererAttr","rendererAttrString","maxCanvasWidth","maxCanvasHeight","renderStarted","savedBackground","135","titleEl","getSceneCanvasSize","loaderScene","sphereGeometry","sphereMaterial","sphereMesh1","sphereMesh2","sphereMesh3","loaderAttribute","dotsColor","136","attrs","MOBILE_HEAD_TAGS","MOBILE_IOS_HEAD_TAGS","exists","headEl","headScriptEl","headTags","createAndInjectTag","tagObj","createTag","137","isIframed","postMessageAPIHandler","138","139","Wakelock","140","PropertyTypes","processPropertyDefinition","propDefinition","isCustomType","propData","getPartialData","propValue","stringifiedData","141","propertyToThreeMapping","vec2","vec3","vec4","initVariables","varType","variables","updateVariables","materialKey","setMapOnTextureLoad","updateMapMaterialFromData","142","System","rawData","registerSystem","NewSystem","findAllScenes","143","originalPosition","originalRotation","originalParent","originalGroup","outerGroup","materialMappings","addMapping","htmlAttrName","defaultComponents","mappings","146","147","registerPrimitive","defaultAttributes","defaultComponentsFromPrimitive","deprecatedMappings","resolveMappingCollisions","mixinComponents","isPureObject","extendDeep","getComponentPropertyPath","definePrimitive","addComponentMapping","148","149","getMeshMixin","radiusOuter","radiusInner","segmentsTheta","150","segmentsRadial","151","152","153","154","155","meshMixin","156","meshPrimitives","157","158","159","160","161","unCamelCase","geometryName","geometryHyphened","162","segmentsDepth","163","164","165","166","167","168","169","170","171","segmentsPhi","172","173","174","radiusTubular","segmentsTubular","175","176","rotateVector","uvMinVector","uvMaxVector","uvScaleVector","vertexA","vertexB","vertexC","177","getVRDevices","isIOSOlderThan10","polyfillConfig","cordova","webvrpolyfill","isIE11","isBrowserEnvironment","AComponent","ANIME","coreComponents","178","_rS","_scene","getEntityCount","getEntriesByName","fractions","179","180","getMaterialData","materialData","textureSrc","181","182","183","isWebGL2AVailable","VERTEX_SHADER_WEBGL1","VERTEX_SHADER_WEBGL2","FRAGMENT_SHADER_WEBGL1","FRAGMENT_SHADER_WEBGL2","184","185","CubeLoader","texturePromises","ambientOcclusionMap","ambientOcclusionMapIntensity","ambientOcclusionTextureOffset","ambientOcclusionTextureRepeat","displacementTextureOffset","displacementTextureRepeat","metalnessTextureOffset","metalnessTextureRepeat","normalTextureOffset","normalTextureRepeat","roughnessTextureOffset","roughnessTextureRepeat","sphericalEnvMap","updateDistortionMap","updateEnvMap","isLoadingEnvMap","SphericalReflectionMapping","handleTextureEvents","srcLoader","validateCubemapSrc","186","187","188","unwrapRender","wrapRender","initialCameraFound","numUserCameras","numUserCamerasChecked","setupInitialCamera","cameraEls","checkUserCamera","createDefaultCamera","cameraData","defaultCameraEl","newCameraEl","newCamera","previousCamera","defaultCameraWrapper","defaultCamera","removeDefaultCamera","originalRender","spectatorCamera","189","createGeometry","GeometryClass","geometryInstance","cacheCount","clearCache","cachedGeometry","incrementCacheCount","decrementCacheCount","190","dracoDecoderPath","191","192","defaultLightsEnabled","defaultLights","userDefinedLights","setupDefaultLights","removeDefaultLights","ambientLight","directionalLight","193","isHLS","setTextureProperties","textureCounts","textureCache","onMaterialTextureLoaded","clearTextureCache","childElementCount","loadVideo","validateSrc","loadCanvas","handleImageTextureLoaded","resolveTexture","loadImageTexture","videoEl","videoTextureResult","handleVideoTextureLoaded","hashVideo","fixVideoAttributes","createVideoEl","needsCorrectionBGRA","needsCorrectionFlipY","videoAttributes","calculateVideoCacheHash","194","isOculusBrowser","colorManagement","colorOrTexture","195","SHADOW_MAP_TYPE_MAP","pcf","pcfsoft","196","isChrome","updateControllerList","throttledUpdateControllerList","prevCount","197","oldControllers","oldControllersLength","198","overlayElement","domOverlay","wasFeatureRequested","feature","optIntro","199","prependedArgs","200","COORDINATE_KEYS","isCoordinates","parseIfString","defaultVec","coordinate","isCoordinate","201","debugLib","getDebugNamespaceType","getDebugNamespaceColor","ls","logs","202","supportsVRSession","supportsARSession","isSessionSupported","supportsSession","_isMobile","isTablet","isMobileVR","mockUserAgent","isFirefoxReality","isNodeEnvironment","203","propertyPathCache","splitName","204","205","deepAssign","objectAssign","isGearVR","isOculusGo","functionToThrottle","minimumInterval","optionalContext","sinceLastTime","throttleTick","arrayPool","keysA","keysB","valA","valB","aVal","bVal","bKey","isComparingObjects","splitString","getElData","matchingElements","allElements","206","207","appName","getInternetExplorerVersion","208","209","HLS_MIMETYPES","COLOR_MAPS","materialSrcs","setMap","longType","shortType","210","EMPTY_SLOT","defaultObjectFactory","objectFactory","objPool","nextFreeSlot","grow","objToUse","211","212","isImageCb","isVideoCb","onResult","contentType","getResponseHeader","checkIsImageFallback","checkIsImage","isImage","parsedSrc","tester","aCubemap","cubemapSrcRegex","validatedUrls","validateAndGetQuerySelector","213","DASH_REGEX","toCamelCase","upperCase","transformKeysToCamelCase","camelKey","parsedData","getKeyValueChunks","styleParse","keyCount","styleStringify","hasUnclosedUrl","nextSplit","chunk","214","AXIS_LABELS","isControllerPresentWebVR","queryObject","filterControllerIndex","isControllerPresentWebXR","filterIdExact","filterIdPrefix","filterHand","matchingControllerOccurence","iterateProfiles","controllerMatch","isPresent","axesMapping","buttonType","215","deviceOrientation","alphaOffset","onDeviceOrientationChangeEvent","onScreenOrientationChangeEvent","setObjectQuaternion","zee","q0","orient","216","glStats","_totalDrawArraysCalls","_totalDrawElementsCalls","_totalUseProgramCalls","_totalFaces","_totalVertices","_totalPoints","_totalBindTexures","WebGLRenderingContext","POINTS","allcalls","over","drawelements","drawarrays","BrowserStats","_usedJSHeapSize","_totalJSHeapSize","usedJSHeapSize","totalJSHeapSize","log1024","_size","average","avgMs","217","nowOffset","rStats","iterateKeys","_settings","_colours","colours","_cssRStats","CSSPath","importCSS","_div","_perfCounters","Graph","_dom","_defArg","_def","_ctx","_current","_dotCanvas","_dotCtx","globalAlpha","_alarmCanvas","_alarmCtx","alarm","StackGraph","_num","PerfCounter","_total","_averageValue","_accumValue","_accumStart","_accumSamples","_spanId","_spanValue","_spanValueText","_started","_average","userTimingAPI","_perf","idArg","legend","218","searchString","219","Util","220","AndroidWakeLock","iOSWakeLock","getWakeLock","animateSpeed","checkpoint","isNavMeshConstrained","targetPosition","setCheckpoint","updateNavLocation","isVelocityActive","getVelocity","GamepadButton","GamepadButtonEvent","Hand","Joystick","rotationSensitivity","pitch","yaw","_lookVector","_moveVector","_dpadVector","updateButtonState","updateRotation","isConnected","dpad","joystick","getDpad","getJoystick","inputX","inputY","getVelocityDelta","dVelocity","isRotationActive","lookControls","hasLookControls","lookVector","getGamepad","_xrGamepads","_empty","handPreference","proxyControls","proxyGamepad","xrController","xrGamepad","navGamepads","navGamepad","getButton","getAxis","DPAD_RIGHT","DPAD_LEFT","DPAD_UP","DPAD_DOWN","connected","getID","FACE_1","FACE_2","FACE_3","FACE_4","L_SHOULDER_1","R_SHOULDER_1","L_SHOULDER_2","R_SHOULDER_2","START","VENDOR","KeyboardEvent","localKeys","attachEventListeners","getKeys","isProxied","getKeyboard","nativeKeyboardEvent","DOM_KEY_LOCATION_STANDARD","DOM_KEY_LOCATION_LEFT","DOM_KEY_LOCATION_RIGHT","DOM_KEY_LOCATION_NUMPAD","STANDARD","NUMPAD","os","browser_os","mergeIf","baseTable","keyCodeToInfoTable","keyCap","keyIdentifierTable","locationTable","codeToKeyTable","ShiftLeft","ShiftRight","ControlLeft","ControlRight","AltLeft","AltRight","OSLeft","OSRight","NumpadEnter","Space","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","KeyB","KeyC","KeyE","KeyF","KeyG","KeyH","KeyI","KeyJ","KeyK","KeyL","KeyM","KeyN","KeyO","KeyP","KeyQ","KeyR","KeyT","KeyU","KeyV","KeyX","KeyY","KeyZ","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadMultiply","NumpadAdd","NumpadComma","NumpadSubtract","NumpadDecimal","NumpadDivide","Semicolon","Equal","Comma","Minus","Period","Slash","Backquote","BracketLeft","Backslash","BracketRight","Quote","IntlBackslash","keyFixTable","Nonconvert","MediaNextTrack","MediaPreviousTrack","SelectMedia","HalfWidth","FullWidth","RomanCharacters","Crsel","Exsel","Zoom","codeTable","remap","nativeLocation","keyInfoForEvent","keyInfo","keyLocation","keyIdentifier","queryKeyCap","identifyKey","reverseEnabled","constrainToNavMesh","velocityCtrl","heading","navGroup","navNode","injectControls","nav","addAgent","removeAgent","clampedEnd","updateVelocityCtrl","getGroup","clampStep","control","getPositionDelta","enableNegX","enablePosX","enableNegZ","enablePosZ","zVel","xVel","onAxisMove","isMoving","canRecordAxis","startingAxisData","handleSwipeAxis","handleTouchAxis","axisData","velX","velZ","absChangeZ","LoopMode","regExpEscape","crossFadeDuration","activeActions","stopAction","playAction","ColladaLoader","colladaModel","parseStrings","parseFloats","parseInts","parseId","parseAssetUnit","parseAssetUpAxis","parseLibrary","libraryName","buildLibrary","builder","getBuild","parseAnimationSampler","inputs","semantic","parseAnimationChannel","sid","arraySyntax","memberSyntax","member","buildAnimation","sources","inputId","outputId","OUTPUT","createKeyframeTracks","buildAnimationChannel","getAnimation","outputSource","defaultMatrix","transformAnimationData","prepareAnimationData","positionData","quaternionData","scaleData","getPrev","getNext","createMissingKeyframes","buildAnimationClip","animationTracks","getAnimationClip","parseSkin","bindShapeMatrix","parseSource","parseJoints","vertexWeights","parseVertexWeights","vcount","buildController","jointOffset","JOINT","weightOffset","WEIGHT","jointSource","inverseSource","INV_BIND_MATRIX","jointCount","vertexSkinData","weightId","descending","buildSkin","skinIndices","skinWeights","buildImage","init_from","getImage","parseEffectProfileCOMMON","surfaces","parseEffectNewparam","technique","parseEffectTechnique","extra","parseEffectExtra","parseEffectSurface","parseEffectSampler","parseEffectParameters","parseEffectParameter","parseEffectParameterTexture","parseEffectParameterTextureExtra","parseEffectParameterTextureExtraTechnique","parseEffectExtraTechnique","buildEffect","buildMaterial","profile","textureObject","tgaLoader","getTextureLoader","wrapU","wrapV","offsetU","offsetV","repeatU","repeatV","parameter","double_sided","parseCameraOptics","parseCameraTechnique","parseCameraParameters","buildCamera","optics","aspect_ratio","parseLightTechnique","parseLightParameters","falloffAngle","buildLight","parseGeometryVertices","parseGeometryPrimitive","hasUV","inputname","checkUVCoordinates","uvsNeedsFix","buildGeometry","groupedPrimitives","groupPrimitives","primitiveType","buildGeometryType","materialKeys","prevLength","buildGeometryData","pushVector","sourceStride","buildKinematicsModel","parseKinematicsTechniqueCommon","parseKinematicsJoint","parseKinematicsLink","parseKinematicsJointParameter","limits","static","zeroPosition","middlePosition","attachments","parseKinematicsAttachment","parseKinematicsTransform","parsePhysicsRigidBody","parsePhysicsTechniqueCommon","inertia","parseKinematicsBindJointAxis","tmpJointIndex","jointIndex","buildKinematicsScene","buildTransformList","collada","parseNode","instanceCameras","instanceControllers","instanceLights","instanceGeometries","instanceNodes","parseNodeInstance","instances","buildSkeleton","boneData","sortedBoneData","buildBoneHierarchy","visualScenes","buildNode","instanceCamera","newObjects","buildObjects","instanceLight","fallbackMaterial","resolveMaterialBinding","instanceMaterials","buildVisualScene","getVisualScene","upAxis","parseAsset","TGALoader","kinematics","kinematicsModels","physicsModels","kinematicsScenes","prepareNodes","rigidBodies","bindJointAxis","setupAnimations","kinematicsModelId","kinematicsSceneId","visualSceneId","kinematicsModel","kinematicsScene","getKinematicsScene","visualScene","jointMap","targetElement","parentVisualElement","getJointValue","jointData","setJointValue","visualElement","visualElementName","setupKinematics","parseScene","FBXLoader","crossorigin","fbxTree","connections","sceneGraph","FBXTreeParser","GeometryParser","AnimationParser","TextParser","BinaryParser","BinaryReader","dv","FBXTree","getFbxVersion","convertFBXTimeToSeconds","resourceDirectory","FBXBuffer","CORRECT","convertArrayBufferToString","isFbxFormatBinary","FBXText","isFbxFormatASCII","parseConnections","deformers","parseDeformers","geometryMap","connectionMap","Connections","rawConnection","fromID","toID","relationship","parentRelationship","childRelationship","blobs","Objects","videoNodes","Video","nodeID","videoNode","RelativeFilename","Filename","arrayBufferContent","Content","base64Content","parseImage","filename","textureMap","textureNodes","parseTexture","textureNode","wrapModeU","WrapModeU","wrapModeV","WrapModeV","valueU","valueV","Scaling","FileName","materialMap","materialNodes","parseMaterial","materialNode","ShadingModel","parseParameters","BumpFactor","Diffuse","DiffuseColor","DisplacementFactor","Emissive","EmissiveColor","EmissiveFactor","Opacity","ReflectionFactor","Shininess","Specular","SpecularColor","LayeredTexture","DeformerNodes","Deformer","deformerNode","relationships","attrType","parseSkeleton","geometryID","rawTargets","parseMorphTargets","deformerNodes","rawBones","boneNode","rawBone","transformLink","TransformLink","linkMode","Mode","Indexes","Weights","rawMorphTargets","morphTargetNode","rawMorphTarget","initialWeight","DeformPercent","fullWeights","FullWeights","geoID","modelMap","parseModels","modelNodes","Model","modelNode","setLookAtProperties","connection","bindSkeleton","createAmbientLight","setupMorphMaterials","createCamera","createLight","createMesh","createCurve","setModelTransforms","subBone","cameraAttribute","NodeAttribute","CameraProjectionType","nearClippingPlane","NearPlane","farClippingPlane","FarPlane","AspectWidth","AspectHeight","FieldOfView","FocalLength","lightAttribute","LightType","Intensity","CastLightOnObject","FarAttenuationEnd","EnableFarAttenuation","InnerAngle","OuterAngle","CastShadows","FBX_Deformer","geo","transformData","RotationOrder","Lcl_Translation","rotationOffset","RotationOffset","Lcl_Rotation","preRotation","PreRotation","postRotation","PostRotation","Lcl_Scaling","generateTransform","lookAtTarget","bindMatrices","parsePoseNodes","geoConnParent","BindPoseNode","Pose","poseNodes","PoseNode","poseNode","Matrix","GlobalSettings","ambientColor","AmbientColor","matUuid","sharedMat","geoNodes","parseGeometry","geoNode","parseMeshGeometry","parseNurbsGeometry","GeometricTranslation","GeometricRotation","GeometricScaling","genGeometry","preTransform","geoInfo","parseGeoNode","genBuffers","weightsIndices","mappingType","prevMaterialIndex","lastGroup","vertexPositions","Vertices","vertexIndices","PolygonVertexIndex","LayerElementColor","LayerElementMaterial","parseMaterialIndices","LayerElementNormal","parseNormals","LayerElementUV","parseUVs","weightTable","polygonIndex","faceLength","displayedWeightsWarning","facePositionIndexes","faceNormals","faceColors","faceUVs","faceWeights","faceWeightIndices","vertexIndex","polygonVertexIndex","endOfFace","weightIndices","wt","wIndex","Weight","weightIndex","comparedWeight","comparedWeightIndex","comparedWeightArray","genFace","parentGeo","parentGeoNode","rawTarget","morphGeoNode","genMorphGeometry","morphGeo","morphIndex","morphGeoInfo","morphBuffers","NormalNode","MappingInformationType","referenceType","ReferenceInformationType","Normals","NormalIndex","NormalsIndex","dataSize","UVNode","UV","UVIndex","ColorNode","Colors","ColorIndex","MaterialNode","materialIndexBuffer","materialIndices","NURBSCurve","Order","startKnot","endKnot","degree","knots","KnotVector","pointsValues","Form","animationClips","rawClips","parseClips","rawClip","addClip","AnimationCurve","curveNodesMap","parseAnimationCurveNodes","parseAnimationCurves","layersMap","parseAnimationLayers","parseAnimStacks","rawCurveNodes","AnimationCurveNode","rawCurveNode","curveNode","rawCurves","animationCurve","KeyTime","KeyValueFloat","animationCurveID","animationCurveRelationship","rawLayers","AnimationLayer","layerCurveNodes","modelID","rawModel","modelName","initialPosition","initialRotation","initialScale","getModelAnimTransform","preRotations","postRotations","morph","deformerID","morpherID","morphName","rawStacks","AnimationStack","rawTracks","generateTracks","positionTrack","generateVectorTrack","rotationTrack","generateRotationTrack","scaleTrack","morphTrack","generateMorphTrack","getTimesForAllAxes","getKeyframeTrackValues","interpolateRotations","quaternionValues","morphNum","elem","xIndex","yIndex","xValue","yValue","zValue","valuesSpan","absoluteSpan","numSubIntervals","initialTime","nextTime","interpolatedTimes","interpolatedValues","getPrevNode","currentIndent","getCurrentNode","getCurrentProp","currentProp","pushStack","popStack","setCurrentProp","currentPropName","allNodes","matchComment","matchEmpty","matchBeginning","matchProperty","parseNodeBegin","parseNodeProperty","parseNodePropertyContinued","nodeAttrs","parseNodeAttr","contentLine","connProps","parseNumberArray","parseNodeSpecialProperty","innerPropName","innerPropType1","innerPropType2","innerPropFlag","innerPropValue","reader","endOfContent","endOffset","getUint64","numProperties","nameLen","propertyList","singleProperty","subNode","parseSubNode","getBoolean","getFloat64","getFloat32","getInt32","getInt64","getInt16","compressedLength","getBooleanArray","getFloat64Array","getFloat32Array","getInt32Array","getInt64Array","Zlib","reader2","Inflate","decompress","nullByte","dataArray","infoObject","tempMat","tempEuler","tempVec","getEulerOrder","enums","fetchScript","loadLoader","loaderPromise","removeScript","fetchScriptInternal","scriptId","createScript","timeoutId","disableTimeout","firstScript","appendScript","applyEnvMap","materialNames","enableBackground","object3dsetHandler","addedMaterialNames","removedMaterialNames","maintainedMaterialNames","setBackground","physics","GRABBED_STATE","hitEl","constraint","onHit","onGripOpen","onGripClose","removeConstraint","CANNON","LockConstraint","addConstraint","playerHeight","maxJumps","numJumps","beginJump","collide","onCollide","linearDamping","enableSlopes","enableJumps","addComponent","Vec3","fixedRotation","beforeStep","normalizedVelocity","currentSurfaceNormal","groundNormal","groundBody","didCollide","groundHeight","contacts","getContacts","maxInterval","contact","raycastToGround","driver","world","hitNormal","_updateDirection","intersectBody","hasHit","hitNormalWorld","watch","collisions","handleHit","handleHitEnd","objectEls","meshPosition","colliderScale","distanceMap","colliderRadius","scaleVec","hasLoadedNavMesh","loadNavMesh","navMesh","navMeshGeometry","fromBufferGeometry","setNavMeshGeometry","vDest","vDelta","vNext","getPath","vCurrent","vWaypoint","gazeTarget","getNavMesh","Pathfinding","pathfinder","ZONE","agents","setZoneData","createZone","agent","ctrl","groupID","findPath","getClosestNode","endTarget","computeCentroids","roundNumber","mergeVertexIds","setPolygonCentroid","vertexIds","cleanPolygon","neighbours","isConvex","isPointInPoly","isVectorInPolygon","triarea2","vequal","scoreFunction","sinkDown","bubbleUp","rescoreElement","cost","visited","cleanUp","heap","heuristic","buildZone","_buildNavigationMesh","_buildPolygonGroups","_getSharedVerticesInOrder","portals","_buildPolygonsFromGeometry","polygons","_buildPolygonNeighbours","faceVertexUvs","stringPull","zones","getRandomNode","defaultHexGrid","Primitive","addMesh","HexGrid","board","Board","generateTilemap","addMaterial","TAU","DEG_TO_RAD","RAD_TO_DEG","SQRT3","TILE","ENT","STR","HEX","SQR","ABS","tiles","tileGroup","finder","AStarFinder","setGrid","setEntityOnTile","cellToPixel","cell","heightOffset","tile","addTile","snapTileToGrid","removeTile","removeAllTiles","getTileAtCell","cellToHash","snapToGrid","pixelToCell","getRandomTile","Tools","randomInt","generateOverlay","generateTiles","Cell","walkable","_calcCost","_priority","_visited","LinkedList","generateID","cellSize","numCells","extrudeSettings","autogenerated","_createVertex","cellShape","cellGeo","verticesNeedUpdate","cellShapeGeo","_cellWidth","_cellLength","_hashDelimeter","_directions","_diagonals","_list","_vec3","_cel","_conversionVec","_geoCache","_matCache","TWO_THIRDS","_cubeRound","getCellAt","getNeighbors","getRandomCell","clearPath","generateTile","Tile","tileScale","generateTilePoly","generate","createPointsGeometry","getJSON","SqrGrid","_fullCellSize","randomizeRGB","objectType","structure","_emissive","deselect","free","objToNodeMap","sortArray","swapObjects","showDebug","dump","moveUp","moveDown","_listener","isOnce","execute","isBound","_destroy","_prevParams","memorize","_shouldPropagate","validateListener","_registerListener","_indexOfListener","_addBinding","addOnce","getNumListeners","forget","Signal","allowDiagonal","heuristicFilter","PathUtil","backtrace","biBacktrace","expandPath","smoothenPath","isWalkableAt","compressPath","imageLoader","sourceFile","MouseCaster","rightDown","pickedObject","selectedObject","allHits","screenPosition","_preventDefault","_onDocumentMouseMove","_onDocumentMouseDown","_onDocumentMouseUp","_onMouseWheel","OVER","OUT","CLICK","WHEEL","lightPosition","cameraType","orthoZoom","contolled","OrbitControls","attachTo","updateOrthoZoom","focusOn","SelectionManager","onDeselect","toggleSelection","onMouse","clearSelection","getShortRotation","nwf","Performance","radixSort","ocean","amplitudeVariance","speedVariance","waves","ang","amp","verts","vprops","createPatternBuilder","generateCreateBodyFunctionBody","debugSetters","getVectorCode","getBodyCode","variableList","generateQuadTreeFunctionBody","quadCount","getInsertStackCode","getQuadNodeCode","isSamePosition","getChildBodyCode","setChildBodyCode","assignQuads","recursiveCode","runRecursiveOnChildren","indentCount","insertionCode","assignInsertionQuadIndex","childBody","setChildBody","getChildBody","generateBoundsFunctionBody","generateFunctionBody","generateCreateDragForceFunctionBody","generateCreateSpringForceFunctionBody","generateIntegratorFunctionBody","coefficient","targetHasIt","optionsValueType","inputSeed","nextDouble","randomIterator","customRandom","localRandom","shuffle","gaussian","levy","_interopRequireWildcard","_toConsumableArray2","_defineProperty2","_slicedToArray2","_jsxFileName","RCTSliderWebComponent","_ref$minimumValue","_ref$maximumValue","_ref$step","_ref$minimumTrackTint","minimumTrackTintColor","_ref$maximumTrackTint","maximumTrackTintColor","_ref$thumbTintColor","thumbTintColor","_ref$thumbStyle","_ref$inverted","_ref$enabled","_ref$trackHeight","trackHeight","_ref$thumbSize","thumbSize","_ref$onRNCSliderSlidi","_ref$onRNCSliderSlidi2","_ref$onRNCSliderValue","others","containerSize","containerRef","percentageValue","minPercent","maxPercent","minimumTrackStyle","maximumTrackStyle","thumbViewStyle","decimalPrecision","calculatePrecision","hardRounded","withinBounds","accessibilityActions","tenth","updateValue","onAccessibilityAction","accessibleValue","roundedValue","handleAccessibilityKeys","decimals","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","hasPropertyDescriptor","isNativeReflectConstruct","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","ForwardRef","Lazy","Memo","Portal","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","_concat","partial","_createPartialApplicator","set1","set2","len1","received","argsIdx","combinedIdx","XWrap","thisObj","_checkForMethod","toIndex","dissoc","_objectAssign","ifElse","onTrue","onFalse","_indexOf","inf","_equals","_arrayFromIterator","_containsWith","_functionName","identical","_uniqContentEquals","aIterator","bIterator","stackA","stackB","aItem","typeA","ignoreCase","sticky","extendedStackA","extendedStackB","pred","gte","isNil","cond","arity","_dispatchable","_map","_reduce","_xmap","functor","_isTransformer","transducer","_xfBase","XMap","Axios","mergeConfig","createInstance","defaultConfig","instanceConfig","spread","isAxiosError","InterceptorManager","dispatchRequest","interceptor","fulfilled","rejected","getUri","eject","throwIfCancellationRequested","throwIfRequested","fns","normalizedName","description","columnNumber","expires","secure","cookie","toGMTString","isAbsoluteURL","combineURLs","requestedURL","relativeURL","ignoreDuplicateOf","originURL","msie","urlParsingNode","port","pathname","requestURL","executor","resolvePromise","registerImmediate","nextHandle","tasksByHandle","currentlyRunningATask","doc","runIfPresent","importScripts","postMessageIsAsynchronous","oldOnMessage","canUsePostMessage","messagePrefix","onGlobalMessage","installPostMessageImplementation","installMessageChannelImplementation","installReadyStateChangeImplementation","colorNames","swizzle","reverseNames","hexDouble","hexAlpha","hwba","isArrayish","conversions","fromModel","toModel","wrappedFn","conversion","wrapRounded","wrapRaw","deriveBFS","models","buildGraph","adjacents","adjacent","wrapConversion","arrayValue","keyValueSep","valueof","Dispatch","nodeById","strengths","distances","initializeStrength","initializeDistance","_nodes","distanceMin2","distanceMax2","theta2","treeNode","numChildren","distanceMin","distanceMax","radiuses","initNodes","radii","ri2","prepare","arg4","arg5","arg6","UnavailabilityError","moduleName","initialWindowMetrics","initialWindowSafeAreaInsets","PanGestureHandler","GestureHandlerRootView","GestureState","Screens","AnimatedWebScreen","MaybeScreenContainer","MaybeScreen","MaskedView","TouchableItem","borderless","pressColor","useForeground","TouchableNativeFeedback","HeaderBackButton","labelVisible","pressColorAndroid","truncatedLabel","customTintColor","ios","customPressColorAndroid","handleLabelLayout","onLabelLayout","setInitialLabelWidth","accessibilityComponentType","accessibilityTraits","backImage","leftLabelText","initialLabelWidth","screenLayout","titleLayout","labelElement","maskElement","iconMaskContainer","iconMask","iconMaskFillerRect","renderLabel","labelWrapper","iconWithLabel","HeaderBackground","borderBottomWidth","memoize","hasChanged","getDefaultHeaderHeight","headerHeight","HeaderSegment","isParentHeaderShown","getInterpolatedStyle","styleInterpolator","layouts","leftLabel","leftLabelLayout","headerTitleAlign","headerLeft","onGoBack","headerRight","headerBackImage","headerBackTitle","headerTruncatedBackTitle","headerPressColorAndroid","headerBackAccessibilityLabel","headerBackAllowFontScaling","headerTitleAllowFontScaling","headerTitleStyle","headerBackTitleStyle","headerLeftContainerStyle","headerRightContainerStyle","headerTitleContainerStyle","headerStyle","headerStatusBarHeight","insets","defaultHeight","customHeaderStyle","safeStyles","borderTopWidth","previousTitle","backgroundStyle","leftButton","labelStyle","leftLabelStyle","setLeftLabelLayout","rightButton","headerTintColor","headerBackground","headerTransparent","headerBackTitleVisible","headerTitle","setTitleLayout","customTitleStyle","setFill","getInvertedMultiplier","getDistanceForDirection","multiplier","onTransition","closing","transitionSpec","onClose","onOpen","gestureDirection","gestureVelocityImpact","onGestureBegin","onGestureCanceled","onGestureEnd","swiping","insetLeft","isCurrentlyMounted","getAnimateToValue","lastToValue","handleEndInteraction","gestureResponseDistance","maxDeltaX","minOffsetY","minOffsetX","maxDeltaY","interpolatedStyle","animationContext","getCardAnimationContext","shadowStyle","handleGestureEvent","gestureEnabled","translationY","translationX","isTransparent","CardAnimationContext","overlayEnabled","overlayStyle","needsOffscreenAlphaCompositing","flattenedStyle","onGestureEvent","onHandlerStateChange","handleGestureStateChange","shadowEnabled","Card","shadowHorizontal","shadowLeft","shadowRight","shadowVertical","shadowTop","shadowBottom","safeAreaInsetLeft","setPointerEvents","isCurrentHeaderShown","headerMode","headerShown","previousScene","getPreviousScene","onOpenRoute","onCloseRoute","onPageChangeConfirm","onPageChangeCancel","onTransitionStart","onPageChangeStart","onGestureStart","onGestureCancel","accessibilityElementsHidden","importantForAccessibility","pageOverflowEnabled","hasAbsoluteHeader","HeaderHeightContext","renderScene","getFocusedRoute","onContentHeightChange","onHeaderHeightChange","isIphoneX","dimen","isPad","isTVOS","conditional","forNoAnimation","forFade","leftButtonStyle","rightButtonStyle","titleStyle","forSlideLeft","forSlideRight","forSlideUp","TransitionIOSSpec","FadeInFromBottomAndroidSpec","FadeOutToBottomAndroidSpec","RevealFromBottomAndroidSpec","ScaleFromCenterAndroidSpec","SlideFromRightIOS","cardStyleInterpolator","cardStyle","headerStyleInterpolator","ModalSlideFromBottomIOS","FadeFromBottomAndroid","RevealFromBottomAndroid","ScaleFromCenterAndroid","DefaultTransition","ModalTransition","FALLBACK_DESCRIPTOR","getHeaderHeights","safeAreaInsets","getDistanceFromOptions","getProgressFromGesture","headerHeights","getPreviousRoute","previousRoute","detachInactiveScreens","focusedDescriptor","focusedOptions","focusedHeaderHeight","defaultTransitionPreset","forNoAnimationHeader","activeScreensLimit","detachPreviousScreen","isFloatHeaderAbsolute","floatingHeader","handleLayout","isScreenActive","sceneForActivity","animationEnabled","transitionConfig","nextScene","safeAreaInsetTop","safeAreaInsetRight","safeAreaInsetBottom","closingRouteKeys","cardOverlay","cardOverlayEnabled","cardShadowEnabled","getGesturesEnabled","oldScene","currentGesture","previousGesture","nextGesture","nextDescriptor","previousDescriptor","__memo","absolute","floating","clearKeyboardTimeout","handlePageChangeCancel","HeaderTitle","aria-level","HeaderContainer","parentPreviousScene","previousHeaderShown","isHeaderStatic","initialSafeAreaInsets","safe","iphoneXStyle","regularStyle","currentHeight","getStatusBarHeight","SafeAreaProviderCompat","GestureHandlerWrapper","previousRoutes","previousDescriptors","openingRouteKeys","replacingRouteKeys","keyboardHandlingEnabled","handleGestureCancel","previousFocusedRoute","nextFocusedRoute","isAnimationEnabled","getAnimationTypeForReplace","defaultOptions","InternMap","keyof","_intern","intern_get","intern_set","intern_delete","initRange","implicit","ordinal","unknown","CSSTransitions","MSTransition","OTransition","NativeSafeAreaView","onInsetsChange","getInset","createContextElement","getSupportedTransitionEvent","_supportedTransitionEvent","_supportedEnv","getSupportedEnv","SafeAreaInsetsContext","SafeAreaFrameContext","SafeAreaProvider","parentInsets","parentFrame","initialMetrics","nextInsets","nextFrame","setInsets","useSafeAreaInsets","safeArea","SafeAreaConsumer","specifier"],"mappings":";kFAGEA,EAAOC,QAAU,EAAQ,M,gBCczBD,EAAOC,QAAU,EAAQ,IAAR,I,6BCjBnB,2hDAKA,MACMC,EAAQ,CAAEC,KAAM,EAAGC,OAAQ,EAAGC,MAAO,EAAGC,OAAQ,EAAGC,MAAO,EAAGC,IAAK,GAClEC,EAAQ,CAAEH,OAAQ,EAAGE,IAAK,EAAGE,UAAW,EAAGC,aAAc,GAUzDC,EAAW,EA2DXC,EAAe,KAmBfC,EAAa,KAmHnB,MAAMC,EAEL,iBAAkBC,EAAMC,QAEEC,IAApBC,KAAKC,aAA2BD,KAAKC,WAAa,IAEvD,MAAMC,EAAYF,KAAKC,gBAEIF,IAAtBG,EAAWL,KAEfK,EAAWL,GAAS,KAI4B,IAA5CK,EAAWL,GAAOM,QAASL,IAE/BI,EAAWL,GAAOO,KAAMN,GAM1B,iBAAkBD,EAAMC,GAEvB,QAAyBC,IAApBC,KAAKC,WAA2B,OAAO,EAE5C,MAAMC,EAAYF,KAAKC,WAEvB,YAA6BF,IAAtBG,EAAWL,KAAoE,IAA5CK,EAAWL,GAAOM,QAASL,GAItE,oBAAqBD,EAAMC,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ADwB,IACxBA,OADwB,EACxBA,EADwB,sCAEP,CAEbnujB,EAFa,EAGbC,EAHa,EAIb6H,MAAO62K,kBAJM,MAKb52K,OAAQ42K,kBAAyB52K,SAPvC,WAAM,EAAN,KAAM,EAAN,KAUMwljB,EAAiB,eACpBpvjB,YACC,QACE8+I,YAAa,EADf,EACiBj3G,MAA0BoohB,EAD3C,EACmCxN,QAKjCyN,GACCA,WAAqBrohB,EAArBqohB,QACCA,UAAoBrohB,EADrBqohB,OAECA,MAAgBrohB,EAFjBqohB,GAGCA,MAAgBrohB,EANpB,GAQE84S,KAIC8hO,GACDwN,WAAsBxN,EADtB,QAEAwN,SAAoBxN,EAFpB,MAGAwN,UAAqBxN,EAHrB,OAIAwN,QAAmBxN,EALrB,KAOE0N,OAGJ,CAACtohB,EA3BH,IA8BA,OACE,mBACE1U,MAAO,CAAC+gG,EAAD,KADT,GAEEk7b,eAAgBA,GAEf3M,QACC,gBAACmN,EAAD,UAA+BtujB,MAAOumC,GACpC,gBAAC8nhB,EAAD,UAAgCrujB,MAAOmhjB,GAF1CA,IALL,MAgBF,IAAMvub,EAASD,EAAA,SAAkB,CAC/B1L,KAAM,CAAEqiE,KAAM,KAWT,SAASwlY,IACd,IAAMC,EAAW99b,aAAjB,GACA,SAAI89b,EACF,MAAM,UAAN,iHAIF,OAAOA,EAiCF,IAAMC,EAAmBX,EAAzB,U,6BC1IQ,ICFA,YAEb,IADA,IAAIjujB,EAAI6ujB,EAAUjwjB,OAAS,EAAI,EAAGm1B,EAAS,IAAI/oB,MAAMhL,GAAItB,EAAI,EACtDA,EAAIsB,GAAG+zB,EAAOr1B,GAAK,IAAMmwjB,EAAUpwjB,MAAU,EAAJC,EAAa,IAAJA,GACzD,OAAOq1B,EDDM,CAAO","file":"static/js/2.613df8c6.chunk.js","sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * @license\n * Copyright 2010-2021 Three.js Authors\n * SPDX-License-Identifier: MIT\n */\nconst REVISION = '130';\nconst MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };\nconst TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };\nconst CullFaceNone = 0;\nconst CullFaceBack = 1;\nconst CullFaceFront = 2;\nconst CullFaceFrontBack = 3;\nconst BasicShadowMap = 0;\nconst PCFShadowMap = 1;\nconst PCFSoftShadowMap = 2;\nconst VSMShadowMap = 3;\nconst FrontSide = 0;\nconst BackSide = 1;\nconst DoubleSide = 2;\nconst FlatShading = 1;\nconst SmoothShading = 2;\nconst NoBlending = 0;\nconst NormalBlending = 1;\nconst AdditiveBlending = 2;\nconst SubtractiveBlending = 3;\nconst MultiplyBlending = 4;\nconst CustomBlending = 5;\nconst AddEquation = 100;\nconst SubtractEquation = 101;\nconst ReverseSubtractEquation = 102;\nconst MinEquation = 103;\nconst MaxEquation = 104;\nconst ZeroFactor = 200;\nconst OneFactor = 201;\nconst SrcColorFactor = 202;\nconst OneMinusSrcColorFactor = 203;\nconst SrcAlphaFactor = 204;\nconst OneMinusSrcAlphaFactor = 205;\nconst DstAlphaFactor = 206;\nconst OneMinusDstAlphaFactor = 207;\nconst DstColorFactor = 208;\nconst OneMinusDstColorFactor = 209;\nconst SrcAlphaSaturateFactor = 210;\nconst NeverDepth = 0;\nconst AlwaysDepth = 1;\nconst LessDepth = 2;\nconst LessEqualDepth = 3;\nconst EqualDepth = 4;\nconst GreaterEqualDepth = 5;\nconst GreaterDepth = 6;\nconst NotEqualDepth = 7;\nconst MultiplyOperation = 0;\nconst MixOperation = 1;\nconst AddOperation = 2;\nconst NoToneMapping = 0;\nconst LinearToneMapping = 1;\nconst ReinhardToneMapping = 2;\nconst CineonToneMapping = 3;\nconst ACESFilmicToneMapping = 4;\nconst CustomToneMapping = 5;\n\nconst UVMapping = 300;\nconst CubeReflectionMapping = 301;\nconst CubeRefractionMapping = 302;\nconst EquirectangularReflectionMapping = 303;\nconst EquirectangularRefractionMapping = 304;\nconst CubeUVReflectionMapping = 306;\nconst CubeUVRefractionMapping = 307;\nconst RepeatWrapping = 1000;\nconst ClampToEdgeWrapping = 1001;\nconst MirroredRepeatWrapping = 1002;\nconst NearestFilter = 1003;\nconst NearestMipmapNearestFilter = 1004;\nconst NearestMipMapNearestFilter = 1004;\nconst NearestMipmapLinearFilter = 1005;\nconst NearestMipMapLinearFilter = 1005;\nconst LinearFilter = 1006;\nconst LinearMipmapNearestFilter = 1007;\nconst LinearMipMapNearestFilter = 1007;\nconst LinearMipmapLinearFilter = 1008;\nconst LinearMipMapLinearFilter = 1008;\nconst UnsignedByteType = 1009;\nconst ByteType = 1010;\nconst ShortType = 1011;\nconst UnsignedShortType = 1012;\nconst IntType = 1013;\nconst UnsignedIntType = 1014;\nconst FloatType = 1015;\nconst HalfFloatType = 1016;\nconst UnsignedShort4444Type = 1017;\nconst UnsignedShort5551Type = 1018;\nconst UnsignedShort565Type = 1019;\nconst UnsignedInt248Type = 1020;\nconst AlphaFormat = 1021;\nconst RGBFormat = 1022;\nconst RGBAFormat = 1023;\nconst LuminanceFormat = 1024;\nconst LuminanceAlphaFormat = 1025;\nconst RGBEFormat = RGBAFormat;\nconst DepthFormat = 1026;\nconst DepthStencilFormat = 1027;\nconst RedFormat = 1028;\nconst RedIntegerFormat = 1029;\nconst RGFormat = 1030;\nconst RGIntegerFormat = 1031;\nconst RGBIntegerFormat = 1032;\nconst RGBAIntegerFormat = 1033;\n\nconst RGB_S3TC_DXT1_Format = 33776;\nconst RGBA_S3TC_DXT1_Format = 33777;\nconst RGBA_S3TC_DXT3_Format = 33778;\nconst RGBA_S3TC_DXT5_Format = 33779;\nconst RGB_PVRTC_4BPPV1_Format = 35840;\nconst RGB_PVRTC_2BPPV1_Format = 35841;\nconst RGBA_PVRTC_4BPPV1_Format = 35842;\nconst RGBA_PVRTC_2BPPV1_Format = 35843;\nconst RGB_ETC1_Format = 36196;\nconst RGB_ETC2_Format = 37492;\nconst RGBA_ETC2_EAC_Format = 37496;\nconst RGBA_ASTC_4x4_Format = 37808;\nconst RGBA_ASTC_5x4_Format = 37809;\nconst RGBA_ASTC_5x5_Format = 37810;\nconst RGBA_ASTC_6x5_Format = 37811;\nconst RGBA_ASTC_6x6_Format = 37812;\nconst RGBA_ASTC_8x5_Format = 37813;\nconst RGBA_ASTC_8x6_Format = 37814;\nconst RGBA_ASTC_8x8_Format = 37815;\nconst RGBA_ASTC_10x5_Format = 37816;\nconst RGBA_ASTC_10x6_Format = 37817;\nconst RGBA_ASTC_10x8_Format = 37818;\nconst RGBA_ASTC_10x10_Format = 37819;\nconst RGBA_ASTC_12x10_Format = 37820;\nconst RGBA_ASTC_12x12_Format = 37821;\nconst RGBA_BPTC_Format = 36492;\nconst SRGB8_ALPHA8_ASTC_4x4_Format = 37840;\nconst SRGB8_ALPHA8_ASTC_5x4_Format = 37841;\nconst SRGB8_ALPHA8_ASTC_5x5_Format = 37842;\nconst SRGB8_ALPHA8_ASTC_6x5_Format = 37843;\nconst SRGB8_ALPHA8_ASTC_6x6_Format = 37844;\nconst SRGB8_ALPHA8_ASTC_8x5_Format = 37845;\nconst SRGB8_ALPHA8_ASTC_8x6_Format = 37846;\nconst SRGB8_ALPHA8_ASTC_8x8_Format = 37847;\nconst SRGB8_ALPHA8_ASTC_10x5_Format = 37848;\nconst SRGB8_ALPHA8_ASTC_10x6_Format = 37849;\nconst SRGB8_ALPHA8_ASTC_10x8_Format = 37850;\nconst SRGB8_ALPHA8_ASTC_10x10_Format = 37851;\nconst SRGB8_ALPHA8_ASTC_12x10_Format = 37852;\nconst SRGB8_ALPHA8_ASTC_12x12_Format = 37853;\nconst LoopOnce = 2200;\nconst LoopRepeat = 2201;\nconst LoopPingPong = 2202;\nconst InterpolateDiscrete = 2300;\nconst InterpolateLinear = 2301;\nconst InterpolateSmooth = 2302;\nconst ZeroCurvatureEnding = 2400;\nconst ZeroSlopeEnding = 2401;\nconst WrapAroundEnding = 2402;\nconst NormalAnimationBlendMode = 2500;\nconst AdditiveAnimationBlendMode = 2501;\nconst TrianglesDrawMode = 0;\nconst TriangleStripDrawMode = 1;\nconst TriangleFanDrawMode = 2;\nconst LinearEncoding = 3000;\nconst sRGBEncoding = 3001;\nconst GammaEncoding = 3007;\nconst RGBEEncoding = 3002;\nconst LogLuvEncoding = 3003;\nconst RGBM7Encoding = 3004;\nconst RGBM16Encoding = 3005;\nconst RGBDEncoding = 3006;\nconst BasicDepthPacking = 3200;\nconst RGBADepthPacking = 3201;\nconst TangentSpaceNormalMap = 0;\nconst ObjectSpaceNormalMap = 1;\n\nconst ZeroStencilOp = 0;\nconst KeepStencilOp = 7680;\nconst ReplaceStencilOp = 7681;\nconst IncrementStencilOp = 7682;\nconst DecrementStencilOp = 7683;\nconst IncrementWrapStencilOp = 34055;\nconst DecrementWrapStencilOp = 34056;\nconst InvertStencilOp = 5386;\n\nconst NeverStencilFunc = 512;\nconst LessStencilFunc = 513;\nconst EqualStencilFunc = 514;\nconst LessEqualStencilFunc = 515;\nconst GreaterStencilFunc = 516;\nconst NotEqualStencilFunc = 517;\nconst GreaterEqualStencilFunc = 518;\nconst AlwaysStencilFunc = 519;\n\nconst StaticDrawUsage = 35044;\nconst DynamicDrawUsage = 35048;\nconst StreamDrawUsage = 35040;\nconst StaticReadUsage = 35045;\nconst DynamicReadUsage = 35049;\nconst StreamReadUsage = 35041;\nconst StaticCopyUsage = 35046;\nconst DynamicCopyUsage = 35050;\nconst StreamCopyUsage = 35042;\n\nconst GLSL1 = '100';\nconst GLSL3 = '300 es';\n\n/**\n * https://github.com/mrdoob/eventdispatcher.js/\n */\n\nclass EventDispatcher {\n\n\taddEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) this._listeners = {};\n\n\t\tconst listeners = this._listeners;\n\n\t\tif ( listeners[ type ] === undefined ) {\n\n\t\t\tlisteners[ type ] = [];\n\n\t\t}\n\n\t\tif ( listeners[ type ].indexOf( listener ) === - 1 ) {\n\n\t\t\tlisteners[ type ].push( listener );\n\n\t\t}\n\n\t}\n\n\thasEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) return false;\n\n\t\tconst listeners = this._listeners;\n\n\t\treturn listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1;\n\n\t}\n\n\tremoveEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) return;\n\n\t\tconst listeners = this._listeners;\n\t\tconst listenerArray = listeners[ type ];\n\n\t\tif ( listenerArray !== undefined ) {\n\n\t\t\tconst index = listenerArray.indexOf( listener );\n\n\t\t\tif ( index !== - 1 ) {\n\n\t\t\t\tlistenerArray.splice( index, 1 );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tdispatchEvent( event ) {\n\n\t\tif ( this._listeners === undefined ) return;\n\n\t\tconst listeners = this._listeners;\n\t\tconst listenerArray = listeners[ event.type ];\n\n\t\tif ( listenerArray !== undefined ) {\n\n\t\t\tevent.target = this;\n\n\t\t\t// Make a copy, in case listeners are removed while iterating.\n\t\t\tconst array = listenerArray.slice( 0 );\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tarray[ i ].call( this, event );\n\n\t\t\t}\n\n\t\t\tevent.target = null;\n\n\t\t}\n\n\t}\n\n}\n\nconst _lut = [];\n\nfor ( let i = 0; i < 256; i ++ ) {\n\n\t_lut[ i ] = ( i < 16 ? '0' : '' ) + ( i ).toString( 16 );\n\n}\n\nlet _seed = 1234567;\n\n\nconst DEG2RAD = Math.PI / 180;\nconst RAD2DEG = 180 / Math.PI;\n\n// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\nfunction generateUUID() {\n\n\tconst d0 = Math.random() * 0xffffffff | 0;\n\tconst d1 = Math.random() * 0xffffffff | 0;\n\tconst d2 = Math.random() * 0xffffffff | 0;\n\tconst d3 = Math.random() * 0xffffffff | 0;\n\tconst uuid = _lut[ d0 & 0xff ] + _lut[ d0 >> 8 & 0xff ] + _lut[ d0 >> 16 & 0xff ] + _lut[ d0 >> 24 & 0xff ] + '-' +\n\t\t\t_lut[ d1 & 0xff ] + _lut[ d1 >> 8 & 0xff ] + '-' + _lut[ d1 >> 16 & 0x0f | 0x40 ] + _lut[ d1 >> 24 & 0xff ] + '-' +\n\t\t\t_lut[ d2 & 0x3f | 0x80 ] + _lut[ d2 >> 8 & 0xff ] + '-' + _lut[ d2 >> 16 & 0xff ] + _lut[ d2 >> 24 & 0xff ] +\n\t\t\t_lut[ d3 & 0xff ] + _lut[ d3 >> 8 & 0xff ] + _lut[ d3 >> 16 & 0xff ] + _lut[ d3 >> 24 & 0xff ];\n\n\t// .toUpperCase() here flattens concatenated strings to save heap memory space.\n\treturn uuid.toUpperCase();\n\n}\n\nfunction clamp( value, min, max ) {\n\n\treturn Math.max( min, Math.min( max, value ) );\n\n}\n\n// compute euclidian modulo of m % n\n// https://en.wikipedia.org/wiki/Modulo_operation\nfunction euclideanModulo( n, m ) {\n\n\treturn ( ( n % m ) + m ) % m;\n\n}\n\n// Linear mapping from range <a1, a2> to range <b1, b2>\nfunction mapLinear( x, a1, a2, b1, b2 ) {\n\n\treturn b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 );\n\n}\n\n// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/\nfunction inverseLerp( x, y, value ) {\n\n\tif ( x !== y ) {\n\n\t\treturn ( value - x ) / ( y - x );\n\n\t\t } else {\n\n\t\treturn 0;\n\n\t\t }\n\n}\n\n// https://en.wikipedia.org/wiki/Linear_interpolation\nfunction lerp( x, y, t ) {\n\n\treturn ( 1 - t ) * x + t * y;\n\n}\n\n// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/\nfunction damp( x, y, lambda, dt ) {\n\n\treturn lerp( x, y, 1 - Math.exp( - lambda * dt ) );\n\n}\n\n// https://www.desmos.com/calculator/vcsjnyz7x4\nfunction pingpong( x, length = 1 ) {\n\n\treturn length - Math.abs( euclideanModulo( x, length * 2 ) - length );\n\n}\n\n// http://en.wikipedia.org/wiki/Smoothstep\nfunction smoothstep( x, min, max ) {\n\n\tif ( x <= min ) return 0;\n\tif ( x >= max ) return 1;\n\n\tx = ( x - min ) / ( max - min );\n\n\treturn x * x * ( 3 - 2 * x );\n\n}\n\nfunction smootherstep( x, min, max ) {\n\n\tif ( x <= min ) return 0;\n\tif ( x >= max ) return 1;\n\n\tx = ( x - min ) / ( max - min );\n\n\treturn x * x * x * ( x * ( x * 6 - 15 ) + 10 );\n\n}\n\n// Random integer from <low, high> interval\nfunction randInt( low, high ) {\n\n\treturn low + Math.floor( Math.random() * ( high - low + 1 ) );\n\n}\n\n// Random float from <low, high> interval\nfunction randFloat( low, high ) {\n\n\treturn low + Math.random() * ( high - low );\n\n}\n\n// Random float from <-range/2, range/2> interval\nfunction randFloatSpread( range ) {\n\n\treturn range * ( 0.5 - Math.random() );\n\n}\n\n// Deterministic pseudo-random float in the interval [ 0, 1 ]\nfunction seededRandom( s ) {\n\n\tif ( s !== undefined ) _seed = s % 2147483647;\n\n\t// Park-Miller algorithm\n\n\t_seed = _seed * 16807 % 2147483647;\n\n\treturn ( _seed - 1 ) / 2147483646;\n\n}\n\nfunction degToRad( degrees ) {\n\n\treturn degrees * DEG2RAD;\n\n}\n\nfunction radToDeg( radians ) {\n\n\treturn radians * RAD2DEG;\n\n}\n\nfunction isPowerOfTwo( value ) {\n\n\treturn ( value & ( value - 1 ) ) === 0 && value !== 0;\n\n}\n\nfunction ceilPowerOfTwo( value ) {\n\n\treturn Math.pow( 2, Math.ceil( Math.log( value ) / Math.LN2 ) );\n\n}\n\nfunction floorPowerOfTwo( value ) {\n\n\treturn Math.pow( 2, Math.floor( Math.log( value ) / Math.LN2 ) );\n\n}\n\nfunction setQuaternionFromProperEuler( q, a, b, c, order ) {\n\n\t// Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles\n\n\t// rotations are applied to the axes in the order specified by 'order'\n\t// rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c'\n\t// angles are in radians\n\n\tconst cos = Math.cos;\n\tconst sin = Math.sin;\n\n\tconst c2 = cos( b / 2 );\n\tconst s2 = sin( b / 2 );\n\n\tconst c13 = cos( ( a + c ) / 2 );\n\tconst s13 = sin( ( a + c ) / 2 );\n\n\tconst c1_3 = cos( ( a - c ) / 2 );\n\tconst s1_3 = sin( ( a - c ) / 2 );\n\n\tconst c3_1 = cos( ( c - a ) / 2 );\n\tconst s3_1 = sin( ( c - a ) / 2 );\n\n\tswitch ( order ) {\n\n\t\tcase 'XYX':\n\t\t\tq.set( c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'YZY':\n\t\t\tq.set( s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'ZXZ':\n\t\t\tq.set( s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'XZX':\n\t\t\tq.set( c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'YXY':\n\t\t\tq.set( s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'ZYZ':\n\t\t\tq.set( s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13 );\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order );\n\n\t}\n\n}\n\nvar MathUtils = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tDEG2RAD: DEG2RAD,\n\tRAD2DEG: RAD2DEG,\n\tgenerateUUID: generateUUID,\n\tclamp: clamp,\n\teuclideanModulo: euclideanModulo,\n\tmapLinear: mapLinear,\n\tinverseLerp: inverseLerp,\n\tlerp: lerp,\n\tdamp: damp,\n\tpingpong: pingpong,\n\tsmoothstep: smoothstep,\n\tsmootherstep: smootherstep,\n\trandInt: randInt,\n\trandFloat: randFloat,\n\trandFloatSpread: randFloatSpread,\n\tseededRandom: seededRandom,\n\tdegToRad: degToRad,\n\tradToDeg: radToDeg,\n\tisPowerOfTwo: isPowerOfTwo,\n\tceilPowerOfTwo: ceilPowerOfTwo,\n\tfloorPowerOfTwo: floorPowerOfTwo,\n\tsetQuaternionFromProperEuler: setQuaternionFromProperEuler\n});\n\nclass Vector2 {\n\n\tconstructor( x = 0, y = 0 ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t}\n\n\tget width() {\n\n\t\treturn this.x;\n\n\t}\n\n\tset width( value ) {\n\n\t\tthis.x = value;\n\n\t}\n\n\tget height() {\n\n\t\treturn this.y;\n\n\t}\n\n\tset height( value ) {\n\n\t\tthis.y = value;\n\n\t}\n\n\tset( x, y ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );\n\t\t\treturn this.addVectors( v, w );\n\n\t\t}\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );\n\t\t\treturn this.subVectors( v, w );\n\n\t\t}\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tdivide( v ) {\n\n\t\tthis.x /= v.x;\n\t\tthis.y /= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst x = this.x, y = this.y;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ];\n\t\tthis.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ];\n\n\t\treturn this;\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y;\n\n\t}\n\n\tcross( v ) {\n\n\t\treturn this.x * v.y - this.y * v.x;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tangle() {\n\n\t\t// computes the angle in radians with respect to the positive x-axis\n\n\t\tconst angle = Math.atan2( - this.y, - this.x ) + Math.PI;\n\n\t\treturn angle;\n\n\t}\n\n\tdistanceTo( v ) {\n\n\t\treturn Math.sqrt( this.distanceToSquared( v ) );\n\n\t}\n\n\tdistanceToSquared( v ) {\n\n\t\tconst dx = this.x - v.x, dy = this.y - v.y;\n\t\treturn dx * dx + dy * dy;\n\n\t}\n\n\tmanhattanDistanceTo( v ) {\n\n\t\treturn Math.abs( this.x - v.x ) + Math.abs( this.y - v.y );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index, offset ) {\n\n\t\tif ( offset !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector2: offset has been removed from .fromBufferAttribute().' );\n\n\t\t}\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\n\t\treturn this;\n\n\t}\n\n\trotateAround( center, angle ) {\n\n\t\tconst c = Math.cos( angle ), s = Math.sin( angle );\n\n\t\tconst x = this.x - center.x;\n\t\tconst y = this.y - center.y;\n\n\t\tthis.x = x * c - y * s + center.x;\n\t\tthis.y = x * s + y * c + center.y;\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\n\t\treturn this;\n\n\t}\n\n}\n\nVector2.prototype.isVector2 = true;\n\nclass Matrix3 {\n\n\tconstructor() {\n\n\t\tthis.elements = [\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t];\n\n\t\tif ( arguments.length > 0 ) {\n\n\t\t\tconsole.error( 'THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.' );\n\n\t\t}\n\n\t}\n\n\tset( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] = n11; te[ 1 ] = n21; te[ 2 ] = n31;\n\t\tte[ 3 ] = n12; te[ 4 ] = n22; te[ 5 ] = n32;\n\t\tte[ 6 ] = n13; te[ 7 ] = n23; te[ 8 ] = n33;\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tcopy( m ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tte[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ];\n\t\tte[ 3 ] = me[ 3 ]; te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ];\n\t\tte[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; te[ 8 ] = me[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\textractBasis( xAxis, yAxis, zAxis ) {\n\n\t\txAxis.setFromMatrix3Column( this, 0 );\n\t\tyAxis.setFromMatrix3Column( this, 1 );\n\t\tzAxis.setFromMatrix3Column( this, 2 );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrix4( m ) {\n\n\t\tconst me = m.elements;\n\n\t\tthis.set(\n\n\t\t\tme[ 0 ], me[ 4 ], me[ 8 ],\n\t\t\tme[ 1 ], me[ 5 ], me[ 9 ],\n\t\t\tme[ 2 ], me[ 6 ], me[ 10 ]\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( m ) {\n\n\t\treturn this.multiplyMatrices( this, m );\n\n\t}\n\n\tpremultiply( m ) {\n\n\t\treturn this.multiplyMatrices( m, this );\n\n\t}\n\n\tmultiplyMatrices( a, b ) {\n\n\t\tconst ae = a.elements;\n\t\tconst be = b.elements;\n\t\tconst te = this.elements;\n\n\t\tconst a11 = ae[ 0 ], a12 = ae[ 3 ], a13 = ae[ 6 ];\n\t\tconst a21 = ae[ 1 ], a22 = ae[ 4 ], a23 = ae[ 7 ];\n\t\tconst a31 = ae[ 2 ], a32 = ae[ 5 ], a33 = ae[ 8 ];\n\n\t\tconst b11 = be[ 0 ], b12 = be[ 3 ], b13 = be[ 6 ];\n\t\tconst b21 = be[ 1 ], b22 = be[ 4 ], b23 = be[ 7 ];\n\t\tconst b31 = be[ 2 ], b32 = be[ 5 ], b33 = be[ 8 ];\n\n\t\tte[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31;\n\t\tte[ 3 ] = a11 * b12 + a12 * b22 + a13 * b32;\n\t\tte[ 6 ] = a11 * b13 + a12 * b23 + a13 * b33;\n\n\t\tte[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31;\n\t\tte[ 4 ] = a21 * b12 + a22 * b22 + a23 * b32;\n\t\tte[ 7 ] = a21 * b13 + a22 * b23 + a23 * b33;\n\n\t\tte[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31;\n\t\tte[ 5 ] = a31 * b12 + a32 * b22 + a33 * b32;\n\t\tte[ 8 ] = a31 * b13 + a32 * b23 + a33 * b33;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= s; te[ 3 ] *= s; te[ 6 ] *= s;\n\t\tte[ 1 ] *= s; te[ 4 ] *= s; te[ 7 ] *= s;\n\t\tte[ 2 ] *= s; te[ 5 ] *= s; te[ 8 ] *= s;\n\n\t\treturn this;\n\n\t}\n\n\tdeterminant() {\n\n\t\tconst te = this.elements;\n\n\t\tconst a = te[ 0 ], b = te[ 1 ], c = te[ 2 ],\n\t\t\td = te[ 3 ], e = te[ 4 ], f = te[ 5 ],\n\t\t\tg = te[ 6 ], h = te[ 7 ], i = te[ 8 ];\n\n\t\treturn a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;\n\n\t}\n\n\tinvert() {\n\n\t\tconst te = this.elements,\n\n\t\t\tn11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ],\n\t\t\tn12 = te[ 3 ], n22 = te[ 4 ], n32 = te[ 5 ],\n\t\t\tn13 = te[ 6 ], n23 = te[ 7 ], n33 = te[ 8 ],\n\n\t\t\tt11 = n33 * n22 - n32 * n23,\n\t\t\tt12 = n32 * n13 - n33 * n12,\n\t\t\tt13 = n23 * n12 - n22 * n13,\n\n\t\t\tdet = n11 * t11 + n21 * t12 + n31 * t13;\n\n\t\tif ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0 );\n\n\t\tconst detInv = 1 / det;\n\n\t\tte[ 0 ] = t11 * detInv;\n\t\tte[ 1 ] = ( n31 * n23 - n33 * n21 ) * detInv;\n\t\tte[ 2 ] = ( n32 * n21 - n31 * n22 ) * detInv;\n\n\t\tte[ 3 ] = t12 * detInv;\n\t\tte[ 4 ] = ( n33 * n11 - n31 * n13 ) * detInv;\n\t\tte[ 5 ] = ( n31 * n12 - n32 * n11 ) * detInv;\n\n\t\tte[ 6 ] = t13 * detInv;\n\t\tte[ 7 ] = ( n21 * n13 - n23 * n11 ) * detInv;\n\t\tte[ 8 ] = ( n22 * n11 - n21 * n12 ) * detInv;\n\n\t\treturn this;\n\n\t}\n\n\ttranspose() {\n\n\t\tlet tmp;\n\t\tconst m = this.elements;\n\n\t\ttmp = m[ 1 ]; m[ 1 ] = m[ 3 ]; m[ 3 ] = tmp;\n\t\ttmp = m[ 2 ]; m[ 2 ] = m[ 6 ]; m[ 6 ] = tmp;\n\t\ttmp = m[ 5 ]; m[ 5 ] = m[ 7 ]; m[ 7 ] = tmp;\n\n\t\treturn this;\n\n\t}\n\n\tgetNormalMatrix( matrix4 ) {\n\n\t\treturn this.setFromMatrix4( matrix4 ).invert().transpose();\n\n\t}\n\n\ttransposeIntoArray( r ) {\n\n\t\tconst m = this.elements;\n\n\t\tr[ 0 ] = m[ 0 ];\n\t\tr[ 1 ] = m[ 3 ];\n\t\tr[ 2 ] = m[ 6 ];\n\t\tr[ 3 ] = m[ 1 ];\n\t\tr[ 4 ] = m[ 4 ];\n\t\tr[ 5 ] = m[ 7 ];\n\t\tr[ 6 ] = m[ 2 ];\n\t\tr[ 7 ] = m[ 5 ];\n\t\tr[ 8 ] = m[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetUvTransform( tx, ty, sx, sy, rotation, cx, cy ) {\n\n\t\tconst c = Math.cos( rotation );\n\t\tconst s = Math.sin( rotation );\n\n\t\tthis.set(\n\t\t\tsx * c, sx * s, - sx * ( c * cx + s * cy ) + cx + tx,\n\t\t\t- sy * s, sy * c, - sy * ( - s * cx + c * cy ) + cy + ty,\n\t\t\t0, 0, 1\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tscale( sx, sy ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= sx; te[ 3 ] *= sx; te[ 6 ] *= sx;\n\t\tte[ 1 ] *= sy; te[ 4 ] *= sy; te[ 7 ] *= sy;\n\n\t\treturn this;\n\n\t}\n\n\trotate( theta ) {\n\n\t\tconst c = Math.cos( theta );\n\t\tconst s = Math.sin( theta );\n\n\t\tconst te = this.elements;\n\n\t\tconst a11 = te[ 0 ], a12 = te[ 3 ], a13 = te[ 6 ];\n\t\tconst a21 = te[ 1 ], a22 = te[ 4 ], a23 = te[ 7 ];\n\n\t\tte[ 0 ] = c * a11 + s * a21;\n\t\tte[ 3 ] = c * a12 + s * a22;\n\t\tte[ 6 ] = c * a13 + s * a23;\n\n\t\tte[ 1 ] = - s * a11 + c * a21;\n\t\tte[ 4 ] = - s * a12 + c * a22;\n\t\tte[ 7 ] = - s * a13 + c * a23;\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( tx, ty ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] += tx * te[ 2 ]; te[ 3 ] += tx * te[ 5 ]; te[ 6 ] += tx * te[ 8 ];\n\t\tte[ 1 ] += ty * te[ 2 ]; te[ 4 ] += ty * te[ 5 ]; te[ 7 ] += ty * te[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\tequals( matrix ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = matrix.elements;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tif ( te[ i ] !== me[ i ] ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.elements[ i ] = array[ i + offset ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst te = this.elements;\n\n\t\tarray[ offset ] = te[ 0 ];\n\t\tarray[ offset + 1 ] = te[ 1 ];\n\t\tarray[ offset + 2 ] = te[ 2 ];\n\n\t\tarray[ offset + 3 ] = te[ 3 ];\n\t\tarray[ offset + 4 ] = te[ 4 ];\n\t\tarray[ offset + 5 ] = te[ 5 ];\n\n\t\tarray[ offset + 6 ] = te[ 6 ];\n\t\tarray[ offset + 7 ] = te[ 7 ];\n\t\tarray[ offset + 8 ] = te[ 8 ];\n\n\t\treturn array;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().fromArray( this.elements );\n\n\t}\n\n}\n\nMatrix3.prototype.isMatrix3 = true;\n\nlet _canvas;\n\nclass ImageUtils {\n\n\tstatic getDataURL( image ) {\n\n\t\tif ( /^data:/i.test( image.src ) ) {\n\n\t\t\treturn image.src;\n\n\t\t}\n\n\t\tif ( typeof HTMLCanvasElement == 'undefined' ) {\n\n\t\t\treturn image.src;\n\n\t\t}\n\n\t\tlet canvas;\n\n\t\tif ( image instanceof HTMLCanvasElement ) {\n\n\t\t\tcanvas = image;\n\n\t\t} else {\n\n\t\t\tif ( _canvas === undefined ) _canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );\n\n\t\t\t_canvas.width = image.width;\n\t\t\t_canvas.height = image.height;\n\n\t\t\tconst context = _canvas.getContext( '2d' );\n\n\t\t\tif ( image instanceof ImageData ) {\n\n\t\t\t\tcontext.putImageData( image, 0, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tcontext.drawImage( image, 0, 0, image.width, image.height );\n\n\t\t\t}\n\n\t\t\tcanvas = _canvas;\n\n\t\t}\n\n\t\tif ( canvas.width > 2048 || canvas.height > 2048 ) {\n\n\t\t\tconsole.warn( 'THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image );\n\n\t\t\treturn canvas.toDataURL( 'image/jpeg', 0.6 );\n\n\t\t} else {\n\n\t\t\treturn canvas.toDataURL( 'image/png' );\n\n\t\t}\n\n\t}\n\n}\n\nlet textureId = 0;\n\nclass Texture extends EventDispatcher {\n\n\tconstructor( image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1, encoding = LinearEncoding ) {\n\n\t\tsuper();\n\n\t\tObject.defineProperty( this, 'id', { value: textureId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\n\t\tthis.image = image;\n\t\tthis.mipmaps = [];\n\n\t\tthis.mapping = mapping;\n\n\t\tthis.wrapS = wrapS;\n\t\tthis.wrapT = wrapT;\n\n\t\tthis.magFilter = magFilter;\n\t\tthis.minFilter = minFilter;\n\n\t\tthis.anisotropy = anisotropy;\n\n\t\tthis.format = format;\n\t\tthis.internalFormat = null;\n\t\tthis.type = type;\n\n\t\tthis.offset = new Vector2( 0, 0 );\n\t\tthis.repeat = new Vector2( 1, 1 );\n\t\tthis.center = new Vector2( 0, 0 );\n\t\tthis.rotation = 0;\n\n\t\tthis.matrixAutoUpdate = true;\n\t\tthis.matrix = new Matrix3();\n\n\t\tthis.generateMipmaps = true;\n\t\tthis.premultiplyAlpha = false;\n\t\tthis.flipY = true;\n\t\tthis.unpackAlignment = 4;\t// valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)\n\n\t\t// Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap.\n\t\t//\n\t\t// Also changing the encoding after already used by a Material will not automatically make the Material\n\t\t// update. You need to explicitly call Material.needsUpdate to trigger it to recompile.\n\t\tthis.encoding = encoding;\n\n\t\tthis.version = 0;\n\t\tthis.onUpdate = null;\n\n\t}\n\n\tupdateMatrix() {\n\n\t\tthis.matrix.setUvTransform( this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.image = source.image;\n\t\tthis.mipmaps = source.mipmaps.slice( 0 );\n\n\t\tthis.mapping = source.mapping;\n\n\t\tthis.wrapS = source.wrapS;\n\t\tthis.wrapT = source.wrapT;\n\n\t\tthis.magFilter = source.magFilter;\n\t\tthis.minFilter = source.minFilter;\n\n\t\tthis.anisotropy = source.anisotropy;\n\n\t\tthis.format = source.format;\n\t\tthis.internalFormat = source.internalFormat;\n\t\tthis.type = source.type;\n\n\t\tthis.offset.copy( source.offset );\n\t\tthis.repeat.copy( source.repeat );\n\t\tthis.center.copy( source.center );\n\t\tthis.rotation = source.rotation;\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\tthis.matrix.copy( source.matrix );\n\n\t\tthis.generateMipmaps = source.generateMipmaps;\n\t\tthis.premultiplyAlpha = source.premultiplyAlpha;\n\t\tthis.flipY = source.flipY;\n\t\tthis.unpackAlignment = source.unpackAlignment;\n\t\tthis.encoding = source.encoding;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( ! isRootObject && meta.textures[ this.uuid ] !== undefined ) {\n\n\t\t\treturn meta.textures[ this.uuid ];\n\n\t\t}\n\n\t\tconst output = {\n\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Texture',\n\t\t\t\tgenerator: 'Texture.toJSON'\n\t\t\t},\n\n\t\t\tuuid: this.uuid,\n\t\t\tname: this.name,\n\n\t\t\tmapping: this.mapping,\n\n\t\t\trepeat: [ this.repeat.x, this.repeat.y ],\n\t\t\toffset: [ this.offset.x, this.offset.y ],\n\t\t\tcenter: [ this.center.x, this.center.y ],\n\t\t\trotation: this.rotation,\n\n\t\t\twrap: [ this.wrapS, this.wrapT ],\n\n\t\t\tformat: this.format,\n\t\t\ttype: this.type,\n\t\t\tencoding: this.encoding,\n\n\t\t\tminFilter: this.minFilter,\n\t\t\tmagFilter: this.magFilter,\n\t\t\tanisotropy: this.anisotropy,\n\n\t\t\tflipY: this.flipY,\n\n\t\t\tpremultiplyAlpha: this.premultiplyAlpha,\n\t\t\tunpackAlignment: this.unpackAlignment\n\n\t\t};\n\n\t\tif ( this.image !== undefined ) {\n\n\t\t\t// TODO: Move to THREE.Image\n\n\t\t\tconst image = this.image;\n\n\t\t\tif ( image.uuid === undefined ) {\n\n\t\t\t\timage.uuid = generateUUID(); // UGH\n\n\t\t\t}\n\n\t\t\tif ( ! isRootObject && meta.images[ image.uuid ] === undefined ) {\n\n\t\t\t\tlet url;\n\n\t\t\t\tif ( Array.isArray( image ) ) {\n\n\t\t\t\t\t// process array of images e.g. CubeTexture\n\n\t\t\t\t\turl = [];\n\n\t\t\t\t\tfor ( let i = 0, l = image.length; i < l; i ++ ) {\n\n\t\t\t\t\t\t// check cube texture with data textures\n\n\t\t\t\t\t\tif ( image[ i ].isDataTexture ) {\n\n\t\t\t\t\t\t\turl.push( serializeImage( image[ i ].image ) );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\turl.push( serializeImage( image[ i ] ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// process single image\n\n\t\t\t\t\turl = serializeImage( image );\n\n\t\t\t\t}\n\n\t\t\t\tmeta.images[ image.uuid ] = {\n\t\t\t\t\tuuid: image.uuid,\n\t\t\t\t\turl: url\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t\toutput.image = image.uuid;\n\n\t\t}\n\n\t\tif ( ! isRootObject ) {\n\n\t\t\tmeta.textures[ this.uuid ] = output;\n\n\t\t}\n\n\t\treturn output;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n\ttransformUv( uv ) {\n\n\t\tif ( this.mapping !== UVMapping ) return uv;\n\n\t\tuv.applyMatrix3( this.matrix );\n\n\t\tif ( uv.x < 0 || uv.x > 1 ) {\n\n\t\t\tswitch ( this.wrapS ) {\n\n\t\t\t\tcase RepeatWrapping:\n\n\t\t\t\t\tuv.x = uv.x - Math.floor( uv.x );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ClampToEdgeWrapping:\n\n\t\t\t\t\tuv.x = uv.x < 0 ? 0 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MirroredRepeatWrapping:\n\n\t\t\t\t\tif ( Math.abs( Math.floor( uv.x ) % 2 ) === 1 ) {\n\n\t\t\t\t\t\tuv.x = Math.ceil( uv.x ) - uv.x;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tuv.x = uv.x - Math.floor( uv.x );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( uv.y < 0 || uv.y > 1 ) {\n\n\t\t\tswitch ( this.wrapT ) {\n\n\t\t\t\tcase RepeatWrapping:\n\n\t\t\t\t\tuv.y = uv.y - Math.floor( uv.y );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ClampToEdgeWrapping:\n\n\t\t\t\t\tuv.y = uv.y < 0 ? 0 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MirroredRepeatWrapping:\n\n\t\t\t\t\tif ( Math.abs( Math.floor( uv.y ) % 2 ) === 1 ) {\n\n\t\t\t\t\t\tuv.y = Math.ceil( uv.y ) - uv.y;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tuv.y = uv.y - Math.floor( uv.y );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.flipY ) {\n\n\t\t\tuv.y = 1 - uv.y;\n\n\t\t}\n\n\t\treturn uv;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n}\n\nTexture.DEFAULT_IMAGE = undefined;\nTexture.DEFAULT_MAPPING = UVMapping;\n\nTexture.prototype.isTexture = true;\n\nfunction serializeImage( image ) {\n\n\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t// default images\n\n\t\treturn ImageUtils.getDataURL( image );\n\n\t} else {\n\n\t\tif ( image.data ) {\n\n\t\t\t// images of DataTexture\n\n\t\t\treturn {\n\t\t\t\tdata: Array.prototype.slice.call( image.data ),\n\t\t\t\twidth: image.width,\n\t\t\t\theight: image.height,\n\t\t\t\ttype: image.data.constructor.name\n\t\t\t};\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.Texture: Unable to serialize Texture.' );\n\t\t\treturn {};\n\n\t\t}\n\n\t}\n\n}\n\nclass Vector4 {\n\n\tconstructor( x = 0, y = 0, z = 0, w = 1 ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\tthis.w = w;\n\n\t}\n\n\tget width() {\n\n\t\treturn this.z;\n\n\t}\n\n\tset width( value ) {\n\n\t\tthis.z = value;\n\n\t}\n\n\tget height() {\n\n\t\treturn this.w;\n\n\t}\n\n\tset height( value ) {\n\n\t\tthis.w = value;\n\n\t}\n\n\tset( x, y, z, w ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\tthis.w = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\t\tthis.z = scalar;\n\t\tthis.w = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( z ) {\n\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetW( w ) {\n\n\t\tthis.w = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tcase 2: this.z = value; break;\n\t\t\tcase 3: this.w = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tcase 2: return this.z;\n\t\t\tcase 3: return this.w;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y, this.z, this.w );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\t\tthis.z = v.z;\n\t\tthis.w = ( v.w !== undefined ) ? v.w : 1;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );\n\t\t\treturn this.addVectors( v, w );\n\n\t\t}\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\t\tthis.z += v.z;\n\t\tthis.w += v.w;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\t\tthis.z += s;\n\t\tthis.w += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\t\tthis.z = a.z + b.z;\n\t\tthis.w = a.w + b.w;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\t\tthis.z += v.z * s;\n\t\tthis.w += v.w * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );\n\t\t\treturn this.subVectors( v, w );\n\n\t\t}\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\t\tthis.z -= v.z;\n\t\tthis.w -= v.w;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\t\tthis.z -= s;\n\t\tthis.w -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\t\tthis.z = a.z - b.z;\n\t\tthis.w = a.w - b.w;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\t\tthis.z *= v.z;\n\t\tthis.w *= v.w;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\t\tthis.z *= scalar;\n\t\tthis.w *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z, w = this.w;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] * w;\n\t\tthis.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] * w;\n\t\tthis.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] * w;\n\t\tthis.w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] * w;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tsetAxisAngleFromQuaternion( q ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm\n\n\t\t// q is assumed to be normalized\n\n\t\tthis.w = 2 * Math.acos( q.w );\n\n\t\tconst s = Math.sqrt( 1 - q.w * q.w );\n\n\t\tif ( s < 0.0001 ) {\n\n\t\t\tthis.x = 1;\n\t\t\tthis.y = 0;\n\t\t\tthis.z = 0;\n\n\t\t} else {\n\n\t\t\tthis.x = q.x / s;\n\t\t\tthis.y = q.y / s;\n\t\t\tthis.z = q.z / s;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetAxisAngleFromRotationMatrix( m ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tlet angle, x, y, z; // variables for result\n\t\tconst epsilon = 0.01,\t\t// margin to allow for rounding errors\n\t\t\tepsilon2 = 0.1,\t\t// margin to distinguish between 0 and 180 degrees\n\n\t\t\tte = m.elements,\n\n\t\t\tm11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ],\n\t\t\tm21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],\n\t\t\tm31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];\n\n\t\tif ( ( Math.abs( m12 - m21 ) < epsilon ) &&\n\t\t ( Math.abs( m13 - m31 ) < epsilon ) &&\n\t\t ( Math.abs( m23 - m32 ) < epsilon ) ) {\n\n\t\t\t// singularity found\n\t\t\t// first check for identity matrix which must have +1 for all terms\n\t\t\t// in leading diagonal and zero in other terms\n\n\t\t\tif ( ( Math.abs( m12 + m21 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m13 + m31 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m23 + m32 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) {\n\n\t\t\t\t// this singularity is identity matrix so angle = 0\n\n\t\t\t\tthis.set( 1, 0, 0, 0 );\n\n\t\t\t\treturn this; // zero angle, arbitrary axis\n\n\t\t\t}\n\n\t\t\t// otherwise this singularity is angle = 180\n\n\t\t\tangle = Math.PI;\n\n\t\t\tconst xx = ( m11 + 1 ) / 2;\n\t\t\tconst yy = ( m22 + 1 ) / 2;\n\t\t\tconst zz = ( m33 + 1 ) / 2;\n\t\t\tconst xy = ( m12 + m21 ) / 4;\n\t\t\tconst xz = ( m13 + m31 ) / 4;\n\t\t\tconst yz = ( m23 + m32 ) / 4;\n\n\t\t\tif ( ( xx > yy ) && ( xx > zz ) ) {\n\n\t\t\t\t// m11 is the largest diagonal term\n\n\t\t\t\tif ( xx < epsilon ) {\n\n\t\t\t\t\tx = 0;\n\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\tz = 0.707106781;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tx = Math.sqrt( xx );\n\t\t\t\t\ty = xy / x;\n\t\t\t\t\tz = xz / x;\n\n\t\t\t\t}\n\n\t\t\t} else if ( yy > zz ) {\n\n\t\t\t\t// m22 is the largest diagonal term\n\n\t\t\t\tif ( yy < epsilon ) {\n\n\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\ty = 0;\n\t\t\t\t\tz = 0.707106781;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ty = Math.sqrt( yy );\n\t\t\t\t\tx = xy / y;\n\t\t\t\t\tz = yz / y;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// m33 is the largest diagonal term so base result on this\n\n\t\t\t\tif ( zz < epsilon ) {\n\n\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\tz = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tz = Math.sqrt( zz );\n\t\t\t\t\tx = xz / z;\n\t\t\t\t\ty = yz / z;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.set( x, y, z, angle );\n\n\t\t\treturn this; // return 180 deg rotation\n\n\t\t}\n\n\t\t// as we have reached here there are no singularities so we can handle normally\n\n\t\tlet s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 ) +\n\t\t\t( m13 - m31 ) * ( m13 - m31 ) +\n\t\t\t( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize\n\n\t\tif ( Math.abs( s ) < 0.001 ) s = 1;\n\n\t\t// prevent divide by zero, should not happen if matrix is orthogonal and should be\n\t\t// caught by singularity test above, but I've left it in just in case\n\n\t\tthis.x = ( m32 - m23 ) / s;\n\t\tthis.y = ( m13 - m31 ) / s;\n\t\tthis.z = ( m21 - m12 ) / s;\n\t\tthis.w = Math.acos( ( m11 + m22 + m33 - 1 ) / 2 );\n\n\t\treturn this;\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\t\tthis.z = Math.min( this.z, v.z );\n\t\tthis.w = Math.min( this.w, v.w );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\t\tthis.z = Math.max( this.z, v.z );\n\t\tthis.w = Math.max( this.w, v.w );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\t\tthis.z = Math.max( min.z, Math.min( max.z, this.z ) );\n\t\tthis.w = Math.max( min.w, Math.min( max.w, this.w ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\t\tthis.z = Math.max( minVal, Math.min( maxVal, this.z ) );\n\t\tthis.w = Math.max( minVal, Math.min( maxVal, this.w ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\t\tthis.z = Math.floor( this.z );\n\t\tthis.w = Math.floor( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\t\tthis.z = Math.ceil( this.z );\n\t\tthis.w = Math.ceil( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\t\tthis.z = Math.round( this.z );\n\t\tthis.w = Math.round( this.w );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\t\tthis.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z );\n\t\tthis.w = ( this.w < 0 ) ? Math.ceil( this.w ) : Math.floor( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\t\tthis.z = - this.z;\n\t\tthis.w = - this.w;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ) + Math.abs( this.w );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\t\tthis.z += ( v.z - this.z ) * alpha;\n\t\tthis.w += ( v.w - this.w ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\t\tthis.z = v1.z + ( v2.z - v1.z ) * alpha;\n\t\tthis.w = v1.w + ( v2.w - v1.w ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) && ( v.w === this.w ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\t\tthis.z = array[ offset + 2 ];\n\t\tthis.w = array[ offset + 3 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\t\tarray[ offset + 2 ] = this.z;\n\t\tarray[ offset + 3 ] = this.w;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index, offset ) {\n\n\t\tif ( offset !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector4: offset has been removed from .fromBufferAttribute().' );\n\n\t\t}\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\t\tthis.z = attribute.getZ( index );\n\t\tthis.w = attribute.getW( index );\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\t\tthis.z = Math.random();\n\t\tthis.w = Math.random();\n\n\t\treturn this;\n\n\t}\n\n}\n\nVector4.prototype.isVector4 = true;\n\n/*\n In options, we can specify:\n * Texture parameters for an auto-generated target texture\n * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers\n*/\nclass WebGLRenderTarget extends EventDispatcher {\n\n\tconstructor( width, height, options = {} ) {\n\n\t\tsuper();\n\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.depth = 1;\n\n\t\tthis.scissor = new Vector4( 0, 0, width, height );\n\t\tthis.scissorTest = false;\n\n\t\tthis.viewport = new Vector4( 0, 0, width, height );\n\n\t\tthis.texture = new Texture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );\n\n\t\tthis.texture.image = { width: width, height: height, depth: 1 };\n\n\t\tthis.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\tthis.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\n\t\tthis.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;\n\t\tthis.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false;\n\t\tthis.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;\n\n\t}\n\n\tsetTexture( texture ) {\n\n\t\ttexture.image = {\n\t\t\twidth: this.width,\n\t\t\theight: this.height,\n\t\t\tdepth: this.depth\n\t\t};\n\n\t\tthis.texture = texture;\n\n\t}\n\n\tsetSize( width, height, depth = 1 ) {\n\n\t\tif ( this.width !== width || this.height !== height || this.depth !== depth ) {\n\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.depth = depth;\n\n\t\t\tthis.texture.image.width = width;\n\t\t\tthis.texture.image.height = height;\n\t\t\tthis.texture.image.depth = depth;\n\n\t\t\tthis.dispose();\n\n\t\t}\n\n\t\tthis.viewport.set( 0, 0, width, height );\n\t\tthis.scissor.set( 0, 0, width, height );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\t\tthis.depth = source.depth;\n\n\t\tthis.viewport.copy( source.viewport );\n\n\t\tthis.texture = source.texture.clone();\n\t\tthis.texture.image = { ...this.texture.image }; // See #20328.\n\n\t\tthis.depthBuffer = source.depthBuffer;\n\t\tthis.stencilBuffer = source.stencilBuffer;\n\t\tthis.depthTexture = source.depthTexture;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nWebGLRenderTarget.prototype.isWebGLRenderTarget = true;\n\nclass WebGLMultipleRenderTargets extends WebGLRenderTarget {\n\n\tconstructor( width, height, count ) {\n\n\t\tsuper( width, height );\n\n\t\tconst texture = this.texture;\n\n\t\tthis.texture = [];\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.texture[ i ] = texture.clone();\n\n\t\t}\n\n\t}\n\n\tsetSize( width, height, depth = 1 ) {\n\n\t\tif ( this.width !== width || this.height !== height || this.depth !== depth ) {\n\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.depth = depth;\n\n\t\t\tfor ( let i = 0, il = this.texture.length; i < il; i ++ ) {\n\n\t\t\t\tthis.texture[ i ].image.width = width;\n\t\t\t\tthis.texture[ i ].image.height = height;\n\t\t\t\tthis.texture[ i ].image.depth = depth;\n\n\t\t\t}\n\n\t\t\tthis.dispose();\n\n\t\t}\n\n\t\tthis.viewport.set( 0, 0, width, height );\n\t\tthis.scissor.set( 0, 0, width, height );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.dispose();\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\t\tthis.depth = source.depth;\n\n\t\tthis.viewport.set( 0, 0, this.width, this.height );\n\t\tthis.scissor.set( 0, 0, this.width, this.height );\n\n\t\tthis.depthBuffer = source.depthBuffer;\n\t\tthis.stencilBuffer = source.stencilBuffer;\n\t\tthis.depthTexture = source.depthTexture;\n\n\t\tthis.texture.length = 0;\n\n\t\tfor ( let i = 0, il = source.texture.length; i < il; i ++ ) {\n\n\t\t\tthis.texture[ i ] = source.texture[ i ].clone();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nWebGLMultipleRenderTargets.prototype.isWebGLMultipleRenderTargets = true;\n\nclass WebGLMultisampleRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( width, height, options ) {\n\n\t\tsuper( width, height, options );\n\n\t\tthis.samples = 4;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy.call( this, source );\n\n\t\tthis.samples = source.samples;\n\n\t\treturn this;\n\n\t}\n\n}\n\nWebGLMultisampleRenderTarget.prototype.isWebGLMultisampleRenderTarget = true;\n\nclass Quaternion {\n\n\tconstructor( x = 0, y = 0, z = 0, w = 1 ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._w = w;\n\n\t}\n\n\tstatic slerp( qa, qb, qm, t ) {\n\n\t\tconsole.warn( 'THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead.' );\n\t\treturn qm.slerpQuaternions( qa, qb, t );\n\n\t}\n\n\tstatic slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) {\n\n\t\t// fuzz-free, array-based Quaternion SLERP operation\n\n\t\tlet x0 = src0[ srcOffset0 + 0 ],\n\t\t\ty0 = src0[ srcOffset0 + 1 ],\n\t\t\tz0 = src0[ srcOffset0 + 2 ],\n\t\t\tw0 = src0[ srcOffset0 + 3 ];\n\n\t\tconst x1 = src1[ srcOffset1 + 0 ],\n\t\t\ty1 = src1[ srcOffset1 + 1 ],\n\t\t\tz1 = src1[ srcOffset1 + 2 ],\n\t\t\tw1 = src1[ srcOffset1 + 3 ];\n\n\t\tif ( t === 0 ) {\n\n\t\t\tdst[ dstOffset + 0 ] = x0;\n\t\t\tdst[ dstOffset + 1 ] = y0;\n\t\t\tdst[ dstOffset + 2 ] = z0;\n\t\t\tdst[ dstOffset + 3 ] = w0;\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( t === 1 ) {\n\n\t\t\tdst[ dstOffset + 0 ] = x1;\n\t\t\tdst[ dstOffset + 1 ] = y1;\n\t\t\tdst[ dstOffset + 2 ] = z1;\n\t\t\tdst[ dstOffset + 3 ] = w1;\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {\n\n\t\t\tlet s = 1 - t;\n\t\t\tconst cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,\n\t\t\t\tdir = ( cos >= 0 ? 1 : - 1 ),\n\t\t\t\tsqrSin = 1 - cos * cos;\n\n\t\t\t// Skip the Slerp for tiny steps to avoid numeric problems:\n\t\t\tif ( sqrSin > Number.EPSILON ) {\n\n\t\t\t\tconst sin = Math.sqrt( sqrSin ),\n\t\t\t\t\tlen = Math.atan2( sin, cos * dir );\n\n\t\t\t\ts = Math.sin( s * len ) / sin;\n\t\t\t\tt = Math.sin( t * len ) / sin;\n\n\t\t\t}\n\n\t\t\tconst tDir = t * dir;\n\n\t\t\tx0 = x0 * s + x1 * tDir;\n\t\t\ty0 = y0 * s + y1 * tDir;\n\t\t\tz0 = z0 * s + z1 * tDir;\n\t\t\tw0 = w0 * s + w1 * tDir;\n\n\t\t\t// Normalize in case we just did a lerp:\n\t\t\tif ( s === 1 - t ) {\n\n\t\t\t\tconst f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 );\n\n\t\t\t\tx0 *= f;\n\t\t\t\ty0 *= f;\n\t\t\t\tz0 *= f;\n\t\t\t\tw0 *= f;\n\n\t\t\t}\n\n\t\t}\n\n\t\tdst[ dstOffset ] = x0;\n\t\tdst[ dstOffset + 1 ] = y0;\n\t\tdst[ dstOffset + 2 ] = z0;\n\t\tdst[ dstOffset + 3 ] = w0;\n\n\t}\n\n\tstatic multiplyQuaternionsFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1 ) {\n\n\t\tconst x0 = src0[ srcOffset0 ];\n\t\tconst y0 = src0[ srcOffset0 + 1 ];\n\t\tconst z0 = src0[ srcOffset0 + 2 ];\n\t\tconst w0 = src0[ srcOffset0 + 3 ];\n\n\t\tconst x1 = src1[ srcOffset1 ];\n\t\tconst y1 = src1[ srcOffset1 + 1 ];\n\t\tconst z1 = src1[ srcOffset1 + 2 ];\n\t\tconst w1 = src1[ srcOffset1 + 3 ];\n\n\t\tdst[ dstOffset ] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1;\n\t\tdst[ dstOffset + 1 ] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1;\n\t\tdst[ dstOffset + 2 ] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1;\n\t\tdst[ dstOffset + 3 ] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1;\n\n\t\treturn dst;\n\n\t}\n\n\tget x() {\n\n\t\treturn this._x;\n\n\t}\n\n\tset x( value ) {\n\n\t\tthis._x = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget y() {\n\n\t\treturn this._y;\n\n\t}\n\n\tset y( value ) {\n\n\t\tthis._y = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget z() {\n\n\t\treturn this._z;\n\n\t}\n\n\tset z( value ) {\n\n\t\tthis._z = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget w() {\n\n\t\treturn this._w;\n\n\t}\n\n\tset w( value ) {\n\n\t\tthis._w = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tset( x, y, z, w ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._w = w;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this._x, this._y, this._z, this._w );\n\n\t}\n\n\tcopy( quaternion ) {\n\n\t\tthis._x = quaternion.x;\n\t\tthis._y = quaternion.y;\n\t\tthis._z = quaternion.z;\n\t\tthis._w = quaternion.w;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromEuler( euler, update ) {\n\n\t\tif ( ! ( euler && euler.isEuler ) ) {\n\n\t\t\tthrow new Error( 'THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.' );\n\n\t\t}\n\n\t\tconst x = euler._x, y = euler._y, z = euler._z, order = euler._order;\n\n\t\t// http://www.mathworks.com/matlabcentral/fileexchange/\n\t\t// \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n\t\t//\tcontent/SpinCalc.m\n\n\t\tconst cos = Math.cos;\n\t\tconst sin = Math.sin;\n\n\t\tconst c1 = cos( x / 2 );\n\t\tconst c2 = cos( y / 2 );\n\t\tconst c3 = cos( z / 2 );\n\n\t\tconst s1 = sin( x / 2 );\n\t\tconst s2 = sin( y / 2 );\n\t\tconst s3 = sin( z / 2 );\n\n\t\tswitch ( order ) {\n\n\t\t\tcase 'XYZ':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'YXZ':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZXY':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZYX':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'YZX':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'XZY':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn( 'THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order );\n\n\t\t}\n\n\t\tif ( update !== false ) this._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromAxisAngle( axis, angle ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm\n\n\t\t// assumes axis is normalized\n\n\t\tconst halfAngle = angle / 2, s = Math.sin( halfAngle );\n\n\t\tthis._x = axis.x * s;\n\t\tthis._y = axis.y * s;\n\t\tthis._z = axis.z * s;\n\t\tthis._w = Math.cos( halfAngle );\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromRotationMatrix( m ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tconst te = m.elements,\n\n\t\t\tm11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ],\n\t\t\tm21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],\n\t\t\tm31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ],\n\n\t\t\ttrace = m11 + m22 + m33;\n\n\t\tif ( trace > 0 ) {\n\n\t\t\tconst s = 0.5 / Math.sqrt( trace + 1.0 );\n\n\t\t\tthis._w = 0.25 / s;\n\t\t\tthis._x = ( m32 - m23 ) * s;\n\t\t\tthis._y = ( m13 - m31 ) * s;\n\t\t\tthis._z = ( m21 - m12 ) * s;\n\n\t\t} else if ( m11 > m22 && m11 > m33 ) {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m11 - m22 - m33 );\n\n\t\t\tthis._w = ( m32 - m23 ) / s;\n\t\t\tthis._x = 0.25 * s;\n\t\t\tthis._y = ( m12 + m21 ) / s;\n\t\t\tthis._z = ( m13 + m31 ) / s;\n\n\t\t} else if ( m22 > m33 ) {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m22 - m11 - m33 );\n\n\t\t\tthis._w = ( m13 - m31 ) / s;\n\t\t\tthis._x = ( m12 + m21 ) / s;\n\t\t\tthis._y = 0.25 * s;\n\t\t\tthis._z = ( m23 + m32 ) / s;\n\n\t\t} else {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m33 - m11 - m22 );\n\n\t\t\tthis._w = ( m21 - m12 ) / s;\n\t\t\tthis._x = ( m13 + m31 ) / s;\n\t\t\tthis._y = ( m23 + m32 ) / s;\n\t\t\tthis._z = 0.25 * s;\n\n\t\t}\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromUnitVectors( vFrom, vTo ) {\n\n\t\t// assumes direction vectors vFrom and vTo are normalized\n\n\t\tlet r = vFrom.dot( vTo ) + 1;\n\n\t\tif ( r < Number.EPSILON ) {\n\n\t\t\t// vFrom and vTo point in opposite directions\n\n\t\t\tr = 0;\n\n\t\t\tif ( Math.abs( vFrom.x ) > Math.abs( vFrom.z ) ) {\n\n\t\t\t\tthis._x = - vFrom.y;\n\t\t\t\tthis._y = vFrom.x;\n\t\t\t\tthis._z = 0;\n\t\t\t\tthis._w = r;\n\n\t\t\t} else {\n\n\t\t\t\tthis._x = 0;\n\t\t\t\tthis._y = - vFrom.z;\n\t\t\t\tthis._z = vFrom.y;\n\t\t\t\tthis._w = r;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3\n\n\t\t\tthis._x = vFrom.y * vTo.z - vFrom.z * vTo.y;\n\t\t\tthis._y = vFrom.z * vTo.x - vFrom.x * vTo.z;\n\t\t\tthis._z = vFrom.x * vTo.y - vFrom.y * vTo.x;\n\t\t\tthis._w = r;\n\n\t\t}\n\n\t\treturn this.normalize();\n\n\t}\n\n\tangleTo( q ) {\n\n\t\treturn 2 * Math.acos( Math.abs( clamp( this.dot( q ), - 1, 1 ) ) );\n\n\t}\n\n\trotateTowards( q, step ) {\n\n\t\tconst angle = this.angleTo( q );\n\n\t\tif ( angle === 0 ) return this;\n\n\t\tconst t = Math.min( 1, step / angle );\n\n\t\tthis.slerp( q, t );\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\treturn this.set( 0, 0, 0, 1 );\n\n\t}\n\n\tinvert() {\n\n\t\t// quaternion is assumed to have unit length\n\n\t\treturn this.conjugate();\n\n\t}\n\n\tconjugate() {\n\n\t\tthis._x *= - 1;\n\t\tthis._y *= - 1;\n\t\tthis._z *= - 1;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w );\n\n\t}\n\n\tnormalize() {\n\n\t\tlet l = this.length();\n\n\t\tif ( l === 0 ) {\n\n\t\t\tthis._x = 0;\n\t\t\tthis._y = 0;\n\t\t\tthis._z = 0;\n\t\t\tthis._w = 1;\n\n\t\t} else {\n\n\t\t\tl = 1 / l;\n\n\t\t\tthis._x = this._x * l;\n\t\t\tthis._y = this._y * l;\n\t\t\tthis._z = this._z * l;\n\t\t\tthis._w = this._w * l;\n\n\t\t}\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( q, p ) {\n\n\t\tif ( p !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.' );\n\t\t\treturn this.multiplyQuaternions( q, p );\n\n\t\t}\n\n\t\treturn this.multiplyQuaternions( this, q );\n\n\t}\n\n\tpremultiply( q ) {\n\n\t\treturn this.multiplyQuaternions( q, this );\n\n\t}\n\n\tmultiplyQuaternions( a, b ) {\n\n\t\t// from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n\n\t\tconst qax = a._x, qay = a._y, qaz = a._z, qaw = a._w;\n\t\tconst qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w;\n\n\t\tthis._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n\t\tthis._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n\t\tthis._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n\t\tthis._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tslerp( qb, t ) {\n\n\t\tif ( t === 0 ) return this;\n\t\tif ( t === 1 ) return this.copy( qb );\n\n\t\tconst x = this._x, y = this._y, z = this._z, w = this._w;\n\n\t\t// http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/\n\n\t\tlet cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;\n\n\t\tif ( cosHalfTheta < 0 ) {\n\n\t\t\tthis._w = - qb._w;\n\t\t\tthis._x = - qb._x;\n\t\t\tthis._y = - qb._y;\n\t\t\tthis._z = - qb._z;\n\n\t\t\tcosHalfTheta = - cosHalfTheta;\n\n\t\t} else {\n\n\t\t\tthis.copy( qb );\n\n\t\t}\n\n\t\tif ( cosHalfTheta >= 1.0 ) {\n\n\t\t\tthis._w = w;\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;\n\n\t\tif ( sqrSinHalfTheta <= Number.EPSILON ) {\n\n\t\t\tconst s = 1 - t;\n\t\t\tthis._w = s * w + t * this._w;\n\t\t\tthis._x = s * x + t * this._x;\n\t\t\tthis._y = s * y + t * this._y;\n\t\t\tthis._z = s * z + t * this._z;\n\n\t\t\tthis.normalize();\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst sinHalfTheta = Math.sqrt( sqrSinHalfTheta );\n\t\tconst halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta );\n\t\tconst ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta,\n\t\t\tratioB = Math.sin( t * halfTheta ) / sinHalfTheta;\n\n\t\tthis._w = ( w * ratioA + this._w * ratioB );\n\t\tthis._x = ( x * ratioA + this._x * ratioB );\n\t\tthis._y = ( y * ratioA + this._y * ratioB );\n\t\tthis._z = ( z * ratioA + this._z * ratioB );\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tslerpQuaternions( qa, qb, t ) {\n\n\t\tthis.copy( qa ).slerp( qb, t );\n\n\t}\n\n\tequals( quaternion ) {\n\n\t\treturn ( quaternion._x === this._x ) && ( quaternion._y === this._y ) && ( quaternion._z === this._z ) && ( quaternion._w === this._w );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis._x = array[ offset ];\n\t\tthis._y = array[ offset + 1 ];\n\t\tthis._z = array[ offset + 2 ];\n\t\tthis._w = array[ offset + 3 ];\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this._x;\n\t\tarray[ offset + 1 ] = this._y;\n\t\tarray[ offset + 2 ] = this._z;\n\t\tarray[ offset + 3 ] = this._w;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis._x = attribute.getX( index );\n\t\tthis._y = attribute.getY( index );\n\t\tthis._z = attribute.getZ( index );\n\t\tthis._w = attribute.getW( index );\n\n\t\treturn this;\n\n\t}\n\n\t_onChange( callback ) {\n\n\t\tthis._onChangeCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\t_onChangeCallback() {}\n\n}\n\nQuaternion.prototype.isQuaternion = true;\n\nclass Vector3 {\n\n\tconstructor( x = 0, y = 0, z = 0 ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\n\t}\n\n\tset( x, y, z ) {\n\n\t\tif ( z === undefined ) z = this.z; // sprite.scale.set(x,y)\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\t\tthis.z = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( z ) {\n\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tcase 2: this.z = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tcase 2: return this.z;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y, this.z );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\t\tthis.z = v.z;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );\n\t\t\treturn this.addVectors( v, w );\n\n\t\t}\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\t\tthis.z += v.z;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\t\tthis.z += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\t\tthis.z = a.z + b.z;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\t\tthis.z += v.z * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );\n\t\t\treturn this.subVectors( v, w );\n\n\t\t}\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\t\tthis.z -= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\t\tthis.z -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\t\tthis.z = a.z - b.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.' );\n\t\t\treturn this.multiplyVectors( v, w );\n\n\t\t}\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\t\tthis.z *= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\t\tthis.z *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyVectors( a, b ) {\n\n\t\tthis.x = a.x * b.x;\n\t\tthis.y = a.y * b.y;\n\t\tthis.z = a.z * b.z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyEuler( euler ) {\n\n\t\tif ( ! ( euler && euler.isEuler ) ) {\n\n\t\t\tconsole.error( 'THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.' );\n\n\t\t}\n\n\t\treturn this.applyQuaternion( _quaternion$4.setFromEuler( euler ) );\n\n\t}\n\n\tapplyAxisAngle( axis, angle ) {\n\n\t\treturn this.applyQuaternion( _quaternion$4.setFromAxisAngle( axis, angle ) );\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z;\n\t\tthis.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z;\n\t\tthis.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\treturn this.applyMatrix3( m ).normalize();\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tconst w = 1 / ( e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] );\n\n\t\tthis.x = ( e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] ) * w;\n\t\tthis.y = ( e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] ) * w;\n\t\tthis.z = ( e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] ) * w;\n\n\t\treturn this;\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst qx = q.x, qy = q.y, qz = q.z, qw = q.w;\n\n\t\t// calculate quat * vector\n\n\t\tconst ix = qw * x + qy * z - qz * y;\n\t\tconst iy = qw * y + qz * x - qx * z;\n\t\tconst iz = qw * z + qx * y - qy * x;\n\t\tconst iw = - qx * x - qy * y - qz * z;\n\n\t\t// calculate result * inverse quat\n\n\t\tthis.x = ix * qw + iw * - qx + iy * - qz - iz * - qy;\n\t\tthis.y = iy * qw + iw * - qy + iz * - qx - ix * - qz;\n\t\tthis.z = iz * qw + iw * - qz + ix * - qy - iy * - qx;\n\n\t\treturn this;\n\n\t}\n\n\tproject( camera ) {\n\n\t\treturn this.applyMatrix4( camera.matrixWorldInverse ).applyMatrix4( camera.projectionMatrix );\n\n\t}\n\n\tunproject( camera ) {\n\n\t\treturn this.applyMatrix4( camera.projectionMatrixInverse ).applyMatrix4( camera.matrixWorld );\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\t// input: THREE.Matrix4 affine matrix\n\t\t// vector interpreted as a direction\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z;\n\t\tthis.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z;\n\t\tthis.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z;\n\n\t\treturn this.normalize();\n\n\t}\n\n\tdivide( v ) {\n\n\t\tthis.x /= v.x;\n\t\tthis.y /= v.y;\n\t\tthis.z /= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\t\tthis.z = Math.min( this.z, v.z );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\t\tthis.z = Math.max( this.z, v.z );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\t\tthis.z = Math.max( min.z, Math.min( max.z, this.z ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\t\tthis.z = Math.max( minVal, Math.min( maxVal, this.z ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\t\tthis.z = Math.floor( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\t\tthis.z = Math.ceil( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\t\tthis.z = Math.round( this.z );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\t\tthis.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\t\tthis.z = - this.z;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z;\n\n\t}\n\n\t// TODO lengthSquared?\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y + this.z * this.z;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\t\tthis.z += ( v.z - this.z ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\t\tthis.z = v1.z + ( v2.z - v1.z ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tcross( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.' );\n\t\t\treturn this.crossVectors( v, w );\n\n\t\t}\n\n\t\treturn this.crossVectors( this, v );\n\n\t}\n\n\tcrossVectors( a, b ) {\n\n\t\tconst ax = a.x, ay = a.y, az = a.z;\n\t\tconst bx = b.x, by = b.y, bz = b.z;\n\n\t\tthis.x = ay * bz - az * by;\n\t\tthis.y = az * bx - ax * bz;\n\t\tthis.z = ax * by - ay * bx;\n\n\t\treturn this;\n\n\t}\n\n\tprojectOnVector( v ) {\n\n\t\tconst denominator = v.lengthSq();\n\n\t\tif ( denominator === 0 ) return this.set( 0, 0, 0 );\n\n\t\tconst scalar = v.dot( this ) / denominator;\n\n\t\treturn this.copy( v ).multiplyScalar( scalar );\n\n\t}\n\n\tprojectOnPlane( planeNormal ) {\n\n\t\t_vector$c.copy( this ).projectOnVector( planeNormal );\n\n\t\treturn this.sub( _vector$c );\n\n\t}\n\n\treflect( normal ) {\n\n\t\t// reflect incident vector off plane orthogonal to normal\n\t\t// normal is assumed to have unit length\n\n\t\treturn this.sub( _vector$c.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) );\n\n\t}\n\n\tangleTo( v ) {\n\n\t\tconst denominator = Math.sqrt( this.lengthSq() * v.lengthSq() );\n\n\t\tif ( denominator === 0 ) return Math.PI / 2;\n\n\t\tconst theta = this.dot( v ) / denominator;\n\n\t\t// clamp, to handle numerical problems\n\n\t\treturn Math.acos( clamp( theta, - 1, 1 ) );\n\n\t}\n\n\tdistanceTo( v ) {\n\n\t\treturn Math.sqrt( this.distanceToSquared( v ) );\n\n\t}\n\n\tdistanceToSquared( v ) {\n\n\t\tconst dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;\n\n\t\treturn dx * dx + dy * dy + dz * dz;\n\n\t}\n\n\tmanhattanDistanceTo( v ) {\n\n\t\treturn Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z );\n\n\t}\n\n\tsetFromSpherical( s ) {\n\n\t\treturn this.setFromSphericalCoords( s.radius, s.phi, s.theta );\n\n\t}\n\n\tsetFromSphericalCoords( radius, phi, theta ) {\n\n\t\tconst sinPhiRadius = Math.sin( phi ) * radius;\n\n\t\tthis.x = sinPhiRadius * Math.sin( theta );\n\t\tthis.y = Math.cos( phi ) * radius;\n\t\tthis.z = sinPhiRadius * Math.cos( theta );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCylindrical( c ) {\n\n\t\treturn this.setFromCylindricalCoords( c.radius, c.theta, c.y );\n\n\t}\n\n\tsetFromCylindricalCoords( radius, theta, y ) {\n\n\t\tthis.x = radius * Math.sin( theta );\n\t\tthis.y = y;\n\t\tthis.z = radius * Math.cos( theta );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixPosition( m ) {\n\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 12 ];\n\t\tthis.y = e[ 13 ];\n\t\tthis.z = e[ 14 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixScale( m ) {\n\n\t\tconst sx = this.setFromMatrixColumn( m, 0 ).length();\n\t\tconst sy = this.setFromMatrixColumn( m, 1 ).length();\n\t\tconst sz = this.setFromMatrixColumn( m, 2 ).length();\n\n\t\tthis.x = sx;\n\t\tthis.y = sy;\n\t\tthis.z = sz;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixColumn( m, index ) {\n\n\t\treturn this.fromArray( m.elements, index * 4 );\n\n\t}\n\n\tsetFromMatrix3Column( m, index ) {\n\n\t\treturn this.fromArray( m.elements, index * 3 );\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\t\tthis.z = array[ offset + 2 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\t\tarray[ offset + 2 ] = this.z;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index, offset ) {\n\n\t\tif ( offset !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: offset has been removed from .fromBufferAttribute().' );\n\n\t\t}\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\t\tthis.z = attribute.getZ( index );\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\t\tthis.z = Math.random();\n\n\t\treturn this;\n\n\t}\n\n}\n\nVector3.prototype.isVector3 = true;\n\nconst _vector$c = /*@__PURE__*/ new Vector3();\nconst _quaternion$4 = /*@__PURE__*/ new Quaternion();\n\nclass Box3 {\n\n\tconstructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) {\n\n\t\tthis.min = min;\n\t\tthis.max = max;\n\n\t}\n\n\tset( min, max ) {\n\n\t\tthis.min.copy( min );\n\t\tthis.max.copy( max );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromArray( array ) {\n\n\t\tlet minX = + Infinity;\n\t\tlet minY = + Infinity;\n\t\tlet minZ = + Infinity;\n\n\t\tlet maxX = - Infinity;\n\t\tlet maxY = - Infinity;\n\t\tlet maxZ = - Infinity;\n\n\t\tfor ( let i = 0, l = array.length; i < l; i += 3 ) {\n\n\t\t\tconst x = array[ i ];\n\t\t\tconst y = array[ i + 1 ];\n\t\t\tconst z = array[ i + 2 ];\n\n\t\t\tif ( x < minX ) minX = x;\n\t\t\tif ( y < minY ) minY = y;\n\t\t\tif ( z < minZ ) minZ = z;\n\n\t\t\tif ( x > maxX ) maxX = x;\n\t\t\tif ( y > maxY ) maxY = y;\n\t\t\tif ( z > maxZ ) maxZ = z;\n\n\t\t}\n\n\t\tthis.min.set( minX, minY, minZ );\n\t\tthis.max.set( maxX, maxY, maxZ );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromBufferAttribute( attribute ) {\n\n\t\tlet minX = + Infinity;\n\t\tlet minY = + Infinity;\n\t\tlet minZ = + Infinity;\n\n\t\tlet maxX = - Infinity;\n\t\tlet maxY = - Infinity;\n\t\tlet maxZ = - Infinity;\n\n\t\tfor ( let i = 0, l = attribute.count; i < l; i ++ ) {\n\n\t\t\tconst x = attribute.getX( i );\n\t\t\tconst y = attribute.getY( i );\n\t\t\tconst z = attribute.getZ( i );\n\n\t\t\tif ( x < minX ) minX = x;\n\t\t\tif ( y < minY ) minY = y;\n\t\t\tif ( z < minZ ) minZ = z;\n\n\t\t\tif ( x > maxX ) maxX = x;\n\t\t\tif ( y > maxY ) maxY = y;\n\t\t\tif ( z > maxZ ) maxZ = z;\n\n\t\t}\n\n\t\tthis.min.set( minX, minY, minZ );\n\t\tthis.max.set( maxX, maxY, maxZ );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( points[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCenterAndSize( center, size ) {\n\n\t\tconst halfSize = _vector$b.copy( size ).multiplyScalar( 0.5 );\n\n\t\tthis.min.copy( center ).sub( halfSize );\n\t\tthis.max.copy( center ).add( halfSize );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromObject( object ) {\n\n\t\tthis.makeEmpty();\n\n\t\treturn this.expandByObject( object );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( box ) {\n\n\t\tthis.min.copy( box.min );\n\t\tthis.max.copy( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.min.x = this.min.y = this.min.z = + Infinity;\n\t\tthis.max.x = this.max.y = this.max.z = - Infinity;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\n\t\treturn ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ) || ( this.max.z < this.min.z );\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );\n\n\t}\n\n\tgetSize( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0, 0 ) : target.subVectors( this.max, this.min );\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tthis.min.min( point );\n\t\tthis.max.max( point );\n\n\t\treturn this;\n\n\t}\n\n\texpandByVector( vector ) {\n\n\t\tthis.min.sub( vector );\n\t\tthis.max.add( vector );\n\n\t\treturn this;\n\n\t}\n\n\texpandByScalar( scalar ) {\n\n\t\tthis.min.addScalar( - scalar );\n\t\tthis.max.addScalar( scalar );\n\n\t\treturn this;\n\n\t}\n\n\texpandByObject( object ) {\n\n\t\t// Computes the world-axis-aligned bounding box of an object (including its children),\n\t\t// accounting for both the object's, and children's, world transforms\n\n\t\tobject.updateWorldMatrix( false, false );\n\n\t\tconst geometry = object.geometry;\n\n\t\tif ( geometry !== undefined ) {\n\n\t\t\tif ( geometry.boundingBox === null ) {\n\n\t\t\t\tgeometry.computeBoundingBox();\n\n\t\t\t}\n\n\t\t\t_box$3.copy( geometry.boundingBox );\n\t\t\t_box$3.applyMatrix4( object.matrixWorld );\n\n\t\t\tthis.union( _box$3 );\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tthis.expandByObject( children[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn point.x < this.min.x || point.x > this.max.x ||\n\t\t\tpoint.y < this.min.y || point.y > this.max.y ||\n\t\t\tpoint.z < this.min.z || point.z > this.max.z ? false : true;\n\n\t}\n\n\tcontainsBox( box ) {\n\n\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x &&\n\t\t\tthis.min.y <= box.min.y && box.max.y <= this.max.y &&\n\t\t\tthis.min.z <= box.min.z && box.max.z <= this.max.z;\n\n\t}\n\n\tgetParameter( point, target ) {\n\n\t\t// This can potentially have a divide by zero if the box\n\t\t// has a size dimension of 0.\n\n\t\treturn target.set(\n\t\t\t( point.x - this.min.x ) / ( this.max.x - this.min.x ),\n\t\t\t( point.y - this.min.y ) / ( this.max.y - this.min.y ),\n\t\t\t( point.z - this.min.z ) / ( this.max.z - this.min.z )\n\t\t);\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\t// using 6 splitting planes to rule out intersections.\n\t\treturn box.max.x < this.min.x || box.min.x > this.max.x ||\n\t\t\tbox.max.y < this.min.y || box.min.y > this.max.y ||\n\t\t\tbox.max.z < this.min.z || box.min.z > this.max.z ? false : true;\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\t// Find the point on the AABB closest to the sphere center.\n\t\tthis.clampPoint( sphere.center, _vector$b );\n\n\t\t// If that point is inside the sphere, the AABB and sphere intersect.\n\t\treturn _vector$b.distanceToSquared( sphere.center ) <= ( sphere.radius * sphere.radius );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\t// We compute the minimum and maximum dot product values. If those values\n\t\t// are on the same side (back or front) of the plane, then there is no intersection.\n\n\t\tlet min, max;\n\n\t\tif ( plane.normal.x > 0 ) {\n\n\t\t\tmin = plane.normal.x * this.min.x;\n\t\t\tmax = plane.normal.x * this.max.x;\n\n\t\t} else {\n\n\t\t\tmin = plane.normal.x * this.max.x;\n\t\t\tmax = plane.normal.x * this.min.x;\n\n\t\t}\n\n\t\tif ( plane.normal.y > 0 ) {\n\n\t\t\tmin += plane.normal.y * this.min.y;\n\t\t\tmax += plane.normal.y * this.max.y;\n\n\t\t} else {\n\n\t\t\tmin += plane.normal.y * this.max.y;\n\t\t\tmax += plane.normal.y * this.min.y;\n\n\t\t}\n\n\t\tif ( plane.normal.z > 0 ) {\n\n\t\t\tmin += plane.normal.z * this.min.z;\n\t\t\tmax += plane.normal.z * this.max.z;\n\n\t\t} else {\n\n\t\t\tmin += plane.normal.z * this.max.z;\n\t\t\tmax += plane.normal.z * this.min.z;\n\n\t\t}\n\n\t\treturn ( min <= - plane.constant && max >= - plane.constant );\n\n\t}\n\n\tintersectsTriangle( triangle ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// compute box center and extents\n\t\tthis.getCenter( _center );\n\t\t_extents.subVectors( this.max, _center );\n\n\t\t// translate triangle to aabb origin\n\t\t_v0$2.subVectors( triangle.a, _center );\n\t\t_v1$7.subVectors( triangle.b, _center );\n\t\t_v2$3.subVectors( triangle.c, _center );\n\n\t\t// compute edge vectors for triangle\n\t\t_f0.subVectors( _v1$7, _v0$2 );\n\t\t_f1.subVectors( _v2$3, _v1$7 );\n\t\t_f2.subVectors( _v0$2, _v2$3 );\n\n\t\t// test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb\n\t\t// make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation\n\t\t// axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)\n\t\tlet axes = [\n\t\t\t0, - _f0.z, _f0.y, 0, - _f1.z, _f1.y, 0, - _f2.z, _f2.y,\n\t\t\t_f0.z, 0, - _f0.x, _f1.z, 0, - _f1.x, _f2.z, 0, - _f2.x,\n\t\t\t- _f0.y, _f0.x, 0, - _f1.y, _f1.x, 0, - _f2.y, _f2.x, 0\n\t\t];\n\t\tif ( ! satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents ) ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// test 3 face normals from the aabb\n\t\taxes = [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ];\n\t\tif ( ! satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents ) ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// finally testing the face normal of the triangle\n\t\t// use already existing triangle edge vectors here\n\t\t_triangleNormal.crossVectors( _f0, _f1 );\n\t\taxes = [ _triangleNormal.x, _triangleNormal.y, _triangleNormal.z ];\n\n\t\treturn satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents );\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\treturn target.copy( point ).clamp( this.min, this.max );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\tconst clampedPoint = _vector$b.copy( point ).clamp( this.min, this.max );\n\n\t\treturn clampedPoint.sub( point ).length();\n\n\t}\n\n\tgetBoundingSphere( target ) {\n\n\t\tthis.getCenter( target.center );\n\n\t\ttarget.radius = this.getSize( _vector$b ).length() * 0.5;\n\n\t\treturn target;\n\n\t}\n\n\tintersect( box ) {\n\n\t\tthis.min.max( box.min );\n\t\tthis.max.min( box.max );\n\n\t\t// ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.\n\t\tif ( this.isEmpty() ) this.makeEmpty();\n\n\t\treturn this;\n\n\t}\n\n\tunion( box ) {\n\n\t\tthis.min.min( box.min );\n\t\tthis.max.max( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\t// transform of empty box is an empty box.\n\t\tif ( this.isEmpty() ) return this;\n\n\t\t// NOTE: I am using a binary pattern to specify all 2^3 combinations below\n\t\t_points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000\n\t\t_points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001\n\t\t_points[ 2 ].set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 010\n\t\t_points[ 3 ].set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 011\n\t\t_points[ 4 ].set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 100\n\t\t_points[ 5 ].set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 101\n\t\t_points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110\n\t\t_points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111\n\n\t\tthis.setFromPoints( _points );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.min.add( offset );\n\t\tthis.max.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\tequals( box ) {\n\n\t\treturn box.min.equals( this.min ) && box.max.equals( this.max );\n\n\t}\n\n}\n\nBox3.prototype.isBox3 = true;\n\nconst _points = [\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3()\n];\n\nconst _vector$b = /*@__PURE__*/ new Vector3();\n\nconst _box$3 = /*@__PURE__*/ new Box3();\n\n// triangle centered vertices\n\nconst _v0$2 = /*@__PURE__*/ new Vector3();\nconst _v1$7 = /*@__PURE__*/ new Vector3();\nconst _v2$3 = /*@__PURE__*/ new Vector3();\n\n// triangle edge vectors\n\nconst _f0 = /*@__PURE__*/ new Vector3();\nconst _f1 = /*@__PURE__*/ new Vector3();\nconst _f2 = /*@__PURE__*/ new Vector3();\n\nconst _center = /*@__PURE__*/ new Vector3();\nconst _extents = /*@__PURE__*/ new Vector3();\nconst _triangleNormal = /*@__PURE__*/ new Vector3();\nconst _testAxis = /*@__PURE__*/ new Vector3();\n\nfunction satForAxes( axes, v0, v1, v2, extents ) {\n\n\tfor ( let i = 0, j = axes.length - 3; i <= j; i += 3 ) {\n\n\t\t_testAxis.fromArray( axes, i );\n\t\t// project the aabb onto the seperating axis\n\t\tconst r = extents.x * Math.abs( _testAxis.x ) + extents.y * Math.abs( _testAxis.y ) + extents.z * Math.abs( _testAxis.z );\n\t\t// project all 3 vertices of the triangle onto the seperating axis\n\t\tconst p0 = v0.dot( _testAxis );\n\t\tconst p1 = v1.dot( _testAxis );\n\t\tconst p2 = v2.dot( _testAxis );\n\t\t// actual test, basically see if either of the most extreme of the triangle points intersects r\n\t\tif ( Math.max( - Math.max( p0, p1, p2 ), Math.min( p0, p1, p2 ) ) > r ) {\n\n\t\t\t// points of the projected triangle are outside the projected half-length of the aabb\n\t\t\t// the axis is seperating and we can exit\n\t\t\treturn false;\n\n\t\t}\n\n\t}\n\n\treturn true;\n\n}\n\nconst _box$2 = /*@__PURE__*/ new Box3();\nconst _v1$6 = /*@__PURE__*/ new Vector3();\nconst _toFarthestPoint = /*@__PURE__*/ new Vector3();\nconst _toPoint = /*@__PURE__*/ new Vector3();\n\nclass Sphere {\n\n\tconstructor( center = new Vector3(), radius = - 1 ) {\n\n\t\tthis.center = center;\n\t\tthis.radius = radius;\n\n\t}\n\n\tset( center, radius ) {\n\n\t\tthis.center.copy( center );\n\t\tthis.radius = radius;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points, optionalCenter ) {\n\n\t\tconst center = this.center;\n\n\t\tif ( optionalCenter !== undefined ) {\n\n\t\t\tcenter.copy( optionalCenter );\n\n\t\t} else {\n\n\t\t\t_box$2.setFromPoints( points ).getCenter( center );\n\n\t\t}\n\n\t\tlet maxRadiusSq = 0;\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) );\n\n\t\t}\n\n\t\tthis.radius = Math.sqrt( maxRadiusSq );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( sphere ) {\n\n\t\tthis.center.copy( sphere.center );\n\t\tthis.radius = sphere.radius;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\treturn ( this.radius < 0 );\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.center.set( 0, 0, 0 );\n\t\tthis.radius = - 1;\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn ( point.distanceToSquared( this.center ) <= ( this.radius * this.radius ) );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn ( point.distanceTo( this.center ) - this.radius );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\tconst radiusSum = this.radius + sphere.radius;\n\n\t\treturn sphere.center.distanceToSquared( this.center ) <= ( radiusSum * radiusSum );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsSphere( this );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\treturn Math.abs( plane.distanceToPoint( this.center ) ) <= this.radius;\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\tconst deltaLengthSq = this.center.distanceToSquared( point );\n\n\t\ttarget.copy( point );\n\n\t\tif ( deltaLengthSq > ( this.radius * this.radius ) ) {\n\n\t\t\ttarget.sub( this.center ).normalize();\n\t\t\ttarget.multiplyScalar( this.radius ).add( this.center );\n\n\t\t}\n\n\t\treturn target;\n\n\t}\n\n\tgetBoundingBox( target ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\t// Empty sphere produces empty bounding box\n\t\t\ttarget.makeEmpty();\n\t\t\treturn target;\n\n\t\t}\n\n\t\ttarget.set( this.center, this.center );\n\t\ttarget.expandByScalar( this.radius );\n\n\t\treturn target;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tthis.center.applyMatrix4( matrix );\n\t\tthis.radius = this.radius * matrix.getMaxScaleOnAxis();\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.center.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\t// from https://github.com/juj/MathGeoLib/blob/2940b99b99cfe575dd45103ef20f4019dee15b54/src/Geometry/Sphere.cpp#L649-L671\n\n\t\t_toPoint.subVectors( point, this.center );\n\n\t\tconst lengthSq = _toPoint.lengthSq();\n\n\t\tif ( lengthSq > ( this.radius * this.radius ) ) {\n\n\t\t\tconst length = Math.sqrt( lengthSq );\n\t\t\tconst missingRadiusHalf = ( length - this.radius ) * 0.5;\n\n\t\t\t// Nudge this sphere towards the target point. Add half the missing distance to radius,\n\t\t\t// and the other half to position. This gives a tighter enclosure, instead of if\n\t\t\t// the whole missing distance were just added to radius.\n\n\t\t\tthis.center.add( _toPoint.multiplyScalar( missingRadiusHalf / length ) );\n\t\t\tthis.radius += missingRadiusHalf;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tunion( sphere ) {\n\n\t\t// from https://github.com/juj/MathGeoLib/blob/2940b99b99cfe575dd45103ef20f4019dee15b54/src/Geometry/Sphere.cpp#L759-L769\n\n\t\t// To enclose another sphere into this sphere, we only need to enclose two points:\n\t\t// 1) Enclose the farthest point on the other sphere into this sphere.\n\t\t// 2) Enclose the opposite point of the farthest point into this sphere.\n\n\t\t_toFarthestPoint.subVectors( sphere.center, this.center ).normalize().multiplyScalar( sphere.radius );\n\n\t\tthis.expandByPoint( _v1$6.copy( sphere.center ).add( _toFarthestPoint ) );\n\t\tthis.expandByPoint( _v1$6.copy( sphere.center ).sub( _toFarthestPoint ) );\n\n\t\treturn this;\n\n\t}\n\n\tequals( sphere ) {\n\n\t\treturn sphere.center.equals( this.center ) && ( sphere.radius === this.radius );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$a = /*@__PURE__*/ new Vector3();\nconst _segCenter = /*@__PURE__*/ new Vector3();\nconst _segDir = /*@__PURE__*/ new Vector3();\nconst _diff = /*@__PURE__*/ new Vector3();\n\nconst _edge1 = /*@__PURE__*/ new Vector3();\nconst _edge2 = /*@__PURE__*/ new Vector3();\nconst _normal$1 = /*@__PURE__*/ new Vector3();\n\nclass Ray {\n\n\tconstructor( origin = new Vector3(), direction = new Vector3( 0, 0, - 1 ) ) {\n\n\t\tthis.origin = origin;\n\t\tthis.direction = direction;\n\n\t}\n\n\tset( origin, direction ) {\n\n\t\tthis.origin.copy( origin );\n\t\tthis.direction.copy( direction );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( ray ) {\n\n\t\tthis.origin.copy( ray.origin );\n\t\tthis.direction.copy( ray.direction );\n\n\t\treturn this;\n\n\t}\n\n\tat( t, target ) {\n\n\t\treturn target.copy( this.direction ).multiplyScalar( t ).add( this.origin );\n\n\t}\n\n\tlookAt( v ) {\n\n\t\tthis.direction.copy( v ).sub( this.origin ).normalize();\n\n\t\treturn this;\n\n\t}\n\n\trecast( t ) {\n\n\t\tthis.origin.copy( this.at( t, _vector$a ) );\n\n\t\treturn this;\n\n\t}\n\n\tclosestPointToPoint( point, target ) {\n\n\t\ttarget.subVectors( point, this.origin );\n\n\t\tconst directionDistance = target.dot( this.direction );\n\n\t\tif ( directionDistance < 0 ) {\n\n\t\t\treturn target.copy( this.origin );\n\n\t\t}\n\n\t\treturn target.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn Math.sqrt( this.distanceSqToPoint( point ) );\n\n\t}\n\n\tdistanceSqToPoint( point ) {\n\n\t\tconst directionDistance = _vector$a.subVectors( point, this.origin ).dot( this.direction );\n\n\t\t// point behind the ray\n\n\t\tif ( directionDistance < 0 ) {\n\n\t\t\treturn this.origin.distanceToSquared( point );\n\n\t\t}\n\n\t\t_vector$a.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin );\n\n\t\treturn _vector$a.distanceToSquared( point );\n\n\t}\n\n\tdistanceSqToSegment( v0, v1, optionalPointOnRay, optionalPointOnSegment ) {\n\n\t\t// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteDistRaySegment.h\n\t\t// It returns the min distance between the ray and the segment\n\t\t// defined by v0 and v1\n\t\t// It can also set two optional targets :\n\t\t// - The closest point on the ray\n\t\t// - The closest point on the segment\n\n\t\t_segCenter.copy( v0 ).add( v1 ).multiplyScalar( 0.5 );\n\t\t_segDir.copy( v1 ).sub( v0 ).normalize();\n\t\t_diff.copy( this.origin ).sub( _segCenter );\n\n\t\tconst segExtent = v0.distanceTo( v1 ) * 0.5;\n\t\tconst a01 = - this.direction.dot( _segDir );\n\t\tconst b0 = _diff.dot( this.direction );\n\t\tconst b1 = - _diff.dot( _segDir );\n\t\tconst c = _diff.lengthSq();\n\t\tconst det = Math.abs( 1 - a01 * a01 );\n\t\tlet s0, s1, sqrDist, extDet;\n\n\t\tif ( det > 0 ) {\n\n\t\t\t// The ray and segment are not parallel.\n\n\t\t\ts0 = a01 * b1 - b0;\n\t\t\ts1 = a01 * b0 - b1;\n\t\t\textDet = segExtent * det;\n\n\t\t\tif ( s0 >= 0 ) {\n\n\t\t\t\tif ( s1 >= - extDet ) {\n\n\t\t\t\t\tif ( s1 <= extDet ) {\n\n\t\t\t\t\t\t// region 0\n\t\t\t\t\t\t// Minimum at interior points of ray and segment.\n\n\t\t\t\t\t\tconst invDet = 1 / det;\n\t\t\t\t\t\ts0 *= invDet;\n\t\t\t\t\t\ts1 *= invDet;\n\t\t\t\t\t\tsqrDist = s0 * ( s0 + a01 * s1 + 2 * b0 ) + s1 * ( a01 * s0 + s1 + 2 * b1 ) + c;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// region 1\n\n\t\t\t\t\t\ts1 = segExtent;\n\t\t\t\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// region 5\n\n\t\t\t\t\ts1 = - segExtent;\n\t\t\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( s1 <= - extDet ) {\n\n\t\t\t\t\t// region 4\n\n\t\t\t\t\ts0 = Math.max( 0, - ( - a01 * segExtent + b0 ) );\n\t\t\t\t\ts1 = ( s0 > 0 ) ? - segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t} else if ( s1 <= extDet ) {\n\n\t\t\t\t\t// region 3\n\n\t\t\t\t\ts0 = 0;\n\t\t\t\t\ts1 = Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// region 2\n\n\t\t\t\t\ts0 = Math.max( 0, - ( a01 * segExtent + b0 ) );\n\t\t\t\t\ts1 = ( s0 > 0 ) ? segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// Ray and segment are parallel.\n\n\t\t\ts1 = ( a01 > 0 ) ? - segExtent : segExtent;\n\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t}\n\n\t\tif ( optionalPointOnRay ) {\n\n\t\t\toptionalPointOnRay.copy( this.direction ).multiplyScalar( s0 ).add( this.origin );\n\n\t\t}\n\n\t\tif ( optionalPointOnSegment ) {\n\n\t\t\toptionalPointOnSegment.copy( _segDir ).multiplyScalar( s1 ).add( _segCenter );\n\n\t\t}\n\n\t\treturn sqrDist;\n\n\t}\n\n\tintersectSphere( sphere, target ) {\n\n\t\t_vector$a.subVectors( sphere.center, this.origin );\n\t\tconst tca = _vector$a.dot( this.direction );\n\t\tconst d2 = _vector$a.dot( _vector$a ) - tca * tca;\n\t\tconst radius2 = sphere.radius * sphere.radius;\n\n\t\tif ( d2 > radius2 ) return null;\n\n\t\tconst thc = Math.sqrt( radius2 - d2 );\n\n\t\t// t0 = first intersect point - entrance on front of sphere\n\t\tconst t0 = tca - thc;\n\n\t\t// t1 = second intersect point - exit point on back of sphere\n\t\tconst t1 = tca + thc;\n\n\t\t// test to see if both t0 and t1 are behind the ray - if so, return null\n\t\tif ( t0 < 0 && t1 < 0 ) return null;\n\n\t\t// test to see if t0 is behind the ray:\n\t\t// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,\n\t\t// in order to always return an intersect point that is in front of the ray.\n\t\tif ( t0 < 0 ) return this.at( t1, target );\n\n\t\t// else t0 is in front of the ray, so return the first collision point scaled by t0\n\t\treturn this.at( t0, target );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\treturn this.distanceSqToPoint( sphere.center ) <= ( sphere.radius * sphere.radius );\n\n\t}\n\n\tdistanceToPlane( plane ) {\n\n\t\tconst denominator = plane.normal.dot( this.direction );\n\n\t\tif ( denominator === 0 ) {\n\n\t\t\t// line is coplanar, return origin\n\t\t\tif ( plane.distanceToPoint( this.origin ) === 0 ) {\n\n\t\t\t\treturn 0;\n\n\t\t\t}\n\n\t\t\t// Null is preferable to undefined since undefined means.... it is undefined\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst t = - ( this.origin.dot( plane.normal ) + plane.constant ) / denominator;\n\n\t\t// Return if the ray never intersects the plane\n\n\t\treturn t >= 0 ? t : null;\n\n\t}\n\n\tintersectPlane( plane, target ) {\n\n\t\tconst t = this.distanceToPlane( plane );\n\n\t\tif ( t === null ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\treturn this.at( t, target );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\t// check if the ray lies on the plane first\n\n\t\tconst distToPoint = plane.distanceToPoint( this.origin );\n\n\t\tif ( distToPoint === 0 ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tconst denominator = plane.normal.dot( this.direction );\n\n\t\tif ( denominator * distToPoint < 0 ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\t// ray origin is behind the plane (and is pointing behind it)\n\n\t\treturn false;\n\n\t}\n\n\tintersectBox( box, target ) {\n\n\t\tlet tmin, tmax, tymin, tymax, tzmin, tzmax;\n\n\t\tconst invdirx = 1 / this.direction.x,\n\t\t\tinvdiry = 1 / this.direction.y,\n\t\t\tinvdirz = 1 / this.direction.z;\n\n\t\tconst origin = this.origin;\n\n\t\tif ( invdirx >= 0 ) {\n\n\t\t\ttmin = ( box.min.x - origin.x ) * invdirx;\n\t\t\ttmax = ( box.max.x - origin.x ) * invdirx;\n\n\t\t} else {\n\n\t\t\ttmin = ( box.max.x - origin.x ) * invdirx;\n\t\t\ttmax = ( box.min.x - origin.x ) * invdirx;\n\n\t\t}\n\n\t\tif ( invdiry >= 0 ) {\n\n\t\t\ttymin = ( box.min.y - origin.y ) * invdiry;\n\t\t\ttymax = ( box.max.y - origin.y ) * invdiry;\n\n\t\t} else {\n\n\t\t\ttymin = ( box.max.y - origin.y ) * invdiry;\n\t\t\ttymax = ( box.min.y - origin.y ) * invdiry;\n\n\t\t}\n\n\t\tif ( ( tmin > tymax ) || ( tymin > tmax ) ) return null;\n\n\t\t// These lines also handle the case where tmin or tmax is NaN\n\t\t// (result of 0 * Infinity). x !== x returns true if x is NaN\n\n\t\tif ( tymin > tmin || tmin !== tmin ) tmin = tymin;\n\n\t\tif ( tymax < tmax || tmax !== tmax ) tmax = tymax;\n\n\t\tif ( invdirz >= 0 ) {\n\n\t\t\ttzmin = ( box.min.z - origin.z ) * invdirz;\n\t\t\ttzmax = ( box.max.z - origin.z ) * invdirz;\n\n\t\t} else {\n\n\t\t\ttzmin = ( box.max.z - origin.z ) * invdirz;\n\t\t\ttzmax = ( box.min.z - origin.z ) * invdirz;\n\n\t\t}\n\n\t\tif ( ( tmin > tzmax ) || ( tzmin > tmax ) ) return null;\n\n\t\tif ( tzmin > tmin || tmin !== tmin ) tmin = tzmin;\n\n\t\tif ( tzmax < tmax || tmax !== tmax ) tmax = tzmax;\n\n\t\t//return point closest to the ray (positive side)\n\n\t\tif ( tmax < 0 ) return null;\n\n\t\treturn this.at( tmin >= 0 ? tmin : tmax, target );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn this.intersectBox( box, _vector$a ) !== null;\n\n\t}\n\n\tintersectTriangle( a, b, c, backfaceCulling, target ) {\n\n\t\t// Compute the offset origin, edges, and normal.\n\n\t\t// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h\n\n\t\t_edge1.subVectors( b, a );\n\t\t_edge2.subVectors( c, a );\n\t\t_normal$1.crossVectors( _edge1, _edge2 );\n\n\t\t// Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction,\n\t\t// E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by\n\t\t// |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))\n\t\t// |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))\n\t\t// |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)\n\t\tlet DdN = this.direction.dot( _normal$1 );\n\t\tlet sign;\n\n\t\tif ( DdN > 0 ) {\n\n\t\t\tif ( backfaceCulling ) return null;\n\t\t\tsign = 1;\n\n\t\t} else if ( DdN < 0 ) {\n\n\t\t\tsign = - 1;\n\t\t\tDdN = - DdN;\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t_diff.subVectors( this.origin, a );\n\t\tconst DdQxE2 = sign * this.direction.dot( _edge2.crossVectors( _diff, _edge2 ) );\n\n\t\t// b1 < 0, no intersection\n\t\tif ( DdQxE2 < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst DdE1xQ = sign * this.direction.dot( _edge1.cross( _diff ) );\n\n\t\t// b2 < 0, no intersection\n\t\tif ( DdE1xQ < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// b1+b2 > 1, no intersection\n\t\tif ( DdQxE2 + DdE1xQ > DdN ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// Line intersects triangle, check if ray does.\n\t\tconst QdN = - sign * _diff.dot( _normal$1 );\n\n\t\t// t < 0, no intersection\n\t\tif ( QdN < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// Ray intersects triangle.\n\t\treturn this.at( QdN / DdN, target );\n\n\t}\n\n\tapplyMatrix4( matrix4 ) {\n\n\t\tthis.origin.applyMatrix4( matrix4 );\n\t\tthis.direction.transformDirection( matrix4 );\n\n\t\treturn this;\n\n\t}\n\n\tequals( ray ) {\n\n\t\treturn ray.origin.equals( this.origin ) && ray.direction.equals( this.direction );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass Matrix4 {\n\n\tconstructor() {\n\n\t\tthis.elements = [\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t];\n\n\t\tif ( arguments.length > 0 ) {\n\n\t\t\tconsole.error( 'THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.' );\n\n\t\t}\n\n\t}\n\n\tset( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] = n11; te[ 4 ] = n12; te[ 8 ] = n13; te[ 12 ] = n14;\n\t\tte[ 1 ] = n21; te[ 5 ] = n22; te[ 9 ] = n23; te[ 13 ] = n24;\n\t\tte[ 2 ] = n31; te[ 6 ] = n32; te[ 10 ] = n33; te[ 14 ] = n34;\n\t\tte[ 3 ] = n41; te[ 7 ] = n42; te[ 11 ] = n43; te[ 15 ] = n44;\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Matrix4().fromArray( this.elements );\n\n\t}\n\n\tcopy( m ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tte[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; te[ 3 ] = me[ 3 ];\n\t\tte[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ];\n\t\tte[ 8 ] = me[ 8 ]; te[ 9 ] = me[ 9 ]; te[ 10 ] = me[ 10 ]; te[ 11 ] = me[ 11 ];\n\t\tte[ 12 ] = me[ 12 ]; te[ 13 ] = me[ 13 ]; te[ 14 ] = me[ 14 ]; te[ 15 ] = me[ 15 ];\n\n\t\treturn this;\n\n\t}\n\n\tcopyPosition( m ) {\n\n\t\tconst te = this.elements, me = m.elements;\n\n\t\tte[ 12 ] = me[ 12 ];\n\t\tte[ 13 ] = me[ 13 ];\n\t\tte[ 14 ] = me[ 14 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrix3( m ) {\n\n\t\tconst me = m.elements;\n\n\t\tthis.set(\n\n\t\t\tme[ 0 ], me[ 3 ], me[ 6 ], 0,\n\t\t\tme[ 1 ], me[ 4 ], me[ 7 ], 0,\n\t\t\tme[ 2 ], me[ 5 ], me[ 8 ], 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\textractBasis( xAxis, yAxis, zAxis ) {\n\n\t\txAxis.setFromMatrixColumn( this, 0 );\n\t\tyAxis.setFromMatrixColumn( this, 1 );\n\t\tzAxis.setFromMatrixColumn( this, 2 );\n\n\t\treturn this;\n\n\t}\n\n\tmakeBasis( xAxis, yAxis, zAxis ) {\n\n\t\tthis.set(\n\t\t\txAxis.x, yAxis.x, zAxis.x, 0,\n\t\t\txAxis.y, yAxis.y, zAxis.y, 0,\n\t\t\txAxis.z, yAxis.z, zAxis.z, 0,\n\t\t\t0, 0, 0, 1\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\textractRotation( m ) {\n\n\t\t// this method does not support reflection matrices\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tconst scaleX = 1 / _v1$5.setFromMatrixColumn( m, 0 ).length();\n\t\tconst scaleY = 1 / _v1$5.setFromMatrixColumn( m, 1 ).length();\n\t\tconst scaleZ = 1 / _v1$5.setFromMatrixColumn( m, 2 ).length();\n\n\t\tte[ 0 ] = me[ 0 ] * scaleX;\n\t\tte[ 1 ] = me[ 1 ] * scaleX;\n\t\tte[ 2 ] = me[ 2 ] * scaleX;\n\t\tte[ 3 ] = 0;\n\n\t\tte[ 4 ] = me[ 4 ] * scaleY;\n\t\tte[ 5 ] = me[ 5 ] * scaleY;\n\t\tte[ 6 ] = me[ 6 ] * scaleY;\n\t\tte[ 7 ] = 0;\n\n\t\tte[ 8 ] = me[ 8 ] * scaleZ;\n\t\tte[ 9 ] = me[ 9 ] * scaleZ;\n\t\tte[ 10 ] = me[ 10 ] * scaleZ;\n\t\tte[ 11 ] = 0;\n\n\t\tte[ 12 ] = 0;\n\t\tte[ 13 ] = 0;\n\t\tte[ 14 ] = 0;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationFromEuler( euler ) {\n\n\t\tif ( ! ( euler && euler.isEuler ) ) {\n\n\t\t\tconsole.error( 'THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.' );\n\n\t\t}\n\n\t\tconst te = this.elements;\n\n\t\tconst x = euler.x, y = euler.y, z = euler.z;\n\t\tconst a = Math.cos( x ), b = Math.sin( x );\n\t\tconst c = Math.cos( y ), d = Math.sin( y );\n\t\tconst e = Math.cos( z ), f = Math.sin( z );\n\n\t\tif ( euler.order === 'XYZ' ) {\n\n\t\t\tconst ae = a * e, af = a * f, be = b * e, bf = b * f;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = - c * f;\n\t\t\tte[ 8 ] = d;\n\n\t\t\tte[ 1 ] = af + be * d;\n\t\t\tte[ 5 ] = ae - bf * d;\n\t\t\tte[ 9 ] = - b * c;\n\n\t\t\tte[ 2 ] = bf - ae * d;\n\t\t\tte[ 6 ] = be + af * d;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'YXZ' ) {\n\n\t\t\tconst ce = c * e, cf = c * f, de = d * e, df = d * f;\n\n\t\t\tte[ 0 ] = ce + df * b;\n\t\t\tte[ 4 ] = de * b - cf;\n\t\t\tte[ 8 ] = a * d;\n\n\t\t\tte[ 1 ] = a * f;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = - b;\n\n\t\t\tte[ 2 ] = cf * b - de;\n\t\t\tte[ 6 ] = df + ce * b;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'ZXY' ) {\n\n\t\t\tconst ce = c * e, cf = c * f, de = d * e, df = d * f;\n\n\t\t\tte[ 0 ] = ce - df * b;\n\t\t\tte[ 4 ] = - a * f;\n\t\t\tte[ 8 ] = de + cf * b;\n\n\t\t\tte[ 1 ] = cf + de * b;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = df - ce * b;\n\n\t\t\tte[ 2 ] = - a * d;\n\t\t\tte[ 6 ] = b;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'ZYX' ) {\n\n\t\t\tconst ae = a * e, af = a * f, be = b * e, bf = b * f;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = be * d - af;\n\t\t\tte[ 8 ] = ae * d + bf;\n\n\t\t\tte[ 1 ] = c * f;\n\t\t\tte[ 5 ] = bf * d + ae;\n\t\t\tte[ 9 ] = af * d - be;\n\n\t\t\tte[ 2 ] = - d;\n\t\t\tte[ 6 ] = b * c;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'YZX' ) {\n\n\t\t\tconst ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = bd - ac * f;\n\t\t\tte[ 8 ] = bc * f + ad;\n\n\t\t\tte[ 1 ] = f;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = - b * e;\n\n\t\t\tte[ 2 ] = - d * e;\n\t\t\tte[ 6 ] = ad * f + bc;\n\t\t\tte[ 10 ] = ac - bd * f;\n\n\t\t} else if ( euler.order === 'XZY' ) {\n\n\t\t\tconst ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = - f;\n\t\t\tte[ 8 ] = d * e;\n\n\t\t\tte[ 1 ] = ac * f + bd;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = ad * f - bc;\n\n\t\t\tte[ 2 ] = bc * f - ad;\n\t\t\tte[ 6 ] = b * e;\n\t\t\tte[ 10 ] = bd * f + ac;\n\n\t\t}\n\n\t\t// bottom row\n\t\tte[ 3 ] = 0;\n\t\tte[ 7 ] = 0;\n\t\tte[ 11 ] = 0;\n\n\t\t// last column\n\t\tte[ 12 ] = 0;\n\t\tte[ 13 ] = 0;\n\t\tte[ 14 ] = 0;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationFromQuaternion( q ) {\n\n\t\treturn this.compose( _zero, q, _one );\n\n\t}\n\n\tlookAt( eye, target, up ) {\n\n\t\tconst te = this.elements;\n\n\t\t_z.subVectors( eye, target );\n\n\t\tif ( _z.lengthSq() === 0 ) {\n\n\t\t\t// eye and target are in the same position\n\n\t\t\t_z.z = 1;\n\n\t\t}\n\n\t\t_z.normalize();\n\t\t_x.crossVectors( up, _z );\n\n\t\tif ( _x.lengthSq() === 0 ) {\n\n\t\t\t// up and z are parallel\n\n\t\t\tif ( Math.abs( up.z ) === 1 ) {\n\n\t\t\t\t_z.x += 0.0001;\n\n\t\t\t} else {\n\n\t\t\t\t_z.z += 0.0001;\n\n\t\t\t}\n\n\t\t\t_z.normalize();\n\t\t\t_x.crossVectors( up, _z );\n\n\t\t}\n\n\t\t_x.normalize();\n\t\t_y.crossVectors( _z, _x );\n\n\t\tte[ 0 ] = _x.x; te[ 4 ] = _y.x; te[ 8 ] = _z.x;\n\t\tte[ 1 ] = _x.y; te[ 5 ] = _y.y; te[ 9 ] = _z.y;\n\t\tte[ 2 ] = _x.z; te[ 6 ] = _y.z; te[ 10 ] = _z.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( m, n ) {\n\n\t\tif ( n !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.' );\n\t\t\treturn this.multiplyMatrices( m, n );\n\n\t\t}\n\n\t\treturn this.multiplyMatrices( this, m );\n\n\t}\n\n\tpremultiply( m ) {\n\n\t\treturn this.multiplyMatrices( m, this );\n\n\t}\n\n\tmultiplyMatrices( a, b ) {\n\n\t\tconst ae = a.elements;\n\t\tconst be = b.elements;\n\t\tconst te = this.elements;\n\n\t\tconst a11 = ae[ 0 ], a12 = ae[ 4 ], a13 = ae[ 8 ], a14 = ae[ 12 ];\n\t\tconst a21 = ae[ 1 ], a22 = ae[ 5 ], a23 = ae[ 9 ], a24 = ae[ 13 ];\n\t\tconst a31 = ae[ 2 ], a32 = ae[ 6 ], a33 = ae[ 10 ], a34 = ae[ 14 ];\n\t\tconst a41 = ae[ 3 ], a42 = ae[ 7 ], a43 = ae[ 11 ], a44 = ae[ 15 ];\n\n\t\tconst b11 = be[ 0 ], b12 = be[ 4 ], b13 = be[ 8 ], b14 = be[ 12 ];\n\t\tconst b21 = be[ 1 ], b22 = be[ 5 ], b23 = be[ 9 ], b24 = be[ 13 ];\n\t\tconst b31 = be[ 2 ], b32 = be[ 6 ], b33 = be[ 10 ], b34 = be[ 14 ];\n\t\tconst b41 = be[ 3 ], b42 = be[ 7 ], b43 = be[ 11 ], b44 = be[ 15 ];\n\n\t\tte[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n\t\tte[ 4 ] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n\t\tte[ 8 ] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n\t\tte[ 12 ] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n\n\t\tte[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n\t\tte[ 5 ] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n\t\tte[ 9 ] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n\t\tte[ 13 ] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n\n\t\tte[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n\t\tte[ 6 ] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n\t\tte[ 10 ] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n\t\tte[ 14 ] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n\n\t\tte[ 3 ] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n\t\tte[ 7 ] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n\t\tte[ 11 ] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n\t\tte[ 15 ] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= s; te[ 4 ] *= s; te[ 8 ] *= s; te[ 12 ] *= s;\n\t\tte[ 1 ] *= s; te[ 5 ] *= s; te[ 9 ] *= s; te[ 13 ] *= s;\n\t\tte[ 2 ] *= s; te[ 6 ] *= s; te[ 10 ] *= s; te[ 14 ] *= s;\n\t\tte[ 3 ] *= s; te[ 7 ] *= s; te[ 11 ] *= s; te[ 15 ] *= s;\n\n\t\treturn this;\n\n\t}\n\n\tdeterminant() {\n\n\t\tconst te = this.elements;\n\n\t\tconst n11 = te[ 0 ], n12 = te[ 4 ], n13 = te[ 8 ], n14 = te[ 12 ];\n\t\tconst n21 = te[ 1 ], n22 = te[ 5 ], n23 = te[ 9 ], n24 = te[ 13 ];\n\t\tconst n31 = te[ 2 ], n32 = te[ 6 ], n33 = te[ 10 ], n34 = te[ 14 ];\n\t\tconst n41 = te[ 3 ], n42 = te[ 7 ], n43 = te[ 11 ], n44 = te[ 15 ];\n\n\t\t//TODO: make this more efficient\n\t\t//( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )\n\n\t\treturn (\n\t\t\tn41 * (\n\t\t\t\t+ n14 * n23 * n32\n\t\t\t\t - n13 * n24 * n32\n\t\t\t\t - n14 * n22 * n33\n\t\t\t\t + n12 * n24 * n33\n\t\t\t\t + n13 * n22 * n34\n\t\t\t\t - n12 * n23 * n34\n\t\t\t) +\n\t\t\tn42 * (\n\t\t\t\t+ n11 * n23 * n34\n\t\t\t\t - n11 * n24 * n33\n\t\t\t\t + n14 * n21 * n33\n\t\t\t\t - n13 * n21 * n34\n\t\t\t\t + n13 * n24 * n31\n\t\t\t\t - n14 * n23 * n31\n\t\t\t) +\n\t\t\tn43 * (\n\t\t\t\t+ n11 * n24 * n32\n\t\t\t\t - n11 * n22 * n34\n\t\t\t\t - n14 * n21 * n32\n\t\t\t\t + n12 * n21 * n34\n\t\t\t\t + n14 * n22 * n31\n\t\t\t\t - n12 * n24 * n31\n\t\t\t) +\n\t\t\tn44 * (\n\t\t\t\t- n13 * n22 * n31\n\t\t\t\t - n11 * n23 * n32\n\t\t\t\t + n11 * n22 * n33\n\t\t\t\t + n13 * n21 * n32\n\t\t\t\t - n12 * n21 * n33\n\t\t\t\t + n12 * n23 * n31\n\t\t\t)\n\n\t\t);\n\n\t}\n\n\ttranspose() {\n\n\t\tconst te = this.elements;\n\t\tlet tmp;\n\n\t\ttmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp;\n\t\ttmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp;\n\t\ttmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp;\n\n\t\ttmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp;\n\t\ttmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp;\n\t\ttmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp;\n\n\t\treturn this;\n\n\t}\n\n\tsetPosition( x, y, z ) {\n\n\t\tconst te = this.elements;\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\tte[ 12 ] = x.x;\n\t\t\tte[ 13 ] = x.y;\n\t\t\tte[ 14 ] = x.z;\n\n\t\t} else {\n\n\t\t\tte[ 12 ] = x;\n\t\t\tte[ 13 ] = y;\n\t\t\tte[ 14 ] = z;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tinvert() {\n\n\t\t// based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n\t\tconst te = this.elements,\n\n\t\t\tn11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], n41 = te[ 3 ],\n\t\t\tn12 = te[ 4 ], n22 = te[ 5 ], n32 = te[ 6 ], n42 = te[ 7 ],\n\t\t\tn13 = te[ 8 ], n23 = te[ 9 ], n33 = te[ 10 ], n43 = te[ 11 ],\n\t\t\tn14 = te[ 12 ], n24 = te[ 13 ], n34 = te[ 14 ], n44 = te[ 15 ],\n\n\t\t\tt11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44,\n\t\t\tt12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44,\n\t\t\tt13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44,\n\t\t\tt14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n\n\t\tconst det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\n\n\t\tif ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );\n\n\t\tconst detInv = 1 / det;\n\n\t\tte[ 0 ] = t11 * detInv;\n\t\tte[ 1 ] = ( n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44 ) * detInv;\n\t\tte[ 2 ] = ( n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44 ) * detInv;\n\t\tte[ 3 ] = ( n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43 ) * detInv;\n\n\t\tte[ 4 ] = t12 * detInv;\n\t\tte[ 5 ] = ( n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44 ) * detInv;\n\t\tte[ 6 ] = ( n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44 ) * detInv;\n\t\tte[ 7 ] = ( n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43 ) * detInv;\n\n\t\tte[ 8 ] = t13 * detInv;\n\t\tte[ 9 ] = ( n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44 ) * detInv;\n\t\tte[ 10 ] = ( n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44 ) * detInv;\n\t\tte[ 11 ] = ( n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43 ) * detInv;\n\n\t\tte[ 12 ] = t14 * detInv;\n\t\tte[ 13 ] = ( n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34 ) * detInv;\n\t\tte[ 14 ] = ( n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34 ) * detInv;\n\t\tte[ 15 ] = ( n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33 ) * detInv;\n\n\t\treturn this;\n\n\t}\n\n\tscale( v ) {\n\n\t\tconst te = this.elements;\n\t\tconst x = v.x, y = v.y, z = v.z;\n\n\t\tte[ 0 ] *= x; te[ 4 ] *= y; te[ 8 ] *= z;\n\t\tte[ 1 ] *= x; te[ 5 ] *= y; te[ 9 ] *= z;\n\t\tte[ 2 ] *= x; te[ 6 ] *= y; te[ 10 ] *= z;\n\t\tte[ 3 ] *= x; te[ 7 ] *= y; te[ 11 ] *= z;\n\n\t\treturn this;\n\n\t}\n\n\tgetMaxScaleOnAxis() {\n\n\t\tconst te = this.elements;\n\n\t\tconst scaleXSq = te[ 0 ] * te[ 0 ] + te[ 1 ] * te[ 1 ] + te[ 2 ] * te[ 2 ];\n\t\tconst scaleYSq = te[ 4 ] * te[ 4 ] + te[ 5 ] * te[ 5 ] + te[ 6 ] * te[ 6 ];\n\t\tconst scaleZSq = te[ 8 ] * te[ 8 ] + te[ 9 ] * te[ 9 ] + te[ 10 ] * te[ 10 ];\n\n\t\treturn Math.sqrt( Math.max( scaleXSq, scaleYSq, scaleZSq ) );\n\n\t}\n\n\tmakeTranslation( x, y, z ) {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, x,\n\t\t\t0, 1, 0, y,\n\t\t\t0, 0, 1, z,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationX( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, c, - s, 0,\n\t\t\t0, s, c, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationY( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\t c, 0, s, 0,\n\t\t\t 0, 1, 0, 0,\n\t\t\t- s, 0, c, 0,\n\t\t\t 0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationZ( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\tc, - s, 0, 0,\n\t\t\ts, c, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationAxis( axis, angle ) {\n\n\t\t// Based on http://www.gamedev.net/reference/articles/article1199.asp\n\n\t\tconst c = Math.cos( angle );\n\t\tconst s = Math.sin( angle );\n\t\tconst t = 1 - c;\n\t\tconst x = axis.x, y = axis.y, z = axis.z;\n\t\tconst tx = t * x, ty = t * y;\n\n\t\tthis.set(\n\n\t\t\ttx * x + c, tx * y - s * z, tx * z + s * y, 0,\n\t\t\ttx * y + s * z, ty * y + c, ty * z - s * x, 0,\n\t\t\ttx * z - s * y, ty * z + s * x, t * z * z + c, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeScale( x, y, z ) {\n\n\t\tthis.set(\n\n\t\t\tx, 0, 0, 0,\n\t\t\t0, y, 0, 0,\n\t\t\t0, 0, z, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeShear( xy, xz, yx, yz, zx, zy ) {\n\n\t\tthis.set(\n\n\t\t\t1, yx, zx, 0,\n\t\t\txy, 1, zy, 0,\n\t\t\txz, yz, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tcompose( position, quaternion, scale ) {\n\n\t\tconst te = this.elements;\n\n\t\tconst x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;\n\t\tconst x2 = x + x,\ty2 = y + y, z2 = z + z;\n\t\tconst xx = x * x2, xy = x * y2, xz = x * z2;\n\t\tconst yy = y * y2, yz = y * z2, zz = z * z2;\n\t\tconst wx = w * x2, wy = w * y2, wz = w * z2;\n\n\t\tconst sx = scale.x, sy = scale.y, sz = scale.z;\n\n\t\tte[ 0 ] = ( 1 - ( yy + zz ) ) * sx;\n\t\tte[ 1 ] = ( xy + wz ) * sx;\n\t\tte[ 2 ] = ( xz - wy ) * sx;\n\t\tte[ 3 ] = 0;\n\n\t\tte[ 4 ] = ( xy - wz ) * sy;\n\t\tte[ 5 ] = ( 1 - ( xx + zz ) ) * sy;\n\t\tte[ 6 ] = ( yz + wx ) * sy;\n\t\tte[ 7 ] = 0;\n\n\t\tte[ 8 ] = ( xz + wy ) * sz;\n\t\tte[ 9 ] = ( yz - wx ) * sz;\n\t\tte[ 10 ] = ( 1 - ( xx + yy ) ) * sz;\n\t\tte[ 11 ] = 0;\n\n\t\tte[ 12 ] = position.x;\n\t\tte[ 13 ] = position.y;\n\t\tte[ 14 ] = position.z;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tdecompose( position, quaternion, scale ) {\n\n\t\tconst te = this.elements;\n\n\t\tlet sx = _v1$5.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length();\n\t\tconst sy = _v1$5.set( te[ 4 ], te[ 5 ], te[ 6 ] ).length();\n\t\tconst sz = _v1$5.set( te[ 8 ], te[ 9 ], te[ 10 ] ).length();\n\n\t\t// if determine is negative, we need to invert one scale\n\t\tconst det = this.determinant();\n\t\tif ( det < 0 ) sx = - sx;\n\n\t\tposition.x = te[ 12 ];\n\t\tposition.y = te[ 13 ];\n\t\tposition.z = te[ 14 ];\n\n\t\t// scale the rotation part\n\t\t_m1$2.copy( this );\n\n\t\tconst invSX = 1 / sx;\n\t\tconst invSY = 1 / sy;\n\t\tconst invSZ = 1 / sz;\n\n\t\t_m1$2.elements[ 0 ] *= invSX;\n\t\t_m1$2.elements[ 1 ] *= invSX;\n\t\t_m1$2.elements[ 2 ] *= invSX;\n\n\t\t_m1$2.elements[ 4 ] *= invSY;\n\t\t_m1$2.elements[ 5 ] *= invSY;\n\t\t_m1$2.elements[ 6 ] *= invSY;\n\n\t\t_m1$2.elements[ 8 ] *= invSZ;\n\t\t_m1$2.elements[ 9 ] *= invSZ;\n\t\t_m1$2.elements[ 10 ] *= invSZ;\n\n\t\tquaternion.setFromRotationMatrix( _m1$2 );\n\n\t\tscale.x = sx;\n\t\tscale.y = sy;\n\t\tscale.z = sz;\n\n\t\treturn this;\n\n\t}\n\n\tmakePerspective( left, right, top, bottom, near, far ) {\n\n\t\tif ( far === undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.' );\n\n\t\t}\n\n\t\tconst te = this.elements;\n\t\tconst x = 2 * near / ( right - left );\n\t\tconst y = 2 * near / ( top - bottom );\n\n\t\tconst a = ( right + left ) / ( right - left );\n\t\tconst b = ( top + bottom ) / ( top - bottom );\n\t\tconst c = - ( far + near ) / ( far - near );\n\t\tconst d = - 2 * far * near / ( far - near );\n\n\t\tte[ 0 ] = x;\tte[ 4 ] = 0;\tte[ 8 ] = a;\tte[ 12 ] = 0;\n\t\tte[ 1 ] = 0;\tte[ 5 ] = y;\tte[ 9 ] = b;\tte[ 13 ] = 0;\n\t\tte[ 2 ] = 0;\tte[ 6 ] = 0;\tte[ 10 ] = c;\tte[ 14 ] = d;\n\t\tte[ 3 ] = 0;\tte[ 7 ] = 0;\tte[ 11 ] = - 1;\tte[ 15 ] = 0;\n\n\t\treturn this;\n\n\t}\n\n\tmakeOrthographic( left, right, top, bottom, near, far ) {\n\n\t\tconst te = this.elements;\n\t\tconst w = 1.0 / ( right - left );\n\t\tconst h = 1.0 / ( top - bottom );\n\t\tconst p = 1.0 / ( far - near );\n\n\t\tconst x = ( right + left ) * w;\n\t\tconst y = ( top + bottom ) * h;\n\t\tconst z = ( far + near ) * p;\n\n\t\tte[ 0 ] = 2 * w;\tte[ 4 ] = 0;\tte[ 8 ] = 0;\tte[ 12 ] = - x;\n\t\tte[ 1 ] = 0;\tte[ 5 ] = 2 * h;\tte[ 9 ] = 0;\tte[ 13 ] = - y;\n\t\tte[ 2 ] = 0;\tte[ 6 ] = 0;\tte[ 10 ] = - 2 * p;\tte[ 14 ] = - z;\n\t\tte[ 3 ] = 0;\tte[ 7 ] = 0;\tte[ 11 ] = 0;\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tequals( matrix ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = matrix.elements;\n\n\t\tfor ( let i = 0; i < 16; i ++ ) {\n\n\t\t\tif ( te[ i ] !== me[ i ] ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tfor ( let i = 0; i < 16; i ++ ) {\n\n\t\t\tthis.elements[ i ] = array[ i + offset ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst te = this.elements;\n\n\t\tarray[ offset ] = te[ 0 ];\n\t\tarray[ offset + 1 ] = te[ 1 ];\n\t\tarray[ offset + 2 ] = te[ 2 ];\n\t\tarray[ offset + 3 ] = te[ 3 ];\n\n\t\tarray[ offset + 4 ] = te[ 4 ];\n\t\tarray[ offset + 5 ] = te[ 5 ];\n\t\tarray[ offset + 6 ] = te[ 6 ];\n\t\tarray[ offset + 7 ] = te[ 7 ];\n\n\t\tarray[ offset + 8 ] = te[ 8 ];\n\t\tarray[ offset + 9 ] = te[ 9 ];\n\t\tarray[ offset + 10 ] = te[ 10 ];\n\t\tarray[ offset + 11 ] = te[ 11 ];\n\n\t\tarray[ offset + 12 ] = te[ 12 ];\n\t\tarray[ offset + 13 ] = te[ 13 ];\n\t\tarray[ offset + 14 ] = te[ 14 ];\n\t\tarray[ offset + 15 ] = te[ 15 ];\n\n\t\treturn array;\n\n\t}\n\n}\n\nMatrix4.prototype.isMatrix4 = true;\n\nconst _v1$5 = /*@__PURE__*/ new Vector3();\nconst _m1$2 = /*@__PURE__*/ new Matrix4();\nconst _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 );\nconst _one = /*@__PURE__*/ new Vector3( 1, 1, 1 );\nconst _x = /*@__PURE__*/ new Vector3();\nconst _y = /*@__PURE__*/ new Vector3();\nconst _z = /*@__PURE__*/ new Vector3();\n\nconst _matrix$1 = /*@__PURE__*/ new Matrix4();\nconst _quaternion$3 = /*@__PURE__*/ new Quaternion();\n\nclass Euler {\n\n\tconstructor( x = 0, y = 0, z = 0, order = Euler.DefaultOrder ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._order = order;\n\n\t}\n\n\tget x() {\n\n\t\treturn this._x;\n\n\t}\n\n\tset x( value ) {\n\n\t\tthis._x = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget y() {\n\n\t\treturn this._y;\n\n\t}\n\n\tset y( value ) {\n\n\t\tthis._y = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget z() {\n\n\t\treturn this._z;\n\n\t}\n\n\tset z( value ) {\n\n\t\tthis._z = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget order() {\n\n\t\treturn this._order;\n\n\t}\n\n\tset order( value ) {\n\n\t\tthis._order = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tset( x, y, z, order = this._order ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._order = order;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this._x, this._y, this._z, this._order );\n\n\t}\n\n\tcopy( euler ) {\n\n\t\tthis._x = euler._x;\n\t\tthis._y = euler._y;\n\t\tthis._z = euler._z;\n\t\tthis._order = euler._order;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromRotationMatrix( m, order = this._order, update = true ) {\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tconst te = m.elements;\n\t\tconst m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ];\n\t\tconst m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ];\n\t\tconst m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];\n\n\t\tswitch ( order ) {\n\n\t\t\tcase 'XYZ':\n\n\t\t\t\tthis._y = Math.asin( clamp( m13, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m13 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m33 );\n\t\t\t\t\tthis._z = Math.atan2( - m12, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m22 );\n\t\t\t\t\tthis._z = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'YXZ':\n\n\t\t\t\tthis._x = Math.asin( - clamp( m23, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m23 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._y = Math.atan2( m13, m33 );\n\t\t\t\t\tthis._z = Math.atan2( m21, m22 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._y = Math.atan2( - m31, m11 );\n\t\t\t\t\tthis._z = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZXY':\n\n\t\t\t\tthis._x = Math.asin( clamp( m32, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m32 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._y = Math.atan2( - m31, m33 );\n\t\t\t\t\tthis._z = Math.atan2( - m12, m22 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._y = 0;\n\t\t\t\t\tthis._z = Math.atan2( m21, m11 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZYX':\n\n\t\t\t\tthis._y = Math.asin( - clamp( m31, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m31 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m33 );\n\t\t\t\t\tthis._z = Math.atan2( m21, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._z = Math.atan2( - m12, m22 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'YZX':\n\n\t\t\t\tthis._z = Math.asin( clamp( m21, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m21 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m22 );\n\t\t\t\t\tthis._y = Math.atan2( - m31, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._y = Math.atan2( m13, m33 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'XZY':\n\n\t\t\t\tthis._z = Math.asin( - clamp( m12, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m12 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m22 );\n\t\t\t\t\tthis._y = Math.atan2( m13, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m33 );\n\t\t\t\t\tthis._y = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tconsole.warn( 'THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order );\n\n\t\t}\n\n\t\tthis._order = order;\n\n\t\tif ( update === true ) this._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromQuaternion( q, order, update ) {\n\n\t\t_matrix$1.makeRotationFromQuaternion( q );\n\n\t\treturn this.setFromRotationMatrix( _matrix$1, order, update );\n\n\t}\n\n\tsetFromVector3( v, order = this._order ) {\n\n\t\treturn this.set( v.x, v.y, v.z, order );\n\n\t}\n\n\treorder( newOrder ) {\n\n\t\t// WARNING: this discards revolution information -bhouston\n\n\t\t_quaternion$3.setFromEuler( this );\n\n\t\treturn this.setFromQuaternion( _quaternion$3, newOrder );\n\n\t}\n\n\tequals( euler ) {\n\n\t\treturn ( euler._x === this._x ) && ( euler._y === this._y ) && ( euler._z === this._z ) && ( euler._order === this._order );\n\n\t}\n\n\tfromArray( array ) {\n\n\t\tthis._x = array[ 0 ];\n\t\tthis._y = array[ 1 ];\n\t\tthis._z = array[ 2 ];\n\t\tif ( array[ 3 ] !== undefined ) this._order = array[ 3 ];\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this._x;\n\t\tarray[ offset + 1 ] = this._y;\n\t\tarray[ offset + 2 ] = this._z;\n\t\tarray[ offset + 3 ] = this._order;\n\n\t\treturn array;\n\n\t}\n\n\ttoVector3( optionalResult ) {\n\n\t\tif ( optionalResult ) {\n\n\t\t\treturn optionalResult.set( this._x, this._y, this._z );\n\n\t\t} else {\n\n\t\t\treturn new Vector3( this._x, this._y, this._z );\n\n\t\t}\n\n\t}\n\n\t_onChange( callback ) {\n\n\t\tthis._onChangeCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\t_onChangeCallback() {}\n\n}\n\nEuler.prototype.isEuler = true;\n\nEuler.DefaultOrder = 'XYZ';\nEuler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];\n\nclass Layers {\n\n\tconstructor() {\n\n\t\tthis.mask = 1 | 0;\n\n\t}\n\n\tset( channel ) {\n\n\t\tthis.mask = 1 << channel | 0;\n\n\t}\n\n\tenable( channel ) {\n\n\t\tthis.mask |= 1 << channel | 0;\n\n\t}\n\n\tenableAll() {\n\n\t\tthis.mask = 0xffffffff | 0;\n\n\t}\n\n\ttoggle( channel ) {\n\n\t\tthis.mask ^= 1 << channel | 0;\n\n\t}\n\n\tdisable( channel ) {\n\n\t\tthis.mask &= ~ ( 1 << channel | 0 );\n\n\t}\n\n\tdisableAll() {\n\n\t\tthis.mask = 0;\n\n\t}\n\n\ttest( layers ) {\n\n\t\treturn ( this.mask & layers.mask ) !== 0;\n\n\t}\n\n}\n\nlet _object3DId = 0;\n\nconst _v1$4 = /*@__PURE__*/ new Vector3();\nconst _q1 = /*@__PURE__*/ new Quaternion();\nconst _m1$1 = /*@__PURE__*/ new Matrix4();\nconst _target = /*@__PURE__*/ new Vector3();\n\nconst _position$3 = /*@__PURE__*/ new Vector3();\nconst _scale$2 = /*@__PURE__*/ new Vector3();\nconst _quaternion$2 = /*@__PURE__*/ new Quaternion();\n\nconst _xAxis = /*@__PURE__*/ new Vector3( 1, 0, 0 );\nconst _yAxis = /*@__PURE__*/ new Vector3( 0, 1, 0 );\nconst _zAxis = /*@__PURE__*/ new Vector3( 0, 0, 1 );\n\nconst _addedEvent = { type: 'added' };\nconst _removedEvent = { type: 'removed' };\n\nclass Object3D extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tObject.defineProperty( this, 'id', { value: _object3DId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Object3D';\n\n\t\tthis.parent = null;\n\t\tthis.children = [];\n\n\t\tthis.up = Object3D.DefaultUp.clone();\n\n\t\tconst position = new Vector3();\n\t\tconst rotation = new Euler();\n\t\tconst quaternion = new Quaternion();\n\t\tconst scale = new Vector3( 1, 1, 1 );\n\n\t\tfunction onRotationChange() {\n\n\t\t\tquaternion.setFromEuler( rotation, false );\n\n\t\t}\n\n\t\tfunction onQuaternionChange() {\n\n\t\t\trotation.setFromQuaternion( quaternion, undefined, false );\n\n\t\t}\n\n\t\trotation._onChange( onRotationChange );\n\t\tquaternion._onChange( onQuaternionChange );\n\n\t\tObject.defineProperties( this, {\n\t\t\tposition: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: position\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: rotation\n\t\t\t},\n\t\t\tquaternion: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: quaternion\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: scale\n\t\t\t},\n\t\t\tmodelViewMatrix: {\n\t\t\t\tvalue: new Matrix4()\n\t\t\t},\n\t\t\tnormalMatrix: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t} );\n\n\t\tthis.matrix = new Matrix4();\n\t\tthis.matrixWorld = new Matrix4();\n\n\t\tthis.matrixAutoUpdate = Object3D.DefaultMatrixAutoUpdate;\n\t\tthis.matrixWorldNeedsUpdate = false;\n\n\t\tthis.layers = new Layers();\n\t\tthis.visible = true;\n\n\t\tthis.castShadow = false;\n\t\tthis.receiveShadow = false;\n\n\t\tthis.frustumCulled = true;\n\t\tthis.renderOrder = 0;\n\n\t\tthis.animations = [];\n\n\t\tthis.userData = {};\n\n\t}\n\n\tonBeforeRender() {}\n\tonAfterRender() {}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tthis.matrix.premultiply( matrix );\n\n\t\tthis.matrix.decompose( this.position, this.quaternion, this.scale );\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\tthis.quaternion.premultiply( q );\n\n\t\treturn this;\n\n\t}\n\n\tsetRotationFromAxisAngle( axis, angle ) {\n\n\t\t// assumes axis is normalized\n\n\t\tthis.quaternion.setFromAxisAngle( axis, angle );\n\n\t}\n\n\tsetRotationFromEuler( euler ) {\n\n\t\tthis.quaternion.setFromEuler( euler, true );\n\n\t}\n\n\tsetRotationFromMatrix( m ) {\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tthis.quaternion.setFromRotationMatrix( m );\n\n\t}\n\n\tsetRotationFromQuaternion( q ) {\n\n\t\t// assumes q is normalized\n\n\t\tthis.quaternion.copy( q );\n\n\t}\n\n\trotateOnAxis( axis, angle ) {\n\n\t\t// rotate object on axis in object space\n\t\t// axis is assumed to be normalized\n\n\t\t_q1.setFromAxisAngle( axis, angle );\n\n\t\tthis.quaternion.multiply( _q1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateOnWorldAxis( axis, angle ) {\n\n\t\t// rotate object on axis in world space\n\t\t// axis is assumed to be normalized\n\t\t// method assumes no rotated parent\n\n\t\t_q1.setFromAxisAngle( axis, angle );\n\n\t\tthis.quaternion.premultiply( _q1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateX( angle ) {\n\n\t\treturn this.rotateOnAxis( _xAxis, angle );\n\n\t}\n\n\trotateY( angle ) {\n\n\t\treturn this.rotateOnAxis( _yAxis, angle );\n\n\t}\n\n\trotateZ( angle ) {\n\n\t\treturn this.rotateOnAxis( _zAxis, angle );\n\n\t}\n\n\ttranslateOnAxis( axis, distance ) {\n\n\t\t// translate object by distance along axis in object space\n\t\t// axis is assumed to be normalized\n\n\t\t_v1$4.copy( axis ).applyQuaternion( this.quaternion );\n\n\t\tthis.position.add( _v1$4.multiplyScalar( distance ) );\n\n\t\treturn this;\n\n\t}\n\n\ttranslateX( distance ) {\n\n\t\treturn this.translateOnAxis( _xAxis, distance );\n\n\t}\n\n\ttranslateY( distance ) {\n\n\t\treturn this.translateOnAxis( _yAxis, distance );\n\n\t}\n\n\ttranslateZ( distance ) {\n\n\t\treturn this.translateOnAxis( _zAxis, distance );\n\n\t}\n\n\tlocalToWorld( vector ) {\n\n\t\treturn vector.applyMatrix4( this.matrixWorld );\n\n\t}\n\n\tworldToLocal( vector ) {\n\n\t\treturn vector.applyMatrix4( _m1$1.copy( this.matrixWorld ).invert() );\n\n\t}\n\n\tlookAt( x, y, z ) {\n\n\t\t// This method does not support objects having non-uniformly-scaled parent(s)\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\t_target.copy( x );\n\n\t\t} else {\n\n\t\t\t_target.set( x, y, z );\n\n\t\t}\n\n\t\tconst parent = this.parent;\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\t_position$3.setFromMatrixPosition( this.matrixWorld );\n\n\t\tif ( this.isCamera || this.isLight ) {\n\n\t\t\t_m1$1.lookAt( _position$3, _target, this.up );\n\n\t\t} else {\n\n\t\t\t_m1$1.lookAt( _target, _position$3, this.up );\n\n\t\t}\n\n\t\tthis.quaternion.setFromRotationMatrix( _m1$1 );\n\n\t\tif ( parent ) {\n\n\t\t\t_m1$1.extractRotation( parent.matrixWorld );\n\t\t\t_q1.setFromRotationMatrix( _m1$1 );\n\t\t\tthis.quaternion.premultiply( _q1.invert() );\n\n\t\t}\n\n\t}\n\n\tadd( object ) {\n\n\t\tif ( arguments.length > 1 ) {\n\n\t\t\tfor ( let i = 0; i < arguments.length; i ++ ) {\n\n\t\t\t\tthis.add( arguments[ i ] );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( object === this ) {\n\n\t\t\tconsole.error( 'THREE.Object3D.add: object can\\'t be added as a child of itself.', object );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( object && object.isObject3D ) {\n\n\t\t\tif ( object.parent !== null ) {\n\n\t\t\t\tobject.parent.remove( object );\n\n\t\t\t}\n\n\t\t\tobject.parent = this;\n\t\t\tthis.children.push( object );\n\n\t\t\tobject.dispatchEvent( _addedEvent );\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Object3D.add: object not an instance of THREE.Object3D.', object );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremove( object ) {\n\n\t\tif ( arguments.length > 1 ) {\n\n\t\t\tfor ( let i = 0; i < arguments.length; i ++ ) {\n\n\t\t\t\tthis.remove( arguments[ i ] );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst index = this.children.indexOf( object );\n\n\t\tif ( index !== - 1 ) {\n\n\t\t\tobject.parent = null;\n\t\t\tthis.children.splice( index, 1 );\n\n\t\t\tobject.dispatchEvent( _removedEvent );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremoveFromParent() {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( parent !== null ) {\n\n\t\t\tparent.remove( this );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclear() {\n\n\t\tfor ( let i = 0; i < this.children.length; i ++ ) {\n\n\t\t\tconst object = this.children[ i ];\n\n\t\t\tobject.parent = null;\n\n\t\t\tobject.dispatchEvent( _removedEvent );\n\n\t\t}\n\n\t\tthis.children.length = 0;\n\n\t\treturn this;\n\n\n\t}\n\n\tattach( object ) {\n\n\t\t// adds object as a child of this, while maintaining the object's world transform\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\t_m1$1.copy( this.matrixWorld ).invert();\n\n\t\tif ( object.parent !== null ) {\n\n\t\t\tobject.parent.updateWorldMatrix( true, false );\n\n\t\t\t_m1$1.multiply( object.parent.matrixWorld );\n\n\t\t}\n\n\t\tobject.applyMatrix4( _m1$1 );\n\n\t\tthis.add( object );\n\n\t\tobject.updateWorldMatrix( false, true );\n\n\t\treturn this;\n\n\t}\n\n\tgetObjectById( id ) {\n\n\t\treturn this.getObjectByProperty( 'id', id );\n\n\t}\n\n\tgetObjectByName( name ) {\n\n\t\treturn this.getObjectByProperty( 'name', name );\n\n\t}\n\n\tgetObjectByProperty( name, value ) {\n\n\t\tif ( this[ name ] === value ) return this;\n\n\t\tfor ( let i = 0, l = this.children.length; i < l; i ++ ) {\n\n\t\t\tconst child = this.children[ i ];\n\t\t\tconst object = child.getObjectByProperty( name, value );\n\n\t\t\tif ( object !== undefined ) {\n\n\t\t\t\treturn object;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn undefined;\n\n\t}\n\n\tgetWorldPosition( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\treturn target.setFromMatrixPosition( this.matrixWorld );\n\n\t}\n\n\tgetWorldQuaternion( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tthis.matrixWorld.decompose( _position$3, target, _scale$2 );\n\n\t\treturn target;\n\n\t}\n\n\tgetWorldScale( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tthis.matrixWorld.decompose( _position$3, _quaternion$2, target );\n\n\t\treturn target;\n\n\t}\n\n\tgetWorldDirection( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tconst e = this.matrixWorld.elements;\n\n\t\treturn target.set( e[ 8 ], e[ 9 ], e[ 10 ] ).normalize();\n\n\t}\n\n\traycast() {}\n\n\ttraverse( callback ) {\n\n\t\tcallback( this );\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].traverse( callback );\n\n\t\t}\n\n\t}\n\n\ttraverseVisible( callback ) {\n\n\t\tif ( this.visible === false ) return;\n\n\t\tcallback( this );\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].traverseVisible( callback );\n\n\t\t}\n\n\t}\n\n\ttraverseAncestors( callback ) {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( parent !== null ) {\n\n\t\t\tcallback( parent );\n\n\t\t\tparent.traverseAncestors( callback );\n\n\t\t}\n\n\t}\n\n\tupdateMatrix() {\n\n\t\tthis.matrix.compose( this.position, this.quaternion, this.scale );\n\n\t\tthis.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tif ( this.matrixWorldNeedsUpdate || force ) {\n\n\t\t\tif ( this.parent === null ) {\n\n\t\t\t\tthis.matrixWorld.copy( this.matrix );\n\n\t\t\t} else {\n\n\t\t\t\tthis.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );\n\n\t\t\t}\n\n\t\t\tthis.matrixWorldNeedsUpdate = false;\n\n\t\t\tforce = true;\n\n\t\t}\n\n\t\t// update children\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].updateMatrixWorld( force );\n\n\t\t}\n\n\t}\n\n\tupdateWorldMatrix( updateParents, updateChildren ) {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( updateParents === true && parent !== null ) {\n\n\t\t\tparent.updateWorldMatrix( true, false );\n\n\t\t}\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tif ( this.parent === null ) {\n\n\t\t\tthis.matrixWorld.copy( this.matrix );\n\n\t\t} else {\n\n\t\t\tthis.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );\n\n\t\t}\n\n\t\t// update children\n\n\t\tif ( updateChildren === true ) {\n\n\t\t\tconst children = this.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tchildren[ i ].updateWorldMatrix( false, true );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\t// meta is a string when called from JSON.stringify\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tconst output = {};\n\n\t\t// meta is a hash used to collect geometries, materials.\n\t\t// not providing it implies that this is the root object\n\t\t// being serialized.\n\t\tif ( isRootObject ) {\n\n\t\t\t// initialize meta obj\n\t\t\tmeta = {\n\t\t\t\tgeometries: {},\n\t\t\t\tmaterials: {},\n\t\t\t\ttextures: {},\n\t\t\t\timages: {},\n\t\t\t\tshapes: {},\n\t\t\t\tskeletons: {},\n\t\t\t\tanimations: {}\n\t\t\t};\n\n\t\t\toutput.metadata = {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Object',\n\t\t\t\tgenerator: 'Object3D.toJSON'\n\t\t\t};\n\n\t\t}\n\n\t\t// standard Object3D serialization\n\n\t\tconst object = {};\n\n\t\tobject.uuid = this.uuid;\n\t\tobject.type = this.type;\n\n\t\tif ( this.name !== '' ) object.name = this.name;\n\t\tif ( this.castShadow === true ) object.castShadow = true;\n\t\tif ( this.receiveShadow === true ) object.receiveShadow = true;\n\t\tif ( this.visible === false ) object.visible = false;\n\t\tif ( this.frustumCulled === false ) object.frustumCulled = false;\n\t\tif ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder;\n\t\tif ( JSON.stringify( this.userData ) !== '{}' ) object.userData = this.userData;\n\n\t\tobject.layers = this.layers.mask;\n\t\tobject.matrix = this.matrix.toArray();\n\n\t\tif ( this.matrixAutoUpdate === false ) object.matrixAutoUpdate = false;\n\n\t\t// object specific properties\n\n\t\tif ( this.isInstancedMesh ) {\n\n\t\t\tobject.type = 'InstancedMesh';\n\t\t\tobject.count = this.count;\n\t\t\tobject.instanceMatrix = this.instanceMatrix.toJSON();\n\t\t\tif ( this.instanceColor !== null ) object.instanceColor = this.instanceColor.toJSON();\n\n\t\t}\n\n\t\t//\n\n\t\tfunction serialize( library, element ) {\n\n\t\t\tif ( library[ element.uuid ] === undefined ) {\n\n\t\t\t\tlibrary[ element.uuid ] = element.toJSON( meta );\n\n\t\t\t}\n\n\t\t\treturn element.uuid;\n\n\t\t}\n\n\t\tif ( this.isScene ) {\n\n\t\t\tif ( this.background ) {\n\n\t\t\t\tif ( this.background.isColor ) {\n\n\t\t\t\t\tobject.background = this.background.toJSON();\n\n\t\t\t\t} else if ( this.background.isTexture ) {\n\n\t\t\t\t\tobject.background = this.background.toJSON( meta ).uuid;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( this.environment && this.environment.isTexture ) {\n\n\t\t\t\tobject.environment = this.environment.toJSON( meta ).uuid;\n\n\t\t\t}\n\n\t\t} else if ( this.isMesh || this.isLine || this.isPoints ) {\n\n\t\t\tobject.geometry = serialize( meta.geometries, this.geometry );\n\n\t\t\tconst parameters = this.geometry.parameters;\n\n\t\t\tif ( parameters !== undefined && parameters.shapes !== undefined ) {\n\n\t\t\t\tconst shapes = parameters.shapes;\n\n\t\t\t\tif ( Array.isArray( shapes ) ) {\n\n\t\t\t\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\t\t\t\tconst shape = shapes[ i ];\n\n\t\t\t\t\t\tserialize( meta.shapes, shape );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tserialize( meta.shapes, shapes );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.isSkinnedMesh ) {\n\n\t\t\tobject.bindMode = this.bindMode;\n\t\t\tobject.bindMatrix = this.bindMatrix.toArray();\n\n\t\t\tif ( this.skeleton !== undefined ) {\n\n\t\t\t\tserialize( meta.skeletons, this.skeleton );\n\n\t\t\t\tobject.skeleton = this.skeleton.uuid;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.material !== undefined ) {\n\n\t\t\tif ( Array.isArray( this.material ) ) {\n\n\t\t\t\tconst uuids = [];\n\n\t\t\t\tfor ( let i = 0, l = this.material.length; i < l; i ++ ) {\n\n\t\t\t\t\tuuids.push( serialize( meta.materials, this.material[ i ] ) );\n\n\t\t\t\t}\n\n\t\t\t\tobject.material = uuids;\n\n\t\t\t} else {\n\n\t\t\t\tobject.material = serialize( meta.materials, this.material );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.children.length > 0 ) {\n\n\t\t\tobject.children = [];\n\n\t\t\tfor ( let i = 0; i < this.children.length; i ++ ) {\n\n\t\t\t\tobject.children.push( this.children[ i ].toJSON( meta ).object );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.animations.length > 0 ) {\n\n\t\t\tobject.animations = [];\n\n\t\t\tfor ( let i = 0; i < this.animations.length; i ++ ) {\n\n\t\t\t\tconst animation = this.animations[ i ];\n\n\t\t\t\tobject.animations.push( serialize( meta.animations, animation ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( isRootObject ) {\n\n\t\t\tconst geometries = extractFromCache( meta.geometries );\n\t\t\tconst materials = extractFromCache( meta.materials );\n\t\t\tconst textures = extractFromCache( meta.textures );\n\t\t\tconst images = extractFromCache( meta.images );\n\t\t\tconst shapes = extractFromCache( meta.shapes );\n\t\t\tconst skeletons = extractFromCache( meta.skeletons );\n\t\t\tconst animations = extractFromCache( meta.animations );\n\n\t\t\tif ( geometries.length > 0 ) output.geometries = geometries;\n\t\t\tif ( materials.length > 0 ) output.materials = materials;\n\t\t\tif ( textures.length > 0 ) output.textures = textures;\n\t\t\tif ( images.length > 0 ) output.images = images;\n\t\t\tif ( shapes.length > 0 ) output.shapes = shapes;\n\t\t\tif ( skeletons.length > 0 ) output.skeletons = skeletons;\n\t\t\tif ( animations.length > 0 ) output.animations = animations;\n\n\t\t}\n\n\t\toutput.object = object;\n\n\t\treturn output;\n\n\t\t// extract data from the cache hash\n\t\t// remove metadata on each item\n\t\t// and return as array\n\t\tfunction extractFromCache( cache ) {\n\n\t\t\tconst values = [];\n\t\t\tfor ( const key in cache ) {\n\n\t\t\t\tconst data = cache[ key ];\n\t\t\t\tdelete data.metadata;\n\t\t\t\tvalues.push( data );\n\n\t\t\t}\n\n\t\t\treturn values;\n\n\t\t}\n\n\t}\n\n\tclone( recursive ) {\n\n\t\treturn new this.constructor().copy( this, recursive );\n\n\t}\n\n\tcopy( source, recursive = true ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.up.copy( source.up );\n\n\t\tthis.position.copy( source.position );\n\t\tthis.rotation.order = source.rotation.order;\n\t\tthis.quaternion.copy( source.quaternion );\n\t\tthis.scale.copy( source.scale );\n\n\t\tthis.matrix.copy( source.matrix );\n\t\tthis.matrixWorld.copy( source.matrixWorld );\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\tthis.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;\n\n\t\tthis.layers.mask = source.layers.mask;\n\t\tthis.visible = source.visible;\n\n\t\tthis.castShadow = source.castShadow;\n\t\tthis.receiveShadow = source.receiveShadow;\n\n\t\tthis.frustumCulled = source.frustumCulled;\n\t\tthis.renderOrder = source.renderOrder;\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\tif ( recursive === true ) {\n\n\t\t\tfor ( let i = 0; i < source.children.length; i ++ ) {\n\n\t\t\t\tconst child = source.children[ i ];\n\t\t\t\tthis.add( child.clone() );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nObject3D.DefaultUp = new Vector3( 0, 1, 0 );\nObject3D.DefaultMatrixAutoUpdate = true;\n\nObject3D.prototype.isObject3D = true;\n\nconst _v0$1 = /*@__PURE__*/ new Vector3();\nconst _v1$3 = /*@__PURE__*/ new Vector3();\nconst _v2$2 = /*@__PURE__*/ new Vector3();\nconst _v3$1 = /*@__PURE__*/ new Vector3();\n\nconst _vab = /*@__PURE__*/ new Vector3();\nconst _vac = /*@__PURE__*/ new Vector3();\nconst _vbc = /*@__PURE__*/ new Vector3();\nconst _vap = /*@__PURE__*/ new Vector3();\nconst _vbp = /*@__PURE__*/ new Vector3();\nconst _vcp = /*@__PURE__*/ new Vector3();\n\nclass Triangle {\n\n\tconstructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) {\n\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t\tthis.c = c;\n\n\t}\n\n\tstatic getNormal( a, b, c, target ) {\n\n\t\ttarget.subVectors( c, b );\n\t\t_v0$1.subVectors( a, b );\n\t\ttarget.cross( _v0$1 );\n\n\t\tconst targetLengthSq = target.lengthSq();\n\t\tif ( targetLengthSq > 0 ) {\n\n\t\t\treturn target.multiplyScalar( 1 / Math.sqrt( targetLengthSq ) );\n\n\t\t}\n\n\t\treturn target.set( 0, 0, 0 );\n\n\t}\n\n\t// static/instance method to calculate barycentric coordinates\n\t// based on: http://www.blackpawn.com/texts/pointinpoly/default.html\n\tstatic getBarycoord( point, a, b, c, target ) {\n\n\t\t_v0$1.subVectors( c, a );\n\t\t_v1$3.subVectors( b, a );\n\t\t_v2$2.subVectors( point, a );\n\n\t\tconst dot00 = _v0$1.dot( _v0$1 );\n\t\tconst dot01 = _v0$1.dot( _v1$3 );\n\t\tconst dot02 = _v0$1.dot( _v2$2 );\n\t\tconst dot11 = _v1$3.dot( _v1$3 );\n\t\tconst dot12 = _v1$3.dot( _v2$2 );\n\n\t\tconst denom = ( dot00 * dot11 - dot01 * dot01 );\n\n\t\t// collinear or singular triangle\n\t\tif ( denom === 0 ) {\n\n\t\t\t// arbitrary location outside of triangle?\n\t\t\t// not sure if this is the best idea, maybe should be returning undefined\n\t\t\treturn target.set( - 2, - 1, - 1 );\n\n\t\t}\n\n\t\tconst invDenom = 1 / denom;\n\t\tconst u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom;\n\t\tconst v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom;\n\n\t\t// barycentric coordinates must always sum to 1\n\t\treturn target.set( 1 - u - v, v, u );\n\n\t}\n\n\tstatic containsPoint( point, a, b, c ) {\n\n\t\tthis.getBarycoord( point, a, b, c, _v3$1 );\n\n\t\treturn ( _v3$1.x >= 0 ) && ( _v3$1.y >= 0 ) && ( ( _v3$1.x + _v3$1.y ) <= 1 );\n\n\t}\n\n\tstatic getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) {\n\n\t\tthis.getBarycoord( point, p1, p2, p3, _v3$1 );\n\n\t\ttarget.set( 0, 0 );\n\t\ttarget.addScaledVector( uv1, _v3$1.x );\n\t\ttarget.addScaledVector( uv2, _v3$1.y );\n\t\ttarget.addScaledVector( uv3, _v3$1.z );\n\n\t\treturn target;\n\n\t}\n\n\tstatic isFrontFacing( a, b, c, direction ) {\n\n\t\t_v0$1.subVectors( c, b );\n\t\t_v1$3.subVectors( a, b );\n\n\t\t// strictly front facing\n\t\treturn ( _v0$1.cross( _v1$3 ).dot( direction ) < 0 ) ? true : false;\n\n\t}\n\n\tset( a, b, c ) {\n\n\t\tthis.a.copy( a );\n\t\tthis.b.copy( b );\n\t\tthis.c.copy( c );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPointsAndIndices( points, i0, i1, i2 ) {\n\n\t\tthis.a.copy( points[ i0 ] );\n\t\tthis.b.copy( points[ i1 ] );\n\t\tthis.c.copy( points[ i2 ] );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( triangle ) {\n\n\t\tthis.a.copy( triangle.a );\n\t\tthis.b.copy( triangle.b );\n\t\tthis.c.copy( triangle.c );\n\n\t\treturn this;\n\n\t}\n\n\tgetArea() {\n\n\t\t_v0$1.subVectors( this.c, this.b );\n\t\t_v1$3.subVectors( this.a, this.b );\n\n\t\treturn _v0$1.cross( _v1$3 ).length() * 0.5;\n\n\t}\n\n\tgetMidpoint( target ) {\n\n\t\treturn target.addVectors( this.a, this.b ).add( this.c ).multiplyScalar( 1 / 3 );\n\n\t}\n\n\tgetNormal( target ) {\n\n\t\treturn Triangle.getNormal( this.a, this.b, this.c, target );\n\n\t}\n\n\tgetPlane( target ) {\n\n\t\treturn target.setFromCoplanarPoints( this.a, this.b, this.c );\n\n\t}\n\n\tgetBarycoord( point, target ) {\n\n\t\treturn Triangle.getBarycoord( point, this.a, this.b, this.c, target );\n\n\t}\n\n\tgetUV( point, uv1, uv2, uv3, target ) {\n\n\t\treturn Triangle.getUV( point, this.a, this.b, this.c, uv1, uv2, uv3, target );\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn Triangle.containsPoint( point, this.a, this.b, this.c );\n\n\t}\n\n\tisFrontFacing( direction ) {\n\n\t\treturn Triangle.isFrontFacing( this.a, this.b, this.c, direction );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsTriangle( this );\n\n\t}\n\n\tclosestPointToPoint( p, target ) {\n\n\t\tconst a = this.a, b = this.b, c = this.c;\n\t\tlet v, w;\n\n\t\t// algorithm thanks to Real-Time Collision Detection by Christer Ericson,\n\t\t// published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc.,\n\t\t// under the accompanying license; see chapter 5.1.5 for detailed explanation.\n\t\t// basically, we're distinguishing which of the voronoi regions of the triangle\n\t\t// the point lies in with the minimum amount of redundant computation.\n\n\t\t_vab.subVectors( b, a );\n\t\t_vac.subVectors( c, a );\n\t\t_vap.subVectors( p, a );\n\t\tconst d1 = _vab.dot( _vap );\n\t\tconst d2 = _vac.dot( _vap );\n\t\tif ( d1 <= 0 && d2 <= 0 ) {\n\n\t\t\t// vertex region of A; barycentric coords (1, 0, 0)\n\t\t\treturn target.copy( a );\n\n\t\t}\n\n\t\t_vbp.subVectors( p, b );\n\t\tconst d3 = _vab.dot( _vbp );\n\t\tconst d4 = _vac.dot( _vbp );\n\t\tif ( d3 >= 0 && d4 <= d3 ) {\n\n\t\t\t// vertex region of B; barycentric coords (0, 1, 0)\n\t\t\treturn target.copy( b );\n\n\t\t}\n\n\t\tconst vc = d1 * d4 - d3 * d2;\n\t\tif ( vc <= 0 && d1 >= 0 && d3 <= 0 ) {\n\n\t\t\tv = d1 / ( d1 - d3 );\n\t\t\t// edge region of AB; barycentric coords (1-v, v, 0)\n\t\t\treturn target.copy( a ).addScaledVector( _vab, v );\n\n\t\t}\n\n\t\t_vcp.subVectors( p, c );\n\t\tconst d5 = _vab.dot( _vcp );\n\t\tconst d6 = _vac.dot( _vcp );\n\t\tif ( d6 >= 0 && d5 <= d6 ) {\n\n\t\t\t// vertex region of C; barycentric coords (0, 0, 1)\n\t\t\treturn target.copy( c );\n\n\t\t}\n\n\t\tconst vb = d5 * d2 - d1 * d6;\n\t\tif ( vb <= 0 && d2 >= 0 && d6 <= 0 ) {\n\n\t\t\tw = d2 / ( d2 - d6 );\n\t\t\t// edge region of AC; barycentric coords (1-w, 0, w)\n\t\t\treturn target.copy( a ).addScaledVector( _vac, w );\n\n\t\t}\n\n\t\tconst va = d3 * d6 - d5 * d4;\n\t\tif ( va <= 0 && ( d4 - d3 ) >= 0 && ( d5 - d6 ) >= 0 ) {\n\n\t\t\t_vbc.subVectors( c, b );\n\t\t\tw = ( d4 - d3 ) / ( ( d4 - d3 ) + ( d5 - d6 ) );\n\t\t\t// edge region of BC; barycentric coords (0, 1-w, w)\n\t\t\treturn target.copy( b ).addScaledVector( _vbc, w ); // edge region of BC\n\n\t\t}\n\n\t\t// face region\n\t\tconst denom = 1 / ( va + vb + vc );\n\t\t// u = va * denom\n\t\tv = vb * denom;\n\t\tw = vc * denom;\n\n\t\treturn target.copy( a ).addScaledVector( _vab, v ).addScaledVector( _vac, w );\n\n\t}\n\n\tequals( triangle ) {\n\n\t\treturn triangle.a.equals( this.a ) && triangle.b.equals( this.b ) && triangle.c.equals( this.c );\n\n\t}\n\n}\n\nlet materialId = 0;\n\nclass Material extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tObject.defineProperty( this, 'id', { value: materialId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Material';\n\n\t\tthis.fog = true;\n\n\t\tthis.blending = NormalBlending;\n\t\tthis.side = FrontSide;\n\t\tthis.vertexColors = false;\n\n\t\tthis.opacity = 1;\n\t\tthis.transparent = false;\n\n\t\tthis.blendSrc = SrcAlphaFactor;\n\t\tthis.blendDst = OneMinusSrcAlphaFactor;\n\t\tthis.blendEquation = AddEquation;\n\t\tthis.blendSrcAlpha = null;\n\t\tthis.blendDstAlpha = null;\n\t\tthis.blendEquationAlpha = null;\n\n\t\tthis.depthFunc = LessEqualDepth;\n\t\tthis.depthTest = true;\n\t\tthis.depthWrite = true;\n\n\t\tthis.stencilWriteMask = 0xff;\n\t\tthis.stencilFunc = AlwaysStencilFunc;\n\t\tthis.stencilRef = 0;\n\t\tthis.stencilFuncMask = 0xff;\n\t\tthis.stencilFail = KeepStencilOp;\n\t\tthis.stencilZFail = KeepStencilOp;\n\t\tthis.stencilZPass = KeepStencilOp;\n\t\tthis.stencilWrite = false;\n\n\t\tthis.clippingPlanes = null;\n\t\tthis.clipIntersection = false;\n\t\tthis.clipShadows = false;\n\n\t\tthis.shadowSide = null;\n\n\t\tthis.colorWrite = true;\n\n\t\tthis.precision = null; // override the renderer's default precision for this material\n\n\t\tthis.polygonOffset = false;\n\t\tthis.polygonOffsetFactor = 0;\n\t\tthis.polygonOffsetUnits = 0;\n\n\t\tthis.dithering = false;\n\n\t\tthis.alphaTest = 0;\n\t\tthis.alphaToCoverage = false;\n\t\tthis.premultipliedAlpha = false;\n\n\t\tthis.visible = true;\n\n\t\tthis.toneMapped = true;\n\n\t\tthis.userData = {};\n\n\t\tthis.version = 0;\n\n\t}\n\n\tonBuild( /* shaderobject, renderer */ ) {}\n\n\tonBeforeCompile( /* shaderobject, renderer */ ) {}\n\n\tcustomProgramCacheKey() {\n\n\t\treturn this.onBeforeCompile.toString();\n\n\t}\n\n\tsetValues( values ) {\n\n\t\tif ( values === undefined ) return;\n\n\t\tfor ( const key in values ) {\n\n\t\t\tconst newValue = values[ key ];\n\n\t\t\tif ( newValue === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.Material: \\'' + key + '\\' parameter is undefined.' );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t// for backward compatability if shading is set in the constructor\n\t\t\tif ( key === 'shading' ) {\n\n\t\t\t\tconsole.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );\n\t\t\t\tthis.flatShading = ( newValue === FlatShading ) ? true : false;\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tconst currentValue = this[ key ];\n\n\t\t\tif ( currentValue === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.' + this.type + ': \\'' + key + '\\' is not a property of this material.' );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( currentValue && currentValue.isColor ) {\n\n\t\t\t\tcurrentValue.set( newValue );\n\n\t\t\t} else if ( ( currentValue && currentValue.isVector3 ) && ( newValue && newValue.isVector3 ) ) {\n\n\t\t\t\tcurrentValue.copy( newValue );\n\n\t\t\t} else {\n\n\t\t\t\tthis[ key ] = newValue;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRoot = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( isRoot ) {\n\n\t\t\tmeta = {\n\t\t\t\ttextures: {},\n\t\t\t\timages: {}\n\t\t\t};\n\n\t\t}\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Material',\n\t\t\t\tgenerator: 'Material.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard Material serialization\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\n\t\tif ( this.name !== '' ) data.name = this.name;\n\n\t\tif ( this.color && this.color.isColor ) data.color = this.color.getHex();\n\n\t\tif ( this.roughness !== undefined ) data.roughness = this.roughness;\n\t\tif ( this.metalness !== undefined ) data.metalness = this.metalness;\n\n\t\tif ( this.sheen && this.sheen.isColor ) data.sheen = this.sheen.getHex();\n\t\tif ( this.emissive && this.emissive.isColor ) data.emissive = this.emissive.getHex();\n\t\tif ( this.emissiveIntensity && this.emissiveIntensity !== 1 ) data.emissiveIntensity = this.emissiveIntensity;\n\n\t\tif ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex();\n\t\tif ( this.shininess !== undefined ) data.shininess = this.shininess;\n\t\tif ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat;\n\t\tif ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness;\n\n\t\tif ( this.clearcoatMap && this.clearcoatMap.isTexture ) {\n\n\t\t\tdata.clearcoatMap = this.clearcoatMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture ) {\n\n\t\t\tdata.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture ) {\n\n\t\t\tdata.clearcoatNormalMap = this.clearcoatNormalMap.toJSON( meta ).uuid;\n\t\t\tdata.clearcoatNormalScale = this.clearcoatNormalScale.toArray();\n\n\t\t}\n\n\t\tif ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid;\n\t\tif ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid;\n\t\tif ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid;\n\n\t\tif ( this.lightMap && this.lightMap.isTexture ) {\n\n\t\t\tdata.lightMap = this.lightMap.toJSON( meta ).uuid;\n\t\t\tdata.lightMapIntensity = this.lightMapIntensity;\n\n\t\t}\n\n\t\tif ( this.aoMap && this.aoMap.isTexture ) {\n\n\t\t\tdata.aoMap = this.aoMap.toJSON( meta ).uuid;\n\t\t\tdata.aoMapIntensity = this.aoMapIntensity;\n\n\t\t}\n\n\t\tif ( this.bumpMap && this.bumpMap.isTexture ) {\n\n\t\t\tdata.bumpMap = this.bumpMap.toJSON( meta ).uuid;\n\t\t\tdata.bumpScale = this.bumpScale;\n\n\t\t}\n\n\t\tif ( this.normalMap && this.normalMap.isTexture ) {\n\n\t\t\tdata.normalMap = this.normalMap.toJSON( meta ).uuid;\n\t\t\tdata.normalMapType = this.normalMapType;\n\t\t\tdata.normalScale = this.normalScale.toArray();\n\n\t\t}\n\n\t\tif ( this.displacementMap && this.displacementMap.isTexture ) {\n\n\t\t\tdata.displacementMap = this.displacementMap.toJSON( meta ).uuid;\n\t\t\tdata.displacementScale = this.displacementScale;\n\t\t\tdata.displacementBias = this.displacementBias;\n\n\t\t}\n\n\t\tif ( this.roughnessMap && this.roughnessMap.isTexture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid;\n\t\tif ( this.metalnessMap && this.metalnessMap.isTexture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid;\n\n\t\tif ( this.emissiveMap && this.emissiveMap.isTexture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid;\n\t\tif ( this.specularMap && this.specularMap.isTexture ) data.specularMap = this.specularMap.toJSON( meta ).uuid;\n\n\t\tif ( this.envMap && this.envMap.isTexture ) {\n\n\t\t\tdata.envMap = this.envMap.toJSON( meta ).uuid;\n\n\t\t\tif ( this.combine !== undefined ) data.combine = this.combine;\n\n\t\t}\n\n\t\tif ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;\n\t\tif ( this.reflectivity !== undefined ) data.reflectivity = this.reflectivity;\n\t\tif ( this.refractionRatio !== undefined ) data.refractionRatio = this.refractionRatio;\n\n\t\tif ( this.gradientMap && this.gradientMap.isTexture ) {\n\n\t\t\tdata.gradientMap = this.gradientMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.transmission !== undefined ) data.transmission = this.transmission;\n\t\tif ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid;\n\t\tif ( this.thickness !== undefined ) data.thickness = this.thickness;\n\t\tif ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid;\n\t\tif ( this.attenuationDistance !== undefined ) data.attenuationDistance = this.attenuationDistance;\n\t\tif ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex();\n\n\t\tif ( this.size !== undefined ) data.size = this.size;\n\t\tif ( this.shadowSide !== null ) data.shadowSide = this.shadowSide;\n\t\tif ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation;\n\n\t\tif ( this.blending !== NormalBlending ) data.blending = this.blending;\n\t\tif ( this.side !== FrontSide ) data.side = this.side;\n\t\tif ( this.vertexColors ) data.vertexColors = true;\n\n\t\tif ( this.opacity < 1 ) data.opacity = this.opacity;\n\t\tif ( this.transparent === true ) data.transparent = this.transparent;\n\n\t\tdata.depthFunc = this.depthFunc;\n\t\tdata.depthTest = this.depthTest;\n\t\tdata.depthWrite = this.depthWrite;\n\t\tdata.colorWrite = this.colorWrite;\n\n\t\tdata.stencilWrite = this.stencilWrite;\n\t\tdata.stencilWriteMask = this.stencilWriteMask;\n\t\tdata.stencilFunc = this.stencilFunc;\n\t\tdata.stencilRef = this.stencilRef;\n\t\tdata.stencilFuncMask = this.stencilFuncMask;\n\t\tdata.stencilFail = this.stencilFail;\n\t\tdata.stencilZFail = this.stencilZFail;\n\t\tdata.stencilZPass = this.stencilZPass;\n\n\t\t// rotation (SpriteMaterial)\n\t\tif ( this.rotation && this.rotation !== 0 ) data.rotation = this.rotation;\n\n\t\tif ( this.polygonOffset === true ) data.polygonOffset = true;\n\t\tif ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor;\n\t\tif ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits;\n\n\t\tif ( this.linewidth && this.linewidth !== 1 ) data.linewidth = this.linewidth;\n\t\tif ( this.dashSize !== undefined ) data.dashSize = this.dashSize;\n\t\tif ( this.gapSize !== undefined ) data.gapSize = this.gapSize;\n\t\tif ( this.scale !== undefined ) data.scale = this.scale;\n\n\t\tif ( this.dithering === true ) data.dithering = true;\n\n\t\tif ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest;\n\t\tif ( this.alphaToCoverage === true ) data.alphaToCoverage = this.alphaToCoverage;\n\t\tif ( this.premultipliedAlpha === true ) data.premultipliedAlpha = this.premultipliedAlpha;\n\n\t\tif ( this.wireframe === true ) data.wireframe = this.wireframe;\n\t\tif ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth;\n\t\tif ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap;\n\t\tif ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin;\n\n\t\tif ( this.morphTargets === true ) data.morphTargets = true;\n\t\tif ( this.morphNormals === true ) data.morphNormals = true;\n\n\t\tif ( this.flatShading === true ) data.flatShading = this.flatShading;\n\n\t\tif ( this.visible === false ) data.visible = false;\n\n\t\tif ( this.toneMapped === false ) data.toneMapped = false;\n\n\t\tif ( JSON.stringify( this.userData ) !== '{}' ) data.userData = this.userData;\n\n\t\t// TODO: Copied from Object3D.toJSON\n\n\t\tfunction extractFromCache( cache ) {\n\n\t\t\tconst values = [];\n\n\t\t\tfor ( const key in cache ) {\n\n\t\t\t\tconst data = cache[ key ];\n\t\t\t\tdelete data.metadata;\n\t\t\t\tvalues.push( data );\n\n\t\t\t}\n\n\t\t\treturn values;\n\n\t\t}\n\n\t\tif ( isRoot ) {\n\n\t\t\tconst textures = extractFromCache( meta.textures );\n\t\t\tconst images = extractFromCache( meta.images );\n\n\t\t\tif ( textures.length > 0 ) data.textures = textures;\n\t\t\tif ( images.length > 0 ) data.images = images;\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.fog = source.fog;\n\n\t\tthis.blending = source.blending;\n\t\tthis.side = source.side;\n\t\tthis.vertexColors = source.vertexColors;\n\n\t\tthis.opacity = source.opacity;\n\t\tthis.transparent = source.transparent;\n\n\t\tthis.blendSrc = source.blendSrc;\n\t\tthis.blendDst = source.blendDst;\n\t\tthis.blendEquation = source.blendEquation;\n\t\tthis.blendSrcAlpha = source.blendSrcAlpha;\n\t\tthis.blendDstAlpha = source.blendDstAlpha;\n\t\tthis.blendEquationAlpha = source.blendEquationAlpha;\n\n\t\tthis.depthFunc = source.depthFunc;\n\t\tthis.depthTest = source.depthTest;\n\t\tthis.depthWrite = source.depthWrite;\n\n\t\tthis.stencilWriteMask = source.stencilWriteMask;\n\t\tthis.stencilFunc = source.stencilFunc;\n\t\tthis.stencilRef = source.stencilRef;\n\t\tthis.stencilFuncMask = source.stencilFuncMask;\n\t\tthis.stencilFail = source.stencilFail;\n\t\tthis.stencilZFail = source.stencilZFail;\n\t\tthis.stencilZPass = source.stencilZPass;\n\t\tthis.stencilWrite = source.stencilWrite;\n\n\t\tconst srcPlanes = source.clippingPlanes;\n\t\tlet dstPlanes = null;\n\n\t\tif ( srcPlanes !== null ) {\n\n\t\t\tconst n = srcPlanes.length;\n\t\t\tdstPlanes = new Array( n );\n\n\t\t\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\t\t\tdstPlanes[ i ] = srcPlanes[ i ].clone();\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.clippingPlanes = dstPlanes;\n\t\tthis.clipIntersection = source.clipIntersection;\n\t\tthis.clipShadows = source.clipShadows;\n\n\t\tthis.shadowSide = source.shadowSide;\n\n\t\tthis.colorWrite = source.colorWrite;\n\n\t\tthis.precision = source.precision;\n\n\t\tthis.polygonOffset = source.polygonOffset;\n\t\tthis.polygonOffsetFactor = source.polygonOffsetFactor;\n\t\tthis.polygonOffsetUnits = source.polygonOffsetUnits;\n\n\t\tthis.dithering = source.dithering;\n\n\t\tthis.alphaTest = source.alphaTest;\n\t\tthis.alphaToCoverage = source.alphaToCoverage;\n\t\tthis.premultipliedAlpha = source.premultipliedAlpha;\n\n\t\tthis.visible = source.visible;\n\n\t\tthis.toneMapped = source.toneMapped;\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n}\n\nMaterial.prototype.isMaterial = true;\n\nconst _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,\n\t'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,\n\t'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50,\n\t'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B,\n\t'darkgoldenrod': 0xB8860B, 'darkgray': 0xA9A9A9, 'darkgreen': 0x006400, 'darkgrey': 0xA9A9A9, 'darkkhaki': 0xBDB76B, 'darkmagenta': 0x8B008B,\n\t'darkolivegreen': 0x556B2F, 'darkorange': 0xFF8C00, 'darkorchid': 0x9932CC, 'darkred': 0x8B0000, 'darksalmon': 0xE9967A, 'darkseagreen': 0x8FBC8F,\n\t'darkslateblue': 0x483D8B, 'darkslategray': 0x2F4F4F, 'darkslategrey': 0x2F4F4F, 'darkturquoise': 0x00CED1, 'darkviolet': 0x9400D3,\n\t'deeppink': 0xFF1493, 'deepskyblue': 0x00BFFF, 'dimgray': 0x696969, 'dimgrey': 0x696969, 'dodgerblue': 0x1E90FF, 'firebrick': 0xB22222,\n\t'floralwhite': 0xFFFAF0, 'forestgreen': 0x228B22, 'fuchsia': 0xFF00FF, 'gainsboro': 0xDCDCDC, 'ghostwhite': 0xF8F8FF, 'gold': 0xFFD700,\n\t'goldenrod': 0xDAA520, 'gray': 0x808080, 'green': 0x008000, 'greenyellow': 0xADFF2F, 'grey': 0x808080, 'honeydew': 0xF0FFF0, 'hotpink': 0xFF69B4,\n\t'indianred': 0xCD5C5C, 'indigo': 0x4B0082, 'ivory': 0xFFFFF0, 'khaki': 0xF0E68C, 'lavender': 0xE6E6FA, 'lavenderblush': 0xFFF0F5, 'lawngreen': 0x7CFC00,\n\t'lemonchiffon': 0xFFFACD, 'lightblue': 0xADD8E6, 'lightcoral': 0xF08080, 'lightcyan': 0xE0FFFF, 'lightgoldenrodyellow': 0xFAFAD2, 'lightgray': 0xD3D3D3,\n\t'lightgreen': 0x90EE90, 'lightgrey': 0xD3D3D3, 'lightpink': 0xFFB6C1, 'lightsalmon': 0xFFA07A, 'lightseagreen': 0x20B2AA, 'lightskyblue': 0x87CEFA,\n\t'lightslategray': 0x778899, 'lightslategrey': 0x778899, 'lightsteelblue': 0xB0C4DE, 'lightyellow': 0xFFFFE0, 'lime': 0x00FF00, 'limegreen': 0x32CD32,\n\t'linen': 0xFAF0E6, 'magenta': 0xFF00FF, 'maroon': 0x800000, 'mediumaquamarine': 0x66CDAA, 'mediumblue': 0x0000CD, 'mediumorchid': 0xBA55D3,\n\t'mediumpurple': 0x9370DB, 'mediumseagreen': 0x3CB371, 'mediumslateblue': 0x7B68EE, 'mediumspringgreen': 0x00FA9A, 'mediumturquoise': 0x48D1CC,\n\t'mediumvioletred': 0xC71585, 'midnightblue': 0x191970, 'mintcream': 0xF5FFFA, 'mistyrose': 0xFFE4E1, 'moccasin': 0xFFE4B5, 'navajowhite': 0xFFDEAD,\n\t'navy': 0x000080, 'oldlace': 0xFDF5E6, 'olive': 0x808000, 'olivedrab': 0x6B8E23, 'orange': 0xFFA500, 'orangered': 0xFF4500, 'orchid': 0xDA70D6,\n\t'palegoldenrod': 0xEEE8AA, 'palegreen': 0x98FB98, 'paleturquoise': 0xAFEEEE, 'palevioletred': 0xDB7093, 'papayawhip': 0xFFEFD5, 'peachpuff': 0xFFDAB9,\n\t'peru': 0xCD853F, 'pink': 0xFFC0CB, 'plum': 0xDDA0DD, 'powderblue': 0xB0E0E6, 'purple': 0x800080, 'rebeccapurple': 0x663399, 'red': 0xFF0000, 'rosybrown': 0xBC8F8F,\n\t'royalblue': 0x4169E1, 'saddlebrown': 0x8B4513, 'salmon': 0xFA8072, 'sandybrown': 0xF4A460, 'seagreen': 0x2E8B57, 'seashell': 0xFFF5EE,\n\t'sienna': 0xA0522D, 'silver': 0xC0C0C0, 'skyblue': 0x87CEEB, 'slateblue': 0x6A5ACD, 'slategray': 0x708090, 'slategrey': 0x708090, 'snow': 0xFFFAFA,\n\t'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0,\n\t'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 };\n\nconst _hslA = { h: 0, s: 0, l: 0 };\nconst _hslB = { h: 0, s: 0, l: 0 };\n\nfunction hue2rgb( p, q, t ) {\n\n\tif ( t < 0 ) t += 1;\n\tif ( t > 1 ) t -= 1;\n\tif ( t < 1 / 6 ) return p + ( q - p ) * 6 * t;\n\tif ( t < 1 / 2 ) return q;\n\tif ( t < 2 / 3 ) return p + ( q - p ) * 6 * ( 2 / 3 - t );\n\treturn p;\n\n}\n\nfunction SRGBToLinear( c ) {\n\n\treturn ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );\n\n}\n\nfunction LinearToSRGB( c ) {\n\n\treturn ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055;\n\n}\n\nclass Color {\n\n\tconstructor( r, g, b ) {\n\n\t\tif ( g === undefined && b === undefined ) {\n\n\t\t\t// r is THREE.Color, hex or string\n\t\t\treturn this.set( r );\n\n\t\t}\n\n\t\treturn this.setRGB( r, g, b );\n\n\t}\n\n\tset( value ) {\n\n\t\tif ( value && value.isColor ) {\n\n\t\t\tthis.copy( value );\n\n\t\t} else if ( typeof value === 'number' ) {\n\n\t\t\tthis.setHex( value );\n\n\t\t} else if ( typeof value === 'string' ) {\n\n\t\t\tthis.setStyle( value );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.r = scalar;\n\t\tthis.g = scalar;\n\t\tthis.b = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetHex( hex ) {\n\n\t\thex = Math.floor( hex );\n\n\t\tthis.r = ( hex >> 16 & 255 ) / 255;\n\t\tthis.g = ( hex >> 8 & 255 ) / 255;\n\t\tthis.b = ( hex & 255 ) / 255;\n\n\t\treturn this;\n\n\t}\n\n\tsetRGB( r, g, b ) {\n\n\t\tthis.r = r;\n\t\tthis.g = g;\n\t\tthis.b = b;\n\n\t\treturn this;\n\n\t}\n\n\tsetHSL( h, s, l ) {\n\n\t\t// h,s,l ranges are in 0.0 - 1.0\n\t\th = euclideanModulo( h, 1 );\n\t\ts = clamp( s, 0, 1 );\n\t\tl = clamp( l, 0, 1 );\n\n\t\tif ( s === 0 ) {\n\n\t\t\tthis.r = this.g = this.b = l;\n\n\t\t} else {\n\n\t\t\tconst p = l <= 0.5 ? l * ( 1 + s ) : l + s - ( l * s );\n\t\t\tconst q = ( 2 * l ) - p;\n\n\t\t\tthis.r = hue2rgb( q, p, h + 1 / 3 );\n\t\t\tthis.g = hue2rgb( q, p, h );\n\t\t\tthis.b = hue2rgb( q, p, h - 1 / 3 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetStyle( style ) {\n\n\t\tfunction handleAlpha( string ) {\n\n\t\t\tif ( string === undefined ) return;\n\n\t\t\tif ( parseFloat( string ) < 1 ) {\n\n\t\t\t\tconsole.warn( 'THREE.Color: Alpha component of ' + style + ' will be ignored.' );\n\n\t\t\t}\n\n\t\t}\n\n\n\t\tlet m;\n\n\t\tif ( m = /^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec( style ) ) {\n\n\t\t\t// rgb / hsl\n\n\t\t\tlet color;\n\t\t\tconst name = m[ 1 ];\n\t\t\tconst components = m[ 2 ];\n\n\t\t\tswitch ( name ) {\n\n\t\t\t\tcase 'rgb':\n\t\t\t\tcase 'rgba':\n\n\t\t\t\t\tif ( color = /^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// rgb(255,0,0) rgba(255,0,0,0.5)\n\t\t\t\t\t\tthis.r = Math.min( 255, parseInt( color[ 1 ], 10 ) ) / 255;\n\t\t\t\t\t\tthis.g = Math.min( 255, parseInt( color[ 2 ], 10 ) ) / 255;\n\t\t\t\t\t\tthis.b = Math.min( 255, parseInt( color[ 3 ], 10 ) ) / 255;\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( color = /^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)\n\t\t\t\t\t\tthis.r = Math.min( 100, parseInt( color[ 1 ], 10 ) ) / 100;\n\t\t\t\t\t\tthis.g = Math.min( 100, parseInt( color[ 2 ], 10 ) ) / 100;\n\t\t\t\t\t\tthis.b = Math.min( 100, parseInt( color[ 3 ], 10 ) ) / 100;\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hsl':\n\t\t\t\tcase 'hsla':\n\n\t\t\t\t\tif ( color = /^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n\t\t\t\t\t\tconst h = parseFloat( color[ 1 ] ) / 360;\n\t\t\t\t\t\tconst s = parseInt( color[ 2 ], 10 ) / 100;\n\t\t\t\t\t\tconst l = parseInt( color[ 3 ], 10 ) / 100;\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this.setHSL( h, s, l );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t} else if ( m = /^\\#([A-Fa-f\\d]+)$/.exec( style ) ) {\n\n\t\t\t// hex color\n\n\t\t\tconst hex = m[ 1 ];\n\t\t\tconst size = hex.length;\n\n\t\t\tif ( size === 3 ) {\n\n\t\t\t\t// #ff0\n\t\t\t\tthis.r = parseInt( hex.charAt( 0 ) + hex.charAt( 0 ), 16 ) / 255;\n\t\t\t\tthis.g = parseInt( hex.charAt( 1 ) + hex.charAt( 1 ), 16 ) / 255;\n\t\t\t\tthis.b = parseInt( hex.charAt( 2 ) + hex.charAt( 2 ), 16 ) / 255;\n\n\t\t\t\treturn this;\n\n\t\t\t} else if ( size === 6 ) {\n\n\t\t\t\t// #ff0000\n\t\t\t\tthis.r = parseInt( hex.charAt( 0 ) + hex.charAt( 1 ), 16 ) / 255;\n\t\t\t\tthis.g = parseInt( hex.charAt( 2 ) + hex.charAt( 3 ), 16 ) / 255;\n\t\t\t\tthis.b = parseInt( hex.charAt( 4 ) + hex.charAt( 5 ), 16 ) / 255;\n\n\t\t\t\treturn this;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( style && style.length > 0 ) {\n\n\t\t\treturn this.setColorName( style );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetColorName( style ) {\n\n\t\t// color keywords\n\t\tconst hex = _colorKeywords[ style.toLowerCase() ];\n\n\t\tif ( hex !== undefined ) {\n\n\t\t\t// red\n\t\t\tthis.setHex( hex );\n\n\t\t} else {\n\n\t\t\t// unknown color\n\t\t\tconsole.warn( 'THREE.Color: Unknown color ' + style );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.r, this.g, this.b );\n\n\t}\n\n\tcopy( color ) {\n\n\t\tthis.r = color.r;\n\t\tthis.g = color.g;\n\t\tthis.b = color.b;\n\n\t\treturn this;\n\n\t}\n\n\tcopyGammaToLinear( color, gammaFactor = 2.0 ) {\n\n\t\tthis.r = Math.pow( color.r, gammaFactor );\n\t\tthis.g = Math.pow( color.g, gammaFactor );\n\t\tthis.b = Math.pow( color.b, gammaFactor );\n\n\t\treturn this;\n\n\t}\n\n\tcopyLinearToGamma( color, gammaFactor = 2.0 ) {\n\n\t\tconst safeInverse = ( gammaFactor > 0 ) ? ( 1.0 / gammaFactor ) : 1.0;\n\n\t\tthis.r = Math.pow( color.r, safeInverse );\n\t\tthis.g = Math.pow( color.g, safeInverse );\n\t\tthis.b = Math.pow( color.b, safeInverse );\n\n\t\treturn this;\n\n\t}\n\n\tconvertGammaToLinear( gammaFactor ) {\n\n\t\tthis.copyGammaToLinear( this, gammaFactor );\n\n\t\treturn this;\n\n\t}\n\n\tconvertLinearToGamma( gammaFactor ) {\n\n\t\tthis.copyLinearToGamma( this, gammaFactor );\n\n\t\treturn this;\n\n\t}\n\n\tcopySRGBToLinear( color ) {\n\n\t\tthis.r = SRGBToLinear( color.r );\n\t\tthis.g = SRGBToLinear( color.g );\n\t\tthis.b = SRGBToLinear( color.b );\n\n\t\treturn this;\n\n\t}\n\n\tcopyLinearToSRGB( color ) {\n\n\t\tthis.r = LinearToSRGB( color.r );\n\t\tthis.g = LinearToSRGB( color.g );\n\t\tthis.b = LinearToSRGB( color.b );\n\n\t\treturn this;\n\n\t}\n\n\tconvertSRGBToLinear() {\n\n\t\tthis.copySRGBToLinear( this );\n\n\t\treturn this;\n\n\t}\n\n\tconvertLinearToSRGB() {\n\n\t\tthis.copyLinearToSRGB( this );\n\n\t\treturn this;\n\n\t}\n\n\tgetHex() {\n\n\t\treturn ( this.r * 255 ) << 16 ^ ( this.g * 255 ) << 8 ^ ( this.b * 255 ) << 0;\n\n\t}\n\n\tgetHexString() {\n\n\t\treturn ( '000000' + this.getHex().toString( 16 ) ).slice( - 6 );\n\n\t}\n\n\tgetHSL( target ) {\n\n\t\t// h,s,l ranges are in 0.0 - 1.0\n\n\t\tconst r = this.r, g = this.g, b = this.b;\n\n\t\tconst max = Math.max( r, g, b );\n\t\tconst min = Math.min( r, g, b );\n\n\t\tlet hue, saturation;\n\t\tconst lightness = ( min + max ) / 2.0;\n\n\t\tif ( min === max ) {\n\n\t\t\thue = 0;\n\t\t\tsaturation = 0;\n\n\t\t} else {\n\n\t\t\tconst delta = max - min;\n\n\t\t\tsaturation = lightness <= 0.5 ? delta / ( max + min ) : delta / ( 2 - max - min );\n\n\t\t\tswitch ( max ) {\n\n\t\t\t\tcase r: hue = ( g - b ) / delta + ( g < b ? 6 : 0 ); break;\n\t\t\t\tcase g: hue = ( b - r ) / delta + 2; break;\n\t\t\t\tcase b: hue = ( r - g ) / delta + 4; break;\n\n\t\t\t}\n\n\t\t\thue /= 6;\n\n\t\t}\n\n\t\ttarget.h = hue;\n\t\ttarget.s = saturation;\n\t\ttarget.l = lightness;\n\n\t\treturn target;\n\n\t}\n\n\tgetStyle() {\n\n\t\treturn 'rgb(' + ( ( this.r * 255 ) | 0 ) + ',' + ( ( this.g * 255 ) | 0 ) + ',' + ( ( this.b * 255 ) | 0 ) + ')';\n\n\t}\n\n\toffsetHSL( h, s, l ) {\n\n\t\tthis.getHSL( _hslA );\n\n\t\t_hslA.h += h; _hslA.s += s; _hslA.l += l;\n\n\t\tthis.setHSL( _hslA.h, _hslA.s, _hslA.l );\n\n\t\treturn this;\n\n\t}\n\n\tadd( color ) {\n\n\t\tthis.r += color.r;\n\t\tthis.g += color.g;\n\t\tthis.b += color.b;\n\n\t\treturn this;\n\n\t}\n\n\taddColors( color1, color2 ) {\n\n\t\tthis.r = color1.r + color2.r;\n\t\tthis.g = color1.g + color2.g;\n\t\tthis.b = color1.b + color2.b;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.r += s;\n\t\tthis.g += s;\n\t\tthis.b += s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( color ) {\n\n\t\tthis.r = Math.max( 0, this.r - color.r );\n\t\tthis.g = Math.max( 0, this.g - color.g );\n\t\tthis.b = Math.max( 0, this.b - color.b );\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( color ) {\n\n\t\tthis.r *= color.r;\n\t\tthis.g *= color.g;\n\t\tthis.b *= color.b;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tthis.r *= s;\n\t\tthis.g *= s;\n\t\tthis.b *= s;\n\n\t\treturn this;\n\n\t}\n\n\tlerp( color, alpha ) {\n\n\t\tthis.r += ( color.r - this.r ) * alpha;\n\t\tthis.g += ( color.g - this.g ) * alpha;\n\t\tthis.b += ( color.b - this.b ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpColors( color1, color2, alpha ) {\n\n\t\tthis.r = color1.r + ( color2.r - color1.r ) * alpha;\n\t\tthis.g = color1.g + ( color2.g - color1.g ) * alpha;\n\t\tthis.b = color1.b + ( color2.b - color1.b ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpHSL( color, alpha ) {\n\n\t\tthis.getHSL( _hslA );\n\t\tcolor.getHSL( _hslB );\n\n\t\tconst h = lerp( _hslA.h, _hslB.h, alpha );\n\t\tconst s = lerp( _hslA.s, _hslB.s, alpha );\n\t\tconst l = lerp( _hslA.l, _hslB.l, alpha );\n\n\t\tthis.setHSL( h, s, l );\n\n\t\treturn this;\n\n\t}\n\n\tequals( c ) {\n\n\t\treturn ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.r = array[ offset ];\n\t\tthis.g = array[ offset + 1 ];\n\t\tthis.b = array[ offset + 2 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.r;\n\t\tarray[ offset + 1 ] = this.g;\n\t\tarray[ offset + 2 ] = this.b;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.r = attribute.getX( index );\n\t\tthis.g = attribute.getY( index );\n\t\tthis.b = attribute.getZ( index );\n\n\t\tif ( attribute.normalized === true ) {\n\n\t\t\t// assuming Uint8Array\n\n\t\t\tthis.r /= 255;\n\t\t\tthis.g /= 255;\n\t\t\tthis.b /= 255;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.getHex();\n\n\t}\n\n}\n\nColor.NAMES = _colorKeywords;\n\nColor.prototype.isColor = true;\nColor.prototype.r = 1;\nColor.prototype.g = 1;\nColor.prototype.b = 1;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n * map: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * specularMap: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n * combine: THREE.Multiply,\n * reflectivity: <float>,\n * refractionRatio: <float>,\n *\n * depthTest: <bool>,\n * depthWrite: <bool>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>\n * }\n */\n\nclass MeshBasicMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshBasicMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // emissive\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshBasicMaterial.prototype.isMeshBasicMaterial = true;\n\nconst _vector$9 = /*@__PURE__*/ new Vector3();\nconst _vector2$1 = /*@__PURE__*/ new Vector2();\n\nclass BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tif ( Array.isArray( array ) ) {\n\n\t\t\tthrow new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );\n\n\t\t}\n\n\t\tthis.name = '';\n\n\t\tthis.array = array;\n\t\tthis.itemSize = itemSize;\n\t\tthis.count = array !== undefined ? array.length / itemSize : 0;\n\t\tthis.normalized = normalized === true;\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = { offset: 0, count: - 1 };\n\n\t\tthis.version = 0;\n\n\t}\n\n\tonUploadCallback() {}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\t\tthis.array = new source.array.constructor( source.array );\n\t\tthis.itemSize = source.itemSize;\n\t\tthis.count = source.count;\n\t\tthis.normalized = source.normalized;\n\n\t\tthis.usage = source.usage;\n\n\t\treturn this;\n\n\t}\n\n\tcopyAt( index1, attribute, index2 ) {\n\n\t\tindex1 *= this.itemSize;\n\t\tindex2 *= attribute.itemSize;\n\n\t\tfor ( let i = 0, l = this.itemSize; i < l; i ++ ) {\n\n\t\t\tthis.array[ index1 + i ] = attribute.array[ index2 + i ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyArray( array ) {\n\n\t\tthis.array.set( array );\n\n\t\treturn this;\n\n\t}\n\n\tcopyColorsArray( colors ) {\n\n\t\tconst array = this.array;\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0, l = colors.length; i < l; i ++ ) {\n\n\t\t\tlet color = colors[ i ];\n\n\t\t\tif ( color === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.BufferAttribute.copyColorsArray(): color is undefined', i );\n\t\t\t\tcolor = new Color();\n\n\t\t\t}\n\n\t\t\tarray[ offset ++ ] = color.r;\n\t\t\tarray[ offset ++ ] = color.g;\n\t\t\tarray[ offset ++ ] = color.b;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyVector2sArray( vectors ) {\n\n\t\tconst array = this.array;\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0, l = vectors.length; i < l; i ++ ) {\n\n\t\t\tlet vector = vectors[ i ];\n\n\t\t\tif ( vector === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.BufferAttribute.copyVector2sArray(): vector is undefined', i );\n\t\t\t\tvector = new Vector2();\n\n\t\t\t}\n\n\t\t\tarray[ offset ++ ] = vector.x;\n\t\t\tarray[ offset ++ ] = vector.y;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyVector3sArray( vectors ) {\n\n\t\tconst array = this.array;\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0, l = vectors.length; i < l; i ++ ) {\n\n\t\t\tlet vector = vectors[ i ];\n\n\t\t\tif ( vector === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.BufferAttribute.copyVector3sArray(): vector is undefined', i );\n\t\t\t\tvector = new Vector3();\n\n\t\t\t}\n\n\t\t\tarray[ offset ++ ] = vector.x;\n\t\t\tarray[ offset ++ ] = vector.y;\n\t\t\tarray[ offset ++ ] = vector.z;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyVector4sArray( vectors ) {\n\n\t\tconst array = this.array;\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0, l = vectors.length; i < l; i ++ ) {\n\n\t\t\tlet vector = vectors[ i ];\n\n\t\t\tif ( vector === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.BufferAttribute.copyVector4sArray(): vector is undefined', i );\n\t\t\t\tvector = new Vector4();\n\n\t\t\t}\n\n\t\t\tarray[ offset ++ ] = vector.x;\n\t\t\tarray[ offset ++ ] = vector.y;\n\t\t\tarray[ offset ++ ] = vector.z;\n\t\t\tarray[ offset ++ ] = vector.w;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tif ( this.itemSize === 2 ) {\n\n\t\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t\t_vector2$1.fromBufferAttribute( this, i );\n\t\t\t\t_vector2$1.applyMatrix3( m );\n\n\t\t\t\tthis.setXY( i, _vector2$1.x, _vector2$1.y );\n\n\t\t\t}\n\n\t\t} else if ( this.itemSize === 3 ) {\n\n\t\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t\t_vector$9.fromBufferAttribute( this, i );\n\t\t\t\t_vector$9.applyMatrix3( m );\n\n\t\t\t\tthis.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$9.x = this.getX( i );\n\t\t\t_vector$9.y = this.getY( i );\n\t\t\t_vector$9.z = this.getZ( i );\n\n\t\t\t_vector$9.applyMatrix4( m );\n\n\t\t\tthis.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$9.x = this.getX( i );\n\t\t\t_vector$9.y = this.getY( i );\n\t\t\t_vector$9.z = this.getZ( i );\n\n\t\t\t_vector$9.applyNormalMatrix( m );\n\n\t\t\tthis.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$9.x = this.getX( i );\n\t\t\t_vector$9.y = this.getY( i );\n\t\t\t_vector$9.z = this.getZ( i );\n\n\t\t\t_vector$9.transformDirection( m );\n\n\t\t\tthis.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tset( value, offset = 0 ) {\n\n\t\tthis.array.set( value, offset );\n\n\t\treturn this;\n\n\t}\n\n\tgetX( index ) {\n\n\t\treturn this.array[ index * this.itemSize ];\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tthis.array[ index * this.itemSize ] = x;\n\n\t\treturn this;\n\n\t}\n\n\tgetY( index ) {\n\n\t\treturn this.array[ index * this.itemSize + 1 ];\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tthis.array[ index * this.itemSize + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tgetZ( index ) {\n\n\t\treturn this.array[ index * this.itemSize + 2 ];\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tthis.array[ index * this.itemSize + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tgetW( index ) {\n\n\t\treturn this.array[ index * this.itemSize + 3 ];\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tthis.array[ index * this.itemSize + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\t\tthis.array[ index + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\t\tthis.array[ index + 2 ] = z;\n\t\tthis.array[ index + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tonUpload( callback ) {\n\n\t\tthis.onUploadCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.array, this.itemSize ).copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\titemSize: this.itemSize,\n\t\t\ttype: this.array.constructor.name,\n\t\t\tarray: Array.prototype.slice.call( this.array ),\n\t\t\tnormalized: this.normalized\n\t\t};\n\n\t\tif ( this.name !== '' ) data.name = this.name;\n\t\tif ( this.usage !== StaticDrawUsage ) data.usage = this.usage;\n\t\tif ( this.updateRange.offset !== 0 || this.updateRange.count !== - 1 ) data.updateRange = this.updateRange;\n\n\t\treturn data;\n\n\t}\n\n}\n\nBufferAttribute.prototype.isBufferAttribute = true;\n\n//\n\nclass Int8BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int8Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint8BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint8Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint8ClampedBufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint8ClampedArray( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Int16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Int32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Float16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nFloat16BufferAttribute.prototype.isFloat16BufferAttribute = true;\n\nclass Float32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Float32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Float64BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Float64Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nfunction arrayMax( array ) {\n\n\tif ( array.length === 0 ) return - Infinity;\n\n\tlet max = array[ 0 ];\n\n\tfor ( let i = 1, l = array.length; i < l; ++ i ) {\n\n\t\tif ( array[ i ] > max ) max = array[ i ];\n\n\t}\n\n\treturn max;\n\n}\n\nconst TYPED_ARRAYS = {\n\tInt8Array: Int8Array,\n\tUint8Array: Uint8Array,\n\tUint8ClampedArray: Uint8ClampedArray,\n\tInt16Array: Int16Array,\n\tUint16Array: Uint16Array,\n\tInt32Array: Int32Array,\n\tUint32Array: Uint32Array,\n\tFloat32Array: Float32Array,\n\tFloat64Array: Float64Array\n};\n\nfunction getTypedArray( type, buffer ) {\n\n\treturn new TYPED_ARRAYS[ type ]( buffer );\n\n}\n\nlet _id = 0;\n\nconst _m1 = /*@__PURE__*/ new Matrix4();\nconst _obj = /*@__PURE__*/ new Object3D();\nconst _offset = /*@__PURE__*/ new Vector3();\nconst _box$1 = /*@__PURE__*/ new Box3();\nconst _boxMorphTargets = /*@__PURE__*/ new Box3();\nconst _vector$8 = /*@__PURE__*/ new Vector3();\n\nclass BufferGeometry extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tObject.defineProperty( this, 'id', { value: _id ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'BufferGeometry';\n\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\n\t\tthis.morphAttributes = {};\n\t\tthis.morphTargetsRelative = false;\n\n\t\tthis.groups = [];\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\tthis.drawRange = { start: 0, count: Infinity };\n\n\t\tthis.userData = {};\n\n\t}\n\n\tgetIndex() {\n\n\t\treturn this.index;\n\n\t}\n\n\tsetIndex( index ) {\n\n\t\tif ( Array.isArray( index ) ) {\n\n\t\t\tthis.index = new ( arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );\n\n\t\t} else {\n\n\t\t\tthis.index = index;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetAttribute( name ) {\n\n\t\treturn this.attributes[ name ];\n\n\t}\n\n\tsetAttribute( name, attribute ) {\n\n\t\tthis.attributes[ name ] = attribute;\n\n\t\treturn this;\n\n\t}\n\n\tdeleteAttribute( name ) {\n\n\t\tdelete this.attributes[ name ];\n\n\t\treturn this;\n\n\t}\n\n\thasAttribute( name ) {\n\n\t\treturn this.attributes[ name ] !== undefined;\n\n\t}\n\n\taddGroup( start, count, materialIndex = 0 ) {\n\n\t\tthis.groups.push( {\n\n\t\t\tstart: start,\n\t\t\tcount: count,\n\t\t\tmaterialIndex: materialIndex\n\n\t\t} );\n\n\t}\n\n\tclearGroups() {\n\n\t\tthis.groups = [];\n\n\t}\n\n\tsetDrawRange( start, count ) {\n\n\t\tthis.drawRange.start = start;\n\t\tthis.drawRange.count = count;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tconst position = this.attributes.position;\n\n\t\tif ( position !== undefined ) {\n\n\t\t\tposition.applyMatrix4( matrix );\n\n\t\t\tposition.needsUpdate = true;\n\n\t\t}\n\n\t\tconst normal = this.attributes.normal;\n\n\t\tif ( normal !== undefined ) {\n\n\t\t\tconst normalMatrix = new Matrix3().getNormalMatrix( matrix );\n\n\t\t\tnormal.applyNormalMatrix( normalMatrix );\n\n\t\t\tnormal.needsUpdate = true;\n\n\t\t}\n\n\t\tconst tangent = this.attributes.tangent;\n\n\t\tif ( tangent !== undefined ) {\n\n\t\t\ttangent.transformDirection( matrix );\n\n\t\t\ttangent.needsUpdate = true;\n\n\t\t}\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tthis.computeBoundingBox();\n\n\t\t}\n\n\t\tif ( this.boundingSphere !== null ) {\n\n\t\t\tthis.computeBoundingSphere();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\t_m1.makeRotationFromQuaternion( q );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateX( angle ) {\n\n\t\t// rotate geometry around world x-axis\n\n\t\t_m1.makeRotationX( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateY( angle ) {\n\n\t\t// rotate geometry around world y-axis\n\n\t\t_m1.makeRotationY( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateZ( angle ) {\n\n\t\t// rotate geometry around world z-axis\n\n\t\t_m1.makeRotationZ( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( x, y, z ) {\n\n\t\t// translate geometry\n\n\t\t_m1.makeTranslation( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\tscale( x, y, z ) {\n\n\t\t// scale geometry\n\n\t\t_m1.makeScale( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\tlookAt( vector ) {\n\n\t\t_obj.lookAt( vector );\n\n\t\t_obj.updateMatrix();\n\n\t\tthis.applyMatrix4( _obj.matrix );\n\n\t\treturn this;\n\n\t}\n\n\tcenter() {\n\n\t\tthis.computeBoundingBox();\n\n\t\tthis.boundingBox.getCenter( _offset ).negate();\n\n\t\tthis.translate( _offset.x, _offset.y, _offset.z );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tconst position = [];\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tconst point = points[ i ];\n\t\t\tposition.push( point.x, point.y, point.z || 0 );\n\n\t\t}\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( position, 3 ) );\n\n\t\treturn this;\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tconst position = this.attributes.position;\n\t\tconst morphAttributesPosition = this.morphAttributes.position;\n\n\t\tif ( position && position.isGLBufferAttribute ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".', this );\n\n\t\t\tthis.boundingBox.set(\n\t\t\t\tnew Vector3( - Infinity, - Infinity, - Infinity ),\n\t\t\t\tnew Vector3( + Infinity, + Infinity, + Infinity )\n\t\t\t);\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( position !== undefined ) {\n\n\t\t\tthis.boundingBox.setFromBufferAttribute( position );\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\t_box$1.setFromBufferAttribute( morphAttribute );\n\n\t\t\t\t\tif ( this.morphTargetsRelative ) {\n\n\t\t\t\t\t\t_vector$8.addVectors( this.boundingBox.min, _box$1.min );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _vector$8 );\n\n\t\t\t\t\t\t_vector$8.addVectors( this.boundingBox.max, _box$1.max );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _vector$8 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _box$1.min );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _box$1.max );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthis.boundingBox.makeEmpty();\n\n\t\t}\n\n\t\tif ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.', this );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tconst position = this.attributes.position;\n\t\tconst morphAttributesPosition = this.morphAttributes.position;\n\n\t\tif ( position && position.isGLBufferAttribute ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".', this );\n\n\t\t\tthis.boundingSphere.set( new Vector3(), Infinity );\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( position ) {\n\n\t\t\t// first, find the center of the bounding sphere\n\n\t\t\tconst center = this.boundingSphere.center;\n\n\t\t\t_box$1.setFromBufferAttribute( position );\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\t_boxMorphTargets.setFromBufferAttribute( morphAttribute );\n\n\t\t\t\t\tif ( this.morphTargetsRelative ) {\n\n\t\t\t\t\t\t_vector$8.addVectors( _box$1.min, _boxMorphTargets.min );\n\t\t\t\t\t\t_box$1.expandByPoint( _vector$8 );\n\n\t\t\t\t\t\t_vector$8.addVectors( _box$1.max, _boxMorphTargets.max );\n\t\t\t\t\t\t_box$1.expandByPoint( _vector$8 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_box$1.expandByPoint( _boxMorphTargets.min );\n\t\t\t\t\t\t_box$1.expandByPoint( _boxMorphTargets.max );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t_box$1.getCenter( center );\n\n\t\t\t// second, try to find a boundingSphere with a radius smaller than the\n\t\t\t// boundingSphere of the boundingBox: sqrt(3) smaller in the best case\n\n\t\t\tlet maxRadiusSq = 0;\n\n\t\t\tfor ( let i = 0, il = position.count; i < il; i ++ ) {\n\n\t\t\t\t_vector$8.fromBufferAttribute( position, i );\n\n\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) );\n\n\t\t\t}\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\tconst morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t\t\t\tfor ( let j = 0, jl = morphAttribute.count; j < jl; j ++ ) {\n\n\t\t\t\t\t\t_vector$8.fromBufferAttribute( morphAttribute, j );\n\n\t\t\t\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t\t\t\t_offset.fromBufferAttribute( position, j );\n\t\t\t\t\t\t\t_vector$8.add( _offset );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.boundingSphere.radius = Math.sqrt( maxRadiusSq );\n\n\t\t\tif ( isNaN( this.boundingSphere.radius ) ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.', this );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcomputeFaceNormals() {\n\n\t\t// backwards compatibility\n\n\t}\n\n\tcomputeTangents() {\n\n\t\tconst index = this.index;\n\t\tconst attributes = this.attributes;\n\n\t\t// based on http://www.terathon.com/code/tangent.html\n\t\t// (per vertex tangents)\n\n\t\tif ( index === null ||\n\t\t\t attributes.position === undefined ||\n\t\t\t attributes.normal === undefined ||\n\t\t\t attributes.uv === undefined ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst indices = index.array;\n\t\tconst positions = attributes.position.array;\n\t\tconst normals = attributes.normal.array;\n\t\tconst uvs = attributes.uv.array;\n\n\t\tconst nVertices = positions.length / 3;\n\n\t\tif ( attributes.tangent === undefined ) {\n\n\t\t\tthis.setAttribute( 'tangent', new BufferAttribute( new Float32Array( 4 * nVertices ), 4 ) );\n\n\t\t}\n\n\t\tconst tangents = attributes.tangent.array;\n\n\t\tconst tan1 = [], tan2 = [];\n\n\t\tfor ( let i = 0; i < nVertices; i ++ ) {\n\n\t\t\ttan1[ i ] = new Vector3();\n\t\t\ttan2[ i ] = new Vector3();\n\n\t\t}\n\n\t\tconst vA = new Vector3(),\n\t\t\tvB = new Vector3(),\n\t\t\tvC = new Vector3(),\n\n\t\t\tuvA = new Vector2(),\n\t\t\tuvB = new Vector2(),\n\t\t\tuvC = new Vector2(),\n\n\t\t\tsdir = new Vector3(),\n\t\t\ttdir = new Vector3();\n\n\t\tfunction handleTriangle( a, b, c ) {\n\n\t\t\tvA.fromArray( positions, a * 3 );\n\t\t\tvB.fromArray( positions, b * 3 );\n\t\t\tvC.fromArray( positions, c * 3 );\n\n\t\t\tuvA.fromArray( uvs, a * 2 );\n\t\t\tuvB.fromArray( uvs, b * 2 );\n\t\t\tuvC.fromArray( uvs, c * 2 );\n\n\t\t\tvB.sub( vA );\n\t\t\tvC.sub( vA );\n\n\t\t\tuvB.sub( uvA );\n\t\t\tuvC.sub( uvA );\n\n\t\t\tconst r = 1.0 / ( uvB.x * uvC.y - uvC.x * uvB.y );\n\n\t\t\t// silently ignore degenerate uv triangles having coincident or colinear vertices\n\n\t\t\tif ( ! isFinite( r ) ) return;\n\n\t\t\tsdir.copy( vB ).multiplyScalar( uvC.y ).addScaledVector( vC, - uvB.y ).multiplyScalar( r );\n\t\t\ttdir.copy( vC ).multiplyScalar( uvB.x ).addScaledVector( vB, - uvC.x ).multiplyScalar( r );\n\n\t\t\ttan1[ a ].add( sdir );\n\t\t\ttan1[ b ].add( sdir );\n\t\t\ttan1[ c ].add( sdir );\n\n\t\t\ttan2[ a ].add( tdir );\n\t\t\ttan2[ b ].add( tdir );\n\t\t\ttan2[ c ].add( tdir );\n\n\t\t}\n\n\t\tlet groups = this.groups;\n\n\t\tif ( groups.length === 0 ) {\n\n\t\t\tgroups = [ {\n\t\t\t\tstart: 0,\n\t\t\t\tcount: indices.length\n\t\t\t} ];\n\n\t\t}\n\n\t\tfor ( let i = 0, il = groups.length; i < il; ++ i ) {\n\n\t\t\tconst group = groups[ i ];\n\n\t\t\tconst start = group.start;\n\t\t\tconst count = group.count;\n\n\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\thandleTriangle(\n\t\t\t\t\tindices[ j + 0 ],\n\t\t\t\t\tindices[ j + 1 ],\n\t\t\t\t\tindices[ j + 2 ]\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst tmp = new Vector3(), tmp2 = new Vector3();\n\t\tconst n = new Vector3(), n2 = new Vector3();\n\n\t\tfunction handleVertex( v ) {\n\n\t\t\tn.fromArray( normals, v * 3 );\n\t\t\tn2.copy( n );\n\n\t\t\tconst t = tan1[ v ];\n\n\t\t\t// Gram-Schmidt orthogonalize\n\n\t\t\ttmp.copy( t );\n\t\t\ttmp.sub( n.multiplyScalar( n.dot( t ) ) ).normalize();\n\n\t\t\t// Calculate handedness\n\n\t\t\ttmp2.crossVectors( n2, t );\n\t\t\tconst test = tmp2.dot( tan2[ v ] );\n\t\t\tconst w = ( test < 0.0 ) ? - 1.0 : 1.0;\n\n\t\t\ttangents[ v * 4 ] = tmp.x;\n\t\t\ttangents[ v * 4 + 1 ] = tmp.y;\n\t\t\ttangents[ v * 4 + 2 ] = tmp.z;\n\t\t\ttangents[ v * 4 + 3 ] = w;\n\n\t\t}\n\n\t\tfor ( let i = 0, il = groups.length; i < il; ++ i ) {\n\n\t\t\tconst group = groups[ i ];\n\n\t\t\tconst start = group.start;\n\t\t\tconst count = group.count;\n\n\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\thandleVertex( indices[ j + 0 ] );\n\t\t\t\thandleVertex( indices[ j + 1 ] );\n\t\t\t\thandleVertex( indices[ j + 2 ] );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcomputeVertexNormals() {\n\n\t\tconst index = this.index;\n\t\tconst positionAttribute = this.getAttribute( 'position' );\n\n\t\tif ( positionAttribute !== undefined ) {\n\n\t\t\tlet normalAttribute = this.getAttribute( 'normal' );\n\n\t\t\tif ( normalAttribute === undefined ) {\n\n\t\t\t\tnormalAttribute = new BufferAttribute( new Float32Array( positionAttribute.count * 3 ), 3 );\n\t\t\t\tthis.setAttribute( 'normal', normalAttribute );\n\n\t\t\t} else {\n\n\t\t\t\t// reset existing normals to zero\n\n\t\t\t\tfor ( let i = 0, il = normalAttribute.count; i < il; i ++ ) {\n\n\t\t\t\t\tnormalAttribute.setXYZ( i, 0, 0, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst pA = new Vector3(), pB = new Vector3(), pC = new Vector3();\n\t\t\tconst nA = new Vector3(), nB = new Vector3(), nC = new Vector3();\n\t\t\tconst cb = new Vector3(), ab = new Vector3();\n\n\t\t\t// indexed elements\n\n\t\t\tif ( index ) {\n\n\t\t\t\tfor ( let i = 0, il = index.count; i < il; i += 3 ) {\n\n\t\t\t\t\tconst vA = index.getX( i + 0 );\n\t\t\t\t\tconst vB = index.getX( i + 1 );\n\t\t\t\t\tconst vC = index.getX( i + 2 );\n\n\t\t\t\t\tpA.fromBufferAttribute( positionAttribute, vA );\n\t\t\t\t\tpB.fromBufferAttribute( positionAttribute, vB );\n\t\t\t\t\tpC.fromBufferAttribute( positionAttribute, vC );\n\n\t\t\t\t\tcb.subVectors( pC, pB );\n\t\t\t\t\tab.subVectors( pA, pB );\n\t\t\t\t\tcb.cross( ab );\n\n\t\t\t\t\tnA.fromBufferAttribute( normalAttribute, vA );\n\t\t\t\t\tnB.fromBufferAttribute( normalAttribute, vB );\n\t\t\t\t\tnC.fromBufferAttribute( normalAttribute, vC );\n\n\t\t\t\t\tnA.add( cb );\n\t\t\t\t\tnB.add( cb );\n\t\t\t\t\tnC.add( cb );\n\n\t\t\t\t\tnormalAttribute.setXYZ( vA, nA.x, nA.y, nA.z );\n\t\t\t\t\tnormalAttribute.setXYZ( vB, nB.x, nB.y, nB.z );\n\t\t\t\t\tnormalAttribute.setXYZ( vC, nC.x, nC.y, nC.z );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// non-indexed elements (unconnected triangle soup)\n\n\t\t\t\tfor ( let i = 0, il = positionAttribute.count; i < il; i += 3 ) {\n\n\t\t\t\t\tpA.fromBufferAttribute( positionAttribute, i + 0 );\n\t\t\t\t\tpB.fromBufferAttribute( positionAttribute, i + 1 );\n\t\t\t\t\tpC.fromBufferAttribute( positionAttribute, i + 2 );\n\n\t\t\t\t\tcb.subVectors( pC, pB );\n\t\t\t\t\tab.subVectors( pA, pB );\n\t\t\t\t\tcb.cross( ab );\n\n\t\t\t\t\tnormalAttribute.setXYZ( i + 0, cb.x, cb.y, cb.z );\n\t\t\t\t\tnormalAttribute.setXYZ( i + 1, cb.x, cb.y, cb.z );\n\t\t\t\t\tnormalAttribute.setXYZ( i + 2, cb.x, cb.y, cb.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.normalizeNormals();\n\n\t\t\tnormalAttribute.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tmerge( geometry, offset ) {\n\n\t\tif ( ! ( geometry && geometry.isBufferGeometry ) ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', geometry );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( offset === undefined ) {\n\n\t\t\toffset = 0;\n\n\t\t\tconsole.warn(\n\t\t\t\t'THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. '\n\t\t\t\t+ 'Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge.'\n\t\t\t);\n\n\t\t}\n\n\t\tconst attributes = this.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tif ( geometry.attributes[ key ] === undefined ) continue;\n\n\t\t\tconst attribute1 = attributes[ key ];\n\t\t\tconst attributeArray1 = attribute1.array;\n\n\t\t\tconst attribute2 = geometry.attributes[ key ];\n\t\t\tconst attributeArray2 = attribute2.array;\n\n\t\t\tconst attributeOffset = attribute2.itemSize * offset;\n\t\t\tconst length = Math.min( attributeArray2.length, attributeArray1.length - attributeOffset );\n\n\t\t\tfor ( let i = 0, j = attributeOffset; i < length; i ++, j ++ ) {\n\n\t\t\t\tattributeArray1[ j ] = attributeArray2[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tnormalizeNormals() {\n\n\t\tconst normals = this.attributes.normal;\n\n\t\tfor ( let i = 0, il = normals.count; i < il; i ++ ) {\n\n\t\t\t_vector$8.fromBufferAttribute( normals, i );\n\n\t\t\t_vector$8.normalize();\n\n\t\t\tnormals.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t}\n\n\t}\n\n\ttoNonIndexed() {\n\n\t\tfunction convertBufferAttribute( attribute, indices ) {\n\n\t\t\tconst array = attribute.array;\n\t\t\tconst itemSize = attribute.itemSize;\n\t\t\tconst normalized = attribute.normalized;\n\n\t\t\tconst array2 = new array.constructor( indices.length * itemSize );\n\n\t\t\tlet index = 0, index2 = 0;\n\n\t\t\tfor ( let i = 0, l = indices.length; i < l; i ++ ) {\n\n\t\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\tindex = indices[ i ] * attribute.data.stride + attribute.offset;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tindex = indices[ i ] * itemSize;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let j = 0; j < itemSize; j ++ ) {\n\n\t\t\t\t\tarray2[ index2 ++ ] = array[ index ++ ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new BufferAttribute( array2, itemSize, normalized );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.index === null ) {\n\n\t\t\tconsole.warn( 'THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst geometry2 = new BufferGeometry();\n\n\t\tconst indices = this.index.array;\n\t\tconst attributes = this.attributes;\n\n\t\t// attributes\n\n\t\tfor ( const name in attributes ) {\n\n\t\t\tconst attribute = attributes[ name ];\n\n\t\t\tconst newAttribute = convertBufferAttribute( attribute, indices );\n\n\t\t\tgeometry2.setAttribute( name, newAttribute );\n\n\t\t}\n\n\t\t// morph attributes\n\n\t\tconst morphAttributes = this.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst morphArray = [];\n\t\t\tconst morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\tfor ( let i = 0, il = morphAttribute.length; i < il; i ++ ) {\n\n\t\t\t\tconst attribute = morphAttribute[ i ];\n\n\t\t\t\tconst newAttribute = convertBufferAttribute( attribute, indices );\n\n\t\t\t\tmorphArray.push( newAttribute );\n\n\t\t\t}\n\n\t\t\tgeometry2.morphAttributes[ name ] = morphArray;\n\n\t\t}\n\n\t\tgeometry2.morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t// groups\n\n\t\tconst groups = this.groups;\n\n\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\tconst group = groups[ i ];\n\t\t\tgeometry2.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t}\n\n\t\treturn geometry2;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'BufferGeometry',\n\t\t\t\tgenerator: 'BufferGeometry.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard BufferGeometry serialization\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\t\tif ( this.name !== '' ) data.name = this.name;\n\t\tif ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData;\n\n\t\tif ( this.parameters !== undefined ) {\n\n\t\t\tconst parameters = this.parameters;\n\n\t\t\tfor ( const key in parameters ) {\n\n\t\t\t\tif ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ];\n\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t}\n\n\t\t// for simplicity the code assumes attributes are not shared across geometries, see #15811\n\n\t\tdata.data = { attributes: {} };\n\n\t\tconst index = this.index;\n\n\t\tif ( index !== null ) {\n\n\t\t\tdata.data.index = {\n\t\t\t\ttype: index.array.constructor.name,\n\t\t\t\tarray: Array.prototype.slice.call( index.array )\n\t\t\t};\n\n\t\t}\n\n\t\tconst attributes = this.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\n\t\t\tdata.data.attributes[ key ] = attribute.toJSON( data.data );\n\n\t\t}\n\n\t\tconst morphAttributes = {};\n\t\tlet hasMorphAttributes = false;\n\n\t\tfor ( const key in this.morphAttributes ) {\n\n\t\t\tconst attributeArray = this.morphAttributes[ key ];\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0, il = attributeArray.length; i < il; i ++ ) {\n\n\t\t\t\tconst attribute = attributeArray[ i ];\n\n\t\t\t\tarray.push( attribute.toJSON( data.data ) );\n\n\t\t\t}\n\n\t\t\tif ( array.length > 0 ) {\n\n\t\t\t\tmorphAttributes[ key ] = array;\n\n\t\t\t\thasMorphAttributes = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( hasMorphAttributes ) {\n\n\t\t\tdata.data.morphAttributes = morphAttributes;\n\t\t\tdata.data.morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t}\n\n\t\tconst groups = this.groups;\n\n\t\tif ( groups.length > 0 ) {\n\n\t\t\tdata.data.groups = JSON.parse( JSON.stringify( groups ) );\n\n\t\t}\n\n\t\tconst boundingSphere = this.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tdata.data.boundingSphere = {\n\t\t\t\tcenter: boundingSphere.center.toArray(),\n\t\t\t\tradius: boundingSphere.radius\n\t\t\t};\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tclone() {\n\n\t\t/*\n\t\t // Handle primitives\n\n\t\t const parameters = this.parameters;\n\n\t\t if ( parameters !== undefined ) {\n\n\t\t const values = [];\n\n\t\t for ( const key in parameters ) {\n\n\t\t values.push( parameters[ key ] );\n\n\t\t }\n\n\t\t const geometry = Object.create( this.constructor.prototype );\n\t\t this.constructor.apply( geometry, values );\n\t\t return geometry;\n\n\t\t }\n\n\t\t return new this.constructor().copy( this );\n\t\t */\n\n\t\treturn new BufferGeometry().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\t// reset\n\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\t\tthis.morphAttributes = {};\n\t\tthis.groups = [];\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// used for storing cloned, shared data\n\n\t\tconst data = {};\n\n\t\t// name\n\n\t\tthis.name = source.name;\n\n\t\t// index\n\n\t\tconst index = source.index;\n\n\t\tif ( index !== null ) {\n\n\t\t\tthis.setIndex( index.clone( data ) );\n\n\t\t}\n\n\t\t// attributes\n\n\t\tconst attributes = source.attributes;\n\n\t\tfor ( const name in attributes ) {\n\n\t\t\tconst attribute = attributes[ name ];\n\t\t\tthis.setAttribute( name, attribute.clone( data ) );\n\n\t\t}\n\n\t\t// morph attributes\n\n\t\tconst morphAttributes = source.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst array = [];\n\t\t\tconst morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\tfor ( let i = 0, l = morphAttribute.length; i < l; i ++ ) {\n\n\t\t\t\tarray.push( morphAttribute[ i ].clone( data ) );\n\n\t\t\t}\n\n\t\t\tthis.morphAttributes[ name ] = array;\n\n\t\t}\n\n\t\tthis.morphTargetsRelative = source.morphTargetsRelative;\n\n\t\t// groups\n\n\t\tconst groups = source.groups;\n\n\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\tconst group = groups[ i ];\n\t\t\tthis.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t}\n\n\t\t// bounding box\n\n\t\tconst boundingBox = source.boundingBox;\n\n\t\tif ( boundingBox !== null ) {\n\n\t\t\tthis.boundingBox = boundingBox.clone();\n\n\t\t}\n\n\t\t// bounding sphere\n\n\t\tconst boundingSphere = source.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tthis.boundingSphere = boundingSphere.clone();\n\n\t\t}\n\n\t\t// draw range\n\n\t\tthis.drawRange.start = source.drawRange.start;\n\t\tthis.drawRange.count = source.drawRange.count;\n\n\t\t// user data\n\n\t\tthis.userData = source.userData;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nBufferGeometry.prototype.isBufferGeometry = true;\n\nconst _inverseMatrix$2 = /*@__PURE__*/ new Matrix4();\nconst _ray$2 = /*@__PURE__*/ new Ray();\nconst _sphere$3 = /*@__PURE__*/ new Sphere();\n\nconst _vA$1 = /*@__PURE__*/ new Vector3();\nconst _vB$1 = /*@__PURE__*/ new Vector3();\nconst _vC$1 = /*@__PURE__*/ new Vector3();\n\nconst _tempA = /*@__PURE__*/ new Vector3();\nconst _tempB = /*@__PURE__*/ new Vector3();\nconst _tempC = /*@__PURE__*/ new Vector3();\n\nconst _morphA = /*@__PURE__*/ new Vector3();\nconst _morphB = /*@__PURE__*/ new Vector3();\nconst _morphC = /*@__PURE__*/ new Vector3();\n\nconst _uvA$1 = /*@__PURE__*/ new Vector2();\nconst _uvB$1 = /*@__PURE__*/ new Vector2();\nconst _uvC$1 = /*@__PURE__*/ new Vector2();\n\nconst _intersectionPoint = /*@__PURE__*/ new Vector3();\nconst _intersectionPointWorld = /*@__PURE__*/ new Vector3();\n\nclass Mesh extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new MeshBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Mesh';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tif ( source.morphTargetInfluences !== undefined ) {\n\n\t\t\tthis.morphTargetInfluences = source.morphTargetInfluences.slice();\n\n\t\t}\n\n\t\tif ( source.morphTargetDictionary !== undefined ) {\n\n\t\t\tthis.morphTargetDictionary = Object.assign( {}, source.morphTargetDictionary );\n\n\t\t}\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst material = this.material;\n\t\tconst matrixWorld = this.matrixWorld;\n\n\t\tif ( material === undefined ) return;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$3.copy( geometry.boundingSphere );\n\t\t_sphere$3.applyMatrix4( matrixWorld );\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix$2.copy( matrixWorld ).invert();\n\t\t_ray$2.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$2 );\n\n\t\t// Check boundingBox before continuing\n\n\t\tif ( geometry.boundingBox !== null ) {\n\n\t\t\tif ( _ray$2.intersectsBox( geometry.boundingBox ) === false ) return;\n\n\t\t}\n\n\t\tlet intersection;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst position = geometry.attributes.position;\n\t\t\tconst morphPosition = geometry.morphAttributes.position;\n\t\t\tconst morphTargetsRelative = geometry.morphTargetsRelative;\n\t\t\tconst uv = geometry.attributes.uv;\n\t\t\tconst uv2 = geometry.attributes.uv2;\n\t\t\tconst groups = geometry.groups;\n\t\t\tconst drawRange = geometry.drawRange;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\t// indexed buffer geometry\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\tconst start = Math.max( group.start, drawRange.start );\n\t\t\t\t\t\tconst end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\t\tfor ( let j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\t\tconst a = index.getX( j );\n\t\t\t\t\t\t\tconst b = index.getX( j + 1 );\n\t\t\t\t\t\t\tconst c = index.getX( j + 2 );\n\n\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection( this, groupMaterial, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c );\n\n\t\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( j / 3 ); // triangle number in indexed buffer semantics\n\t\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\tfor ( let i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\t\tconst a = index.getX( i );\n\t\t\t\t\t\tconst b = index.getX( i + 1 );\n\t\t\t\t\t\tconst c = index.getX( i + 2 );\n\n\t\t\t\t\t\tintersection = checkBufferGeometryIntersection( this, material, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c );\n\n\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( i / 3 ); // triangle number in indexed buffer semantics\n\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( position !== undefined ) {\n\n\t\t\t\t// non-indexed buffer geometry\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\tconst start = Math.max( group.start, drawRange.start );\n\t\t\t\t\t\tconst end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\t\tfor ( let j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\t\tconst a = j;\n\t\t\t\t\t\t\tconst b = j + 1;\n\t\t\t\t\t\t\tconst c = j + 2;\n\n\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection( this, groupMaterial, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c );\n\n\t\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( j / 3 ); // triangle number in non-indexed buffer semantics\n\t\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\t\tconst end = Math.min( position.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\tfor ( let i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\t\tconst a = i;\n\t\t\t\t\t\tconst b = i + 1;\n\t\t\t\t\t\tconst c = i + 2;\n\n\t\t\t\t\t\tintersection = checkBufferGeometryIntersection( this, material, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c );\n\n\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics\n\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n}\n\nMesh.prototype.isMesh = true;\n\nfunction checkIntersection( object, material, raycaster, ray, pA, pB, pC, point ) {\n\n\tlet intersect;\n\n\tif ( material.side === BackSide ) {\n\n\t\tintersect = ray.intersectTriangle( pC, pB, pA, true, point );\n\n\t} else {\n\n\t\tintersect = ray.intersectTriangle( pA, pB, pC, material.side !== DoubleSide, point );\n\n\t}\n\n\tif ( intersect === null ) return null;\n\n\t_intersectionPointWorld.copy( point );\n\t_intersectionPointWorld.applyMatrix4( object.matrixWorld );\n\n\tconst distance = raycaster.ray.origin.distanceTo( _intersectionPointWorld );\n\n\tif ( distance < raycaster.near || distance > raycaster.far ) return null;\n\n\treturn {\n\t\tdistance: distance,\n\t\tpoint: _intersectionPointWorld.clone(),\n\t\tobject: object\n\t};\n\n}\n\nfunction checkBufferGeometryIntersection( object, material, raycaster, ray, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c ) {\n\n\t_vA$1.fromBufferAttribute( position, a );\n\t_vB$1.fromBufferAttribute( position, b );\n\t_vC$1.fromBufferAttribute( position, c );\n\n\tconst morphInfluences = object.morphTargetInfluences;\n\n\tif ( material.morphTargets && morphPosition && morphInfluences ) {\n\n\t\t_morphA.set( 0, 0, 0 );\n\t\t_morphB.set( 0, 0, 0 );\n\t\t_morphC.set( 0, 0, 0 );\n\n\t\tfor ( let i = 0, il = morphPosition.length; i < il; i ++ ) {\n\n\t\t\tconst influence = morphInfluences[ i ];\n\t\t\tconst morphAttribute = morphPosition[ i ];\n\n\t\t\tif ( influence === 0 ) continue;\n\n\t\t\t_tempA.fromBufferAttribute( morphAttribute, a );\n\t\t\t_tempB.fromBufferAttribute( morphAttribute, b );\n\t\t\t_tempC.fromBufferAttribute( morphAttribute, c );\n\n\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t_morphA.addScaledVector( _tempA, influence );\n\t\t\t\t_morphB.addScaledVector( _tempB, influence );\n\t\t\t\t_morphC.addScaledVector( _tempC, influence );\n\n\t\t\t} else {\n\n\t\t\t\t_morphA.addScaledVector( _tempA.sub( _vA$1 ), influence );\n\t\t\t\t_morphB.addScaledVector( _tempB.sub( _vB$1 ), influence );\n\t\t\t\t_morphC.addScaledVector( _tempC.sub( _vC$1 ), influence );\n\n\t\t\t}\n\n\t\t}\n\n\t\t_vA$1.add( _morphA );\n\t\t_vB$1.add( _morphB );\n\t\t_vC$1.add( _morphC );\n\n\t}\n\n\tif ( object.isSkinnedMesh ) {\n\n\t\tobject.boneTransform( a, _vA$1 );\n\t\tobject.boneTransform( b, _vB$1 );\n\t\tobject.boneTransform( c, _vC$1 );\n\n\t}\n\n\tconst intersection = checkIntersection( object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint );\n\n\tif ( intersection ) {\n\n\t\tif ( uv ) {\n\n\t\t\t_uvA$1.fromBufferAttribute( uv, a );\n\t\t\t_uvB$1.fromBufferAttribute( uv, b );\n\t\t\t_uvC$1.fromBufferAttribute( uv, c );\n\n\t\t\tintersection.uv = Triangle.getUV( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() );\n\n\t\t}\n\n\t\tif ( uv2 ) {\n\n\t\t\t_uvA$1.fromBufferAttribute( uv2, a );\n\t\t\t_uvB$1.fromBufferAttribute( uv2, b );\n\t\t\t_uvC$1.fromBufferAttribute( uv2, c );\n\n\t\t\tintersection.uv2 = Triangle.getUV( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() );\n\n\t\t}\n\n\t\tconst face = {\n\t\t\ta: a,\n\t\t\tb: b,\n\t\t\tc: c,\n\t\t\tnormal: new Vector3(),\n\t\t\tmaterialIndex: 0\n\t\t};\n\n\t\tTriangle.getNormal( _vA$1, _vB$1, _vC$1, face.normal );\n\n\t\tintersection.face = face;\n\n\t}\n\n\treturn intersection;\n\n}\n\nclass BoxGeometry extends BufferGeometry {\n\n\tconstructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'BoxGeometry';\n\n\t\tthis.parameters = {\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tdepth: depth,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\tdepthSegments: depthSegments\n\t\t};\n\n\t\tconst scope = this;\n\n\t\t// segments\n\n\t\twidthSegments = Math.floor( widthSegments );\n\t\theightSegments = Math.floor( heightSegments );\n\t\tdepthSegments = Math.floor( depthSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet numberOfVertices = 0;\n\t\tlet groupStart = 0;\n\n\t\t// build each side of the box geometry\n\n\t\tbuildPlane( 'z', 'y', 'x', - 1, - 1, depth, height, width, depthSegments, heightSegments, 0 ); // px\n\t\tbuildPlane( 'z', 'y', 'x', 1, - 1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx\n\t\tbuildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py\n\t\tbuildPlane( 'x', 'z', 'y', 1, - 1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny\n\t\tbuildPlane( 'x', 'y', 'z', 1, - 1, width, height, depth, widthSegments, heightSegments, 4 ); // pz\n\t\tbuildPlane( 'x', 'y', 'z', - 1, - 1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\tfunction buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) {\n\n\t\t\tconst segmentWidth = width / gridX;\n\t\t\tconst segmentHeight = height / gridY;\n\n\t\t\tconst widthHalf = width / 2;\n\t\t\tconst heightHalf = height / 2;\n\t\t\tconst depthHalf = depth / 2;\n\n\t\t\tconst gridX1 = gridX + 1;\n\t\t\tconst gridY1 = gridY + 1;\n\n\t\t\tlet vertexCounter = 0;\n\t\t\tlet groupCount = 0;\n\n\t\t\tconst vector = new Vector3();\n\n\t\t\t// generate vertices, normals and uvs\n\n\t\t\tfor ( let iy = 0; iy < gridY1; iy ++ ) {\n\n\t\t\t\tconst y = iy * segmentHeight - heightHalf;\n\n\t\t\t\tfor ( let ix = 0; ix < gridX1; ix ++ ) {\n\n\t\t\t\t\tconst x = ix * segmentWidth - widthHalf;\n\n\t\t\t\t\t// set values to correct vector component\n\n\t\t\t\t\tvector[ u ] = x * udir;\n\t\t\t\t\tvector[ v ] = y * vdir;\n\t\t\t\t\tvector[ w ] = depthHalf;\n\n\t\t\t\t\t// now apply vector to vertex buffer\n\n\t\t\t\t\tvertices.push( vector.x, vector.y, vector.z );\n\n\t\t\t\t\t// set values to correct vector component\n\n\t\t\t\t\tvector[ u ] = 0;\n\t\t\t\t\tvector[ v ] = 0;\n\t\t\t\t\tvector[ w ] = depth > 0 ? 1 : - 1;\n\n\t\t\t\t\t// now apply vector to normal buffer\n\n\t\t\t\t\tnormals.push( vector.x, vector.y, vector.z );\n\n\t\t\t\t\t// uvs\n\n\t\t\t\t\tuvs.push( ix / gridX );\n\t\t\t\t\tuvs.push( 1 - ( iy / gridY ) );\n\n\t\t\t\t\t// counters\n\n\t\t\t\t\tvertexCounter += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// indices\n\n\t\t\t// 1. you need three indices to draw a single face\n\t\t\t// 2. a single segment consists of two faces\n\t\t\t// 3. so we need to generate six (2*3) indices per segment\n\n\t\t\tfor ( let iy = 0; iy < gridY; iy ++ ) {\n\n\t\t\t\tfor ( let ix = 0; ix < gridX; ix ++ ) {\n\n\t\t\t\t\tconst a = numberOfVertices + ix + gridX1 * iy;\n\t\t\t\t\tconst b = numberOfVertices + ix + gridX1 * ( iy + 1 );\n\t\t\t\t\tconst c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 );\n\t\t\t\t\tconst d = numberOfVertices + ( ix + 1 ) + gridX1 * iy;\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t\t// increase counter\n\n\t\t\t\t\tgroupCount += 6;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, materialIndex );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t\t// update total number of vertices\n\n\t\t\tnumberOfVertices += vertexCounter;\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments );\n\n\t}\n\n}\n\n/**\n * Uniform Utilities\n */\n\nfunction cloneUniforms( src ) {\n\n\tconst dst = {};\n\n\tfor ( const u in src ) {\n\n\t\tdst[ u ] = {};\n\n\t\tfor ( const p in src[ u ] ) {\n\n\t\t\tconst property = src[ u ][ p ];\n\n\t\t\tif ( property && ( property.isColor ||\n\t\t\t\tproperty.isMatrix3 || property.isMatrix4 ||\n\t\t\t\tproperty.isVector2 || property.isVector3 || property.isVector4 ||\n\t\t\t\tproperty.isTexture || property.isQuaternion ) ) {\n\n\t\t\t\tdst[ u ][ p ] = property.clone();\n\n\t\t\t} else if ( Array.isArray( property ) ) {\n\n\t\t\t\tdst[ u ][ p ] = property.slice();\n\n\t\t\t} else {\n\n\t\t\t\tdst[ u ][ p ] = property;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn dst;\n\n}\n\nfunction mergeUniforms( uniforms ) {\n\n\tconst merged = {};\n\n\tfor ( let u = 0; u < uniforms.length; u ++ ) {\n\n\t\tconst tmp = cloneUniforms( uniforms[ u ] );\n\n\t\tfor ( const p in tmp ) {\n\n\t\t\tmerged[ p ] = tmp[ p ];\n\n\t\t}\n\n\t}\n\n\treturn merged;\n\n}\n\n// Legacy\n\nconst UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms };\n\nvar default_vertex = \"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\n\nvar default_fragment = \"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";\n\n/**\n * parameters = {\n * defines: { \"label\" : \"value\" },\n * uniforms: { \"parameter1\": { value: 1.0 }, \"parameter2\": { value2: 2 } },\n *\n * fragmentShader: <string>,\n * vertexShader: <string>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * lights: <bool>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>\n * }\n */\n\nclass ShaderMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ShaderMaterial';\n\n\t\tthis.defines = {};\n\t\tthis.uniforms = {};\n\n\t\tthis.vertexShader = default_vertex;\n\t\tthis.fragmentShader = default_fragment;\n\n\t\tthis.linewidth = 1;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.fog = false; // set to use scene fog\n\t\tthis.lights = false; // set to use scene lights\n\t\tthis.clipping = false; // set to use user-defined clipping planes\n\n\t\tthis.morphTargets = false; // set to use morph targets\n\t\tthis.morphNormals = false; // set to use morph normals\n\n\t\tthis.extensions = {\n\t\t\tderivatives: false, // set to use derivatives\n\t\t\tfragDepth: false, // set to use fragment depth values\n\t\t\tdrawBuffers: false, // set to use draw buffers\n\t\t\tshaderTextureLOD: false // set to use shader texture LOD\n\t\t};\n\n\t\t// When rendered geometry doesn't include these attributes but the material does,\n\t\t// use these default values in WebGL. This avoids errors when buffer data is missing.\n\t\tthis.defaultAttributeValues = {\n\t\t\t'color': [ 1, 1, 1 ],\n\t\t\t'uv': [ 0, 0 ],\n\t\t\t'uv2': [ 0, 0 ]\n\t\t};\n\n\t\tthis.index0AttributeName = undefined;\n\t\tthis.uniformsNeedUpdate = false;\n\n\t\tthis.glslVersion = null;\n\n\t\tif ( parameters !== undefined ) {\n\n\t\t\tif ( parameters.attributes !== undefined ) {\n\n\t\t\t\tconsole.error( 'THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t\tthis.setValues( parameters );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.fragmentShader = source.fragmentShader;\n\t\tthis.vertexShader = source.vertexShader;\n\n\t\tthis.uniforms = cloneUniforms( source.uniforms );\n\n\t\tthis.defines = Object.assign( {}, source.defines );\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\tthis.lights = source.lights;\n\t\tthis.clipping = source.clipping;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.extensions = Object.assign( {}, source.extensions );\n\n\t\tthis.glslVersion = source.glslVersion;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.glslVersion = this.glslVersion;\n\t\tdata.uniforms = {};\n\n\t\tfor ( const name in this.uniforms ) {\n\n\t\t\tconst uniform = this.uniforms[ name ];\n\t\t\tconst value = uniform.value;\n\n\t\t\tif ( value && value.isTexture ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 't',\n\t\t\t\t\tvalue: value.toJSON( meta ).uuid\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isColor ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'c',\n\t\t\t\t\tvalue: value.getHex()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector2 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v2',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector3 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector4 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isMatrix3 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'm3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isMatrix4 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'm4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\tvalue: value\n\t\t\t\t};\n\n\t\t\t\t// note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( Object.keys( this.defines ).length > 0 ) data.defines = this.defines;\n\n\t\tdata.vertexShader = this.vertexShader;\n\t\tdata.fragmentShader = this.fragmentShader;\n\n\t\tconst extensions = {};\n\n\t\tfor ( const key in this.extensions ) {\n\n\t\t\tif ( this.extensions[ key ] === true ) extensions[ key ] = true;\n\n\t\t}\n\n\t\tif ( Object.keys( extensions ).length > 0 ) data.extensions = extensions;\n\n\t\treturn data;\n\n\t}\n\n}\n\nShaderMaterial.prototype.isShaderMaterial = true;\n\nclass Camera extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'Camera';\n\n\t\tthis.matrixWorldInverse = new Matrix4();\n\n\t\tthis.projectionMatrix = new Matrix4();\n\t\tthis.projectionMatrixInverse = new Matrix4();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.matrixWorldInverse.copy( source.matrixWorldInverse );\n\n\t\tthis.projectionMatrix.copy( source.projectionMatrix );\n\t\tthis.projectionMatrixInverse.copy( source.projectionMatrixInverse );\n\n\t\treturn this;\n\n\t}\n\n\tgetWorldDirection( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tconst e = this.matrixWorld.elements;\n\n\t\treturn target.set( - e[ 8 ], - e[ 9 ], - e[ 10 ] ).normalize();\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tthis.matrixWorldInverse.copy( this.matrixWorld ).invert();\n\n\t}\n\n\tupdateWorldMatrix( updateParents, updateChildren ) {\n\n\t\tsuper.updateWorldMatrix( updateParents, updateChildren );\n\n\t\tthis.matrixWorldInverse.copy( this.matrixWorld ).invert();\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nCamera.prototype.isCamera = true;\n\nclass PerspectiveCamera extends Camera {\n\n\tconstructor( fov = 50, aspect = 1, near = 0.1, far = 2000 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PerspectiveCamera';\n\n\t\tthis.fov = fov;\n\t\tthis.zoom = 1;\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.focus = 10;\n\n\t\tthis.aspect = aspect;\n\t\tthis.view = null;\n\n\t\tthis.filmGauge = 35;\t// width of the film (default in millimeters)\n\t\tthis.filmOffset = 0;\t// horizontal film offset (same unit as gauge)\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.fov = source.fov;\n\t\tthis.zoom = source.zoom;\n\n\t\tthis.near = source.near;\n\t\tthis.far = source.far;\n\t\tthis.focus = source.focus;\n\n\t\tthis.aspect = source.aspect;\n\t\tthis.view = source.view === null ? null : Object.assign( {}, source.view );\n\n\t\tthis.filmGauge = source.filmGauge;\n\t\tthis.filmOffset = source.filmOffset;\n\n\t\treturn this;\n\n\t}\n\n\t/**\n\t * Sets the FOV by focal length in respect to the current .filmGauge.\n\t *\n\t * The default film gauge is 35, so that the focal length can be specified for\n\t * a 35mm (full frame) camera.\n\t *\n\t * Values for focal length and film gauge must have the same unit.\n\t */\n\tsetFocalLength( focalLength ) {\n\n\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\tconst vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\n\t\tthis.fov = RAD2DEG * 2 * Math.atan( vExtentSlope );\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\t/**\n\t * Calculates the focal length from the current .fov and .filmGauge.\n\t */\n\tgetFocalLength() {\n\n\t\tconst vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov );\n\n\t\treturn 0.5 * this.getFilmHeight() / vExtentSlope;\n\n\t}\n\n\tgetEffectiveFOV() {\n\n\t\treturn RAD2DEG * 2 * Math.atan(\n\t\t\tMath.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom );\n\n\t}\n\n\tgetFilmWidth() {\n\n\t\t// film not completely covered in portrait format (aspect < 1)\n\t\treturn this.filmGauge * Math.min( this.aspect, 1 );\n\n\t}\n\n\tgetFilmHeight() {\n\n\t\t// film not completely covered in landscape format (aspect > 1)\n\t\treturn this.filmGauge / Math.max( this.aspect, 1 );\n\n\t}\n\n\t/**\n\t * Sets an offset in a larger frustum. This is useful for multi-window or\n\t * multi-monitor/multi-machine setups.\n\t *\n\t * For example, if you have 3x2 monitors and each monitor is 1920x1080 and\n\t * the monitors are in grid like this\n\t *\n\t * +---+---+---+\n\t * | A | B | C |\n\t * +---+---+---+\n\t * | D | E | F |\n\t * +---+---+---+\n\t *\n\t * then for each monitor you would call it like this\n\t *\n\t * const w = 1920;\n\t * const h = 1080;\n\t * const fullWidth = w * 3;\n\t * const fullHeight = h * 2;\n\t *\n\t * --A--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );\n\t * --B--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );\n\t * --C--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );\n\t * --D--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );\n\t * --E--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );\n\t * --F--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );\n\t *\n\t * Note there is no reason monitors have to be the same size or in a grid.\n\t */\n\tsetViewOffset( fullWidth, fullHeight, x, y, width, height ) {\n\n\t\tthis.aspect = fullWidth / fullHeight;\n\n\t\tif ( this.view === null ) {\n\n\t\t\tthis.view = {\n\t\t\t\tenabled: true,\n\t\t\t\tfullWidth: 1,\n\t\t\t\tfullHeight: 1,\n\t\t\t\toffsetX: 0,\n\t\t\t\toffsetY: 0,\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1\n\t\t\t};\n\n\t\t}\n\n\t\tthis.view.enabled = true;\n\t\tthis.view.fullWidth = fullWidth;\n\t\tthis.view.fullHeight = fullHeight;\n\t\tthis.view.offsetX = x;\n\t\tthis.view.offsetY = y;\n\t\tthis.view.width = width;\n\t\tthis.view.height = height;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tclearViewOffset() {\n\n\t\tif ( this.view !== null ) {\n\n\t\t\tthis.view.enabled = false;\n\n\t\t}\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tupdateProjectionMatrix() {\n\n\t\tconst near = this.near;\n\t\tlet top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom;\n\t\tlet height = 2 * top;\n\t\tlet width = this.aspect * height;\n\t\tlet left = - 0.5 * width;\n\t\tconst view = this.view;\n\n\t\tif ( this.view !== null && this.view.enabled ) {\n\n\t\t\tconst fullWidth = view.fullWidth,\n\t\t\t\tfullHeight = view.fullHeight;\n\n\t\t\tleft += view.offsetX * width / fullWidth;\n\t\t\ttop -= view.offsetY * height / fullHeight;\n\t\t\twidth *= view.width / fullWidth;\n\t\t\theight *= view.height / fullHeight;\n\n\t\t}\n\n\t\tconst skew = this.filmOffset;\n\t\tif ( skew !== 0 ) left += near * skew / this.getFilmWidth();\n\n\t\tthis.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far );\n\n\t\tthis.projectionMatrixInverse.copy( this.projectionMatrix ).invert();\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.fov = this.fov;\n\t\tdata.object.zoom = this.zoom;\n\n\t\tdata.object.near = this.near;\n\t\tdata.object.far = this.far;\n\t\tdata.object.focus = this.focus;\n\n\t\tdata.object.aspect = this.aspect;\n\n\t\tif ( this.view !== null ) data.object.view = Object.assign( {}, this.view );\n\n\t\tdata.object.filmGauge = this.filmGauge;\n\t\tdata.object.filmOffset = this.filmOffset;\n\n\t\treturn data;\n\n\t}\n\n}\n\nPerspectiveCamera.prototype.isPerspectiveCamera = true;\n\nconst fov = 90, aspect = 1;\n\nclass CubeCamera extends Object3D {\n\n\tconstructor( near, far, renderTarget ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CubeCamera';\n\n\t\tif ( renderTarget.isWebGLCubeRenderTarget !== true ) {\n\n\t\t\tconsole.error( 'THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.renderTarget = renderTarget;\n\n\t\tconst cameraPX = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPX.layers = this.layers;\n\t\tcameraPX.up.set( 0, - 1, 0 );\n\t\tcameraPX.lookAt( new Vector3( 1, 0, 0 ) );\n\t\tthis.add( cameraPX );\n\n\t\tconst cameraNX = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNX.layers = this.layers;\n\t\tcameraNX.up.set( 0, - 1, 0 );\n\t\tcameraNX.lookAt( new Vector3( - 1, 0, 0 ) );\n\t\tthis.add( cameraNX );\n\n\t\tconst cameraPY = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPY.layers = this.layers;\n\t\tcameraPY.up.set( 0, 0, 1 );\n\t\tcameraPY.lookAt( new Vector3( 0, 1, 0 ) );\n\t\tthis.add( cameraPY );\n\n\t\tconst cameraNY = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNY.layers = this.layers;\n\t\tcameraNY.up.set( 0, 0, - 1 );\n\t\tcameraNY.lookAt( new Vector3( 0, - 1, 0 ) );\n\t\tthis.add( cameraNY );\n\n\t\tconst cameraPZ = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPZ.layers = this.layers;\n\t\tcameraPZ.up.set( 0, - 1, 0 );\n\t\tcameraPZ.lookAt( new Vector3( 0, 0, 1 ) );\n\t\tthis.add( cameraPZ );\n\n\t\tconst cameraNZ = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNZ.layers = this.layers;\n\t\tcameraNZ.up.set( 0, - 1, 0 );\n\t\tcameraNZ.lookAt( new Vector3( 0, 0, - 1 ) );\n\t\tthis.add( cameraNZ );\n\n\t}\n\n\tupdate( renderer, scene ) {\n\n\t\tif ( this.parent === null ) this.updateMatrixWorld();\n\n\t\tconst renderTarget = this.renderTarget;\n\n\t\tconst [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = this.children;\n\n\t\tconst currentXrEnabled = renderer.xr.enabled;\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\trenderer.xr.enabled = false;\n\n\t\tconst generateMipmaps = renderTarget.texture.generateMipmaps;\n\n\t\trenderTarget.texture.generateMipmaps = false;\n\n\t\trenderer.setRenderTarget( renderTarget, 0 );\n\t\trenderer.render( scene, cameraPX );\n\n\t\trenderer.setRenderTarget( renderTarget, 1 );\n\t\trenderer.render( scene, cameraNX );\n\n\t\trenderer.setRenderTarget( renderTarget, 2 );\n\t\trenderer.render( scene, cameraPY );\n\n\t\trenderer.setRenderTarget( renderTarget, 3 );\n\t\trenderer.render( scene, cameraNY );\n\n\t\trenderer.setRenderTarget( renderTarget, 4 );\n\t\trenderer.render( scene, cameraPZ );\n\n\t\trenderTarget.texture.generateMipmaps = generateMipmaps;\n\n\t\trenderer.setRenderTarget( renderTarget, 5 );\n\t\trenderer.render( scene, cameraNZ );\n\n\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t\trenderer.xr.enabled = currentXrEnabled;\n\n\t}\n\n}\n\nclass CubeTexture extends Texture {\n\n\tconstructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) {\n\n\t\timages = images !== undefined ? images : [];\n\t\tmapping = mapping !== undefined ? mapping : CubeReflectionMapping;\n\t\tformat = format !== undefined ? format : RGBFormat;\n\n\t\tsuper( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );\n\n\t\t// Why CubeTexture._needsFlipEnvMap is necessary:\n\t\t//\n\t\t// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)\n\t\t// in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,\n\t\t// in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.\n\n\t\t// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped\n\t\t// and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false)\n\t\t// when using WebGLCubeRenderTarget.texture as a cube texture.\n\n\t\tthis._needsFlipEnvMap = true;\n\n\t\tthis.flipY = false;\n\n\t}\n\n\tget images() {\n\n\t\treturn this.image;\n\n\t}\n\n\tset images( value ) {\n\n\t\tthis.image = value;\n\n\t}\n\n}\n\nCubeTexture.prototype.isCubeTexture = true;\n\nclass WebGLCubeRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( size, options, dummy ) {\n\n\t\tif ( Number.isInteger( options ) ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )' );\n\n\t\t\toptions = dummy;\n\n\t\t}\n\n\t\tsuper( size, size, options );\n\n\t\toptions = options || {};\n\n\t\tthis.texture = new CubeTexture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );\n\n\t\tthis.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\tthis.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\n\t\tthis.texture._needsFlipEnvMap = false;\n\n\t}\n\n\tfromEquirectangularTexture( renderer, texture ) {\n\n\t\tthis.texture.type = texture.type;\n\t\tthis.texture.format = RGBAFormat; // see #18859\n\t\tthis.texture.encoding = texture.encoding;\n\n\t\tthis.texture.generateMipmaps = texture.generateMipmaps;\n\t\tthis.texture.minFilter = texture.minFilter;\n\t\tthis.texture.magFilter = texture.magFilter;\n\n\t\tconst shader = {\n\n\t\t\tuniforms: {\n\t\t\t\ttEquirect: { value: null },\n\t\t\t},\n\n\t\t\tvertexShader: /* glsl */`\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t`,\n\n\t\t\tfragmentShader: /* glsl */`\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`\n\t\t};\n\n\t\tconst geometry = new BoxGeometry( 5, 5, 5 );\n\n\t\tconst material = new ShaderMaterial( {\n\n\t\t\tname: 'CubemapFromEquirect',\n\n\t\t\tuniforms: cloneUniforms( shader.uniforms ),\n\t\t\tvertexShader: shader.vertexShader,\n\t\t\tfragmentShader: shader.fragmentShader,\n\t\t\tside: BackSide,\n\t\t\tblending: NoBlending\n\n\t\t} );\n\n\t\tmaterial.uniforms.tEquirect.value = texture;\n\n\t\tconst mesh = new Mesh( geometry, material );\n\n\t\tconst currentMinFilter = texture.minFilter;\n\n\t\t// Avoid blurred poles\n\t\tif ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter;\n\n\t\tconst camera = new CubeCamera( 1, 10, this );\n\t\tcamera.update( renderer, mesh );\n\n\t\ttexture.minFilter = currentMinFilter;\n\n\t\tmesh.geometry.dispose();\n\t\tmesh.material.dispose();\n\n\t\treturn this;\n\n\t}\n\n\tclear( renderer, color, depth, stencil ) {\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\trenderer.setRenderTarget( this, i );\n\n\t\t\trenderer.clear( color, depth, stencil );\n\n\t\t}\n\n\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t}\n\n}\n\nWebGLCubeRenderTarget.prototype.isWebGLCubeRenderTarget = true;\n\nconst _vector1 = /*@__PURE__*/ new Vector3();\nconst _vector2 = /*@__PURE__*/ new Vector3();\nconst _normalMatrix = /*@__PURE__*/ new Matrix3();\n\nclass Plane {\n\n\tconstructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) {\n\n\t\t// normal is assumed to be normalized\n\n\t\tthis.normal = normal;\n\t\tthis.constant = constant;\n\n\t}\n\n\tset( normal, constant ) {\n\n\t\tthis.normal.copy( normal );\n\t\tthis.constant = constant;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponents( x, y, z, w ) {\n\n\t\tthis.normal.set( x, y, z );\n\t\tthis.constant = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromNormalAndCoplanarPoint( normal, point ) {\n\n\t\tthis.normal.copy( normal );\n\t\tthis.constant = - point.dot( this.normal );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCoplanarPoints( a, b, c ) {\n\n\t\tconst normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize();\n\n\t\t// Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n\n\t\tthis.setFromNormalAndCoplanarPoint( normal, a );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( plane ) {\n\n\t\tthis.normal.copy( plane.normal );\n\t\tthis.constant = plane.constant;\n\n\t\treturn this;\n\n\t}\n\n\tnormalize() {\n\n\t\t// Note: will lead to a divide by zero if the plane is invalid.\n\n\t\tconst inverseNormalLength = 1.0 / this.normal.length();\n\t\tthis.normal.multiplyScalar( inverseNormalLength );\n\t\tthis.constant *= inverseNormalLength;\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.constant *= - 1;\n\t\tthis.normal.negate();\n\n\t\treturn this;\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn this.normal.dot( point ) + this.constant;\n\n\t}\n\n\tdistanceToSphere( sphere ) {\n\n\t\treturn this.distanceToPoint( sphere.center ) - sphere.radius;\n\n\t}\n\n\tprojectPoint( point, target ) {\n\n\t\treturn target.copy( this.normal ).multiplyScalar( - this.distanceToPoint( point ) ).add( point );\n\n\t}\n\n\tintersectLine( line, target ) {\n\n\t\tconst direction = line.delta( _vector1 );\n\n\t\tconst denominator = this.normal.dot( direction );\n\n\t\tif ( denominator === 0 ) {\n\n\t\t\t// line is coplanar, return origin\n\t\t\tif ( this.distanceToPoint( line.start ) === 0 ) {\n\n\t\t\t\treturn target.copy( line.start );\n\n\t\t\t}\n\n\t\t\t// Unsure if this is the correct method to handle this case.\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst t = - ( line.start.dot( this.normal ) + this.constant ) / denominator;\n\n\t\tif ( t < 0 || t > 1 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\treturn target.copy( direction ).multiplyScalar( t ).add( line.start );\n\n\t}\n\n\tintersectsLine( line ) {\n\n\t\t// Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n\n\t\tconst startSign = this.distanceToPoint( line.start );\n\t\tconst endSign = this.distanceToPoint( line.end );\n\n\t\treturn ( startSign < 0 && endSign > 0 ) || ( endSign < 0 && startSign > 0 );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsPlane( this );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\treturn sphere.intersectsPlane( this );\n\n\t}\n\n\tcoplanarPoint( target ) {\n\n\t\treturn target.copy( this.normal ).multiplyScalar( - this.constant );\n\n\t}\n\n\tapplyMatrix4( matrix, optionalNormalMatrix ) {\n\n\t\tconst normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix );\n\n\t\tconst referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix );\n\n\t\tconst normal = this.normal.applyMatrix3( normalMatrix ).normalize();\n\n\t\tthis.constant = - referencePoint.dot( normal );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.constant -= offset.dot( this.normal );\n\n\t\treturn this;\n\n\t}\n\n\tequals( plane ) {\n\n\t\treturn plane.normal.equals( this.normal ) && ( plane.constant === this.constant );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nPlane.prototype.isPlane = true;\n\nconst _sphere$2 = /*@__PURE__*/ new Sphere();\nconst _vector$7 = /*@__PURE__*/ new Vector3();\n\nclass Frustum {\n\n\tconstructor( p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane() ) {\n\n\t\tthis.planes = [ p0, p1, p2, p3, p4, p5 ];\n\n\t}\n\n\tset( p0, p1, p2, p3, p4, p5 ) {\n\n\t\tconst planes = this.planes;\n\n\t\tplanes[ 0 ].copy( p0 );\n\t\tplanes[ 1 ].copy( p1 );\n\t\tplanes[ 2 ].copy( p2 );\n\t\tplanes[ 3 ].copy( p3 );\n\t\tplanes[ 4 ].copy( p4 );\n\t\tplanes[ 5 ].copy( p5 );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( frustum ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tplanes[ i ].copy( frustum.planes[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromProjectionMatrix( m ) {\n\n\t\tconst planes = this.planes;\n\t\tconst me = m.elements;\n\t\tconst me0 = me[ 0 ], me1 = me[ 1 ], me2 = me[ 2 ], me3 = me[ 3 ];\n\t\tconst me4 = me[ 4 ], me5 = me[ 5 ], me6 = me[ 6 ], me7 = me[ 7 ];\n\t\tconst me8 = me[ 8 ], me9 = me[ 9 ], me10 = me[ 10 ], me11 = me[ 11 ];\n\t\tconst me12 = me[ 12 ], me13 = me[ 13 ], me14 = me[ 14 ], me15 = me[ 15 ];\n\n\t\tplanes[ 0 ].setComponents( me3 - me0, me7 - me4, me11 - me8, me15 - me12 ).normalize();\n\t\tplanes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize();\n\t\tplanes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize();\n\t\tplanes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize();\n\t\tplanes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize();\n\t\tplanes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize();\n\n\t\treturn this;\n\n\t}\n\n\tintersectsObject( object ) {\n\n\t\tconst geometry = object.geometry;\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$2.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );\n\n\t\treturn this.intersectsSphere( _sphere$2 );\n\n\t}\n\n\tintersectsSprite( sprite ) {\n\n\t\t_sphere$2.center.set( 0, 0, 0 );\n\t\t_sphere$2.radius = 0.7071067811865476;\n\t\t_sphere$2.applyMatrix4( sprite.matrixWorld );\n\n\t\treturn this.intersectsSphere( _sphere$2 );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\tconst planes = this.planes;\n\t\tconst center = sphere.center;\n\t\tconst negRadius = - sphere.radius;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst distance = planes[ i ].distanceToPoint( center );\n\n\t\t\tif ( distance < negRadius ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst plane = planes[ i ];\n\n\t\t\t// corner at max distance\n\n\t\t\t_vector$7.x = plane.normal.x > 0 ? box.max.x : box.min.x;\n\t\t\t_vector$7.y = plane.normal.y > 0 ? box.max.y : box.min.y;\n\t\t\t_vector$7.z = plane.normal.z > 0 ? box.max.z : box.min.z;\n\n\t\t\tif ( plane.distanceToPoint( _vector$7 ) < 0 ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tif ( planes[ i ].distanceToPoint( point ) < 0 ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nfunction WebGLAnimation() {\n\n\tlet context = null;\n\tlet isAnimating = false;\n\tlet animationLoop = null;\n\tlet requestId = null;\n\n\tfunction onAnimationFrame( time, frame ) {\n\n\t\tanimationLoop( time, frame );\n\n\t\trequestId = context.requestAnimationFrame( onAnimationFrame );\n\n\t}\n\n\treturn {\n\n\t\tstart: function () {\n\n\t\t\tif ( isAnimating === true ) return;\n\t\t\tif ( animationLoop === null ) return;\n\n\t\t\trequestId = context.requestAnimationFrame( onAnimationFrame );\n\n\t\t\tisAnimating = true;\n\n\t\t},\n\n\t\tstop: function () {\n\n\t\t\tcontext.cancelAnimationFrame( requestId );\n\n\t\t\tisAnimating = false;\n\n\t\t},\n\n\t\tsetAnimationLoop: function ( callback ) {\n\n\t\t\tanimationLoop = callback;\n\n\t\t},\n\n\t\tsetContext: function ( value ) {\n\n\t\t\tcontext = value;\n\n\t\t}\n\n\t};\n\n}\n\nfunction WebGLAttributes( gl, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tconst buffers = new WeakMap();\n\n\tfunction createBuffer( attribute, bufferType ) {\n\n\t\tconst array = attribute.array;\n\t\tconst usage = attribute.usage;\n\n\t\tconst buffer = gl.createBuffer();\n\n\t\tgl.bindBuffer( bufferType, buffer );\n\t\tgl.bufferData( bufferType, array, usage );\n\n\t\tattribute.onUploadCallback();\n\n\t\tlet type = 5126;\n\n\t\tif ( array instanceof Float32Array ) {\n\n\t\t\ttype = 5126;\n\n\t\t} else if ( array instanceof Float64Array ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.' );\n\n\t\t} else if ( array instanceof Uint16Array ) {\n\n\t\t\tif ( attribute.isFloat16BufferAttribute ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\ttype = 5131;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\ttype = 5123;\n\n\t\t\t}\n\n\t\t} else if ( array instanceof Int16Array ) {\n\n\t\t\ttype = 5122;\n\n\t\t} else if ( array instanceof Uint32Array ) {\n\n\t\t\ttype = 5125;\n\n\t\t} else if ( array instanceof Int32Array ) {\n\n\t\t\ttype = 5124;\n\n\t\t} else if ( array instanceof Int8Array ) {\n\n\t\t\ttype = 5120;\n\n\t\t} else if ( array instanceof Uint8Array ) {\n\n\t\t\ttype = 5121;\n\n\t\t} else if ( array instanceof Uint8ClampedArray ) {\n\n\t\t\ttype = 5121;\n\n\t\t}\n\n\t\treturn {\n\t\t\tbuffer: buffer,\n\t\t\ttype: type,\n\t\t\tbytesPerElement: array.BYTES_PER_ELEMENT,\n\t\t\tversion: attribute.version\n\t\t};\n\n\t}\n\n\tfunction updateBuffer( buffer, attribute, bufferType ) {\n\n\t\tconst array = attribute.array;\n\t\tconst updateRange = attribute.updateRange;\n\n\t\tgl.bindBuffer( bufferType, buffer );\n\n\t\tif ( updateRange.count === - 1 ) {\n\n\t\t\t// Not using update ranges\n\n\t\t\tgl.bufferSubData( bufferType, 0, array );\n\n\t\t} else {\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\tgl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,\n\t\t\t\t\tarray, updateRange.offset, updateRange.count );\n\n\t\t\t} else {\n\n\t\t\t\tgl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,\n\t\t\t\t\tarray.subarray( updateRange.offset, updateRange.offset + updateRange.count ) );\n\n\t\t\t}\n\n\t\t\tupdateRange.count = - 1; // reset range\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction get( attribute ) {\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\treturn buffers.get( attribute );\n\n\t}\n\n\tfunction remove( attribute ) {\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\tconst data = buffers.get( attribute );\n\n\t\tif ( data ) {\n\n\t\t\tgl.deleteBuffer( data.buffer );\n\n\t\t\tbuffers.delete( attribute );\n\n\t\t}\n\n\t}\n\n\tfunction update( attribute, bufferType ) {\n\n\t\tif ( attribute.isGLBufferAttribute ) {\n\n\t\t\tconst cached = buffers.get( attribute );\n\n\t\t\tif ( ! cached || cached.version < attribute.version ) {\n\n\t\t\t\tbuffers.set( attribute, {\n\t\t\t\t\tbuffer: attribute.buffer,\n\t\t\t\t\ttype: attribute.type,\n\t\t\t\t\tbytesPerElement: attribute.elementSize,\n\t\t\t\t\tversion: attribute.version\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\tconst data = buffers.get( attribute );\n\n\t\tif ( data === undefined ) {\n\n\t\t\tbuffers.set( attribute, createBuffer( attribute, bufferType ) );\n\n\t\t} else if ( data.version < attribute.version ) {\n\n\t\t\tupdateBuffer( data.buffer, attribute, bufferType );\n\n\t\t\tdata.version = attribute.version;\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\tget: get,\n\t\tremove: remove,\n\t\tupdate: update\n\n\t};\n\n}\n\nclass PlaneGeometry extends BufferGeometry {\n\n\tconstructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) {\n\n\t\tsuper();\n\t\tthis.type = 'PlaneGeometry';\n\n\t\tthis.parameters = {\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments\n\t\t};\n\n\t\tconst width_half = width / 2;\n\t\tconst height_half = height / 2;\n\n\t\tconst gridX = Math.floor( widthSegments );\n\t\tconst gridY = Math.floor( heightSegments );\n\n\t\tconst gridX1 = gridX + 1;\n\t\tconst gridY1 = gridY + 1;\n\n\t\tconst segment_width = width / gridX;\n\t\tconst segment_height = height / gridY;\n\n\t\t//\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\tfor ( let iy = 0; iy < gridY1; iy ++ ) {\n\n\t\t\tconst y = iy * segment_height - height_half;\n\n\t\t\tfor ( let ix = 0; ix < gridX1; ix ++ ) {\n\n\t\t\t\tconst x = ix * segment_width - width_half;\n\n\t\t\t\tvertices.push( x, - y, 0 );\n\n\t\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t\tuvs.push( ix / gridX );\n\t\t\t\tuvs.push( 1 - ( iy / gridY ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let iy = 0; iy < gridY; iy ++ ) {\n\n\t\t\tfor ( let ix = 0; ix < gridX; ix ++ ) {\n\n\t\t\t\tconst a = ix + gridX1 * iy;\n\t\t\t\tconst b = ix + gridX1 * ( iy + 1 );\n\t\t\t\tconst c = ( ix + 1 ) + gridX1 * ( iy + 1 );\n\t\t\t\tconst d = ( ix + 1 ) + gridX1 * iy;\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments );\n\n\t}\n\n}\n\nvar alphamap_fragment = \"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\";\n\nvar alphamap_pars_fragment = \"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\nvar alphatest_fragment = \"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\";\n\nvar aomap_fragment = \"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\";\n\nvar aomap_pars_fragment = \"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\";\n\nvar begin_vertex = \"vec3 transformed = vec3( position );\";\n\nvar beginnormal_vertex = \"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\";\n\nvar bsdfs = \"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\\n}\\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\tif( cutoffDistance > 0.0 ) {\\n\\t\\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t}\\n\\treturn distanceFalloff;\\n#else\\n\\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\\t}\\n\\treturn 1.0;\\n#endif\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\\n\\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\\n\\treturn Fr * fresnel + F0;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\\n\\treturn specularColor * brdf.x + brdf.y;\\n}\\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\\n\\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\\n\\tvec3 FssEss = F * brdf.x + brdf.y;\\n\\tfloat Ess = brdf.x + brdf.y;\\n\\tfloat Ems = 1.0 - Ess;\\n\\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\\tsingleScatter += FssEss;\\n\\tmultiScatter += Fms * Ems;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie(float roughness, float NoH) {\\n\\tfloat invAlpha = 1.0 / roughness;\\n\\tfloat cos2h = NoH * NoH;\\n\\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\\n}\\nfloat V_Neubelt(float NoV, float NoL) {\\n\\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\\n}\\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\\n\\tvec3 N = geometry.normal;\\n\\tvec3 V = geometry.viewDir;\\n\\tvec3 H = normalize( V + L );\\n\\tfloat dotNH = saturate( dot( N, H ) );\\n\\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\\n}\\n#endif\";\n\nvar bumpmap_pars_fragment = \"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\";\n\nvar clipping_planes_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\";\n\nvar clipping_planes_pars_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\";\n\nvar clipping_planes_pars_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n#endif\";\n\nvar clipping_planes_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvClipPosition = - mvPosition.xyz;\\n#endif\";\n\nvar color_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\\tdiffuseColor *= vColor;\\n#elif defined( USE_COLOR )\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\";\n\nvar color_pars_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\nvar color_pars_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\nvar color_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\\tvColor = vec4( 1.0 );\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\\tvColor *= color;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\\tvColor.xyz *= instanceColor.xyz;\\n#endif\";\n\nvar common = \"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\n#ifdef HIGH_PRECISION\\n\\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\n\\tfloat precisionSafeLength( vec3 v ) {\\n\\t\\tfloat maxComponent = max3( abs( v ) );\\n\\t\\treturn length( v / maxComponent ) * maxComponent;\\n\\t}\\n#endif\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n#ifdef CLEARCOAT\\n\\tvec3 clearcoatNormal;\\n#endif\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\treturn vec2( u, v );\\n}\";\n\nvar cube_uv_reflection_fragment = \"#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t#define cubeUV_maxMipLevel 8.0\\n\\t#define cubeUV_minMipLevel 4.0\\n\\t#define cubeUV_maxTileSize 256.0\\n\\t#define cubeUV_minTileSize 16.0\\n\\tfloat getFace( vec3 direction ) {\\n\\t\\tvec3 absDirection = abs( direction );\\n\\t\\tfloat face = - 1.0;\\n\\t\\tif ( absDirection.x > absDirection.z ) {\\n\\t\\t\\tif ( absDirection.x > absDirection.y )\\n\\t\\t\\t\\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t} else {\\n\\t\\t\\tif ( absDirection.z > absDirection.y )\\n\\t\\t\\t\\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t}\\n\\t\\treturn face;\\n\\t}\\n\\tvec2 getUV( vec3 direction, float face ) {\\n\\t\\tvec2 uv;\\n\\t\\tif ( face == 0.0 ) {\\n\\t\\t\\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 1.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\\t\\t} else if ( face == 2.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\\t\\t} else if ( face == 3.0 ) {\\n\\t\\t\\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 4.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\\t\\t} else {\\n\\t\\t\\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\\t\\t}\\n\\t\\treturn 0.5 * ( uv + 1.0 );\\n\\t}\\n\\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\\t\\tfloat face = getFace( direction );\\n\\t\\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\\t\\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\\t\\tfloat faceSize = exp2( mipInt );\\n\\t\\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\\n\\t\\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\\n\\t\\tvec2 f = fract( uv );\\n\\t\\tuv += 0.5 - f;\\n\\t\\tif ( face > 2.0 ) {\\n\\t\\t\\tuv.y += faceSize;\\n\\t\\t\\tface -= 3.0;\\n\\t\\t}\\n\\t\\tuv.x += face * faceSize;\\n\\t\\tif ( mipInt < cubeUV_maxMipLevel ) {\\n\\t\\t\\tuv.y += 2.0 * cubeUV_maxTileSize;\\n\\t\\t}\\n\\t\\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\\n\\t\\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\\n\\t\\tuv *= texelSize;\\n\\t\\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.x += texelSize;\\n\\t\\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.y += texelSize;\\n\\t\\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.x -= texelSize;\\n\\t\\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tvec3 tm = mix( tl, tr, f.x );\\n\\t\\tvec3 bm = mix( bl, br, f.x );\\n\\t\\treturn mix( tm, bm, f.y );\\n\\t}\\n\\t#define r0 1.0\\n\\t#define v0 0.339\\n\\t#define m0 - 2.0\\n\\t#define r1 0.8\\n\\t#define v1 0.276\\n\\t#define m1 - 1.0\\n\\t#define r4 0.4\\n\\t#define v4 0.046\\n\\t#define m4 2.0\\n\\t#define r5 0.305\\n\\t#define v5 0.016\\n\\t#define m5 3.0\\n\\t#define r6 0.21\\n\\t#define v6 0.0038\\n\\t#define m6 4.0\\n\\tfloat roughnessToMip( float roughness ) {\\n\\t\\tfloat mip = 0.0;\\n\\t\\tif ( roughness >= r1 ) {\\n\\t\\t\\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\\n\\t\\t} else if ( roughness >= r4 ) {\\n\\t\\t\\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\\n\\t\\t} else if ( roughness >= r5 ) {\\n\\t\\t\\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\\n\\t\\t} else if ( roughness >= r6 ) {\\n\\t\\t\\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\\n\\t\\t} else {\\n\\t\\t\\tmip = - 2.0 * log2( 1.16 * roughness );\\t\\t}\\n\\t\\treturn mip;\\n\\t}\\n\\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\\t\\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\\n\\t\\tfloat mipF = fract( mip );\\n\\t\\tfloat mipInt = floor( mip );\\n\\t\\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\\t\\tif ( mipF == 0.0 ) {\\n\\t\\t\\treturn vec4( color0, 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\\t\\t\\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\\t\\t}\\n\\t}\\n#endif\";\n\nvar defaultnormal_vertex = \"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\\tmat3 m = mat3( instanceMatrix );\\n\\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#ifdef FLIP_SIDED\\n\\t\\ttransformedTangent = - transformedTangent;\\n\\t#endif\\n#endif\";\n\nvar displacementmap_pars_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\";\n\nvar displacementmap_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\\n#endif\";\n\nvar emissivemap_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\";\n\nvar emissivemap_pars_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\";\n\nvar encodings_fragment = \"gl_FragColor = linearToOutputTexel( gl_FragColor );\";\n\nvar encodings_pars_fragment = \"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\\n\\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\\n\\tfloat D = max( maxRange / maxRGB, 1.0 );\\n\\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value ) {\\n\\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\\n\\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract( Le );\\n\\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\\n\\treturn vec4( max( vRGB, 0.0 ), 1.0 );\\n}\";\n\nvar envmap_fragment = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvec3 cameraToFrag;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\t#ifndef ENVMAP_TYPE_CUBE_UV\\n\\t\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#endif\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\";\n\nvar envmap_common_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float envMapIntensity;\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\t\\n#endif\";\n\nvar envmap_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float reflectivity;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\";\n\nvar envmap_pars_vertex = \"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\t\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\";\n\nvar envmap_vertex = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\nvar fog_vertex = \"#ifdef USE_FOG\\n\\tfogDepth = - mvPosition.z;\\n#endif\";\n\nvar fog_pars_vertex = \"#ifdef USE_FOG\\n\\tvarying float fogDepth;\\n#endif\";\n\nvar fog_fragment = \"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\";\n\nvar 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\nvar gradientmap_pars_fragment = \"#ifdef USE_GRADIENTMAP\\n\\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\tfloat dotNL = dot( normal, lightDirection );\\n\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t#ifdef USE_GRADIENTMAP\\n\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t#else\\n\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t#endif\\n}\";\n\nvar lightmap_fragment = \"#ifdef USE_LIGHTMAP\\n\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n#endif\";\n\nvar lightmap_pars_fragment = \"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\";\n\nvar lights_lambert_vertex = \"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\nvIndirectFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n\\tvIndirectBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\\n#ifdef DOUBLE_SIDED\\n\\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\\n\\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\";\n\nvar lights_pars_begin = \"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\nuniform vec3 lightProbe[ 9 ];\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\\n\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\";\n\nvar envmap_physical_pars_fragment = \"#if defined( USE_ENVMAP )\\n\\t#ifdef ENVMAP_MODE_REFRACTION\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -viewDir, normal );\\n\\t\\t\\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\";\n\nvar lights_toon_fragment = \"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\";\n\nvar lights_toon_pars_fragment = \"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct ToonMaterial {\\n\\tvec3 diffuseColor;\\n};\\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Toon\\n#define Material_LightProbeLOD( material )\\t(0)\";\n\nvar lights_phong_fragment = \"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\";\n\nvar lights_phong_pars_fragment = \"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3 diffuseColor;\\n\\tvec3 specularColor;\\n\\tfloat specularShininess;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\";\n\nvar lights_physical_fragment = \"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\\n#ifdef REFLECTIVITY\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#endif\\n#ifdef CLEARCOAT\\n\\tmaterial.clearcoat = clearcoat;\\n\\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\\t#ifdef USE_CLEARCOATMAP\\n\\t\\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\t\\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\\n\\t#endif\\n\\tmaterial.clearcoat = saturate( material.clearcoat );\\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\\tmaterial.clearcoatRoughness += geometryRoughness;\\n\\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_SHEEN\\n\\tmaterial.sheenColor = sheen;\\n#endif\";\n\nvar lights_physical_pars_fragment = \"struct PhysicalMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat specularRoughness;\\n\\tvec3 specularColor;\\n#ifdef CLEARCOAT\\n\\tfloat clearcoat;\\n\\tfloat clearcoatRoughness;\\n#endif\\n#ifdef USE_SHEEN\\n\\tvec3 sheenColor;\\n#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3( 0, 1, 0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifdef CLEARCOAT\\n\\t\\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\\n\\t\\tvec3 ccIrradiance = ccDotNL * directLight.color;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tccIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\\n\\t\\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\\n\\t#else\\n\\t\\tfloat clearcoatDHR = 0.0;\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\\n\\t\\t\\tmaterial.specularRoughness,\\n\\t\\t\\tdirectLight.direction,\\n\\t\\t\\tgeometry,\\n\\t\\t\\tmaterial.sheenColor\\n\\t\\t);\\n\\t#else\\n\\t\\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\\n\\t#endif\\n\\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\\t#ifdef CLEARCOAT\\n\\t\\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\\n\\t\\tfloat ccDotNL = ccDotNV;\\n\\t\\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\\n\\t#else\\n\\t\\tfloat clearcoatDHR = 0.0;\\n\\t#endif\\n\\tfloat clearcoatInv = 1.0 - clearcoatDHR;\\n\\tvec3 singleScattering = vec3( 0.0 );\\n\\tvec3 multiScattering = vec3( 0.0 );\\n\\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\\n\\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\\n\\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\\n\\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\";\n\nvar lights_fragment_begin = \"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\n#ifdef CLEARCOAT\\n\\tgeometry.clearcoatNormal = clearcoatNormal;\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\\n\\t\\tpointLightShadow = pointLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\tspotLightShadow = spotLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\\n\\t\\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 iblIrradiance = vec3( 0.0 );\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\";\n\nvar lights_fragment_maps = \"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\t\\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\\n\\t#ifdef CLEARCOAT\\n\\t\\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\\n\\t#endif\\n#endif\";\n\nvar lights_fragment_end = \"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\\n#endif\";\n\nvar logdepthbuf_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\";\n\nvar logdepthbuf_pars_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tuniform float logDepthBufFC;\\n\\tvarying float vFragDepth;\\n\\tvarying float vIsPerspective;\\n#endif\";\n\nvar logdepthbuf_pars_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t\\tvarying float vIsPerspective;\\n\\t#else\\n\\t\\tuniform float logDepthBufFC;\\n\\t#endif\\n#endif\";\n\nvar logdepthbuf_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t\\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\\t#else\\n\\t\\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\\t\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\t\\tgl_Position.z *= gl_Position.w;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\nvar map_fragment = \"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\";\n\nvar map_pars_fragment = \"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\";\n\nvar map_particle_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n#endif\\n#ifdef USE_MAP\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\";\n\nvar map_particle_pars_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tuniform mat3 uvTransform;\\n#endif\\n#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\nvar metalnessmap_fragment = \"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\";\n\nvar metalnessmap_pars_fragment = \"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\";\n\nvar morphnormal_vertex = \"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal *= morphTargetBaseInfluence;\\n\\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n#endif\";\n\nvar morphtarget_pars_vertex = \"#ifdef USE_MORPHTARGETS\\n\\tuniform float morphTargetBaseInfluence;\\n\\t#ifndef USE_MORPHNORMALS\\n\\t\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\t\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif\";\n\nvar morphtarget_vertex = \"#ifdef USE_MORPHTARGETS\\n\\ttransformed *= morphTargetBaseInfluence;\\n\\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\t\\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\\t\\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\\t\\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\\t\\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\";\n\nvar normal_fragment_begin = \"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\\n#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * faceDirection;\\n\\t#endif\\n\\t#ifdef USE_TANGENT\\n\\t\\tvec3 tangent = normalize( vTangent );\\n\\t\\tvec3 bitangent = normalize( vBitangent );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\ttangent = tangent * faceDirection;\\n\\t\\t\\tbitangent = bitangent * faceDirection;\\n\\t\\t#endif\\n\\t\\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\\n\\t\\t\\tmat3 vTBN = mat3( tangent, bitangent, normal );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\nvec3 geometryNormal = normal;\";\n\nvar normal_fragment_maps = \"#ifdef OBJECTSPACE_NORMALMAP\\n\\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t#ifdef FLIP_SIDED\\n\\t\\tnormal = - normal;\\n\\t#endif\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * faceDirection;\\n\\t#endif\\n\\tnormal = normalize( normalMatrix * normal );\\n#elif defined( TANGENTSPACE_NORMALMAP )\\n\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tmapN.xy *= normalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tnormal = normalize( vTBN * mapN );\\n\\t#else\\n\\t\\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\\n\\t#endif\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\\n#endif\";\n\nvar normalmap_pars_fragment = \"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n#endif\\n#ifdef OBJECTSPACE_NORMALMAP\\n\\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tvec3 N = surf_norm;\\n\\t\\tvec3 q1perp = cross( q1, N );\\n\\t\\tvec3 q0perp = cross( N, q0 );\\n\\t\\tvec3 T = q1perp * st0.x + q0perp * st1.x;\\n\\t\\tvec3 B = q1perp * st0.y + q0perp * st1.y;\\n\\t\\tfloat det = max( dot( T, T ), dot( B, B ) );\\n\\t\\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\\n\\t\\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\\n\\t}\\n#endif\";\n\nvar clearcoat_normal_fragment_begin = \"#ifdef CLEARCOAT\\n\\tvec3 clearcoatNormal = geometryNormal;\\n#endif\";\n\nvar clearcoat_normal_fragment_maps = \"#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\\n\\t#else\\n\\t\\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\\n\\t#endif\\n#endif\";\n\nvar clearcoat_pars_fragment = \"#ifdef USE_CLEARCOATMAP\\n\\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform sampler2D clearcoatNormalMap;\\n\\tuniform vec2 clearcoatNormalScale;\\n#endif\";\n\nvar packing = \"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\\n\\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\";\n\nvar premultiplied_alpha_fragment = \"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\";\n\nvar project_vertex = \"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\";\n\nvar dithering_fragment = \"#ifdef DITHERING\\n\\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\";\n\nvar dithering_pars_fragment = \"#ifdef DITHERING\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\";\n\nvar roughnessmap_fragment = \"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\";\n\nvar roughnessmap_pars_fragment = \"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\";\n\nvar shadowmap_pars_fragment = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\\t\\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\\t}\\n\\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\\t\\tfloat occlusion = 1.0;\\n\\t\\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\\t\\tfloat hard_shadow = step( compare , distribution.x );\\n\\t\\tif (hard_shadow != 1.0 ) {\\n\\t\\t\\tfloat distance = compare - distribution.x ;\\n\\t\\t\\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\\t\\t\\tfloat softness_probability = variance / (variance + distance * distance );\\t\\t\\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\\t\\t\\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\\t\\t}\\n\\t\\treturn occlusion;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx2 = dx0 / 2.0;\\n\\t\\t\\tfloat dy2 = dy0 / 2.0;\\n\\t\\t\\tfloat dx3 = dx1 / 2.0;\\n\\t\\t\\tfloat dy3 = dy1 / 2.0;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 17.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx = texelSize.x;\\n\\t\\t\\tfloat dy = texelSize.y;\\n\\t\\t\\tvec2 uv = shadowCoord.xy;\\n\\t\\t\\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t f.y )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\";\n\nvar shadowmap_pars_vertex = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n#endif\";\n\nvar shadowmap_vertex = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\tvec4 shadowWorldPosition;\\n\\t#endif\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\";\n\nvar shadowmask_pars_fragment = \"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tspotLight = spotLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tpointLight = pointLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\";\n\nvar skinbase_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\";\n\nvar skinning_pars_vertex = \"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform highp sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\nvar skinning_vertex = \"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\";\n\nvar skinnormal_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\\t#ifdef USE_TANGENT\\n\\t\\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#endif\\n#endif\";\n\nvar specularmap_fragment = \"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\";\n\nvar specularmap_pars_fragment = \"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\";\n\nvar tonemapping_fragment = \"#if defined( TONE_MAPPING )\\n\\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\";\n\nvar tonemapping_pars_fragment = \"#ifndef saturate\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\\tconst mat3 ACESInputMat = mat3(\\n\\t\\tvec3( 0.59719, 0.07600, 0.02840 ),\\t\\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\\t\\tvec3( 0.04823, 0.01566, 0.83777 )\\n\\t);\\n\\tconst mat3 ACESOutputMat = mat3(\\n\\t\\tvec3( 1.60475, -0.10208, -0.00327 ),\\t\\tvec3( -0.53108, 1.10813, -0.07276 ),\\n\\t\\tvec3( -0.07367, -0.00605, 1.07602 )\\n\\t);\\n\\tcolor *= toneMappingExposure / 0.6;\\n\\tcolor = ACESInputMat * color;\\n\\tcolor = RRTAndODTFit( color );\\n\\tcolor = ACESOutputMat * color;\\n\\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\";\n\nvar transmission_fragment = \"#ifdef USE_TRANSMISSION\\n\\tfloat transmissionFactor = transmission;\\n\\tfloat thicknessFactor = thickness;\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSNMAP\\n\\t\\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\\n\\t#endif\\n\\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\\n\\tvec3 v = normalize( cameraPosition - pos );\\n\\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\\n\\tvec3 transmission = transmissionFactor * getIBLVolumeRefraction(\\n\\t\\tnormal, v, roughnessFactor, material.diffuseColor, totalSpecular,\\n\\t\\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\\n\\t\\tattenuationColor, attenuationDistance );\\n\\ttotalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\\n#endif\";\n\nvar transmission_pars_fragment = \"#ifdef USE_TRANSMISSION\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\tuniform sampler2D transmissionMap;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSMAP\\n\\t\\tuniform sampler2D thicknessMap;\\n\\t#endif\\n\\tuniform vec2 transmissionSamplerSize;\\n\\tuniform sampler2D transmissionSamplerMap;\\n\\tuniform mat4 modelMatrix;\\n\\tuniform mat4 projectionMatrix;\\n\\tvarying vec4 vWorldPosition;\\n\\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\\n\\t\\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\\n\\t\\tvec3 modelScale;\\n\\t\\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\\n\\t\\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\\n\\t\\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\\n\\t\\treturn normalize(refractionVector) * thickness * modelScale;\\n\\t}\\n\\tfloat applyIorToRoughness(float roughness, float ior) {\\n\\t\\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\\n\\t}\\n\\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\\n\\t\\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\\n\\t\\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\\n\\t}\\n\\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\\n\\t\\tif (attenuationDistance == 0.0) {\\n\\t\\t\\treturn radiance;\\n\\t\\t} else {\\n\\t\\t\\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\\n\\t\\t\\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\\t\\t\\treturn transmittance * radiance;\\n\\t\\t}\\n\\t}\\n\\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\\n\\t\\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\\n\\t\\tvec3 attenuationColor, float attenuationDistance) {\\n\\t\\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\\n\\t\\tvec3 refractedRayExit = position + transmissionRay;\\n\\t\\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\\n\\t\\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\\n\\t\\trefractionCoords += 1.0;\\n\\t\\trefractionCoords /= 2.0;\\n\\t\\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\\n\\t\\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\\n\\t\\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\\n\\t}\\n#endif\";\n\nvar uv_pars_fragment = \"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\\n\\tvarying vec2 vUv;\\n#endif\";\n\nvar uv_pars_vertex = \"#ifdef USE_UV\\n\\t#ifdef UVS_VERTEX_ONLY\\n\\t\\tvec2 vUv;\\n\\t#else\\n\\t\\tvarying vec2 vUv;\\n\\t#endif\\n\\tuniform mat3 uvTransform;\\n#endif\";\n\nvar uv_vertex = \"#ifdef USE_UV\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif\";\n\nvar uv2_pars_fragment = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif\";\n\nvar uv2_pars_vertex = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n\\tuniform mat3 uv2Transform;\\n#endif\";\n\nvar uv2_vertex = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\\n#endif\";\n\nvar worldpos_vertex = \"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\\n\\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\\t#ifdef USE_INSTANCING\\n\\t\\tworldPosition = instanceMatrix * worldPosition;\\n\\t#endif\\n\\tworldPosition = modelMatrix * worldPosition;\\n#endif\";\n\nvar background_frag = \"uniform sampler2D t2D;\\nvarying vec2 vUv;\\nvoid main() {\\n\\tvec4 texColor = texture2D( t2D, vUv );\\n\\tgl_FragColor = mapTexelToLinear( texColor );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\nvar background_vert = \"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\";\n\nvar cube_frag = \"#include <envmap_common_pars_fragment>\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\n#include <cube_uv_reflection_fragment>\\nvoid main() {\\n\\tvec3 vReflect = vWorldDirection;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = envColor;\\n\\tgl_FragColor.a *= opacity;\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\nvar cube_vert = \"varying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\";\n\nvar depth_frag = \"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\\t#endif\\n}\";\n\nvar depth_vert = \"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvHighPrecisionZW = gl_Position.zw;\\n}\";\n\nvar distanceRGBA_frag = \"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\";\n\nvar distanceRGBA_vert = \"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\";\n\nvar equirect_frag = \"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldDirection );\\n\\tvec2 sampleUV = equirectUv( direction );\\n\\tvec4 texColor = texture2D( tEquirect, sampleUV );\\n\\tgl_FragColor = mapTexelToLinear( texColor );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\nvar equirect_vert = \"varying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\";\n\nvar linedashed_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n}\";\n\nvar linedashed_vert = \"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\tvLineDistance = scale * lineDistance;\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshbasic_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\n\\t\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\t\\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshbasic_vert = \"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshlambert_frag = \"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\nvarying vec3 vIndirectFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n\\tvarying vec3 vIndirectBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vIndirectFront;\\n\\t#endif\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshlambert_vert = \"#define LAMBERT\\nvarying vec3 vLightFront;\\nvarying vec3 vIndirectFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n\\tvarying vec3 vIndirectBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshmatcap_frag = \"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tvec3 viewDir = normalize( vViewPosition );\\n\\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\\tvec3 y = cross( viewDir, x );\\n\\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\\t#ifdef USE_MATCAP\\n\\t\\tvec4 matcapColor = texture2D( matcap, uv );\\n\\t\\tmatcapColor = matcapTexelToLinear( matcapColor );\\n\\t#else\\n\\t\\tvec4 matcapColor = vec4( 1.0 );\\n\\t#endif\\n\\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshmatcap_vert = \"#define MATCAP\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <color_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#ifndef FLAT_SHADED\\n\\t\\tvNormal = normalize( transformedNormal );\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n}\";\n\nvar meshtoon_frag = \"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_toon_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_toon_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshtoon_vert = \"#define TOON\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshphong_frag = \"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshphong_vert = \"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshphysical_frag = \"#define STANDARD\\n#ifdef PHYSICAL\\n\\t#define REFLECTIVITY\\n\\t#define CLEARCOAT\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef USE_TRANSMISSION\\n\\tuniform float transmission;\\n\\tuniform float thickness;\\n\\tuniform vec3 attenuationColor;\\n\\tuniform float attenuationDistance;\\n#endif\\n#ifdef REFLECTIVITY\\n\\tuniform float reflectivity;\\n#endif\\n#ifdef CLEARCOAT\\n\\tuniform float clearcoat;\\n\\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_SHEEN\\n\\tuniform vec3 sheen;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <bsdfs>\\n#include <transmission_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_physical_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <lights_pars_begin>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <clearcoat_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <clearcoat_normal_fragment_begin>\\n\\t#include <clearcoat_normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\\n\\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\\n\\t#include <transmission_fragment>\\n\\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshphysical_vert = \"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#ifdef USE_TRANSMISSION\\n\\tvarying vec4 vWorldPosition;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n#ifdef USE_TRANSMISSION\\n\\tvWorldPosition = worldPosition;\\n#endif\\n}\";\n\nvar normal_frag = \"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\";\n\nvar normal_vert = \"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\";\n\nvar points_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n}\";\n\nvar points_vert = \"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\tgl_PointSize = size;\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar shadow_frag = \"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\";\n\nvar shadow_vert = \"#include <common>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar sprite_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\";\n\nvar sprite_vert = \"uniform float rotation;\\nuniform vec2 center;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\tvec2 scale;\\n\\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\\t#ifndef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) scale *= - mvPosition.z;\\n\\t#endif\\n\\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\\tvec2 rotatedPosition;\\n\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\\tmvPosition.xy += rotatedPosition;\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nconst ShaderChunk = {\n\talphamap_fragment: alphamap_fragment,\n\talphamap_pars_fragment: alphamap_pars_fragment,\n\talphatest_fragment: alphatest_fragment,\n\taomap_fragment: aomap_fragment,\n\taomap_pars_fragment: aomap_pars_fragment,\n\tbegin_vertex: begin_vertex,\n\tbeginnormal_vertex: beginnormal_vertex,\n\tbsdfs: bsdfs,\n\tbumpmap_pars_fragment: bumpmap_pars_fragment,\n\tclipping_planes_fragment: clipping_planes_fragment,\n\tclipping_planes_pars_fragment: clipping_planes_pars_fragment,\n\tclipping_planes_pars_vertex: clipping_planes_pars_vertex,\n\tclipping_planes_vertex: clipping_planes_vertex,\n\tcolor_fragment: color_fragment,\n\tcolor_pars_fragment: color_pars_fragment,\n\tcolor_pars_vertex: color_pars_vertex,\n\tcolor_vertex: color_vertex,\n\tcommon: common,\n\tcube_uv_reflection_fragment: cube_uv_reflection_fragment,\n\tdefaultnormal_vertex: defaultnormal_vertex,\n\tdisplacementmap_pars_vertex: displacementmap_pars_vertex,\n\tdisplacementmap_vertex: displacementmap_vertex,\n\temissivemap_fragment: emissivemap_fragment,\n\temissivemap_pars_fragment: emissivemap_pars_fragment,\n\tencodings_fragment: encodings_fragment,\n\tencodings_pars_fragment: encodings_pars_fragment,\n\tenvmap_fragment: envmap_fragment,\n\tenvmap_common_pars_fragment: envmap_common_pars_fragment,\n\tenvmap_pars_fragment: envmap_pars_fragment,\n\tenvmap_pars_vertex: envmap_pars_vertex,\n\tenvmap_physical_pars_fragment: envmap_physical_pars_fragment,\n\tenvmap_vertex: envmap_vertex,\n\tfog_vertex: fog_vertex,\n\tfog_pars_vertex: fog_pars_vertex,\n\tfog_fragment: fog_fragment,\n\tfog_pars_fragment: fog_pars_fragment,\n\tgradientmap_pars_fragment: gradientmap_pars_fragment,\n\tlightmap_fragment: lightmap_fragment,\n\tlightmap_pars_fragment: lightmap_pars_fragment,\n\tlights_lambert_vertex: lights_lambert_vertex,\n\tlights_pars_begin: lights_pars_begin,\n\tlights_toon_fragment: lights_toon_fragment,\n\tlights_toon_pars_fragment: lights_toon_pars_fragment,\n\tlights_phong_fragment: lights_phong_fragment,\n\tlights_phong_pars_fragment: lights_phong_pars_fragment,\n\tlights_physical_fragment: lights_physical_fragment,\n\tlights_physical_pars_fragment: lights_physical_pars_fragment,\n\tlights_fragment_begin: lights_fragment_begin,\n\tlights_fragment_maps: lights_fragment_maps,\n\tlights_fragment_end: lights_fragment_end,\n\tlogdepthbuf_fragment: logdepthbuf_fragment,\n\tlogdepthbuf_pars_fragment: logdepthbuf_pars_fragment,\n\tlogdepthbuf_pars_vertex: logdepthbuf_pars_vertex,\n\tlogdepthbuf_vertex: logdepthbuf_vertex,\n\tmap_fragment: map_fragment,\n\tmap_pars_fragment: map_pars_fragment,\n\tmap_particle_fragment: map_particle_fragment,\n\tmap_particle_pars_fragment: map_particle_pars_fragment,\n\tmetalnessmap_fragment: metalnessmap_fragment,\n\tmetalnessmap_pars_fragment: metalnessmap_pars_fragment,\n\tmorphnormal_vertex: morphnormal_vertex,\n\tmorphtarget_pars_vertex: morphtarget_pars_vertex,\n\tmorphtarget_vertex: morphtarget_vertex,\n\tnormal_fragment_begin: normal_fragment_begin,\n\tnormal_fragment_maps: normal_fragment_maps,\n\tnormalmap_pars_fragment: normalmap_pars_fragment,\n\tclearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin,\n\tclearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps,\n\tclearcoat_pars_fragment: clearcoat_pars_fragment,\n\tpacking: packing,\n\tpremultiplied_alpha_fragment: premultiplied_alpha_fragment,\n\tproject_vertex: project_vertex,\n\tdithering_fragment: dithering_fragment,\n\tdithering_pars_fragment: dithering_pars_fragment,\n\troughnessmap_fragment: roughnessmap_fragment,\n\troughnessmap_pars_fragment: roughnessmap_pars_fragment,\n\tshadowmap_pars_fragment: shadowmap_pars_fragment,\n\tshadowmap_pars_vertex: shadowmap_pars_vertex,\n\tshadowmap_vertex: shadowmap_vertex,\n\tshadowmask_pars_fragment: shadowmask_pars_fragment,\n\tskinbase_vertex: skinbase_vertex,\n\tskinning_pars_vertex: skinning_pars_vertex,\n\tskinning_vertex: skinning_vertex,\n\tskinnormal_vertex: skinnormal_vertex,\n\tspecularmap_fragment: specularmap_fragment,\n\tspecularmap_pars_fragment: specularmap_pars_fragment,\n\ttonemapping_fragment: tonemapping_fragment,\n\ttonemapping_pars_fragment: tonemapping_pars_fragment,\n\ttransmission_fragment: transmission_fragment,\n\ttransmission_pars_fragment: transmission_pars_fragment,\n\tuv_pars_fragment: uv_pars_fragment,\n\tuv_pars_vertex: uv_pars_vertex,\n\tuv_vertex: uv_vertex,\n\tuv2_pars_fragment: uv2_pars_fragment,\n\tuv2_pars_vertex: uv2_pars_vertex,\n\tuv2_vertex: uv2_vertex,\n\tworldpos_vertex: worldpos_vertex,\n\n\tbackground_frag: background_frag,\n\tbackground_vert: background_vert,\n\tcube_frag: cube_frag,\n\tcube_vert: cube_vert,\n\tdepth_frag: depth_frag,\n\tdepth_vert: depth_vert,\n\tdistanceRGBA_frag: distanceRGBA_frag,\n\tdistanceRGBA_vert: distanceRGBA_vert,\n\tequirect_frag: equirect_frag,\n\tequirect_vert: equirect_vert,\n\tlinedashed_frag: linedashed_frag,\n\tlinedashed_vert: linedashed_vert,\n\tmeshbasic_frag: meshbasic_frag,\n\tmeshbasic_vert: meshbasic_vert,\n\tmeshlambert_frag: meshlambert_frag,\n\tmeshlambert_vert: meshlambert_vert,\n\tmeshmatcap_frag: meshmatcap_frag,\n\tmeshmatcap_vert: meshmatcap_vert,\n\tmeshtoon_frag: meshtoon_frag,\n\tmeshtoon_vert: meshtoon_vert,\n\tmeshphong_frag: meshphong_frag,\n\tmeshphong_vert: meshphong_vert,\n\tmeshphysical_frag: meshphysical_frag,\n\tmeshphysical_vert: meshphysical_vert,\n\tnormal_frag: normal_frag,\n\tnormal_vert: normal_vert,\n\tpoints_frag: points_frag,\n\tpoints_vert: points_vert,\n\tshadow_frag: shadow_frag,\n\tshadow_vert: shadow_vert,\n\tsprite_frag: sprite_frag,\n\tsprite_vert: sprite_vert\n};\n\n/**\n * Uniforms library for shared webgl shaders\n */\n\nconst UniformsLib = {\n\n\tcommon: {\n\n\t\tdiffuse: { value: new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\n\t\tmap: { value: null },\n\t\tuvTransform: { value: new Matrix3() },\n\t\tuv2Transform: { value: new Matrix3() },\n\n\t\talphaMap: { value: null },\n\n\t},\n\n\tspecularmap: {\n\n\t\tspecularMap: { value: null },\n\n\t},\n\n\tenvmap: {\n\n\t\tenvMap: { value: null },\n\t\tflipEnvMap: { value: - 1 },\n\t\treflectivity: { value: 1.0 },\n\t\trefractionRatio: { value: 0.98 },\n\t\tmaxMipLevel: { value: 0 }\n\n\t},\n\n\taomap: {\n\n\t\taoMap: { value: null },\n\t\taoMapIntensity: { value: 1 }\n\n\t},\n\n\tlightmap: {\n\n\t\tlightMap: { value: null },\n\t\tlightMapIntensity: { value: 1 }\n\n\t},\n\n\temissivemap: {\n\n\t\temissiveMap: { value: null }\n\n\t},\n\n\tbumpmap: {\n\n\t\tbumpMap: { value: null },\n\t\tbumpScale: { value: 1 }\n\n\t},\n\n\tnormalmap: {\n\n\t\tnormalMap: { value: null },\n\t\tnormalScale: { value: new Vector2( 1, 1 ) }\n\n\t},\n\n\tdisplacementmap: {\n\n\t\tdisplacementMap: { value: null },\n\t\tdisplacementScale: { value: 1 },\n\t\tdisplacementBias: { value: 0 }\n\n\t},\n\n\troughnessmap: {\n\n\t\troughnessMap: { value: null }\n\n\t},\n\n\tmetalnessmap: {\n\n\t\tmetalnessMap: { value: null }\n\n\t},\n\n\tgradientmap: {\n\n\t\tgradientMap: { value: null }\n\n\t},\n\n\tfog: {\n\n\t\tfogDensity: { value: 0.00025 },\n\t\tfogNear: { value: 1 },\n\t\tfogFar: { value: 2000 },\n\t\tfogColor: { value: new Color( 0xffffff ) }\n\n\t},\n\n\tlights: {\n\n\t\tambientLightColor: { value: [] },\n\n\t\tlightProbe: { value: [] },\n\n\t\tdirectionalLights: { value: [], properties: {\n\t\t\tdirection: {},\n\t\t\tcolor: {}\n\t\t} },\n\n\t\tdirectionalLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {}\n\t\t} },\n\n\t\tdirectionalShadowMap: { value: [] },\n\t\tdirectionalShadowMatrix: { value: [] },\n\n\t\tspotLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\tdirection: {},\n\t\t\tdistance: {},\n\t\t\tconeCos: {},\n\t\t\tpenumbraCos: {},\n\t\t\tdecay: {}\n\t\t} },\n\n\t\tspotLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {}\n\t\t} },\n\n\t\tspotShadowMap: { value: [] },\n\t\tspotShadowMatrix: { value: [] },\n\n\t\tpointLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\tdecay: {},\n\t\t\tdistance: {}\n\t\t} },\n\n\t\tpointLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {},\n\t\t\tshadowCameraNear: {},\n\t\t\tshadowCameraFar: {}\n\t\t} },\n\n\t\tpointShadowMap: { value: [] },\n\t\tpointShadowMatrix: { value: [] },\n\n\t\themisphereLights: { value: [], properties: {\n\t\t\tdirection: {},\n\t\t\tskyColor: {},\n\t\t\tgroundColor: {}\n\t\t} },\n\n\t\t// TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src\n\t\trectAreaLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\twidth: {},\n\t\t\theight: {}\n\t\t} },\n\n\t\tltc_1: { value: null },\n\t\tltc_2: { value: null }\n\n\t},\n\n\tpoints: {\n\n\t\tdiffuse: { value: new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\t\tsize: { value: 1.0 },\n\t\tscale: { value: 1.0 },\n\t\tmap: { value: null },\n\t\talphaMap: { value: null },\n\t\tuvTransform: { value: new Matrix3() }\n\n\t},\n\n\tsprite: {\n\n\t\tdiffuse: { value: new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\t\tcenter: { value: new Vector2( 0.5, 0.5 ) },\n\t\trotation: { value: 0.0 },\n\t\tmap: { value: null },\n\t\talphaMap: { value: null },\n\t\tuvTransform: { value: new Matrix3() }\n\n\t}\n\n};\n\nconst ShaderLib = {\n\n\tbasic: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshbasic_vert,\n\t\tfragmentShader: ShaderChunk.meshbasic_frag\n\n\t},\n\n\tlambert: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: new Color( 0x000000 ) }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshlambert_vert,\n\t\tfragmentShader: ShaderChunk.meshlambert_frag\n\n\t},\n\n\tphong: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: new Color( 0x000000 ) },\n\t\t\t\tspecular: { value: new Color( 0x111111 ) },\n\t\t\t\tshininess: { value: 30 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshphong_vert,\n\t\tfragmentShader: ShaderChunk.meshphong_frag\n\n\t},\n\n\tstandard: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.roughnessmap,\n\t\t\tUniformsLib.metalnessmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: new Color( 0x000000 ) },\n\t\t\t\troughness: { value: 1.0 },\n\t\t\t\tmetalness: { value: 0.0 },\n\t\t\t\tenvMapIntensity: { value: 1 } // temporary\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshphysical_vert,\n\t\tfragmentShader: ShaderChunk.meshphysical_frag\n\n\t},\n\n\ttoon: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.gradientmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: new Color( 0x000000 ) }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshtoon_vert,\n\t\tfragmentShader: ShaderChunk.meshtoon_frag\n\n\t},\n\n\tmatcap: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tmatcap: { value: null }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshmatcap_vert,\n\t\tfragmentShader: ShaderChunk.meshmatcap_frag\n\n\t},\n\n\tpoints: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.points,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.points_vert,\n\t\tfragmentShader: ShaderChunk.points_frag\n\n\t},\n\n\tdashed: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tscale: { value: 1 },\n\t\t\t\tdashSize: { value: 1 },\n\t\t\t\ttotalSize: { value: 2 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.linedashed_vert,\n\t\tfragmentShader: ShaderChunk.linedashed_frag\n\n\t},\n\n\tdepth: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.displacementmap\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.depth_vert,\n\t\tfragmentShader: ShaderChunk.depth_frag\n\n\t},\n\n\tnormal: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\t{\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.normal_vert,\n\t\tfragmentShader: ShaderChunk.normal_frag\n\n\t},\n\n\tsprite: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.sprite,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.sprite_vert,\n\t\tfragmentShader: ShaderChunk.sprite_frag\n\n\t},\n\n\tbackground: {\n\n\t\tuniforms: {\n\t\t\tuvTransform: { value: new Matrix3() },\n\t\t\tt2D: { value: null },\n\t\t},\n\n\t\tvertexShader: ShaderChunk.background_vert,\n\t\tfragmentShader: ShaderChunk.background_frag\n\n\t},\n\t/* -------------------------------------------------------------------------\n\t//\tCube map shader\n\t ------------------------------------------------------------------------- */\n\n\tcube: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.envmap,\n\t\t\t{\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.cube_vert,\n\t\tfragmentShader: ShaderChunk.cube_frag\n\n\t},\n\n\tequirect: {\n\n\t\tuniforms: {\n\t\t\ttEquirect: { value: null },\n\t\t},\n\n\t\tvertexShader: ShaderChunk.equirect_vert,\n\t\tfragmentShader: ShaderChunk.equirect_frag\n\n\t},\n\n\tdistanceRGBA: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.displacementmap,\n\t\t\t{\n\t\t\t\treferencePosition: { value: new Vector3() },\n\t\t\t\tnearDistance: { value: 1 },\n\t\t\t\tfarDistance: { value: 1000 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.distanceRGBA_vert,\n\t\tfragmentShader: ShaderChunk.distanceRGBA_frag\n\n\t},\n\n\tshadow: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.lights,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tcolor: { value: new Color( 0x00000 ) },\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t},\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.shadow_vert,\n\t\tfragmentShader: ShaderChunk.shadow_frag\n\n\t}\n\n};\n\nShaderLib.physical = {\n\n\tuniforms: mergeUniforms( [\n\t\tShaderLib.standard.uniforms,\n\t\t{\n\t\t\tclearcoat: { value: 0 },\n\t\t\tclearcoatMap: { value: null },\n\t\t\tclearcoatRoughness: { value: 0 },\n\t\t\tclearcoatRoughnessMap: { value: null },\n\t\t\tclearcoatNormalScale: { value: new Vector2( 1, 1 ) },\n\t\t\tclearcoatNormalMap: { value: null },\n\t\t\tsheen: { value: new Color( 0x000000 ) },\n\t\t\ttransmission: { value: 0 },\n\t\t\ttransmissionMap: { value: null },\n\t\t\ttransmissionSamplerSize: { value: new Vector2() },\n\t\t\ttransmissionSamplerMap: { value: null },\n\t\t\tthickness: { value: 0 },\n\t\t\tthicknessMap: { value: null },\n\t\t\tattenuationDistance: { value: 0 },\n\t\t\tattenuationColor: { value: new Color( 0x000000 ) }\n\t\t}\n\t] ),\n\n\tvertexShader: ShaderChunk.meshphysical_vert,\n\tfragmentShader: ShaderChunk.meshphysical_frag\n\n};\n\nfunction WebGLBackground( renderer, cubemaps, state, objects, premultipliedAlpha ) {\n\n\tconst clearColor = new Color( 0x000000 );\n\tlet clearAlpha = 0;\n\n\tlet planeMesh;\n\tlet boxMesh;\n\n\tlet currentBackground = null;\n\tlet currentBackgroundVersion = 0;\n\tlet currentTonemapping = null;\n\n\tfunction render( renderList, scene ) {\n\n\t\tlet forceClear = false;\n\t\tlet background = scene.isScene === true ? scene.background : null;\n\n\t\tif ( background && background.isTexture ) {\n\n\t\t\tbackground = cubemaps.get( background );\n\n\t\t}\n\n\t\t// Ignore background in AR\n\t\t// TODO: Reconsider this.\n\n\t\tconst xr = renderer.xr;\n\t\tconst session = xr.getSession && xr.getSession();\n\n\t\tif ( session && session.environmentBlendMode === 'additive' ) {\n\n\t\t\tbackground = null;\n\n\t\t}\n\n\t\tif ( background === null ) {\n\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t} else if ( background && background.isColor ) {\n\n\t\t\tsetClear( background, 1 );\n\t\t\tforceClear = true;\n\n\t\t}\n\n\t\tif ( renderer.autoClear || forceClear ) {\n\n\t\t\trenderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\n\t\t}\n\n\t\tif ( background && ( background.isCubeTexture || background.mapping === CubeUVReflectionMapping ) ) {\n\n\t\t\tif ( boxMesh === undefined ) {\n\n\t\t\t\tboxMesh = new Mesh(\n\t\t\t\t\tnew BoxGeometry( 1, 1, 1 ),\n\t\t\t\t\tnew ShaderMaterial( {\n\t\t\t\t\t\tname: 'BackgroundCubeMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms( ShaderLib.cube.uniforms ),\n\t\t\t\t\t\tvertexShader: ShaderLib.cube.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.cube.fragmentShader,\n\t\t\t\t\t\tside: BackSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tboxMesh.geometry.deleteAttribute( 'normal' );\n\t\t\t\tboxMesh.geometry.deleteAttribute( 'uv' );\n\n\t\t\t\tboxMesh.onBeforeRender = function ( renderer, scene, camera ) {\n\n\t\t\t\t\tthis.matrixWorld.copyPosition( camera.matrixWorld );\n\n\t\t\t\t};\n\n\t\t\t\t// enable code injection for non-built-in material\n\t\t\t\tObject.defineProperty( boxMesh.material, 'envMap', {\n\n\t\t\t\t\tget: function () {\n\n\t\t\t\t\t\treturn this.uniforms.envMap.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\tobjects.update( boxMesh );\n\n\t\t\t}\n\n\t\t\tboxMesh.material.uniforms.envMap.value = background;\n\t\t\tboxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background._needsFlipEnvMap ) ? - 1 : 1;\n\n\t\t\tif ( currentBackground !== background ||\n\t\t\t\tcurrentBackgroundVersion !== background.version ||\n\t\t\t\tcurrentTonemapping !== renderer.toneMapping ) {\n\n\t\t\t\tboxMesh.material.needsUpdate = true;\n\n\t\t\t\tcurrentBackground = background;\n\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\n\t\t\t}\n\n\t\t\t// push to the pre-sorted opaque render list\n\t\t\trenderList.unshift( boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null );\n\n\t\t} else if ( background && background.isTexture ) {\n\n\t\t\tif ( planeMesh === undefined ) {\n\n\t\t\t\tplaneMesh = new Mesh(\n\t\t\t\t\tnew PlaneGeometry( 2, 2 ),\n\t\t\t\t\tnew ShaderMaterial( {\n\t\t\t\t\t\tname: 'BackgroundMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms( ShaderLib.background.uniforms ),\n\t\t\t\t\t\tvertexShader: ShaderLib.background.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.background.fragmentShader,\n\t\t\t\t\t\tside: FrontSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tplaneMesh.geometry.deleteAttribute( 'normal' );\n\n\t\t\t\t// enable code injection for non-built-in material\n\t\t\t\tObject.defineProperty( planeMesh.material, 'map', {\n\n\t\t\t\t\tget: function () {\n\n\t\t\t\t\t\treturn this.uniforms.t2D.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\tobjects.update( planeMesh );\n\n\t\t\t}\n\n\t\t\tplaneMesh.material.uniforms.t2D.value = background;\n\n\t\t\tif ( background.matrixAutoUpdate === true ) {\n\n\t\t\t\tbackground.updateMatrix();\n\n\t\t\t}\n\n\t\t\tplaneMesh.material.uniforms.uvTransform.value.copy( background.matrix );\n\n\t\t\tif ( currentBackground !== background ||\n\t\t\t\tcurrentBackgroundVersion !== background.version ||\n\t\t\t\tcurrentTonemapping !== renderer.toneMapping ) {\n\n\t\t\t\tplaneMesh.material.needsUpdate = true;\n\n\t\t\t\tcurrentBackground = background;\n\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\n\t\t\t}\n\n\n\t\t\t// push to the pre-sorted opaque render list\n\t\t\trenderList.unshift( planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null );\n\n\t\t}\n\n\t}\n\n\tfunction setClear( color, alpha ) {\n\n\t\tstate.buffers.color.setClear( color.r, color.g, color.b, alpha, premultipliedAlpha );\n\n\t}\n\n\treturn {\n\n\t\tgetClearColor: function () {\n\n\t\t\treturn clearColor;\n\n\t\t},\n\t\tsetClearColor: function ( color, alpha = 1 ) {\n\n\t\t\tclearColor.set( color );\n\t\t\tclearAlpha = alpha;\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t},\n\t\tgetClearAlpha: function () {\n\n\t\t\treturn clearAlpha;\n\n\t\t},\n\t\tsetClearAlpha: function ( alpha ) {\n\n\t\t\tclearAlpha = alpha;\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t},\n\t\trender: render\n\n\t};\n\n}\n\nfunction WebGLBindingStates( gl, extensions, attributes, capabilities ) {\n\n\tconst maxVertexAttributes = gl.getParameter( 34921 );\n\n\tconst extension = capabilities.isWebGL2 ? null : extensions.get( 'OES_vertex_array_object' );\n\tconst vaoAvailable = capabilities.isWebGL2 || extension !== null;\n\n\tconst bindingStates = {};\n\n\tconst defaultState = createBindingState( null );\n\tlet currentState = defaultState;\n\n\tfunction setup( object, material, program, geometry, index ) {\n\n\t\tlet updateBuffers = false;\n\n\t\tif ( vaoAvailable ) {\n\n\t\t\tconst state = getBindingState( geometry, program, material );\n\n\t\t\tif ( currentState !== state ) {\n\n\t\t\t\tcurrentState = state;\n\t\t\t\tbindVertexArrayObject( currentState.object );\n\n\t\t\t}\n\n\t\t\tupdateBuffers = needsUpdate( geometry, index );\n\n\t\t\tif ( updateBuffers ) saveCache( geometry, index );\n\n\t\t} else {\n\n\t\t\tconst wireframe = ( material.wireframe === true );\n\n\t\t\tif ( currentState.geometry !== geometry.id ||\n\t\t\t\tcurrentState.program !== program.id ||\n\t\t\t\tcurrentState.wireframe !== wireframe ) {\n\n\t\t\t\tcurrentState.geometry = geometry.id;\n\t\t\t\tcurrentState.program = program.id;\n\t\t\t\tcurrentState.wireframe = wireframe;\n\n\t\t\t\tupdateBuffers = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( object.isInstancedMesh === true ) {\n\n\t\t\tupdateBuffers = true;\n\n\t\t}\n\n\t\tif ( index !== null ) {\n\n\t\t\tattributes.update( index, 34963 );\n\n\t\t}\n\n\t\tif ( updateBuffers ) {\n\n\t\t\tsetupVertexAttributes( object, material, program, geometry );\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tgl.bindBuffer( 34963, attributes.get( index ).buffer );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction createVertexArrayObject() {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.createVertexArray();\n\n\t\treturn extension.createVertexArrayOES();\n\n\t}\n\n\tfunction bindVertexArrayObject( vao ) {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.bindVertexArray( vao );\n\n\t\treturn extension.bindVertexArrayOES( vao );\n\n\t}\n\n\tfunction deleteVertexArrayObject( vao ) {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.deleteVertexArray( vao );\n\n\t\treturn extension.deleteVertexArrayOES( vao );\n\n\t}\n\n\tfunction getBindingState( geometry, program, material ) {\n\n\t\tconst wireframe = ( material.wireframe === true );\n\n\t\tlet programMap = bindingStates[ geometry.id ];\n\n\t\tif ( programMap === undefined ) {\n\n\t\t\tprogramMap = {};\n\t\t\tbindingStates[ geometry.id ] = programMap;\n\n\t\t}\n\n\t\tlet stateMap = programMap[ program.id ];\n\n\t\tif ( stateMap === undefined ) {\n\n\t\t\tstateMap = {};\n\t\t\tprogramMap[ program.id ] = stateMap;\n\n\t\t}\n\n\t\tlet state = stateMap[ wireframe ];\n\n\t\tif ( state === undefined ) {\n\n\t\t\tstate = createBindingState( createVertexArrayObject() );\n\t\t\tstateMap[ wireframe ] = state;\n\n\t\t}\n\n\t\treturn state;\n\n\t}\n\n\tfunction createBindingState( vao ) {\n\n\t\tconst newAttributes = [];\n\t\tconst enabledAttributes = [];\n\t\tconst attributeDivisors = [];\n\n\t\tfor ( let i = 0; i < maxVertexAttributes; i ++ ) {\n\n\t\t\tnewAttributes[ i ] = 0;\n\t\t\tenabledAttributes[ i ] = 0;\n\t\t\tattributeDivisors[ i ] = 0;\n\n\t\t}\n\n\t\treturn {\n\n\t\t\t// for backward compatibility on non-VAO support browser\n\t\t\tgeometry: null,\n\t\t\tprogram: null,\n\t\t\twireframe: false,\n\n\t\t\tnewAttributes: newAttributes,\n\t\t\tenabledAttributes: enabledAttributes,\n\t\t\tattributeDivisors: attributeDivisors,\n\t\t\tobject: vao,\n\t\t\tattributes: {},\n\t\t\tindex: null\n\n\t\t};\n\n\t}\n\n\tfunction needsUpdate( geometry, index ) {\n\n\t\tconst cachedAttributes = currentState.attributes;\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\tlet attributesNum = 0;\n\n\t\tfor ( const key in geometryAttributes ) {\n\n\t\t\tconst cachedAttribute = cachedAttributes[ key ];\n\t\t\tconst geometryAttribute = geometryAttributes[ key ];\n\n\t\t\tif ( cachedAttribute === undefined ) return true;\n\n\t\t\tif ( cachedAttribute.attribute !== geometryAttribute ) return true;\n\n\t\t\tif ( cachedAttribute.data !== geometryAttribute.data ) return true;\n\n\t\t\tattributesNum ++;\n\n\t\t}\n\n\t\tif ( currentState.attributesNum !== attributesNum ) return true;\n\n\t\tif ( currentState.index !== index ) return true;\n\n\t\treturn false;\n\n\t}\n\n\tfunction saveCache( geometry, index ) {\n\n\t\tconst cache = {};\n\t\tconst attributes = geometry.attributes;\n\t\tlet attributesNum = 0;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\n\t\t\tconst data = {};\n\t\t\tdata.attribute = attribute;\n\n\t\t\tif ( attribute.data ) {\n\n\t\t\t\tdata.data = attribute.data;\n\n\t\t\t}\n\n\t\t\tcache[ key ] = data;\n\n\t\t\tattributesNum ++;\n\n\t\t}\n\n\t\tcurrentState.attributes = cache;\n\t\tcurrentState.attributesNum = attributesNum;\n\n\t\tcurrentState.index = index;\n\n\t}\n\n\tfunction initAttributes() {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\n\t\tfor ( let i = 0, il = newAttributes.length; i < il; i ++ ) {\n\n\t\t\tnewAttributes[ i ] = 0;\n\n\t\t}\n\n\t}\n\n\tfunction enableAttribute( attribute ) {\n\n\t\tenableAttributeAndDivisor( attribute, 0 );\n\n\t}\n\n\tfunction enableAttributeAndDivisor( attribute, meshPerAttribute ) {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\t\tconst enabledAttributes = currentState.enabledAttributes;\n\t\tconst attributeDivisors = currentState.attributeDivisors;\n\n\t\tnewAttributes[ attribute ] = 1;\n\n\t\tif ( enabledAttributes[ attribute ] === 0 ) {\n\n\t\t\tgl.enableVertexAttribArray( attribute );\n\t\t\tenabledAttributes[ attribute ] = 1;\n\n\t\t}\n\n\t\tif ( attributeDivisors[ attribute ] !== meshPerAttribute ) {\n\n\t\t\tconst extension = capabilities.isWebGL2 ? gl : extensions.get( 'ANGLE_instanced_arrays' );\n\n\t\t\textension[ capabilities.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE' ]( attribute, meshPerAttribute );\n\t\t\tattributeDivisors[ attribute ] = meshPerAttribute;\n\n\t\t}\n\n\t}\n\n\tfunction disableUnusedAttributes() {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\t\tconst enabledAttributes = currentState.enabledAttributes;\n\n\t\tfor ( let i = 0, il = enabledAttributes.length; i < il; i ++ ) {\n\n\t\t\tif ( enabledAttributes[ i ] !== newAttributes[ i ] ) {\n\n\t\t\t\tgl.disableVertexAttribArray( i );\n\t\t\t\tenabledAttributes[ i ] = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction vertexAttribPointer( index, size, type, normalized, stride, offset ) {\n\n\t\tif ( capabilities.isWebGL2 === true && ( type === 5124 || type === 5125 ) ) {\n\n\t\t\tgl.vertexAttribIPointer( index, size, type, stride, offset );\n\n\t\t} else {\n\n\t\t\tgl.vertexAttribPointer( index, size, type, normalized, stride, offset );\n\n\t\t}\n\n\t}\n\n\tfunction setupVertexAttributes( object, material, program, geometry ) {\n\n\t\tif ( capabilities.isWebGL2 === false && ( object.isInstancedMesh || geometry.isInstancedBufferGeometry ) ) {\n\n\t\t\tif ( extensions.get( 'ANGLE_instanced_arrays' ) === null ) return;\n\n\t\t}\n\n\t\tinitAttributes();\n\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tconst materialDefaultAttributeValues = material.defaultAttributeValues;\n\n\t\tfor ( const name in programAttributes ) {\n\n\t\t\tconst programAttribute = programAttributes[ name ];\n\n\t\t\tif ( programAttribute >= 0 ) {\n\n\t\t\t\tconst geometryAttribute = geometryAttributes[ name ];\n\n\t\t\t\tif ( geometryAttribute !== undefined ) {\n\n\t\t\t\t\tconst normalized = geometryAttribute.normalized;\n\t\t\t\t\tconst size = geometryAttribute.itemSize;\n\n\t\t\t\t\tconst attribute = attributes.get( geometryAttribute );\n\n\t\t\t\t\t// TODO Attribute may not be available on context restore\n\n\t\t\t\t\tif ( attribute === undefined ) continue;\n\n\t\t\t\t\tconst buffer = attribute.buffer;\n\t\t\t\t\tconst type = attribute.type;\n\t\t\t\t\tconst bytesPerElement = attribute.bytesPerElement;\n\n\t\t\t\t\tif ( geometryAttribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\t\tconst data = geometryAttribute.data;\n\t\t\t\t\t\tconst stride = data.stride;\n\t\t\t\t\t\tconst offset = geometryAttribute.offset;\n\n\t\t\t\t\t\tif ( data && data.isInstancedInterleavedBuffer ) {\n\n\t\t\t\t\t\t\tenableAttributeAndDivisor( programAttribute, data.meshPerAttribute );\n\n\t\t\t\t\t\t\tif ( geometry._maxInstanceCount === undefined ) {\n\n\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = data.meshPerAttribute * data.count;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tenableAttribute( programAttribute );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgl.bindBuffer( 34962, buffer );\n\t\t\t\t\t\tvertexAttribPointer( programAttribute, size, type, normalized, stride * bytesPerElement, offset * bytesPerElement );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( geometryAttribute.isInstancedBufferAttribute ) {\n\n\t\t\t\t\t\t\tenableAttributeAndDivisor( programAttribute, geometryAttribute.meshPerAttribute );\n\n\t\t\t\t\t\t\tif ( geometry._maxInstanceCount === undefined ) {\n\n\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tenableAttribute( programAttribute );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgl.bindBuffer( 34962, buffer );\n\t\t\t\t\t\tvertexAttribPointer( programAttribute, size, type, normalized, 0, 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( name === 'instanceMatrix' ) {\n\n\t\t\t\t\tconst attribute = attributes.get( object.instanceMatrix );\n\n\t\t\t\t\t// TODO Attribute may not be available on context restore\n\n\t\t\t\t\tif ( attribute === undefined ) continue;\n\n\t\t\t\t\tconst buffer = attribute.buffer;\n\t\t\t\t\tconst type = attribute.type;\n\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute + 0, 1 );\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute + 1, 1 );\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute + 2, 1 );\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute + 3, 1 );\n\n\t\t\t\t\tgl.bindBuffer( 34962, buffer );\n\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute + 0, 4, type, false, 64, 0 );\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute + 1, 4, type, false, 64, 16 );\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute + 2, 4, type, false, 64, 32 );\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute + 3, 4, type, false, 64, 48 );\n\n\t\t\t\t} else if ( name === 'instanceColor' ) {\n\n\t\t\t\t\tconst attribute = attributes.get( object.instanceColor );\n\n\t\t\t\t\t// TODO Attribute may not be available on context restore\n\n\t\t\t\t\tif ( attribute === undefined ) continue;\n\n\t\t\t\t\tconst buffer = attribute.buffer;\n\t\t\t\t\tconst type = attribute.type;\n\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute, 1 );\n\n\t\t\t\t\tgl.bindBuffer( 34962, buffer );\n\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute, 3, type, false, 12, 0 );\n\n\t\t\t\t} else if ( materialDefaultAttributeValues !== undefined ) {\n\n\t\t\t\t\tconst value = materialDefaultAttributeValues[ name ];\n\n\t\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\t\tswitch ( value.length ) {\n\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tgl.vertexAttrib2fv( programAttribute, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tgl.vertexAttrib3fv( programAttribute, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tgl.vertexAttrib4fv( programAttribute, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tgl.vertexAttrib1fv( programAttribute, value );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tdisableUnusedAttributes();\n\n\t}\n\n\tfunction dispose() {\n\n\t\treset();\n\n\t\tfor ( const geometryId in bindingStates ) {\n\n\t\t\tconst programMap = bindingStates[ geometryId ];\n\n\t\t\tfor ( const programId in programMap ) {\n\n\t\t\t\tconst stateMap = programMap[ programId ];\n\n\t\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t\t}\n\n\t\t\t\tdelete programMap[ programId ];\n\n\t\t\t}\n\n\t\t\tdelete bindingStates[ geometryId ];\n\n\t\t}\n\n\t}\n\n\tfunction releaseStatesOfGeometry( geometry ) {\n\n\t\tif ( bindingStates[ geometry.id ] === undefined ) return;\n\n\t\tconst programMap = bindingStates[ geometry.id ];\n\n\t\tfor ( const programId in programMap ) {\n\n\t\t\tconst stateMap = programMap[ programId ];\n\n\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t}\n\n\t\t\tdelete programMap[ programId ];\n\n\t\t}\n\n\t\tdelete bindingStates[ geometry.id ];\n\n\t}\n\n\tfunction releaseStatesOfProgram( program ) {\n\n\t\tfor ( const geometryId in bindingStates ) {\n\n\t\t\tconst programMap = bindingStates[ geometryId ];\n\n\t\t\tif ( programMap[ program.id ] === undefined ) continue;\n\n\t\t\tconst stateMap = programMap[ program.id ];\n\n\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t}\n\n\t\t\tdelete programMap[ program.id ];\n\n\t\t}\n\n\t}\n\n\tfunction reset() {\n\n\t\tresetDefaultState();\n\n\t\tif ( currentState === defaultState ) return;\n\n\t\tcurrentState = defaultState;\n\t\tbindVertexArrayObject( currentState.object );\n\n\t}\n\n\t// for backward-compatilibity\n\n\tfunction resetDefaultState() {\n\n\t\tdefaultState.geometry = null;\n\t\tdefaultState.program = null;\n\t\tdefaultState.wireframe = false;\n\n\t}\n\n\treturn {\n\n\t\tsetup: setup,\n\t\treset: reset,\n\t\tresetDefaultState: resetDefaultState,\n\t\tdispose: dispose,\n\t\treleaseStatesOfGeometry: releaseStatesOfGeometry,\n\t\treleaseStatesOfProgram: releaseStatesOfProgram,\n\n\t\tinitAttributes: initAttributes,\n\t\tenableAttribute: enableAttribute,\n\t\tdisableUnusedAttributes: disableUnusedAttributes\n\n\t};\n\n}\n\nfunction WebGLBufferRenderer( gl, extensions, info, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tlet mode;\n\n\tfunction setMode( value ) {\n\n\t\tmode = value;\n\n\t}\n\n\tfunction render( start, count ) {\n\n\t\tgl.drawArrays( mode, start, count );\n\n\t\tinfo.update( count, mode, 1 );\n\n\t}\n\n\tfunction renderInstances( start, count, primcount ) {\n\n\t\tif ( primcount === 0 ) return;\n\n\t\tlet extension, methodName;\n\n\t\tif ( isWebGL2 ) {\n\n\t\t\textension = gl;\n\t\t\tmethodName = 'drawArraysInstanced';\n\n\t\t} else {\n\n\t\t\textension = extensions.get( 'ANGLE_instanced_arrays' );\n\t\t\tmethodName = 'drawArraysInstancedANGLE';\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\textension[ methodName ]( mode, start, count, primcount );\n\n\t\tinfo.update( count, mode, primcount );\n\n\t}\n\n\t//\n\n\tthis.setMode = setMode;\n\tthis.render = render;\n\tthis.renderInstances = renderInstances;\n\n}\n\nfunction WebGLCapabilities( gl, extensions, parameters ) {\n\n\tlet maxAnisotropy;\n\n\tfunction getMaxAnisotropy() {\n\n\t\tif ( maxAnisotropy !== undefined ) return maxAnisotropy;\n\n\t\tif ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {\n\n\t\t\tconst extension = extensions.get( 'EXT_texture_filter_anisotropic' );\n\n\t\t\tmaxAnisotropy = gl.getParameter( extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT );\n\n\t\t} else {\n\n\t\t\tmaxAnisotropy = 0;\n\n\t\t}\n\n\t\treturn maxAnisotropy;\n\n\t}\n\n\tfunction getMaxPrecision( precision ) {\n\n\t\tif ( precision === 'highp' ) {\n\n\t\t\tif ( gl.getShaderPrecisionFormat( 35633, 36338 ).precision > 0 &&\n\t\t\t\tgl.getShaderPrecisionFormat( 35632, 36338 ).precision > 0 ) {\n\n\t\t\t\treturn 'highp';\n\n\t\t\t}\n\n\t\t\tprecision = 'mediump';\n\n\t\t}\n\n\t\tif ( precision === 'mediump' ) {\n\n\t\t\tif ( gl.getShaderPrecisionFormat( 35633, 36337 ).precision > 0 &&\n\t\t\t\tgl.getShaderPrecisionFormat( 35632, 36337 ).precision > 0 ) {\n\n\t\t\t\treturn 'mediump';\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn 'lowp';\n\n\t}\n\n\t/* eslint-disable no-undef */\n\tconst isWebGL2 = ( typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext ) ||\n\t\t( typeof WebGL2ComputeRenderingContext !== 'undefined' && gl instanceof WebGL2ComputeRenderingContext );\n\t/* eslint-enable no-undef */\n\n\tlet precision = parameters.precision !== undefined ? parameters.precision : 'highp';\n\tconst maxPrecision = getMaxPrecision( precision );\n\n\tif ( maxPrecision !== precision ) {\n\n\t\tconsole.warn( 'THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.' );\n\t\tprecision = maxPrecision;\n\n\t}\n\n\tconst drawBuffers = isWebGL2 || extensions.has( 'WEBGL_draw_buffers' );\n\n\tconst logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true;\n\n\tconst maxTextures = gl.getParameter( 34930 );\n\tconst maxVertexTextures = gl.getParameter( 35660 );\n\tconst maxTextureSize = gl.getParameter( 3379 );\n\tconst maxCubemapSize = gl.getParameter( 34076 );\n\n\tconst maxAttributes = gl.getParameter( 34921 );\n\tconst maxVertexUniforms = gl.getParameter( 36347 );\n\tconst maxVaryings = gl.getParameter( 36348 );\n\tconst maxFragmentUniforms = gl.getParameter( 36349 );\n\n\tconst vertexTextures = maxVertexTextures > 0;\n\tconst floatFragmentTextures = isWebGL2 || extensions.has( 'OES_texture_float' );\n\tconst floatVertexTextures = vertexTextures && floatFragmentTextures;\n\n\tconst maxSamples = isWebGL2 ? gl.getParameter( 36183 ) : 0;\n\n\treturn {\n\n\t\tisWebGL2: isWebGL2,\n\n\t\tdrawBuffers: drawBuffers,\n\n\t\tgetMaxAnisotropy: getMaxAnisotropy,\n\t\tgetMaxPrecision: getMaxPrecision,\n\n\t\tprecision: precision,\n\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\n\t\tmaxTextures: maxTextures,\n\t\tmaxVertexTextures: maxVertexTextures,\n\t\tmaxTextureSize: maxTextureSize,\n\t\tmaxCubemapSize: maxCubemapSize,\n\n\t\tmaxAttributes: maxAttributes,\n\t\tmaxVertexUniforms: maxVertexUniforms,\n\t\tmaxVaryings: maxVaryings,\n\t\tmaxFragmentUniforms: maxFragmentUniforms,\n\n\t\tvertexTextures: vertexTextures,\n\t\tfloatFragmentTextures: floatFragmentTextures,\n\t\tfloatVertexTextures: floatVertexTextures,\n\n\t\tmaxSamples: maxSamples\n\n\t};\n\n}\n\nfunction WebGLClipping( properties ) {\n\n\tconst scope = this;\n\n\tlet globalState = null,\n\t\tnumGlobalPlanes = 0,\n\t\tlocalClippingEnabled = false,\n\t\trenderingShadows = false;\n\n\tconst plane = new Plane(),\n\t\tviewNormalMatrix = new Matrix3(),\n\n\t\tuniform = { value: null, needsUpdate: false };\n\n\tthis.uniform = uniform;\n\tthis.numPlanes = 0;\n\tthis.numIntersection = 0;\n\n\tthis.init = function ( planes, enableLocalClipping, camera ) {\n\n\t\tconst enabled =\n\t\t\tplanes.length !== 0 ||\n\t\t\tenableLocalClipping ||\n\t\t\t// enable state of previous frame - the clipping code has to\n\t\t\t// run another frame in order to reset the state:\n\t\t\tnumGlobalPlanes !== 0 ||\n\t\t\tlocalClippingEnabled;\n\n\t\tlocalClippingEnabled = enableLocalClipping;\n\n\t\tglobalState = projectPlanes( planes, camera, 0 );\n\t\tnumGlobalPlanes = planes.length;\n\n\t\treturn enabled;\n\n\t};\n\n\tthis.beginShadows = function () {\n\n\t\trenderingShadows = true;\n\t\tprojectPlanes( null );\n\n\t};\n\n\tthis.endShadows = function () {\n\n\t\trenderingShadows = false;\n\t\tresetGlobalState();\n\n\t};\n\n\tthis.setState = function ( material, camera, useCache ) {\n\n\t\tconst planes = material.clippingPlanes,\n\t\t\tclipIntersection = material.clipIntersection,\n\t\t\tclipShadows = material.clipShadows;\n\n\t\tconst materialProperties = properties.get( material );\n\n\t\tif ( ! localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && ! clipShadows ) {\n\n\t\t\t// there's no local clipping\n\n\t\t\tif ( renderingShadows ) {\n\n\t\t\t\t// there's no global clipping\n\n\t\t\t\tprojectPlanes( null );\n\n\t\t\t} else {\n\n\t\t\t\tresetGlobalState();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst nGlobal = renderingShadows ? 0 : numGlobalPlanes,\n\t\t\t\tlGlobal = nGlobal * 4;\n\n\t\t\tlet dstArray = materialProperties.clippingState || null;\n\n\t\t\tuniform.value = dstArray; // ensure unique state\n\n\t\t\tdstArray = projectPlanes( planes, camera, lGlobal, useCache );\n\n\t\t\tfor ( let i = 0; i !== lGlobal; ++ i ) {\n\n\t\t\t\tdstArray[ i ] = globalState[ i ];\n\n\t\t\t}\n\n\t\t\tmaterialProperties.clippingState = dstArray;\n\t\t\tthis.numIntersection = clipIntersection ? this.numPlanes : 0;\n\t\t\tthis.numPlanes += nGlobal;\n\n\t\t}\n\n\n\t};\n\n\tfunction resetGlobalState() {\n\n\t\tif ( uniform.value !== globalState ) {\n\n\t\t\tuniform.value = globalState;\n\t\t\tuniform.needsUpdate = numGlobalPlanes > 0;\n\n\t\t}\n\n\t\tscope.numPlanes = numGlobalPlanes;\n\t\tscope.numIntersection = 0;\n\n\t}\n\n\tfunction projectPlanes( planes, camera, dstOffset, skipTransform ) {\n\n\t\tconst nPlanes = planes !== null ? planes.length : 0;\n\t\tlet dstArray = null;\n\n\t\tif ( nPlanes !== 0 ) {\n\n\t\t\tdstArray = uniform.value;\n\n\t\t\tif ( skipTransform !== true || dstArray === null ) {\n\n\t\t\t\tconst flatSize = dstOffset + nPlanes * 4,\n\t\t\t\t\tviewMatrix = camera.matrixWorldInverse;\n\n\t\t\t\tviewNormalMatrix.getNormalMatrix( viewMatrix );\n\n\t\t\t\tif ( dstArray === null || dstArray.length < flatSize ) {\n\n\t\t\t\t\tdstArray = new Float32Array( flatSize );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0, i4 = dstOffset; i !== nPlanes; ++ i, i4 += 4 ) {\n\n\t\t\t\t\tplane.copy( planes[ i ] ).applyMatrix4( viewMatrix, viewNormalMatrix );\n\n\t\t\t\t\tplane.normal.toArray( dstArray, i4 );\n\t\t\t\t\tdstArray[ i4 + 3 ] = plane.constant;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tuniform.value = dstArray;\n\t\t\tuniform.needsUpdate = true;\n\n\t\t}\n\n\t\tscope.numPlanes = nPlanes;\n\t\tscope.numIntersection = 0;\n\n\t\treturn dstArray;\n\n\t}\n\n}\n\nfunction WebGLCubeMaps( renderer ) {\n\n\tlet cubemaps = new WeakMap();\n\n\tfunction mapTextureMapping( texture, mapping ) {\n\n\t\tif ( mapping === EquirectangularReflectionMapping ) {\n\n\t\t\ttexture.mapping = CubeReflectionMapping;\n\n\t\t} else if ( mapping === EquirectangularRefractionMapping ) {\n\n\t\t\ttexture.mapping = CubeRefractionMapping;\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction get( texture ) {\n\n\t\tif ( texture && texture.isTexture ) {\n\n\t\t\tconst mapping = texture.mapping;\n\n\t\t\tif ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ) {\n\n\t\t\t\tif ( cubemaps.has( texture ) ) {\n\n\t\t\t\t\tconst cubemap = cubemaps.get( texture ).texture;\n\t\t\t\t\treturn mapTextureMapping( cubemap, texture.mapping );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst image = texture.image;\n\n\t\t\t\t\tif ( image && image.height > 0 ) {\n\n\t\t\t\t\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\t\t\t\t\tconst renderTarget = new WebGLCubeRenderTarget( image.height / 2 );\n\t\t\t\t\t\trenderTarget.fromEquirectangularTexture( renderer, texture );\n\t\t\t\t\t\tcubemaps.set( texture, renderTarget );\n\n\t\t\t\t\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t\t\t\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t\t\t\t\treturn mapTextureMapping( renderTarget.texture, texture.mapping );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// image not yet ready. try the conversion next frame\n\n\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tconst cubemap = cubemaps.get( texture );\n\n\t\tif ( cubemap !== undefined ) {\n\n\t\t\tcubemaps.delete( texture );\n\t\t\tcubemap.dispose();\n\n\t\t}\n\n\t}\n\n\tfunction dispose() {\n\n\t\tcubemaps = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction WebGLExtensions( gl ) {\n\n\tconst extensions = {};\n\n\tfunction getExtension( name ) {\n\n\t\tif ( extensions[ name ] !== undefined ) {\n\n\t\t\treturn extensions[ name ];\n\n\t\t}\n\n\t\tlet extension;\n\n\t\tswitch ( name ) {\n\n\t\t\tcase 'WEBGL_depth_texture':\n\t\t\t\textension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'EXT_texture_filter_anisotropic':\n\t\t\t\textension = gl.getExtension( 'EXT_texture_filter_anisotropic' ) || gl.getExtension( 'MOZ_EXT_texture_filter_anisotropic' ) || gl.getExtension( 'WEBKIT_EXT_texture_filter_anisotropic' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'WEBGL_compressed_texture_s3tc':\n\t\t\t\textension = gl.getExtension( 'WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'MOZ_WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_s3tc' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'WEBGL_compressed_texture_pvrtc':\n\t\t\t\textension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\textension = gl.getExtension( name );\n\n\t\t}\n\n\t\textensions[ name ] = extension;\n\n\t\treturn extension;\n\n\t}\n\n\treturn {\n\n\t\thas: function ( name ) {\n\n\t\t\treturn getExtension( name ) !== null;\n\n\t\t},\n\n\t\tinit: function ( capabilities ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\tgetExtension( 'EXT_color_buffer_float' );\n\n\t\t\t} else {\n\n\t\t\t\tgetExtension( 'WEBGL_depth_texture' );\n\t\t\t\tgetExtension( 'OES_texture_float' );\n\t\t\t\tgetExtension( 'OES_texture_half_float' );\n\t\t\t\tgetExtension( 'OES_texture_half_float_linear' );\n\t\t\t\tgetExtension( 'OES_standard_derivatives' );\n\t\t\t\tgetExtension( 'OES_element_index_uint' );\n\t\t\t\tgetExtension( 'OES_vertex_array_object' );\n\t\t\t\tgetExtension( 'ANGLE_instanced_arrays' );\n\n\t\t\t}\n\n\t\t\tgetExtension( 'OES_texture_float_linear' );\n\t\t\tgetExtension( 'EXT_color_buffer_half_float' );\n\n\t\t},\n\n\t\tget: function ( name ) {\n\n\t\t\tconst extension = getExtension( name );\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' );\n\n\t\t\t}\n\n\t\t\treturn extension;\n\n\t\t}\n\n\t};\n\n}\n\nfunction WebGLGeometries( gl, attributes, info, bindingStates ) {\n\n\tconst geometries = {};\n\tconst wireframeAttributes = new WeakMap();\n\n\tfunction onGeometryDispose( event ) {\n\n\t\tconst geometry = event.target;\n\n\t\tif ( geometry.index !== null ) {\n\n\t\t\tattributes.remove( geometry.index );\n\n\t\t}\n\n\t\tfor ( const name in geometry.attributes ) {\n\n\t\t\tattributes.remove( geometry.attributes[ name ] );\n\n\t\t}\n\n\t\tgeometry.removeEventListener( 'dispose', onGeometryDispose );\n\n\t\tdelete geometries[ geometry.id ];\n\n\t\tconst attribute = wireframeAttributes.get( geometry );\n\n\t\tif ( attribute ) {\n\n\t\t\tattributes.remove( attribute );\n\t\t\twireframeAttributes.delete( geometry );\n\n\t\t}\n\n\t\tbindingStates.releaseStatesOfGeometry( geometry );\n\n\t\tif ( geometry.isInstancedBufferGeometry === true ) {\n\n\t\t\tdelete geometry._maxInstanceCount;\n\n\t\t}\n\n\t\t//\n\n\t\tinfo.memory.geometries --;\n\n\t}\n\n\tfunction get( object, geometry ) {\n\n\t\tif ( geometries[ geometry.id ] === true ) return geometry;\n\n\t\tgeometry.addEventListener( 'dispose', onGeometryDispose );\n\n\t\tgeometries[ geometry.id ] = true;\n\n\t\tinfo.memory.geometries ++;\n\n\t\treturn geometry;\n\n\t}\n\n\tfunction update( geometry ) {\n\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\t// Updating index buffer in VAO now. See WebGLBindingStates.\n\n\t\tfor ( const name in geometryAttributes ) {\n\n\t\t\tattributes.update( geometryAttributes[ name ], 34962 );\n\n\t\t}\n\n\t\t// morph targets\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst array = morphAttributes[ name ];\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tattributes.update( array[ i ], 34962 );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction updateWireframeAttribute( geometry ) {\n\n\t\tconst indices = [];\n\n\t\tconst geometryIndex = geometry.index;\n\t\tconst geometryPosition = geometry.attributes.position;\n\t\tlet version = 0;\n\n\t\tif ( geometryIndex !== null ) {\n\n\t\t\tconst array = geometryIndex.array;\n\t\t\tversion = geometryIndex.version;\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i += 3 ) {\n\n\t\t\t\tconst a = array[ i + 0 ];\n\t\t\t\tconst b = array[ i + 1 ];\n\t\t\t\tconst c = array[ i + 2 ];\n\n\t\t\t\tindices.push( a, b, b, c, c, a );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst array = geometryPosition.array;\n\t\t\tversion = geometryPosition.version;\n\n\t\t\tfor ( let i = 0, l = ( array.length / 3 ) - 1; i < l; i += 3 ) {\n\n\t\t\t\tconst a = i + 0;\n\t\t\t\tconst b = i + 1;\n\t\t\t\tconst c = i + 2;\n\n\t\t\t\tindices.push( a, b, b, c, c, a );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst attribute = new ( arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );\n\t\tattribute.version = version;\n\n\t\t// Updating index buffer in VAO now. See WebGLBindingStates\n\n\t\t//\n\n\t\tconst previousAttribute = wireframeAttributes.get( geometry );\n\n\t\tif ( previousAttribute ) attributes.remove( previousAttribute );\n\n\t\t//\n\n\t\twireframeAttributes.set( geometry, attribute );\n\n\t}\n\n\tfunction getWireframeAttribute( geometry ) {\n\n\t\tconst currentAttribute = wireframeAttributes.get( geometry );\n\n\t\tif ( currentAttribute ) {\n\n\t\t\tconst geometryIndex = geometry.index;\n\n\t\t\tif ( geometryIndex !== null ) {\n\n\t\t\t\t// if the attribute is obsolete, create a new one\n\n\t\t\t\tif ( currentAttribute.version < geometryIndex.version ) {\n\n\t\t\t\t\tupdateWireframeAttribute( geometry );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tupdateWireframeAttribute( geometry );\n\n\t\t}\n\n\t\treturn wireframeAttributes.get( geometry );\n\n\t}\n\n\treturn {\n\n\t\tget: get,\n\t\tupdate: update,\n\n\t\tgetWireframeAttribute: getWireframeAttribute\n\n\t};\n\n}\n\nfunction WebGLIndexedBufferRenderer( gl, extensions, info, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tlet mode;\n\n\tfunction setMode( value ) {\n\n\t\tmode = value;\n\n\t}\n\n\tlet type, bytesPerElement;\n\n\tfunction setIndex( value ) {\n\n\t\ttype = value.type;\n\t\tbytesPerElement = value.bytesPerElement;\n\n\t}\n\n\tfunction render( start, count ) {\n\n\t\tgl.drawElements( mode, count, type, start * bytesPerElement );\n\n\t\tinfo.update( count, mode, 1 );\n\n\t}\n\n\tfunction renderInstances( start, count, primcount ) {\n\n\t\tif ( primcount === 0 ) return;\n\n\t\tlet extension, methodName;\n\n\t\tif ( isWebGL2 ) {\n\n\t\t\textension = gl;\n\t\t\tmethodName = 'drawElementsInstanced';\n\n\t\t} else {\n\n\t\t\textension = extensions.get( 'ANGLE_instanced_arrays' );\n\t\t\tmethodName = 'drawElementsInstancedANGLE';\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\textension[ methodName ]( mode, count, type, start * bytesPerElement, primcount );\n\n\t\tinfo.update( count, mode, primcount );\n\n\t}\n\n\t//\n\n\tthis.setMode = setMode;\n\tthis.setIndex = setIndex;\n\tthis.render = render;\n\tthis.renderInstances = renderInstances;\n\n}\n\nfunction WebGLInfo( gl ) {\n\n\tconst memory = {\n\t\tgeometries: 0,\n\t\ttextures: 0\n\t};\n\n\tconst render = {\n\t\tframe: 0,\n\t\tcalls: 0,\n\t\ttriangles: 0,\n\t\tpoints: 0,\n\t\tlines: 0\n\t};\n\n\tfunction update( count, mode, instanceCount ) {\n\n\t\trender.calls ++;\n\n\t\tswitch ( mode ) {\n\n\t\t\tcase 4:\n\t\t\t\trender.triangles += instanceCount * ( count / 3 );\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\trender.lines += instanceCount * ( count / 2 );\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\trender.lines += instanceCount * ( count - 1 );\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\trender.lines += instanceCount * count;\n\t\t\t\tbreak;\n\n\t\t\tcase 0:\n\t\t\t\trender.points += instanceCount * count;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.error( 'THREE.WebGLInfo: Unknown draw mode:', mode );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\tfunction reset() {\n\n\t\trender.frame ++;\n\t\trender.calls = 0;\n\t\trender.triangles = 0;\n\t\trender.points = 0;\n\t\trender.lines = 0;\n\n\t}\n\n\treturn {\n\t\tmemory: memory,\n\t\trender: render,\n\t\tprograms: null,\n\t\tautoReset: true,\n\t\treset: reset,\n\t\tupdate: update\n\t};\n\n}\n\nfunction numericalSort( a, b ) {\n\n\treturn a[ 0 ] - b[ 0 ];\n\n}\n\nfunction absNumericalSort( a, b ) {\n\n\treturn Math.abs( b[ 1 ] ) - Math.abs( a[ 1 ] );\n\n}\n\nfunction WebGLMorphtargets( gl ) {\n\n\tconst influencesList = {};\n\tconst morphInfluences = new Float32Array( 8 );\n\n\tconst workInfluences = [];\n\n\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\tworkInfluences[ i ] = [ i, 0 ];\n\n\t}\n\n\tfunction update( object, geometry, material, program ) {\n\n\t\tconst objectInfluences = object.morphTargetInfluences;\n\n\t\t// When object doesn't have morph target influences defined, we treat it as a 0-length array\n\t\t// This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences\n\n\t\tconst length = objectInfluences === undefined ? 0 : objectInfluences.length;\n\n\t\tlet influences = influencesList[ geometry.id ];\n\n\t\tif ( influences === undefined || influences.length !== length ) {\n\n\t\t\t// initialise list\n\n\t\t\tinfluences = [];\n\n\t\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\t\tinfluences[ i ] = [ i, 0 ];\n\n\t\t\t}\n\n\t\t\tinfluencesList[ geometry.id ] = influences;\n\n\t\t}\n\n\t\t// Collect influences\n\n\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\tconst influence = influences[ i ];\n\n\t\t\tinfluence[ 0 ] = i;\n\t\t\tinfluence[ 1 ] = objectInfluences[ i ];\n\n\t\t}\n\n\t\tinfluences.sort( absNumericalSort );\n\n\t\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\t\tif ( i < length && influences[ i ][ 1 ] ) {\n\n\t\t\t\tworkInfluences[ i ][ 0 ] = influences[ i ][ 0 ];\n\t\t\t\tworkInfluences[ i ][ 1 ] = influences[ i ][ 1 ];\n\n\t\t\t} else {\n\n\t\t\t\tworkInfluences[ i ][ 0 ] = Number.MAX_SAFE_INTEGER;\n\t\t\t\tworkInfluences[ i ][ 1 ] = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\tworkInfluences.sort( numericalSort );\n\n\t\tconst morphTargets = material.morphTargets && geometry.morphAttributes.position;\n\t\tconst morphNormals = material.morphNormals && geometry.morphAttributes.normal;\n\n\t\tlet morphInfluencesSum = 0;\n\n\t\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\t\tconst influence = workInfluences[ i ];\n\t\t\tconst index = influence[ 0 ];\n\t\t\tconst value = influence[ 1 ];\n\n\t\t\tif ( index !== Number.MAX_SAFE_INTEGER && value ) {\n\n\t\t\t\tif ( morphTargets && geometry.getAttribute( 'morphTarget' + i ) !== morphTargets[ index ] ) {\n\n\t\t\t\t\tgeometry.setAttribute( 'morphTarget' + i, morphTargets[ index ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( morphNormals && geometry.getAttribute( 'morphNormal' + i ) !== morphNormals[ index ] ) {\n\n\t\t\t\t\tgeometry.setAttribute( 'morphNormal' + i, morphNormals[ index ] );\n\n\t\t\t\t}\n\n\t\t\t\tmorphInfluences[ i ] = value;\n\t\t\t\tmorphInfluencesSum += value;\n\n\t\t\t} else {\n\n\t\t\t\tif ( morphTargets && geometry.hasAttribute( 'morphTarget' + i ) === true ) {\n\n\t\t\t\t\tgeometry.deleteAttribute( 'morphTarget' + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( morphNormals && geometry.hasAttribute( 'morphNormal' + i ) === true ) {\n\n\t\t\t\t\tgeometry.deleteAttribute( 'morphNormal' + i );\n\n\t\t\t\t}\n\n\t\t\t\tmorphInfluences[ i ] = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// GLSL shader uses formula baseinfluence * base + sum(target * influence)\n\t\t// This allows us to switch between absolute morphs and relative morphs without changing shader code\n\t\t// When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence)\n\t\tconst morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n\n\t\tprogram.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence );\n\t\tprogram.getUniforms().setValue( gl, 'morphTargetInfluences', morphInfluences );\n\n\t}\n\n\treturn {\n\n\t\tupdate: update\n\n\t};\n\n}\n\nfunction WebGLObjects( gl, geometries, attributes, info ) {\n\n\tlet updateMap = new WeakMap();\n\n\tfunction update( object ) {\n\n\t\tconst frame = info.render.frame;\n\n\t\tconst geometry = object.geometry;\n\t\tconst buffergeometry = geometries.get( object, geometry );\n\n\t\t// Update once per frame\n\n\t\tif ( updateMap.get( buffergeometry ) !== frame ) {\n\n\t\t\tgeometries.update( buffergeometry );\n\n\t\t\tupdateMap.set( buffergeometry, frame );\n\n\t\t}\n\n\t\tif ( object.isInstancedMesh ) {\n\n\t\t\tif ( object.hasEventListener( 'dispose', onInstancedMeshDispose ) === false ) {\n\n\t\t\t\tobject.addEventListener( 'dispose', onInstancedMeshDispose );\n\n\t\t\t}\n\n\t\t\tattributes.update( object.instanceMatrix, 34962 );\n\n\t\t\tif ( object.instanceColor !== null ) {\n\n\t\t\t\tattributes.update( object.instanceColor, 34962 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn buffergeometry;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tupdateMap = new WeakMap();\n\n\t}\n\n\tfunction onInstancedMeshDispose( event ) {\n\n\t\tconst instancedMesh = event.target;\n\n\t\tinstancedMesh.removeEventListener( 'dispose', onInstancedMeshDispose );\n\n\t\tattributes.remove( instancedMesh.instanceMatrix );\n\n\t\tif ( instancedMesh.instanceColor !== null ) attributes.remove( instancedMesh.instanceColor );\n\n\t}\n\n\treturn {\n\n\t\tupdate: update,\n\t\tdispose: dispose\n\n\t};\n\n}\n\nclass DataTexture2DArray extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, depth = 1 ) {\n\n\t\tsuper( null );\n\n\t\tthis.image = { data, width, height, depth };\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nDataTexture2DArray.prototype.isDataTexture2DArray = true;\n\nclass DataTexture3D extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, depth = 1 ) {\n\n\t\t// We're going to add .setXXX() methods for setting properties later.\n\t\t// Users can still set in DataTexture3D directly.\n\t\t//\n\t\t//\tconst texture = new THREE.DataTexture3D( data, width, height, depth );\n\t\t// \ttexture.anisotropy = 16;\n\t\t//\n\t\t// See #14839\n\n\t\tsuper( null );\n\n\t\tthis.image = { data, width, height, depth };\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nDataTexture3D.prototype.isDataTexture3D = true;\n\n/**\n * Uniforms of a program.\n * Those form a tree structure with a special top-level container for the root,\n * which you get by calling 'new WebGLUniforms( gl, program )'.\n *\n *\n * Properties of inner nodes including the top-level container:\n *\n * .seq - array of nested uniforms\n * .map - nested uniforms by name\n *\n *\n * Methods of all nodes except the top-level container:\n *\n * .setValue( gl, value, [textures] )\n *\n * \t\tuploads a uniform value(s)\n * \tthe 'textures' parameter is needed for sampler uniforms\n *\n *\n * Static methods of the top-level container (textures factorizations):\n *\n * .upload( gl, seq, values, textures )\n *\n * \t\tsets uniforms in 'seq' to 'values[id].value'\n *\n * .seqWithValue( seq, values ) : filteredSeq\n *\n * \t\tfilters 'seq' entries with corresponding entry in values\n *\n *\n * Methods of the top-level container (textures factorizations):\n *\n * .setValue( gl, name, value, textures )\n *\n * \t\tsets uniform with name 'name' to 'value'\n *\n * .setOptional( gl, obj, prop )\n *\n * \t\tlike .set for an optional property of the object\n *\n */\n\nconst emptyTexture = new Texture();\nconst emptyTexture2dArray = new DataTexture2DArray();\nconst emptyTexture3d = new DataTexture3D();\nconst emptyCubeTexture = new CubeTexture();\n\n// --- Utilities ---\n\n// Array Caches (provide typed arrays for temporary by size)\n\nconst arrayCacheF32 = [];\nconst arrayCacheI32 = [];\n\n// Float32Array caches used for uploading Matrix uniforms\n\nconst mat4array = new Float32Array( 16 );\nconst mat3array = new Float32Array( 9 );\nconst mat2array = new Float32Array( 4 );\n\n// Flattening for arrays of vectors and matrices\n\nfunction flatten( array, nBlocks, blockSize ) {\n\n\tconst firstElem = array[ 0 ];\n\n\tif ( firstElem <= 0 || firstElem > 0 ) return array;\n\t// unoptimized: ! isNaN( firstElem )\n\t// see http://jacksondunstan.com/articles/983\n\n\tconst n = nBlocks * blockSize;\n\tlet r = arrayCacheF32[ n ];\n\n\tif ( r === undefined ) {\n\n\t\tr = new Float32Array( n );\n\t\tarrayCacheF32[ n ] = r;\n\n\t}\n\n\tif ( nBlocks !== 0 ) {\n\n\t\tfirstElem.toArray( r, 0 );\n\n\t\tfor ( let i = 1, offset = 0; i !== nBlocks; ++ i ) {\n\n\t\t\toffset += blockSize;\n\t\t\tarray[ i ].toArray( r, offset );\n\n\t\t}\n\n\t}\n\n\treturn r;\n\n}\n\nfunction arraysEqual( a, b ) {\n\n\tif ( a.length !== b.length ) return false;\n\n\tfor ( let i = 0, l = a.length; i < l; i ++ ) {\n\n\t\tif ( a[ i ] !== b[ i ] ) return false;\n\n\t}\n\n\treturn true;\n\n}\n\nfunction copyArray( a, b ) {\n\n\tfor ( let i = 0, l = b.length; i < l; i ++ ) {\n\n\t\ta[ i ] = b[ i ];\n\n\t}\n\n}\n\n// Texture unit allocation\n\nfunction allocTexUnits( textures, n ) {\n\n\tlet r = arrayCacheI32[ n ];\n\n\tif ( r === undefined ) {\n\n\t\tr = new Int32Array( n );\n\t\tarrayCacheI32[ n ] = r;\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\tr[ i ] = textures.allocateTextureUnit();\n\n\t}\n\n\treturn r;\n\n}\n\n// --- Setters ---\n\n// Note: Defining these methods externally, because they come in a bunch\n// and this way their names minify.\n\n// Single scalar\n\nfunction setValueV1f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1f( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single float vector (from flat array or THREE.VectorN)\n\nfunction setValueV2f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {\n\n\t\t\tgl.uniform2f( this.addr, v.x, v.y );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform2fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV3f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {\n\n\t\t\tgl.uniform3f( this.addr, v.x, v.y, v.z );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\n\t\t}\n\n\t} else if ( v.r !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.r || cache[ 1 ] !== v.g || cache[ 2 ] !== v.b ) {\n\n\t\t\tgl.uniform3f( this.addr, v.r, v.g, v.b );\n\n\t\t\tcache[ 0 ] = v.r;\n\t\t\tcache[ 1 ] = v.g;\n\t\t\tcache[ 2 ] = v.b;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform3fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV4f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {\n\n\t\t\tgl.uniform4f( this.addr, v.x, v.y, v.z, v.w );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\t\t\tcache[ 3 ] = v.w;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform4fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\n// Single matrix (from flat array or THREE.MatrixN)\n\nfunction setValueM2( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix2fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat2array.set( elements );\n\n\t\tgl.uniformMatrix2fv( this.addr, false, mat2array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\nfunction setValueM3( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix3fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat3array.set( elements );\n\n\t\tgl.uniformMatrix3fv( this.addr, false, mat3array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\nfunction setValueM4( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix4fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat4array.set( elements );\n\n\t\tgl.uniformMatrix4fv( this.addr, false, mat4array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\n// Single integer / boolean\n\nfunction setValueV1i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1i( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single integer / boolean vector (from flat array)\n\nfunction setValueV2i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform2iv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\nfunction setValueV3i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform3iv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\nfunction setValueV4i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform4iv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\n// Single unsigned integer\n\nfunction setValueV1ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1ui( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single unsigned integer vector (from flat array)\n\nfunction setValueV2ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform2uiv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\nfunction setValueV3ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform3uiv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\nfunction setValueV4ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform4uiv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\n\n// Single texture (2D / Cube)\n\nfunction setValueT1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.safeSetTexture2D( v || emptyTexture, unit );\n\n}\n\nfunction setValueT3D1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture3D( v || emptyTexture3d, unit );\n\n}\n\nfunction setValueT6( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.safeSetTextureCube( v || emptyCubeTexture, unit );\n\n}\n\nfunction setValueT2DArray1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture2DArray( v || emptyTexture2dArray, unit );\n\n}\n\n// Helper to pick the right setter for the singular case\n\nfunction getSingularSetter( type ) {\n\n\tswitch ( type ) {\n\n\t\tcase 0x1406: return setValueV1f; // FLOAT\n\t\tcase 0x8b50: return setValueV2f; // _VEC2\n\t\tcase 0x8b51: return setValueV3f; // _VEC3\n\t\tcase 0x8b52: return setValueV4f; // _VEC4\n\n\t\tcase 0x8b5a: return setValueM2; // _MAT2\n\t\tcase 0x8b5b: return setValueM3; // _MAT3\n\t\tcase 0x8b5c: return setValueM4; // _MAT4\n\n\t\tcase 0x1404: case 0x8b56: return setValueV1i; // INT, BOOL\n\t\tcase 0x8b53: case 0x8b57: return setValueV2i; // _VEC2\n\t\tcase 0x8b54: case 0x8b58: return setValueV3i; // _VEC3\n\t\tcase 0x8b55: case 0x8b59: return setValueV4i; // _VEC4\n\n\t\tcase 0x1405: return setValueV1ui; // UINT\n\t\tcase 0x8dc6: return setValueV2ui; // _VEC2\n\t\tcase 0x8dc7: return setValueV3ui; // _VEC3\n\t\tcase 0x8dc8: return setValueV4ui; // _VEC4\n\n\t\tcase 0x8b5e: // SAMPLER_2D\n\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\t\tcase 0x8dca: // INT_SAMPLER_2D\n\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\t\tcase 0x8b62: // SAMPLER_2D_SHADOW\n\t\t\treturn setValueT1;\n\n\t\tcase 0x8b5f: // SAMPLER_3D\n\t\tcase 0x8dcb: // INT_SAMPLER_3D\n\t\tcase 0x8dd3: // UNSIGNED_INT_SAMPLER_3D\n\t\t\treturn setValueT3D1;\n\n\t\tcase 0x8b60: // SAMPLER_CUBE\n\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\t\tcase 0x8dc5: // SAMPLER_CUBE_SHADOW\n\t\t\treturn setValueT6;\n\n\t\tcase 0x8dc1: // SAMPLER_2D_ARRAY\n\t\tcase 0x8dcf: // INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW\n\t\t\treturn setValueT2DArray1;\n\n\t}\n\n}\n\n\n// Array of scalars\n\nfunction setValueV1fArray( gl, v ) {\n\n\tgl.uniform1fv( this.addr, v );\n\n}\n\n// Array of vectors (from flat array or array of THREE.VectorN)\n\nfunction setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}\n\nfunction setValueV3fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 3 );\n\n\tgl.uniform3fv( this.addr, data );\n\n}\n\nfunction setValueV4fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 4 );\n\n\tgl.uniform4fv( this.addr, data );\n\n}\n\n// Array of matrices (from flat array or array of THREE.MatrixN)\n\nfunction setValueM2Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 4 );\n\n\tgl.uniformMatrix2fv( this.addr, false, data );\n\n}\n\nfunction setValueM3Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 9 );\n\n\tgl.uniformMatrix3fv( this.addr, false, data );\n\n}\n\nfunction setValueM4Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 16 );\n\n\tgl.uniformMatrix4fv( this.addr, false, data );\n\n}\n\n// Array of integer / boolean\n\nfunction setValueV1iArray( gl, v ) {\n\n\tgl.uniform1iv( this.addr, v );\n\n}\n\n// Array of integer / boolean vectors (from flat array)\n\nfunction setValueV2iArray( gl, v ) {\n\n\tgl.uniform2iv( this.addr, v );\n\n}\n\nfunction setValueV3iArray( gl, v ) {\n\n\tgl.uniform3iv( this.addr, v );\n\n}\n\nfunction setValueV4iArray( gl, v ) {\n\n\tgl.uniform4iv( this.addr, v );\n\n}\n\n// Array of unsigned integer\n\nfunction setValueV1uiArray( gl, v ) {\n\n\tgl.uniform1uiv( this.addr, v );\n\n}\n\n// Array of unsigned integer vectors (from flat array)\n\nfunction setValueV2uiArray( gl, v ) {\n\n\tgl.uniform2uiv( this.addr, v );\n\n}\n\nfunction setValueV3uiArray( gl, v ) {\n\n\tgl.uniform3uiv( this.addr, v );\n\n}\n\nfunction setValueV4uiArray( gl, v ) {\n\n\tgl.uniform4uiv( this.addr, v );\n\n}\n\n\n// Array of textures (2D / Cube)\n\nfunction setValueT1Array( gl, v, textures ) {\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tgl.uniform1iv( this.addr, units );\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.safeSetTexture2D( v[ i ] || emptyTexture, units[ i ] );\n\n\t}\n\n}\n\nfunction setValueT6Array( gl, v, textures ) {\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tgl.uniform1iv( this.addr, units );\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.safeSetTextureCube( v[ i ] || emptyCubeTexture, units[ i ] );\n\n\t}\n\n}\n\n// Helper to pick the right setter for a pure (bottom-level) array\n\nfunction getPureArraySetter( type ) {\n\n\tswitch ( type ) {\n\n\t\tcase 0x1406: return setValueV1fArray; // FLOAT\n\t\tcase 0x8b50: return setValueV2fArray; // _VEC2\n\t\tcase 0x8b51: return setValueV3fArray; // _VEC3\n\t\tcase 0x8b52: return setValueV4fArray; // _VEC4\n\n\t\tcase 0x8b5a: return setValueM2Array; // _MAT2\n\t\tcase 0x8b5b: return setValueM3Array; // _MAT3\n\t\tcase 0x8b5c: return setValueM4Array; // _MAT4\n\n\t\tcase 0x1404: case 0x8b56: return setValueV1iArray; // INT, BOOL\n\t\tcase 0x8b53: case 0x8b57: return setValueV2iArray; // _VEC2\n\t\tcase 0x8b54: case 0x8b58: return setValueV3iArray; // _VEC3\n\t\tcase 0x8b55: case 0x8b59: return setValueV4iArray; // _VEC4\n\n\t\tcase 0x1405: return setValueV1uiArray; // UINT\n\t\tcase 0x8dc6: return setValueV2uiArray; // _VEC2\n\t\tcase 0x8dc7: return setValueV3uiArray; // _VEC3\n\t\tcase 0x8dc8: return setValueV4uiArray; // _VEC4\n\n\t\tcase 0x8b5e: // SAMPLER_2D\n\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\t\tcase 0x8dca: // INT_SAMPLER_2D\n\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\t\tcase 0x8b62: // SAMPLER_2D_SHADOW\n\t\t\treturn setValueT1Array;\n\n\t\tcase 0x8b60: // SAMPLER_CUBE\n\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\t\tcase 0x8dc5: // SAMPLER_CUBE_SHADOW\n\t\t\treturn setValueT6Array;\n\n\t}\n\n}\n\n// --- Uniform Classes ---\n\nfunction SingleUniform( id, activeInfo, addr ) {\n\n\tthis.id = id;\n\tthis.addr = addr;\n\tthis.cache = [];\n\tthis.setValue = getSingularSetter( activeInfo.type );\n\n\t// this.path = activeInfo.name; // DEBUG\n\n}\n\nfunction PureArrayUniform( id, activeInfo, addr ) {\n\n\tthis.id = id;\n\tthis.addr = addr;\n\tthis.cache = [];\n\tthis.size = activeInfo.size;\n\tthis.setValue = getPureArraySetter( activeInfo.type );\n\n\t// this.path = activeInfo.name; // DEBUG\n\n}\n\nPureArrayUniform.prototype.updateCache = function ( data ) {\n\n\tconst cache = this.cache;\n\n\tif ( data instanceof Float32Array && cache.length !== data.length ) {\n\n\t\tthis.cache = new Float32Array( data.length );\n\n\t}\n\n\tcopyArray( cache, data );\n\n};\n\nfunction StructuredUniform( id ) {\n\n\tthis.id = id;\n\n\tthis.seq = [];\n\tthis.map = {};\n\n}\n\nStructuredUniform.prototype.setValue = function ( gl, value, textures ) {\n\n\tconst seq = this.seq;\n\n\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\tconst u = seq[ i ];\n\t\tu.setValue( gl, value[ u.id ], textures );\n\n\t}\n\n};\n\n// --- Top-level ---\n\n// Parser - builds up the property tree from the path strings\n\nconst RePathPart = /(\\w+)(\\])?(\\[|\\.)?/g;\n\n// extracts\n// \t- the identifier (member name or array index)\n// - followed by an optional right bracket (found when array index)\n// - followed by an optional left bracket or dot (type of subscript)\n//\n// Note: These portions can be read in a non-overlapping fashion and\n// allow straightforward parsing of the hierarchy that WebGL encodes\n// in the uniform names.\n\nfunction addUniform( container, uniformObject ) {\n\n\tcontainer.seq.push( uniformObject );\n\tcontainer.map[ uniformObject.id ] = uniformObject;\n\n}\n\nfunction parseUniform( activeInfo, addr, container ) {\n\n\tconst path = activeInfo.name,\n\t\tpathLength = path.length;\n\n\t// reset RegExp object, because of the early exit of a previous run\n\tRePathPart.lastIndex = 0;\n\n\twhile ( true ) {\n\n\t\tconst match = RePathPart.exec( path ),\n\t\t\tmatchEnd = RePathPart.lastIndex;\n\n\t\tlet id = match[ 1 ];\n\t\tconst idIsIndex = match[ 2 ] === ']',\n\t\t\tsubscript = match[ 3 ];\n\n\t\tif ( idIsIndex ) id = id | 0; // convert to integer\n\n\t\tif ( subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength ) {\n\n\t\t\t// bare name or \"pure\" bottom-level array \"[0]\" suffix\n\n\t\t\taddUniform( container, subscript === undefined ?\n\t\t\t\tnew SingleUniform( id, activeInfo, addr ) :\n\t\t\t\tnew PureArrayUniform( id, activeInfo, addr ) );\n\n\t\t\tbreak;\n\n\t\t} else {\n\n\t\t\t// step into inner node / create it in case it doesn't exist\n\n\t\t\tconst map = container.map;\n\t\t\tlet next = map[ id ];\n\n\t\t\tif ( next === undefined ) {\n\n\t\t\t\tnext = new StructuredUniform( id );\n\t\t\t\taddUniform( container, next );\n\n\t\t\t}\n\n\t\t\tcontainer = next;\n\n\t\t}\n\n\t}\n\n}\n\n// Root Container\n\nfunction WebGLUniforms( gl, program ) {\n\n\tthis.seq = [];\n\tthis.map = {};\n\n\tconst n = gl.getProgramParameter( program, 35718 );\n\n\tfor ( let i = 0; i < n; ++ i ) {\n\n\t\tconst info = gl.getActiveUniform( program, i ),\n\t\t\taddr = gl.getUniformLocation( program, info.name );\n\n\t\tparseUniform( info, addr, this );\n\n\t}\n\n}\n\nWebGLUniforms.prototype.setValue = function ( gl, name, value, textures ) {\n\n\tconst u = this.map[ name ];\n\n\tif ( u !== undefined ) u.setValue( gl, value, textures );\n\n};\n\nWebGLUniforms.prototype.setOptional = function ( gl, object, name ) {\n\n\tconst v = object[ name ];\n\n\tif ( v !== undefined ) this.setValue( gl, name, v );\n\n};\n\n\n// Static interface\n\nWebGLUniforms.upload = function ( gl, seq, values, textures ) {\n\n\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\tconst u = seq[ i ],\n\t\t\tv = values[ u.id ];\n\n\t\tif ( v.needsUpdate !== false ) {\n\n\t\t\t// note: always updating when .needsUpdate is undefined\n\t\t\tu.setValue( gl, v.value, textures );\n\n\t\t}\n\n\t}\n\n};\n\nWebGLUniforms.seqWithValue = function ( seq, values ) {\n\n\tconst r = [];\n\n\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\tconst u = seq[ i ];\n\t\tif ( u.id in values ) r.push( u );\n\n\t}\n\n\treturn r;\n\n};\n\nfunction WebGLShader( gl, type, string ) {\n\n\tconst shader = gl.createShader( type );\n\n\tgl.shaderSource( shader, string );\n\tgl.compileShader( shader );\n\n\treturn shader;\n\n}\n\nlet programIdCount = 0;\n\nfunction addLineNumbers( string ) {\n\n\tconst lines = string.split( '\\n' );\n\n\tfor ( let i = 0; i < lines.length; i ++ ) {\n\n\t\tlines[ i ] = ( i + 1 ) + ': ' + lines[ i ];\n\n\t}\n\n\treturn lines.join( '\\n' );\n\n}\n\nfunction getEncodingComponents( encoding ) {\n\n\tswitch ( encoding ) {\n\n\t\tcase LinearEncoding:\n\t\t\treturn [ 'Linear', '( value )' ];\n\t\tcase sRGBEncoding:\n\t\t\treturn [ 'sRGB', '( value )' ];\n\t\tcase RGBEEncoding:\n\t\t\treturn [ 'RGBE', '( value )' ];\n\t\tcase RGBM7Encoding:\n\t\t\treturn [ 'RGBM', '( value, 7.0 )' ];\n\t\tcase RGBM16Encoding:\n\t\t\treturn [ 'RGBM', '( value, 16.0 )' ];\n\t\tcase RGBDEncoding:\n\t\t\treturn [ 'RGBD', '( value, 256.0 )' ];\n\t\tcase GammaEncoding:\n\t\t\treturn [ 'Gamma', '( value, float( GAMMA_FACTOR ) )' ];\n\t\tcase LogLuvEncoding:\n\t\t\treturn [ 'LogLuv', '( value )' ];\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Unsupported encoding:', encoding );\n\t\t\treturn [ 'Linear', '( value )' ];\n\n\t}\n\n}\n\nfunction getShaderErrors( gl, shader, type ) {\n\n\tconst status = gl.getShaderParameter( shader, 35713 );\n\tconst log = gl.getShaderInfoLog( shader ).trim();\n\n\tif ( status && log === '' ) return '';\n\n\t// --enable-privileged-webgl-extension\n\t// console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );\n\n\tconst source = gl.getShaderSource( shader );\n\n\treturn 'THREE.WebGLShader: gl.getShaderInfoLog() ' + type + '\\n' + log + addLineNumbers( source );\n\n}\n\nfunction getTexelDecodingFunction( functionName, encoding ) {\n\n\tconst components = getEncodingComponents( encoding );\n\treturn 'vec4 ' + functionName + '( vec4 value ) { return ' + components[ 0 ] + 'ToLinear' + components[ 1 ] + '; }';\n\n}\n\nfunction getTexelEncodingFunction( functionName, encoding ) {\n\n\tconst components = getEncodingComponents( encoding );\n\treturn 'vec4 ' + functionName + '( vec4 value ) { return LinearTo' + components[ 0 ] + components[ 1 ] + '; }';\n\n}\n\nfunction getToneMappingFunction( functionName, toneMapping ) {\n\n\tlet toneMappingName;\n\n\tswitch ( toneMapping ) {\n\n\t\tcase LinearToneMapping:\n\t\t\ttoneMappingName = 'Linear';\n\t\t\tbreak;\n\n\t\tcase ReinhardToneMapping:\n\t\t\ttoneMappingName = 'Reinhard';\n\t\t\tbreak;\n\n\t\tcase CineonToneMapping:\n\t\t\ttoneMappingName = 'OptimizedCineon';\n\t\t\tbreak;\n\n\t\tcase ACESFilmicToneMapping:\n\t\t\ttoneMappingName = 'ACESFilmic';\n\t\t\tbreak;\n\n\t\tcase CustomToneMapping:\n\t\t\ttoneMappingName = 'Custom';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Unsupported toneMapping:', toneMapping );\n\t\t\ttoneMappingName = 'Linear';\n\n\t}\n\n\treturn 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }';\n\n}\n\nfunction generateExtensions( parameters ) {\n\n\tconst chunks = [\n\t\t( parameters.extensionDerivatives || parameters.envMapCubeUV || parameters.bumpMap || parameters.tangentSpaceNormalMap || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ) ? '#extension GL_OES_standard_derivatives : enable' : '',\n\t\t( parameters.extensionFragDepth || parameters.logarithmicDepthBuffer ) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '',\n\t\t( parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ) ? '#extension GL_EXT_draw_buffers : require' : '',\n\t\t( parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission > 0.0 ) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : ''\n\t];\n\n\treturn chunks.filter( filterEmptyLine ).join( '\\n' );\n\n}\n\nfunction generateDefines( defines ) {\n\n\tconst chunks = [];\n\n\tfor ( const name in defines ) {\n\n\t\tconst value = defines[ name ];\n\n\t\tif ( value === false ) continue;\n\n\t\tchunks.push( '#define ' + name + ' ' + value );\n\n\t}\n\n\treturn chunks.join( '\\n' );\n\n}\n\nfunction fetchAttributeLocations( gl, program ) {\n\n\tconst attributes = {};\n\n\tconst n = gl.getProgramParameter( program, 35721 );\n\n\tfor ( let i = 0; i < n; i ++ ) {\n\n\t\tconst info = gl.getActiveAttrib( program, i );\n\t\tconst name = info.name;\n\n\t\t// console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i );\n\n\t\tattributes[ name ] = gl.getAttribLocation( program, name );\n\n\t}\n\n\treturn attributes;\n\n}\n\nfunction filterEmptyLine( string ) {\n\n\treturn string !== '';\n\n}\n\nfunction replaceLightNums( string, parameters ) {\n\n\treturn string\n\t\t.replace( /NUM_DIR_LIGHTS/g, parameters.numDirLights )\n\t\t.replace( /NUM_SPOT_LIGHTS/g, parameters.numSpotLights )\n\t\t.replace( /NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights )\n\t\t.replace( /NUM_POINT_LIGHTS/g, parameters.numPointLights )\n\t\t.replace( /NUM_HEMI_LIGHTS/g, parameters.numHemiLights )\n\t\t.replace( /NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows )\n\t\t.replace( /NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows )\n\t\t.replace( /NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows );\n\n}\n\nfunction replaceClippingPlaneNums( string, parameters ) {\n\n\treturn string\n\t\t.replace( /NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes )\n\t\t.replace( /UNION_CLIPPING_PLANES/g, ( parameters.numClippingPlanes - parameters.numClipIntersection ) );\n\n}\n\n// Resolve Includes\n\nconst includePattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\n\nfunction resolveIncludes( string ) {\n\n\treturn string.replace( includePattern, includeReplacer );\n\n}\n\nfunction includeReplacer( match, include ) {\n\n\tconst string = ShaderChunk[ include ];\n\n\tif ( string === undefined ) {\n\n\t\tthrow new Error( 'Can not resolve #include <' + include + '>' );\n\n\t}\n\n\treturn resolveIncludes( string );\n\n}\n\n// Unroll Loops\n\nconst deprecatedUnrollLoopPattern = /#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g;\nconst unrollLoopPattern = /#pragma unroll_loop_start\\s+for\\s*\\(\\s*int\\s+i\\s*=\\s*(\\d+)\\s*;\\s*i\\s*<\\s*(\\d+)\\s*;\\s*i\\s*\\+\\+\\s*\\)\\s*{([\\s\\S]+?)}\\s+#pragma unroll_loop_end/g;\n\nfunction unrollLoops( string ) {\n\n\treturn string\n\t\t.replace( unrollLoopPattern, loopReplacer )\n\t\t.replace( deprecatedUnrollLoopPattern, deprecatedLoopReplacer );\n\n}\n\nfunction deprecatedLoopReplacer( match, start, end, snippet ) {\n\n\tconsole.warn( 'WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.' );\n\treturn loopReplacer( match, start, end, snippet );\n\n}\n\nfunction loopReplacer( match, start, end, snippet ) {\n\n\tlet string = '';\n\n\tfor ( let i = parseInt( start ); i < parseInt( end ); i ++ ) {\n\n\t\tstring += snippet\n\t\t\t.replace( /\\[\\s*i\\s*\\]/g, '[ ' + i + ' ]' )\n\t\t\t.replace( /UNROLLED_LOOP_INDEX/g, i );\n\n\t}\n\n\treturn string;\n\n}\n\n//\n\nfunction generatePrecision( parameters ) {\n\n\tlet precisionstring = 'precision ' + parameters.precision + ' float;\\nprecision ' + parameters.precision + ' int;';\n\n\tif ( parameters.precision === 'highp' ) {\n\n\t\tprecisionstring += '\\n#define HIGH_PRECISION';\n\n\t} else if ( parameters.precision === 'mediump' ) {\n\n\t\tprecisionstring += '\\n#define MEDIUM_PRECISION';\n\n\t} else if ( parameters.precision === 'lowp' ) {\n\n\t\tprecisionstring += '\\n#define LOW_PRECISION';\n\n\t}\n\n\treturn precisionstring;\n\n}\n\nfunction generateShadowMapTypeDefine( parameters ) {\n\n\tlet shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC';\n\n\tif ( parameters.shadowMapType === PCFShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF';\n\n\t} else if ( parameters.shadowMapType === PCFSoftShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT';\n\n\t} else if ( parameters.shadowMapType === VSMShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM';\n\n\t}\n\n\treturn shadowMapTypeDefine;\n\n}\n\nfunction generateEnvMapTypeDefine( parameters ) {\n\n\tlet envMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.envMapMode ) {\n\n\t\t\tcase CubeReflectionMapping:\n\t\t\tcase CubeRefractionMapping:\n\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\t\t\t\tbreak;\n\n\t\t\tcase CubeUVReflectionMapping:\n\t\t\tcase CubeUVRefractionMapping:\n\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapTypeDefine;\n\n}\n\nfunction generateEnvMapModeDefine( parameters ) {\n\n\tlet envMapModeDefine = 'ENVMAP_MODE_REFLECTION';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.envMapMode ) {\n\n\t\t\tcase CubeRefractionMapping:\n\t\t\tcase CubeUVRefractionMapping:\n\n\t\t\t\tenvMapModeDefine = 'ENVMAP_MODE_REFRACTION';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapModeDefine;\n\n}\n\nfunction generateEnvMapBlendingDefine( parameters ) {\n\n\tlet envMapBlendingDefine = 'ENVMAP_BLENDING_NONE';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.combine ) {\n\n\t\t\tcase MultiplyOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY';\n\t\t\t\tbreak;\n\n\t\t\tcase MixOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MIX';\n\t\t\t\tbreak;\n\n\t\t\tcase AddOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_ADD';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapBlendingDefine;\n\n}\n\nfunction WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {\n\n\tconst gl = renderer.getContext();\n\n\tconst defines = parameters.defines;\n\n\tlet vertexShader = parameters.vertexShader;\n\tlet fragmentShader = parameters.fragmentShader;\n\n\tconst shadowMapTypeDefine = generateShadowMapTypeDefine( parameters );\n\tconst envMapTypeDefine = generateEnvMapTypeDefine( parameters );\n\tconst envMapModeDefine = generateEnvMapModeDefine( parameters );\n\tconst envMapBlendingDefine = generateEnvMapBlendingDefine( parameters );\n\n\n\tconst gammaFactorDefine = ( renderer.gammaFactor > 0 ) ? renderer.gammaFactor : 1.0;\n\n\tconst customExtensions = parameters.isWebGL2 ? '' : generateExtensions( parameters );\n\n\tconst customDefines = generateDefines( defines );\n\n\tconst program = gl.createProgram();\n\n\tlet prefixVertex, prefixFragment;\n\tlet versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\\n' : '';\n\n\tif ( parameters.isRawShaderMaterial ) {\n\n\t\tprefixVertex = [\n\n\t\t\tcustomDefines\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tif ( prefixVertex.length > 0 ) {\n\n\t\t\tprefixVertex += '\\n';\n\n\t\t}\n\n\t\tprefixFragment = [\n\n\t\t\tcustomExtensions,\n\t\t\tcustomDefines\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tif ( prefixFragment.length > 0 ) {\n\n\t\t\tprefixFragment += '\\n';\n\n\t\t}\n\n\t} else {\n\n\t\tprefixVertex = [\n\n\t\t\tgeneratePrecision( parameters ),\n\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines,\n\n\t\t\tparameters.instancing ? '#define USE_INSTANCING' : '',\n\t\t\tparameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '',\n\n\t\t\tparameters.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '',\n\n\t\t\t'#define GAMMA_FACTOR ' + gammaFactorDefine,\n\n\t\t\t'#define MAX_BONES ' + parameters.maxBones,\n\t\t\t( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '',\n\t\t\t( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '',\n\n\t\t\tparameters.map ? '#define USE_MAP' : '',\n\t\t\tparameters.envMap ? '#define USE_ENVMAP' : '',\n\t\t\tparameters.envMap ? '#define ' + envMapModeDefine : '',\n\t\t\tparameters.lightMap ? '#define USE_LIGHTMAP' : '',\n\t\t\tparameters.aoMap ? '#define USE_AOMAP' : '',\n\t\t\tparameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '',\n\t\t\tparameters.bumpMap ? '#define USE_BUMPMAP' : '',\n\t\t\tparameters.normalMap ? '#define USE_NORMALMAP' : '',\n\t\t\t( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '',\n\t\t\t( parameters.normalMap && parameters.tangentSpaceNormalMap ) ? '#define TANGENTSPACE_NORMALMAP' : '',\n\n\t\t\tparameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '',\n\t\t\tparameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '',\n\t\t\tparameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',\n\t\t\tparameters.displacementMap && parameters.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '',\n\t\t\tparameters.specularMap ? '#define USE_SPECULARMAP' : '',\n\t\t\tparameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',\n\t\t\tparameters.metalnessMap ? '#define USE_METALNESSMAP' : '',\n\t\t\tparameters.alphaMap ? '#define USE_ALPHAMAP' : '',\n\t\t\tparameters.transmission ? '#define USE_TRANSMISSION' : '',\n\t\t\tparameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',\n\t\t\tparameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',\n\n\t\t\tparameters.vertexTangents ? '#define USE_TANGENT' : '',\n\t\t\tparameters.vertexColors ? '#define USE_COLOR' : '',\n\t\t\tparameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',\n\t\t\tparameters.vertexUvs ? '#define USE_UV' : '',\n\t\t\tparameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '',\n\n\t\t\tparameters.flatShading ? '#define FLAT_SHADED' : '',\n\n\t\t\tparameters.skinning ? '#define USE_SKINNING' : '',\n\t\t\tparameters.useVertexTexture ? '#define BONE_TEXTURE' : '',\n\n\t\t\tparameters.morphTargets ? '#define USE_MORPHTARGETS' : '',\n\t\t\tparameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '',\n\t\t\tparameters.doubleSided ? '#define DOUBLE_SIDED' : '',\n\t\t\tparameters.flipSided ? '#define FLIP_SIDED' : '',\n\n\t\t\tparameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '',\n\t\t\tparameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '',\n\n\t\t\tparameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '',\n\n\t\t\tparameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',\n\t\t\t( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',\n\n\t\t\t'uniform mat4 modelMatrix;',\n\t\t\t'uniform mat4 modelViewMatrix;',\n\t\t\t'uniform mat4 projectionMatrix;',\n\t\t\t'uniform mat4 viewMatrix;',\n\t\t\t'uniform mat3 normalMatrix;',\n\t\t\t'uniform vec3 cameraPosition;',\n\t\t\t'uniform bool isOrthographic;',\n\n\t\t\t'#ifdef USE_INSTANCING',\n\n\t\t\t'\tattribute mat4 instanceMatrix;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_INSTANCING_COLOR',\n\n\t\t\t'\tattribute vec3 instanceColor;',\n\n\t\t\t'#endif',\n\n\t\t\t'attribute vec3 position;',\n\t\t\t'attribute vec3 normal;',\n\t\t\t'attribute vec2 uv;',\n\n\t\t\t'#ifdef USE_TANGENT',\n\n\t\t\t'\tattribute vec4 tangent;',\n\n\t\t\t'#endif',\n\n\t\t\t'#if defined( USE_COLOR_ALPHA )',\n\n\t\t\t'\tattribute vec4 color;',\n\n\t\t\t'#elif defined( USE_COLOR )',\n\n\t\t\t'\tattribute vec3 color;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_MORPHTARGETS',\n\n\t\t\t'\tattribute vec3 morphTarget0;',\n\t\t\t'\tattribute vec3 morphTarget1;',\n\t\t\t'\tattribute vec3 morphTarget2;',\n\t\t\t'\tattribute vec3 morphTarget3;',\n\n\t\t\t'\t#ifdef USE_MORPHNORMALS',\n\n\t\t\t'\t\tattribute vec3 morphNormal0;',\n\t\t\t'\t\tattribute vec3 morphNormal1;',\n\t\t\t'\t\tattribute vec3 morphNormal2;',\n\t\t\t'\t\tattribute vec3 morphNormal3;',\n\n\t\t\t'\t#else',\n\n\t\t\t'\t\tattribute vec3 morphTarget4;',\n\t\t\t'\t\tattribute vec3 morphTarget5;',\n\t\t\t'\t\tattribute vec3 morphTarget6;',\n\t\t\t'\t\tattribute vec3 morphTarget7;',\n\n\t\t\t'\t#endif',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_SKINNING',\n\n\t\t\t'\tattribute vec4 skinIndex;',\n\t\t\t'\tattribute vec4 skinWeight;',\n\n\t\t\t'#endif',\n\n\t\t\t'\\n'\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tprefixFragment = [\n\n\t\t\tcustomExtensions,\n\n\t\t\tgeneratePrecision( parameters ),\n\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines,\n\n\t\t\tparameters.alphaTest ? '#define ALPHATEST ' + parameters.alphaTest + ( parameters.alphaTest % 1 ? '' : '.0' ) : '', // add '.0' if integer\n\n\t\t\t'#define GAMMA_FACTOR ' + gammaFactorDefine,\n\n\t\t\t( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '',\n\t\t\t( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '',\n\n\t\t\tparameters.map ? '#define USE_MAP' : '',\n\t\t\tparameters.matcap ? '#define USE_MATCAP' : '',\n\t\t\tparameters.envMap ? '#define USE_ENVMAP' : '',\n\t\t\tparameters.envMap ? '#define ' + envMapTypeDefine : '',\n\t\t\tparameters.envMap ? '#define ' + envMapModeDefine : '',\n\t\t\tparameters.envMap ? '#define ' + envMapBlendingDefine : '',\n\t\t\tparameters.lightMap ? '#define USE_LIGHTMAP' : '',\n\t\t\tparameters.aoMap ? '#define USE_AOMAP' : '',\n\t\t\tparameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '',\n\t\t\tparameters.bumpMap ? '#define USE_BUMPMAP' : '',\n\t\t\tparameters.normalMap ? '#define USE_NORMALMAP' : '',\n\t\t\t( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '',\n\t\t\t( parameters.normalMap && parameters.tangentSpaceNormalMap ) ? '#define TANGENTSPACE_NORMALMAP' : '',\n\t\t\tparameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '',\n\t\t\tparameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '',\n\t\t\tparameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',\n\t\t\tparameters.specularMap ? '#define USE_SPECULARMAP' : '',\n\t\t\tparameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',\n\t\t\tparameters.metalnessMap ? '#define USE_METALNESSMAP' : '',\n\t\t\tparameters.alphaMap ? '#define USE_ALPHAMAP' : '',\n\n\t\t\tparameters.sheen ? '#define USE_SHEEN' : '',\n\t\t\tparameters.transmission ? '#define USE_TRANSMISSION' : '',\n\t\t\tparameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',\n\t\t\tparameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',\n\n\t\t\tparameters.vertexTangents ? '#define USE_TANGENT' : '',\n\t\t\tparameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '',\n\t\t\tparameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',\n\t\t\tparameters.vertexUvs ? '#define USE_UV' : '',\n\t\t\tparameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '',\n\n\t\t\tparameters.gradientMap ? '#define USE_GRADIENTMAP' : '',\n\n\t\t\tparameters.flatShading ? '#define FLAT_SHADED' : '',\n\n\t\t\tparameters.doubleSided ? '#define DOUBLE_SIDED' : '',\n\t\t\tparameters.flipSided ? '#define FLIP_SIDED' : '',\n\n\t\t\tparameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '',\n\t\t\tparameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '',\n\n\t\t\tparameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '',\n\n\t\t\tparameters.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '',\n\n\t\t\tparameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',\n\t\t\t( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',\n\n\t\t\t( ( parameters.extensionShaderTextureLOD || parameters.envMap ) && parameters.rendererExtensionShaderTextureLod ) ? '#define TEXTURE_LOD_EXT' : '',\n\n\t\t\t'uniform mat4 viewMatrix;',\n\t\t\t'uniform vec3 cameraPosition;',\n\t\t\t'uniform bool isOrthographic;',\n\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? '#define TONE_MAPPING' : '',\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? ShaderChunk[ 'tonemapping_pars_fragment' ] : '', // this code is required here because it is used by the toneMapping() function defined below\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? getToneMappingFunction( 'toneMapping', parameters.toneMapping ) : '',\n\n\t\t\tparameters.dithering ? '#define DITHERING' : '',\n\n\t\t\tShaderChunk[ 'encodings_pars_fragment' ], // this code is required here because it is used by the various encoding/decoding function defined below\n\t\t\tparameters.map ? getTexelDecodingFunction( 'mapTexelToLinear', parameters.mapEncoding ) : '',\n\t\t\tparameters.matcap ? getTexelDecodingFunction( 'matcapTexelToLinear', parameters.matcapEncoding ) : '',\n\t\t\tparameters.envMap ? getTexelDecodingFunction( 'envMapTexelToLinear', parameters.envMapEncoding ) : '',\n\t\t\tparameters.emissiveMap ? getTexelDecodingFunction( 'emissiveMapTexelToLinear', parameters.emissiveMapEncoding ) : '',\n\t\t\tparameters.lightMap ? getTexelDecodingFunction( 'lightMapTexelToLinear', parameters.lightMapEncoding ) : '',\n\t\t\tgetTexelEncodingFunction( 'linearToOutputTexel', parameters.outputEncoding ),\n\n\t\t\tparameters.depthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '',\n\n\t\t\t'\\n'\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t}\n\n\tvertexShader = resolveIncludes( vertexShader );\n\tvertexShader = replaceLightNums( vertexShader, parameters );\n\tvertexShader = replaceClippingPlaneNums( vertexShader, parameters );\n\n\tfragmentShader = resolveIncludes( fragmentShader );\n\tfragmentShader = replaceLightNums( fragmentShader, parameters );\n\tfragmentShader = replaceClippingPlaneNums( fragmentShader, parameters );\n\n\tvertexShader = unrollLoops( vertexShader );\n\tfragmentShader = unrollLoops( fragmentShader );\n\n\tif ( parameters.isWebGL2 && parameters.isRawShaderMaterial !== true ) {\n\n\t\t// GLSL 3.0 conversion for built-in materials and ShaderMaterial\n\n\t\tversionString = '#version 300 es\\n';\n\n\t\tprefixVertex = [\n\t\t\t'#define attribute in',\n\t\t\t'#define varying out',\n\t\t\t'#define texture2D texture'\n\t\t].join( '\\n' ) + '\\n' + prefixVertex;\n\n\t\tprefixFragment = [\n\t\t\t'#define varying in',\n\t\t\t( parameters.glslVersion === GLSL3 ) ? '' : 'out highp vec4 pc_fragColor;',\n\t\t\t( parameters.glslVersion === GLSL3 ) ? '' : '#define gl_FragColor pc_fragColor',\n\t\t\t'#define gl_FragDepthEXT gl_FragDepth',\n\t\t\t'#define texture2D texture',\n\t\t\t'#define textureCube texture',\n\t\t\t'#define texture2DProj textureProj',\n\t\t\t'#define texture2DLodEXT textureLod',\n\t\t\t'#define texture2DProjLodEXT textureProjLod',\n\t\t\t'#define textureCubeLodEXT textureLod',\n\t\t\t'#define texture2DGradEXT textureGrad',\n\t\t\t'#define texture2DProjGradEXT textureProjGrad',\n\t\t\t'#define textureCubeGradEXT textureGrad'\n\t\t].join( '\\n' ) + '\\n' + prefixFragment;\n\n\t}\n\n\tconst vertexGlsl = versionString + prefixVertex + vertexShader;\n\tconst fragmentGlsl = versionString + prefixFragment + fragmentShader;\n\n\t// console.log( '*VERTEX*', vertexGlsl );\n\t// console.log( '*FRAGMENT*', fragmentGlsl );\n\n\tconst glVertexShader = WebGLShader( gl, 35633, vertexGlsl );\n\tconst glFragmentShader = WebGLShader( gl, 35632, fragmentGlsl );\n\n\tgl.attachShader( program, glVertexShader );\n\tgl.attachShader( program, glFragmentShader );\n\n\t// Force a particular attribute to index 0.\n\n\tif ( parameters.index0AttributeName !== undefined ) {\n\n\t\tgl.bindAttribLocation( program, 0, parameters.index0AttributeName );\n\n\t} else if ( parameters.morphTargets === true ) {\n\n\t\t// programs with morphTargets displace position out of attribute 0\n\t\tgl.bindAttribLocation( program, 0, 'position' );\n\n\t}\n\n\tgl.linkProgram( program );\n\n\t// check for link errors\n\tif ( renderer.debug.checkShaderErrors ) {\n\n\t\tconst programLog = gl.getProgramInfoLog( program ).trim();\n\t\tconst vertexLog = gl.getShaderInfoLog( glVertexShader ).trim();\n\t\tconst fragmentLog = gl.getShaderInfoLog( glFragmentShader ).trim();\n\n\t\tlet runnable = true;\n\t\tlet haveDiagnostics = true;\n\n\t\tif ( gl.getProgramParameter( program, 35714 ) === false ) {\n\n\t\t\trunnable = false;\n\n\t\t\tconst vertexErrors = getShaderErrors( gl, glVertexShader, 'vertex' );\n\t\t\tconst fragmentErrors = getShaderErrors( gl, glFragmentShader, 'fragment' );\n\n\t\t\tconsole.error( 'THREE.WebGLProgram: shader error: ', gl.getError(), '35715', gl.getProgramParameter( program, 35715 ), 'gl.getProgramInfoLog', programLog, vertexErrors, fragmentErrors );\n\n\t\t} else if ( programLog !== '' ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLProgram: gl.getProgramInfoLog()', programLog );\n\n\t\t} else if ( vertexLog === '' || fragmentLog === '' ) {\n\n\t\t\thaveDiagnostics = false;\n\n\t\t}\n\n\t\tif ( haveDiagnostics ) {\n\n\t\t\tthis.diagnostics = {\n\n\t\t\t\trunnable: runnable,\n\n\t\t\t\tprogramLog: programLog,\n\n\t\t\t\tvertexShader: {\n\n\t\t\t\t\tlog: vertexLog,\n\t\t\t\t\tprefix: prefixVertex\n\n\t\t\t\t},\n\n\t\t\t\tfragmentShader: {\n\n\t\t\t\t\tlog: fragmentLog,\n\t\t\t\t\tprefix: prefixFragment\n\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t}\n\n\t}\n\n\t// Clean up\n\n\t// Crashes in iOS9 and iOS10. #18402\n\t// gl.detachShader( program, glVertexShader );\n\t// gl.detachShader( program, glFragmentShader );\n\n\tgl.deleteShader( glVertexShader );\n\tgl.deleteShader( glFragmentShader );\n\n\t// set up caching for uniform locations\n\n\tlet cachedUniforms;\n\n\tthis.getUniforms = function () {\n\n\t\tif ( cachedUniforms === undefined ) {\n\n\t\t\tcachedUniforms = new WebGLUniforms( gl, program );\n\n\t\t}\n\n\t\treturn cachedUniforms;\n\n\t};\n\n\t// set up caching for attribute locations\n\n\tlet cachedAttributes;\n\n\tthis.getAttributes = function () {\n\n\t\tif ( cachedAttributes === undefined ) {\n\n\t\t\tcachedAttributes = fetchAttributeLocations( gl, program );\n\n\t\t}\n\n\t\treturn cachedAttributes;\n\n\t};\n\n\t// free resource\n\n\tthis.destroy = function () {\n\n\t\tbindingStates.releaseStatesOfProgram( this );\n\n\t\tgl.deleteProgram( program );\n\t\tthis.program = undefined;\n\n\t};\n\n\t//\n\n\tthis.name = parameters.shaderName;\n\tthis.id = programIdCount ++;\n\tthis.cacheKey = cacheKey;\n\tthis.usedTimes = 1;\n\tthis.program = program;\n\tthis.vertexShader = glVertexShader;\n\tthis.fragmentShader = glFragmentShader;\n\n\treturn this;\n\n}\n\nfunction WebGLPrograms( renderer, cubemaps, extensions, capabilities, bindingStates, clipping ) {\n\n\tconst programs = [];\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\tconst logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;\n\tconst floatVertexTextures = capabilities.floatVertexTextures;\n\tconst maxVertexUniforms = capabilities.maxVertexUniforms;\n\tconst vertexTextures = capabilities.vertexTextures;\n\n\tlet precision = capabilities.precision;\n\n\tconst shaderIDs = {\n\t\tMeshDepthMaterial: 'depth',\n\t\tMeshDistanceMaterial: 'distanceRGBA',\n\t\tMeshNormalMaterial: 'normal',\n\t\tMeshBasicMaterial: 'basic',\n\t\tMeshLambertMaterial: 'lambert',\n\t\tMeshPhongMaterial: 'phong',\n\t\tMeshToonMaterial: 'toon',\n\t\tMeshStandardMaterial: 'physical',\n\t\tMeshPhysicalMaterial: 'physical',\n\t\tMeshMatcapMaterial: 'matcap',\n\t\tLineBasicMaterial: 'basic',\n\t\tLineDashedMaterial: 'dashed',\n\t\tPointsMaterial: 'points',\n\t\tShadowMaterial: 'shadow',\n\t\tSpriteMaterial: 'sprite'\n\t};\n\n\tconst parameterNames = [\n\t\t'precision', 'isWebGL2', 'supportsVertexTextures', 'outputEncoding', 'instancing', 'instancingColor',\n\t\t'map', 'mapEncoding', 'matcap', 'matcapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'envMapCubeUV',\n\t\t'lightMap', 'lightMapEncoding', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap', 'objectSpaceNormalMap', 'tangentSpaceNormalMap', 'clearcoatMap', 'clearcoatRoughnessMap', 'clearcoatNormalMap', 'displacementMap', 'specularMap',\n\t\t'roughnessMap', 'metalnessMap', 'gradientMap',\n\t\t'alphaMap', 'combine', 'vertexColors', 'vertexAlphas', 'vertexTangents', 'vertexUvs', 'uvsVertexOnly', 'fog', 'useFog', 'fogExp2',\n\t\t'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning',\n\t\t'maxBones', 'useVertexTexture', 'morphTargets', 'morphNormals', 'premultipliedAlpha',\n\t\t'numDirLights', 'numPointLights', 'numSpotLights', 'numHemiLights', 'numRectAreaLights',\n\t\t'numDirLightShadows', 'numPointLightShadows', 'numSpotLightShadows',\n\t\t'shadowMapEnabled', 'shadowMapType', 'toneMapping', 'physicallyCorrectLights',\n\t\t'alphaTest', 'doubleSided', 'flipSided', 'numClippingPlanes', 'numClipIntersection', 'depthPacking', 'dithering',\n\t\t'sheen', 'transmission', 'transmissionMap', 'thicknessMap'\n\t];\n\n\tfunction getMaxBones( object ) {\n\n\t\tconst skeleton = object.skeleton;\n\t\tconst bones = skeleton.bones;\n\n\t\tif ( floatVertexTextures ) {\n\n\t\t\treturn 1024;\n\n\t\t} else {\n\n\t\t\t// default for when object is not specified\n\t\t\t// ( for example when prebuilding shader to be used with multiple objects )\n\t\t\t//\n\t\t\t// - leave some extra space for other uniforms\n\t\t\t// - limit here is ANGLE's 254 max uniform vectors\n\t\t\t// (up to 54 should be safe)\n\n\t\t\tconst nVertexUniforms = maxVertexUniforms;\n\t\t\tconst nVertexMatrices = Math.floor( ( nVertexUniforms - 20 ) / 4 );\n\n\t\t\tconst maxBones = Math.min( nVertexMatrices, bones.length );\n\n\t\t\tif ( maxBones < bones.length ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Skeleton has ' + bones.length + ' bones. This GPU supports ' + maxBones + '.' );\n\t\t\t\treturn 0;\n\n\t\t\t}\n\n\t\t\treturn maxBones;\n\n\t\t}\n\n\t}\n\n\tfunction getTextureEncodingFromMap( map ) {\n\n\t\tlet encoding;\n\n\t\tif ( map && map.isTexture ) {\n\n\t\t\tencoding = map.encoding;\n\n\t\t} else if ( map && map.isWebGLRenderTarget ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLPrograms.getTextureEncodingFromMap: don\\'t use render targets as textures. Use their .texture property instead.' );\n\t\t\tencoding = map.texture.encoding;\n\n\t\t} else {\n\n\t\t\tencoding = LinearEncoding;\n\n\t\t}\n\n\t\treturn encoding;\n\n\t}\n\n\tfunction getParameters( material, lights, shadows, scene, object ) {\n\n\t\tconst fog = scene.fog;\n\t\tconst environment = material.isMeshStandardMaterial ? scene.environment : null;\n\n\t\tconst envMap = cubemaps.get( material.envMap || environment );\n\n\t\tconst shaderID = shaderIDs[ material.type ];\n\n\t\t// heuristics to create shader parameters according to lights in the scene\n\t\t// (not to blow over maxLights budget)\n\n\t\tconst maxBones = object.isSkinnedMesh ? getMaxBones( object ) : 0;\n\n\t\tif ( material.precision !== null ) {\n\n\t\t\tprecision = capabilities.getMaxPrecision( material.precision );\n\n\t\t\tif ( precision !== material.precision ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tlet vertexShader, fragmentShader;\n\n\t\tif ( shaderID ) {\n\n\t\t\tconst shader = ShaderLib[ shaderID ];\n\n\t\t\tvertexShader = shader.vertexShader;\n\t\t\tfragmentShader = shader.fragmentShader;\n\n\t\t} else {\n\n\t\t\tvertexShader = material.vertexShader;\n\t\t\tfragmentShader = material.fragmentShader;\n\n\t\t}\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tconst parameters = {\n\n\t\t\tisWebGL2: isWebGL2,\n\n\t\t\tshaderID: shaderID,\n\t\t\tshaderName: material.type,\n\n\t\t\tvertexShader: vertexShader,\n\t\t\tfragmentShader: fragmentShader,\n\t\t\tdefines: material.defines,\n\n\t\t\tisRawShaderMaterial: material.isRawShaderMaterial === true,\n\t\t\tglslVersion: material.glslVersion,\n\n\t\t\tprecision: precision,\n\n\t\t\tinstancing: object.isInstancedMesh === true,\n\t\t\tinstancingColor: object.isInstancedMesh === true && object.instanceColor !== null,\n\n\t\t\tsupportsVertexTextures: vertexTextures,\n\t\t\toutputEncoding: ( currentRenderTarget !== null ) ? getTextureEncodingFromMap( currentRenderTarget.texture ) : renderer.outputEncoding,\n\t\t\tmap: !! material.map,\n\t\t\tmapEncoding: getTextureEncodingFromMap( material.map ),\n\t\t\tmatcap: !! material.matcap,\n\t\t\tmatcapEncoding: getTextureEncodingFromMap( material.matcap ),\n\t\t\tenvMap: !! envMap,\n\t\t\tenvMapMode: envMap && envMap.mapping,\n\t\t\tenvMapEncoding: getTextureEncodingFromMap( envMap ),\n\t\t\tenvMapCubeUV: ( !! envMap ) && ( ( envMap.mapping === CubeUVReflectionMapping ) || ( envMap.mapping === CubeUVRefractionMapping ) ),\n\t\t\tlightMap: !! material.lightMap,\n\t\t\tlightMapEncoding: getTextureEncodingFromMap( material.lightMap ),\n\t\t\taoMap: !! material.aoMap,\n\t\t\temissiveMap: !! material.emissiveMap,\n\t\t\temissiveMapEncoding: getTextureEncodingFromMap( material.emissiveMap ),\n\t\t\tbumpMap: !! material.bumpMap,\n\t\t\tnormalMap: !! material.normalMap,\n\t\t\tobjectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap,\n\t\t\ttangentSpaceNormalMap: material.normalMapType === TangentSpaceNormalMap,\n\t\t\tclearcoatMap: !! material.clearcoatMap,\n\t\t\tclearcoatRoughnessMap: !! material.clearcoatRoughnessMap,\n\t\t\tclearcoatNormalMap: !! material.clearcoatNormalMap,\n\t\t\tdisplacementMap: !! material.displacementMap,\n\t\t\troughnessMap: !! material.roughnessMap,\n\t\t\tmetalnessMap: !! material.metalnessMap,\n\t\t\tspecularMap: !! material.specularMap,\n\t\t\talphaMap: !! material.alphaMap,\n\n\t\t\tgradientMap: !! material.gradientMap,\n\n\t\t\tsheen: !! material.sheen,\n\n\t\t\ttransmission: !! material.transmission,\n\t\t\ttransmissionMap: !! material.transmissionMap,\n\t\t\tthicknessMap: !! material.thicknessMap,\n\n\t\t\tcombine: material.combine,\n\n\t\t\tvertexTangents: ( material.normalMap && material.vertexTangents ),\n\t\t\tvertexColors: material.vertexColors,\n\t\t\tvertexAlphas: material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4,\n\t\t\tvertexUvs: !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatMap || !! material.clearcoatRoughnessMap || !! material.clearcoatNormalMap || !! material.displacementMap || !! material.transmissionMap || !! material.thicknessMap,\n\t\t\tuvsVertexOnly: ! ( !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatNormalMap || !! material.transmission || !! material.transmissionMap || !! material.thicknessMap ) && !! material.displacementMap,\n\n\t\t\tfog: !! fog,\n\t\t\tuseFog: material.fog,\n\t\t\tfogExp2: ( fog && fog.isFogExp2 ),\n\n\t\t\tflatShading: !! material.flatShading,\n\n\t\t\tsizeAttenuation: material.sizeAttenuation,\n\t\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\n\t\t\tskinning: object.isSkinnedMesh === true && maxBones > 0,\n\t\t\tmaxBones: maxBones,\n\t\t\tuseVertexTexture: floatVertexTextures,\n\n\t\t\tmorphTargets: material.morphTargets,\n\t\t\tmorphNormals: material.morphNormals,\n\n\t\t\tnumDirLights: lights.directional.length,\n\t\t\tnumPointLights: lights.point.length,\n\t\t\tnumSpotLights: lights.spot.length,\n\t\t\tnumRectAreaLights: lights.rectArea.length,\n\t\t\tnumHemiLights: lights.hemi.length,\n\n\t\t\tnumDirLightShadows: lights.directionalShadowMap.length,\n\t\t\tnumPointLightShadows: lights.pointShadowMap.length,\n\t\t\tnumSpotLightShadows: lights.spotShadowMap.length,\n\n\t\t\tnumClippingPlanes: clipping.numPlanes,\n\t\t\tnumClipIntersection: clipping.numIntersection,\n\n\t\t\tdithering: material.dithering,\n\n\t\t\tshadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,\n\t\t\tshadowMapType: renderer.shadowMap.type,\n\n\t\t\ttoneMapping: material.toneMapped ? renderer.toneMapping : NoToneMapping,\n\t\t\tphysicallyCorrectLights: renderer.physicallyCorrectLights,\n\n\t\t\tpremultipliedAlpha: material.premultipliedAlpha,\n\n\t\t\talphaTest: material.alphaTest,\n\t\t\tdoubleSided: material.side === DoubleSide,\n\t\t\tflipSided: material.side === BackSide,\n\n\t\t\tdepthPacking: ( material.depthPacking !== undefined ) ? material.depthPacking : false,\n\n\t\t\tindex0AttributeName: material.index0AttributeName,\n\n\t\t\textensionDerivatives: material.extensions && material.extensions.derivatives,\n\t\t\textensionFragDepth: material.extensions && material.extensions.fragDepth,\n\t\t\textensionDrawBuffers: material.extensions && material.extensions.drawBuffers,\n\t\t\textensionShaderTextureLOD: material.extensions && material.extensions.shaderTextureLOD,\n\n\t\t\trendererExtensionFragDepth: isWebGL2 || extensions.has( 'EXT_frag_depth' ),\n\t\t\trendererExtensionDrawBuffers: isWebGL2 || extensions.has( 'WEBGL_draw_buffers' ),\n\t\t\trendererExtensionShaderTextureLod: isWebGL2 || extensions.has( 'EXT_shader_texture_lod' ),\n\n\t\t\tcustomProgramCacheKey: material.customProgramCacheKey()\n\n\t\t};\n\n\t\treturn parameters;\n\n\t}\n\n\tfunction getProgramCacheKey( parameters ) {\n\n\t\tconst array = [];\n\n\t\tif ( parameters.shaderID ) {\n\n\t\t\tarray.push( parameters.shaderID );\n\n\t\t} else {\n\n\t\t\tarray.push( parameters.fragmentShader );\n\t\t\tarray.push( parameters.vertexShader );\n\n\t\t}\n\n\t\tif ( parameters.defines !== undefined ) {\n\n\t\t\tfor ( const name in parameters.defines ) {\n\n\t\t\t\tarray.push( name );\n\t\t\t\tarray.push( parameters.defines[ name ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( parameters.isRawShaderMaterial === false ) {\n\n\t\t\tfor ( let i = 0; i < parameterNames.length; i ++ ) {\n\n\t\t\t\tarray.push( parameters[ parameterNames[ i ] ] );\n\n\t\t\t}\n\n\t\t\tarray.push( renderer.outputEncoding );\n\t\t\tarray.push( renderer.gammaFactor );\n\n\t\t}\n\n\t\tarray.push( parameters.customProgramCacheKey );\n\n\t\treturn array.join();\n\n\t}\n\n\tfunction getUniforms( material ) {\n\n\t\tconst shaderID = shaderIDs[ material.type ];\n\t\tlet uniforms;\n\n\t\tif ( shaderID ) {\n\n\t\t\tconst shader = ShaderLib[ shaderID ];\n\t\t\tuniforms = UniformsUtils.clone( shader.uniforms );\n\n\t\t} else {\n\n\t\t\tuniforms = material.uniforms;\n\n\t\t}\n\n\t\treturn uniforms;\n\n\t}\n\n\tfunction acquireProgram( parameters, cacheKey ) {\n\n\t\tlet program;\n\n\t\t// Check if code has been already compiled\n\t\tfor ( let p = 0, pl = programs.length; p < pl; p ++ ) {\n\n\t\t\tconst preexistingProgram = programs[ p ];\n\n\t\t\tif ( preexistingProgram.cacheKey === cacheKey ) {\n\n\t\t\t\tprogram = preexistingProgram;\n\t\t\t\t++ program.usedTimes;\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( program === undefined ) {\n\n\t\t\tprogram = new WebGLProgram( renderer, cacheKey, parameters, bindingStates );\n\t\t\tprograms.push( program );\n\n\t\t}\n\n\t\treturn program;\n\n\t}\n\n\tfunction releaseProgram( program ) {\n\n\t\tif ( -- program.usedTimes === 0 ) {\n\n\t\t\t// Remove from unordered set\n\t\t\tconst i = programs.indexOf( program );\n\t\t\tprograms[ i ] = programs[ programs.length - 1 ];\n\t\t\tprograms.pop();\n\n\t\t\t// Free WebGL resources\n\t\t\tprogram.destroy();\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tgetParameters: getParameters,\n\t\tgetProgramCacheKey: getProgramCacheKey,\n\t\tgetUniforms: getUniforms,\n\t\tacquireProgram: acquireProgram,\n\t\treleaseProgram: releaseProgram,\n\t\t// Exposed for resource monitoring & error feedback via renderer.info:\n\t\tprograms: programs\n\t};\n\n}\n\nfunction WebGLProperties() {\n\n\tlet properties = new WeakMap();\n\n\tfunction get( object ) {\n\n\t\tlet map = properties.get( object );\n\n\t\tif ( map === undefined ) {\n\n\t\t\tmap = {};\n\t\t\tproperties.set( object, map );\n\n\t\t}\n\n\t\treturn map;\n\n\t}\n\n\tfunction remove( object ) {\n\n\t\tproperties.delete( object );\n\n\t}\n\n\tfunction update( object, key, value ) {\n\n\t\tproperties.get( object )[ key ] = value;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tproperties = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tremove: remove,\n\t\tupdate: update,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction painterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.program !== b.program ) {\n\n\t\treturn a.program.id - b.program.id;\n\n\t} else if ( a.material.id !== b.material.id ) {\n\n\t\treturn a.material.id - b.material.id;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn a.z - b.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}\n\nfunction reversePainterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn b.z - a.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}\n\n\nfunction WebGLRenderList( properties ) {\n\n\tconst renderItems = [];\n\tlet renderItemsIndex = 0;\n\n\tconst opaque = [];\n\tconst transmissive = [];\n\tconst transparent = [];\n\n\tconst defaultProgram = { id: - 1 };\n\n\tfunction init() {\n\n\t\trenderItemsIndex = 0;\n\n\t\topaque.length = 0;\n\t\ttransmissive.length = 0;\n\t\ttransparent.length = 0;\n\n\t}\n\n\tfunction getNextRenderItem( object, geometry, material, groupOrder, z, group ) {\n\n\t\tlet renderItem = renderItems[ renderItemsIndex ];\n\t\tconst materialProperties = properties.get( material );\n\n\t\tif ( renderItem === undefined ) {\n\n\t\t\trenderItem = {\n\t\t\t\tid: object.id,\n\t\t\t\tobject: object,\n\t\t\t\tgeometry: geometry,\n\t\t\t\tmaterial: material,\n\t\t\t\tprogram: materialProperties.program || defaultProgram,\n\t\t\t\tgroupOrder: groupOrder,\n\t\t\t\trenderOrder: object.renderOrder,\n\t\t\t\tz: z,\n\t\t\t\tgroup: group\n\t\t\t};\n\n\t\t\trenderItems[ renderItemsIndex ] = renderItem;\n\n\t\t} else {\n\n\t\t\trenderItem.id = object.id;\n\t\t\trenderItem.object = object;\n\t\t\trenderItem.geometry = geometry;\n\t\t\trenderItem.material = material;\n\t\t\trenderItem.program = materialProperties.program || defaultProgram;\n\t\t\trenderItem.groupOrder = groupOrder;\n\t\t\trenderItem.renderOrder = object.renderOrder;\n\t\t\trenderItem.z = z;\n\t\t\trenderItem.group = group;\n\n\t\t}\n\n\t\trenderItemsIndex ++;\n\n\t\treturn renderItem;\n\n\t}\n\n\tfunction push( object, geometry, material, groupOrder, z, group ) {\n\n\t\tconst renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\ttransmissive.push( renderItem );\n\n\t\t} else if ( material.transparent === true ) {\n\n\t\t\ttransparent.push( renderItem );\n\n\t\t} else {\n\n\t\t\topaque.push( renderItem );\n\n\t\t}\n\n\t}\n\n\tfunction unshift( object, geometry, material, groupOrder, z, group ) {\n\n\t\tconst renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\ttransmissive.unshift( renderItem );\n\n\t\t} else if ( material.transparent === true ) {\n\n\t\t\ttransparent.unshift( renderItem );\n\n\t\t} else {\n\n\t\t\topaque.unshift( renderItem );\n\n\t\t}\n\n\t}\n\n\tfunction sort( customOpaqueSort, customTransparentSort ) {\n\n\t\tif ( opaque.length > 1 ) opaque.sort( customOpaqueSort || painterSortStable );\n\t\tif ( transmissive.length > 1 ) transmissive.sort( customTransparentSort || reversePainterSortStable );\n\t\tif ( transparent.length > 1 ) transparent.sort( customTransparentSort || reversePainterSortStable );\n\n\t}\n\n\tfunction finish() {\n\n\t\t// Clear references from inactive renderItems in the list\n\n\t\tfor ( let i = renderItemsIndex, il = renderItems.length; i < il; i ++ ) {\n\n\t\t\tconst renderItem = renderItems[ i ];\n\n\t\t\tif ( renderItem.id === null ) break;\n\n\t\t\trenderItem.id = null;\n\t\t\trenderItem.object = null;\n\t\t\trenderItem.geometry = null;\n\t\t\trenderItem.material = null;\n\t\t\trenderItem.program = null;\n\t\t\trenderItem.group = null;\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\topaque: opaque,\n\t\ttransmissive: transmissive,\n\t\ttransparent: transparent,\n\n\t\tinit: init,\n\t\tpush: push,\n\t\tunshift: unshift,\n\t\tfinish: finish,\n\n\t\tsort: sort\n\t};\n\n}\n\nfunction WebGLRenderLists( properties ) {\n\n\tlet lists = new WeakMap();\n\n\tfunction get( scene, renderCallDepth ) {\n\n\t\tlet list;\n\n\t\tif ( lists.has( scene ) === false ) {\n\n\t\t\tlist = new WebGLRenderList( properties );\n\t\t\tlists.set( scene, [ list ] );\n\n\t\t} else {\n\n\t\t\tif ( renderCallDepth >= lists.get( scene ).length ) {\n\n\t\t\t\tlist = new WebGLRenderList( properties );\n\t\t\t\tlists.get( scene ).push( list );\n\n\t\t\t} else {\n\n\t\t\t\tlist = lists.get( scene )[ renderCallDepth ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn list;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tlists = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction UniformsCache() {\n\n\tconst lights = {};\n\n\treturn {\n\n\t\tget: function ( light ) {\n\n\t\t\tif ( lights[ light.id ] !== undefined ) {\n\n\t\t\t\treturn lights[ light.id ];\n\n\t\t\t}\n\n\t\t\tlet uniforms;\n\n\t\t\tswitch ( light.type ) {\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tcolor: new Color()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\tconeCos: 0,\n\t\t\t\t\t\tpenumbraCos: 0,\n\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'HemisphereLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tskyColor: new Color(),\n\t\t\t\t\t\tgroundColor: new Color()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RectAreaLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\thalfWidth: new Vector3(),\n\t\t\t\t\t\thalfHeight: new Vector3()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tlights[ light.id ] = uniforms;\n\n\t\t\treturn uniforms;\n\n\t\t}\n\n\t};\n\n}\n\nfunction ShadowUniformsCache() {\n\n\tconst lights = {};\n\n\treturn {\n\n\t\tget: function ( light ) {\n\n\t\t\tif ( lights[ light.id ] !== undefined ) {\n\n\t\t\t\treturn lights[ light.id ];\n\n\t\t\t}\n\n\t\t\tlet uniforms;\n\n\t\t\tswitch ( light.type ) {\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2(),\n\t\t\t\t\t\tshadowCameraNear: 1,\n\t\t\t\t\t\tshadowCameraFar: 1000\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\t// TODO (abelnation): set RectAreaLight shadow uniforms\n\n\t\t\t}\n\n\t\t\tlights[ light.id ] = uniforms;\n\n\t\t\treturn uniforms;\n\n\t\t}\n\n\t};\n\n}\n\n\n\nlet nextVersion = 0;\n\nfunction shadowCastingLightsFirst( lightA, lightB ) {\n\n\treturn ( lightB.castShadow ? 1 : 0 ) - ( lightA.castShadow ? 1 : 0 );\n\n}\n\nfunction WebGLLights( extensions, capabilities ) {\n\n\tconst cache = new UniformsCache();\n\n\tconst shadowCache = ShadowUniformsCache();\n\n\tconst state = {\n\n\t\tversion: 0,\n\n\t\thash: {\n\t\t\tdirectionalLength: - 1,\n\t\t\tpointLength: - 1,\n\t\t\tspotLength: - 1,\n\t\t\trectAreaLength: - 1,\n\t\t\themiLength: - 1,\n\n\t\t\tnumDirectionalShadows: - 1,\n\t\t\tnumPointShadows: - 1,\n\t\t\tnumSpotShadows: - 1\n\t\t},\n\n\t\tambient: [ 0, 0, 0 ],\n\t\tprobe: [],\n\t\tdirectional: [],\n\t\tdirectionalShadow: [],\n\t\tdirectionalShadowMap: [],\n\t\tdirectionalShadowMatrix: [],\n\t\tspot: [],\n\t\tspotShadow: [],\n\t\tspotShadowMap: [],\n\t\tspotShadowMatrix: [],\n\t\trectArea: [],\n\t\trectAreaLTC1: null,\n\t\trectAreaLTC2: null,\n\t\tpoint: [],\n\t\tpointShadow: [],\n\t\tpointShadowMap: [],\n\t\tpointShadowMatrix: [],\n\t\themi: []\n\n\t};\n\n\tfor ( let i = 0; i < 9; i ++ ) state.probe.push( new Vector3() );\n\n\tconst vector3 = new Vector3();\n\tconst matrix4 = new Matrix4();\n\tconst matrix42 = new Matrix4();\n\n\tfunction setup( lights ) {\n\n\t\tlet r = 0, g = 0, b = 0;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) state.probe[ i ].set( 0, 0, 0 );\n\n\t\tlet directionalLength = 0;\n\t\tlet pointLength = 0;\n\t\tlet spotLength = 0;\n\t\tlet rectAreaLength = 0;\n\t\tlet hemiLength = 0;\n\n\t\tlet numDirectionalShadows = 0;\n\t\tlet numPointShadows = 0;\n\t\tlet numSpotShadows = 0;\n\n\t\tlights.sort( shadowCastingLightsFirst );\n\n\t\tfor ( let i = 0, l = lights.length; i < l; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\n\t\t\tconst color = light.color;\n\t\t\tconst intensity = light.intensity;\n\t\t\tconst distance = light.distance;\n\n\t\t\tconst shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null;\n\n\t\t\tif ( light.isAmbientLight ) {\n\n\t\t\t\tr += color.r * intensity;\n\t\t\t\tg += color.g * intensity;\n\t\t\t\tb += color.b * intensity;\n\n\t\t\t} else if ( light.isLightProbe ) {\n\n\t\t\t\tfor ( let j = 0; j < 9; j ++ ) {\n\n\t\t\t\t\tstate.probe[ j ].addScaledVector( light.sh.coefficients[ j ], intensity );\n\n\t\t\t\t}\n\n\t\t\t} else if ( light.isDirectionalLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( light.color ).multiplyScalar( light.intensity );\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\n\t\t\t\t\tstate.directionalShadow[ directionalLength ] = shadowUniforms;\n\t\t\t\t\tstate.directionalShadowMap[ directionalLength ] = shadowMap;\n\t\t\t\t\tstate.directionalShadowMatrix[ directionalLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumDirectionalShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.directional[ directionalLength ] = uniforms;\n\n\t\t\t\tdirectionalLength ++;\n\n\t\t\t} else if ( light.isSpotLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\n\t\t\t\tuniforms.color.copy( color ).multiplyScalar( intensity );\n\t\t\t\tuniforms.distance = distance;\n\n\t\t\t\tuniforms.coneCos = Math.cos( light.angle );\n\t\t\t\tuniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) );\n\t\t\t\tuniforms.decay = light.decay;\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\n\t\t\t\t\tstate.spotShadow[ spotLength ] = shadowUniforms;\n\t\t\t\t\tstate.spotShadowMap[ spotLength ] = shadowMap;\n\t\t\t\t\tstate.spotShadowMatrix[ spotLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumSpotShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.spot[ spotLength ] = uniforms;\n\n\t\t\t\tspotLength ++;\n\n\t\t\t} else if ( light.isRectAreaLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\t// (a) intensity is the total visible light emitted\n\t\t\t\t//uniforms.color.copy( color ).multiplyScalar( intensity / ( light.width * light.height * Math.PI ) );\n\n\t\t\t\t// (b) intensity is the brightness of the light\n\t\t\t\tuniforms.color.copy( color ).multiplyScalar( intensity );\n\n\t\t\t\tuniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );\n\t\t\t\tuniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );\n\n\t\t\t\tstate.rectArea[ rectAreaLength ] = uniforms;\n\n\t\t\t\trectAreaLength ++;\n\n\t\t\t} else if ( light.isPointLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( light.color ).multiplyScalar( light.intensity );\n\t\t\t\tuniforms.distance = light.distance;\n\t\t\t\tuniforms.decay = light.decay;\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\t\t\t\t\tshadowUniforms.shadowCameraNear = shadow.camera.near;\n\t\t\t\t\tshadowUniforms.shadowCameraFar = shadow.camera.far;\n\n\t\t\t\t\tstate.pointShadow[ pointLength ] = shadowUniforms;\n\t\t\t\t\tstate.pointShadowMap[ pointLength ] = shadowMap;\n\t\t\t\t\tstate.pointShadowMatrix[ pointLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumPointShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.point[ pointLength ] = uniforms;\n\n\t\t\t\tpointLength ++;\n\n\t\t\t} else if ( light.isHemisphereLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.skyColor.copy( light.color ).multiplyScalar( intensity );\n\t\t\t\tuniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity );\n\n\t\t\t\tstate.hemi[ hemiLength ] = uniforms;\n\n\t\t\t\themiLength ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( rectAreaLength > 0 ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t// WebGL 2\n\n\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\n\t\t\t} else {\n\n\t\t\t\t// WebGL 1\n\n\t\t\t\tif ( extensions.has( 'OES_texture_float_linear' ) === true ) {\n\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\n\t\t\t\t} else if ( extensions.has( 'OES_texture_half_float_linear' ) === true ) {\n\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_HALF_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_HALF_2;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.ambient[ 0 ] = r;\n\t\tstate.ambient[ 1 ] = g;\n\t\tstate.ambient[ 2 ] = b;\n\n\t\tconst hash = state.hash;\n\n\t\tif ( hash.directionalLength !== directionalLength ||\n\t\t\thash.pointLength !== pointLength ||\n\t\t\thash.spotLength !== spotLength ||\n\t\t\thash.rectAreaLength !== rectAreaLength ||\n\t\t\thash.hemiLength !== hemiLength ||\n\t\t\thash.numDirectionalShadows !== numDirectionalShadows ||\n\t\t\thash.numPointShadows !== numPointShadows ||\n\t\t\thash.numSpotShadows !== numSpotShadows ) {\n\n\t\t\tstate.directional.length = directionalLength;\n\t\t\tstate.spot.length = spotLength;\n\t\t\tstate.rectArea.length = rectAreaLength;\n\t\t\tstate.point.length = pointLength;\n\t\t\tstate.hemi.length = hemiLength;\n\n\t\t\tstate.directionalShadow.length = numDirectionalShadows;\n\t\t\tstate.directionalShadowMap.length = numDirectionalShadows;\n\t\t\tstate.pointShadow.length = numPointShadows;\n\t\t\tstate.pointShadowMap.length = numPointShadows;\n\t\t\tstate.spotShadow.length = numSpotShadows;\n\t\t\tstate.spotShadowMap.length = numSpotShadows;\n\t\t\tstate.directionalShadowMatrix.length = numDirectionalShadows;\n\t\t\tstate.pointShadowMatrix.length = numPointShadows;\n\t\t\tstate.spotShadowMatrix.length = numSpotShadows;\n\n\t\t\thash.directionalLength = directionalLength;\n\t\t\thash.pointLength = pointLength;\n\t\t\thash.spotLength = spotLength;\n\t\t\thash.rectAreaLength = rectAreaLength;\n\t\t\thash.hemiLength = hemiLength;\n\n\t\t\thash.numDirectionalShadows = numDirectionalShadows;\n\t\t\thash.numPointShadows = numPointShadows;\n\t\t\thash.numSpotShadows = numSpotShadows;\n\n\t\t\tstate.version = nextVersion ++;\n\n\t\t}\n\n\t}\n\n\tfunction setupView( lights, camera ) {\n\n\t\tlet directionalLength = 0;\n\t\tlet pointLength = 0;\n\t\tlet spotLength = 0;\n\t\tlet rectAreaLength = 0;\n\t\tlet hemiLength = 0;\n\n\t\tconst viewMatrix = camera.matrixWorldInverse;\n\n\t\tfor ( let i = 0, l = lights.length; i < l; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\n\t\t\tif ( light.isDirectionalLight ) {\n\n\t\t\t\tconst uniforms = state.directional[ directionalLength ];\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tvector3.setFromMatrixPosition( light.target.matrixWorld );\n\t\t\t\tuniforms.direction.sub( vector3 );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\tdirectionalLength ++;\n\n\t\t\t} else if ( light.isSpotLight ) {\n\n\t\t\t\tconst uniforms = state.spot[ spotLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tvector3.setFromMatrixPosition( light.target.matrixWorld );\n\t\t\t\tuniforms.direction.sub( vector3 );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\tspotLength ++;\n\n\t\t\t} else if ( light.isRectAreaLight ) {\n\n\t\t\t\tconst uniforms = state.rectArea[ rectAreaLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\t// extract local rotation of light to derive width/height half vectors\n\t\t\t\tmatrix42.identity();\n\t\t\t\tmatrix4.copy( light.matrixWorld );\n\t\t\t\tmatrix4.premultiply( viewMatrix );\n\t\t\t\tmatrix42.extractRotation( matrix4 );\n\n\t\t\t\tuniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );\n\t\t\t\tuniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );\n\n\t\t\t\tuniforms.halfWidth.applyMatrix4( matrix42 );\n\t\t\t\tuniforms.halfHeight.applyMatrix4( matrix42 );\n\n\t\t\t\trectAreaLength ++;\n\n\t\t\t} else if ( light.isPointLight ) {\n\n\t\t\t\tconst uniforms = state.point[ pointLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\tpointLength ++;\n\n\t\t\t} else if ( light.isHemisphereLight ) {\n\n\t\t\t\tconst uniforms = state.hemi[ hemiLength ];\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\t\t\t\tuniforms.direction.normalize();\n\n\t\t\t\themiLength ++;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tsetup: setup,\n\t\tsetupView: setupView,\n\t\tstate: state\n\t};\n\n}\n\nfunction WebGLRenderState( extensions, capabilities ) {\n\n\tconst lights = new WebGLLights( extensions, capabilities );\n\n\tconst lightsArray = [];\n\tconst shadowsArray = [];\n\n\tfunction init() {\n\n\t\tlightsArray.length = 0;\n\t\tshadowsArray.length = 0;\n\n\t}\n\n\tfunction pushLight( light ) {\n\n\t\tlightsArray.push( light );\n\n\t}\n\n\tfunction pushShadow( shadowLight ) {\n\n\t\tshadowsArray.push( shadowLight );\n\n\t}\n\n\tfunction setupLights() {\n\n\t\tlights.setup( lightsArray );\n\n\t}\n\n\tfunction setupLightsView( camera ) {\n\n\t\tlights.setupView( lightsArray, camera );\n\n\t}\n\n\tconst state = {\n\t\tlightsArray: lightsArray,\n\t\tshadowsArray: shadowsArray,\n\n\t\tlights: lights\n\t};\n\n\treturn {\n\t\tinit: init,\n\t\tstate: state,\n\t\tsetupLights: setupLights,\n\t\tsetupLightsView: setupLightsView,\n\n\t\tpushLight: pushLight,\n\t\tpushShadow: pushShadow\n\t};\n\n}\n\nfunction WebGLRenderStates( extensions, capabilities ) {\n\n\tlet renderStates = new WeakMap();\n\n\tfunction get( scene, renderCallDepth = 0 ) {\n\n\t\tlet renderState;\n\n\t\tif ( renderStates.has( scene ) === false ) {\n\n\t\t\trenderState = new WebGLRenderState( extensions, capabilities );\n\t\t\trenderStates.set( scene, [ renderState ] );\n\n\t\t} else {\n\n\t\t\tif ( renderCallDepth >= renderStates.get( scene ).length ) {\n\n\t\t\t\trenderState = new WebGLRenderState( extensions, capabilities );\n\t\t\t\trenderStates.get( scene ).push( renderState );\n\n\t\t\t} else {\n\n\t\t\t\trenderState = renderStates.get( scene )[ renderCallDepth ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn renderState;\n\n\t}\n\n\tfunction dispose() {\n\n\t\trenderStates = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\n/**\n * parameters = {\n *\n * opacity: <float>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>\n * }\n */\n\nclass MeshDepthMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshDepthMaterial';\n\n\t\tthis.depthPacking = BasicDepthPacking;\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.fog = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.depthPacking = source.depthPacking;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshDepthMaterial.prototype.isMeshDepthMaterial = true;\n\n/**\n * parameters = {\n *\n * referencePosition: <float>,\n * nearDistance: <float>,\n * farDistance: <float>,\n *\n * morphTargets: <bool>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>\n *\n * }\n */\n\nclass MeshDistanceMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshDistanceMaterial';\n\n\t\tthis.referencePosition = new Vector3();\n\t\tthis.nearDistance = 1;\n\t\tthis.farDistance = 1000;\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.fog = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.referencePosition.copy( source.referencePosition );\n\t\tthis.nearDistance = source.nearDistance;\n\t\tthis.farDistance = source.farDistance;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshDistanceMaterial.prototype.isMeshDistanceMaterial = true;\n\nvar vsm_frag = \"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include <packing>\\nvoid main() {\\n\\tfloat mean = 0.0;\\n\\tfloat squared_mean = 0.0;\\n\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\\n\\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\\n\\t\\t#ifdef HORIZONTAL_PASS\\n\\t\\t\\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\\n\\t\\t\\tmean += distribution.x;\\n\\t\\t\\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\\t\\t#else\\n\\t\\t\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\\n\\t\\t\\tmean += depth;\\n\\t\\t\\tsquared_mean += depth * depth;\\n\\t\\t#endif\\n\\t}\\n\\tmean = mean * HALF_SAMPLE_RATE;\\n\\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\\n\\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\";\n\nvar vsm_vert = \"void main() {\\n\\tgl_Position = vec4( position, 1.0 );\\n}\";\n\nfunction WebGLShadowMap( _renderer, _objects, _capabilities ) {\n\n\tlet _frustum = new Frustum();\n\n\tconst _shadowMapSize = new Vector2(),\n\t\t_viewportSize = new Vector2(),\n\n\t\t_viewport = new Vector4(),\n\n\t\t_depthMaterials = [],\n\t\t_distanceMaterials = [],\n\n\t\t_materialCache = {},\n\n\t\t_maxTextureSize = _capabilities.maxTextureSize;\n\n\tconst shadowSide = { 0: BackSide, 1: FrontSide, 2: DoubleSide };\n\n\tconst shadowMaterialVertical = new ShaderMaterial( {\n\n\t\tdefines: {\n\t\t\tSAMPLE_RATE: 2.0 / 8.0,\n\t\t\tHALF_SAMPLE_RATE: 1.0 / 8.0\n\t\t},\n\n\t\tuniforms: {\n\t\t\tshadow_pass: { value: null },\n\t\t\tresolution: { value: new Vector2() },\n\t\t\tradius: { value: 4.0 }\n\t\t},\n\n\t\tvertexShader: vsm_vert,\n\n\t\tfragmentShader: vsm_frag\n\n\t} );\n\n\tconst shadowMaterialHorizontal = shadowMaterialVertical.clone();\n\tshadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1;\n\n\tconst fullScreenTri = new BufferGeometry();\n\tfullScreenTri.setAttribute(\n\t\t'position',\n\t\tnew BufferAttribute(\n\t\t\tnew Float32Array( [ - 1, - 1, 0.5, 3, - 1, 0.5, - 1, 3, 0.5 ] ),\n\t\t\t3\n\t\t)\n\t);\n\n\tconst fullScreenMesh = new Mesh( fullScreenTri, shadowMaterialVertical );\n\n\tconst scope = this;\n\n\tthis.enabled = false;\n\n\tthis.autoUpdate = true;\n\tthis.needsUpdate = false;\n\n\tthis.type = PCFShadowMap;\n\n\tthis.render = function ( lights, scene, camera ) {\n\n\t\tif ( scope.enabled === false ) return;\n\t\tif ( scope.autoUpdate === false && scope.needsUpdate === false ) return;\n\n\t\tif ( lights.length === 0 ) return;\n\n\t\tconst currentRenderTarget = _renderer.getRenderTarget();\n\t\tconst activeCubeFace = _renderer.getActiveCubeFace();\n\t\tconst activeMipmapLevel = _renderer.getActiveMipmapLevel();\n\n\t\tconst _state = _renderer.state;\n\n\t\t// Set GL state for depth map.\n\t\t_state.setBlending( NoBlending );\n\t\t_state.buffers.color.setClear( 1, 1, 1, 1 );\n\t\t_state.buffers.depth.setTest( true );\n\t\t_state.setScissorTest( false );\n\n\t\t// render depth map\n\n\t\tfor ( let i = 0, il = lights.length; i < il; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\t\t\tconst shadow = light.shadow;\n\n\t\t\tif ( shadow === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;\n\n\t\t\t_shadowMapSize.copy( shadow.mapSize );\n\n\t\t\tconst shadowFrameExtents = shadow.getFrameExtents();\n\n\t\t\t_shadowMapSize.multiply( shadowFrameExtents );\n\n\t\t\t_viewportSize.copy( shadow.mapSize );\n\n\t\t\tif ( _shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize ) {\n\n\t\t\t\tif ( _shadowMapSize.x > _maxTextureSize ) {\n\n\t\t\t\t\t_viewportSize.x = Math.floor( _maxTextureSize / shadowFrameExtents.x );\n\t\t\t\t\t_shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x;\n\t\t\t\t\tshadow.mapSize.x = _viewportSize.x;\n\n\t\t\t\t}\n\n\t\t\t\tif ( _shadowMapSize.y > _maxTextureSize ) {\n\n\t\t\t\t\t_viewportSize.y = Math.floor( _maxTextureSize / shadowFrameExtents.y );\n\t\t\t\t\t_shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y;\n\t\t\t\t\tshadow.mapSize.y = _viewportSize.y;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( shadow.map === null && ! shadow.isPointLightShadow && this.type === VSMShadowMap ) {\n\n\t\t\t\tconst pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };\n\n\t\t\t\tshadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );\n\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\n\t\t\t\tshadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );\n\n\t\t\t\tshadow.camera.updateProjectionMatrix();\n\n\t\t\t}\n\n\t\t\tif ( shadow.map === null ) {\n\n\t\t\t\tconst pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat };\n\n\t\t\t\tshadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );\n\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\n\t\t\t\tshadow.camera.updateProjectionMatrix();\n\n\t\t\t}\n\n\t\t\t_renderer.setRenderTarget( shadow.map );\n\t\t\t_renderer.clear();\n\n\t\t\tconst viewportCount = shadow.getViewportCount();\n\n\t\t\tfor ( let vp = 0; vp < viewportCount; vp ++ ) {\n\n\t\t\t\tconst viewport = shadow.getViewport( vp );\n\n\t\t\t\t_viewport.set(\n\t\t\t\t\t_viewportSize.x * viewport.x,\n\t\t\t\t\t_viewportSize.y * viewport.y,\n\t\t\t\t\t_viewportSize.x * viewport.z,\n\t\t\t\t\t_viewportSize.y * viewport.w\n\t\t\t\t);\n\n\t\t\t\t_state.viewport( _viewport );\n\n\t\t\t\tshadow.updateMatrices( light, vp );\n\n\t\t\t\t_frustum = shadow.getFrustum();\n\n\t\t\t\trenderObject( scene, camera, shadow.camera, light, this.type );\n\n\t\t\t}\n\n\t\t\t// do blur pass for VSM\n\n\t\t\tif ( ! shadow.isPointLightShadow && this.type === VSMShadowMap ) {\n\n\t\t\t\tVSMPass( shadow, camera );\n\n\t\t\t}\n\n\t\t\tshadow.needsUpdate = false;\n\n\t\t}\n\n\t\tscope.needsUpdate = false;\n\n\t\t_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );\n\n\t};\n\n\tfunction VSMPass( shadow, camera ) {\n\n\t\tconst geometry = _objects.update( fullScreenMesh );\n\n\t\t// vertical pass\n\n\t\tshadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture;\n\t\tshadowMaterialVertical.uniforms.resolution.value = shadow.mapSize;\n\t\tshadowMaterialVertical.uniforms.radius.value = shadow.radius;\n\t\t_renderer.setRenderTarget( shadow.mapPass );\n\t\t_renderer.clear();\n\t\t_renderer.renderBufferDirect( camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null );\n\n\t\t// horizontal pass\n\n\t\tshadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;\n\t\tshadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;\n\t\tshadowMaterialHorizontal.uniforms.radius.value = shadow.radius;\n\t\t_renderer.setRenderTarget( shadow.map );\n\t\t_renderer.clear();\n\t\t_renderer.renderBufferDirect( camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null );\n\n\t}\n\n\tfunction getDepthMaterialVariant( useMorphing ) {\n\n\t\tconst index = useMorphing << 0;\n\n\t\tlet material = _depthMaterials[ index ];\n\n\t\tif ( material === undefined ) {\n\n\t\t\tmaterial = new MeshDepthMaterial( {\n\n\t\t\t\tdepthPacking: RGBADepthPacking,\n\n\t\t\t\tmorphTargets: useMorphing\n\n\t\t\t} );\n\n\t\t\t_depthMaterials[ index ] = material;\n\n\t\t}\n\n\t\treturn material;\n\n\t}\n\n\tfunction getDistanceMaterialVariant( useMorphing ) {\n\n\t\tconst index = useMorphing << 0;\n\n\t\tlet material = _distanceMaterials[ index ];\n\n\t\tif ( material === undefined ) {\n\n\t\t\tmaterial = new MeshDistanceMaterial( {\n\n\t\t\t\tmorphTargets: useMorphing\n\n\t\t\t} );\n\n\t\t\t_distanceMaterials[ index ] = material;\n\n\t\t}\n\n\t\treturn material;\n\n\t}\n\n\tfunction getDepthMaterial( object, geometry, material, light, shadowCameraNear, shadowCameraFar, type ) {\n\n\t\tlet result = null;\n\n\t\tlet getMaterialVariant = getDepthMaterialVariant;\n\t\tlet customMaterial = object.customDepthMaterial;\n\n\t\tif ( light.isPointLight === true ) {\n\n\t\t\tgetMaterialVariant = getDistanceMaterialVariant;\n\t\t\tcustomMaterial = object.customDistanceMaterial;\n\n\t\t}\n\n\t\tif ( customMaterial === undefined ) {\n\n\t\t\tlet useMorphing = false;\n\n\t\t\tif ( material.morphTargets === true ) {\n\n\t\t\t\tuseMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0;\n\n\t\t\t}\n\n\t\t\tresult = getMaterialVariant( useMorphing );\n\n\t\t} else {\n\n\t\t\tresult = customMaterial;\n\n\t\t}\n\n\t\tif ( _renderer.localClippingEnabled &&\n\t\t\t\tmaterial.clipShadows === true &&\n\t\t\t\tmaterial.clippingPlanes.length !== 0 ) {\n\n\t\t\t// in this case we need a unique material instance reflecting the\n\t\t\t// appropriate state\n\n\t\t\tconst keyA = result.uuid, keyB = material.uuid;\n\n\t\t\tlet materialsForVariant = _materialCache[ keyA ];\n\n\t\t\tif ( materialsForVariant === undefined ) {\n\n\t\t\t\tmaterialsForVariant = {};\n\t\t\t\t_materialCache[ keyA ] = materialsForVariant;\n\n\t\t\t}\n\n\t\t\tlet cachedMaterial = materialsForVariant[ keyB ];\n\n\t\t\tif ( cachedMaterial === undefined ) {\n\n\t\t\t\tcachedMaterial = result.clone();\n\t\t\t\tmaterialsForVariant[ keyB ] = cachedMaterial;\n\n\t\t\t}\n\n\t\t\tresult = cachedMaterial;\n\n\t\t}\n\n\t\tresult.visible = material.visible;\n\t\tresult.wireframe = material.wireframe;\n\n\t\tif ( type === VSMShadowMap ) {\n\n\t\t\tresult.side = ( material.shadowSide !== null ) ? material.shadowSide : material.side;\n\n\t\t} else {\n\n\t\t\tresult.side = ( material.shadowSide !== null ) ? material.shadowSide : shadowSide[ material.side ];\n\n\t\t}\n\n\t\tresult.clipShadows = material.clipShadows;\n\t\tresult.clippingPlanes = material.clippingPlanes;\n\t\tresult.clipIntersection = material.clipIntersection;\n\n\t\tresult.wireframeLinewidth = material.wireframeLinewidth;\n\t\tresult.linewidth = material.linewidth;\n\n\t\tif ( light.isPointLight === true && result.isMeshDistanceMaterial === true ) {\n\n\t\t\tresult.referencePosition.setFromMatrixPosition( light.matrixWorld );\n\t\t\tresult.nearDistance = shadowCameraNear;\n\t\t\tresult.farDistance = shadowCameraFar;\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\tfunction renderObject( object, camera, shadowCamera, light, type ) {\n\n\t\tif ( object.visible === false ) return;\n\n\t\tconst visible = object.layers.test( camera.layers );\n\n\t\tif ( visible && ( object.isMesh || object.isLine || object.isPoints ) ) {\n\n\t\t\tif ( ( object.castShadow || ( object.receiveShadow && type === VSMShadowMap ) ) && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) {\n\n\t\t\t\tobject.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld );\n\n\t\t\t\tconst geometry = _objects.update( object );\n\t\t\t\tconst material = object.material;\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tconst groups = geometry.groups;\n\n\t\t\t\t\tfor ( let k = 0, kl = groups.length; k < kl; k ++ ) {\n\n\t\t\t\t\t\tconst group = groups[ k ];\n\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\tif ( groupMaterial && groupMaterial.visible ) {\n\n\t\t\t\t\t\t\tconst depthMaterial = getDepthMaterial( object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type );\n\n\t\t\t\t\t\t\t_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( material.visible ) {\n\n\t\t\t\t\tconst depthMaterial = getDepthMaterial( object, geometry, material, light, shadowCamera.near, shadowCamera.far, type );\n\n\t\t\t\t\t_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\trenderObject( children[ i ], camera, shadowCamera, light, type );\n\n\t\t}\n\n\t}\n\n}\n\nfunction WebGLState( gl, extensions, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tfunction ColorBuffer() {\n\n\t\tlet locked = false;\n\n\t\tconst color = new Vector4();\n\t\tlet currentColorMask = null;\n\t\tconst currentColorClear = new Vector4( 0, 0, 0, 0 );\n\n\t\treturn {\n\n\t\t\tsetMask: function ( colorMask ) {\n\n\t\t\t\tif ( currentColorMask !== colorMask && ! locked ) {\n\n\t\t\t\t\tgl.colorMask( colorMask, colorMask, colorMask, colorMask );\n\t\t\t\t\tcurrentColorMask = colorMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( r, g, b, a, premultipliedAlpha ) {\n\n\t\t\t\tif ( premultipliedAlpha === true ) {\n\n\t\t\t\t\tr *= a; g *= a; b *= a;\n\n\t\t\t\t}\n\n\t\t\t\tcolor.set( r, g, b, a );\n\n\t\t\t\tif ( currentColorClear.equals( color ) === false ) {\n\n\t\t\t\t\tgl.clearColor( r, g, b, a );\n\t\t\t\t\tcurrentColorClear.copy( color );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentColorMask = null;\n\t\t\t\tcurrentColorClear.set( - 1, 0, 0, 0 ); // set to invalid state\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction DepthBuffer() {\n\n\t\tlet locked = false;\n\n\t\tlet currentDepthMask = null;\n\t\tlet currentDepthFunc = null;\n\t\tlet currentDepthClear = null;\n\n\t\treturn {\n\n\t\t\tsetTest: function ( depthTest ) {\n\n\t\t\t\tif ( depthTest ) {\n\n\t\t\t\t\tenable( 2929 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tdisable( 2929 );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetMask: function ( depthMask ) {\n\n\t\t\t\tif ( currentDepthMask !== depthMask && ! locked ) {\n\n\t\t\t\t\tgl.depthMask( depthMask );\n\t\t\t\t\tcurrentDepthMask = depthMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetFunc: function ( depthFunc ) {\n\n\t\t\t\tif ( currentDepthFunc !== depthFunc ) {\n\n\t\t\t\t\tif ( depthFunc ) {\n\n\t\t\t\t\t\tswitch ( depthFunc ) {\n\n\t\t\t\t\t\t\tcase NeverDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 512 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase AlwaysDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 519 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase LessDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 513 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase LessEqualDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 515 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase EqualDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 514 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase GreaterEqualDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 518 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase GreaterDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 516 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase NotEqualDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 517 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 515 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tgl.depthFunc( 515 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentDepthFunc = depthFunc;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( depth ) {\n\n\t\t\t\tif ( currentDepthClear !== depth ) {\n\n\t\t\t\t\tgl.clearDepth( depth );\n\t\t\t\t\tcurrentDepthClear = depth;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentDepthMask = null;\n\t\t\t\tcurrentDepthFunc = null;\n\t\t\t\tcurrentDepthClear = null;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction StencilBuffer() {\n\n\t\tlet locked = false;\n\n\t\tlet currentStencilMask = null;\n\t\tlet currentStencilFunc = null;\n\t\tlet currentStencilRef = null;\n\t\tlet currentStencilFuncMask = null;\n\t\tlet currentStencilFail = null;\n\t\tlet currentStencilZFail = null;\n\t\tlet currentStencilZPass = null;\n\t\tlet currentStencilClear = null;\n\n\t\treturn {\n\n\t\t\tsetTest: function ( stencilTest ) {\n\n\t\t\t\tif ( ! locked ) {\n\n\t\t\t\t\tif ( stencilTest ) {\n\n\t\t\t\t\t\tenable( 2960 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdisable( 2960 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetMask: function ( stencilMask ) {\n\n\t\t\t\tif ( currentStencilMask !== stencilMask && ! locked ) {\n\n\t\t\t\t\tgl.stencilMask( stencilMask );\n\t\t\t\t\tcurrentStencilMask = stencilMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetFunc: function ( stencilFunc, stencilRef, stencilMask ) {\n\n\t\t\t\tif ( currentStencilFunc !== stencilFunc ||\n\t\t\t\t currentStencilRef !== stencilRef ||\n\t\t\t\t currentStencilFuncMask !== stencilMask ) {\n\n\t\t\t\t\tgl.stencilFunc( stencilFunc, stencilRef, stencilMask );\n\n\t\t\t\t\tcurrentStencilFunc = stencilFunc;\n\t\t\t\t\tcurrentStencilRef = stencilRef;\n\t\t\t\t\tcurrentStencilFuncMask = stencilMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetOp: function ( stencilFail, stencilZFail, stencilZPass ) {\n\n\t\t\t\tif ( currentStencilFail !== stencilFail ||\n\t\t\t\t currentStencilZFail !== stencilZFail ||\n\t\t\t\t currentStencilZPass !== stencilZPass ) {\n\n\t\t\t\t\tgl.stencilOp( stencilFail, stencilZFail, stencilZPass );\n\n\t\t\t\t\tcurrentStencilFail = stencilFail;\n\t\t\t\t\tcurrentStencilZFail = stencilZFail;\n\t\t\t\t\tcurrentStencilZPass = stencilZPass;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( stencil ) {\n\n\t\t\t\tif ( currentStencilClear !== stencil ) {\n\n\t\t\t\t\tgl.clearStencil( stencil );\n\t\t\t\t\tcurrentStencilClear = stencil;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentStencilMask = null;\n\t\t\t\tcurrentStencilFunc = null;\n\t\t\t\tcurrentStencilRef = null;\n\t\t\t\tcurrentStencilFuncMask = null;\n\t\t\t\tcurrentStencilFail = null;\n\t\t\t\tcurrentStencilZFail = null;\n\t\t\t\tcurrentStencilZPass = null;\n\t\t\t\tcurrentStencilClear = null;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t//\n\n\tconst colorBuffer = new ColorBuffer();\n\tconst depthBuffer = new DepthBuffer();\n\tconst stencilBuffer = new StencilBuffer();\n\n\tlet enabledCapabilities = {};\n\n\tlet xrFramebuffer = null;\n\tlet currentBoundFramebuffers = {};\n\n\tlet currentProgram = null;\n\n\tlet currentBlendingEnabled = false;\n\tlet currentBlending = null;\n\tlet currentBlendEquation = null;\n\tlet currentBlendSrc = null;\n\tlet currentBlendDst = null;\n\tlet currentBlendEquationAlpha = null;\n\tlet currentBlendSrcAlpha = null;\n\tlet currentBlendDstAlpha = null;\n\tlet currentPremultipledAlpha = false;\n\n\tlet currentFlipSided = null;\n\tlet currentCullFace = null;\n\n\tlet currentLineWidth = null;\n\n\tlet currentPolygonOffsetFactor = null;\n\tlet currentPolygonOffsetUnits = null;\n\n\tconst maxTextures = gl.getParameter( 35661 );\n\n\tlet lineWidthAvailable = false;\n\tlet version = 0;\n\tconst glVersion = gl.getParameter( 7938 );\n\n\tif ( glVersion.indexOf( 'WebGL' ) !== - 1 ) {\n\n\t\tversion = parseFloat( /^WebGL (\\d)/.exec( glVersion )[ 1 ] );\n\t\tlineWidthAvailable = ( version >= 1.0 );\n\n\t} else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) {\n\n\t\tversion = parseFloat( /^OpenGL ES (\\d)/.exec( glVersion )[ 1 ] );\n\t\tlineWidthAvailable = ( version >= 2.0 );\n\n\t}\n\n\tlet currentTextureSlot = null;\n\tlet currentBoundTextures = {};\n\n\tconst scissorParam = gl.getParameter( 3088 );\n\tconst viewportParam = gl.getParameter( 2978 );\n\n\tconst currentScissor = new Vector4().fromArray( scissorParam );\n\tconst currentViewport = new Vector4().fromArray( viewportParam );\n\n\tfunction createTexture( type, target, count ) {\n\n\t\tconst data = new Uint8Array( 4 ); // 4 is required to match default unpack alignment of 4.\n\t\tconst texture = gl.createTexture();\n\n\t\tgl.bindTexture( type, texture );\n\t\tgl.texParameteri( type, 10241, 9728 );\n\t\tgl.texParameteri( type, 10240, 9728 );\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tgl.texImage2D( target + i, 0, 6408, 1, 1, 0, 6408, 5121, data );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tconst emptyTextures = {};\n\temptyTextures[ 3553 ] = createTexture( 3553, 3553, 1 );\n\temptyTextures[ 34067 ] = createTexture( 34067, 34069, 6 );\n\n\t// init\n\n\tcolorBuffer.setClear( 0, 0, 0, 1 );\n\tdepthBuffer.setClear( 1 );\n\tstencilBuffer.setClear( 0 );\n\n\tenable( 2929 );\n\tdepthBuffer.setFunc( LessEqualDepth );\n\n\tsetFlipSided( false );\n\tsetCullFace( CullFaceBack );\n\tenable( 2884 );\n\n\tsetBlending( NoBlending );\n\n\t//\n\n\tfunction enable( id ) {\n\n\t\tif ( enabledCapabilities[ id ] !== true ) {\n\n\t\t\tgl.enable( id );\n\t\t\tenabledCapabilities[ id ] = true;\n\n\t\t}\n\n\t}\n\n\tfunction disable( id ) {\n\n\t\tif ( enabledCapabilities[ id ] !== false ) {\n\n\t\t\tgl.disable( id );\n\t\t\tenabledCapabilities[ id ] = false;\n\n\t\t}\n\n\t}\n\n\tfunction bindXRFramebuffer( framebuffer ) {\n\n\t\tif ( framebuffer !== xrFramebuffer ) {\n\n\t\t\tgl.bindFramebuffer( 36160, framebuffer );\n\n\t\t\txrFramebuffer = framebuffer;\n\n\t\t}\n\n\t}\n\n\tfunction bindFramebuffer( target, framebuffer ) {\n\n\t\tif ( framebuffer === null && xrFramebuffer !== null ) framebuffer = xrFramebuffer; // use active XR framebuffer if available\n\n\t\tif ( currentBoundFramebuffers[ target ] !== framebuffer ) {\n\n\t\t\tgl.bindFramebuffer( target, framebuffer );\n\n\t\t\tcurrentBoundFramebuffers[ target ] = framebuffer;\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t// 36009 is equivalent to 36160\n\n\t\t\t\tif ( target === 36009 ) {\n\n\t\t\t\t\tcurrentBoundFramebuffers[ 36160 ] = framebuffer;\n\n\t\t\t\t}\n\n\t\t\t\tif ( target === 36160 ) {\n\n\t\t\t\t\tcurrentBoundFramebuffers[ 36009 ] = framebuffer;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tfunction useProgram( program ) {\n\n\t\tif ( currentProgram !== program ) {\n\n\t\t\tgl.useProgram( program );\n\n\t\t\tcurrentProgram = program;\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tconst equationToGL = {\n\t\t[ AddEquation ]: 32774,\n\t\t[ SubtractEquation ]: 32778,\n\t\t[ ReverseSubtractEquation ]: 32779\n\t};\n\n\tif ( isWebGL2 ) {\n\n\t\tequationToGL[ MinEquation ] = 32775;\n\t\tequationToGL[ MaxEquation ] = 32776;\n\n\t} else {\n\n\t\tconst extension = extensions.get( 'EXT_blend_minmax' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tequationToGL[ MinEquation ] = extension.MIN_EXT;\n\t\t\tequationToGL[ MaxEquation ] = extension.MAX_EXT;\n\n\t\t}\n\n\t}\n\n\tconst factorToGL = {\n\t\t[ ZeroFactor ]: 0,\n\t\t[ OneFactor ]: 1,\n\t\t[ SrcColorFactor ]: 768,\n\t\t[ SrcAlphaFactor ]: 770,\n\t\t[ SrcAlphaSaturateFactor ]: 776,\n\t\t[ DstColorFactor ]: 774,\n\t\t[ DstAlphaFactor ]: 772,\n\t\t[ OneMinusSrcColorFactor ]: 769,\n\t\t[ OneMinusSrcAlphaFactor ]: 771,\n\t\t[ OneMinusDstColorFactor ]: 775,\n\t\t[ OneMinusDstAlphaFactor ]: 773\n\t};\n\n\tfunction setBlending( blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha ) {\n\n\t\tif ( blending === NoBlending ) {\n\n\t\t\tif ( currentBlendingEnabled === true ) {\n\n\t\t\t\tdisable( 3042 );\n\t\t\t\tcurrentBlendingEnabled = false;\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( currentBlendingEnabled === false ) {\n\n\t\t\tenable( 3042 );\n\t\t\tcurrentBlendingEnabled = true;\n\n\t\t}\n\n\t\tif ( blending !== CustomBlending ) {\n\n\t\t\tif ( blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha ) {\n\n\t\t\t\tif ( currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation ) {\n\n\t\t\t\t\tgl.blendEquation( 32774 );\n\n\t\t\t\t\tcurrentBlendEquation = AddEquation;\n\t\t\t\t\tcurrentBlendEquationAlpha = AddEquation;\n\n\t\t\t\t}\n\n\t\t\t\tif ( premultipliedAlpha ) {\n\n\t\t\t\t\tswitch ( blending ) {\n\n\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( 1, 771, 1, 771 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( 1, 1 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( 0, 0, 769, 771 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( 0, 768, 0, 770 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.WebGLState: Invalid blending: ', blending );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tswitch ( blending ) {\n\n\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( 770, 771, 1, 771 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( 770, 1 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( 0, 769 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\tgl.blendFunc( 0, 768 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.WebGLState: Invalid blending: ', blending );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tcurrentBlendSrc = null;\n\t\t\t\tcurrentBlendDst = null;\n\t\t\t\tcurrentBlendSrcAlpha = null;\n\t\t\t\tcurrentBlendDstAlpha = null;\n\n\t\t\t\tcurrentBlending = blending;\n\t\t\t\tcurrentPremultipledAlpha = premultipliedAlpha;\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// custom blending\n\n\t\tblendEquationAlpha = blendEquationAlpha || blendEquation;\n\t\tblendSrcAlpha = blendSrcAlpha || blendSrc;\n\t\tblendDstAlpha = blendDstAlpha || blendDst;\n\n\t\tif ( blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha ) {\n\n\t\t\tgl.blendEquationSeparate( equationToGL[ blendEquation ], equationToGL[ blendEquationAlpha ] );\n\n\t\t\tcurrentBlendEquation = blendEquation;\n\t\t\tcurrentBlendEquationAlpha = blendEquationAlpha;\n\n\t\t}\n\n\t\tif ( blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha ) {\n\n\t\t\tgl.blendFuncSeparate( factorToGL[ blendSrc ], factorToGL[ blendDst ], factorToGL[ blendSrcAlpha ], factorToGL[ blendDstAlpha ] );\n\n\t\t\tcurrentBlendSrc = blendSrc;\n\t\t\tcurrentBlendDst = blendDst;\n\t\t\tcurrentBlendSrcAlpha = blendSrcAlpha;\n\t\t\tcurrentBlendDstAlpha = blendDstAlpha;\n\n\t\t}\n\n\t\tcurrentBlending = blending;\n\t\tcurrentPremultipledAlpha = null;\n\n\t}\n\n\tfunction setMaterial( material, frontFaceCW ) {\n\n\t\tmaterial.side === DoubleSide\n\t\t\t? disable( 2884 )\n\t\t\t: enable( 2884 );\n\n\t\tlet flipSided = ( material.side === BackSide );\n\t\tif ( frontFaceCW ) flipSided = ! flipSided;\n\n\t\tsetFlipSided( flipSided );\n\n\t\t( material.blending === NormalBlending && material.transparent === false )\n\t\t\t? setBlending( NoBlending )\n\t\t\t: setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha );\n\n\t\tdepthBuffer.setFunc( material.depthFunc );\n\t\tdepthBuffer.setTest( material.depthTest );\n\t\tdepthBuffer.setMask( material.depthWrite );\n\t\tcolorBuffer.setMask( material.colorWrite );\n\n\t\tconst stencilWrite = material.stencilWrite;\n\t\tstencilBuffer.setTest( stencilWrite );\n\t\tif ( stencilWrite ) {\n\n\t\t\tstencilBuffer.setMask( material.stencilWriteMask );\n\t\t\tstencilBuffer.setFunc( material.stencilFunc, material.stencilRef, material.stencilFuncMask );\n\t\t\tstencilBuffer.setOp( material.stencilFail, material.stencilZFail, material.stencilZPass );\n\n\t\t}\n\n\t\tsetPolygonOffset( material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits );\n\n\t\tmaterial.alphaToCoverage === true\n\t\t\t? enable( 32926 )\n\t\t\t: disable( 32926 );\n\n\t}\n\n\t//\n\n\tfunction setFlipSided( flipSided ) {\n\n\t\tif ( currentFlipSided !== flipSided ) {\n\n\t\t\tif ( flipSided ) {\n\n\t\t\t\tgl.frontFace( 2304 );\n\n\t\t\t} else {\n\n\t\t\t\tgl.frontFace( 2305 );\n\n\t\t\t}\n\n\t\t\tcurrentFlipSided = flipSided;\n\n\t\t}\n\n\t}\n\n\tfunction setCullFace( cullFace ) {\n\n\t\tif ( cullFace !== CullFaceNone ) {\n\n\t\t\tenable( 2884 );\n\n\t\t\tif ( cullFace !== currentCullFace ) {\n\n\t\t\t\tif ( cullFace === CullFaceBack ) {\n\n\t\t\t\t\tgl.cullFace( 1029 );\n\n\t\t\t\t} else if ( cullFace === CullFaceFront ) {\n\n\t\t\t\t\tgl.cullFace( 1028 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tgl.cullFace( 1032 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tdisable( 2884 );\n\n\t\t}\n\n\t\tcurrentCullFace = cullFace;\n\n\t}\n\n\tfunction setLineWidth( width ) {\n\n\t\tif ( width !== currentLineWidth ) {\n\n\t\t\tif ( lineWidthAvailable ) gl.lineWidth( width );\n\n\t\t\tcurrentLineWidth = width;\n\n\t\t}\n\n\t}\n\n\tfunction setPolygonOffset( polygonOffset, factor, units ) {\n\n\t\tif ( polygonOffset ) {\n\n\t\t\tenable( 32823 );\n\n\t\t\tif ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) {\n\n\t\t\t\tgl.polygonOffset( factor, units );\n\n\t\t\t\tcurrentPolygonOffsetFactor = factor;\n\t\t\t\tcurrentPolygonOffsetUnits = units;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tdisable( 32823 );\n\n\t\t}\n\n\t}\n\n\tfunction setScissorTest( scissorTest ) {\n\n\t\tif ( scissorTest ) {\n\n\t\t\tenable( 3089 );\n\n\t\t} else {\n\n\t\t\tdisable( 3089 );\n\n\t\t}\n\n\t}\n\n\t// texture\n\n\tfunction activeTexture( webglSlot ) {\n\n\t\tif ( webglSlot === undefined ) webglSlot = 33984 + maxTextures - 1;\n\n\t\tif ( currentTextureSlot !== webglSlot ) {\n\n\t\t\tgl.activeTexture( webglSlot );\n\t\t\tcurrentTextureSlot = webglSlot;\n\n\t\t}\n\n\t}\n\n\tfunction bindTexture( webglType, webglTexture ) {\n\n\t\tif ( currentTextureSlot === null ) {\n\n\t\t\tactiveTexture();\n\n\t\t}\n\n\t\tlet boundTexture = currentBoundTextures[ currentTextureSlot ];\n\n\t\tif ( boundTexture === undefined ) {\n\n\t\t\tboundTexture = { type: undefined, texture: undefined };\n\t\t\tcurrentBoundTextures[ currentTextureSlot ] = boundTexture;\n\n\t\t}\n\n\t\tif ( boundTexture.type !== webglType || boundTexture.texture !== webglTexture ) {\n\n\t\t\tgl.bindTexture( webglType, webglTexture || emptyTextures[ webglType ] );\n\n\t\t\tboundTexture.type = webglType;\n\t\t\tboundTexture.texture = webglTexture;\n\n\t\t}\n\n\t}\n\n\tfunction unbindTexture() {\n\n\t\tconst boundTexture = currentBoundTextures[ currentTextureSlot ];\n\n\t\tif ( boundTexture !== undefined && boundTexture.type !== undefined ) {\n\n\t\t\tgl.bindTexture( boundTexture.type, null );\n\n\t\t\tboundTexture.type = undefined;\n\t\t\tboundTexture.texture = undefined;\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.texImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.texImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction scissor( scissor ) {\n\n\t\tif ( currentScissor.equals( scissor ) === false ) {\n\n\t\t\tgl.scissor( scissor.x, scissor.y, scissor.z, scissor.w );\n\t\t\tcurrentScissor.copy( scissor );\n\n\t\t}\n\n\t}\n\n\tfunction viewport( viewport ) {\n\n\t\tif ( currentViewport.equals( viewport ) === false ) {\n\n\t\t\tgl.viewport( viewport.x, viewport.y, viewport.z, viewport.w );\n\t\t\tcurrentViewport.copy( viewport );\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction reset() {\n\n\t\t// reset state\n\n\t\tgl.disable( 3042 );\n\t\tgl.disable( 2884 );\n\t\tgl.disable( 2929 );\n\t\tgl.disable( 32823 );\n\t\tgl.disable( 3089 );\n\t\tgl.disable( 2960 );\n\t\tgl.disable( 32926 );\n\n\t\tgl.blendEquation( 32774 );\n\t\tgl.blendFunc( 1, 0 );\n\t\tgl.blendFuncSeparate( 1, 0, 1, 0 );\n\n\t\tgl.colorMask( true, true, true, true );\n\t\tgl.clearColor( 0, 0, 0, 0 );\n\n\t\tgl.depthMask( true );\n\t\tgl.depthFunc( 513 );\n\t\tgl.clearDepth( 1 );\n\n\t\tgl.stencilMask( 0xffffffff );\n\t\tgl.stencilFunc( 519, 0, 0xffffffff );\n\t\tgl.stencilOp( 7680, 7680, 7680 );\n\t\tgl.clearStencil( 0 );\n\n\t\tgl.cullFace( 1029 );\n\t\tgl.frontFace( 2305 );\n\n\t\tgl.polygonOffset( 0, 0 );\n\n\t\tgl.activeTexture( 33984 );\n\n\t\tgl.bindFramebuffer( 36160, null );\n\n\t\tif ( isWebGL2 === true ) {\n\n\t\t\tgl.bindFramebuffer( 36009, null );\n\t\t\tgl.bindFramebuffer( 36008, null );\n\n\t\t}\n\n\t\tgl.useProgram( null );\n\n\t\tgl.lineWidth( 1 );\n\n\t\tgl.scissor( 0, 0, gl.canvas.width, gl.canvas.height );\n\t\tgl.viewport( 0, 0, gl.canvas.width, gl.canvas.height );\n\n\t\t// reset internals\n\n\t\tenabledCapabilities = {};\n\n\t\tcurrentTextureSlot = null;\n\t\tcurrentBoundTextures = {};\n\n\t\txrFramebuffer = null;\n\t\tcurrentBoundFramebuffers = {};\n\n\t\tcurrentProgram = null;\n\n\t\tcurrentBlendingEnabled = false;\n\t\tcurrentBlending = null;\n\t\tcurrentBlendEquation = null;\n\t\tcurrentBlendSrc = null;\n\t\tcurrentBlendDst = null;\n\t\tcurrentBlendEquationAlpha = null;\n\t\tcurrentBlendSrcAlpha = null;\n\t\tcurrentBlendDstAlpha = null;\n\t\tcurrentPremultipledAlpha = false;\n\n\t\tcurrentFlipSided = null;\n\t\tcurrentCullFace = null;\n\n\t\tcurrentLineWidth = null;\n\n\t\tcurrentPolygonOffsetFactor = null;\n\t\tcurrentPolygonOffsetUnits = null;\n\n\t\tcurrentScissor.set( 0, 0, gl.canvas.width, gl.canvas.height );\n\t\tcurrentViewport.set( 0, 0, gl.canvas.width, gl.canvas.height );\n\n\t\tcolorBuffer.reset();\n\t\tdepthBuffer.reset();\n\t\tstencilBuffer.reset();\n\n\t}\n\n\treturn {\n\n\t\tbuffers: {\n\t\t\tcolor: colorBuffer,\n\t\t\tdepth: depthBuffer,\n\t\t\tstencil: stencilBuffer\n\t\t},\n\n\t\tenable: enable,\n\t\tdisable: disable,\n\n\t\tbindFramebuffer: bindFramebuffer,\n\t\tbindXRFramebuffer: bindXRFramebuffer,\n\n\t\tuseProgram: useProgram,\n\n\t\tsetBlending: setBlending,\n\t\tsetMaterial: setMaterial,\n\n\t\tsetFlipSided: setFlipSided,\n\t\tsetCullFace: setCullFace,\n\n\t\tsetLineWidth: setLineWidth,\n\t\tsetPolygonOffset: setPolygonOffset,\n\n\t\tsetScissorTest: setScissorTest,\n\n\t\tactiveTexture: activeTexture,\n\t\tbindTexture: bindTexture,\n\t\tunbindTexture: unbindTexture,\n\t\tcompressedTexImage2D: compressedTexImage2D,\n\t\ttexImage2D: texImage2D,\n\t\ttexImage3D: texImage3D,\n\n\t\tscissor: scissor,\n\t\tviewport: viewport,\n\n\t\treset: reset\n\n\t};\n\n}\n\nfunction WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\tconst maxTextures = capabilities.maxTextures;\n\tconst maxCubemapSize = capabilities.maxCubemapSize;\n\tconst maxTextureSize = capabilities.maxTextureSize;\n\tconst maxSamples = capabilities.maxSamples;\n\n\tconst _videoTextures = new WeakMap();\n\tlet _canvas;\n\n\t// cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas,\n\t// also OffscreenCanvas.getContext(\"webgl\"), but not OffscreenCanvas.getContext(\"2d\")!\n\t// Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d).\n\n\tlet useOffscreenCanvas = false;\n\n\ttry {\n\n\t\tuseOffscreenCanvas = typeof OffscreenCanvas !== 'undefined'\n\t\t\t&& ( new OffscreenCanvas( 1, 1 ).getContext( '2d' ) ) !== null;\n\n\t} catch ( err ) {\n\n\t\t// Ignore any errors\n\n\t}\n\n\tfunction createCanvas( width, height ) {\n\n\t\t// Use OffscreenCanvas when available. Specially needed in web workers\n\n\t\treturn useOffscreenCanvas ?\n\t\t\tnew OffscreenCanvas( width, height ) :\n\t\t\tdocument.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );\n\n\t}\n\n\tfunction resizeImage( image, needsPowerOfTwo, needsNewCanvas, maxSize ) {\n\n\t\tlet scale = 1;\n\n\t\t// handle case if texture exceeds max size\n\n\t\tif ( image.width > maxSize || image.height > maxSize ) {\n\n\t\t\tscale = maxSize / Math.max( image.width, image.height );\n\n\t\t}\n\n\t\t// only perform resize if necessary\n\n\t\tif ( scale < 1 || needsPowerOfTwo === true ) {\n\n\t\t\t// only perform resize for certain image types\n\n\t\t\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t\t\tconst floor = needsPowerOfTwo ? floorPowerOfTwo : Math.floor;\n\n\t\t\t\tconst width = floor( scale * image.width );\n\t\t\t\tconst height = floor( scale * image.height );\n\n\t\t\t\tif ( _canvas === undefined ) _canvas = createCanvas( width, height );\n\n\t\t\t\t// cube textures can't reuse the same canvas\n\n\t\t\t\tconst canvas = needsNewCanvas ? createCanvas( width, height ) : _canvas;\n\n\t\t\t\tcanvas.width = width;\n\t\t\t\tcanvas.height = height;\n\n\t\t\t\tconst context = canvas.getContext( '2d' );\n\t\t\t\tcontext.drawImage( image, 0, 0, width, height );\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').' );\n\n\t\t\t\treturn canvas;\n\n\t\t\t} else {\n\n\t\t\t\tif ( 'data' in image ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Image in DataTexture is too big (' + image.width + 'x' + image.height + ').' );\n\n\t\t\t\t}\n\n\t\t\t\treturn image;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn image;\n\n\t}\n\n\tfunction isPowerOfTwo$1( image ) {\n\n\t\treturn isPowerOfTwo( image.width ) && isPowerOfTwo( image.height );\n\n\t}\n\n\tfunction textureNeedsPowerOfTwo( texture ) {\n\n\t\tif ( isWebGL2 ) return false;\n\n\t\treturn ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) ||\n\t\t\t( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter );\n\n\t}\n\n\tfunction textureNeedsGenerateMipmaps( texture, supportsMips ) {\n\n\t\treturn texture.generateMipmaps && supportsMips &&\n\t\t\ttexture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;\n\n\t}\n\n\tfunction generateMipmap( target, texture, width, height, depth = 1 ) {\n\n\t\t_gl.generateMipmap( target );\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\ttextureProperties.__maxMipLevel = Math.log2( Math.max( width, height, depth ) );\n\n\t}\n\n\tfunction getInternalFormat( internalFormatName, glFormat, glType ) {\n\n\t\tif ( isWebGL2 === false ) return glFormat;\n\n\t\tif ( internalFormatName !== null ) {\n\n\t\t\tif ( _gl[ internalFormatName ] !== undefined ) return _gl[ internalFormatName ];\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \\'' + internalFormatName + '\\'' );\n\n\t\t}\n\n\t\tlet internalFormat = glFormat;\n\n\t\tif ( glFormat === 6403 ) {\n\n\t\t\tif ( glType === 5126 ) internalFormat = 33326;\n\t\t\tif ( glType === 5131 ) internalFormat = 33325;\n\t\t\tif ( glType === 5121 ) internalFormat = 33321;\n\n\t\t}\n\n\t\tif ( glFormat === 6407 ) {\n\n\t\t\tif ( glType === 5126 ) internalFormat = 34837;\n\t\t\tif ( glType === 5131 ) internalFormat = 34843;\n\t\t\tif ( glType === 5121 ) internalFormat = 32849;\n\n\t\t}\n\n\t\tif ( glFormat === 6408 ) {\n\n\t\t\tif ( glType === 5126 ) internalFormat = 34836;\n\t\t\tif ( glType === 5131 ) internalFormat = 34842;\n\t\t\tif ( glType === 5121 ) internalFormat = 32856;\n\n\t\t}\n\n\t\tif ( internalFormat === 33325 || internalFormat === 33326 ||\n\t\t\tinternalFormat === 34842 || internalFormat === 34836 ) {\n\n\t\t\textensions.get( 'EXT_color_buffer_float' );\n\n\t\t}\n\n\t\treturn internalFormat;\n\n\t}\n\n\t// Fallback filters for non-power-of-2 textures\n\n\tfunction filterFallback( f ) {\n\n\t\tif ( f === NearestFilter || f === NearestMipmapNearestFilter || f === NearestMipmapLinearFilter ) {\n\n\t\t\treturn 9728;\n\n\t\t}\n\n\t\treturn 9729;\n\n\t}\n\n\t//\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tdeallocateTexture( texture );\n\n\t\tif ( texture.isVideoTexture ) {\n\n\t\t\t_videoTextures.delete( texture );\n\n\t\t}\n\n\t\tinfo.memory.textures --;\n\n\t}\n\n\tfunction onRenderTargetDispose( event ) {\n\n\t\tconst renderTarget = event.target;\n\n\t\trenderTarget.removeEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tdeallocateRenderTarget( renderTarget );\n\n\t}\n\n\t//\n\n\tfunction deallocateTexture( texture ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( textureProperties.__webglInit === undefined ) return;\n\n\t\t_gl.deleteTexture( textureProperties.__webglTexture );\n\n\t\tproperties.remove( texture );\n\n\t}\n\n\tfunction deallocateRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( ! renderTarget ) return;\n\n\t\tif ( textureProperties.__webglTexture !== undefined ) {\n\n\t\t\t_gl.deleteTexture( textureProperties.__webglTexture );\n\n\t\t\tinfo.memory.textures --;\n\n\t\t}\n\n\t\tif ( renderTarget.depthTexture ) {\n\n\t\t\trenderTarget.depthTexture.dispose();\n\n\t\t}\n\n\t\tif ( renderTarget.isWebGLCubeRenderTarget ) {\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] );\n\t\t\t\tif ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer );\n\t\t\tif ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer );\n\t\t\tif ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\tif ( renderTargetProperties.__webglColorRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglColorRenderbuffer );\n\t\t\tif ( renderTargetProperties.__webglDepthRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthRenderbuffer );\n\n\t\t}\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets ) {\n\n\t\t\tfor ( let i = 0, il = texture.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachmentProperties = properties.get( texture[ i ] );\n\n\t\t\t\tif ( attachmentProperties.__webglTexture ) {\n\n\t\t\t\t\t_gl.deleteTexture( attachmentProperties.__webglTexture );\n\n\t\t\t\t\tinfo.memory.textures --;\n\n\t\t\t\t}\n\n\t\t\t\tproperties.remove( texture[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tproperties.remove( texture );\n\t\tproperties.remove( renderTarget );\n\n\t}\n\n\t//\n\n\tlet textureUnits = 0;\n\n\tfunction resetTextureUnits() {\n\n\t\ttextureUnits = 0;\n\n\t}\n\n\tfunction allocateTextureUnit() {\n\n\t\tconst textureUnit = textureUnits;\n\n\t\tif ( textureUnit >= maxTextures ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + maxTextures );\n\n\t\t}\n\n\t\ttextureUnits += 1;\n\n\t\treturn textureUnit;\n\n\t}\n\n\t//\n\n\tfunction setTexture2D( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.isVideoTexture ) updateVideoTexture( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tconst image = texture.image;\n\n\t\t\tif ( image === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture marked for update but image is undefined' );\n\n\t\t\t} else if ( image.complete === false ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete' );\n\n\t\t\t} else {\n\n\t\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 3553, textureProperties.__webglTexture );\n\n\t}\n\n\tfunction setTexture2DArray( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 35866, textureProperties.__webglTexture );\n\n\t}\n\n\tfunction setTexture3D( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 32879, textureProperties.__webglTexture );\n\n\t}\n\n\tfunction setTextureCube( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadCubeTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\n\t}\n\n\tconst wrappingToGL = {\n\t\t[ RepeatWrapping ]: 10497,\n\t\t[ ClampToEdgeWrapping ]: 33071,\n\t\t[ MirroredRepeatWrapping ]: 33648\n\t};\n\n\tconst filterToGL = {\n\t\t[ NearestFilter ]: 9728,\n\t\t[ NearestMipmapNearestFilter ]: 9984,\n\t\t[ NearestMipmapLinearFilter ]: 9986,\n\n\t\t[ LinearFilter ]: 9729,\n\t\t[ LinearMipmapNearestFilter ]: 9985,\n\t\t[ LinearMipmapLinearFilter ]: 9987\n\t};\n\n\tfunction setTextureParameters( textureType, texture, supportsMips ) {\n\n\t\tif ( supportsMips ) {\n\n\t\t\t_gl.texParameteri( textureType, 10242, wrappingToGL[ texture.wrapS ] );\n\t\t\t_gl.texParameteri( textureType, 10243, wrappingToGL[ texture.wrapT ] );\n\n\t\t\tif ( textureType === 32879 || textureType === 35866 ) {\n\n\t\t\t\t_gl.texParameteri( textureType, 32882, wrappingToGL[ texture.wrapR ] );\n\n\t\t\t}\n\n\t\t\t_gl.texParameteri( textureType, 10240, filterToGL[ texture.magFilter ] );\n\t\t\t_gl.texParameteri( textureType, 10241, filterToGL[ texture.minFilter ] );\n\n\t\t} else {\n\n\t\t\t_gl.texParameteri( textureType, 10242, 33071 );\n\t\t\t_gl.texParameteri( textureType, 10243, 33071 );\n\n\t\t\tif ( textureType === 32879 || textureType === 35866 ) {\n\n\t\t\t\t_gl.texParameteri( textureType, 32882, 33071 );\n\n\t\t\t}\n\n\t\t\tif ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.' );\n\n\t\t\t}\n\n\t\t\t_gl.texParameteri( textureType, 10240, filterFallback( texture.magFilter ) );\n\t\t\t_gl.texParameteri( textureType, 10241, filterFallback( texture.minFilter ) );\n\n\t\t\tif ( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {\n\n\t\t\tconst extension = extensions.get( 'EXT_texture_filter_anisotropic' );\n\n\t\t\tif ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension for WebGL 1 and WebGL 2\n\t\t\tif ( isWebGL2 === false && ( texture.type === HalfFloatType && extensions.has( 'OES_texture_half_float_linear' ) === false ) ) return; // verify extension for WebGL 1 only\n\n\t\t\tif ( texture.anisotropy > 1 || properties.get( texture ).__currentAnisotropy ) {\n\n\t\t\t\t_gl.texParameterf( textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min( texture.anisotropy, capabilities.getMaxAnisotropy() ) );\n\t\t\t\tproperties.get( texture ).__currentAnisotropy = texture.anisotropy;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction initTexture( textureProperties, texture ) {\n\n\t\tif ( textureProperties.__webglInit === undefined ) {\n\n\t\t\ttextureProperties.__webglInit = true;\n\n\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\tinfo.memory.textures ++;\n\n\t\t}\n\n\t}\n\n\tfunction uploadTexture( textureProperties, texture, slot ) {\n\n\t\tlet textureType = 3553;\n\n\t\tif ( texture.isDataTexture2DArray ) textureType = 35866;\n\t\tif ( texture.isDataTexture3D ) textureType = 32879;\n\n\t\tinitTexture( textureProperties, texture );\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( textureType, textureProperties.__webglTexture );\n\n\t\t_gl.pixelStorei( 37440, texture.flipY );\n\t\t_gl.pixelStorei( 37441, texture.premultiplyAlpha );\n\t\t_gl.pixelStorei( 3317, texture.unpackAlignment );\n\t\t_gl.pixelStorei( 37443, 0 );\n\n\t\tconst needsPowerOfTwo = textureNeedsPowerOfTwo( texture ) && isPowerOfTwo$1( texture.image ) === false;\n\t\tconst image = resizeImage( texture.image, needsPowerOfTwo, false, maxTextureSize );\n\n\t\tconst supportsMips = isPowerOfTwo$1( image ) || isWebGL2,\n\t\t\tglFormat = utils.convert( texture.format );\n\n\t\tlet glType = utils.convert( texture.type ),\n\t\t\tglInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\n\t\tsetTextureParameters( textureType, texture, supportsMips );\n\n\t\tlet mipmap;\n\t\tconst mipmaps = texture.mipmaps;\n\n\t\tif ( texture.isDepthTexture ) {\n\n\t\t\t// populate depth texture with dummy data\n\n\t\t\tglInternalFormat = 6402;\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\tif ( texture.type === FloatType ) {\n\n\t\t\t\t\tglInternalFormat = 36012;\n\n\t\t\t\t} else if ( texture.type === UnsignedIntType ) {\n\n\t\t\t\t\tglInternalFormat = 33190;\n\n\t\t\t\t} else if ( texture.type === UnsignedInt248Type ) {\n\n\t\t\t\t\tglInternalFormat = 35056;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tglInternalFormat = 33189; // WebGL2 requires sized internalformat for glTexImage2D\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( texture.type === FloatType ) {\n\n\t\t\t\t\tconsole.error( 'WebGLRenderer: Floating point depth texture requires WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// validation checks for WebGL 1\n\n\t\t\tif ( texture.format === DepthFormat && glInternalFormat === 6402 ) {\n\n\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t// DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT\n\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\tif ( texture.type !== UnsignedShortType && texture.type !== UnsignedIntType ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.' );\n\n\t\t\t\t\ttexture.type = UnsignedShortType;\n\t\t\t\t\tglType = utils.convert( texture.type );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( texture.format === DepthStencilFormat && glInternalFormat === 6402 ) {\n\n\t\t\t\t// Depth stencil textures need the DEPTH_STENCIL internal format\n\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\tglInternalFormat = 34041;\n\n\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t// DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL.\n\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\tif ( texture.type !== UnsignedInt248Type ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.' );\n\n\t\t\t\t\ttexture.type = UnsignedInt248Type;\n\t\t\t\t\tglType = utils.convert( texture.type );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tstate.texImage2D( 3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null );\n\n\t\t} else if ( texture.isDataTexture ) {\n\n\t\t\t// use manually created mipmaps if available\n\t\t\t// if there are no manual mipmaps\n\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\n\t\t\tif ( mipmaps.length > 0 && supportsMips ) {\n\n\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\tmipmap = mipmaps[ i ];\n\t\t\t\t\tstate.texImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t}\n\n\t\t\t\ttexture.generateMipmaps = false;\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\n\t\t\t} else {\n\n\t\t\t\tstate.texImage2D( 3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data );\n\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\n\t\t\t}\n\n\t\t} else if ( texture.isCompressedTexture ) {\n\n\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\tif ( texture.format !== RGBAFormat && texture.format !== RGBFormat ) {\n\n\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\tstate.compressedTexImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\n\t\t} else if ( texture.isDataTexture2DArray ) {\n\n\t\t\tstate.texImage3D( 35866, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );\n\t\t\ttextureProperties.__maxMipLevel = 0;\n\n\t\t} else if ( texture.isDataTexture3D ) {\n\n\t\t\tstate.texImage3D( 32879, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );\n\t\t\ttextureProperties.__maxMipLevel = 0;\n\n\t\t} else {\n\n\t\t\t// regular Texture (image, video, canvas)\n\n\t\t\t// use manually created mipmaps if available\n\t\t\t// if there are no manual mipmaps\n\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\n\t\t\tif ( mipmaps.length > 0 && supportsMips ) {\n\n\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\tmipmap = mipmaps[ i ];\n\t\t\t\t\tstate.texImage2D( 3553, i, glInternalFormat, glFormat, glType, mipmap );\n\n\t\t\t\t}\n\n\t\t\t\ttexture.generateMipmaps = false;\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\n\t\t\t} else {\n\n\t\t\t\tstate.texImage2D( 3553, 0, glInternalFormat, glFormat, glType, image );\n\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\tgenerateMipmap( textureType, texture, image.width, image.height );\n\n\t\t}\n\n\t\ttextureProperties.__version = texture.version;\n\n\t\tif ( texture.onUpdate ) texture.onUpdate( texture );\n\n\t}\n\n\tfunction uploadCubeTexture( textureProperties, texture, slot ) {\n\n\t\tif ( texture.image.length !== 6 ) return;\n\n\t\tinitTexture( textureProperties, texture );\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\n\t\t_gl.pixelStorei( 37440, texture.flipY );\n\t\t_gl.pixelStorei( 37441, texture.premultiplyAlpha );\n\t\t_gl.pixelStorei( 3317, texture.unpackAlignment );\n\t\t_gl.pixelStorei( 37443, 0 );\n\n\t\tconst isCompressed = ( texture && ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture ) );\n\t\tconst isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );\n\n\t\tconst cubeImage = [];\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tif ( ! isCompressed && ! isDataTexture ) {\n\n\t\t\t\tcubeImage[ i ] = resizeImage( texture.image[ i ], false, true, maxCubemapSize );\n\n\t\t\t} else {\n\n\t\t\t\tcubeImage[ i ] = isDataTexture ? texture.image[ i ].image : texture.image[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst image = cubeImage[ 0 ],\n\t\t\tsupportsMips = isPowerOfTwo$1( image ) || isWebGL2,\n\t\t\tglFormat = utils.convert( texture.format ),\n\t\t\tglType = utils.convert( texture.type ),\n\t\t\tglInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\n\t\tsetTextureParameters( 34067, texture, supportsMips );\n\n\t\tlet mipmaps;\n\n\t\tif ( isCompressed ) {\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tmipmaps = cubeImage[ i ].mipmaps;\n\n\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\n\t\t\t\t\tif ( texture.format !== RGBAFormat && texture.format !== RGBFormat ) {\n\n\t\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\t\tstate.compressedTexImage2D( 34069 + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()' );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstate.texImage2D( 34069 + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\n\t\t} else {\n\n\t\t\tmipmaps = texture.mipmaps;\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( isDataTexture ) {\n\n\t\t\t\t\tstate.texImage2D( 34069 + i, 0, glInternalFormat, cubeImage[ i ].width, cubeImage[ i ].height, 0, glFormat, glType, cubeImage[ i ].data );\n\n\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\t\t\t\t\t\tconst mipmapImage = mipmap.image[ i ].image;\n\n\t\t\t\t\t\tstate.texImage2D( 34069 + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage2D( 34069 + i, 0, glInternalFormat, glFormat, glType, cubeImage[ i ] );\n\n\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\n\t\t\t\t\t\tstate.texImage2D( 34069 + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[ i ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttextureProperties.__maxMipLevel = mipmaps.length;\n\n\t\t}\n\n\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t// We assume images for cube map have the same size.\n\t\t\tgenerateMipmap( 34067, texture, image.width, image.height );\n\n\t\t}\n\n\t\ttextureProperties.__version = texture.version;\n\n\t\tif ( texture.onUpdate ) texture.onUpdate( texture );\n\n\t}\n\n\t// Render targets\n\n\t// Setup storage for target texture and bind it to correct framebuffer\n\tfunction setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget ) {\n\n\t\tconst glFormat = utils.convert( texture.format );\n\t\tconst glType = utils.convert( texture.type );\n\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\n\t\tif ( textureTarget === 32879 || textureTarget === 35866 ) {\n\n\t\t\tstate.texImage3D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, renderTarget.depth, 0, glFormat, glType, null );\n\n\t\t} else {\n\n\t\t\tstate.texImage2D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\n\t\t}\n\n\t\tstate.bindFramebuffer( 36160, framebuffer );\n\t\t_gl.framebufferTexture2D( 36160, attachment, textureTarget, properties.get( texture ).__webglTexture, 0 );\n\t\tstate.bindFramebuffer( 36160, null );\n\n\t}\n\n\t// Setup storage for internal depth/stencil buffers and bind to correct framebuffer\n\tfunction setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) {\n\n\t\t_gl.bindRenderbuffer( 36161, renderbuffer );\n\n\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t\t\tlet glInternalFormat = 33189;\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tconst depthTexture = renderTarget.depthTexture;\n\n\t\t\t\tif ( depthTexture && depthTexture.isDepthTexture ) {\n\n\t\t\t\t\tif ( depthTexture.type === FloatType ) {\n\n\t\t\t\t\t\tglInternalFormat = 36012;\n\n\t\t\t\t\t} else if ( depthTexture.type === UnsignedIntType ) {\n\n\t\t\t\t\t\tglInternalFormat = 33190;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\t_gl.framebufferRenderbuffer( 36160, 36096, 36161, renderbuffer );\n\n\t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, 35056, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, 34041, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\n\t\t\t_gl.framebufferRenderbuffer( 36160, 33306, 36161, renderbuffer );\n\n\t\t} else {\n\n\t\t\t// Use the first texture for MRT so far\n\t\t\tconst texture = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture[ 0 ] : renderTarget.texture;\n\n\t\t\tconst glFormat = utils.convert( texture.format );\n\t\t\tconst glType = utils.convert( texture.type );\n\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t}\n\n\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t}\n\n\t// Setup resources for a Depth Texture for a FBO (needs an extension)\n\tfunction setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\tconst isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget );\n\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\tstate.bindFramebuffer( 36160, framebuffer );\n\n\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t}\n\n\t\t// upload an empty depth texture with framebuffer size\n\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t}\n\n\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\tconst webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( 36160, 36096, 3553, webglDepthTexture, 0 );\n\n\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( 36160, 33306, 3553, webglDepthTexture, 0 );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t}\n\n\t}\n\n\t// Setup GL resources for a non-texture depth buffer\n\tfunction setupDepthRenderbuffer( renderTarget ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\n\t\tif ( renderTarget.depthTexture ) {\n\n\t\t\tif ( isCube ) throw new Error( 'target.depthTexture not supported in Cube render targets' );\n\n\t\t\tsetupDepthTexture( renderTargetProperties.__webglFramebuffer, renderTarget );\n\n\t\t} else {\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglDepthbuffer = [];\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tstate.bindFramebuffer( 36160, renderTargetProperties.__webglFramebuffer[ i ] );\n\t\t\t\t\trenderTargetProperties.__webglDepthbuffer[ i ] = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer[ i ], renderTarget, false );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindFramebuffer( 36160, renderTargetProperties.__webglFramebuffer );\n\t\t\t\trenderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer();\n\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer, renderTarget, false );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindFramebuffer( 36160, null );\n\n\t}\n\n\t// Set up GL resources for the render target\n\tfunction setupRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets !== true ) {\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tinfo.memory.textures ++;\n\n\t\t}\n\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\t\tconst isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );\n\t\tconst isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true );\n\t\tconst isRenderTarget3D = texture.isDataTexture3D || texture.isDataTexture2DArray;\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\t// Handles WebGL2 RGBFormat fallback - #18858\n\n\t\tif ( isWebGL2 && texture.format === RGBFormat && ( texture.type === FloatType || texture.type === HalfFloatType ) ) {\n\n\t\t\ttexture.format = RGBAFormat;\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.' );\n\n\t\t}\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tif ( capabilities.drawBuffers ) {\n\n\t\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst attachmentProperties = properties.get( textures[ i ] );\n\n\t\t\t\t\t\tif ( attachmentProperties.__webglTexture === undefined ) {\n\n\t\t\t\t\t\t\tattachmentProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.' );\n\n\t\t\t\t}\n\n\t\t\t} else if ( isMultisample ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer();\n\n\t\t\t\t\t_gl.bindRenderbuffer( 36161, renderTargetProperties.__webglColorRenderbuffer );\n\n\t\t\t\t\tconst glFormat = utils.convert( texture.format );\n\t\t\t\t\tconst glType = utils.convert( texture.type );\n\t\t\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\tstate.bindFramebuffer( 36160, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t_gl.framebufferRenderbuffer( 36160, 36064, 36161, renderTargetProperties.__webglColorRenderbuffer );\n\t\t\t\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.bindFramebuffer( 36160, null );\n\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( 34067, texture, supportsMips );\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, 36064, 34069 + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( 34067, texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( 34067, null );\n\n\t\t} else if ( isMultipleRenderTargets ) {\n\n\t\t\tconst textures = renderTarget.texture;\n\n\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachment = textures[ i ];\n\t\t\t\tconst attachmentProperties = properties.get( attachment );\n\n\t\t\t\tstate.bindTexture( 3553, attachmentProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( 3553, attachment, supportsMips );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, 36064 + i, 3553 );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( 3553, attachment, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( 3553, null );\n\n\t\t} else {\n\n\t\t\tlet glTextureType = 3553;\n\n\t\t\tif ( isRenderTarget3D ) {\n\n\t\t\t\t// Render targets containing layers, i.e: Texture 3D and 2d arrays\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\tconst isTexture3D = texture.isDataTexture3D;\n\t\t\t\t\tglTextureType = isTexture3D ? 32879 : 35866;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( glTextureType, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( glTextureType, texture, supportsMips );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, 36064, glTextureType );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( glTextureType, texture, renderTarget.width, renderTarget.height, renderTarget.depth );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( glTextureType, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}\n\n\tfunction updateRenderTargetMipmap( renderTarget ) {\n\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\tconst textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [ renderTarget.texture ];\n\n\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\tconst texture = textures[ i ];\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tconst target = renderTarget.isWebGLCubeRenderTarget ? 34067 : 3553;\n\t\t\t\tconst webglTexture = properties.get( texture ).__webglTexture;\n\n\t\t\t\tstate.bindTexture( target, webglTexture );\n\t\t\t\tgenerateMipmap( target, texture, renderTarget.width, renderTarget.height );\n\t\t\t\tstate.bindTexture( target, null );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction updateMultisampleRenderTarget( renderTarget ) {\n\n\t\tif ( renderTarget.isWebGLMultisampleRenderTarget ) {\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\tconst width = renderTarget.width;\n\t\t\t\tconst height = renderTarget.height;\n\t\t\t\tlet mask = 16384;\n\n\t\t\t\tif ( renderTarget.depthBuffer ) mask |= 256;\n\t\t\t\tif ( renderTarget.stencilBuffer ) mask |= 1024;\n\n\t\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\t\t\tstate.bindFramebuffer( 36008, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\tstate.bindFramebuffer( 36009, renderTargetProperties.__webglFramebuffer );\n\n\t\t\t\t_gl.blitFramebuffer( 0, 0, width, height, 0, 0, width, height, mask, 9728 );\n\n\t\t\t\tstate.bindFramebuffer( 36008, null );\n\t\t\t\tstate.bindFramebuffer( 36009, renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction getRenderTargetSamples( renderTarget ) {\n\n\t\treturn ( isWebGL2 && renderTarget.isWebGLMultisampleRenderTarget ) ?\n\t\t\tMath.min( maxSamples, renderTarget.samples ) : 0;\n\n\t}\n\n\tfunction updateVideoTexture( texture ) {\n\n\t\tconst frame = info.render.frame;\n\n\t\t// Check the last frame we updated the VideoTexture\n\n\t\tif ( _videoTextures.get( texture ) !== frame ) {\n\n\t\t\t_videoTextures.set( texture, frame );\n\t\t\ttexture.update();\n\n\t\t}\n\n\t}\n\n\t// backwards compatibility\n\n\tlet warnedTexture2D = false;\n\tlet warnedTextureCube = false;\n\n\tfunction safeSetTexture2D( texture, slot ) {\n\n\t\tif ( texture && texture.isWebGLRenderTarget ) {\n\n\t\t\tif ( warnedTexture2D === false ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLTextures.safeSetTexture2D: don\\'t use render targets as textures. Use their .texture property instead.' );\n\t\t\t\twarnedTexture2D = true;\n\n\t\t\t}\n\n\t\t\ttexture = texture.texture;\n\n\t\t}\n\n\t\tsetTexture2D( texture, slot );\n\n\t}\n\n\tfunction safeSetTextureCube( texture, slot ) {\n\n\t\tif ( texture && texture.isWebGLCubeRenderTarget ) {\n\n\t\t\tif ( warnedTextureCube === false ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLTextures.safeSetTextureCube: don\\'t use cube render targets as textures. Use their .texture property instead.' );\n\t\t\t\twarnedTextureCube = true;\n\n\t\t\t}\n\n\t\t\ttexture = texture.texture;\n\n\t\t}\n\n\n\t\tsetTextureCube( texture, slot );\n\n\t}\n\n\t//\n\n\tthis.allocateTextureUnit = allocateTextureUnit;\n\tthis.resetTextureUnits = resetTextureUnits;\n\n\tthis.setTexture2D = setTexture2D;\n\tthis.setTexture2DArray = setTexture2DArray;\n\tthis.setTexture3D = setTexture3D;\n\tthis.setTextureCube = setTextureCube;\n\tthis.setupRenderTarget = setupRenderTarget;\n\tthis.updateRenderTargetMipmap = updateRenderTargetMipmap;\n\tthis.updateMultisampleRenderTarget = updateMultisampleRenderTarget;\n\n\tthis.safeSetTexture2D = safeSetTexture2D;\n\tthis.safeSetTextureCube = safeSetTextureCube;\n\n}\n\nfunction WebGLUtils( gl, extensions, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tfunction convert( p ) {\n\n\t\tlet extension;\n\n\t\tif ( p === UnsignedByteType ) return 5121;\n\t\tif ( p === UnsignedShort4444Type ) return 32819;\n\t\tif ( p === UnsignedShort5551Type ) return 32820;\n\t\tif ( p === UnsignedShort565Type ) return 33635;\n\n\t\tif ( p === ByteType ) return 5120;\n\t\tif ( p === ShortType ) return 5122;\n\t\tif ( p === UnsignedShortType ) return 5123;\n\t\tif ( p === IntType ) return 5124;\n\t\tif ( p === UnsignedIntType ) return 5125;\n\t\tif ( p === FloatType ) return 5126;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\tif ( isWebGL2 ) return 5131;\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.HALF_FLOAT_OES;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return 6406;\n\t\tif ( p === RGBFormat ) return 6407;\n\t\tif ( p === RGBAFormat ) return 6408;\n\t\tif ( p === LuminanceFormat ) return 6409;\n\t\tif ( p === LuminanceAlphaFormat ) return 6410;\n\t\tif ( p === DepthFormat ) return 6402;\n\t\tif ( p === DepthStencilFormat ) return 34041;\n\t\tif ( p === RedFormat ) return 6403;\n\n\t\t// WebGL2 formats.\n\n\t\tif ( p === RedIntegerFormat ) return 36244;\n\t\tif ( p === RGFormat ) return 33319;\n\t\tif ( p === RGIntegerFormat ) return 33320;\n\t\tif ( p === RGBIntegerFormat ) return 36248;\n\t\tif ( p === RGBAIntegerFormat ) return 36249;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_ETC2_Format ) return extension.COMPRESSED_RGB8_ETC2;\n\t\t\t\tif ( p === RGBA_ETC2_EAC_Format ) return extension.COMPRESSED_RGBA8_ETC2_EAC;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format ||\n\t\t\tp === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format ||\n\t\t\tp === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format ||\n\t\t\tp === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format ||\n\t\t\tp === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_4x4_Format || p === SRGB8_ALPHA8_ASTC_5x4_Format || p === SRGB8_ALPHA8_ASTC_5x5_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_6x5_Format || p === SRGB8_ALPHA8_ASTC_6x6_Format || p === SRGB8_ALPHA8_ASTC_8x5_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_8x6_Format || p === SRGB8_ALPHA8_ASTC_8x8_Format || p === SRGB8_ALPHA8_ASTC_10x5_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_10x6_Format || p === SRGB8_ALPHA8_ASTC_10x8_Format || p === SRGB8_ALPHA8_ASTC_10x10_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_12x10_Format || p === SRGB8_ALPHA8_ASTC_12x12_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_astc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\t// TODO Complete?\n\n\t\t\t\treturn p;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGBA_BPTC_Format ) {\n\n\t\t\textension = extensions.get( 'EXT_texture_compression_bptc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\t// TODO Complete?\n\n\t\t\t\treturn p;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\tif ( isWebGL2 ) return 34042;\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn { convert: convert };\n\n}\n\nclass ArrayCamera extends PerspectiveCamera {\n\n\tconstructor( array = [] ) {\n\n\t\tsuper();\n\n\t\tthis.cameras = array;\n\n\t}\n\n}\n\nArrayCamera.prototype.isArrayCamera = true;\n\nclass Group extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'Group';\n\n\t}\n\n}\n\nGroup.prototype.isGroup = true;\n\nconst _moveEvent = { type: 'move' };\n\nclass WebXRController {\n\n\tconstructor() {\n\n\t\tthis._targetRay = null;\n\t\tthis._grip = null;\n\t\tthis._hand = null;\n\n\t}\n\n\tgetHandSpace() {\n\n\t\tif ( this._hand === null ) {\n\n\t\t\tthis._hand = new Group();\n\t\t\tthis._hand.matrixAutoUpdate = false;\n\t\t\tthis._hand.visible = false;\n\n\t\t\tthis._hand.joints = {};\n\t\t\tthis._hand.inputState = { pinching: false };\n\n\t\t}\n\n\t\treturn this._hand;\n\n\t}\n\n\tgetTargetRaySpace() {\n\n\t\tif ( this._targetRay === null ) {\n\n\t\t\tthis._targetRay = new Group();\n\t\t\tthis._targetRay.matrixAutoUpdate = false;\n\t\t\tthis._targetRay.visible = false;\n\t\t\tthis._targetRay.hasLinearVelocity = false;\n\t\t\tthis._targetRay.linearVelocity = new Vector3();\n\t\t\tthis._targetRay.hasAngularVelocity = false;\n\t\t\tthis._targetRay.angularVelocity = new Vector3();\n\n\t\t}\n\n\t\treturn this._targetRay;\n\n\t}\n\n\tgetGripSpace() {\n\n\t\tif ( this._grip === null ) {\n\n\t\t\tthis._grip = new Group();\n\t\t\tthis._grip.matrixAutoUpdate = false;\n\t\t\tthis._grip.visible = false;\n\t\t\tthis._grip.hasLinearVelocity = false;\n\t\t\tthis._grip.linearVelocity = new Vector3();\n\t\t\tthis._grip.hasAngularVelocity = false;\n\t\t\tthis._grip.angularVelocity = new Vector3();\n\n\t\t}\n\n\t\treturn this._grip;\n\n\t}\n\n\tdispatchEvent( event ) {\n\n\t\tif ( this._targetRay !== null ) {\n\n\t\t\tthis._targetRay.dispatchEvent( event );\n\n\t\t}\n\n\t\tif ( this._grip !== null ) {\n\n\t\t\tthis._grip.dispatchEvent( event );\n\n\t\t}\n\n\t\tif ( this._hand !== null ) {\n\n\t\t\tthis._hand.dispatchEvent( event );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tdisconnect( inputSource ) {\n\n\t\tthis.dispatchEvent( { type: 'disconnected', data: inputSource } );\n\n\t\tif ( this._targetRay !== null ) {\n\n\t\t\tthis._targetRay.visible = false;\n\n\t\t}\n\n\t\tif ( this._grip !== null ) {\n\n\t\t\tthis._grip.visible = false;\n\n\t\t}\n\n\t\tif ( this._hand !== null ) {\n\n\t\t\tthis._hand.visible = false;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tupdate( inputSource, frame, referenceSpace ) {\n\n\t\tlet inputPose = null;\n\t\tlet gripPose = null;\n\t\tlet handPose = null;\n\n\t\tconst targetRay = this._targetRay;\n\t\tconst grip = this._grip;\n\t\tconst hand = this._hand;\n\n\t\tif ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) {\n\n\t\t\tif ( targetRay !== null ) {\n\n\t\t\t\tinputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );\n\n\t\t\t\tif ( inputPose !== null ) {\n\n\t\t\t\t\ttargetRay.matrix.fromArray( inputPose.transform.matrix );\n\t\t\t\t\ttargetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );\n\n\t\t\t\t\tif ( inputPose.linearVelocity ) {\n\n\t\t\t\t\t\ttargetRay.hasLinearVelocity = true;\n\t\t\t\t\t\ttargetRay.linearVelocity.copy( inputPose.linearVelocity );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttargetRay.hasLinearVelocity = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( inputPose.angularVelocity ) {\n\n\t\t\t\t\t\ttargetRay.hasAngularVelocity = true;\n\t\t\t\t\t\ttargetRay.angularVelocity.copy( inputPose.angularVelocity );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttargetRay.hasAngularVelocity = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.dispatchEvent( _moveEvent );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( hand && inputSource.hand ) {\n\n\t\t\t\thandPose = true;\n\n\t\t\t\tfor ( const inputjoint of inputSource.hand.values() ) {\n\n\t\t\t\t\t// Update the joints groups with the XRJoint poses\n\t\t\t\t\tconst jointPose = frame.getJointPose( inputjoint, referenceSpace );\n\n\t\t\t\t\tif ( hand.joints[ inputjoint.jointName ] === undefined ) {\n\n\t\t\t\t\t\t// The transform of this joint will be updated with the joint pose on each frame\n\t\t\t\t\t\tconst joint = new Group();\n\t\t\t\t\t\tjoint.matrixAutoUpdate = false;\n\t\t\t\t\t\tjoint.visible = false;\n\t\t\t\t\t\thand.joints[ inputjoint.jointName ] = joint;\n\t\t\t\t\t\t// ??\n\t\t\t\t\t\thand.add( joint );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst joint = hand.joints[ inputjoint.jointName ];\n\n\t\t\t\t\tif ( jointPose !== null ) {\n\n\t\t\t\t\t\tjoint.matrix.fromArray( jointPose.transform.matrix );\n\t\t\t\t\t\tjoint.matrix.decompose( joint.position, joint.rotation, joint.scale );\n\t\t\t\t\t\tjoint.jointRadius = jointPose.radius;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tjoint.visible = jointPose !== null;\n\n\t\t\t\t}\n\n\t\t\t\t// Custom events\n\n\t\t\t\t// Check pinchz\n\t\t\t\tconst indexTip = hand.joints[ 'index-finger-tip' ];\n\t\t\t\tconst thumbTip = hand.joints[ 'thumb-tip' ];\n\t\t\t\tconst distance = indexTip.position.distanceTo( thumbTip.position );\n\n\t\t\t\tconst distanceToPinch = 0.02;\n\t\t\t\tconst threshold = 0.005;\n\n\t\t\t\tif ( hand.inputState.pinching && distance > distanceToPinch + threshold ) {\n\n\t\t\t\t\thand.inputState.pinching = false;\n\t\t\t\t\tthis.dispatchEvent( {\n\t\t\t\t\t\ttype: 'pinchend',\n\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\ttarget: this\n\t\t\t\t\t} );\n\n\t\t\t\t} else if ( ! hand.inputState.pinching && distance <= distanceToPinch - threshold ) {\n\n\t\t\t\t\thand.inputState.pinching = true;\n\t\t\t\t\tthis.dispatchEvent( {\n\t\t\t\t\t\ttype: 'pinchstart',\n\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\ttarget: this\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( grip !== null && inputSource.gripSpace ) {\n\n\t\t\t\t\tgripPose = frame.getPose( inputSource.gripSpace, referenceSpace );\n\n\t\t\t\t\tif ( gripPose !== null ) {\n\n\t\t\t\t\t\tgrip.matrix.fromArray( gripPose.transform.matrix );\n\t\t\t\t\t\tgrip.matrix.decompose( grip.position, grip.rotation, grip.scale );\n\n\t\t\t\t\t\tif ( gripPose.linearVelocity ) {\n\n\t\t\t\t\t\t\tgrip.hasLinearVelocity = true;\n\t\t\t\t\t\t\tgrip.linearVelocity.copy( gripPose.linearVelocity );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tgrip.hasLinearVelocity = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( gripPose.angularVelocity ) {\n\n\t\t\t\t\t\t\tgrip.hasAngularVelocity = true;\n\t\t\t\t\t\t\tgrip.angularVelocity.copy( gripPose.angularVelocity );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tgrip.hasAngularVelocity = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( targetRay !== null ) {\n\n\t\t\ttargetRay.visible = ( inputPose !== null );\n\n\t\t}\n\n\t\tif ( grip !== null ) {\n\n\t\t\tgrip.visible = ( gripPose !== null );\n\n\t\t}\n\n\t\tif ( hand !== null ) {\n\n\t\t\thand.visible = ( handPose !== null );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass WebXRManager extends EventDispatcher {\n\n\tconstructor( renderer, gl ) {\n\n\t\tsuper();\n\n\t\tconst scope = this;\n\t\tconst state = renderer.state;\n\n\t\tlet session = null;\n\t\tlet framebufferScaleFactor = 1.0;\n\n\t\tlet referenceSpace = null;\n\t\tlet referenceSpaceType = 'local-floor';\n\n\t\tlet pose = null;\n\t\tlet glBinding = null;\n\t\tlet glFramebuffer = null;\n\t\tlet glProjLayer = null;\n\n\t\tconst controllers = [];\n\t\tconst inputSourcesMap = new Map();\n\n\t\t//\n\n\t\tconst cameraL = new PerspectiveCamera();\n\t\tcameraL.layers.enable( 1 );\n\t\tcameraL.viewport = new Vector4();\n\n\t\tconst cameraR = new PerspectiveCamera();\n\t\tcameraR.layers.enable( 2 );\n\t\tcameraR.viewport = new Vector4();\n\n\t\tconst cameras = [ cameraL, cameraR ];\n\n\t\tconst cameraVR = new ArrayCamera();\n\t\tcameraVR.layers.enable( 1 );\n\t\tcameraVR.layers.enable( 2 );\n\n\t\tlet _currentDepthNear = null;\n\t\tlet _currentDepthFar = null;\n\n\t\t//\n\n\t\tthis.cameraAutoUpdate = true;\n\t\tthis.enabled = false;\n\n\t\tthis.isPresenting = false;\n\n\t\tthis.getController = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getTargetRaySpace();\n\n\t\t};\n\n\t\tthis.getControllerGrip = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getGripSpace();\n\n\t\t};\n\n\t\tthis.getHand = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getHandSpace();\n\n\t\t};\n\n\t\t//\n\n\t\tfunction onSessionEvent( event ) {\n\n\t\t\tconst controller = inputSourcesMap.get( event.inputSource );\n\n\t\t\tif ( controller ) {\n\n\t\t\t\tcontroller.dispatchEvent( { type: event.type, data: event.inputSource } );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onSessionEnd() {\n\n\t\t\tinputSourcesMap.forEach( function ( controller, inputSource ) {\n\n\t\t\t\tcontroller.disconnect( inputSource );\n\n\t\t\t} );\n\n\t\t\tinputSourcesMap.clear();\n\n\t\t\t_currentDepthNear = null;\n\t\t\t_currentDepthFar = null;\n\n\t\t\t// restore framebuffer/rendering state\n\n\t\t\tstate.bindXRFramebuffer( null );\n\t\t\trenderer.setRenderTarget( renderer.getRenderTarget() );\n\n\t\t\t//\n\n\t\t\tanimation.stop();\n\n\t\t\tscope.isPresenting = false;\n\n\t\t\tscope.dispatchEvent( { type: 'sessionend' } );\n\n\t\t}\n\n\t\tthis.setFramebufferScaleFactor = function ( value ) {\n\n\t\t\tframebufferScaleFactor = value;\n\n\t\t\tif ( scope.isPresenting === true ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebXRManager: Cannot change framebuffer scale while presenting.' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setReferenceSpaceType = function ( value ) {\n\n\t\t\treferenceSpaceType = value;\n\n\t\t\tif ( scope.isPresenting === true ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebXRManager: Cannot change reference space type while presenting.' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.getReferenceSpace = function () {\n\n\t\t\treturn referenceSpace;\n\n\t\t};\n\n\t\tthis.getSession = function () {\n\n\t\t\treturn session;\n\n\t\t};\n\n\t\tthis.setSession = async function ( value ) {\n\n\t\t\tsession = value;\n\n\t\t\tif ( session !== null ) {\n\n\t\t\t\tsession.addEventListener( 'select', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'selectstart', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'selectend', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeeze', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeezestart', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeezeend', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'end', onSessionEnd );\n\t\t\t\tsession.addEventListener( 'inputsourceschange', onInputSourcesChange );\n\n\t\t\t\tconst attributes = gl.getContextAttributes();\n\n\t\t\t\tif ( attributes.xrCompatible !== true ) {\n\n\t\t\t\t\tawait gl.makeXRCompatible();\n\n\t\t\t\t}\n\n\t\t\t\tif ( session.renderState.layers === undefined ) {\n\n\t\t\t\t\tconst layerInit = {\n\t\t\t\t\t\tantialias: attributes.antialias,\n\t\t\t\t\t\talpha: attributes.alpha,\n\t\t\t\t\t\tdepth: attributes.depth,\n\t\t\t\t\t\tstencil: attributes.stencil,\n\t\t\t\t\t\tframebufferScaleFactor: framebufferScaleFactor\n\t\t\t\t\t};\n\n\t\t\t\t\t// eslint-disable-next-line no-undef\n\t\t\t\t\tconst baseLayer = new XRWebGLLayer( session, gl, layerInit );\n\n\t\t\t\t\tsession.updateRenderState( { baseLayer: baseLayer } );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tlet depthFormat = 0;\n\n\t\t\t\t\tif ( attributes.depth ) {\n\n\t\t\t\t\t\tdepthFormat = attributes.stencil ? 34041 : 6402;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst projectionlayerInit = {\n\t\t\t\t\t\tcolorFormat: attributes.alpha ? 6408 : 6407,\n\t\t\t\t\t\tdepthFormat: depthFormat,\n\t\t\t\t\t\tscaleFactor: framebufferScaleFactor\n\t\t\t\t\t};\n\n\t\t\t\t\t// eslint-disable-next-line no-undef\n\t\t\t\t\tglBinding = new XRWebGLBinding( session, gl );\n\n\t\t\t\t\tglProjLayer = glBinding.createProjectionLayer( projectionlayerInit );\n\n\t\t\t\t\tglFramebuffer = gl.createFramebuffer();\n\n\t\t\t\t\tsession.updateRenderState( { layers: [ glProjLayer ] } );\n\n\t\t\t\t}\n\n\t\t\t\treferenceSpace = await session.requestReferenceSpace( referenceSpaceType );\n\n\t\t\t\tanimation.setContext( session );\n\t\t\t\tanimation.start();\n\n\t\t\t\tscope.isPresenting = true;\n\n\t\t\t\tscope.dispatchEvent( { type: 'sessionstart' } );\n\n\t\t\t}\n\n\t\t};\n\n\t\tfunction onInputSourcesChange( event ) {\n\n\t\t\tconst inputSources = session.inputSources;\n\n\t\t\t// Assign inputSources to available controllers\n\n\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\tinputSourcesMap.set( inputSources[ i ], controllers[ i ] );\n\n\t\t\t}\n\n\t\t\t// Notify disconnected\n\n\t\t\tfor ( let i = 0; i < event.removed.length; i ++ ) {\n\n\t\t\t\tconst inputSource = event.removed[ i ];\n\t\t\t\tconst controller = inputSourcesMap.get( inputSource );\n\n\t\t\t\tif ( controller ) {\n\n\t\t\t\t\tcontroller.dispatchEvent( { type: 'disconnected', data: inputSource } );\n\t\t\t\t\tinputSourcesMap.delete( inputSource );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Notify connected\n\n\t\t\tfor ( let i = 0; i < event.added.length; i ++ ) {\n\n\t\t\t\tconst inputSource = event.added[ i ];\n\t\t\t\tconst controller = inputSourcesMap.get( inputSource );\n\n\t\t\t\tif ( controller ) {\n\n\t\t\t\t\tcontroller.dispatchEvent( { type: 'connected', data: inputSource } );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tconst cameraLPos = new Vector3();\n\t\tconst cameraRPos = new Vector3();\n\n\t\t/**\n\t\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t\t * the cameras' projection and world matrices have already been set.\n\t\t * And that near and far planes are identical for both cameras.\n\t\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t\t */\n\t\tfunction setProjectionFromUnion( camera, cameraL, cameraR ) {\n\n\t\t\tcameraLPos.setFromMatrixPosition( cameraL.matrixWorld );\n\t\t\tcameraRPos.setFromMatrixPosition( cameraR.matrixWorld );\n\n\t\t\tconst ipd = cameraLPos.distanceTo( cameraRPos );\n\n\t\t\tconst projL = cameraL.projectionMatrix.elements;\n\t\t\tconst projR = cameraR.projectionMatrix.elements;\n\n\t\t\t// VR systems will have identical far and near planes, and\n\t\t\t// most likely identical top and bottom frustum extents.\n\t\t\t// Use the left camera for these values.\n\t\t\tconst near = projL[ 14 ] / ( projL[ 10 ] - 1 );\n\t\t\tconst far = projL[ 14 ] / ( projL[ 10 ] + 1 );\n\t\t\tconst topFov = ( projL[ 9 ] + 1 ) / projL[ 5 ];\n\t\t\tconst bottomFov = ( projL[ 9 ] - 1 ) / projL[ 5 ];\n\n\t\t\tconst leftFov = ( projL[ 8 ] - 1 ) / projL[ 0 ];\n\t\t\tconst rightFov = ( projR[ 8 ] + 1 ) / projR[ 0 ];\n\t\t\tconst left = near * leftFov;\n\t\t\tconst right = near * rightFov;\n\n\t\t\t// Calculate the new camera's position offset from the\n\t\t\t// left camera. xOffset should be roughly half `ipd`.\n\t\t\tconst zOffset = ipd / ( - leftFov + rightFov );\n\t\t\tconst xOffset = zOffset * - leftFov;\n\n\t\t\t// TODO: Better way to apply this offset?\n\t\t\tcameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.translateX( xOffset );\n\t\t\tcamera.translateZ( zOffset );\n\t\t\tcamera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.matrixWorldInverse.copy( camera.matrixWorld ).invert();\n\n\t\t\t// Find the union of the frustum values of the cameras and scale\n\t\t\t// the values so that the near plane's position does not change in world space,\n\t\t\t// although must now be relative to the new union camera.\n\t\t\tconst near2 = near + zOffset;\n\t\t\tconst far2 = far + zOffset;\n\t\t\tconst left2 = left - xOffset;\n\t\t\tconst right2 = right + ( ipd - xOffset );\n\t\t\tconst top2 = topFov * far / far2 * near2;\n\t\t\tconst bottom2 = bottomFov * far / far2 * near2;\n\n\t\t\tcamera.projectionMatrix.makePerspective( left2, right2, top2, bottom2, near2, far2 );\n\n\t\t}\n\n\t\tfunction updateCamera( camera, parent ) {\n\n\t\t\tif ( parent === null ) {\n\n\t\t\t\tcamera.matrixWorld.copy( camera.matrix );\n\n\t\t\t} else {\n\n\t\t\t\tcamera.matrixWorld.multiplyMatrices( parent.matrixWorld, camera.matrix );\n\n\t\t\t}\n\n\t\t\tcamera.matrixWorldInverse.copy( camera.matrixWorld ).invert();\n\n\t\t}\n\n\t\tthis.updateCamera = function ( camera ) {\n\n\t\t\tif ( session === null ) return;\n\n\t\t\tcameraVR.near = cameraR.near = cameraL.near = camera.near;\n\t\t\tcameraVR.far = cameraR.far = cameraL.far = camera.far;\n\n\t\t\tif ( _currentDepthNear !== cameraVR.near || _currentDepthFar !== cameraVR.far ) {\n\n\t\t\t\t// Note that the new renderState won't apply until the next frame. See #18320\n\n\t\t\t\tsession.updateRenderState( {\n\t\t\t\t\tdepthNear: cameraVR.near,\n\t\t\t\t\tdepthFar: cameraVR.far\n\t\t\t\t} );\n\n\t\t\t\t_currentDepthNear = cameraVR.near;\n\t\t\t\t_currentDepthFar = cameraVR.far;\n\n\t\t\t}\n\n\t\t\tconst parent = camera.parent;\n\t\t\tconst cameras = cameraVR.cameras;\n\n\t\t\tupdateCamera( cameraVR, parent );\n\n\t\t\tfor ( let i = 0; i < cameras.length; i ++ ) {\n\n\t\t\t\tupdateCamera( cameras[ i ], parent );\n\n\t\t\t}\n\n\t\t\tcameraVR.matrixWorld.decompose( cameraVR.position, cameraVR.quaternion, cameraVR.scale );\n\n\t\t\t// update user camera and its children\n\n\t\t\tcamera.position.copy( cameraVR.position );\n\t\t\tcamera.quaternion.copy( cameraVR.quaternion );\n\t\t\tcamera.scale.copy( cameraVR.scale );\n\t\t\tcamera.matrix.copy( cameraVR.matrix );\n\t\t\tcamera.matrixWorld.copy( cameraVR.matrixWorld );\n\n\t\t\tconst children = camera.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tchildren[ i ].updateMatrixWorld( true );\n\n\t\t\t}\n\n\t\t\t// update projection matrix for proper view frustum culling\n\n\t\t\tif ( cameras.length === 2 ) {\n\n\t\t\t\tsetProjectionFromUnion( cameraVR, cameraL, cameraR );\n\n\t\t\t} else {\n\n\t\t\t\t// assume single camera setup (AR)\n\n\t\t\t\tcameraVR.projectionMatrix.copy( cameraL.projectionMatrix );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.getCamera = function () {\n\n\t\t\treturn cameraVR;\n\n\t\t};\n\n\t\t// Animation Loop\n\n\t\tlet onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame( time, frame ) {\n\n\t\t\tpose = frame.getViewerPose( referenceSpace );\n\n\t\t\tif ( pose !== null ) {\n\n\t\t\t\tconst views = pose.views;\n\n\t\t\t\tconst baseLayer = session.renderState.baseLayer;\n\n\t\t\t\tif ( session.renderState.layers === undefined ) {\n\n\t\t\t\t\tstate.bindXRFramebuffer( baseLayer.framebuffer );\n\n\t\t\t\t}\n\n\t\t\t\tlet cameraVRNeedsUpdate = false;\n\n\t\t\t\t// check if it's necessary to rebuild cameraVR's camera list\n\n\t\t\t\tif ( views.length !== cameraVR.cameras.length ) {\n\n\t\t\t\t\tcameraVR.cameras.length = 0;\n\n\t\t\t\t\tcameraVRNeedsUpdate = true;\n\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0; i < views.length; i ++ ) {\n\n\t\t\t\t\tconst view = views[ i ];\n\n\t\t\t\t\tlet viewport = null;\n\n\t\t\t\t\tif ( session.renderState.layers === undefined ) {\n\n\t\t\t\t\t\tviewport = baseLayer.getViewport( view );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst glSubImage = glBinding.getViewSubImage( glProjLayer, view );\n\n\t\t\t\t\t\tstate.bindXRFramebuffer( glFramebuffer );\n\n\t\t\t\t\t\tgl.framebufferTexture2D( 36160, 36064, 3553, glSubImage.colorTexture, 0 );\n\n\t\t\t\t\t\tif ( glSubImage.depthStencilTexture !== undefined ) {\n\n\t\t\t\t\t\t\tgl.framebufferTexture2D( 36160, 36096, 3553, glSubImage.depthStencilTexture, 0 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tviewport = glSubImage.viewport;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst camera = cameras[ i ];\n\n\t\t\t\t\tcamera.matrix.fromArray( view.transform.matrix );\n\n\t\t\t\t\tcamera.projectionMatrix.fromArray( view.projectionMatrix );\n\n\t\t\t\t\tcamera.viewport.set( viewport.x, viewport.y, viewport.width, viewport.height );\n\n\t\t\t\t\tif ( i === 0 ) {\n\n\t\t\t\t\t\tcameraVR.matrix.copy( camera.matrix );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( cameraVRNeedsUpdate === true ) {\n\n\t\t\t\t\t\tcameraVR.cameras.push( camera );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tconst inputSources = session.inputSources;\n\n\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\tconst controller = controllers[ i ];\n\t\t\t\tconst inputSource = inputSources[ i ];\n\n\t\t\t\tcontroller.update( inputSource, frame, referenceSpace );\n\n\t\t\t}\n\n\t\t\tif ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame );\n\n\t\t}\n\n\t\tconst animation = new WebGLAnimation();\n\t\tanimation.setAnimationLoop( onAnimationFrame );\n\n\t\tthis.setAnimationLoop = function ( callback ) {\n\n\t\t\tonAnimationFrameCallback = callback;\n\n\t\t};\n\n\t\tthis.dispose = function () {};\n\n\t}\n\n}\n\nfunction WebGLMaterials( properties ) {\n\n\tfunction refreshFogUniforms( uniforms, fog ) {\n\n\t\tuniforms.fogColor.value.copy( fog.color );\n\n\t\tif ( fog.isFog ) {\n\n\t\t\tuniforms.fogNear.value = fog.near;\n\t\t\tuniforms.fogFar.value = fog.far;\n\n\t\t} else if ( fog.isFogExp2 ) {\n\n\t\t\tuniforms.fogDensity.value = fog.density;\n\n\t\t}\n\n\t}\n\n\tfunction refreshMaterialUniforms( uniforms, material, pixelRatio, height, transmissionRenderTarget ) {\n\n\t\tif ( material.isMeshBasicMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isMeshLambertMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsLambert( uniforms, material );\n\n\t\t} else if ( material.isMeshToonMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsToon( uniforms, material );\n\n\t\t} else if ( material.isMeshPhongMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsPhong( uniforms, material );\n\n\t\t} else if ( material.isMeshStandardMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t\tif ( material.isMeshPhysicalMaterial ) {\n\n\t\t\t\trefreshUniformsPhysical( uniforms, material, transmissionRenderTarget );\n\n\t\t\t} else {\n\n\t\t\t\trefreshUniformsStandard( uniforms, material );\n\n\t\t\t}\n\n\t\t} else if ( material.isMeshMatcapMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsMatcap( uniforms, material );\n\n\t\t} else if ( material.isMeshDepthMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsDepth( uniforms, material );\n\n\t\t} else if ( material.isMeshDistanceMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsDistance( uniforms, material );\n\n\t\t} else if ( material.isMeshNormalMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsNormal( uniforms, material );\n\n\t\t} else if ( material.isLineBasicMaterial ) {\n\n\t\t\trefreshUniformsLine( uniforms, material );\n\n\t\t\tif ( material.isLineDashedMaterial ) {\n\n\t\t\t\trefreshUniformsDash( uniforms, material );\n\n\t\t\t}\n\n\t\t} else if ( material.isPointsMaterial ) {\n\n\t\t\trefreshUniformsPoints( uniforms, material, pixelRatio, height );\n\n\t\t} else if ( material.isSpriteMaterial ) {\n\n\t\t\trefreshUniformsSprites( uniforms, material );\n\n\t\t} else if ( material.isShadowMaterial ) {\n\n\t\t\tuniforms.color.value.copy( material.color );\n\t\t\tuniforms.opacity.value = material.opacity;\n\n\t\t} else if ( material.isShaderMaterial ) {\n\n\t\t\tmaterial.uniformsNeedUpdate = false; // #15581\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsCommon( uniforms, material ) {\n\n\t\tuniforms.opacity.value = material.opacity;\n\n\t\tif ( material.color ) {\n\n\t\t\tuniforms.diffuse.value.copy( material.color );\n\n\t\t}\n\n\t\tif ( material.emissive ) {\n\n\t\t\tuniforms.emissive.value.copy( material.emissive ).multiplyScalar( material.emissiveIntensity );\n\n\t\t}\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t}\n\n\t\tif ( material.specularMap ) {\n\n\t\t\tuniforms.specularMap.value = material.specularMap;\n\n\t\t}\n\n\t\tconst envMap = properties.get( material ).envMap;\n\n\t\tif ( envMap ) {\n\n\t\t\tuniforms.envMap.value = envMap;\n\n\t\t\tuniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap._needsFlipEnvMap ) ? - 1 : 1;\n\n\t\t\tuniforms.reflectivity.value = material.reflectivity;\n\t\t\tuniforms.refractionRatio.value = material.refractionRatio;\n\n\t\t\tconst maxMipLevel = properties.get( envMap ).__maxMipLevel;\n\n\t\t\tif ( maxMipLevel !== undefined ) {\n\n\t\t\t\tuniforms.maxMipLevel.value = maxMipLevel;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.lightMap ) {\n\n\t\t\tuniforms.lightMap.value = material.lightMap;\n\t\t\tuniforms.lightMapIntensity.value = material.lightMapIntensity;\n\n\t\t}\n\n\t\tif ( material.aoMap ) {\n\n\t\t\tuniforms.aoMap.value = material.aoMap;\n\t\t\tuniforms.aoMapIntensity.value = material.aoMapIntensity;\n\n\t\t}\n\n\t\t// uv repeat and offset setting priorities\n\t\t// 1. color map\n\t\t// 2. specular map\n\t\t// 3. displacementMap map\n\t\t// 4. normal map\n\t\t// 5. bump map\n\t\t// 6. roughnessMap map\n\t\t// 7. metalnessMap map\n\t\t// 8. alphaMap map\n\t\t// 9. emissiveMap map\n\t\t// 10. clearcoat map\n\t\t// 11. clearcoat normal map\n\t\t// 12. clearcoat roughnessMap map\n\n\t\tlet uvScaleMap;\n\n\t\tif ( material.map ) {\n\n\t\t\tuvScaleMap = material.map;\n\n\t\t} else if ( material.specularMap ) {\n\n\t\t\tuvScaleMap = material.specularMap;\n\n\t\t} else if ( material.displacementMap ) {\n\n\t\t\tuvScaleMap = material.displacementMap;\n\n\t\t} else if ( material.normalMap ) {\n\n\t\t\tuvScaleMap = material.normalMap;\n\n\t\t} else if ( material.bumpMap ) {\n\n\t\t\tuvScaleMap = material.bumpMap;\n\n\t\t} else if ( material.roughnessMap ) {\n\n\t\t\tuvScaleMap = material.roughnessMap;\n\n\t\t} else if ( material.metalnessMap ) {\n\n\t\t\tuvScaleMap = material.metalnessMap;\n\n\t\t} else if ( material.alphaMap ) {\n\n\t\t\tuvScaleMap = material.alphaMap;\n\n\t\t} else if ( material.emissiveMap ) {\n\n\t\t\tuvScaleMap = material.emissiveMap;\n\n\t\t} else if ( material.clearcoatMap ) {\n\n\t\t\tuvScaleMap = material.clearcoatMap;\n\n\t\t} else if ( material.clearcoatNormalMap ) {\n\n\t\t\tuvScaleMap = material.clearcoatNormalMap;\n\n\t\t} else if ( material.clearcoatRoughnessMap ) {\n\n\t\t\tuvScaleMap = material.clearcoatRoughnessMap;\n\n\t\t}\n\n\t\tif ( uvScaleMap !== undefined ) {\n\n\t\t\t// backwards compatibility\n\t\t\tif ( uvScaleMap.isWebGLRenderTarget ) {\n\n\t\t\t\tuvScaleMap = uvScaleMap.texture;\n\n\t\t\t}\n\n\t\t\tif ( uvScaleMap.matrixAutoUpdate === true ) {\n\n\t\t\t\tuvScaleMap.updateMatrix();\n\n\t\t\t}\n\n\t\t\tuniforms.uvTransform.value.copy( uvScaleMap.matrix );\n\n\t\t}\n\n\t\t// uv repeat and offset setting priorities for uv2\n\t\t// 1. ao map\n\t\t// 2. light map\n\n\t\tlet uv2ScaleMap;\n\n\t\tif ( material.aoMap ) {\n\n\t\t\tuv2ScaleMap = material.aoMap;\n\n\t\t} else if ( material.lightMap ) {\n\n\t\t\tuv2ScaleMap = material.lightMap;\n\n\t\t}\n\n\t\tif ( uv2ScaleMap !== undefined ) {\n\n\t\t\t// backwards compatibility\n\t\t\tif ( uv2ScaleMap.isWebGLRenderTarget ) {\n\n\t\t\t\tuv2ScaleMap = uv2ScaleMap.texture;\n\n\t\t\t}\n\n\t\t\tif ( uv2ScaleMap.matrixAutoUpdate === true ) {\n\n\t\t\t\tuv2ScaleMap.updateMatrix();\n\n\t\t\t}\n\n\t\t\tuniforms.uv2Transform.value.copy( uv2ScaleMap.matrix );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsLine( uniforms, material ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\n\t}\n\n\tfunction refreshUniformsDash( uniforms, material ) {\n\n\t\tuniforms.dashSize.value = material.dashSize;\n\t\tuniforms.totalSize.value = material.dashSize + material.gapSize;\n\t\tuniforms.scale.value = material.scale;\n\n\t}\n\n\tfunction refreshUniformsPoints( uniforms, material, pixelRatio, height ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\t\tuniforms.size.value = material.size * pixelRatio;\n\t\tuniforms.scale.value = height * 0.5;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t}\n\n\t\t// uv repeat and offset setting priorities\n\t\t// 1. color map\n\t\t// 2. alpha map\n\n\t\tlet uvScaleMap;\n\n\t\tif ( material.map ) {\n\n\t\t\tuvScaleMap = material.map;\n\n\t\t} else if ( material.alphaMap ) {\n\n\t\t\tuvScaleMap = material.alphaMap;\n\n\t\t}\n\n\t\tif ( uvScaleMap !== undefined ) {\n\n\t\t\tif ( uvScaleMap.matrixAutoUpdate === true ) {\n\n\t\t\t\tuvScaleMap.updateMatrix();\n\n\t\t\t}\n\n\t\t\tuniforms.uvTransform.value.copy( uvScaleMap.matrix );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsSprites( uniforms, material ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\t\tuniforms.rotation.value = material.rotation;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t}\n\n\t\t// uv repeat and offset setting priorities\n\t\t// 1. color map\n\t\t// 2. alpha map\n\n\t\tlet uvScaleMap;\n\n\t\tif ( material.map ) {\n\n\t\t\tuvScaleMap = material.map;\n\n\t\t} else if ( material.alphaMap ) {\n\n\t\t\tuvScaleMap = material.alphaMap;\n\n\t\t}\n\n\t\tif ( uvScaleMap !== undefined ) {\n\n\t\t\tif ( uvScaleMap.matrixAutoUpdate === true ) {\n\n\t\t\t\tuvScaleMap.updateMatrix();\n\n\t\t\t}\n\n\t\t\tuniforms.uvTransform.value.copy( uvScaleMap.matrix );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsLambert( uniforms, material ) {\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsPhong( uniforms, material ) {\n\n\t\tuniforms.specular.value.copy( material.specular );\n\t\tuniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 )\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsToon( uniforms, material ) {\n\n\t\tif ( material.gradientMap ) {\n\n\t\t\tuniforms.gradientMap.value = material.gradientMap;\n\n\t\t}\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsStandard( uniforms, material ) {\n\n\t\tuniforms.roughness.value = material.roughness;\n\t\tuniforms.metalness.value = material.metalness;\n\n\t\tif ( material.roughnessMap ) {\n\n\t\t\tuniforms.roughnessMap.value = material.roughnessMap;\n\n\t\t}\n\n\t\tif ( material.metalnessMap ) {\n\n\t\t\tuniforms.metalnessMap.value = material.metalnessMap;\n\n\t\t}\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t\tconst envMap = properties.get( material ).envMap;\n\n\t\tif ( envMap ) {\n\n\t\t\t//uniforms.envMap.value = material.envMap; // part of uniforms common\n\t\t\tuniforms.envMapIntensity.value = material.envMapIntensity;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ) {\n\n\t\trefreshUniformsStandard( uniforms, material );\n\n\t\tuniforms.reflectivity.value = material.reflectivity; // also part of uniforms common\n\n\t\tuniforms.clearcoat.value = material.clearcoat;\n\t\tuniforms.clearcoatRoughness.value = material.clearcoatRoughness;\n\n\t\tif ( material.sheen ) uniforms.sheen.value.copy( material.sheen );\n\n\t\tif ( material.clearcoatMap ) {\n\n\t\t\tuniforms.clearcoatMap.value = material.clearcoatMap;\n\n\t\t}\n\n\t\tif ( material.clearcoatRoughnessMap ) {\n\n\t\t\tuniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap;\n\n\t\t}\n\n\t\tif ( material.clearcoatNormalMap ) {\n\n\t\t\tuniforms.clearcoatNormalScale.value.copy( material.clearcoatNormalScale );\n\t\t\tuniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;\n\n\t\t\tif ( material.side === BackSide ) {\n\n\t\t\t\tuniforms.clearcoatNormalScale.value.negate();\n\n\t\t\t}\n\n\t\t}\n\n\t\tuniforms.transmission.value = material.transmission;\n\n\t\tif ( material.transmissionMap ) {\n\n\t\t\tuniforms.transmissionMap.value = material.transmissionMap;\n\n\t\t}\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\tuniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture;\n\t\t\tuniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height );\n\n\t\t}\n\n\t\tuniforms.thickness.value = material.thickness;\n\n\t\tif ( material.thicknessMap ) {\n\n\t\t\tuniforms.thicknessMap.value = material.thicknessMap;\n\n\t\t}\n\n\t\tuniforms.attenuationDistance.value = material.attenuationDistance;\n\t\tuniforms.attenuationColor.value.copy( material.attenuationColor );\n\n\t}\n\n\tfunction refreshUniformsMatcap( uniforms, material ) {\n\n\t\tif ( material.matcap ) {\n\n\t\t\tuniforms.matcap.value = material.matcap;\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsDepth( uniforms, material ) {\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsDistance( uniforms, material ) {\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t\tuniforms.referencePosition.value.copy( material.referencePosition );\n\t\tuniforms.nearDistance.value = material.nearDistance;\n\t\tuniforms.farDistance.value = material.farDistance;\n\n\t}\n\n\tfunction refreshUniformsNormal( uniforms, material ) {\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\trefreshFogUniforms: refreshFogUniforms,\n\t\trefreshMaterialUniforms: refreshMaterialUniforms\n\t};\n\n}\n\nfunction createCanvasElement() {\n\n\tconst canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );\n\tcanvas.style.display = 'block';\n\treturn canvas;\n\n}\n\nfunction WebGLRenderer( parameters = {} ) {\n\n\tconst _canvas = parameters.canvas !== undefined ? parameters.canvas : createCanvasElement(),\n\t\t_context = parameters.context !== undefined ? parameters.context : null,\n\n\t\t_alpha = parameters.alpha !== undefined ? parameters.alpha : false,\n\t\t_depth = parameters.depth !== undefined ? parameters.depth : true,\n\t\t_stencil = parameters.stencil !== undefined ? parameters.stencil : true,\n\t\t_antialias = parameters.antialias !== undefined ? parameters.antialias : false,\n\t\t_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true,\n\t\t_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false,\n\t\t_powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default',\n\t\t_failIfMajorPerformanceCaveat = parameters.failIfMajorPerformanceCaveat !== undefined ? parameters.failIfMajorPerformanceCaveat : false;\n\n\tlet currentRenderList = null;\n\tlet currentRenderState = null;\n\n\t// render() can be called from within a callback triggered by another render.\n\t// We track this so that the nested render call gets its list and state isolated from the parent render call.\n\n\tconst renderListStack = [];\n\tconst renderStateStack = [];\n\n\t// public properties\n\n\tthis.domElement = _canvas;\n\n\t// Debug configuration container\n\tthis.debug = {\n\n\t\t/**\n\t\t * Enables error checking and reporting when shader programs are being compiled\n\t\t * @type {boolean}\n\t\t */\n\t\tcheckShaderErrors: true\n\t};\n\n\t// clearing\n\n\tthis.autoClear = true;\n\tthis.autoClearColor = true;\n\tthis.autoClearDepth = true;\n\tthis.autoClearStencil = true;\n\n\t// scene graph\n\n\tthis.sortObjects = true;\n\n\t// user-defined clipping\n\n\tthis.clippingPlanes = [];\n\tthis.localClippingEnabled = false;\n\n\t// physically based shading\n\n\tthis.gammaFactor = 2.0;\t// for backwards compatibility\n\tthis.outputEncoding = LinearEncoding;\n\n\t// physical lights\n\n\tthis.physicallyCorrectLights = false;\n\n\t// tone mapping\n\n\tthis.toneMapping = NoToneMapping;\n\tthis.toneMappingExposure = 1.0;\n\n\t// internal properties\n\n\tconst _this = this;\n\n\tlet _isContextLost = false;\n\n\t// internal state cache\n\n\tlet _currentActiveCubeFace = 0;\n\tlet _currentActiveMipmapLevel = 0;\n\tlet _currentRenderTarget = null;\n\tlet _currentMaterialId = - 1;\n\n\tlet _currentCamera = null;\n\n\tconst _currentViewport = new Vector4();\n\tconst _currentScissor = new Vector4();\n\tlet _currentScissorTest = null;\n\n\t//\n\n\tlet _width = _canvas.width;\n\tlet _height = _canvas.height;\n\n\tlet _pixelRatio = 1;\n\tlet _opaqueSort = null;\n\tlet _transparentSort = null;\n\n\tconst _viewport = new Vector4( 0, 0, _width, _height );\n\tconst _scissor = new Vector4( 0, 0, _width, _height );\n\tlet _scissorTest = false;\n\n\t//\n\n\tconst _currentDrawBuffers = [];\n\n\t// frustum\n\n\tconst _frustum = new Frustum();\n\n\t// clipping\n\n\tlet _clippingEnabled = false;\n\tlet _localClippingEnabled = false;\n\n\t// transmission\n\n\tlet _transmissionRenderTarget = null;\n\n\t// camera matrices cache\n\n\tconst _projScreenMatrix = new Matrix4();\n\n\tconst _vector3 = new Vector3();\n\n\tconst _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };\n\n\tfunction getTargetPixelRatio() {\n\n\t\treturn _currentRenderTarget === null ? _pixelRatio : 1;\n\n\t}\n\n\t// initialize\n\n\tlet _gl = _context;\n\n\tfunction getContext( contextNames, contextAttributes ) {\n\n\t\tfor ( let i = 0; i < contextNames.length; i ++ ) {\n\n\t\t\tconst contextName = contextNames[ i ];\n\t\t\tconst context = _canvas.getContext( contextName, contextAttributes );\n\t\t\tif ( context !== null ) return context;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\ttry {\n\n\t\tconst contextAttributes = {\n\t\t\talpha: _alpha,\n\t\t\tdepth: _depth,\n\t\t\tstencil: _stencil,\n\t\t\tantialias: _antialias,\n\t\t\tpremultipliedAlpha: _premultipliedAlpha,\n\t\t\tpreserveDrawingBuffer: _preserveDrawingBuffer,\n\t\t\tpowerPreference: _powerPreference,\n\t\t\tfailIfMajorPerformanceCaveat: _failIfMajorPerformanceCaveat\n\t\t};\n\n\t\t// event listeners must be registered before WebGL context is created, see #12753\n\n\t\t_canvas.addEventListener( 'webglcontextlost', onContextLost, false );\n\t\t_canvas.addEventListener( 'webglcontextrestored', onContextRestore, false );\n\n\t\tif ( _gl === null ) {\n\n\t\t\tconst contextNames = [ 'webgl2', 'webgl', 'experimental-webgl' ];\n\n\t\t\tif ( _this.isWebGL1Renderer === true ) {\n\n\t\t\t\tcontextNames.shift();\n\n\t\t\t}\n\n\t\t\t_gl = getContext( contextNames, contextAttributes );\n\n\t\t\tif ( _gl === null ) {\n\n\t\t\t\tif ( getContext( contextNames ) ) {\n\n\t\t\t\t\tthrow new Error( 'Error creating WebGL context with your selected attributes.' );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( 'Error creating WebGL context.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Some experimental-webgl implementations do not have getShaderPrecisionFormat\n\n\t\tif ( _gl.getShaderPrecisionFormat === undefined ) {\n\n\t\t\t_gl.getShaderPrecisionFormat = function () {\n\n\t\t\t\treturn { 'rangeMin': 1, 'rangeMax': 1, 'precision': 1 };\n\n\t\t\t};\n\n\t\t}\n\n\t} catch ( error ) {\n\n\t\tconsole.error( 'THREE.WebGLRenderer: ' + error.message );\n\t\tthrow error;\n\n\t}\n\n\tlet extensions, capabilities, state, info;\n\tlet properties, textures, cubemaps, attributes, geometries, objects;\n\tlet programCache, materials, renderLists, renderStates, clipping, shadowMap;\n\n\tlet background, morphtargets, bufferRenderer, indexedBufferRenderer;\n\n\tlet utils, bindingStates;\n\n\tfunction initGLContext() {\n\n\t\textensions = new WebGLExtensions( _gl );\n\n\t\tcapabilities = new WebGLCapabilities( _gl, extensions, parameters );\n\n\t\textensions.init( capabilities );\n\n\t\tutils = new WebGLUtils( _gl, extensions, capabilities );\n\n\t\tstate = new WebGLState( _gl, extensions, capabilities );\n\n\t\t_currentDrawBuffers[ 0 ] = 1029;\n\n\t\tinfo = new WebGLInfo( _gl );\n\t\tproperties = new WebGLProperties();\n\t\ttextures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );\n\t\tcubemaps = new WebGLCubeMaps( _this );\n\t\tattributes = new WebGLAttributes( _gl, capabilities );\n\t\tbindingStates = new WebGLBindingStates( _gl, extensions, attributes, capabilities );\n\t\tgeometries = new WebGLGeometries( _gl, attributes, info, bindingStates );\n\t\tobjects = new WebGLObjects( _gl, geometries, attributes, info );\n\t\tmorphtargets = new WebGLMorphtargets( _gl );\n\t\tclipping = new WebGLClipping( properties );\n\t\tprogramCache = new WebGLPrograms( _this, cubemaps, extensions, capabilities, bindingStates, clipping );\n\t\tmaterials = new WebGLMaterials( properties );\n\t\trenderLists = new WebGLRenderLists( properties );\n\t\trenderStates = new WebGLRenderStates( extensions, capabilities );\n\t\tbackground = new WebGLBackground( _this, cubemaps, state, objects, _premultipliedAlpha );\n\t\tshadowMap = new WebGLShadowMap( _this, objects, capabilities );\n\n\t\tbufferRenderer = new WebGLBufferRenderer( _gl, extensions, info, capabilities );\n\t\tindexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info, capabilities );\n\n\t\tinfo.programs = programCache.programs;\n\n\t\t_this.capabilities = capabilities;\n\t\t_this.extensions = extensions;\n\t\t_this.properties = properties;\n\t\t_this.renderLists = renderLists;\n\t\t_this.shadowMap = shadowMap;\n\t\t_this.state = state;\n\t\t_this.info = info;\n\n\t}\n\n\tinitGLContext();\n\n\t// xr\n\n\tconst xr = new WebXRManager( _this, _gl );\n\n\tthis.xr = xr;\n\n\t// API\n\n\tthis.getContext = function () {\n\n\t\treturn _gl;\n\n\t};\n\n\tthis.getContextAttributes = function () {\n\n\t\treturn _gl.getContextAttributes();\n\n\t};\n\n\tthis.forceContextLoss = function () {\n\n\t\tconst extension = extensions.get( 'WEBGL_lose_context' );\n\t\tif ( extension ) extension.loseContext();\n\n\t};\n\n\tthis.forceContextRestore = function () {\n\n\t\tconst extension = extensions.get( 'WEBGL_lose_context' );\n\t\tif ( extension ) extension.restoreContext();\n\n\t};\n\n\tthis.getPixelRatio = function () {\n\n\t\treturn _pixelRatio;\n\n\t};\n\n\tthis.setPixelRatio = function ( value ) {\n\n\t\tif ( value === undefined ) return;\n\n\t\t_pixelRatio = value;\n\n\t\tthis.setSize( _width, _height, false );\n\n\t};\n\n\tthis.getSize = function ( target ) {\n\n\t\treturn target.set( _width, _height );\n\n\t};\n\n\tthis.setSize = function ( width, height, updateStyle ) {\n\n\t\tif ( xr.isPresenting ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Can\\'t change size while VR device is presenting.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\t_width = width;\n\t\t_height = height;\n\n\t\t_canvas.width = Math.floor( width * _pixelRatio );\n\t\t_canvas.height = Math.floor( height * _pixelRatio );\n\n\t\tif ( updateStyle !== false ) {\n\n\t\t\t_canvas.style.width = width + 'px';\n\t\t\t_canvas.style.height = height + 'px';\n\n\t\t}\n\n\t\tthis.setViewport( 0, 0, width, height );\n\n\t};\n\n\tthis.getDrawingBufferSize = function ( target ) {\n\n\t\treturn target.set( _width * _pixelRatio, _height * _pixelRatio ).floor();\n\n\t};\n\n\tthis.setDrawingBufferSize = function ( width, height, pixelRatio ) {\n\n\t\t_width = width;\n\t\t_height = height;\n\n\t\t_pixelRatio = pixelRatio;\n\n\t\t_canvas.width = Math.floor( width * pixelRatio );\n\t\t_canvas.height = Math.floor( height * pixelRatio );\n\n\t\tthis.setViewport( 0, 0, width, height );\n\n\t};\n\n\tthis.getCurrentViewport = function ( target ) {\n\n\t\treturn target.copy( _currentViewport );\n\n\t};\n\n\tthis.getViewport = function ( target ) {\n\n\t\treturn target.copy( _viewport );\n\n\t};\n\n\tthis.setViewport = function ( x, y, width, height ) {\n\n\t\tif ( x.isVector4 ) {\n\n\t\t\t_viewport.set( x.x, x.y, x.z, x.w );\n\n\t\t} else {\n\n\t\t\t_viewport.set( x, y, width, height );\n\n\t\t}\n\n\t\tstate.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );\n\n\t};\n\n\tthis.getScissor = function ( target ) {\n\n\t\treturn target.copy( _scissor );\n\n\t};\n\n\tthis.setScissor = function ( x, y, width, height ) {\n\n\t\tif ( x.isVector4 ) {\n\n\t\t\t_scissor.set( x.x, x.y, x.z, x.w );\n\n\t\t} else {\n\n\t\t\t_scissor.set( x, y, width, height );\n\n\t\t}\n\n\t\tstate.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );\n\n\t};\n\n\tthis.getScissorTest = function () {\n\n\t\treturn _scissorTest;\n\n\t};\n\n\tthis.setScissorTest = function ( boolean ) {\n\n\t\tstate.setScissorTest( _scissorTest = boolean );\n\n\t};\n\n\tthis.setOpaqueSort = function ( method ) {\n\n\t\t_opaqueSort = method;\n\n\t};\n\n\tthis.setTransparentSort = function ( method ) {\n\n\t\t_transparentSort = method;\n\n\t};\n\n\t// Clearing\n\n\tthis.getClearColor = function ( target ) {\n\n\t\treturn target.copy( background.getClearColor() );\n\n\t};\n\n\tthis.setClearColor = function () {\n\n\t\tbackground.setClearColor.apply( background, arguments );\n\n\t};\n\n\tthis.getClearAlpha = function () {\n\n\t\treturn background.getClearAlpha();\n\n\t};\n\n\tthis.setClearAlpha = function () {\n\n\t\tbackground.setClearAlpha.apply( background, arguments );\n\n\t};\n\n\tthis.clear = function ( color, depth, stencil ) {\n\n\t\tlet bits = 0;\n\n\t\tif ( color === undefined || color ) bits |= 16384;\n\t\tif ( depth === undefined || depth ) bits |= 256;\n\t\tif ( stencil === undefined || stencil ) bits |= 1024;\n\n\t\t_gl.clear( bits );\n\n\t};\n\n\tthis.clearColor = function () {\n\n\t\tthis.clear( true, false, false );\n\n\t};\n\n\tthis.clearDepth = function () {\n\n\t\tthis.clear( false, true, false );\n\n\t};\n\n\tthis.clearStencil = function () {\n\n\t\tthis.clear( false, false, true );\n\n\t};\n\n\t//\n\n\tthis.dispose = function () {\n\n\t\t_canvas.removeEventListener( 'webglcontextlost', onContextLost, false );\n\t\t_canvas.removeEventListener( 'webglcontextrestored', onContextRestore, false );\n\n\t\trenderLists.dispose();\n\t\trenderStates.dispose();\n\t\tproperties.dispose();\n\t\tcubemaps.dispose();\n\t\tobjects.dispose();\n\t\tbindingStates.dispose();\n\n\t\txr.dispose();\n\n\t\txr.removeEventListener( 'sessionstart', onXRSessionStart );\n\t\txr.removeEventListener( 'sessionend', onXRSessionEnd );\n\n\t\tif ( _transmissionRenderTarget ) {\n\n\t\t\t_transmissionRenderTarget.dispose();\n\t\t\t_transmissionRenderTarget = null;\n\n\t\t}\n\n\t\tanimation.stop();\n\n\t};\n\n\t// Events\n\n\tfunction onContextLost( event ) {\n\n\t\tevent.preventDefault();\n\n\t\tconsole.log( 'THREE.WebGLRenderer: Context Lost.' );\n\n\t\t_isContextLost = true;\n\n\t}\n\n\tfunction onContextRestore( /* event */ ) {\n\n\t\tconsole.log( 'THREE.WebGLRenderer: Context Restored.' );\n\n\t\t_isContextLost = false;\n\n\t\tconst infoAutoReset = info.autoReset;\n\t\tconst shadowMapEnabled = shadowMap.enabled;\n\t\tconst shadowMapAutoUpdate = shadowMap.autoUpdate;\n\t\tconst shadowMapNeedsUpdate = shadowMap.needsUpdate;\n\t\tconst shadowMapType = shadowMap.type;\n\n\t\tinitGLContext();\n\n\t\tinfo.autoReset = infoAutoReset;\n\t\tshadowMap.enabled = shadowMapEnabled;\n\t\tshadowMap.autoUpdate = shadowMapAutoUpdate;\n\t\tshadowMap.needsUpdate = shadowMapNeedsUpdate;\n\t\tshadowMap.type = shadowMapType;\n\n\t}\n\n\tfunction onMaterialDispose( event ) {\n\n\t\tconst material = event.target;\n\n\t\tmaterial.removeEventListener( 'dispose', onMaterialDispose );\n\n\t\tdeallocateMaterial( material );\n\n\t}\n\n\t// Buffer deallocation\n\n\tfunction deallocateMaterial( material ) {\n\n\t\treleaseMaterialProgramReferences( material );\n\n\t\tproperties.remove( material );\n\n\t}\n\n\n\tfunction releaseMaterialProgramReferences( material ) {\n\n\t\tconst programs = properties.get( material ).programs;\n\n\t\tif ( programs !== undefined ) {\n\n\t\t\tprograms.forEach( function ( program ) {\n\n\t\t\t\tprogramCache.releaseProgram( program );\n\n\t\t\t} );\n\n\t\t}\n\n\t}\n\n\t// Buffer rendering\n\n\tfunction renderObjectImmediate( object, program ) {\n\n\t\tobject.render( function ( object ) {\n\n\t\t\t_this.renderBufferImmediate( object, program );\n\n\t\t} );\n\n\t}\n\n\tthis.renderBufferImmediate = function ( object, program ) {\n\n\t\tbindingStates.initAttributes();\n\n\t\tconst buffers = properties.get( object );\n\n\t\tif ( object.hasPositions && ! buffers.position ) buffers.position = _gl.createBuffer();\n\t\tif ( object.hasNormals && ! buffers.normal ) buffers.normal = _gl.createBuffer();\n\t\tif ( object.hasUvs && ! buffers.uv ) buffers.uv = _gl.createBuffer();\n\t\tif ( object.hasColors && ! buffers.color ) buffers.color = _gl.createBuffer();\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tif ( object.hasPositions ) {\n\n\t\t\t_gl.bindBuffer( 34962, buffers.position );\n\t\t\t_gl.bufferData( 34962, object.positionArray, 35048 );\n\n\t\t\tbindingStates.enableAttribute( programAttributes.position );\n\t\t\t_gl.vertexAttribPointer( programAttributes.position, 3, 5126, false, 0, 0 );\n\n\t\t}\n\n\t\tif ( object.hasNormals ) {\n\n\t\t\t_gl.bindBuffer( 34962, buffers.normal );\n\t\t\t_gl.bufferData( 34962, object.normalArray, 35048 );\n\n\t\t\tbindingStates.enableAttribute( programAttributes.normal );\n\t\t\t_gl.vertexAttribPointer( programAttributes.normal, 3, 5126, false, 0, 0 );\n\n\t\t}\n\n\t\tif ( object.hasUvs ) {\n\n\t\t\t_gl.bindBuffer( 34962, buffers.uv );\n\t\t\t_gl.bufferData( 34962, object.uvArray, 35048 );\n\n\t\t\tbindingStates.enableAttribute( programAttributes.uv );\n\t\t\t_gl.vertexAttribPointer( programAttributes.uv, 2, 5126, false, 0, 0 );\n\n\t\t}\n\n\t\tif ( object.hasColors ) {\n\n\t\t\t_gl.bindBuffer( 34962, buffers.color );\n\t\t\t_gl.bufferData( 34962, object.colorArray, 35048 );\n\n\t\t\tbindingStates.enableAttribute( programAttributes.color );\n\t\t\t_gl.vertexAttribPointer( programAttributes.color, 3, 5126, false, 0, 0 );\n\n\t\t}\n\n\t\tbindingStates.disableUnusedAttributes();\n\n\t\t_gl.drawArrays( 4, 0, object.count );\n\n\t\tobject.count = 0;\n\n\t};\n\n\tthis.renderBufferDirect = function ( camera, scene, geometry, material, object, group ) {\n\n\t\tif ( scene === null ) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null)\n\n\t\tconst frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 );\n\n\t\tconst program = setProgram( camera, scene, material, object );\n\n\t\tstate.setMaterial( material, frontFaceCW );\n\n\t\t//\n\n\t\tlet index = geometry.index;\n\t\tconst position = geometry.attributes.position;\n\n\t\t//\n\n\t\tif ( index === null ) {\n\n\t\t\tif ( position === undefined || position.count === 0 ) return;\n\n\t\t} else if ( index.count === 0 ) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t//\n\n\t\tlet rangeFactor = 1;\n\n\t\tif ( material.wireframe === true ) {\n\n\t\t\tindex = geometries.getWireframeAttribute( geometry );\n\t\t\trangeFactor = 2;\n\n\t\t}\n\n\t\tif ( material.morphTargets || material.morphNormals ) {\n\n\t\t\tmorphtargets.update( object, geometry, material, program );\n\n\t\t}\n\n\t\tbindingStates.setup( object, material, program, geometry, index );\n\n\t\tlet attribute;\n\t\tlet renderer = bufferRenderer;\n\n\t\tif ( index !== null ) {\n\n\t\t\tattribute = attributes.get( index );\n\n\t\t\trenderer = indexedBufferRenderer;\n\t\t\trenderer.setIndex( attribute );\n\n\t\t}\n\n\t\t//\n\n\t\tconst dataCount = ( index !== null ) ? index.count : position.count;\n\n\t\tconst rangeStart = geometry.drawRange.start * rangeFactor;\n\t\tconst rangeCount = geometry.drawRange.count * rangeFactor;\n\n\t\tconst groupStart = group !== null ? group.start * rangeFactor : 0;\n\t\tconst groupCount = group !== null ? group.count * rangeFactor : Infinity;\n\n\t\tconst drawStart = Math.max( rangeStart, groupStart );\n\t\tconst drawEnd = Math.min( dataCount, rangeStart + rangeCount, groupStart + groupCount ) - 1;\n\n\t\tconst drawCount = Math.max( 0, drawEnd - drawStart + 1 );\n\n\t\tif ( drawCount === 0 ) return;\n\n\t\t//\n\n\t\tif ( object.isMesh ) {\n\n\t\t\tif ( material.wireframe === true ) {\n\n\t\t\t\tstate.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() );\n\t\t\t\trenderer.setMode( 1 );\n\n\t\t\t} else {\n\n\t\t\t\trenderer.setMode( 4 );\n\n\t\t\t}\n\n\t\t} else if ( object.isLine ) {\n\n\t\t\tlet lineWidth = material.linewidth;\n\n\t\t\tif ( lineWidth === undefined ) lineWidth = 1; // Not using Line*Material\n\n\t\t\tstate.setLineWidth( lineWidth * getTargetPixelRatio() );\n\n\t\t\tif ( object.isLineSegments ) {\n\n\t\t\t\trenderer.setMode( 1 );\n\n\t\t\t} else if ( object.isLineLoop ) {\n\n\t\t\t\trenderer.setMode( 2 );\n\n\t\t\t} else {\n\n\t\t\t\trenderer.setMode( 3 );\n\n\t\t\t}\n\n\t\t} else if ( object.isPoints ) {\n\n\t\t\trenderer.setMode( 0 );\n\n\t\t} else if ( object.isSprite ) {\n\n\t\t\trenderer.setMode( 4 );\n\n\t\t}\n\n\t\tif ( object.isInstancedMesh ) {\n\n\t\t\trenderer.renderInstances( drawStart, drawCount, object.count );\n\n\t\t} else if ( geometry.isInstancedBufferGeometry ) {\n\n\t\t\tconst instanceCount = Math.min( geometry.instanceCount, geometry._maxInstanceCount );\n\n\t\t\trenderer.renderInstances( drawStart, drawCount, instanceCount );\n\n\t\t} else {\n\n\t\t\trenderer.render( drawStart, drawCount );\n\n\t\t}\n\n\t};\n\n\t// Compile\n\n\tthis.compile = function ( scene, camera ) {\n\n\t\tcurrentRenderState = renderStates.get( scene );\n\t\tcurrentRenderState.init();\n\n\t\tscene.traverseVisible( function ( object ) {\n\n\t\t\tif ( object.isLight && object.layers.test( camera.layers ) ) {\n\n\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t\tcurrentRenderState.setupLights();\n\n\t\tscene.traverse( function ( object ) {\n\n\t\t\tconst material = object.material;\n\n\t\t\tif ( material ) {\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tfor ( let i = 0; i < material.length; i ++ ) {\n\n\t\t\t\t\t\tconst material2 = material[ i ];\n\n\t\t\t\t\t\tgetProgram( material2, scene, object );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tgetProgram( material, scene, object );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t};\n\n\t// Animation Loop\n\n\tlet onAnimationFrameCallback = null;\n\n\tfunction onAnimationFrame( time ) {\n\n\t\tif ( onAnimationFrameCallback ) onAnimationFrameCallback( time );\n\n\t}\n\n\tfunction onXRSessionStart() {\n\n\t\tanimation.stop();\n\n\t}\n\n\tfunction onXRSessionEnd() {\n\n\t\tanimation.start();\n\n\t}\n\n\tconst animation = new WebGLAnimation();\n\tanimation.setAnimationLoop( onAnimationFrame );\n\n\tif ( typeof window !== 'undefined' ) animation.setContext( window );\n\n\tthis.setAnimationLoop = function ( callback ) {\n\n\t\tonAnimationFrameCallback = callback;\n\t\txr.setAnimationLoop( callback );\n\n\t\t( callback === null ) ? animation.stop() : animation.start();\n\n\t};\n\n\txr.addEventListener( 'sessionstart', onXRSessionStart );\n\txr.addEventListener( 'sessionend', onXRSessionEnd );\n\n\t// Rendering\n\n\tthis.render = function ( scene, camera ) {\n\n\t\tif ( camera !== undefined && camera.isCamera !== true ) {\n\n\t\t\tconsole.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( _isContextLost === true ) return;\n\n\t\t// update scene graph\n\n\t\tif ( scene.autoUpdate === true ) scene.updateMatrixWorld();\n\n\t\t// update camera matrices and frustum\n\n\t\tif ( camera.parent === null ) camera.updateMatrixWorld();\n\n\t\tif ( xr.enabled === true && xr.isPresenting === true ) {\n\n\t\t\tif ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );\n\n\t\t\tcamera = xr.getCamera(); // use XR camera for rendering\n\n\t\t}\n\n\t\t//\n\t\tif ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, _currentRenderTarget );\n\n\t\tcurrentRenderState = renderStates.get( scene, renderStateStack.length );\n\t\tcurrentRenderState.init();\n\n\t\trenderStateStack.push( currentRenderState );\n\n\t\t_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );\n\t\t_frustum.setFromProjectionMatrix( _projScreenMatrix );\n\n\t\t_localClippingEnabled = this.localClippingEnabled;\n\t\t_clippingEnabled = clipping.init( this.clippingPlanes, _localClippingEnabled, camera );\n\n\t\tcurrentRenderList = renderLists.get( scene, renderListStack.length );\n\t\tcurrentRenderList.init();\n\n\t\trenderListStack.push( currentRenderList );\n\n\t\tprojectObject( scene, camera, 0, _this.sortObjects );\n\n\t\tcurrentRenderList.finish();\n\n\t\tif ( _this.sortObjects === true ) {\n\n\t\t\tcurrentRenderList.sort( _opaqueSort, _transparentSort );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( _clippingEnabled === true ) clipping.beginShadows();\n\n\t\tconst shadowsArray = currentRenderState.state.shadowsArray;\n\n\t\tshadowMap.render( shadowsArray, scene, camera );\n\n\t\tcurrentRenderState.setupLights();\n\t\tcurrentRenderState.setupLightsView( camera );\n\n\t\tif ( _clippingEnabled === true ) clipping.endShadows();\n\n\t\t//\n\n\t\tif ( this.info.autoReset === true ) this.info.reset();\n\n\t\t//\n\n\t\tbackground.render( currentRenderList, scene );\n\n\t\t// render scene\n\n\t\tconst opaqueObjects = currentRenderList.opaque;\n\t\tconst transmissiveObjects = currentRenderList.transmissive;\n\t\tconst transparentObjects = currentRenderList.transparent;\n\n\t\tif ( opaqueObjects.length > 0 ) renderObjects( opaqueObjects, scene, camera );\n\t\tif ( transmissiveObjects.length > 0 ) renderTransmissiveObjects( opaqueObjects, transmissiveObjects, scene, camera );\n\t\tif ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera );\n\n\t\t//\n\n\t\tif ( _currentRenderTarget !== null ) {\n\n\t\t\t// resolve multisample renderbuffers to a single-sample texture if necessary\n\n\t\t\ttextures.updateMultisampleRenderTarget( _currentRenderTarget );\n\n\t\t\t// Generate mipmap if we're using any kind of mipmap filtering\n\n\t\t\ttextures.updateRenderTargetMipmap( _currentRenderTarget );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera );\n\n\t\t// Ensure depth buffer writing is enabled so it can be cleared on next render\n\n\t\tstate.buffers.depth.setTest( true );\n\t\tstate.buffers.depth.setMask( true );\n\t\tstate.buffers.color.setMask( true );\n\n\t\tstate.setPolygonOffset( false );\n\n\t\t// _gl.finish();\n\n\t\tbindingStates.resetDefaultState();\n\t\t_currentMaterialId = - 1;\n\t\t_currentCamera = null;\n\n\t\trenderStateStack.pop();\n\n\t\tif ( renderStateStack.length > 0 ) {\n\n\t\t\tcurrentRenderState = renderStateStack[ renderStateStack.length - 1 ];\n\n\t\t} else {\n\n\t\t\tcurrentRenderState = null;\n\n\t\t}\n\n\t\trenderListStack.pop();\n\n\t\tif ( renderListStack.length > 0 ) {\n\n\t\t\tcurrentRenderList = renderListStack[ renderListStack.length - 1 ];\n\n\t\t} else {\n\n\t\t\tcurrentRenderList = null;\n\n\t\t}\n\n\t};\n\n\tfunction projectObject( object, camera, groupOrder, sortObjects ) {\n\n\t\tif ( object.visible === false ) return;\n\n\t\tconst visible = object.layers.test( camera.layers );\n\n\t\tif ( visible ) {\n\n\t\t\tif ( object.isGroup ) {\n\n\t\t\t\tgroupOrder = object.renderOrder;\n\n\t\t\t} else if ( object.isLOD ) {\n\n\t\t\t\tif ( object.autoUpdate === true ) object.update( camera );\n\n\t\t\t} else if ( object.isLight ) {\n\n\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t}\n\n\t\t\t} else if ( object.isSprite ) {\n\n\t\t\t\tif ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) {\n\n\t\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t\t_vector3.setFromMatrixPosition( object.matrixWorld )\n\t\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst geometry = objects.update( object );\n\t\t\t\t\tconst material = object.material;\n\n\t\t\t\t\tif ( material.visible ) {\n\n\t\t\t\t\t\tcurrentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( object.isImmediateRenderObject ) {\n\n\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t_vector3.setFromMatrixPosition( object.matrixWorld )\n\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t}\n\n\t\t\t\tcurrentRenderList.push( object, null, object.material, groupOrder, _vector3.z, null );\n\n\t\t\t} else if ( object.isMesh || object.isLine || object.isPoints ) {\n\n\t\t\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\t\t\t// update skeleton only once in a frame\n\n\t\t\t\t\tif ( object.skeleton.frame !== info.render.frame ) {\n\n\t\t\t\t\t\tobject.skeleton.update();\n\t\t\t\t\t\tobject.skeleton.frame = info.render.frame;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) {\n\n\t\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t\t_vector3.setFromMatrixPosition( object.matrixWorld )\n\t\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst geometry = objects.update( object );\n\t\t\t\t\tconst material = object.material;\n\n\t\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\t\tconst groups = geometry.groups;\n\n\t\t\t\t\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\t\tif ( groupMaterial && groupMaterial.visible ) {\n\n\t\t\t\t\t\t\t\tcurrentRenderList.push( object, geometry, groupMaterial, groupOrder, _vector3.z, group );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ( material.visible ) {\n\n\t\t\t\t\t\tcurrentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tprojectObject( children[ i ], camera, groupOrder, sortObjects );\n\n\t\t}\n\n\t}\n\n\tfunction renderTransmissiveObjects( opaqueObjects, transmissiveObjects, scene, camera ) {\n\n\t\tif ( _transmissionRenderTarget === null ) {\n\n\t\t\tconst needsAntialias = _antialias === true && capabilities.isWebGL2 === true;\n\t\t\tconst renderTargetType = needsAntialias ? WebGLMultisampleRenderTarget : WebGLRenderTarget;\n\n\t\t\t_transmissionRenderTarget = new renderTargetType( 1024, 1024, {\n\t\t\t\tgenerateMipmaps: true,\n\t\t\t\ttype: utils.convert( HalfFloatType ) !== null ? HalfFloatType : UnsignedByteType,\n\t\t\t\tminFilter: LinearMipmapLinearFilter,\n\t\t\t\tmagFilter: NearestFilter,\n\t\t\t\twrapS: ClampToEdgeWrapping,\n\t\t\t\twrapT: ClampToEdgeWrapping\n\t\t\t} );\n\n\t\t}\n\n\t\tconst currentRenderTarget = _this.getRenderTarget();\n\t\t_this.setRenderTarget( _transmissionRenderTarget );\n\t\t_this.clear();\n\n\t\t// Turn off the features which can affect the frag color for opaque objects pass.\n\t\t// Otherwise they are applied twice in opaque objects pass and transmission objects pass.\n\t\tconst currentToneMapping = _this.toneMapping;\n\t\t_this.toneMapping = NoToneMapping;\n\n\t\trenderObjects( opaqueObjects, scene, camera );\n\n\t\t_this.toneMapping = currentToneMapping;\n\n\t\ttextures.updateMultisampleRenderTarget( _transmissionRenderTarget );\n\t\ttextures.updateRenderTargetMipmap( _transmissionRenderTarget );\n\n\t\t_this.setRenderTarget( currentRenderTarget );\n\n\t\trenderObjects( transmissiveObjects, scene, camera );\n\n\t}\n\n\tfunction renderObjects( renderList, scene, camera ) {\n\n\t\tconst overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n\n\t\tfor ( let i = 0, l = renderList.length; i < l; i ++ ) {\n\n\t\t\tconst renderItem = renderList[ i ];\n\n\t\t\tconst object = renderItem.object;\n\t\t\tconst geometry = renderItem.geometry;\n\t\t\tconst material = overrideMaterial === null ? renderItem.material : overrideMaterial;\n\t\t\tconst group = renderItem.group;\n\n\t\t\tif ( camera.isArrayCamera ) {\n\n\t\t\t\tconst cameras = camera.cameras;\n\n\t\t\t\tfor ( let j = 0, jl = cameras.length; j < jl; j ++ ) {\n\n\t\t\t\t\tconst camera2 = cameras[ j ];\n\n\t\t\t\t\tif ( object.layers.test( camera2.layers ) ) {\n\n\t\t\t\t\t\tstate.viewport( _currentViewport.copy( camera2.viewport ) );\n\n\t\t\t\t\t\tcurrentRenderState.setupLightsView( camera2 );\n\n\t\t\t\t\t\trenderObject( object, scene, camera2, geometry, material, group );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderObject( object, scene, camera, geometry, material, group );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction renderObject( object, scene, camera, geometry, material, group ) {\n\n\t\tobject.onBeforeRender( _this, scene, camera, geometry, material, group );\n\n\t\tobject.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );\n\t\tobject.normalMatrix.getNormalMatrix( object.modelViewMatrix );\n\n\t\tif ( object.isImmediateRenderObject ) {\n\n\t\t\tconst program = setProgram( camera, scene, material, object );\n\n\t\t\tstate.setMaterial( material );\n\n\t\t\tbindingStates.reset();\n\n\t\t\trenderObjectImmediate( object, program );\n\n\t\t} else {\n\n\t\t\tif ( material.transparent === true && material.side === DoubleSide ) {\n\n\t\t\t\tmaterial.side = BackSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t\tmaterial.side = FrontSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t\tmaterial.side = DoubleSide;\n\n\t\t\t} else {\n\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t}\n\n\t\t}\n\n\t\tobject.onAfterRender( _this, scene, camera, geometry, material, group );\n\n\t}\n\n\tfunction getProgram( material, scene, object ) {\n\n\t\tif ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\tconst materialProperties = properties.get( material );\n\n\t\tconst lights = currentRenderState.state.lights;\n\t\tconst shadowsArray = currentRenderState.state.shadowsArray;\n\n\t\tconst lightsStateVersion = lights.state.version;\n\n\t\tconst parameters = programCache.getParameters( material, lights.state, shadowsArray, scene, object );\n\t\tconst programCacheKey = programCache.getProgramCacheKey( parameters );\n\n\t\tlet programs = materialProperties.programs;\n\n\t\t// always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change\n\n\t\tmaterialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\tmaterialProperties.fog = scene.fog;\n\t\tmaterialProperties.envMap = cubemaps.get( material.envMap || materialProperties.environment );\n\n\t\tif ( programs === undefined ) {\n\n\t\t\t// new material\n\n\t\t\tmaterial.addEventListener( 'dispose', onMaterialDispose );\n\n\t\t\tprograms = new Map();\n\t\t\tmaterialProperties.programs = programs;\n\n\t\t}\n\n\t\tlet program = programs.get( programCacheKey );\n\n\t\tif ( program !== undefined ) {\n\n\t\t\t// early out if program and light state is identical\n\n\t\t\tif ( materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion ) {\n\n\t\t\t\tupdateCommonMaterialProperties( material, parameters );\n\n\t\t\t\treturn program;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tparameters.uniforms = programCache.getUniforms( material );\n\n\t\t\tmaterial.onBuild( parameters, _this );\n\n\t\t\tmaterial.onBeforeCompile( parameters, _this );\n\n\t\t\tprogram = programCache.acquireProgram( parameters, programCacheKey );\n\t\t\tprograms.set( programCacheKey, program );\n\n\t\t\tmaterialProperties.uniforms = parameters.uniforms;\n\n\t\t}\n\n\t\tconst uniforms = materialProperties.uniforms;\n\n\t\tif ( ( ! material.isShaderMaterial && ! material.isRawShaderMaterial ) || material.clipping === true ) {\n\n\t\t\tuniforms.clippingPlanes = clipping.uniform;\n\n\t\t}\n\n\t\tupdateCommonMaterialProperties( material, parameters );\n\n\t\t// store the light setup it was created for\n\n\t\tmaterialProperties.needsLights = materialNeedsLights( material );\n\t\tmaterialProperties.lightsStateVersion = lightsStateVersion;\n\n\t\tif ( materialProperties.needsLights ) {\n\n\t\t\t// wire up the material to this renderer's lighting state\n\n\t\t\tuniforms.ambientLightColor.value = lights.state.ambient;\n\t\t\tuniforms.lightProbe.value = lights.state.probe;\n\t\t\tuniforms.directionalLights.value = lights.state.directional;\n\t\t\tuniforms.directionalLightShadows.value = lights.state.directionalShadow;\n\t\t\tuniforms.spotLights.value = lights.state.spot;\n\t\t\tuniforms.spotLightShadows.value = lights.state.spotShadow;\n\t\t\tuniforms.rectAreaLights.value = lights.state.rectArea;\n\t\t\tuniforms.ltc_1.value = lights.state.rectAreaLTC1;\n\t\t\tuniforms.ltc_2.value = lights.state.rectAreaLTC2;\n\t\t\tuniforms.pointLights.value = lights.state.point;\n\t\t\tuniforms.pointLightShadows.value = lights.state.pointShadow;\n\t\t\tuniforms.hemisphereLights.value = lights.state.hemi;\n\n\t\t\tuniforms.directionalShadowMap.value = lights.state.directionalShadowMap;\n\t\t\tuniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;\n\t\t\tuniforms.spotShadowMap.value = lights.state.spotShadowMap;\n\t\t\tuniforms.spotShadowMatrix.value = lights.state.spotShadowMatrix;\n\t\t\tuniforms.pointShadowMap.value = lights.state.pointShadowMap;\n\t\t\tuniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix;\n\t\t\t// TODO (abelnation): add area lights shadow info to uniforms\n\n\t\t}\n\n\t\tconst progUniforms = program.getUniforms();\n\t\tconst uniformsList = WebGLUniforms.seqWithValue( progUniforms.seq, uniforms );\n\n\t\tmaterialProperties.currentProgram = program;\n\t\tmaterialProperties.uniformsList = uniformsList;\n\n\t\treturn program;\n\n\t}\n\n\tfunction updateCommonMaterialProperties( material, parameters ) {\n\n\t\tconst materialProperties = properties.get( material );\n\n\t\tmaterialProperties.outputEncoding = parameters.outputEncoding;\n\t\tmaterialProperties.instancing = parameters.instancing;\n\t\tmaterialProperties.skinning = parameters.skinning;\n\t\tmaterialProperties.numClippingPlanes = parameters.numClippingPlanes;\n\t\tmaterialProperties.numIntersection = parameters.numClipIntersection;\n\t\tmaterialProperties.vertexAlphas = parameters.vertexAlphas;\n\n\t}\n\n\tfunction setProgram( camera, scene, material, object ) {\n\n\t\tif ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\ttextures.resetTextureUnits();\n\n\t\tconst fog = scene.fog;\n\t\tconst environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\tconst encoding = ( _currentRenderTarget === null ) ? _this.outputEncoding : _currentRenderTarget.texture.encoding;\n\t\tconst envMap = cubemaps.get( material.envMap || environment );\n\t\tconst vertexAlphas = material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4;\n\n\t\tconst materialProperties = properties.get( material );\n\t\tconst lights = currentRenderState.state.lights;\n\n\t\tif ( _clippingEnabled === true ) {\n\n\t\t\tif ( _localClippingEnabled === true || camera !== _currentCamera ) {\n\n\t\t\t\tconst useCache =\n\t\t\t\t\tcamera === _currentCamera &&\n\t\t\t\t\tmaterial.id === _currentMaterialId;\n\n\t\t\t\t// we might want to call this function with some ClippingGroup\n\t\t\t\t// object instead of the material, once it becomes feasible\n\t\t\t\t// (#8465, #8379)\n\t\t\t\tclipping.setState( material, camera, useCache );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tlet needsProgramChange = false;\n\n\t\tif ( material.version === materialProperties.__version ) {\n\n\t\t\tif ( materialProperties.needsLights && ( materialProperties.lightsStateVersion !== lights.state.version ) ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( materialProperties.outputEncoding !== encoding ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( object.isInstancedMesh && materialProperties.instancing === false ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( ! object.isInstancedMesh && materialProperties.instancing === true ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( object.isSkinnedMesh && materialProperties.skinning === false ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( ! object.isSkinnedMesh && materialProperties.skinning === true ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( materialProperties.envMap !== envMap ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( material.fog && materialProperties.fog !== fog ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( materialProperties.numClippingPlanes !== undefined &&\n\t\t\t\t( materialProperties.numClippingPlanes !== clipping.numPlanes ||\n\t\t\t\tmaterialProperties.numIntersection !== clipping.numIntersection ) ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( materialProperties.vertexAlphas !== vertexAlphas ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tneedsProgramChange = true;\n\t\t\tmaterialProperties.__version = material.version;\n\n\t\t}\n\n\t\t//\n\n\t\tlet program = materialProperties.currentProgram;\n\n\t\tif ( needsProgramChange === true ) {\n\n\t\t\tprogram = getProgram( material, scene, object );\n\n\t\t}\n\n\t\tlet refreshProgram = false;\n\t\tlet refreshMaterial = false;\n\t\tlet refreshLights = false;\n\n\t\tconst p_uniforms = program.getUniforms(),\n\t\t\tm_uniforms = materialProperties.uniforms;\n\n\t\tif ( state.useProgram( program.program ) ) {\n\n\t\t\trefreshProgram = true;\n\t\t\trefreshMaterial = true;\n\t\t\trefreshLights = true;\n\n\t\t}\n\n\t\tif ( material.id !== _currentMaterialId ) {\n\n\t\t\t_currentMaterialId = material.id;\n\n\t\t\trefreshMaterial = true;\n\n\t\t}\n\n\t\tif ( refreshProgram || _currentCamera !== camera ) {\n\n\t\t\tp_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix );\n\n\t\t\tif ( capabilities.logarithmicDepthBuffer ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'logDepthBufFC',\n\t\t\t\t\t2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) );\n\n\t\t\t}\n\n\t\t\tif ( _currentCamera !== camera ) {\n\n\t\t\t\t_currentCamera = camera;\n\n\t\t\t\t// lighting uniforms depend on the camera so enforce an update\n\t\t\t\t// now, in case this material supports lights - or later, when\n\t\t\t\t// the next material that does gets activated:\n\n\t\t\t\trefreshMaterial = true;\t\t// set to true on material change\n\t\t\t\trefreshLights = true;\t\t// remains set until update done\n\n\t\t\t}\n\n\t\t\t// load material specific uniforms\n\t\t\t// (shader material also gets them for the sake of genericity)\n\n\t\t\tif ( material.isShaderMaterial ||\n\t\t\t\tmaterial.isMeshPhongMaterial ||\n\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\tmaterial.envMap ) {\n\n\t\t\t\tconst uCamPos = p_uniforms.map.cameraPosition;\n\n\t\t\t\tif ( uCamPos !== undefined ) {\n\n\t\t\t\t\tuCamPos.setValue( _gl,\n\t\t\t\t\t\t_vector3.setFromMatrixPosition( camera.matrixWorld ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( material.isMeshPhongMaterial ||\n\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\tmaterial.isMeshLambertMaterial ||\n\t\t\t\tmaterial.isMeshBasicMaterial ||\n\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\tmaterial.isShaderMaterial ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'isOrthographic', camera.isOrthographicCamera === true );\n\n\t\t\t}\n\n\t\t\tif ( material.isMeshPhongMaterial ||\n\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\tmaterial.isMeshLambertMaterial ||\n\t\t\t\tmaterial.isMeshBasicMaterial ||\n\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\tmaterial.isShaderMaterial ||\n\t\t\t\tmaterial.isShadowMaterial ||\n\t\t\t\tobject.isSkinnedMesh ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// skinning uniforms must be set even if material didn't change\n\t\t// auto-setting of texture unit for bone texture must go before other textures\n\t\t// otherwise textures used for skinning can take over texture units reserved for other material textures\n\n\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\tp_uniforms.setOptional( _gl, object, 'bindMatrix' );\n\t\t\tp_uniforms.setOptional( _gl, object, 'bindMatrixInverse' );\n\n\t\t\tconst skeleton = object.skeleton;\n\n\t\t\tif ( skeleton ) {\n\n\t\t\t\tif ( capabilities.floatVertexTextures ) {\n\n\t\t\t\t\tif ( skeleton.boneTexture === null ) skeleton.computeBoneTexture();\n\n\t\t\t\t\tp_uniforms.setValue( _gl, 'boneTexture', skeleton.boneTexture, textures );\n\t\t\t\t\tp_uniforms.setValue( _gl, 'boneTextureSize', skeleton.boneTextureSize );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tp_uniforms.setOptional( _gl, skeleton, 'boneMatrices' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow ) {\n\n\t\t\tmaterialProperties.receiveShadow = object.receiveShadow;\n\t\t\tp_uniforms.setValue( _gl, 'receiveShadow', object.receiveShadow );\n\n\t\t}\n\n\t\tif ( refreshMaterial ) {\n\n\t\t\tp_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );\n\n\t\t\tif ( materialProperties.needsLights ) {\n\n\t\t\t\t// the current material requires lighting info\n\n\t\t\t\t// note: all lighting uniforms are always set correctly\n\t\t\t\t// they simply reference the renderer's state for their\n\t\t\t\t// values\n\t\t\t\t//\n\t\t\t\t// use the current material's .needsUpdate flags to set\n\t\t\t\t// the GL state when required\n\n\t\t\t\tmarkUniformsLightsNeedsUpdate( m_uniforms, refreshLights );\n\n\t\t\t}\n\n\t\t\t// refresh uniforms common to several materials\n\n\t\t\tif ( fog && material.fog ) {\n\n\t\t\t\tmaterials.refreshFogUniforms( m_uniforms, fog );\n\n\t\t\t}\n\n\t\t\tmaterials.refreshMaterialUniforms( m_uniforms, material, _pixelRatio, _height, _transmissionRenderTarget );\n\n\t\t\tWebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures );\n\n\t\t}\n\n\t\tif ( material.isShaderMaterial && material.uniformsNeedUpdate === true ) {\n\n\t\t\tWebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures );\n\t\t\tmaterial.uniformsNeedUpdate = false;\n\n\t\t}\n\n\t\tif ( material.isSpriteMaterial ) {\n\n\t\t\tp_uniforms.setValue( _gl, 'center', object.center );\n\n\t\t}\n\n\t\t// common matrices\n\n\t\tp_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix );\n\t\tp_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix );\n\t\tp_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld );\n\n\t\treturn program;\n\n\t}\n\n\t// If uniforms are marked as clean, they don't need to be loaded to the GPU.\n\n\tfunction markUniformsLightsNeedsUpdate( uniforms, value ) {\n\n\t\tuniforms.ambientLightColor.needsUpdate = value;\n\t\tuniforms.lightProbe.needsUpdate = value;\n\n\t\tuniforms.directionalLights.needsUpdate = value;\n\t\tuniforms.directionalLightShadows.needsUpdate = value;\n\t\tuniforms.pointLights.needsUpdate = value;\n\t\tuniforms.pointLightShadows.needsUpdate = value;\n\t\tuniforms.spotLights.needsUpdate = value;\n\t\tuniforms.spotLightShadows.needsUpdate = value;\n\t\tuniforms.rectAreaLights.needsUpdate = value;\n\t\tuniforms.hemisphereLights.needsUpdate = value;\n\n\t}\n\n\tfunction materialNeedsLights( material ) {\n\n\t\treturn material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial ||\n\t\t\tmaterial.isMeshStandardMaterial || material.isShadowMaterial ||\n\t\t\t( material.isShaderMaterial && material.lights === true );\n\n\t}\n\n\tthis.getActiveCubeFace = function () {\n\n\t\treturn _currentActiveCubeFace;\n\n\t};\n\n\tthis.getActiveMipmapLevel = function () {\n\n\t\treturn _currentActiveMipmapLevel;\n\n\t};\n\n\tthis.getRenderTarget = function () {\n\n\t\treturn _currentRenderTarget;\n\n\t};\n\n\tthis.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) {\n\n\t\t_currentRenderTarget = renderTarget;\n\t\t_currentActiveCubeFace = activeCubeFace;\n\t\t_currentActiveMipmapLevel = activeMipmapLevel;\n\n\t\tif ( renderTarget && properties.get( renderTarget ).__webglFramebuffer === undefined ) {\n\n\t\t\ttextures.setupRenderTarget( renderTarget );\n\n\t\t}\n\n\t\tlet framebuffer = null;\n\t\tlet isCube = false;\n\t\tlet isRenderTarget3D = false;\n\n\t\tif ( renderTarget ) {\n\n\t\t\tconst texture = renderTarget.texture;\n\n\t\t\tif ( texture.isDataTexture3D || texture.isDataTexture2DArray ) {\n\n\t\t\t\tisRenderTarget3D = true;\n\n\t\t\t}\n\n\t\t\tconst __webglFramebuffer = properties.get( renderTarget ).__webglFramebuffer;\n\n\t\t\tif ( renderTarget.isWebGLCubeRenderTarget ) {\n\n\t\t\t\tframebuffer = __webglFramebuffer[ activeCubeFace ];\n\t\t\t\tisCube = true;\n\n\t\t\t} else if ( renderTarget.isWebGLMultisampleRenderTarget ) {\n\n\t\t\t\tframebuffer = properties.get( renderTarget ).__webglMultisampledFramebuffer;\n\n\t\t\t} else {\n\n\t\t\t\tframebuffer = __webglFramebuffer;\n\n\t\t\t}\n\n\t\t\t_currentViewport.copy( renderTarget.viewport );\n\t\t\t_currentScissor.copy( renderTarget.scissor );\n\t\t\t_currentScissorTest = renderTarget.scissorTest;\n\n\t\t} else {\n\n\t\t\t_currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor();\n\t\t\t_currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor();\n\t\t\t_currentScissorTest = _scissorTest;\n\n\t\t}\n\n\t\tconst framebufferBound = state.bindFramebuffer( 36160, framebuffer );\n\n\t\tif ( framebufferBound && capabilities.drawBuffers ) {\n\n\t\t\tlet needsUpdate = false;\n\n\t\t\tif ( renderTarget ) {\n\n\t\t\t\tif ( renderTarget.isWebGLMultipleRenderTargets ) {\n\n\t\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\t\tif ( _currentDrawBuffers.length !== textures.length || _currentDrawBuffers[ 0 ] !== 36064 ) {\n\n\t\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\t\t_currentDrawBuffers[ i ] = 36064 + i;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_currentDrawBuffers.length = textures.length;\n\n\t\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( _currentDrawBuffers.length !== 1 || _currentDrawBuffers[ 0 ] !== 36064 ) {\n\n\t\t\t\t\t\t_currentDrawBuffers[ 0 ] = 36064;\n\t\t\t\t\t\t_currentDrawBuffers.length = 1;\n\n\t\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( _currentDrawBuffers.length !== 1 || _currentDrawBuffers[ 0 ] !== 1029 ) {\n\n\t\t\t\t\t_currentDrawBuffers[ 0 ] = 1029;\n\t\t\t\t\t_currentDrawBuffers.length = 1;\n\n\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( needsUpdate ) {\n\n\t\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t\t_gl.drawBuffers( _currentDrawBuffers );\n\n\t\t\t\t} else {\n\n\t\t\t\t\textensions.get( 'WEBGL_draw_buffers' ).drawBuffersWEBGL( _currentDrawBuffers );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.viewport( _currentViewport );\n\t\tstate.scissor( _currentScissor );\n\t\tstate.setScissorTest( _currentScissorTest );\n\n\t\tif ( isCube ) {\n\n\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\t\t\t_gl.framebufferTexture2D( 36160, 36064, 34069 + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel );\n\n\t\t} else if ( isRenderTarget3D ) {\n\n\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\t\t\tconst layer = activeCubeFace || 0;\n\t\t\t_gl.framebufferTextureLayer( 36160, 36064, textureProperties.__webglTexture, activeMipmapLevel || 0, layer );\n\n\t\t}\n\n\t};\n\n\tthis.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer, activeCubeFaceIndex ) {\n\n\t\tif ( ! ( renderTarget && renderTarget.isWebGLRenderTarget ) ) {\n\n\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tlet framebuffer = properties.get( renderTarget ).__webglFramebuffer;\n\n\t\tif ( renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined ) {\n\n\t\t\tframebuffer = framebuffer[ activeCubeFaceIndex ];\n\n\t\t}\n\n\t\tif ( framebuffer ) {\n\n\t\t\tstate.bindFramebuffer( 36160, framebuffer );\n\n\t\t\ttry {\n\n\t\t\t\tconst texture = renderTarget.texture;\n\t\t\t\tconst textureFormat = texture.format;\n\t\t\t\tconst textureType = texture.type;\n\n\t\t\t\tif ( textureFormat !== RGBAFormat && utils.convert( textureFormat ) !== _gl.getParameter( 35739 ) ) {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tconst halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.has( 'EXT_color_buffer_float' ) ) );\n\n\t\t\t\tif ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( 35738 ) && // Edge and Chrome Mac < 52 (#9513)\n\t\t\t\t\t! ( textureType === FloatType && ( capabilities.isWebGL2 || extensions.has( 'OES_texture_float' ) || extensions.has( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox\n\t\t\t\t\t! halfFloatSupportedByExt ) {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tif ( _gl.checkFramebufferStatus( 36160 ) === 36053 ) {\n\n\t\t\t\t\t// the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)\n\n\t\t\t\t\tif ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {\n\n\t\t\t\t\t\t_gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.' );\n\n\t\t\t\t}\n\n\t\t\t} finally {\n\n\t\t\t\t// restore framebuffer of current render target if necessary\n\n\t\t\t\tconst framebuffer = ( _currentRenderTarget !== null ) ? properties.get( _currentRenderTarget ).__webglFramebuffer : null;\n\t\t\t\tstate.bindFramebuffer( 36160, framebuffer );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\tthis.copyFramebufferToTexture = function ( position, texture, level = 0 ) {\n\n\t\tconst levelScale = Math.pow( 2, - level );\n\t\tconst width = Math.floor( texture.image.width * levelScale );\n\t\tconst height = Math.floor( texture.image.height * levelScale );\n\n\t\tlet glFormat = utils.convert( texture.format );\n\n\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t// Workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=1120100\n\t\t\t// Not needed in Chrome 93+\n\n\t\t\tif ( glFormat === 6407 ) glFormat = 32849;\n\t\t\tif ( glFormat === 6408 ) glFormat = 32856;\n\n\t\t}\n\n\t\ttextures.setTexture2D( texture, 0 );\n\n\t\t_gl.copyTexImage2D( 3553, level, glFormat, position.x, position.y, width, height, 0 );\n\n\t\tstate.unbindTexture();\n\n\t};\n\n\tthis.copyTextureToTexture = function ( position, srcTexture, dstTexture, level = 0 ) {\n\n\t\tconst width = srcTexture.image.width;\n\t\tconst height = srcTexture.image.height;\n\t\tconst glFormat = utils.convert( dstTexture.format );\n\t\tconst glType = utils.convert( dstTexture.type );\n\n\t\ttextures.setTexture2D( dstTexture, 0 );\n\n\t\t// As another texture upload may have changed pixelStorei\n\t\t// parameters, make sure they are correct for the dstTexture\n\t\t_gl.pixelStorei( 37440, dstTexture.flipY );\n\t\t_gl.pixelStorei( 37441, dstTexture.premultiplyAlpha );\n\t\t_gl.pixelStorei( 3317, dstTexture.unpackAlignment );\n\n\t\tif ( srcTexture.isDataTexture ) {\n\n\t\t\t_gl.texSubImage2D( 3553, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data );\n\n\t\t} else {\n\n\t\t\tif ( srcTexture.isCompressedTexture ) {\n\n\t\t\t\t_gl.compressedTexSubImage2D( 3553, level, position.x, position.y, srcTexture.mipmaps[ 0 ].width, srcTexture.mipmaps[ 0 ].height, glFormat, srcTexture.mipmaps[ 0 ].data );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.texSubImage2D( 3553, level, position.x, position.y, glFormat, glType, srcTexture.image );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Generate mipmaps only when copying level 0\n\t\tif ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( 3553 );\n\n\t\tstate.unbindTexture();\n\n\t};\n\n\tthis.copyTextureToTexture3D = function ( sourceBox, position, srcTexture, dstTexture, level = 0 ) {\n\n\t\tif ( _this.isWebGL1Renderer ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst width = sourceBox.max.x - sourceBox.min.x + 1;\n\t\tconst height = sourceBox.max.y - sourceBox.min.y + 1;\n\t\tconst depth = sourceBox.max.z - sourceBox.min.z + 1;\n\t\tconst glFormat = utils.convert( dstTexture.format );\n\t\tconst glType = utils.convert( dstTexture.type );\n\t\tlet glTarget;\n\n\t\tif ( dstTexture.isDataTexture3D ) {\n\n\t\t\ttextures.setTexture3D( dstTexture, 0 );\n\t\t\tglTarget = 32879;\n\n\t\t} else if ( dstTexture.isDataTexture2DArray ) {\n\n\t\t\ttextures.setTexture2DArray( dstTexture, 0 );\n\t\t\tglTarget = 35866;\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\t_gl.pixelStorei( 37440, dstTexture.flipY );\n\t\t_gl.pixelStorei( 37441, dstTexture.premultiplyAlpha );\n\t\t_gl.pixelStorei( 3317, dstTexture.unpackAlignment );\n\n\t\tconst unpackRowLen = _gl.getParameter( 3314 );\n\t\tconst unpackImageHeight = _gl.getParameter( 32878 );\n\t\tconst unpackSkipPixels = _gl.getParameter( 3316 );\n\t\tconst unpackSkipRows = _gl.getParameter( 3315 );\n\t\tconst unpackSkipImages = _gl.getParameter( 32877 );\n\n\t\tconst image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[ 0 ] : srcTexture.image;\n\n\t\t_gl.pixelStorei( 3314, image.width );\n\t\t_gl.pixelStorei( 32878, image.height );\n\t\t_gl.pixelStorei( 3316, sourceBox.min.x );\n\t\t_gl.pixelStorei( 3315, sourceBox.min.y );\n\t\t_gl.pixelStorei( 32877, sourceBox.min.z );\n\n\t\tif ( srcTexture.isDataTexture || srcTexture.isDataTexture3D ) {\n\n\t\t\t_gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data );\n\n\t\t} else {\n\n\t\t\tif ( srcTexture.isCompressedTexture ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.' );\n\t\t\t\t_gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image );\n\n\t\t\t}\n\n\t\t}\n\n\t\t_gl.pixelStorei( 3314, unpackRowLen );\n\t\t_gl.pixelStorei( 32878, unpackImageHeight );\n\t\t_gl.pixelStorei( 3316, unpackSkipPixels );\n\t\t_gl.pixelStorei( 3315, unpackSkipRows );\n\t\t_gl.pixelStorei( 32877, unpackSkipImages );\n\n\t\t// Generate mipmaps only when copying level 0\n\t\tif ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( glTarget );\n\n\t\tstate.unbindTexture();\n\n\t};\n\n\tthis.initTexture = function ( texture ) {\n\n\t\ttextures.setTexture2D( texture, 0 );\n\n\t\tstate.unbindTexture();\n\n\t};\n\n\tthis.resetState = function () {\n\n\t\t_currentActiveCubeFace = 0;\n\t\t_currentActiveMipmapLevel = 0;\n\t\t_currentRenderTarget = null;\n\n\t\tstate.reset();\n\t\tbindingStates.reset();\n\n\t};\n\n\tif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef\n\n\t}\n\n}\n\nclass WebGL1Renderer extends WebGLRenderer {}\n\nWebGL1Renderer.prototype.isWebGL1Renderer = true;\n\nclass FogExp2 {\n\n\tconstructor( color, density = 0.00025 ) {\n\n\t\tthis.name = '';\n\n\t\tthis.color = new Color( color );\n\t\tthis.density = density;\n\n\t}\n\n\tclone() {\n\n\t\treturn new FogExp2( this.color, this.density );\n\n\t}\n\n\ttoJSON( /* meta */ ) {\n\n\t\treturn {\n\t\t\ttype: 'FogExp2',\n\t\t\tcolor: this.color.getHex(),\n\t\t\tdensity: this.density\n\t\t};\n\n\t}\n\n}\n\nFogExp2.prototype.isFogExp2 = true;\n\nclass Fog {\n\n\tconstructor( color, near = 1, far = 1000 ) {\n\n\t\tthis.name = '';\n\n\t\tthis.color = new Color( color );\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Fog( this.color, this.near, this.far );\n\n\t}\n\n\ttoJSON( /* meta */ ) {\n\n\t\treturn {\n\t\t\ttype: 'Fog',\n\t\t\tcolor: this.color.getHex(),\n\t\t\tnear: this.near,\n\t\t\tfar: this.far\n\t\t};\n\n\t}\n\n}\n\nFog.prototype.isFog = true;\n\nclass Scene extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'Scene';\n\n\t\tthis.background = null;\n\t\tthis.environment = null;\n\t\tthis.fog = null;\n\n\t\tthis.overrideMaterial = null;\n\n\t\tthis.autoUpdate = true; // checked by the renderer\n\n\t\tif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t\t\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef\n\n\t\t}\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tif ( source.background !== null ) this.background = source.background.clone();\n\t\tif ( source.environment !== null ) this.environment = source.environment.clone();\n\t\tif ( source.fog !== null ) this.fog = source.fog.clone();\n\n\t\tif ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();\n\n\t\tthis.autoUpdate = source.autoUpdate;\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.fog !== null ) data.object.fog = this.fog.toJSON();\n\n\t\treturn data;\n\n\t}\n\n}\n\nScene.prototype.isScene = true;\n\nclass InterleavedBuffer {\n\n\tconstructor( array, stride ) {\n\n\t\tthis.array = array;\n\t\tthis.stride = stride;\n\t\tthis.count = array !== undefined ? array.length / stride : 0;\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = { offset: 0, count: - 1 };\n\n\t\tthis.version = 0;\n\n\t\tthis.uuid = generateUUID();\n\n\t}\n\n\tonUploadCallback() {}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.array = new source.array.constructor( source.array );\n\t\tthis.count = source.count;\n\t\tthis.stride = source.stride;\n\t\tthis.usage = source.usage;\n\n\t\treturn this;\n\n\t}\n\n\tcopyAt( index1, attribute, index2 ) {\n\n\t\tindex1 *= this.stride;\n\t\tindex2 *= attribute.stride;\n\n\t\tfor ( let i = 0, l = this.stride; i < l; i ++ ) {\n\n\t\t\tthis.array[ index1 + i ] = attribute.array[ index2 + i ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tset( value, offset = 0 ) {\n\n\t\tthis.array.set( value, offset );\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tif ( data.arrayBuffers === undefined ) {\n\n\t\t\tdata.arrayBuffers = {};\n\n\t\t}\n\n\t\tif ( this.array.buffer._uuid === undefined ) {\n\n\t\t\tthis.array.buffer._uuid = generateUUID();\n\n\t\t}\n\n\t\tif ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) {\n\n\t\t\tdata.arrayBuffers[ this.array.buffer._uuid ] = this.array.slice( 0 ).buffer;\n\n\t\t}\n\n\t\tconst array = new this.array.constructor( data.arrayBuffers[ this.array.buffer._uuid ] );\n\n\t\tconst ib = new this.constructor( array, this.stride );\n\t\tib.setUsage( this.usage );\n\n\t\treturn ib;\n\n\t}\n\n\tonUpload( callback ) {\n\n\t\tthis.onUploadCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tif ( data.arrayBuffers === undefined ) {\n\n\t\t\tdata.arrayBuffers = {};\n\n\t\t}\n\n\t\t// generate UUID for array buffer if necessary\n\n\t\tif ( this.array.buffer._uuid === undefined ) {\n\n\t\t\tthis.array.buffer._uuid = generateUUID();\n\n\t\t}\n\n\t\tif ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) {\n\n\t\t\tdata.arrayBuffers[ this.array.buffer._uuid ] = Array.prototype.slice.call( new Uint32Array( this.array.buffer ) );\n\n\t\t}\n\n\t\t//\n\n\t\treturn {\n\t\t\tuuid: this.uuid,\n\t\t\tbuffer: this.array.buffer._uuid,\n\t\t\ttype: this.array.constructor.name,\n\t\t\tstride: this.stride\n\t\t};\n\n\t}\n\n}\n\nInterleavedBuffer.prototype.isInterleavedBuffer = true;\n\nconst _vector$6 = /*@__PURE__*/ new Vector3();\n\nclass InterleavedBufferAttribute {\n\n\tconstructor( interleavedBuffer, itemSize, offset, normalized = false ) {\n\n\t\tthis.name = '';\n\n\t\tthis.data = interleavedBuffer;\n\t\tthis.itemSize = itemSize;\n\t\tthis.offset = offset;\n\n\t\tthis.normalized = normalized === true;\n\n\t}\n\n\tget count() {\n\n\t\treturn this.data.count;\n\n\t}\n\n\tget array() {\n\n\t\treturn this.data.array;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tthis.data.needsUpdate = value;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tfor ( let i = 0, l = this.data.count; i < l; i ++ ) {\n\n\t\t\t_vector$6.x = this.getX( i );\n\t\t\t_vector$6.y = this.getY( i );\n\t\t\t_vector$6.z = this.getZ( i );\n\n\t\t\t_vector$6.applyMatrix4( m );\n\n\t\t\tthis.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$6.x = this.getX( i );\n\t\t\t_vector$6.y = this.getY( i );\n\t\t\t_vector$6.z = this.getZ( i );\n\n\t\t\t_vector$6.applyNormalMatrix( m );\n\n\t\t\tthis.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$6.x = this.getX( i );\n\t\t\t_vector$6.y = this.getY( i );\n\t\t\t_vector$6.z = this.getZ( i );\n\n\t\t\t_vector$6.transformDirection( m );\n\n\t\t\tthis.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tthis.data.array[ index * this.data.stride + this.offset ] = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tgetX( index ) {\n\n\t\treturn this.data.array[ index * this.data.stride + this.offset ];\n\n\t}\n\n\tgetY( index ) {\n\n\t\treturn this.data.array[ index * this.data.stride + this.offset + 1 ];\n\n\t}\n\n\tgetZ( index ) {\n\n\t\treturn this.data.array[ index * this.data.stride + this.offset + 2 ];\n\n\t}\n\n\tgetW( index ) {\n\n\t\treturn this.data.array[ index * this.data.stride + this.offset + 3 ];\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\t\tthis.data.array[ index + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\t\tthis.data.array[ index + 2 ] = z;\n\t\tthis.data.array[ index + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tif ( data === undefined ) {\n\n\t\t\tconsole.log( 'THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.' );\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0; i < this.count; i ++ ) {\n\n\t\t\t\tconst index = i * this.data.stride + this.offset;\n\n\t\t\t\tfor ( let j = 0; j < this.itemSize; j ++ ) {\n\n\t\t\t\t\tarray.push( this.data.array[ index + j ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new BufferAttribute( new this.array.constructor( array ), this.itemSize, this.normalized );\n\n\t\t} else {\n\n\t\t\tif ( data.interleavedBuffers === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers = {};\n\n\t\t\t}\n\n\t\t\tif ( data.interleavedBuffers[ this.data.uuid ] === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers[ this.data.uuid ] = this.data.clone( data );\n\n\t\t\t}\n\n\t\t\treturn new InterleavedBufferAttribute( data.interleavedBuffers[ this.data.uuid ], this.itemSize, this.offset, this.normalized );\n\n\t\t}\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tif ( data === undefined ) {\n\n\t\t\tconsole.log( 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.' );\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0; i < this.count; i ++ ) {\n\n\t\t\t\tconst index = i * this.data.stride + this.offset;\n\n\t\t\t\tfor ( let j = 0; j < this.itemSize; j ++ ) {\n\n\t\t\t\t\tarray.push( this.data.array[ index + j ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// deinterleave data and save it as an ordinary buffer attribute for now\n\n\t\t\treturn {\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\tarray: array,\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\n\t\t} else {\n\n\t\t\t// save as true interlaved attribtue\n\n\t\t\tif ( data.interleavedBuffers === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers = {};\n\n\t\t\t}\n\n\t\t\tif ( data.interleavedBuffers[ this.data.uuid ] === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers[ this.data.uuid ] = this.data.toJSON( data );\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tisInterleavedBufferAttribute: true,\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\tdata: this.data.uuid,\n\t\t\t\toffset: this.offset,\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\n\t\t}\n\n\t}\n\n}\n\nInterleavedBufferAttribute.prototype.isInterleavedBufferAttribute = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * map: new THREE.Texture( <Image> ),\n * alphaMap: new THREE.Texture( <Image> ),\n * rotation: <float>,\n * sizeAttenuation: <bool>\n * }\n */\n\nclass SpriteMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'SpriteMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.rotation = 0;\n\n\t\tthis.sizeAttenuation = true;\n\n\t\tthis.transparent = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.rotation = source.rotation;\n\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\n\t\treturn this;\n\n\t}\n\n}\n\nSpriteMaterial.prototype.isSpriteMaterial = true;\n\nlet _geometry;\n\nconst _intersectPoint = /*@__PURE__*/ new Vector3();\nconst _worldScale = /*@__PURE__*/ new Vector3();\nconst _mvPosition = /*@__PURE__*/ new Vector3();\n\nconst _alignedPosition = /*@__PURE__*/ new Vector2();\nconst _rotatedPosition = /*@__PURE__*/ new Vector2();\nconst _viewWorldMatrix = /*@__PURE__*/ new Matrix4();\n\nconst _vA = /*@__PURE__*/ new Vector3();\nconst _vB = /*@__PURE__*/ new Vector3();\nconst _vC = /*@__PURE__*/ new Vector3();\n\nconst _uvA = /*@__PURE__*/ new Vector2();\nconst _uvB = /*@__PURE__*/ new Vector2();\nconst _uvC = /*@__PURE__*/ new Vector2();\n\nclass Sprite extends Object3D {\n\n\tconstructor( material ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Sprite';\n\n\t\tif ( _geometry === undefined ) {\n\n\t\t\t_geometry = new BufferGeometry();\n\n\t\t\tconst float32Array = new Float32Array( [\n\t\t\t\t- 0.5, - 0.5, 0, 0, 0,\n\t\t\t\t0.5, - 0.5, 0, 1, 0,\n\t\t\t\t0.5, 0.5, 0, 1, 1,\n\t\t\t\t- 0.5, 0.5, 0, 0, 1\n\t\t\t] );\n\n\t\t\tconst interleavedBuffer = new InterleavedBuffer( float32Array, 5 );\n\n\t\t\t_geometry.setIndex( [ 0, 1, 2,\t0, 2, 3 ] );\n\t\t\t_geometry.setAttribute( 'position', new InterleavedBufferAttribute( interleavedBuffer, 3, 0, false ) );\n\t\t\t_geometry.setAttribute( 'uv', new InterleavedBufferAttribute( interleavedBuffer, 2, 3, false ) );\n\n\t\t}\n\n\t\tthis.geometry = _geometry;\n\t\tthis.material = ( material !== undefined ) ? material : new SpriteMaterial();\n\n\t\tthis.center = new Vector2( 0.5, 0.5 );\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tif ( raycaster.camera === null ) {\n\n\t\t\tconsole.error( 'THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.' );\n\n\t\t}\n\n\t\t_worldScale.setFromMatrixScale( this.matrixWorld );\n\n\t\t_viewWorldMatrix.copy( raycaster.camera.matrixWorld );\n\t\tthis.modelViewMatrix.multiplyMatrices( raycaster.camera.matrixWorldInverse, this.matrixWorld );\n\n\t\t_mvPosition.setFromMatrixPosition( this.modelViewMatrix );\n\n\t\tif ( raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false ) {\n\n\t\t\t_worldScale.multiplyScalar( - _mvPosition.z );\n\n\t\t}\n\n\t\tconst rotation = this.material.rotation;\n\t\tlet sin, cos;\n\n\t\tif ( rotation !== 0 ) {\n\n\t\t\tcos = Math.cos( rotation );\n\t\t\tsin = Math.sin( rotation );\n\n\t\t}\n\n\t\tconst center = this.center;\n\n\t\ttransformVertex( _vA.set( - 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\ttransformVertex( _vB.set( 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\ttransformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\n\t\t_uvA.set( 0, 0 );\n\t\t_uvB.set( 1, 0 );\n\t\t_uvC.set( 1, 1 );\n\n\t\t// check first triangle\n\t\tlet intersect = raycaster.ray.intersectTriangle( _vA, _vB, _vC, false, _intersectPoint );\n\n\t\tif ( intersect === null ) {\n\n\t\t\t// check second triangle\n\t\t\ttransformVertex( _vB.set( - 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\t\t_uvB.set( 0, 1 );\n\n\t\t\tintersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint );\n\t\t\tif ( intersect === null ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( _intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tpoint: _intersectPoint.clone(),\n\t\t\tuv: Triangle.getUV( _intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() ),\n\t\t\tface: null,\n\t\t\tobject: this\n\n\t\t} );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tif ( source.center !== undefined ) this.center.copy( source.center );\n\n\t\tthis.material = source.material;\n\n\t\treturn this;\n\n\t}\n\n}\n\nSprite.prototype.isSprite = true;\n\nfunction transformVertex( vertexPosition, mvPosition, center, scale, sin, cos ) {\n\n\t// compute position in camera space\n\t_alignedPosition.subVectors( vertexPosition, center ).addScalar( 0.5 ).multiply( scale );\n\n\t// to check if rotation is not zero\n\tif ( sin !== undefined ) {\n\n\t\t_rotatedPosition.x = ( cos * _alignedPosition.x ) - ( sin * _alignedPosition.y );\n\t\t_rotatedPosition.y = ( sin * _alignedPosition.x ) + ( cos * _alignedPosition.y );\n\n\t} else {\n\n\t\t_rotatedPosition.copy( _alignedPosition );\n\n\t}\n\n\n\tvertexPosition.copy( mvPosition );\n\tvertexPosition.x += _rotatedPosition.x;\n\tvertexPosition.y += _rotatedPosition.y;\n\n\t// transform to world space\n\tvertexPosition.applyMatrix4( _viewWorldMatrix );\n\n}\n\nconst _v1$2 = /*@__PURE__*/ new Vector3();\nconst _v2$1 = /*@__PURE__*/ new Vector3();\n\nclass LOD extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis._currentLevel = 0;\n\n\t\tthis.type = 'LOD';\n\n\t\tObject.defineProperties( this, {\n\t\t\tlevels: {\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tisLOD: {\n\t\t\t\tvalue: true,\n\t\t\t}\n\t\t} );\n\n\t\tthis.autoUpdate = true;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source, false );\n\n\t\tconst levels = source.levels;\n\n\t\tfor ( let i = 0, l = levels.length; i < l; i ++ ) {\n\n\t\t\tconst level = levels[ i ];\n\n\t\t\tthis.addLevel( level.object.clone(), level.distance );\n\n\t\t}\n\n\t\tthis.autoUpdate = source.autoUpdate;\n\n\t\treturn this;\n\n\t}\n\n\taddLevel( object, distance = 0 ) {\n\n\t\tdistance = Math.abs( distance );\n\n\t\tconst levels = this.levels;\n\n\t\tlet l;\n\n\t\tfor ( l = 0; l < levels.length; l ++ ) {\n\n\t\t\tif ( distance < levels[ l ].distance ) {\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlevels.splice( l, 0, { distance: distance, object: object } );\n\n\t\tthis.add( object );\n\n\t\treturn this;\n\n\t}\n\n\tgetCurrentLevel() {\n\n\t\treturn this._currentLevel;\n\n\t}\n\n\tgetObjectForDistance( distance ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 0 ) {\n\n\t\t\tlet i, l;\n\n\t\t\tfor ( i = 1, l = levels.length; i < l; i ++ ) {\n\n\t\t\t\tif ( distance < levels[ i ].distance ) {\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn levels[ i - 1 ].object;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 0 ) {\n\n\t\t\t_v1$2.setFromMatrixPosition( this.matrixWorld );\n\n\t\t\tconst distance = raycaster.ray.origin.distanceTo( _v1$2 );\n\n\t\t\tthis.getObjectForDistance( distance ).raycast( raycaster, intersects );\n\n\t\t}\n\n\t}\n\n\tupdate( camera ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 1 ) {\n\n\t\t\t_v1$2.setFromMatrixPosition( camera.matrixWorld );\n\t\t\t_v2$1.setFromMatrixPosition( this.matrixWorld );\n\n\t\t\tconst distance = _v1$2.distanceTo( _v2$1 ) / camera.zoom;\n\n\t\t\tlevels[ 0 ].object.visible = true;\n\n\t\t\tlet i, l;\n\n\t\t\tfor ( i = 1, l = levels.length; i < l; i ++ ) {\n\n\t\t\t\tif ( distance >= levels[ i ].distance ) {\n\n\t\t\t\t\tlevels[ i - 1 ].object.visible = false;\n\t\t\t\t\tlevels[ i ].object.visible = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._currentLevel = i - 1;\n\n\t\t\tfor ( ; i < l; i ++ ) {\n\n\t\t\t\tlevels[ i ].object.visible = false;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.autoUpdate === false ) data.object.autoUpdate = false;\n\n\t\tdata.object.levels = [];\n\n\t\tconst levels = this.levels;\n\n\t\tfor ( let i = 0, l = levels.length; i < l; i ++ ) {\n\n\t\t\tconst level = levels[ i ];\n\n\t\t\tdata.object.levels.push( {\n\t\t\t\tobject: level.object.uuid,\n\t\t\t\tdistance: level.distance\n\t\t\t} );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst _basePosition = /*@__PURE__*/ new Vector3();\n\nconst _skinIndex = /*@__PURE__*/ new Vector4();\nconst _skinWeight = /*@__PURE__*/ new Vector4();\n\nconst _vector$5 = /*@__PURE__*/ new Vector3();\nconst _matrix = /*@__PURE__*/ new Matrix4();\n\nclass SkinnedMesh extends Mesh {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'SkinnedMesh';\n\n\t\tthis.bindMode = 'attached';\n\t\tthis.bindMatrix = new Matrix4();\n\t\tthis.bindMatrixInverse = new Matrix4();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.bindMode = source.bindMode;\n\t\tthis.bindMatrix.copy( source.bindMatrix );\n\t\tthis.bindMatrixInverse.copy( source.bindMatrixInverse );\n\n\t\tthis.skeleton = source.skeleton;\n\n\t\treturn this;\n\n\t}\n\n\tbind( skeleton, bindMatrix ) {\n\n\t\tthis.skeleton = skeleton;\n\n\t\tif ( bindMatrix === undefined ) {\n\n\t\t\tthis.updateMatrixWorld( true );\n\n\t\t\tthis.skeleton.calculateInverses();\n\n\t\t\tbindMatrix = this.matrixWorld;\n\n\t\t}\n\n\t\tthis.bindMatrix.copy( bindMatrix );\n\t\tthis.bindMatrixInverse.copy( bindMatrix ).invert();\n\n\t}\n\n\tpose() {\n\n\t\tthis.skeleton.pose();\n\n\t}\n\n\tnormalizeSkinWeights() {\n\n\t\tconst vector = new Vector4();\n\n\t\tconst skinWeight = this.geometry.attributes.skinWeight;\n\n\t\tfor ( let i = 0, l = skinWeight.count; i < l; i ++ ) {\n\n\t\t\tvector.x = skinWeight.getX( i );\n\t\t\tvector.y = skinWeight.getY( i );\n\t\t\tvector.z = skinWeight.getZ( i );\n\t\t\tvector.w = skinWeight.getW( i );\n\n\t\t\tconst scale = 1.0 / vector.manhattanLength();\n\n\t\t\tif ( scale !== Infinity ) {\n\n\t\t\t\tvector.multiplyScalar( scale );\n\n\t\t\t} else {\n\n\t\t\t\tvector.set( 1, 0, 0, 0 ); // do something reasonable\n\n\t\t\t}\n\n\t\t\tskinWeight.setXYZW( i, vector.x, vector.y, vector.z, vector.w );\n\n\t\t}\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tif ( this.bindMode === 'attached' ) {\n\n\t\t\tthis.bindMatrixInverse.copy( this.matrixWorld ).invert();\n\n\t\t} else if ( this.bindMode === 'detached' ) {\n\n\t\t\tthis.bindMatrixInverse.copy( this.bindMatrix ).invert();\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode );\n\n\t\t}\n\n\t}\n\n\tboneTransform( index, target ) {\n\n\t\tconst skeleton = this.skeleton;\n\t\tconst geometry = this.geometry;\n\n\t\t_skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index );\n\t\t_skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index );\n\n\t\t_basePosition.fromBufferAttribute( geometry.attributes.position, index ).applyMatrix4( this.bindMatrix );\n\n\t\ttarget.set( 0, 0, 0 );\n\n\t\tfor ( let i = 0; i < 4; i ++ ) {\n\n\t\t\tconst weight = _skinWeight.getComponent( i );\n\n\t\t\tif ( weight !== 0 ) {\n\n\t\t\t\tconst boneIndex = _skinIndex.getComponent( i );\n\n\t\t\t\t_matrix.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] );\n\n\t\t\t\ttarget.addScaledVector( _vector$5.copy( _basePosition ).applyMatrix4( _matrix ), weight );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn target.applyMatrix4( this.bindMatrixInverse );\n\n\t}\n\n}\n\nSkinnedMesh.prototype.isSkinnedMesh = true;\n\nclass Bone extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'Bone';\n\n\t}\n\n}\n\nBone.prototype.isBone = true;\n\nclass DataTexture extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, encoding ) {\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );\n\n\t\tthis.image = { data: data, width: width, height: height };\n\n\t\tthis.magFilter = magFilter;\n\t\tthis.minFilter = minFilter;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nDataTexture.prototype.isDataTexture = true;\n\nconst _offsetMatrix = /*@__PURE__*/ new Matrix4();\nconst _identityMatrix = /*@__PURE__*/ new Matrix4();\n\nclass Skeleton {\n\n\tconstructor( bones = [], boneInverses = [] ) {\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.bones = bones.slice( 0 );\n\t\tthis.boneInverses = boneInverses;\n\t\tthis.boneMatrices = null;\n\n\t\tthis.boneTexture = null;\n\t\tthis.boneTextureSize = 0;\n\n\t\tthis.frame = - 1;\n\n\t\tthis.init();\n\n\t}\n\n\tinit() {\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\n\t\tthis.boneMatrices = new Float32Array( bones.length * 16 );\n\n\t\t// calculate inverse bone matrices if necessary\n\n\t\tif ( boneInverses.length === 0 ) {\n\n\t\t\tthis.calculateInverses();\n\n\t\t} else {\n\n\t\t\t// handle special case\n\n\t\t\tif ( bones.length !== boneInverses.length ) {\n\n\t\t\t\tconsole.warn( 'THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.' );\n\n\t\t\t\tthis.boneInverses = [];\n\n\t\t\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\t\t\tthis.boneInverses.push( new Matrix4() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcalculateInverses() {\n\n\t\tthis.boneInverses.length = 0;\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst inverse = new Matrix4();\n\n\t\t\tif ( this.bones[ i ] ) {\n\n\t\t\t\tinverse.copy( this.bones[ i ].matrixWorld ).invert();\n\n\t\t\t}\n\n\t\t\tthis.boneInverses.push( inverse );\n\n\t\t}\n\n\t}\n\n\tpose() {\n\n\t\t// recover the bind-time world matrices\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone ) {\n\n\t\t\t\tbone.matrixWorld.copy( this.boneInverses[ i ] ).invert();\n\n\t\t\t}\n\n\t\t}\n\n\t\t// compute the local matrices, positions, rotations and scales\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone ) {\n\n\t\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\t\tbone.matrix.copy( bone.parent.matrixWorld ).invert();\n\t\t\t\t\tbone.matrix.multiply( bone.matrixWorld );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbone.matrix.copy( bone.matrixWorld );\n\n\t\t\t\t}\n\n\t\t\t\tbone.matrix.decompose( bone.position, bone.quaternion, bone.scale );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdate() {\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\t\tconst boneMatrices = this.boneMatrices;\n\t\tconst boneTexture = this.boneTexture;\n\n\t\t// flatten bone matrices to array\n\n\t\tfor ( let i = 0, il = bones.length; i < il; i ++ ) {\n\n\t\t\t// compute the offset between the current and the original transform\n\n\t\t\tconst matrix = bones[ i ] ? bones[ i ].matrixWorld : _identityMatrix;\n\n\t\t\t_offsetMatrix.multiplyMatrices( matrix, boneInverses[ i ] );\n\t\t\t_offsetMatrix.toArray( boneMatrices, i * 16 );\n\n\t\t}\n\n\t\tif ( boneTexture !== null ) {\n\n\t\t\tboneTexture.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new Skeleton( this.bones, this.boneInverses );\n\n\t}\n\n\tcomputeBoneTexture() {\n\n\t\t// layout (1 matrix = 4 pixels)\n\t\t// RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n\t\t// with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8)\n\t\t// 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16)\n\t\t// 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32)\n\t\t// 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)\n\n\t\tlet size = Math.sqrt( this.bones.length * 4 ); // 4 pixels needed for 1 matrix\n\t\tsize = ceilPowerOfTwo( size );\n\t\tsize = Math.max( size, 4 );\n\n\t\tconst boneMatrices = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel\n\t\tboneMatrices.set( this.boneMatrices ); // copy current values\n\n\t\tconst boneTexture = new DataTexture( boneMatrices, size, size, RGBAFormat, FloatType );\n\n\t\tthis.boneMatrices = boneMatrices;\n\t\tthis.boneTexture = boneTexture;\n\t\tthis.boneTextureSize = size;\n\n\t\treturn this;\n\n\t}\n\n\tgetBoneByName( name ) {\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone.name === name ) {\n\n\t\t\t\treturn bone;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn undefined;\n\n\t}\n\n\tdispose( ) {\n\n\t\tif ( this.boneTexture !== null ) {\n\n\t\t\tthis.boneTexture.dispose();\n\n\t\t\tthis.boneTexture = null;\n\n\t\t}\n\n\t}\n\n\tfromJSON( json, bones ) {\n\n\t\tthis.uuid = json.uuid;\n\n\t\tfor ( let i = 0, l = json.bones.length; i < l; i ++ ) {\n\n\t\t\tconst uuid = json.bones[ i ];\n\t\t\tlet bone = bones[ uuid ];\n\n\t\t\tif ( bone === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.Skeleton: No bone found with UUID:', uuid );\n\t\t\t\tbone = new Bone();\n\n\t\t\t}\n\n\t\t\tthis.bones.push( bone );\n\t\t\tthis.boneInverses.push( new Matrix4().fromArray( json.boneInverses[ i ] ) );\n\n\t\t}\n\n\t\tthis.init();\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Skeleton',\n\t\t\t\tgenerator: 'Skeleton.toJSON'\n\t\t\t},\n\t\t\tbones: [],\n\t\t\tboneInverses: []\n\t\t};\n\n\t\tdata.uuid = this.uuid;\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\n\t\tfor ( let i = 0, l = bones.length; i < l; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\t\t\tdata.bones.push( bone.uuid );\n\n\t\t\tconst boneInverse = boneInverses[ i ];\n\t\t\tdata.boneInverses.push( boneInverse.toArray() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst _instanceLocalMatrix = /*@__PURE__*/ new Matrix4();\nconst _instanceWorldMatrix = /*@__PURE__*/ new Matrix4();\n\nconst _instanceIntersects = [];\n\nconst _mesh = /*@__PURE__*/ new Mesh();\n\nclass InstancedMesh extends Mesh {\n\n\tconstructor( geometry, material, count ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.instanceMatrix = new BufferAttribute( new Float32Array( count * 16 ), 16 );\n\t\tthis.instanceColor = null;\n\n\t\tthis.count = count;\n\n\t\tthis.frustumCulled = false;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.instanceMatrix.copy( source.instanceMatrix );\n\n\t\tif ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone();\n\n\t\tthis.count = source.count;\n\n\t\treturn this;\n\n\t}\n\n\tgetColorAt( index, color ) {\n\n\t\tcolor.fromArray( this.instanceColor.array, index * 3 );\n\n\t}\n\n\tgetMatrixAt( index, matrix ) {\n\n\t\tmatrix.fromArray( this.instanceMatrix.array, index * 16 );\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst raycastTimes = this.count;\n\n\t\t_mesh.geometry = this.geometry;\n\t\t_mesh.material = this.material;\n\n\t\tif ( _mesh.material === undefined ) return;\n\n\t\tfor ( let instanceId = 0; instanceId < raycastTimes; instanceId ++ ) {\n\n\t\t\t// calculate the world matrix for each instance\n\n\t\t\tthis.getMatrixAt( instanceId, _instanceLocalMatrix );\n\n\t\t\t_instanceWorldMatrix.multiplyMatrices( matrixWorld, _instanceLocalMatrix );\n\n\t\t\t// the mesh represents this single instance\n\n\t\t\t_mesh.matrixWorld = _instanceWorldMatrix;\n\n\t\t\t_mesh.raycast( raycaster, _instanceIntersects );\n\n\t\t\t// process the result of raycast\n\n\t\t\tfor ( let i = 0, l = _instanceIntersects.length; i < l; i ++ ) {\n\n\t\t\t\tconst intersect = _instanceIntersects[ i ];\n\t\t\t\tintersect.instanceId = instanceId;\n\t\t\t\tintersect.object = this;\n\t\t\t\tintersects.push( intersect );\n\n\t\t\t}\n\n\t\t\t_instanceIntersects.length = 0;\n\n\t\t}\n\n\t}\n\n\tsetColorAt( index, color ) {\n\n\t\tif ( this.instanceColor === null ) {\n\n\t\t\tthis.instanceColor = new BufferAttribute( new Float32Array( this.count * 3 ), 3 );\n\n\t\t}\n\n\t\tcolor.toArray( this.instanceColor.array, index * 3 );\n\n\t}\n\n\tsetMatrixAt( index, matrix ) {\n\n\t\tmatrix.toArray( this.instanceMatrix.array, index * 16 );\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nInstancedMesh.prototype.isInstancedMesh = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n *\n * linewidth: <float>,\n * linecap: \"round\",\n * linejoin: \"round\"\n * }\n */\n\nclass LineBasicMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineBasicMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.linewidth = 1;\n\t\tthis.linecap = 'round';\n\t\tthis.linejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.linewidth = source.linewidth;\n\t\tthis.linecap = source.linecap;\n\t\tthis.linejoin = source.linejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineBasicMaterial.prototype.isLineBasicMaterial = true;\n\nconst _start$1 = /*@__PURE__*/ new Vector3();\nconst _end$1 = /*@__PURE__*/ new Vector3();\nconst _inverseMatrix$1 = /*@__PURE__*/ new Matrix4();\nconst _ray$1 = /*@__PURE__*/ new Ray();\nconst _sphere$1 = /*@__PURE__*/ new Sphere();\n\nclass Line extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new LineBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Line';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\t// we assume non-indexed geometry\n\n\t\t\tif ( geometry.index === null ) {\n\n\t\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\t\tconst lineDistances = [ 0 ];\n\n\t\t\t\tfor ( let i = 1, l = positionAttribute.count; i < l; i ++ ) {\n\n\t\t\t\t\t_start$1.fromBufferAttribute( positionAttribute, i - 1 );\n\t\t\t\t\t_end$1.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\t\tlineDistances[ i ] = lineDistances[ i - 1 ];\n\t\t\t\t\tlineDistances[ i ] += _start$1.distanceTo( _end$1 );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Line.threshold;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$1.copy( geometry.boundingSphere );\n\t\t_sphere$1.applyMatrix4( matrixWorld );\n\t\t_sphere$1.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$1 ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix$1.copy( matrixWorld ).invert();\n\t\t_ray$1.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$1 );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tconst vStart = new Vector3();\n\t\tconst vEnd = new Vector3();\n\t\tconst interSegment = new Vector3();\n\t\tconst interRay = new Vector3();\n\t\tconst step = this.isLineSegments ? 2 : 1;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst attributes = geometry.attributes;\n\t\t\tconst positionAttribute = attributes.position;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n\t\t\t\t\tconst b = index.getX( i + 1 );\n\n\t\t\t\t\tvStart.fromBufferAttribute( positionAttribute, a );\n\t\t\t\t\tvEnd.fromBufferAttribute( positionAttribute, b );\n\n\t\t\t\t\tconst distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\t\tintersects.push( {\n\n\t\t\t\t\t\tdistance: distance,\n\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\tface: null,\n\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\tobject: this\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\t\tvStart.fromBufferAttribute( positionAttribute, i );\n\t\t\t\t\tvEnd.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\t\tconst distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\t\tintersects.push( {\n\n\t\t\t\t\t\tdistance: distance,\n\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\tface: null,\n\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\tobject: this\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nLine.prototype.isLine = true;\n\nconst _start = /*@__PURE__*/ new Vector3();\nconst _end = /*@__PURE__*/ new Vector3();\n\nclass LineSegments extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'LineSegments';\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\t// we assume non-indexed geometry\n\n\t\t\tif ( geometry.index === null ) {\n\n\t\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\t\tconst lineDistances = [];\n\n\t\t\t\tfor ( let i = 0, l = positionAttribute.count; i < l; i += 2 ) {\n\n\t\t\t\t\t_start.fromBufferAttribute( positionAttribute, i );\n\t\t\t\t\t_end.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\t\tlineDistances[ i ] = ( i === 0 ) ? 0 : lineDistances[ i - 1 ];\n\t\t\t\t\tlineDistances[ i + 1 ] = lineDistances[ i ] + _start.distanceTo( _end );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineSegments.prototype.isLineSegments = true;\n\nclass LineLoop extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'LineLoop';\n\n\t}\n\n}\n\nLineLoop.prototype.isLineLoop = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n * map: new THREE.Texture( <Image> ),\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * size: <float>,\n * sizeAttenuation: <bool>\n *\n * morphTargets: <bool>\n * }\n */\n\nclass PointsMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PointsMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.size = 1;\n\t\tthis.sizeAttenuation = true;\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.size = source.size;\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\treturn this;\n\n\t}\n\n}\n\nPointsMaterial.prototype.isPointsMaterial = true;\n\nconst _inverseMatrix = /*@__PURE__*/ new Matrix4();\nconst _ray = /*@__PURE__*/ new Ray();\nconst _sphere = /*@__PURE__*/ new Sphere();\nconst _position$2 = /*@__PURE__*/ new Vector3();\n\nclass Points extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Points';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Points.threshold;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere.copy( geometry.boundingSphere );\n\t\t_sphere.applyMatrix4( matrixWorld );\n\t\t_sphere.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix.copy( matrixWorld ).invert();\n\t\t_ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst attributes = geometry.attributes;\n\t\t\tconst positionAttribute = attributes.position;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, il = end; i < il; i ++ ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n\n\t\t\t\t\t_position$2.fromBufferAttribute( positionAttribute, a );\n\n\t\t\t\t\ttestPoint( _position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end; i < l; i ++ ) {\n\n\t\t\t\t\t_position$2.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\t\ttestPoint( _position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nPoints.prototype.isPoints = true;\n\nfunction testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) {\n\n\tconst rayPointDistanceSq = _ray.distanceSqToPoint( point );\n\n\tif ( rayPointDistanceSq < localThresholdSq ) {\n\n\t\tconst intersectPoint = new Vector3();\n\n\t\t_ray.closestPointToPoint( point, intersectPoint );\n\t\tintersectPoint.applyMatrix4( matrixWorld );\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tdistanceToRay: Math.sqrt( rayPointDistanceSq ),\n\t\t\tpoint: intersectPoint,\n\t\t\tindex: index,\n\t\t\tface: null,\n\t\t\tobject: object\n\n\t\t} );\n\n\t}\n\n}\n\nclass VideoTexture extends Texture {\n\n\tconstructor( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {\n\n\t\tsuper( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.format = format !== undefined ? format : RGBFormat;\n\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : LinearFilter;\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : LinearFilter;\n\n\t\tthis.generateMipmaps = false;\n\n\t\tconst scope = this;\n\n\t\tfunction updateVideo() {\n\n\t\t\tscope.needsUpdate = true;\n\t\t\tvideo.requestVideoFrameCallback( updateVideo );\n\n\t\t}\n\n\t\tif ( 'requestVideoFrameCallback' in video ) {\n\n\t\t\tvideo.requestVideoFrameCallback( updateVideo );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.image ).copy( this );\n\n\t}\n\n\tupdate() {\n\n\t\tconst video = this.image;\n\t\tconst hasVideoFrameCallback = 'requestVideoFrameCallback' in video;\n\n\t\tif ( hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA ) {\n\n\t\t\tthis.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n}\n\nVideoTexture.prototype.isVideoTexture = true;\n\nclass CompressedTexture extends Texture {\n\n\tconstructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );\n\n\t\tthis.image = { width: width, height: height };\n\t\tthis.mipmaps = mipmaps;\n\n\t\t// no flipping for cube textures\n\t\t// (also flipping doesn't work for compressed textures )\n\n\t\tthis.flipY = false;\n\n\t\t// can't generate mipmaps for compressed textures\n\t\t// mips must be embedded in DDS files\n\n\t\tthis.generateMipmaps = false;\n\n\t}\n\n}\n\nCompressedTexture.prototype.isCompressedTexture = true;\n\nclass CanvasTexture extends Texture {\n\n\tconstructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {\n\n\t\tsuper( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nCanvasTexture.prototype.isCanvasTexture = true;\n\nclass DepthTexture extends Texture {\n\n\tconstructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {\n\n\t\tformat = format !== undefined ? format : DepthFormat;\n\n\t\tif ( format !== DepthFormat && format !== DepthStencilFormat ) {\n\n\t\t\tthrow new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' );\n\n\t\t}\n\n\t\tif ( type === undefined && format === DepthFormat ) type = UnsignedShortType;\n\t\tif ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type;\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.image = { width: width, height: height };\n\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : NearestFilter;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : NearestFilter;\n\n\t\tthis.flipY = false;\n\t\tthis.generateMipmaps\t= false;\n\n\t}\n\n\n}\n\nDepthTexture.prototype.isDepthTexture = true;\n\nclass CircleGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, segments = 8, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CircleGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tsegments: segments,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tsegments = Math.max( 3, segments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// center point\n\n\t\tvertices.push( 0, 0, 0 );\n\t\tnormals.push( 0, 0, 1 );\n\t\tuvs.push( 0.5, 0.5 );\n\n\t\tfor ( let s = 0, i = 3; s <= segments; s ++, i += 3 ) {\n\n\t\t\tconst segment = thetaStart + s / segments * thetaLength;\n\n\t\t\t// vertex\n\n\t\t\tvertex.x = radius * Math.cos( segment );\n\t\t\tvertex.y = radius * Math.sin( segment );\n\n\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t// normal\n\n\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t// uvs\n\n\t\t\tuv.x = ( vertices[ i ] / radius + 1 ) / 2;\n\t\t\tuv.y = ( vertices[ i + 1 ] / radius + 1 ) / 2;\n\n\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\tindices.push( i, i + 1, 0 );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass CylinderGeometry extends BufferGeometry {\n\n\tconstructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\t\tthis.type = 'CylinderGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradiusTop: radiusTop,\n\t\t\tradiusBottom: radiusBottom,\n\t\t\theight: height,\n\t\t\tradialSegments: radialSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\topenEnded: openEnded,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tconst scope = this;\n\n\t\tradialSegments = Math.floor( radialSegments );\n\t\theightSegments = Math.floor( heightSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet index = 0;\n\t\tconst indexArray = [];\n\t\tconst halfHeight = height / 2;\n\t\tlet groupStart = 0;\n\n\t\t// generate geometry\n\n\t\tgenerateTorso();\n\n\t\tif ( openEnded === false ) {\n\n\t\t\tif ( radiusTop > 0 ) generateCap( true );\n\t\t\tif ( radiusBottom > 0 ) generateCap( false );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\tfunction generateTorso() {\n\n\t\t\tconst normal = new Vector3();\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tlet groupCount = 0;\n\n\t\t\t// this will be used to calculate the normal\n\t\t\tconst slope = ( radiusBottom - radiusTop ) / height;\n\n\t\t\t// generate vertices, normals and uvs\n\n\t\t\tfor ( let y = 0; y <= heightSegments; y ++ ) {\n\n\t\t\t\tconst indexRow = [];\n\n\t\t\t\tconst v = y / heightSegments;\n\n\t\t\t\t// calculate the radius of the current row\n\n\t\t\t\tconst radius = v * ( radiusBottom - radiusTop ) + radiusTop;\n\n\t\t\t\tfor ( let x = 0; x <= radialSegments; x ++ ) {\n\n\t\t\t\t\tconst u = x / radialSegments;\n\n\t\t\t\t\tconst theta = u * thetaLength + thetaStart;\n\n\t\t\t\t\tconst sinTheta = Math.sin( theta );\n\t\t\t\t\tconst cosTheta = Math.cos( theta );\n\n\t\t\t\t\t// vertex\n\n\t\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\t\tvertex.y = - v * height + halfHeight;\n\t\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t\t// normal\n\n\t\t\t\t\tnormal.set( sinTheta, slope, cosTheta ).normalize();\n\t\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t\t// uv\n\n\t\t\t\t\tuvs.push( u, 1 - v );\n\n\t\t\t\t\t// save index of vertex in respective row\n\n\t\t\t\t\tindexRow.push( index ++ );\n\n\t\t\t\t}\n\n\t\t\t\t// now save vertices of the row in our index array\n\n\t\t\t\tindexArray.push( indexRow );\n\n\t\t\t}\n\n\t\t\t// generate indices\n\n\t\t\tfor ( let x = 0; x < radialSegments; x ++ ) {\n\n\t\t\t\tfor ( let y = 0; y < heightSegments; y ++ ) {\n\n\t\t\t\t\t// we use the index array to access the correct indices\n\n\t\t\t\t\tconst a = indexArray[ y ][ x ];\n\t\t\t\t\tconst b = indexArray[ y + 1 ][ x ];\n\t\t\t\t\tconst c = indexArray[ y + 1 ][ x + 1 ];\n\t\t\t\t\tconst d = indexArray[ y ][ x + 1 ];\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t\t// update group counter\n\n\t\t\t\t\tgroupCount += 6;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, 0 );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t}\n\n\t\tfunction generateCap( top ) {\n\n\t\t\t// save the index of the first center vertex\n\t\t\tconst centerIndexStart = index;\n\n\t\t\tconst uv = new Vector2();\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tlet groupCount = 0;\n\n\t\t\tconst radius = ( top === true ) ? radiusTop : radiusBottom;\n\t\t\tconst sign = ( top === true ) ? 1 : - 1;\n\n\t\t\t// first we generate the center vertex data of the cap.\n\t\t\t// because the geometry needs one set of uvs per face,\n\t\t\t// we must generate a center vertex per face/segment\n\n\t\t\tfor ( let x = 1; x <= radialSegments; x ++ ) {\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertices.push( 0, halfHeight * sign, 0 );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, sign, 0 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( 0.5, 0.5 );\n\n\t\t\t\t// increase index\n\n\t\t\t\tindex ++;\n\n\t\t\t}\n\n\t\t\t// save the index of the last center vertex\n\t\t\tconst centerIndexEnd = index;\n\n\t\t\t// now we generate the surrounding vertices, normals and uvs\n\n\t\t\tfor ( let x = 0; x <= radialSegments; x ++ ) {\n\n\t\t\t\tconst u = x / radialSegments;\n\t\t\t\tconst theta = u * thetaLength + thetaStart;\n\n\t\t\t\tconst cosTheta = Math.cos( theta );\n\t\t\t\tconst sinTheta = Math.sin( theta );\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\tvertex.y = halfHeight * sign;\n\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, sign, 0 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = ( cosTheta * 0.5 ) + 0.5;\n\t\t\t\tuv.y = ( sinTheta * 0.5 * sign ) + 0.5;\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t// increase index\n\n\t\t\t\tindex ++;\n\n\t\t\t}\n\n\t\t\t// generate indices\n\n\t\t\tfor ( let x = 0; x < radialSegments; x ++ ) {\n\n\t\t\t\tconst c = centerIndexStart + x;\n\t\t\t\tconst i = centerIndexEnd + x;\n\n\t\t\t\tif ( top === true ) {\n\n\t\t\t\t\t// face top\n\n\t\t\t\t\tindices.push( i, i + 1, c );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// face bottom\n\n\t\t\t\t\tindices.push( i + 1, i, c );\n\n\t\t\t\t}\n\n\t\t\t\tgroupCount += 3;\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, top === true ? 1 : 2 );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass ConeGeometry extends CylinderGeometry {\n\n\tconstructor( radius = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );\n\n\t\tthis.type = 'ConeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\theight: height,\n\t\t\tradialSegments: radialSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\topenEnded: openEnded,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass PolyhedronGeometry extends BufferGeometry {\n\n\tconstructor( vertices, indices, radius = 1, detail = 0 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PolyhedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tvertices: vertices,\n\t\t\tindices: indices,\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t\t// default buffer data\n\n\t\tconst vertexBuffer = [];\n\t\tconst uvBuffer = [];\n\n\t\t// the subdivision creates the vertex buffer data\n\n\t\tsubdivide( detail );\n\n\t\t// all vertices should lie on a conceptual sphere with a given radius\n\n\t\tapplyRadius( radius );\n\n\t\t// finally, create the uv data\n\n\t\tgenerateUVs();\n\n\t\t// build non-indexed geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertexBuffer, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( vertexBuffer.slice(), 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvBuffer, 2 ) );\n\n\t\tif ( detail === 0 ) {\n\n\t\t\tthis.computeVertexNormals(); // flat normals\n\n\t\t} else {\n\n\t\t\tthis.normalizeNormals(); // smooth normals\n\n\t\t}\n\n\t\t// helper functions\n\n\t\tfunction subdivide( detail ) {\n\n\t\t\tconst a = new Vector3();\n\t\t\tconst b = new Vector3();\n\t\t\tconst c = new Vector3();\n\n\t\t\t// iterate over all faces and apply a subdivison with the given detail value\n\n\t\t\tfor ( let i = 0; i < indices.length; i += 3 ) {\n\n\t\t\t\t// get the vertices of the face\n\n\t\t\t\tgetVertexByIndex( indices[ i + 0 ], a );\n\t\t\t\tgetVertexByIndex( indices[ i + 1 ], b );\n\t\t\t\tgetVertexByIndex( indices[ i + 2 ], c );\n\n\t\t\t\t// perform subdivision\n\n\t\t\t\tsubdivideFace( a, b, c, detail );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction subdivideFace( a, b, c, detail ) {\n\n\t\t\tconst cols = detail + 1;\n\n\t\t\t// we use this multidimensional array as a data structure for creating the subdivision\n\n\t\t\tconst v = [];\n\n\t\t\t// construct all of the vertices for this subdivision\n\n\t\t\tfor ( let i = 0; i <= cols; i ++ ) {\n\n\t\t\t\tv[ i ] = [];\n\n\t\t\t\tconst aj = a.clone().lerp( c, i / cols );\n\t\t\t\tconst bj = b.clone().lerp( c, i / cols );\n\n\t\t\t\tconst rows = cols - i;\n\n\t\t\t\tfor ( let j = 0; j <= rows; j ++ ) {\n\n\t\t\t\t\tif ( j === 0 && i === cols ) {\n\n\t\t\t\t\t\tv[ i ][ j ] = aj;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tv[ i ][ j ] = aj.clone().lerp( bj, j / rows );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// construct all of the faces\n\n\t\t\tfor ( let i = 0; i < cols; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j < 2 * ( cols - i ) - 1; j ++ ) {\n\n\t\t\t\t\tconst k = Math.floor( j / 2 );\n\n\t\t\t\t\tif ( j % 2 === 0 ) {\n\n\t\t\t\t\t\tpushVertex( v[ i ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k ] );\n\t\t\t\t\t\tpushVertex( v[ i ][ k ] );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tpushVertex( v[ i ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction applyRadius( radius ) {\n\n\t\t\tconst vertex = new Vector3();\n\n\t\t\t// iterate over the entire buffer and apply the radius to each vertex\n\n\t\t\tfor ( let i = 0; i < vertexBuffer.length; i += 3 ) {\n\n\t\t\t\tvertex.x = vertexBuffer[ i + 0 ];\n\t\t\t\tvertex.y = vertexBuffer[ i + 1 ];\n\t\t\t\tvertex.z = vertexBuffer[ i + 2 ];\n\n\t\t\t\tvertex.normalize().multiplyScalar( radius );\n\n\t\t\t\tvertexBuffer[ i + 0 ] = vertex.x;\n\t\t\t\tvertexBuffer[ i + 1 ] = vertex.y;\n\t\t\t\tvertexBuffer[ i + 2 ] = vertex.z;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateUVs() {\n\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tfor ( let i = 0; i < vertexBuffer.length; i += 3 ) {\n\n\t\t\t\tvertex.x = vertexBuffer[ i + 0 ];\n\t\t\t\tvertex.y = vertexBuffer[ i + 1 ];\n\t\t\t\tvertex.z = vertexBuffer[ i + 2 ];\n\n\t\t\t\tconst u = azimuth( vertex ) / 2 / Math.PI + 0.5;\n\t\t\t\tconst v = inclination( vertex ) / Math.PI + 0.5;\n\t\t\t\tuvBuffer.push( u, 1 - v );\n\n\t\t\t}\n\n\t\t\tcorrectUVs();\n\n\t\t\tcorrectSeam();\n\n\t\t}\n\n\t\tfunction correctSeam() {\n\n\t\t\t// handle case when face straddles the seam, see #3269\n\n\t\t\tfor ( let i = 0; i < uvBuffer.length; i += 6 ) {\n\n\t\t\t\t// uv data of a single face\n\n\t\t\t\tconst x0 = uvBuffer[ i + 0 ];\n\t\t\t\tconst x1 = uvBuffer[ i + 2 ];\n\t\t\t\tconst x2 = uvBuffer[ i + 4 ];\n\n\t\t\t\tconst max = Math.max( x0, x1, x2 );\n\t\t\t\tconst min = Math.min( x0, x1, x2 );\n\n\t\t\t\t// 0.9 is somewhat arbitrary\n\n\t\t\t\tif ( max > 0.9 && min < 0.1 ) {\n\n\t\t\t\t\tif ( x0 < 0.2 ) uvBuffer[ i + 0 ] += 1;\n\t\t\t\t\tif ( x1 < 0.2 ) uvBuffer[ i + 2 ] += 1;\n\t\t\t\t\tif ( x2 < 0.2 ) uvBuffer[ i + 4 ] += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction pushVertex( vertex ) {\n\n\t\t\tvertexBuffer.push( vertex.x, vertex.y, vertex.z );\n\n\t\t}\n\n\t\tfunction getVertexByIndex( index, vertex ) {\n\n\t\t\tconst stride = index * 3;\n\n\t\t\tvertex.x = vertices[ stride + 0 ];\n\t\t\tvertex.y = vertices[ stride + 1 ];\n\t\t\tvertex.z = vertices[ stride + 2 ];\n\n\t\t}\n\n\t\tfunction correctUVs() {\n\n\t\t\tconst a = new Vector3();\n\t\t\tconst b = new Vector3();\n\t\t\tconst c = new Vector3();\n\n\t\t\tconst centroid = new Vector3();\n\n\t\t\tconst uvA = new Vector2();\n\t\t\tconst uvB = new Vector2();\n\t\t\tconst uvC = new Vector2();\n\n\t\t\tfor ( let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6 ) {\n\n\t\t\t\ta.set( vertexBuffer[ i + 0 ], vertexBuffer[ i + 1 ], vertexBuffer[ i + 2 ] );\n\t\t\t\tb.set( vertexBuffer[ i + 3 ], vertexBuffer[ i + 4 ], vertexBuffer[ i + 5 ] );\n\t\t\t\tc.set( vertexBuffer[ i + 6 ], vertexBuffer[ i + 7 ], vertexBuffer[ i + 8 ] );\n\n\t\t\t\tuvA.set( uvBuffer[ j + 0 ], uvBuffer[ j + 1 ] );\n\t\t\t\tuvB.set( uvBuffer[ j + 2 ], uvBuffer[ j + 3 ] );\n\t\t\t\tuvC.set( uvBuffer[ j + 4 ], uvBuffer[ j + 5 ] );\n\n\t\t\t\tcentroid.copy( a ).add( b ).add( c ).divideScalar( 3 );\n\n\t\t\t\tconst azi = azimuth( centroid );\n\n\t\t\t\tcorrectUV( uvA, j + 0, a, azi );\n\t\t\t\tcorrectUV( uvB, j + 2, b, azi );\n\t\t\t\tcorrectUV( uvC, j + 4, c, azi );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction correctUV( uv, stride, vector, azimuth ) {\n\n\t\t\tif ( ( azimuth < 0 ) && ( uv.x === 1 ) ) {\n\n\t\t\t\tuvBuffer[ stride ] = uv.x - 1;\n\n\t\t\t}\n\n\t\t\tif ( ( vector.x === 0 ) && ( vector.z === 0 ) ) {\n\n\t\t\t\tuvBuffer[ stride ] = azimuth / 2 / Math.PI + 0.5;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Angle around the Y axis, counter-clockwise when looking from above.\n\n\t\tfunction azimuth( vector ) {\n\n\t\t\treturn Math.atan2( vector.z, - vector.x );\n\n\t\t}\n\n\n\t\t// Angle above the XZ plane.\n\n\t\tfunction inclination( vector ) {\n\n\t\t\treturn Math.atan2( - vector.y, Math.sqrt( ( vector.x * vector.x ) + ( vector.z * vector.z ) ) );\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details );\n\n\t}\n\n}\n\nclass DodecahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst t = ( 1 + Math.sqrt( 5 ) ) / 2;\n\t\tconst r = 1 / t;\n\n\t\tconst vertices = [\n\n\t\t\t// (±1, ±1, ±1)\n\t\t\t- 1, - 1, - 1,\t- 1, - 1, 1,\n\t\t\t- 1, 1, - 1, - 1, 1, 1,\n\t\t\t1, - 1, - 1, 1, - 1, 1,\n\t\t\t1, 1, - 1, 1, 1, 1,\n\n\t\t\t// (0, ±1/φ, ±φ)\n\t\t\t0, - r, - t, 0, - r, t,\n\t\t\t0, r, - t, 0, r, t,\n\n\t\t\t// (±1/φ, ±φ, 0)\n\t\t\t- r, - t, 0, - r, t, 0,\n\t\t\tr, - t, 0, r, t, 0,\n\n\t\t\t// (±φ, 0, ±1/φ)\n\t\t\t- t, 0, - r, t, 0, - r,\n\t\t\t- t, 0, r, t, 0, r\n\t\t];\n\n\t\tconst indices = [\n\t\t\t3, 11, 7, \t3, 7, 15, \t3, 15, 13,\n\t\t\t7, 19, 17, \t7, 17, 6, \t7, 6, 15,\n\t\t\t17, 4, 8, \t17, 8, 10, \t17, 10, 6,\n\t\t\t8, 0, 16, \t8, 16, 2, \t8, 2, 10,\n\t\t\t0, 12, 1, \t0, 1, 18, \t0, 18, 16,\n\t\t\t6, 10, 2, \t6, 2, 13, \t6, 13, 15,\n\t\t\t2, 16, 18, \t2, 18, 3, \t2, 3, 13,\n\t\t\t18, 1, 9, \t18, 9, 11, \t18, 11, 3,\n\t\t\t4, 14, 12, \t4, 12, 0, \t4, 0, 8,\n\t\t\t11, 9, 5, \t11, 5, 19, \t11, 19, 7,\n\t\t\t19, 5, 14, \t19, 14, 4, \t19, 4, 17,\n\t\t\t1, 12, 14, \t1, 14, 5, \t1, 5, 9\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'DodecahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new DodecahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nconst _v0 = new Vector3();\nconst _v1$1 = new Vector3();\nconst _normal = new Vector3();\nconst _triangle = new Triangle();\n\nclass EdgesGeometry extends BufferGeometry {\n\n\tconstructor( geometry, thresholdAngle ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'EdgesGeometry';\n\n\t\tthis.parameters = {\n\t\t\tthresholdAngle: thresholdAngle\n\t\t};\n\n\t\tthresholdAngle = ( thresholdAngle !== undefined ) ? thresholdAngle : 1;\n\n\t\tif ( geometry.isGeometry === true ) {\n\n\t\t\tconsole.error( 'THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst precisionPoints = 4;\n\t\tconst precision = Math.pow( 10, precisionPoints );\n\t\tconst thresholdDot = Math.cos( DEG2RAD * thresholdAngle );\n\n\t\tconst indexAttr = geometry.getIndex();\n\t\tconst positionAttr = geometry.getAttribute( 'position' );\n\t\tconst indexCount = indexAttr ? indexAttr.count : positionAttr.count;\n\n\t\tconst indexArr = [ 0, 0, 0 ];\n\t\tconst vertKeys = [ 'a', 'b', 'c' ];\n\t\tconst hashes = new Array( 3 );\n\n\t\tconst edgeData = {};\n\t\tconst vertices = [];\n\t\tfor ( let i = 0; i < indexCount; i += 3 ) {\n\n\t\t\tif ( indexAttr ) {\n\n\t\t\t\tindexArr[ 0 ] = indexAttr.getX( i );\n\t\t\t\tindexArr[ 1 ] = indexAttr.getX( i + 1 );\n\t\t\t\tindexArr[ 2 ] = indexAttr.getX( i + 2 );\n\n\t\t\t} else {\n\n\t\t\t\tindexArr[ 0 ] = i;\n\t\t\t\tindexArr[ 1 ] = i + 1;\n\t\t\t\tindexArr[ 2 ] = i + 2;\n\n\t\t\t}\n\n\t\t\tconst { a, b, c } = _triangle;\n\t\t\ta.fromBufferAttribute( positionAttr, indexArr[ 0 ] );\n\t\t\tb.fromBufferAttribute( positionAttr, indexArr[ 1 ] );\n\t\t\tc.fromBufferAttribute( positionAttr, indexArr[ 2 ] );\n\t\t\t_triangle.getNormal( _normal );\n\n\t\t\t// create hashes for the edge from the vertices\n\t\t\thashes[ 0 ] = `${ Math.round( a.x * precision ) },${ Math.round( a.y * precision ) },${ Math.round( a.z * precision ) }`;\n\t\t\thashes[ 1 ] = `${ Math.round( b.x * precision ) },${ Math.round( b.y * precision ) },${ Math.round( b.z * precision ) }`;\n\t\t\thashes[ 2 ] = `${ Math.round( c.x * precision ) },${ Math.round( c.y * precision ) },${ Math.round( c.z * precision ) }`;\n\n\t\t\t// skip degenerate triangles\n\t\t\tif ( hashes[ 0 ] === hashes[ 1 ] || hashes[ 1 ] === hashes[ 2 ] || hashes[ 2 ] === hashes[ 0 ] ) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t// iterate over every edge\n\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t// get the first and next vertex making up the edge\n\t\t\t\tconst jNext = ( j + 1 ) % 3;\n\t\t\t\tconst vecHash0 = hashes[ j ];\n\t\t\t\tconst vecHash1 = hashes[ jNext ];\n\t\t\t\tconst v0 = _triangle[ vertKeys[ j ] ];\n\t\t\t\tconst v1 = _triangle[ vertKeys[ jNext ] ];\n\n\t\t\t\tconst hash = `${ vecHash0 }_${ vecHash1 }`;\n\t\t\t\tconst reverseHash = `${ vecHash1 }_${ vecHash0 }`;\n\n\t\t\t\tif ( reverseHash in edgeData && edgeData[ reverseHash ] ) {\n\n\t\t\t\t\t// if we found a sibling edge add it into the vertex array if\n\t\t\t\t\t// it meets the angle threshold and delete the edge from the map.\n\t\t\t\t\tif ( _normal.dot( edgeData[ reverseHash ].normal ) <= thresholdDot ) {\n\n\t\t\t\t\t\tvertices.push( v0.x, v0.y, v0.z );\n\t\t\t\t\t\tvertices.push( v1.x, v1.y, v1.z );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tedgeData[ reverseHash ] = null;\n\n\t\t\t\t} else if ( ! ( hash in edgeData ) ) {\n\n\t\t\t\t\t// if we've already got an edge here then skip adding a new one\n\t\t\t\t\tedgeData[ hash ] = {\n\n\t\t\t\t\t\tindex0: indexArr[ j ],\n\t\t\t\t\t\tindex1: indexArr[ jNext ],\n\t\t\t\t\t\tnormal: _normal.clone(),\n\n\t\t\t\t\t};\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// iterate over all remaining, unmatched edges and add them to the vertex array\n\t\tfor ( const key in edgeData ) {\n\n\t\t\tif ( edgeData[ key ] ) {\n\n\t\t\t\tconst { index0, index1 } = edgeData[ key ];\n\t\t\t\t_v0.fromBufferAttribute( positionAttr, index0 );\n\t\t\t\t_v1$1.fromBufferAttribute( positionAttr, index1 );\n\n\t\t\t\tvertices.push( _v0.x, _v0.y, _v0.z );\n\t\t\t\tvertices.push( _v1$1.x, _v1$1.y, _v1$1.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\n\t}\n\n}\n\n/**\n * Extensible curve object.\n *\n * Some common of curve methods:\n * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget )\n * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget )\n * .getPoints(), .getSpacedPoints()\n * .getLength()\n * .updateArcLengths()\n *\n * This following curves inherit from THREE.Curve:\n *\n * -- 2D curves --\n * THREE.ArcCurve\n * THREE.CubicBezierCurve\n * THREE.EllipseCurve\n * THREE.LineCurve\n * THREE.QuadraticBezierCurve\n * THREE.SplineCurve\n *\n * -- 3D curves --\n * THREE.CatmullRomCurve3\n * THREE.CubicBezierCurve3\n * THREE.LineCurve3\n * THREE.QuadraticBezierCurve3\n *\n * A series of curves can be represented as a THREE.CurvePath.\n *\n **/\n\nclass Curve {\n\n\tconstructor() {\n\n\t\tthis.type = 'Curve';\n\n\t\tthis.arcLengthDivisions = 200;\n\n\t}\n\n\t// Virtual base class method to overwrite and implement in subclasses\n\t//\t- t [0 .. 1]\n\n\tgetPoint( /* t, optionalTarget */ ) {\n\n\t\tconsole.warn( 'THREE.Curve: .getPoint() not implemented.' );\n\t\treturn null;\n\n\t}\n\n\t// Get point at relative position in curve according to arc length\n\t// - u [0 .. 1]\n\n\tgetPointAt( u, optionalTarget ) {\n\n\t\tconst t = this.getUtoTmapping( u );\n\t\treturn this.getPoint( t, optionalTarget );\n\n\t}\n\n\t// Get sequence of points using getPoint( t )\n\n\tgetPoints( divisions = 5 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let d = 0; d <= divisions; d ++ ) {\n\n\t\t\tpoints.push( this.getPoint( d / divisions ) );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\t// Get sequence of points using getPointAt( u )\n\n\tgetSpacedPoints( divisions = 5 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let d = 0; d <= divisions; d ++ ) {\n\n\t\t\tpoints.push( this.getPointAt( d / divisions ) );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\t// Get total curve arc length\n\n\tgetLength() {\n\n\t\tconst lengths = this.getLengths();\n\t\treturn lengths[ lengths.length - 1 ];\n\n\t}\n\n\t// Get list of cumulative segment lengths\n\n\tgetLengths( divisions = this.arcLengthDivisions ) {\n\n\t\tif ( this.cacheArcLengths &&\n\t\t\t( this.cacheArcLengths.length === divisions + 1 ) &&\n\t\t\t! this.needsUpdate ) {\n\n\t\t\treturn this.cacheArcLengths;\n\n\t\t}\n\n\t\tthis.needsUpdate = false;\n\n\t\tconst cache = [];\n\t\tlet current, last = this.getPoint( 0 );\n\t\tlet sum = 0;\n\n\t\tcache.push( 0 );\n\n\t\tfor ( let p = 1; p <= divisions; p ++ ) {\n\n\t\t\tcurrent = this.getPoint( p / divisions );\n\t\t\tsum += current.distanceTo( last );\n\t\t\tcache.push( sum );\n\t\t\tlast = current;\n\n\t\t}\n\n\t\tthis.cacheArcLengths = cache;\n\n\t\treturn cache; // { sums: cache, sum: sum }; Sum is in the last element.\n\n\t}\n\n\tupdateArcLengths() {\n\n\t\tthis.needsUpdate = true;\n\t\tthis.getLengths();\n\n\t}\n\n\t// Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\n\n\tgetUtoTmapping( u, distance ) {\n\n\t\tconst arcLengths = this.getLengths();\n\n\t\tlet i = 0;\n\t\tconst il = arcLengths.length;\n\n\t\tlet targetArcLength; // The targeted u distance value to get\n\n\t\tif ( distance ) {\n\n\t\t\ttargetArcLength = distance;\n\n\t\t} else {\n\n\t\t\ttargetArcLength = u * arcLengths[ il - 1 ];\n\n\t\t}\n\n\t\t// binary search for the index with largest value smaller than target u distance\n\n\t\tlet low = 0, high = il - 1, comparison;\n\n\t\twhile ( low <= high ) {\n\n\t\t\ti = Math.floor( low + ( high - low ) / 2 ); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n\n\t\t\tcomparison = arcLengths[ i ] - targetArcLength;\n\n\t\t\tif ( comparison < 0 ) {\n\n\t\t\t\tlow = i + 1;\n\n\t\t\t} else if ( comparison > 0 ) {\n\n\t\t\t\thigh = i - 1;\n\n\t\t\t} else {\n\n\t\t\t\thigh = i;\n\t\t\t\tbreak;\n\n\t\t\t\t// DONE\n\n\t\t\t}\n\n\t\t}\n\n\t\ti = high;\n\n\t\tif ( arcLengths[ i ] === targetArcLength ) {\n\n\t\t\treturn i / ( il - 1 );\n\n\t\t}\n\n\t\t// we could get finer grain at lengths, or use simple interpolation between two points\n\n\t\tconst lengthBefore = arcLengths[ i ];\n\t\tconst lengthAfter = arcLengths[ i + 1 ];\n\n\t\tconst segmentLength = lengthAfter - lengthBefore;\n\n\t\t// determine where we are between the 'before' and 'after' points\n\n\t\tconst segmentFraction = ( targetArcLength - lengthBefore ) / segmentLength;\n\n\t\t// add that fractional amount to t\n\n\t\tconst t = ( i + segmentFraction ) / ( il - 1 );\n\n\t\treturn t;\n\n\t}\n\n\t// Returns a unit vector tangent at t\n\t// In case any sub curve does not implement its tangent derivation,\n\t// 2 points a small delta apart will be used to find its gradient\n\t// which seems to give a reasonable approximation\n\n\tgetTangent( t, optionalTarget ) {\n\n\t\tconst delta = 0.0001;\n\t\tlet t1 = t - delta;\n\t\tlet t2 = t + delta;\n\n\t\t// Capping in case of danger\n\n\t\tif ( t1 < 0 ) t1 = 0;\n\t\tif ( t2 > 1 ) t2 = 1;\n\n\t\tconst pt1 = this.getPoint( t1 );\n\t\tconst pt2 = this.getPoint( t2 );\n\n\t\tconst tangent = optionalTarget || ( ( pt1.isVector2 ) ? new Vector2() : new Vector3() );\n\n\t\ttangent.copy( pt2 ).sub( pt1 ).normalize();\n\n\t\treturn tangent;\n\n\t}\n\n\tgetTangentAt( u, optionalTarget ) {\n\n\t\tconst t = this.getUtoTmapping( u );\n\t\treturn this.getTangent( t, optionalTarget );\n\n\t}\n\n\tcomputeFrenetFrames( segments, closed ) {\n\n\t\t// see http://www.cs.indiana.edu/pub/techreports/TR425.pdf\n\n\t\tconst normal = new Vector3();\n\n\t\tconst tangents = [];\n\t\tconst normals = [];\n\t\tconst binormals = [];\n\n\t\tconst vec = new Vector3();\n\t\tconst mat = new Matrix4();\n\n\t\t// compute the tangent vectors for each segment on the curve\n\n\t\tfor ( let i = 0; i <= segments; i ++ ) {\n\n\t\t\tconst u = i / segments;\n\n\t\t\ttangents[ i ] = this.getTangentAt( u, new Vector3() );\n\t\t\ttangents[ i ].normalize();\n\n\t\t}\n\n\t\t// select an initial normal vector perpendicular to the first tangent vector,\n\t\t// and in the direction of the minimum tangent xyz component\n\n\t\tnormals[ 0 ] = new Vector3();\n\t\tbinormals[ 0 ] = new Vector3();\n\t\tlet min = Number.MAX_VALUE;\n\t\tconst tx = Math.abs( tangents[ 0 ].x );\n\t\tconst ty = Math.abs( tangents[ 0 ].y );\n\t\tconst tz = Math.abs( tangents[ 0 ].z );\n\n\t\tif ( tx <= min ) {\n\n\t\t\tmin = tx;\n\t\t\tnormal.set( 1, 0, 0 );\n\n\t\t}\n\n\t\tif ( ty <= min ) {\n\n\t\t\tmin = ty;\n\t\t\tnormal.set( 0, 1, 0 );\n\n\t\t}\n\n\t\tif ( tz <= min ) {\n\n\t\t\tnormal.set( 0, 0, 1 );\n\n\t\t}\n\n\t\tvec.crossVectors( tangents[ 0 ], normal ).normalize();\n\n\t\tnormals[ 0 ].crossVectors( tangents[ 0 ], vec );\n\t\tbinormals[ 0 ].crossVectors( tangents[ 0 ], normals[ 0 ] );\n\n\n\t\t// compute the slowly-varying normal and binormal vectors for each segment on the curve\n\n\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\tnormals[ i ] = normals[ i - 1 ].clone();\n\n\t\t\tbinormals[ i ] = binormals[ i - 1 ].clone();\n\n\t\t\tvec.crossVectors( tangents[ i - 1 ], tangents[ i ] );\n\n\t\t\tif ( vec.length() > Number.EPSILON ) {\n\n\t\t\t\tvec.normalize();\n\n\t\t\t\tconst theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), - 1, 1 ) ); // clamp for floating pt errors\n\n\t\t\t\tnormals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) );\n\n\t\t\t}\n\n\t\t\tbinormals[ i ].crossVectors( tangents[ i ], normals[ i ] );\n\n\t\t}\n\n\t\t// if the curve is closed, postprocess the vectors so the first and last normal vectors are the same\n\n\t\tif ( closed === true ) {\n\n\t\t\tlet theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), - 1, 1 ) );\n\t\t\ttheta /= segments;\n\n\t\t\tif ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) {\n\n\t\t\t\ttheta = - theta;\n\n\t\t\t}\n\n\t\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\t\t// twist a little...\n\t\t\t\tnormals[ i ].applyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) );\n\t\t\t\tbinormals[ i ].crossVectors( tangents[ i ], normals[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttangents: tangents,\n\t\t\tnormals: normals,\n\t\t\tbinormals: binormals\n\t\t};\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.arcLengthDivisions = source.arcLengthDivisions;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Curve',\n\t\t\t\tgenerator: 'Curve.toJSON'\n\t\t\t}\n\t\t};\n\n\t\tdata.arcLengthDivisions = this.arcLengthDivisions;\n\t\tdata.type = this.type;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tthis.arcLengthDivisions = json.arcLengthDivisions;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass EllipseCurve extends Curve {\n\n\tconstructor( aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'EllipseCurve';\n\n\t\tthis.aX = aX;\n\t\tthis.aY = aY;\n\n\t\tthis.xRadius = xRadius;\n\t\tthis.yRadius = yRadius;\n\n\t\tthis.aStartAngle = aStartAngle;\n\t\tthis.aEndAngle = aEndAngle;\n\n\t\tthis.aClockwise = aClockwise;\n\n\t\tthis.aRotation = aRotation;\n\n\t}\n\n\tgetPoint( t, optionalTarget ) {\n\n\t\tconst point = optionalTarget || new Vector2();\n\n\t\tconst twoPi = Math.PI * 2;\n\t\tlet deltaAngle = this.aEndAngle - this.aStartAngle;\n\t\tconst samePoints = Math.abs( deltaAngle ) < Number.EPSILON;\n\n\t\t// ensures that deltaAngle is 0 .. 2 PI\n\t\twhile ( deltaAngle < 0 ) deltaAngle += twoPi;\n\t\twhile ( deltaAngle > twoPi ) deltaAngle -= twoPi;\n\n\t\tif ( deltaAngle < Number.EPSILON ) {\n\n\t\t\tif ( samePoints ) {\n\n\t\t\t\tdeltaAngle = 0;\n\n\t\t\t} else {\n\n\t\t\t\tdeltaAngle = twoPi;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.aClockwise === true && ! samePoints ) {\n\n\t\t\tif ( deltaAngle === twoPi ) {\n\n\t\t\t\tdeltaAngle = - twoPi;\n\n\t\t\t} else {\n\n\t\t\t\tdeltaAngle = deltaAngle - twoPi;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst angle = this.aStartAngle + t * deltaAngle;\n\t\tlet x = this.aX + this.xRadius * Math.cos( angle );\n\t\tlet y = this.aY + this.yRadius * Math.sin( angle );\n\n\t\tif ( this.aRotation !== 0 ) {\n\n\t\t\tconst cos = Math.cos( this.aRotation );\n\t\t\tconst sin = Math.sin( this.aRotation );\n\n\t\t\tconst tx = x - this.aX;\n\t\t\tconst ty = y - this.aY;\n\n\t\t\t// Rotate the point about the center of the ellipse.\n\t\t\tx = tx * cos - ty * sin + this.aX;\n\t\t\ty = tx * sin + ty * cos + this.aY;\n\n\t\t}\n\n\t\treturn point.set( x, y );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.aX = source.aX;\n\t\tthis.aY = source.aY;\n\n\t\tthis.xRadius = source.xRadius;\n\t\tthis.yRadius = source.yRadius;\n\n\t\tthis.aStartAngle = source.aStartAngle;\n\t\tthis.aEndAngle = source.aEndAngle;\n\n\t\tthis.aClockwise = source.aClockwise;\n\n\t\tthis.aRotation = source.aRotation;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.aX = this.aX;\n\t\tdata.aY = this.aY;\n\n\t\tdata.xRadius = this.xRadius;\n\t\tdata.yRadius = this.yRadius;\n\n\t\tdata.aStartAngle = this.aStartAngle;\n\t\tdata.aEndAngle = this.aEndAngle;\n\n\t\tdata.aClockwise = this.aClockwise;\n\n\t\tdata.aRotation = this.aRotation;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.aX = json.aX;\n\t\tthis.aY = json.aY;\n\n\t\tthis.xRadius = json.xRadius;\n\t\tthis.yRadius = json.yRadius;\n\n\t\tthis.aStartAngle = json.aStartAngle;\n\t\tthis.aEndAngle = json.aEndAngle;\n\n\t\tthis.aClockwise = json.aClockwise;\n\n\t\tthis.aRotation = json.aRotation;\n\n\t\treturn this;\n\n\t}\n\n}\n\nEllipseCurve.prototype.isEllipseCurve = true;\n\nclass ArcCurve extends EllipseCurve {\n\n\tconstructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tsuper( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );\n\n\t\tthis.type = 'ArcCurve';\n\n\t}\n\n}\n\nArcCurve.prototype.isArcCurve = true;\n\n/**\n * Centripetal CatmullRom Curve - which is useful for avoiding\n * cusps and self-intersections in non-uniform catmull rom curves.\n * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\n *\n * curve.type accepts centripetal(default), chordal and catmullrom\n * curve.tension is used for catmullrom which defaults to 0.5\n */\n\n\n/*\nBased on an optimized c++ solution in\n - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/\n - http://ideone.com/NoEbVM\n\nThis CubicPoly class could be used for reusing some variables and calculations,\nbut for three.js curve use, it could be possible inlined and flatten into a single function call\nwhich can be placed in CurveUtils.\n*/\n\nfunction CubicPoly() {\n\n\tlet c0 = 0, c1 = 0, c2 = 0, c3 = 0;\n\n\t/*\n\t * Compute coefficients for a cubic polynomial\n\t * p(s) = c0 + c1*s + c2*s^2 + c3*s^3\n\t * such that\n\t * p(0) = x0, p(1) = x1\n\t * and\n\t * p'(0) = t0, p'(1) = t1.\n\t */\n\tfunction init( x0, x1, t0, t1 ) {\n\n\t\tc0 = x0;\n\t\tc1 = t0;\n\t\tc2 = - 3 * x0 + 3 * x1 - 2 * t0 - t1;\n\t\tc3 = 2 * x0 - 2 * x1 + t0 + t1;\n\n\t}\n\n\treturn {\n\n\t\tinitCatmullRom: function ( x0, x1, x2, x3, tension ) {\n\n\t\t\tinit( x1, x2, tension * ( x2 - x0 ), tension * ( x3 - x1 ) );\n\n\t\t},\n\n\t\tinitNonuniformCatmullRom: function ( x0, x1, x2, x3, dt0, dt1, dt2 ) {\n\n\t\t\t// compute tangents when parameterized in [t1,t2]\n\t\t\tlet t1 = ( x1 - x0 ) / dt0 - ( x2 - x0 ) / ( dt0 + dt1 ) + ( x2 - x1 ) / dt1;\n\t\t\tlet t2 = ( x2 - x1 ) / dt1 - ( x3 - x1 ) / ( dt1 + dt2 ) + ( x3 - x2 ) / dt2;\n\n\t\t\t// rescale tangents for parametrization in [0,1]\n\t\t\tt1 *= dt1;\n\t\t\tt2 *= dt1;\n\n\t\t\tinit( x1, x2, t1, t2 );\n\n\t\t},\n\n\t\tcalc: function ( t ) {\n\n\t\t\tconst t2 = t * t;\n\t\t\tconst t3 = t2 * t;\n\t\t\treturn c0 + c1 * t + c2 * t2 + c3 * t3;\n\n\t\t}\n\n\t};\n\n}\n\n//\n\nconst tmp = new Vector3();\nconst px = new CubicPoly(), py = new CubicPoly(), pz = new CubicPoly();\n\nclass CatmullRomCurve3 extends Curve {\n\n\tconstructor( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CatmullRomCurve3';\n\n\t\tthis.points = points;\n\t\tthis.closed = closed;\n\t\tthis.curveType = curveType;\n\t\tthis.tension = tension;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst points = this.points;\n\t\tconst l = points.length;\n\n\t\tconst p = ( l - ( this.closed ? 0 : 1 ) ) * t;\n\t\tlet intPoint = Math.floor( p );\n\t\tlet weight = p - intPoint;\n\n\t\tif ( this.closed ) {\n\n\t\t\tintPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l;\n\n\t\t} else if ( weight === 0 && intPoint === l - 1 ) {\n\n\t\t\tintPoint = l - 2;\n\t\t\tweight = 1;\n\n\t\t}\n\n\t\tlet p0, p3; // 4 points (p1 & p2 defined below)\n\n\t\tif ( this.closed || intPoint > 0 ) {\n\n\t\t\tp0 = points[ ( intPoint - 1 ) % l ];\n\n\t\t} else {\n\n\t\t\t// extrapolate first point\n\t\t\ttmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] );\n\t\t\tp0 = tmp;\n\n\t\t}\n\n\t\tconst p1 = points[ intPoint % l ];\n\t\tconst p2 = points[ ( intPoint + 1 ) % l ];\n\n\t\tif ( this.closed || intPoint + 2 < l ) {\n\n\t\t\tp3 = points[ ( intPoint + 2 ) % l ];\n\n\t\t} else {\n\n\t\t\t// extrapolate last point\n\t\t\ttmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] );\n\t\t\tp3 = tmp;\n\n\t\t}\n\n\t\tif ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) {\n\n\t\t\t// init Centripetal / Chordal Catmull-Rom\n\t\t\tconst pow = this.curveType === 'chordal' ? 0.5 : 0.25;\n\t\t\tlet dt0 = Math.pow( p0.distanceToSquared( p1 ), pow );\n\t\t\tlet dt1 = Math.pow( p1.distanceToSquared( p2 ), pow );\n\t\t\tlet dt2 = Math.pow( p2.distanceToSquared( p3 ), pow );\n\n\t\t\t// safety check for repeated points\n\t\t\tif ( dt1 < 1e-4 ) dt1 = 1.0;\n\t\t\tif ( dt0 < 1e-4 ) dt0 = dt1;\n\t\t\tif ( dt2 < 1e-4 ) dt2 = dt1;\n\n\t\t\tpx.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 );\n\t\t\tpy.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 );\n\t\t\tpz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 );\n\n\t\t} else if ( this.curveType === 'catmullrom' ) {\n\n\t\t\tpx.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension );\n\t\t\tpy.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension );\n\t\t\tpz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension );\n\n\t\t}\n\n\t\tpoint.set(\n\t\t\tpx.calc( weight ),\n\t\t\tpy.calc( weight ),\n\t\t\tpz.calc( weight )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = source.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = source.points[ i ];\n\n\t\t\tthis.points.push( point.clone() );\n\n\t\t}\n\n\t\tthis.closed = source.closed;\n\t\tthis.curveType = source.curveType;\n\t\tthis.tension = source.tension;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.points = [];\n\n\t\tfor ( let i = 0, l = this.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = this.points[ i ];\n\t\t\tdata.points.push( point.toArray() );\n\n\t\t}\n\n\t\tdata.closed = this.closed;\n\t\tdata.curveType = this.curveType;\n\t\tdata.tension = this.tension;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = json.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = json.points[ i ];\n\t\t\tthis.points.push( new Vector3().fromArray( point ) );\n\n\t\t}\n\n\t\tthis.closed = json.closed;\n\t\tthis.curveType = json.curveType;\n\t\tthis.tension = json.tension;\n\n\t\treturn this;\n\n\t}\n\n}\n\nCatmullRomCurve3.prototype.isCatmullRomCurve3 = true;\n\n/**\n * Bezier Curves formulas obtained from\n * http://en.wikipedia.org/wiki/Bézier_curve\n */\n\nfunction CatmullRom( t, p0, p1, p2, p3 ) {\n\n\tconst v0 = ( p2 - p0 ) * 0.5;\n\tconst v1 = ( p3 - p1 ) * 0.5;\n\tconst t2 = t * t;\n\tconst t3 = t * t2;\n\treturn ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;\n\n}\n\n//\n\nfunction QuadraticBezierP0( t, p ) {\n\n\tconst k = 1 - t;\n\treturn k * k * p;\n\n}\n\nfunction QuadraticBezierP1( t, p ) {\n\n\treturn 2 * ( 1 - t ) * t * p;\n\n}\n\nfunction QuadraticBezierP2( t, p ) {\n\n\treturn t * t * p;\n\n}\n\nfunction QuadraticBezier( t, p0, p1, p2 ) {\n\n\treturn QuadraticBezierP0( t, p0 ) + QuadraticBezierP1( t, p1 ) +\n\t\tQuadraticBezierP2( t, p2 );\n\n}\n\n//\n\nfunction CubicBezierP0( t, p ) {\n\n\tconst k = 1 - t;\n\treturn k * k * k * p;\n\n}\n\nfunction CubicBezierP1( t, p ) {\n\n\tconst k = 1 - t;\n\treturn 3 * k * k * t * p;\n\n}\n\nfunction CubicBezierP2( t, p ) {\n\n\treturn 3 * ( 1 - t ) * t * t * p;\n\n}\n\nfunction CubicBezierP3( t, p ) {\n\n\treturn t * t * t * p;\n\n}\n\nfunction CubicBezier( t, p0, p1, p2, p3 ) {\n\n\treturn CubicBezierP0( t, p0 ) + CubicBezierP1( t, p1 ) + CubicBezierP2( t, p2 ) +\n\t\tCubicBezierP3( t, p3 );\n\n}\n\nclass CubicBezierCurve extends Curve {\n\n\tconstructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CubicBezierCurve';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n\n\t\tpoint.set(\n\t\t\tCubicBezier( t, v0.x, v1.x, v2.x, v3.x ),\n\t\t\tCubicBezier( t, v0.y, v1.y, v2.y, v3.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\t\tthis.v3.copy( source.v3 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\t\tthis.v3.fromArray( json.v3 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nCubicBezierCurve.prototype.isCubicBezierCurve = true;\n\nclass CubicBezierCurve3 extends Curve {\n\n\tconstructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CubicBezierCurve3';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n\n\t\tpoint.set(\n\t\t\tCubicBezier( t, v0.x, v1.x, v2.x, v3.x ),\n\t\t\tCubicBezier( t, v0.y, v1.y, v2.y, v3.y ),\n\t\t\tCubicBezier( t, v0.z, v1.z, v2.z, v3.z )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\t\tthis.v3.copy( source.v3 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\t\tthis.v3.fromArray( json.v3 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nCubicBezierCurve3.prototype.isCubicBezierCurve3 = true;\n\nclass LineCurve extends Curve {\n\n\tconstructor( v1 = new Vector2(), v2 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineCurve';\n\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tif ( t === 1 ) {\n\n\t\t\tpoint.copy( this.v2 );\n\n\t\t} else {\n\n\t\t\tpoint.copy( this.v2 ).sub( this.v1 );\n\t\t\tpoint.multiplyScalar( t ).add( this.v1 );\n\n\t\t}\n\n\t\treturn point;\n\n\t}\n\n\t// Line curve is linear, so we can overwrite default getPointAt\n\tgetPointAt( u, optionalTarget ) {\n\n\t\treturn this.getPoint( u, optionalTarget );\n\n\t}\n\n\tgetTangent( t, optionalTarget ) {\n\n\t\tconst tangent = optionalTarget || new Vector2();\n\n\t\ttangent.copy( this.v2 ).sub( this.v1 ).normalize();\n\n\t\treturn tangent;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineCurve.prototype.isLineCurve = true;\n\nclass LineCurve3 extends Curve {\n\n\tconstructor( v1 = new Vector3(), v2 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineCurve3';\n\t\tthis.isLineCurve3 = true;\n\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tif ( t === 1 ) {\n\n\t\t\tpoint.copy( this.v2 );\n\n\t\t} else {\n\n\t\t\tpoint.copy( this.v2 ).sub( this.v1 );\n\t\t\tpoint.multiplyScalar( t ).add( this.v1 );\n\n\t\t}\n\n\t\treturn point;\n\n\t}\n\t// Line curve is linear, so we can overwrite default getPointAt\n\tgetPointAt( u, optionalTarget ) {\n\n\t\treturn this.getPoint( u, optionalTarget );\n\n\t}\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass QuadraticBezierCurve extends Curve {\n\n\tconstructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'QuadraticBezierCurve';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2;\n\n\t\tpoint.set(\n\t\t\tQuadraticBezier( t, v0.x, v1.x, v2.x ),\n\t\t\tQuadraticBezier( t, v0.y, v1.y, v2.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nQuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;\n\nclass QuadraticBezierCurve3 extends Curve {\n\n\tconstructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'QuadraticBezierCurve3';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2;\n\n\t\tpoint.set(\n\t\t\tQuadraticBezier( t, v0.x, v1.x, v2.x ),\n\t\t\tQuadraticBezier( t, v0.y, v1.y, v2.y ),\n\t\t\tQuadraticBezier( t, v0.z, v1.z, v2.z )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nQuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;\n\nclass SplineCurve extends Curve {\n\n\tconstructor( points = [] ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'SplineCurve';\n\n\t\tthis.points = points;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst points = this.points;\n\t\tconst p = ( points.length - 1 ) * t;\n\n\t\tconst intPoint = Math.floor( p );\n\t\tconst weight = p - intPoint;\n\n\t\tconst p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ];\n\t\tconst p1 = points[ intPoint ];\n\t\tconst p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ];\n\t\tconst p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ];\n\n\t\tpoint.set(\n\t\t\tCatmullRom( weight, p0.x, p1.x, p2.x, p3.x ),\n\t\t\tCatmullRom( weight, p0.y, p1.y, p2.y, p3.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = source.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = source.points[ i ];\n\n\t\t\tthis.points.push( point.clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.points = [];\n\n\t\tfor ( let i = 0, l = this.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = this.points[ i ];\n\t\t\tdata.points.push( point.toArray() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = json.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = json.points[ i ];\n\t\t\tthis.points.push( new Vector2().fromArray( point ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nSplineCurve.prototype.isSplineCurve = true;\n\nvar Curves = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tArcCurve: ArcCurve,\n\tCatmullRomCurve3: CatmullRomCurve3,\n\tCubicBezierCurve: CubicBezierCurve,\n\tCubicBezierCurve3: CubicBezierCurve3,\n\tEllipseCurve: EllipseCurve,\n\tLineCurve: LineCurve,\n\tLineCurve3: LineCurve3,\n\tQuadraticBezierCurve: QuadraticBezierCurve,\n\tQuadraticBezierCurve3: QuadraticBezierCurve3,\n\tSplineCurve: SplineCurve\n});\n\n/**\n * Port from https://github.com/mapbox/earcut (v2.2.2)\n */\n\nconst Earcut = {\n\n\ttriangulate: function ( data, holeIndices, dim = 2 ) {\n\n\t\tconst hasHoles = holeIndices && holeIndices.length;\n\t\tconst outerLen = hasHoles ? holeIndices[ 0 ] * dim : data.length;\n\t\tlet outerNode = linkedList( data, 0, outerLen, dim, true );\n\t\tconst triangles = [];\n\n\t\tif ( ! outerNode || outerNode.next === outerNode.prev ) return triangles;\n\n\t\tlet minX, minY, maxX, maxY, x, y, invSize;\n\n\t\tif ( hasHoles ) outerNode = eliminateHoles( data, holeIndices, outerNode, dim );\n\n\t\t// if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n\t\tif ( data.length > 80 * dim ) {\n\n\t\t\tminX = maxX = data[ 0 ];\n\t\t\tminY = maxY = data[ 1 ];\n\n\t\t\tfor ( let i = dim; i < outerLen; i += dim ) {\n\n\t\t\t\tx = data[ i ];\n\t\t\t\ty = data[ i + 1 ];\n\t\t\t\tif ( x < minX ) minX = x;\n\t\t\t\tif ( y < minY ) minY = y;\n\t\t\t\tif ( x > maxX ) maxX = x;\n\t\t\t\tif ( y > maxY ) maxY = y;\n\n\t\t\t}\n\n\t\t\t// minX, minY and invSize are later used to transform coords into integers for z-order calculation\n\t\t\tinvSize = Math.max( maxX - minX, maxY - minY );\n\t\t\tinvSize = invSize !== 0 ? 1 / invSize : 0;\n\n\t\t}\n\n\t\tearcutLinked( outerNode, triangles, dim, minX, minY, invSize );\n\n\t\treturn triangles;\n\n\t}\n\n};\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList( data, start, end, dim, clockwise ) {\n\n\tlet i, last;\n\n\tif ( clockwise === ( signedArea( data, start, end, dim ) > 0 ) ) {\n\n\t\tfor ( i = start; i < end; i += dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last );\n\n\t} else {\n\n\t\tfor ( i = end - dim; i >= start; i -= dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last );\n\n\t}\n\n\tif ( last && equals( last, last.next ) ) {\n\n\t\tremoveNode( last );\n\t\tlast = last.next;\n\n\t}\n\n\treturn last;\n\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints( start, end ) {\n\n\tif ( ! start ) return start;\n\tif ( ! end ) end = start;\n\n\tlet p = start,\n\t\tagain;\n\tdo {\n\n\t\tagain = false;\n\n\t\tif ( ! p.steiner && ( equals( p, p.next ) || area( p.prev, p, p.next ) === 0 ) ) {\n\n\t\t\tremoveNode( p );\n\t\t\tp = end = p.prev;\n\t\t\tif ( p === p.next ) break;\n\t\t\tagain = true;\n\n\t\t} else {\n\n\t\t\tp = p.next;\n\n\t\t}\n\n\t} while ( again || p !== end );\n\n\treturn end;\n\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked( ear, triangles, dim, minX, minY, invSize, pass ) {\n\n\tif ( ! ear ) return;\n\n\t// interlink polygon nodes in z-order\n\tif ( ! pass && invSize ) indexCurve( ear, minX, minY, invSize );\n\n\tlet stop = ear,\n\t\tprev, next;\n\n\t// iterate through ears, slicing them one by one\n\twhile ( ear.prev !== ear.next ) {\n\n\t\tprev = ear.prev;\n\t\tnext = ear.next;\n\n\t\tif ( invSize ? isEarHashed( ear, minX, minY, invSize ) : isEar( ear ) ) {\n\n\t\t\t// cut off the triangle\n\t\t\ttriangles.push( prev.i / dim );\n\t\t\ttriangles.push( ear.i / dim );\n\t\t\ttriangles.push( next.i / dim );\n\n\t\t\tremoveNode( ear );\n\n\t\t\t// skipping the next vertex leads to less sliver triangles\n\t\t\tear = next.next;\n\t\t\tstop = next.next;\n\n\t\t\tcontinue;\n\n\t\t}\n\n\t\tear = next;\n\n\t\t// if we looped through the whole remaining polygon and can't find any more ears\n\t\tif ( ear === stop ) {\n\n\t\t\t// try filtering points and slicing again\n\t\t\tif ( ! pass ) {\n\n\t\t\t\tearcutLinked( filterPoints( ear ), triangles, dim, minX, minY, invSize, 1 );\n\n\t\t\t\t// if this didn't work, try curing all small self-intersections locally\n\n\t\t\t} else if ( pass === 1 ) {\n\n\t\t\t\tear = cureLocalIntersections( filterPoints( ear ), triangles, dim );\n\t\t\t\tearcutLinked( ear, triangles, dim, minX, minY, invSize, 2 );\n\n\t\t\t\t// as a last resort, try splitting the remaining polygon into two\n\n\t\t\t} else if ( pass === 2 ) {\n\n\t\t\t\tsplitEarcut( ear, triangles, dim, minX, minY, invSize );\n\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar( ear ) {\n\n\tconst a = ear.prev,\n\t\tb = ear,\n\t\tc = ear.next;\n\n\tif ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear\n\n\t// now make sure we don't have other points inside the potential ear\n\tlet p = ear.next.next;\n\n\twhile ( p !== ear.prev ) {\n\n\t\tif ( pointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) &&\n\t\t\tarea( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.next;\n\n\t}\n\n\treturn true;\n\n}\n\nfunction isEarHashed( ear, minX, minY, invSize ) {\n\n\tconst a = ear.prev,\n\t\tb = ear,\n\t\tc = ear.next;\n\n\tif ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear\n\n\t// triangle bbox; min & max are calculated like this for speed\n\tconst minTX = a.x < b.x ? ( a.x < c.x ? a.x : c.x ) : ( b.x < c.x ? b.x : c.x ),\n\t\tminTY = a.y < b.y ? ( a.y < c.y ? a.y : c.y ) : ( b.y < c.y ? b.y : c.y ),\n\t\tmaxTX = a.x > b.x ? ( a.x > c.x ? a.x : c.x ) : ( b.x > c.x ? b.x : c.x ),\n\t\tmaxTY = a.y > b.y ? ( a.y > c.y ? a.y : c.y ) : ( b.y > c.y ? b.y : c.y );\n\n\t// z-order range for the current triangle bbox;\n\tconst minZ = zOrder( minTX, minTY, minX, minY, invSize ),\n\t\tmaxZ = zOrder( maxTX, maxTY, minX, minY, invSize );\n\n\tlet p = ear.prevZ,\n\t\tn = ear.nextZ;\n\n\t// look for points inside the triangle in both directions\n\twhile ( p && p.z >= minZ && n && n.z <= maxZ ) {\n\n\t\tif ( p !== ear.prev && p !== ear.next &&\n\t\t\tpointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) &&\n\t\t\tarea( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.prevZ;\n\n\t\tif ( n !== ear.prev && n !== ear.next &&\n\t\t\tpointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y ) &&\n\t\t\tarea( n.prev, n, n.next ) >= 0 ) return false;\n\t\tn = n.nextZ;\n\n\t}\n\n\t// look for remaining points in decreasing z-order\n\twhile ( p && p.z >= minZ ) {\n\n\t\tif ( p !== ear.prev && p !== ear.next &&\n\t\t\tpointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) &&\n\t\t\tarea( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.prevZ;\n\n\t}\n\n\t// look for remaining points in increasing z-order\n\twhile ( n && n.z <= maxZ ) {\n\n\t\tif ( n !== ear.prev && n !== ear.next &&\n\t\t\tpointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y ) &&\n\t\t\tarea( n.prev, n, n.next ) >= 0 ) return false;\n\t\tn = n.nextZ;\n\n\t}\n\n\treturn true;\n\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections( start, triangles, dim ) {\n\n\tlet p = start;\n\tdo {\n\n\t\tconst a = p.prev,\n\t\t\tb = p.next.next;\n\n\t\tif ( ! equals( a, b ) && intersects( a, p, p.next, b ) && locallyInside( a, b ) && locallyInside( b, a ) ) {\n\n\t\t\ttriangles.push( a.i / dim );\n\t\t\ttriangles.push( p.i / dim );\n\t\t\ttriangles.push( b.i / dim );\n\n\t\t\t// remove two nodes involved\n\t\t\tremoveNode( p );\n\t\t\tremoveNode( p.next );\n\n\t\t\tp = start = b;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\treturn filterPoints( p );\n\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut( start, triangles, dim, minX, minY, invSize ) {\n\n\t// look for a valid diagonal that divides the polygon into two\n\tlet a = start;\n\tdo {\n\n\t\tlet b = a.next.next;\n\t\twhile ( b !== a.prev ) {\n\n\t\t\tif ( a.i !== b.i && isValidDiagonal( a, b ) ) {\n\n\t\t\t\t// split the polygon in two by the diagonal\n\t\t\t\tlet c = splitPolygon( a, b );\n\n\t\t\t\t// filter colinear points around the cuts\n\t\t\t\ta = filterPoints( a, a.next );\n\t\t\t\tc = filterPoints( c, c.next );\n\n\t\t\t\t// run earcut on each half\n\t\t\t\tearcutLinked( a, triangles, dim, minX, minY, invSize );\n\t\t\t\tearcutLinked( c, triangles, dim, minX, minY, invSize );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tb = b.next;\n\n\t\t}\n\n\t\ta = a.next;\n\n\t} while ( a !== start );\n\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles( data, holeIndices, outerNode, dim ) {\n\n\tconst queue = [];\n\tlet i, len, start, end, list;\n\n\tfor ( i = 0, len = holeIndices.length; i < len; i ++ ) {\n\n\t\tstart = holeIndices[ i ] * dim;\n\t\tend = i < len - 1 ? holeIndices[ i + 1 ] * dim : data.length;\n\t\tlist = linkedList( data, start, end, dim, false );\n\t\tif ( list === list.next ) list.steiner = true;\n\t\tqueue.push( getLeftmost( list ) );\n\n\t}\n\n\tqueue.sort( compareX );\n\n\t// process holes from left to right\n\tfor ( i = 0; i < queue.length; i ++ ) {\n\n\t\teliminateHole( queue[ i ], outerNode );\n\t\touterNode = filterPoints( outerNode, outerNode.next );\n\n\t}\n\n\treturn outerNode;\n\n}\n\nfunction compareX( a, b ) {\n\n\treturn a.x - b.x;\n\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole( hole, outerNode ) {\n\n\touterNode = findHoleBridge( hole, outerNode );\n\tif ( outerNode ) {\n\n\t\tconst b = splitPolygon( outerNode, hole );\n\n\t\t// filter collinear points around the cuts\n\t\tfilterPoints( outerNode, outerNode.next );\n\t\tfilterPoints( b, b.next );\n\n\t}\n\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge( hole, outerNode ) {\n\n\tlet p = outerNode;\n\tconst hx = hole.x;\n\tconst hy = hole.y;\n\tlet qx = - Infinity, m;\n\n\t// find a segment intersected by a ray from the hole's leftmost point to the left;\n\t// segment's endpoint with lesser x will be potential connection point\n\tdo {\n\n\t\tif ( hy <= p.y && hy >= p.next.y && p.next.y !== p.y ) {\n\n\t\t\tconst x = p.x + ( hy - p.y ) * ( p.next.x - p.x ) / ( p.next.y - p.y );\n\t\t\tif ( x <= hx && x > qx ) {\n\n\t\t\t\tqx = x;\n\t\t\t\tif ( x === hx ) {\n\n\t\t\t\t\tif ( hy === p.y ) return p;\n\t\t\t\t\tif ( hy === p.next.y ) return p.next;\n\n\t\t\t\t}\n\n\t\t\t\tm = p.x < p.next.x ? p : p.next;\n\n\t\t\t}\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== outerNode );\n\n\tif ( ! m ) return null;\n\n\tif ( hx === qx ) return m; // hole touches outer segment; pick leftmost endpoint\n\n\t// look for points inside the triangle of hole point, segment intersection and endpoint;\n\t// if there are no points found, we have a valid connection;\n\t// otherwise choose the point of the minimum angle with the ray as connection point\n\n\tconst stop = m,\n\t\tmx = m.x,\n\t\tmy = m.y;\n\tlet tanMin = Infinity, tan;\n\n\tp = m;\n\n\tdo {\n\n\t\tif ( hx >= p.x && p.x >= mx && hx !== p.x &&\n\t\t\t\tpointInTriangle( hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y ) ) {\n\n\t\t\ttan = Math.abs( hy - p.y ) / ( hx - p.x ); // tangential\n\n\t\t\tif ( locallyInside( p, hole ) && ( tan < tanMin || ( tan === tanMin && ( p.x > m.x || ( p.x === m.x && sectorContainsSector( m, p ) ) ) ) ) ) {\n\n\t\t\t\tm = p;\n\t\t\t\ttanMin = tan;\n\n\t\t\t}\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== stop );\n\n\treturn m;\n\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector( m, p ) {\n\n\treturn area( m.prev, m, p.prev ) < 0 && area( p.next, m, m.next ) < 0;\n\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve( start, minX, minY, invSize ) {\n\n\tlet p = start;\n\tdo {\n\n\t\tif ( p.z === null ) p.z = zOrder( p.x, p.y, minX, minY, invSize );\n\t\tp.prevZ = p.prev;\n\t\tp.nextZ = p.next;\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\tp.prevZ.nextZ = null;\n\tp.prevZ = null;\n\n\tsortLinked( p );\n\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked( list ) {\n\n\tlet i, p, q, e, tail, numMerges, pSize, qSize,\n\t\tinSize = 1;\n\n\tdo {\n\n\t\tp = list;\n\t\tlist = null;\n\t\ttail = null;\n\t\tnumMerges = 0;\n\n\t\twhile ( p ) {\n\n\t\t\tnumMerges ++;\n\t\t\tq = p;\n\t\t\tpSize = 0;\n\t\t\tfor ( i = 0; i < inSize; i ++ ) {\n\n\t\t\t\tpSize ++;\n\t\t\t\tq = q.nextZ;\n\t\t\t\tif ( ! q ) break;\n\n\t\t\t}\n\n\t\t\tqSize = inSize;\n\n\t\t\twhile ( pSize > 0 || ( qSize > 0 && q ) ) {\n\n\t\t\t\tif ( pSize !== 0 && ( qSize === 0 || ! q || p.z <= q.z ) ) {\n\n\t\t\t\t\te = p;\n\t\t\t\t\tp = p.nextZ;\n\t\t\t\t\tpSize --;\n\n\t\t\t\t} else {\n\n\t\t\t\t\te = q;\n\t\t\t\t\tq = q.nextZ;\n\t\t\t\t\tqSize --;\n\n\t\t\t\t}\n\n\t\t\t\tif ( tail ) tail.nextZ = e;\n\t\t\t\telse list = e;\n\n\t\t\t\te.prevZ = tail;\n\t\t\t\ttail = e;\n\n\t\t\t}\n\n\t\t\tp = q;\n\n\t\t}\n\n\t\ttail.nextZ = null;\n\t\tinSize *= 2;\n\n\t} while ( numMerges > 1 );\n\n\treturn list;\n\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder( x, y, minX, minY, invSize ) {\n\n\t// coords are transformed into non-negative 15-bit integer range\n\tx = 32767 * ( x - minX ) * invSize;\n\ty = 32767 * ( y - minY ) * invSize;\n\n\tx = ( x | ( x << 8 ) ) & 0x00FF00FF;\n\tx = ( x | ( x << 4 ) ) & 0x0F0F0F0F;\n\tx = ( x | ( x << 2 ) ) & 0x33333333;\n\tx = ( x | ( x << 1 ) ) & 0x55555555;\n\n\ty = ( y | ( y << 8 ) ) & 0x00FF00FF;\n\ty = ( y | ( y << 4 ) ) & 0x0F0F0F0F;\n\ty = ( y | ( y << 2 ) ) & 0x33333333;\n\ty = ( y | ( y << 1 ) ) & 0x55555555;\n\n\treturn x | ( y << 1 );\n\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost( start ) {\n\n\tlet p = start,\n\t\tleftmost = start;\n\tdo {\n\n\t\tif ( p.x < leftmost.x || ( p.x === leftmost.x && p.y < leftmost.y ) ) leftmost = p;\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\treturn leftmost;\n\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n\t\t( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n\t\t( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n\t\tequals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}\n\n// signed area of a triangle\nfunction area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}\n\n// check if two points are equal\nfunction equals( p1, p2 ) {\n\n\treturn p1.x === p2.x && p1.y === p2.y;\n\n}\n\n// check if two segments intersect\nfunction intersects( p1, q1, p2, q2 ) {\n\n\tconst o1 = sign( area( p1, q1, p2 ) );\n\tconst o2 = sign( area( p1, q1, q2 ) );\n\tconst o3 = sign( area( p2, q2, p1 ) );\n\tconst o4 = sign( area( p2, q2, q1 ) );\n\n\tif ( o1 !== o2 && o3 !== o4 ) return true; // general case\n\n\tif ( o1 === 0 && onSegment( p1, p2, q1 ) ) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n\tif ( o2 === 0 && onSegment( p1, q2, q1 ) ) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n\tif ( o3 === 0 && onSegment( p2, p1, q2 ) ) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n\tif ( o4 === 0 && onSegment( p2, q1, q2 ) ) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n\treturn false;\n\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment( p, q, r ) {\n\n\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n}\n\nfunction sign( num ) {\n\n\treturn num > 0 ? 1 : num < 0 ? - 1 : 0;\n\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon( a, b ) {\n\n\tlet p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside( a, b ) {\n\n\tlet p = a,\n\t\tinside = false;\n\tconst px = ( a.x + b.x ) / 2,\n\t\tpy = ( a.y + b.y ) / 2;\n\tdo {\n\n\t\tif ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y &&\n\t\t\t\t( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) )\n\t\t\tinside = ! inside;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn inside;\n\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon( a, b ) {\n\n\tconst a2 = new Node( a.i, a.x, a.y ),\n\t\tb2 = new Node( b.i, b.x, b.y ),\n\t\tan = a.next,\n\t\tbp = b.prev;\n\n\ta.next = b;\n\tb.prev = a;\n\n\ta2.next = an;\n\tan.prev = a2;\n\n\tb2.next = a2;\n\ta2.prev = b2;\n\n\tbp.next = b2;\n\tb2.prev = bp;\n\n\treturn b2;\n\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode( i, x, y, last ) {\n\n\tconst p = new Node( i, x, y );\n\n\tif ( ! last ) {\n\n\t\tp.prev = p;\n\t\tp.next = p;\n\n\t} else {\n\n\t\tp.next = last.next;\n\t\tp.prev = last;\n\t\tlast.next.prev = p;\n\t\tlast.next = p;\n\n\t}\n\n\treturn p;\n\n}\n\nfunction removeNode( p ) {\n\n\tp.next.prev = p.prev;\n\tp.prev.next = p.next;\n\n\tif ( p.prevZ ) p.prevZ.nextZ = p.nextZ;\n\tif ( p.nextZ ) p.nextZ.prevZ = p.prevZ;\n\n}\n\nfunction Node( i, x, y ) {\n\n\t// vertex index in coordinates array\n\tthis.i = i;\n\n\t// vertex coordinates\n\tthis.x = x;\n\tthis.y = y;\n\n\t// previous and next vertex nodes in a polygon ring\n\tthis.prev = null;\n\tthis.next = null;\n\n\t// z-order curve value\n\tthis.z = null;\n\n\t// previous and next nodes in z-order\n\tthis.prevZ = null;\n\tthis.nextZ = null;\n\n\t// indicates whether this is a steiner point\n\tthis.steiner = false;\n\n}\n\nfunction signedArea( data, start, end, dim ) {\n\n\tlet sum = 0;\n\tfor ( let i = start, j = end - dim; i < end; i += dim ) {\n\n\t\tsum += ( data[ j ] - data[ i ] ) * ( data[ i + 1 ] + data[ j + 1 ] );\n\t\tj = i;\n\n\t}\n\n\treturn sum;\n\n}\n\nclass ShapeUtils {\n\n\t// calculate area of the contour polygon\n\n\tstatic area( contour ) {\n\n\t\tconst n = contour.length;\n\t\tlet a = 0.0;\n\n\t\tfor ( let p = n - 1, q = 0; q < n; p = q ++ ) {\n\n\t\t\ta += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y;\n\n\t\t}\n\n\t\treturn a * 0.5;\n\n\t}\n\n\tstatic isClockWise( pts ) {\n\n\t\treturn ShapeUtils.area( pts ) < 0;\n\n\t}\n\n\tstatic triangulateShape( contour, holes ) {\n\n\t\tconst vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ]\n\t\tconst holeIndices = []; // array of hole indices\n\t\tconst faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ]\n\n\t\tremoveDupEndPts( contour );\n\t\taddContour( vertices, contour );\n\n\t\t//\n\n\t\tlet holeIndex = contour.length;\n\n\t\tholes.forEach( removeDupEndPts );\n\n\t\tfor ( let i = 0; i < holes.length; i ++ ) {\n\n\t\t\tholeIndices.push( holeIndex );\n\t\t\tholeIndex += holes[ i ].length;\n\t\t\taddContour( vertices, holes[ i ] );\n\n\t\t}\n\n\t\t//\n\n\t\tconst triangles = Earcut.triangulate( vertices, holeIndices );\n\n\t\t//\n\n\t\tfor ( let i = 0; i < triangles.length; i += 3 ) {\n\n\t\t\tfaces.push( triangles.slice( i, i + 3 ) );\n\n\t\t}\n\n\t\treturn faces;\n\n\t}\n\n}\n\nfunction removeDupEndPts( points ) {\n\n\tconst l = points.length;\n\n\tif ( l > 2 && points[ l - 1 ].equals( points[ 0 ] ) ) {\n\n\t\tpoints.pop();\n\n\t}\n\n}\n\nfunction addContour( vertices, contour ) {\n\n\tfor ( let i = 0; i < contour.length; i ++ ) {\n\n\t\tvertices.push( contour[ i ].x );\n\t\tvertices.push( contour[ i ].y );\n\n\t}\n\n}\n\n/**\n * Creates extruded geometry from a path shape.\n *\n * parameters = {\n *\n * curveSegments: <int>, // number of points on the curves\n * steps: <int>, // number of points for z-side extrusions / used for subdividing segments of extrude spline too\n * depth: <float>, // Depth to extrude the shape\n *\n * bevelEnabled: <bool>, // turn on bevel\n * bevelThickness: <float>, // how deep into the original shape bevel goes\n * bevelSize: <float>, // how far from shape outline (including bevelOffset) is bevel\n * bevelOffset: <float>, // how far from shape outline does bevel start\n * bevelSegments: <int>, // number of bevel layers\n *\n * extrudePath: <THREE.Curve> // curve to extrude shape along\n *\n * UVGenerator: <Object> // object that provides UV generator functions\n *\n * }\n */\n\nclass ExtrudeGeometry extends BufferGeometry {\n\n\tconstructor( shapes, options ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ExtrudeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tshapes: shapes,\n\t\t\toptions: options\n\t\t};\n\n\t\tshapes = Array.isArray( shapes ) ? shapes : [ shapes ];\n\n\t\tconst scope = this;\n\n\t\tconst verticesArray = [];\n\t\tconst uvArray = [];\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\t\t\taddShape( shape );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvArray, 2 ) );\n\n\t\tthis.computeVertexNormals();\n\n\t\t// functions\n\n\t\tfunction addShape( shape ) {\n\n\t\t\tconst placeholder = [];\n\n\t\t\t// options\n\n\t\t\tconst curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;\n\t\t\tconst steps = options.steps !== undefined ? options.steps : 1;\n\t\t\tlet depth = options.depth !== undefined ? options.depth : 100;\n\n\t\t\tlet bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;\n\t\t\tlet bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 6;\n\t\t\tlet bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 2;\n\t\t\tlet bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0;\n\t\t\tlet bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3;\n\n\t\t\tconst extrudePath = options.extrudePath;\n\n\t\t\tconst uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator;\n\n\t\t\t// deprecated options\n\n\t\t\tif ( options.amount !== undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ExtrudeBufferGeometry: amount has been renamed to depth.' );\n\t\t\t\tdepth = options.amount;\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tlet extrudePts, extrudeByPath = false;\n\t\t\tlet splineTube, binormal, normal, position2;\n\n\t\t\tif ( extrudePath ) {\n\n\t\t\t\textrudePts = extrudePath.getSpacedPoints( steps );\n\n\t\t\t\textrudeByPath = true;\n\t\t\t\tbevelEnabled = false; // bevels not supported for path extrusion\n\n\t\t\t\t// SETUP TNB variables\n\n\t\t\t\t// TODO1 - have a .isClosed in spline?\n\n\t\t\t\tsplineTube = extrudePath.computeFrenetFrames( steps, false );\n\n\t\t\t\t// console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);\n\n\t\t\t\tbinormal = new Vector3();\n\t\t\t\tnormal = new Vector3();\n\t\t\t\tposition2 = new Vector3();\n\n\t\t\t}\n\n\t\t\t// Safeguards if bevels are not enabled\n\n\t\t\tif ( ! bevelEnabled ) {\n\n\t\t\t\tbevelSegments = 0;\n\t\t\t\tbevelThickness = 0;\n\t\t\t\tbevelSize = 0;\n\t\t\t\tbevelOffset = 0;\n\n\t\t\t}\n\n\t\t\t// Variables initialization\n\n\t\t\tconst shapePoints = shape.extractPoints( curveSegments );\n\n\t\t\tlet vertices = shapePoints.shape;\n\t\t\tconst holes = shapePoints.holes;\n\n\t\t\tconst reverse = ! ShapeUtils.isClockWise( vertices );\n\n\t\t\tif ( reverse ) {\n\n\t\t\t\tvertices = vertices.reverse();\n\n\t\t\t\t// Maybe we should also check if holes are in the opposite direction, just to be safe ...\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\t\tif ( ShapeUtils.isClockWise( ahole ) ) {\n\n\t\t\t\t\t\tholes[ h ] = ahole.reverse();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tconst faces = ShapeUtils.triangulateShape( vertices, holes );\n\n\t\t\t/* Vertices */\n\n\t\t\tconst contour = vertices; // vertices has all points but contour has only points of circumference\n\n\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\tvertices = vertices.concat( ahole );\n\n\t\t\t}\n\n\n\t\t\tfunction scalePt2( pt, vec, size ) {\n\n\t\t\t\tif ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' );\n\n\t\t\t\treturn vec.clone().multiplyScalar( size ).add( pt );\n\n\t\t\t}\n\n\t\t\tconst vlen = vertices.length, flen = faces.length;\n\n\n\t\t\t// Find directions for point movement\n\n\n\t\t\tfunction getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t\t//\n\t\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\t\tlet v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\t\tconst v_prev_x = inPt.x - inPrev.x,\n\t\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\t\tconst v_next_x = inNext.x - inPt.x,\n\t\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\t\tconst v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t\t// check for collinear edges\n\t\t\t\tconst collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not collinear\n\n\t\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\t\tconst v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\t\tconst v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\t\tconst ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\t\tconst ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\t\tconst ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\t\tconst ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\t\tconst sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t\t// but prevent crazy spikes\n\t\t\t\t\tconst v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\t\tlet direction_eq = false; // assumes: opposite\n\n\t\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t\t}\n\n\n\t\t\tconst contourMovements = [];\n\n\t\t\tfor ( let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) {\n\n\t\t\t\tif ( j === il ) j = 0;\n\t\t\t\tif ( k === il ) k = 0;\n\n\t\t\t\t// (j)---(i)---(k)\n\t\t\t\t// console.log('i,j,k', i, j , k)\n\n\t\t\t\tcontourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] );\n\n\t\t\t}\n\n\t\t\tconst holesMovements = [];\n\t\t\tlet oneHoleMovements, verticesMovements = contourMovements.concat();\n\n\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\toneHoleMovements = [];\n\n\t\t\t\tfor ( let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) {\n\n\t\t\t\t\tif ( j === il ) j = 0;\n\t\t\t\t\tif ( k === il ) k = 0;\n\n\t\t\t\t\t// (j)---(i)---(k)\n\t\t\t\t\toneHoleMovements[ i ] = getBevelVec( ahole[ i ], ahole[ j ], ahole[ k ] );\n\n\t\t\t\t}\n\n\t\t\t\tholesMovements.push( oneHoleMovements );\n\t\t\t\tverticesMovements = verticesMovements.concat( oneHoleMovements );\n\n\t\t\t}\n\n\n\t\t\t// Loop bevelSegments, 1 for the front, 1 for the back\n\n\t\t\tfor ( let b = 0; b < bevelSegments; b ++ ) {\n\n\t\t\t\t//for ( b = bevelSegments; b > 0; b -- ) {\n\n\t\t\t\tconst t = b / bevelSegments;\n\t\t\t\tconst z = bevelThickness * Math.cos( t * Math.PI / 2 );\n\t\t\t\tconst bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset;\n\n\t\t\t\t// contract shape\n\n\t\t\t\tfor ( let i = 0, il = contour.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst vert = scalePt2( contour[ i ], contourMovements[ i ], bs );\n\n\t\t\t\t\tv( vert.x, vert.y, - z );\n\n\t\t\t\t}\n\n\t\t\t\t// expand holes\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\toneHoleMovements = holesMovements[ h ];\n\n\t\t\t\t\tfor ( let i = 0, il = ahole.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs );\n\n\t\t\t\t\t\tv( vert.x, vert.y, - z );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst bs = bevelSize + bevelOffset;\n\n\t\t\t// Back facing vertices\n\n\t\t\tfor ( let i = 0; i < vlen; i ++ ) {\n\n\t\t\t\tconst vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ];\n\n\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\tv( vert.x, vert.y, 0 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x );\n\n\t\t\t\t\tnormal.copy( splineTube.normals[ 0 ] ).multiplyScalar( vert.x );\n\t\t\t\t\tbinormal.copy( splineTube.binormals[ 0 ] ).multiplyScalar( vert.y );\n\n\t\t\t\t\tposition2.copy( extrudePts[ 0 ] ).add( normal ).add( binormal );\n\n\t\t\t\t\tv( position2.x, position2.y, position2.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Add stepped vertices...\n\t\t\t// Including front facing vertices\n\n\t\t\tfor ( let s = 1; s <= steps; s ++ ) {\n\n\t\t\t\tfor ( let i = 0; i < vlen; i ++ ) {\n\n\t\t\t\t\tconst vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ];\n\n\t\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\t\tv( vert.x, vert.y, depth / steps * s );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x );\n\n\t\t\t\t\t\tnormal.copy( splineTube.normals[ s ] ).multiplyScalar( vert.x );\n\t\t\t\t\t\tbinormal.copy( splineTube.binormals[ s ] ).multiplyScalar( vert.y );\n\n\t\t\t\t\t\tposition2.copy( extrudePts[ s ] ).add( normal ).add( binormal );\n\n\t\t\t\t\t\tv( position2.x, position2.y, position2.z );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\t// Add bevel segments planes\n\n\t\t\t//for ( b = 1; b <= bevelSegments; b ++ ) {\n\t\t\tfor ( let b = bevelSegments - 1; b >= 0; b -- ) {\n\n\t\t\t\tconst t = b / bevelSegments;\n\t\t\t\tconst z = bevelThickness * Math.cos( t * Math.PI / 2 );\n\t\t\t\tconst bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset;\n\n\t\t\t\t// contract shape\n\n\t\t\t\tfor ( let i = 0, il = contour.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst vert = scalePt2( contour[ i ], contourMovements[ i ], bs );\n\t\t\t\t\tv( vert.x, vert.y, depth + z );\n\n\t\t\t\t}\n\n\t\t\t\t// expand holes\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\toneHoleMovements = holesMovements[ h ];\n\n\t\t\t\t\tfor ( let i = 0, il = ahole.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs );\n\n\t\t\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\t\t\tv( vert.x, vert.y, depth + z );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tv( vert.x, vert.y + extrudePts[ steps - 1 ].y, extrudePts[ steps - 1 ].x + z );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t/* Faces */\n\n\t\t\t// Top and bottom faces\n\n\t\t\tbuildLidFaces();\n\n\t\t\t// Sides faces\n\n\t\t\tbuildSideFaces();\n\n\n\t\t\t///// Internal functions\n\n\t\t\tfunction buildLidFaces() {\n\n\t\t\t\tconst start = verticesArray.length / 3;\n\n\t\t\t\tif ( bevelEnabled ) {\n\n\t\t\t\t\tlet layer = 0; // steps + 1\n\t\t\t\t\tlet offset = vlen * layer;\n\n\t\t\t\t\t// Bottom faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 2 ] + offset, face[ 1 ] + offset, face[ 0 ] + offset );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlayer = steps + bevelSegments * 2;\n\t\t\t\t\toffset = vlen * layer;\n\n\t\t\t\t\t// Top faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Bottom faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 2 ], face[ 1 ], face[ 0 ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Top faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tscope.addGroup( start, verticesArray.length / 3 - start, 0 );\n\n\t\t\t}\n\n\t\t\t// Create faces for the z-sides of the shape\n\n\t\t\tfunction buildSideFaces() {\n\n\t\t\t\tconst start = verticesArray.length / 3;\n\t\t\t\tlet layeroffset = 0;\n\t\t\t\tsidewalls( contour, layeroffset );\n\t\t\t\tlayeroffset += contour.length;\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\tsidewalls( ahole, layeroffset );\n\n\t\t\t\t\t//, true\n\t\t\t\t\tlayeroffset += ahole.length;\n\n\t\t\t\t}\n\n\n\t\t\t\tscope.addGroup( start, verticesArray.length / 3 - start, 1 );\n\n\n\t\t\t}\n\n\t\t\tfunction sidewalls( contour, layeroffset ) {\n\n\t\t\t\tlet i = contour.length;\n\n\t\t\t\twhile ( -- i >= 0 ) {\n\n\t\t\t\t\tconst j = i;\n\t\t\t\t\tlet k = i - 1;\n\t\t\t\t\tif ( k < 0 ) k = contour.length - 1;\n\n\t\t\t\t\t//console.log('b', i,j, i-1, k,vertices.length);\n\n\t\t\t\t\tfor ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) {\n\n\t\t\t\t\t\tconst slen1 = vlen * s;\n\t\t\t\t\t\tconst slen2 = vlen * ( s + 1 );\n\n\t\t\t\t\t\tconst a = layeroffset + j + slen1,\n\t\t\t\t\t\t\tb = layeroffset + k + slen1,\n\t\t\t\t\t\t\tc = layeroffset + k + slen2,\n\t\t\t\t\t\t\td = layeroffset + j + slen2;\n\n\t\t\t\t\t\tf4( a, b, c, d );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfunction v( x, y, z ) {\n\n\t\t\t\tplaceholder.push( x );\n\t\t\t\tplaceholder.push( y );\n\t\t\t\tplaceholder.push( z );\n\n\t\t\t}\n\n\n\t\t\tfunction f3( a, b, c ) {\n\n\t\t\t\taddVertex( a );\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( c );\n\n\t\t\t\tconst nextIndex = verticesArray.length / 3;\n\t\t\t\tconst uvs = uvgen.generateTopUV( scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1 );\n\n\t\t\t\taddUV( uvs[ 0 ] );\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 2 ] );\n\n\t\t\t}\n\n\t\t\tfunction f4( a, b, c, d ) {\n\n\t\t\t\taddVertex( a );\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( d );\n\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( c );\n\t\t\t\taddVertex( d );\n\n\n\t\t\t\tconst nextIndex = verticesArray.length / 3;\n\t\t\t\tconst uvs = uvgen.generateSideWallUV( scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1 );\n\n\t\t\t\taddUV( uvs[ 0 ] );\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 3 ] );\n\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 2 ] );\n\t\t\t\taddUV( uvs[ 3 ] );\n\n\t\t\t}\n\n\t\t\tfunction addVertex( index ) {\n\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 0 ] );\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 1 ] );\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 2 ] );\n\n\t\t\t}\n\n\n\t\t\tfunction addUV( vector2 ) {\n\n\t\t\t\tuvArray.push( vector2.x );\n\t\t\t\tuvArray.push( vector2.y );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tconst shapes = this.parameters.shapes;\n\t\tconst options = this.parameters.options;\n\n\t\treturn toJSON$1( shapes, options, data );\n\n\t}\n\n\tstatic fromJSON( data, shapes ) {\n\n\t\tconst geometryShapes = [];\n\n\t\tfor ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) {\n\n\t\t\tconst shape = shapes[ data.shapes[ j ] ];\n\n\t\t\tgeometryShapes.push( shape );\n\n\t\t}\n\n\t\tconst extrudePath = data.options.extrudePath;\n\n\t\tif ( extrudePath !== undefined ) {\n\n\t\t\tdata.options.extrudePath = new Curves[ extrudePath.type ]().fromJSON( extrudePath );\n\n\t\t}\n\n\t\treturn new ExtrudeGeometry( geometryShapes, data.options );\n\n\t}\n\n}\n\nconst WorldUVGenerator = {\n\n\tgenerateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) {\n\n\t\tconst a_x = vertices[ indexA * 3 ];\n\t\tconst a_y = vertices[ indexA * 3 + 1 ];\n\t\tconst b_x = vertices[ indexB * 3 ];\n\t\tconst b_y = vertices[ indexB * 3 + 1 ];\n\t\tconst c_x = vertices[ indexC * 3 ];\n\t\tconst c_y = vertices[ indexC * 3 + 1 ];\n\n\t\treturn [\n\t\t\tnew Vector2( a_x, a_y ),\n\t\t\tnew Vector2( b_x, b_y ),\n\t\t\tnew Vector2( c_x, c_y )\n\t\t];\n\n\t},\n\n\tgenerateSideWallUV: function ( geometry, vertices, indexA, indexB, indexC, indexD ) {\n\n\t\tconst a_x = vertices[ indexA * 3 ];\n\t\tconst a_y = vertices[ indexA * 3 + 1 ];\n\t\tconst a_z = vertices[ indexA * 3 + 2 ];\n\t\tconst b_x = vertices[ indexB * 3 ];\n\t\tconst b_y = vertices[ indexB * 3 + 1 ];\n\t\tconst b_z = vertices[ indexB * 3 + 2 ];\n\t\tconst c_x = vertices[ indexC * 3 ];\n\t\tconst c_y = vertices[ indexC * 3 + 1 ];\n\t\tconst c_z = vertices[ indexC * 3 + 2 ];\n\t\tconst d_x = vertices[ indexD * 3 ];\n\t\tconst d_y = vertices[ indexD * 3 + 1 ];\n\t\tconst d_z = vertices[ indexD * 3 + 2 ];\n\n\t\tif ( Math.abs( a_y - b_y ) < Math.abs( a_x - b_x ) ) {\n\n\t\t\treturn [\n\t\t\t\tnew Vector2( a_x, 1 - a_z ),\n\t\t\t\tnew Vector2( b_x, 1 - b_z ),\n\t\t\t\tnew Vector2( c_x, 1 - c_z ),\n\t\t\t\tnew Vector2( d_x, 1 - d_z )\n\t\t\t];\n\n\t\t} else {\n\n\t\t\treturn [\n\t\t\t\tnew Vector2( a_y, 1 - a_z ),\n\t\t\t\tnew Vector2( b_y, 1 - b_z ),\n\t\t\t\tnew Vector2( c_y, 1 - c_z ),\n\t\t\t\tnew Vector2( d_y, 1 - d_z )\n\t\t\t];\n\n\t\t}\n\n\t}\n\n};\n\nfunction toJSON$1( shapes, options, data ) {\n\n\tdata.shapes = [];\n\n\tif ( Array.isArray( shapes ) ) {\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\n\t\t\tdata.shapes.push( shape.uuid );\n\n\t\t}\n\n\t} else {\n\n\t\tdata.shapes.push( shapes.uuid );\n\n\t}\n\n\tif ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON();\n\n\treturn data;\n\n}\n\nclass IcosahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst t = ( 1 + Math.sqrt( 5 ) ) / 2;\n\n\t\tconst vertices = [\n\t\t\t- 1, t, 0, \t1, t, 0, \t- 1, - t, 0, \t1, - t, 0,\n\t\t\t0, - 1, t, \t0, 1, t,\t0, - 1, - t, \t0, 1, - t,\n\t\t\tt, 0, - 1, \tt, 0, 1, \t- t, 0, - 1, \t- t, 0, 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t0, 11, 5, \t0, 5, 1, \t0, 1, 7, \t0, 7, 10, \t0, 10, 11,\n\t\t\t1, 5, 9, \t5, 11, 4,\t11, 10, 2,\t10, 7, 6,\t7, 1, 8,\n\t\t\t3, 9, 4, \t3, 4, 2,\t3, 2, 6,\t3, 6, 8,\t3, 8, 9,\n\t\t\t4, 9, 5, \t2, 4, 11,\t6, 2, 10,\t8, 6, 7,\t9, 8, 1\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'IcosahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new IcosahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nclass LatheGeometry extends BufferGeometry {\n\n\tconstructor( points, segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LatheGeometry';\n\n\t\tthis.parameters = {\n\t\t\tpoints: points,\n\t\t\tsegments: segments,\n\t\t\tphiStart: phiStart,\n\t\t\tphiLength: phiLength\n\t\t};\n\n\t\tsegments = Math.floor( segments );\n\n\t\t// clamp phiLength so it's in range of [ 0, 2PI ]\n\n\t\tphiLength = clamp( phiLength, 0, Math.PI * 2 );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst inverseSegments = 1.0 / segments;\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// generate vertices and uvs\n\n\t\tfor ( let i = 0; i <= segments; i ++ ) {\n\n\t\t\tconst phi = phiStart + i * inverseSegments * phiLength;\n\n\t\t\tconst sin = Math.sin( phi );\n\t\t\tconst cos = Math.cos( phi );\n\n\t\t\tfor ( let j = 0; j <= ( points.length - 1 ); j ++ ) {\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = points[ j ].x * sin;\n\t\t\t\tvertex.y = points[ j ].y;\n\t\t\t\tvertex.z = points[ j ].x * cos;\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = i / segments;\n\t\t\t\tuv.y = j / ( points.length - 1 );\n\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\n\t\t\t}\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let i = 0; i < segments; i ++ ) {\n\n\t\t\tfor ( let j = 0; j < ( points.length - 1 ); j ++ ) {\n\n\t\t\t\tconst base = j + i * points.length;\n\n\t\t\t\tconst a = base;\n\t\t\t\tconst b = base + points.length;\n\t\t\t\tconst c = base + points.length + 1;\n\t\t\t\tconst d = base + 1;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// generate normals\n\n\t\tthis.computeVertexNormals();\n\n\t\t// if the geometry is closed, we need to average the normals along the seam.\n\t\t// because the corresponding vertices are identical (but still have different UVs).\n\n\t\tif ( phiLength === Math.PI * 2 ) {\n\n\t\t\tconst normals = this.attributes.normal.array;\n\t\t\tconst n1 = new Vector3();\n\t\t\tconst n2 = new Vector3();\n\t\t\tconst n = new Vector3();\n\n\t\t\t// this is the buffer offset for the last line of vertices\n\n\t\t\tconst base = segments * points.length * 3;\n\n\t\t\tfor ( let i = 0, j = 0; i < points.length; i ++, j += 3 ) {\n\n\t\t\t\t// select the normal of the vertex in the first line\n\n\t\t\t\tn1.x = normals[ j + 0 ];\n\t\t\t\tn1.y = normals[ j + 1 ];\n\t\t\t\tn1.z = normals[ j + 2 ];\n\n\t\t\t\t// select the normal of the vertex in the last line\n\n\t\t\t\tn2.x = normals[ base + j + 0 ];\n\t\t\t\tn2.y = normals[ base + j + 1 ];\n\t\t\t\tn2.z = normals[ base + j + 2 ];\n\n\t\t\t\t// average normals\n\n\t\t\t\tn.addVectors( n1, n2 ).normalize();\n\n\t\t\t\t// assign the new values to both normals\n\n\t\t\t\tnormals[ j + 0 ] = normals[ base + j + 0 ] = n.x;\n\t\t\t\tnormals[ j + 1 ] = normals[ base + j + 1 ] = n.y;\n\t\t\t\tnormals[ j + 2 ] = normals[ base + j + 2 ] = n.z;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength );\n\n\t}\n\n}\n\nclass OctahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst vertices = [\n\t\t\t1, 0, 0, \t- 1, 0, 0,\t0, 1, 0,\n\t\t\t0, - 1, 0, \t0, 0, 1,\t0, 0, - 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t0, 2, 4,\t0, 4, 3,\t0, 3, 5,\n\t\t\t0, 5, 2,\t1, 2, 5,\t1, 5, 3,\n\t\t\t1, 3, 4,\t1, 4, 2\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'OctahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new OctahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\n/**\n * Parametric Surfaces Geometry\n * based on the brilliant article by @prideout https://prideout.net/blog/old/blog/index.html@p=44.html\n */\n\nclass ParametricGeometry extends BufferGeometry {\n\n\tconstructor( func, slices, stacks ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ParametricGeometry';\n\n\t\tthis.parameters = {\n\t\t\tfunc: func,\n\t\t\tslices: slices,\n\t\t\tstacks: stacks\n\t\t};\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\tconst EPS = 0.00001;\n\n\t\tconst normal = new Vector3();\n\n\t\tconst p0 = new Vector3(), p1 = new Vector3();\n\t\tconst pu = new Vector3(), pv = new Vector3();\n\n\t\tif ( func.length < 3 ) {\n\n\t\t\tconsole.error( 'THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.' );\n\n\t\t}\n\n\t\t// generate vertices, normals and uvs\n\n\t\tconst sliceCount = slices + 1;\n\n\t\tfor ( let i = 0; i <= stacks; i ++ ) {\n\n\t\t\tconst v = i / stacks;\n\n\t\t\tfor ( let j = 0; j <= slices; j ++ ) {\n\n\t\t\t\tconst u = j / slices;\n\n\t\t\t\t// vertex\n\n\t\t\t\tfunc( u, v, p0 );\n\t\t\t\tvertices.push( p0.x, p0.y, p0.z );\n\n\t\t\t\t// normal\n\n\t\t\t\t// approximate tangent vectors via finite differences\n\n\t\t\t\tif ( u - EPS >= 0 ) {\n\n\t\t\t\t\tfunc( u - EPS, v, p1 );\n\t\t\t\t\tpu.subVectors( p0, p1 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfunc( u + EPS, v, p1 );\n\t\t\t\t\tpu.subVectors( p1, p0 );\n\n\t\t\t\t}\n\n\t\t\t\tif ( v - EPS >= 0 ) {\n\n\t\t\t\t\tfunc( u, v - EPS, p1 );\n\t\t\t\t\tpv.subVectors( p0, p1 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfunc( u, v + EPS, p1 );\n\t\t\t\t\tpv.subVectors( p1, p0 );\n\n\t\t\t\t}\n\n\t\t\t\t// cross product of tangent vectors returns surface normal\n\n\t\t\t\tnormal.crossVectors( pu, pv ).normalize();\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( u, v );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let i = 0; i < stacks; i ++ ) {\n\n\t\t\tfor ( let j = 0; j < slices; j ++ ) {\n\n\t\t\t\tconst a = i * sliceCount + j;\n\t\t\t\tconst b = i * sliceCount + j + 1;\n\t\t\t\tconst c = ( i + 1 ) * sliceCount + j + 1;\n\t\t\t\tconst d = ( i + 1 ) * sliceCount + j;\n\n\t\t\t\t// faces one and two\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n}\n\nclass RingGeometry extends BufferGeometry {\n\n\tconstructor( innerRadius = 0.5, outerRadius = 1, thetaSegments = 8, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'RingGeometry';\n\n\t\tthis.parameters = {\n\t\t\tinnerRadius: innerRadius,\n\t\t\touterRadius: outerRadius,\n\t\t\tthetaSegments: thetaSegments,\n\t\t\tphiSegments: phiSegments,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tthetaSegments = Math.max( 3, thetaSegments );\n\t\tphiSegments = Math.max( 1, phiSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// some helper variables\n\n\t\tlet radius = innerRadius;\n\t\tconst radiusStep = ( ( outerRadius - innerRadius ) / phiSegments );\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let j = 0; j <= phiSegments; j ++ ) {\n\n\t\t\tfor ( let i = 0; i <= thetaSegments; i ++ ) {\n\n\t\t\t\t// values are generate from the inside of the ring to the outside\n\n\t\t\t\tconst segment = thetaStart + i / thetaSegments * thetaLength;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = radius * Math.cos( segment );\n\t\t\t\tvertex.y = radius * Math.sin( segment );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = ( vertex.x / outerRadius + 1 ) / 2;\n\t\t\t\tuv.y = ( vertex.y / outerRadius + 1 ) / 2;\n\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t}\n\n\t\t\t// increase the radius for next row of vertices\n\n\t\t\tradius += radiusStep;\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let j = 0; j < phiSegments; j ++ ) {\n\n\t\t\tconst thetaSegmentLevel = j * ( thetaSegments + 1 );\n\n\t\t\tfor ( let i = 0; i < thetaSegments; i ++ ) {\n\n\t\t\t\tconst segment = i + thetaSegmentLevel;\n\n\t\t\t\tconst a = segment;\n\t\t\t\tconst b = segment + thetaSegments + 1;\n\t\t\t\tconst c = segment + thetaSegments + 2;\n\t\t\t\tconst d = segment + 1;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass ShapeGeometry extends BufferGeometry {\n\n\tconstructor( shapes, curveSegments = 12 ) {\n\n\t\tsuper();\n\t\tthis.type = 'ShapeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tshapes: shapes,\n\t\t\tcurveSegments: curveSegments\n\t\t};\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet groupStart = 0;\n\t\tlet groupCount = 0;\n\n\t\t// allow single and array values for \"shapes\" parameter\n\n\t\tif ( Array.isArray( shapes ) === false ) {\n\n\t\t\taddShape( shapes );\n\n\t\t} else {\n\n\t\t\tfor ( let i = 0; i < shapes.length; i ++ ) {\n\n\t\t\t\taddShape( shapes[ i ] );\n\n\t\t\t\tthis.addGroup( groupStart, groupCount, i ); // enables MultiMaterial support\n\n\t\t\t\tgroupStart += groupCount;\n\t\t\t\tgroupCount = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\n\t\t// helper functions\n\n\t\tfunction addShape( shape ) {\n\n\t\t\tconst indexOffset = vertices.length / 3;\n\t\t\tconst points = shape.extractPoints( curveSegments );\n\n\t\t\tlet shapeVertices = points.shape;\n\t\t\tconst shapeHoles = points.holes;\n\n\t\t\t// check direction of vertices\n\n\t\t\tif ( ShapeUtils.isClockWise( shapeVertices ) === false ) {\n\n\t\t\t\tshapeVertices = shapeVertices.reverse();\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0, l = shapeHoles.length; i < l; i ++ ) {\n\n\t\t\t\tconst shapeHole = shapeHoles[ i ];\n\n\t\t\t\tif ( ShapeUtils.isClockWise( shapeHole ) === true ) {\n\n\t\t\t\t\tshapeHoles[ i ] = shapeHole.reverse();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles );\n\n\t\t\t// join vertices of inner and outer paths to a single array\n\n\t\t\tfor ( let i = 0, l = shapeHoles.length; i < l; i ++ ) {\n\n\t\t\t\tconst shapeHole = shapeHoles[ i ];\n\t\t\t\tshapeVertices = shapeVertices.concat( shapeHole );\n\n\t\t\t}\n\n\t\t\t// vertices, normals, uvs\n\n\t\t\tfor ( let i = 0, l = shapeVertices.length; i < l; i ++ ) {\n\n\t\t\t\tconst vertex = shapeVertices[ i ];\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, 0 );\n\t\t\t\tnormals.push( 0, 0, 1 );\n\t\t\t\tuvs.push( vertex.x, vertex.y ); // world uvs\n\n\t\t\t}\n\n\t\t\t// incides\n\n\t\t\tfor ( let i = 0, l = faces.length; i < l; i ++ ) {\n\n\t\t\t\tconst face = faces[ i ];\n\n\t\t\t\tconst a = face[ 0 ] + indexOffset;\n\t\t\t\tconst b = face[ 1 ] + indexOffset;\n\t\t\t\tconst c = face[ 2 ] + indexOffset;\n\n\t\t\t\tindices.push( a, b, c );\n\t\t\t\tgroupCount += 3;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tconst shapes = this.parameters.shapes;\n\n\t\treturn toJSON( shapes, data );\n\n\t}\n\n\tstatic fromJSON( data, shapes ) {\n\n\t\tconst geometryShapes = [];\n\n\t\tfor ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) {\n\n\t\t\tconst shape = shapes[ data.shapes[ j ] ];\n\n\t\t\tgeometryShapes.push( shape );\n\n\t\t}\n\n\t\treturn new ShapeGeometry( geometryShapes, data.curveSegments );\n\n\t}\n\n}\n\nfunction toJSON( shapes, data ) {\n\n\tdata.shapes = [];\n\n\tif ( Array.isArray( shapes ) ) {\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\n\t\t\tdata.shapes.push( shape.uuid );\n\n\t\t}\n\n\t} else {\n\n\t\tdata.shapes.push( shapes.uuid );\n\n\t}\n\n\treturn data;\n\n}\n\nclass SphereGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, widthSegments = 8, heightSegments = 6, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) {\n\n\t\tsuper();\n\t\tthis.type = 'SphereGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\tphiStart: phiStart,\n\t\t\tphiLength: phiLength,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\twidthSegments = Math.max( 3, Math.floor( widthSegments ) );\n\t\theightSegments = Math.max( 2, Math.floor( heightSegments ) );\n\n\t\tconst thetaEnd = Math.min( thetaStart + thetaLength, Math.PI );\n\n\t\tlet index = 0;\n\t\tconst grid = [];\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let iy = 0; iy <= heightSegments; iy ++ ) {\n\n\t\t\tconst verticesRow = [];\n\n\t\t\tconst v = iy / heightSegments;\n\n\t\t\t// special case for the poles\n\n\t\t\tlet uOffset = 0;\n\n\t\t\tif ( iy == 0 && thetaStart == 0 ) {\n\n\t\t\t\tuOffset = 0.5 / widthSegments;\n\n\t\t\t} else if ( iy == heightSegments && thetaEnd == Math.PI ) {\n\n\t\t\t\tuOffset = - 0.5 / widthSegments;\n\n\t\t\t}\n\n\t\t\tfor ( let ix = 0; ix <= widthSegments; ix ++ ) {\n\n\t\t\t\tconst u = ix / widthSegments;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );\n\t\t\t\tvertex.y = radius * Math.cos( thetaStart + v * thetaLength );\n\t\t\t\tvertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormal.copy( vertex ).normalize();\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( u + uOffset, 1 - v );\n\n\t\t\t\tverticesRow.push( index ++ );\n\n\t\t\t}\n\n\t\t\tgrid.push( verticesRow );\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let iy = 0; iy < heightSegments; iy ++ ) {\n\n\t\t\tfor ( let ix = 0; ix < widthSegments; ix ++ ) {\n\n\t\t\t\tconst a = grid[ iy ][ ix + 1 ];\n\t\t\t\tconst b = grid[ iy ][ ix ];\n\t\t\t\tconst c = grid[ iy + 1 ][ ix ];\n\t\t\t\tconst d = grid[ iy + 1 ][ ix + 1 ];\n\n\t\t\t\tif ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d );\n\t\t\t\tif ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass TetrahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst vertices = [\n\t\t\t1, 1, 1, \t- 1, - 1, 1, \t- 1, 1, - 1, \t1, - 1, - 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t2, 1, 0, \t0, 3, 2,\t1, 3, 0,\t2, 3, 1\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'TetrahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TetrahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\n/**\n * Text = 3D Text\n *\n * parameters = {\n * font: <THREE.Font>, // font\n *\n * size: <float>, // size of the text\n * height: <float>, // thickness to extrude text\n * curveSegments: <int>, // number of points on the curves\n *\n * bevelEnabled: <bool>, // turn on bevel\n * bevelThickness: <float>, // how deep into text bevel goes\n * bevelSize: <float>, // how far from text outline (including bevelOffset) is bevel\n * bevelOffset: <float> // how far from text outline does bevel start\n * }\n */\n\nclass TextGeometry extends ExtrudeGeometry {\n\n\tconstructor( text, parameters = {} ) {\n\n\t\tconst font = parameters.font;\n\n\t\tif ( ! ( font && font.isFont ) ) {\n\n\t\t\tconsole.error( 'THREE.TextGeometry: font parameter is not an instance of THREE.Font.' );\n\t\t\treturn new BufferGeometry();\n\n\t\t}\n\n\t\tconst shapes = font.generateShapes( text, parameters.size );\n\n\t\t// translate parameters to ExtrudeGeometry API\n\n\t\tparameters.depth = parameters.height !== undefined ? parameters.height : 50;\n\n\t\t// defaults\n\n\t\tif ( parameters.bevelThickness === undefined ) parameters.bevelThickness = 10;\n\t\tif ( parameters.bevelSize === undefined ) parameters.bevelSize = 8;\n\t\tif ( parameters.bevelEnabled === undefined ) parameters.bevelEnabled = false;\n\n\t\tsuper( shapes, parameters );\n\n\t\tthis.type = 'TextGeometry';\n\n\t}\n\n}\n\nclass TorusGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, tube = 0.4, radialSegments = 8, tubularSegments = 6, arc = Math.PI * 2 ) {\n\n\t\tsuper();\n\t\tthis.type = 'TorusGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\ttube: tube,\n\t\t\tradialSegments: radialSegments,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tarc: arc\n\t\t};\n\n\t\tradialSegments = Math.floor( radialSegments );\n\t\ttubularSegments = Math.floor( tubularSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst center = new Vector3();\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\tfor ( let i = 0; i <= tubularSegments; i ++ ) {\n\n\t\t\t\tconst u = i / tubularSegments * arc;\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u );\n\t\t\t\tvertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u );\n\t\t\t\tvertex.z = tube * Math.sin( v );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tcenter.x = radius * Math.cos( u );\n\t\t\t\tcenter.y = radius * Math.sin( u );\n\t\t\t\tnormal.subVectors( vertex, center ).normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( i / tubularSegments );\n\t\t\t\tuvs.push( j / radialSegments );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let j = 1; j <= radialSegments; j ++ ) {\n\n\t\t\tfor ( let i = 1; i <= tubularSegments; i ++ ) {\n\n\t\t\t\t// indices\n\n\t\t\t\tconst a = ( tubularSegments + 1 ) * j + i - 1;\n\t\t\t\tconst b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1;\n\t\t\t\tconst c = ( tubularSegments + 1 ) * ( j - 1 ) + i;\n\t\t\t\tconst d = ( tubularSegments + 1 ) * j + i;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc );\n\n\t}\n\n}\n\nclass TorusKnotGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) {\n\n\t\tsuper();\n\t\tthis.type = 'TorusKnotGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\ttube: tube,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tradialSegments: radialSegments,\n\t\t\tp: p,\n\t\t\tq: q\n\t\t};\n\n\t\ttubularSegments = Math.floor( tubularSegments );\n\t\tradialSegments = Math.floor( radialSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\tconst P1 = new Vector3();\n\t\tconst P2 = new Vector3();\n\n\t\tconst B = new Vector3();\n\t\tconst T = new Vector3();\n\t\tconst N = new Vector3();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let i = 0; i <= tubularSegments; ++ i ) {\n\n\t\t\t// the radian \"u\" is used to calculate the position on the torus curve of the current tubular segement\n\n\t\t\tconst u = i / tubularSegments * p * Math.PI * 2;\n\n\t\t\t// now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead.\n\t\t\t// these points are used to create a special \"coordinate space\", which is necessary to calculate the correct vertex positions\n\n\t\t\tcalculatePositionOnCurve( u, p, q, radius, P1 );\n\t\t\tcalculatePositionOnCurve( u + 0.01, p, q, radius, P2 );\n\n\t\t\t// calculate orthonormal basis\n\n\t\t\tT.subVectors( P2, P1 );\n\t\t\tN.addVectors( P2, P1 );\n\t\t\tB.crossVectors( T, N );\n\t\t\tN.crossVectors( B, T );\n\n\t\t\t// normalize B, N. T can be ignored, we don't use it\n\n\t\t\tB.normalize();\n\t\t\tN.normalize();\n\n\t\t\tfor ( let j = 0; j <= radialSegments; ++ j ) {\n\n\t\t\t\t// now calculate the vertices. they are nothing more than an extrusion of the torus curve.\n\t\t\t\t// because we extrude a shape in the xy-plane, there is no need to calculate a z-value.\n\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\t\t\t\tconst cx = - tube * Math.cos( v );\n\t\t\t\tconst cy = tube * Math.sin( v );\n\n\t\t\t\t// now calculate the final vertex position.\n\t\t\t\t// first we orient the extrusion with our basis vectos, then we add it to the current position on the curve\n\n\t\t\t\tvertex.x = P1.x + ( cx * N.x + cy * B.x );\n\t\t\t\tvertex.y = P1.y + ( cx * N.y + cy * B.y );\n\t\t\t\tvertex.z = P1.z + ( cx * N.z + cy * B.z );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)\n\n\t\t\t\tnormal.subVectors( vertex, P1 ).normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( i / tubularSegments );\n\t\t\t\tuvs.push( j / radialSegments );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let j = 1; j <= tubularSegments; j ++ ) {\n\n\t\t\tfor ( let i = 1; i <= radialSegments; i ++ ) {\n\n\t\t\t\t// indices\n\n\t\t\t\tconst a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );\n\t\t\t\tconst b = ( radialSegments + 1 ) * j + ( i - 1 );\n\t\t\t\tconst c = ( radialSegments + 1 ) * j + i;\n\t\t\t\tconst d = ( radialSegments + 1 ) * ( j - 1 ) + i;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// this function calculates the current position on the torus curve\n\n\t\tfunction calculatePositionOnCurve( u, p, q, radius, position ) {\n\n\t\t\tconst cu = Math.cos( u );\n\t\t\tconst su = Math.sin( u );\n\t\t\tconst quOverP = q / p * u;\n\t\t\tconst cs = Math.cos( quOverP );\n\n\t\t\tposition.x = radius * ( 2 + cs ) * 0.5 * cu;\n\t\t\tposition.y = radius * ( 2 + cs ) * su * 0.5;\n\t\t\tposition.z = radius * Math.sin( quOverP ) * 0.5;\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q );\n\n\t}\n\n}\n\nclass TubeGeometry extends BufferGeometry {\n\n\tconstructor( path, tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) {\n\n\t\tsuper();\n\t\tthis.type = 'TubeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tpath: path,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tradius: radius,\n\t\t\tradialSegments: radialSegments,\n\t\t\tclosed: closed\n\t\t};\n\n\t\tconst frames = path.computeFrenetFrames( tubularSegments, closed );\n\n\t\t// expose internals\n\n\t\tthis.tangents = frames.tangents;\n\t\tthis.normals = frames.normals;\n\t\tthis.binormals = frames.binormals;\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\t\tconst uv = new Vector2();\n\t\tlet P = new Vector3();\n\n\t\t// buffer\n\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\t\tconst indices = [];\n\n\t\t// create buffer data\n\n\t\tgenerateBufferData();\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// functions\n\n\t\tfunction generateBufferData() {\n\n\t\t\tfor ( let i = 0; i < tubularSegments; i ++ ) {\n\n\t\t\t\tgenerateSegment( i );\n\n\t\t\t}\n\n\t\t\t// if the geometry is not closed, generate the last row of vertices and normals\n\t\t\t// at the regular position on the given path\n\t\t\t//\n\t\t\t// if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)\n\n\t\t\tgenerateSegment( ( closed === false ) ? tubularSegments : 0 );\n\n\t\t\t// uvs are generated in a separate function.\n\t\t\t// this makes it easy compute correct values for closed geometries\n\n\t\t\tgenerateUVs();\n\n\t\t\t// finally create faces\n\n\t\t\tgenerateIndices();\n\n\t\t}\n\n\t\tfunction generateSegment( i ) {\n\n\t\t\t// we use getPointAt to sample evenly distributed points from the given path\n\n\t\t\tP = path.getPointAt( i / tubularSegments, P );\n\n\t\t\t// retrieve corresponding normal and binormal\n\n\t\t\tconst N = frames.normals[ i ];\n\t\t\tconst B = frames.binormals[ i ];\n\n\t\t\t// generate normals and vertices for the current segment\n\n\t\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\n\t\t\t\tconst sin = Math.sin( v );\n\t\t\t\tconst cos = - Math.cos( v );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormal.x = ( cos * N.x + sin * B.x );\n\t\t\t\tnormal.y = ( cos * N.y + sin * B.y );\n\t\t\t\tnormal.z = ( cos * N.z + sin * B.z );\n\t\t\t\tnormal.normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = P.x + radius * normal.x;\n\t\t\t\tvertex.y = P.y + radius * normal.y;\n\t\t\t\tvertex.z = P.z + radius * normal.z;\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateIndices() {\n\n\t\t\tfor ( let j = 1; j <= tubularSegments; j ++ ) {\n\n\t\t\t\tfor ( let i = 1; i <= radialSegments; i ++ ) {\n\n\t\t\t\t\tconst a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );\n\t\t\t\t\tconst b = ( radialSegments + 1 ) * j + ( i - 1 );\n\t\t\t\t\tconst c = ( radialSegments + 1 ) * j + i;\n\t\t\t\t\tconst d = ( radialSegments + 1 ) * ( j - 1 ) + i;\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateUVs() {\n\n\t\t\tfor ( let i = 0; i <= tubularSegments; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\t\t\tuv.x = i / tubularSegments;\n\t\t\t\t\tuv.y = j / radialSegments;\n\n\t\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.path = this.parameters.path.toJSON();\n\n\t\treturn data;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\t// This only works for built-in curves (e.g. CatmullRomCurve3).\n\t\t// User defined curves or instances of CurvePath will not be deserialized.\n\t\treturn new TubeGeometry(\n\t\t\tnew Curves[ data.path.type ]().fromJSON( data.path ),\n\t\t\tdata.tubularSegments,\n\t\t\tdata.radius,\n\t\t\tdata.radialSegments,\n\t\t\tdata.closed\n\t\t);\n\n\t}\n\n}\n\nclass WireframeGeometry extends BufferGeometry {\n\n\tconstructor( geometry ) {\n\n\t\tsuper();\n\t\tthis.type = 'WireframeGeometry';\n\n\t\tif ( geometry.isGeometry === true ) {\n\n\t\t\tconsole.error( 'THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\t// buffer\n\n\t\tconst vertices = [];\n\n\t\t// helper variables\n\n\t\tconst edge = [ 0, 0 ], edges = {};\n\n\t\tconst vertex = new Vector3();\n\n\t\tif ( geometry.index !== null ) {\n\n\t\t\t// indexed BufferGeometry\n\n\t\t\tconst position = geometry.attributes.position;\n\t\t\tconst indices = geometry.index;\n\t\t\tlet groups = geometry.groups;\n\n\t\t\tif ( groups.length === 0 ) {\n\n\t\t\t\tgroups = [ { start: 0, count: indices.count, materialIndex: 0 } ];\n\n\t\t\t}\n\n\t\t\t// create a data structure that contains all eges without duplicates\n\n\t\t\tfor ( let o = 0, ol = groups.length; o < ol; ++ o ) {\n\n\t\t\t\tconst group = groups[ o ];\n\n\t\t\t\tconst start = group.start;\n\t\t\t\tconst count = group.count;\n\n\t\t\t\tfor ( let i = start, l = ( start + count ); i < l; i += 3 ) {\n\n\t\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t\tconst edge1 = indices.getX( i + j );\n\t\t\t\t\t\tconst edge2 = indices.getX( i + ( j + 1 ) % 3 );\n\t\t\t\t\t\tedge[ 0 ] = Math.min( edge1, edge2 ); // sorting prevents duplicates\n\t\t\t\t\t\tedge[ 1 ] = Math.max( edge1, edge2 );\n\n\t\t\t\t\t\tconst key = edge[ 0 ] + ',' + edge[ 1 ];\n\n\t\t\t\t\t\tif ( edges[ key ] === undefined ) {\n\n\t\t\t\t\t\t\tedges[ key ] = { index1: edge[ 0 ], index2: edge[ 1 ] };\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// generate vertices\n\n\t\t\tfor ( const key in edges ) {\n\n\t\t\t\tconst e = edges[ key ];\n\n\t\t\t\tvertex.fromBufferAttribute( position, e.index1 );\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\tvertex.fromBufferAttribute( position, e.index2 );\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// non-indexed BufferGeometry\n\n\t\t\tconst position = geometry.attributes.position;\n\n\t\t\tfor ( let i = 0, l = ( position.count / 3 ); i < l; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t// three edges per triangle, an edge is represented as (index1, index2)\n\t\t\t\t\t// e.g. the first triangle has the following edges: (0,1),(1,2),(2,0)\n\n\t\t\t\t\tconst index1 = 3 * i + j;\n\t\t\t\t\tvertex.fromBufferAttribute( position, index1 );\n\t\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t\tconst index2 = 3 * i + ( ( j + 1 ) % 3 );\n\t\t\t\t\tvertex.fromBufferAttribute( position, index2 );\n\t\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\n\t}\n\n}\n\nvar Geometries = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tBoxGeometry: BoxGeometry,\n\tBoxBufferGeometry: BoxGeometry,\n\tCircleGeometry: CircleGeometry,\n\tCircleBufferGeometry: CircleGeometry,\n\tConeGeometry: ConeGeometry,\n\tConeBufferGeometry: ConeGeometry,\n\tCylinderGeometry: CylinderGeometry,\n\tCylinderBufferGeometry: CylinderGeometry,\n\tDodecahedronGeometry: DodecahedronGeometry,\n\tDodecahedronBufferGeometry: DodecahedronGeometry,\n\tEdgesGeometry: EdgesGeometry,\n\tExtrudeGeometry: ExtrudeGeometry,\n\tExtrudeBufferGeometry: ExtrudeGeometry,\n\tIcosahedronGeometry: IcosahedronGeometry,\n\tIcosahedronBufferGeometry: IcosahedronGeometry,\n\tLatheGeometry: LatheGeometry,\n\tLatheBufferGeometry: LatheGeometry,\n\tOctahedronGeometry: OctahedronGeometry,\n\tOctahedronBufferGeometry: OctahedronGeometry,\n\tParametricGeometry: ParametricGeometry,\n\tParametricBufferGeometry: ParametricGeometry,\n\tPlaneGeometry: PlaneGeometry,\n\tPlaneBufferGeometry: PlaneGeometry,\n\tPolyhedronGeometry: PolyhedronGeometry,\n\tPolyhedronBufferGeometry: PolyhedronGeometry,\n\tRingGeometry: RingGeometry,\n\tRingBufferGeometry: RingGeometry,\n\tShapeGeometry: ShapeGeometry,\n\tShapeBufferGeometry: ShapeGeometry,\n\tSphereGeometry: SphereGeometry,\n\tSphereBufferGeometry: SphereGeometry,\n\tTetrahedronGeometry: TetrahedronGeometry,\n\tTetrahedronBufferGeometry: TetrahedronGeometry,\n\tTextGeometry: TextGeometry,\n\tTextBufferGeometry: TextGeometry,\n\tTorusGeometry: TorusGeometry,\n\tTorusBufferGeometry: TorusGeometry,\n\tTorusKnotGeometry: TorusKnotGeometry,\n\tTorusKnotBufferGeometry: TorusKnotGeometry,\n\tTubeGeometry: TubeGeometry,\n\tTubeBufferGeometry: TubeGeometry,\n\tWireframeGeometry: WireframeGeometry\n});\n\n/**\n * parameters = {\n * color: <THREE.Color>\n * }\n */\n\nclass ShadowMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ShadowMaterial';\n\n\t\tthis.color = new Color( 0x000000 );\n\t\tthis.transparent = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\treturn this;\n\n\t}\n\n}\n\nShadowMaterial.prototype.isShadowMaterial = true;\n\nclass RawShaderMaterial extends ShaderMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper( parameters );\n\n\t\tthis.type = 'RawShaderMaterial';\n\n\t}\n\n}\n\nRawShaderMaterial.prototype.isRawShaderMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * roughness: <float>,\n * metalness: <float>,\n * opacity: <float>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * emissive: <hex>,\n * emissiveIntensity: <float>\n * emissiveMap: new THREE.Texture( <Image> ),\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * roughnessMap: new THREE.Texture( <Image> ),\n *\n * metalnessMap: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n * envMapIntensity: <float>\n *\n * refractionRatio: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>,\n *\n * flatShading: <bool>\n * }\n */\n\nclass MeshStandardMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.defines = { 'STANDARD': '' };\n\n\t\tthis.type = 'MeshStandardMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\t\tthis.roughness = 1.0;\n\t\tthis.metalness = 0.0;\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.roughnessMap = null;\n\n\t\tthis.metalnessMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.envMapIntensity = 1.0;\n\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.vertexTangents = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = { 'STANDARD': '' };\n\n\t\tthis.color.copy( source.color );\n\t\tthis.roughness = source.roughness;\n\t\tthis.metalness = source.metalness;\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.roughnessMap = source.roughnessMap;\n\n\t\tthis.metalnessMap = source.metalnessMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.envMapIntensity = source.envMapIntensity;\n\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.vertexTangents = source.vertexTangents;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshStandardMaterial.prototype.isMeshStandardMaterial = true;\n\n/**\n * parameters = {\n * clearcoat: <float>,\n * clearcoatMap: new THREE.Texture( <Image> ),\n * clearcoatRoughness: <float>,\n * clearcoatRoughnessMap: new THREE.Texture( <Image> ),\n * clearcoatNormalScale: <Vector2>,\n * clearcoatNormalMap: new THREE.Texture( <Image> ),\n *\n * reflectivity: <float>,\n * ior: <float>,\n *\n * sheen: <Color>,\n *\n * transmission: <float>,\n * transmissionMap: new THREE.Texture( <Image> ),\n *\n * thickness: <float>,\n * thicknessMap: new THREE.Texture( <Image> ),\n * attenuationDistance: <float>,\n * attenuationColor: <Color>\n * }\n */\n\nclass MeshPhysicalMaterial extends MeshStandardMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.defines = {\n\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\n\t\t};\n\n\t\tthis.type = 'MeshPhysicalMaterial';\n\n\t\tthis.clearcoat = 0.0;\n\t\tthis.clearcoatMap = null;\n\t\tthis.clearcoatRoughness = 0.0;\n\t\tthis.clearcoatRoughnessMap = null;\n\t\tthis.clearcoatNormalScale = new Vector2( 1, 1 );\n\t\tthis.clearcoatNormalMap = null;\n\n\t\tthis.reflectivity = 0.5; // maps to F0 = 0.04\n\n\t\tObject.defineProperty( this, 'ior', {\n\t\t\tget: function () {\n\n\t\t\t\treturn ( 1 + 0.4 * this.reflectivity ) / ( 1 - 0.4 * this.reflectivity );\n\n\t\t\t},\n\t\t\tset: function ( ior ) {\n\n\t\t\t\tthis.reflectivity = clamp( 2.5 * ( ior - 1 ) / ( ior + 1 ), 0, 1 );\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.sheen = null; // null will disable sheen bsdf\n\n\t\tthis.transmission = 0.0;\n\t\tthis.transmissionMap = null;\n\n\t\tthis.thickness = 0.01;\n\t\tthis.thicknessMap = null;\n\t\tthis.attenuationDistance = 0.0;\n\t\tthis.attenuationColor = new Color( 1, 1, 1 );\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = {\n\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\n\t\t};\n\n\t\tthis.clearcoat = source.clearcoat;\n\t\tthis.clearcoatMap = source.clearcoatMap;\n\t\tthis.clearcoatRoughness = source.clearcoatRoughness;\n\t\tthis.clearcoatRoughnessMap = source.clearcoatRoughnessMap;\n\t\tthis.clearcoatNormalMap = source.clearcoatNormalMap;\n\t\tthis.clearcoatNormalScale.copy( source.clearcoatNormalScale );\n\n\t\tthis.reflectivity = source.reflectivity;\n\n\t\tif ( source.sheen ) {\n\n\t\t\tthis.sheen = ( this.sheen || new Color() ).copy( source.sheen );\n\n\t\t} else {\n\n\t\t\tthis.sheen = null;\n\n\t\t}\n\n\t\tthis.transmission = source.transmission;\n\t\tthis.transmissionMap = source.transmissionMap;\n\n\t\tthis.thickness = source.thickness;\n\t\tthis.thicknessMap = source.thicknessMap;\n\t\tthis.attenuationDistance = source.attenuationDistance;\n\t\tthis.attenuationColor.copy( source.attenuationColor );\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshPhysicalMaterial.prototype.isMeshPhysicalMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * specular: <hex>,\n * shininess: <float>,\n * opacity: <float>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * emissive: <hex>,\n * emissiveIntensity: <float>\n * emissiveMap: new THREE.Texture( <Image> ),\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * specularMap: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n * combine: THREE.MultiplyOperation,\n * reflectivity: <float>,\n * refractionRatio: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>,\n *\n * flatShading: <bool>\n * }\n */\n\nclass MeshPhongMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshPhongMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\t\tthis.specular = new Color( 0x111111 );\n\t\tthis.shininess = 30;\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\t\tthis.specular.copy( source.specular );\n\t\tthis.shininess = source.shininess;\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshPhongMaterial.prototype.isMeshPhongMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n *\n * map: new THREE.Texture( <Image> ),\n * gradientMap: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * emissive: <hex>,\n * emissiveIntensity: <float>\n * emissiveMap: new THREE.Texture( <Image> ),\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>\n * }\n */\n\nclass MeshToonMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.defines = { 'TOON': '' };\n\n\t\tthis.type = 'MeshToonMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\t\tthis.gradientMap = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\t\tthis.gradientMap = source.gradientMap;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshToonMaterial.prototype.isMeshToonMaterial = true;\n\n/**\n * parameters = {\n * opacity: <float>,\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>,\n *\n * flatShading: <bool>\n * }\n */\n\nclass MeshNormalMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshNormalMaterial';\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.fog = false;\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshNormalMaterial.prototype.isMeshNormalMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * emissive: <hex>,\n * emissiveIntensity: <float>\n * emissiveMap: new THREE.Texture( <Image> ),\n *\n * specularMap: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n * combine: THREE.Multiply,\n * reflectivity: <float>,\n * refractionRatio: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>\n * }\n */\n\nclass MeshLambertMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshLambertMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshLambertMaterial.prototype.isMeshLambertMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n *\n * matcap: new THREE.Texture( <Image> ),\n *\n * map: new THREE.Texture( <Image> ),\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>\n *\n * flatShading: <bool>\n * }\n */\n\nclass MeshMatcapMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.defines = { 'MATCAP': '' };\n\n\t\tthis.type = 'MeshMatcapMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\n\t\tthis.matcap = null;\n\n\t\tthis.map = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = { 'MATCAP': '' };\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.matcap = source.matcap;\n\n\t\tthis.map = source.map;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshMatcapMaterial.prototype.isMeshMatcapMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n *\n * linewidth: <float>,\n *\n * scale: <float>,\n * dashSize: <float>,\n * gapSize: <float>\n * }\n */\n\nclass LineDashedMaterial extends LineBasicMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineDashedMaterial';\n\n\t\tthis.scale = 1;\n\t\tthis.dashSize = 3;\n\t\tthis.gapSize = 1;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.scale = source.scale;\n\t\tthis.dashSize = source.dashSize;\n\t\tthis.gapSize = source.gapSize;\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineDashedMaterial.prototype.isLineDashedMaterial = true;\n\nvar Materials = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tShadowMaterial: ShadowMaterial,\n\tSpriteMaterial: SpriteMaterial,\n\tRawShaderMaterial: RawShaderMaterial,\n\tShaderMaterial: ShaderMaterial,\n\tPointsMaterial: PointsMaterial,\n\tMeshPhysicalMaterial: MeshPhysicalMaterial,\n\tMeshStandardMaterial: MeshStandardMaterial,\n\tMeshPhongMaterial: MeshPhongMaterial,\n\tMeshToonMaterial: MeshToonMaterial,\n\tMeshNormalMaterial: MeshNormalMaterial,\n\tMeshLambertMaterial: MeshLambertMaterial,\n\tMeshDepthMaterial: MeshDepthMaterial,\n\tMeshDistanceMaterial: MeshDistanceMaterial,\n\tMeshBasicMaterial: MeshBasicMaterial,\n\tMeshMatcapMaterial: MeshMatcapMaterial,\n\tLineDashedMaterial: LineDashedMaterial,\n\tLineBasicMaterial: LineBasicMaterial,\n\tMaterial: Material\n});\n\nconst AnimationUtils = {\n\n\t// same as Array.prototype.slice, but also works on typed arrays\n\tarraySlice: function ( array, from, to ) {\n\n\t\tif ( AnimationUtils.isTypedArray( array ) ) {\n\n\t\t\t// in ios9 array.subarray(from, undefined) will return empty array\n\t\t\t// but array.subarray(from) or array.subarray(from, len) is correct\n\t\t\treturn new array.constructor( array.subarray( from, to !== undefined ? to : array.length ) );\n\n\t\t}\n\n\t\treturn array.slice( from, to );\n\n\t},\n\n\t// converts an array to a specific type\n\tconvertArray: function ( array, type, forceClone ) {\n\n\t\tif ( ! array || // let 'undefined' and 'null' pass\n\t\t\t! forceClone && array.constructor === type ) return array;\n\n\t\tif ( typeof type.BYTES_PER_ELEMENT === 'number' ) {\n\n\t\t\treturn new type( array ); // create typed array\n\n\t\t}\n\n\t\treturn Array.prototype.slice.call( array ); // create Array\n\n\t},\n\n\tisTypedArray: function ( object ) {\n\n\t\treturn ArrayBuffer.isView( object ) &&\n\t\t\t! ( object instanceof DataView );\n\n\t},\n\n\t// returns an array by which times and values can be sorted\n\tgetKeyframeOrder: function ( times ) {\n\n\t\tfunction compareTime( i, j ) {\n\n\t\t\treturn times[ i ] - times[ j ];\n\n\t\t}\n\n\t\tconst n = times.length;\n\t\tconst result = new Array( n );\n\t\tfor ( let i = 0; i !== n; ++ i ) result[ i ] = i;\n\n\t\tresult.sort( compareTime );\n\n\t\treturn result;\n\n\t},\n\n\t// uses the array previously returned by 'getKeyframeOrder' to sort data\n\tsortedArray: function ( values, stride, order ) {\n\n\t\tconst nValues = values.length;\n\t\tconst result = new values.constructor( nValues );\n\n\t\tfor ( let i = 0, dstOffset = 0; dstOffset !== nValues; ++ i ) {\n\n\t\t\tconst srcOffset = order[ i ] * stride;\n\n\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\tresult[ dstOffset ++ ] = values[ srcOffset + j ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn result;\n\n\t},\n\n\t// function for parsing AOS keyframe formats\n\tflattenJSON: function ( jsonKeys, times, values, valuePropertyName ) {\n\n\t\tlet i = 1, key = jsonKeys[ 0 ];\n\n\t\twhile ( key !== undefined && key[ valuePropertyName ] === undefined ) {\n\n\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t}\n\n\t\tif ( key === undefined ) return; // no data\n\n\t\tlet value = key[ valuePropertyName ];\n\t\tif ( value === undefined ) return; // no data\n\n\t\tif ( Array.isArray( value ) ) {\n\n\t\t\tdo {\n\n\t\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\ttimes.push( key.time );\n\t\t\t\t\tvalues.push.apply( values, value ); // push all elements\n\n\t\t\t\t}\n\n\t\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t\t} while ( key !== undefined );\n\n\t\t} else if ( value.toArray !== undefined ) {\n\n\t\t\t// ...assume THREE.Math-ish\n\n\t\t\tdo {\n\n\t\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\ttimes.push( key.time );\n\t\t\t\t\tvalue.toArray( values, values.length );\n\n\t\t\t\t}\n\n\t\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t\t} while ( key !== undefined );\n\n\t\t} else {\n\n\t\t\t// otherwise push as-is\n\n\t\t\tdo {\n\n\t\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\ttimes.push( key.time );\n\t\t\t\t\tvalues.push( value );\n\n\t\t\t\t}\n\n\t\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t\t} while ( key !== undefined );\n\n\t\t}\n\n\t},\n\n\tsubclip: function ( sourceClip, name, startFrame, endFrame, fps = 30 ) {\n\n\t\tconst clip = sourceClip.clone();\n\n\t\tclip.name = name;\n\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\t\tconst track = clip.tracks[ i ];\n\t\t\tconst valueSize = track.getValueSize();\n\n\t\t\tconst times = [];\n\t\t\tconst values = [];\n\n\t\t\tfor ( let j = 0; j < track.times.length; ++ j ) {\n\n\t\t\t\tconst frame = track.times[ j ] * fps;\n\n\t\t\t\tif ( frame < startFrame || frame >= endFrame ) continue;\n\n\t\t\t\ttimes.push( track.times[ j ] );\n\n\t\t\t\tfor ( let k = 0; k < valueSize; ++ k ) {\n\n\t\t\t\t\tvalues.push( track.values[ j * valueSize + k ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( times.length === 0 ) continue;\n\n\t\t\ttrack.times = AnimationUtils.convertArray( times, track.times.constructor );\n\t\t\ttrack.values = AnimationUtils.convertArray( values, track.values.constructor );\n\n\t\t\ttracks.push( track );\n\n\t\t}\n\n\t\tclip.tracks = tracks;\n\n\t\t// find minimum .times value across all tracks in the trimmed clip\n\n\t\tlet minStartTime = Infinity;\n\n\t\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\t\tif ( minStartTime > clip.tracks[ i ].times[ 0 ] ) {\n\n\t\t\t\tminStartTime = clip.tracks[ i ].times[ 0 ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// shift all tracks such that clip begins at t=0\n\n\t\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\t\tclip.tracks[ i ].shift( - 1 * minStartTime );\n\n\t\t}\n\n\t\tclip.resetDuration();\n\n\t\treturn clip;\n\n\t},\n\n\tmakeClipAdditive: function ( targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30 ) {\n\n\t\tif ( fps <= 0 ) fps = 30;\n\n\t\tconst numTracks = referenceClip.tracks.length;\n\t\tconst referenceTime = referenceFrame / fps;\n\n\t\t// Make each track's values relative to the values at the reference frame\n\t\tfor ( let i = 0; i < numTracks; ++ i ) {\n\n\t\t\tconst referenceTrack = referenceClip.tracks[ i ];\n\t\t\tconst referenceTrackType = referenceTrack.ValueTypeName;\n\n\t\t\t// Skip this track if it's non-numeric\n\t\t\tif ( referenceTrackType === 'bool' || referenceTrackType === 'string' ) continue;\n\n\t\t\t// Find the track in the target clip whose name and type matches the reference track\n\t\t\tconst targetTrack = targetClip.tracks.find( function ( track ) {\n\n\t\t\t\treturn track.name === referenceTrack.name\n\t\t\t\t\t&& track.ValueTypeName === referenceTrackType;\n\n\t\t\t} );\n\n\t\t\tif ( targetTrack === undefined ) continue;\n\n\t\t\tlet referenceOffset = 0;\n\t\t\tconst referenceValueSize = referenceTrack.getValueSize();\n\n\t\t\tif ( referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\t\treferenceOffset = referenceValueSize / 3;\n\n\t\t\t}\n\n\t\t\tlet targetOffset = 0;\n\t\t\tconst targetValueSize = targetTrack.getValueSize();\n\n\t\t\tif ( targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\t\ttargetOffset = targetValueSize / 3;\n\n\t\t\t}\n\n\t\t\tconst lastIndex = referenceTrack.times.length - 1;\n\t\t\tlet referenceValue;\n\n\t\t\t// Find the value to subtract out of the track\n\t\t\tif ( referenceTime <= referenceTrack.times[ 0 ] ) {\n\n\t\t\t\t// Reference frame is earlier than the first keyframe, so just use the first keyframe\n\t\t\t\tconst startIndex = referenceOffset;\n\t\t\t\tconst endIndex = referenceValueSize - referenceOffset;\n\t\t\t\treferenceValue = AnimationUtils.arraySlice( referenceTrack.values, startIndex, endIndex );\n\n\t\t\t} else if ( referenceTime >= referenceTrack.times[ lastIndex ] ) {\n\n\t\t\t\t// Reference frame is after the last keyframe, so just use the last keyframe\n\t\t\t\tconst startIndex = lastIndex * referenceValueSize + referenceOffset;\n\t\t\t\tconst endIndex = startIndex + referenceValueSize - referenceOffset;\n\t\t\t\treferenceValue = AnimationUtils.arraySlice( referenceTrack.values, startIndex, endIndex );\n\n\t\t\t} else {\n\n\t\t\t\t// Interpolate to the reference value\n\t\t\t\tconst interpolant = referenceTrack.createInterpolant();\n\t\t\t\tconst startIndex = referenceOffset;\n\t\t\t\tconst endIndex = referenceValueSize - referenceOffset;\n\t\t\t\tinterpolant.evaluate( referenceTime );\n\t\t\t\treferenceValue = AnimationUtils.arraySlice( interpolant.resultBuffer, startIndex, endIndex );\n\n\t\t\t}\n\n\t\t\t// Conjugate the quaternion\n\t\t\tif ( referenceTrackType === 'quaternion' ) {\n\n\t\t\t\tconst referenceQuat = new Quaternion().fromArray( referenceValue ).normalize().conjugate();\n\t\t\t\treferenceQuat.toArray( referenceValue );\n\n\t\t\t}\n\n\t\t\t// Subtract the reference value from all of the track values\n\n\t\t\tconst numTimes = targetTrack.times.length;\n\t\t\tfor ( let j = 0; j < numTimes; ++ j ) {\n\n\t\t\t\tconst valueStart = j * targetValueSize + targetOffset;\n\n\t\t\t\tif ( referenceTrackType === 'quaternion' ) {\n\n\t\t\t\t\t// Multiply the conjugate for quaternion track types\n\t\t\t\t\tQuaternion.multiplyQuaternionsFlat(\n\t\t\t\t\t\ttargetTrack.values,\n\t\t\t\t\t\tvalueStart,\n\t\t\t\t\t\treferenceValue,\n\t\t\t\t\t\t0,\n\t\t\t\t\t\ttargetTrack.values,\n\t\t\t\t\t\tvalueStart\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst valueEnd = targetValueSize - targetOffset * 2;\n\n\t\t\t\t\t// Subtract each value for all other numeric track types\n\t\t\t\t\tfor ( let k = 0; k < valueEnd; ++ k ) {\n\n\t\t\t\t\t\ttargetTrack.values[ valueStart + k ] -= referenceValue[ k ];\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\ttargetClip.blendMode = AdditiveAnimationBlendMode;\n\n\t\treturn targetClip;\n\n\t}\n\n};\n\n/**\n * Abstract base class of interpolants over parametric samples.\n *\n * The parameter domain is one dimensional, typically the time or a path\n * along a curve defined by the data.\n *\n * The sample values can have any dimensionality and derived classes may\n * apply special interpretations to the data.\n *\n * This class provides the interval seek in a Template Method, deferring\n * the actual interpolation to derived classes.\n *\n * Time complexity is O(1) for linear access crossing at most two points\n * and O(log N) for random access, where N is the number of positions.\n *\n * References:\n *\n * \t\thttp://www.oodesign.com/template-method-pattern.html\n *\n */\n\nclass Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tthis.parameterPositions = parameterPositions;\n\t\tthis._cachedIndex = 0;\n\n\t\tthis.resultBuffer = resultBuffer !== undefined ?\n\t\t\tresultBuffer : new sampleValues.constructor( sampleSize );\n\t\tthis.sampleValues = sampleValues;\n\t\tthis.valueSize = sampleSize;\n\n\t\tthis.settings = null;\n\t\tthis.DefaultSettings_ = {};\n\n\t}\n\n\tevaluate( t ) {\n\n\t\tconst pp = this.parameterPositions;\n\t\tlet i1 = this._cachedIndex,\n\t\t\tt1 = pp[ i1 ],\n\t\t\tt0 = pp[ i1 - 1 ];\n\n\t\tvalidate_interval: {\n\n\t\t\tseek: {\n\n\t\t\t\tlet right;\n\n\t\t\t\tlinear_scan: {\n\n\t\t\t\t\t//- See http://jsperf.com/comparison-to-undefined/3\n\t\t\t\t\t//- slower code:\n\t\t\t\t\t//-\n\t\t\t\t\t//- \t\t\t\tif ( t >= t1 || t1 === undefined ) {\n\t\t\t\t\tforward_scan: if ( ! ( t < t1 ) ) {\n\n\t\t\t\t\t\tfor ( let giveUpAt = i1 + 2; ; ) {\n\n\t\t\t\t\t\t\tif ( t1 === undefined ) {\n\n\t\t\t\t\t\t\t\tif ( t < t0 ) break forward_scan;\n\n\t\t\t\t\t\t\t\t// after end\n\n\t\t\t\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\t\t\t\treturn this.afterEnd_( i1 - 1, t, t0 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( i1 === giveUpAt ) break; // this loop\n\n\t\t\t\t\t\t\tt0 = t1;\n\t\t\t\t\t\t\tt1 = pp[ ++ i1 ];\n\n\t\t\t\t\t\t\tif ( t < t1 ) {\n\n\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\tbreak seek;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// prepare binary search on the right side of the index\n\t\t\t\t\t\tright = pp.length;\n\t\t\t\t\t\tbreak linear_scan;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//- slower code:\n\t\t\t\t\t//-\t\t\t\t\tif ( t < t0 || t0 === undefined ) {\n\t\t\t\t\tif ( ! ( t >= t0 ) ) {\n\n\t\t\t\t\t\t// looping?\n\n\t\t\t\t\t\tconst t1global = pp[ 1 ];\n\n\t\t\t\t\t\tif ( t < t1global ) {\n\n\t\t\t\t\t\t\ti1 = 2; // + 1, using the scan for the details\n\t\t\t\t\t\t\tt0 = t1global;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// linear reverse scan\n\n\t\t\t\t\t\tfor ( let giveUpAt = i1 - 2; ; ) {\n\n\t\t\t\t\t\t\tif ( t0 === undefined ) {\n\n\t\t\t\t\t\t\t\t// before start\n\n\t\t\t\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\t\t\t\treturn this.beforeStart_( 0, t, t1 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( i1 === giveUpAt ) break; // this loop\n\n\t\t\t\t\t\t\tt1 = t0;\n\t\t\t\t\t\t\tt0 = pp[ -- i1 - 1 ];\n\n\t\t\t\t\t\t\tif ( t >= t0 ) {\n\n\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\tbreak seek;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// prepare binary search on the left side of the index\n\t\t\t\t\t\tright = i1;\n\t\t\t\t\t\ti1 = 0;\n\t\t\t\t\t\tbreak linear_scan;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// the interval is valid\n\n\t\t\t\t\tbreak validate_interval;\n\n\t\t\t\t} // linear scan\n\n\t\t\t\t// binary search\n\n\t\t\t\twhile ( i1 < right ) {\n\n\t\t\t\t\tconst mid = ( i1 + right ) >>> 1;\n\n\t\t\t\t\tif ( t < pp[ mid ] ) {\n\n\t\t\t\t\t\tright = mid;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ti1 = mid + 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tt1 = pp[ i1 ];\n\t\t\t\tt0 = pp[ i1 - 1 ];\n\n\t\t\t\t// check boundary cases, again\n\n\t\t\t\tif ( t0 === undefined ) {\n\n\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\treturn this.beforeStart_( 0, t, t1 );\n\n\t\t\t\t}\n\n\t\t\t\tif ( t1 === undefined ) {\n\n\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\treturn this.afterEnd_( i1 - 1, t0, t );\n\n\t\t\t\t}\n\n\t\t\t} // seek\n\n\t\t\tthis._cachedIndex = i1;\n\n\t\t\tthis.intervalChanged_( i1, t0, t1 );\n\n\t\t} // validate_interval\n\n\t\treturn this.interpolate_( i1, t0, t, t1 );\n\n\t}\n\n\tgetSettings_() {\n\n\t\treturn this.settings || this.DefaultSettings_;\n\n\t}\n\n\tcopySampleValue_( index ) {\n\n\t\t// copies a sample value to the result buffer\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = index * stride;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] = values[ offset + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\t// Template methods for derived classes:\n\n\tinterpolate_( /* i1, t0, t, t1 */ ) {\n\n\t\tthrow new Error( 'call to abstract method' );\n\t\t// implementations shall return this.resultBuffer\n\n\t}\n\n\tintervalChanged_( /* i1, t0, t1 */ ) {\n\n\t\t// empty\n\n\t}\n\n}\n\n// ALIAS DEFINITIONS\n\nInterpolant.prototype.beforeStart_ = Interpolant.prototype.copySampleValue_;\nInterpolant.prototype.afterEnd_ = Interpolant.prototype.copySampleValue_;\n\n/**\n * Fast and simple cubic spline interpolant.\n *\n * It was derived from a Hermitian construction setting the first derivative\n * at each sample position to the linear slope between neighboring positions\n * over their parameter interval.\n */\n\nclass CubicInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t\tthis._weightPrev = - 0;\n\t\tthis._offsetPrev = - 0;\n\t\tthis._weightNext = - 0;\n\t\tthis._offsetNext = - 0;\n\n\t\tthis.DefaultSettings_ = {\n\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\n\t\t};\n\n\t}\n\n\tintervalChanged_( i1, t0, t1 ) {\n\n\t\tconst pp = this.parameterPositions;\n\t\tlet iPrev = i1 - 2,\n\t\t\tiNext = i1 + 1,\n\n\t\t\ttPrev = pp[ iPrev ],\n\t\t\ttNext = pp[ iNext ];\n\n\t\tif ( tPrev === undefined ) {\n\n\t\t\tswitch ( this.getSettings_().endingStart ) {\n\n\t\t\t\tcase ZeroSlopeEnding:\n\n\t\t\t\t\t// f'(t0) = 0\n\t\t\t\t\tiPrev = i1;\n\t\t\t\t\ttPrev = 2 * t0 - t1;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase WrapAroundEnding:\n\n\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\tiPrev = pp.length - 2;\n\t\t\t\t\ttPrev = t0 + pp[ iPrev ] - pp[ iPrev + 1 ];\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // ZeroCurvatureEnding\n\n\t\t\t\t\t// f''(t0) = 0 a.k.a. Natural Spline\n\t\t\t\t\tiPrev = i1;\n\t\t\t\t\ttPrev = t1;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( tNext === undefined ) {\n\n\t\t\tswitch ( this.getSettings_().endingEnd ) {\n\n\t\t\t\tcase ZeroSlopeEnding:\n\n\t\t\t\t\t// f'(tN) = 0\n\t\t\t\t\tiNext = i1;\n\t\t\t\t\ttNext = 2 * t1 - t0;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase WrapAroundEnding:\n\n\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\tiNext = 1;\n\t\t\t\t\ttNext = t1 + pp[ 1 ] - pp[ 0 ];\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // ZeroCurvatureEnding\n\n\t\t\t\t\t// f''(tN) = 0, a.k.a. Natural Spline\n\t\t\t\t\tiNext = i1 - 1;\n\t\t\t\t\ttNext = t0;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst halfDt = ( t1 - t0 ) * 0.5,\n\t\t\tstride = this.valueSize;\n\n\t\tthis._weightPrev = halfDt / ( t0 - tPrev );\n\t\tthis._weightNext = halfDt / ( tNext - t1 );\n\t\tthis._offsetPrev = iPrev * stride;\n\t\tthis._offsetNext = iNext * stride;\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\to1 = i1 * stride,\t\to0 = o1 - stride,\n\t\t\toP = this._offsetPrev, \toN = this._offsetNext,\n\t\t\twP = this._weightPrev,\twN = this._weightNext,\n\n\t\t\tp = ( t - t0 ) / ( t1 - t0 ),\n\t\t\tpp = p * p,\n\t\t\tppp = pp * p;\n\n\t\t// evaluate polynomials\n\n\t\tconst sP = - wP * ppp + 2 * wP * pp - wP * p;\n\t\tconst s0 = ( 1 + wP ) * ppp + ( - 1.5 - 2 * wP ) * pp + ( - 0.5 + wP ) * p + 1;\n\t\tconst s1 = ( - 1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p;\n\t\tconst sN = wN * ppp - wN * pp;\n\n\t\t// combine data linearly\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] =\n\t\t\t\t\tsP * values[ oP + i ] +\n\t\t\t\t\ts0 * values[ o0 + i ] +\n\t\t\t\t\ts1 * values[ o1 + i ] +\n\t\t\t\t\tsN * values[ oN + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\nclass LinearInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\toffset1 = i1 * stride,\n\t\t\toffset0 = offset1 - stride,\n\n\t\t\tweight1 = ( t - t0 ) / ( t1 - t0 ),\n\t\t\tweight0 = 1 - weight1;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] =\n\t\t\t\t\tvalues[ offset0 + i ] * weight0 +\n\t\t\t\t\tvalues[ offset1 + i ] * weight1;\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\n/**\n *\n * Interpolant that evaluates to the sample value at the position preceeding\n * the parameter.\n */\n\nclass DiscreteInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1 /*, t0, t, t1 */ ) {\n\n\t\treturn this.copySampleValue_( i1 - 1 );\n\n\t}\n\n}\n\nclass KeyframeTrack {\n\n\tconstructor( name, times, values, interpolation ) {\n\n\t\tif ( name === undefined ) throw new Error( 'THREE.KeyframeTrack: track name is undefined' );\n\t\tif ( times === undefined || times.length === 0 ) throw new Error( 'THREE.KeyframeTrack: no keyframes in track named ' + name );\n\n\t\tthis.name = name;\n\n\t\tthis.times = AnimationUtils.convertArray( times, this.TimeBufferType );\n\t\tthis.values = AnimationUtils.convertArray( values, this.ValueBufferType );\n\n\t\tthis.setInterpolation( interpolation || this.DefaultInterpolation );\n\n\t}\n\n\t// Serialization (in static context, because of constructor invocation\n\t// and automatic invocation of .toJSON):\n\n\tstatic toJSON( track ) {\n\n\t\tconst trackType = track.constructor;\n\n\t\tlet json;\n\n\t\t// derived classes can define a static toJSON method\n\t\tif ( trackType.toJSON !== this.toJSON ) {\n\n\t\t\tjson = trackType.toJSON( track );\n\n\t\t} else {\n\n\t\t\t// by default, we assume the data can be serialized as-is\n\t\t\tjson = {\n\n\t\t\t\t'name': track.name,\n\t\t\t\t'times': AnimationUtils.convertArray( track.times, Array ),\n\t\t\t\t'values': AnimationUtils.convertArray( track.values, Array )\n\n\t\t\t};\n\n\t\t\tconst interpolation = track.getInterpolation();\n\n\t\t\tif ( interpolation !== track.DefaultInterpolation ) {\n\n\t\t\t\tjson.interpolation = interpolation;\n\n\t\t\t}\n\n\t\t}\n\n\t\tjson.type = track.ValueTypeName; // mandatory\n\n\t\treturn json;\n\n\t}\n\n\tInterpolantFactoryMethodDiscrete( result ) {\n\n\t\treturn new DiscreteInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tInterpolantFactoryMethodLinear( result ) {\n\n\t\treturn new LinearInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tInterpolantFactoryMethodSmooth( result ) {\n\n\t\treturn new CubicInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tsetInterpolation( interpolation ) {\n\n\t\tlet factoryMethod;\n\n\t\tswitch ( interpolation ) {\n\n\t\t\tcase InterpolateDiscrete:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodDiscrete;\n\n\t\t\t\tbreak;\n\n\t\t\tcase InterpolateLinear:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodLinear;\n\n\t\t\t\tbreak;\n\n\t\t\tcase InterpolateSmooth:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodSmooth;\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tif ( factoryMethod === undefined ) {\n\n\t\t\tconst message = 'unsupported interpolation for ' +\n\t\t\t\tthis.ValueTypeName + ' keyframe track named ' + this.name;\n\n\t\t\tif ( this.createInterpolant === undefined ) {\n\n\t\t\t\t// fall back to default, unless the default itself is messed up\n\t\t\t\tif ( interpolation !== this.DefaultInterpolation ) {\n\n\t\t\t\t\tthis.setInterpolation( this.DefaultInterpolation );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( message ); // fatal, in this case\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconsole.warn( 'THREE.KeyframeTrack:', message );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tthis.createInterpolant = factoryMethod;\n\n\t\treturn this;\n\n\t}\n\n\tgetInterpolation() {\n\n\t\tswitch ( this.createInterpolant ) {\n\n\t\t\tcase this.InterpolantFactoryMethodDiscrete:\n\n\t\t\t\treturn InterpolateDiscrete;\n\n\t\t\tcase this.InterpolantFactoryMethodLinear:\n\n\t\t\t\treturn InterpolateLinear;\n\n\t\t\tcase this.InterpolantFactoryMethodSmooth:\n\n\t\t\t\treturn InterpolateSmooth;\n\n\t\t}\n\n\t}\n\n\tgetValueSize() {\n\n\t\treturn this.values.length / this.times.length;\n\n\t}\n\n\t// move all keyframes either forwards or backwards in time\n\tshift( timeOffset ) {\n\n\t\tif ( timeOffset !== 0.0 ) {\n\n\t\t\tconst times = this.times;\n\n\t\t\tfor ( let i = 0, n = times.length; i !== n; ++ i ) {\n\n\t\t\t\ttimes[ i ] += timeOffset;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// scale all keyframe times by a factor (useful for frame <-> seconds conversions)\n\tscale( timeScale ) {\n\n\t\tif ( timeScale !== 1.0 ) {\n\n\t\t\tconst times = this.times;\n\n\t\t\tfor ( let i = 0, n = times.length; i !== n; ++ i ) {\n\n\t\t\t\ttimes[ i ] *= timeScale;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// removes keyframes before and after animation without changing any values within the range [startTime, endTime].\n\t// IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values\n\ttrim( startTime, endTime ) {\n\n\t\tconst times = this.times,\n\t\t\tnKeys = times.length;\n\n\t\tlet from = 0,\n\t\t\tto = nKeys - 1;\n\n\t\twhile ( from !== nKeys && times[ from ] < startTime ) {\n\n\t\t\t++ from;\n\n\t\t}\n\n\t\twhile ( to !== - 1 && times[ to ] > endTime ) {\n\n\t\t\t-- to;\n\n\t\t}\n\n\t\t++ to; // inclusive -> exclusive bound\n\n\t\tif ( from !== 0 || to !== nKeys ) {\n\n\t\t\t// empty tracks are forbidden, so keep at least one keyframe\n\t\t\tif ( from >= to ) {\n\n\t\t\t\tto = Math.max( to, 1 );\n\t\t\t\tfrom = to - 1;\n\n\t\t\t}\n\n\t\t\tconst stride = this.getValueSize();\n\t\t\tthis.times = AnimationUtils.arraySlice( times, from, to );\n\t\t\tthis.values = AnimationUtils.arraySlice( this.values, from * stride, to * stride );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable\n\tvalidate() {\n\n\t\tlet valid = true;\n\n\t\tconst valueSize = this.getValueSize();\n\t\tif ( valueSize - Math.floor( valueSize ) !== 0 ) {\n\n\t\t\tconsole.error( 'THREE.KeyframeTrack: Invalid value size in track.', this );\n\t\t\tvalid = false;\n\n\t\t}\n\n\t\tconst times = this.times,\n\t\t\tvalues = this.values,\n\n\t\t\tnKeys = times.length;\n\n\t\tif ( nKeys === 0 ) {\n\n\t\t\tconsole.error( 'THREE.KeyframeTrack: Track is empty.', this );\n\t\t\tvalid = false;\n\n\t\t}\n\n\t\tlet prevTime = null;\n\n\t\tfor ( let i = 0; i !== nKeys; i ++ ) {\n\n\t\t\tconst currTime = times[ i ];\n\n\t\t\tif ( typeof currTime === 'number' && isNaN( currTime ) ) {\n\n\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime );\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif ( prevTime !== null && prevTime > currTime ) {\n\n\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime );\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tprevTime = currTime;\n\n\t\t}\n\n\t\tif ( values !== undefined ) {\n\n\t\t\tif ( AnimationUtils.isTypedArray( values ) ) {\n\n\t\t\t\tfor ( let i = 0, n = values.length; i !== n; ++ i ) {\n\n\t\t\t\t\tconst value = values[ i ];\n\n\t\t\t\t\tif ( isNaN( value ) ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Value is not a valid number.', this, i, value );\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn valid;\n\n\t}\n\n\t// removes equivalent sequential keys as common in morph target sequences\n\t// (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)\n\toptimize() {\n\n\t\t// times or values may be shared with other tracks, so overwriting is unsafe\n\t\tconst times = AnimationUtils.arraySlice( this.times ),\n\t\t\tvalues = AnimationUtils.arraySlice( this.values ),\n\t\t\tstride = this.getValueSize(),\n\n\t\t\tsmoothInterpolation = this.getInterpolation() === InterpolateSmooth,\n\n\t\t\tlastIndex = times.length - 1;\n\n\t\tlet writeIndex = 1;\n\n\t\tfor ( let i = 1; i < lastIndex; ++ i ) {\n\n\t\t\tlet keep = false;\n\n\t\t\tconst time = times[ i ];\n\t\t\tconst timeNext = times[ i + 1 ];\n\n\t\t\t// remove adjacent keyframes scheduled at the same time\n\n\t\t\tif ( time !== timeNext && ( i !== 1 || time !== times[ 0 ] ) ) {\n\n\t\t\t\tif ( ! smoothInterpolation ) {\n\n\t\t\t\t\t// remove unnecessary keyframes same as their neighbors\n\n\t\t\t\t\tconst offset = i * stride,\n\t\t\t\t\t\toffsetP = offset - stride,\n\t\t\t\t\t\toffsetN = offset + stride;\n\n\t\t\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\t\t\tconst value = values[ offset + j ];\n\n\t\t\t\t\t\tif ( value !== values[ offsetP + j ] ||\n\t\t\t\t\t\t\tvalue !== values[ offsetN + j ] ) {\n\n\t\t\t\t\t\t\tkeep = true;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tkeep = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// in-place compaction\n\n\t\t\tif ( keep ) {\n\n\t\t\t\tif ( i !== writeIndex ) {\n\n\t\t\t\t\ttimes[ writeIndex ] = times[ i ];\n\n\t\t\t\t\tconst readOffset = i * stride,\n\t\t\t\t\t\twriteOffset = writeIndex * stride;\n\n\t\t\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\t\t\tvalues[ writeOffset + j ] = values[ readOffset + j ];\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t++ writeIndex;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// flush last keyframe (compaction looks ahead)\n\n\t\tif ( lastIndex > 0 ) {\n\n\t\t\ttimes[ writeIndex ] = times[ lastIndex ];\n\n\t\t\tfor ( let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j ) {\n\n\t\t\t\tvalues[ writeOffset + j ] = values[ readOffset + j ];\n\n\t\t\t}\n\n\t\t\t++ writeIndex;\n\n\t\t}\n\n\t\tif ( writeIndex !== times.length ) {\n\n\t\t\tthis.times = AnimationUtils.arraySlice( times, 0, writeIndex );\n\t\t\tthis.values = AnimationUtils.arraySlice( values, 0, writeIndex * stride );\n\n\t\t} else {\n\n\t\t\tthis.times = times;\n\t\t\tthis.values = values;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\tconst times = AnimationUtils.arraySlice( this.times, 0 );\n\t\tconst values = AnimationUtils.arraySlice( this.values, 0 );\n\n\t\tconst TypedKeyframeTrack = this.constructor;\n\t\tconst track = new TypedKeyframeTrack( this.name, times, values );\n\n\t\t// Interpolant argument to constructor is not saved, so copy the factory method directly.\n\t\ttrack.createInterpolant = this.createInterpolant;\n\n\t\treturn track;\n\n\t}\n\n}\n\nKeyframeTrack.prototype.TimeBufferType = Float32Array;\nKeyframeTrack.prototype.ValueBufferType = Float32Array;\nKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;\n\n/**\n * A Track of Boolean keyframe values.\n */\nclass BooleanKeyframeTrack extends KeyframeTrack {}\n\nBooleanKeyframeTrack.prototype.ValueTypeName = 'bool';\nBooleanKeyframeTrack.prototype.ValueBufferType = Array;\nBooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;\nBooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;\nBooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track of keyframe values that represent color.\n */\nclass ColorKeyframeTrack extends KeyframeTrack {}\n\nColorKeyframeTrack.prototype.ValueTypeName = 'color';\n\n/**\n * A Track of numeric keyframe values.\n */\nclass NumberKeyframeTrack extends KeyframeTrack {}\n\nNumberKeyframeTrack.prototype.ValueTypeName = 'number';\n\n/**\n * Spherical linear unit quaternion interpolant.\n */\n\nclass QuaternionLinearInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\talpha = ( t - t0 ) / ( t1 - t0 );\n\n\t\tlet offset = i1 * stride;\n\n\t\tfor ( let end = offset + stride; offset !== end; offset += 4 ) {\n\n\t\t\tQuaternion.slerpFlat( result, 0, values, offset - stride, values, offset, alpha );\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\n/**\n * A Track of quaternion keyframe values.\n */\nclass QuaternionKeyframeTrack extends KeyframeTrack {\n\n\tInterpolantFactoryMethodLinear( result ) {\n\n\t\treturn new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n}\n\nQuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion';\n// ValueBufferType is inherited\nQuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;\nQuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track that interpolates Strings\n */\nclass StringKeyframeTrack extends KeyframeTrack {}\n\nStringKeyframeTrack.prototype.ValueTypeName = 'string';\nStringKeyframeTrack.prototype.ValueBufferType = Array;\nStringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;\nStringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;\nStringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track of vectored keyframe values.\n */\nclass VectorKeyframeTrack extends KeyframeTrack {}\n\nVectorKeyframeTrack.prototype.ValueTypeName = 'vector';\n\nclass AnimationClip {\n\n\tconstructor( name, duration = - 1, tracks, blendMode = NormalAnimationBlendMode ) {\n\n\t\tthis.name = name;\n\t\tthis.tracks = tracks;\n\t\tthis.duration = duration;\n\t\tthis.blendMode = blendMode;\n\n\t\tthis.uuid = generateUUID();\n\n\t\t// this means it should figure out its duration by scanning the tracks\n\t\tif ( this.duration < 0 ) {\n\n\t\t\tthis.resetDuration();\n\n\t\t}\n\n\t}\n\n\n\tstatic parse( json ) {\n\n\t\tconst tracks = [],\n\t\t\tjsonTracks = json.tracks,\n\t\t\tframeTime = 1.0 / ( json.fps || 1.0 );\n\n\t\tfor ( let i = 0, n = jsonTracks.length; i !== n; ++ i ) {\n\n\t\t\ttracks.push( parseKeyframeTrack( jsonTracks[ i ] ).scale( frameTime ) );\n\n\t\t}\n\n\t\tconst clip = new this( json.name, json.duration, tracks, json.blendMode );\n\t\tclip.uuid = json.uuid;\n\n\t\treturn clip;\n\n\t}\n\n\tstatic toJSON( clip ) {\n\n\t\tconst tracks = [],\n\t\t\tclipTracks = clip.tracks;\n\n\t\tconst json = {\n\n\t\t\t'name': clip.name,\n\t\t\t'duration': clip.duration,\n\t\t\t'tracks': tracks,\n\t\t\t'uuid': clip.uuid,\n\t\t\t'blendMode': clip.blendMode\n\n\t\t};\n\n\t\tfor ( let i = 0, n = clipTracks.length; i !== n; ++ i ) {\n\n\t\t\ttracks.push( KeyframeTrack.toJSON( clipTracks[ i ] ) );\n\n\t\t}\n\n\t\treturn json;\n\n\t}\n\n\tstatic CreateFromMorphTargetSequence( name, morphTargetSequence, fps, noLoop ) {\n\n\t\tconst numMorphTargets = morphTargetSequence.length;\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < numMorphTargets; i ++ ) {\n\n\t\t\tlet times = [];\n\t\t\tlet values = [];\n\n\t\t\ttimes.push(\n\t\t\t\t( i + numMorphTargets - 1 ) % numMorphTargets,\n\t\t\t\ti,\n\t\t\t\t( i + 1 ) % numMorphTargets );\n\n\t\t\tvalues.push( 0, 1, 0 );\n\n\t\t\tconst order = AnimationUtils.getKeyframeOrder( times );\n\t\t\ttimes = AnimationUtils.sortedArray( times, 1, order );\n\t\t\tvalues = AnimationUtils.sortedArray( values, 1, order );\n\n\t\t\t// if there is a key at the first frame, duplicate it as the\n\t\t\t// last frame as well for perfect loop.\n\t\t\tif ( ! noLoop && times[ 0 ] === 0 ) {\n\n\t\t\t\ttimes.push( numMorphTargets );\n\t\t\t\tvalues.push( values[ 0 ] );\n\n\t\t\t}\n\n\t\t\ttracks.push(\n\t\t\t\tnew NumberKeyframeTrack(\n\t\t\t\t\t'.morphTargetInfluences[' + morphTargetSequence[ i ].name + ']',\n\t\t\t\t\ttimes, values\n\t\t\t\t).scale( 1.0 / fps ) );\n\n\t\t}\n\n\t\treturn new this( name, - 1, tracks );\n\n\t}\n\n\tstatic findByName( objectOrClipArray, name ) {\n\n\t\tlet clipArray = objectOrClipArray;\n\n\t\tif ( ! Array.isArray( objectOrClipArray ) ) {\n\n\t\t\tconst o = objectOrClipArray;\n\t\t\tclipArray = o.geometry && o.geometry.animations || o.animations;\n\n\t\t}\n\n\t\tfor ( let i = 0; i < clipArray.length; i ++ ) {\n\n\t\t\tif ( clipArray[ i ].name === name ) {\n\n\t\t\t\treturn clipArray[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\tstatic CreateClipsFromMorphTargetSequences( morphTargets, fps, noLoop ) {\n\n\t\tconst animationToMorphTargets = {};\n\n\t\t// tested with https://regex101.com/ on trick sequences\n\t\t// such flamingo_flyA_003, flamingo_run1_003, crdeath0059\n\t\tconst pattern = /^([\\w-]*?)([\\d]+)$/;\n\n\t\t// sort morph target names into animation groups based\n\t\t// patterns like Walk_001, Walk_002, Run_001, Run_002\n\t\tfor ( let i = 0, il = morphTargets.length; i < il; i ++ ) {\n\n\t\t\tconst morphTarget = morphTargets[ i ];\n\t\t\tconst parts = morphTarget.name.match( pattern );\n\n\t\t\tif ( parts && parts.length > 1 ) {\n\n\t\t\t\tconst name = parts[ 1 ];\n\n\t\t\t\tlet animationMorphTargets = animationToMorphTargets[ name ];\n\n\t\t\t\tif ( ! animationMorphTargets ) {\n\n\t\t\t\t\tanimationToMorphTargets[ name ] = animationMorphTargets = [];\n\n\t\t\t\t}\n\n\t\t\t\tanimationMorphTargets.push( morphTarget );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst clips = [];\n\n\t\tfor ( const name in animationToMorphTargets ) {\n\n\t\t\tclips.push( this.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps, noLoop ) );\n\n\t\t}\n\n\t\treturn clips;\n\n\t}\n\n\t// parse the animation.hierarchy format\n\tstatic parseAnimation( animation, bones ) {\n\n\t\tif ( ! animation ) {\n\n\t\t\tconsole.error( 'THREE.AnimationClip: No animation in JSONLoader data.' );\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst addNonemptyTrack = function ( trackType, trackName, animationKeys, propertyName, destTracks ) {\n\n\t\t\t// only return track if there are actually keys.\n\t\t\tif ( animationKeys.length !== 0 ) {\n\n\t\t\t\tconst times = [];\n\t\t\t\tconst values = [];\n\n\t\t\t\tAnimationUtils.flattenJSON( animationKeys, times, values, propertyName );\n\n\t\t\t\t// empty keys are filtered out, so check again\n\t\t\t\tif ( times.length !== 0 ) {\n\n\t\t\t\t\tdestTracks.push( new trackType( trackName, times, values ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tconst tracks = [];\n\n\t\tconst clipName = animation.name || 'default';\n\t\tconst fps = animation.fps || 30;\n\t\tconst blendMode = animation.blendMode;\n\n\t\t// automatic length determination in AnimationClip.\n\t\tlet duration = animation.length || - 1;\n\n\t\tconst hierarchyTracks = animation.hierarchy || [];\n\n\t\tfor ( let h = 0; h < hierarchyTracks.length; h ++ ) {\n\n\t\t\tconst animationKeys = hierarchyTracks[ h ].keys;\n\n\t\t\t// skip empty tracks\n\t\t\tif ( ! animationKeys || animationKeys.length === 0 ) continue;\n\n\t\t\t// process morph targets\n\t\t\tif ( animationKeys[ 0 ].morphTargets ) {\n\n\t\t\t\t// figure out all morph targets used in this track\n\t\t\t\tconst morphTargetNames = {};\n\n\t\t\t\tlet k;\n\n\t\t\t\tfor ( k = 0; k < animationKeys.length; k ++ ) {\n\n\t\t\t\t\tif ( animationKeys[ k ].morphTargets ) {\n\n\t\t\t\t\t\tfor ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) {\n\n\t\t\t\t\t\t\tmorphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = - 1;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// create a track for each morph target with all zero\n\t\t\t\t// morphTargetInfluences except for the keys in which\n\t\t\t\t// the morphTarget is named.\n\t\t\t\tfor ( const morphTargetName in morphTargetNames ) {\n\n\t\t\t\t\tconst times = [];\n\t\t\t\t\tconst values = [];\n\n\t\t\t\t\tfor ( let m = 0; m !== animationKeys[ k ].morphTargets.length; ++ m ) {\n\n\t\t\t\t\t\tconst animationKey = animationKeys[ k ];\n\n\t\t\t\t\t\ttimes.push( animationKey.time );\n\t\t\t\t\t\tvalues.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttracks.push( new NumberKeyframeTrack( '.morphTargetInfluence[' + morphTargetName + ']', times, values ) );\n\n\t\t\t\t}\n\n\t\t\t\tduration = morphTargetNames.length * ( fps || 1.0 );\n\n\t\t\t} else {\n\n\t\t\t\t// ...assume skeletal animation\n\n\t\t\t\tconst boneName = '.bones[' + bones[ h ].name + ']';\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tVectorKeyframeTrack, boneName + '.position',\n\t\t\t\t\tanimationKeys, 'pos', tracks );\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tQuaternionKeyframeTrack, boneName + '.quaternion',\n\t\t\t\t\tanimationKeys, 'rot', tracks );\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tVectorKeyframeTrack, boneName + '.scale',\n\t\t\t\t\tanimationKeys, 'scl', tracks );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( tracks.length === 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst clip = new this( clipName, duration, tracks, blendMode );\n\n\t\treturn clip;\n\n\t}\n\n\tresetDuration() {\n\n\t\tconst tracks = this.tracks;\n\t\tlet duration = 0;\n\n\t\tfor ( let i = 0, n = tracks.length; i !== n; ++ i ) {\n\n\t\t\tconst track = this.tracks[ i ];\n\n\t\t\tduration = Math.max( duration, track.times[ track.times.length - 1 ] );\n\n\t\t}\n\n\t\tthis.duration = duration;\n\n\t\treturn this;\n\n\t}\n\n\ttrim() {\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tthis.tracks[ i ].trim( 0, this.duration );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tvalidate() {\n\n\t\tlet valid = true;\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tvalid = valid && this.tracks[ i ].validate();\n\n\t\t}\n\n\t\treturn valid;\n\n\t}\n\n\toptimize() {\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tthis.tracks[ i ].optimize();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\ttracks.push( this.tracks[ i ].clone() );\n\n\t\t}\n\n\t\treturn new this.constructor( this.name, this.duration, tracks, this.blendMode );\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.constructor.toJSON( this );\n\n\t}\n\n}\n\nfunction getTrackTypeForValueTypeName( typeName ) {\n\n\tswitch ( typeName.toLowerCase() ) {\n\n\t\tcase 'scalar':\n\t\tcase 'double':\n\t\tcase 'float':\n\t\tcase 'number':\n\t\tcase 'integer':\n\n\t\t\treturn NumberKeyframeTrack;\n\n\t\tcase 'vector':\n\t\tcase 'vector2':\n\t\tcase 'vector3':\n\t\tcase 'vector4':\n\n\t\t\treturn VectorKeyframeTrack;\n\n\t\tcase 'color':\n\n\t\t\treturn ColorKeyframeTrack;\n\n\t\tcase 'quaternion':\n\n\t\t\treturn QuaternionKeyframeTrack;\n\n\t\tcase 'bool':\n\t\tcase 'boolean':\n\n\t\t\treturn BooleanKeyframeTrack;\n\n\t\tcase 'string':\n\n\t\t\treturn StringKeyframeTrack;\n\n\t}\n\n\tthrow new Error( 'THREE.KeyframeTrack: Unsupported typeName: ' + typeName );\n\n}\n\nfunction parseKeyframeTrack( json ) {\n\n\tif ( json.type === undefined ) {\n\n\t\tthrow new Error( 'THREE.KeyframeTrack: track type undefined, can not parse' );\n\n\t}\n\n\tconst trackType = getTrackTypeForValueTypeName( json.type );\n\n\tif ( json.times === undefined ) {\n\n\t\tconst times = [], values = [];\n\n\t\tAnimationUtils.flattenJSON( json.keys, times, values, 'value' );\n\n\t\tjson.times = times;\n\t\tjson.values = values;\n\n\t}\n\n\t// derived classes can define a static parse method\n\tif ( trackType.parse !== undefined ) {\n\n\t\treturn trackType.parse( json );\n\n\t} else {\n\n\t\t// by default, we assume a constructor compatible with the base\n\t\treturn new trackType( json.name, json.times, json.values, json.interpolation );\n\n\t}\n\n}\n\nconst Cache = {\n\n\tenabled: false,\n\n\tfiles: {},\n\n\tadd: function ( key, file ) {\n\n\t\tif ( this.enabled === false ) return;\n\n\t\t// console.log( 'THREE.Cache', 'Adding key:', key );\n\n\t\tthis.files[ key ] = file;\n\n\t},\n\n\tget: function ( key ) {\n\n\t\tif ( this.enabled === false ) return;\n\n\t\t// console.log( 'THREE.Cache', 'Checking key:', key );\n\n\t\treturn this.files[ key ];\n\n\t},\n\n\tremove: function ( key ) {\n\n\t\tdelete this.files[ key ];\n\n\t},\n\n\tclear: function () {\n\n\t\tthis.files = {};\n\n\t}\n\n};\n\nclass LoadingManager {\n\n\tconstructor( onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tlet isLoading = false;\n\t\tlet itemsLoaded = 0;\n\t\tlet itemsTotal = 0;\n\t\tlet urlModifier = undefined;\n\t\tconst handlers = [];\n\n\t\t// Refer to #5689 for the reason why we don't set .onStart\n\t\t// in the constructor\n\n\t\tthis.onStart = undefined;\n\t\tthis.onLoad = onLoad;\n\t\tthis.onProgress = onProgress;\n\t\tthis.onError = onError;\n\n\t\tthis.itemStart = function ( url ) {\n\n\t\t\titemsTotal ++;\n\n\t\t\tif ( isLoading === false ) {\n\n\t\t\t\tif ( scope.onStart !== undefined ) {\n\n\t\t\t\t\tscope.onStart( url, itemsLoaded, itemsTotal );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tisLoading = true;\n\n\t\t};\n\n\t\tthis.itemEnd = function ( url ) {\n\n\t\t\titemsLoaded ++;\n\n\t\t\tif ( scope.onProgress !== undefined ) {\n\n\t\t\t\tscope.onProgress( url, itemsLoaded, itemsTotal );\n\n\t\t\t}\n\n\t\t\tif ( itemsLoaded === itemsTotal ) {\n\n\t\t\t\tisLoading = false;\n\n\t\t\t\tif ( scope.onLoad !== undefined ) {\n\n\t\t\t\t\tscope.onLoad();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.itemError = function ( url ) {\n\n\t\t\tif ( scope.onError !== undefined ) {\n\n\t\t\t\tscope.onError( url );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.resolveURL = function ( url ) {\n\n\t\t\tif ( urlModifier ) {\n\n\t\t\t\treturn urlModifier( url );\n\n\t\t\t}\n\n\t\t\treturn url;\n\n\t\t};\n\n\t\tthis.setURLModifier = function ( transform ) {\n\n\t\t\turlModifier = transform;\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.addHandler = function ( regex, loader ) {\n\n\t\t\thandlers.push( regex, loader );\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.removeHandler = function ( regex ) {\n\n\t\t\tconst index = handlers.indexOf( regex );\n\n\t\t\tif ( index !== - 1 ) {\n\n\t\t\t\thandlers.splice( index, 2 );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.getHandler = function ( file ) {\n\n\t\t\tfor ( let i = 0, l = handlers.length; i < l; i += 2 ) {\n\n\t\t\t\tconst regex = handlers[ i ];\n\t\t\t\tconst loader = handlers[ i + 1 ];\n\n\t\t\t\tif ( regex.global ) regex.lastIndex = 0; // see #17920\n\n\t\t\t\tif ( regex.test( file ) ) {\n\n\t\t\t\t\treturn loader;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t};\n\n\t}\n\n}\n\nconst DefaultLoadingManager = new LoadingManager();\n\nclass Loader {\n\n\tconstructor( manager ) {\n\n\t\tthis.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;\n\n\t\tthis.crossOrigin = 'anonymous';\n\t\tthis.withCredentials = false;\n\t\tthis.path = '';\n\t\tthis.resourcePath = '';\n\t\tthis.requestHeader = {};\n\n\t}\n\n\tload( /* url, onLoad, onProgress, onError */ ) {}\n\n\tloadAsync( url, onProgress ) {\n\n\t\tconst scope = this;\n\n\t\treturn new Promise( function ( resolve, reject ) {\n\n\t\t\tscope.load( url, resolve, onProgress, reject );\n\n\t\t} );\n\n\t}\n\n\tparse( /* data */ ) {}\n\n\tsetCrossOrigin( crossOrigin ) {\n\n\t\tthis.crossOrigin = crossOrigin;\n\t\treturn this;\n\n\t}\n\n\tsetWithCredentials( value ) {\n\n\t\tthis.withCredentials = value;\n\t\treturn this;\n\n\t}\n\n\tsetPath( path ) {\n\n\t\tthis.path = path;\n\t\treturn this;\n\n\t}\n\n\tsetResourcePath( resourcePath ) {\n\n\t\tthis.resourcePath = resourcePath;\n\t\treturn this;\n\n\t}\n\n\tsetRequestHeader( requestHeader ) {\n\n\t\tthis.requestHeader = requestHeader;\n\t\treturn this;\n\n\t}\n\n}\n\nconst loading = {};\n\nclass FileLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( url === undefined ) url = '';\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\t// Check if request is duplicate\n\n\t\tif ( loading[ url ] !== undefined ) {\n\n\t\t\tloading[ url ].push( {\n\n\t\t\t\tonLoad: onLoad,\n\t\t\t\tonProgress: onProgress,\n\t\t\t\tonError: onError\n\n\t\t\t} );\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Check for data: URI\n\t\tconst dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/;\n\t\tconst dataUriRegexResult = url.match( dataUriRegex );\n\t\tlet request;\n\n\t\t// Safari can not handle Data URIs through XMLHttpRequest so process manually\n\t\tif ( dataUriRegexResult ) {\n\n\t\t\tconst mimeType = dataUriRegexResult[ 1 ];\n\t\t\tconst isBase64 = !! dataUriRegexResult[ 2 ];\n\n\t\t\tlet data = dataUriRegexResult[ 3 ];\n\t\t\tdata = decodeURIComponent( data );\n\n\t\t\tif ( isBase64 ) data = atob( data );\n\n\t\t\ttry {\n\n\t\t\t\tlet response;\n\t\t\t\tconst responseType = ( this.responseType || '' ).toLowerCase();\n\n\t\t\t\tswitch ( responseType ) {\n\n\t\t\t\t\tcase 'arraybuffer':\n\t\t\t\t\tcase 'blob':\n\n\t\t\t\t\t\tconst view = new Uint8Array( data.length );\n\n\t\t\t\t\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\t\t\t\t\tview[ i ] = data.charCodeAt( i );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( responseType === 'blob' ) {\n\n\t\t\t\t\t\t\tresponse = new Blob( [ view.buffer ], { type: mimeType } );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tresponse = view.buffer;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'document':\n\n\t\t\t\t\t\tconst parser = new DOMParser();\n\t\t\t\t\t\tresponse = parser.parseFromString( data, mimeType );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'json':\n\n\t\t\t\t\t\tresponse = JSON.parse( data );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault: // 'text' or other\n\n\t\t\t\t\t\tresponse = data;\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\t// Wait for next browser tick like standard XMLHttpRequest event dispatching does\n\t\t\t\tsetTimeout( function () {\n\n\t\t\t\t\tif ( onLoad ) onLoad( response );\n\n\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t}, 0 );\n\n\t\t\t} catch ( error ) {\n\n\t\t\t\t// Wait for next browser tick like standard XMLHttpRequest event dispatching does\n\t\t\t\tsetTimeout( function () {\n\n\t\t\t\t\tif ( onError ) onError( error );\n\n\t\t\t\t\tscope.manager.itemError( url );\n\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t}, 0 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// Initialise array for duplicate requests\n\n\t\t\tloading[ url ] = [];\n\n\t\t\tloading[ url ].push( {\n\n\t\t\t\tonLoad: onLoad,\n\t\t\t\tonProgress: onProgress,\n\t\t\t\tonError: onError\n\n\t\t\t} );\n\n\t\t\trequest = new XMLHttpRequest();\n\n\t\t\trequest.open( 'GET', url, true );\n\n\t\t\trequest.addEventListener( 'load', function ( event ) {\n\n\t\t\t\tconst response = this.response;\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tif ( this.status === 200 || this.status === 0 ) {\n\n\t\t\t\t\t// Some browsers return HTTP Status 0 when using non-http protocol\n\t\t\t\t\t// e.g. 'file://' or 'data://'. Handle as success.\n\n\t\t\t\t\tif ( this.status === 0 ) console.warn( 'THREE.FileLoader: HTTP Status 0 received.' );\n\n\t\t\t\t\t// Add to cache only on HTTP success, so that we do not cache\n\t\t\t\t\t// error response bodies as proper responses to requests.\n\t\t\t\t\tCache.add( url, response );\n\n\t\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\t\tif ( callback.onLoad ) callback.onLoad( response );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\t\tif ( callback.onError ) callback.onError( event );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError( url );\n\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t}\n\n\t\t\t}, false );\n\n\t\t\trequest.addEventListener( 'progress', function ( event ) {\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onProgress ) callback.onProgress( event );\n\n\t\t\t\t}\n\n\t\t\t}, false );\n\n\t\t\trequest.addEventListener( 'error', function ( event ) {\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onError ) callback.onError( event );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, false );\n\n\t\t\trequest.addEventListener( 'abort', function ( event ) {\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onError ) callback.onError( event );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, false );\n\n\t\t\tif ( this.responseType !== undefined ) request.responseType = this.responseType;\n\t\t\tif ( this.withCredentials !== undefined ) request.withCredentials = this.withCredentials;\n\n\t\t\tif ( request.overrideMimeType ) request.overrideMimeType( this.mimeType !== undefined ? this.mimeType : 'text/plain' );\n\n\t\t\tfor ( const header in this.requestHeader ) {\n\n\t\t\t\trequest.setRequestHeader( header, this.requestHeader[ header ] );\n\n\t\t\t}\n\n\t\t\trequest.send( null );\n\n\t\t}\n\n\t\tscope.manager.itemStart( url );\n\n\t\treturn request;\n\n\t}\n\n\tsetResponseType( value ) {\n\n\t\tthis.responseType = value;\n\t\treturn this;\n\n\t}\n\n\tsetMimeType( value ) {\n\n\t\tthis.mimeType = value;\n\t\treturn this;\n\n\t}\n\n}\n\nclass AnimationLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst animations = [];\n\n\t\tfor ( let i = 0; i < json.length; i ++ ) {\n\n\t\t\tconst clip = AnimationClip.parse( json[ i ] );\n\n\t\t\tanimations.push( clip );\n\n\t\t}\n\n\t\treturn animations;\n\n\t}\n\n}\n\n/**\n * Abstract Base class to block based textures loader (dds, pvr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */\n\nclass CompressedTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst images = [];\n\n\t\tconst texture = new CompressedTexture();\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\n\t\tlet loaded = 0;\n\n\t\tfunction loadTexture( i ) {\n\n\t\t\tloader.load( url[ i ], function ( buffer ) {\n\n\t\t\t\tconst texDatas = scope.parse( buffer, true );\n\n\t\t\t\timages[ i ] = {\n\t\t\t\t\twidth: texDatas.width,\n\t\t\t\t\theight: texDatas.height,\n\t\t\t\t\tformat: texDatas.format,\n\t\t\t\t\tmipmaps: texDatas.mipmaps\n\t\t\t\t};\n\n\t\t\t\tloaded += 1;\n\n\t\t\t\tif ( loaded === 6 ) {\n\n\t\t\t\t\tif ( texDatas.mipmapCount === 1 ) texture.minFilter = LinearFilter;\n\n\t\t\t\t\ttexture.image = images;\n\t\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, onError );\n\n\t\t}\n\n\t\tif ( Array.isArray( url ) ) {\n\n\t\t\tfor ( let i = 0, il = url.length; i < il; ++ i ) {\n\n\t\t\t\tloadTexture( i );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// compressed cubemap texture stored in a single DDS file\n\n\t\t\tloader.load( url, function ( buffer ) {\n\n\t\t\t\tconst texDatas = scope.parse( buffer, true );\n\n\t\t\t\tif ( texDatas.isCubemap ) {\n\n\t\t\t\t\tconst faces = texDatas.mipmaps.length / texDatas.mipmapCount;\n\n\t\t\t\t\tfor ( let f = 0; f < faces; f ++ ) {\n\n\t\t\t\t\t\timages[ f ] = { mipmaps: [] };\n\n\t\t\t\t\t\tfor ( let i = 0; i < texDatas.mipmapCount; i ++ ) {\n\n\t\t\t\t\t\t\timages[ f ].mipmaps.push( texDatas.mipmaps[ f * texDatas.mipmapCount + i ] );\n\t\t\t\t\t\t\timages[ f ].format = texDatas.format;\n\t\t\t\t\t\t\timages[ f ].width = texDatas.width;\n\t\t\t\t\t\t\timages[ f ].height = texDatas.height;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.image = images;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttexture.image.width = texDatas.width;\n\t\t\t\t\ttexture.image.height = texDatas.height;\n\t\t\t\t\ttexture.mipmaps = texDatas.mipmaps;\n\n\t\t\t\t}\n\n\t\t\t\tif ( texDatas.mipmapCount === 1 ) {\n\n\t\t\t\t\ttexture.minFilter = LinearFilter;\n\n\t\t\t\t}\n\n\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t}, onProgress, onError );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass ImageLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\tconst image = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'img' );\n\n\t\tfunction onImageLoad() {\n\n\t\t\timage.removeEventListener( 'load', onImageLoad, false );\n\t\t\timage.removeEventListener( 'error', onImageError, false );\n\n\t\t\tCache.add( url, this );\n\n\t\t\tif ( onLoad ) onLoad( this );\n\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t}\n\n\t\tfunction onImageError( event ) {\n\n\t\t\timage.removeEventListener( 'load', onImageLoad, false );\n\t\t\timage.removeEventListener( 'error', onImageError, false );\n\n\t\t\tif ( onError ) onError( event );\n\n\t\t\tscope.manager.itemError( url );\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t}\n\n\t\timage.addEventListener( 'load', onImageLoad, false );\n\t\timage.addEventListener( 'error', onImageError, false );\n\n\t\tif ( url.substr( 0, 5 ) !== 'data:' ) {\n\n\t\t\tif ( this.crossOrigin !== undefined ) image.crossOrigin = this.crossOrigin;\n\n\t\t}\n\n\t\tscope.manager.itemStart( url );\n\n\t\timage.src = url;\n\n\t\treturn image;\n\n\t}\n\n}\n\nclass CubeTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( urls, onLoad, onProgress, onError ) {\n\n\t\tconst texture = new CubeTexture();\n\n\t\tconst loader = new ImageLoader( this.manager );\n\t\tloader.setCrossOrigin( this.crossOrigin );\n\t\tloader.setPath( this.path );\n\n\t\tlet loaded = 0;\n\n\t\tfunction loadTexture( i ) {\n\n\t\t\tloader.load( urls[ i ], function ( image ) {\n\n\t\t\t\ttexture.images[ i ] = image;\n\n\t\t\t\tloaded ++;\n\n\t\t\t\tif ( loaded === 6 ) {\n\n\t\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t\t}\n\n\t\t\t}, undefined, onError );\n\n\t\t}\n\n\t\tfor ( let i = 0; i < urls.length; ++ i ) {\n\n\t\t\tloadTexture( i );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n}\n\n/**\n * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */\n\nclass DataTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst texture = new DataTexture();\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setPath( this.path );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( buffer ) {\n\n\t\t\tconst texData = scope.parse( buffer );\n\n\t\t\tif ( ! texData ) return;\n\n\t\t\tif ( texData.image !== undefined ) {\n\n\t\t\t\ttexture.image = texData.image;\n\n\t\t\t} else if ( texData.data !== undefined ) {\n\n\t\t\t\ttexture.image.width = texData.width;\n\t\t\t\ttexture.image.height = texData.height;\n\t\t\t\ttexture.image.data = texData.data;\n\n\t\t\t}\n\n\t\t\ttexture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping;\n\t\t\ttexture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping;\n\n\t\t\ttexture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter;\n\t\t\ttexture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter;\n\n\t\t\ttexture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1;\n\n\t\t\tif ( texData.encoding !== undefined ) {\n\n\t\t\t\ttexture.encoding = texData.encoding;\n\n\t\t\t}\n\n\t\t\tif ( texData.flipY !== undefined ) {\n\n\t\t\t\ttexture.flipY = texData.flipY;\n\n\t\t\t}\n\n\t\t\tif ( texData.format !== undefined ) {\n\n\t\t\t\ttexture.format = texData.format;\n\n\t\t\t}\n\n\t\t\tif ( texData.type !== undefined ) {\n\n\t\t\t\ttexture.type = texData.type;\n\n\t\t\t}\n\n\t\t\tif ( texData.mipmaps !== undefined ) {\n\n\t\t\t\ttexture.mipmaps = texData.mipmaps;\n\t\t\t\ttexture.minFilter = LinearMipmapLinearFilter; // presumably...\n\n\t\t\t}\n\n\t\t\tif ( texData.mipmapCount === 1 ) {\n\n\t\t\t\ttexture.minFilter = LinearFilter;\n\n\t\t\t}\n\n\t\t\tif ( texData.generateMipmaps !== undefined ) {\n\n\t\t\t\ttexture.generateMipmaps = texData.generateMipmaps;\n\n\t\t\t}\n\n\t\t\ttexture.needsUpdate = true;\n\n\t\t\tif ( onLoad ) onLoad( texture, texData );\n\n\t\t}, onProgress, onError );\n\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass TextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst texture = new Texture();\n\n\t\tconst loader = new ImageLoader( this.manager );\n\t\tloader.setCrossOrigin( this.crossOrigin );\n\t\tloader.setPath( this.path );\n\n\t\tloader.load( url, function ( image ) {\n\n\t\t\ttexture.image = image;\n\n\t\t\t// JPEGs can't have an alpha channel, so memory can be saved by storing them as RGB.\n\t\t\tconst isJPEG = url.search( /\\.jpe?g($|\\?)/i ) > 0 || url.search( /^data\\:image\\/jpeg/ ) === 0;\n\n\t\t\ttexture.format = isJPEG ? RGBFormat : RGBAFormat;\n\t\t\ttexture.needsUpdate = true;\n\n\t\t\tif ( onLoad !== undefined ) {\n\n\t\t\t\tonLoad( texture );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t\treturn texture;\n\n\t}\n\n}\n\n/**************************************************************\n *\tCurved Path - a curve path is simply a array of connected\n * curves, but retains the api of a curve\n **************************************************************/\n\nclass CurvePath extends Curve {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'CurvePath';\n\n\t\tthis.curves = [];\n\t\tthis.autoClose = false; // Automatically closes the path\n\n\t}\n\n\tadd( curve ) {\n\n\t\tthis.curves.push( curve );\n\n\t}\n\n\tclosePath() {\n\n\t\t// Add a line curve if start and end of lines are not connected\n\t\tconst startPoint = this.curves[ 0 ].getPoint( 0 );\n\t\tconst endPoint = this.curves[ this.curves.length - 1 ].getPoint( 1 );\n\n\t\tif ( ! startPoint.equals( endPoint ) ) {\n\n\t\t\tthis.curves.push( new LineCurve( endPoint, startPoint ) );\n\n\t\t}\n\n\t}\n\n\t// To get accurate point with reference to\n\t// entire path distance at time t,\n\t// following has to be done:\n\n\t// 1. Length of each sub path have to be known\n\t// 2. Locate and identify type of curve\n\t// 3. Get t for the curve\n\t// 4. Return curve.getPointAt(t')\n\n\tgetPoint( t ) {\n\n\t\tconst d = t * this.getLength();\n\t\tconst curveLengths = this.getCurveLengths();\n\t\tlet i = 0;\n\n\t\t// To think about boundaries points.\n\n\t\twhile ( i < curveLengths.length ) {\n\n\t\t\tif ( curveLengths[ i ] >= d ) {\n\n\t\t\t\tconst diff = curveLengths[ i ] - d;\n\t\t\t\tconst curve = this.curves[ i ];\n\n\t\t\t\tconst segmentLength = curve.getLength();\n\t\t\t\tconst u = segmentLength === 0 ? 0 : 1 - diff / segmentLength;\n\n\t\t\t\treturn curve.getPointAt( u );\n\n\t\t\t}\n\n\t\t\ti ++;\n\n\t\t}\n\n\t\treturn null;\n\n\t\t// loop where sum != 0, sum > d , sum+1 <d\n\n\t}\n\n\t// We cannot use the default THREE.Curve getPoint() with getLength() because in\n\t// THREE.Curve, getLength() depends on getPoint() but in THREE.CurvePath\n\t// getPoint() depends on getLength\n\n\tgetLength() {\n\n\t\tconst lens = this.getCurveLengths();\n\t\treturn lens[ lens.length - 1 ];\n\n\t}\n\n\t// cacheLengths must be recalculated.\n\tupdateArcLengths() {\n\n\t\tthis.needsUpdate = true;\n\t\tthis.cacheLengths = null;\n\t\tthis.getCurveLengths();\n\n\t}\n\n\t// Compute lengths and cache them\n\t// We cannot overwrite getLengths() because UtoT mapping uses it.\n\n\tgetCurveLengths() {\n\n\t\t// We use cache values if curves and cache array are same length\n\n\t\tif ( this.cacheLengths && this.cacheLengths.length === this.curves.length ) {\n\n\t\t\treturn this.cacheLengths;\n\n\t\t}\n\n\t\t// Get length of sub-curve\n\t\t// Push sums into cached array\n\n\t\tconst lengths = [];\n\t\tlet sums = 0;\n\n\t\tfor ( let i = 0, l = this.curves.length; i < l; i ++ ) {\n\n\t\t\tsums += this.curves[ i ].getLength();\n\t\t\tlengths.push( sums );\n\n\t\t}\n\n\t\tthis.cacheLengths = lengths;\n\n\t\treturn lengths;\n\n\t}\n\n\tgetSpacedPoints( divisions = 40 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let i = 0; i <= divisions; i ++ ) {\n\n\t\t\tpoints.push( this.getPoint( i / divisions ) );\n\n\t\t}\n\n\t\tif ( this.autoClose ) {\n\n\t\t\tpoints.push( points[ 0 ] );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\tgetPoints( divisions = 12 ) {\n\n\t\tconst points = [];\n\t\tlet last;\n\n\t\tfor ( let i = 0, curves = this.curves; i < curves.length; i ++ ) {\n\n\t\t\tconst curve = curves[ i ];\n\t\t\tconst resolution = ( curve && curve.isEllipseCurve ) ? divisions * 2\n\t\t\t\t: ( curve && ( curve.isLineCurve || curve.isLineCurve3 ) ) ? 1\n\t\t\t\t\t: ( curve && curve.isSplineCurve ) ? divisions * curve.points.length\n\t\t\t\t\t\t: divisions;\n\n\t\t\tconst pts = curve.getPoints( resolution );\n\n\t\t\tfor ( let j = 0; j < pts.length; j ++ ) {\n\n\t\t\t\tconst point = pts[ j ];\n\n\t\t\t\tif ( last && last.equals( point ) ) continue; // ensures no consecutive points are duplicates\n\n\t\t\t\tpoints.push( point );\n\t\t\t\tlast = point;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.autoClose && points.length > 1 && ! points[ points.length - 1 ].equals( points[ 0 ] ) ) {\n\n\t\t\tpoints.push( points[ 0 ] );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.curves = [];\n\n\t\tfor ( let i = 0, l = source.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = source.curves[ i ];\n\n\t\t\tthis.curves.push( curve.clone() );\n\n\t\t}\n\n\t\tthis.autoClose = source.autoClose;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.autoClose = this.autoClose;\n\t\tdata.curves = [];\n\n\t\tfor ( let i = 0, l = this.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = this.curves[ i ];\n\t\t\tdata.curves.push( curve.toJSON() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.autoClose = json.autoClose;\n\t\tthis.curves = [];\n\n\t\tfor ( let i = 0, l = json.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = json.curves[ i ];\n\t\t\tthis.curves.push( new Curves[ curve.type ]().fromJSON( curve ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Path extends CurvePath {\n\n\tconstructor( points ) {\n\n\t\tsuper();\n\t\tthis.type = 'Path';\n\n\t\tthis.currentPoint = new Vector2();\n\n\t\tif ( points ) {\n\n\t\t\tthis.setFromPoints( points );\n\n\t\t}\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.moveTo( points[ 0 ].x, points[ 0 ].y );\n\n\t\tfor ( let i = 1, l = points.length; i < l; i ++ ) {\n\n\t\t\tthis.lineTo( points[ i ].x, points[ i ].y );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tmoveTo( x, y ) {\n\n\t\tthis.currentPoint.set( x, y ); // TODO consider referencing vectors instead of copying?\n\n\t\treturn this;\n\n\t}\n\n\tlineTo( x, y ) {\n\n\t\tconst curve = new LineCurve( this.currentPoint.clone(), new Vector2( x, y ) );\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tquadraticCurveTo( aCPx, aCPy, aX, aY ) {\n\n\t\tconst curve = new QuadraticBezierCurve(\n\t\t\tthis.currentPoint.clone(),\n\t\t\tnew Vector2( aCPx, aCPy ),\n\t\t\tnew Vector2( aX, aY )\n\t\t);\n\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tbezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) {\n\n\t\tconst curve = new CubicBezierCurve(\n\t\t\tthis.currentPoint.clone(),\n\t\t\tnew Vector2( aCP1x, aCP1y ),\n\t\t\tnew Vector2( aCP2x, aCP2y ),\n\t\t\tnew Vector2( aX, aY )\n\t\t);\n\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tsplineThru( pts /*Array of Vector*/ ) {\n\n\t\tconst npts = [ this.currentPoint.clone() ].concat( pts );\n\n\t\tconst curve = new SplineCurve( npts );\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.copy( pts[ pts.length - 1 ] );\n\n\t\treturn this;\n\n\t}\n\n\tarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tconst x0 = this.currentPoint.x;\n\t\tconst y0 = this.currentPoint.y;\n\n\t\tthis.absarc( aX + x0, aY + y0, aRadius,\n\t\t\taStartAngle, aEndAngle, aClockwise );\n\n\t\treturn this;\n\n\t}\n\n\tabsarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tthis.absellipse( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );\n\n\t\treturn this;\n\n\t}\n\n\tellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {\n\n\t\tconst x0 = this.currentPoint.x;\n\t\tconst y0 = this.currentPoint.y;\n\n\t\tthis.absellipse( aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation );\n\n\t\treturn this;\n\n\t}\n\n\tabsellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {\n\n\t\tconst curve = new EllipseCurve( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation );\n\n\t\tif ( this.curves.length > 0 ) {\n\n\t\t\t// if a previous curve is present, attempt to join\n\t\t\tconst firstPoint = curve.getPoint( 0 );\n\n\t\t\tif ( ! firstPoint.equals( this.currentPoint ) ) {\n\n\t\t\t\tthis.lineTo( firstPoint.x, firstPoint.y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.curves.push( curve );\n\n\t\tconst lastPoint = curve.getPoint( 1 );\n\t\tthis.currentPoint.copy( lastPoint );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.currentPoint.copy( source.currentPoint );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.currentPoint = this.currentPoint.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.currentPoint.fromArray( json.currentPoint );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Shape extends Path {\n\n\tconstructor( points ) {\n\n\t\tsuper( points );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.type = 'Shape';\n\n\t\tthis.holes = [];\n\n\t}\n\n\tgetPointsHoles( divisions ) {\n\n\t\tconst holesPts = [];\n\n\t\tfor ( let i = 0, l = this.holes.length; i < l; i ++ ) {\n\n\t\t\tholesPts[ i ] = this.holes[ i ].getPoints( divisions );\n\n\t\t}\n\n\t\treturn holesPts;\n\n\t}\n\n\t// get points of shape and holes (keypoints based on segments parameter)\n\n\textractPoints( divisions ) {\n\n\t\treturn {\n\n\t\t\tshape: this.getPoints( divisions ),\n\t\t\tholes: this.getPointsHoles( divisions )\n\n\t\t};\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.holes = [];\n\n\t\tfor ( let i = 0, l = source.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = source.holes[ i ];\n\n\t\t\tthis.holes.push( hole.clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.holes = [];\n\n\t\tfor ( let i = 0, l = this.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = this.holes[ i ];\n\t\t\tdata.holes.push( hole.toJSON() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.uuid = json.uuid;\n\t\tthis.holes = [];\n\n\t\tfor ( let i = 0, l = json.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = json.holes[ i ];\n\t\t\tthis.holes.push( new Path().fromJSON( hole ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Light extends Object3D {\n\n\tconstructor( color, intensity = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Light';\n\n\t\tthis.color = new Color( color );\n\t\tthis.intensity = intensity;\n\n\t}\n\n\tdispose() {\n\n\t\t// Empty here in base class; some subclasses override.\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\t\tthis.intensity = source.intensity;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.color = this.color.getHex();\n\t\tdata.object.intensity = this.intensity;\n\n\t\tif ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex();\n\n\t\tif ( this.distance !== undefined ) data.object.distance = this.distance;\n\t\tif ( this.angle !== undefined ) data.object.angle = this.angle;\n\t\tif ( this.decay !== undefined ) data.object.decay = this.decay;\n\t\tif ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra;\n\n\t\tif ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON();\n\n\t\treturn data;\n\n\t}\n\n}\n\nLight.prototype.isLight = true;\n\nclass HemisphereLight extends Light {\n\n\tconstructor( skyColor, groundColor, intensity ) {\n\n\t\tsuper( skyColor, intensity );\n\n\t\tthis.type = 'HemisphereLight';\n\n\t\tthis.position.copy( Object3D.DefaultUp );\n\t\tthis.updateMatrix();\n\n\t\tthis.groundColor = new Color( groundColor );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tLight.prototype.copy.call( this, source );\n\n\t\tthis.groundColor.copy( source.groundColor );\n\n\t\treturn this;\n\n\t}\n\n}\n\nHemisphereLight.prototype.isHemisphereLight = true;\n\nconst _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4();\nconst _lightPositionWorld$1 = /*@__PURE__*/ new Vector3();\nconst _lookTarget$1 = /*@__PURE__*/ new Vector3();\n\nclass LightShadow {\n\n\tconstructor( camera ) {\n\n\t\tthis.camera = camera;\n\n\t\tthis.bias = 0;\n\t\tthis.normalBias = 0;\n\t\tthis.radius = 1;\n\n\t\tthis.mapSize = new Vector2( 512, 512 );\n\n\t\tthis.map = null;\n\t\tthis.mapPass = null;\n\t\tthis.matrix = new Matrix4();\n\n\t\tthis.autoUpdate = true;\n\t\tthis.needsUpdate = false;\n\n\t\tthis._frustum = new Frustum();\n\t\tthis._frameExtents = new Vector2( 1, 1 );\n\n\t\tthis._viewportCount = 1;\n\n\t\tthis._viewports = [\n\n\t\t\tnew Vector4( 0, 0, 1, 1 )\n\n\t\t];\n\n\t}\n\n\tgetViewportCount() {\n\n\t\treturn this._viewportCount;\n\n\t}\n\n\tgetFrustum() {\n\n\t\treturn this._frustum;\n\n\t}\n\n\tupdateMatrices( light ) {\n\n\t\tconst shadowCamera = this.camera;\n\t\tconst shadowMatrix = this.matrix;\n\n\t\t_lightPositionWorld$1.setFromMatrixPosition( light.matrixWorld );\n\t\tshadowCamera.position.copy( _lightPositionWorld$1 );\n\n\t\t_lookTarget$1.setFromMatrixPosition( light.target.matrixWorld );\n\t\tshadowCamera.lookAt( _lookTarget$1 );\n\t\tshadowCamera.updateMatrixWorld();\n\n\t\t_projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );\n\t\tthis._frustum.setFromProjectionMatrix( _projScreenMatrix$1 );\n\n\t\tshadowMatrix.set(\n\t\t\t0.5, 0.0, 0.0, 0.5,\n\t\t\t0.0, 0.5, 0.0, 0.5,\n\t\t\t0.0, 0.0, 0.5, 0.5,\n\t\t\t0.0, 0.0, 0.0, 1.0\n\t\t);\n\n\t\tshadowMatrix.multiply( shadowCamera.projectionMatrix );\n\t\tshadowMatrix.multiply( shadowCamera.matrixWorldInverse );\n\n\t}\n\n\tgetViewport( viewportIndex ) {\n\n\t\treturn this._viewports[ viewportIndex ];\n\n\t}\n\n\tgetFrameExtents() {\n\n\t\treturn this._frameExtents;\n\n\t}\n\n\tdispose() {\n\n\t\tif ( this.map ) {\n\n\t\t\tthis.map.dispose();\n\n\t\t}\n\n\t\tif ( this.mapPass ) {\n\n\t\t\tthis.mapPass.dispose();\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.camera = source.camera.clone();\n\n\t\tthis.bias = source.bias;\n\t\tthis.radius = source.radius;\n\n\t\tthis.mapSize.copy( source.mapSize );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst object = {};\n\n\t\tif ( this.bias !== 0 ) object.bias = this.bias;\n\t\tif ( this.normalBias !== 0 ) object.normalBias = this.normalBias;\n\t\tif ( this.radius !== 1 ) object.radius = this.radius;\n\t\tif ( this.mapSize.x !== 512 || this.mapSize.y !== 512 ) object.mapSize = this.mapSize.toArray();\n\n\t\tobject.camera = this.camera.toJSON( false ).object;\n\t\tdelete object.camera.matrix;\n\n\t\treturn object;\n\n\t}\n\n}\n\nclass SpotLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new PerspectiveCamera( 50, 1, 0.5, 500 ) );\n\n\t\tthis.focus = 1;\n\n\t}\n\n\tupdateMatrices( light ) {\n\n\t\tconst camera = this.camera;\n\n\t\tconst fov = RAD2DEG * 2 * light.angle * this.focus;\n\t\tconst aspect = this.mapSize.width / this.mapSize.height;\n\t\tconst far = light.distance || camera.far;\n\n\t\tif ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) {\n\n\t\t\tcamera.fov = fov;\n\t\t\tcamera.aspect = aspect;\n\t\t\tcamera.far = far;\n\t\t\tcamera.updateProjectionMatrix();\n\n\t\t}\n\n\t\tsuper.updateMatrices( light );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.focus = source.focus;\n\n\t\treturn this;\n\n\t}\n\n}\n\nSpotLightShadow.prototype.isSpotLightShadow = true;\n\nclass SpotLight extends Light {\n\n\tconstructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 1 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'SpotLight';\n\n\t\tthis.position.copy( Object3D.DefaultUp );\n\t\tthis.updateMatrix();\n\n\t\tthis.target = new Object3D();\n\n\t\tthis.distance = distance;\n\t\tthis.angle = angle;\n\t\tthis.penumbra = penumbra;\n\t\tthis.decay = decay; // for physically correct lights, should be 2.\n\n\t\tthis.shadow = new SpotLightShadow();\n\n\t}\n\n\tget power() {\n\n\t\t// intensity = power per solid angle.\n\t\t// ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\treturn this.intensity * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// intensity = power per solid angle.\n\t\t// ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\tthis.intensity = power / Math.PI;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.distance = source.distance;\n\t\tthis.angle = source.angle;\n\t\tthis.penumbra = source.penumbra;\n\t\tthis.decay = source.decay;\n\n\t\tthis.target = source.target.clone();\n\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nSpotLight.prototype.isSpotLight = true;\n\nconst _projScreenMatrix = /*@__PURE__*/ new Matrix4();\nconst _lightPositionWorld = /*@__PURE__*/ new Vector3();\nconst _lookTarget = /*@__PURE__*/ new Vector3();\n\nclass PointLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new PerspectiveCamera( 90, 1, 0.5, 500 ) );\n\n\t\tthis._frameExtents = new Vector2( 4, 2 );\n\n\t\tthis._viewportCount = 6;\n\n\t\tthis._viewports = [\n\t\t\t// These viewports map a cube-map onto a 2D texture with the\n\t\t\t// following orientation:\n\t\t\t//\n\t\t\t// xzXZ\n\t\t\t// y Y\n\t\t\t//\n\t\t\t// X - Positive x direction\n\t\t\t// x - Negative x direction\n\t\t\t// Y - Positive y direction\n\t\t\t// y - Negative y direction\n\t\t\t// Z - Positive z direction\n\t\t\t// z - Negative z direction\n\n\t\t\t// positive X\n\t\t\tnew Vector4( 2, 1, 1, 1 ),\n\t\t\t// negative X\n\t\t\tnew Vector4( 0, 1, 1, 1 ),\n\t\t\t// positive Z\n\t\t\tnew Vector4( 3, 1, 1, 1 ),\n\t\t\t// negative Z\n\t\t\tnew Vector4( 1, 1, 1, 1 ),\n\t\t\t// positive Y\n\t\t\tnew Vector4( 3, 0, 1, 1 ),\n\t\t\t// negative Y\n\t\t\tnew Vector4( 1, 0, 1, 1 )\n\t\t];\n\n\t\tthis._cubeDirections = [\n\t\t\tnew Vector3( 1, 0, 0 ), new Vector3( - 1, 0, 0 ), new Vector3( 0, 0, 1 ),\n\t\t\tnew Vector3( 0, 0, - 1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, - 1, 0 )\n\t\t];\n\n\t\tthis._cubeUps = [\n\t\t\tnew Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ),\n\t\t\tnew Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ),\tnew Vector3( 0, 0, - 1 )\n\t\t];\n\n\t}\n\n\tupdateMatrices( light, viewportIndex = 0 ) {\n\n\t\tconst camera = this.camera;\n\t\tconst shadowMatrix = this.matrix;\n\n\t\tconst far = light.distance || camera.far;\n\n\t\tif ( far !== camera.far ) {\n\n\t\t\tcamera.far = far;\n\t\t\tcamera.updateProjectionMatrix();\n\n\t\t}\n\n\t\t_lightPositionWorld.setFromMatrixPosition( light.matrixWorld );\n\t\tcamera.position.copy( _lightPositionWorld );\n\n\t\t_lookTarget.copy( camera.position );\n\t\t_lookTarget.add( this._cubeDirections[ viewportIndex ] );\n\t\tcamera.up.copy( this._cubeUps[ viewportIndex ] );\n\t\tcamera.lookAt( _lookTarget );\n\t\tcamera.updateMatrixWorld();\n\n\t\tshadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z );\n\n\t\t_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );\n\t\tthis._frustum.setFromProjectionMatrix( _projScreenMatrix );\n\n\t}\n\n}\n\nPointLightShadow.prototype.isPointLightShadow = true;\n\nclass PointLight extends Light {\n\n\tconstructor( color, intensity, distance = 0, decay = 1 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'PointLight';\n\n\t\tthis.distance = distance;\n\t\tthis.decay = decay; // for physically correct lights, should be 2.\n\n\t\tthis.shadow = new PointLightShadow();\n\n\t}\n\n\tget power() {\n\n\t\t// intensity = power per solid angle.\n\t\t// ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\treturn this.intensity * 4 * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// intensity = power per solid angle.\n\t\t// ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\tthis.intensity = power / ( 4 * Math.PI );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.distance = source.distance;\n\t\tthis.decay = source.decay;\n\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nPointLight.prototype.isPointLight = true;\n\nclass OrthographicCamera extends Camera {\n\n\tconstructor( left = - 1, right = 1, top = 1, bottom = - 1, near = 0.1, far = 2000 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'OrthographicCamera';\n\n\t\tthis.zoom = 1;\n\t\tthis.view = null;\n\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.top = top;\n\t\tthis.bottom = bottom;\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.left = source.left;\n\t\tthis.right = source.right;\n\t\tthis.top = source.top;\n\t\tthis.bottom = source.bottom;\n\t\tthis.near = source.near;\n\t\tthis.far = source.far;\n\n\t\tthis.zoom = source.zoom;\n\t\tthis.view = source.view === null ? null : Object.assign( {}, source.view );\n\n\t\treturn this;\n\n\t}\n\n\tsetViewOffset( fullWidth, fullHeight, x, y, width, height ) {\n\n\t\tif ( this.view === null ) {\n\n\t\t\tthis.view = {\n\t\t\t\tenabled: true,\n\t\t\t\tfullWidth: 1,\n\t\t\t\tfullHeight: 1,\n\t\t\t\toffsetX: 0,\n\t\t\t\toffsetY: 0,\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1\n\t\t\t};\n\n\t\t}\n\n\t\tthis.view.enabled = true;\n\t\tthis.view.fullWidth = fullWidth;\n\t\tthis.view.fullHeight = fullHeight;\n\t\tthis.view.offsetX = x;\n\t\tthis.view.offsetY = y;\n\t\tthis.view.width = width;\n\t\tthis.view.height = height;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tclearViewOffset() {\n\n\t\tif ( this.view !== null ) {\n\n\t\t\tthis.view.enabled = false;\n\n\t\t}\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tupdateProjectionMatrix() {\n\n\t\tconst dx = ( this.right - this.left ) / ( 2 * this.zoom );\n\t\tconst dy = ( this.top - this.bottom ) / ( 2 * this.zoom );\n\t\tconst cx = ( this.right + this.left ) / 2;\n\t\tconst cy = ( this.top + this.bottom ) / 2;\n\n\t\tlet left = cx - dx;\n\t\tlet right = cx + dx;\n\t\tlet top = cy + dy;\n\t\tlet bottom = cy - dy;\n\n\t\tif ( this.view !== null && this.view.enabled ) {\n\n\t\t\tconst scaleW = ( this.right - this.left ) / this.view.fullWidth / this.zoom;\n\t\t\tconst scaleH = ( this.top - this.bottom ) / this.view.fullHeight / this.zoom;\n\n\t\t\tleft += scaleW * this.view.offsetX;\n\t\t\tright = left + scaleW * this.view.width;\n\t\t\ttop -= scaleH * this.view.offsetY;\n\t\t\tbottom = top - scaleH * this.view.height;\n\n\t\t}\n\n\t\tthis.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far );\n\n\t\tthis.projectionMatrixInverse.copy( this.projectionMatrix ).invert();\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.zoom = this.zoom;\n\t\tdata.object.left = this.left;\n\t\tdata.object.right = this.right;\n\t\tdata.object.top = this.top;\n\t\tdata.object.bottom = this.bottom;\n\t\tdata.object.near = this.near;\n\t\tdata.object.far = this.far;\n\n\t\tif ( this.view !== null ) data.object.view = Object.assign( {}, this.view );\n\n\t\treturn data;\n\n\t}\n\n}\n\nOrthographicCamera.prototype.isOrthographicCamera = true;\n\nclass DirectionalLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );\n\n\t}\n\n}\n\nDirectionalLightShadow.prototype.isDirectionalLightShadow = true;\n\nclass DirectionalLight extends Light {\n\n\tconstructor( color, intensity ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'DirectionalLight';\n\n\t\tthis.position.copy( Object3D.DefaultUp );\n\t\tthis.updateMatrix();\n\n\t\tthis.target = new Object3D();\n\n\t\tthis.shadow = new DirectionalLightShadow();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.target = source.target.clone();\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nDirectionalLight.prototype.isDirectionalLight = true;\n\nclass AmbientLight extends Light {\n\n\tconstructor( color, intensity ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'AmbientLight';\n\n\t}\n\n}\n\nAmbientLight.prototype.isAmbientLight = true;\n\nclass RectAreaLight extends Light {\n\n\tconstructor( color, intensity, width = 10, height = 10 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'RectAreaLight';\n\n\t\tthis.width = width;\n\t\tthis.height = height;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.width = this.width;\n\t\tdata.object.height = this.height;\n\n\t\treturn data;\n\n\t}\n\n}\n\nRectAreaLight.prototype.isRectAreaLight = true;\n\n/**\n * Primary reference:\n * https://graphics.stanford.edu/papers/envmap/envmap.pdf\n *\n * Secondary reference:\n * https://www.ppsloan.org/publications/StupidSH36.pdf\n */\n\n// 3-band SH defined by 9 coefficients\n\nclass SphericalHarmonics3 {\n\n\tconstructor() {\n\n\t\tthis.coefficients = [];\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients.push( new Vector3() );\n\n\t\t}\n\n\t}\n\n\tset( coefficients ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].copy( coefficients[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tzero() {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].set( 0, 0, 0 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// get the radiance in the direction of the normal\n\t// target is a Vector3\n\tgetAt( normal, target ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\tconst coeff = this.coefficients;\n\n\t\t// band 0\n\t\ttarget.copy( coeff[ 0 ] ).multiplyScalar( 0.282095 );\n\n\t\t// band 1\n\t\ttarget.addScaledVector( coeff[ 1 ], 0.488603 * y );\n\t\ttarget.addScaledVector( coeff[ 2 ], 0.488603 * z );\n\t\ttarget.addScaledVector( coeff[ 3 ], 0.488603 * x );\n\n\t\t// band 2\n\t\ttarget.addScaledVector( coeff[ 4 ], 1.092548 * ( x * y ) );\n\t\ttarget.addScaledVector( coeff[ 5 ], 1.092548 * ( y * z ) );\n\t\ttarget.addScaledVector( coeff[ 6 ], 0.315392 * ( 3.0 * z * z - 1.0 ) );\n\t\ttarget.addScaledVector( coeff[ 7 ], 1.092548 * ( x * z ) );\n\t\ttarget.addScaledVector( coeff[ 8 ], 0.546274 * ( x * x - y * y ) );\n\n\t\treturn target;\n\n\t}\n\n\t// get the irradiance (radiance convolved with cosine lobe) in the direction of the normal\n\t// target is a Vector3\n\t// https://graphics.stanford.edu/papers/envmap/envmap.pdf\n\tgetIrradianceAt( normal, target ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\tconst coeff = this.coefficients;\n\n\t\t// band 0\n\t\ttarget.copy( coeff[ 0 ] ).multiplyScalar( 0.886227 ); // π * 0.282095\n\n\t\t// band 1\n\t\ttarget.addScaledVector( coeff[ 1 ], 2.0 * 0.511664 * y ); // ( 2 * π / 3 ) * 0.488603\n\t\ttarget.addScaledVector( coeff[ 2 ], 2.0 * 0.511664 * z );\n\t\ttarget.addScaledVector( coeff[ 3 ], 2.0 * 0.511664 * x );\n\n\t\t// band 2\n\t\ttarget.addScaledVector( coeff[ 4 ], 2.0 * 0.429043 * x * y ); // ( π / 4 ) * 1.092548\n\t\ttarget.addScaledVector( coeff[ 5 ], 2.0 * 0.429043 * y * z );\n\t\ttarget.addScaledVector( coeff[ 6 ], 0.743125 * z * z - 0.247708 ); // ( π / 4 ) * 0.315392 * 3\n\t\ttarget.addScaledVector( coeff[ 7 ], 2.0 * 0.429043 * x * z );\n\t\ttarget.addScaledVector( coeff[ 8 ], 0.429043 * ( x * x - y * y ) ); // ( π / 4 ) * 0.546274\n\n\t\treturn target;\n\n\t}\n\n\tadd( sh ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].add( sh.coefficients[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\taddScaledSH( sh, s ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].addScaledVector( sh.coefficients[ i ], s );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tscale( s ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].multiplyScalar( s );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tlerp( sh, alpha ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].lerp( sh.coefficients[ i ], alpha );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tequals( sh ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tif ( ! this.coefficients[ i ].equals( sh.coefficients[ i ] ) ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tcopy( sh ) {\n\n\t\treturn this.set( sh.coefficients );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tconst coefficients = this.coefficients;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tcoefficients[ i ].fromArray( array, offset + ( i * 3 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst coefficients = this.coefficients;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tcoefficients[ i ].toArray( array, offset + ( i * 3 ) );\n\n\t\t}\n\n\t\treturn array;\n\n\t}\n\n\t// evaluate the basis functions\n\t// shBasis is an Array[ 9 ]\n\tstatic getBasisAt( normal, shBasis ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\t// band 0\n\t\tshBasis[ 0 ] = 0.282095;\n\n\t\t// band 1\n\t\tshBasis[ 1 ] = 0.488603 * y;\n\t\tshBasis[ 2 ] = 0.488603 * z;\n\t\tshBasis[ 3 ] = 0.488603 * x;\n\n\t\t// band 2\n\t\tshBasis[ 4 ] = 1.092548 * x * y;\n\t\tshBasis[ 5 ] = 1.092548 * y * z;\n\t\tshBasis[ 6 ] = 0.315392 * ( 3 * z * z - 1 );\n\t\tshBasis[ 7 ] = 1.092548 * x * z;\n\t\tshBasis[ 8 ] = 0.546274 * ( x * x - y * y );\n\n\t}\n\n}\n\nSphericalHarmonics3.prototype.isSphericalHarmonics3 = true;\n\nclass LightProbe extends Light {\n\n\tconstructor( sh = new SphericalHarmonics3(), intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tthis.sh = sh;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.sh.copy( source.sh );\n\n\t\treturn this;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tthis.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();\n\t\tthis.sh.fromArray( json.sh );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.sh = this.sh.toArray();\n\n\t\treturn data;\n\n\t}\n\n}\n\nLightProbe.prototype.isLightProbe = true;\n\nclass MaterialLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\t\tthis.textures = {};\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( scope.manager );\n\t\tloader.setPath( scope.path );\n\t\tloader.setRequestHeader( scope.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst textures = this.textures;\n\n\t\tfunction getTexture( name ) {\n\n\t\t\tif ( textures[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.MaterialLoader: Undefined texture', name );\n\n\t\t\t}\n\n\t\t\treturn textures[ name ];\n\n\t\t}\n\n\t\tconst material = new Materials[ json.type ]();\n\n\t\tif ( json.uuid !== undefined ) material.uuid = json.uuid;\n\t\tif ( json.name !== undefined ) material.name = json.name;\n\t\tif ( json.color !== undefined && material.color !== undefined ) material.color.setHex( json.color );\n\t\tif ( json.roughness !== undefined ) material.roughness = json.roughness;\n\t\tif ( json.metalness !== undefined ) material.metalness = json.metalness;\n\t\tif ( json.sheen !== undefined ) material.sheen = new Color().setHex( json.sheen );\n\t\tif ( json.emissive !== undefined && material.emissive !== undefined ) material.emissive.setHex( json.emissive );\n\t\tif ( json.specular !== undefined && material.specular !== undefined ) material.specular.setHex( json.specular );\n\t\tif ( json.shininess !== undefined ) material.shininess = json.shininess;\n\t\tif ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat;\n\t\tif ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness;\n\t\tif ( json.transmission !== undefined ) material.transmission = json.transmission;\n\t\tif ( json.thickness !== undefined ) material.thickness = json.thickness;\n\t\tif ( json.attenuationDistance !== undefined ) material.attenuationDistance = json.attenuationDistance;\n\t\tif ( json.attenuationColor !== undefined && material.attenuationColor !== undefined ) material.attenuationColor.setHex( json.attenuationColor );\n\t\tif ( json.fog !== undefined ) material.fog = json.fog;\n\t\tif ( json.flatShading !== undefined ) material.flatShading = json.flatShading;\n\t\tif ( json.blending !== undefined ) material.blending = json.blending;\n\t\tif ( json.combine !== undefined ) material.combine = json.combine;\n\t\tif ( json.side !== undefined ) material.side = json.side;\n\t\tif ( json.shadowSide !== undefined ) material.shadowSide = json.shadowSide;\n\t\tif ( json.opacity !== undefined ) material.opacity = json.opacity;\n\t\tif ( json.transparent !== undefined ) material.transparent = json.transparent;\n\t\tif ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest;\n\t\tif ( json.depthTest !== undefined ) material.depthTest = json.depthTest;\n\t\tif ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite;\n\t\tif ( json.colorWrite !== undefined ) material.colorWrite = json.colorWrite;\n\n\t\tif ( json.stencilWrite !== undefined ) material.stencilWrite = json.stencilWrite;\n\t\tif ( json.stencilWriteMask !== undefined ) material.stencilWriteMask = json.stencilWriteMask;\n\t\tif ( json.stencilFunc !== undefined ) material.stencilFunc = json.stencilFunc;\n\t\tif ( json.stencilRef !== undefined ) material.stencilRef = json.stencilRef;\n\t\tif ( json.stencilFuncMask !== undefined ) material.stencilFuncMask = json.stencilFuncMask;\n\t\tif ( json.stencilFail !== undefined ) material.stencilFail = json.stencilFail;\n\t\tif ( json.stencilZFail !== undefined ) material.stencilZFail = json.stencilZFail;\n\t\tif ( json.stencilZPass !== undefined ) material.stencilZPass = json.stencilZPass;\n\n\t\tif ( json.wireframe !== undefined ) material.wireframe = json.wireframe;\n\t\tif ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth;\n\t\tif ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap;\n\t\tif ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin;\n\n\t\tif ( json.rotation !== undefined ) material.rotation = json.rotation;\n\n\t\tif ( json.linewidth !== 1 ) material.linewidth = json.linewidth;\n\t\tif ( json.dashSize !== undefined ) material.dashSize = json.dashSize;\n\t\tif ( json.gapSize !== undefined ) material.gapSize = json.gapSize;\n\t\tif ( json.scale !== undefined ) material.scale = json.scale;\n\n\t\tif ( json.polygonOffset !== undefined ) material.polygonOffset = json.polygonOffset;\n\t\tif ( json.polygonOffsetFactor !== undefined ) material.polygonOffsetFactor = json.polygonOffsetFactor;\n\t\tif ( json.polygonOffsetUnits !== undefined ) material.polygonOffsetUnits = json.polygonOffsetUnits;\n\n\t\tif ( json.morphTargets !== undefined ) material.morphTargets = json.morphTargets;\n\t\tif ( json.morphNormals !== undefined ) material.morphNormals = json.morphNormals;\n\t\tif ( json.dithering !== undefined ) material.dithering = json.dithering;\n\n\t\tif ( json.alphaToCoverage !== undefined ) material.alphaToCoverage = json.alphaToCoverage;\n\t\tif ( json.premultipliedAlpha !== undefined ) material.premultipliedAlpha = json.premultipliedAlpha;\n\n\t\tif ( json.vertexTangents !== undefined ) material.vertexTangents = json.vertexTangents;\n\n\t\tif ( json.visible !== undefined ) material.visible = json.visible;\n\n\t\tif ( json.toneMapped !== undefined ) material.toneMapped = json.toneMapped;\n\n\t\tif ( json.userData !== undefined ) material.userData = json.userData;\n\n\t\tif ( json.vertexColors !== undefined ) {\n\n\t\t\tif ( typeof json.vertexColors === 'number' ) {\n\n\t\t\t\tmaterial.vertexColors = ( json.vertexColors > 0 ) ? true : false;\n\n\t\t\t} else {\n\n\t\t\t\tmaterial.vertexColors = json.vertexColors;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Shader Material\n\n\t\tif ( json.uniforms !== undefined ) {\n\n\t\t\tfor ( const name in json.uniforms ) {\n\n\t\t\t\tconst uniform = json.uniforms[ name ];\n\n\t\t\t\tmaterial.uniforms[ name ] = {};\n\n\t\t\t\tswitch ( uniform.type ) {\n\n\t\t\t\t\tcase 't':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = getTexture( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Color().setHex( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v2':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector2().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v3':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector3().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v4':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector4().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'm3':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Matrix3().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'm4':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Matrix4().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = uniform.value;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json.defines !== undefined ) material.defines = json.defines;\n\t\tif ( json.vertexShader !== undefined ) material.vertexShader = json.vertexShader;\n\t\tif ( json.fragmentShader !== undefined ) material.fragmentShader = json.fragmentShader;\n\n\t\tif ( json.extensions !== undefined ) {\n\n\t\t\tfor ( const key in json.extensions ) {\n\n\t\t\t\tmaterial.extensions[ key ] = json.extensions[ key ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Deprecated\n\n\t\tif ( json.shading !== undefined ) material.flatShading = json.shading === 1; // THREE.FlatShading\n\n\t\t// for PointsMaterial\n\n\t\tif ( json.size !== undefined ) material.size = json.size;\n\t\tif ( json.sizeAttenuation !== undefined ) material.sizeAttenuation = json.sizeAttenuation;\n\n\t\t// maps\n\n\t\tif ( json.map !== undefined ) material.map = getTexture( json.map );\n\t\tif ( json.matcap !== undefined ) material.matcap = getTexture( json.matcap );\n\n\t\tif ( json.alphaMap !== undefined ) material.alphaMap = getTexture( json.alphaMap );\n\n\t\tif ( json.bumpMap !== undefined ) material.bumpMap = getTexture( json.bumpMap );\n\t\tif ( json.bumpScale !== undefined ) material.bumpScale = json.bumpScale;\n\n\t\tif ( json.normalMap !== undefined ) material.normalMap = getTexture( json.normalMap );\n\t\tif ( json.normalMapType !== undefined ) material.normalMapType = json.normalMapType;\n\t\tif ( json.normalScale !== undefined ) {\n\n\t\t\tlet normalScale = json.normalScale;\n\n\t\t\tif ( Array.isArray( normalScale ) === false ) {\n\n\t\t\t\t// Blender exporter used to export a scalar. See #7459\n\n\t\t\t\tnormalScale = [ normalScale, normalScale ];\n\n\t\t\t}\n\n\t\t\tmaterial.normalScale = new Vector2().fromArray( normalScale );\n\n\t\t}\n\n\t\tif ( json.displacementMap !== undefined ) material.displacementMap = getTexture( json.displacementMap );\n\t\tif ( json.displacementScale !== undefined ) material.displacementScale = json.displacementScale;\n\t\tif ( json.displacementBias !== undefined ) material.displacementBias = json.displacementBias;\n\n\t\tif ( json.roughnessMap !== undefined ) material.roughnessMap = getTexture( json.roughnessMap );\n\t\tif ( json.metalnessMap !== undefined ) material.metalnessMap = getTexture( json.metalnessMap );\n\n\t\tif ( json.emissiveMap !== undefined ) material.emissiveMap = getTexture( json.emissiveMap );\n\t\tif ( json.emissiveIntensity !== undefined ) material.emissiveIntensity = json.emissiveIntensity;\n\n\t\tif ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap );\n\n\t\tif ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap );\n\t\tif ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity;\n\n\t\tif ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity;\n\t\tif ( json.refractionRatio !== undefined ) material.refractionRatio = json.refractionRatio;\n\n\t\tif ( json.lightMap !== undefined ) material.lightMap = getTexture( json.lightMap );\n\t\tif ( json.lightMapIntensity !== undefined ) material.lightMapIntensity = json.lightMapIntensity;\n\n\t\tif ( json.aoMap !== undefined ) material.aoMap = getTexture( json.aoMap );\n\t\tif ( json.aoMapIntensity !== undefined ) material.aoMapIntensity = json.aoMapIntensity;\n\n\t\tif ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap );\n\n\t\tif ( json.clearcoatMap !== undefined ) material.clearcoatMap = getTexture( json.clearcoatMap );\n\t\tif ( json.clearcoatRoughnessMap !== undefined ) material.clearcoatRoughnessMap = getTexture( json.clearcoatRoughnessMap );\n\t\tif ( json.clearcoatNormalMap !== undefined ) material.clearcoatNormalMap = getTexture( json.clearcoatNormalMap );\n\t\tif ( json.clearcoatNormalScale !== undefined ) material.clearcoatNormalScale = new Vector2().fromArray( json.clearcoatNormalScale );\n\n\t\tif ( json.transmissionMap !== undefined ) material.transmissionMap = getTexture( json.transmissionMap );\n\t\tif ( json.thicknessMap !== undefined ) material.thicknessMap = getTexture( json.thicknessMap );\n\n\t\treturn material;\n\n\t}\n\n\tsetTextures( value ) {\n\n\t\tthis.textures = value;\n\t\treturn this;\n\n\t}\n\n}\n\nclass LoaderUtils {\n\n\tstatic decodeText( array ) {\n\n\t\tif ( typeof TextDecoder !== 'undefined' ) {\n\n\t\t\treturn new TextDecoder().decode( array );\n\n\t\t}\n\n\t\t// Avoid the String.fromCharCode.apply(null, array) shortcut, which\n\t\t// throws a \"maximum call stack size exceeded\" error for large arrays.\n\n\t\tlet s = '';\n\n\t\tfor ( let i = 0, il = array.length; i < il; i ++ ) {\n\n\t\t\t// Implicitly assumes little-endian.\n\t\t\ts += String.fromCharCode( array[ i ] );\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// merges multi-byte utf-8 characters.\n\n\t\t\treturn decodeURIComponent( escape( s ) );\n\n\t\t} catch ( e ) { // see #16358\n\n\t\t\treturn s;\n\n\t\t}\n\n\t}\n\n\tstatic extractUrlBase( url ) {\n\n\t\tconst index = url.lastIndexOf( '/' );\n\n\t\tif ( index === - 1 ) return './';\n\n\t\treturn url.substr( 0, index + 1 );\n\n\t}\n\n}\n\nclass InstancedBufferGeometry extends BufferGeometry {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'InstancedBufferGeometry';\n\t\tthis.instanceCount = Infinity;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.instanceCount = source.instanceCount;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON( this );\n\n\t\tdata.instanceCount = this.instanceCount;\n\n\t\tdata.isInstancedBufferGeometry = true;\n\n\t\treturn data;\n\n\t}\n\n}\n\nInstancedBufferGeometry.prototype.isInstancedBufferGeometry = true;\n\nclass InstancedBufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized, meshPerAttribute = 1 ) {\n\n\t\tif ( typeof normalized === 'number' ) {\n\n\t\t\tmeshPerAttribute = normalized;\n\n\t\t\tnormalized = false;\n\n\t\t\tconsole.error( 'THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.' );\n\n\t\t}\n\n\t\tsuper( array, itemSize, normalized );\n\n\t\tthis.meshPerAttribute = meshPerAttribute;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.meshPerAttribute = this.meshPerAttribute;\n\n\t\tdata.isInstancedBufferAttribute = true;\n\n\t\treturn data;\n\n\t}\n\n}\n\nInstancedBufferAttribute.prototype.isInstancedBufferAttribute = true;\n\nclass BufferGeometryLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( scope.manager );\n\t\tloader.setPath( scope.path );\n\t\tloader.setRequestHeader( scope.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst interleavedBufferMap = {};\n\t\tconst arrayBufferMap = {};\n\n\t\tfunction getInterleavedBuffer( json, uuid ) {\n\n\t\t\tif ( interleavedBufferMap[ uuid ] !== undefined ) return interleavedBufferMap[ uuid ];\n\n\t\t\tconst interleavedBuffers = json.interleavedBuffers;\n\t\t\tconst interleavedBuffer = interleavedBuffers[ uuid ];\n\n\t\t\tconst buffer = getArrayBuffer( json, interleavedBuffer.buffer );\n\n\t\t\tconst array = getTypedArray( interleavedBuffer.type, buffer );\n\t\t\tconst ib = new InterleavedBuffer( array, interleavedBuffer.stride );\n\t\t\tib.uuid = interleavedBuffer.uuid;\n\n\t\t\tinterleavedBufferMap[ uuid ] = ib;\n\n\t\t\treturn ib;\n\n\t\t}\n\n\t\tfunction getArrayBuffer( json, uuid ) {\n\n\t\t\tif ( arrayBufferMap[ uuid ] !== undefined ) return arrayBufferMap[ uuid ];\n\n\t\t\tconst arrayBuffers = json.arrayBuffers;\n\t\t\tconst arrayBuffer = arrayBuffers[ uuid ];\n\n\t\t\tconst ab = new Uint32Array( arrayBuffer ).buffer;\n\n\t\t\tarrayBufferMap[ uuid ] = ab;\n\n\t\t\treturn ab;\n\n\t\t}\n\n\t\tconst geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry();\n\n\t\tconst index = json.data.index;\n\n\t\tif ( index !== undefined ) {\n\n\t\t\tconst typedArray = getTypedArray( index.type, index.array );\n\t\t\tgeometry.setIndex( new BufferAttribute( typedArray, 1 ) );\n\n\t\t}\n\n\t\tconst attributes = json.data.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\t\t\tlet bufferAttribute;\n\n\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\tconst interleavedBuffer = getInterleavedBuffer( json.data, attribute.data );\n\t\t\t\tbufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized );\n\n\t\t\t} else {\n\n\t\t\t\tconst typedArray = getTypedArray( attribute.type, attribute.array );\n\t\t\t\tconst bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute;\n\t\t\t\tbufferAttribute = new bufferAttributeConstr( typedArray, attribute.itemSize, attribute.normalized );\n\n\t\t\t}\n\n\t\t\tif ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;\n\t\t\tif ( attribute.usage !== undefined ) bufferAttribute.setUsage( attribute.usage );\n\n\t\t\tif ( attribute.updateRange !== undefined ) {\n\n\t\t\t\tbufferAttribute.updateRange.offset = attribute.updateRange.offset;\n\t\t\t\tbufferAttribute.updateRange.count = attribute.updateRange.count;\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( key, bufferAttribute );\n\n\t\t}\n\n\t\tconst morphAttributes = json.data.morphAttributes;\n\n\t\tif ( morphAttributes ) {\n\n\t\t\tfor ( const key in morphAttributes ) {\n\n\t\t\t\tconst attributeArray = morphAttributes[ key ];\n\n\t\t\t\tconst array = [];\n\n\t\t\t\tfor ( let i = 0, il = attributeArray.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst attribute = attributeArray[ i ];\n\t\t\t\t\tlet bufferAttribute;\n\n\t\t\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\t\tconst interleavedBuffer = getInterleavedBuffer( json.data, attribute.data );\n\t\t\t\t\t\tbufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst typedArray = getTypedArray( attribute.type, attribute.array );\n\t\t\t\t\t\tbufferAttribute = new BufferAttribute( typedArray, attribute.itemSize, attribute.normalized );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;\n\t\t\t\t\tarray.push( bufferAttribute );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.morphAttributes[ key ] = array;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst morphTargetsRelative = json.data.morphTargetsRelative;\n\n\t\tif ( morphTargetsRelative ) {\n\n\t\t\tgeometry.morphTargetsRelative = true;\n\n\t\t}\n\n\t\tconst groups = json.data.groups || json.data.drawcalls || json.data.offsets;\n\n\t\tif ( groups !== undefined ) {\n\n\t\t\tfor ( let i = 0, n = groups.length; i !== n; ++ i ) {\n\n\t\t\t\tconst group = groups[ i ];\n\n\t\t\t\tgeometry.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst boundingSphere = json.data.boundingSphere;\n\n\t\tif ( boundingSphere !== undefined ) {\n\n\t\t\tconst center = new Vector3();\n\n\t\t\tif ( boundingSphere.center !== undefined ) {\n\n\t\t\t\tcenter.fromArray( boundingSphere.center );\n\n\t\t\t}\n\n\t\t\tgeometry.boundingSphere = new Sphere( center, boundingSphere.radius );\n\n\t\t}\n\n\t\tif ( json.name ) geometry.name = json.name;\n\t\tif ( json.userData ) geometry.userData = json.userData;\n\n\t\treturn geometry;\n\n\t}\n\n}\n\nclass ObjectLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path;\n\t\tthis.resourcePath = this.resourcePath || path;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\tlet json = null;\n\n\t\t\ttry {\n\n\t\t\t\tjson = JSON.parse( text );\n\n\t\t\t} catch ( error ) {\n\n\t\t\t\tif ( onError !== undefined ) onError( error );\n\n\t\t\t\tconsole.error( 'THREE:ObjectLoader: Can\\'t parse ' + url + '.', error.message );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst metadata = json.metadata;\n\n\t\t\tif ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {\n\n\t\t\t\tconsole.error( 'THREE.ObjectLoader: Can\\'t load ' + url );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tscope.parse( json, onLoad );\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tasync loadAsync( url, onProgress ) {\n\n\t\tconst scope = this;\n\n\t\tconst path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path;\n\t\tthis.resourcePath = this.resourcePath || path;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\tconst text = await loader.loadAsync( url, onProgress );\n\n\t\tconst json = JSON.parse( text );\n\n\t\tconst metadata = json.metadata;\n\n\t\tif ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {\n\n\t\t\tthrow new Error( 'THREE.ObjectLoader: Can\\'t load ' + url );\n\n\t\t}\n\n\t\treturn await scope.parseAsync( json );\n\n\t}\n\n\tparse( json, onLoad ) {\n\n\t\tconst animations = this.parseAnimations( json.animations );\n\t\tconst shapes = this.parseShapes( json.shapes );\n\t\tconst geometries = this.parseGeometries( json.geometries, shapes );\n\n\t\tconst images = this.parseImages( json.images, function () {\n\n\t\t\tif ( onLoad !== undefined ) onLoad( object );\n\n\t\t} );\n\n\t\tconst textures = this.parseTextures( json.textures, images );\n\t\tconst materials = this.parseMaterials( json.materials, textures );\n\n\t\tconst object = this.parseObject( json.object, geometries, materials, textures, animations );\n\t\tconst skeletons = this.parseSkeletons( json.skeletons, object );\n\n\t\tthis.bindSkeletons( object, skeletons );\n\n\t\t//\n\n\t\tif ( onLoad !== undefined ) {\n\n\t\t\tlet hasImages = false;\n\n\t\t\tfor ( const uuid in images ) {\n\n\t\t\t\tif ( images[ uuid ] instanceof HTMLImageElement ) {\n\n\t\t\t\t\thasImages = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( hasImages === false ) onLoad( object );\n\n\t\t}\n\n\t\treturn object;\n\n\t}\n\n\tasync parseAsync( json ) {\n\n\t\tconst animations = this.parseAnimations( json.animations );\n\t\tconst shapes = this.parseShapes( json.shapes );\n\t\tconst geometries = this.parseGeometries( json.geometries, shapes );\n\n\t\tconst images = await this.parseImagesAsync( json.images );\n\n\t\tconst textures = this.parseTextures( json.textures, images );\n\t\tconst materials = this.parseMaterials( json.materials, textures );\n\n\t\tconst object = this.parseObject( json.object, geometries, materials, textures, animations );\n\t\tconst skeletons = this.parseSkeletons( json.skeletons, object );\n\n\t\tthis.bindSkeletons( object, skeletons );\n\n\t\treturn object;\n\n\t}\n\n\tparseShapes( json ) {\n\n\t\tconst shapes = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst shape = new Shape().fromJSON( json[ i ] );\n\n\t\t\t\tshapes[ shape.uuid ] = shape;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn shapes;\n\n\t}\n\n\tparseSkeletons( json, object ) {\n\n\t\tconst skeletons = {};\n\t\tconst bones = {};\n\n\t\t// generate bone lookup table\n\n\t\tobject.traverse( function ( child ) {\n\n\t\t\tif ( child.isBone ) bones[ child.uuid ] = child;\n\n\t\t} );\n\n\t\t// create skeletons\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst skeleton = new Skeleton().fromJSON( json[ i ], bones );\n\n\t\t\t\tskeletons[ skeleton.uuid ] = skeleton;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn skeletons;\n\n\t}\n\n\tparseGeometries( json, shapes ) {\n\n\t\tconst geometries = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tconst bufferGeometryLoader = new BufferGeometryLoader();\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tlet geometry;\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tswitch ( data.type ) {\n\n\t\t\t\t\tcase 'BufferGeometry':\n\t\t\t\t\tcase 'InstancedBufferGeometry':\n\n\t\t\t\t\t\tgeometry = bufferGeometryLoader.parse( data );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Geometry':\n\n\t\t\t\t\t\tconsole.error( 'THREE.ObjectLoader: The legacy Geometry type is no longer supported.' );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tif ( data.type in Geometries ) {\n\n\t\t\t\t\t\t\tgeometry = Geometries[ data.type ].fromJSON( data, shapes );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tconsole.warn( `THREE.ObjectLoader: Unsupported geometry type \"${ data.type }\"` );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.uuid = data.uuid;\n\n\t\t\t\tif ( data.name !== undefined ) geometry.name = data.name;\n\t\t\t\tif ( geometry.isBufferGeometry === true && data.userData !== undefined ) geometry.userData = data.userData;\n\n\t\t\t\tgeometries[ data.uuid ] = geometry;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn geometries;\n\n\t}\n\n\tparseMaterials( json, textures ) {\n\n\t\tconst cache = {}; // MultiMaterial\n\t\tconst materials = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tconst loader = new MaterialLoader();\n\t\t\tloader.setTextures( textures );\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tif ( data.type === 'MultiMaterial' ) {\n\n\t\t\t\t\t// Deprecated\n\n\t\t\t\t\tconst array = [];\n\n\t\t\t\t\tfor ( let j = 0; j < data.materials.length; j ++ ) {\n\n\t\t\t\t\t\tconst material = data.materials[ j ];\n\n\t\t\t\t\t\tif ( cache[ material.uuid ] === undefined ) {\n\n\t\t\t\t\t\t\tcache[ material.uuid ] = loader.parse( material );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarray.push( cache[ material.uuid ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmaterials[ data.uuid ] = array;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( cache[ data.uuid ] === undefined ) {\n\n\t\t\t\t\t\tcache[ data.uuid ] = loader.parse( data );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmaterials[ data.uuid ] = cache[ data.uuid ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn materials;\n\n\t}\n\n\tparseAnimations( json ) {\n\n\t\tconst animations = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0; i < json.length; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tconst clip = AnimationClip.parse( data );\n\n\t\t\t\tanimations[ clip.uuid ] = clip;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn animations;\n\n\t}\n\n\tparseImages( json, onLoad ) {\n\n\t\tconst scope = this;\n\t\tconst images = {};\n\n\t\tlet loader;\n\n\t\tfunction loadImage( url ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\treturn loader.load( url, function () {\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, undefined, function () {\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t} );\n\n\t\t}\n\n\t\tfunction deserializeImage( image ) {\n\n\t\t\tif ( typeof image === 'string' ) {\n\n\t\t\t\tconst url = image;\n\n\t\t\t\tconst path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test( url ) ? url : scope.resourcePath + url;\n\n\t\t\t\treturn loadImage( path );\n\n\t\t\t} else {\n\n\t\t\t\tif ( image.data ) {\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: getTypedArray( image.type, image.data ),\n\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\theight: image.height\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json !== undefined && json.length > 0 ) {\n\n\t\t\tconst manager = new LoadingManager( onLoad );\n\n\t\t\tloader = new ImageLoader( manager );\n\t\t\tloader.setCrossOrigin( this.crossOrigin );\n\n\t\t\tfor ( let i = 0, il = json.length; i < il; i ++ ) {\n\n\t\t\t\tconst image = json[ i ];\n\t\t\t\tconst url = image.url;\n\n\t\t\t\tif ( Array.isArray( url ) ) {\n\n\t\t\t\t\t// load array of images e.g CubeTexture\n\n\t\t\t\t\timages[ image.uuid ] = [];\n\n\t\t\t\t\tfor ( let j = 0, jl = url.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tconst currentUrl = url[ j ];\n\n\t\t\t\t\t\tconst deserializedImage = deserializeImage( currentUrl );\n\n\t\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\t\tif ( deserializedImage instanceof HTMLImageElement ) {\n\n\t\t\t\t\t\t\t\timages[ image.uuid ].push( deserializedImage );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\n\t\t\t\t\t\t\t\timages[ image.uuid ].push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// load single image\n\n\t\t\t\t\tconst deserializedImage = deserializeImage( image.url );\n\n\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\timages[ image.uuid ] = deserializedImage;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn images;\n\n\t}\n\n\tasync parseImagesAsync( json ) {\n\n\t\tconst scope = this;\n\t\tconst images = {};\n\n\t\tlet loader;\n\n\t\tasync function deserializeImage( image ) {\n\n\t\t\tif ( typeof image === 'string' ) {\n\n\t\t\t\tconst url = image;\n\n\t\t\t\tconst path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test( url ) ? url : scope.resourcePath + url;\n\n\t\t\t\treturn await loader.loadAsync( path );\n\n\t\t\t} else {\n\n\t\t\t\tif ( image.data ) {\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: getTypedArray( image.type, image.data ),\n\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\theight: image.height\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json !== undefined && json.length > 0 ) {\n\n\t\t\tloader = new ImageLoader( this.manager );\n\t\t\tloader.setCrossOrigin( this.crossOrigin );\n\n\t\t\tfor ( let i = 0, il = json.length; i < il; i ++ ) {\n\n\t\t\t\tconst image = json[ i ];\n\t\t\t\tconst url = image.url;\n\n\t\t\t\tif ( Array.isArray( url ) ) {\n\n\t\t\t\t\t// load array of images e.g CubeTexture\n\n\t\t\t\t\timages[ image.uuid ] = [];\n\n\t\t\t\t\tfor ( let j = 0, jl = url.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tconst currentUrl = url[ j ];\n\n\t\t\t\t\t\tconst deserializedImage = await deserializeImage( currentUrl );\n\n\t\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\t\tif ( deserializedImage instanceof HTMLImageElement ) {\n\n\t\t\t\t\t\t\t\timages[ image.uuid ].push( deserializedImage );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\n\t\t\t\t\t\t\t\timages[ image.uuid ].push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// load single image\n\n\t\t\t\t\tconst deserializedImage = await deserializeImage( image.url );\n\n\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\timages[ image.uuid ] = deserializedImage;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn images;\n\n\t}\n\n\tparseTextures( json, images ) {\n\n\t\tfunction parseConstant( value, type ) {\n\n\t\t\tif ( typeof value === 'number' ) return value;\n\n\t\t\tconsole.warn( 'THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value );\n\n\t\t\treturn type[ value ];\n\n\t\t}\n\n\t\tconst textures = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tif ( data.image === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: No \"image\" specified for', data.uuid );\n\n\t\t\t\t}\n\n\t\t\t\tif ( images[ data.image ] === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined image', data.image );\n\n\t\t\t\t}\n\n\t\t\t\tlet texture;\n\t\t\t\tconst image = images[ data.image ];\n\n\t\t\t\tif ( Array.isArray( image ) ) {\n\n\t\t\t\t\ttexture = new CubeTexture( image );\n\n\t\t\t\t\tif ( image.length === 6 ) texture.needsUpdate = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( image && image.data ) {\n\n\t\t\t\t\t\ttexture = new DataTexture( image.data, image.width, image.height );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttexture = new Texture( image );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( image ) texture.needsUpdate = true; // textures can have undefined image data\n\n\t\t\t\t}\n\n\t\t\t\ttexture.uuid = data.uuid;\n\n\t\t\t\tif ( data.name !== undefined ) texture.name = data.name;\n\n\t\t\t\tif ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING );\n\n\t\t\t\tif ( data.offset !== undefined ) texture.offset.fromArray( data.offset );\n\t\t\t\tif ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat );\n\t\t\t\tif ( data.center !== undefined ) texture.center.fromArray( data.center );\n\t\t\t\tif ( data.rotation !== undefined ) texture.rotation = data.rotation;\n\n\t\t\t\tif ( data.wrap !== undefined ) {\n\n\t\t\t\t\ttexture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING );\n\t\t\t\t\ttexture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING );\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.format !== undefined ) texture.format = data.format;\n\t\t\t\tif ( data.type !== undefined ) texture.type = data.type;\n\t\t\t\tif ( data.encoding !== undefined ) texture.encoding = data.encoding;\n\n\t\t\t\tif ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER );\n\t\t\t\tif ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER );\n\t\t\t\tif ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;\n\n\t\t\t\tif ( data.flipY !== undefined ) texture.flipY = data.flipY;\n\n\t\t\t\tif ( data.premultiplyAlpha !== undefined ) texture.premultiplyAlpha = data.premultiplyAlpha;\n\t\t\t\tif ( data.unpackAlignment !== undefined ) texture.unpackAlignment = data.unpackAlignment;\n\n\t\t\t\ttextures[ data.uuid ] = texture;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn textures;\n\n\t}\n\n\tparseObject( data, geometries, materials, textures, animations ) {\n\n\t\tlet object;\n\n\t\tfunction getGeometry( name ) {\n\n\t\t\tif ( geometries[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined geometry', name );\n\n\t\t\t}\n\n\t\t\treturn geometries[ name ];\n\n\t\t}\n\n\t\tfunction getMaterial( name ) {\n\n\t\t\tif ( name === undefined ) return undefined;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\n\t\t\t\tconst array = [];\n\n\t\t\t\tfor ( let i = 0, l = name.length; i < l; i ++ ) {\n\n\t\t\t\t\tconst uuid = name[ i ];\n\n\t\t\t\t\tif ( materials[ uuid ] === undefined ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined material', uuid );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tarray.push( materials[ uuid ] );\n\n\t\t\t\t}\n\n\t\t\t\treturn array;\n\n\t\t\t}\n\n\t\t\tif ( materials[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined material', name );\n\n\t\t\t}\n\n\t\t\treturn materials[ name ];\n\n\t\t}\n\n\t\tfunction getTexture( uuid ) {\n\n\t\t\tif ( textures[ uuid ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined texture', uuid );\n\n\t\t\t}\n\n\t\t\treturn textures[ uuid ];\n\n\t\t}\n\n\t\tlet geometry, material;\n\n\t\tswitch ( data.type ) {\n\n\t\t\tcase 'Scene':\n\n\t\t\t\tobject = new Scene();\n\n\t\t\t\tif ( data.background !== undefined ) {\n\n\t\t\t\t\tif ( Number.isInteger( data.background ) ) {\n\n\t\t\t\t\t\tobject.background = new Color( data.background );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tobject.background = getTexture( data.background );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.environment !== undefined ) object.environment = getTexture( data.environment );\n\n\t\t\t\tif ( data.fog !== undefined ) {\n\n\t\t\t\t\tif ( data.fog.type === 'Fog' ) {\n\n\t\t\t\t\t\tobject.fog = new Fog( data.fog.color, data.fog.near, data.fog.far );\n\n\t\t\t\t\t} else if ( data.fog.type === 'FogExp2' ) {\n\n\t\t\t\t\t\tobject.fog = new FogExp2( data.fog.color, data.fog.density );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PerspectiveCamera':\n\n\t\t\t\tobject = new PerspectiveCamera( data.fov, data.aspect, data.near, data.far );\n\n\t\t\t\tif ( data.focus !== undefined ) object.focus = data.focus;\n\t\t\t\tif ( data.zoom !== undefined ) object.zoom = data.zoom;\n\t\t\t\tif ( data.filmGauge !== undefined ) object.filmGauge = data.filmGauge;\n\t\t\t\tif ( data.filmOffset !== undefined ) object.filmOffset = data.filmOffset;\n\t\t\t\tif ( data.view !== undefined ) object.view = Object.assign( {}, data.view );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'OrthographicCamera':\n\n\t\t\t\tobject = new OrthographicCamera( data.left, data.right, data.top, data.bottom, data.near, data.far );\n\n\t\t\t\tif ( data.zoom !== undefined ) object.zoom = data.zoom;\n\t\t\t\tif ( data.view !== undefined ) object.view = Object.assign( {}, data.view );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'AmbientLight':\n\n\t\t\t\tobject = new AmbientLight( data.color, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'DirectionalLight':\n\n\t\t\t\tobject = new DirectionalLight( data.color, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PointLight':\n\n\t\t\t\tobject = new PointLight( data.color, data.intensity, data.distance, data.decay );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'RectAreaLight':\n\n\t\t\t\tobject = new RectAreaLight( data.color, data.intensity, data.width, data.height );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'SpotLight':\n\n\t\t\t\tobject = new SpotLight( data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'HemisphereLight':\n\n\t\t\t\tobject = new HemisphereLight( data.color, data.groundColor, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LightProbe':\n\n\t\t\t\tobject = new LightProbe().fromJSON( data );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'SkinnedMesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t \tmaterial = getMaterial( data.material );\n\n\t\t\t\tobject = new SkinnedMesh( geometry, material );\n\n\t\t\t\tif ( data.bindMode !== undefined ) object.bindMode = data.bindMode;\n\t\t\t\tif ( data.bindMatrix !== undefined ) object.bindMatrix.fromArray( data.bindMatrix );\n\t\t\t\tif ( data.skeleton !== undefined ) object.skeleton = data.skeleton;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Mesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t\tmaterial = getMaterial( data.material );\n\n\t\t\t\tobject = new Mesh( geometry, material );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'InstancedMesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t\tmaterial = getMaterial( data.material );\n\t\t\t\tconst count = data.count;\n\t\t\t\tconst instanceMatrix = data.instanceMatrix;\n\t\t\t\tconst instanceColor = data.instanceColor;\n\n\t\t\t\tobject = new InstancedMesh( geometry, material, count );\n\t\t\t\tobject.instanceMatrix = new BufferAttribute( new Float32Array( instanceMatrix.array ), 16 );\n\t\t\t\tif ( instanceColor !== undefined ) object.instanceColor = new BufferAttribute( new Float32Array( instanceColor.array ), instanceColor.itemSize );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LOD':\n\n\t\t\t\tobject = new LOD();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Line':\n\n\t\t\t\tobject = new Line( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LineLoop':\n\n\t\t\t\tobject = new LineLoop( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LineSegments':\n\n\t\t\t\tobject = new LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PointCloud':\n\t\t\tcase 'Points':\n\n\t\t\t\tobject = new Points( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Sprite':\n\n\t\t\t\tobject = new Sprite( getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Group':\n\n\t\t\t\tobject = new Group();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Bone':\n\n\t\t\t\tobject = new Bone();\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tobject = new Object3D();\n\n\t\t}\n\n\t\tobject.uuid = data.uuid;\n\n\t\tif ( data.name !== undefined ) object.name = data.name;\n\n\t\tif ( data.matrix !== undefined ) {\n\n\t\t\tobject.matrix.fromArray( data.matrix );\n\n\t\t\tif ( data.matrixAutoUpdate !== undefined ) object.matrixAutoUpdate = data.matrixAutoUpdate;\n\t\t\tif ( object.matrixAutoUpdate ) object.matrix.decompose( object.position, object.quaternion, object.scale );\n\n\t\t} else {\n\n\t\t\tif ( data.position !== undefined ) object.position.fromArray( data.position );\n\t\t\tif ( data.rotation !== undefined ) object.rotation.fromArray( data.rotation );\n\t\t\tif ( data.quaternion !== undefined ) object.quaternion.fromArray( data.quaternion );\n\t\t\tif ( data.scale !== undefined ) object.scale.fromArray( data.scale );\n\n\t\t}\n\n\t\tif ( data.castShadow !== undefined ) object.castShadow = data.castShadow;\n\t\tif ( data.receiveShadow !== undefined ) object.receiveShadow = data.receiveShadow;\n\n\t\tif ( data.shadow ) {\n\n\t\t\tif ( data.shadow.bias !== undefined ) object.shadow.bias = data.shadow.bias;\n\t\t\tif ( data.shadow.normalBias !== undefined ) object.shadow.normalBias = data.shadow.normalBias;\n\t\t\tif ( data.shadow.radius !== undefined ) object.shadow.radius = data.shadow.radius;\n\t\t\tif ( data.shadow.mapSize !== undefined ) object.shadow.mapSize.fromArray( data.shadow.mapSize );\n\t\t\tif ( data.shadow.camera !== undefined ) object.shadow.camera = this.parseObject( data.shadow.camera );\n\n\t\t}\n\n\t\tif ( data.visible !== undefined ) object.visible = data.visible;\n\t\tif ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled;\n\t\tif ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder;\n\t\tif ( data.userData !== undefined ) object.userData = data.userData;\n\t\tif ( data.layers !== undefined ) object.layers.mask = data.layers;\n\n\t\tif ( data.children !== undefined ) {\n\n\t\t\tconst children = data.children;\n\n\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\tobject.add( this.parseObject( children[ i ], geometries, materials, textures, animations ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( data.animations !== undefined ) {\n\n\t\t\tconst objectAnimations = data.animations;\n\n\t\t\tfor ( let i = 0; i < objectAnimations.length; i ++ ) {\n\n\t\t\t\tconst uuid = objectAnimations[ i ];\n\n\t\t\t\tobject.animations.push( animations[ uuid ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( data.type === 'LOD' ) {\n\n\t\t\tif ( data.autoUpdate !== undefined ) object.autoUpdate = data.autoUpdate;\n\n\t\t\tconst levels = data.levels;\n\n\t\t\tfor ( let l = 0; l < levels.length; l ++ ) {\n\n\t\t\t\tconst level = levels[ l ];\n\t\t\t\tconst child = object.getObjectByProperty( 'uuid', level.object );\n\n\t\t\t\tif ( child !== undefined ) {\n\n\t\t\t\t\tobject.addLevel( child, level.distance );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn object;\n\n\t}\n\n\tbindSkeletons( object, skeletons ) {\n\n\t\tif ( Object.keys( skeletons ).length === 0 ) return;\n\n\t\tobject.traverse( function ( child ) {\n\n\t\t\tif ( child.isSkinnedMesh === true && child.skeleton !== undefined ) {\n\n\t\t\t\tconst skeleton = skeletons[ child.skeleton ];\n\n\t\t\t\tif ( skeleton === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tchild.bind( skeleton, child.bindMatrix );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t}\n\n\t/* DEPRECATED */\n\n\tsetTexturePath( value ) {\n\n\t\tconsole.warn( 'THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().' );\n\t\treturn this.setResourcePath( value );\n\n\t}\n\n}\n\nconst TEXTURE_MAPPING = {\n\tUVMapping: UVMapping,\n\tCubeReflectionMapping: CubeReflectionMapping,\n\tCubeRefractionMapping: CubeRefractionMapping,\n\tEquirectangularReflectionMapping: EquirectangularReflectionMapping,\n\tEquirectangularRefractionMapping: EquirectangularRefractionMapping,\n\tCubeUVReflectionMapping: CubeUVReflectionMapping,\n\tCubeUVRefractionMapping: CubeUVRefractionMapping\n};\n\nconst TEXTURE_WRAPPING = {\n\tRepeatWrapping: RepeatWrapping,\n\tClampToEdgeWrapping: ClampToEdgeWrapping,\n\tMirroredRepeatWrapping: MirroredRepeatWrapping\n};\n\nconst TEXTURE_FILTER = {\n\tNearestFilter: NearestFilter,\n\tNearestMipmapNearestFilter: NearestMipmapNearestFilter,\n\tNearestMipmapLinearFilter: NearestMipmapLinearFilter,\n\tLinearFilter: LinearFilter,\n\tLinearMipmapNearestFilter: LinearMipmapNearestFilter,\n\tLinearMipmapLinearFilter: LinearMipmapLinearFilter\n};\n\nclass ImageBitmapLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t\tif ( typeof createImageBitmap === 'undefined' ) {\n\n\t\t\tconsole.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' );\n\n\t\t}\n\n\t\tif ( typeof fetch === 'undefined' ) {\n\n\t\t\tconsole.warn( 'THREE.ImageBitmapLoader: fetch() not supported.' );\n\n\t\t}\n\n\t\tthis.options = { premultiplyAlpha: 'none' };\n\n\t}\n\n\tsetOptions( options ) {\n\n\t\tthis.options = options;\n\n\t\treturn this;\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( url === undefined ) url = '';\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\tconst fetchOptions = {};\n\t\tfetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include';\n\t\tfetchOptions.headers = this.requestHeader;\n\n\t\tfetch( url, fetchOptions ).then( function ( res ) {\n\n\t\t\treturn res.blob();\n\n\t\t} ).then( function ( blob ) {\n\n\t\t\treturn createImageBitmap( blob, Object.assign( scope.options, { colorSpaceConversion: 'none' } ) );\n\n\t\t} ).then( function ( imageBitmap ) {\n\n\t\t\tCache.add( url, imageBitmap );\n\n\t\t\tif ( onLoad ) onLoad( imageBitmap );\n\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t} ).catch( function ( e ) {\n\n\t\t\tif ( onError ) onError( e );\n\n\t\t\tscope.manager.itemError( url );\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t} );\n\n\t\tscope.manager.itemStart( url );\n\n\t}\n\n}\n\nImageBitmapLoader.prototype.isImageBitmapLoader = true;\n\nclass ShapePath {\n\n\tconstructor() {\n\n\t\tthis.type = 'ShapePath';\n\n\t\tthis.color = new Color();\n\n\t\tthis.subPaths = [];\n\t\tthis.currentPath = null;\n\n\t}\n\n\tmoveTo( x, y ) {\n\n\t\tthis.currentPath = new Path();\n\t\tthis.subPaths.push( this.currentPath );\n\t\tthis.currentPath.moveTo( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tlineTo( x, y ) {\n\n\t\tthis.currentPath.lineTo( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tquadraticCurveTo( aCPx, aCPy, aX, aY ) {\n\n\t\tthis.currentPath.quadraticCurveTo( aCPx, aCPy, aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tbezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) {\n\n\t\tthis.currentPath.bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tsplineThru( pts ) {\n\n\t\tthis.currentPath.splineThru( pts );\n\n\t\treturn this;\n\n\t}\n\n\ttoShapes( isCCW, noHoles ) {\n\n\t\tfunction toShapesNoHoles( inSubpaths ) {\n\n\t\t\tconst shapes = [];\n\n\t\t\tfor ( let i = 0, l = inSubpaths.length; i < l; i ++ ) {\n\n\t\t\t\tconst tmpPath = inSubpaths[ i ];\n\n\t\t\t\tconst tmpShape = new Shape();\n\t\t\t\ttmpShape.curves = tmpPath.curves;\n\n\t\t\t\tshapes.push( tmpShape );\n\n\t\t\t}\n\n\t\t\treturn shapes;\n\n\t\t}\n\n\t\tfunction isPointInsidePolygon( inPt, inPolygon ) {\n\n\t\t\tconst polyLen = inPolygon.length;\n\n\t\t\t// inPt on polygon contour => immediate success or\n\t\t\t// toggling of inside/outside at every single! intersection point of an edge\n\t\t\t// with the horizontal line through inPt, left of inPt\n\t\t\t// not counting lowerY endpoints of edges and whole edges on that line\n\t\t\tlet inside = false;\n\t\t\tfor ( let p = polyLen - 1, q = 0; q < polyLen; p = q ++ ) {\n\n\t\t\t\tlet edgeLowPt = inPolygon[ p ];\n\t\t\t\tlet edgeHighPt = inPolygon[ q ];\n\n\t\t\t\tlet edgeDx = edgeHighPt.x - edgeLowPt.x;\n\t\t\t\tlet edgeDy = edgeHighPt.y - edgeLowPt.y;\n\n\t\t\t\tif ( Math.abs( edgeDy ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not parallel\n\t\t\t\t\tif ( edgeDy < 0 ) {\n\n\t\t\t\t\t\tedgeLowPt = inPolygon[ q ]; edgeDx = - edgeDx;\n\t\t\t\t\t\tedgeHighPt = inPolygon[ p ]; edgeDy = - edgeDy;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( inPt.y < edgeLowPt.y ) || ( inPt.y > edgeHighPt.y ) ) \t\tcontinue;\n\n\t\t\t\t\tif ( inPt.y === edgeLowPt.y ) {\n\n\t\t\t\t\t\tif ( inPt.x === edgeLowPt.x )\t\treturn\ttrue;\t\t// inPt is on contour ?\n\t\t\t\t\t\t// continue;\t\t\t\t// no intersection or edgeLowPt => doesn't count !!!\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst perpEdge = edgeDy * ( inPt.x - edgeLowPt.x ) - edgeDx * ( inPt.y - edgeLowPt.y );\n\t\t\t\t\t\tif ( perpEdge === 0 )\t\t\t\treturn\ttrue;\t\t// inPt is on contour ?\n\t\t\t\t\t\tif ( perpEdge < 0 ) \t\t\t\tcontinue;\n\t\t\t\t\t\tinside = ! inside;\t\t// true intersection left of inPt\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// parallel or collinear\n\t\t\t\t\tif ( inPt.y !== edgeLowPt.y ) \t\tcontinue;\t\t\t// parallel\n\t\t\t\t\t// edge lies on the same horizontal line as inPt\n\t\t\t\t\tif ( ( ( edgeHighPt.x <= inPt.x ) && ( inPt.x <= edgeLowPt.x ) ) ||\n\t\t\t\t\t\t ( ( edgeLowPt.x <= inPt.x ) && ( inPt.x <= edgeHighPt.x ) ) )\t\treturn\ttrue;\t// inPt: Point on contour !\n\t\t\t\t\t// continue;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn\tinside;\n\n\t\t}\n\n\t\tconst isClockWise = ShapeUtils.isClockWise;\n\n\t\tconst subPaths = this.subPaths;\n\t\tif ( subPaths.length === 0 ) return [];\n\n\t\tif ( noHoles === true )\treturn\ttoShapesNoHoles( subPaths );\n\n\n\t\tlet solid, tmpPath, tmpShape;\n\t\tconst shapes = [];\n\n\t\tif ( subPaths.length === 1 ) {\n\n\t\t\ttmpPath = subPaths[ 0 ];\n\t\t\ttmpShape = new Shape();\n\t\t\ttmpShape.curves = tmpPath.curves;\n\t\t\tshapes.push( tmpShape );\n\t\t\treturn shapes;\n\n\t\t}\n\n\t\tlet holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() );\n\t\tholesFirst = isCCW ? ! holesFirst : holesFirst;\n\n\t\t// console.log(\"Holes first\", holesFirst);\n\n\t\tconst betterShapeHoles = [];\n\t\tconst newShapes = [];\n\t\tlet newShapeHoles = [];\n\t\tlet mainIdx = 0;\n\t\tlet tmpPoints;\n\n\t\tnewShapes[ mainIdx ] = undefined;\n\t\tnewShapeHoles[ mainIdx ] = [];\n\n\t\tfor ( let i = 0, l = subPaths.length; i < l; i ++ ) {\n\n\t\t\ttmpPath = subPaths[ i ];\n\t\t\ttmpPoints = tmpPath.getPoints();\n\t\t\tsolid = isClockWise( tmpPoints );\n\t\t\tsolid = isCCW ? ! solid : solid;\n\n\t\t\tif ( solid ) {\n\n\t\t\t\tif ( ( ! holesFirst ) && ( newShapes[ mainIdx ] ) )\tmainIdx ++;\n\n\t\t\t\tnewShapes[ mainIdx ] = { s: new Shape(), p: tmpPoints };\n\t\t\t\tnewShapes[ mainIdx ].s.curves = tmpPath.curves;\n\n\t\t\t\tif ( holesFirst )\tmainIdx ++;\n\t\t\t\tnewShapeHoles[ mainIdx ] = [];\n\n\t\t\t\t//console.log('cw', i);\n\n\t\t\t} else {\n\n\t\t\t\tnewShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } );\n\n\t\t\t\t//console.log('ccw', i);\n\n\t\t\t}\n\n\t\t}\n\n\t\t// only Holes? -> probably all Shapes with wrong orientation\n\t\tif ( ! newShapes[ 0 ] )\treturn\ttoShapesNoHoles( subPaths );\n\n\n\t\tif ( newShapes.length > 1 ) {\n\n\t\t\tlet ambiguous = false;\n\t\t\tconst toChange = [];\n\n\t\t\tfor ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) {\n\n\t\t\t\tbetterShapeHoles[ sIdx ] = [];\n\n\t\t\t}\n\n\t\t\tfor ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) {\n\n\t\t\t\tconst sho = newShapeHoles[ sIdx ];\n\n\t\t\t\tfor ( let hIdx = 0; hIdx < sho.length; hIdx ++ ) {\n\n\t\t\t\t\tconst ho = sho[ hIdx ];\n\t\t\t\t\tlet hole_unassigned = true;\n\n\t\t\t\t\tfor ( let s2Idx = 0; s2Idx < newShapes.length; s2Idx ++ ) {\n\n\t\t\t\t\t\tif ( isPointInsidePolygon( ho.p, newShapes[ s2Idx ].p ) ) {\n\n\t\t\t\t\t\t\tif ( sIdx !== s2Idx )\ttoChange.push( { froms: sIdx, tos: s2Idx, hole: hIdx } );\n\t\t\t\t\t\t\tif ( hole_unassigned ) {\n\n\t\t\t\t\t\t\t\thole_unassigned = false;\n\t\t\t\t\t\t\t\tbetterShapeHoles[ s2Idx ].push( ho );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tambiguous = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hole_unassigned ) {\n\n\t\t\t\t\t\tbetterShapeHoles[ sIdx ].push( ho );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// console.log(\"ambiguous: \", ambiguous);\n\n\t\t\tif ( toChange.length > 0 ) {\n\n\t\t\t\t// console.log(\"to change: \", toChange);\n\t\t\t\tif ( ! ambiguous )\tnewShapeHoles = betterShapeHoles;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlet tmpHoles;\n\n\t\tfor ( let i = 0, il = newShapes.length; i < il; i ++ ) {\n\n\t\t\ttmpShape = newShapes[ i ].s;\n\t\t\tshapes.push( tmpShape );\n\t\t\ttmpHoles = newShapeHoles[ i ];\n\n\t\t\tfor ( let j = 0, jl = tmpHoles.length; j < jl; j ++ ) {\n\n\t\t\t\ttmpShape.holes.push( tmpHoles[ j ].h );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//console.log(\"shape\", shapes);\n\n\t\treturn shapes;\n\n\t}\n\n}\n\nclass Font {\n\n\tconstructor( data ) {\n\n\t\tthis.type = 'Font';\n\n\t\tthis.data = data;\n\n\t}\n\n\tgenerateShapes( text, size = 100 ) {\n\n\t\tconst shapes = [];\n\t\tconst paths = createPaths( text, size, this.data );\n\n\t\tfor ( let p = 0, pl = paths.length; p < pl; p ++ ) {\n\n\t\t\tArray.prototype.push.apply( shapes, paths[ p ].toShapes() );\n\n\t\t}\n\n\t\treturn shapes;\n\n\t}\n\n}\n\nfunction createPaths( text, size, data ) {\n\n\tconst chars = Array.from( text );\n\tconst scale = size / data.resolution;\n\tconst line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;\n\n\tconst paths = [];\n\n\tlet offsetX = 0, offsetY = 0;\n\n\tfor ( let i = 0; i < chars.length; i ++ ) {\n\n\t\tconst char = chars[ i ];\n\n\t\tif ( char === '\\n' ) {\n\n\t\t\toffsetX = 0;\n\t\t\toffsetY -= line_height;\n\n\t\t} else {\n\n\t\t\tconst ret = createPath( char, scale, offsetX, offsetY, data );\n\t\t\toffsetX += ret.offsetX;\n\t\t\tpaths.push( ret.path );\n\n\t\t}\n\n\t}\n\n\treturn paths;\n\n}\n\nfunction createPath( char, scale, offsetX, offsetY, data ) {\n\n\tconst glyph = data.glyphs[ char ] || data.glyphs[ '?' ];\n\n\tif ( ! glyph ) {\n\n\t\tconsole.error( 'THREE.Font: character \"' + char + '\" does not exists in font family ' + data.familyName + '.' );\n\n\t\treturn;\n\n\t}\n\n\tconst path = new ShapePath();\n\n\tlet x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2;\n\n\tif ( glyph.o ) {\n\n\t\tconst outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) );\n\n\t\tfor ( let i = 0, l = outline.length; i < l; ) {\n\n\t\t\tconst action = outline[ i ++ ];\n\n\t\t\tswitch ( action ) {\n\n\t\t\t\tcase 'm': // moveTo\n\n\t\t\t\t\tx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\ty = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.moveTo( x, y );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'l': // lineTo\n\n\t\t\t\t\tx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\ty = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.lineTo( x, y );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'q': // quadraticCurveTo\n\n\t\t\t\t\tcpx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx1 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy1 = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.quadraticCurveTo( cpx1, cpy1, cpx, cpy );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'b': // bezierCurveTo\n\n\t\t\t\t\tcpx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx1 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy1 = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx2 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy2 = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy );\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn { offsetX: glyph.ha * scale, path: path };\n\n}\n\nFont.prototype.isFont = true;\n\nclass FontLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\tlet json;\n\n\t\t\ttry {\n\n\t\t\t\tjson = JSON.parse( text );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tconsole.warn( 'THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead.' );\n\t\t\t\tjson = JSON.parse( text.substring( 65, text.length - 2 ) );\n\n\t\t\t}\n\n\t\t\tconst font = scope.parse( json );\n\n\t\t\tif ( onLoad ) onLoad( font );\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\treturn new Font( json );\n\n\t}\n\n}\n\nlet _context;\n\nconst AudioContext = {\n\n\tgetContext: function () {\n\n\t\tif ( _context === undefined ) {\n\n\t\t\t_context = new ( window.AudioContext || window.webkitAudioContext )();\n\n\t\t}\n\n\t\treturn _context;\n\n\t},\n\n\tsetContext: function ( value ) {\n\n\t\t_context = value;\n\n\t}\n\n};\n\nclass AudioLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( buffer ) {\n\n\t\t\ttry {\n\n\t\t\t\t// Create a copy of the buffer. The `decodeAudioData` method\n\t\t\t\t// detaches the buffer when complete, preventing reuse.\n\t\t\t\tconst bufferCopy = buffer.slice( 0 );\n\n\t\t\t\tconst context = AudioContext.getContext();\n\t\t\t\tcontext.decodeAudioData( bufferCopy, function ( audioBuffer ) {\n\n\t\t\t\t\tonLoad( audioBuffer );\n\n\t\t\t\t} );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n}\n\nclass HemisphereLightProbe extends LightProbe {\n\n\tconstructor( skyColor, groundColor, intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tconst color1 = new Color().set( skyColor );\n\t\tconst color2 = new Color().set( groundColor );\n\n\t\tconst sky = new Vector3( color1.r, color1.g, color1.b );\n\t\tconst ground = new Vector3( color2.r, color2.g, color2.b );\n\n\t\t// without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI );\n\t\tconst c0 = Math.sqrt( Math.PI );\n\t\tconst c1 = c0 * Math.sqrt( 0.75 );\n\n\t\tthis.sh.coefficients[ 0 ].copy( sky ).add( ground ).multiplyScalar( c0 );\n\t\tthis.sh.coefficients[ 1 ].copy( sky ).sub( ground ).multiplyScalar( c1 );\n\n\t}\n\n}\n\nHemisphereLightProbe.prototype.isHemisphereLightProbe = true;\n\nclass AmbientLightProbe extends LightProbe {\n\n\tconstructor( color, intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tconst color1 = new Color().set( color );\n\n\t\t// without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI );\n\t\tthis.sh.coefficients[ 0 ].set( color1.r, color1.g, color1.b ).multiplyScalar( 2 * Math.sqrt( Math.PI ) );\n\n\t}\n\n}\n\nAmbientLightProbe.prototype.isAmbientLightProbe = true;\n\nconst _eyeRight = /*@__PURE__*/ new Matrix4();\nconst _eyeLeft = /*@__PURE__*/ new Matrix4();\n\nclass StereoCamera {\n\n\tconstructor() {\n\n\t\tthis.type = 'StereoCamera';\n\n\t\tthis.aspect = 1;\n\n\t\tthis.eyeSep = 0.064;\n\n\t\tthis.cameraL = new PerspectiveCamera();\n\t\tthis.cameraL.layers.enable( 1 );\n\t\tthis.cameraL.matrixAutoUpdate = false;\n\n\t\tthis.cameraR = new PerspectiveCamera();\n\t\tthis.cameraR.layers.enable( 2 );\n\t\tthis.cameraR.matrixAutoUpdate = false;\n\n\t\tthis._cache = {\n\t\t\tfocus: null,\n\t\t\tfov: null,\n\t\t\taspect: null,\n\t\t\tnear: null,\n\t\t\tfar: null,\n\t\t\tzoom: null,\n\t\t\teyeSep: null\n\t\t};\n\n\t}\n\n\tupdate( camera ) {\n\n\t\tconst cache = this._cache;\n\n\t\tconst needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov ||\n\t\t\tcache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near ||\n\t\t\tcache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;\n\n\t\tif ( needsUpdate ) {\n\n\t\t\tcache.focus = camera.focus;\n\t\t\tcache.fov = camera.fov;\n\t\t\tcache.aspect = camera.aspect * this.aspect;\n\t\t\tcache.near = camera.near;\n\t\t\tcache.far = camera.far;\n\t\t\tcache.zoom = camera.zoom;\n\t\t\tcache.eyeSep = this.eyeSep;\n\n\t\t\t// Off-axis stereoscopic effect based on\n\t\t\t// http://paulbourke.net/stereographics/stereorender/\n\n\t\t\tconst projectionMatrix = camera.projectionMatrix.clone();\n\t\t\tconst eyeSepHalf = cache.eyeSep / 2;\n\t\t\tconst eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;\n\t\t\tconst ymax = ( cache.near * Math.tan( DEG2RAD * cache.fov * 0.5 ) ) / cache.zoom;\n\t\t\tlet xmin, xmax;\n\n\t\t\t// translate xOffset\n\n\t\t\t_eyeLeft.elements[ 12 ] = - eyeSepHalf;\n\t\t\t_eyeRight.elements[ 12 ] = eyeSepHalf;\n\n\t\t\t// for left eye\n\n\t\t\txmin = - ymax * cache.aspect + eyeSepOnProjection;\n\t\t\txmax = ymax * cache.aspect + eyeSepOnProjection;\n\n\t\t\tprojectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin );\n\t\t\tprojectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\tthis.cameraL.projectionMatrix.copy( projectionMatrix );\n\n\t\t\t// for right eye\n\n\t\t\txmin = - ymax * cache.aspect - eyeSepOnProjection;\n\t\t\txmax = ymax * cache.aspect - eyeSepOnProjection;\n\n\t\t\tprojectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin );\n\t\t\tprojectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\tthis.cameraR.projectionMatrix.copy( projectionMatrix );\n\n\t\t}\n\n\t\tthis.cameraL.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeLeft );\n\t\tthis.cameraR.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeRight );\n\n\t}\n\n}\n\nclass Clock {\n\n\tconstructor( autoStart = true ) {\n\n\t\tthis.autoStart = autoStart;\n\n\t\tthis.startTime = 0;\n\t\tthis.oldTime = 0;\n\t\tthis.elapsedTime = 0;\n\n\t\tthis.running = false;\n\n\t}\n\n\tstart() {\n\n\t\tthis.startTime = now();\n\n\t\tthis.oldTime = this.startTime;\n\t\tthis.elapsedTime = 0;\n\t\tthis.running = true;\n\n\t}\n\n\tstop() {\n\n\t\tthis.getElapsedTime();\n\t\tthis.running = false;\n\t\tthis.autoStart = false;\n\n\t}\n\n\tgetElapsedTime() {\n\n\t\tthis.getDelta();\n\t\treturn this.elapsedTime;\n\n\t}\n\n\tgetDelta() {\n\n\t\tlet diff = 0;\n\n\t\tif ( this.autoStart && ! this.running ) {\n\n\t\t\tthis.start();\n\t\t\treturn 0;\n\n\t\t}\n\n\t\tif ( this.running ) {\n\n\t\t\tconst newTime = now();\n\n\t\t\tdiff = ( newTime - this.oldTime ) / 1000;\n\t\t\tthis.oldTime = newTime;\n\n\t\t\tthis.elapsedTime += diff;\n\n\t\t}\n\n\t\treturn diff;\n\n\t}\n\n}\n\nfunction now() {\n\n\treturn ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732\n\n}\n\nconst _position$1 = /*@__PURE__*/ new Vector3();\nconst _quaternion$1 = /*@__PURE__*/ new Quaternion();\nconst _scale$1 = /*@__PURE__*/ new Vector3();\nconst _orientation$1 = /*@__PURE__*/ new Vector3();\n\nclass AudioListener extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'AudioListener';\n\n\t\tthis.context = AudioContext.getContext();\n\n\t\tthis.gain = this.context.createGain();\n\t\tthis.gain.connect( this.context.destination );\n\n\t\tthis.filter = null;\n\n\t\tthis.timeDelta = 0;\n\n\t\t// private\n\n\t\tthis._clock = new Clock();\n\n\t}\n\n\tgetInput() {\n\n\t\treturn this.gain;\n\n\t}\n\n\tremoveFilter() {\n\n\t\tif ( this.filter !== null ) {\n\n\t\t\tthis.gain.disconnect( this.filter );\n\t\t\tthis.filter.disconnect( this.context.destination );\n\t\t\tthis.gain.connect( this.context.destination );\n\t\t\tthis.filter = null;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetFilter() {\n\n\t\treturn this.filter;\n\n\t}\n\n\tsetFilter( value ) {\n\n\t\tif ( this.filter !== null ) {\n\n\t\t\tthis.gain.disconnect( this.filter );\n\t\t\tthis.filter.disconnect( this.context.destination );\n\n\t\t} else {\n\n\t\t\tthis.gain.disconnect( this.context.destination );\n\n\t\t}\n\n\t\tthis.filter = value;\n\t\tthis.gain.connect( this.filter );\n\t\tthis.filter.connect( this.context.destination );\n\n\t\treturn this;\n\n\t}\n\n\tgetMasterVolume() {\n\n\t\treturn this.gain.gain.value;\n\n\t}\n\n\tsetMasterVolume( value ) {\n\n\t\tthis.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );\n\n\t\treturn this;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tconst listener = this.context.listener;\n\t\tconst up = this.up;\n\n\t\tthis.timeDelta = this._clock.getDelta();\n\n\t\tthis.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 );\n\n\t\t_orientation$1.set( 0, 0, - 1 ).applyQuaternion( _quaternion$1 );\n\n\t\tif ( listener.positionX ) {\n\n\t\t\t// code path for Chrome (see #14393)\n\n\t\t\tconst endTime = this.context.currentTime + this.timeDelta;\n\n\t\t\tlistener.positionX.linearRampToValueAtTime( _position$1.x, endTime );\n\t\t\tlistener.positionY.linearRampToValueAtTime( _position$1.y, endTime );\n\t\t\tlistener.positionZ.linearRampToValueAtTime( _position$1.z, endTime );\n\t\t\tlistener.forwardX.linearRampToValueAtTime( _orientation$1.x, endTime );\n\t\t\tlistener.forwardY.linearRampToValueAtTime( _orientation$1.y, endTime );\n\t\t\tlistener.forwardZ.linearRampToValueAtTime( _orientation$1.z, endTime );\n\t\t\tlistener.upX.linearRampToValueAtTime( up.x, endTime );\n\t\t\tlistener.upY.linearRampToValueAtTime( up.y, endTime );\n\t\t\tlistener.upZ.linearRampToValueAtTime( up.z, endTime );\n\n\t\t} else {\n\n\t\t\tlistener.setPosition( _position$1.x, _position$1.y, _position$1.z );\n\t\t\tlistener.setOrientation( _orientation$1.x, _orientation$1.y, _orientation$1.z, up.x, up.y, up.z );\n\n\t\t}\n\n\t}\n\n}\n\nclass Audio extends Object3D {\n\n\tconstructor( listener ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Audio';\n\n\t\tthis.listener = listener;\n\t\tthis.context = listener.context;\n\n\t\tthis.gain = this.context.createGain();\n\t\tthis.gain.connect( listener.getInput() );\n\n\t\tthis.autoplay = false;\n\n\t\tthis.buffer = null;\n\t\tthis.detune = 0;\n\t\tthis.loop = false;\n\t\tthis.loopStart = 0;\n\t\tthis.loopEnd = 0;\n\t\tthis.offset = 0;\n\t\tthis.duration = undefined;\n\t\tthis.playbackRate = 1;\n\t\tthis.isPlaying = false;\n\t\tthis.hasPlaybackControl = true;\n\t\tthis.source = null;\n\t\tthis.sourceType = 'empty';\n\n\t\tthis._startedAt = 0;\n\t\tthis._progress = 0;\n\t\tthis._connected = false;\n\n\t\tthis.filters = [];\n\n\t}\n\n\tgetOutput() {\n\n\t\treturn this.gain;\n\n\t}\n\n\tsetNodeSource( audioNode ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'audioNode';\n\t\tthis.source = audioNode;\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetMediaElementSource( mediaElement ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'mediaNode';\n\t\tthis.source = this.context.createMediaElementSource( mediaElement );\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetMediaStreamSource( mediaStream ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'mediaStreamNode';\n\t\tthis.source = this.context.createMediaStreamSource( mediaStream );\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetBuffer( audioBuffer ) {\n\n\t\tthis.buffer = audioBuffer;\n\t\tthis.sourceType = 'buffer';\n\n\t\tif ( this.autoplay ) this.play();\n\n\t\treturn this;\n\n\t}\n\n\tplay( delay = 0 ) {\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: Audio is already playing.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis._startedAt = this.context.currentTime + delay;\n\n\t\tconst source = this.context.createBufferSource();\n\t\tsource.buffer = this.buffer;\n\t\tsource.loop = this.loop;\n\t\tsource.loopStart = this.loopStart;\n\t\tsource.loopEnd = this.loopEnd;\n\t\tsource.onended = this.onEnded.bind( this );\n\t\tsource.start( this._startedAt, this._progress + this.offset, this.duration );\n\n\t\tthis.isPlaying = true;\n\n\t\tthis.source = source;\n\n\t\tthis.setDetune( this.detune );\n\t\tthis.setPlaybackRate( this.playbackRate );\n\n\t\treturn this.connect();\n\n\t}\n\n\tpause() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\t// update current progress\n\n\t\t\tthis._progress += Math.max( this.context.currentTime - this._startedAt, 0 ) * this.playbackRate;\n\n\t\t\tif ( this.loop === true ) {\n\n\t\t\t\t// ensure _progress does not exceed duration with looped audios\n\n\t\t\t\tthis._progress = this._progress % ( this.duration || this.buffer.duration );\n\n\t\t\t}\n\n\t\t\tthis.source.stop();\n\t\t\tthis.source.onended = null;\n\n\t\t\tthis.isPlaying = false;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tstop() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis._progress = 0;\n\n\t\tthis.source.stop();\n\t\tthis.source.onended = null;\n\t\tthis.isPlaying = false;\n\n\t\treturn this;\n\n\t}\n\n\tconnect() {\n\n\t\tif ( this.filters.length > 0 ) {\n\n\t\t\tthis.source.connect( this.filters[ 0 ] );\n\n\t\t\tfor ( let i = 1, l = this.filters.length; i < l; i ++ ) {\n\n\t\t\t\tthis.filters[ i - 1 ].connect( this.filters[ i ] );\n\n\t\t\t}\n\n\t\t\tthis.filters[ this.filters.length - 1 ].connect( this.getOutput() );\n\n\t\t} else {\n\n\t\t\tthis.source.connect( this.getOutput() );\n\n\t\t}\n\n\t\tthis._connected = true;\n\n\t\treturn this;\n\n\t}\n\n\tdisconnect() {\n\n\t\tif ( this.filters.length > 0 ) {\n\n\t\t\tthis.source.disconnect( this.filters[ 0 ] );\n\n\t\t\tfor ( let i = 1, l = this.filters.length; i < l; i ++ ) {\n\n\t\t\t\tthis.filters[ i - 1 ].disconnect( this.filters[ i ] );\n\n\t\t\t}\n\n\t\t\tthis.filters[ this.filters.length - 1 ].disconnect( this.getOutput() );\n\n\t\t} else {\n\n\t\t\tthis.source.disconnect( this.getOutput() );\n\n\t\t}\n\n\t\tthis._connected = false;\n\n\t\treturn this;\n\n\t}\n\n\tgetFilters() {\n\n\t\treturn this.filters;\n\n\t}\n\n\tsetFilters( value ) {\n\n\t\tif ( ! value ) value = [];\n\n\t\tif ( this._connected === true ) {\n\n\t\t\tthis.disconnect();\n\t\t\tthis.filters = value.slice();\n\t\t\tthis.connect();\n\n\t\t} else {\n\n\t\t\tthis.filters = value.slice();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetDetune( value ) {\n\n\t\tthis.detune = value;\n\n\t\tif ( this.source.detune === undefined ) return; // only set detune when available\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.detune.setTargetAtTime( this.detune, this.context.currentTime, 0.01 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetDetune() {\n\n\t\treturn this.detune;\n\n\t}\n\n\tgetFilter() {\n\n\t\treturn this.getFilters()[ 0 ];\n\n\t}\n\n\tsetFilter( filter ) {\n\n\t\treturn this.setFilters( filter ? [ filter ] : [] );\n\n\t}\n\n\tsetPlaybackRate( value ) {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.playbackRate = value;\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.playbackRate.setTargetAtTime( this.playbackRate, this.context.currentTime, 0.01 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetPlaybackRate() {\n\n\t\treturn this.playbackRate;\n\n\t}\n\n\tonEnded() {\n\n\t\tthis.isPlaying = false;\n\n\t}\n\n\tgetLoop() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn false;\n\n\t\t}\n\n\t\treturn this.loop;\n\n\t}\n\n\tsetLoop( value ) {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.loop = value;\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.loop = this.loop;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetLoopStart( value ) {\n\n\t\tthis.loopStart = value;\n\n\t\treturn this;\n\n\t}\n\n\tsetLoopEnd( value ) {\n\n\t\tthis.loopEnd = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetVolume() {\n\n\t\treturn this.gain.gain.value;\n\n\t}\n\n\tsetVolume( value ) {\n\n\t\tthis.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _position = /*@__PURE__*/ new Vector3();\nconst _quaternion = /*@__PURE__*/ new Quaternion();\nconst _scale = /*@__PURE__*/ new Vector3();\nconst _orientation = /*@__PURE__*/ new Vector3();\n\nclass PositionalAudio extends Audio {\n\n\tconstructor( listener ) {\n\n\t\tsuper( listener );\n\n\t\tthis.panner = this.context.createPanner();\n\t\tthis.panner.panningModel = 'HRTF';\n\t\tthis.panner.connect( this.gain );\n\n\t}\n\n\tgetOutput() {\n\n\t\treturn this.panner;\n\n\t}\n\n\tgetRefDistance() {\n\n\t\treturn this.panner.refDistance;\n\n\t}\n\n\tsetRefDistance( value ) {\n\n\t\tthis.panner.refDistance = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetRolloffFactor() {\n\n\t\treturn this.panner.rolloffFactor;\n\n\t}\n\n\tsetRolloffFactor( value ) {\n\n\t\tthis.panner.rolloffFactor = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetDistanceModel() {\n\n\t\treturn this.panner.distanceModel;\n\n\t}\n\n\tsetDistanceModel( value ) {\n\n\t\tthis.panner.distanceModel = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetMaxDistance() {\n\n\t\treturn this.panner.maxDistance;\n\n\t}\n\n\tsetMaxDistance( value ) {\n\n\t\tthis.panner.maxDistance = value;\n\n\t\treturn this;\n\n\t}\n\n\tsetDirectionalCone( coneInnerAngle, coneOuterAngle, coneOuterGain ) {\n\n\t\tthis.panner.coneInnerAngle = coneInnerAngle;\n\t\tthis.panner.coneOuterAngle = coneOuterAngle;\n\t\tthis.panner.coneOuterGain = coneOuterGain;\n\n\t\treturn this;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tif ( this.hasPlaybackControl === true && this.isPlaying === false ) return;\n\n\t\tthis.matrixWorld.decompose( _position, _quaternion, _scale );\n\n\t\t_orientation.set( 0, 0, 1 ).applyQuaternion( _quaternion );\n\n\t\tconst panner = this.panner;\n\n\t\tif ( panner.positionX ) {\n\n\t\t\t// code path for Chrome and Firefox (see #14393)\n\n\t\t\tconst endTime = this.context.currentTime + this.listener.timeDelta;\n\n\t\t\tpanner.positionX.linearRampToValueAtTime( _position.x, endTime );\n\t\t\tpanner.positionY.linearRampToValueAtTime( _position.y, endTime );\n\t\t\tpanner.positionZ.linearRampToValueAtTime( _position.z, endTime );\n\t\t\tpanner.orientationX.linearRampToValueAtTime( _orientation.x, endTime );\n\t\t\tpanner.orientationY.linearRampToValueAtTime( _orientation.y, endTime );\n\t\t\tpanner.orientationZ.linearRampToValueAtTime( _orientation.z, endTime );\n\n\t\t} else {\n\n\t\t\tpanner.setPosition( _position.x, _position.y, _position.z );\n\t\t\tpanner.setOrientation( _orientation.x, _orientation.y, _orientation.z );\n\n\t\t}\n\n\t}\n\n}\n\nclass AudioAnalyser {\n\n\tconstructor( audio, fftSize = 2048 ) {\n\n\t\tthis.analyser = audio.context.createAnalyser();\n\t\tthis.analyser.fftSize = fftSize;\n\n\t\tthis.data = new Uint8Array( this.analyser.frequencyBinCount );\n\n\t\taudio.getOutput().connect( this.analyser );\n\n\t}\n\n\n\tgetFrequencyData() {\n\n\t\tthis.analyser.getByteFrequencyData( this.data );\n\n\t\treturn this.data;\n\n\t}\n\n\tgetAverageFrequency() {\n\n\t\tlet value = 0;\n\t\tconst data = this.getFrequencyData();\n\n\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\tvalue += data[ i ];\n\n\t\t}\n\n\t\treturn value / data.length;\n\n\t}\n\n}\n\nclass PropertyMixer {\n\n\tconstructor( binding, typeName, valueSize ) {\n\n\t\tthis.binding = binding;\n\t\tthis.valueSize = valueSize;\n\n\t\tlet mixFunction,\n\t\t\tmixFunctionAdditive,\n\t\t\tsetIdentity;\n\n\t\t// buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ]\n\t\t//\n\t\t// interpolators can use .buffer as their .result\n\t\t// the data then goes to 'incoming'\n\t\t//\n\t\t// 'accu0' and 'accu1' are used frame-interleaved for\n\t\t// the cumulative result and are compared to detect\n\t\t// changes\n\t\t//\n\t\t// 'orig' stores the original state of the property\n\t\t//\n\t\t// 'add' is used for additive cumulative results\n\t\t//\n\t\t// 'work' is optional and is only present for quaternion types. It is used\n\t\t// to store intermediate quaternion multiplication results\n\n\t\tswitch ( typeName ) {\n\n\t\t\tcase 'quaternion':\n\t\t\t\tmixFunction = this._slerp;\n\t\t\t\tmixFunctionAdditive = this._slerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityQuaternion;\n\n\t\t\t\tthis.buffer = new Float64Array( valueSize * 6 );\n\t\t\t\tthis._workIndex = 5;\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\tcase 'bool':\n\t\t\t\tmixFunction = this._select;\n\n\t\t\t\t// Use the regular mix function and for additive on these types,\n\t\t\t\t// additive is not relevant for non-numeric types\n\t\t\t\tmixFunctionAdditive = this._select;\n\n\t\t\t\tsetIdentity = this._setAdditiveIdentityOther;\n\n\t\t\t\tthis.buffer = new Array( valueSize * 5 );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tmixFunction = this._lerp;\n\t\t\t\tmixFunctionAdditive = this._lerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityNumeric;\n\n\t\t\t\tthis.buffer = new Float64Array( valueSize * 5 );\n\n\t\t}\n\n\t\tthis._mixBufferRegion = mixFunction;\n\t\tthis._mixBufferRegionAdditive = mixFunctionAdditive;\n\t\tthis._setIdentity = setIdentity;\n\t\tthis._origIndex = 3;\n\t\tthis._addIndex = 4;\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\tthis.useCount = 0;\n\t\tthis.referenceCount = 0;\n\n\t}\n\n\t// accumulate data in the 'incoming' region into 'accu<i>'\n\taccumulate( accuIndex, weight ) {\n\n\t\t// note: happily accumulating nothing when weight = 0, the caller knows\n\t\t// the weight and shouldn't have made the call in the first place\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = accuIndex * stride + stride;\n\n\t\tlet currentWeight = this.cumulativeWeight;\n\n\t\tif ( currentWeight === 0 ) {\n\n\t\t\t// accuN := incoming * weight\n\n\t\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\t\tbuffer[ offset + i ] = buffer[ i ];\n\n\t\t\t}\n\n\t\t\tcurrentWeight = weight;\n\n\t\t} else {\n\n\t\t\t// accuN := accuN + incoming * weight\n\n\t\t\tcurrentWeight += weight;\n\t\t\tconst mix = weight / currentWeight;\n\t\t\tthis._mixBufferRegion( buffer, offset, 0, mix, stride );\n\n\t\t}\n\n\t\tthis.cumulativeWeight = currentWeight;\n\n\t}\n\n\t// accumulate data in the 'incoming' region into 'add'\n\taccumulateAdditive( weight ) {\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = stride * this._addIndex;\n\n\t\tif ( this.cumulativeWeightAdditive === 0 ) {\n\n\t\t\t// add = identity\n\n\t\t\tthis._setIdentity();\n\n\t\t}\n\n\t\t// add := add + incoming * weight\n\n\t\tthis._mixBufferRegionAdditive( buffer, offset, 0, weight, stride );\n\t\tthis.cumulativeWeightAdditive += weight;\n\n\t}\n\n\t// apply the state of 'accu<i>' to the binding when accus differ\n\tapply( accuIndex ) {\n\n\t\tconst stride = this.valueSize,\n\t\t\tbuffer = this.buffer,\n\t\t\toffset = accuIndex * stride + stride,\n\n\t\t\tweight = this.cumulativeWeight,\n\t\t\tweightAdditive = this.cumulativeWeightAdditive,\n\n\t\t\tbinding = this.binding;\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\tif ( weight < 1 ) {\n\n\t\t\t// accuN := accuN + original * ( 1 - cumulativeWeight )\n\n\t\t\tconst originalValueOffset = stride * this._origIndex;\n\n\t\t\tthis._mixBufferRegion(\n\t\t\t\tbuffer, offset, originalValueOffset, 1 - weight, stride );\n\n\t\t}\n\n\t\tif ( weightAdditive > 0 ) {\n\n\t\t\t// accuN := accuN + additive accuN\n\n\t\t\tthis._mixBufferRegionAdditive( buffer, offset, this._addIndex * stride, 1, stride );\n\n\t\t}\n\n\t\tfor ( let i = stride, e = stride + stride; i !== e; ++ i ) {\n\n\t\t\tif ( buffer[ i ] !== buffer[ i + stride ] ) {\n\n\t\t\t\t// value has changed -> update scene graph\n\n\t\t\t\tbinding.setValue( buffer, offset );\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// remember the state of the bound property and copy it to both accus\n\tsaveOriginalState() {\n\n\t\tconst binding = this.binding;\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\n\t\t\toriginalValueOffset = stride * this._origIndex;\n\n\t\tbinding.getValue( buffer, originalValueOffset );\n\n\t\t// accu[0..1] := orig -- initially detect changes against the original\n\t\tfor ( let i = stride, e = originalValueOffset; i !== e; ++ i ) {\n\n\t\t\tbuffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ];\n\n\t\t}\n\n\t\t// Add to identity for additive\n\t\tthis._setIdentity();\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t}\n\n\t// apply the state previously taken via 'saveOriginalState' to the binding\n\trestoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis.binding.setValue( this.buffer, originalValueOffset );\n\n\t}\n\n\t_setAdditiveIdentityNumeric() {\n\n\t\tconst startIndex = this._addIndex * this.valueSize;\n\t\tconst endIndex = startIndex + this.valueSize;\n\n\t\tfor ( let i = startIndex; i < endIndex; i ++ ) {\n\n\t\t\tthis.buffer[ i ] = 0;\n\n\t\t}\n\n\t}\n\n\t_setAdditiveIdentityQuaternion() {\n\n\t\tthis._setAdditiveIdentityNumeric();\n\t\tthis.buffer[ this._addIndex * this.valueSize + 3 ] = 1;\n\n\t}\n\n\t_setAdditiveIdentityOther() {\n\n\t\tconst startIndex = this._origIndex * this.valueSize;\n\t\tconst targetIndex = this._addIndex * this.valueSize;\n\n\t\tfor ( let i = 0; i < this.valueSize; i ++ ) {\n\n\t\t\tthis.buffer[ targetIndex + i ] = this.buffer[ startIndex + i ];\n\n\t\t}\n\n\t}\n\n\n\t// mix functions\n\n\t_select( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tif ( t >= 0.5 ) {\n\n\t\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\t\tbuffer[ dstOffset + i ] = buffer[ srcOffset + i ];\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_slerp( buffer, dstOffset, srcOffset, t ) {\n\n\t\tQuaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t );\n\n\t}\n\n\t_slerpAdditive( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tconst workOffset = this._workIndex * stride;\n\n\t\t// Store result in intermediate buffer offset\n\t\tQuaternion.multiplyQuaternionsFlat( buffer, workOffset, buffer, dstOffset, buffer, srcOffset );\n\n\t\t// Slerp to the intermediate result\n\t\tQuaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t );\n\n\t}\n\n\t_lerp( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tconst s = 1 - t;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tconst j = dstOffset + i;\n\n\t\t\tbuffer[ j ] = buffer[ j ] * s + buffer[ srcOffset + i ] * t;\n\n\t\t}\n\n\t}\n\n\t_lerpAdditive( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tconst j = dstOffset + i;\n\n\t\t\tbuffer[ j ] = buffer[ j ] + buffer[ srcOffset + i ] * t;\n\n\t\t}\n\n\t}\n\n}\n\n// Characters [].:/ are reserved for track binding syntax.\nconst _RESERVED_CHARS_RE = '\\\\[\\\\]\\\\.:\\\\/';\nconst _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' );\n\n// Attempts to allow node names from any language. ES5's `\\w` regexp matches\n// only latin characters, and the unicode \\p{L} is not yet supported. So\n// instead, we exclude reserved characters and match everything else.\nconst _wordChar = '[^' + _RESERVED_CHARS_RE + ']';\nconst _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace( '\\\\.', '' ) + ']';\n\n// Parent directories, delimited by '/' or ':'. Currently unused, but must\n// be matched to parse the rest of the track name.\nconst _directoryRe = /((?:WC+[\\/:])*)/.source.replace( 'WC', _wordChar );\n\n// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.\nconst _nodeRe = /(WCOD+)?/.source.replace( 'WCOD', _wordCharOrDot );\n\n// Object on target node, and accessor. May not contain reserved\n// characters. Accessor may contain any character except closing bracket.\nconst _objectRe = /(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace( 'WC', _wordChar );\n\n// Property and accessor. May not contain reserved characters. Accessor may\n// contain any non-bracket characters.\nconst _propertyRe = /\\.(WC+)(?:\\[(.+)\\])?/.source.replace( 'WC', _wordChar );\n\nconst _trackRe = new RegExp( ''\n\t+ '^'\n\t+ _directoryRe\n\t+ _nodeRe\n\t+ _objectRe\n\t+ _propertyRe\n\t+ '$'\n);\n\nconst _supportedObjectNames = [ 'material', 'materials', 'bones' ];\n\nclass Composite {\n\n\tconstructor( targetGroup, path, optionalParsedPath ) {\n\n\t\tconst parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path );\n\n\t\tthis._targetGroup = targetGroup;\n\t\tthis._bindings = targetGroup.subscribe_( path, parsedPath );\n\n\t}\n\n\tgetValue( array, offset ) {\n\n\t\tthis.bind(); // bind all binding\n\n\t\tconst firstValidIndex = this._targetGroup.nCachedObjects_,\n\t\t\tbinding = this._bindings[ firstValidIndex ];\n\n\t\t// and only call .getValue on the first\n\t\tif ( binding !== undefined ) binding.getValue( array, offset );\n\n\t}\n\n\tsetValue( array, offset ) {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].setValue( array, offset );\n\n\t\t}\n\n\t}\n\n\tbind() {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].bind();\n\n\t\t}\n\n\t}\n\n\tunbind() {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].unbind();\n\n\t\t}\n\n\t}\n\n}\n\n// Note: This class uses a State pattern on a per-method basis:\n// 'bind' sets 'this.getValue' / 'setValue' and shadows the\n// prototype version of these methods with one that represents\n// the bound state. When the property is not found, the methods\n// become no-ops.\nclass PropertyBinding {\n\n\tconstructor( rootNode, path, parsedPath ) {\n\n\t\tthis.path = path;\n\t\tthis.parsedPath = parsedPath || PropertyBinding.parseTrackName( path );\n\n\t\tthis.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName ) || rootNode;\n\n\t\tthis.rootNode = rootNode;\n\n\t\t// initial state of these methods that calls 'bind'\n\t\tthis.getValue = this._getValue_unbound;\n\t\tthis.setValue = this._setValue_unbound;\n\n\t}\n\n\n\tstatic create( root, path, parsedPath ) {\n\n\t\tif ( ! ( root && root.isAnimationObjectGroup ) ) {\n\n\t\t\treturn new PropertyBinding( root, path, parsedPath );\n\n\t\t} else {\n\n\t\t\treturn new PropertyBinding.Composite( root, path, parsedPath );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Replaces spaces with underscores and removes unsupported characters from\n\t * node names, to ensure compatibility with parseTrackName().\n\t *\n\t * @param {string} name Node name to be sanitized.\n\t * @return {string}\n\t */\n\tstatic sanitizeNodeName( name ) {\n\n\t\treturn name.replace( /\\s/g, '_' ).replace( _reservedRe, '' );\n\n\t}\n\n\tstatic parseTrackName( trackName ) {\n\n\t\tconst matches = _trackRe.exec( trackName );\n\n\t\tif ( ! matches ) {\n\n\t\t\tthrow new Error( 'PropertyBinding: Cannot parse trackName: ' + trackName );\n\n\t\t}\n\n\t\tconst results = {\n\t\t\t// directoryName: matches[ 1 ], // (tschw) currently unused\n\t\t\tnodeName: matches[ 2 ],\n\t\t\tobjectName: matches[ 3 ],\n\t\t\tobjectIndex: matches[ 4 ],\n\t\t\tpropertyName: matches[ 5 ], // required\n\t\t\tpropertyIndex: matches[ 6 ]\n\t\t};\n\n\t\tconst lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' );\n\n\t\tif ( lastDot !== undefined && lastDot !== - 1 ) {\n\n\t\t\tconst objectName = results.nodeName.substring( lastDot + 1 );\n\n\t\t\t// Object names must be checked against an allowlist. Otherwise, there\n\t\t\t// is no way to parse 'foo.bar.baz': 'baz' must be a property, but\n\t\t\t// 'bar' could be the objectName, or part of a nodeName (which can\n\t\t\t// include '.' characters).\n\t\t\tif ( _supportedObjectNames.indexOf( objectName ) !== - 1 ) {\n\n\t\t\t\tresults.nodeName = results.nodeName.substring( 0, lastDot );\n\t\t\t\tresults.objectName = objectName;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( results.propertyName === null || results.propertyName.length === 0 ) {\n\n\t\t\tthrow new Error( 'PropertyBinding: can not parse propertyName from trackName: ' + trackName );\n\n\t\t}\n\n\t\treturn results;\n\n\t}\n\n\tstatic findNode( root, nodeName ) {\n\n\t\tif ( ! nodeName || nodeName === '' || nodeName === '.' || nodeName === - 1 || nodeName === root.name || nodeName === root.uuid ) {\n\n\t\t\treturn root;\n\n\t\t}\n\n\t\t// search into skeleton bones.\n\t\tif ( root.skeleton ) {\n\n\t\t\tconst bone = root.skeleton.getBoneByName( nodeName );\n\n\t\t\tif ( bone !== undefined ) {\n\n\t\t\t\treturn bone;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// search into node subtree.\n\t\tif ( root.children ) {\n\n\t\t\tconst searchNodeSubtree = function ( children ) {\n\n\t\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\t\tconst childNode = children[ i ];\n\n\t\t\t\t\tif ( childNode.name === nodeName || childNode.uuid === nodeName ) {\n\n\t\t\t\t\t\treturn childNode;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst result = searchNodeSubtree( childNode.children );\n\n\t\t\t\t\tif ( result ) return result;\n\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\n\t\t\t};\n\n\t\t\tconst subTreeNode = searchNodeSubtree( root.children );\n\n\t\t\tif ( subTreeNode ) {\n\n\t\t\t\treturn subTreeNode;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\t// these are used to \"bind\" a nonexistent property\n\t_getValue_unavailable() {}\n\t_setValue_unavailable() {}\n\n\t// Getters\n\n\t_getValue_direct( buffer, offset ) {\n\n\t\tbuffer[ offset ] = this.node[ this.propertyName ];\n\n\t}\n\n\t_getValue_array( buffer, offset ) {\n\n\t\tconst source = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = source.length; i !== n; ++ i ) {\n\n\t\t\tbuffer[ offset ++ ] = source[ i ];\n\n\t\t}\n\n\t}\n\n\t_getValue_arrayElement( buffer, offset ) {\n\n\t\tbuffer[ offset ] = this.resolvedProperty[ this.propertyIndex ];\n\n\t}\n\n\t_getValue_toArray( buffer, offset ) {\n\n\t\tthis.resolvedProperty.toArray( buffer, offset );\n\n\t}\n\n\t// Direct\n\n\t_setValue_direct( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\n\t}\n\n\t_setValue_direct_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_direct_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// EntireArray\n\n\t_setValue_array( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t}\n\n\t_setValue_array_setNeedsUpdate( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_array_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// ArrayElement\n\n\t_setValue_arrayElement( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\n\t}\n\n\t_setValue_arrayElement_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_arrayElement_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// HasToFromArray\n\n\t_setValue_fromArray( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\n\t}\n\n\t_setValue_fromArray_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_fromArray_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t_getValue_unbound( targetArray, offset ) {\n\n\t\tthis.bind();\n\t\tthis.getValue( targetArray, offset );\n\n\t}\n\n\t_setValue_unbound( sourceArray, offset ) {\n\n\t\tthis.bind();\n\t\tthis.setValue( sourceArray, offset );\n\n\t}\n\n\t// create getter / setter pair for a property in the scene graph\n\tbind() {\n\n\t\tlet targetObject = this.node;\n\t\tconst parsedPath = this.parsedPath;\n\n\t\tconst objectName = parsedPath.objectName;\n\t\tconst propertyName = parsedPath.propertyName;\n\t\tlet propertyIndex = parsedPath.propertyIndex;\n\n\t\tif ( ! targetObject ) {\n\n\t\t\ttargetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName ) || this.rootNode;\n\n\t\t\tthis.node = targetObject;\n\n\t\t}\n\n\t\t// set fail state so we can just 'return' on error\n\t\tthis.getValue = this._getValue_unavailable;\n\t\tthis.setValue = this._setValue_unavailable;\n\n\t\t// ensure there is a value node\n\t\tif ( ! targetObject ) {\n\n\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to update node for track: ' + this.path + ' but it wasn\\'t found.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( objectName ) {\n\n\t\t\tlet objectIndex = parsedPath.objectIndex;\n\n\t\t\t// special cases were we need to reach deeper into the hierarchy to get the face materials....\n\t\t\tswitch ( objectName ) {\n\n\t\t\t\tcase 'materials':\n\n\t\t\t\t\tif ( ! targetObject.material ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! targetObject.material.materials ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject.material.materials;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'bones':\n\n\t\t\t\t\tif ( ! targetObject.skeleton ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// potential future optimization: skip this if propertyIndex is already an integer\n\t\t\t\t\t// and convert the integer string to a true integer.\n\n\t\t\t\t\ttargetObject = targetObject.skeleton.bones;\n\n\t\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\t\tfor ( let i = 0; i < targetObject.length; i ++ ) {\n\n\t\t\t\t\t\tif ( targetObject[ i ].name === objectIndex ) {\n\n\t\t\t\t\t\t\tobjectIndex = i;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tif ( targetObject[ objectName ] === undefined ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject[ objectName ];\n\n\t\t\t}\n\n\n\t\t\tif ( objectIndex !== undefined ) {\n\n\t\t\t\tif ( targetObject[ objectIndex ] === undefined ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\ttargetObject = targetObject[ objectIndex ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// resolve property\n\t\tconst nodeProperty = targetObject[ propertyName ];\n\n\t\tif ( nodeProperty === undefined ) {\n\n\t\t\tconst nodeName = parsedPath.nodeName;\n\n\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName +\n\t\t\t\t'.' + propertyName + ' but it wasn\\'t found.', targetObject );\n\t\t\treturn;\n\n\t\t}\n\n\t\t// determine versioning scheme\n\t\tlet versioning = this.Versioning.None;\n\n\t\tthis.targetObject = targetObject;\n\n\t\tif ( targetObject.needsUpdate !== undefined ) { // material\n\n\t\t\tversioning = this.Versioning.NeedsUpdate;\n\n\t\t} else if ( targetObject.matrixWorldNeedsUpdate !== undefined ) { // node transform\n\n\t\t\tversioning = this.Versioning.MatrixWorldNeedsUpdate;\n\n\t\t}\n\n\t\t// determine how the property gets bound\n\t\tlet bindingType = this.BindingType.Direct;\n\n\t\tif ( propertyIndex !== undefined ) {\n\n\t\t\t// access a sub element of the property array (only primitives are supported right now)\n\n\t\t\tif ( propertyName === 'morphTargetInfluences' ) {\n\n\t\t\t\t// potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer.\n\n\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\tif ( ! targetObject.geometry ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tif ( targetObject.geometry.isBufferGeometry ) {\n\n\t\t\t\t\tif ( ! targetObject.geometry.morphAttributes ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( targetObject.morphTargetDictionary[ propertyIndex ] !== undefined ) {\n\n\t\t\t\t\t\tpropertyIndex = targetObject.morphTargetDictionary[ propertyIndex ];\n\n\t\t\t\t\t}\n\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.', this );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbindingType = this.BindingType.ArrayElement;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\tthis.propertyIndex = propertyIndex;\n\n\t\t} else if ( nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined ) {\n\n\t\t\t// must use copy for Object3D.Euler/Quaternion\n\n\t\t\tbindingType = this.BindingType.HasFromToArray;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\n\t\t} else if ( Array.isArray( nodeProperty ) ) {\n\n\t\t\tbindingType = this.BindingType.EntireArray;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\n\t\t} else {\n\n\t\t\tthis.propertyName = propertyName;\n\n\t\t}\n\n\t\t// select getter / setter\n\t\tthis.getValue = this.GetterByBindingType[ bindingType ];\n\t\tthis.setValue = this.SetterByBindingTypeAndVersioning[ bindingType ][ versioning ];\n\n\t}\n\n\tunbind() {\n\n\t\tthis.node = null;\n\n\t\t// back to the prototype version of getValue / setValue\n\t\t// note: avoiding to mutate the shape of 'this' via 'delete'\n\t\tthis.getValue = this._getValue_unbound;\n\t\tthis.setValue = this._setValue_unbound;\n\n\t}\n\n}\n\nPropertyBinding.Composite = Composite;\n\nPropertyBinding.prototype.BindingType = {\n\tDirect: 0,\n\tEntireArray: 1,\n\tArrayElement: 2,\n\tHasFromToArray: 3\n};\n\nPropertyBinding.prototype.Versioning = {\n\tNone: 0,\n\tNeedsUpdate: 1,\n\tMatrixWorldNeedsUpdate: 2\n};\n\nPropertyBinding.prototype.GetterByBindingType = [\n\n\tPropertyBinding.prototype._getValue_direct,\n\tPropertyBinding.prototype._getValue_array,\n\tPropertyBinding.prototype._getValue_arrayElement,\n\tPropertyBinding.prototype._getValue_toArray,\n\n];\n\nPropertyBinding.prototype.SetterByBindingTypeAndVersioning = [\n\n\t[\n\t\t// Direct\n\t\tPropertyBinding.prototype._setValue_direct,\n\t\tPropertyBinding.prototype._setValue_direct_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// EntireArray\n\n\t\tPropertyBinding.prototype._setValue_array,\n\t\tPropertyBinding.prototype._setValue_array_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// ArrayElement\n\t\tPropertyBinding.prototype._setValue_arrayElement,\n\t\tPropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// HasToFromArray\n\t\tPropertyBinding.prototype._setValue_fromArray,\n\t\tPropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate,\n\n\t]\n\n];\n\n/**\n *\n * A group of objects that receives a shared animation state.\n *\n * Usage:\n *\n * - Add objects you would otherwise pass as 'root' to the\n * constructor or the .clipAction method of AnimationMixer.\n *\n * - Instead pass this object as 'root'.\n *\n * - You can also add and remove objects later when the mixer\n * is running.\n *\n * Note:\n *\n * Objects of this class appear as one object to the mixer,\n * so cache control of the individual objects must be done\n * on the group.\n *\n * Limitation:\n *\n * - The animated properties must be compatible among the\n * all objects in the group.\n *\n * - A single property can either be controlled through a\n * target group or directly, but not both.\n */\n\nclass AnimationObjectGroup {\n\n\tconstructor() {\n\n\t\tthis.uuid = generateUUID();\n\n\t\t// cached objects followed by the active ones\n\t\tthis._objects = Array.prototype.slice.call( arguments );\n\n\t\tthis.nCachedObjects_ = 0; // threshold\n\t\t// note: read by PropertyBinding.Composite\n\n\t\tconst indices = {};\n\t\tthis._indicesByUUID = indices; // for bookkeeping\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tindices[ arguments[ i ].uuid ] = i;\n\n\t\t}\n\n\t\tthis._paths = []; // inside: string\n\t\tthis._parsedPaths = []; // inside: { we don't care, here }\n\t\tthis._bindings = []; // inside: Array< PropertyBinding >\n\t\tthis._bindingsIndicesByPath = {}; // inside: indices in these arrays\n\n\t\tconst scope = this;\n\n\t\tthis.stats = {\n\n\t\t\tobjects: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._objects.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn this.total - scope.nCachedObjects_;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tget bindingsPerObject() {\n\n\t\t\t\treturn scope._bindings.length;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tadd() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tpaths = this._paths,\n\t\t\tparsedPaths = this._parsedPaths,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet knownObject = undefined,\n\t\t\tnObjects = objects.length,\n\t\t\tnCachedObjects = this.nCachedObjects_;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid;\n\t\t\tlet index = indicesByUUID[ uuid ];\n\n\t\t\tif ( index === undefined ) {\n\n\t\t\t\t// unknown object -> add it to the ACTIVE region\n\n\t\t\t\tindex = nObjects ++;\n\t\t\t\tindicesByUUID[ uuid ] = index;\n\t\t\t\tobjects.push( object );\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tbindings[ j ].push( new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ) );\n\n\t\t\t\t}\n\n\t\t\t} else if ( index < nCachedObjects ) {\n\n\t\t\t\tknownObject = objects[ index ];\n\n\t\t\t\t// move existing object to the ACTIVE region\n\n\t\t\t\tconst firstActiveIndex = -- nCachedObjects,\n\t\t\t\t\tlastCachedObject = objects[ firstActiveIndex ];\n\n\t\t\t\tindicesByUUID[ lastCachedObject.uuid ] = index;\n\t\t\t\tobjects[ index ] = lastCachedObject;\n\n\t\t\t\tindicesByUUID[ uuid ] = firstActiveIndex;\n\t\t\t\tobjects[ firstActiveIndex ] = object;\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\tlastCached = bindingsForPath[ firstActiveIndex ];\n\n\t\t\t\t\tlet binding = bindingsForPath[ index ];\n\n\t\t\t\t\tbindingsForPath[ index ] = lastCached;\n\n\t\t\t\t\tif ( binding === undefined ) {\n\n\t\t\t\t\t\t// since we do not bother to create new bindings\n\t\t\t\t\t\t// for objects that are cached, the binding may\n\t\t\t\t\t\t// or may not exist\n\n\t\t\t\t\t\tbinding = new PropertyBinding( object, paths[ j ], parsedPaths[ j ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbindingsForPath[ firstActiveIndex ] = binding;\n\n\t\t\t\t}\n\n\t\t\t} else if ( objects[ index ] !== knownObject ) {\n\n\t\t\t\tconsole.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' +\n\t\t\t\t\t'detected. Clean the caches or recreate your infrastructure when reloading scenes.' );\n\n\t\t\t} // else the object is already where we want it to be\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\tremove() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet nCachedObjects = this.nCachedObjects_;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid,\n\t\t\t\tindex = indicesByUUID[ uuid ];\n\n\t\t\tif ( index !== undefined && index >= nCachedObjects ) {\n\n\t\t\t\t// move existing object into the CACHED region\n\n\t\t\t\tconst lastCachedIndex = nCachedObjects ++,\n\t\t\t\t\tfirstActiveObject = objects[ lastCachedIndex ];\n\n\t\t\t\tindicesByUUID[ firstActiveObject.uuid ] = index;\n\t\t\t\tobjects[ index ] = firstActiveObject;\n\n\t\t\t\tindicesByUUID[ uuid ] = lastCachedIndex;\n\t\t\t\tobjects[ lastCachedIndex ] = object;\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\tfirstActive = bindingsForPath[ lastCachedIndex ],\n\t\t\t\t\t\tbinding = bindingsForPath[ index ];\n\n\t\t\t\t\tbindingsForPath[ index ] = firstActive;\n\t\t\t\t\tbindingsForPath[ lastCachedIndex ] = binding;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\t// remove & forget\n\tuncache() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet nCachedObjects = this.nCachedObjects_,\n\t\t\tnObjects = objects.length;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid,\n\t\t\t\tindex = indicesByUUID[ uuid ];\n\n\t\t\tif ( index !== undefined ) {\n\n\t\t\t\tdelete indicesByUUID[ uuid ];\n\n\t\t\t\tif ( index < nCachedObjects ) {\n\n\t\t\t\t\t// object is cached, shrink the CACHED region\n\n\t\t\t\t\tconst firstActiveIndex = -- nCachedObjects,\n\t\t\t\t\t\tlastCachedObject = objects[ firstActiveIndex ],\n\t\t\t\t\t\tlastIndex = -- nObjects,\n\t\t\t\t\t\tlastObject = objects[ lastIndex ];\n\n\t\t\t\t\t// last cached object takes this object's place\n\t\t\t\t\tindicesByUUID[ lastCachedObject.uuid ] = index;\n\t\t\t\t\tobjects[ index ] = lastCachedObject;\n\n\t\t\t\t\t// last object goes to the activated slot and pop\n\t\t\t\t\tindicesByUUID[ lastObject.uuid ] = firstActiveIndex;\n\t\t\t\t\tobjects[ firstActiveIndex ] = lastObject;\n\t\t\t\t\tobjects.pop();\n\n\t\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\t\tlastCached = bindingsForPath[ firstActiveIndex ],\n\t\t\t\t\t\t\tlast = bindingsForPath[ lastIndex ];\n\n\t\t\t\t\t\tbindingsForPath[ index ] = lastCached;\n\t\t\t\t\t\tbindingsForPath[ firstActiveIndex ] = last;\n\t\t\t\t\t\tbindingsForPath.pop();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// object is active, just swap with the last and pop\n\n\t\t\t\t\tconst lastIndex = -- nObjects,\n\t\t\t\t\t\tlastObject = objects[ lastIndex ];\n\n\t\t\t\t\tif ( lastIndex > 0 ) {\n\n\t\t\t\t\t\tindicesByUUID[ lastObject.uuid ] = index;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tobjects[ index ] = lastObject;\n\t\t\t\t\tobjects.pop();\n\n\t\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\t\tconst bindingsForPath = bindings[ j ];\n\n\t\t\t\t\t\tbindingsForPath[ index ] = bindingsForPath[ lastIndex ];\n\t\t\t\t\t\tbindingsForPath.pop();\n\n\t\t\t\t\t}\n\n\t\t\t\t} // cached or active\n\n\t\t\t} // if object is known\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\t// Internal interface used by befriended PropertyBinding.Composite:\n\n\tsubscribe_( path, parsedPath ) {\n\n\t\t// returns an array of bindings for the given path that is changed\n\t\t// according to the contained objects in the group\n\n\t\tconst indicesByPath = this._bindingsIndicesByPath;\n\t\tlet index = indicesByPath[ path ];\n\t\tconst bindings = this._bindings;\n\n\t\tif ( index !== undefined ) return bindings[ index ];\n\n\t\tconst paths = this._paths,\n\t\t\tparsedPaths = this._parsedPaths,\n\t\t\tobjects = this._objects,\n\t\t\tnObjects = objects.length,\n\t\t\tnCachedObjects = this.nCachedObjects_,\n\t\t\tbindingsForPath = new Array( nObjects );\n\n\t\tindex = bindings.length;\n\n\t\tindicesByPath[ path ] = index;\n\n\t\tpaths.push( path );\n\t\tparsedPaths.push( parsedPath );\n\t\tbindings.push( bindingsForPath );\n\n\t\tfor ( let i = nCachedObjects, n = objects.length; i !== n; ++ i ) {\n\n\t\t\tconst object = objects[ i ];\n\t\t\tbindingsForPath[ i ] = new PropertyBinding( object, path, parsedPath );\n\n\t\t}\n\n\t\treturn bindingsForPath;\n\n\t}\n\n\tunsubscribe_( path ) {\n\n\t\t// tells the group to forget about a property path and no longer\n\t\t// update the array previously obtained with 'subscribe_'\n\n\t\tconst indicesByPath = this._bindingsIndicesByPath,\n\t\t\tindex = indicesByPath[ path ];\n\n\t\tif ( index !== undefined ) {\n\n\t\t\tconst paths = this._paths,\n\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\tbindings = this._bindings,\n\t\t\t\tlastBindingsIndex = bindings.length - 1,\n\t\t\t\tlastBindings = bindings[ lastBindingsIndex ],\n\t\t\t\tlastBindingsPath = path[ lastBindingsIndex ];\n\n\t\t\tindicesByPath[ lastBindingsPath ] = index;\n\n\t\t\tbindings[ index ] = lastBindings;\n\t\t\tbindings.pop();\n\n\t\t\tparsedPaths[ index ] = parsedPaths[ lastBindingsIndex ];\n\t\t\tparsedPaths.pop();\n\n\t\t\tpaths[ index ] = paths[ lastBindingsIndex ];\n\t\t\tpaths.pop();\n\n\t\t}\n\n\t}\n\n}\n\nAnimationObjectGroup.prototype.isAnimationObjectGroup = true;\n\nclass AnimationAction {\n\n\tconstructor( mixer, clip, localRoot = null, blendMode = clip.blendMode ) {\n\n\t\tthis._mixer = mixer;\n\t\tthis._clip = clip;\n\t\tthis._localRoot = localRoot;\n\t\tthis.blendMode = blendMode;\n\n\t\tconst tracks = clip.tracks,\n\t\t\tnTracks = tracks.length,\n\t\t\tinterpolants = new Array( nTracks );\n\n\t\tconst interpolantSettings = {\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\t\t};\n\n\t\tfor ( let i = 0; i !== nTracks; ++ i ) {\n\n\t\t\tconst interpolant = tracks[ i ].createInterpolant( null );\n\t\t\tinterpolants[ i ] = interpolant;\n\t\t\tinterpolant.settings = interpolantSettings;\n\n\t\t}\n\n\t\tthis._interpolantSettings = interpolantSettings;\n\n\t\tthis._interpolants = interpolants; // bound by the mixer\n\n\t\t// inside: PropertyMixer (managed by the mixer)\n\t\tthis._propertyBindings = new Array( nTracks );\n\n\t\tthis._cacheIndex = null; // for the memory manager\n\t\tthis._byClipCacheIndex = null; // for the memory manager\n\n\t\tthis._timeScaleInterpolant = null;\n\t\tthis._weightInterpolant = null;\n\n\t\tthis.loop = LoopRepeat;\n\t\tthis._loopCount = - 1;\n\n\t\t// global mixer time when the action is to be started\n\t\t// it's set back to 'null' upon start of the action\n\t\tthis._startTime = null;\n\n\t\t// scaled local time of the action\n\t\t// gets clamped or wrapped to 0..clip.duration according to loop\n\t\tthis.time = 0;\n\n\t\tthis.timeScale = 1;\n\t\tthis._effectiveTimeScale = 1;\n\n\t\tthis.weight = 1;\n\t\tthis._effectiveWeight = 1;\n\n\t\tthis.repetitions = Infinity; // no. of repetitions when looping\n\n\t\tthis.paused = false; // true -> zero effective time scale\n\t\tthis.enabled = true; // false -> zero effective weight\n\n\t\tthis.clampWhenFinished = false;// keep feeding the last frame?\n\n\t\tthis.zeroSlopeAtStart = true;// for smooth interpolation w/o separate\n\t\tthis.zeroSlopeAtEnd = true;// clips for start, loop and end\n\n\t}\n\n\t// State & Scheduling\n\n\tplay() {\n\n\t\tthis._mixer._activateAction( this );\n\n\t\treturn this;\n\n\t}\n\n\tstop() {\n\n\t\tthis._mixer._deactivateAction( this );\n\n\t\treturn this.reset();\n\n\t}\n\n\treset() {\n\n\t\tthis.paused = false;\n\t\tthis.enabled = true;\n\n\t\tthis.time = 0; // restart clip\n\t\tthis._loopCount = - 1;// forget previous loops\n\t\tthis._startTime = null;// forget scheduling\n\n\t\treturn this.stopFading().stopWarping();\n\n\t}\n\n\tisRunning() {\n\n\t\treturn this.enabled && ! this.paused && this.timeScale !== 0 &&\n\t\t\tthis._startTime === null && this._mixer._isActiveAction( this );\n\n\t}\n\n\t// return true when play has been called\n\tisScheduled() {\n\n\t\treturn this._mixer._isActiveAction( this );\n\n\t}\n\n\tstartAt( time ) {\n\n\t\tthis._startTime = time;\n\n\t\treturn this;\n\n\t}\n\n\tsetLoop( mode, repetitions ) {\n\n\t\tthis.loop = mode;\n\t\tthis.repetitions = repetitions;\n\n\t\treturn this;\n\n\t}\n\n\t// Weight\n\n\t// set the weight stopping any scheduled fading\n\t// although .enabled = false yields an effective weight of zero, this\n\t// method does *not* change .enabled, because it would be confusing\n\tsetEffectiveWeight( weight ) {\n\n\t\tthis.weight = weight;\n\n\t\t// note: same logic as when updated at runtime\n\t\tthis._effectiveWeight = this.enabled ? weight : 0;\n\n\t\treturn this.stopFading();\n\n\t}\n\n\t// return the weight considering fading and .enabled\n\tgetEffectiveWeight() {\n\n\t\treturn this._effectiveWeight;\n\n\t}\n\n\tfadeIn( duration ) {\n\n\t\treturn this._scheduleFading( duration, 0, 1 );\n\n\t}\n\n\tfadeOut( duration ) {\n\n\t\treturn this._scheduleFading( duration, 1, 0 );\n\n\t}\n\n\tcrossFadeFrom( fadeOutAction, duration, warp ) {\n\n\t\tfadeOutAction.fadeOut( duration );\n\t\tthis.fadeIn( duration );\n\n\t\tif ( warp ) {\n\n\t\t\tconst fadeInDuration = this._clip.duration,\n\t\t\t\tfadeOutDuration = fadeOutAction._clip.duration,\n\n\t\t\t\tstartEndRatio = fadeOutDuration / fadeInDuration,\n\t\t\t\tendStartRatio = fadeInDuration / fadeOutDuration;\n\n\t\t\tfadeOutAction.warp( 1.0, startEndRatio, duration );\n\t\t\tthis.warp( endStartRatio, 1.0, duration );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcrossFadeTo( fadeInAction, duration, warp ) {\n\n\t\treturn fadeInAction.crossFadeFrom( this, duration, warp );\n\n\t}\n\n\tstopFading() {\n\n\t\tconst weightInterpolant = this._weightInterpolant;\n\n\t\tif ( weightInterpolant !== null ) {\n\n\t\t\tthis._weightInterpolant = null;\n\t\t\tthis._mixer._takeBackControlInterpolant( weightInterpolant );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Time Scale Control\n\n\t// set the time scale stopping any scheduled warping\n\t// although .paused = true yields an effective time scale of zero, this\n\t// method does *not* change .paused, because it would be confusing\n\tsetEffectiveTimeScale( timeScale ) {\n\n\t\tthis.timeScale = timeScale;\n\t\tthis._effectiveTimeScale = this.paused ? 0 : timeScale;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\t// return the time scale considering warping and .paused\n\tgetEffectiveTimeScale() {\n\n\t\treturn this._effectiveTimeScale;\n\n\t}\n\n\tsetDuration( duration ) {\n\n\t\tthis.timeScale = this._clip.duration / duration;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\tsyncWith( action ) {\n\n\t\tthis.time = action.time;\n\t\tthis.timeScale = action.timeScale;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\thalt( duration ) {\n\n\t\treturn this.warp( this._effectiveTimeScale, 0, duration );\n\n\t}\n\n\twarp( startTimeScale, endTimeScale, duration ) {\n\n\t\tconst mixer = this._mixer,\n\t\t\tnow = mixer.time,\n\t\t\ttimeScale = this.timeScale;\n\n\t\tlet interpolant = this._timeScaleInterpolant;\n\n\t\tif ( interpolant === null ) {\n\n\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\tthis._timeScaleInterpolant = interpolant;\n\n\t\t}\n\n\t\tconst times = interpolant.parameterPositions,\n\t\t\tvalues = interpolant.sampleValues;\n\n\t\ttimes[ 0 ] = now;\n\t\ttimes[ 1 ] = now + duration;\n\n\t\tvalues[ 0 ] = startTimeScale / timeScale;\n\t\tvalues[ 1 ] = endTimeScale / timeScale;\n\n\t\treturn this;\n\n\t}\n\n\tstopWarping() {\n\n\t\tconst timeScaleInterpolant = this._timeScaleInterpolant;\n\n\t\tif ( timeScaleInterpolant !== null ) {\n\n\t\t\tthis._timeScaleInterpolant = null;\n\t\t\tthis._mixer._takeBackControlInterpolant( timeScaleInterpolant );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Object Accessors\n\n\tgetMixer() {\n\n\t\treturn this._mixer;\n\n\t}\n\n\tgetClip() {\n\n\t\treturn this._clip;\n\n\t}\n\n\tgetRoot() {\n\n\t\treturn this._localRoot || this._mixer._root;\n\n\t}\n\n\t// Interna\n\n\t_update( time, deltaTime, timeDirection, accuIndex ) {\n\n\t\t// called by the mixer\n\n\t\tif ( ! this.enabled ) {\n\n\t\t\t// call ._updateWeight() to update ._effectiveWeight\n\n\t\t\tthis._updateWeight( time );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst startTime = this._startTime;\n\n\t\tif ( startTime !== null ) {\n\n\t\t\t// check for scheduled start of action\n\n\t\t\tconst timeRunning = ( time - startTime ) * timeDirection;\n\t\t\tif ( timeRunning < 0 || timeDirection === 0 ) {\n\n\t\t\t\treturn; // yet to come / don't decide when delta = 0\n\n\t\t\t}\n\n\t\t\t// start\n\n\t\t\tthis._startTime = null; // unschedule\n\t\t\tdeltaTime = timeDirection * timeRunning;\n\n\t\t}\n\n\t\t// apply time scale and advance time\n\n\t\tdeltaTime *= this._updateTimeScale( time );\n\t\tconst clipTime = this._updateTime( deltaTime );\n\n\t\t// note: _updateTime may disable the action resulting in\n\t\t// an effective weight of 0\n\n\t\tconst weight = this._updateWeight( time );\n\n\t\tif ( weight > 0 ) {\n\n\t\t\tconst interpolants = this._interpolants;\n\t\t\tconst propertyMixers = this._propertyBindings;\n\n\t\t\tswitch ( this.blendMode ) {\n\n\t\t\t\tcase AdditiveAnimationBlendMode:\n\n\t\t\t\t\tfor ( let j = 0, m = interpolants.length; j !== m; ++ j ) {\n\n\t\t\t\t\t\tinterpolants[ j ].evaluate( clipTime );\n\t\t\t\t\t\tpropertyMixers[ j ].accumulateAdditive( weight );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase NormalAnimationBlendMode:\n\t\t\t\tdefault:\n\n\t\t\t\t\tfor ( let j = 0, m = interpolants.length; j !== m; ++ j ) {\n\n\t\t\t\t\t\tinterpolants[ j ].evaluate( clipTime );\n\t\t\t\t\t\tpropertyMixers[ j ].accumulate( accuIndex, weight );\n\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_updateWeight( time ) {\n\n\t\tlet weight = 0;\n\n\t\tif ( this.enabled ) {\n\n\t\t\tweight = this.weight;\n\t\t\tconst interpolant = this._weightInterpolant;\n\n\t\t\tif ( interpolant !== null ) {\n\n\t\t\t\tconst interpolantValue = interpolant.evaluate( time )[ 0 ];\n\n\t\t\t\tweight *= interpolantValue;\n\n\t\t\t\tif ( time > interpolant.parameterPositions[ 1 ] ) {\n\n\t\t\t\t\tthis.stopFading();\n\n\t\t\t\t\tif ( interpolantValue === 0 ) {\n\n\t\t\t\t\t\t// faded out, disable\n\t\t\t\t\t\tthis.enabled = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis._effectiveWeight = weight;\n\t\treturn weight;\n\n\t}\n\n\t_updateTimeScale( time ) {\n\n\t\tlet timeScale = 0;\n\n\t\tif ( ! this.paused ) {\n\n\t\t\ttimeScale = this.timeScale;\n\n\t\t\tconst interpolant = this._timeScaleInterpolant;\n\n\t\t\tif ( interpolant !== null ) {\n\n\t\t\t\tconst interpolantValue = interpolant.evaluate( time )[ 0 ];\n\n\t\t\t\ttimeScale *= interpolantValue;\n\n\t\t\t\tif ( time > interpolant.parameterPositions[ 1 ] ) {\n\n\t\t\t\t\tthis.stopWarping();\n\n\t\t\t\t\tif ( timeScale === 0 ) {\n\n\t\t\t\t\t\t// motion has halted, pause\n\t\t\t\t\t\tthis.paused = true;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// warp done - apply final time scale\n\t\t\t\t\t\tthis.timeScale = timeScale;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis._effectiveTimeScale = timeScale;\n\t\treturn timeScale;\n\n\t}\n\n\t_updateTime( deltaTime ) {\n\n\t\tconst duration = this._clip.duration;\n\t\tconst loop = this.loop;\n\n\t\tlet time = this.time + deltaTime;\n\t\tlet loopCount = this._loopCount;\n\n\t\tconst pingPong = ( loop === LoopPingPong );\n\n\t\tif ( deltaTime === 0 ) {\n\n\t\t\tif ( loopCount === - 1 ) return time;\n\n\t\t\treturn ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time;\n\n\t\t}\n\n\t\tif ( loop === LoopOnce ) {\n\n\t\t\tif ( loopCount === - 1 ) {\n\n\t\t\t\t// just started\n\n\t\t\t\tthis._loopCount = 0;\n\t\t\t\tthis._setEndings( true, true, false );\n\n\t\t\t}\n\n\t\t\thandle_stop: {\n\n\t\t\t\tif ( time >= duration ) {\n\n\t\t\t\t\ttime = duration;\n\n\t\t\t\t} else if ( time < 0 ) {\n\n\t\t\t\t\ttime = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tbreak handle_stop;\n\n\t\t\t\t}\n\n\t\t\t\tif ( this.clampWhenFinished ) this.paused = true;\n\t\t\t\telse this.enabled = false;\n\n\t\t\t\tthis.time = time;\n\n\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\ttype: 'finished', action: this,\n\t\t\t\t\tdirection: deltaTime < 0 ? - 1 : 1\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t} else { // repetitive Repeat or PingPong\n\n\t\t\tif ( loopCount === - 1 ) {\n\n\t\t\t\t// just started\n\n\t\t\t\tif ( deltaTime >= 0 ) {\n\n\t\t\t\t\tloopCount = 0;\n\n\t\t\t\t\tthis._setEndings( true, this.repetitions === 0, pingPong );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// when looping in reverse direction, the initial\n\t\t\t\t\t// transition through zero counts as a repetition,\n\t\t\t\t\t// so leave loopCount at -1\n\n\t\t\t\t\tthis._setEndings( this.repetitions === 0, true, pingPong );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( time >= duration || time < 0 ) {\n\n\t\t\t\t// wrap around\n\n\t\t\t\tconst loopDelta = Math.floor( time / duration ); // signed\n\t\t\t\ttime -= duration * loopDelta;\n\n\t\t\t\tloopCount += Math.abs( loopDelta );\n\n\t\t\t\tconst pending = this.repetitions - loopCount;\n\n\t\t\t\tif ( pending <= 0 ) {\n\n\t\t\t\t\t// have to stop (switch state, clamp time, fire event)\n\n\t\t\t\t\tif ( this.clampWhenFinished ) this.paused = true;\n\t\t\t\t\telse this.enabled = false;\n\n\t\t\t\t\ttime = deltaTime > 0 ? duration : 0;\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\t\ttype: 'finished', action: this,\n\t\t\t\t\t\tdirection: deltaTime > 0 ? 1 : - 1\n\t\t\t\t\t} );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// keep running\n\n\t\t\t\t\tif ( pending === 1 ) {\n\n\t\t\t\t\t\t// entering the last round\n\n\t\t\t\t\t\tconst atStart = deltaTime < 0;\n\t\t\t\t\t\tthis._setEndings( atStart, ! atStart, pingPong );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis._setEndings( false, false, pingPong );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._loopCount = loopCount;\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\t\ttype: 'loop', action: this, loopDelta: loopDelta\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tthis.time = time;\n\n\t\t\t}\n\n\t\t\tif ( pingPong && ( loopCount & 1 ) === 1 ) {\n\n\t\t\t\t// invert time for the \"pong round\"\n\n\t\t\t\treturn duration - time;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn time;\n\n\t}\n\n\t_setEndings( atStart, atEnd, pingPong ) {\n\n\t\tconst settings = this._interpolantSettings;\n\n\t\tif ( pingPong ) {\n\n\t\t\tsettings.endingStart = ZeroSlopeEnding;\n\t\t\tsettings.endingEnd = ZeroSlopeEnding;\n\n\t\t} else {\n\n\t\t\t// assuming for LoopOnce atStart == atEnd == true\n\n\t\t\tif ( atStart ) {\n\n\t\t\t\tsettings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\n\t\t\t} else {\n\n\t\t\t\tsettings.endingStart = WrapAroundEnding;\n\n\t\t\t}\n\n\t\t\tif ( atEnd ) {\n\n\t\t\t\tsettings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\n\t\t\t} else {\n\n\t\t\t\tsettings.endingEnd \t = WrapAroundEnding;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_scheduleFading( duration, weightNow, weightThen ) {\n\n\t\tconst mixer = this._mixer, now = mixer.time;\n\t\tlet interpolant = this._weightInterpolant;\n\n\t\tif ( interpolant === null ) {\n\n\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\tthis._weightInterpolant = interpolant;\n\n\t\t}\n\n\t\tconst times = interpolant.parameterPositions,\n\t\t\tvalues = interpolant.sampleValues;\n\n\t\ttimes[ 0 ] = now;\n\t\tvalues[ 0 ] = weightNow;\n\t\ttimes[ 1 ] = now + duration;\n\t\tvalues[ 1 ] = weightThen;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass AnimationMixer extends EventDispatcher {\n\n\tconstructor( root ) {\n\n\t\tsuper();\n\n\t\tthis._root = root;\n\t\tthis._initMemoryManager();\n\t\tthis._accuIndex = 0;\n\t\tthis.time = 0;\n\t\tthis.timeScale = 1.0;\n\n\t}\n\n\t_bindAction( action, prototypeAction ) {\n\n\t\tconst root = action._localRoot || this._root,\n\t\t\ttracks = action._clip.tracks,\n\t\t\tnTracks = tracks.length,\n\t\t\tbindings = action._propertyBindings,\n\t\t\tinterpolants = action._interpolants,\n\t\t\trootUuid = root.uuid,\n\t\t\tbindingsByRoot = this._bindingsByRootAndName;\n\n\t\tlet bindingsByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingsByName === undefined ) {\n\n\t\t\tbindingsByName = {};\n\t\t\tbindingsByRoot[ rootUuid ] = bindingsByName;\n\n\t\t}\n\n\t\tfor ( let i = 0; i !== nTracks; ++ i ) {\n\n\t\t\tconst track = tracks[ i ],\n\t\t\t\ttrackName = track.name;\n\n\t\t\tlet binding = bindingsByName[ trackName ];\n\n\t\t\tif ( binding !== undefined ) {\n\n\t\t\t\tbindings[ i ] = binding;\n\n\t\t\t} else {\n\n\t\t\t\tbinding = bindings[ i ];\n\n\t\t\t\tif ( binding !== undefined ) {\n\n\t\t\t\t\t// existing binding, make sure the cache knows\n\n\t\t\t\t\tif ( binding._cacheIndex === null ) {\n\n\t\t\t\t\t\t++ binding.referenceCount;\n\t\t\t\t\t\tthis._addInactiveBinding( binding, rootUuid, trackName );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t\tconst path = prototypeAction && prototypeAction.\n\t\t\t\t\t_propertyBindings[ i ].binding.parsedPath;\n\n\t\t\t\tbinding = new PropertyMixer(\n\t\t\t\t\tPropertyBinding.create( root, trackName, path ),\n\t\t\t\t\ttrack.ValueTypeName, track.getValueSize() );\n\n\t\t\t\t++ binding.referenceCount;\n\t\t\t\tthis._addInactiveBinding( binding, rootUuid, trackName );\n\n\t\t\t\tbindings[ i ] = binding;\n\n\t\t\t}\n\n\t\t\tinterpolants[ i ].resultBuffer = binding.buffer;\n\n\t\t}\n\n\t}\n\n\t_activateAction( action ) {\n\n\t\tif ( ! this._isActiveAction( action ) ) {\n\n\t\t\tif ( action._cacheIndex === null ) {\n\n\t\t\t\t// this action has been forgotten by the cache, but the user\n\t\t\t\t// appears to be still using it -> rebind\n\n\t\t\t\tconst rootUuid = ( action._localRoot || this._root ).uuid,\n\t\t\t\t\tclipUuid = action._clip.uuid,\n\t\t\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\t\t\tthis._bindAction( action,\n\t\t\t\t\tactionsForClip && actionsForClip.knownActions[ 0 ] );\n\n\t\t\t\tthis._addInactiveAction( action, clipUuid, rootUuid );\n\n\t\t\t}\n\n\t\t\tconst bindings = action._propertyBindings;\n\n\t\t\t// increment reference counts / sort out state\n\t\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\t\tconst binding = bindings[ i ];\n\n\t\t\t\tif ( binding.useCount ++ === 0 ) {\n\n\t\t\t\t\tthis._lendBinding( binding );\n\t\t\t\t\tbinding.saveOriginalState();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._lendAction( action );\n\n\t\t}\n\n\t}\n\n\t_deactivateAction( action ) {\n\n\t\tif ( this._isActiveAction( action ) ) {\n\n\t\t\tconst bindings = action._propertyBindings;\n\n\t\t\t// decrement reference counts / sort out state\n\t\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\t\tconst binding = bindings[ i ];\n\n\t\t\t\tif ( -- binding.useCount === 0 ) {\n\n\t\t\t\t\tbinding.restoreOriginalState();\n\t\t\t\t\tthis._takeBackBinding( binding );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._takeBackAction( action );\n\n\t\t}\n\n\t}\n\n\t// Memory manager\n\n\t_initMemoryManager() {\n\n\t\tthis._actions = []; // 'nActiveActions' followed by inactive ones\n\t\tthis._nActiveActions = 0;\n\n\t\tthis._actionsByClip = {};\n\t\t// inside:\n\t\t// {\n\t\t// \tknownActions: Array< AnimationAction > - used as prototypes\n\t\t// \tactionByRoot: AnimationAction - lookup\n\t\t// }\n\n\n\t\tthis._bindings = []; // 'nActiveBindings' followed by inactive ones\n\t\tthis._nActiveBindings = 0;\n\n\t\tthis._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer >\n\n\n\t\tthis._controlInterpolants = []; // same game as above\n\t\tthis._nActiveControlInterpolants = 0;\n\n\t\tconst scope = this;\n\n\t\tthis.stats = {\n\n\t\t\tactions: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._actions.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveActions;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tbindings: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._bindings.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveBindings;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tcontrolInterpolants: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._controlInterpolants.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveControlInterpolants;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t// Memory management for AnimationAction objects\n\n\t_isActiveAction( action ) {\n\n\t\tconst index = action._cacheIndex;\n\t\treturn index !== null && index < this._nActiveActions;\n\n\t}\n\n\t_addInactiveAction( action, clipUuid, rootUuid ) {\n\n\t\tconst actions = this._actions,\n\t\t\tactionsByClip = this._actionsByClip;\n\n\t\tlet actionsForClip = actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip === undefined ) {\n\n\t\t\tactionsForClip = {\n\n\t\t\t\tknownActions: [ action ],\n\t\t\t\tactionByRoot: {}\n\n\t\t\t};\n\n\t\t\taction._byClipCacheIndex = 0;\n\n\t\t\tactionsByClip[ clipUuid ] = actionsForClip;\n\n\t\t} else {\n\n\t\t\tconst knownActions = actionsForClip.knownActions;\n\n\t\t\taction._byClipCacheIndex = knownActions.length;\n\t\t\tknownActions.push( action );\n\n\t\t}\n\n\t\taction._cacheIndex = actions.length;\n\t\tactions.push( action );\n\n\t\tactionsForClip.actionByRoot[ rootUuid ] = action;\n\n\t}\n\n\t_removeInactiveAction( action ) {\n\n\t\tconst actions = this._actions,\n\t\t\tlastInactiveAction = actions[ actions.length - 1 ],\n\t\t\tcacheIndex = action._cacheIndex;\n\n\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\tactions[ cacheIndex ] = lastInactiveAction;\n\t\tactions.pop();\n\n\t\taction._cacheIndex = null;\n\n\n\t\tconst clipUuid = action._clip.uuid,\n\t\t\tactionsByClip = this._actionsByClip,\n\t\t\tactionsForClip = actionsByClip[ clipUuid ],\n\t\t\tknownActionsForClip = actionsForClip.knownActions,\n\n\t\t\tlastKnownAction =\n\t\t\t\tknownActionsForClip[ knownActionsForClip.length - 1 ],\n\n\t\t\tbyClipCacheIndex = action._byClipCacheIndex;\n\n\t\tlastKnownAction._byClipCacheIndex = byClipCacheIndex;\n\t\tknownActionsForClip[ byClipCacheIndex ] = lastKnownAction;\n\t\tknownActionsForClip.pop();\n\n\t\taction._byClipCacheIndex = null;\n\n\n\t\tconst actionByRoot = actionsForClip.actionByRoot,\n\t\t\trootUuid = ( action._localRoot || this._root ).uuid;\n\n\t\tdelete actionByRoot[ rootUuid ];\n\n\t\tif ( knownActionsForClip.length === 0 ) {\n\n\t\t\tdelete actionsByClip[ clipUuid ];\n\n\t\t}\n\n\t\tthis._removeInactiveBindingsForAction( action );\n\n\t}\n\n\t_removeInactiveBindingsForAction( action ) {\n\n\t\tconst bindings = action._propertyBindings;\n\n\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tconst binding = bindings[ i ];\n\n\t\t\tif ( -- binding.referenceCount === 0 ) {\n\n\t\t\t\tthis._removeInactiveBinding( binding );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_lendAction( action ) {\n\n\t\t// [ active actions | inactive actions ]\n\t\t// [ active actions >| inactive actions ]\n\t\t// s a\n\t\t// <-swap->\n\t\t// a s\n\n\t\tconst actions = this._actions,\n\t\t\tprevIndex = action._cacheIndex,\n\n\t\t\tlastActiveIndex = this._nActiveActions ++,\n\n\t\t\tfirstInactiveAction = actions[ lastActiveIndex ];\n\n\t\taction._cacheIndex = lastActiveIndex;\n\t\tactions[ lastActiveIndex ] = action;\n\n\t\tfirstInactiveAction._cacheIndex = prevIndex;\n\t\tactions[ prevIndex ] = firstInactiveAction;\n\n\t}\n\n\t_takeBackAction( action ) {\n\n\t\t// [ active actions | inactive actions ]\n\t\t// [ active actions |< inactive actions ]\n\t\t// a s\n\t\t// <-swap->\n\t\t// s a\n\n\t\tconst actions = this._actions,\n\t\t\tprevIndex = action._cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveActions,\n\n\t\t\tlastActiveAction = actions[ firstInactiveIndex ];\n\n\t\taction._cacheIndex = firstInactiveIndex;\n\t\tactions[ firstInactiveIndex ] = action;\n\n\t\tlastActiveAction._cacheIndex = prevIndex;\n\t\tactions[ prevIndex ] = lastActiveAction;\n\n\t}\n\n\t// Memory management for PropertyMixer objects\n\n\t_addInactiveBinding( binding, rootUuid, trackName ) {\n\n\t\tconst bindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindings = this._bindings;\n\n\t\tlet bindingByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingByName === undefined ) {\n\n\t\t\tbindingByName = {};\n\t\t\tbindingsByRoot[ rootUuid ] = bindingByName;\n\n\t\t}\n\n\t\tbindingByName[ trackName ] = binding;\n\n\t\tbinding._cacheIndex = bindings.length;\n\t\tbindings.push( binding );\n\n\t}\n\n\t_removeInactiveBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tpropBinding = binding.binding,\n\t\t\trootUuid = propBinding.rootNode.uuid,\n\t\t\ttrackName = propBinding.path,\n\t\t\tbindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindingByName = bindingsByRoot[ rootUuid ],\n\n\t\t\tlastInactiveBinding = bindings[ bindings.length - 1 ],\n\t\t\tcacheIndex = binding._cacheIndex;\n\n\t\tlastInactiveBinding._cacheIndex = cacheIndex;\n\t\tbindings[ cacheIndex ] = lastInactiveBinding;\n\t\tbindings.pop();\n\n\t\tdelete bindingByName[ trackName ];\n\n\t\tif ( Object.keys( bindingByName ).length === 0 ) {\n\n\t\t\tdelete bindingsByRoot[ rootUuid ];\n\n\t\t}\n\n\t}\n\n\t_lendBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tprevIndex = binding._cacheIndex,\n\n\t\t\tlastActiveIndex = this._nActiveBindings ++,\n\n\t\t\tfirstInactiveBinding = bindings[ lastActiveIndex ];\n\n\t\tbinding._cacheIndex = lastActiveIndex;\n\t\tbindings[ lastActiveIndex ] = binding;\n\n\t\tfirstInactiveBinding._cacheIndex = prevIndex;\n\t\tbindings[ prevIndex ] = firstInactiveBinding;\n\n\t}\n\n\t_takeBackBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tprevIndex = binding._cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveBindings,\n\n\t\t\tlastActiveBinding = bindings[ firstInactiveIndex ];\n\n\t\tbinding._cacheIndex = firstInactiveIndex;\n\t\tbindings[ firstInactiveIndex ] = binding;\n\n\t\tlastActiveBinding._cacheIndex = prevIndex;\n\t\tbindings[ prevIndex ] = lastActiveBinding;\n\n\t}\n\n\n\t// Memory management of Interpolants for weight and time scale\n\n\t_lendControlInterpolant() {\n\n\t\tconst interpolants = this._controlInterpolants,\n\t\t\tlastActiveIndex = this._nActiveControlInterpolants ++;\n\n\t\tlet interpolant = interpolants[ lastActiveIndex ];\n\n\t\tif ( interpolant === undefined ) {\n\n\t\t\tinterpolant = new LinearInterpolant(\n\t\t\t\tnew Float32Array( 2 ), new Float32Array( 2 ),\n\t\t\t\t1, this._controlInterpolantsResultBuffer );\n\n\t\t\tinterpolant.__cacheIndex = lastActiveIndex;\n\t\t\tinterpolants[ lastActiveIndex ] = interpolant;\n\n\t\t}\n\n\t\treturn interpolant;\n\n\t}\n\n\t_takeBackControlInterpolant( interpolant ) {\n\n\t\tconst interpolants = this._controlInterpolants,\n\t\t\tprevIndex = interpolant.__cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveControlInterpolants,\n\n\t\t\tlastActiveInterpolant = interpolants[ firstInactiveIndex ];\n\n\t\tinterpolant.__cacheIndex = firstInactiveIndex;\n\t\tinterpolants[ firstInactiveIndex ] = interpolant;\n\n\t\tlastActiveInterpolant.__cacheIndex = prevIndex;\n\t\tinterpolants[ prevIndex ] = lastActiveInterpolant;\n\n\t}\n\n\t// return an action for a clip optionally using a custom root target\n\t// object (this method allocates a lot of dynamic memory in case a\n\t// previously unknown clip/root combination is specified)\n\tclipAction( clip, optionalRoot, blendMode ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid;\n\n\t\tlet clipObject = typeof clip === 'string' ? AnimationClip.findByName( root, clip ) : clip;\n\n\t\tconst clipUuid = clipObject !== null ? clipObject.uuid : clip;\n\n\t\tconst actionsForClip = this._actionsByClip[ clipUuid ];\n\t\tlet prototypeAction = null;\n\n\t\tif ( blendMode === undefined ) {\n\n\t\t\tif ( clipObject !== null ) {\n\n\t\t\t\tblendMode = clipObject.blendMode;\n\n\t\t\t} else {\n\n\t\t\t\tblendMode = NormalAnimationBlendMode;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\tconst existingAction = actionsForClip.actionByRoot[ rootUuid ];\n\n\t\t\tif ( existingAction !== undefined && existingAction.blendMode === blendMode ) {\n\n\t\t\t\treturn existingAction;\n\n\t\t\t}\n\n\t\t\t// we know the clip, so we don't have to parse all\n\t\t\t// the bindings again but can just copy\n\t\t\tprototypeAction = actionsForClip.knownActions[ 0 ];\n\n\t\t\t// also, take the clip from the prototype action\n\t\t\tif ( clipObject === null )\n\t\t\t\tclipObject = prototypeAction._clip;\n\n\t\t}\n\n\t\t// clip must be known when specified via string\n\t\tif ( clipObject === null ) return null;\n\n\t\t// allocate all resources required to run it\n\t\tconst newAction = new AnimationAction( this, clipObject, optionalRoot, blendMode );\n\n\t\tthis._bindAction( newAction, prototypeAction );\n\n\t\t// and make the action known to the memory manager\n\t\tthis._addInactiveAction( newAction, clipUuid, rootUuid );\n\n\t\treturn newAction;\n\n\t}\n\n\t// get an existing action\n\texistingAction( clip, optionalRoot ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid,\n\n\t\t\tclipObject = typeof clip === 'string' ?\n\t\t\t\tAnimationClip.findByName( root, clip ) : clip,\n\n\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\n\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\treturn actionsForClip.actionByRoot[ rootUuid ] || null;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\t// deactivates all previously scheduled actions\n\tstopAllAction() {\n\n\t\tconst actions = this._actions,\n\t\t\tnActions = this._nActiveActions;\n\n\t\tfor ( let i = nActions - 1; i >= 0; -- i ) {\n\n\t\t\tactions[ i ].stop();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// advance the time and update apply the animation\n\tupdate( deltaTime ) {\n\n\t\tdeltaTime *= this.timeScale;\n\n\t\tconst actions = this._actions,\n\t\t\tnActions = this._nActiveActions,\n\n\t\t\ttime = this.time += deltaTime,\n\t\t\ttimeDirection = Math.sign( deltaTime ),\n\n\t\t\taccuIndex = this._accuIndex ^= 1;\n\n\t\t// run active actions\n\n\t\tfor ( let i = 0; i !== nActions; ++ i ) {\n\n\t\t\tconst action = actions[ i ];\n\n\t\t\taction._update( time, deltaTime, timeDirection, accuIndex );\n\n\t\t}\n\n\t\t// update scene graph\n\n\t\tconst bindings = this._bindings,\n\t\t\tnBindings = this._nActiveBindings;\n\n\t\tfor ( let i = 0; i !== nBindings; ++ i ) {\n\n\t\t\tbindings[ i ].apply( accuIndex );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Allows you to seek to a specific time in an animation.\n\tsetTime( timeInSeconds ) {\n\n\t\tthis.time = 0; // Zero out time attribute for AnimationMixer object;\n\t\tfor ( let i = 0; i < this._actions.length; i ++ ) {\n\n\t\t\tthis._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects.\n\n\t\t}\n\n\t\treturn this.update( timeInSeconds ); // Update used to set exact time. Returns \"this\" AnimationMixer object.\n\n\t}\n\n\t// return this mixer's root target object\n\tgetRoot() {\n\n\t\treturn this._root;\n\n\t}\n\n\t// free all resources specific to a particular clip\n\tuncacheClip( clip ) {\n\n\t\tconst actions = this._actions,\n\t\t\tclipUuid = clip.uuid,\n\t\t\tactionsByClip = this._actionsByClip,\n\t\t\tactionsForClip = actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\t// note: just calling _removeInactiveAction would mess up the\n\t\t\t// iteration state and also require updating the state we can\n\t\t\t// just throw away\n\n\t\t\tconst actionsToRemove = actionsForClip.knownActions;\n\n\t\t\tfor ( let i = 0, n = actionsToRemove.length; i !== n; ++ i ) {\n\n\t\t\t\tconst action = actionsToRemove[ i ];\n\n\t\t\t\tthis._deactivateAction( action );\n\n\t\t\t\tconst cacheIndex = action._cacheIndex,\n\t\t\t\t\tlastInactiveAction = actions[ actions.length - 1 ];\n\n\t\t\t\taction._cacheIndex = null;\n\t\t\t\taction._byClipCacheIndex = null;\n\n\t\t\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\t\t\tactions[ cacheIndex ] = lastInactiveAction;\n\t\t\t\tactions.pop();\n\n\t\t\t\tthis._removeInactiveBindingsForAction( action );\n\n\t\t\t}\n\n\t\t\tdelete actionsByClip[ clipUuid ];\n\n\t\t}\n\n\t}\n\n\t// free all resources specific to a particular root target object\n\tuncacheRoot( root ) {\n\n\t\tconst rootUuid = root.uuid,\n\t\t\tactionsByClip = this._actionsByClip;\n\n\t\tfor ( const clipUuid in actionsByClip ) {\n\n\t\t\tconst actionByRoot = actionsByClip[ clipUuid ].actionByRoot,\n\t\t\t\taction = actionByRoot[ rootUuid ];\n\n\t\t\tif ( action !== undefined ) {\n\n\t\t\t\tthis._deactivateAction( action );\n\t\t\t\tthis._removeInactiveAction( action );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst bindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindingByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingByName !== undefined ) {\n\n\t\t\tfor ( const trackName in bindingByName ) {\n\n\t\t\t\tconst binding = bindingByName[ trackName ];\n\t\t\t\tbinding.restoreOriginalState();\n\t\t\t\tthis._removeInactiveBinding( binding );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// remove a targeted clip from the cache\n\tuncacheAction( clip, optionalRoot ) {\n\n\t\tconst action = this.existingAction( clip, optionalRoot );\n\n\t\tif ( action !== null ) {\n\n\t\t\tthis._deactivateAction( action );\n\t\t\tthis._removeInactiveAction( action );\n\n\t\t}\n\n\t}\n\n}\n\nAnimationMixer.prototype._controlInterpolantsResultBuffer = new Float32Array( 1 );\n\nclass Uniform {\n\n\tconstructor( value ) {\n\n\t\tif ( typeof value === 'string' ) {\n\n\t\t\tconsole.warn( 'THREE.Uniform: Type parameter is no longer needed.' );\n\t\t\tvalue = arguments[ 1 ];\n\n\t\t}\n\n\t\tthis.value = value;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Uniform( this.value.clone === undefined ? this.value : this.value.clone() );\n\n\t}\n\n}\n\nclass InstancedInterleavedBuffer extends InterleavedBuffer {\n\n\tconstructor( array, stride, meshPerAttribute = 1 ) {\n\n\t\tsuper( array, stride );\n\n\t\tthis.meshPerAttribute = meshPerAttribute;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tconst ib = super.clone( data );\n\n\t\tib.meshPerAttribute = this.meshPerAttribute;\n\n\t\treturn ib;\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tconst json = super.toJSON( data );\n\n\t\tjson.isInstancedInterleavedBuffer = true;\n\t\tjson.meshPerAttribute = this.meshPerAttribute;\n\n\t\treturn json;\n\n\t}\n\n}\n\nInstancedInterleavedBuffer.prototype.isInstancedInterleavedBuffer = true;\n\nclass GLBufferAttribute {\n\n\tconstructor( buffer, type, itemSize, elementSize, count ) {\n\n\t\tthis.buffer = buffer;\n\t\tthis.type = type;\n\t\tthis.itemSize = itemSize;\n\t\tthis.elementSize = elementSize;\n\t\tthis.count = count;\n\n\t\tthis.version = 0;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetBuffer( buffer ) {\n\n\t\tthis.buffer = buffer;\n\n\t\treturn this;\n\n\t}\n\n\tsetType( type, elementSize ) {\n\n\t\tthis.type = type;\n\t\tthis.elementSize = elementSize;\n\n\t\treturn this;\n\n\t}\n\n\tsetItemSize( itemSize ) {\n\n\t\tthis.itemSize = itemSize;\n\n\t\treturn this;\n\n\t}\n\n\tsetCount( count ) {\n\n\t\tthis.count = count;\n\n\t\treturn this;\n\n\t}\n\n}\n\nGLBufferAttribute.prototype.isGLBufferAttribute = true;\n\nclass Raycaster {\n\n\tconstructor( origin, direction, near = 0, far = Infinity ) {\n\n\t\tthis.ray = new Ray( origin, direction );\n\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.camera = null;\n\t\tthis.layers = new Layers();\n\n\t\tthis.params = {\n\t\t\tMesh: {},\n\t\t\tLine: { threshold: 1 },\n\t\t\tLOD: {},\n\t\t\tPoints: { threshold: 1 },\n\t\t\tSprite: {}\n\t\t};\n\n\t}\n\n\tset( origin, direction ) {\n\n\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.ray.set( origin, direction );\n\n\t}\n\n\tsetFromCamera( coords, camera ) {\n\n\t\tif ( camera && camera.isPerspectiveCamera ) {\n\n\t\t\tthis.ray.origin.setFromMatrixPosition( camera.matrixWorld );\n\t\t\tthis.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize();\n\t\t\tthis.camera = camera;\n\n\t\t} else if ( camera && camera.isOrthographicCamera ) {\n\n\t\t\tthis.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera\n\t\t\tthis.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );\n\t\t\tthis.camera = camera;\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type );\n\n\t\t}\n\n\t}\n\n\tintersectObject( object, recursive = false, intersects = [] ) {\n\n\t\tintersectObject( object, this, intersects, recursive );\n\n\t\tintersects.sort( ascSort );\n\n\t\treturn intersects;\n\n\t}\n\n\tintersectObjects( objects, recursive = false, intersects = [] ) {\n\n\t\tfor ( let i = 0, l = objects.length; i < l; i ++ ) {\n\n\t\t\tintersectObject( objects[ i ], this, intersects, recursive );\n\n\t\t}\n\n\t\tintersects.sort( ascSort );\n\n\t\treturn intersects;\n\n\t}\n\n}\n\nfunction ascSort( a, b ) {\n\n\treturn a.distance - b.distance;\n\n}\n\nfunction intersectObject( object, raycaster, intersects, recursive ) {\n\n\tif ( object.layers.test( raycaster.layers ) ) {\n\n\t\tobject.raycast( raycaster, intersects );\n\n\t}\n\n\tif ( recursive === true ) {\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tintersectObject( children[ i ], raycaster, intersects, true );\n\n\t\t}\n\n\t}\n\n}\n\n/**\n * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system\n *\n * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.\n * The azimuthal angle (theta) is measured from the positive z-axis.\n */\n\nclass Spherical {\n\n\tconstructor( radius = 1, phi = 0, theta = 0 ) {\n\n\t\tthis.radius = radius;\n\t\tthis.phi = phi; // polar angle\n\t\tthis.theta = theta; // azimuthal angle\n\n\t\treturn this;\n\n\t}\n\n\tset( radius, phi, theta ) {\n\n\t\tthis.radius = radius;\n\t\tthis.phi = phi;\n\t\tthis.theta = theta;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( other ) {\n\n\t\tthis.radius = other.radius;\n\t\tthis.phi = other.phi;\n\t\tthis.theta = other.theta;\n\n\t\treturn this;\n\n\t}\n\n\t// restrict phi to be betwee EPS and PI-EPS\n\tmakeSafe() {\n\n\t\tconst EPS = 0.000001;\n\t\tthis.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\treturn this.setFromCartesianCoords( v.x, v.y, v.z );\n\n\t}\n\n\tsetFromCartesianCoords( x, y, z ) {\n\n\t\tthis.radius = Math.sqrt( x * x + y * y + z * z );\n\n\t\tif ( this.radius === 0 ) {\n\n\t\t\tthis.theta = 0;\n\t\t\tthis.phi = 0;\n\n\t\t} else {\n\n\t\t\tthis.theta = Math.atan2( x, z );\n\t\t\tthis.phi = Math.acos( clamp( y / this.radius, - 1, 1 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\n/**\n * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system\n */\n\nclass Cylindrical {\n\n\tconstructor( radius = 1, theta = 0, y = 0 ) {\n\n\t\tthis.radius = radius; // distance from the origin to a point in the x-z plane\n\t\tthis.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis\n\t\tthis.y = y; // height above the x-z plane\n\n\t\treturn this;\n\n\t}\n\n\tset( radius, theta, y ) {\n\n\t\tthis.radius = radius;\n\t\tthis.theta = theta;\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( other ) {\n\n\t\tthis.radius = other.radius;\n\t\tthis.theta = other.theta;\n\t\tthis.y = other.y;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\treturn this.setFromCartesianCoords( v.x, v.y, v.z );\n\n\t}\n\n\tsetFromCartesianCoords( x, y, z ) {\n\n\t\tthis.radius = Math.sqrt( x * x + z * z );\n\t\tthis.theta = Math.atan2( x, z );\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$4 = /*@__PURE__*/ new Vector2();\n\nclass Box2 {\n\n\tconstructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) {\n\n\t\tthis.min = min;\n\t\tthis.max = max;\n\n\t}\n\n\tset( min, max ) {\n\n\t\tthis.min.copy( min );\n\t\tthis.max.copy( max );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( points[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCenterAndSize( center, size ) {\n\n\t\tconst halfSize = _vector$4.copy( size ).multiplyScalar( 0.5 );\n\t\tthis.min.copy( center ).sub( halfSize );\n\t\tthis.max.copy( center ).add( halfSize );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( box ) {\n\n\t\tthis.min.copy( box.min );\n\t\tthis.max.copy( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.min.x = this.min.y = + Infinity;\n\t\tthis.max.x = this.max.y = - Infinity;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\n\t\treturn ( this.max.x < this.min.x ) || ( this.max.y < this.min.y );\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );\n\n\t}\n\n\tgetSize( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0 ) : target.subVectors( this.max, this.min );\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tthis.min.min( point );\n\t\tthis.max.max( point );\n\n\t\treturn this;\n\n\t}\n\n\texpandByVector( vector ) {\n\n\t\tthis.min.sub( vector );\n\t\tthis.max.add( vector );\n\n\t\treturn this;\n\n\t}\n\n\texpandByScalar( scalar ) {\n\n\t\tthis.min.addScalar( - scalar );\n\t\tthis.max.addScalar( scalar );\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn point.x < this.min.x || point.x > this.max.x ||\n\t\t\tpoint.y < this.min.y || point.y > this.max.y ? false : true;\n\n\t}\n\n\tcontainsBox( box ) {\n\n\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x &&\n\t\t\tthis.min.y <= box.min.y && box.max.y <= this.max.y;\n\n\t}\n\n\tgetParameter( point, target ) {\n\n\t\t// This can potentially have a divide by zero if the box\n\t\t// has a size dimension of 0.\n\n\t\treturn target.set(\n\t\t\t( point.x - this.min.x ) / ( this.max.x - this.min.x ),\n\t\t\t( point.y - this.min.y ) / ( this.max.y - this.min.y )\n\t\t);\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\t// using 4 splitting planes to rule out intersections\n\n\t\treturn box.max.x < this.min.x || box.min.x > this.max.x ||\n\t\t\tbox.max.y < this.min.y || box.min.y > this.max.y ? false : true;\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\treturn target.copy( point ).clamp( this.min, this.max );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\tconst clampedPoint = _vector$4.copy( point ).clamp( this.min, this.max );\n\t\treturn clampedPoint.sub( point ).length();\n\n\t}\n\n\tintersect( box ) {\n\n\t\tthis.min.max( box.min );\n\t\tthis.max.min( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tunion( box ) {\n\n\t\tthis.min.min( box.min );\n\t\tthis.max.max( box.max );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.min.add( offset );\n\t\tthis.max.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\tequals( box ) {\n\n\t\treturn box.min.equals( this.min ) && box.max.equals( this.max );\n\n\t}\n\n}\n\nBox2.prototype.isBox2 = true;\n\nconst _startP = /*@__PURE__*/ new Vector3();\nconst _startEnd = /*@__PURE__*/ new Vector3();\n\nclass Line3 {\n\n\tconstructor( start = new Vector3(), end = new Vector3() ) {\n\n\t\tthis.start = start;\n\t\tthis.end = end;\n\n\t}\n\n\tset( start, end ) {\n\n\t\tthis.start.copy( start );\n\t\tthis.end.copy( end );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( line ) {\n\n\t\tthis.start.copy( line.start );\n\t\tthis.end.copy( line.end );\n\n\t\treturn this;\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn target.addVectors( this.start, this.end ).multiplyScalar( 0.5 );\n\n\t}\n\n\tdelta( target ) {\n\n\t\treturn target.subVectors( this.end, this.start );\n\n\t}\n\n\tdistanceSq() {\n\n\t\treturn this.start.distanceToSquared( this.end );\n\n\t}\n\n\tdistance() {\n\n\t\treturn this.start.distanceTo( this.end );\n\n\t}\n\n\tat( t, target ) {\n\n\t\treturn this.delta( target ).multiplyScalar( t ).add( this.start );\n\n\t}\n\n\tclosestPointToPointParameter( point, clampToLine ) {\n\n\t\t_startP.subVectors( point, this.start );\n\t\t_startEnd.subVectors( this.end, this.start );\n\n\t\tconst startEnd2 = _startEnd.dot( _startEnd );\n\t\tconst startEnd_startP = _startEnd.dot( _startP );\n\n\t\tlet t = startEnd_startP / startEnd2;\n\n\t\tif ( clampToLine ) {\n\n\t\t\tt = clamp( t, 0, 1 );\n\n\t\t}\n\n\t\treturn t;\n\n\t}\n\n\tclosestPointToPoint( point, clampToLine, target ) {\n\n\t\tconst t = this.closestPointToPointParameter( point, clampToLine );\n\n\t\treturn this.delta( target ).multiplyScalar( t ).add( this.start );\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tthis.start.applyMatrix4( matrix );\n\t\tthis.end.applyMatrix4( matrix );\n\n\t\treturn this;\n\n\t}\n\n\tequals( line ) {\n\n\t\treturn line.start.equals( this.start ) && line.end.equals( this.end );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass ImmediateRenderObject extends Object3D {\n\n\tconstructor( material ) {\n\n\t\tsuper();\n\n\t\tthis.material = material;\n\t\tthis.render = function ( /* renderCallback */ ) {};\n\n\t\tthis.hasPositions = false;\n\t\tthis.hasNormals = false;\n\t\tthis.hasColors = false;\n\t\tthis.hasUvs = false;\n\n\t\tthis.positionArray = null;\n\t\tthis.normalArray = null;\n\t\tthis.colorArray = null;\n\t\tthis.uvArray = null;\n\n\t\tthis.count = 0;\n\n\t}\n\n}\n\nImmediateRenderObject.prototype.isImmediateRenderObject = true;\n\nconst _vector$3 = /*@__PURE__*/ new Vector3();\n\nclass SpotLightHelper extends Object3D {\n\n\tconstructor( light, color ) {\n\n\t\tsuper();\n\t\tthis.light = light;\n\t\tthis.light.updateMatrixWorld();\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tconst positions = [\n\t\t\t0, 0, 0, \t0, 0, 1,\n\t\t\t0, 0, 0, \t1, 0, 1,\n\t\t\t0, 0, 0,\t- 1, 0, 1,\n\t\t\t0, 0, 0, \t0, 1, 1,\n\t\t\t0, 0, 0, \t0, - 1, 1\n\t\t];\n\n\t\tfor ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) {\n\n\t\t\tconst p1 = ( i / l ) * Math.PI * 2;\n\t\t\tconst p2 = ( j / l ) * Math.PI * 2;\n\n\t\t\tpositions.push(\n\t\t\t\tMath.cos( p1 ), Math.sin( p1 ), 1,\n\t\t\t\tMath.cos( p2 ), Math.sin( p2 ), 1\n\t\t\t);\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { fog: false, toneMapped: false } );\n\n\t\tthis.cone = new LineSegments( geometry, material );\n\t\tthis.add( this.cone );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.cone.geometry.dispose();\n\t\tthis.cone.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tthis.light.updateMatrixWorld();\n\n\t\tconst coneLength = this.light.distance ? this.light.distance : 1000;\n\t\tconst coneWidth = coneLength * Math.tan( this.light.angle );\n\n\t\tthis.cone.scale.set( coneWidth, coneWidth, coneLength );\n\n\t\t_vector$3.setFromMatrixPosition( this.light.target.matrixWorld );\n\n\t\tthis.cone.lookAt( _vector$3 );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.cone.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.cone.material.color.copy( this.light.color );\n\n\t\t}\n\n\t}\n\n}\n\nconst _vector$2 = /*@__PURE__*/ new Vector3();\nconst _boneMatrix = /*@__PURE__*/ new Matrix4();\nconst _matrixWorldInv = /*@__PURE__*/ new Matrix4();\n\n\nclass SkeletonHelper extends LineSegments {\n\n\tconstructor( object ) {\n\n\t\tconst bones = getBoneList( object );\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\tconst color1 = new Color( 0, 0, 1 );\n\t\tconst color2 = new Color( 0, 1, 0 );\n\n\t\tfor ( let i = 0; i < bones.length; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\n\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tcolors.push( color1.r, color1.g, color1.b );\n\t\t\t\tcolors.push( color2.r, color2.g, color2.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, depthTest: false, depthWrite: false, toneMapped: false, transparent: true } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'SkeletonHelper';\n\t\tthis.isSkeletonHelper = true;\n\n\t\tthis.root = object;\n\t\tthis.bones = bones;\n\n\t\tthis.matrix = object.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tconst bones = this.bones;\n\n\t\tconst geometry = this.geometry;\n\t\tconst position = geometry.getAttribute( 'position' );\n\n\t\t_matrixWorldInv.copy( this.root.matrixWorld ).invert();\n\n\t\tfor ( let i = 0, j = 0; i < bones.length; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\n\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\t_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld );\n\t\t\t\t_vector$2.setFromMatrixPosition( _boneMatrix );\n\t\t\t\tposition.setXYZ( j, _vector$2.x, _vector$2.y, _vector$2.z );\n\n\t\t\t\t_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld );\n\t\t\t\t_vector$2.setFromMatrixPosition( _boneMatrix );\n\t\t\t\tposition.setXYZ( j + 1, _vector$2.x, _vector$2.y, _vector$2.z );\n\n\t\t\t\tj += 2;\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.getAttribute( 'position' ).needsUpdate = true;\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n}\n\n\nfunction getBoneList( object ) {\n\n\tconst boneList = [];\n\n\tif ( object && object.isBone ) {\n\n\t\tboneList.push( object );\n\n\t}\n\n\tfor ( let i = 0; i < object.children.length; i ++ ) {\n\n\t\tboneList.push.apply( boneList, getBoneList( object.children[ i ] ) );\n\n\t}\n\n\treturn boneList;\n\n}\n\nclass PointLightHelper extends Mesh {\n\n\tconstructor( light, sphereSize, color ) {\n\n\t\tconst geometry = new SphereGeometry( sphereSize, 4, 2 );\n\t\tconst material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.light = light;\n\t\tthis.light.updateMatrixWorld();\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'PointLightHelper';\n\n\t\tthis.matrix = this.light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.update();\n\n\n\t\t/*\n\t// TODO: delete this comment?\n\tconst distanceGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 );\n\tconst distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );\n\n\tthis.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );\n\tthis.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );\n\n\tconst d = light.distance;\n\n\tif ( d === 0.0 ) {\n\n\t\tthis.lightDistance.visible = false;\n\n\t} else {\n\n\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t}\n\n\tthis.add( this.lightDistance );\n\t*/\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.material.color.copy( this.light.color );\n\n\t\t}\n\n\t\t/*\n\t\tconst d = this.light.distance;\n\n\t\tif ( d === 0.0 ) {\n\n\t\t\tthis.lightDistance.visible = false;\n\n\t\t} else {\n\n\t\t\tthis.lightDistance.visible = true;\n\t\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t\t}\n\t\t*/\n\n\t}\n\n}\n\nconst _vector$1 = /*@__PURE__*/ new Vector3();\nconst _color1 = /*@__PURE__*/ new Color();\nconst _color2 = /*@__PURE__*/ new Color();\n\nclass HemisphereLightHelper extends Object3D {\n\n\tconstructor( light, size, color ) {\n\n\t\tsuper();\n\t\tthis.light = light;\n\t\tthis.light.updateMatrixWorld();\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tconst geometry = new OctahedronGeometry( size );\n\t\tgeometry.rotateY( Math.PI * 0.5 );\n\n\t\tthis.material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );\n\t\tif ( this.color === undefined ) this.material.vertexColors = true;\n\n\t\tconst position = geometry.getAttribute( 'position' );\n\t\tconst colors = new Float32Array( position.count * 3 );\n\n\t\tgeometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) );\n\n\t\tthis.add( new Mesh( geometry, this.material ) );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.children[ 0 ].geometry.dispose();\n\t\tthis.children[ 0 ].material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tconst mesh = this.children[ 0 ];\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tconst colors = mesh.geometry.getAttribute( 'color' );\n\n\t\t\t_color1.copy( this.light.color );\n\t\t\t_color2.copy( this.light.groundColor );\n\n\t\t\tfor ( let i = 0, l = colors.count; i < l; i ++ ) {\n\n\t\t\t\tconst color = ( i < ( l / 2 ) ) ? _color1 : _color2;\n\n\t\t\t\tcolors.setXYZ( i, color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t\tcolors.needsUpdate = true;\n\n\t\t}\n\n\t\tmesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() );\n\n\t}\n\n}\n\nclass GridHelper extends LineSegments {\n\n\tconstructor( size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888 ) {\n\n\t\tcolor1 = new Color( color1 );\n\t\tcolor2 = new Color( color2 );\n\n\t\tconst center = divisions / 2;\n\t\tconst step = size / divisions;\n\t\tconst halfSize = size / 2;\n\n\t\tconst vertices = [], colors = [];\n\n\t\tfor ( let i = 0, j = 0, k = - halfSize; i <= divisions; i ++, k += step ) {\n\n\t\t\tvertices.push( - halfSize, 0, k, halfSize, 0, k );\n\t\t\tvertices.push( k, 0, - halfSize, k, 0, halfSize );\n\n\t\t\tconst color = i === center ? color1 : color2;\n\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\n\t\t}\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'GridHelper';\n\n\t}\n\n}\n\nclass PolarGridHelper extends LineSegments {\n\n\tconstructor( radius = 10, radials = 16, circles = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888 ) {\n\n\t\tcolor1 = new Color( color1 );\n\t\tcolor2 = new Color( color2 );\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\t// create the radials\n\n\t\tfor ( let i = 0; i <= radials; i ++ ) {\n\n\t\t\tconst v = ( i / radials ) * ( Math.PI * 2 );\n\n\t\t\tconst x = Math.sin( v ) * radius;\n\t\t\tconst z = Math.cos( v ) * radius;\n\n\t\t\tvertices.push( 0, 0, 0 );\n\t\t\tvertices.push( x, 0, z );\n\n\t\t\tconst color = ( i & 1 ) ? color1 : color2;\n\n\t\t\tcolors.push( color.r, color.g, color.b );\n\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t}\n\n\t\t// create the circles\n\n\t\tfor ( let i = 0; i <= circles; i ++ ) {\n\n\t\t\tconst color = ( i & 1 ) ? color1 : color2;\n\n\t\t\tconst r = radius - ( radius / circles * i );\n\n\t\t\tfor ( let j = 0; j < divisions; j ++ ) {\n\n\t\t\t\t// first vertex\n\n\t\t\t\tlet v = ( j / divisions ) * ( Math.PI * 2 );\n\n\t\t\t\tlet x = Math.sin( v ) * r;\n\t\t\t\tlet z = Math.cos( v ) * r;\n\n\t\t\t\tvertices.push( x, 0, z );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t\t// second vertex\n\n\t\t\t\tv = ( ( j + 1 ) / divisions ) * ( Math.PI * 2 );\n\n\t\t\t\tx = Math.sin( v ) * r;\n\t\t\t\tz = Math.cos( v ) * r;\n\n\t\t\t\tvertices.push( x, 0, z );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'PolarGridHelper';\n\n\t}\n\n}\n\nconst _v1 = /*@__PURE__*/ new Vector3();\nconst _v2 = /*@__PURE__*/ new Vector3();\nconst _v3 = /*@__PURE__*/ new Vector3();\n\nclass DirectionalLightHelper extends Object3D {\n\n\tconstructor( light, size, color ) {\n\n\t\tsuper();\n\t\tthis.light = light;\n\t\tthis.light.updateMatrixWorld();\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tif ( size === undefined ) size = 1;\n\n\t\tlet geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( [\n\t\t\t- size, size, 0,\n\t\t\tsize, size, 0,\n\t\t\tsize, - size, 0,\n\t\t\t- size, - size, 0,\n\t\t\t- size, size, 0\n\t\t], 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { fog: false, toneMapped: false } );\n\n\t\tthis.lightPlane = new Line( geometry, material );\n\t\tthis.add( this.lightPlane );\n\n\t\tgeometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 0, 1 ], 3 ) );\n\n\t\tthis.targetLine = new Line( geometry, material );\n\t\tthis.add( this.targetLine );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.lightPlane.geometry.dispose();\n\t\tthis.lightPlane.material.dispose();\n\t\tthis.targetLine.geometry.dispose();\n\t\tthis.targetLine.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\t_v1.setFromMatrixPosition( this.light.matrixWorld );\n\t\t_v2.setFromMatrixPosition( this.light.target.matrixWorld );\n\t\t_v3.subVectors( _v2, _v1 );\n\n\t\tthis.lightPlane.lookAt( _v2 );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.lightPlane.material.color.set( this.color );\n\t\t\tthis.targetLine.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.lightPlane.material.color.copy( this.light.color );\n\t\t\tthis.targetLine.material.color.copy( this.light.color );\n\n\t\t}\n\n\t\tthis.targetLine.lookAt( _v2 );\n\t\tthis.targetLine.scale.z = _v3.length();\n\n\t}\n\n}\n\nconst _vector = /*@__PURE__*/ new Vector3();\nconst _camera = /*@__PURE__*/ new Camera();\n\n/**\n *\t- shows frustum, line of sight and up of the camera\n *\t- suitable for fast updates\n * \t- based on frustum visualization in lightgl.js shadowmap example\n *\t\thttp://evanw.github.com/lightgl.js/tests/shadowmap.html\n */\n\nclass CameraHelper extends LineSegments {\n\n\tconstructor( camera ) {\n\n\t\tconst geometry = new BufferGeometry();\n\t\tconst material = new LineBasicMaterial( { color: 0xffffff, vertexColors: true, toneMapped: false } );\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\tconst pointMap = {};\n\n\t\t// colors\n\n\t\tconst colorFrustum = new Color( 0xffaa00 );\n\t\tconst colorCone = new Color( 0xff0000 );\n\t\tconst colorUp = new Color( 0x00aaff );\n\t\tconst colorTarget = new Color( 0xffffff );\n\t\tconst colorCross = new Color( 0x333333 );\n\n\t\t// near\n\n\t\taddLine( 'n1', 'n2', colorFrustum );\n\t\taddLine( 'n2', 'n4', colorFrustum );\n\t\taddLine( 'n4', 'n3', colorFrustum );\n\t\taddLine( 'n3', 'n1', colorFrustum );\n\n\t\t// far\n\n\t\taddLine( 'f1', 'f2', colorFrustum );\n\t\taddLine( 'f2', 'f4', colorFrustum );\n\t\taddLine( 'f4', 'f3', colorFrustum );\n\t\taddLine( 'f3', 'f1', colorFrustum );\n\n\t\t// sides\n\n\t\taddLine( 'n1', 'f1', colorFrustum );\n\t\taddLine( 'n2', 'f2', colorFrustum );\n\t\taddLine( 'n3', 'f3', colorFrustum );\n\t\taddLine( 'n4', 'f4', colorFrustum );\n\n\t\t// cone\n\n\t\taddLine( 'p', 'n1', colorCone );\n\t\taddLine( 'p', 'n2', colorCone );\n\t\taddLine( 'p', 'n3', colorCone );\n\t\taddLine( 'p', 'n4', colorCone );\n\n\t\t// up\n\n\t\taddLine( 'u1', 'u2', colorUp );\n\t\taddLine( 'u2', 'u3', colorUp );\n\t\taddLine( 'u3', 'u1', colorUp );\n\n\t\t// target\n\n\t\taddLine( 'c', 't', colorTarget );\n\t\taddLine( 'p', 'c', colorCross );\n\n\t\t// cross\n\n\t\taddLine( 'cn1', 'cn2', colorCross );\n\t\taddLine( 'cn3', 'cn4', colorCross );\n\n\t\taddLine( 'cf1', 'cf2', colorCross );\n\t\taddLine( 'cf3', 'cf4', colorCross );\n\n\t\tfunction addLine( a, b, color ) {\n\n\t\t\taddPoint( a, color );\n\t\t\taddPoint( b, color );\n\n\t\t}\n\n\t\tfunction addPoint( id, color ) {\n\n\t\t\tvertices.push( 0, 0, 0 );\n\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\tif ( pointMap[ id ] === undefined ) {\n\n\t\t\t\tpointMap[ id ] = [];\n\n\t\t\t}\n\n\t\t\tpointMap[ id ].push( ( vertices.length / 3 ) - 1 );\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'CameraHelper';\n\n\t\tthis.camera = camera;\n\t\tif ( this.camera.updateProjectionMatrix ) this.camera.updateProjectionMatrix();\n\n\t\tthis.matrix = camera.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.pointMap = pointMap;\n\n\t\tthis.update();\n\n\t}\n\n\tupdate() {\n\n\t\tconst geometry = this.geometry;\n\t\tconst pointMap = this.pointMap;\n\n\t\tconst w = 1, h = 1;\n\n\t\t// we need just camera projection matrix inverse\n\t\t// world matrix must be identity\n\n\t\t_camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse );\n\n\t\t// center / target\n\n\t\tsetPoint( 'c', pointMap, geometry, _camera, 0, 0, - 1 );\n\t\tsetPoint( 't', pointMap, geometry, _camera, 0, 0, 1 );\n\n\t\t// near\n\n\t\tsetPoint( 'n1', pointMap, geometry, _camera, - w, - h, - 1 );\n\t\tsetPoint( 'n2', pointMap, geometry, _camera, w, - h, - 1 );\n\t\tsetPoint( 'n3', pointMap, geometry, _camera, - w, h, - 1 );\n\t\tsetPoint( 'n4', pointMap, geometry, _camera, w, h, - 1 );\n\n\t\t// far\n\n\t\tsetPoint( 'f1', pointMap, geometry, _camera, - w, - h, 1 );\n\t\tsetPoint( 'f2', pointMap, geometry, _camera, w, - h, 1 );\n\t\tsetPoint( 'f3', pointMap, geometry, _camera, - w, h, 1 );\n\t\tsetPoint( 'f4', pointMap, geometry, _camera, w, h, 1 );\n\n\t\t// up\n\n\t\tsetPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, - 1 );\n\t\tsetPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, - 1 );\n\t\tsetPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, - 1 );\n\n\t\t// cross\n\n\t\tsetPoint( 'cf1', pointMap, geometry, _camera, - w, 0, 1 );\n\t\tsetPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 );\n\t\tsetPoint( 'cf3', pointMap, geometry, _camera, 0, - h, 1 );\n\t\tsetPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 );\n\n\t\tsetPoint( 'cn1', pointMap, geometry, _camera, - w, 0, - 1 );\n\t\tsetPoint( 'cn2', pointMap, geometry, _camera, w, 0, - 1 );\n\t\tsetPoint( 'cn3', pointMap, geometry, _camera, 0, - h, - 1 );\n\t\tsetPoint( 'cn4', pointMap, geometry, _camera, 0, h, - 1 );\n\n\t\tgeometry.getAttribute( 'position' ).needsUpdate = true;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\n\nfunction setPoint( point, pointMap, geometry, camera, x, y, z ) {\n\n\t_vector.set( x, y, z ).unproject( camera );\n\n\tconst points = pointMap[ point ];\n\n\tif ( points !== undefined ) {\n\n\t\tconst position = geometry.getAttribute( 'position' );\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tposition.setXYZ( points[ i ], _vector.x, _vector.y, _vector.z );\n\n\t\t}\n\n\t}\n\n}\n\nconst _box = /*@__PURE__*/ new Box3();\n\nclass BoxHelper extends LineSegments {\n\n\tconstructor( object, color = 0xffff00 ) {\n\n\t\tconst indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] );\n\t\tconst positions = new Float32Array( 8 * 3 );\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setIndex( new BufferAttribute( indices, 1 ) );\n\t\tgeometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) );\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.object = object;\n\t\tthis.type = 'BoxHelper';\n\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.update();\n\n\t}\n\n\tupdate( object ) {\n\n\t\tif ( object !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.BoxHelper: .update() has no longer arguments.' );\n\n\t\t}\n\n\t\tif ( this.object !== undefined ) {\n\n\t\t\t_box.setFromObject( this.object );\n\n\t\t}\n\n\t\tif ( _box.isEmpty() ) return;\n\n\t\tconst min = _box.min;\n\t\tconst max = _box.max;\n\n\t\t/*\n\t\t\t5____4\n\t\t1/___0/|\n\t\t| 6__|_7\n\t\t2/___3/\n\n\t\t0: max.x, max.y, max.z\n\t\t1: min.x, max.y, max.z\n\t\t2: min.x, min.y, max.z\n\t\t3: max.x, min.y, max.z\n\t\t4: max.x, max.y, min.z\n\t\t5: min.x, max.y, min.z\n\t\t6: min.x, min.y, min.z\n\t\t7: max.x, min.y, min.z\n\t\t*/\n\n\t\tconst position = this.geometry.attributes.position;\n\t\tconst array = position.array;\n\n\t\tarray[ 0 ] = max.x; array[ 1 ] = max.y; array[ 2 ] = max.z;\n\t\tarray[ 3 ] = min.x; array[ 4 ] = max.y; array[ 5 ] = max.z;\n\t\tarray[ 6 ] = min.x; array[ 7 ] = min.y; array[ 8 ] = max.z;\n\t\tarray[ 9 ] = max.x; array[ 10 ] = min.y; array[ 11 ] = max.z;\n\t\tarray[ 12 ] = max.x; array[ 13 ] = max.y; array[ 14 ] = min.z;\n\t\tarray[ 15 ] = min.x; array[ 16 ] = max.y; array[ 17 ] = min.z;\n\t\tarray[ 18 ] = min.x; array[ 19 ] = min.y; array[ 20 ] = min.z;\n\t\tarray[ 21 ] = max.x; array[ 22 ] = min.y; array[ 23 ] = min.z;\n\n\t\tposition.needsUpdate = true;\n\n\t\tthis.geometry.computeBoundingSphere();\n\n\n\t}\n\n\tsetFromObject( object ) {\n\n\t\tthis.object = object;\n\t\tthis.update();\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tLineSegments.prototype.copy.call( this, source );\n\n\t\tthis.object = source.object;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Box3Helper extends LineSegments {\n\n\tconstructor( box, color = 0xffff00 ) {\n\n\t\tconst indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] );\n\n\t\tconst positions = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 1, - 1, 1, - 1, - 1 ];\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tgeometry.setIndex( new BufferAttribute( indices, 1 ) );\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.box = box;\n\n\t\tthis.type = 'Box3Helper';\n\n\t\tthis.geometry.computeBoundingSphere();\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tconst box = this.box;\n\n\t\tif ( box.isEmpty() ) return;\n\n\t\tbox.getCenter( this.position );\n\n\t\tbox.getSize( this.scale );\n\n\t\tthis.scale.multiplyScalar( 0.5 );\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n}\n\nclass PlaneHelper extends Line {\n\n\tconstructor( plane, size = 1, hex = 0xffff00 ) {\n\n\t\tconst color = hex;\n\n\t\tconst positions = [ 1, - 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0 ];\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\t\tgeometry.computeBoundingSphere();\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.type = 'PlaneHelper';\n\n\t\tthis.plane = plane;\n\n\t\tthis.size = size;\n\n\t\tconst positions2 = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, - 1, 1, 1, - 1, 1 ];\n\n\t\tconst geometry2 = new BufferGeometry();\n\t\tgeometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );\n\t\tgeometry2.computeBoundingSphere();\n\n\t\tthis.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false, toneMapped: false } ) ) );\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tlet scale = - this.plane.constant;\n\n\t\tif ( Math.abs( scale ) < 1e-8 ) scale = 1e-8; // sign does not matter\n\n\t\tthis.scale.set( 0.5 * this.size, 0.5 * this.size, scale );\n\n\t\tthis.children[ 0 ].material.side = ( scale < 0 ) ? BackSide : FrontSide; // renderer flips side when determinant < 0; flipping not wanted here\n\n\t\tthis.lookAt( this.plane.normal );\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n}\n\nconst _axis = /*@__PURE__*/ new Vector3();\nlet _lineGeometry, _coneGeometry;\n\nclass ArrowHelper extends Object3D {\n\n\t// dir is assumed to be normalized\n\n\tconstructor( dir = new Vector3( 0, 0, 1 ), origin = new Vector3( 0, 0, 0 ), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ArrowHelper';\n\n\t\tif ( _lineGeometry === undefined ) {\n\n\t\t\t_lineGeometry = new BufferGeometry();\n\t\t\t_lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );\n\n\t\t\t_coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 );\n\t\t\t_coneGeometry.translate( 0, - 0.5, 0 );\n\n\t\t}\n\n\t\tthis.position.copy( origin );\n\n\t\tthis.line = new Line( _lineGeometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\t\tthis.line.matrixAutoUpdate = false;\n\t\tthis.add( this.line );\n\n\t\tthis.cone = new Mesh( _coneGeometry, new MeshBasicMaterial( { color: color, toneMapped: false } ) );\n\t\tthis.cone.matrixAutoUpdate = false;\n\t\tthis.add( this.cone );\n\n\t\tthis.setDirection( dir );\n\t\tthis.setLength( length, headLength, headWidth );\n\n\t}\n\n\tsetDirection( dir ) {\n\n\t\t// dir is assumed to be normalized\n\n\t\tif ( dir.y > 0.99999 ) {\n\n\t\t\tthis.quaternion.set( 0, 0, 0, 1 );\n\n\t\t} else if ( dir.y < - 0.99999 ) {\n\n\t\t\tthis.quaternion.set( 1, 0, 0, 0 );\n\n\t\t} else {\n\n\t\t\t_axis.set( dir.z, 0, - dir.x ).normalize();\n\n\t\t\tconst radians = Math.acos( dir.y );\n\n\t\t\tthis.quaternion.setFromAxisAngle( _axis, radians );\n\n\t\t}\n\n\t}\n\n\tsetLength( length, headLength = length * 0.2, headWidth = headLength * 0.2 ) {\n\n\t\tthis.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // see #17458\n\t\tthis.line.updateMatrix();\n\n\t\tthis.cone.scale.set( headWidth, headLength, headWidth );\n\t\tthis.cone.position.y = length;\n\t\tthis.cone.updateMatrix();\n\n\t}\n\n\tsetColor( color ) {\n\n\t\tthis.line.material.color.set( color );\n\t\tthis.cone.material.color.set( color );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source, false );\n\n\t\tthis.line.copy( source.line );\n\t\tthis.cone.copy( source.cone );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass AxesHelper extends LineSegments {\n\n\tconstructor( size = 1 ) {\n\n\t\tconst vertices = [\n\t\t\t0, 0, 0,\tsize, 0, 0,\n\t\t\t0, 0, 0,\t0, size, 0,\n\t\t\t0, 0, 0,\t0, 0, size\n\t\t];\n\n\t\tconst colors = [\n\t\t\t1, 0, 0,\t1, 0.6, 0,\n\t\t\t0, 1, 0,\t0.6, 1, 0,\n\t\t\t0, 0, 1,\t0, 0.6, 1\n\t\t];\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'AxesHelper';\n\n\t}\n\n\tsetColors( xAxisColor, yAxisColor, zAxisColor ) {\n\n\t\tconst color = new Color();\n\t\tconst array = this.geometry.attributes.color.array;\n\n\t\tcolor.set( xAxisColor );\n\t\tcolor.toArray( array, 0 );\n\t\tcolor.toArray( array, 3 );\n\n\t\tcolor.set( yAxisColor );\n\t\tcolor.toArray( array, 6 );\n\t\tcolor.toArray( array, 9 );\n\n\t\tcolor.set( zAxisColor );\n\t\tcolor.toArray( array, 12 );\n\t\tcolor.toArray( array, 15 );\n\n\t\tthis.geometry.attributes.color.needsUpdate = true;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nconst _floatView = new Float32Array( 1 );\nconst _int32View = new Int32Array( _floatView.buffer );\n\nclass DataUtils {\n\n\t// Converts float32 to float16 (stored as uint16 value).\n\n\tstatic toHalfFloat( val ) {\n\n\t\t// Source: http://gamedev.stackexchange.com/questions/17326/conversion-of-a-number-from-single-precision-floating-point-representation-to-a/17410#17410\n\n\t\t/* This method is faster than the OpenEXR implementation (very often\n\t\t* used, eg. in Ogre), with the additional benefit of rounding, inspired\n\t\t* by James Tursa?s half-precision code. */\n\n\t\t_floatView[ 0 ] = val;\n\t\tconst x = _int32View[ 0 ];\n\n\t\tlet bits = ( x >> 16 ) & 0x8000; /* Get the sign */\n\t\tlet m = ( x >> 12 ) & 0x07ff; /* Keep one extra bit for rounding */\n\t\tconst e = ( x >> 23 ) & 0xff; /* Using int is faster here */\n\n\t\t/* If zero, or denormal, or exponent underflows too much for a denormal\n\t\t\t* half, return signed zero. */\n\t\tif ( e < 103 ) return bits;\n\n\t\t/* If NaN, return NaN. If Inf or exponent overflow, return Inf. */\n\t\tif ( e > 142 ) {\n\n\t\t\tbits |= 0x7c00;\n\t\t\t/* If exponent was 0xff and one mantissa bit was set, it means NaN,\n\t\t\t\t\t\t* not Inf, so make sure we set one mantissa bit too. */\n\t\t\tbits |= ( ( e == 255 ) ? 0 : 1 ) && ( x & 0x007fffff );\n\t\t\treturn bits;\n\n\t\t}\n\n\t\t/* If exponent underflows but not too much, return a denormal */\n\t\tif ( e < 113 ) {\n\n\t\t\tm |= 0x0800;\n\t\t\t/* Extra rounding may overflow and set mantissa to 0 and exponent\n\t\t\t\t* to 1, which is OK. */\n\t\t\tbits |= ( m >> ( 114 - e ) ) + ( ( m >> ( 113 - e ) ) & 1 );\n\t\t\treturn bits;\n\n\t\t}\n\n\t\tbits |= ( ( e - 112 ) << 10 ) | ( m >> 1 );\n\t\t/* Extra rounding. An overflow will set mantissa to 0 and increment\n\t\t\t* the exponent, which is OK. */\n\t\tbits += m & 1;\n\t\treturn bits;\n\n\t}\n\n}\n\nconst LOD_MIN = 4;\nconst LOD_MAX = 8;\nconst SIZE_MAX = Math.pow( 2, LOD_MAX );\n\n// The standard deviations (radians) associated with the extra mips. These are\n// chosen to approximate a Trowbridge-Reitz distribution function times the\n// geometric shadowing function. These sigma values squared must match the\n// variance #defines in cube_uv_reflection_fragment.glsl.js.\nconst EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ];\n\nconst TOTAL_LODS = LOD_MAX - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length;\n\n// The maximum length of the blur for loop. Smaller sigmas will use fewer\n// samples and exit early, but not recompile the shader.\nconst MAX_SAMPLES = 20;\n\nconst ENCODINGS = {\n\t[ LinearEncoding ]: 0,\n\t[ sRGBEncoding ]: 1,\n\t[ RGBEEncoding ]: 2,\n\t[ RGBM7Encoding ]: 3,\n\t[ RGBM16Encoding ]: 4,\n\t[ RGBDEncoding ]: 5,\n\t[ GammaEncoding ]: 6\n};\n\nconst backgroundMaterial = new MeshBasicMaterial( {\n\tside: BackSide,\n\tdepthWrite: false,\n\tdepthTest: false,\n} );\nconst backgroundBox = new Mesh( new BoxGeometry(), backgroundMaterial );\n\nconst _flatCamera = /*@__PURE__*/ new OrthographicCamera();\nconst { _lodPlanes, _sizeLods, _sigmas } = /*@__PURE__*/ _createPlanes();\nconst _clearColor = /*@__PURE__*/ new Color();\nlet _oldTarget = null;\n\n// Golden Ratio\nconst PHI = ( 1 + Math.sqrt( 5 ) ) / 2;\nconst INV_PHI = 1 / PHI;\n\n// Vertices of a dodecahedron (except the opposites, which represent the\n// same axis), used as axis directions evenly spread on a sphere.\nconst _axisDirections = [\n\t/*@__PURE__*/ new Vector3( 1, 1, 1 ),\n\t/*@__PURE__*/ new Vector3( - 1, 1, 1 ),\n\t/*@__PURE__*/ new Vector3( 1, 1, - 1 ),\n\t/*@__PURE__*/ new Vector3( - 1, 1, - 1 ),\n\t/*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ),\n\t/*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ),\n\t/*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ),\n\t/*@__PURE__*/ new Vector3( - INV_PHI, 0, PHI ),\n\t/*@__PURE__*/ new Vector3( PHI, INV_PHI, 0 ),\n\t/*@__PURE__*/ new Vector3( - PHI, INV_PHI, 0 ) ];\n\n/**\n * This class generates a Prefiltered, Mipmapped Radiance Environment Map\n * (PMREM) from a cubeMap environment texture. This allows different levels of\n * blur to be quickly accessed based on material roughness. It is packed into a\n * special CubeUV format that allows us to perform custom interpolation so that\n * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap\n * chain, it only goes down to the LOD_MIN level (above), and then creates extra\n * even more filtered 'mips' at the same LOD_MIN resolution, associated with\n * higher roughness levels. In this way we maintain resolution to smoothly\n * interpolate diffuse lighting while limiting sampling computation.\n *\n * Paper: Fast, Accurate Image-Based Lighting\n * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view\n*/\n\nfunction convertLinearToRGBE( color ) {\n\n\tconst maxComponent = Math.max( color.r, color.g, color.b );\n\tconst fExp = Math.min( Math.max( Math.ceil( Math.log2( maxComponent ) ), - 128.0 ), 127.0 );\n\tcolor.multiplyScalar( Math.pow( 2.0, - fExp ) );\n\n\tconst alpha = ( fExp + 128.0 ) / 255.0;\n\treturn alpha;\n\n}\n\nclass PMREMGenerator {\n\n\tconstructor( renderer ) {\n\n\t\tthis._renderer = renderer;\n\t\tthis._pingPongRenderTarget = null;\n\n\t\tthis._blurMaterial = _getBlurShader( MAX_SAMPLES );\n\t\tthis._equirectShader = null;\n\t\tthis._cubemapShader = null;\n\n\t\tthis._compileMaterial( this._blurMaterial );\n\n\t}\n\n\t/**\n\t * Generates a PMREM from a supplied Scene, which can be faster than using an\n\t * image if networking bandwidth is low. Optional sigma specifies a blur radius\n\t * in radians to be applied to the scene before PMREM generation. Optional near\n\t * and far planes ensure the scene is rendered in its entirety (the cubeCamera\n\t * is placed at the origin).\n\t */\n\tfromScene( scene, sigma = 0, near = 0.1, far = 100 ) {\n\n\t\t_oldTarget = this._renderer.getRenderTarget();\n\t\tconst cubeUVRenderTarget = this._allocateTargets();\n\n\t\tthis._sceneToCubeUV( scene, near, far, cubeUVRenderTarget );\n\t\tif ( sigma > 0 ) {\n\n\t\t\tthis._blur( cubeUVRenderTarget, 0, 0, sigma );\n\n\t\t}\n\n\t\tthis._applyPMREM( cubeUVRenderTarget );\n\t\tthis._cleanup( cubeUVRenderTarget );\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t/**\n\t * Generates a PMREM from an equirectangular texture, which can be either LDR\n\t * (RGBFormat) or HDR (RGBEFormat). The ideal input image size is 1k (1024 x 512),\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */\n\tfromEquirectangular( equirectangular ) {\n\n\t\treturn this._fromTexture( equirectangular );\n\n\t}\n\n\t/**\n\t * Generates a PMREM from an cubemap texture, which can be either LDR\n\t * (RGBFormat) or HDR (RGBEFormat). The ideal input cube size is 256 x 256,\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */\n\tfromCubemap( cubemap ) {\n\n\t\treturn this._fromTexture( cubemap );\n\n\t}\n\n\t/**\n\t * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */\n\tcompileCubemapShader() {\n\n\t\tif ( this._cubemapShader === null ) {\n\n\t\t\tthis._cubemapShader = _getCubemapShader();\n\t\t\tthis._compileMaterial( this._cubemapShader );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */\n\tcompileEquirectangularShader() {\n\n\t\tif ( this._equirectShader === null ) {\n\n\t\t\tthis._equirectShader = _getEquirectShader();\n\t\t\tthis._compileMaterial( this._equirectShader );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,\n\t * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on\n\t * one of them will cause any others to also become unusable.\n\t */\n\tdispose() {\n\n\t\tthis._blurMaterial.dispose();\n\n\t\tif ( this._cubemapShader !== null ) this._cubemapShader.dispose();\n\t\tif ( this._equirectShader !== null ) this._equirectShader.dispose();\n\n\t\tfor ( let i = 0; i < _lodPlanes.length; i ++ ) {\n\n\t\t\t_lodPlanes[ i ].dispose();\n\n\t\t}\n\n\t}\n\n\t// private interface\n\n\t_cleanup( outputTarget ) {\n\n\t\tthis._pingPongRenderTarget.dispose();\n\t\tthis._renderer.setRenderTarget( _oldTarget );\n\t\toutputTarget.scissorTest = false;\n\t\t_setViewport( outputTarget, 0, 0, outputTarget.width, outputTarget.height );\n\n\t}\n\n\t_fromTexture( texture ) {\n\n\t\t_oldTarget = this._renderer.getRenderTarget();\n\t\tconst cubeUVRenderTarget = this._allocateTargets( texture );\n\t\tthis._textureToCubeUV( texture, cubeUVRenderTarget );\n\t\tthis._applyPMREM( cubeUVRenderTarget );\n\t\tthis._cleanup( cubeUVRenderTarget );\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t_allocateTargets( texture ) { // warning: null texture is valid\n\n\t\tconst params = {\n\t\t\tmagFilter: NearestFilter,\n\t\t\tminFilter: NearestFilter,\n\t\t\tgenerateMipmaps: false,\n\t\t\ttype: UnsignedByteType,\n\t\t\tformat: RGBEFormat,\n\t\t\tencoding: _isLDR( texture ) ? texture.encoding : RGBEEncoding,\n\t\t\tdepthBuffer: false\n\t\t};\n\n\t\tconst cubeUVRenderTarget = _createRenderTarget( params );\n\t\tcubeUVRenderTarget.depthBuffer = texture ? false : true;\n\t\tthis._pingPongRenderTarget = _createRenderTarget( params );\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t_compileMaterial( material ) {\n\n\t\tconst tmpMesh = new Mesh( _lodPlanes[ 0 ], material );\n\t\tthis._renderer.compile( tmpMesh, _flatCamera );\n\n\t}\n\n\t_sceneToCubeUV( scene, near, far, cubeUVRenderTarget ) {\n\n\t\tconst fov = 90;\n\t\tconst aspect = 1;\n\t\tconst cubeCamera = new PerspectiveCamera( fov, aspect, near, far );\n\t\tconst upSign = [ 1, - 1, 1, 1, 1, 1 ];\n\t\tconst forwardSign = [ 1, 1, 1, - 1, - 1, - 1 ];\n\t\tconst renderer = this._renderer;\n\n\t\tconst originalAutoClear = renderer.autoClear;\n\t\tconst outputEncoding = renderer.outputEncoding;\n\t\tconst toneMapping = renderer.toneMapping;\n\t\trenderer.getClearColor( _clearColor );\n\n\t\trenderer.toneMapping = NoToneMapping;\n\t\trenderer.outputEncoding = LinearEncoding;\n\t\trenderer.autoClear = false;\n\n\t\tlet useSolidColor = false;\n\t\tconst background = scene.background;\n\t\tif ( background ) {\n\n\t\t\tif ( background.isColor ) {\n\n\t\t\t\tbackgroundMaterial.color.copy( background ).convertSRGBToLinear();\n\t\t\t\tscene.background = null;\n\n\t\t\t\tconst alpha = convertLinearToRGBE( backgroundMaterial.color );\n\t\t\t\tbackgroundMaterial.opacity = alpha;\n\t\t\t\tuseSolidColor = true;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tbackgroundMaterial.color.copy( _clearColor ).convertSRGBToLinear();\n\n\t\t\tconst alpha = convertLinearToRGBE( backgroundMaterial.color );\n\t\t\tbackgroundMaterial.opacity = alpha;\n\t\t\tuseSolidColor = true;\n\n\t\t}\n\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst col = i % 3;\n\t\t\tif ( col == 0 ) {\n\n\t\t\t\tcubeCamera.up.set( 0, upSign[ i ], 0 );\n\t\t\t\tcubeCamera.lookAt( forwardSign[ i ], 0, 0 );\n\n\t\t\t} else if ( col == 1 ) {\n\n\t\t\t\tcubeCamera.up.set( 0, 0, upSign[ i ] );\n\t\t\t\tcubeCamera.lookAt( 0, forwardSign[ i ], 0 );\n\n\t\t\t} else {\n\n\t\t\t\tcubeCamera.up.set( 0, upSign[ i ], 0 );\n\t\t\t\tcubeCamera.lookAt( 0, 0, forwardSign[ i ] );\n\n\t\t\t}\n\n\t\t\t_setViewport( cubeUVRenderTarget,\n\t\t\t\tcol * SIZE_MAX, i > 2 ? SIZE_MAX : 0, SIZE_MAX, SIZE_MAX );\n\t\t\trenderer.setRenderTarget( cubeUVRenderTarget );\n\n\t\t\tif ( useSolidColor ) {\n\n\t\t\t\trenderer.render( backgroundBox, cubeCamera );\n\n\t\t\t}\n\n\t\t\trenderer.render( scene, cubeCamera );\n\n\t\t}\n\n\t\trenderer.toneMapping = toneMapping;\n\t\trenderer.outputEncoding = outputEncoding;\n\t\trenderer.autoClear = originalAutoClear;\n\n\t}\n\n\t_textureToCubeUV( texture, cubeUVRenderTarget ) {\n\n\t\tconst renderer = this._renderer;\n\n\t\tif ( texture.isCubeTexture ) {\n\n\t\t\tif ( this._cubemapShader == null ) {\n\n\t\t\t\tthis._cubemapShader = _getCubemapShader();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( this._equirectShader == null ) {\n\n\t\t\t\tthis._equirectShader = _getEquirectShader();\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst material = texture.isCubeTexture ? this._cubemapShader : this._equirectShader;\n\t\tconst mesh = new Mesh( _lodPlanes[ 0 ], material );\n\n\t\tconst uniforms = material.uniforms;\n\n\t\tuniforms[ 'envMap' ].value = texture;\n\n\t\tif ( ! texture.isCubeTexture ) {\n\n\t\t\tuniforms[ 'texelSize' ].value.set( 1.0 / texture.image.width, 1.0 / texture.image.height );\n\n\t\t}\n\n\t\tuniforms[ 'inputEncoding' ].value = ENCODINGS[ texture.encoding ];\n\t\tuniforms[ 'outputEncoding' ].value = ENCODINGS[ cubeUVRenderTarget.texture.encoding ];\n\n\t\t_setViewport( cubeUVRenderTarget, 0, 0, 3 * SIZE_MAX, 2 * SIZE_MAX );\n\n\t\trenderer.setRenderTarget( cubeUVRenderTarget );\n\t\trenderer.render( mesh, _flatCamera );\n\n\t}\n\n\t_applyPMREM( cubeUVRenderTarget ) {\n\n\t\tconst renderer = this._renderer;\n\t\tconst autoClear = renderer.autoClear;\n\t\trenderer.autoClear = false;\n\n\t\tfor ( let i = 1; i < TOTAL_LODS; i ++ ) {\n\n\t\t\tconst sigma = Math.sqrt( _sigmas[ i ] * _sigmas[ i ] - _sigmas[ i - 1 ] * _sigmas[ i - 1 ] );\n\n\t\t\tconst poleAxis = _axisDirections[ ( i - 1 ) % _axisDirections.length ];\n\n\t\t\tthis._blur( cubeUVRenderTarget, i - 1, i, sigma, poleAxis );\n\n\t\t}\n\n\t\trenderer.autoClear = autoClear;\n\n\t}\n\n\t/**\n\t * This is a two-pass Gaussian blur for a cubemap. Normally this is done\n\t * vertically and horizontally, but this breaks down on a cube. Here we apply\n\t * the blur latitudinally (around the poles), and then longitudinally (towards\n\t * the poles) to approximate the orthogonally-separable blur. It is least\n\t * accurate at the poles, but still does a decent job.\n\t */\n\t_blur( cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis ) {\n\n\t\tconst pingPongRenderTarget = this._pingPongRenderTarget;\n\n\t\tthis._halfBlur(\n\t\t\tcubeUVRenderTarget,\n\t\t\tpingPongRenderTarget,\n\t\t\tlodIn,\n\t\t\tlodOut,\n\t\t\tsigma,\n\t\t\t'latitudinal',\n\t\t\tpoleAxis );\n\n\t\tthis._halfBlur(\n\t\t\tpingPongRenderTarget,\n\t\t\tcubeUVRenderTarget,\n\t\t\tlodOut,\n\t\t\tlodOut,\n\t\t\tsigma,\n\t\t\t'longitudinal',\n\t\t\tpoleAxis );\n\n\t}\n\n\t_halfBlur( targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis ) {\n\n\t\tconst renderer = this._renderer;\n\t\tconst blurMaterial = this._blurMaterial;\n\n\t\tif ( direction !== 'latitudinal' && direction !== 'longitudinal' ) {\n\n\t\t\tconsole.error(\n\t\t\t\t'blur direction must be either latitudinal or longitudinal!' );\n\n\t\t}\n\n\t\t// Number of standard deviations at which to cut off the discrete approximation.\n\t\tconst STANDARD_DEVIATIONS = 3;\n\n\t\tconst blurMesh = new Mesh( _lodPlanes[ lodOut ], blurMaterial );\n\t\tconst blurUniforms = blurMaterial.uniforms;\n\n\t\tconst pixels = _sizeLods[ lodIn ] - 1;\n\t\tconst radiansPerPixel = isFinite( sigmaRadians ) ? Math.PI / ( 2 * pixels ) : 2 * Math.PI / ( 2 * MAX_SAMPLES - 1 );\n\t\tconst sigmaPixels = sigmaRadians / radiansPerPixel;\n\t\tconst samples = isFinite( sigmaRadians ) ? 1 + Math.floor( STANDARD_DEVIATIONS * sigmaPixels ) : MAX_SAMPLES;\n\n\t\tif ( samples > MAX_SAMPLES ) {\n\n\t\t\tconsole.warn( `sigmaRadians, ${\n\t\t\t\tsigmaRadians}, is too large and will clip, as it requested ${\n\t\t\t\tsamples} samples when the maximum is set to ${MAX_SAMPLES}` );\n\n\t\t}\n\n\t\tconst weights = [];\n\t\tlet sum = 0;\n\n\t\tfor ( let i = 0; i < MAX_SAMPLES; ++ i ) {\n\n\t\t\tconst x = i / sigmaPixels;\n\t\t\tconst weight = Math.exp( - x * x / 2 );\n\t\t\tweights.push( weight );\n\n\t\t\tif ( i == 0 ) {\n\n\t\t\t\tsum += weight;\n\n\t\t\t} else if ( i < samples ) {\n\n\t\t\t\tsum += 2 * weight;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let i = 0; i < weights.length; i ++ ) {\n\n\t\t\tweights[ i ] = weights[ i ] / sum;\n\n\t\t}\n\n\t\tblurUniforms[ 'envMap' ].value = targetIn.texture;\n\t\tblurUniforms[ 'samples' ].value = samples;\n\t\tblurUniforms[ 'weights' ].value = weights;\n\t\tblurUniforms[ 'latitudinal' ].value = direction === 'latitudinal';\n\n\t\tif ( poleAxis ) {\n\n\t\t\tblurUniforms[ 'poleAxis' ].value = poleAxis;\n\n\t\t}\n\n\t\tblurUniforms[ 'dTheta' ].value = radiansPerPixel;\n\t\tblurUniforms[ 'mipInt' ].value = LOD_MAX - lodIn;\n\t\tblurUniforms[ 'inputEncoding' ].value = ENCODINGS[ targetIn.texture.encoding ];\n\t\tblurUniforms[ 'outputEncoding' ].value = ENCODINGS[ targetIn.texture.encoding ];\n\n\t\tconst outputSize = _sizeLods[ lodOut ];\n\t\tconst x = 3 * Math.max( 0, SIZE_MAX - 2 * outputSize );\n\t\tconst y = ( lodOut === 0 ? 0 : 2 * SIZE_MAX ) + 2 * outputSize * ( lodOut > LOD_MAX - LOD_MIN ? lodOut - LOD_MAX + LOD_MIN : 0 );\n\n\t\t_setViewport( targetOut, x, y, 3 * outputSize, 2 * outputSize );\n\t\trenderer.setRenderTarget( targetOut );\n\t\trenderer.render( blurMesh, _flatCamera );\n\n\t}\n\n}\n\nfunction _isLDR( texture ) {\n\n\tif ( texture === undefined || texture.type !== UnsignedByteType ) return false;\n\n\treturn texture.encoding === LinearEncoding || texture.encoding === sRGBEncoding || texture.encoding === GammaEncoding;\n\n}\n\nfunction _createPlanes() {\n\n\tconst _lodPlanes = [];\n\tconst _sizeLods = [];\n\tconst _sigmas = [];\n\n\tlet lod = LOD_MAX;\n\n\tfor ( let i = 0; i < TOTAL_LODS; i ++ ) {\n\n\t\tconst sizeLod = Math.pow( 2, lod );\n\t\t_sizeLods.push( sizeLod );\n\t\tlet sigma = 1.0 / sizeLod;\n\n\t\tif ( i > LOD_MAX - LOD_MIN ) {\n\n\t\t\tsigma = EXTRA_LOD_SIGMA[ i - LOD_MAX + LOD_MIN - 1 ];\n\n\t\t} else if ( i == 0 ) {\n\n\t\t\tsigma = 0;\n\n\t\t}\n\n\t\t_sigmas.push( sigma );\n\n\t\tconst texelSize = 1.0 / ( sizeLod - 1 );\n\t\tconst min = - texelSize / 2;\n\t\tconst max = 1 + texelSize / 2;\n\t\tconst uv1 = [ min, min, max, min, max, max, min, min, max, max, min, max ];\n\n\t\tconst cubeFaces = 6;\n\t\tconst vertices = 6;\n\t\tconst positionSize = 3;\n\t\tconst uvSize = 2;\n\t\tconst faceIndexSize = 1;\n\n\t\tconst position = new Float32Array( positionSize * vertices * cubeFaces );\n\t\tconst uv = new Float32Array( uvSize * vertices * cubeFaces );\n\t\tconst faceIndex = new Float32Array( faceIndexSize * vertices * cubeFaces );\n\n\t\tfor ( let face = 0; face < cubeFaces; face ++ ) {\n\n\t\t\tconst x = ( face % 3 ) * 2 / 3 - 1;\n\t\t\tconst y = face > 2 ? 0 : - 1;\n\t\t\tconst coordinates = [\n\t\t\t\tx, y, 0,\n\t\t\t\tx + 2 / 3, y, 0,\n\t\t\t\tx + 2 / 3, y + 1, 0,\n\t\t\t\tx, y, 0,\n\t\t\t\tx + 2 / 3, y + 1, 0,\n\t\t\t\tx, y + 1, 0\n\t\t\t];\n\t\t\tposition.set( coordinates, positionSize * vertices * face );\n\t\t\tuv.set( uv1, uvSize * vertices * face );\n\t\t\tconst fill = [ face, face, face, face, face, face ];\n\t\t\tfaceIndex.set( fill, faceIndexSize * vertices * face );\n\n\t\t}\n\n\t\tconst planes = new BufferGeometry();\n\t\tplanes.setAttribute( 'position', new BufferAttribute( position, positionSize ) );\n\t\tplanes.setAttribute( 'uv', new BufferAttribute( uv, uvSize ) );\n\t\tplanes.setAttribute( 'faceIndex', new BufferAttribute( faceIndex, faceIndexSize ) );\n\t\t_lodPlanes.push( planes );\n\n\t\tif ( lod > LOD_MIN ) {\n\n\t\t\tlod --;\n\n\t\t}\n\n\t}\n\n\treturn { _lodPlanes, _sizeLods, _sigmas };\n\n}\n\nfunction _createRenderTarget( params ) {\n\n\tconst cubeUVRenderTarget = new WebGLRenderTarget( 3 * SIZE_MAX, 3 * SIZE_MAX, params );\n\tcubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping;\n\tcubeUVRenderTarget.texture.name = 'PMREM.cubeUv';\n\tcubeUVRenderTarget.scissorTest = true;\n\treturn cubeUVRenderTarget;\n\n}\n\nfunction _setViewport( target, x, y, width, height ) {\n\n\ttarget.viewport.set( x, y, width, height );\n\ttarget.scissor.set( x, y, width, height );\n\n}\n\nfunction _getBlurShader( maxSamples ) {\n\n\tconst weights = new Float32Array( maxSamples );\n\tconst poleAxis = new Vector3( 0, 1, 0 );\n\tconst shaderMaterial = new RawShaderMaterial( {\n\n\t\tname: 'SphericalGaussianBlur',\n\n\t\tdefines: { 'n': maxSamples },\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'samples': { value: 1 },\n\t\t\t'weights': { value: weights },\n\t\t\t'latitudinal': { value: false },\n\t\t\t'dTheta': { value: 0 },\n\t\t\t'mipInt': { value: 0 },\n\t\t\t'poleAxis': { value: poleAxis },\n\t\t\t'inputEncoding': { value: ENCODINGS[ LinearEncoding ] },\n\t\t\t'outputEncoding': { value: ENCODINGS[ LinearEncoding ] }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t${ _getEncodings() }\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n\treturn shaderMaterial;\n\n}\n\nfunction _getEquirectShader() {\n\n\tconst texelSize = new Vector2( 1, 1 );\n\tconst shaderMaterial = new RawShaderMaterial( {\n\n\t\tname: 'EquirectangularToCubeUV',\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'texelSize': { value: texelSize },\n\t\t\t'inputEncoding': { value: ENCODINGS[ LinearEncoding ] },\n\t\t\t'outputEncoding': { value: ENCODINGS[ LinearEncoding ] }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t${ _getEncodings() }\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n\treturn shaderMaterial;\n\n}\n\nfunction _getCubemapShader() {\n\n\tconst shaderMaterial = new RawShaderMaterial( {\n\n\t\tname: 'CubemapToCubeUV',\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'inputEncoding': { value: ENCODINGS[ LinearEncoding ] },\n\t\t\t'outputEncoding': { value: ENCODINGS[ LinearEncoding ] }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t${ _getEncodings() }\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n\treturn shaderMaterial;\n\n}\n\nfunction _getCommonVertexShader() {\n\n\treturn /* glsl */`\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`;\n\n}\n\nfunction _getEncodings() {\n\n\treturn /* glsl */`\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t`;\n\n}\n\nconst LineStrip = 0;\nconst LinePieces = 1;\nconst NoColors = 0;\nconst FaceColors = 1;\nconst VertexColors = 2;\n\nfunction MeshFaceMaterial( materials ) {\n\n\tconsole.warn( 'THREE.MeshFaceMaterial has been removed. Use an Array instead.' );\n\treturn materials;\n\n}\n\nfunction MultiMaterial( materials = [] ) {\n\n\tconsole.warn( 'THREE.MultiMaterial has been removed. Use an Array instead.' );\n\tmaterials.isMultiMaterial = true;\n\tmaterials.materials = materials;\n\tmaterials.clone = function () {\n\n\t\treturn materials.slice();\n\n\t};\n\n\treturn materials;\n\n}\n\nfunction PointCloud( geometry, material ) {\n\n\tconsole.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );\n\treturn new Points( geometry, material );\n\n}\n\nfunction Particle( material ) {\n\n\tconsole.warn( 'THREE.Particle has been renamed to THREE.Sprite.' );\n\treturn new Sprite( material );\n\n}\n\nfunction ParticleSystem( geometry, material ) {\n\n\tconsole.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );\n\treturn new Points( geometry, material );\n\n}\n\nfunction PointCloudMaterial( parameters ) {\n\n\tconsole.warn( 'THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.' );\n\treturn new PointsMaterial( parameters );\n\n}\n\nfunction ParticleBasicMaterial( parameters ) {\n\n\tconsole.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.' );\n\treturn new PointsMaterial( parameters );\n\n}\n\nfunction ParticleSystemMaterial( parameters ) {\n\n\tconsole.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.' );\n\treturn new PointsMaterial( parameters );\n\n}\n\nfunction Vertex( x, y, z ) {\n\n\tconsole.warn( 'THREE.Vertex has been removed. Use THREE.Vector3 instead.' );\n\treturn new Vector3( x, y, z );\n\n}\n\n//\n\nfunction DynamicBufferAttribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead.' );\n\treturn new BufferAttribute( array, itemSize ).setUsage( DynamicDrawUsage );\n\n}\n\nfunction Int8Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.' );\n\treturn new Int8BufferAttribute( array, itemSize );\n\n}\n\nfunction Uint8Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.' );\n\treturn new Uint8BufferAttribute( array, itemSize );\n\n}\n\nfunction Uint8ClampedAttribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.' );\n\treturn new Uint8ClampedBufferAttribute( array, itemSize );\n\n}\n\nfunction Int16Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.' );\n\treturn new Int16BufferAttribute( array, itemSize );\n\n}\n\nfunction Uint16Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.' );\n\treturn new Uint16BufferAttribute( array, itemSize );\n\n}\n\nfunction Int32Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.' );\n\treturn new Int32BufferAttribute( array, itemSize );\n\n}\n\nfunction Uint32Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.' );\n\treturn new Uint32BufferAttribute( array, itemSize );\n\n}\n\nfunction Float32Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.' );\n\treturn new Float32BufferAttribute( array, itemSize );\n\n}\n\nfunction Float64Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.' );\n\treturn new Float64BufferAttribute( array, itemSize );\n\n}\n\n//\n\nCurve.create = function ( construct, getPoint ) {\n\n\tconsole.log( 'THREE.Curve.create() has been deprecated' );\n\n\tconstruct.prototype = Object.create( Curve.prototype );\n\tconstruct.prototype.constructor = construct;\n\tconstruct.prototype.getPoint = getPoint;\n\n\treturn construct;\n\n};\n\n//\n\nPath.prototype.fromPoints = function ( points ) {\n\n\tconsole.warn( 'THREE.Path: .fromPoints() has been renamed to .setFromPoints().' );\n\treturn this.setFromPoints( points );\n\n};\n\n//\n\nfunction AxisHelper( size ) {\n\n\tconsole.warn( 'THREE.AxisHelper has been renamed to THREE.AxesHelper.' );\n\treturn new AxesHelper( size );\n\n}\n\nfunction BoundingBoxHelper( object, color ) {\n\n\tconsole.warn( 'THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.' );\n\treturn new BoxHelper( object, color );\n\n}\n\nfunction EdgesHelper( object, hex ) {\n\n\tconsole.warn( 'THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.' );\n\treturn new LineSegments( new EdgesGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );\n\n}\n\nGridHelper.prototype.setColors = function () {\n\n\tconsole.error( 'THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.' );\n\n};\n\nSkeletonHelper.prototype.update = function () {\n\n\tconsole.error( 'THREE.SkeletonHelper: update() no longer needs to be called.' );\n\n};\n\nfunction WireframeHelper( object, hex ) {\n\n\tconsole.warn( 'THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.' );\n\treturn new LineSegments( new WireframeGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );\n\n}\n\n//\n\nLoader.prototype.extractUrlBase = function ( url ) {\n\n\tconsole.warn( 'THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.' );\n\treturn LoaderUtils.extractUrlBase( url );\n\n};\n\nLoader.Handlers = {\n\n\tadd: function ( /* regex, loader */ ) {\n\n\t\tconsole.error( 'THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.' );\n\n\t},\n\n\tget: function ( /* file */ ) {\n\n\t\tconsole.error( 'THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.' );\n\n\t}\n\n};\n\nfunction XHRLoader( manager ) {\n\n\tconsole.warn( 'THREE.XHRLoader has been renamed to THREE.FileLoader.' );\n\treturn new FileLoader( manager );\n\n}\n\nfunction BinaryTextureLoader( manager ) {\n\n\tconsole.warn( 'THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.' );\n\treturn new DataTextureLoader( manager );\n\n}\n\n//\n\nBox2.prototype.center = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Box2: .center() has been renamed to .getCenter().' );\n\treturn this.getCenter( optionalTarget );\n\n};\n\nBox2.prototype.empty = function () {\n\n\tconsole.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );\n\treturn this.isEmpty();\n\n};\n\nBox2.prototype.isIntersectionBox = function ( box ) {\n\n\tconsole.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );\n\treturn this.intersectsBox( box );\n\n};\n\nBox2.prototype.size = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Box2: .size() has been renamed to .getSize().' );\n\treturn this.getSize( optionalTarget );\n\n};\n\n//\n\nBox3.prototype.center = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Box3: .center() has been renamed to .getCenter().' );\n\treturn this.getCenter( optionalTarget );\n\n};\n\nBox3.prototype.empty = function () {\n\n\tconsole.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );\n\treturn this.isEmpty();\n\n};\n\nBox3.prototype.isIntersectionBox = function ( box ) {\n\n\tconsole.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );\n\treturn this.intersectsBox( box );\n\n};\n\nBox3.prototype.isIntersectionSphere = function ( sphere ) {\n\n\tconsole.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );\n\treturn this.intersectsSphere( sphere );\n\n};\n\nBox3.prototype.size = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Box3: .size() has been renamed to .getSize().' );\n\treturn this.getSize( optionalTarget );\n\n};\n\n//\n\nSphere.prototype.empty = function () {\n\n\tconsole.warn( 'THREE.Sphere: .empty() has been renamed to .isEmpty().' );\n\treturn this.isEmpty();\n\n};\n\n//\n\nFrustum.prototype.setFromMatrix = function ( m ) {\n\n\tconsole.warn( 'THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().' );\n\treturn this.setFromProjectionMatrix( m );\n\n};\n\n//\n\nLine3.prototype.center = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' );\n\treturn this.getCenter( optionalTarget );\n\n};\n\n//\n\nMatrix3.prototype.flattenToArrayOffset = function ( array, offset ) {\n\n\tconsole.warn( 'THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.' );\n\treturn this.toArray( array, offset );\n\n};\n\nMatrix3.prototype.multiplyVector3 = function ( vector ) {\n\n\tconsole.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );\n\treturn vector.applyMatrix3( this );\n\n};\n\nMatrix3.prototype.multiplyVector3Array = function ( /* a */ ) {\n\n\tconsole.error( 'THREE.Matrix3: .multiplyVector3Array() has been removed.' );\n\n};\n\nMatrix3.prototype.applyToBufferAttribute = function ( attribute ) {\n\n\tconsole.warn( 'THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.' );\n\treturn attribute.applyMatrix3( this );\n\n};\n\nMatrix3.prototype.applyToVector3Array = function ( /* array, offset, length */ ) {\n\n\tconsole.error( 'THREE.Matrix3: .applyToVector3Array() has been removed.' );\n\n};\n\nMatrix3.prototype.getInverse = function ( matrix ) {\n\n\tconsole.warn( 'THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.' );\n\treturn this.copy( matrix ).invert();\n\n};\n\n//\n\nMatrix4.prototype.extractPosition = function ( m ) {\n\n\tconsole.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );\n\treturn this.copyPosition( m );\n\n};\n\nMatrix4.prototype.flattenToArrayOffset = function ( array, offset ) {\n\n\tconsole.warn( 'THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.' );\n\treturn this.toArray( array, offset );\n\n};\n\nMatrix4.prototype.getPosition = function () {\n\n\tconsole.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );\n\treturn new Vector3().setFromMatrixColumn( this, 3 );\n\n};\n\nMatrix4.prototype.setRotationFromQuaternion = function ( q ) {\n\n\tconsole.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );\n\treturn this.makeRotationFromQuaternion( q );\n\n};\n\nMatrix4.prototype.multiplyToArray = function () {\n\n\tconsole.warn( 'THREE.Matrix4: .multiplyToArray() has been removed.' );\n\n};\n\nMatrix4.prototype.multiplyVector3 = function ( vector ) {\n\n\tconsole.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.' );\n\treturn vector.applyMatrix4( this );\n\n};\n\nMatrix4.prototype.multiplyVector4 = function ( vector ) {\n\n\tconsole.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );\n\treturn vector.applyMatrix4( this );\n\n};\n\nMatrix4.prototype.multiplyVector3Array = function ( /* a */ ) {\n\n\tconsole.error( 'THREE.Matrix4: .multiplyVector3Array() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateAxis = function ( v ) {\n\n\tconsole.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );\n\tv.transformDirection( this );\n\n};\n\nMatrix4.prototype.crossVector = function ( vector ) {\n\n\tconsole.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );\n\treturn vector.applyMatrix4( this );\n\n};\n\nMatrix4.prototype.translate = function () {\n\n\tconsole.error( 'THREE.Matrix4: .translate() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateX = function () {\n\n\tconsole.error( 'THREE.Matrix4: .rotateX() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateY = function () {\n\n\tconsole.error( 'THREE.Matrix4: .rotateY() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateZ = function () {\n\n\tconsole.error( 'THREE.Matrix4: .rotateZ() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateByAxis = function () {\n\n\tconsole.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );\n\n};\n\nMatrix4.prototype.applyToBufferAttribute = function ( attribute ) {\n\n\tconsole.warn( 'THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.' );\n\treturn attribute.applyMatrix4( this );\n\n};\n\nMatrix4.prototype.applyToVector3Array = function ( /* array, offset, length */ ) {\n\n\tconsole.error( 'THREE.Matrix4: .applyToVector3Array() has been removed.' );\n\n};\n\nMatrix4.prototype.makeFrustum = function ( left, right, bottom, top, near, far ) {\n\n\tconsole.warn( 'THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.' );\n\treturn this.makePerspective( left, right, top, bottom, near, far );\n\n};\n\nMatrix4.prototype.getInverse = function ( matrix ) {\n\n\tconsole.warn( 'THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.' );\n\treturn this.copy( matrix ).invert();\n\n};\n\n//\n\nPlane.prototype.isIntersectionLine = function ( line ) {\n\n\tconsole.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );\n\treturn this.intersectsLine( line );\n\n};\n\n//\n\nQuaternion.prototype.multiplyVector3 = function ( vector ) {\n\n\tconsole.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );\n\treturn vector.applyQuaternion( this );\n\n};\n\nQuaternion.prototype.inverse = function ( ) {\n\n\tconsole.warn( 'THREE.Quaternion: .inverse() has been renamed to invert().' );\n\treturn this.invert();\n\n};\n\n//\n\nRay.prototype.isIntersectionBox = function ( box ) {\n\n\tconsole.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );\n\treturn this.intersectsBox( box );\n\n};\n\nRay.prototype.isIntersectionPlane = function ( plane ) {\n\n\tconsole.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );\n\treturn this.intersectsPlane( plane );\n\n};\n\nRay.prototype.isIntersectionSphere = function ( sphere ) {\n\n\tconsole.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );\n\treturn this.intersectsSphere( sphere );\n\n};\n\n//\n\nTriangle.prototype.area = function () {\n\n\tconsole.warn( 'THREE.Triangle: .area() has been renamed to .getArea().' );\n\treturn this.getArea();\n\n};\n\nTriangle.prototype.barycoordFromPoint = function ( point, target ) {\n\n\tconsole.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );\n\treturn this.getBarycoord( point, target );\n\n};\n\nTriangle.prototype.midpoint = function ( target ) {\n\n\tconsole.warn( 'THREE.Triangle: .midpoint() has been renamed to .getMidpoint().' );\n\treturn this.getMidpoint( target );\n\n};\n\nTriangle.prototypenormal = function ( target ) {\n\n\tconsole.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );\n\treturn this.getNormal( target );\n\n};\n\nTriangle.prototype.plane = function ( target ) {\n\n\tconsole.warn( 'THREE.Triangle: .plane() has been renamed to .getPlane().' );\n\treturn this.getPlane( target );\n\n};\n\nTriangle.barycoordFromPoint = function ( point, a, b, c, target ) {\n\n\tconsole.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );\n\treturn Triangle.getBarycoord( point, a, b, c, target );\n\n};\n\nTriangle.normal = function ( a, b, c, target ) {\n\n\tconsole.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );\n\treturn Triangle.getNormal( a, b, c, target );\n\n};\n\n//\n\nShape.prototype.extractAllPoints = function ( divisions ) {\n\n\tconsole.warn( 'THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.' );\n\treturn this.extractPoints( divisions );\n\n};\n\nShape.prototype.extrude = function ( options ) {\n\n\tconsole.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );\n\treturn new ExtrudeGeometry( this, options );\n\n};\n\nShape.prototype.makeGeometry = function ( options ) {\n\n\tconsole.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' );\n\treturn new ShapeGeometry( this, options );\n\n};\n\n//\n\nVector2.prototype.fromAttribute = function ( attribute, index, offset ) {\n\n\tconsole.warn( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );\n\treturn this.fromBufferAttribute( attribute, index, offset );\n\n};\n\nVector2.prototype.distanceToManhattan = function ( v ) {\n\n\tconsole.warn( 'THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );\n\treturn this.manhattanDistanceTo( v );\n\n};\n\nVector2.prototype.lengthManhattan = function () {\n\n\tconsole.warn( 'THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().' );\n\treturn this.manhattanLength();\n\n};\n\n//\n\nVector3.prototype.setEulerFromRotationMatrix = function () {\n\n\tconsole.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );\n\n};\n\nVector3.prototype.setEulerFromQuaternion = function () {\n\n\tconsole.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );\n\n};\n\nVector3.prototype.getPositionFromMatrix = function ( m ) {\n\n\tconsole.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );\n\treturn this.setFromMatrixPosition( m );\n\n};\n\nVector3.prototype.getScaleFromMatrix = function ( m ) {\n\n\tconsole.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );\n\treturn this.setFromMatrixScale( m );\n\n};\n\nVector3.prototype.getColumnFromMatrix = function ( index, matrix ) {\n\n\tconsole.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );\n\treturn this.setFromMatrixColumn( matrix, index );\n\n};\n\nVector3.prototype.applyProjection = function ( m ) {\n\n\tconsole.warn( 'THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.' );\n\treturn this.applyMatrix4( m );\n\n};\n\nVector3.prototype.fromAttribute = function ( attribute, index, offset ) {\n\n\tconsole.warn( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );\n\treturn this.fromBufferAttribute( attribute, index, offset );\n\n};\n\nVector3.prototype.distanceToManhattan = function ( v ) {\n\n\tconsole.warn( 'THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );\n\treturn this.manhattanDistanceTo( v );\n\n};\n\nVector3.prototype.lengthManhattan = function () {\n\n\tconsole.warn( 'THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().' );\n\treturn this.manhattanLength();\n\n};\n\n//\n\nVector4.prototype.fromAttribute = function ( attribute, index, offset ) {\n\n\tconsole.warn( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );\n\treturn this.fromBufferAttribute( attribute, index, offset );\n\n};\n\nVector4.prototype.lengthManhattan = function () {\n\n\tconsole.warn( 'THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().' );\n\treturn this.manhattanLength();\n\n};\n\n//\n\nObject3D.prototype.getChildByName = function ( name ) {\n\n\tconsole.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );\n\treturn this.getObjectByName( name );\n\n};\n\nObject3D.prototype.renderDepth = function () {\n\n\tconsole.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );\n\n};\n\nObject3D.prototype.translate = function ( distance, axis ) {\n\n\tconsole.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );\n\treturn this.translateOnAxis( axis, distance );\n\n};\n\nObject3D.prototype.getWorldRotation = function () {\n\n\tconsole.error( 'THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.' );\n\n};\n\nObject3D.prototype.applyMatrix = function ( matrix ) {\n\n\tconsole.warn( 'THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().' );\n\treturn this.applyMatrix4( matrix );\n\n};\n\nObject.defineProperties( Object3D.prototype, {\n\n\teulerOrder: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );\n\t\t\treturn this.rotation.order;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );\n\t\t\tthis.rotation.order = value;\n\n\t\t}\n\t},\n\tuseQuaternion: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );\n\n\t\t}\n\t}\n\n} );\n\nMesh.prototype.setDrawMode = function () {\n\n\tconsole.error( 'THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' );\n\n};\n\nObject.defineProperties( Mesh.prototype, {\n\n\tdrawMode: {\n\t\tget: function () {\n\n\t\t\tconsole.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.' );\n\t\t\treturn TrianglesDrawMode;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' );\n\n\t\t}\n\t}\n\n} );\n\nSkinnedMesh.prototype.initBones = function () {\n\n\tconsole.error( 'THREE.SkinnedMesh: initBones() has been removed.' );\n\n};\n\n//\n\nPerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {\n\n\tconsole.warn( 'THREE.PerspectiveCamera.setLens is deprecated. ' +\n\t\t\t'Use .setFocalLength and .filmGauge for a photographic setup.' );\n\n\tif ( filmGauge !== undefined ) this.filmGauge = filmGauge;\n\tthis.setFocalLength( focalLength );\n\n};\n\n//\n\nObject.defineProperties( Light.prototype, {\n\tonlyShadow: {\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Light: .onlyShadow has been removed.' );\n\n\t\t}\n\t},\n\tshadowCameraFov: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );\n\t\t\tthis.shadow.camera.fov = value;\n\n\t\t}\n\t},\n\tshadowCameraLeft: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );\n\t\t\tthis.shadow.camera.left = value;\n\n\t\t}\n\t},\n\tshadowCameraRight: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );\n\t\t\tthis.shadow.camera.right = value;\n\n\t\t}\n\t},\n\tshadowCameraTop: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );\n\t\t\tthis.shadow.camera.top = value;\n\n\t\t}\n\t},\n\tshadowCameraBottom: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );\n\t\t\tthis.shadow.camera.bottom = value;\n\n\t\t}\n\t},\n\tshadowCameraNear: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );\n\t\t\tthis.shadow.camera.near = value;\n\n\t\t}\n\t},\n\tshadowCameraFar: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );\n\t\t\tthis.shadow.camera.far = value;\n\n\t\t}\n\t},\n\tshadowCameraVisible: {\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );\n\n\t\t}\n\t},\n\tshadowBias: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );\n\t\t\tthis.shadow.bias = value;\n\n\t\t}\n\t},\n\tshadowDarkness: {\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowDarkness has been removed.' );\n\n\t\t}\n\t},\n\tshadowMapWidth: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );\n\t\t\tthis.shadow.mapSize.width = value;\n\n\t\t}\n\t},\n\tshadowMapHeight: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );\n\t\t\tthis.shadow.mapSize.height = value;\n\n\t\t}\n\t}\n} );\n\n//\n\nObject.defineProperties( BufferAttribute.prototype, {\n\n\tlength: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );\n\t\t\treturn this.array.length;\n\n\t\t}\n\t},\n\tdynamic: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );\n\t\t\treturn this.usage === DynamicDrawUsage;\n\n\t\t},\n\t\tset: function ( /* value */ ) {\n\n\t\t\tconsole.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );\n\t\t\tthis.setUsage( DynamicDrawUsage );\n\n\t\t}\n\t}\n\n} );\n\nBufferAttribute.prototype.setDynamic = function ( value ) {\n\n\tconsole.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' );\n\tthis.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );\n\treturn this;\n\n};\n\nBufferAttribute.prototype.copyIndicesArray = function ( /* indices */ ) {\n\n\tconsole.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );\n\n},\n\nBufferAttribute.prototype.setArray = function ( /* array */ ) {\n\n\tconsole.error( 'THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );\n\n};\n\n//\n\nBufferGeometry.prototype.addIndex = function ( index ) {\n\n\tconsole.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );\n\tthis.setIndex( index );\n\n};\n\nBufferGeometry.prototype.addAttribute = function ( name, attribute ) {\n\n\tconsole.warn( 'THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().' );\n\n\tif ( ! ( attribute && attribute.isBufferAttribute ) && ! ( attribute && attribute.isInterleavedBufferAttribute ) ) {\n\n\t\tconsole.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );\n\n\t\treturn this.setAttribute( name, new BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) );\n\n\t}\n\n\tif ( name === 'index' ) {\n\n\t\tconsole.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );\n\t\tthis.setIndex( attribute );\n\n\t\treturn this;\n\n\t}\n\n\treturn this.setAttribute( name, attribute );\n\n};\n\nBufferGeometry.prototype.addDrawCall = function ( start, count, indexOffset ) {\n\n\tif ( indexOffset !== undefined ) {\n\n\t\tconsole.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );\n\n\t}\n\n\tconsole.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );\n\tthis.addGroup( start, count );\n\n};\n\nBufferGeometry.prototype.clearDrawCalls = function () {\n\n\tconsole.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );\n\tthis.clearGroups();\n\n};\n\nBufferGeometry.prototype.computeOffsets = function () {\n\n\tconsole.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );\n\n};\n\nBufferGeometry.prototype.removeAttribute = function ( name ) {\n\n\tconsole.warn( 'THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute().' );\n\n\treturn this.deleteAttribute( name );\n\n};\n\nBufferGeometry.prototype.applyMatrix = function ( matrix ) {\n\n\tconsole.warn( 'THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().' );\n\treturn this.applyMatrix4( matrix );\n\n};\n\nObject.defineProperties( BufferGeometry.prototype, {\n\n\tdrawcalls: {\n\t\tget: function () {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );\n\t\t\treturn this.groups;\n\n\t\t}\n\t},\n\toffsets: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );\n\t\t\treturn this.groups;\n\n\t\t}\n\t}\n\n} );\n\nInterleavedBuffer.prototype.setDynamic = function ( value ) {\n\n\tconsole.warn( 'THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.' );\n\tthis.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );\n\treturn this;\n\n};\n\nInterleavedBuffer.prototype.setArray = function ( /* array */ ) {\n\n\tconsole.error( 'THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );\n\n};\n\n//\n\nExtrudeGeometry.prototype.getArrays = function () {\n\n\tconsole.error( 'THREE.ExtrudeGeometry: .getArrays() has been removed.' );\n\n};\n\nExtrudeGeometry.prototype.addShapeList = function () {\n\n\tconsole.error( 'THREE.ExtrudeGeometry: .addShapeList() has been removed.' );\n\n};\n\nExtrudeGeometry.prototype.addShape = function () {\n\n\tconsole.error( 'THREE.ExtrudeGeometry: .addShape() has been removed.' );\n\n};\n\n//\n\nScene.prototype.dispose = function () {\n\n\tconsole.error( 'THREE.Scene: .dispose() has been removed.' );\n\n};\n\n//\n\nUniform.prototype.onUpdate = function () {\n\n\tconsole.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' );\n\treturn this;\n\n};\n\n//\n\nObject.defineProperties( Material.prototype, {\n\n\twrapAround: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .wrapAround has been removed.' );\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .wrapAround has been removed.' );\n\n\t\t}\n\t},\n\n\toverdraw: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .overdraw has been removed.' );\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .overdraw has been removed.' );\n\n\t\t}\n\t},\n\n\twrapRGB: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .wrapRGB has been removed.' );\n\t\t\treturn new Color();\n\n\t\t}\n\t},\n\n\tshading: {\n\t\tget: function () {\n\n\t\t\tconsole.error( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );\n\t\t\tthis.flatShading = ( value === FlatShading );\n\n\t\t}\n\t},\n\n\tstencilMask: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' );\n\t\t\treturn this.stencilFuncMask;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' );\n\t\t\tthis.stencilFuncMask = value;\n\n\t\t}\n\t}\n\n} );\n\nObject.defineProperties( ShaderMaterial.prototype, {\n\n\tderivatives: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );\n\t\t\treturn this.extensions.derivatives;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );\n\t\t\tthis.extensions.derivatives = value;\n\n\t\t}\n\t}\n\n} );\n\n//\n\nWebGLRenderer.prototype.clearTarget = function ( renderTarget, color, depth, stencil ) {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.' );\n\tthis.setRenderTarget( renderTarget );\n\tthis.clear( color, depth, stencil );\n\n};\n\nWebGLRenderer.prototype.animate = function ( callback ) {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .animate() is now .setAnimationLoop().' );\n\tthis.setAnimationLoop( callback );\n\n};\n\nWebGLRenderer.prototype.getCurrentRenderTarget = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().' );\n\treturn this.getRenderTarget();\n\n};\n\nWebGLRenderer.prototype.getMaxAnisotropy = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().' );\n\treturn this.capabilities.getMaxAnisotropy();\n\n};\n\nWebGLRenderer.prototype.getPrecision = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.' );\n\treturn this.capabilities.precision;\n\n};\n\nWebGLRenderer.prototype.resetGLState = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .resetGLState() is now .state.reset().' );\n\treturn this.state.reset();\n\n};\n\nWebGLRenderer.prototype.supportsFloatTextures = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \\'OES_texture_float\\' ).' );\n\treturn this.extensions.get( 'OES_texture_float' );\n\n};\n\nWebGLRenderer.prototype.supportsHalfFloatTextures = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \\'OES_texture_half_float\\' ).' );\n\treturn this.extensions.get( 'OES_texture_half_float' );\n\n};\n\nWebGLRenderer.prototype.supportsStandardDerivatives = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \\'OES_standard_derivatives\\' ).' );\n\treturn this.extensions.get( 'OES_standard_derivatives' );\n\n};\n\nWebGLRenderer.prototype.supportsCompressedTextureS3TC = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \\'WEBGL_compressed_texture_s3tc\\' ).' );\n\treturn this.extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n};\n\nWebGLRenderer.prototype.supportsCompressedTexturePVRTC = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \\'WEBGL_compressed_texture_pvrtc\\' ).' );\n\treturn this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n};\n\nWebGLRenderer.prototype.supportsBlendMinMax = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \\'EXT_blend_minmax\\' ).' );\n\treturn this.extensions.get( 'EXT_blend_minmax' );\n\n};\n\nWebGLRenderer.prototype.supportsVertexTextures = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.' );\n\treturn this.capabilities.vertexTextures;\n\n};\n\nWebGLRenderer.prototype.supportsInstancedArrays = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \\'ANGLE_instanced_arrays\\' ).' );\n\treturn this.extensions.get( 'ANGLE_instanced_arrays' );\n\n};\n\nWebGLRenderer.prototype.enableScissorTest = function ( boolean ) {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' );\n\tthis.setScissorTest( boolean );\n\n};\n\nWebGLRenderer.prototype.initMaterial = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.addPrePlugin = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.addPostPlugin = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.updateShadowMap = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.setFaceCulling = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .setFaceCulling() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.allocTextureUnit = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .allocTextureUnit() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.setTexture = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .setTexture() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.setTexture2D = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .setTexture2D() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.setTextureCube = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .setTextureCube() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.getActiveMipMapLevel = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().' );\n\treturn this.getActiveMipmapLevel();\n\n};\n\nObject.defineProperties( WebGLRenderer.prototype, {\n\n\tshadowMapEnabled: {\n\t\tget: function () {\n\n\t\t\treturn this.shadowMap.enabled;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );\n\t\t\tthis.shadowMap.enabled = value;\n\n\t\t}\n\t},\n\tshadowMapType: {\n\t\tget: function () {\n\n\t\t\treturn this.shadowMap.type;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );\n\t\t\tthis.shadowMap.type = value;\n\n\t\t}\n\t},\n\tshadowMapCullFace: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' );\n\t\t\treturn undefined;\n\n\t\t},\n\t\tset: function ( /* value */ ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' );\n\n\t\t}\n\t},\n\tcontext: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .context has been removed. Use .getContext() instead.' );\n\t\t\treturn this.getContext();\n\n\t\t}\n\t},\n\tvr: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .vr has been renamed to .xr' );\n\t\t\treturn this.xr;\n\n\t\t}\n\t},\n\tgammaInput: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.' );\n\t\t\treturn false;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.' );\n\n\t\t}\n\t},\n\tgammaOutput: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.' );\n\t\t\treturn false;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.' );\n\t\t\tthis.outputEncoding = ( value === true ) ? sRGBEncoding : LinearEncoding;\n\n\t\t}\n\t},\n\ttoneMappingWhitePoint: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.' );\n\t\t\treturn 1.0;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.' );\n\n\t\t}\n\t},\n\n} );\n\nObject.defineProperties( WebGLShadowMap.prototype, {\n\n\tcullFace: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' );\n\t\t\treturn undefined;\n\n\t\t},\n\t\tset: function ( /* cullFace */ ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' );\n\n\t\t}\n\t},\n\trenderReverseSided: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' );\n\t\t\treturn undefined;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' );\n\n\t\t}\n\t},\n\trenderSingleSided: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' );\n\t\t\treturn undefined;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' );\n\n\t\t}\n\t}\n\n} );\n\nfunction WebGLRenderTargetCube( width, height, options ) {\n\n\tconsole.warn( 'THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).' );\n\treturn new WebGLCubeRenderTarget( width, options );\n\n}\n\n//\n\nObject.defineProperties( WebGLRenderTarget.prototype, {\n\n\twrapS: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );\n\t\t\treturn this.texture.wrapS;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );\n\t\t\tthis.texture.wrapS = value;\n\n\t\t}\n\t},\n\twrapT: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );\n\t\t\treturn this.texture.wrapT;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );\n\t\t\tthis.texture.wrapT = value;\n\n\t\t}\n\t},\n\tmagFilter: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );\n\t\t\treturn this.texture.magFilter;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );\n\t\t\tthis.texture.magFilter = value;\n\n\t\t}\n\t},\n\tminFilter: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );\n\t\t\treturn this.texture.minFilter;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );\n\t\t\tthis.texture.minFilter = value;\n\n\t\t}\n\t},\n\tanisotropy: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );\n\t\t\treturn this.texture.anisotropy;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );\n\t\t\tthis.texture.anisotropy = value;\n\n\t\t}\n\t},\n\toffset: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );\n\t\t\treturn this.texture.offset;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );\n\t\t\tthis.texture.offset = value;\n\n\t\t}\n\t},\n\trepeat: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );\n\t\t\treturn this.texture.repeat;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );\n\t\t\tthis.texture.repeat = value;\n\n\t\t}\n\t},\n\tformat: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );\n\t\t\treturn this.texture.format;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );\n\t\t\tthis.texture.format = value;\n\n\t\t}\n\t},\n\ttype: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );\n\t\t\treturn this.texture.type;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );\n\t\t\tthis.texture.type = value;\n\n\t\t}\n\t},\n\tgenerateMipmaps: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );\n\t\t\treturn this.texture.generateMipmaps;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );\n\t\t\tthis.texture.generateMipmaps = value;\n\n\t\t}\n\t}\n\n} );\n\n//\n\nAudio.prototype.load = function ( file ) {\n\n\tconsole.warn( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' );\n\tconst scope = this;\n\tconst audioLoader = new AudioLoader();\n\taudioLoader.load( file, function ( buffer ) {\n\n\t\tscope.setBuffer( buffer );\n\n\t} );\n\treturn this;\n\n};\n\n\nAudioAnalyser.prototype.getData = function () {\n\n\tconsole.warn( 'THREE.AudioAnalyser: .getData() is now .getFrequencyData().' );\n\treturn this.getFrequencyData();\n\n};\n\n//\n\nCubeCamera.prototype.updateCubeMap = function ( renderer, scene ) {\n\n\tconsole.warn( 'THREE.CubeCamera: .updateCubeMap() is now .update().' );\n\treturn this.update( renderer, scene );\n\n};\n\nCubeCamera.prototype.clear = function ( renderer, color, depth, stencil ) {\n\n\tconsole.warn( 'THREE.CubeCamera: .clear() is now .renderTarget.clear().' );\n\treturn this.renderTarget.clear( renderer, color, depth, stencil );\n\n};\n\nImageUtils.crossOrigin = undefined;\n\nImageUtils.loadTexture = function ( url, mapping, onLoad, onError ) {\n\n\tconsole.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );\n\n\tconst loader = new TextureLoader();\n\tloader.setCrossOrigin( this.crossOrigin );\n\n\tconst texture = loader.load( url, onLoad, undefined, onError );\n\n\tif ( mapping ) texture.mapping = mapping;\n\n\treturn texture;\n\n};\n\nImageUtils.loadTextureCube = function ( urls, mapping, onLoad, onError ) {\n\n\tconsole.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );\n\n\tconst loader = new CubeTextureLoader();\n\tloader.setCrossOrigin( this.crossOrigin );\n\n\tconst texture = loader.load( urls, onLoad, undefined, onError );\n\n\tif ( mapping ) texture.mapping = mapping;\n\n\treturn texture;\n\n};\n\nImageUtils.loadCompressedTexture = function () {\n\n\tconsole.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' );\n\n};\n\nImageUtils.loadCompressedTextureCube = function () {\n\n\tconsole.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' );\n\n};\n\n//\n\nfunction CanvasRenderer() {\n\n\tconsole.error( 'THREE.CanvasRenderer has been removed' );\n\n}\n\n//\n\nfunction JSONLoader() {\n\n\tconsole.error( 'THREE.JSONLoader has been removed.' );\n\n}\n\n//\n\nconst SceneUtils = {\n\n\tcreateMultiMaterialObject: function ( /* geometry, materials */ ) {\n\n\t\tconsole.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );\n\n\t},\n\n\tdetach: function ( /* child, parent, scene */ ) {\n\n\t\tconsole.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );\n\n\t},\n\n\tattach: function ( /* child, scene, parent */ ) {\n\n\t\tconsole.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );\n\n\t}\n\n};\n\n//\n\nfunction LensFlare() {\n\n\tconsole.error( 'THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js' );\n\n}\n\nif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t/* eslint-disable no-undef */\n\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: {\n\t\trevision: REVISION,\n\t} } ) );\n\t/* eslint-enable no-undef */\n\n}\n\nif ( typeof window !== 'undefined' ) {\n\n\tif ( window.__THREE__ ) {\n\n\t\tconsole.warn( 'WARNING: Multiple instances of Three.js being imported.' );\n\n\t} else {\n\n\t\twindow.__THREE__ = REVISION;\n\n\t}\n\n}\n\nexport { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightProbe, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, AxisHelper, BackSide, BasicDepthPacking, BasicShadowMap, BinaryTextureLoader, Bone, BooleanKeyframeTrack, BoundingBoxHelper, Box2, Box3, Box3Helper, BoxGeometry as BoxBufferGeometry, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasRenderer, CanvasTexture, CatmullRomCurve3, CineonToneMapping, CircleGeometry as CircleBufferGeometry, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, CompressedTexture, CompressedTextureLoader, ConeGeometry as ConeBufferGeometry, ConeGeometry, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubeUVRefractionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry as CylinderBufferGeometry, CylinderGeometry, Cylindrical, DataTexture, DataTexture2DArray, DataTexture3D, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry as DodecahedronBufferGeometry, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicBufferAttribute, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EdgesHelper, EllipseCurve, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry as ExtrudeBufferGeometry, ExtrudeGeometry, FaceColors, FileLoader, FlatShading, Float16BufferAttribute, Float32Attribute, Float32BufferAttribute, Float64Attribute, Float64BufferAttribute, FloatType, Fog, FogExp2, Font, FontLoader, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GammaEncoding, GreaterDepth, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, HemisphereLightProbe, IcosahedronGeometry as IcosahedronBufferGeometry, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, ImmediateRenderObject, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16Attribute, Int16BufferAttribute, Int32Attribute, Int32BufferAttribute, Int8Attribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, JSONLoader, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry as LatheBufferGeometry, LatheGeometry, Layers, LensFlare, LessDepth, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LinePieces, LineSegments, LineStrip, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearToneMapping, Loader, LoaderUtils, LoadingManager, LogLuvEncoding, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils as Math, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshFaceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiMaterial, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverDepth, NeverStencilFunc, NoBlending, NoColors, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry as OctahedronBufferGeometry, OctahedronGeometry, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, ParametricGeometry as ParametricBufferGeometry, ParametricGeometry, Particle, ParticleBasicMaterial, ParticleSystem, ParticleSystemMaterial, Path, PerspectiveCamera, Plane, PlaneGeometry as PlaneBufferGeometry, PlaneGeometry, PlaneHelper, PointCloud, PointCloudMaterial, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry as PolyhedronBufferGeometry, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDEncoding, RGBEEncoding, RGBEFormat, RGBFormat, RGBIntegerFormat, RGBM16Encoding, RGBM7Encoding, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry as RingBufferGeometry, RingGeometry, SRGB8_ALPHA8_ASTC_10x10_Format, SRGB8_ALPHA8_ASTC_10x5_Format, SRGB8_ALPHA8_ASTC_10x6_Format, SRGB8_ALPHA8_ASTC_10x8_Format, SRGB8_ALPHA8_ASTC_12x10_Format, SRGB8_ALPHA8_ASTC_12x12_Format, SRGB8_ALPHA8_ASTC_4x4_Format, SRGB8_ALPHA8_ASTC_5x4_Format, SRGB8_ALPHA8_ASTC_5x5_Format, SRGB8_ALPHA8_ASTC_6x5_Format, SRGB8_ALPHA8_ASTC_6x6_Format, SRGB8_ALPHA8_ASTC_8x5_Format, SRGB8_ALPHA8_ASTC_8x6_Format, SRGB8_ALPHA8_ASTC_8x8_Format, Scene, SceneUtils, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry as ShapeBufferGeometry, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, SmoothShading, Sphere, SphereGeometry as SphereBufferGeometry, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry as TetrahedronBufferGeometry, TetrahedronGeometry, TextGeometry as TextBufferGeometry, TextGeometry, Texture, TextureLoader, TorusGeometry as TorusBufferGeometry, TorusGeometry, TorusKnotGeometry as TorusKnotBufferGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry as TubeBufferGeometry, TubeGeometry, UVMapping, Uint16Attribute, Uint16BufferAttribute, Uint32Attribute, Uint32BufferAttribute, Uint8Attribute, Uint8BufferAttribute, Uint8ClampedAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShort565Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, Vertex, VertexColors, VideoTexture, WebGL1Renderer, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLMultisampleRenderTarget, WebGLRenderTarget, WebGLRenderTargetCube, WebGLRenderer, WebGLUtils, WireframeGeometry, WireframeHelper, WrapAroundEnding, XHRLoader, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, sRGBEncoding };\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport css from '../StyleSheet/css';\nimport * as forwardedProps from '../../modules/forwardedProps';\nimport pick from '../../modules/pick';\nimport useElementLayout from '../../modules/useElementLayout';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport useResponderEvents from '../../modules/useResponderEvents';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from '../Text/TextAncestorContext';\n\nvar forwardPropsList = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, forwardedProps.defaultProps), forwardedProps.accessibilityProps), forwardedProps.clickProps), forwardedProps.focusProps), forwardedProps.keyboardProps), forwardedProps.mouseProps), forwardedProps.touchProps), forwardedProps.styleProps), {}, {\n href: true,\n lang: true,\n onScroll: true,\n onWheel: true,\n pointerEvents: true\n});\n\nvar pickProps = function pickProps(props) {\n return pick(props, forwardPropsList);\n};\n\nvar View = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var hrefAttrs = props.hrefAttrs,\n onLayout = props.onLayout,\n onMoveShouldSetResponder = props.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = props.onMoveShouldSetResponderCapture,\n onResponderEnd = props.onResponderEnd,\n onResponderGrant = props.onResponderGrant,\n onResponderMove = props.onResponderMove,\n onResponderReject = props.onResponderReject,\n onResponderRelease = props.onResponderRelease,\n onResponderStart = props.onResponderStart,\n onResponderTerminate = props.onResponderTerminate,\n onResponderTerminationRequest = props.onResponderTerminationRequest,\n onScrollShouldSetResponder = props.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = props.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = props.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = props.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = props.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture;\n\n if (process.env.NODE_ENV !== 'production') {\n React.Children.toArray(props.children).forEach(function (item) {\n if (typeof item === 'string') {\n console.error(\"Unexpected text node: \" + item + \". A text node cannot be a child of a <View>.\");\n }\n });\n }\n\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hostRef = React.useRef(null);\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder: onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture,\n onResponderEnd: onResponderEnd,\n onResponderGrant: onResponderGrant,\n onResponderMove: onResponderMove,\n onResponderReject: onResponderReject,\n onResponderRelease: onResponderRelease,\n onResponderStart: onResponderStart,\n onResponderTerminate: onResponderTerminate,\n onResponderTerminationRequest: onResponderTerminationRequest,\n onScrollShouldSetResponder: onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture: onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder: onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture: onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder: onStartShouldSetResponder,\n onStartShouldSetResponderCapture: onStartShouldSetResponderCapture\n });\n var style = StyleSheet.compose(hasTextAncestor && styles.inline, props.style);\n var supportedProps = pickProps(props);\n supportedProps.classList = classList;\n supportedProps.style = style;\n\n if (props.href != null && hrefAttrs != null) {\n var download = hrefAttrs.download,\n rel = hrefAttrs.rel,\n target = hrefAttrs.target;\n\n if (download != null) {\n supportedProps.download = download;\n }\n\n if (rel != null) {\n supportedProps.rel = rel;\n }\n\n if (typeof target === 'string') {\n supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;\n }\n }\n\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n supportedProps.ref = setRef;\n return createElement('div', supportedProps);\n});\nView.displayName = 'View';\nvar classes = css.create({\n view: {\n alignItems: 'stretch',\n border: '0 solid black',\n boxSizing: 'border-box',\n display: 'flex',\n flexBasis: 'auto',\n flexDirection: 'column',\n flexShrink: 0,\n margin: 0,\n minHeight: 0,\n minWidth: 0,\n padding: 0,\n position: 'relative',\n zIndex: 0\n }\n});\nvar classList = [classes.view];\nvar styles = StyleSheet.create({\n inline: {\n display: 'inline-flex'\n }\n});\nexport default View;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n'use strict';\n\nvar validateFormat = process.env.NODE_ENV !== \"production\" ? function (format) {\n if (format === undefined) {\n throw new Error('invariant(...): Second argument must be a string.');\n }\n} : function (format) {};\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments to provide\n * information about what broke and what you were expecting.\n *\n * The invariant message will be stripped in production, but the invariant will\n * remain to ensure logic does not differ in production.\n */\n\nfunction invariant(condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n validateFormat(format);\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return String(args[argIndex++]);\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // Skip invariant's own stack frame.\n\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport ReactNativePropRegistry from './ReactNativePropRegistry';\nimport flattenStyle from './flattenStyle';\nimport validate from './validate';\nvar absoluteFillObject = {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n};\nvar absoluteFill = ReactNativePropRegistry.register(absoluteFillObject);\nvar StyleSheet = {\n absoluteFill: absoluteFill,\n absoluteFillObject: absoluteFillObject,\n compose: function compose(style1, style2) {\n if (process.env.NODE_ENV !== 'production') {\n /* eslint-disable prefer-rest-params */\n var len = arguments.length;\n\n if (len > 2) {\n var readableStyles = Array.prototype.slice.call(arguments).map(function (a) {\n return flattenStyle(a);\n });\n throw new Error(\"StyleSheet.compose() only accepts 2 arguments, received \" + len + \": \" + JSON.stringify(readableStyles));\n }\n /* eslint-enable prefer-rest-params */\n\n }\n\n if (style1 && style2) {\n return [style1, style2];\n } else {\n return style1 || style2;\n }\n },\n create: function create(styles) {\n var result = {};\n Object.keys(styles).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n validate(key, styles);\n }\n\n var id = styles[key] && ReactNativePropRegistry.register(styles[key]);\n result[key] = id;\n });\n return result;\n },\n flatten: flattenStyle,\n // `hairlineWidth` is not implemented using screen density as browsers may\n // round sub-pixel values down to `0`, causing the line not to be rendered.\n hairlineWidth: 1\n};\nexport default StyleSheet;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport StyleSheet from './StyleSheet'; // allow original component styles to be inspected in React Dev Tools\n\nif (canUseDOM && window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {\n window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle = StyleSheet.flatten;\n}\n\nexport default StyleSheet;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","module.exports = require(\"regenerator-runtime\");\n","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar Platform = {\n OS: 'web',\n select: function select(obj) {\n return 'web' in obj ? obj.web : obj.default;\n },\n\n get isTesting() {\n if (process.env.NODE_ENV === 'test') {\n return true;\n }\n\n return false;\n }\n\n};\nexport default Platform;","var niceErrors = {\n 0: \"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'\",\n 1: function _(annotationType, key) {\n return \"Cannot apply '\" + annotationType + \"' to '\" + key.toString() + \"': Field not found.\";\n },\n 5: \"'keys()' can only be used on observable objects, arrays, sets and maps\",\n 6: \"'values()' can only be used on observable objects, arrays, sets and maps\",\n 7: \"'entries()' can only be used on observable objects, arrays and maps\",\n 8: \"'set()' can only be used on observable objects, arrays and maps\",\n 9: \"'remove()' can only be used on observable objects, arrays and maps\",\n 10: \"'has()' can only be used on observable objects, arrays and maps\",\n 11: \"'get()' can only be used on observable objects, arrays and maps\",\n 12: \"Invalid annotation\",\n 13: \"Dynamic observable objects cannot be frozen\",\n 14: \"Intercept handlers should return nothing or a change object\",\n 15: \"Observable arrays cannot be frozen\",\n 16: \"Modification exception: the internal structure of an observable array was changed.\",\n 17: function _(index, length) {\n return \"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + length;\n },\n 18: \"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js\",\n 19: function _(other) {\n return \"Cannot initialize from classes that inherit from Map: \" + other.constructor.name;\n },\n 20: function _(other) {\n return \"Cannot initialize map from \" + other;\n },\n 21: function _(dataStructure) {\n return \"Cannot convert to map from '\" + dataStructure + \"'\";\n },\n 22: \"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js\",\n 23: \"It is not possible to get index atoms from arrays\",\n 24: function _(thing) {\n return \"Cannot obtain administration from \" + thing;\n },\n 25: function _(property, name) {\n return \"the entry '\" + property + \"' does not exist in the observable map '\" + name + \"'\";\n },\n 26: \"please specify a property\",\n 27: function _(property, name) {\n return \"no observable property '\" + property.toString() + \"' found on the observable object '\" + name + \"'\";\n },\n 28: function _(thing) {\n return \"Cannot obtain atom from \" + thing;\n },\n 29: \"Expecting some object\",\n 30: \"invalid action stack. did you forget to finish an action?\",\n 31: \"missing option for computed: get\",\n 32: function _(name, derivation) {\n return \"Cycle detected in computation \" + name + \": \" + derivation;\n },\n 33: function _(name) {\n return \"The setter of computed value '\" + name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\";\n },\n 34: function _(name) {\n return \"[ComputedValue '\" + name + \"'] It is not possible to assign a new value to a computed value.\";\n },\n 35: \"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\",\n 36: \"isolateGlobalState should be called before MobX is running any reactions\",\n 37: function _(method) {\n return \"[mobx] `observableArray.\" + method + \"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice().\" + method + \"()` instead\";\n }\n};\nvar errors = process.env.NODE_ENV !== \"production\" ? niceErrors : {};\nfunction die(error) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n var e = typeof error === \"string\" ? error : errors[error];\n if (typeof e === \"function\") e = e.apply(null, args);\n throw new Error(\"[MobX] \" + e);\n }\n\n throw new Error(typeof error === \"number\" ? \"[MobX] minified error nr: \" + error + (args.length ? \" \" + args.map(String).join(\",\") : \"\") + \". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts\" : \"[MobX] \" + error);\n}\n\nvar mockGlobal = {};\nfunction getGlobal() {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n\n if (typeof window !== \"undefined\") {\n return window;\n }\n\n if (typeof global !== \"undefined\") {\n return global;\n }\n\n if (typeof self !== \"undefined\") {\n return self;\n }\n\n return mockGlobal;\n}\n\nvar assign = Object.assign;\nvar getDescriptor = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar objectPrototype = Object.prototype;\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nvar EMPTY_OBJECT = {};\nObject.freeze(EMPTY_OBJECT);\nvar hasProxy = typeof Proxy !== \"undefined\";\nvar plainObjectString = /*#__PURE__*/Object.toString();\nfunction assertProxies() {\n if (!hasProxy) {\n die(process.env.NODE_ENV !== \"production\" ? \"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`\" : \"Proxy not available\");\n }\n}\nfunction warnAboutProxyRequirement(msg) {\n if (process.env.NODE_ENV !== \"production\" && globalState.verifyProxies) {\n die(\"MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to \" + msg);\n }\n}\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\n/**\r\n * Makes sure that the provided function is invoked at most once.\r\n */\n\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked) return;\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function noop() {};\nfunction isFunction(fn) {\n return typeof fn === \"function\";\n}\nfunction isStringish(value) {\n var t = typeof value;\n\n switch (t) {\n case \"string\":\n case \"symbol\":\n case \"number\":\n return true;\n }\n\n return false;\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n var _proto$constructor;\n\n if (!isObject(value)) return false;\n var proto = Object.getPrototypeOf(value);\n if (proto == null) return true;\n return ((_proto$constructor = proto.constructor) == null ? void 0 : _proto$constructor.toString()) === plainObjectString;\n} // https://stackoverflow.com/a/37865170\n\nfunction isGenerator(obj) {\n var constructor = obj == null ? void 0 : obj.constructor;\n if (!constructor) return false;\n if (\"GeneratorFunction\" === constructor.name || \"GeneratorFunction\" === constructor.displayName) return true;\n return false;\n}\nfunction addHiddenProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction createInstanceofPredicate(name, theClass) {\n var propName = \"isMobX\" + name;\n theClass.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\nfunction isES6Map(thing) {\n return thing instanceof Map;\n}\nfunction isES6Set(thing) {\n return thing instanceof Set;\n}\nvar hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== \"undefined\";\n/**\r\n * Returns the following: own enumerable keys and symbols.\r\n */\n\nfunction getPlainObjectKeys(object) {\n var keys = Object.keys(object); // Not supported in IE, so there are not going to be symbol props anyway...\n\n if (!hasGetOwnPropertySymbols) return keys;\n var symbols = Object.getOwnPropertySymbols(object);\n if (!symbols.length) return keys;\n return [].concat(keys, symbols.filter(function (s) {\n return objectPrototype.propertyIsEnumerable.call(object, s);\n }));\n} // From Immer utils\n// Returns all own keys, including non-enumerable and symbolic\n\nvar ownKeys = typeof Reflect !== \"undefined\" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {\n return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));\n} :\n/* istanbul ignore next */\nObject.getOwnPropertyNames;\nfunction stringifyKey(key) {\n if (typeof key === \"string\") return key;\n if (typeof key === \"symbol\") return key.toString();\n return new String(key).toString();\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? \"\" + value : value;\n}\nfunction hasProp(target, prop) {\n return objectPrototype.hasOwnProperty.call(target, prop);\n} // From Immer utils\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(target) {\n // Polyfill needed for Hermes and IE, see https://github.com/facebook/hermes/issues/274\n var res = {}; // Note: without polyfill for ownKeys, symbols won't be picked up\n\n ownKeys(target).forEach(function (key) {\n res[key] = getDescriptor(target, key);\n });\n return res;\n};\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n}\n\nvar storedAnnotationsSymbol = /*#__PURE__*/Symbol(\"mobx-stored-annotations\");\n/**\r\n * Creates a function that acts as\r\n * - decorator\r\n * - annotation object\r\n */\n\nfunction createDecoratorAnnotation(annotation) {\n function decorator(target, property) {\n storeAnnotation(target, property, annotation);\n }\n\n return Object.assign(decorator, annotation);\n}\n/**\r\n * Stores annotation to prototype,\r\n * so it can be inspected later by `makeObservable` called from constructor\r\n */\n\nfunction storeAnnotation(prototype, key, annotation) {\n if (!hasProp(prototype, storedAnnotationsSymbol)) {\n addHiddenProp(prototype, storedAnnotationsSymbol, _extends({}, prototype[storedAnnotationsSymbol]));\n } // @override must override something\n\n\n if (process.env.NODE_ENV !== \"production\" && isOverride(annotation) && !hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n die(\"'\" + fieldName + \"' is decorated with 'override', \" + \"but no such decorated member was found on prototype.\");\n } // Cannot re-decorate\n\n\n assertNotDecorated(prototype, annotation, key); // Ignore override\n\n if (!isOverride(annotation)) {\n prototype[storedAnnotationsSymbol][key] = annotation;\n }\n}\n\nfunction assertNotDecorated(prototype, annotation, key) {\n if (process.env.NODE_ENV !== \"production\" && !isOverride(annotation) && hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '@\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already decorated with '@\" + currentAnnotationType + \"'.\") + \"\\nRe-decorating fields is not allowed.\" + \"\\nUse '@override' decorator for methods overriden by subclass.\");\n }\n}\n/**\r\n * Collects annotations from prototypes and stores them on target (instance)\r\n */\n\n\nfunction collectStoredAnnotations(target) {\n if (!hasProp(target, storedAnnotationsSymbol)) {\n if (process.env.NODE_ENV !== \"production\" && !target[storedAnnotationsSymbol]) {\n die(\"No annotations were passed to makeObservable, but no decorated members have been found either\");\n } // We need a copy as we will remove annotation from the list once it's applied.\n\n\n addHiddenProp(target, storedAnnotationsSymbol, _extends({}, target[storedAnnotationsSymbol]));\n }\n\n return target[storedAnnotationsSymbol];\n}\n\nvar $mobx = /*#__PURE__*/Symbol(\"mobx administration\");\nvar Atom = /*#__PURE__*/function () {\n // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n\n /**\r\n * Create a new atom. For debugging purposes it is recommended to give it a name.\r\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\r\n */\n function Atom(name_) {\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"Atom@\" + getNextId() : \"Atom\";\n }\n\n this.name_ = void 0;\n this.isPendingUnobservation_ = false;\n this.isBeingObserved_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.NOT_TRACKING_;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n this.name_ = name_;\n } // onBecomeObservedListeners\n\n\n var _proto = Atom.prototype;\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Invoke this method to notify mobx that your atom has been used somehow.\r\n * Returns true if there is currently a reactive context.\r\n */\n ;\n\n _proto.reportObserved = function reportObserved$1() {\n return reportObserved(this);\n }\n /**\r\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\r\n */\n ;\n\n _proto.reportChanged = function reportChanged() {\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n\n _proto.toString = function toString() {\n return this.name_;\n };\n\n return Atom;\n}();\nvar isAtom = /*#__PURE__*/createInstanceofPredicate(\"Atom\", Atom);\nfunction createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (onBecomeObservedHandler === void 0) {\n onBecomeObservedHandler = noop;\n }\n\n if (onBecomeUnobservedHandler === void 0) {\n onBecomeUnobservedHandler = noop;\n }\n\n var atom = new Atom(name); // default `noop` listener will not initialize the hook Set\n\n if (onBecomeObservedHandler !== noop) {\n onBecomeObserved(atom, onBecomeObservedHandler);\n }\n\n if (onBecomeUnobservedHandler !== noop) {\n onBecomeUnobserved(atom, onBecomeUnobservedHandler);\n }\n\n return atom;\n}\n\nfunction identityComparer(a, b) {\n return a === b;\n}\n\nfunction structuralComparer(a, b) {\n return deepEqual(a, b);\n}\n\nfunction shallowComparer(a, b) {\n return deepEqual(a, b, 1);\n}\n\nfunction defaultComparer(a, b) {\n return Object.is(a, b);\n}\n\nvar comparer = {\n identity: identityComparer,\n structural: structuralComparer,\n \"default\": defaultComparer,\n shallow: shallowComparer\n};\n\nfunction deepEnhancer(v, _, name) {\n // it is an observable already, done\n if (isObservable(v)) return v; // something that can be converted and mutated?\n\n if (Array.isArray(v)) return observable.array(v, {\n name: name\n });\n if (isPlainObject(v)) return observable.object(v, undefined, {\n name: name\n });\n if (isES6Map(v)) return observable.map(v, {\n name: name\n });\n if (isES6Set(v)) return observable.set(v, {\n name: name\n });\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (v === undefined || v === null) return v;\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v)) return v;\n if (Array.isArray(v)) return observable.array(v, {\n name: name,\n deep: false\n });\n if (isPlainObject(v)) return observable.object(v, undefined, {\n name: name,\n deep: false\n });\n if (isES6Map(v)) return observable.map(v, {\n name: name,\n deep: false\n });\n if (isES6Set(v)) return observable.set(v, {\n name: name,\n deep: false\n });\n if (process.env.NODE_ENV !== \"production\") die(\"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\");\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction refStructEnhancer(v, oldValue) {\n if (process.env.NODE_ENV !== \"production\" && isObservable(v)) die(\"observable.struct should not be used with observable values\");\n if (deepEqual(v, oldValue)) return oldValue;\n return v;\n}\n\nvar OVERRIDE = \"override\";\nvar override = /*#__PURE__*/createDecoratorAnnotation({\n annotationType_: OVERRIDE,\n make_: make_,\n extend_: extend_\n});\nfunction isOverride(annotation) {\n return annotation.annotationType_ === OVERRIDE;\n}\n\nfunction make_(adm, key) {\n // Must not be plain object\n if (process.env.NODE_ENV !== \"production\" && adm.isPlainObject_) {\n die(\"Cannot apply '\" + this.annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + this.annotationType_ + \"' cannot be used on plain objects.\"));\n } // Must override something\n\n\n if (process.env.NODE_ENV !== \"production\" && !hasProp(adm.appliedAnnotations_, key)) {\n die(\"'\" + adm.name_ + \".\" + key.toString() + \"' is annotated with '\" + this.annotationType_ + \"', \" + \"but no such annotated member was found on prototype.\");\n }\n}\n\nfunction extend_(adm, key, descriptor, proxyTrap) {\n die(\"'\" + this.annotationType_ + \"' can only be used with 'makeObservable'\");\n}\n\nfunction createActionAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$1,\n extend_: extend_$1\n };\n}\n\nfunction make_$1(adm, key) {\n var _this$options_$bound, _this$options_, _adm$target_$storedAn;\n\n var annotated = false;\n var source = adm.target_;\n var bound = (_this$options_$bound = (_this$options_ = this.options_) == null ? void 0 : _this$options_.bound) != null ? _this$options_$bound : false;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n // Instance or bound\n // Keep first because the operation can be intercepted\n // and we don't want to end up with partially annotated proto chain\n if (source === adm.target_ || bound) {\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor);\n var definePropertyOutcome = adm.defineProperty_(key, actionDescriptor);\n\n if (!definePropertyOutcome) {\n // Intercepted\n return;\n }\n\n annotated = true; // Don't annotate protos if bound\n\n if (bound) {\n break;\n }\n } // Prototype\n\n\n if (source !== adm.target_) {\n if (isAction(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n annotated = true;\n break;\n }\n\n var _actionDescriptor = createActionDescriptor(adm, this, key, descriptor, false);\n\n defineProperty(source, key, _actionDescriptor);\n annotated = true;\n }\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n if (annotated) {\n recordAnnotationApplied(adm, this, key);\n } else if (!((_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? void 0 : _adm$target_$storedAn[key])) {\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n die(1, this.annotationType_, adm.name_ + \".\" + key.toString());\n }\n}\n\nfunction extend_$1(adm, key, descriptor, proxyTrap) {\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, actionDescriptor, proxyTrap);\n}\n\nfunction assertActionDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if (process.env.NODE_ENV !== \"production\" && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a function value.\"));\n }\n}\n\nfunction createActionDescriptor(adm, annotation, key, descriptor, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n var _annotation$options_, _annotation$options_$, _annotation$options_2, _annotation$options_$2, _annotation$options_3;\n\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertActionDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n\n if ((_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.bound) {\n var _adm$proxy_;\n\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return {\n value: createAction((_annotation$options_$ = (_annotation$options_2 = annotation.options_) == null ? void 0 : _annotation$options_2.name) != null ? _annotation$options_$ : key.toString(), value, (_annotation$options_$2 = (_annotation$options_3 = annotation.options_) == null ? void 0 : _annotation$options_3.autoAction) != null ? _annotation$options_$2 : false),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createFlowAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$2,\n extend_: extend_$2\n };\n}\n\nfunction make_$2(adm, key) {\n var _adm$target_$storedAn;\n\n var annotated = false;\n var source = adm.target_;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n if (source !== adm.target_) {\n // Prototype\n if (isFlow(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n annotated = true;\n break;\n }\n\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, false);\n defineProperty(source, key, flowDescriptor);\n } else {\n var _flowDescriptor = createFlowDescriptor(adm, this, key, descriptor);\n\n var definePropertyOutcome = adm.defineProperty_(key, _flowDescriptor);\n\n if (!definePropertyOutcome) {\n // Intercepted\n return;\n }\n }\n\n annotated = true;\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n if (annotated) {\n recordAnnotationApplied(adm, this, key);\n } else if (!((_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? void 0 : _adm$target_$storedAn[key])) {\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n die(1, this.annotationType_, adm.name_ + \".\" + key.toString());\n }\n}\n\nfunction extend_$2(adm, key, descriptor, proxyTrap) {\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, flowDescriptor, proxyTrap);\n}\n\nfunction assertFlowDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if (process.env.NODE_ENV !== \"production\" && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a generator function value.\"));\n }\n}\n\nfunction createFlowDescriptor(adm, annotation, key, descriptor, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertFlowDescriptor(adm, annotation, key, descriptor);\n return {\n value: flow(descriptor.value),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createComputedAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$3,\n extend_: extend_$3\n };\n}\n\nfunction make_$3(adm, key) {\n var _adm$target_$storedAn;\n\n var source = adm.target_;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n assertComputedDescriptor(adm, this, key, descriptor);\n var definePropertyOutcome = adm.defineComputedProperty_(key, _extends({}, this.options_, {\n get: descriptor.get,\n set: descriptor.set\n }));\n\n if (!definePropertyOutcome) {\n // Intercepted\n return;\n }\n\n recordAnnotationApplied(adm, this, key);\n return;\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n if (!((_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? void 0 : _adm$target_$storedAn[key])) {\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n die(1, this.annotationType_, adm.name_ + \".\" + key.toString());\n }\n}\n\nfunction extend_$3(adm, key, descriptor, proxyTrap) {\n assertComputedDescriptor(adm, this, key, descriptor);\n return adm.defineComputedProperty_(key, _extends({}, this.options_, {\n get: descriptor.get,\n set: descriptor.set\n }), proxyTrap);\n}\n\nfunction assertComputedDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var get = _ref2.get;\n\n if (process.env.NODE_ENV !== \"production\" && !get) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on getter(+setter) properties.\"));\n }\n}\n\nfunction createObservableAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$4,\n extend_: extend_$4\n };\n}\n\nfunction make_$4(adm, key) {\n var _adm$target_$storedAn;\n\n var source = adm.target_; // Copy props from proto as well, see test:\n // \"decorate should work with Object.create\"\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n var _this$options_$enhanc, _this$options_;\n\n assertObservableDescriptor(adm, this, key, descriptor);\n var definePropertyOutcome = adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc = (_this$options_ = this.options_) == null ? void 0 : _this$options_.enhancer) != null ? _this$options_$enhanc : deepEnhancer);\n\n if (!definePropertyOutcome) {\n // Intercepted\n return;\n }\n\n recordAnnotationApplied(adm, this, key);\n return;\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n if (!((_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? void 0 : _adm$target_$storedAn[key])) {\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n die(1, this.annotationType_, adm.name_ + \".\" + key.toString());\n }\n}\n\nfunction extend_$4(adm, key, descriptor, proxyTrap) {\n var _this$options_$enhanc2, _this$options_2;\n\n assertObservableDescriptor(adm, this, key, descriptor);\n return adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc2 = (_this$options_2 = this.options_) == null ? void 0 : _this$options_2.enhancer) != null ? _this$options_$enhanc2 : deepEnhancer, proxyTrap);\n}\n\nfunction assertObservableDescriptor(adm, _ref, key, descriptor) {\n var annotationType_ = _ref.annotationType_;\n\n if (process.env.NODE_ENV !== \"production\" && !(\"value\" in descriptor)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' cannot be used on getter/setter properties\"));\n }\n}\n\n// in the majority of cases\n\nvar defaultCreateObservableOptions = {\n deep: true,\n name: undefined,\n defaultDecorator: undefined,\n proxy: true\n};\nObject.freeze(defaultCreateObservableOptions);\nfunction asCreateObservableOptions(thing) {\n return thing || defaultCreateObservableOptions;\n}\nvar observableAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable\");\nvar observableRefAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.ref\", {\n enhancer: referenceEnhancer\n});\nvar observableShallowAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.shallow\", {\n enhancer: shallowEnhancer\n});\nvar observableStructAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.struct\", {\n enhancer: refStructEnhancer\n});\nvar observableDecoratorAnnotation = /*#__PURE__*/createDecoratorAnnotation(observableAnnotation);\nfunction getEnhancerFromOptions(options) {\n return options.deep === true ? deepEnhancer : options.deep === false ? referenceEnhancer : getEnhancerFromAnnotation(options.defaultDecorator);\n}\nfunction getAnnotationFromOptions(options) {\n return options ? options.deep === true ? observableAnnotation : options.deep === false ? observableRefAnnotation : options.defaultDecorator : undefined;\n}\nfunction getEnhancerFromAnnotation(annotation) {\n var _annotation$options_$, _annotation$options_;\n\n return !annotation ? deepEnhancer : (_annotation$options_$ = (_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.enhancer) != null ? _annotation$options_$ : deepEnhancer;\n}\n/**\r\n * Turns an object, array or function into a reactive structure.\r\n * @param v the value which should become observable.\r\n */\n\nfunction createObservable(v, arg2, arg3) {\n // @observable someProp;\n if (isStringish(arg2)) {\n storeAnnotation(v, arg2, observableAnnotation);\n return;\n } // already observable - ignore\n\n\n if (isObservable(v)) return v; // plain object\n\n if (isPlainObject(v)) return observable.object(v, arg2, arg3); // Array\n\n if (Array.isArray(v)) return observable.array(v, arg2); // Map\n\n if (isES6Map(v)) return observable.map(v, arg2); // Set\n\n if (isES6Set(v)) return observable.set(v, arg2); // other object - ignore\n\n if (typeof v === \"object\" && v !== null) return v; // anything else\n\n return observable.box(v, arg2);\n}\n\nObject.assign(createObservable, observableDecoratorAnnotation);\nvar observableFactories = {\n box: function box(value, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals);\n },\n array: function array(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return (globalState.useProxies === false || o.proxy === false ? createLegacyArray : createObservableArray)(initialValues, getEnhancerFromOptions(o), o.name);\n },\n map: function map(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableMap(initialValues, getEnhancerFromOptions(o), o.name);\n },\n set: function set(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableSet(initialValues, getEnhancerFromOptions(o), o.name);\n },\n object: function object(props, decorators, options) {\n return extendObservable(globalState.useProxies === false || (options == null ? void 0 : options.proxy) === false ? asObservableObject({}, options) : asDynamicObservableObject({}, options), props, decorators);\n },\n ref: /*#__PURE__*/createDecoratorAnnotation(observableRefAnnotation),\n shallow: /*#__PURE__*/createDecoratorAnnotation(observableShallowAnnotation),\n deep: observableDecoratorAnnotation,\n struct: /*#__PURE__*/createDecoratorAnnotation(observableStructAnnotation)\n}; // eslint-disable-next-line\n\nvar observable = /*#__PURE__*/assign(createObservable, observableFactories);\n\nvar COMPUTED = \"computed\";\nvar COMPUTED_STRUCT = \"computed.struct\";\nvar computedAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED);\nvar computedStructAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED_STRUCT, {\n equals: comparer.structural\n});\n/**\r\n * Decorator for class properties: @computed get value() { return expr; }.\r\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\r\n */\n\nvar computed = function computed(arg1, arg2) {\n if (isStringish(arg2)) {\n // @computed\n return storeAnnotation(arg1, arg2, computedAnnotation);\n }\n\n if (isPlainObject(arg1)) {\n // @computed({ options })\n return createDecoratorAnnotation(createComputedAnnotation(COMPUTED, arg1));\n } // computed(expr, options?)\n\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(arg1)) die(\"First argument to `computed` should be an expression.\");\n if (isFunction(arg2)) die(\"A setter as second argument is no longer supported, use `{ set: fn }` option instead\");\n }\n\n var opts = isPlainObject(arg2) ? arg2 : {};\n opts.get = arg1;\n opts.name || (opts.name = arg1.name || \"\");\n /* for generated name */\n\n return new ComputedValue(opts);\n};\nObject.assign(computed, computedAnnotation);\ncomputed.struct = /*#__PURE__*/createDecoratorAnnotation(computedStructAnnotation);\n\nvar _getDescriptor$config, _getDescriptor;\n// mobx versions\n\nvar currentActionId = 0;\nvar nextActionId = 1;\nvar isFunctionNameConfigurable = (_getDescriptor$config = (_getDescriptor = /*#__PURE__*/getDescriptor(function () {}, \"name\")) == null ? void 0 : _getDescriptor.configurable) != null ? _getDescriptor$config : false; // we can safely recycle this object\n\nvar tmpNameDescriptor = {\n value: \"action\",\n configurable: true,\n writable: false,\n enumerable: false\n};\nfunction createAction(actionName, fn, autoAction, ref) {\n if (autoAction === void 0) {\n autoAction = false;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(fn)) die(\"`action` can only be invoked on functions\");\n if (typeof actionName !== \"string\" || !actionName) die(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n\n function res() {\n return executeAction(actionName, autoAction, fn, ref || this, arguments);\n }\n\n res.isMobxAction = true;\n\n if (isFunctionNameConfigurable) {\n tmpNameDescriptor.value = actionName;\n Object.defineProperty(res, \"name\", tmpNameDescriptor);\n }\n\n return res;\n}\nfunction executeAction(actionName, canRunAsDerivation, fn, scope, args) {\n var runInfo = _startAction(actionName, canRunAsDerivation, scope, args);\n\n try {\n return fn.apply(scope, args);\n } catch (err) {\n runInfo.error_ = err;\n throw err;\n } finally {\n _endAction(runInfo);\n }\n}\nfunction _startAction(actionName, canRunAsDerivation, // true for autoAction\nscope, args) {\n var notifySpy_ = process.env.NODE_ENV !== \"production\" && isSpyEnabled() && !!actionName;\n var startTime_ = 0;\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy_) {\n startTime_ = Date.now();\n var flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY;\n spyReportStart({\n type: ACTION,\n name: actionName,\n object: scope,\n arguments: flattenedArgs\n });\n }\n\n var prevDerivation_ = globalState.trackingDerivation;\n var runAsAction = !canRunAsDerivation || !prevDerivation_;\n startBatch();\n var prevAllowStateChanges_ = globalState.allowStateChanges; // by default preserve previous allow\n\n if (runAsAction) {\n untrackedStart();\n prevAllowStateChanges_ = allowStateChangesStart(true);\n }\n\n var prevAllowStateReads_ = allowStateReadsStart(true);\n var runInfo = {\n runAsAction_: runAsAction,\n prevDerivation_: prevDerivation_,\n prevAllowStateChanges_: prevAllowStateChanges_,\n prevAllowStateReads_: prevAllowStateReads_,\n notifySpy_: notifySpy_,\n startTime_: startTime_,\n actionId_: nextActionId++,\n parentActionId_: currentActionId\n };\n currentActionId = runInfo.actionId_;\n return runInfo;\n}\nfunction _endAction(runInfo) {\n if (currentActionId !== runInfo.actionId_) {\n die(30);\n }\n\n currentActionId = runInfo.parentActionId_;\n\n if (runInfo.error_ !== undefined) {\n globalState.suppressReactionErrors = true;\n }\n\n allowStateChangesEnd(runInfo.prevAllowStateChanges_);\n allowStateReadsEnd(runInfo.prevAllowStateReads_);\n endBatch();\n if (runInfo.runAsAction_) untrackedEnd(runInfo.prevDerivation_);\n\n if (process.env.NODE_ENV !== \"production\" && runInfo.notifySpy_) {\n spyReportEnd({\n time: Date.now() - runInfo.startTime_\n });\n }\n\n globalState.suppressReactionErrors = false;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n var prev = allowStateChangesStart(allowStateChanges);\n\n try {\n return func();\n } finally {\n allowStateChangesEnd(prev);\n }\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\n\nvar _Symbol$toPrimitive;\nvar CREATE = \"create\";\n_Symbol$toPrimitive = Symbol.toPrimitive;\nvar ObservableValue = /*#__PURE__*/function (_Atom) {\n _inheritsLoose(ObservableValue, _Atom);\n\n function ObservableValue(value, enhancer, name_, notifySpy, equals) {\n var _this;\n\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableValue@\" + getNextId() : \"ObservableValue\";\n }\n\n if (notifySpy === void 0) {\n notifySpy = true;\n }\n\n if (equals === void 0) {\n equals = comparer[\"default\"];\n }\n\n _this = _Atom.call(this, name_) || this;\n _this.enhancer = void 0;\n _this.name_ = void 0;\n _this.equals = void 0;\n _this.hasUnreportedChange_ = false;\n _this.interceptors_ = void 0;\n _this.changeListeners_ = void 0;\n _this.value_ = void 0;\n _this.dehancer = void 0;\n _this.enhancer = enhancer;\n _this.name_ = name_;\n _this.equals = equals;\n _this.value_ = enhancer(value, undefined, name_);\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy && isSpyEnabled()) {\n // only notify spy if this is a stand-alone observable\n spyReport({\n type: CREATE,\n object: _assertThisInitialized(_this),\n observableKind: \"value\",\n debugObjectName: _this.name_,\n newValue: \"\" + _this.value_\n });\n }\n\n return _this;\n }\n\n var _proto = ObservableValue.prototype;\n\n _proto.dehanceValue = function dehanceValue(value) {\n if (this.dehancer !== undefined) return this.dehancer(value);\n return value;\n };\n\n _proto.set = function set(newValue) {\n var oldValue = this.value_;\n newValue = this.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart({\n type: UPDATE,\n object: this,\n observableKind: \"value\",\n debugObjectName: this.name_,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n\n this.setNewValue_(newValue);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n };\n\n _proto.prepareNewValue_ = function prepareNewValue_(newValue) {\n checkIfStateModificationsAreAllowed(this);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this,\n type: UPDATE,\n newValue: newValue\n });\n if (!change) return globalState.UNCHANGED;\n newValue = change.newValue;\n } // apply modifier\n\n\n newValue = this.enhancer(newValue, this.value_, this.name_);\n return this.equals(this.value_, newValue) ? globalState.UNCHANGED : newValue;\n };\n\n _proto.setNewValue_ = function setNewValue_(newValue) {\n var oldValue = this.value_;\n this.value_ = newValue;\n this.reportChanged();\n\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: UPDATE,\n object: this,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n };\n\n _proto.get = function get() {\n this.reportObserved();\n return this.dehanceValue(this.value_);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately) listener({\n observableKind: \"value\",\n debugObjectName: this.name_,\n object: this,\n type: UPDATE,\n newValue: this.value_,\n oldValue: undefined\n });\n return registerListener(this, listener);\n };\n\n _proto.raw = function raw() {\n // used by MST ot get undehanced value\n return this.value_;\n };\n\n _proto.toJSON = function toJSON() {\n return this.get();\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.value_ + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive] = function () {\n return this.valueOf();\n };\n\n return ObservableValue;\n}(Atom);\nvar isObservableValue = /*#__PURE__*/createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\nvar _Symbol$toPrimitive$1;\n/**\r\n * A node in the state dependency root that observes other nodes, and can be observed itself.\r\n *\r\n * ComputedValue will remember the result of the computation for the duration of the batch, or\r\n * while being observed.\r\n *\r\n * During this time it will recompute only when one of its direct dependencies changed,\r\n * but only when it is being accessed with `ComputedValue.get()`.\r\n *\r\n * Implementation description:\r\n * 1. First time it's being accessed it will compute and remember result\r\n * give back remembered result until 2. happens\r\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\r\n * 3. When it's being accessed, recompute if any shallow dependency changed.\r\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\r\n * go to step 2. either way\r\n *\r\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\r\n */\n\n_Symbol$toPrimitive$1 = Symbol.toPrimitive;\nvar ComputedValue = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n // during tracking it's an array with new observed observers\n // to check for cycles\n // N.B: unminified as it is used by MST\n\n /**\r\n * Create a new computed value based on a function expression.\r\n *\r\n * The `name` property is for debug purposes only.\r\n *\r\n * The `equals` property specifies the comparer function to use to determine if a newly produced\r\n * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`\r\n * compares based on identity comparison (===), and `structuralComparer` deeply compares the structure.\r\n * Structural comparison can be convenient if you always produce a new aggregated object and\r\n * don't want to notify observers if it is structurally the same.\r\n * This is useful for working with vectors, mouse coordinates etc.\r\n */\n function ComputedValue(options) {\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.observing_ = [];\n this.newObserving_ = null;\n this.isBeingObserved_ = false;\n this.isPendingUnobservation_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n this.unboundDepsCount_ = 0;\n this.value_ = new CaughtException(null);\n this.name_ = void 0;\n this.triggeredBy_ = void 0;\n this.isComputing_ = false;\n this.isRunningSetter_ = false;\n this.derivation = void 0;\n this.setter_ = void 0;\n this.isTracing_ = TraceMode.NONE;\n this.scope_ = void 0;\n this.equals_ = void 0;\n this.requiresReaction_ = void 0;\n this.keepAlive_ = void 0;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n if (!options.get) die(31);\n this.derivation = options.get;\n this.name_ = options.name || (process.env.NODE_ENV !== \"production\" ? \"ComputedValue@\" + getNextId() : \"ComputedValue\");\n\n if (options.set) {\n this.setter_ = createAction(process.env.NODE_ENV !== \"production\" ? this.name_ + \"-setter\" : \"ComputedValue-setter\", options.set);\n }\n\n this.equals_ = options.equals || (options.compareStructural || options.struct ? comparer.structural : comparer[\"default\"]);\n this.scope_ = options.context;\n this.requiresReaction_ = !!options.requiresReaction;\n this.keepAlive_ = !!options.keepAlive;\n }\n\n var _proto = ComputedValue.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n propagateMaybeChanged(this);\n };\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Returns the current value of this computed value.\r\n * Will evaluate its computation first if needed.\r\n */\n ;\n\n _proto.get = function get() {\n if (this.isComputing_) die(32, this.name_, this.derivation);\n\n if (globalState.inBatch === 0 && // !globalState.trackingDerivatpion &&\n this.observers_.size === 0 && !this.keepAlive_) {\n if (shouldCompute(this)) {\n this.warnAboutUntrackedRead_();\n startBatch(); // See perf test 'computed memoization'\n\n this.value_ = this.computeValue_(false);\n endBatch();\n }\n } else {\n reportObserved(this);\n\n if (shouldCompute(this)) {\n var prevTrackingContext = globalState.trackingContext;\n if (this.keepAlive_ && !prevTrackingContext) globalState.trackingContext = this;\n if (this.trackAndCompute()) propagateChangeConfirmed(this);\n globalState.trackingContext = prevTrackingContext;\n }\n }\n\n var result = this.value_;\n if (isCaughtException(result)) throw result.cause;\n return result;\n };\n\n _proto.set = function set(value) {\n if (this.setter_) {\n if (this.isRunningSetter_) die(33, this.name_);\n this.isRunningSetter_ = true;\n\n try {\n this.setter_.call(this.scope_, value);\n } finally {\n this.isRunningSetter_ = false;\n }\n } else die(34, this.name_);\n };\n\n _proto.trackAndCompute = function trackAndCompute() {\n // N.B: unminified as it is used by MST\n var oldValue = this.value_;\n var wasSuspended =\n /* see #1208 */\n this.dependenciesState_ === IDerivationState_.NOT_TRACKING_;\n var newValue = this.computeValue_(true);\n\n if (process.env.NODE_ENV !== \"production\" && isSpyEnabled()) {\n spyReport({\n observableKind: \"computed\",\n debugObjectName: this.name_,\n object: this.scope_,\n type: \"update\",\n oldValue: this.value_,\n newValue: newValue\n });\n }\n\n var changed = wasSuspended || isCaughtException(oldValue) || isCaughtException(newValue) || !this.equals_(oldValue, newValue);\n\n if (changed) {\n this.value_ = newValue;\n }\n\n return changed;\n };\n\n _proto.computeValue_ = function computeValue_(track) {\n this.isComputing_ = true; // don't allow state changes during computation\n\n var prev = allowStateChangesStart(false);\n var res;\n\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope_);\n } else {\n if (globalState.disableErrorBoundaries === true) {\n res = this.derivation.call(this.scope_);\n } else {\n try {\n res = this.derivation.call(this.scope_);\n } catch (e) {\n res = new CaughtException(e);\n }\n }\n }\n\n allowStateChangesEnd(prev);\n this.isComputing_ = false;\n return res;\n };\n\n _proto.suspend_ = function suspend_() {\n if (!this.keepAlive_) {\n clearObserving(this);\n this.value_ = undefined; // don't hold on to computed value!\n }\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n var _this = this;\n\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n // TODO: why is this in a different place than the spyReport() function? in all other observables it's called in the same place\n var newValue = _this.get();\n\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n observableKind: \"computed\",\n debugObjectName: _this.name_,\n type: UPDATE,\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n\n firstTime = false;\n prevValue = newValue;\n });\n };\n\n _proto.warnAboutUntrackedRead_ = function warnAboutUntrackedRead_() {\n if (!(process.env.NODE_ENV !== \"production\")) return;\n\n if (this.requiresReaction_ === true) {\n die(\"[mobx] Computed value \" + this.name_ + \" is read outside a reactive context\");\n }\n\n if (this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute\");\n }\n\n if (globalState.computedRequiresReaction) {\n console.warn(\"[mobx] Computed value \" + this.name_ + \" is being read outside a reactive context. Doing a full recompute\");\n }\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.derivation.toString() + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive$1] = function () {\n return this.valueOf();\n };\n\n return ComputedValue;\n}();\nvar isComputedValue = /*#__PURE__*/createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\nvar IDerivationState_;\n\n(function (IDerivationState_) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState_[IDerivationState_[\"NOT_TRACKING_\"] = -1] = \"NOT_TRACKING_\"; // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n\n IDerivationState_[IDerivationState_[\"UP_TO_DATE_\"] = 0] = \"UP_TO_DATE_\"; // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n\n IDerivationState_[IDerivationState_[\"POSSIBLY_STALE_\"] = 1] = \"POSSIBLY_STALE_\"; // A shallow dependency has changed since last computation and the derivation\n // will need to recompute when it's needed next.\n\n IDerivationState_[IDerivationState_[\"STALE_\"] = 2] = \"STALE_\";\n})(IDerivationState_ || (IDerivationState_ = {}));\n\nvar TraceMode;\n\n(function (TraceMode) {\n TraceMode[TraceMode[\"NONE\"] = 0] = \"NONE\";\n TraceMode[TraceMode[\"LOG\"] = 1] = \"LOG\";\n TraceMode[TraceMode[\"BREAK\"] = 2] = \"BREAK\";\n})(TraceMode || (TraceMode = {}));\n\nvar CaughtException = function CaughtException(cause) {\n this.cause = void 0;\n this.cause = cause; // Empty\n};\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\r\n * Finds out whether any dependency of the derivation has actually changed.\r\n * If dependenciesState is 1 then it will recalculate dependencies,\r\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\r\n *\r\n * By iterating over the dependencies in the same order that they were reported and\r\n * stopping on the first change, all the recalculations are only called for ComputedValues\r\n * that will be tracked by derivation. That is because we assume that if the first x\r\n * dependencies of the derivation doesn't change then the derivation should run the same way\r\n * up until accessing x-th dependency.\r\n */\n\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState_) {\n case IDerivationState_.UP_TO_DATE_:\n return false;\n\n case IDerivationState_.NOT_TRACKING_:\n case IDerivationState_.STALE_:\n return true;\n\n case IDerivationState_.POSSIBLY_STALE_:\n {\n // state propagation can occur outside of action/reactive context #2195\n var prevAllowStateReads = allowStateReadsStart(true);\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n\n var obs = derivation.observing_,\n l = obs.length;\n\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n\n if (isComputedValue(obj)) {\n if (globalState.disableErrorBoundaries) {\n obj.get();\n } else {\n try {\n obj.get();\n } catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n } // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n // invariantShouldCompute(derivation)\n\n\n if (derivation.dependenciesState_ === IDerivationState_.STALE_) {\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n }\n\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return false;\n }\n }\n}\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\nfunction checkIfStateModificationsAreAllowed(atom) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n }\n\n var hasObservers = atom.observers_.size > 0; // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n\n if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === \"always\")) console.warn(\"[MobX] \" + (globalState.enforceActions ? \"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: \" : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: \") + atom.name_);\n}\nfunction checkIfStateReadsAreAllowed(observable) {\n if (process.env.NODE_ENV !== \"production\" && !globalState.allowStateReads && globalState.observableRequiresReaction) {\n console.warn(\"[mobx] Observable \" + observable.name_ + \" being read outside a reactive context\");\n }\n}\n/**\r\n * Executes the provided function `f` and tracks which observables are being accessed.\r\n * The tracking information is stored on the `derivation` object and the derivation is registered\r\n * as observer of any of the accessed observables.\r\n */\n\nfunction trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true); // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n\n changeDependenciesStateTo0(derivation);\n derivation.newObserving_ = new Array(derivation.observing_.length + 100);\n derivation.unboundDepsCount_ = 0;\n derivation.runId_ = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n globalState.inBatch++;\n var result;\n\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n } else {\n try {\n result = f.call(context);\n } catch (e) {\n result = new CaughtException(e);\n }\n }\n\n globalState.inBatch--;\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}\n\nfunction warnAboutDerivationWithoutDependencies(derivation) {\n if (!(process.env.NODE_ENV !== \"production\")) return;\n if (derivation.observing_.length !== 0) return;\n\n if (globalState.reactionRequiresObservable || derivation.requiresObservable_) {\n console.warn(\"[mobx] Derivation \" + derivation.name_ + \" is created/updated without reading any observable value\");\n }\n}\n/**\r\n * diffs newObserving with observing.\r\n * update observing to be newObserving with unique observables\r\n * notify observers that become observed/unobserved\r\n */\n\n\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing_;\n var observing = derivation.observing_ = derivation.newObserving_;\n var lowestNewObservingDerivationState = IDerivationState_.UP_TO_DATE_; // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurrence, change to 1 and keep it\n // 1: extra occurrence, drop it\n\n var i0 = 0,\n l = derivation.unboundDepsCount_;\n\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n\n if (dep.diffValue_ === 0) {\n dep.diffValue_ = 1;\n if (i0 !== i) observing[i0] = dep;\n i0++;\n } // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n\n\n if (dep.dependenciesState_ > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState_;\n }\n }\n\n observing.length = i0;\n derivation.newObserving_ = null; // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n\n l = prevObserving.length;\n\n while (l--) {\n var _dep = prevObserving[l];\n\n if (_dep.diffValue_ === 0) {\n removeObserver(_dep, derivation);\n }\n\n _dep.diffValue_ = 0;\n } // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n\n\n while (i0--) {\n var _dep2 = observing[i0];\n\n if (_dep2.diffValue_ === 1) {\n _dep2.diffValue_ = 0;\n addObserver(_dep2, derivation);\n }\n } // Some new observed derivations may become stale during this derivation computation\n // so they have had no chance to propagate staleness (#916)\n\n\n if (lowestNewObservingDerivationState !== IDerivationState_.UP_TO_DATE_) {\n derivation.dependenciesState_ = lowestNewObservingDerivationState;\n derivation.onBecomeStale_();\n }\n}\n\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing_;\n derivation.observing_ = [];\n var i = obs.length;\n\n while (i--) {\n removeObserver(obs[i], derivation);\n }\n\n derivation.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n\n try {\n return action();\n } finally {\n untrackedEnd(prev);\n }\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\nfunction allowStateReadsStart(allowStateReads) {\n var prev = globalState.allowStateReads;\n globalState.allowStateReads = allowStateReads;\n return prev;\n}\nfunction allowStateReadsEnd(prev) {\n globalState.allowStateReads = prev;\n}\n/**\r\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\r\n *\r\n */\n\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState_ === IDerivationState_.UP_TO_DATE_) return;\n derivation.dependenciesState_ = IDerivationState_.UP_TO_DATE_;\n var obs = derivation.observing_;\n var i = obs.length;\n\n while (i--) {\n obs[i].lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n}\n\n/**\r\n * These values will persist if global state is reset\r\n */\n\nvar persistentKeys = [\"mobxGuid\", \"spyListeners\", \"enforceActions\", \"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"allowStateReads\", \"disableErrorBoundaries\", \"runId\", \"UNCHANGED\", \"useProxies\"];\nvar MobXGlobals = function MobXGlobals() {\n this.version = 6;\n this.UNCHANGED = {};\n this.trackingDerivation = null;\n this.trackingContext = null;\n this.runId = 0;\n this.mobxGuid = 0;\n this.inBatch = 0;\n this.pendingUnobservations = [];\n this.pendingReactions = [];\n this.isRunningReactions = false;\n this.allowStateChanges = false;\n this.allowStateReads = true;\n this.enforceActions = true;\n this.spyListeners = [];\n this.globalReactionErrorHandlers = [];\n this.computedRequiresReaction = false;\n this.reactionRequiresObservable = false;\n this.observableRequiresReaction = false;\n this.disableErrorBoundaries = false;\n this.suppressReactionErrors = false;\n this.useProxies = true;\n this.verifyProxies = false;\n this.safeDescriptors = true;\n};\nvar canMergeGlobalState = true;\nvar isolateCalled = false;\nvar globalState = /*#__PURE__*/function () {\n var global = /*#__PURE__*/getGlobal();\n if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals) canMergeGlobalState = false;\n if (global.__mobxGlobals && global.__mobxGlobals.version !== new MobXGlobals().version) canMergeGlobalState = false;\n\n if (!canMergeGlobalState) {\n setTimeout(function () {\n if (!isolateCalled) {\n die(35);\n }\n }, 1);\n return new MobXGlobals();\n } else if (global.__mobxGlobals) {\n global.__mobxInstanceCount += 1;\n if (!global.__mobxGlobals.UNCHANGED) global.__mobxGlobals.UNCHANGED = {}; // make merge backward compatible\n\n return global.__mobxGlobals;\n } else {\n global.__mobxInstanceCount = 1;\n return global.__mobxGlobals = /*#__PURE__*/new MobXGlobals();\n }\n}();\nfunction isolateGlobalState() {\n if (globalState.pendingReactions.length || globalState.inBatch || globalState.isRunningReactions) die(36);\n isolateCalled = true;\n\n if (canMergeGlobalState) {\n var global = getGlobal();\n if (--global.__mobxInstanceCount === 0) global.__mobxGlobals = undefined;\n globalState = new MobXGlobals();\n }\n}\nfunction getGlobalState() {\n return globalState;\n}\n/**\r\n * For testing purposes only; this will break the internal state of existing observables,\r\n * but can be used to get back at a stable state after throwing errors\r\n */\n\nfunction resetGlobalState() {\n var defaultGlobals = new MobXGlobals();\n\n for (var key in defaultGlobals) {\n if (persistentKeys.indexOf(key) === -1) globalState[key] = defaultGlobals[key];\n }\n\n globalState.allowStateChanges = !globalState.enforceActions;\n}\n\nfunction hasObservers(observable) {\n return observable.observers_ && observable.observers_.size > 0;\n}\nfunction getObservers(observable) {\n return observable.observers_;\n} // function invariantObservers(observable: IObservable) {\n// const list = observable.observers\n// const map = observable.observersIndexes\n// const l = list.length\n// for (let i = 0; i < l; i++) {\n// const id = list[i].__mapid\n// if (i) {\n// invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n// } else {\n// invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n// }\n// }\n// invariant(\n// list.length === 0 || Object.keys(map).length === list.length - 1,\n// \"INTERNAL ERROR there is no junk in map\"\n// )\n// }\n\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n observable.observers_.add(node);\n if (observable.lowestObserverState_ > node.dependenciesState_) observable.lowestObserverState_ = node.dependenciesState_; // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n}\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n observable.observers_[\"delete\"](node);\n\n if (observable.observers_.size === 0) {\n // deleting last observer\n queueForUnobservation(observable);\n } // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n\n}\nfunction queueForUnobservation(observable) {\n if (observable.isPendingUnobservation_ === false) {\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation_ = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\r\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\r\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\r\n * Avoids unnecessary recalculations.\r\n */\n\nfunction startBatch() {\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions(); // the batch is actually about to finish, all unobserving should happen here.\n\n var list = globalState.pendingUnobservations;\n\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation_ = false;\n\n if (observable.observers_.size === 0) {\n if (observable.isBeingObserved_) {\n // if this observable had reactive observers, trigger the hooks\n observable.isBeingObserved_ = false;\n observable.onBUO();\n }\n\n if (observable instanceof ComputedValue) {\n // computed values are automatically teared down when the last observer leaves\n // this process happens recursively, this computed might be the last observabe of another, etc..\n observable.suspend_();\n }\n }\n }\n\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n checkIfStateReadsAreAllowed(observable);\n var derivation = globalState.trackingDerivation;\n\n if (derivation !== null) {\n /**\r\n * Simple optimization, give each derivation run an unique id (runId)\r\n * Check if last time this observable was accessed the same runId is used\r\n * if this is the case, the relation is already known\r\n */\n if (derivation.runId_ !== observable.lastAccessedBy_) {\n observable.lastAccessedBy_ = derivation.runId_; // Tried storing newObserving, or observing, or both as Set, but performance didn't come close...\n\n derivation.newObserving_[derivation.unboundDepsCount_++] = observable;\n\n if (!observable.isBeingObserved_ && globalState.trackingContext) {\n observable.isBeingObserved_ = true;\n observable.onBO();\n }\n }\n\n return true;\n } else if (observable.observers_.size === 0 && globalState.inBatch > 0) {\n queueForUnobservation(observable);\n }\n\n return false;\n} // function invariantLOS(observable: IObservable, msg: string) {\n// // it's expensive so better not run it in produciton. but temporarily helpful for testing\n// const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n// if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n// throw new Error(\n// \"lowestObserverState is wrong for \" +\n// msg +\n// \" because \" +\n// min +\n// \" < \" +\n// observable.lowestObserverState\n// )\n// }\n\n/**\r\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\r\n * It will propagate changes to observers from previous run\r\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\r\n * Hopefully self reruning autoruns aren't a feature people should depend on\r\n * Also most basic use cases should be ok\r\n */\n// Called by Atom when its value changes\n\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) return;\n observable.lowestObserverState_ = IDerivationState_.STALE_; // Ideally we use for..of here, but the downcompiled version is really slow...\n\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n if (process.env.NODE_ENV !== \"production\" && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n\n d.onBecomeStale_();\n }\n\n d.dependenciesState_ = IDerivationState_.STALE_;\n }); // invariantLOS(observable, \"changed end\");\n} // Called by ComputedValue when it recalculate and its value changed\n\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) return;\n observable.lowestObserverState_ = IDerivationState_.STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.POSSIBLY_STALE_) d.dependenciesState_ = IDerivationState_.STALE_;else if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_ // this happens during computing of `d`, just keep lowestObserverState up to date.\n ) observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }); // invariantLOS(observable, \"confirmed end\");\n} // Used by computed when its dependency changed, but we don't wan't to immediately recompute.\n\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState_ !== IDerivationState_.UP_TO_DATE_) return;\n observable.lowestObserverState_ = IDerivationState_.POSSIBLY_STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n d.dependenciesState_ = IDerivationState_.POSSIBLY_STALE_;\n\n if (process.env.NODE_ENV !== \"production\" && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n\n d.onBecomeStale_();\n }\n }); // invariantLOS(observable, \"maybe end\");\n}\n\nfunction logTraceInfo(derivation, observable) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' is invalidated due to a change in: '\" + observable.name_ + \"'\");\n\n if (derivation.isTracing_ === TraceMode.BREAK) {\n var lines = [];\n printDepTree(getDependencyTree(derivation), lines, 1); // prettier-ignore\n\n new Function(\"debugger;\\n/*\\nTracing '\" + derivation.name_ + \"'\\n\\nYou are entering this break point because derivation '\" + derivation.name_ + \"' is being traced and '\" + observable.name_ + \"' is now forcing it to update.\\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\\n\\n\" + (derivation instanceof ComputedValue ? derivation.derivation.toString().replace(/[*]\\//g, \"/\") : \"\") + \"\\n\\nThe dependencies for this derivation are:\\n\\n\" + lines.join(\"\\n\") + \"\\n*/\\n \")();\n }\n}\n\nfunction printDepTree(tree, lines, depth) {\n if (lines.length >= 1000) {\n lines.push(\"(and many more)\");\n return;\n }\n\n lines.push(\"\" + new Array(depth).join(\"\\t\") + tree.name); // MWE: not the fastest, but the easiest way :)\n\n if (tree.dependencies) tree.dependencies.forEach(function (child) {\n return printDepTree(child, lines, depth + 1);\n });\n}\n\nvar Reaction = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n function Reaction(name_, onInvalidate_, errorHandler_, requiresObservable_) {\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"Reaction@\" + getNextId() : \"Reaction\";\n }\n\n if (requiresObservable_ === void 0) {\n requiresObservable_ = false;\n }\n\n this.name_ = void 0;\n this.onInvalidate_ = void 0;\n this.errorHandler_ = void 0;\n this.requiresObservable_ = void 0;\n this.observing_ = [];\n this.newObserving_ = [];\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.unboundDepsCount_ = 0;\n this.isDisposed_ = false;\n this.isScheduled_ = false;\n this.isTrackPending_ = false;\n this.isRunning_ = false;\n this.isTracing_ = TraceMode.NONE;\n this.name_ = name_;\n this.onInvalidate_ = onInvalidate_;\n this.errorHandler_ = errorHandler_;\n this.requiresObservable_ = requiresObservable_;\n }\n\n var _proto = Reaction.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n this.schedule_();\n };\n\n _proto.schedule_ = function schedule_() {\n if (!this.isScheduled_) {\n this.isScheduled_ = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n\n _proto.isScheduled = function isScheduled() {\n return this.isScheduled_;\n }\n /**\r\n * internal, use schedule() if you intend to kick off a reaction\r\n */\n ;\n\n _proto.runReaction_ = function runReaction_() {\n if (!this.isDisposed_) {\n startBatch();\n this.isScheduled_ = false;\n var prev = globalState.trackingContext;\n globalState.trackingContext = this;\n\n if (shouldCompute(this)) {\n this.isTrackPending_ = true;\n\n try {\n this.onInvalidate_();\n\n if (process.env.NODE_ENV !== \"production\" && this.isTrackPending_ && isSpyEnabled()) {\n // onInvalidate didn't trigger track right away..\n spyReport({\n name: this.name_,\n type: \"scheduled-reaction\"\n });\n }\n } catch (e) {\n this.reportExceptionInDerivation_(e);\n }\n }\n\n globalState.trackingContext = prev;\n endBatch();\n }\n };\n\n _proto.track = function track(fn) {\n if (this.isDisposed_) {\n return; // console.warn(\"Reaction already disposed\") // Note: Not a warning / error in mobx 4 either\n }\n\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n\n if (process.env.NODE_ENV !== \"production\" && notify) {\n startTime = Date.now();\n spyReportStart({\n name: this.name_,\n type: \"reaction\"\n });\n }\n\n this.isRunning_ = true;\n var prevReaction = globalState.trackingContext; // reactions could create reactions...\n\n globalState.trackingContext = this;\n var result = trackDerivedFunction(this, fn, undefined);\n globalState.trackingContext = prevReaction;\n this.isRunning_ = false;\n this.isTrackPending_ = false;\n\n if (this.isDisposed_) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n\n if (isCaughtException(result)) this.reportExceptionInDerivation_(result.cause);\n\n if (process.env.NODE_ENV !== \"production\" && notify) {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n\n endBatch();\n };\n\n _proto.reportExceptionInDerivation_ = function reportExceptionInDerivation_(error) {\n var _this = this;\n\n if (this.errorHandler_) {\n this.errorHandler_(error, this);\n return;\n }\n\n if (globalState.disableErrorBoundaries) throw error;\n var message = process.env.NODE_ENV !== \"production\" ? \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this + \"'\" : \"[mobx] uncaught error in '\" + this + \"'\";\n\n if (!globalState.suppressReactionErrors) {\n console.error(message, error);\n /** If debugging brought you here, please, read the above message :-). Tnx! */\n } else if (process.env.NODE_ENV !== \"production\") console.warn(\"[mobx] (error in reaction '\" + this.name_ + \"' suppressed, fix error of causing action below)\"); // prettier-ignore\n\n\n if (process.env.NODE_ENV !== \"production\" && isSpyEnabled()) {\n spyReport({\n type: \"error\",\n name: this.name_,\n message: message,\n error: \"\" + error\n });\n }\n\n globalState.globalReactionErrorHandlers.forEach(function (f) {\n return f(error, _this);\n });\n };\n\n _proto.dispose = function dispose() {\n if (!this.isDisposed_) {\n this.isDisposed_ = true;\n\n if (!this.isRunning_) {\n // if disposed while running, clean up later. Maybe not optimal, but rare case\n startBatch();\n clearObserving(this);\n endBatch();\n }\n }\n };\n\n _proto.getDisposer_ = function getDisposer_() {\n var r = this.dispose.bind(this);\n r[$mobx] = this;\n return r;\n };\n\n _proto.toString = function toString() {\n return \"Reaction[\" + this.name_ + \"]\";\n };\n\n _proto.trace = function trace$1(enterBreakPoint) {\n if (enterBreakPoint === void 0) {\n enterBreakPoint = false;\n }\n\n trace(this, enterBreakPoint);\n };\n\n return Reaction;\n}();\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n if (idx >= 0) globalState.globalReactionErrorHandlers.splice(idx, 1);\n };\n}\n/**\r\n * Magic number alert!\r\n * Defines within how many times a reaction is allowed to re-trigger itself\r\n * until it is assumed that this is gonna be a never ending loop...\r\n */\n\nvar MAX_REACTION_ITERATIONS = 100;\n\nvar reactionScheduler = function reactionScheduler(f) {\n return f();\n};\n\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions) return;\n reactionScheduler(runReactionsHelper);\n}\n\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0; // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error(process.env.NODE_ENV !== \"production\" ? \"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\" + (\" Probably there is a cycle in the reactive function: \" + allReactions[0]) : \"[mobx] cycle in reaction: \" + allReactions[0]);\n allReactions.splice(0); // clear reactions\n }\n\n var remainingReactions = allReactions.splice(0);\n\n for (var i = 0, l = remainingReactions.length; i < l; i++) {\n remainingReactions[i].runReaction_();\n }\n }\n\n globalState.isRunningReactions = false;\n}\n\nvar isReaction = /*#__PURE__*/createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n\n reactionScheduler = function reactionScheduler(f) {\n return fn(function () {\n return baseScheduler(f);\n });\n };\n}\n\nfunction isSpyEnabled() {\n return process.env.NODE_ENV !== \"production\" && !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (!(process.env.NODE_ENV !== \"production\")) return; // dead code elimination can do the rest\n\n if (!globalState.spyListeners.length) return;\n var listeners = globalState.spyListeners;\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](event);\n }\n}\nfunction spyReportStart(event) {\n if (!(process.env.NODE_ENV !== \"production\")) return;\n\n var change = _extends({}, event, {\n spyReportStart: true\n });\n\n spyReport(change);\n}\nvar END_EVENT = {\n type: \"report-end\",\n spyReportEnd: true\n};\nfunction spyReportEnd(change) {\n if (!(process.env.NODE_ENV !== \"production\")) return;\n if (change) spyReport(_extends({}, change, {\n type: \"report-end\",\n spyReportEnd: true\n }));else spyReport(END_EVENT);\n}\nfunction spy(listener) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n console.warn(\"[mobx.spy] Is a no-op in production builds\");\n return function () {};\n } else {\n globalState.spyListeners.push(listener);\n return once(function () {\n globalState.spyListeners = globalState.spyListeners.filter(function (l) {\n return l !== listener;\n });\n });\n }\n}\n\nvar ACTION = \"action\";\nvar ACTION_BOUND = \"action.bound\";\nvar AUTOACTION = \"autoAction\";\nvar AUTOACTION_BOUND = \"autoAction.bound\";\nvar DEFAULT_ACTION_NAME = \"<unnamed action>\";\nvar actionAnnotation = /*#__PURE__*/createActionAnnotation(ACTION);\nvar actionBoundAnnotation = /*#__PURE__*/createActionAnnotation(ACTION_BOUND, {\n bound: true\n});\nvar autoActionAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION, {\n autoAction: true\n});\nvar autoActionBoundAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION_BOUND, {\n autoAction: true,\n bound: true\n});\n\nfunction createActionFactory(autoAction) {\n var res = function action(arg1, arg2) {\n // action(fn() {})\n if (isFunction(arg1)) return createAction(arg1.name || DEFAULT_ACTION_NAME, arg1, autoAction); // action(\"name\", fn() {})\n\n if (isFunction(arg2)) return createAction(arg1, arg2, autoAction); // @action\n\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, autoAction ? autoActionAnnotation : actionAnnotation);\n } // action(\"name\") & @action(\"name\")\n\n\n if (isStringish(arg1)) {\n return createDecoratorAnnotation(createActionAnnotation(autoAction ? AUTOACTION : ACTION, {\n name: arg1,\n autoAction: autoAction\n }));\n }\n\n if (process.env.NODE_ENV !== \"production\") die(\"Invalid arguments for `action`\");\n };\n\n return res;\n}\n\nvar action = /*#__PURE__*/createActionFactory(false);\nObject.assign(action, actionAnnotation);\nvar autoAction = /*#__PURE__*/createActionFactory(true);\nObject.assign(autoAction, autoActionAnnotation);\naction.bound = /*#__PURE__*/createDecoratorAnnotation(actionBoundAnnotation);\nautoAction.bound = /*#__PURE__*/createDecoratorAnnotation(autoActionBoundAnnotation);\nfunction runInAction(fn) {\n return executeAction(fn.name || DEFAULT_ACTION_NAME, false, fn, this, undefined);\n}\nfunction isAction(thing) {\n return isFunction(thing) && thing.isMobxAction === true;\n}\n\n/**\r\n * Creates a named reactive view and keeps it alive, so that the view is always\r\n * updated if one of the dependencies changes, even when the view is not further used by something else.\r\n * @param view The reactive view\r\n * @returns disposer function, which can be used to stop the view from being updated in the future.\r\n */\n\nfunction autorun(view, opts) {\n var _opts$name, _opts;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(view)) die(\"Autorun expects a function as first argument\");\n if (isAction(view)) die(\"Autorun does not accept actions since actions are untrackable\");\n }\n\n var name = (_opts$name = (_opts = opts) == null ? void 0 : _opts.name) != null ? _opts$name : process.env.NODE_ENV !== \"production\" ? view.name || \"Autorun@\" + getNextId() : \"Autorun\";\n var runSync = !opts.scheduler && !opts.delay;\n var reaction;\n\n if (runSync) {\n // normal autorun\n reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n }, opts.onError, opts.requiresObservable);\n } else {\n var scheduler = createSchedulerFromOptions(opts); // debounced autorun\n\n var isScheduled = false;\n reaction = new Reaction(name, function () {\n if (!isScheduled) {\n isScheduled = true;\n scheduler(function () {\n isScheduled = false;\n if (!reaction.isDisposed_) reaction.track(reactionRunner);\n });\n }\n }, opts.onError, opts.requiresObservable);\n }\n\n function reactionRunner() {\n view(reaction);\n }\n\n reaction.schedule_();\n return reaction.getDisposer_();\n}\n\nvar run = function run(f) {\n return f();\n};\n\nfunction createSchedulerFromOptions(opts) {\n return opts.scheduler ? opts.scheduler : opts.delay ? function (f) {\n return setTimeout(f, opts.delay);\n } : run;\n}\n\nfunction reaction(expression, effect, opts) {\n var _opts$name2;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(expression) || !isFunction(effect)) die(\"First and second argument to reaction should be functions\");\n if (!isPlainObject(opts)) die(\"Third argument of reactions should be an object\");\n }\n\n var name = (_opts$name2 = opts.name) != null ? _opts$name2 : process.env.NODE_ENV !== \"production\" ? \"Reaction@\" + getNextId() : \"Reaction\";\n var effectAction = action(name, opts.onError ? wrapErrorHandler(opts.onError, effect) : effect);\n var runSync = !opts.scheduler && !opts.delay;\n var scheduler = createSchedulerFromOptions(opts);\n var firstTime = true;\n var isScheduled = false;\n var value;\n var oldValue = undefined; // only an issue with fireImmediately\n\n var equals = opts.compareStructural ? comparer.structural : opts.equals || comparer[\"default\"];\n var r = new Reaction(name, function () {\n if (firstTime || runSync) {\n reactionRunner();\n } else if (!isScheduled) {\n isScheduled = true;\n scheduler(reactionRunner);\n }\n }, opts.onError, opts.requiresObservable);\n\n function reactionRunner() {\n isScheduled = false;\n if (r.isDisposed_) return;\n var changed = false;\n r.track(function () {\n var nextValue = allowStateChanges(false, function () {\n return expression(r);\n });\n changed = firstTime || !equals(value, nextValue);\n oldValue = value;\n value = nextValue;\n });\n if (firstTime && opts.fireImmediately) effectAction(value, oldValue, r);else if (!firstTime && changed) effectAction(value, oldValue, r);\n firstTime = false;\n }\n\n r.schedule_();\n return r.getDisposer_();\n}\n\nfunction wrapErrorHandler(errorHandler, baseFn) {\n return function () {\n try {\n return baseFn.apply(this, arguments);\n } catch (e) {\n errorHandler.call(this, e);\n }\n };\n}\n\nvar ON_BECOME_OBSERVED = \"onBO\";\nvar ON_BECOME_UNOBSERVED = \"onBUO\";\nfunction onBecomeObserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_OBSERVED, thing, arg2, arg3);\n}\nfunction onBecomeUnobserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_UNOBSERVED, thing, arg2, arg3);\n}\n\nfunction interceptHook(hook, thing, arg2, arg3) {\n var atom = typeof arg3 === \"function\" ? getAtom(thing, arg2) : getAtom(thing);\n var cb = isFunction(arg3) ? arg3 : arg2;\n var listenersKey = hook + \"L\";\n\n if (atom[listenersKey]) {\n atom[listenersKey].add(cb);\n } else {\n atom[listenersKey] = new Set([cb]);\n }\n\n return function () {\n var hookListeners = atom[listenersKey];\n\n if (hookListeners) {\n hookListeners[\"delete\"](cb);\n\n if (hookListeners.size === 0) {\n delete atom[listenersKey];\n }\n }\n };\n}\n\nvar NEVER = \"never\";\nvar ALWAYS = \"always\";\nvar OBSERVED = \"observed\"; // const IF_AVAILABLE = \"ifavailable\"\n\nfunction configure(options) {\n if (options.isolateGlobalState === true) {\n isolateGlobalState();\n }\n\n var useProxies = options.useProxies,\n enforceActions = options.enforceActions;\n\n if (useProxies !== undefined) {\n globalState.useProxies = useProxies === ALWAYS ? true : useProxies === NEVER ? false : typeof Proxy !== \"undefined\";\n }\n\n if (useProxies === \"ifavailable\") globalState.verifyProxies = true;\n\n if (enforceActions !== undefined) {\n var ea = enforceActions === ALWAYS ? ALWAYS : enforceActions === OBSERVED;\n globalState.enforceActions = ea;\n globalState.allowStateChanges = ea === true || ea === ALWAYS ? false : true;\n }\n [\"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"disableErrorBoundaries\", \"safeDescriptors\"].forEach(function (key) {\n if (key in options) globalState[key] = !!options[key];\n });\n globalState.allowStateReads = !globalState.observableRequiresReaction;\n\n if (process.env.NODE_ENV !== \"production\" && globalState.disableErrorBoundaries === true) {\n console.warn(\"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\");\n }\n\n if (options.reactionScheduler) {\n setReactionScheduler(options.reactionScheduler);\n }\n}\n\nfunction extendObservable(target, properties, annotations, options) {\n if (process.env.NODE_ENV !== \"production\") {\n if (arguments.length > 4) die(\"'extendObservable' expected 2-4 arguments\");\n if (typeof target !== \"object\") die(\"'extendObservable' expects an object as first argument\");\n if (isObservableMap(target)) die(\"'extendObservable' should not be used on maps, use map.merge instead\");\n if (!isPlainObject(properties)) die(\"'extendObservabe' only accepts plain objects as second argument\");\n if (isObservable(properties) || isObservable(annotations)) die(\"Extending an object with another observable (object) is not supported\");\n } // Pull descriptors first, so we don't have to deal with props added by administration ($mobx)\n\n\n var descriptors = getOwnPropertyDescriptors(properties);\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n ownKeys(descriptors).forEach(function (key) {\n adm.extend_(key, descriptors[key], // must pass \"undefined\" for { key: undefined }\n !annotations ? true : key in annotations ? annotations[key] : true);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\n\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name_\n };\n if (node.observing_ && node.observing_.length > 0) result.dependencies = unique(node.observing_).map(nodeToDependencyTree);\n return result;\n}\n\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\n\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name_\n };\n if (hasObservers(node)) result.observers = Array.from(getObservers(node)).map(nodeToObserverTree);\n return result;\n}\n\nfunction unique(list) {\n return Array.from(new Set(list));\n}\n\nvar generatorId = 0;\nfunction FlowCancellationError() {\n this.message = \"FLOW_CANCELLED\";\n}\nFlowCancellationError.prototype = /*#__PURE__*/Object.create(Error.prototype);\nfunction isFlowCancellationError(error) {\n return error instanceof FlowCancellationError;\n}\nvar flowAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow\");\nvar flow = /*#__PURE__*/Object.assign(function flow(arg1, arg2) {\n // @flow\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, flowAnnotation);\n } // flow(fn)\n\n\n if (process.env.NODE_ENV !== \"production\" && arguments.length !== 1) die(\"Flow expects single argument with generator function\");\n var generator = arg1;\n var name = generator.name || \"<unnamed flow>\"; // Implementation based on https://github.com/tj/co/blob/master/index.js\n\n var res = function res() {\n var ctx = this;\n var args = arguments;\n var runId = ++generatorId;\n var gen = action(name + \" - runid: \" + runId + \" - init\", generator).apply(ctx, args);\n var rejector;\n var pendingPromise = undefined;\n var promise = new Promise(function (resolve, reject) {\n var stepId = 0;\n rejector = reject;\n\n function onFulfilled(res) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.next).call(gen, res);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function onRejected(err) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen[\"throw\"]).call(gen, err);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function next(ret) {\n if (isFunction(ret == null ? void 0 : ret.then)) {\n // an async iterator\n ret.then(next, reject);\n return;\n }\n\n if (ret.done) return resolve(ret.value);\n pendingPromise = Promise.resolve(ret.value);\n return pendingPromise.then(onFulfilled, onRejected);\n }\n\n onFulfilled(undefined); // kick off the process\n });\n promise.cancel = action(name + \" - runid: \" + runId + \" - cancel\", function () {\n try {\n if (pendingPromise) cancelPromise(pendingPromise); // Finally block can return (or yield) stuff..\n\n var _res = gen[\"return\"](undefined); // eat anything that promise would do, it's cancelled!\n\n\n var yieldedPromise = Promise.resolve(_res.value);\n yieldedPromise.then(noop, noop);\n cancelPromise(yieldedPromise); // maybe it can be cancelled :)\n // reject our original promise\n\n rejector(new FlowCancellationError());\n } catch (e) {\n rejector(e); // there could be a throwing finally block\n }\n });\n return promise;\n };\n\n res.isMobXFlow = true;\n return res;\n}, flowAnnotation);\n\nfunction cancelPromise(promise) {\n if (isFunction(promise.cancel)) promise.cancel();\n}\n\nfunction flowResult(result) {\n return result; // just tricking TypeScript :)\n}\nfunction isFlow(fn) {\n return (fn == null ? void 0 : fn.isMobXFlow) === true;\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n } else if (isObservableObject(thing)) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propOrHandler)) return die(\"InterceptReads can only be used with a specific property, not with an object in general\");\n target = getAdministration(thing, propOrHandler);\n } else if (process.env.NODE_ENV !== \"production\") {\n return die(\"Expected observable map, object or array as first array\");\n }\n\n if (process.env.NODE_ENV !== \"production\" && target.dehancer !== undefined) return die(\"An intercept reader was already established\");\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (isFunction(handler)) return interceptProperty(thing, propOrHandler, handler);else return interceptInterceptable(thing, propOrHandler);\n}\n\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept_(handler);\n}\n\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept_(handler);\n}\n\nfunction _isComputed(value, property) {\n if (property !== undefined) {\n if (isObservableObject(value) === false) return false;\n if (!value[$mobx].values_.has(property)) return false;\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n }\n\n return isComputedValue(value);\n}\nfunction isComputed(value) {\n if (process.env.NODE_ENV !== \"production\" && arguments.length > 1) return die(\"isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property\");\n return _isComputed(value);\n}\nfunction isComputedProp(value, propName) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propName)) return die(\"isComputed expected a property name as second argument\");\n return _isComputed(value, propName);\n}\n\nfunction _isObservable(value, property) {\n if (!value) return false;\n\n if (property !== undefined) {\n if (process.env.NODE_ENV !== \"production\" && (isObservableMap(value) || isObservableArray(value))) return die(\"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\");\n\n if (isObservableObject(value)) {\n return value[$mobx].values_.has(property);\n }\n\n return false;\n } // For first check, see #701\n\n\n return isObservableObject(value) || !!value[$mobx] || isAtom(value) || isReaction(value) || isComputedValue(value);\n}\n\nfunction isObservable(value) {\n if (process.env.NODE_ENV !== \"production\" && arguments.length !== 1) die(\"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n return _isObservable(value);\n}\nfunction isObservableProp(value, propName) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propName)) return die(\"expected a property name as second argument\");\n return _isObservable(value, propName);\n}\n\nfunction keys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].keys_();\n }\n\n if (isObservableMap(obj) || isObservableSet(obj)) {\n return Array.from(obj.keys());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (_, index) {\n return index;\n });\n }\n\n die(5);\n}\nfunction values(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return obj[key];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return obj.get(key);\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.values());\n }\n\n if (isObservableArray(obj)) {\n return obj.slice();\n }\n\n die(6);\n}\nfunction entries(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj.get(key)];\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.entries());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (key, index) {\n return [index, key];\n });\n }\n\n die(7);\n}\nfunction set(obj, key, value) {\n if (arguments.length === 2 && !isObservableSet(obj)) {\n startBatch();\n var _values = key;\n\n try {\n for (var _key in _values) {\n set(obj, _key, _values[_key]);\n }\n } finally {\n endBatch();\n }\n\n return;\n }\n\n if (isObservableObject(obj)) {\n obj[$mobx].set_(key, value);\n } else if (isObservableMap(obj)) {\n obj.set(key, value);\n } else if (isObservableSet(obj)) {\n obj.add(key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") key = parseInt(key, 10);\n if (key < 0) die(\"Invalid index: '\" + key + \"'\");\n startBatch();\n if (key >= obj.length) obj.length = key + 1;\n obj[key] = value;\n endBatch();\n } else die(8);\n}\nfunction remove(obj, key) {\n if (isObservableObject(obj)) {\n obj[$mobx].delete_(key);\n } else if (isObservableMap(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableSet(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") key = parseInt(key, 10);\n obj.splice(key, 1);\n } else {\n die(9);\n }\n}\nfunction has(obj, key) {\n if (isObservableObject(obj)) {\n return obj[$mobx].has_(key);\n } else if (isObservableMap(obj)) {\n return obj.has(key);\n } else if (isObservableSet(obj)) {\n return obj.has(key);\n } else if (isObservableArray(obj)) {\n return key >= 0 && key < obj.length;\n }\n\n die(10);\n}\nfunction get(obj, key) {\n if (!has(obj, key)) return undefined;\n\n if (isObservableObject(obj)) {\n return obj[$mobx].get_(key);\n } else if (isObservableMap(obj)) {\n return obj.get(key);\n } else if (isObservableArray(obj)) {\n return obj[key];\n }\n\n die(11);\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (isFunction(cbOrFire)) return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);else return observeObservable(thing, propOrCb, cbOrFire);\n}\n\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe_(listener, fireImmediately);\n}\n\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe_(listener, fireImmediately);\n}\n\nfunction cache(map, key, value) {\n map.set(key, value);\n return value;\n}\n\nfunction toJSHelper(source, __alreadySeen) {\n if (source == null || typeof source !== \"object\" || source instanceof Date || !isObservable(source)) return source;\n if (isObservableValue(source)) return toJSHelper(source.get(), __alreadySeen);\n\n if (__alreadySeen.has(source)) {\n return __alreadySeen.get(source);\n }\n\n if (isObservableArray(source)) {\n var res = cache(__alreadySeen, source, new Array(source.length));\n source.forEach(function (value, idx) {\n res[idx] = toJSHelper(value, __alreadySeen);\n });\n return res;\n }\n\n if (isObservableSet(source)) {\n var _res = cache(__alreadySeen, source, new Set());\n\n source.forEach(function (value) {\n _res.add(toJSHelper(value, __alreadySeen));\n });\n return _res;\n }\n\n if (isObservableMap(source)) {\n var _res2 = cache(__alreadySeen, source, new Map());\n\n source.forEach(function (value, key) {\n _res2.set(key, toJSHelper(value, __alreadySeen));\n });\n return _res2;\n } else {\n // must be observable object\n keys(source); // make sure keys are observed\n\n var _res3 = cache(__alreadySeen, source, {});\n\n getPlainObjectKeys(source).forEach(function (key) {\n _res3[key] = toJSHelper(source[key], __alreadySeen);\n });\n return _res3;\n }\n}\n/**\r\n * Basically, a deep clone, so that no reactive property will exist anymore.\r\n */\n\n\nfunction toJS(source, options) {\n if (process.env.NODE_ENV !== \"production\" && options) die(\"toJS no longer supports options\");\n return toJSHelper(source, new Map());\n}\n\nfunction trace() {\n if (!(process.env.NODE_ENV !== \"production\")) die(\"trace() is not available in production builds\");\n var enterBreakPoint = false;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (typeof args[args.length - 1] === \"boolean\") enterBreakPoint = args.pop();\n var derivation = getAtomFromArgs(args);\n\n if (!derivation) {\n return die(\"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly\");\n }\n\n if (derivation.isTracing_ === TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' tracing enabled\");\n }\n\n derivation.isTracing_ = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;\n}\n\nfunction getAtomFromArgs(args) {\n switch (args.length) {\n case 0:\n return globalState.trackingDerivation;\n\n case 1:\n return getAtom(args[0]);\n\n case 2:\n return getAtom(args[0], args[1]);\n }\n}\n\n/**\r\n * During a transaction no views are updated until the end of the transaction.\r\n * The transaction will be run synchronously nonetheless.\r\n *\r\n * @param action a function that updates some reactive state\r\n * @returns any value that was returned by the 'action' parameter.\r\n */\n\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) {\n thisArg = undefined;\n }\n\n startBatch();\n\n try {\n return action.apply(thisArg);\n } finally {\n endBatch();\n }\n}\n\nfunction when(predicate, arg1, arg2) {\n if (arguments.length === 1 || arg1 && typeof arg1 === \"object\") return whenPromise(predicate, arg1);\n return _when(predicate, arg1, arg2 || {});\n}\n\nfunction _when(predicate, effect, opts) {\n var timeoutHandle;\n\n if (typeof opts.timeout === \"number\") {\n timeoutHandle = setTimeout(function () {\n if (!disposer[$mobx].isDisposed_) {\n disposer();\n var error = new Error(\"WHEN_TIMEOUT\");\n if (opts.onError) opts.onError(error);else throw error;\n }\n }, opts.timeout);\n }\n\n opts.name = process.env.NODE_ENV !== \"production\" ? opts.name || \"When@\" + getNextId() : \"When\";\n var effectAction = createAction(process.env.NODE_ENV !== \"production\" ? opts.name + \"-effect\" : \"When-effect\", effect); // eslint-disable-next-line\n\n var disposer = autorun(function (r) {\n // predicate should not change state\n var cond = allowStateChanges(false, predicate);\n\n if (cond) {\n r.dispose();\n if (timeoutHandle) clearTimeout(timeoutHandle);\n effectAction();\n }\n }, opts);\n return disposer;\n}\n\nfunction whenPromise(predicate, opts) {\n if (process.env.NODE_ENV !== \"production\" && opts && opts.onError) return die(\"the options 'onError' and 'promise' cannot be combined\");\n var cancel;\n var res = new Promise(function (resolve, reject) {\n var disposer = _when(predicate, resolve, _extends({}, opts, {\n onError: reject\n }));\n\n cancel = function cancel() {\n disposer();\n reject(\"WHEN_CANCELLED\");\n };\n });\n res.cancel = cancel;\n return res;\n}\n\nfunction getAdm(target) {\n return target[$mobx];\n} // Optimization: we don't need the intermediate objects and could have a completely custom administration for DynamicObjects,\n// and skip either the internal values map, or the base object with its property descriptors!\n\n\nvar objectProxyTraps = {\n has: function has(target, name) {\n if (process.env.NODE_ENV !== \"production\" && globalState.trackingDerivation) warnAboutProxyRequirement(\"detect new properties using the 'in' operator. Use 'has' from 'mobx' instead.\");\n return getAdm(target).has_(name);\n },\n get: function get(target, name) {\n return getAdm(target).get_(name);\n },\n set: function set(target, name, value) {\n var _getAdm$set_;\n\n if (!isStringish(name)) return false;\n\n if (process.env.NODE_ENV !== \"production\" && !getAdm(target).values_.has(name)) {\n warnAboutProxyRequirement(\"add a new observable property through direct assignment. Use 'set' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$set_ = getAdm(target).set_(name, value, true)) != null ? _getAdm$set_ : true;\n },\n deleteProperty: function deleteProperty(target, name) {\n var _getAdm$delete_;\n\n if (process.env.NODE_ENV !== \"production\") {\n warnAboutProxyRequirement(\"delete properties from an observable object. Use 'remove' from 'mobx' instead.\");\n }\n\n if (!isStringish(name)) return false; // null (intercepted) -> true (success)\n\n return (_getAdm$delete_ = getAdm(target).delete_(name, true)) != null ? _getAdm$delete_ : true;\n },\n defineProperty: function defineProperty(target, name, descriptor) {\n var _getAdm$definePropert;\n\n if (process.env.NODE_ENV !== \"production\") {\n warnAboutProxyRequirement(\"define property on an observable object. Use 'defineProperty' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$definePropert = getAdm(target).defineProperty_(name, descriptor)) != null ? _getAdm$definePropert : true;\n },\n ownKeys: function ownKeys(target) {\n if (process.env.NODE_ENV !== \"production\" && globalState.trackingDerivation) warnAboutProxyRequirement(\"iterate keys to detect added / removed properties. Use `keys` from 'mobx' instead.\");\n return getAdm(target).ownKeys_();\n },\n preventExtensions: function preventExtensions(target) {\n die(13);\n }\n};\nfunction asDynamicObservableObject(target, options) {\n var _target$$mobx, _target$$mobx$proxy_;\n\n assertProxies();\n target = asObservableObject(target, options);\n return (_target$$mobx$proxy_ = (_target$$mobx = target[$mobx]).proxy_) != null ? _target$$mobx$proxy_ : _target$$mobx.proxy_ = new Proxy(target, objectProxyTraps);\n}\n\nfunction hasInterceptors(interceptable) {\n return interceptable.interceptors_ !== undefined && interceptable.interceptors_.length > 0;\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors_ || (interceptable.interceptors_ = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n if (idx !== -1) interceptors.splice(idx, 1);\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n\n try {\n // Interceptor can modify the array, copy it to avoid concurrent modification, see #1950\n var interceptors = [].concat(interceptable.interceptors_ || []);\n\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n if (change && !change.type) die(14);\n if (!change) break;\n }\n\n return change;\n } finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners_ !== undefined && listenable.changeListeners_.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners_ || (listenable.changeListeners_ = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n if (idx !== -1) listeners.splice(idx, 1);\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners_;\n if (!listeners) return;\n listeners = listeners.slice();\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n\n untrackedEnd(prevU);\n}\n\nfunction makeObservable(target, annotations, options) {\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n var _annotations;\n\n // Default to decorators\n (_annotations = annotations) != null ? _annotations : annotations = collectStoredAnnotations(target); // Annotate\n\n ownKeys(annotations).forEach(function (key) {\n return adm.make_(key, annotations[key]);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\nfunction makeAutoObservable(target, overrides, options) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!isPlainObject(target) && !isPlainObject(Object.getPrototypeOf(target))) die(\"'makeAutoObservable' can only be used for classes that don't have a superclass\");\n if (isObservableObject(target)) die(\"makeAutoObservable can only be used on objects not already made observable\");\n } // Optimization (avoids visiting protos)\n // assumes that annotation.make_/.extend_ works the same for plain objects\n\n\n if (isPlainObject(target)) {\n return extendObservable(target, target, overrides, options);\n }\n\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n // Use cached inferred annotations if available (only in classes)\n if (target[inferredAnnotationsSymbol]) {\n target[inferredAnnotationsSymbol].forEach(function (value, key) {\n return adm.make_(key, value);\n }); // Overrides are not cached, unless `true`, see #2832\n\n if (overrides) {\n ownKeys(overrides).forEach(function (key) {\n var annotation = overrides[key];\n\n if (annotation !== true) {\n adm.make_(key, annotation);\n }\n });\n }\n } else {\n var _ignoreKeys;\n\n var ignoreKeys = (_ignoreKeys = {}, _ignoreKeys[$mobx] = 1, _ignoreKeys[inferredAnnotationsSymbol] = 1, _ignoreKeys.constructor = 1, _ignoreKeys);\n\n var make = function make(key) {\n if (ignoreKeys[key]) return;\n ignoreKeys[key] = 1;\n adm.make_(key, // must pass \"undefined\" for { key: undefined }\n !overrides ? true : key in overrides ? overrides[key] : true);\n };\n\n var current = target;\n\n while (current && current !== objectPrototype) {\n ownKeys(current).forEach(make);\n current = Object.getPrototypeOf(current);\n }\n }\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nvar SPLICE = \"splice\";\nvar UPDATE = \"update\";\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\n\nvar arrayTraps = {\n get: function get(target, name) {\n var adm = target[$mobx];\n if (name === $mobx) return adm;\n if (name === \"length\") return adm.getArrayLength_();\n\n if (typeof name === \"string\" && !isNaN(name)) {\n return adm.get_(parseInt(name));\n }\n\n if (hasProp(arrayExtensions, name)) {\n return arrayExtensions[name];\n }\n\n return target[name];\n },\n set: function set(target, name, value) {\n var adm = target[$mobx];\n\n if (name === \"length\") {\n adm.setArrayLength_(value);\n }\n\n if (typeof name === \"symbol\" || isNaN(name)) {\n target[name] = value;\n } else {\n // numeric string\n adm.set_(parseInt(name), value);\n }\n\n return true;\n },\n preventExtensions: function preventExtensions() {\n die(15);\n }\n};\nvar ObservableArrayAdministration = /*#__PURE__*/function () {\n // this is the prop that gets proxied, so can't replace it!\n function ObservableArrayAdministration(name, enhancer, owned_, legacyMode_) {\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n\n this.owned_ = void 0;\n this.legacyMode_ = void 0;\n this.atom_ = void 0;\n this.values_ = [];\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.enhancer_ = void 0;\n this.dehancer = void 0;\n this.proxy_ = void 0;\n this.lastKnownLength_ = 0;\n this.owned_ = owned_;\n this.legacyMode_ = legacyMode_;\n this.atom_ = new Atom(name);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, process.env.NODE_ENV !== \"production\" ? name + \"[..]\" : \"ObservableArray[..]\");\n };\n }\n\n var _proto = ObservableArrayAdministration.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) return this.dehancer(value);\n return value;\n };\n\n _proto.dehanceValues_ = function dehanceValues_(values) {\n if (this.dehancer !== undefined && values.length > 0) return values.map(this.dehancer);\n return values;\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately === void 0) {\n fireImmediately = false;\n }\n\n if (fireImmediately) {\n listener({\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: \"splice\",\n index: 0,\n added: this.values_.slice(),\n addedCount: this.values_.length,\n removed: [],\n removedCount: 0\n });\n }\n\n return registerListener(this, listener);\n };\n\n _proto.getArrayLength_ = function getArrayLength_() {\n this.atom_.reportObserved();\n return this.values_.length;\n };\n\n _proto.setArrayLength_ = function setArrayLength_(newLength) {\n if (typeof newLength !== \"number\" || newLength < 0) die(\"Out of range: \" + newLength);\n var currentLength = this.values_.length;\n if (newLength === currentLength) return;else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n\n for (var i = 0; i < newLength - currentLength; i++) {\n newItems[i] = undefined;\n } // No Array.fill everywhere...\n\n\n this.spliceWithArray_(currentLength, 0, newItems);\n } else this.spliceWithArray_(newLength, currentLength - newLength);\n };\n\n _proto.updateArrayLength_ = function updateArrayLength_(oldLength, delta) {\n if (oldLength !== this.lastKnownLength_) die(16);\n this.lastKnownLength_ += delta;\n if (this.legacyMode_ && delta > 0) reserveArrayBuffer(oldLength + delta + 1);\n };\n\n _proto.spliceWithArray_ = function spliceWithArray_(index, deleteCount, newItems) {\n var _this = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n var length = this.values_.length;\n if (index === undefined) index = 0;else if (index > length) index = length;else if (index < 0) index = Math.max(0, length + index);\n if (arguments.length === 1) deleteCount = length - index;else if (deleteCount === undefined || deleteCount === null) deleteCount = 0;else deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n if (newItems === undefined) newItems = EMPTY_ARRAY;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_,\n type: SPLICE,\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n if (!change) return EMPTY_ARRAY;\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n\n newItems = newItems.length === 0 ? newItems : newItems.map(function (v) {\n return _this.enhancer_(v, undefined);\n });\n\n if (this.legacyMode_ || process.env.NODE_ENV !== \"production\") {\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength_(length, lengthDelta); // checks if internal array wasn't modified\n }\n\n var res = this.spliceItemsIntoValues_(index, deleteCount, newItems);\n if (deleteCount !== 0 || newItems.length !== 0) this.notifyArraySplice_(index, newItems, res);\n return this.dehanceValues_(res);\n };\n\n _proto.spliceItemsIntoValues_ = function spliceItemsIntoValues_(index, deleteCount, newItems) {\n if (newItems.length < MAX_SPLICE_SIZE) {\n var _this$values_;\n\n return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems));\n } else {\n var res = this.values_.slice(index, index + deleteCount);\n var oldItems = this.values_.slice(index + deleteCount);\n this.values_.length = index + newItems.length - deleteCount;\n\n for (var i = 0; i < newItems.length; i++) {\n this.values_[index + i] = newItems[i];\n }\n\n for (var _i = 0; _i < oldItems.length; _i++) {\n this.values_[index + newItems.length + _i] = oldItems[_i];\n }\n\n return res;\n }\n };\n\n _proto.notifyArrayChildUpdate_ = function notifyArrayChildUpdate_(index, newValue, oldValue) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n type: UPDATE,\n debugObjectName: this.atom_.name_,\n index: index,\n newValue: newValue,\n oldValue: oldValue\n } : null; // The reason why this is on right hand side here (and not above), is this way the uglifier will drop it, but it won't\n // cause any runtime overhead in development mode without NODE_ENV set, unless spying is enabled\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n this.atom_.reportChanged();\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n };\n\n _proto.notifyArraySplice_ = function notifyArraySplice_(index, added, removed) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: SPLICE,\n index: index,\n removed: removed,\n added: added,\n removedCount: removed.length,\n addedCount: added.length\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n this.atom_.reportChanged(); // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n };\n\n _proto.get_ = function get_(index) {\n if (index < this.values_.length) {\n this.atom_.reportObserved();\n return this.dehanceValue_(this.values_[index]);\n }\n\n console.warn(process.env.NODE_ENV !== \"production\" ? \"[mobx] Out of bounds read: \" + index : \"[mobx.array] Attempt to read an array index (\" + index + \") that is out of bounds (\" + this.values_.length + \"). Please check length first. Out of bound indices will not be tracked by MobX\");\n };\n\n _proto.set_ = function set_(index, newValue) {\n var values = this.values_;\n\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(this.atom_);\n var oldValue = values[index];\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_,\n index: index,\n newValue: newValue\n });\n if (!change) return;\n newValue = change.newValue;\n }\n\n newValue = this.enhancer_(newValue, oldValue);\n var changed = newValue !== oldValue;\n\n if (changed) {\n values[index] = newValue;\n this.notifyArrayChildUpdate_(index, newValue, oldValue);\n }\n } else if (index === values.length) {\n // add a new item\n this.spliceWithArray_(index, 0, [newValue]);\n } else {\n // out of bounds\n die(17, index, values.length);\n }\n };\n\n return ObservableArrayAdministration;\n}();\nfunction createObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n assertProxies();\n var adm = new ObservableArrayAdministration(name, enhancer, owned, false);\n addHiddenFinalProp(adm.values_, $mobx, adm);\n var proxy = new Proxy(adm.values_, arrayTraps);\n adm.proxy_ = proxy;\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true);\n adm.spliceWithArray_(0, 0, initialValues);\n allowStateChangesEnd(prev);\n }\n\n return proxy;\n} // eslint-disable-next-line\n\nvar arrayExtensions = {\n clear: function clear() {\n return this.splice(0);\n },\n replace: function replace(newItems) {\n var adm = this[$mobx];\n return adm.spliceWithArray_(0, adm.values_.length, newItems);\n },\n // Used by JSON.stringify\n toJSON: function toJSON() {\n return this.slice();\n },\n\n /*\r\n * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\r\n * since these functions alter the inner structure of the array, the have side effects.\r\n * Because the have side effects, they should not be used in computed function,\r\n * and for that reason the do not call dependencyState.notifyObserved\r\n */\n splice: function splice(index, deleteCount) {\n for (var _len = arguments.length, newItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n newItems[_key - 2] = arguments[_key];\n }\n\n var adm = this[$mobx];\n\n switch (arguments.length) {\n case 0:\n return [];\n\n case 1:\n return adm.spliceWithArray_(index);\n\n case 2:\n return adm.spliceWithArray_(index, deleteCount);\n }\n\n return adm.spliceWithArray_(index, deleteCount, newItems);\n },\n spliceWithArray: function spliceWithArray(index, deleteCount, newItems) {\n return this[$mobx].spliceWithArray_(index, deleteCount, newItems);\n },\n push: function push() {\n var adm = this[$mobx];\n\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n adm.spliceWithArray_(adm.values_.length, 0, items);\n return adm.values_.length;\n },\n pop: function pop() {\n return this.splice(Math.max(this[$mobx].values_.length - 1, 0), 1)[0];\n },\n shift: function shift() {\n return this.splice(0, 1)[0];\n },\n unshift: function unshift() {\n var adm = this[$mobx];\n\n for (var _len3 = arguments.length, items = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n items[_key3] = arguments[_key3];\n }\n\n adm.spliceWithArray_(0, 0, items);\n return adm.values_.length;\n },\n reverse: function reverse() {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n if (globalState.trackingDerivation) {\n die(37, \"reverse\");\n }\n\n this.replace(this.slice().reverse());\n return this;\n },\n sort: function sort() {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n if (globalState.trackingDerivation) {\n die(37, \"sort\");\n }\n\n var copy = this.slice();\n copy.sort.apply(copy, arguments);\n this.replace(copy);\n return this;\n },\n remove: function remove(value) {\n var adm = this[$mobx];\n var idx = adm.dehanceValues_(adm.values_).indexOf(value);\n\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n\n return false;\n }\n};\n/**\r\n * Wrap function from prototype\r\n * Without this, everything works as well, but this works\r\n * faster as everything works on unproxied values\r\n */\n\naddArrayExtension(\"concat\", simpleFunc);\naddArrayExtension(\"flat\", simpleFunc);\naddArrayExtension(\"includes\", simpleFunc);\naddArrayExtension(\"indexOf\", simpleFunc);\naddArrayExtension(\"join\", simpleFunc);\naddArrayExtension(\"lastIndexOf\", simpleFunc);\naddArrayExtension(\"slice\", simpleFunc);\naddArrayExtension(\"toString\", simpleFunc);\naddArrayExtension(\"toLocaleString\", simpleFunc); // map\n\naddArrayExtension(\"every\", mapLikeFunc);\naddArrayExtension(\"filter\", mapLikeFunc);\naddArrayExtension(\"find\", mapLikeFunc);\naddArrayExtension(\"findIndex\", mapLikeFunc);\naddArrayExtension(\"flatMap\", mapLikeFunc);\naddArrayExtension(\"forEach\", mapLikeFunc);\naddArrayExtension(\"map\", mapLikeFunc);\naddArrayExtension(\"some\", mapLikeFunc); // reduce\n\naddArrayExtension(\"reduce\", reduceLikeFunc);\naddArrayExtension(\"reduceRight\", reduceLikeFunc);\n\nfunction addArrayExtension(funcName, funcFactory) {\n if (typeof Array.prototype[funcName] === \"function\") {\n arrayExtensions[funcName] = funcFactory(funcName);\n }\n} // Report and delegate to dehanced array\n\n\nfunction simpleFunc(funcName) {\n return function () {\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction mapLikeFunc(funcName) {\n return function (callback, thisArg) {\n var _this2 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName](function (element, index) {\n return callback.call(thisArg, element, index, _this2);\n });\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction reduceLikeFunc(funcName) {\n return function () {\n var _this3 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_); // #2432 - reduce behavior depends on arguments.length\n\n var callback = arguments[0];\n\n arguments[0] = function (accumulator, currentValue, index) {\n return callback(accumulator, currentValue, index, _this3);\n };\n\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n}\n\nvar isObservableArrayAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing[$mobx]);\n}\n\nvar _Symbol$iterator, _Symbol$toStringTag;\nvar ObservableMapMarker = {};\nvar ADD = \"add\";\nvar DELETE = \"delete\"; // just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54\n// But: https://github.com/mobxjs/mobx/issues/1556\n\n_Symbol$iterator = Symbol.iterator;\n_Symbol$toStringTag = Symbol.toStringTag;\nvar ObservableMap = /*#__PURE__*/function () {\n // hasMap, not hashMap >-).\n function ObservableMap(initialData, enhancer_, name_) {\n if (enhancer_ === void 0) {\n enhancer_ = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableMap@\" + getNextId() : \"ObservableMap\";\n }\n\n this.enhancer_ = void 0;\n this.name_ = void 0;\n this[$mobx] = ObservableMapMarker;\n this.data_ = void 0;\n this.hasMap_ = void 0;\n this.keysAtom_ = void 0;\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = enhancer_;\n this.name_ = name_;\n\n if (!isFunction(Map)) {\n die(18);\n }\n\n this.keysAtom_ = createAtom(process.env.NODE_ENV !== \"production\" ? this.name_ + \".keys()\" : \"ObservableMap.keys()\");\n this.data_ = new Map();\n this.hasMap_ = new Map();\n this.merge(initialData);\n }\n\n var _proto = ObservableMap.prototype;\n\n _proto.has_ = function has_(key) {\n return this.data_.has(key);\n };\n\n _proto.has = function has(key) {\n var _this = this;\n\n if (!globalState.trackingDerivation) return this.has_(key);\n var entry = this.hasMap_.get(key);\n\n if (!entry) {\n var newEntry = entry = new ObservableValue(this.has_(key), referenceEnhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + stringifyKey(key) + \"?\" : \"ObservableMap.key?\", false);\n this.hasMap_.set(key, newEntry);\n onBecomeUnobserved(newEntry, function () {\n return _this.hasMap_[\"delete\"](key);\n });\n }\n\n return entry.get();\n };\n\n _proto.set = function set(key, value) {\n var hasKey = this.has_(key);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? UPDATE : ADD,\n object: this,\n newValue: value,\n name: key\n });\n if (!change) return this;\n value = change.newValue;\n }\n\n if (hasKey) {\n this.updateValue_(key, value);\n } else {\n this.addValue_(key, value);\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(key) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n name: key\n });\n if (!change) return false;\n }\n\n if (this.has_(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: this.data_.get(key).value_,\n name: key\n } : null;\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(_change);\n transaction(function () {\n _this2.keysAtom_.reportChanged();\n\n _this2.updateHasMapEntry_(key, false);\n\n var observable = _this2.data_.get(key);\n\n observable.setNewValue_(undefined);\n\n _this2.data_[\"delete\"](key);\n });\n if (notify) notifyListeners(this, _change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n return true;\n }\n\n return false;\n };\n\n _proto.updateHasMapEntry_ = function updateHasMapEntry_(key, value) {\n var entry = this.hasMap_.get(key);\n\n if (entry) {\n entry.setNewValue_(value);\n }\n };\n\n _proto.updateValue_ = function updateValue_(key, newValue) {\n var observable = this.data_.get(key);\n newValue = observable.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: UPDATE,\n object: this,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n observable.setNewValue_(newValue);\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n };\n\n _proto.addValue_ = function addValue_(key, newValue) {\n var _this3 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n transaction(function () {\n var observable = new ObservableValue(newValue, _this3.enhancer_, process.env.NODE_ENV !== \"production\" ? _this3.name_ + \".\" + stringifyKey(key) : \"ObservableMap.key\", false);\n\n _this3.data_.set(key, observable);\n\n newValue = observable.value_; // value might have been changed\n\n _this3.updateHasMapEntry_(key, true);\n\n _this3.keysAtom_.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n name: key,\n newValue: newValue\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n };\n\n _proto.get = function get(key) {\n if (this.has(key)) return this.dehanceValue_(this.data_.get(key).get());\n return this.dehanceValue_(undefined);\n };\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.keys = function keys() {\n this.keysAtom_.reportObserved();\n return this.data_.keys();\n };\n\n _proto.values = function values() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next = keys.next(),\n done = _keys$next.done,\n value = _keys$next.value;\n\n return {\n done: done,\n value: done ? undefined : self.get(value)\n };\n }\n });\n };\n\n _proto.entries = function entries() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next2 = keys.next(),\n done = _keys$next2.done,\n value = _keys$next2.value;\n\n return {\n done: done,\n value: done ? undefined : [value, self.get(value)]\n };\n }\n });\n };\n\n _proto[_Symbol$iterator] = function () {\n return this.entries();\n };\n\n _proto.forEach = function forEach(callback, thisArg) {\n for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n value = _step$value[1];\n callback.call(thisArg, value, key, this);\n }\n }\n /** Merge another object into this object, returns this. */\n ;\n\n _proto.merge = function merge(other) {\n var _this4 = this;\n\n if (isObservableMap(other)) {\n other = new Map(other);\n }\n\n transaction(function () {\n if (isPlainObject(other)) getPlainObjectKeys(other).forEach(function (key) {\n return _this4.set(key, other[key]);\n });else if (Array.isArray(other)) other.forEach(function (_ref) {\n var key = _ref[0],\n value = _ref[1];\n return _this4.set(key, value);\n });else if (isES6Map(other)) {\n if (other.constructor !== Map) die(19, other);\n other.forEach(function (value, key) {\n return _this4.set(key, value);\n });\n } else if (other !== null && other !== undefined) die(20, other);\n });\n return this;\n };\n\n _proto.clear = function clear() {\n var _this5 = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator2 = _createForOfIteratorHelperLoose(_this5.keys()), _step2; !(_step2 = _iterator2()).done;) {\n var key = _step2.value;\n\n _this5[\"delete\"](key);\n }\n });\n });\n };\n\n _proto.replace = function replace(values) {\n var _this6 = this;\n\n // Implementation requirements:\n // - respect ordering of replacement map\n // - allow interceptors to run and potentially prevent individual operations\n // - don't recreate observables that already exist in original map (so we don't destroy existing subscriptions)\n // - don't _keysAtom.reportChanged if the keys of resulting map are indentical (order matters!)\n // - note that result map may differ from replacement map due to the interceptors\n transaction(function () {\n // Convert to map so we can do quick key lookups\n var replacementMap = convertToMap(values);\n var orderedData = new Map(); // Used for optimization\n\n var keysReportChangedCalled = false; // Delete keys that don't exist in replacement map\n // if the key deletion is prevented by interceptor\n // add entry at the beginning of the result map\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(_this6.data_.keys()), _step3; !(_step3 = _iterator3()).done;) {\n var key = _step3.value;\n\n // Concurrently iterating/deleting keys\n // iterator should handle this correctly\n if (!replacementMap.has(key)) {\n var deleted = _this6[\"delete\"](key); // Was the key removed?\n\n\n if (deleted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n } else {\n // Delete prevented by interceptor\n var value = _this6.data_.get(key);\n\n orderedData.set(key, value);\n }\n }\n } // Merge entries\n\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(replacementMap.entries()), _step4; !(_step4 = _iterator4()).done;) {\n var _step4$value = _step4.value,\n _key = _step4$value[0],\n _value = _step4$value[1];\n\n // We will want to know whether a new key is added\n var keyExisted = _this6.data_.has(_key); // Add or update value\n\n\n _this6.set(_key, _value); // The addition could have been prevent by interceptor\n\n\n if (_this6.data_.has(_key)) {\n // The update could have been prevented by interceptor\n // and also we want to preserve existing values\n // so use value from _data map (instead of replacement map)\n var _value2 = _this6.data_.get(_key);\n\n orderedData.set(_key, _value2); // Was a new key added?\n\n if (!keyExisted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n }\n }\n } // Check for possible key order change\n\n\n if (!keysReportChangedCalled) {\n if (_this6.data_.size !== orderedData.size) {\n // If size differs, keys are definitely modified\n _this6.keysAtom_.reportChanged();\n } else {\n var iter1 = _this6.data_.keys();\n\n var iter2 = orderedData.keys();\n var next1 = iter1.next();\n var next2 = iter2.next();\n\n while (!next1.done) {\n if (next1.value !== next2.value) {\n _this6.keysAtom_.reportChanged();\n\n break;\n }\n\n next1 = iter1.next();\n next2 = iter2.next();\n }\n }\n } // Use correctly ordered map\n\n\n _this6.data_ = orderedData;\n });\n return this;\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableMap]\";\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) die(\"`observe` doesn't support fireImmediately=true in combination with maps.\");\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _createClass(ObservableMap, [{\n key: \"size\",\n get: function get() {\n this.keysAtom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag,\n get: function get() {\n return \"Map\";\n }\n }]);\n\n return ObservableMap;\n}(); // eslint-disable-next-line\n\nvar isObservableMap = /*#__PURE__*/createInstanceofPredicate(\"ObservableMap\", ObservableMap);\n\nfunction convertToMap(dataStructure) {\n if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n return dataStructure;\n } else if (Array.isArray(dataStructure)) {\n return new Map(dataStructure);\n } else if (isPlainObject(dataStructure)) {\n var map = new Map();\n\n for (var key in dataStructure) {\n map.set(key, dataStructure[key]);\n }\n\n return map;\n } else {\n return die(21, dataStructure);\n }\n}\n\nvar _Symbol$iterator$1, _Symbol$toStringTag$1;\nvar ObservableSetMarker = {};\n_Symbol$iterator$1 = Symbol.iterator;\n_Symbol$toStringTag$1 = Symbol.toStringTag;\nvar ObservableSet = /*#__PURE__*/function () {\n function ObservableSet(initialData, enhancer, name_) {\n if (enhancer === void 0) {\n enhancer = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableSet@\" + getNextId() : \"ObservableSet\";\n }\n\n this.name_ = void 0;\n this[$mobx] = ObservableSetMarker;\n this.data_ = new Set();\n this.atom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = void 0;\n this.name_ = name_;\n\n if (!isFunction(Set)) {\n die(22);\n }\n\n this.atom_ = createAtom(this.name_);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, name_);\n };\n\n if (initialData) {\n this.replace(initialData);\n }\n }\n\n var _proto = ObservableSet.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.clear = function clear() {\n var _this = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator = _createForOfIteratorHelperLoose(_this.data_.values()), _step; !(_step = _iterator()).done;) {\n var value = _step.value;\n\n _this[\"delete\"](value);\n }\n });\n });\n };\n\n _proto.forEach = function forEach(callbackFn, thisArg) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this), _step2; !(_step2 = _iterator2()).done;) {\n var value = _step2.value;\n callbackFn.call(thisArg, value, value, this);\n }\n };\n\n _proto.add = function add(value) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: ADD,\n object: this,\n newValue: value\n });\n if (!change) return this; // ideally, value = change.value would be done here, so that values can be\n // changed by interceptor. Same applies for other Set and Map api's.\n }\n\n if (!this.has(value)) {\n transaction(function () {\n _this2.data_.add(_this2.enhancer_(value, undefined));\n\n _this2.atom_.reportChanged();\n });\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n newValue: value\n } : null;\n\n if (notifySpy && process.env.NODE_ENV !== \"production\") spyReportStart(_change);\n if (notify) notifyListeners(this, _change);\n if (notifySpy && process.env.NODE_ENV !== \"production\") spyReportEnd();\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(value) {\n var _this3 = this;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n oldValue: value\n });\n if (!change) return false;\n }\n\n if (this.has(value)) {\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change2 = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: value\n } : null;\n\n if (notifySpy && process.env.NODE_ENV !== \"production\") spyReportStart(_change2);\n transaction(function () {\n _this3.atom_.reportChanged();\n\n _this3.data_[\"delete\"](value);\n });\n if (notify) notifyListeners(this, _change2);\n if (notifySpy && process.env.NODE_ENV !== \"production\") spyReportEnd();\n return true;\n }\n\n return false;\n };\n\n _proto.has = function has(value) {\n this.atom_.reportObserved();\n return this.data_.has(this.dehanceValue_(value));\n };\n\n _proto.entries = function entries() {\n var nextIndex = 0;\n var keys = Array.from(this.keys());\n var values = Array.from(this.values());\n return makeIterable({\n next: function next() {\n var index = nextIndex;\n nextIndex += 1;\n return index < values.length ? {\n value: [keys[index], values[index]],\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.keys = function keys() {\n return this.values();\n };\n\n _proto.values = function values() {\n this.atom_.reportObserved();\n var self = this;\n var nextIndex = 0;\n var observableValues = Array.from(this.data_.values());\n return makeIterable({\n next: function next() {\n return nextIndex < observableValues.length ? {\n value: self.dehanceValue_(observableValues[nextIndex++]),\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.replace = function replace(other) {\n var _this4 = this;\n\n if (isObservableSet(other)) {\n other = new Set(other);\n }\n\n transaction(function () {\n if (Array.isArray(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (isES6Set(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (other !== null && other !== undefined) {\n die(\"Cannot initialize set from \" + other);\n }\n });\n return this;\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n // ... 'fireImmediately' could also be true?\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) die(\"`observe` doesn't support fireImmediately=true in combination with sets.\");\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableSet]\";\n };\n\n _proto[_Symbol$iterator$1] = function () {\n return this.values();\n };\n\n _createClass(ObservableSet, [{\n key: \"size\",\n get: function get() {\n this.atom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag$1,\n get: function get() {\n return \"Set\";\n }\n }]);\n\n return ObservableSet;\n}(); // eslint-disable-next-line\n\nvar isObservableSet = /*#__PURE__*/createInstanceofPredicate(\"ObservableSet\", ObservableSet);\n\nvar inferredAnnotationsSymbol = /*#__PURE__*/Symbol(\"mobx-inferred-annotations\");\nvar descriptorCache = /*#__PURE__*/Object.create(null);\nvar REMOVE = \"remove\";\nvar ObservableObjectAdministration = /*#__PURE__*/function () {\n function ObservableObjectAdministration(target_, values_, name_, // Used anytime annotation is not explicitely provided\n defaultAnnotation_, // Bind automatically inferred actions?\n autoBind_) {\n if (values_ === void 0) {\n values_ = new Map();\n }\n\n if (defaultAnnotation_ === void 0) {\n defaultAnnotation_ = observable;\n }\n\n if (autoBind_ === void 0) {\n autoBind_ = false;\n }\n\n this.target_ = void 0;\n this.values_ = void 0;\n this.name_ = void 0;\n this.defaultAnnotation_ = void 0;\n this.autoBind_ = void 0;\n this.keysAtom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.proxy_ = void 0;\n this.isPlainObject_ = void 0;\n this.appliedAnnotations_ = void 0;\n this.pendingKeys_ = void 0;\n this.target_ = target_;\n this.values_ = values_;\n this.name_ = name_;\n this.defaultAnnotation_ = defaultAnnotation_;\n this.autoBind_ = autoBind_;\n this.keysAtom_ = new Atom(process.env.NODE_ENV !== \"production\" ? this.name_ + \".keys\" : \"ObservableObject.keys\"); // Optimization: we use this frequently\n\n this.isPlainObject_ = isPlainObject(this.target_);\n\n if (process.env.NODE_ENV !== \"production\" && !isAnnotation(this.defaultAnnotation_)) {\n die(\"defaultAnnotation must be valid annotation\");\n }\n\n if (process.env.NODE_ENV !== \"production\" && typeof this.autoBind_ !== \"boolean\") {\n die(\"autoBind must be boolean\");\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n // Prepare structure for tracking which fields were already annotated\n this.appliedAnnotations_ = {};\n }\n }\n\n var _proto = ObservableObjectAdministration.prototype;\n\n _proto.getObservablePropValue_ = function getObservablePropValue_(key) {\n return this.values_.get(key).get();\n };\n\n _proto.setObservablePropValue_ = function setObservablePropValue_(key, newValue) {\n var observable = this.values_.get(key);\n\n if (observable instanceof ComputedValue) {\n observable.set(newValue);\n return true;\n } // intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: newValue\n });\n if (!change) return null;\n newValue = change.newValue;\n }\n\n newValue = observable.prepareNewValue_(newValue); // notify spy & observers\n\n if (newValue !== globalState.UNCHANGED) {\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n\n var _change = notify || notifySpy ? {\n type: UPDATE,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(_change);\n observable.setNewValue_(newValue);\n if (notify) notifyListeners(this, _change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n\n return true;\n };\n\n _proto.get_ = function get_(key) {\n if (globalState.trackingDerivation && !hasProp(this.target_, key)) {\n // Key doesn't exist yet, subscribe for it in case it's added later\n this.has_(key);\n }\n\n return this.target_[key];\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {any} value\r\n * @param {Annotation|boolean} annotation true - infer from descriptor, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.set_ = function set_(key, value, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // Don't use .has(key) - we care about own\n if (hasProp(this.target_, key)) {\n // Existing prop\n if (this.values_.has(key)) {\n // Observable (can be intercepted)\n return this.setObservablePropValue_(key, value);\n } else if (proxyTrap) {\n // Non-observable - proxy\n return Reflect.set(this.target_, key, value);\n } else {\n // Non-observable\n this.target_[key] = value;\n return true;\n }\n } else {\n // New prop\n return this.extend_(key, {\n value: value,\n enumerable: true,\n writable: true,\n configurable: true\n }, this.defaultAnnotation_, proxyTrap);\n }\n } // Trap for \"in\"\n ;\n\n _proto.has_ = function has_(key) {\n if (!globalState.trackingDerivation) {\n // Skip key subscription outside derivation\n return key in this.target_;\n }\n\n this.pendingKeys_ || (this.pendingKeys_ = new Map());\n var entry = this.pendingKeys_.get(key);\n\n if (!entry) {\n entry = new ObservableValue(key in this.target_, referenceEnhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + stringifyKey(key) + \"?\" : \"ObservableObject.key?\", false);\n this.pendingKeys_.set(key, entry);\n }\n\n return entry.get();\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {Annotation|boolean} annotation true - infer from object or it's prototype, false - ignore\r\n */\n ;\n\n _proto.make_ = function make_(key, annotation) {\n if (annotation === true) {\n annotation = this.inferAnnotation_(key);\n }\n\n if (annotation === false) {\n return;\n }\n\n assertAnnotable(this, annotation, key);\n annotation.make_(this, key);\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {Annotation|boolean} annotation true - infer from descriptor, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.extend_ = function extend_(key, descriptor, annotation, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n if (annotation === true) {\n annotation = inferAnnotationFromDescriptor(descriptor, this.defaultAnnotation_, this.autoBind_);\n }\n\n if (annotation === false) {\n return this.defineProperty_(key, descriptor, proxyTrap);\n }\n\n assertAnnotable(this, annotation, key);\n var outcome = annotation.extend_(this, key, descriptor, proxyTrap);\n\n if (outcome) {\n recordAnnotationApplied(this, annotation, key);\n }\n\n return outcome;\n };\n\n _proto.inferAnnotation_ = function inferAnnotation_(key) {\n var _this$target_$inferre;\n\n // Inherited is fine - annotation cannot differ in subclass\n var annotation = (_this$target_$inferre = this.target_[inferredAnnotationsSymbol]) == null ? void 0 : _this$target_$inferre.get(key);\n if (annotation) return annotation;\n var current = this.target_;\n\n while (current && current !== objectPrototype) {\n var descriptor = getDescriptor(current, key);\n\n if (descriptor) {\n annotation = inferAnnotationFromDescriptor(descriptor, this.defaultAnnotation_, this.autoBind_);\n break;\n }\n\n current = Object.getPrototypeOf(current);\n } // Not found (false means ignore)\n\n\n if (annotation === undefined) {\n die(1, \"true\", key);\n } // Cache the annotation.\n // Note we can do this only because annotation and field can't change.\n\n\n if (!this.isPlainObject_) {\n // We could also place it on furthest proto, shoudn't matter\n var closestProto = Object.getPrototypeOf(this.target_);\n\n if (!hasProp(closestProto, inferredAnnotationsSymbol)) {\n addHiddenProp(closestProto, inferredAnnotationsSymbol, new Map());\n }\n\n closestProto[inferredAnnotationsSymbol].set(key, annotation);\n }\n\n return annotation;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.defineProperty_ = function defineProperty_(key, descriptor, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: descriptor.value\n });\n if (!change) return null;\n var newValue = change.newValue;\n\n if (descriptor.value !== newValue) {\n descriptor = _extends({}, descriptor, {\n value: newValue\n });\n }\n } // Define\n\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n } // Notify\n\n\n this.notifyPropertyAddition_(key, descriptor.value);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineObservableProperty_ = function defineObservableProperty_(key, value, enhancer, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: value\n });\n if (!change) return null;\n value = change.newValue;\n }\n\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: true,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n var _observable = new ObservableValue(value, enhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + key.toString() : \"ObservableObject.key\", false);\n\n this.values_.set(key, _observable); // Notify (value possibly changed by ObservableValue)\n\n this.notifyPropertyAddition_(key, _observable.value_);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineComputedProperty_ = function defineComputedProperty_(key, options, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: undefined\n });\n if (!change) return null;\n }\n\n options.name || (options.name = process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + key.toString() : \"ObservableObject.key\");\n options.context = this.proxy_ || this.target_;\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: false,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n this.values_.set(key, new ComputedValue(options)); // Notify\n\n this.notifyPropertyAddition_(key, undefined);\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.delete_ = function delete_(key, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // No such prop\n if (!hasProp(this.target_, key)) {\n return true;\n } // Intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: REMOVE\n }); // Cancelled\n\n if (!change) return null;\n } // Delete\n\n\n try {\n var _this$pendingKeys_, _this$pendingKeys_$ge;\n\n startBatch();\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n\n var _observable2 = this.values_.get(key); // Value needed for spies/listeners\n\n\n var value = undefined; // Optimization: don't pull the value unless we will need it\n\n if (!_observable2 && (notify || notifySpy)) {\n var _getDescriptor;\n\n value = (_getDescriptor = getDescriptor(this.target_, key)) == null ? void 0 : _getDescriptor.value;\n } // delete prop (do first, may fail)\n\n\n if (proxyTrap) {\n if (!Reflect.deleteProperty(this.target_, key)) {\n return false;\n }\n } else {\n delete this.target_[key];\n } // Allow re-annotating this field\n\n\n if (process.env.NODE_ENV !== \"production\") {\n delete this.appliedAnnotations_[key];\n } // Clear observable\n\n\n if (_observable2) {\n this.values_[\"delete\"](key); // for computed, value is undefined\n\n if (_observable2 instanceof ObservableValue) {\n value = _observable2.value_;\n } // Notify: autorun(() => obj[key]), see #1796\n\n\n propagateChanged(_observable2);\n } // Notify \"keys/entries/values\" observers\n\n\n this.keysAtom_.reportChanged(); // Notify \"has\" observers\n // \"in\" as it may still exist in proto\n\n (_this$pendingKeys_ = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_$ge = _this$pendingKeys_.get(key)) == null ? void 0 : _this$pendingKeys_$ge.set(key in this.target_); // Notify spies/listeners\n\n if (notify || notifySpy) {\n var _change2 = {\n type: REMOVE,\n observableKind: \"object\",\n object: this.proxy_ || this.target_,\n debugObjectName: this.name_,\n oldValue: value,\n name: key\n };\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(_change2);\n if (notify) notifyListeners(this, _change2);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n ;\n\n _proto.observe_ = function observe_(callback, fireImmediately) {\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) die(\"`observe` doesn't support the fire immediately property for observable objects.\");\n return registerListener(this, callback);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.notifyPropertyAddition_ = function notifyPropertyAddition_(key, value) {\n var _this$pendingKeys_2, _this$pendingKeys_2$g;\n\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n\n if (notify || notifySpy) {\n var change = notify || notifySpy ? {\n type: ADD,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: value\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n\n (_this$pendingKeys_2 = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_2$g = _this$pendingKeys_2.get(key)) == null ? void 0 : _this$pendingKeys_2$g.set(true); // Notify \"keys/entries/values\" observers\n\n this.keysAtom_.reportChanged();\n };\n\n _proto.ownKeys_ = function ownKeys_() {\n this.keysAtom_.reportObserved();\n return ownKeys(this.target_);\n };\n\n _proto.keys_ = function keys_() {\n // Returns enumerable && own, but unfortunately keysAtom will report on ANY key change.\n // There is no way to distinguish between Object.keys(object) and Reflect.ownKeys(object) - both are handled by ownKeys trap.\n // We can either over-report in Object.keys(object) or under-report in Reflect.ownKeys(object)\n // We choose to over-report in Object.keys(object), because:\n // - typically it's used with simple data objects\n // - when symbolic/non-enumerable keys are relevant Reflect.ownKeys works as expected\n this.keysAtom_.reportObserved();\n return Object.keys(this.target_);\n };\n\n return ObservableObjectAdministration;\n}();\nfunction asObservableObject(target, options) {\n var _options$name;\n\n if (process.env.NODE_ENV !== \"production\" && options && isObservableObject(target)) {\n die(\"Options can't be provided for already observable objects.\");\n }\n\n if (hasProp(target, $mobx)) {\n if (process.env.NODE_ENV !== \"production\" && !(getAdministration(target) instanceof ObservableObjectAdministration)) {\n die(\"Cannot convert '\" + getDebugName(target) + \"' into observable object:\" + \"\\nThe target is already observable of different type.\" + \"\\nExtending builtins is not supported.\");\n }\n\n return target;\n }\n\n if (process.env.NODE_ENV !== \"production\" && !Object.isExtensible(target)) die(\"Cannot make the designated object observable; it is not extensible\");\n var name = (_options$name = options == null ? void 0 : options.name) != null ? _options$name : process.env.NODE_ENV !== \"production\" ? (isPlainObject(target) ? \"ObservableObject\" : target.constructor.name) + \"@\" + getNextId() : \"ObservableObject\";\n var adm = new ObservableObjectAdministration(target, new Map(), String(name), getAnnotationFromOptions(options), options == null ? void 0 : options.autoBind);\n addHiddenProp(target, $mobx, adm);\n return target;\n}\nvar isObservableObjectAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\n\nfunction getCachedObservablePropDescriptor(key) {\n return descriptorCache[key] || (descriptorCache[key] = {\n get: function get() {\n return this[$mobx].getObservablePropValue_(key);\n },\n set: function set(value) {\n return this[$mobx].setObservablePropValue_(key, value);\n }\n });\n}\n\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n return isObservableObjectAdministration(thing[$mobx]);\n }\n\n return false;\n}\nfunction recordAnnotationApplied(adm, annotation, key) {\n var _adm$target_$storedAn;\n\n if (process.env.NODE_ENV !== \"production\") {\n adm.appliedAnnotations_[key] = annotation;\n } // Remove applied decorator annotation so we don't try to apply it again in subclass constructor\n\n\n (_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? true : delete _adm$target_$storedAn[key];\n}\n\nfunction assertAnnotable(adm, annotation, key) {\n // Valid annotation\n if (process.env.NODE_ENV !== \"production\" && !isAnnotation(annotation)) {\n die(\"Cannot annotate '\" + adm.name_ + \".\" + key.toString() + \"': Invalid annotation.\");\n }\n /*\r\n // Configurable, not sealed, not frozen\r\n // Possibly not needed, just a little better error then the one thrown by engine.\r\n // Cases where this would be useful the most (subclass field initializer) are not interceptable by this.\r\n if (__DEV__) {\r\n const configurable = getDescriptor(adm.target_, key)?.configurable\r\n const frozen = Object.isFrozen(adm.target_)\r\n const sealed = Object.isSealed(adm.target_)\r\n if (!configurable || frozen || sealed) {\r\n const fieldName = `${adm.name_}.${key.toString()}`\r\n const requestedAnnotationType = annotation.annotationType_\r\n let error = `Cannot apply '${requestedAnnotationType}' to '${fieldName}':`\r\n if (frozen) {\r\n error += `\\nObject is frozen.`\r\n }\r\n if (sealed) {\r\n error += `\\nObject is sealed.`\r\n }\r\n if (!configurable) {\r\n error += `\\nproperty is not configurable.`\r\n // Mention only if caused by us to avoid confusion\r\n if (hasProp(adm.appliedAnnotations!, key)) {\r\n error += `\\nTo prevent accidental re-definition of a field by a subclass, `\r\n error += `all annotated fields of non-plain objects (classes) are not configurable.`\r\n }\r\n }\r\n die(error)\r\n }\r\n }\r\n */\n // Not annotated\n\n\n if (process.env.NODE_ENV !== \"production\" && !isOverride(annotation) && hasProp(adm.appliedAnnotations_, key)) {\n var fieldName = adm.name_ + \".\" + key.toString();\n var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already annotated with '\" + currentAnnotationType + \"'.\") + \"\\nRe-annotating fields is not allowed.\" + \"\\nUse 'override' annotation for methods overriden by subclass.\");\n }\n}\n\n/**\r\n * This array buffer contains two lists of properties, so that all arrays\r\n * can recycle their property definitions, which significantly improves performance of creating\r\n * properties on the fly.\r\n */\n\nvar OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array\n\nvar StubArray = function StubArray() {};\n\nfunction inherit(ctor, proto) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(ctor.prototype, proto);\n } else if (ctor.prototype.__proto__ !== undefined) {\n ctor.prototype.__proto__ = proto;\n } else {\n ctor.prototype = proto;\n }\n}\n\ninherit(StubArray, Array.prototype); // Weex proto freeze protection was here,\n// but it is unclear why the hack is need as MobX never changed the prototype\n// anyway, so removed it in V6\n\nvar LegacyObservableArray = /*#__PURE__*/function (_StubArray) {\n _inheritsLoose(LegacyObservableArray, _StubArray);\n\n function LegacyObservableArray(initialValues, enhancer, name, owned) {\n var _this;\n\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n _this = _StubArray.call(this) || this;\n var adm = new ObservableArrayAdministration(name, enhancer, owned, true);\n adm.proxy_ = _assertThisInitialized(_this);\n addHiddenFinalProp(_assertThisInitialized(_this), $mobx, adm);\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true); // @ts-ignore\n\n _this.spliceWithArray(0, 0, initialValues);\n\n allowStateChangesEnd(prev);\n }\n\n return _this;\n }\n\n var _proto = LegacyObservableArray.prototype;\n\n _proto.concat = function concat() {\n this[$mobx].atom_.reportObserved();\n\n for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) {\n arrays[_key] = arguments[_key];\n }\n\n return Array.prototype.concat.apply(this.slice(), //@ts-ignore\n arrays.map(function (a) {\n return isObservableArray(a) ? a.slice() : a;\n }));\n };\n\n _proto[Symbol.iterator] = function () {\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function next() {\n // @ts-ignore\n return nextIndex < self.length ? {\n value: self[nextIndex++],\n done: false\n } : {\n done: true,\n value: undefined\n };\n }\n });\n };\n\n _createClass(LegacyObservableArray, [{\n key: \"length\",\n get: function get() {\n return this[$mobx].getArrayLength_();\n },\n set: function set(newLength) {\n this[$mobx].setArrayLength_(newLength);\n }\n }, {\n key: Symbol.toStringTag,\n get: function get() {\n return \"Array\";\n }\n }]);\n\n return LegacyObservableArray;\n}(StubArray);\n\nObject.entries(arrayExtensions).forEach(function (_ref) {\n var prop = _ref[0],\n fn = _ref[1];\n if (prop !== \"concat\") addHiddenProp(LegacyObservableArray.prototype, prop, fn);\n});\n\nfunction createArrayEntryDescriptor(index) {\n return {\n enumerable: false,\n configurable: true,\n get: function get() {\n return this[$mobx].get_(index);\n },\n set: function set(value) {\n this[$mobx].set_(index, value);\n }\n };\n}\n\nfunction createArrayBufferItem(index) {\n defineProperty(LegacyObservableArray.prototype, \"\" + index, createArrayEntryDescriptor(index));\n}\n\nfunction reserveArrayBuffer(max) {\n if (max > OBSERVABLE_ARRAY_BUFFER_SIZE) {\n for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max + 100; index++) {\n createArrayBufferItem(index);\n }\n\n OBSERVABLE_ARRAY_BUFFER_SIZE = max;\n }\n}\nreserveArrayBuffer(1000);\nfunction createLegacyArray(initialValues, enhancer, name) {\n return new LegacyObservableArray(initialValues, enhancer, name);\n}\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n if (property !== undefined) die(23);\n return thing[$mobx].atom_;\n }\n\n if (isObservableSet(thing)) {\n return thing[$mobx];\n }\n\n if (isObservableMap(thing)) {\n if (property === undefined) return thing.keysAtom_;\n var observable = thing.data_.get(property) || thing.hasMap_.get(property);\n if (!observable) die(25, property, getDebugName(thing));\n return observable;\n }\n\n if (isObservableObject(thing)) {\n if (!property) return die(26);\n\n var _observable = thing[$mobx].values_.get(property);\n\n if (!_observable) die(27, property, getDebugName(thing));\n return _observable;\n }\n\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n } else if (isFunction(thing)) {\n if (isReaction(thing[$mobx])) {\n // disposer function\n return thing[$mobx];\n }\n }\n\n die(28);\n}\nfunction getAdministration(thing, property) {\n if (!thing) die(29);\n if (property !== undefined) return getAdministration(getAtom(thing, property));\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) return thing;\n if (isObservableMap(thing) || isObservableSet(thing)) return thing;\n if (thing[$mobx]) return thing[$mobx];\n die(24, thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n\n if (property !== undefined) {\n named = getAtom(thing, property);\n } else if (isAction(thing)) {\n return thing.name;\n } else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing)) {\n named = getAdministration(thing);\n } else {\n // valid for arrays as well\n named = getAtom(thing);\n }\n\n return named.name_;\n}\n\nvar toString = objectPrototype.toString;\nfunction deepEqual(a, b, depth) {\n if (depth === void 0) {\n depth = -1;\n }\n\n return eq(a, b, depth);\n} // Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Internal recursive comparison function for `isEqual`.\n\nfunction eq(a, b, depth, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b; // `null` or `undefined` only equal to itself (strict comparison).\n\n if (a == null || b == null) return false; // `NaN`s are equivalent, but non-reflexive.\n\n if (a !== a) return b !== b; // Exhaust primitive checks\n\n var type = typeof a;\n if (!isFunction(type) && type !== \"object\" && typeof b != \"object\") return false; // Compare `[[Class]]` names.\n\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case \"[object RegExp]\": // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n\n case \"[object String]\":\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return \"\" + a === \"\" + b;\n\n case \"[object Number]\":\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values.\n\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n\n case \"[object Date]\":\n case \"[object Boolean]\":\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n\n case \"[object Symbol]\":\n return typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b);\n\n case \"[object Map]\":\n case \"[object Set]\":\n // Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.\n // Hide this extra level by increasing the depth.\n if (depth >= 0) {\n depth++;\n }\n\n break;\n } // Unwrap any wrapped objects.\n\n\n a = unwrap(a);\n b = unwrap(b);\n var areArrays = className === \"[object Array]\";\n\n if (!areArrays) {\n if (typeof a != \"object\" || typeof b != \"object\") return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n\n var aCtor = a.constructor,\n bCtor = b.constructor;\n\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && isFunction(bCtor) && bCtor instanceof bCtor) && \"constructor\" in a && \"constructor\" in b) {\n return false;\n }\n }\n\n if (depth === 0) {\n return false;\n } else if (depth < 0) {\n depth = -1;\n } // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n\n\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n } // Add the first object to the stack of traversed objects.\n\n\n aStack.push(a);\n bStack.push(b); // Recursively compare objects and arrays.\n\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties.\n\n while (length--) {\n if (!eq(a[length], b[length], depth - 1, aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = Object.keys(a);\n var key;\n length = keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality.\n\n if (Object.keys(b).length !== length) return false;\n\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(hasProp(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack))) return false;\n }\n } // Remove the first object from the stack of traversed objects.\n\n\n aStack.pop();\n bStack.pop();\n return true;\n}\n\nfunction unwrap(a) {\n if (isObservableArray(a)) return a.slice();\n if (isES6Map(a) || isObservableMap(a)) return Array.from(a.entries());\n if (isES6Set(a) || isObservableSet(a)) return Array.from(a.entries());\n return a;\n}\n\nfunction makeIterable(iterator) {\n iterator[Symbol.iterator] = getSelf;\n return iterator;\n}\n\nfunction getSelf() {\n return this;\n}\n\n/**\r\n * Infers the best fitting annotation from property descriptor or false if the field shoudn't be annotated\r\n * - getter(+setter) -> computed\r\n * - setter w/o getter -> false (ignore)\r\n * - flow -> false (ignore)\r\n * - generator -> flow\r\n * - action -> false (ignore)\r\n * - function -> action (optionally bound)\r\n * - other -> defaultAnnotation\r\n */\n\nfunction inferAnnotationFromDescriptor(desc, defaultAnnotation, autoBind) {\n if (desc.get) return computed;\n if (desc.set) return false; // ignore lone setter\n // If already wrapped in action/flow, don't do that another time, but assume it is already set up properly.\n\n return isFunction(desc.value) ? isGenerator(desc.value) ? isFlow(desc.value) ? false : flow : isAction(desc.value) ? false : autoBind ? autoAction.bound : autoAction : defaultAnnotation;\n}\nfunction isAnnotation(thing) {\n return (// Can be function\n thing instanceof Object && typeof thing.annotationType_ === \"string\" && isFunction(thing.make_) && isFunction(thing.extend_)\n );\n}\n\n/**\r\n * (c) Michel Weststrate 2015 - 2020\r\n * MIT Licensed\r\n *\r\n * Welcome to the mobx sources! To get an global overview of how MobX internally works,\r\n * this is a good place to start:\r\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\r\n *\r\n * Source folders:\r\n * ===============\r\n *\r\n * - api/ Most of the public static methods exposed by the module can be found here.\r\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\r\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\r\n * - utils/ Utility stuff.\r\n *\r\n */\n[\"Symbol\", \"Map\", \"Set\", \"Symbol\"].forEach(function (m) {\n var g = getGlobal();\n\n if (typeof g[m] === \"undefined\") {\n die(\"MobX requires global '\" + m + \"' to be available or polyfilled\");\n }\n});\n\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n // See: https://github.com/andykog/mobx-devtools/\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n spy: spy,\n extras: {\n getDebugName: getDebugName\n },\n $mobx: $mobx\n });\n}\n\nexport { $mobx, FlowCancellationError, ObservableMap, ObservableSet, Reaction, allowStateChanges as _allowStateChanges, runInAction as _allowStateChangesInsideComputed, allowStateReadsEnd as _allowStateReadsEnd, allowStateReadsStart as _allowStateReadsStart, autoAction as _autoAction, _endAction, getAdministration as _getAdministration, getGlobalState as _getGlobalState, interceptReads as _interceptReads, isComputingDerivation as _isComputingDerivation, resetGlobalState as _resetGlobalState, _startAction, action, autorun, comparer, computed, configure, createAtom, entries, extendObservable, flow, flowResult, get, getAtom, getDebugName, getDependencyTree, getObserverTree, has, intercept, isAction, isObservableValue as isBoxedObservable, isComputed, isComputedProp, isFlowCancellationError, isObservable, isObservableArray, isObservableMap, isObservableObject, isObservableProp, isObservableSet, keys, makeAutoObservable, makeObservable, observable, observe, onBecomeObserved, onBecomeUnobserved, onReactionError, override, reaction, remove, runInAction, set, spy, toJS, trace, transaction, untracked, values, when };\n//# sourceMappingURL=mobx.esm.js.map\n","var index = (function (p) {\n return p instanceof Function ? p // fn\n : typeof p === 'string' ? function (obj) {\n return obj[p];\n } // property name\n : function (obj) {\n return p;\n };\n}); // constant\n\nexport default index;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport AnimatedValue from './nodes/AnimatedValue';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport findNodeHandle from '../../../exports/findNodeHandle';\nimport invariant from 'fbjs/lib/invariant';\nimport { shouldUseNativeDriver } from './NativeAnimatedHelper';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nexport function attachNativeEvent(viewRef, eventName, argMapping) {\n // Find animated values in `argMapping` and create an array representing their\n // key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].\n var eventMappings = [];\n\n var traverse = function traverse(value, path) {\n if (value instanceof AnimatedValue) {\n value.__makeNative();\n\n eventMappings.push({\n nativeEventPath: path,\n animatedValueTag: value.__getNativeTag()\n });\n } else if (typeof value === 'object') {\n for (var _key in value) {\n traverse(value[_key], path.concat(_key));\n }\n }\n };\n\n invariant(argMapping[0] && argMapping[0].nativeEvent, 'Native driven events only support animated values contained inside `nativeEvent`.'); // Assume that the event containing `nativeEvent` is always the first argument.\n\n traverse(argMapping[0].nativeEvent, []);\n var viewTag = findNodeHandle(viewRef);\n\n if (viewTag != null) {\n eventMappings.forEach(function (mapping) {\n NativeAnimatedHelper.API.addAnimatedEventToView(viewTag, eventName, mapping);\n });\n }\n\n return {\n detach: function detach() {\n if (viewTag != null) {\n eventMappings.forEach(function (mapping) {\n NativeAnimatedHelper.API.removeAnimatedEventFromView(viewTag, eventName, // $FlowFixMe[incompatible-call]\n mapping.animatedValueTag);\n });\n }\n }\n };\n}\n\nfunction validateMapping(argMapping, args) {\n var validate = function validate(recMapping, recEvt, key) {\n if (recMapping instanceof AnimatedValue) {\n invariant(typeof recEvt === 'number', 'Bad mapping of event key ' + key + ', should be number but got ' + typeof recEvt);\n return;\n }\n\n if (typeof recEvt === 'number') {\n invariant(recMapping instanceof AnimatedValue, 'Bad mapping of type ' + typeof recMapping + ' for key ' + key + ', event value must map to AnimatedValue');\n return;\n }\n\n invariant(typeof recMapping === 'object', 'Bad mapping of type ' + typeof recMapping + ' for key ' + key);\n invariant(typeof recEvt === 'object', 'Bad event of type ' + typeof recEvt + ' for key ' + key);\n\n for (var mappingKey in recMapping) {\n validate(recMapping[mappingKey], recEvt[mappingKey], mappingKey);\n }\n };\n\n invariant(args.length >= argMapping.length, 'Event has less arguments than mapping');\n argMapping.forEach(function (mapping, idx) {\n validate(mapping, args[idx], 'arg' + idx);\n });\n}\n\nexport var AnimatedEvent = /*#__PURE__*/function () {\n function AnimatedEvent(argMapping, config) {\n this._listeners = [];\n this._argMapping = argMapping;\n\n if (config == null) {\n console.warn('Animated.event now requires a second argument for options');\n config = {\n useNativeDriver: false\n };\n }\n\n if (config.listener) {\n this.__addListener(config.listener);\n }\n\n this._callListeners = this._callListeners.bind(this);\n this._attachedEvent = null;\n this.__isNative = shouldUseNativeDriver(config);\n }\n\n var _proto = AnimatedEvent.prototype;\n\n _proto.__addListener = function __addListener(callback) {\n this._listeners.push(callback);\n };\n\n _proto.__removeListener = function __removeListener(callback) {\n this._listeners = this._listeners.filter(function (listener) {\n return listener !== callback;\n });\n };\n\n _proto.__attach = function __attach(viewRef, eventName) {\n invariant(this.__isNative, 'Only native driven events need to be attached.');\n this._attachedEvent = attachNativeEvent(viewRef, eventName, this._argMapping);\n };\n\n _proto.__detach = function __detach(viewTag, eventName) {\n invariant(this.__isNative, 'Only native driven events need to be detached.');\n this._attachedEvent && this._attachedEvent.detach();\n };\n\n _proto.__getHandler = function __getHandler() {\n var _this = this;\n\n if (this.__isNative) {\n if (__DEV__) {\n var _validatedMapping = false;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (!_validatedMapping) {\n validateMapping(_this._argMapping, args);\n _validatedMapping = true;\n }\n\n _this._callListeners.apply(_this, args);\n };\n } else {\n return this._callListeners;\n }\n }\n\n var validatedMapping = false;\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n if (__DEV__ && !validatedMapping) {\n validateMapping(_this._argMapping, args);\n validatedMapping = true;\n }\n\n var traverse = function traverse(recMapping, recEvt, key) {\n if (recMapping instanceof AnimatedValue) {\n if (typeof recEvt === 'number') {\n recMapping.setValue(recEvt);\n }\n } else if (typeof recMapping === 'object') {\n for (var mappingKey in recMapping) {\n /* $FlowFixMe(>=0.120.0) This comment suppresses an error found\n * when Flow v0.120 was deployed. To see the error, delete this\n * comment and run Flow. */\n traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey);\n }\n }\n };\n\n _this._argMapping.forEach(function (mapping, idx) {\n traverse(mapping, args[idx], 'arg' + idx);\n });\n\n _this._callListeners.apply(_this, args);\n };\n };\n\n _proto._callListeners = function _callListeners() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key4 = 0; _key4 < _len3; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n this._listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n };\n\n return AnimatedEvent;\n}();","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\n\nvar AnimatedTransform = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedTransform, _AnimatedWithChildren);\n\n function AnimatedTransform(transforms) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._transforms = transforms;\n return _this;\n }\n\n var _proto = AnimatedTransform.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._transforms.forEach(function (transform) {\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n });\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._transforms.map(function (transform) {\n var result = {};\n\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n result[key] = value.__getValue();\n } else {\n result[key] = value;\n }\n }\n\n return result;\n });\n };\n\n _proto.__getAnimatedValue = function __getAnimatedValue() {\n return this._transforms.map(function (transform) {\n var result = {};\n\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n result[key] = value.__getAnimatedValue();\n } else {\n // All transform components needed to recompose matrix\n result[key] = value;\n }\n }\n\n return result;\n });\n };\n\n _proto.__attach = function __attach() {\n var _this2 = this;\n\n this._transforms.forEach(function (transform) {\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n value.__addChild(_this2);\n }\n }\n });\n };\n\n _proto.__detach = function __detach() {\n var _this3 = this;\n\n this._transforms.forEach(function (transform) {\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n value.__removeChild(_this3);\n }\n }\n });\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n var transConfigs = [];\n\n this._transforms.forEach(function (transform) {\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n transConfigs.push({\n type: 'animated',\n property: key,\n nodeTag: value.__getNativeTag()\n });\n } else {\n transConfigs.push({\n type: 'static',\n property: key,\n value: NativeAnimatedHelper.transformDataType(value)\n });\n }\n }\n });\n\n NativeAnimatedHelper.validateTransform(transConfigs);\n return {\n type: 'transform',\n transforms: transConfigs\n };\n };\n\n return AnimatedTransform;\n}(AnimatedWithChildren);\n\nexport default AnimatedTransform;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedTransform from './AnimatedTransform';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport flattenStyle from '../../../../exports/StyleSheet/flattenStyle';\n\nvar AnimatedStyle = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedStyle, _AnimatedWithChildren);\n\n function AnimatedStyle(style) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n style = flattenStyle(style) || {};\n\n if (style.transform) {\n style = _objectSpread(_objectSpread({}, style), {}, {\n transform: new AnimatedTransform(style.transform)\n });\n }\n\n _this._style = style;\n return _this;\n } // Recursively get values for nested styles (like iOS's shadowOffset)\n\n\n var _proto = AnimatedStyle.prototype;\n\n _proto._walkStyleAndGetValues = function _walkStyleAndGetValues(style) {\n var updatedStyle = {};\n\n for (var key in style) {\n var value = style[key];\n\n if (value instanceof AnimatedNode) {\n if (!value.__isNative) {\n // We cannot use value of natively driven nodes this way as the value we have access from\n // JS may not be up to date.\n updatedStyle[key] = value.__getValue();\n }\n } else if (value && !Array.isArray(value) && typeof value === 'object') {\n // Support animating nested values (for example: shadowOffset.height)\n updatedStyle[key] = this._walkStyleAndGetValues(value);\n } else {\n updatedStyle[key] = value;\n }\n }\n\n return updatedStyle;\n };\n\n _proto.__getValue = function __getValue() {\n return this._walkStyleAndGetValues(this._style);\n } // Recursively get animated values for nested styles (like iOS's shadowOffset)\n ;\n\n _proto._walkStyleAndGetAnimatedValues = function _walkStyleAndGetAnimatedValues(style) {\n var updatedStyle = {};\n\n for (var key in style) {\n var value = style[key];\n\n if (value instanceof AnimatedNode) {\n updatedStyle[key] = value.__getAnimatedValue();\n } else if (value && !Array.isArray(value) && typeof value === 'object') {\n // Support animating nested values (for example: shadowOffset.height)\n updatedStyle[key] = this._walkStyleAndGetAnimatedValues(value);\n }\n }\n\n return updatedStyle;\n };\n\n _proto.__getAnimatedValue = function __getAnimatedValue() {\n return this._walkStyleAndGetAnimatedValues(this._style);\n };\n\n _proto.__attach = function __attach() {\n for (var key in this._style) {\n var value = this._style[key];\n\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n };\n\n _proto.__detach = function __detach() {\n for (var key in this._style) {\n var value = this._style[key];\n\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__makeNative = function __makeNative() {\n for (var key in this._style) {\n var value = this._style[key];\n\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n var styleConfig = {};\n\n for (var styleKey in this._style) {\n if (this._style[styleKey] instanceof AnimatedNode) {\n var style = this._style[styleKey];\n\n style.__makeNative();\n\n styleConfig[styleKey] = style.__getNativeTag();\n } // Non-animated styles are set using `setNativeProps`, no need\n // to pass those as a part of the node config\n\n }\n\n NativeAnimatedHelper.validateStyles(styleConfig);\n return {\n type: 'style',\n style: styleConfig\n };\n };\n\n return AnimatedStyle;\n}(AnimatedWithChildren);\n\nexport default AnimatedStyle;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport { AnimatedEvent } from '../AnimatedEvent';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedStyle from './AnimatedStyle';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport findNodeHandle from '../../../../exports/findNodeHandle';\nimport invariant from 'fbjs/lib/invariant';\n\nvar AnimatedProps = /*#__PURE__*/function (_AnimatedNode) {\n _inheritsLoose(AnimatedProps, _AnimatedNode);\n\n function AnimatedProps(props, callback) {\n var _this;\n\n _this = _AnimatedNode.call(this) || this;\n\n if (props.style) {\n props = _objectSpread(_objectSpread({}, props), {}, {\n style: new AnimatedStyle(props.style)\n });\n }\n\n _this._props = props;\n _this._callback = callback;\n\n _this.__attach();\n\n return _this;\n }\n\n var _proto = AnimatedProps.prototype;\n\n _proto.__getValue = function __getValue() {\n var props = {};\n\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n if (!value.__isNative || value instanceof AnimatedStyle) {\n // We cannot use value of natively driven nodes this way as the value we have access from\n // JS may not be up to date.\n props[key] = value.__getValue();\n }\n } else if (value instanceof AnimatedEvent) {\n props[key] = value.__getHandler();\n } else {\n props[key] = value;\n }\n }\n\n return props;\n };\n\n _proto.__getAnimatedValue = function __getAnimatedValue() {\n var props = {};\n\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n props[key] = value.__getAnimatedValue();\n }\n }\n\n return props;\n };\n\n _proto.__attach = function __attach() {\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n };\n\n _proto.__detach = function __detach() {\n if (this.__isNative && this._animatedView) {\n this.__disconnectAnimatedView();\n }\n\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n\n _AnimatedNode.prototype.__detach.call(this);\n };\n\n _proto.update = function update() {\n this._callback();\n };\n\n _proto.__makeNative = function __makeNative() {\n if (!this.__isNative) {\n this.__isNative = true;\n\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n\n if (this._animatedView) {\n this.__connectAnimatedView();\n }\n }\n };\n\n _proto.setNativeView = function setNativeView(animatedView) {\n if (this._animatedView === animatedView) {\n return;\n }\n\n this._animatedView = animatedView;\n\n if (this.__isNative) {\n this.__connectAnimatedView();\n }\n };\n\n _proto.__connectAnimatedView = function __connectAnimatedView() {\n invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n var nativeViewTag = findNodeHandle(this._animatedView);\n invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n NativeAnimatedHelper.API.connectAnimatedNodeToView(this.__getNativeTag(), nativeViewTag);\n };\n\n _proto.__disconnectAnimatedView = function __disconnectAnimatedView() {\n invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n var nativeViewTag = findNodeHandle(this._animatedView);\n invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n NativeAnimatedHelper.API.disconnectAnimatedNodeFromView(this.__getNativeTag(), nativeViewTag);\n };\n\n _proto.__restoreDefaultValues = function __restoreDefaultValues() {\n // When using the native driver, view properties need to be restored to\n // their default values manually since react no longer tracks them. This\n // is needed to handle cases where a prop driven by native animated is removed\n // after having been changed natively by an animation.\n if (this.__isNative) {\n NativeAnimatedHelper.API.restoreDefaultValues(this.__getNativeTag());\n }\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n var propsConfig = {};\n\n for (var propKey in this._props) {\n var value = this._props[propKey];\n\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n\n propsConfig[propKey] = value.__getNativeTag();\n }\n }\n\n return {\n type: 'props',\n props: propsConfig\n };\n };\n\n return AnimatedProps;\n}(AnimatedNode);\n\nexport default AnimatedProps;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\n/**\n * This is a helper function for when a component needs to be able to forward a ref\n * to a child component, but still needs to have access to that component as part of\n * its implementation.\n *\n * Its main use case is in wrappers for native components.\n *\n * Usage:\n *\n * class MyView extends React.Component {\n * _nativeRef = null;\n *\n * _setNativeRef = setAndForwardRef({\n * getForwardedRef: () => this.props.forwardedRef,\n * setLocalRef: ref => {\n * this._nativeRef = ref;\n * },\n * });\n *\n * render() {\n * return <View ref={this._setNativeRef} />;\n * }\n * }\n *\n * const MyViewWithRef = React.forwardRef((props, ref) => (\n * <MyView {...props} forwardedRef={ref} />\n * ));\n *\n * module.exports = MyViewWithRef;\n */\nfunction setAndForwardRef(_ref) {\n var getForwardedRef = _ref.getForwardedRef,\n setLocalRef = _ref.setLocalRef;\n return function forwardRef(ref) {\n var forwardedRef = getForwardedRef();\n setLocalRef(ref); // Forward to user ref prop (if one has been specified)\n\n if (typeof forwardedRef === 'function') {\n // Handle function-based refs. String-based refs are handled as functions.\n forwardedRef(ref);\n } else if (typeof forwardedRef === 'object' && forwardedRef != null) {\n // Handle createRef-based refs\n forwardedRef.current = ref;\n }\n };\n}\n\nexport default setAndForwardRef;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport View from '../../../exports/View';\nimport { AnimatedEvent } from './AnimatedEvent';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport * as React from 'react';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nimport setAndForwardRef from '../Utilities/setAndForwardRef';\nvar animatedComponentNextId = 1;\n\nfunction createAnimatedComponent(Component, options) {\n invariant(typeof Component !== 'function' || Component.prototype && Component.prototype.isReactComponent, '`createAnimatedComponent` does not support stateless functional components; ' + 'use a class component instead.');\n\n var AnimatedComponent = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(AnimatedComponent, _React$Component);\n\n function AnimatedComponent() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._invokeAnimatedPropsCallbackOnMount = false;\n _this._eventDetachers = [];\n _this._animatedComponentId = animatedComponentNextId++ + \":animatedComponent\";\n\n _this._isFabric = function () {\n var _this$_component$_int, _this$_component$_int2, _this$_component$getN, _this$_component$getN2, _this$_component$getS, _this$_component$getS2;\n\n // When called during the first render, `_component` is always null.\n // Therefore, even if a component is rendered in Fabric, we can't detect\n // that until ref is set, which happens sometime after the first render.\n // In cases where this value switching between \"false\" and \"true\" on Fabric\n // causes issues, add an additional check for _component nullity.\n if (_this._component == null) {\n return false;\n }\n\n return (// eslint-disable-next-line dot-notation\n ((_this$_component$_int = _this._component['_internalInstanceHandle']) == null ? void 0 : (_this$_component$_int2 = _this$_component$_int.stateNode) == null ? void 0 : _this$_component$_int2.canonical) != null || // Some components have a setNativeProps function but aren't a host component\n // such as lists like FlatList and SectionList. These should also use\n // forceUpdate in Fabric since setNativeProps doesn't exist on the underlying\n // host component. This crazy hack is essentially special casing those lists and\n // ScrollView itself to use forceUpdate in Fabric.\n // If these components end up using forwardRef then these hacks can go away\n // as this._component would actually be the underlying host component and the above check\n // would be sufficient.\n _this._component.getNativeScrollRef != null && _this._component.getNativeScrollRef() != null && // eslint-disable-next-line dot-notation\n ((_this$_component$getN = _this._component.getNativeScrollRef()['_internalInstanceHandle']) == null ? void 0 : (_this$_component$getN2 = _this$_component$getN.stateNode) == null ? void 0 : _this$_component$getN2.canonical) != null || _this._component.getScrollResponder != null && _this._component.getScrollResponder() != null && _this._component.getScrollResponder().getNativeScrollRef != null && _this._component.getScrollResponder().getNativeScrollRef() != null && ((_this$_component$getS = _this._component.getScrollResponder().getNativeScrollRef()[// eslint-disable-next-line dot-notation\n '_internalInstanceHandle']) == null ? void 0 : (_this$_component$getS2 = _this$_component$getS.stateNode) == null ? void 0 : _this$_component$getS2.canonical) != null\n );\n };\n\n _this._waitForUpdate = function () {\n if (_this._isFabric()) {\n NativeAnimatedHelper.API.setWaitingForIdentifier(_this._animatedComponentId);\n }\n };\n\n _this._markUpdateComplete = function () {\n if (_this._isFabric()) {\n NativeAnimatedHelper.API.unsetWaitingForIdentifier(_this._animatedComponentId);\n }\n };\n\n _this._animatedPropsCallback = function () {\n if (_this._component == null) {\n // AnimatedProps is created in will-mount because it's used in render.\n // But this callback may be invoked before mount in async mode,\n // In which case we should defer the setNativeProps() call.\n // React may throw away uncommitted work in async mode,\n // So a deferred call won't always be invoked.\n _this._invokeAnimatedPropsCallbackOnMount = true;\n } else if (process.env.NODE_ENV === 'test' || // For animating properties of non-leaf/non-native components\n typeof _this._component.setNativeProps !== 'function' || // In Fabric, force animations to go through forceUpdate and skip setNativeProps\n _this._isFabric()) {\n _this.forceUpdate();\n } else if (!_this._propsAnimated.__isNative) {\n _this._component.setNativeProps(_this._propsAnimated.__getAnimatedValue());\n } else {\n throw new Error('Attempting to run JS driven animation on animated ' + 'node that has been moved to \"native\" earlier by starting an ' + 'animation with `useNativeDriver: true`');\n }\n };\n\n _this._setComponentRef = setAndForwardRef({\n getForwardedRef: function getForwardedRef() {\n return _this.props.forwardedRef;\n },\n setLocalRef: function setLocalRef(ref) {\n _this._prevComponent = _this._component;\n _this._component = ref; // TODO: Delete this in a future release.\n\n if (ref != null && ref.getNode == null) {\n ref.getNode = function () {\n var _ref$constructor$name;\n\n console.warn('%s: Calling `getNode()` on the ref of an Animated component ' + 'is no longer necessary. You can now directly use the ref ' + 'instead. This method will be removed in a future release.', (_ref$constructor$name = ref.constructor.name) !== null && _ref$constructor$name !== void 0 ? _ref$constructor$name : '<<anonymous>>');\n return ref;\n };\n }\n }\n });\n return _this;\n }\n\n var _proto = AnimatedComponent.prototype;\n\n _proto._attachNativeEvents = function _attachNativeEvents() {\n var _this$_component,\n _this2 = this;\n\n // Make sure to get the scrollable node for components that implement\n // `ScrollResponder.Mixin`.\n var scrollableNode = (_this$_component = this._component) != null && _this$_component.getScrollableNode ? this._component.getScrollableNode() : this._component;\n\n var _loop = function _loop(key) {\n var prop = _this2.props[key];\n\n if (prop instanceof AnimatedEvent && prop.__isNative) {\n prop.__attach(scrollableNode, key);\n\n _this2._eventDetachers.push(function () {\n return prop.__detach(scrollableNode, key);\n });\n }\n };\n\n for (var key in this.props) {\n _loop(key);\n }\n };\n\n _proto._detachNativeEvents = function _detachNativeEvents() {\n this._eventDetachers.forEach(function (remove) {\n return remove();\n });\n\n this._eventDetachers = [];\n };\n\n _proto._attachProps = function _attachProps(nextProps) {\n var oldPropsAnimated = this._propsAnimated;\n\n if (nextProps === oldPropsAnimated) {\n return;\n }\n\n this._propsAnimated = new AnimatedProps(nextProps, this._animatedPropsCallback); // When you call detach, it removes the element from the parent list\n // of children. If it goes to 0, then the parent also detaches itself\n // and so on.\n // An optimization is to attach the new elements and THEN detach the old\n // ones instead of detaching and THEN attaching.\n // This way the intermediate state isn't to go to 0 and trigger\n // this expensive recursive detaching to then re-attach everything on\n // the very next operation.\n\n if (oldPropsAnimated) {\n oldPropsAnimated.__restoreDefaultValues();\n\n oldPropsAnimated.__detach();\n }\n };\n\n _proto.render = function render() {\n var _props$collapsable, _props$nativeID;\n\n var _ref = this._propsAnimated.__getValue() || {},\n _ref$style = _ref.style,\n style = _ref$style === void 0 ? {} : _ref$style,\n props = _objectWithoutPropertiesLoose(_ref, [\"style\"]);\n\n var _ref2 = this.props.passthroughAnimatedPropExplicitValues || {},\n _ref2$style = _ref2.style,\n passthruStyle = _ref2$style === void 0 ? {} : _ref2$style,\n passthruProps = _objectWithoutPropertiesLoose(_ref2, [\"style\"]);\n\n var mergedStyle = _objectSpread(_objectSpread({}, style), passthruStyle); // On Fabric, we always want to ensure the container Animated View is *not*\n // flattened.\n // Because we do not get a host component ref immediately and thus cannot\n // do a proper Fabric vs non-Fabric detection immediately, we default to assuming\n // that Fabric *is* enabled until we know otherwise.\n // Thus, in Fabric, this view will never be flattened. In non-Fabric, the view will\n // not be flattened during the initial render but may be flattened in the second render\n // and onwards.\n\n\n var forceNativeIdFabric = this._component == null && ((options == null ? void 0 : options.collapsable) === false || props.collapsable !== true) || this._isFabric();\n\n var forceNativeId = (_props$collapsable = props.collapsable) !== null && _props$collapsable !== void 0 ? _props$collapsable : this._propsAnimated.__isNative || forceNativeIdFabric || (options == null ? void 0 : options.collapsable) === false; // The native driver updates views directly through the UI thread so we\n // have to make sure the view doesn't get optimized away because it cannot\n // go through the NativeViewHierarchyManager since it operates on the shadow\n // thread. TODO: T68258846\n\n var collapsableProps = forceNativeId ? {\n nativeID: (_props$nativeID = props.nativeID) !== null && _props$nativeID !== void 0 ? _props$nativeID : 'animatedComponent',\n collapsable: false\n } : {};\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, passthruProps, collapsableProps, {\n style: mergedStyle,\n ref: this._setComponentRef\n }));\n };\n\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n this._waitForUpdate();\n\n this._attachProps(this.props);\n };\n\n _proto.componentDidMount = function componentDidMount() {\n if (this._invokeAnimatedPropsCallbackOnMount) {\n this._invokeAnimatedPropsCallbackOnMount = false;\n\n this._animatedPropsCallback();\n }\n\n this._propsAnimated.setNativeView(this._component);\n\n this._attachNativeEvents();\n\n this._markUpdateComplete();\n };\n\n _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(newProps) {\n this._waitForUpdate();\n\n this._attachProps(newProps);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this._component !== this._prevComponent) {\n this._propsAnimated.setNativeView(this._component);\n }\n\n if (this._component !== this._prevComponent || prevProps !== this.props) {\n this._detachNativeEvents();\n\n this._attachNativeEvents();\n }\n\n this._markUpdateComplete();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this._propsAnimated && this._propsAnimated.__detach();\n\n this._detachNativeEvents();\n\n this._markUpdateComplete();\n\n this._component = null;\n this._prevComponent = null;\n };\n\n return AnimatedComponent;\n }(React.Component);\n\n return /*#__PURE__*/React.forwardRef(function AnimatedComponentWrapper(props, ref) {\n return /*#__PURE__*/React.createElement(AnimatedComponent, _extends({}, props, ref == null ? null : {\n forwardedRef: ref\n }));\n });\n}\n\nexport default createAnimatedComponent;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport FlatList from '../../../../exports/FlatList';\nimport createAnimatedComponent from '../createAnimatedComponent';\n\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar FlatListWithEventThrottle = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(FlatList, _extends({\n scrollEventThrottle: 0.0001\n }, props, {\n ref: ref\n }));\n});\nexport default createAnimatedComponent(FlatListWithEventThrottle);","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport Image from '../../../../exports/Image';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(Image, {\n collapsable: false\n});","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport ScrollView from '../../../../exports/ScrollView';\nimport createAnimatedComponent from '../createAnimatedComponent';\n\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar ScrollViewWithEventThrottle = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(ScrollView, _extends({\n scrollEventThrottle: 0.0001\n }, props, {\n ref: ref\n }));\n});\nexport default createAnimatedComponent(ScrollViewWithEventThrottle, {\n collapsable: false\n});","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport SectionList from '../../../../exports/SectionList';\nimport createAnimatedComponent from '../createAnimatedComponent';\n\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar SectionListWithEventThrottle = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(SectionList, _extends({\n scrollEventThrottle: 0.0001\n }, props, {\n ref: ref\n }));\n});\nexport default createAnimatedComponent(SectionListWithEventThrottle);","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport Text from '../../../../exports/Text';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(Text, {\n collapsable: false\n});","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport View from '../../../../exports/View';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(View, {\n collapsable: true\n});","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedAddition = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedAddition, _AnimatedWithChildren);\n\n function AnimatedAddition(a, b) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n return _this;\n }\n\n var _proto = AnimatedAddition.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._a.__getValue() + this._b.__getValue();\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'addition',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n };\n\n return AnimatedAddition;\n}(AnimatedWithChildren);\n\nexport default AnimatedAddition;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedDiffClamp = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedDiffClamp, _AnimatedWithChildren);\n\n function AnimatedDiffClamp(a, min, max) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = a;\n _this._min = min;\n _this._max = max;\n _this._value = _this._lastValue = _this._a.__getValue();\n return _this;\n }\n\n var _proto = AnimatedDiffClamp.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__getValue = function __getValue() {\n var value = this._a.__getValue();\n\n var diff = value - this._lastValue;\n this._lastValue = value;\n this._value = Math.min(Math.max(this._value + diff, this._min), this._max);\n return this._value;\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'diffclamp',\n input: this._a.__getNativeTag(),\n min: this._min,\n max: this._max\n };\n };\n\n return AnimatedDiffClamp;\n}(AnimatedWithChildren);\n\nexport default AnimatedDiffClamp;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedDivision = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedDivision, _AnimatedWithChildren);\n\n function AnimatedDivision(a, b) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._warnedAboutDivideByZero = false;\n\n if (b === 0 || b instanceof AnimatedNode && b.__getValue() === 0) {\n console.error('Detected potential division by zero in AnimatedDivision');\n }\n\n _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n return _this;\n }\n\n var _proto = AnimatedDivision.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n var a = this._a.__getValue();\n\n var b = this._b.__getValue();\n\n if (b === 0) {\n // Prevent spamming the console/LogBox\n if (!this._warnedAboutDivideByZero) {\n console.error('Detected division by zero in AnimatedDivision');\n this._warnedAboutDivideByZero = true;\n } // Passing infinity/NaN to Fabric will cause a native crash\n\n\n return 0;\n }\n\n this._warnedAboutDivideByZero = false;\n return a / b;\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'division',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n };\n\n return AnimatedDivision;\n}(AnimatedWithChildren);\n\nexport default AnimatedDivision;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedModulo = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedModulo, _AnimatedWithChildren);\n\n function AnimatedModulo(a, modulus) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = a;\n _this._modulus = modulus;\n return _this;\n }\n\n var _proto = AnimatedModulo.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return (this._a.__getValue() % this._modulus + this._modulus) % this._modulus;\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'modulus',\n input: this._a.__getNativeTag(),\n modulus: this._modulus\n };\n };\n\n return AnimatedModulo;\n}(AnimatedWithChildren);\n\nexport default AnimatedModulo;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedMultiplication = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedMultiplication, _AnimatedWithChildren);\n\n function AnimatedMultiplication(a, b) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n return _this;\n }\n\n var _proto = AnimatedMultiplication.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._a.__getValue() * this._b.__getValue();\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'multiplication',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n };\n\n return AnimatedMultiplication;\n}(AnimatedWithChildren);\n\nexport default AnimatedMultiplication;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedSubtraction = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedSubtraction, _AnimatedWithChildren);\n\n function AnimatedSubtraction(a, b) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n return _this;\n }\n\n var _proto = AnimatedSubtraction.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._a.__getValue() - this._b.__getValue();\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'subtraction',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n };\n\n return AnimatedSubtraction;\n}(AnimatedWithChildren);\n\nexport default AnimatedSubtraction;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedNode from './AnimatedNode';\nimport { generateNewAnimationId, shouldUseNativeDriver } from '../NativeAnimatedHelper';\n\nvar AnimatedTracking = /*#__PURE__*/function (_AnimatedNode) {\n _inheritsLoose(AnimatedTracking, _AnimatedNode);\n\n function AnimatedTracking(value, parent, animationClass, animationConfig, callback) {\n var _this;\n\n _this = _AnimatedNode.call(this) || this;\n _this._value = value;\n _this._parent = parent;\n _this._animationClass = animationClass;\n _this._animationConfig = animationConfig;\n _this._useNativeDriver = shouldUseNativeDriver(animationConfig);\n _this._callback = callback;\n\n _this.__attach();\n\n return _this;\n }\n\n var _proto = AnimatedTracking.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this.__isNative = true;\n\n this._parent.__makeNative();\n\n _AnimatedNode.prototype.__makeNative.call(this);\n\n this._value.__makeNative();\n };\n\n _proto.__getValue = function __getValue() {\n return this._parent.__getValue();\n };\n\n _proto.__attach = function __attach() {\n this._parent.__addChild(this);\n\n if (this._useNativeDriver) {\n // when the tracking starts we need to convert this node to a \"native node\"\n // so that the parent node will be made \"native\" too. This is necessary as\n // if we don't do this `update` method will get called. At that point it\n // may be too late as it would mean the JS driver has already started\n // updating node values\n this.__makeNative();\n }\n };\n\n _proto.__detach = function __detach() {\n this._parent.__removeChild(this);\n\n _AnimatedNode.prototype.__detach.call(this);\n };\n\n _proto.update = function update() {\n this._value.animate(new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: this._animationConfig.toValue.__getValue()\n })), this._callback);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n var animation = new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n // remove toValue from the config as it's a ref to Animated.Value\n toValue: undefined\n }));\n\n var animationConfig = animation.__getNativeAnimationConfig();\n\n return {\n type: 'tracking',\n animationId: generateNewAnimationId(),\n animationConfig: animationConfig,\n toValue: this._parent.__getNativeTag(),\n value: this._value.__getNativeTag()\n };\n };\n\n return AnimatedTracking;\n}(AnimatedNode);\n\nexport default AnimatedTracking;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { AnimatedEvent, attachNativeEvent } from './AnimatedEvent';\nimport AnimatedAddition from './nodes/AnimatedAddition';\nimport AnimatedDiffClamp from './nodes/AnimatedDiffClamp';\nimport AnimatedDivision from './nodes/AnimatedDivision';\nimport AnimatedInterpolation from './nodes/AnimatedInterpolation';\nimport AnimatedModulo from './nodes/AnimatedModulo';\nimport AnimatedMultiplication from './nodes/AnimatedMultiplication';\nimport AnimatedNode from './nodes/AnimatedNode';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport AnimatedSubtraction from './nodes/AnimatedSubtraction';\nimport AnimatedTracking from './nodes/AnimatedTracking';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\nimport DecayAnimation from './animations/DecayAnimation';\nimport SpringAnimation from './animations/SpringAnimation';\nimport TimingAnimation from './animations/TimingAnimation';\nimport createAnimatedComponent from './createAnimatedComponent';\n\nvar add = function add(a, b) {\n return new AnimatedAddition(a, b);\n};\n\nvar subtract = function subtract(a, b) {\n return new AnimatedSubtraction(a, b);\n};\n\nvar divide = function divide(a, b) {\n return new AnimatedDivision(a, b);\n};\n\nvar multiply = function multiply(a, b) {\n return new AnimatedMultiplication(a, b);\n};\n\nvar modulo = function modulo(a, modulus) {\n return new AnimatedModulo(a, modulus);\n};\n\nvar diffClamp = function diffClamp(a, min, max) {\n return new AnimatedDiffClamp(a, min, max);\n};\n\nvar _combineCallbacks = function _combineCallbacks(callback, config) {\n if (callback && config.onComplete) {\n return function () {\n config.onComplete && config.onComplete.apply(config, arguments);\n callback && callback.apply(void 0, arguments);\n };\n } else {\n return callback || config.onComplete;\n }\n};\n\nvar maybeVectorAnim = function maybeVectorAnim(value, config, anim) {\n if (value instanceof AnimatedValueXY) {\n var configX = _objectSpread({}, config);\n\n var configY = _objectSpread({}, config);\n\n for (var key in config) {\n var _config$key = config[key],\n x = _config$key.x,\n y = _config$key.y;\n\n if (x !== undefined && y !== undefined) {\n configX[key] = x;\n configY[key] = y;\n }\n }\n\n var aX = anim(value.x, configX);\n var aY = anim(value.y, configY); // We use `stopTogether: false` here because otherwise tracking will break\n // because the second animation will get stopped before it can update.\n\n return parallel([aX, aY], {\n stopTogether: false\n });\n }\n\n return null;\n};\n\nvar spring = function spring(value, config) {\n var _start = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n\n if (configuration.toValue instanceof AnimatedNode) {\n singleValue.track(new AnimatedTracking(singleValue, configuration.toValue, SpringAnimation, singleConfig, callback));\n } else {\n singleValue.animate(new SpringAnimation(singleConfig), callback);\n }\n };\n\n return maybeVectorAnim(value, config, spring) || {\n start: function start(callback) {\n _start(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations: iterations\n });\n\n _start(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\n\nvar timing = function timing(value, config) {\n var _start2 = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n\n if (configuration.toValue instanceof AnimatedNode) {\n singleValue.track(new AnimatedTracking(singleValue, configuration.toValue, TimingAnimation, singleConfig, callback));\n } else {\n singleValue.animate(new TimingAnimation(singleConfig), callback);\n }\n };\n\n return maybeVectorAnim(value, config, timing) || {\n start: function start(callback) {\n _start2(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations: iterations\n });\n\n _start2(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\n\nvar decay = function decay(value, config) {\n var _start3 = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n singleValue.animate(new DecayAnimation(singleConfig), callback);\n };\n\n return maybeVectorAnim(value, config, decay) || {\n start: function start(callback) {\n _start3(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations: iterations\n });\n\n _start3(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\n\nvar sequence = function sequence(animations) {\n var current = 0;\n return {\n start: function start(callback) {\n var onComplete = function onComplete(result) {\n if (!result.finished) {\n callback && callback(result);\n return;\n }\n\n current++;\n\n if (current === animations.length) {\n callback && callback(result);\n return;\n }\n\n animations[current].start(onComplete);\n };\n\n if (animations.length === 0) {\n callback && callback({\n finished: true\n });\n } else {\n animations[current].start(onComplete);\n }\n },\n stop: function stop() {\n if (current < animations.length) {\n animations[current].stop();\n }\n },\n reset: function reset() {\n animations.forEach(function (animation, idx) {\n if (idx <= current) {\n animation.reset();\n }\n });\n current = 0;\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.sequence animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return false;\n }\n };\n};\n\nvar parallel = function parallel(animations, config) {\n var doneCount = 0; // Make sure we only call stop() at most once for each animation\n\n var hasEnded = {};\n var stopTogether = !(config && config.stopTogether === false);\n var result = {\n start: function start(callback) {\n if (doneCount === animations.length) {\n callback && callback({\n finished: true\n });\n return;\n }\n\n animations.forEach(function (animation, idx) {\n var cb = function cb(endResult) {\n hasEnded[idx] = true;\n doneCount++;\n\n if (doneCount === animations.length) {\n doneCount = 0;\n callback && callback(endResult);\n return;\n }\n\n if (!endResult.finished && stopTogether) {\n result.stop();\n }\n };\n\n if (!animation) {\n cb({\n finished: true\n });\n } else {\n animation.start(cb);\n }\n });\n },\n stop: function stop() {\n animations.forEach(function (animation, idx) {\n !hasEnded[idx] && animation.stop();\n hasEnded[idx] = true;\n });\n },\n reset: function reset() {\n animations.forEach(function (animation, idx) {\n animation.reset();\n hasEnded[idx] = false;\n doneCount = 0;\n });\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.parallel animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return false;\n }\n };\n return result;\n};\n\nvar delay = function delay(time) {\n // Would be nice to make a specialized implementation\n return timing(new AnimatedValue(0), {\n toValue: 0,\n delay: time,\n duration: 0,\n useNativeDriver: false\n });\n};\n\nvar stagger = function stagger(time, animations) {\n return parallel(animations.map(function (animation, i) {\n return sequence([delay(time * i), animation]);\n }));\n};\n\nvar loop = function loop(animation, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$iterations = _ref.iterations,\n iterations = _ref$iterations === void 0 ? -1 : _ref$iterations,\n _ref$resetBeforeItera = _ref.resetBeforeIteration,\n resetBeforeIteration = _ref$resetBeforeItera === void 0 ? true : _ref$resetBeforeItera;\n\n var isFinished = false;\n var iterationsSoFar = 0;\n return {\n start: function start(callback) {\n var restart = function restart(result) {\n if (result === void 0) {\n result = {\n finished: true\n };\n }\n\n if (isFinished || iterationsSoFar === iterations || result.finished === false) {\n callback && callback(result);\n } else {\n iterationsSoFar++;\n resetBeforeIteration && animation.reset();\n animation.start(restart);\n }\n };\n\n if (!animation || iterations === 0) {\n callback && callback({\n finished: true\n });\n } else {\n if (animation._isUsingNativeDriver()) {\n animation._startNativeLoop(iterations);\n } else {\n restart(); // Start looping recursively on the js thread\n }\n }\n },\n stop: function stop() {\n isFinished = true;\n animation.stop();\n },\n reset: function reset() {\n iterationsSoFar = 0;\n isFinished = false;\n animation.reset();\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.loop animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return animation._isUsingNativeDriver();\n }\n };\n};\n\nfunction forkEvent(event, listener) {\n if (!event) {\n return listener;\n } else if (event instanceof AnimatedEvent) {\n event.__addListener(listener);\n\n return event;\n } else {\n return function () {\n typeof event === 'function' && event.apply(void 0, arguments);\n listener.apply(void 0, arguments);\n };\n }\n}\n\nfunction unforkEvent(event, listener) {\n if (event && event instanceof AnimatedEvent) {\n event.__removeListener(listener);\n }\n}\n\nvar event = function event(argMapping, config) {\n var animatedEvent = new AnimatedEvent(argMapping, config);\n\n if (animatedEvent.__isNative) {\n return animatedEvent;\n } else {\n return animatedEvent.__getHandler();\n }\n};\n/**\n * The `Animated` library is designed to make animations fluid, powerful, and\n * easy to build and maintain. `Animated` focuses on declarative relationships\n * between inputs and outputs, with configurable transforms in between, and\n * simple `start`/`stop` methods to control time-based animation execution.\n * If additional transforms are added, be sure to include them in\n * AnimatedMock.js as well.\n *\n * See https://reactnative.dev/docs/animated.html\n */\n\n\nexport default {\n /**\n * Standard value class for driving animations. Typically initialized with\n * `new Animated.Value(0);`\n *\n * See https://reactnative.dev/docs/animated.html#value\n */\n Value: AnimatedValue,\n\n /**\n * 2D value class for driving 2D animations, such as pan gestures.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html\n */\n ValueXY: AnimatedValueXY,\n\n /**\n * Exported to use the Interpolation type in flow.\n *\n * See https://reactnative.dev/docs/animated.html#interpolation\n */\n Interpolation: AnimatedInterpolation,\n\n /**\n * Exported for ease of type checking. All animated values derive from this\n * class.\n *\n * See https://reactnative.dev/docs/animated.html#node\n */\n Node: AnimatedNode,\n\n /**\n * Animates a value from an initial velocity to zero based on a decay\n * coefficient.\n *\n * See https://reactnative.dev/docs/animated.html#decay\n */\n decay: decay,\n\n /**\n * Animates a value along a timed easing curve. The Easing module has tons of\n * predefined curves, or you can use your own function.\n *\n * See https://reactnative.dev/docs/animated.html#timing\n */\n timing: timing,\n\n /**\n * Animates a value according to an analytical spring model based on\n * damped harmonic oscillation.\n *\n * See https://reactnative.dev/docs/animated.html#spring\n */\n spring: spring,\n\n /**\n * Creates a new Animated value composed from two Animated values added\n * together.\n *\n * See https://reactnative.dev/docs/animated.html#add\n */\n add: add,\n\n /**\n * Creates a new Animated value composed by subtracting the second Animated\n * value from the first Animated value.\n *\n * See https://reactnative.dev/docs/animated.html#subtract\n */\n subtract: subtract,\n\n /**\n * Creates a new Animated value composed by dividing the first Animated value\n * by the second Animated value.\n *\n * See https://reactnative.dev/docs/animated.html#divide\n */\n divide: divide,\n\n /**\n * Creates a new Animated value composed from two Animated values multiplied\n * together.\n *\n * See https://reactnative.dev/docs/animated.html#multiply\n */\n multiply: multiply,\n\n /**\n * Creates a new Animated value that is the (non-negative) modulo of the\n * provided Animated value.\n *\n * See https://reactnative.dev/docs/animated.html#modulo\n */\n modulo: modulo,\n\n /**\n * Create a new Animated value that is limited between 2 values. It uses the\n * difference between the last value so even if the value is far from the\n * bounds it will start changing when the value starts getting closer again.\n *\n * See https://reactnative.dev/docs/animated.html#diffclamp\n */\n diffClamp: diffClamp,\n\n /**\n * Starts an animation after the given delay.\n *\n * See https://reactnative.dev/docs/animated.html#delay\n */\n delay: delay,\n\n /**\n * Starts an array of animations in order, waiting for each to complete\n * before starting the next. If the current running animation is stopped, no\n * following animations will be started.\n *\n * See https://reactnative.dev/docs/animated.html#sequence\n */\n sequence: sequence,\n\n /**\n * Starts an array of animations all at the same time. By default, if one\n * of the animations is stopped, they will all be stopped. You can override\n * this with the `stopTogether` flag.\n *\n * See https://reactnative.dev/docs/animated.html#parallel\n */\n parallel: parallel,\n\n /**\n * Array of animations may run in parallel (overlap), but are started in\n * sequence with successive delays. Nice for doing trailing effects.\n *\n * See https://reactnative.dev/docs/animated.html#stagger\n */\n stagger: stagger,\n\n /**\n * Loops a given animation continuously, so that each time it reaches the\n * end, it resets and begins again from the start.\n *\n * See https://reactnative.dev/docs/animated.html#loop\n */\n loop: loop,\n\n /**\n * Takes an array of mappings and extracts values from each arg accordingly,\n * then calls `setValue` on the mapped outputs.\n *\n * See https://reactnative.dev/docs/animated.html#event\n */\n event: event,\n\n /**\n * Make any React component Animatable. Used to create `Animated.View`, etc.\n *\n * See https://reactnative.dev/docs/animated.html#createanimatedcomponent\n */\n createAnimatedComponent: createAnimatedComponent,\n\n /**\n * Imperative API to attach an animated value to an event on a view. Prefer\n * using `Animated.event` with `useNativeDrive: true` if possible.\n *\n * See https://reactnative.dev/docs/animated.html#attachnativeevent\n */\n attachNativeEvent: attachNativeEvent,\n\n /**\n * Advanced imperative API for snooping on animated events that are passed in\n * through props. Use values directly where possible.\n *\n * See https://reactnative.dev/docs/animated.html#forkevent\n */\n forkEvent: forkEvent,\n unforkEvent: unforkEvent,\n\n /**\n * Expose Event class, so it can be used as a type for type checkers.\n */\n Event: AnimatedEvent,\n __PropsOnlyForTests: AnimatedProps\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { AnimatedEvent, attachNativeEvent } from './AnimatedEvent';\nimport AnimatedImplementation from './AnimatedImplementation';\nimport AnimatedInterpolation from './nodes/AnimatedInterpolation';\nimport AnimatedNode from './nodes/AnimatedNode';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\nimport createAnimatedComponent from './createAnimatedComponent';\nvar emptyAnimation = {\n start: function start() {},\n stop: function stop() {},\n reset: function reset() {},\n _startNativeLoop: function _startNativeLoop() {},\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return false;\n }\n};\n\nvar spring = function spring(value, config) {\n var anyValue = value;\n return _objectSpread(_objectSpread({}, emptyAnimation), {}, {\n start: function start(callback) {\n anyValue.setValue(config.toValue);\n callback && callback({\n finished: true\n });\n }\n });\n};\n\nvar timing = function timing(value, config) {\n var anyValue = value;\n return _objectSpread(_objectSpread({}, emptyAnimation), {}, {\n start: function start(callback) {\n anyValue.setValue(config.toValue);\n callback && callback({\n finished: true\n });\n }\n });\n};\n\nvar decay = function decay(value, config) {\n return emptyAnimation;\n};\n\nvar sequence = function sequence(animations) {\n return emptyAnimation;\n};\n\nvar parallel = function parallel(animations, config) {\n return emptyAnimation;\n};\n\nvar delay = function delay(time) {\n return emptyAnimation;\n};\n\nvar stagger = function stagger(time, animations) {\n return emptyAnimation;\n};\n\nvar loop = function loop(animation, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$iterations = _ref.iterations,\n iterations = _ref$iterations === void 0 ? -1 : _ref$iterations;\n\n return emptyAnimation;\n};\n\nvar event = function event(argMapping, config) {\n return null;\n};\n\nexport default {\n Value: AnimatedValue,\n ValueXY: AnimatedValueXY,\n Interpolation: AnimatedInterpolation,\n Node: AnimatedNode,\n decay: decay,\n timing: timing,\n spring: spring,\n add: AnimatedImplementation.add,\n subtract: AnimatedImplementation.subtract,\n divide: AnimatedImplementation.divide,\n multiply: AnimatedImplementation.multiply,\n modulo: AnimatedImplementation.modulo,\n diffClamp: AnimatedImplementation.diffClamp,\n delay: delay,\n sequence: sequence,\n parallel: parallel,\n stagger: stagger,\n loop: loop,\n event: event,\n createAnimatedComponent: createAnimatedComponent,\n attachNativeEvent: attachNativeEvent,\n forkEvent: AnimatedImplementation.forkEvent,\n unforkEvent: AnimatedImplementation.unforkEvent,\n Event: AnimatedEvent,\n __PropsOnlyForTests: AnimatedProps\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport Platform from '../../../exports/Platform';\nimport FlatList from './components/AnimatedFlatList';\nimport Image from './components/AnimatedImage';\nimport ScrollView from './components/AnimatedScrollView';\nimport SectionList from './components/AnimatedSectionList';\nimport Text from './components/AnimatedText';\nimport View from './components/AnimatedView';\nimport AnimatedMock from './AnimatedMock';\nimport AnimatedImplementation from './AnimatedImplementation';\nvar Animated = Platform.isTesting ? AnimatedMock : AnimatedImplementation;\nexport default _objectSpread({\n FlatList: FlatList,\n Image: Image,\n ScrollView: ScrollView,\n SectionList: SectionList,\n Text: Text,\n View: View\n}, Animated);","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport Animated from '../../vendor/react-native/Animated/Animated';\nexport default Animated;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\n\nvar ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n canUseWorkers: typeof Worker !== 'undefined',\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n canUseViewport: canUseDOM && !!window.screen,\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\nmodule.exports = ExecutionEnvironment;","/**\n * Portions Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n\n/**\n * BezierEasing - use bezier curve for transition easing function\n * https://github.com/gre/bezier-easing\n * @copyright 2014-2015 Gaëtan Renaudeau. MIT License.\n */\n'use strict'; // These values are established by empiricism with tests (tradeoff: performance VS precision)\n\nvar NEWTON_ITERATIONS = 4;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\nvar float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n} // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\n\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n} // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n\n\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, _aA, _aB, mX1, mX2) {\n var currentX,\n currentT,\n i = 0,\n aA = _aA,\n aB = _aB;\n\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, _aGuessT, mX1, mX2) {\n var aGuessT = _aGuessT;\n\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n\n return aGuessT;\n}\n\nexport default function bezier(mX1, mY1, mX2, mY2) {\n if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n } // Precompute samples table\n\n\n var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n\n function getTForX(aX) {\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample; // Interpolate to provide an initial guess for t\n\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n if (mX1 === mY1 && mX2 === mY2) {\n return x; // linear\n } // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n\n\n if (x === 0) {\n return 0;\n }\n\n if (x === 1) {\n return 1;\n }\n\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nimport _bezier from './bezier';\n\nvar _ease;\n/**\n * The `Easing` module implements common easing functions. This module is used\n * by [Animate.timing()](docs/animate.html#timing) to convey physically\n * believable motion in animations.\n *\n * You can find a visualization of some common easing functions at\n * http://easings.net/\n *\n * ### Predefined animations\n *\n * The `Easing` module provides several predefined animations through the\n * following methods:\n *\n * - [`back`](docs/easing.html#back) provides a simple animation where the\n * object goes slightly back before moving forward\n * - [`bounce`](docs/easing.html#bounce) provides a bouncing animation\n * - [`ease`](docs/easing.html#ease) provides a simple inertial animation\n * - [`elastic`](docs/easing.html#elastic) provides a simple spring interaction\n *\n * ### Standard functions\n *\n * Three standard easing functions are provided:\n *\n * - [`linear`](docs/easing.html#linear)\n * - [`quad`](docs/easing.html#quad)\n * - [`cubic`](docs/easing.html#cubic)\n *\n * The [`poly`](docs/easing.html#poly) function can be used to implement\n * quartic, quintic, and other higher power functions.\n *\n * ### Additional functions\n *\n * Additional mathematical functions are provided by the following methods:\n *\n * - [`bezier`](docs/easing.html#bezier) provides a cubic bezier curve\n * - [`circle`](docs/easing.html#circle) provides a circular function\n * - [`sin`](docs/easing.html#sin) provides a sinusoidal function\n * - [`exp`](docs/easing.html#exp) provides an exponential function\n *\n * The following helpers are used to modify other easing functions.\n *\n * - [`in`](docs/easing.html#in) runs an easing function forwards\n * - [`inOut`](docs/easing.html#inout) makes any easing function symmetrical\n * - [`out`](docs/easing.html#out) runs an easing function backwards\n */\n\n\nvar Easing = /*#__PURE__*/function () {\n function Easing() {}\n\n /**\n * A stepping function, returns 1 for any positive value of `n`.\n */\n Easing.step0 = function step0(n) {\n return n > 0 ? 1 : 0;\n }\n /**\n * A stepping function, returns 1 if `n` is greater than or equal to 1.\n */\n ;\n\n Easing.step1 = function step1(n) {\n return n >= 1 ? 1 : 0;\n }\n /**\n * A linear function, `f(t) = t`. Position correlates to elapsed time one to\n * one.\n *\n * http://cubic-bezier.com/#0,0,1,1\n */\n ;\n\n Easing.linear = function linear(t) {\n return t;\n }\n /**\n * A simple inertial interaction, similar to an object slowly accelerating to\n * speed.\n *\n * http://cubic-bezier.com/#.42,0,1,1\n */\n ;\n\n Easing.ease = function ease(t) {\n if (!_ease) {\n _ease = Easing.bezier(0.42, 0, 1, 1);\n }\n\n return _ease(t);\n }\n /**\n * A quadratic function, `f(t) = t * t`. Position equals the square of elapsed\n * time.\n *\n * http://easings.net/#easeInQuad\n */\n ;\n\n Easing.quad = function quad(t) {\n return t * t;\n }\n /**\n * A cubic function, `f(t) = t * t * t`. Position equals the cube of elapsed\n * time.\n *\n * http://easings.net/#easeInCubic\n */\n ;\n\n Easing.cubic = function cubic(t) {\n return t * t * t;\n }\n /**\n * A power function. Position is equal to the Nth power of elapsed time.\n *\n * n = 4: http://easings.net/#easeInQuart\n * n = 5: http://easings.net/#easeInQuint\n */\n ;\n\n Easing.poly = function poly(n) {\n return function (t) {\n return Math.pow(t, n);\n };\n }\n /**\n * A sinusoidal function.\n *\n * http://easings.net/#easeInSine\n */\n ;\n\n Easing.sin = function sin(t) {\n return 1 - Math.cos(t * Math.PI / 2);\n }\n /**\n * A circular function.\n *\n * http://easings.net/#easeInCirc\n */\n ;\n\n Easing.circle = function circle(t) {\n return 1 - Math.sqrt(1 - t * t);\n }\n /**\n * An exponential function.\n *\n * http://easings.net/#easeInExpo\n */\n ;\n\n Easing.exp = function exp(t) {\n return Math.pow(2, 10 * (t - 1));\n }\n /**\n * A simple elastic interaction, similar to a spring oscillating back and\n * forth.\n *\n * Default bounciness is 1, which overshoots a little bit once. 0 bounciness\n * doesn't overshoot at all, and bounciness of N > 1 will overshoot about N\n * times.\n *\n * http://easings.net/#easeInElastic\n */\n ;\n\n Easing.elastic = function elastic(bounciness) {\n if (bounciness === void 0) {\n bounciness = 1;\n }\n\n var p = bounciness * Math.PI;\n return function (t) {\n return 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);\n };\n }\n /**\n * Use with `Animated.parallel()` to create a simple effect where the object\n * animates back slightly as the animation starts.\n *\n * Wolfram Plot:\n *\n * - http://tiny.cc/back_default (s = 1.70158, default)\n */\n ;\n\n Easing.back = function back(s) {\n if (s === void 0) {\n s = 1.70158;\n }\n\n return function (t) {\n return t * t * ((s + 1) * t - s);\n };\n }\n /**\n * Provides a simple bouncing effect.\n *\n * http://easings.net/#easeInBounce\n */\n ;\n\n Easing.bounce = function bounce(t) {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n\n if (t < 2 / 2.75) {\n var _t = t - 1.5 / 2.75;\n\n return 7.5625 * _t * _t + 0.75;\n }\n\n if (t < 2.5 / 2.75) {\n var _t2 = t - 2.25 / 2.75;\n\n return 7.5625 * _t2 * _t2 + 0.9375;\n }\n\n var t2 = t - 2.625 / 2.75;\n return 7.5625 * t2 * t2 + 0.984375;\n }\n /**\n * Provides a cubic bezier curve, equivalent to CSS Transitions'\n * `transition-timing-function`.\n *\n * A useful tool to visualize cubic bezier curves can be found at\n * http://cubic-bezier.com/\n */\n ;\n\n Easing.bezier = function bezier(x1, y1, x2, y2) {\n return _bezier(x1, y1, x2, y2);\n }\n /**\n * Runs an easing function forwards.\n */\n ;\n\n Easing.in = function _in(easing) {\n return easing;\n }\n /**\n * Runs an easing function backwards.\n */\n ;\n\n Easing.out = function out(easing) {\n return function (t) {\n return 1 - easing(1 - t);\n };\n }\n /**\n * Makes any easing function symmetrical. The easing function will run\n * forwards for half of the duration, then backwards for the rest of the\n * duration.\n */\n ;\n\n Easing.inOut = function inOut(easing) {\n return function (t) {\n if (t < 0.5) {\n return easing(t * 2) / 2;\n }\n\n return 1 - easing((1 - t) * 2) / 2;\n };\n };\n\n return Easing;\n}();\n\nexport default Easing;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport Easing from '../../vendor/react-native/Animated/Easing';\nexport default Easing;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport NativeAnimatedNonTurboModule from './NativeAnimatedModule';\nimport NativeAnimatedTurboModule from './NativeAnimatedTurboModule';\nimport NativeEventEmitter from '../NativeEventEmitter';\nimport Platform from '../../../exports/Platform';\nimport invariant from 'fbjs/lib/invariant'; // TODO T69437152 @petetheheat - Delete this fork when Fabric ships to 100%.\n\nvar NativeAnimatedModule = Platform.OS === 'ios' && global.RN$Bridgeless ? NativeAnimatedTurboModule : NativeAnimatedNonTurboModule;\nvar __nativeAnimatedNodeTagCount = 1;\n/* used for animated nodes */\n\nvar __nativeAnimationIdCount = 1;\n/* used for started animations */\n\nvar nativeEventEmitter;\nvar waitingForQueuedOperations = new Set();\nvar queueOperations = false;\nvar queue = [];\n/**\n * Simple wrappers around NativeAnimatedModule to provide flow and autocomplete support for\n * the native module methods\n */\n\nvar API = {\n getValue: function getValue(tag, saveValueCallback) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n\n if (NativeAnimatedModule.getValue) {\n NativeAnimatedModule.getValue(tag, saveValueCallback);\n }\n },\n setWaitingForIdentifier: function setWaitingForIdentifier(id) {\n waitingForQueuedOperations.add(id);\n queueOperations = true;\n },\n unsetWaitingForIdentifier: function unsetWaitingForIdentifier(id) {\n waitingForQueuedOperations.delete(id);\n\n if (waitingForQueuedOperations.size === 0) {\n queueOperations = false;\n API.disableQueue();\n }\n },\n disableQueue: function disableQueue() {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n\n if (Platform.OS === 'android') {\n NativeAnimatedModule.startOperationBatch();\n }\n\n for (var q = 0, l = queue.length; q < l; q++) {\n queue[q]();\n }\n\n queue.length = 0;\n\n if (Platform.OS === 'android') {\n NativeAnimatedModule.finishOperationBatch();\n }\n },\n queueOperation: function queueOperation(fn) {\n if (queueOperations) {\n queue.push(fn);\n } else {\n fn();\n }\n },\n createAnimatedNode: function createAnimatedNode(tag, config) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.createAnimatedNode(tag, config);\n });\n },\n startListeningToAnimatedNodeValue: function startListeningToAnimatedNodeValue(tag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.startListeningToAnimatedNodeValue(tag);\n });\n },\n stopListeningToAnimatedNodeValue: function stopListeningToAnimatedNodeValue(tag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.stopListeningToAnimatedNodeValue(tag);\n });\n },\n connectAnimatedNodes: function connectAnimatedNodes(parentTag, childTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.connectAnimatedNodes(parentTag, childTag);\n });\n },\n disconnectAnimatedNodes: function disconnectAnimatedNodes(parentTag, childTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.disconnectAnimatedNodes(parentTag, childTag);\n });\n },\n startAnimatingNode: function startAnimatingNode(animationId, nodeTag, config, endCallback) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.startAnimatingNode(animationId, nodeTag, config, endCallback);\n });\n },\n stopAnimation: function stopAnimation(animationId) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.stopAnimation(animationId);\n });\n },\n setAnimatedNodeValue: function setAnimatedNodeValue(nodeTag, value) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.setAnimatedNodeValue(nodeTag, value);\n });\n },\n setAnimatedNodeOffset: function setAnimatedNodeOffset(nodeTag, offset) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.setAnimatedNodeOffset(nodeTag, offset);\n });\n },\n flattenAnimatedNodeOffset: function flattenAnimatedNodeOffset(nodeTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.flattenAnimatedNodeOffset(nodeTag);\n });\n },\n extractAnimatedNodeOffset: function extractAnimatedNodeOffset(nodeTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.extractAnimatedNodeOffset(nodeTag);\n });\n },\n connectAnimatedNodeToView: function connectAnimatedNodeToView(nodeTag, viewTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.connectAnimatedNodeToView(nodeTag, viewTag);\n });\n },\n disconnectAnimatedNodeFromView: function disconnectAnimatedNodeFromView(nodeTag, viewTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.disconnectAnimatedNodeFromView(nodeTag, viewTag);\n });\n },\n restoreDefaultValues: function restoreDefaultValues(nodeTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available'); // Backwards compat with older native runtimes, can be removed later.\n\n if (NativeAnimatedModule.restoreDefaultValues != null) {\n API.queueOperation(function () {\n return NativeAnimatedModule.restoreDefaultValues(nodeTag);\n });\n }\n },\n dropAnimatedNode: function dropAnimatedNode(tag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.dropAnimatedNode(tag);\n });\n },\n addAnimatedEventToView: function addAnimatedEventToView(viewTag, eventName, eventMapping) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.addAnimatedEventToView(viewTag, eventName, eventMapping);\n });\n },\n removeAnimatedEventFromView: function removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag);\n });\n }\n};\n/**\n * Styles allowed by the native animated implementation.\n *\n * In general native animated implementation should support any numeric property that doesn't need\n * to be updated through the shadow view hierarchy (all non-layout properties).\n */\n\nvar SUPPORTED_STYLES = {\n opacity: true,\n transform: true,\n borderRadius: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n elevation: true,\n zIndex: true,\n\n /* ios styles */\n shadowOpacity: true,\n shadowRadius: true,\n\n /* legacy android transform properties */\n scaleX: true,\n scaleY: true,\n translateX: true,\n translateY: true\n};\nvar SUPPORTED_TRANSFORMS = {\n translateX: true,\n translateY: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n rotate: true,\n rotateX: true,\n rotateY: true,\n rotateZ: true,\n perspective: true\n};\nvar SUPPORTED_INTERPOLATION_PARAMS = {\n inputRange: true,\n outputRange: true,\n extrapolate: true,\n extrapolateRight: true,\n extrapolateLeft: true\n};\n\nfunction addWhitelistedStyleProp(prop) {\n SUPPORTED_STYLES[prop] = true;\n}\n\nfunction addWhitelistedTransformProp(prop) {\n SUPPORTED_TRANSFORMS[prop] = true;\n}\n\nfunction addWhitelistedInterpolationParam(param) {\n SUPPORTED_INTERPOLATION_PARAMS[param] = true;\n}\n\nfunction validateTransform(configs) {\n configs.forEach(function (config) {\n if (!SUPPORTED_TRANSFORMS.hasOwnProperty(config.property)) {\n throw new Error(\"Property '\" + config.property + \"' is not supported by native animated module\");\n }\n });\n}\n\nfunction validateStyles(styles) {\n for (var _key in styles) {\n if (!SUPPORTED_STYLES.hasOwnProperty(_key)) {\n throw new Error(\"Style property '\" + _key + \"' is not supported by native animated module\");\n }\n }\n}\n\nfunction validateInterpolation(config) {\n for (var _key2 in config) {\n if (!SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(_key2)) {\n throw new Error(\"Interpolation property '\" + _key2 + \"' is not supported by native animated module\");\n }\n }\n}\n\nfunction generateNewNodeTag() {\n return __nativeAnimatedNodeTagCount++;\n}\n\nexport function generateNewAnimationId() {\n return __nativeAnimationIdCount++;\n}\n\nfunction assertNativeAnimatedModule() {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n}\n\nvar _warnedMissingNativeAnimated = false;\nexport function shouldUseNativeDriver(config) {\n if (config.useNativeDriver == null) {\n console.warn('Animated: `useNativeDriver` was not specified. This is a required ' + 'option and must be explicitly set to `true` or `false`');\n }\n\n if (config.useNativeDriver === true && !NativeAnimatedModule) {\n if (!_warnedMissingNativeAnimated) {\n console.warn('Animated: `useNativeDriver` is not supported because the native ' + 'animated module is missing. Falling back to JS-based animation. To ' + 'resolve this, add `RCTAnimation` module to this app, or remove ' + '`useNativeDriver`. ' + 'Make sure to run `pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md');\n _warnedMissingNativeAnimated = true;\n }\n\n return false;\n }\n\n return config.useNativeDriver || false;\n}\n\nfunction transformDataType(value) {\n // Change the string type to number type so we can reuse the same logic in\n // iOS and Android platform\n if (typeof value !== 'string') {\n return value;\n }\n\n if (/deg$/.test(value)) {\n var degrees = parseFloat(value) || 0;\n var radians = degrees * Math.PI / 180.0;\n return radians;\n } else {\n return value;\n }\n}\n\nexport default {\n API: API,\n addWhitelistedStyleProp: addWhitelistedStyleProp,\n addWhitelistedTransformProp: addWhitelistedTransformProp,\n addWhitelistedInterpolationParam: addWhitelistedInterpolationParam,\n validateStyles: validateStyles,\n validateTransform: validateTransform,\n validateInterpolation: validateInterpolation,\n generateNewNodeTag: generateNewNodeTag,\n generateNewAnimationId: generateNewAnimationId,\n assertNativeAnimatedModule: assertNativeAnimatedModule,\n shouldUseNativeDriver: shouldUseNativeDriver,\n transformDataType: transformDataType,\n\n // $FlowExpectedError - unsafe getter lint suppresion\n get nativeEventEmitter() {\n if (!nativeEventEmitter) {\n nativeEventEmitter = new NativeEventEmitter(NativeAnimatedModule);\n }\n\n return nativeEventEmitter;\n }\n\n};","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1; // Note(vjeux): this would be better as an interface but flow doesn't\n// support them yet\n\nvar AnimatedNode = /*#__PURE__*/function () {\n var _proto = AnimatedNode.prototype;\n\n _proto.__attach = function __attach() {};\n\n _proto.__detach = function __detach() {\n if (this.__isNative && this.__nativeTag != null) {\n NativeAnimatedHelper.API.dropAnimatedNode(this.__nativeTag);\n this.__nativeTag = undefined;\n }\n };\n\n _proto.__getValue = function __getValue() {};\n\n _proto.__getAnimatedValue = function __getAnimatedValue() {\n return this.__getValue();\n };\n\n _proto.__addChild = function __addChild(child) {};\n\n _proto.__removeChild = function __removeChild(child) {};\n\n _proto.__getChildren = function __getChildren() {\n return [];\n }\n /* Methods and props used by native Animated impl */\n ;\n\n function AnimatedNode() {\n this._listeners = {};\n }\n\n _proto.__makeNative = function __makeNative() {\n if (!this.__isNative) {\n throw new Error('This node cannot be made a \"native\" animated node');\n }\n\n if (this.hasListeners()) {\n this._startListeningToNativeValueUpdates();\n }\n }\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to\n * synchronously read the value because it might be driven natively.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#addlistener\n */\n ;\n\n _proto.addListener = function addListener(callback) {\n var id = String(_uniqueId++);\n this._listeners[id] = callback;\n\n if (this.__isNative) {\n this._startListeningToNativeValueUpdates();\n }\n\n return id;\n }\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#removelistener\n */\n ;\n\n _proto.removeListener = function removeListener(id) {\n delete this._listeners[id];\n\n if (this.__isNative && !this.hasListeners()) {\n this._stopListeningForNativeValueUpdates();\n }\n }\n /**\n * Remove all registered listeners.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#removealllisteners\n */\n ;\n\n _proto.removeAllListeners = function removeAllListeners() {\n this._listeners = {};\n\n if (this.__isNative) {\n this._stopListeningForNativeValueUpdates();\n }\n };\n\n _proto.hasListeners = function hasListeners() {\n return !!Object.keys(this._listeners).length;\n };\n\n _proto._startListeningToNativeValueUpdates = function _startListeningToNativeValueUpdates() {\n var _this = this;\n\n if (this.__nativeAnimatedValueListener && !this.__shouldUpdateListenersForNewNativeTag) {\n return;\n }\n\n if (this.__shouldUpdateListenersForNewNativeTag) {\n this.__shouldUpdateListenersForNewNativeTag = false;\n\n this._stopListeningForNativeValueUpdates();\n }\n\n NativeAnimatedAPI.startListeningToAnimatedNodeValue(this.__getNativeTag());\n this.__nativeAnimatedValueListener = NativeAnimatedHelper.nativeEventEmitter.addListener('onAnimatedValueUpdate', function (data) {\n if (data.tag !== _this.__getNativeTag()) {\n return;\n }\n\n _this._onAnimatedValueUpdateReceived(data.value);\n });\n };\n\n _proto._onAnimatedValueUpdateReceived = function _onAnimatedValueUpdateReceived(value) {\n this.__callListeners(value);\n };\n\n _proto.__callListeners = function __callListeners(value) {\n for (var _key in this._listeners) {\n this._listeners[_key]({\n value: value\n });\n }\n };\n\n _proto._stopListeningForNativeValueUpdates = function _stopListeningForNativeValueUpdates() {\n if (!this.__nativeAnimatedValueListener) {\n return;\n }\n\n this.__nativeAnimatedValueListener.remove();\n\n this.__nativeAnimatedValueListener = null;\n NativeAnimatedAPI.stopListeningToAnimatedNodeValue(this.__getNativeTag());\n };\n\n _proto.__getNativeTag = function __getNativeTag() {\n var _this$__nativeTag;\n\n NativeAnimatedHelper.assertNativeAnimatedModule();\n invariant(this.__isNative, 'Attempt to get native tag from node not marked as \"native\"');\n var nativeTag = (_this$__nativeTag = this.__nativeTag) !== null && _this$__nativeTag !== void 0 ? _this$__nativeTag : NativeAnimatedHelper.generateNewNodeTag();\n\n if (this.__nativeTag == null) {\n this.__nativeTag = nativeTag;\n NativeAnimatedHelper.API.createAnimatedNode(nativeTag, this.__getNativeConfig());\n this.__shouldUpdateListenersForNewNativeTag = true;\n }\n\n return nativeTag;\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n throw new Error('This JS animated node type cannot be used as native animated node');\n };\n\n _proto.toJSON = function toJSON() {\n return this.__getValue();\n };\n\n return AnimatedNode;\n}();\n\nexport default AnimatedNode;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _typeof = require(\"@babel/runtime/helpers/typeof\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport InteractionManager from '../../../../exports/InteractionManager';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\n/**\n * Animated works by building a directed acyclic graph of dependencies\n * transparently when you render your Animated components.\n *\n * new Animated.Value(0)\n * .interpolate() .interpolate() new Animated.Value(1)\n * opacity translateY scale\n * style transform\n * View#234 style\n * View#123\n *\n * A) Top Down phase\n * When an Animated.Value is updated, we recursively go down through this\n * graph in order to find leaf nodes: the views that we flag as needing\n * an update.\n *\n * B) Bottom Up phase\n * When a view is flagged as needing an update, we recursively go back up\n * in order to build the new value that it needs. The reason why we need\n * this two-phases process is to deal with composite props such as\n * transform which can receive values from multiple parents.\n */\n\nfunction _flush(rootNode) {\n var animatedStyles = new Set();\n\n function findAnimatedStyles(node) {\n /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.68 was deployed. To see the error delete this\n * comment and run Flow. */\n if (typeof node.update === 'function') {\n animatedStyles.add(node);\n } else {\n node.__getChildren().forEach(findAnimatedStyles);\n }\n }\n\n findAnimatedStyles(rootNode);\n /* $FlowFixMe */\n\n animatedStyles.forEach(function (animatedStyle) {\n return animatedStyle.update();\n });\n}\n/**\n * Standard value for driving animations. One `Animated.Value` can drive\n * multiple properties in a synchronized fashion, but can only be driven by one\n * mechanism at a time. Using a new mechanism (e.g. starting a new animation,\n * or calling `setValue`) will stop any previous ones.\n *\n * See https://reactnative.dev/docs/animatedvalue.html\n */\n\n\nvar AnimatedValue = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedValue, _AnimatedWithChildren);\n\n function AnimatedValue(value) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n\n if (typeof value !== 'number') {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n\n _this._startingValue = _this._value = value;\n _this._offset = 0;\n _this._animation = null;\n return _this;\n }\n\n var _proto = AnimatedValue.prototype;\n\n _proto.__detach = function __detach() {\n var _this2 = this;\n\n if (this.__isNative) {\n NativeAnimatedAPI.getValue(this.__getNativeTag(), function (value) {\n _this2._value = value;\n });\n }\n\n this.stopAnimation();\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._value + this._offset;\n }\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#setvalue\n */\n ;\n\n _proto.setValue = function setValue(value) {\n if (this._animation) {\n this._animation.stop();\n\n this._animation = null;\n }\n\n this._updateValue(value, !this.__isNative\n /* don't perform a flush for natively driven values */\n );\n\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), value);\n }\n }\n /**\n * Sets an offset that is applied on top of whatever value is set, whether via\n * `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#setoffset\n */\n ;\n\n _proto.setOffset = function setOffset(offset) {\n this._offset = offset;\n\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);\n }\n }\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#flattenoffset\n */\n ;\n\n _proto.flattenOffset = function flattenOffset() {\n this._value += this._offset;\n this._offset = 0;\n\n if (this.__isNative) {\n NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n /**\n * Sets the offset value to the base value, and resets the base value to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#extractoffset\n */\n ;\n\n _proto.extractOffset = function extractOffset() {\n this._offset += this._value;\n this._value = 0;\n\n if (this.__isNative) {\n NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#stopanimation\n */\n ;\n\n _proto.stopAnimation = function stopAnimation(callback) {\n this.stopTracking();\n this._animation && this._animation.stop();\n this._animation = null;\n callback && callback(this.__getValue());\n }\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#resetanimation\n */\n ;\n\n _proto.resetAnimation = function resetAnimation(callback) {\n this.stopAnimation(callback);\n this._value = this._startingValue;\n };\n\n _proto._onAnimatedValueUpdateReceived = function _onAnimatedValueUpdateReceived(value) {\n this._updateValue(value, false\n /*flush*/\n );\n }\n /**\n * Interpolates the value before updating the property, e.g. mapping 0-1 to\n * 0-10.\n */\n ;\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n /**\n * Typically only used internally, but could be used by a custom Animation\n * class.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#animate\n */\n ;\n\n _proto.animate = function animate(animation, callback) {\n var _this3 = this;\n\n var handle = null;\n\n if (animation.__isInteraction) {\n handle = InteractionManager.createInteractionHandle();\n }\n\n var previousAnimation = this._animation;\n this._animation && this._animation.stop();\n this._animation = animation;\n animation.start(this._value, function (value) {\n // Natively driven animations will never call into that callback, therefore we can always\n // pass flush = true to allow the updated value to propagate to native with setNativeProps\n _this3._updateValue(value, true\n /* flush */\n );\n }, function (result) {\n _this3._animation = null;\n\n if (handle !== null) {\n InteractionManager.clearInteractionHandle(handle);\n }\n\n callback && callback(result);\n }, previousAnimation, this);\n }\n /**\n * Typically only used internally.\n */\n ;\n\n _proto.stopTracking = function stopTracking() {\n this._tracking && this._tracking.__detach();\n this._tracking = null;\n }\n /**\n * Typically only used internally.\n */\n ;\n\n _proto.track = function track(tracking) {\n this.stopTracking();\n this._tracking = tracking;\n };\n\n _proto._updateValue = function _updateValue(value, flush) {\n if (value === undefined) {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n\n this._value = value;\n\n if (flush) {\n _flush(this);\n }\n\n _AnimatedWithChildren.prototype.__callListeners.call(this, this.__getValue());\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'value',\n value: this._value,\n offset: this._offset\n };\n };\n\n return AnimatedValue;\n}(AnimatedWithChildren);\n\nexport default AnimatedValue;","export default function(x) {\n return function() {\n return x;\n };\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport var defaultProps = {\n children: true,\n dataSet: true,\n nativeID: true,\n ref: true,\n suppressHydrationWarning: true,\n testID: true\n};\nexport var accessibilityProps = {\n accessibilityActiveDescendant: true,\n accessibilityAtomic: true,\n accessibilityAutoComplete: true,\n accessibilityBusy: true,\n accessibilityChecked: true,\n accessibilityColumnCount: true,\n accessibilityColumnIndex: true,\n accessibilityColumnSpan: true,\n accessibilityControls: true,\n accessibilityCurrent: true,\n accessibilityDescribedBy: true,\n accessibilityDetails: true,\n accessibilityDisabled: true,\n accessibilityErrorMessage: true,\n accessibilityExpanded: true,\n accessibilityFlowTo: true,\n accessibilityHasPopup: true,\n accessibilityHidden: true,\n accessibilityInvalid: true,\n accessibilityKeyShortcuts: true,\n accessibilityLabel: true,\n accessibilityLabelledBy: true,\n accessibilityLevel: true,\n accessibilityLiveRegion: true,\n accessibilityModal: true,\n accessibilityMultiline: true,\n accessibilityMultiSelectable: true,\n accessibilityOrientation: true,\n accessibilityOwns: true,\n accessibilityPlaceholder: true,\n accessibilityPosInSet: true,\n accessibilityPressed: true,\n accessibilityReadOnly: true,\n accessibilityRequired: true,\n accessibilityRole: true,\n accessibilityRoleDescription: true,\n accessibilityRowCount: true,\n accessibilityRowIndex: true,\n accessibilityRowSpan: true,\n accessibilitySelected: true,\n accessibilitySetSize: true,\n accessibilitySort: true,\n accessibilityValueMax: true,\n accessibilityValueMin: true,\n accessibilityValueNow: true,\n accessibilityValueText: true,\n dir: true,\n focusable: true,\n // Deprecated\n accessible: true,\n accessibilityState: true,\n accessibilityValue: true\n};\nexport var clickProps = {\n onClick: true,\n onClickCapture: true,\n onContextMenu: true\n};\nexport var focusProps = {\n onBlur: true,\n onFocus: true\n};\nexport var keyboardProps = {\n onKeyDown: true,\n onKeyDownCapture: true,\n onKeyUp: true,\n onKeyUpCapture: true\n};\nexport var mouseProps = {\n onMouseDown: true,\n onMouseEnter: true,\n onMouseLeave: true,\n onMouseMove: true,\n onMouseOver: true,\n onMouseOut: true,\n onMouseUp: true\n};\nexport var touchProps = {\n onTouchCancel: true,\n onTouchCancelCapture: true,\n onTouchEnd: true,\n onTouchEndCapture: true,\n onTouchMove: true,\n onTouchMoveCapture: true,\n onTouchStart: true,\n onTouchStartCapture: true\n};\nexport var styleProps = {\n classList: true,\n style: true\n};","/* eslint-disable */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * From React 16.0.0\n * \n */\nimport isUnitlessNumber from '../unitlessNumbers';\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return ('' + value).trim();\n}\n\nexport default dangerousStyleValue;","/* eslint-disable */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * From React 16.3.0\n * \n */\nimport dangerousStyleValue from './dangerousStyleValue';\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n}\n\nexport default setValueForStyles;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport getBoundingClientRect from '../../modules/getBoundingClientRect';\nimport setValueForStyles from '../../modules/setValueForStyles';\n\nvar getRect = function getRect(node) {\n // Unlike the DOM's getBoundingClientRect, React Native layout measurements\n // for \"height\" and \"width\" ignore scale transforms.\n // https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements\n var _getBoundingClientRec = getBoundingClientRect(node),\n x = _getBoundingClientRec.x,\n y = _getBoundingClientRec.y,\n top = _getBoundingClientRec.top,\n left = _getBoundingClientRec.left;\n\n var width = node.offsetWidth;\n var height = node.offsetHeight;\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n top: top,\n left: left\n };\n};\n\nvar _measureLayout = function measureLayout(node, relativeToNativeNode, callback) {\n var relativeNode = relativeToNativeNode || node && node.parentNode;\n\n if (node && relativeNode) {\n setTimeout(function () {\n var relativeRect = getBoundingClientRect(relativeNode);\n\n var _getRect = getRect(node),\n height = _getRect.height,\n left = _getRect.left,\n top = _getRect.top,\n width = _getRect.width;\n\n var x = left - relativeRect.left;\n var y = top - relativeRect.top;\n callback(x, y, width, height, left, top);\n }, 0);\n }\n};\n\nvar focusableElements = {\n A: true,\n INPUT: true,\n SELECT: true,\n TEXTAREA: true\n};\nvar UIManager = {\n blur: function blur(node) {\n try {\n node.blur();\n } catch (err) {}\n },\n focus: function focus(node) {\n try {\n var name = node.nodeName; // A tabIndex of -1 allows element to be programmatically focused but\n // prevents keyboard focus, so we don't want to set the value on elements\n // that support keyboard focus by default.\n\n if (node.getAttribute('tabIndex') == null && focusableElements[name] == null) {\n node.setAttribute('tabIndex', '-1');\n }\n\n node.focus();\n } catch (err) {}\n },\n measure: function measure(node, callback) {\n _measureLayout(node, null, callback);\n },\n measureInWindow: function measureInWindow(node, callback) {\n if (node) {\n setTimeout(function () {\n var _getRect2 = getRect(node),\n height = _getRect2.height,\n left = _getRect2.left,\n top = _getRect2.top,\n width = _getRect2.width;\n\n callback(left, top, width, height);\n }, 0);\n }\n },\n measureLayout: function measureLayout(node, relativeToNativeNode, onFail, onSuccess) {\n _measureLayout(node, relativeToNativeNode, onSuccess);\n },\n updateView: function updateView(node, props) {\n for (var prop in props) {\n if (!Object.prototype.hasOwnProperty.call(props, prop)) {\n continue;\n }\n\n var value = props[prop];\n\n switch (prop) {\n case 'style':\n {\n setValueForStyles(node, value);\n break;\n }\n\n case 'class':\n case 'className':\n {\n node.setAttribute('class', value);\n break;\n }\n\n case 'text':\n case 'value':\n // native platforms use `text` prop to replace text input value\n node.value = value;\n break;\n\n default:\n node.setAttribute(prop, value);\n }\n }\n },\n configureNextLayoutAnimation: function configureNextLayoutAnimation(config, onAnimationDidEnd) {\n onAnimationDidEnd();\n },\n // mocks\n setLayoutAnimationEnabledExperimental: function setLayoutAnimationEnabledExperimental() {}\n};\nexport default UIManager;","import React from 'react';\nimport { Animated, View, ViewProps, ImageProps, Image } from 'react-native';\nimport {\n ScreenProps,\n ScreenContainerProps,\n ScreenStackProps,\n ScreenStackHeaderConfigProps,\n HeaderSubviewTypes,\n} from './types';\n\nexport * from './types';\n\nlet ENABLE_SCREENS = true;\n\nexport function enableScreens(shouldEnableScreens = true): void {\n ENABLE_SCREENS = shouldEnableScreens;\n}\n\nexport function screensEnabled(): boolean {\n return ENABLE_SCREENS;\n}\n\nexport class NativeScreen extends React.Component<ScreenProps> {\n render(): JSX.Element {\n let { active, activityState, style, enabled = true, ...rest } = this.props;\n if (active !== undefined && activityState === undefined) {\n activityState = active !== 0 ? 2 : 0; // change taken from index.native.tsx\n }\n return (\n <View\n style={[\n style,\n ENABLE_SCREENS && enabled && activityState !== 2\n ? { display: 'none' }\n : null,\n ]}\n {...rest}\n />\n );\n }\n}\n\nexport const Screen = Animated.createAnimatedComponent(NativeScreen);\n\nexport const ScreenContainer: React.ComponentType<ScreenContainerProps> = View;\n\nexport const NativeScreenContainer: React.ComponentType<ScreenContainerProps> = View;\n\nexport const ScreenStack: React.ComponentType<ScreenStackProps> = View;\n\nexport const ScreenStackHeaderBackButtonImage = (\n props: ImageProps\n): JSX.Element => (\n <View>\n <Image resizeMode=\"center\" fadeDuration={0} {...props} />\n </View>\n);\n\nexport const ScreenStackHeaderRightView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderLeftView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderCenterView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderConfig: React.ComponentType<ScreenStackHeaderConfigProps> = View;\n\nexport const ScreenStackHeaderSubview: React.ComponentType<React.PropsWithChildren<\n ViewProps & { type?: HeaderSubviewTypes }\n>> = View;\n\nexport const shouldUseActivityState = true;\n","import { isComputedProp, isObservableProp, createAtom, action, computed, _allowStateChangesInsideComputed, reaction, runInAction, observable, values, entries, _getGlobalState, isObservableArray, ObservableMap, _interceptReads, intercept, observe, _getAdministration, set, makeObservable, getAtom } from 'mobx';\n\nvar livelinessChecking = \"warn\";\n/**\n * Defines what MST should do when running into reads / writes to objects that have died.\n * By default it will print a warning.\n * Use the `\"error\"` option to easy debugging to see where the error was thrown and when the offending read / write took place\n *\n * @param mode `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction setLivelinessChecking(mode) {\n livelinessChecking = mode;\n}\n/**\n * Returns the current liveliness checking mode.\n *\n * @returns `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction getLivelinessChecking() {\n return livelinessChecking;\n}\n/**\n * @deprecated use setLivelinessChecking instead\n * @hidden\n *\n * Defines what MST should do when running into reads / writes to objects that have died.\n * By default it will print a warning.\n * Use the `\"error\"` option to easy debugging to see where the error was thrown and when the offending read / write took place\n *\n * @param mode `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction setLivelynessChecking(mode) {\n setLivelinessChecking(mode);\n}\n\n/**\n * @hidden\n */\nvar Hook;\n(function (Hook) {\n Hook[\"afterCreate\"] = \"afterCreate\";\n Hook[\"afterAttach\"] = \"afterAttach\";\n Hook[\"afterCreationFinalization\"] = \"afterCreationFinalization\";\n Hook[\"beforeDetach\"] = \"beforeDetach\";\n Hook[\"beforeDestroy\"] = \"beforeDestroy\";\n})(Hook || (Hook = {}));\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nfunction __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nfunction __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\n\n/**\n * Returns the _actual_ type of the given tree node. (Or throws)\n *\n * @param object\n * @returns\n */\nfunction getType(object) {\n assertIsStateTreeNode(object, 1);\n return getStateTreeNode(object).type;\n}\n/**\n * Returns the _declared_ type of the given sub property of an object, array or map.\n * In the case of arrays and maps the property name is optional and will be ignored.\n *\n * Example:\n * ```ts\n * const Box = types.model({ x: 0, y: 0 })\n * const box = Box.create()\n *\n * console.log(getChildType(box, \"x\").name) // 'number'\n * ```\n *\n * @param object\n * @param propertyName\n * @returns\n */\nfunction getChildType(object, propertyName) {\n assertIsStateTreeNode(object, 1);\n return getStateTreeNode(object).getChildType(propertyName);\n}\n/**\n * Registers a function that will be invoked for each mutation that is applied to the provided model instance, or to any of its children.\n * See [patches](https://github.com/mobxjs/mobx-state-tree#patches) for more details. onPatch events are emitted immediately and will not await the end of a transaction.\n * Patches can be used to deep observe a model tree.\n *\n * @param target the model instance from which to receive patches\n * @param callback the callback that is invoked for each patch. The reversePatch is a patch that would actually undo the emitted patch\n * @returns function to remove the listener\n */\nfunction onPatch(target, callback) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsFunction(callback, 2);\n return getStateTreeNode(target).onPatch(callback);\n}\n/**\n * Registers a function that is invoked whenever a new snapshot for the given model instance is available.\n * The listener will only be fire at the end of the current MobX (trans)action.\n * See [snapshots](https://github.com/mobxjs/mobx-state-tree#snapshots) for more details.\n *\n * @param target\n * @param callback\n * @returns\n */\nfunction onSnapshot(target, callback) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsFunction(callback, 2);\n return getStateTreeNode(target).onSnapshot(callback);\n}\n/**\n * Applies a JSON-patch to the given model instance or bails out if the patch couldn't be applied\n * See [patches](https://github.com/mobxjs/mobx-state-tree#patches) for more details.\n *\n * Can apply a single past, or an array of patches.\n *\n * @param target\n * @param patch\n * @returns\n */\nfunction applyPatch(target, patch) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertArg(patch, function (p) { return typeof p === \"object\"; }, \"object or array\", 2);\n getStateTreeNode(target).applyPatches(asArray(patch));\n}\n/**\n * Small abstraction around `onPatch` and `applyPatch`, attaches a patch listener to a tree and records all the patches.\n * Returns an recorder object with the following signature:\n *\n * Example:\n * ```ts\n * export interface IPatchRecorder {\n * // the recorded patches\n * patches: IJsonPatch[]\n * // the inverse of the recorded patches\n * inversePatches: IJsonPatch[]\n * // true if currently recording\n * recording: boolean\n * // stop recording patches\n * stop(): void\n * // resume recording patches\n * resume(): void\n * // apply all the recorded patches on the given target (the original subject if omitted)\n * replay(target?: IAnyStateTreeNode): void\n * // reverse apply the recorded patches on the given target (the original subject if omitted)\n * // stops the recorder if not already stopped\n * undo(): void\n * }\n * ```\n *\n * The optional filter function allows to skip recording certain patches.\n *\n * @param subject\n * @param filter\n * @returns\n */\nfunction recordPatches(subject, filter) {\n // check all arguments\n assertIsStateTreeNode(subject, 1);\n var data = {\n patches: [],\n reversedInversePatches: []\n };\n // we will generate the immutable copy of patches on demand for public consumption\n var publicData = {};\n var disposer;\n var recorder = {\n get recording() {\n return !!disposer;\n },\n get patches() {\n if (!publicData.patches) {\n publicData.patches = data.patches.slice();\n }\n return publicData.patches;\n },\n get reversedInversePatches() {\n if (!publicData.reversedInversePatches) {\n publicData.reversedInversePatches = data.reversedInversePatches.slice();\n }\n return publicData.reversedInversePatches;\n },\n get inversePatches() {\n if (!publicData.inversePatches) {\n publicData.inversePatches = data.reversedInversePatches.slice().reverse();\n }\n return publicData.inversePatches;\n },\n stop: function () {\n if (disposer) {\n disposer();\n disposer = undefined;\n }\n },\n resume: function () {\n if (disposer)\n return;\n disposer = onPatch(subject, function (patch, inversePatch) {\n // skip patches that are asked to be filtered if there's a filter in place\n if (filter && !filter(patch, inversePatch, getRunningActionContext())) {\n return;\n }\n data.patches.push(patch);\n data.reversedInversePatches.unshift(inversePatch);\n // mark immutable public patches as dirty\n publicData.patches = undefined;\n publicData.inversePatches = undefined;\n publicData.reversedInversePatches = undefined;\n });\n },\n replay: function (target) {\n applyPatch(target || subject, data.patches);\n },\n undo: function (target) {\n applyPatch(target || subject, data.reversedInversePatches);\n }\n };\n recorder.resume();\n return recorder;\n}\n/**\n * The inverse of `unprotect`.\n *\n * @param target\n */\nfunction protect(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n if (!node.isRoot)\n throw fail$1(\"`protect` can only be invoked on root nodes\");\n node.isProtectionEnabled = true;\n}\n/**\n * By default it is not allowed to directly modify a model. Models can only be modified through actions.\n * However, in some cases you don't care about the advantages (like replayability, traceability, etc) this yields.\n * For example because you are building a PoC or don't have any middleware attached to your tree.\n *\n * In that case you can disable this protection by calling `unprotect` on the root of your tree.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * done: false\n * }).actions(self => ({\n * toggle() {\n * self.done = !self.done\n * }\n * }))\n *\n * const todo = Todo.create()\n * todo.done = true // throws!\n * todo.toggle() // OK\n * unprotect(todo)\n * todo.done = false // OK\n * ```\n */\nfunction unprotect(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n if (!node.isRoot)\n throw fail$1(\"`unprotect` can only be invoked on root nodes\");\n node.isProtectionEnabled = false;\n}\n/**\n * Returns true if the object is in protected mode, @see protect\n */\nfunction isProtected(target) {\n return getStateTreeNode(target).isProtected;\n}\n/**\n * Applies a snapshot to a given model instances. Patch and snapshot listeners will be invoked as usual.\n *\n * @param target\n * @param snapshot\n * @returns\n */\nfunction applySnapshot(target, snapshot) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).applySnapshot(snapshot);\n}\n/**\n * Calculates a snapshot from the given model instance. The snapshot will always reflect the latest state but use\n * structural sharing where possible. Doesn't require MobX transactions to be completed.\n *\n * @param target\n * @param applyPostProcess If true (the default) then postProcessSnapshot gets applied.\n * @returns\n */\nfunction getSnapshot(target, applyPostProcess) {\n if (applyPostProcess === void 0) { applyPostProcess = true; }\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n if (applyPostProcess)\n return node.snapshot;\n return freeze(node.type.getSnapshot(node, false));\n}\n/**\n * Given a model instance, returns `true` if the object has a parent, that is, is part of another object, map or array.\n *\n * @param target\n * @param depth How far should we look upward? 1 by default.\n * @returns\n */\nfunction hasParent(target, depth) {\n if (depth === void 0) { depth = 1; }\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsNumber(depth, 2, 0);\n var parent = getStateTreeNode(target).parent;\n while (parent) {\n if (--depth === 0)\n return true;\n parent = parent.parent;\n }\n return false;\n}\n/**\n * Returns the immediate parent of this object, or throws.\n *\n * Note that the immediate parent can be either an object, map or array, and\n * doesn't necessarily refer to the parent model.\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired.\n *\n * @param target\n * @param depth How far should we look upward? 1 by default.\n * @returns\n */\nfunction getParent(target, depth) {\n if (depth === void 0) { depth = 1; }\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsNumber(depth, 2, 0);\n var d = depth;\n var parent = getStateTreeNode(target).parent;\n while (parent) {\n if (--d === 0)\n return parent.storedValue;\n parent = parent.parent;\n }\n throw fail$1(\"Failed to find the parent of \" + getStateTreeNode(target) + \" at depth \" + depth);\n}\n/**\n * Given a model instance, returns `true` if the object has a parent of given type, that is, is part of another object, map or array\n *\n * @param target\n * @param type\n * @returns\n */\nfunction hasParentOfType(target, type) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsType(type, 2);\n var parent = getStateTreeNode(target).parent;\n while (parent) {\n if (type.is(parent.storedValue))\n return true;\n parent = parent.parent;\n }\n return false;\n}\n/**\n * Returns the target's parent of a given type, or throws.\n *\n * @param target\n * @param type\n * @returns\n */\nfunction getParentOfType(target, type) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsType(type, 2);\n var parent = getStateTreeNode(target).parent;\n while (parent) {\n if (type.is(parent.storedValue))\n return parent.storedValue;\n parent = parent.parent;\n }\n throw fail$1(\"Failed to find the parent of \" + getStateTreeNode(target) + \" of a given type\");\n}\n/**\n * Given an object in a model tree, returns the root object of that tree.\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired.\n *\n * @param target\n * @returns\n */\nfunction getRoot(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).root.storedValue;\n}\n/**\n * Returns the path of the given object in the model tree\n *\n * @param target\n * @returns\n */\nfunction getPath(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).path;\n}\n/**\n * Returns the path of the given object as unescaped string array.\n *\n * @param target\n * @returns\n */\nfunction getPathParts(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return splitJsonPath(getStateTreeNode(target).path);\n}\n/**\n * Returns true if the given object is the root of a model tree.\n *\n * @param target\n * @returns\n */\nfunction isRoot(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).isRoot;\n}\n/**\n * Resolves a path relatively to a given object.\n * Returns undefined if no value can be found.\n *\n * @param target\n * @param path escaped json path\n * @returns\n */\nfunction resolvePath(target, path) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsString(path, 2);\n var node = resolveNodeByPath(getStateTreeNode(target), path);\n return node ? node.value : undefined;\n}\n/**\n * Resolves a model instance given a root target, the type and the identifier you are searching for.\n * Returns undefined if no value can be found.\n *\n * @param type\n * @param target\n * @param identifier\n * @returns\n */\nfunction resolveIdentifier(type, target, identifier) {\n // check all arguments\n assertIsType(type, 1);\n assertIsStateTreeNode(target, 2);\n assertIsValidIdentifier(identifier, 3);\n var node = getStateTreeNode(target).root.identifierCache.resolve(type, normalizeIdentifier(identifier));\n return node ? node.value : undefined;\n}\n/**\n * Returns the identifier of the target node.\n * This is the *string normalized* identifier, which might not match the type of the identifier attribute\n *\n * @param target\n * @returns\n */\nfunction getIdentifier(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).identifier;\n}\n/**\n * Tests if a reference is valid (pointing to an existing node and optionally if alive) and returns such reference if it the check passes,\n * else it returns undefined.\n *\n * @param getter Function to access the reference.\n * @param checkIfAlive true to also make sure the referenced node is alive (default), false to skip this check.\n * @returns\n */\nfunction tryReference(getter, checkIfAlive) {\n if (checkIfAlive === void 0) { checkIfAlive = true; }\n try {\n var node = getter();\n if (node === undefined || node === null) {\n return undefined;\n }\n else if (isStateTreeNode(node)) {\n if (!checkIfAlive) {\n return node;\n }\n else {\n return isAlive(node) ? node : undefined;\n }\n }\n else {\n throw fail$1(\"The reference to be checked is not one of node, null or undefined\");\n }\n }\n catch (e) {\n if (e instanceof InvalidReferenceError) {\n return undefined;\n }\n throw e;\n }\n}\n/**\n * Tests if a reference is valid (pointing to an existing node and optionally if alive) and returns if the check passes or not.\n *\n * @param getter Function to access the reference.\n * @param checkIfAlive true to also make sure the referenced node is alive (default), false to skip this check.\n * @returns\n */\nfunction isValidReference(getter, checkIfAlive) {\n if (checkIfAlive === void 0) { checkIfAlive = true; }\n try {\n var node = getter();\n if (node === undefined || node === null) {\n return false;\n }\n else if (isStateTreeNode(node)) {\n return checkIfAlive ? isAlive(node) : true;\n }\n else {\n throw fail$1(\"The reference to be checked is not one of node, null or undefined\");\n }\n }\n catch (e) {\n if (e instanceof InvalidReferenceError) {\n return false;\n }\n throw e;\n }\n}\n/**\n * Try to resolve a given path relative to a given node.\n *\n * @param target\n * @param path\n * @returns\n */\nfunction tryResolve(target, path) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsString(path, 2);\n var node = resolveNodeByPath(getStateTreeNode(target), path, false);\n if (node === undefined)\n return undefined;\n try {\n return node.value;\n }\n catch (e) {\n // For what ever reason not resolvable (e.g. totally not existing path, or value that cannot be fetched)\n // see test / issue: 'try resolve doesn't work #686'\n return undefined;\n }\n}\n/**\n * Given two state tree nodes that are part of the same tree,\n * returns the shortest jsonpath needed to navigate from the one to the other\n *\n * @param base\n * @param target\n * @returns\n */\nfunction getRelativePath(base, target) {\n // check all arguments\n assertIsStateTreeNode(base, 1);\n assertIsStateTreeNode(target, 2);\n return getRelativePathBetweenNodes(getStateTreeNode(base), getStateTreeNode(target));\n}\n/**\n * Returns a deep copy of the given state tree node as new tree.\n * Short hand for `snapshot(x) = getType(x).create(getSnapshot(x))`\n *\n * _Tip: clone will create a literal copy, including the same identifiers. To modify identifiers etc during cloning, don't use clone but take a snapshot of the tree, modify it, and create new instance_\n *\n * @param source\n * @param keepEnvironment indicates whether the clone should inherit the same environment (`true`, the default), or not have an environment (`false`). If an object is passed in as second argument, that will act as the environment for the cloned tree.\n * @returns\n */\nfunction clone(source, keepEnvironment) {\n if (keepEnvironment === void 0) { keepEnvironment = true; }\n // check all arguments\n assertIsStateTreeNode(source, 1);\n var node = getStateTreeNode(source);\n return node.type.create(node.snapshot, keepEnvironment === true\n ? node.root.environment\n : keepEnvironment === false\n ? undefined\n : keepEnvironment); // it's an object or something else\n}\n/**\n * Removes a model element from the state tree, and let it live on as a new state tree\n */\nfunction detach(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n getStateTreeNode(target).detach();\n return target;\n}\n/**\n * Removes a model element from the state tree, and mark it as end-of-life; the element should not be used anymore\n */\nfunction destroy(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n if (node.isRoot)\n node.die();\n else\n node.parent.removeChild(node.subpath);\n}\n/**\n * Returns true if the given state tree node is not killed yet.\n * This means that the node is still a part of a tree, and that `destroy`\n * has not been called. If a node is not alive anymore, the only thing one can do with it\n * is requesting it's last path and snapshot\n *\n * @param target\n * @returns\n */\nfunction isAlive(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).observableIsAlive;\n}\n/**\n * Use this utility to register a function that should be called whenever the\n * targeted state tree node is destroyed. This is a useful alternative to managing\n * cleanup methods yourself using the `beforeDestroy` hook.\n *\n * This methods returns the same disposer that was passed as argument.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * title: types.string\n * }).actions(self => ({\n * afterCreate() {\n * const autoSaveDisposer = reaction(\n * () => getSnapshot(self),\n * snapshot => sendSnapshotToServerSomehow(snapshot)\n * )\n * // stop sending updates to server if this\n * // instance is destroyed\n * addDisposer(self, autoSaveDisposer)\n * }\n * }))\n * ```\n *\n * @param target\n * @param disposer\n * @returns The same disposer that was passed as argument\n */\nfunction addDisposer(target, disposer) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsFunction(disposer, 2);\n var node = getStateTreeNode(target);\n node.addDisposer(disposer);\n return disposer;\n}\n/**\n * Returns the environment of the current state tree. For more info on environments,\n * see [Dependency injection](https://github.com/mobxjs/mobx-state-tree#dependency-injection)\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired\n *\n * Returns an empty environment if the tree wasn't initialized with an environment\n *\n * @param target\n * @returns\n */\nfunction getEnv(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n var env = node.root.environment;\n if (!env)\n return EMPTY_OBJECT;\n return env;\n}\n/**\n * Performs a depth first walk through a tree.\n */\nfunction walk(target, processor) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsFunction(processor, 2);\n var node = getStateTreeNode(target);\n // tslint:disable-next-line:no_unused-variable\n node.getChildren().forEach(function (child) {\n if (isStateTreeNode(child.storedValue))\n walk(child.storedValue, processor);\n });\n processor(node.storedValue);\n}\n/**\n * Returns a reflection of the model type properties and name for either a model type or model node.\n *\n * @param typeOrNode\n * @returns\n */\nfunction getPropertyMembers(typeOrNode) {\n var type;\n if (isStateTreeNode(typeOrNode)) {\n type = getType(typeOrNode);\n }\n else {\n type = typeOrNode;\n }\n assertArg(type, function (t) { return isModelType(t); }, \"model type or model instance\", 1);\n return {\n name: type.name,\n properties: __assign({}, type.properties)\n };\n}\n/**\n * Returns a reflection of the model node, including name, properties, views, volatile and actions.\n *\n * @param target\n * @returns\n */\nfunction getMembers(target) {\n var type = getStateTreeNode(target).type;\n var reflected = __assign(__assign({}, getPropertyMembers(type)), { actions: [], volatile: [], views: [] });\n var props = Object.getOwnPropertyNames(target);\n props.forEach(function (key) {\n if (key in reflected.properties)\n return;\n var descriptor = Object.getOwnPropertyDescriptor(target, key);\n if (descriptor.get) {\n if (isComputedProp(target, key))\n reflected.views.push(key);\n else\n reflected.volatile.push(key);\n return;\n }\n if (descriptor.value._isMSTAction === true)\n reflected.actions.push(key);\n else if (isObservableProp(target, key))\n reflected.volatile.push(key);\n else\n reflected.views.push(key);\n });\n return reflected;\n}\n/**\n * Casts a node snapshot or instance type to an instance type so it can be assigned to a type instance.\n * Note that this is just a cast for the type system, this is, it won't actually convert a snapshot to an instance,\n * but just fool typescript into thinking so.\n * Either way, casting when outside an assignation operation won't compile.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n * n: types.number\n * }).actions(self => ({\n * setN(aNumber: number) {\n * self.n = aNumber\n * }\n * }))\n *\n * const ModelB = types.model({\n * innerModel: ModelA\n * }).actions(self => ({\n * someAction() {\n * // this will allow the compiler to assign a snapshot to the property\n * self.innerModel = cast({ a: 5 })\n * }\n * }))\n * ```\n *\n * @param snapshotOrInstance Snapshot or instance\n * @returns The same object casted as an instance\n */\nfunction cast(snapshotOrInstance) {\n return snapshotOrInstance;\n}\n/**\n * Casts a node instance type to an snapshot type so it can be assigned to a type snapshot (e.g. to be used inside a create call).\n * Note that this is just a cast for the type system, this is, it won't actually convert an instance to a snapshot,\n * but just fool typescript into thinking so.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n * n: types.number\n * }).actions(self => ({\n * setN(aNumber: number) {\n * self.n = aNumber\n * }\n * }))\n *\n * const ModelB = types.model({\n * innerModel: ModelA\n * })\n *\n * const a = ModelA.create({ n: 5 });\n * // this will allow the compiler to use a model as if it were a snapshot\n * const b = ModelB.create({ innerModel: castToSnapshot(a)})\n * ```\n *\n * @param snapshotOrInstance Snapshot or instance\n * @returns The same object casted as an input (creation) snapshot\n */\nfunction castToSnapshot(snapshotOrInstance) {\n return snapshotOrInstance;\n}\n/**\n * Casts a node instance type to a reference snapshot type so it can be assigned to a refernence snapshot (e.g. to be used inside a create call).\n * Note that this is just a cast for the type system, this is, it won't actually convert an instance to a refererence snapshot,\n * but just fool typescript into thinking so.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n * id: types.identifier,\n * n: types.number\n * }).actions(self => ({\n * setN(aNumber: number) {\n * self.n = aNumber\n * }\n * }))\n *\n * const ModelB = types.model({\n * refA: types.reference(ModelA)\n * })\n *\n * const a = ModelA.create({ id: 'someId', n: 5 });\n * // this will allow the compiler to use a model as if it were a reference snapshot\n * const b = ModelB.create({ refA: castToReferenceSnapshot(a)})\n * ```\n *\n * @param instance Instance\n * @returns The same object casted as an reference snapshot (string or number)\n */\nfunction castToReferenceSnapshot(instance) {\n return instance;\n}\n/**\n * Returns the unique node id (not to be confused with the instance identifier) for a\n * given instance.\n * This id is a number that is unique for each instance.\n *\n * @export\n * @param target\n * @returns\n */\nfunction getNodeId(target) {\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).nodeId;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar BaseNode = /** @class */ (function () {\n function BaseNode(type, parent, subpath, environment) {\n Object.defineProperty(this, \"type\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: type\n });\n Object.defineProperty(this, \"environment\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: environment\n });\n Object.defineProperty(this, \"_escapedSubpath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_subpath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_subpathUponDeath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_pathUponDeath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storedValue\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n }); // usually the same type as the value, but not always (such as with references)\n Object.defineProperty(this, \"aliveAtom\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_state\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: NodeLifeCycle.INITIALIZING\n });\n Object.defineProperty(this, \"_hookSubscribers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_parent\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"pathAtom\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.environment = environment;\n this.baseSetParent(parent, subpath);\n }\n Object.defineProperty(BaseNode.prototype, \"subpath\", {\n get: function () {\n return this._subpath;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"subpathUponDeath\", {\n get: function () {\n return this._subpathUponDeath;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"pathUponDeath\", {\n get: function () {\n return this._pathUponDeath;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"value\", {\n get: function () {\n return this.type.getValue(this);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"state\", {\n get: function () {\n return this._state;\n },\n set: function (val) {\n var wasAlive = this.isAlive;\n this._state = val;\n var isAlive = this.isAlive;\n if (this.aliveAtom && wasAlive !== isAlive) {\n this.aliveAtom.reportChanged();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"fireInternalHook\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (name) {\n if (this._hookSubscribers) {\n this._hookSubscribers.emit(name, this, name);\n }\n }\n });\n Object.defineProperty(BaseNode.prototype, \"registerHook\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (hook, hookHandler) {\n if (!this._hookSubscribers) {\n this._hookSubscribers = new EventHandlers();\n }\n return this._hookSubscribers.register(hook, hookHandler);\n }\n });\n Object.defineProperty(BaseNode.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"baseSetParent\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath) {\n this._parent = parent;\n this._subpath = subpath;\n this._escapedSubpath = undefined; // regenerate when needed\n if (this.pathAtom) {\n this.pathAtom.reportChanged();\n }\n }\n });\n Object.defineProperty(BaseNode.prototype, \"path\", {\n /*\n * Returns (escaped) path representation as string\n */\n get: function () {\n return this.getEscapedPath(true);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"getEscapedPath\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (reportObserved) {\n if (reportObserved) {\n if (!this.pathAtom) {\n this.pathAtom = createAtom(\"path\");\n }\n this.pathAtom.reportObserved();\n }\n if (!this.parent)\n return \"\";\n // regenerate escaped subpath if needed\n if (this._escapedSubpath === undefined) {\n this._escapedSubpath = !this._subpath ? \"\" : escapeJsonPath(this._subpath);\n }\n return this.parent.getEscapedPath(reportObserved) + \"/\" + this._escapedSubpath;\n }\n });\n Object.defineProperty(BaseNode.prototype, \"isRoot\", {\n get: function () {\n return this.parent === null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"isAlive\", {\n get: function () {\n return this.state !== NodeLifeCycle.DEAD;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"isDetaching\", {\n get: function () {\n return this.state === NodeLifeCycle.DETACHING;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"observableIsAlive\", {\n get: function () {\n if (!this.aliveAtom) {\n this.aliveAtom = createAtom(\"alive\");\n }\n this.aliveAtom.reportObserved();\n return this.isAlive;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"baseFinalizeCreation\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (whenFinalized) {\n if (devMode()) {\n if (!this.isAlive) {\n // istanbul ignore next\n throw fail(\"assertion failed: cannot finalize the creation of a node that is already dead\");\n }\n }\n // goal: afterCreate hooks runs depth-first. After attach runs parent first, so on afterAttach the parent has completed already\n if (this.state === NodeLifeCycle.CREATED) {\n if (this.parent) {\n if (this.parent.state !== NodeLifeCycle.FINALIZED) {\n // parent not ready yet, postpone\n return;\n }\n this.fireHook(Hook.afterAttach);\n }\n this.state = NodeLifeCycle.FINALIZED;\n if (whenFinalized) {\n whenFinalized();\n }\n }\n }\n });\n Object.defineProperty(BaseNode.prototype, \"baseFinalizeDeath\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._hookSubscribers) {\n this._hookSubscribers.clearAll();\n }\n this._subpathUponDeath = this._subpath;\n this._pathUponDeath = this.getEscapedPath(false);\n this.baseSetParent(null, \"\");\n this.state = NodeLifeCycle.DEAD;\n }\n });\n Object.defineProperty(BaseNode.prototype, \"baseAboutToDie\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.fireHook(Hook.beforeDestroy);\n }\n });\n return BaseNode;\n}());\n\n/**\n * @internal\n * @hidden\n */\nvar ScalarNode = /** @class */ (function (_super) {\n __extends(ScalarNode, _super);\n function ScalarNode(simpleType, parent, subpath, environment, initialSnapshot) {\n var _this = _super.call(this, simpleType, parent, subpath, environment) || this;\n try {\n _this.storedValue = simpleType.createNewInstance(initialSnapshot);\n }\n catch (e) {\n // short-cut to die the instance, to avoid the snapshot computed starting to throw...\n _this.state = NodeLifeCycle.DEAD;\n throw e;\n }\n _this.state = NodeLifeCycle.CREATED;\n // for scalar nodes there's no point in firing this event since it would fire on the constructor, before\n // anybody can actually register for/listen to it\n // this.fireHook(Hook.AfterCreate)\n _this.finalizeCreation();\n return _this;\n }\n Object.defineProperty(ScalarNode.prototype, \"root\", {\n get: function () {\n // future optimization: store root ref in the node and maintain it\n if (!this.parent)\n throw fail$1(\"This scalar node is not part of a tree\");\n return this.parent.root;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ScalarNode.prototype, \"setParent\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (newParent, subpath) {\n var parentChanged = this.parent !== newParent;\n var subpathChanged = this.subpath !== subpath;\n if (!parentChanged && !subpathChanged) {\n return;\n }\n if (devMode()) {\n if (!subpath) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: subpath expected\");\n }\n if (!newParent) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: parent expected\");\n }\n if (parentChanged) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: scalar nodes cannot change their parent\");\n }\n }\n this.environment = undefined; // use parent's\n this.baseSetParent(this.parent, subpath);\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"snapshot\", {\n get: function () {\n return freeze(this.getSnapshot());\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ScalarNode.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.type.getSnapshot(this);\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"toString\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var path = (this.isAlive ? this.path : this.pathUponDeath) || \"<root>\";\n return this.type.name + \"@\" + path + (this.isAlive ? \"\" : \" [dead]\");\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"die\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.isAlive || this.state === NodeLifeCycle.DETACHING)\n return;\n this.aboutToDie();\n this.finalizeDeath();\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"finalizeCreation\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.baseFinalizeCreation();\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"aboutToDie\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.baseAboutToDie();\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"finalizeDeath\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.baseFinalizeDeath();\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"fireHook\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (name) {\n this.fireInternalHook(name);\n }\n });\n return ScalarNode;\n}(BaseNode));\nScalarNode.prototype.die = action(ScalarNode.prototype.die);\n\nvar nextNodeId = 1;\nvar snapshotReactionOptions = {\n onError: function (e) {\n throw e;\n }\n};\n/**\n * @internal\n * @hidden\n */\nvar ObjectNode = /** @class */ (function (_super) {\n __extends(ObjectNode, _super);\n function ObjectNode(complexType, parent, subpath, environment, initialValue) {\n var _this = _super.call(this, complexType, parent, subpath, environment) || this;\n Object.defineProperty(_this, \"nodeId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: ++nextNodeId\n });\n Object.defineProperty(_this, \"identifierAttribute\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"identifier\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n }); // Identifier is always normalized to string, even if the identifier property isn't\n Object.defineProperty(_this, \"unnormalizedIdentifier\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"identifierCache\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"isProtectionEnabled\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n Object.defineProperty(_this, \"middlewares\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_applyPatches\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_applySnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_autoUnbox\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n }); // unboxing is disabled when reading child nodes\n Object.defineProperty(_this, \"_isRunningAction\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // only relevant for root\n Object.defineProperty(_this, \"_hasSnapshotReaction\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(_this, \"_observableInstanceState\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0 /* UNINITIALIZED */\n });\n Object.defineProperty(_this, \"_childNodes\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_initialSnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_cachedInitialSnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_cachedInitialSnapshotCreated\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(_this, \"_snapshotComputed\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_snapshotUponDeath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // #region internal event handling\n Object.defineProperty(_this, \"_internalEvents\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n _this._snapshotComputed = computed(function () { return freeze(_this.getSnapshot()); });\n _this.unbox = _this.unbox.bind(_this);\n _this._initialSnapshot = freeze(initialValue);\n _this.identifierAttribute = complexType.identifierAttribute;\n if (!parent) {\n _this.identifierCache = new IdentifierCache();\n }\n _this._childNodes = complexType.initializeChildNodes(_this, _this._initialSnapshot);\n // identifier can not be changed during lifecycle of a node\n // so we safely can read it from initial snapshot\n _this.identifier = null;\n _this.unnormalizedIdentifier = null;\n if (_this.identifierAttribute && _this._initialSnapshot) {\n var id = _this._initialSnapshot[_this.identifierAttribute];\n if (id === undefined) {\n // try with the actual node if not (for optional identifiers)\n var childNode = _this._childNodes[_this.identifierAttribute];\n if (childNode) {\n id = childNode.value;\n }\n }\n if (typeof id !== \"string\" && typeof id !== \"number\") {\n throw fail$1(\"Instance identifier '\" + _this.identifierAttribute + \"' for type '\" + _this.type.name + \"' must be a string or a number\");\n }\n // normalize internal identifier to string\n _this.identifier = normalizeIdentifier(id);\n _this.unnormalizedIdentifier = id;\n }\n if (!parent) {\n _this.identifierCache.addNodeToCache(_this);\n }\n else {\n parent.root.identifierCache.addNodeToCache(_this);\n }\n return _this;\n }\n Object.defineProperty(ObjectNode.prototype, \"applyPatches\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (patches) {\n this.createObservableInstanceIfNeeded();\n this._applyPatches(patches);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"applySnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n this.createObservableInstanceIfNeeded();\n this._applySnapshot(snapshot);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"createObservableInstanceIfNeeded\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._observableInstanceState === 0 /* UNINITIALIZED */) {\n this.createObservableInstance();\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"createObservableInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var e_1, _a;\n if (devMode()) {\n if (this.state !== NodeLifeCycle.INITIALIZING) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: the creation of the observable instance must be done on the initializing phase\");\n }\n }\n this._observableInstanceState = 1 /* CREATING */;\n // make sure the parent chain is created as well\n // array with parent chain from parent to child\n var parentChain = [];\n var parent = this.parent;\n // for performance reasons we never go back further than the most direct\n // uninitialized parent\n // this is done to avoid traversing the whole tree to the root when using\n // the same reference again\n while (parent &&\n parent._observableInstanceState === 0 /* UNINITIALIZED */) {\n parentChain.unshift(parent);\n parent = parent.parent;\n }\n try {\n // initialize the uninitialized parent chain from parent to child\n for (var parentChain_1 = __values(parentChain), parentChain_1_1 = parentChain_1.next(); !parentChain_1_1.done; parentChain_1_1 = parentChain_1.next()) {\n var p = parentChain_1_1.value;\n p.createObservableInstanceIfNeeded();\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (parentChain_1_1 && !parentChain_1_1.done && (_a = parentChain_1.return)) _a.call(parentChain_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var type = this.type;\n try {\n this.storedValue = type.createNewInstance(this._childNodes);\n this.preboot();\n this._isRunningAction = true;\n type.finalizeNewInstance(this, this.storedValue);\n }\n catch (e) {\n // short-cut to die the instance, to avoid the snapshot computed starting to throw...\n this.state = NodeLifeCycle.DEAD;\n throw e;\n }\n finally {\n this._isRunningAction = false;\n }\n this._observableInstanceState = 2 /* CREATED */;\n this._snapshotComputed.trackAndCompute();\n if (this.isRoot)\n this._addSnapshotReaction();\n this._childNodes = EMPTY_OBJECT;\n this.state = NodeLifeCycle.CREATED;\n this.fireHook(Hook.afterCreate);\n this.finalizeCreation();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"root\", {\n get: function () {\n var parent = this.parent;\n return parent ? parent.root : this;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ObjectNode.prototype, \"clearParent\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.parent)\n return;\n // detach if attached\n this.fireHook(Hook.beforeDetach);\n var previousState = this.state;\n this.state = NodeLifeCycle.DETACHING;\n var root = this.root;\n var newEnv = root.environment;\n var newIdCache = root.identifierCache.splitCache(this);\n try {\n this.parent.removeChild(this.subpath);\n this.baseSetParent(null, \"\");\n this.environment = newEnv;\n this.identifierCache = newIdCache;\n }\n finally {\n this.state = previousState;\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"setParent\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (newParent, subpath) {\n var parentChanged = newParent !== this.parent;\n var subpathChanged = subpath !== this.subpath;\n if (!parentChanged && !subpathChanged) {\n return;\n }\n if (devMode()) {\n if (!subpath) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: subpath expected\");\n }\n if (!newParent) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: new parent expected\");\n }\n if (this.parent && parentChanged) {\n throw fail$1(\"A node cannot exists twice in the state tree. Failed to add \" + this + \" to path '\" + newParent.path + \"/\" + subpath + \"'.\");\n }\n if (!this.parent && newParent.root === this) {\n throw fail$1(\"A state tree is not allowed to contain itself. Cannot assign \" + this + \" to path '\" + newParent.path + \"/\" + subpath + \"'\");\n }\n if (!this.parent &&\n !!this.environment &&\n this.environment !== newParent.root.environment) {\n throw fail$1(\"A state tree cannot be made part of another state tree as long as their environments are different.\");\n }\n }\n if (parentChanged) {\n // attach to new parent\n this.environment = undefined; // will use root's\n newParent.root.identifierCache.mergeCache(this);\n this.baseSetParent(newParent, subpath);\n this.fireHook(Hook.afterAttach);\n }\n else if (subpathChanged) {\n // moving to a new subpath on the same parent\n this.baseSetParent(this.parent, subpath);\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"fireHook\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (name) {\n var _this = this;\n this.fireInternalHook(name);\n var fn = this.storedValue &&\n typeof this.storedValue === \"object\" &&\n this.storedValue[name];\n if (typeof fn === \"function\") {\n // we check for it to allow old mobx peer dependencies that don't have the method to work (even when still bugged)\n if (_allowStateChangesInsideComputed) {\n _allowStateChangesInsideComputed(function () {\n fn.apply(_this.storedValue);\n });\n }\n else {\n fn.apply(this.storedValue);\n }\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"snapshot\", {\n // advantage of using computed for a snapshot is that nicely respects transactions etc.\n get: function () {\n return this._snapshotComputed.get();\n },\n enumerable: false,\n configurable: true\n });\n // NOTE: we use this method to get snapshot without creating @computed overhead\n Object.defineProperty(ObjectNode.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.isAlive)\n return this._snapshotUponDeath;\n return this._observableInstanceState === 2 /* CREATED */\n ? this._getActualSnapshot()\n : this._getCachedInitialSnapshot();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_getActualSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.type.getSnapshot(this);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_getCachedInitialSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this._cachedInitialSnapshotCreated) {\n var type = this.type;\n var childNodes = this._childNodes;\n var snapshot = this._initialSnapshot;\n this._cachedInitialSnapshot = type.processInitialSnapshot(childNodes, snapshot);\n this._cachedInitialSnapshotCreated = true;\n }\n return this._cachedInitialSnapshot;\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"isRunningAction\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._isRunningAction)\n return true;\n if (this.isRoot)\n return false;\n return this.parent.isRunningAction();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"assertAlive\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (context) {\n var livelinessChecking = getLivelinessChecking();\n if (!this.isAlive && livelinessChecking !== \"ignore\") {\n var error = this._getAssertAliveError(context);\n switch (livelinessChecking) {\n case \"error\":\n throw fail$1(error);\n case \"warn\":\n warnError(error);\n }\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_getAssertAliveError\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (context) {\n var escapedPath = this.getEscapedPath(false) || this.pathUponDeath || \"\";\n var subpath = (context.subpath && escapeJsonPath(context.subpath)) || \"\";\n var actionContext = context.actionContext || getCurrentActionContext();\n // try to use a real action context if possible since it includes the action name\n if (actionContext && actionContext.type !== \"action\" && actionContext.parentActionEvent) {\n actionContext = actionContext.parentActionEvent;\n }\n var actionFullPath = \"\";\n if (actionContext && actionContext.name != null) {\n // try to use the context, and if it not available use the node one\n var actionPath = (actionContext && actionContext.context && getPath(actionContext.context)) ||\n escapedPath;\n actionFullPath = actionPath + \".\" + actionContext.name + \"()\";\n }\n return \"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '\" + this.type.name + \"', Path upon death: '\" + escapedPath + \"', Subpath: '\" + subpath + \"', Action: '\" + actionFullPath + \"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.\";\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"getChildNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (subpath) {\n this.assertAlive({\n subpath: subpath\n });\n this._autoUnbox = false;\n try {\n return this._observableInstanceState === 2 /* CREATED */\n ? this.type.getChildNode(this, subpath)\n : this._childNodes[subpath];\n }\n finally {\n this._autoUnbox = true;\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"getChildren\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.assertAlive(EMPTY_OBJECT);\n this._autoUnbox = false;\n try {\n return this._observableInstanceState === 2 /* CREATED */\n ? this.type.getChildren(this)\n : convertChildNodesToArray(this._childNodes);\n }\n finally {\n this._autoUnbox = true;\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"getChildType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (propertyName) {\n return this.type.getChildType(propertyName);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"isProtected\", {\n get: function () {\n return this.root.isProtectionEnabled;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ObjectNode.prototype, \"assertWritable\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (context) {\n this.assertAlive(context);\n if (!this.isRunningAction() && this.isProtected) {\n throw fail$1(\"Cannot modify '\" + this + \"', the object is protected and can only be modified by using an action.\");\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"removeChild\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (subpath) {\n this.type.removeChild(this, subpath);\n }\n });\n // bound on the constructor\n Object.defineProperty(ObjectNode.prototype, \"unbox\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNode) {\n if (!childNode)\n return childNode;\n this.assertAlive({\n subpath: childNode.subpath || childNode.subpathUponDeath\n });\n return this._autoUnbox ? childNode.value : childNode;\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"toString\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var path = (this.isAlive ? this.path : this.pathUponDeath) || \"<root>\";\n var identifier = this.identifier ? \"(id: \" + this.identifier + \")\" : \"\";\n return this.type.name + \"@\" + path + identifier + (this.isAlive ? \"\" : \" [dead]\");\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"finalizeCreation\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var _this = this;\n this.baseFinalizeCreation(function () {\n var e_2, _a;\n try {\n for (var _b = __values(_this.getChildren()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.finalizeCreation();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n _this.fireInternalHook(Hook.afterCreationFinalization);\n });\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"detach\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.isAlive)\n throw fail$1(\"Error while detaching, node is not alive.\");\n this.clearParent();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"preboot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var self = this;\n this._applyPatches = createActionInvoker(this.storedValue, \"@APPLY_PATCHES\", function (patches) {\n patches.forEach(function (patch) {\n if (!patch.path) {\n self.type.applySnapshot(self, patch.value);\n return;\n }\n var parts = splitJsonPath(patch.path);\n var node = resolveNodeByPathParts(self, parts.slice(0, -1));\n node.applyPatchLocally(parts[parts.length - 1], patch);\n });\n });\n this._applySnapshot = createActionInvoker(this.storedValue, \"@APPLY_SNAPSHOT\", function (snapshot) {\n // if the snapshot is the same as the current one, avoid performing a reconcile\n if (snapshot === self.snapshot)\n return;\n // else, apply it by calling the type logic\n return self.type.applySnapshot(self, snapshot);\n });\n addHiddenFinalProp(this.storedValue, \"$treenode\", this);\n addHiddenFinalProp(this.storedValue, \"toJSON\", toJSON);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"die\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.isAlive || this.state === NodeLifeCycle.DETACHING)\n return;\n this.aboutToDie();\n this.finalizeDeath();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"aboutToDie\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._observableInstanceState === 0 /* UNINITIALIZED */) {\n return;\n }\n this.getChildren().forEach(function (node) {\n node.aboutToDie();\n });\n // beforeDestroy should run before the disposers since else we could end up in a situation where\n // a disposer added with addDisposer at this stage (beforeDestroy) is actually never released\n this.baseAboutToDie();\n this._internalEventsEmit(\"dispose\" /* Dispose */);\n this._internalEventsClear(\"dispose\" /* Dispose */);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"finalizeDeath\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n // invariant: not called directly but from \"die\"\n this.getChildren().forEach(function (node) {\n node.finalizeDeath();\n });\n this.root.identifierCache.notifyDied(this);\n // \"kill\" the computed prop and just store the last snapshot\n var snapshot = this.snapshot;\n this._snapshotUponDeath = snapshot;\n this._internalEventsClearAll();\n this.baseFinalizeDeath();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"onSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (onChange) {\n this._addSnapshotReaction();\n return this._internalEventsRegister(\"snapshot\" /* Snapshot */, onChange);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"emitSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n this._internalEventsEmit(\"snapshot\" /* Snapshot */, snapshot);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"onPatch\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (handler) {\n return this._internalEventsRegister(\"patch\" /* Patch */, handler);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"emitPatch\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (basePatch, source) {\n if (this._internalEventsHasSubscribers(\"patch\" /* Patch */)) {\n var localizedPatch = extend({}, basePatch, {\n path: source.path.substr(this.path.length) + \"/\" + basePatch.path // calculate the relative path of the patch\n });\n var _a = __read(splitPatch(localizedPatch), 2), patch = _a[0], reversePatch = _a[1];\n this._internalEventsEmit(\"patch\" /* Patch */, patch, reversePatch);\n }\n if (this.parent)\n this.parent.emitPatch(basePatch, source);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"hasDisposer\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (disposer) {\n return this._internalEventsHas(\"dispose\" /* Dispose */, disposer);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"addDisposer\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (disposer) {\n if (!this.hasDisposer(disposer)) {\n this._internalEventsRegister(\"dispose\" /* Dispose */, disposer, true);\n return;\n }\n throw fail$1(\"cannot add a disposer when it is already registered for execution\");\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"removeDisposer\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (disposer) {\n if (!this._internalEventsHas(\"dispose\" /* Dispose */, disposer)) {\n throw fail$1(\"cannot remove a disposer which was never registered for execution\");\n }\n this._internalEventsUnregister(\"dispose\" /* Dispose */, disposer);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"removeMiddleware\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (middleware) {\n if (this.middlewares) {\n var index = this.middlewares.indexOf(middleware);\n if (index >= 0) {\n this.middlewares.splice(index, 1);\n }\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"addMiddleWare\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (handler, includeHooks) {\n var _this = this;\n if (includeHooks === void 0) { includeHooks = true; }\n var middleware = { handler: handler, includeHooks: includeHooks };\n if (!this.middlewares)\n this.middlewares = [middleware];\n else\n this.middlewares.push(middleware);\n return function () {\n _this.removeMiddleware(middleware);\n };\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"applyPatchLocally\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (subpath, patch) {\n this.assertWritable({\n subpath: subpath\n });\n this.createObservableInstanceIfNeeded();\n this.type.applyPatchLocally(this, subpath, patch);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_addSnapshotReaction\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var _this = this;\n if (!this._hasSnapshotReaction) {\n var snapshotDisposer = reaction(function () { return _this.snapshot; }, function (snapshot) { return _this.emitSnapshot(snapshot); }, snapshotReactionOptions);\n this.addDisposer(snapshotDisposer);\n this._hasSnapshotReaction = true;\n }\n }\n });\n // we proxy the methods to avoid creating an EventHandlers instance when it is not needed\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsHasSubscribers\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n return !!this._internalEvents && this._internalEvents.hasSubscribers(event);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsRegister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, eventHandler, atTheBeginning) {\n if (atTheBeginning === void 0) { atTheBeginning = false; }\n if (!this._internalEvents) {\n this._internalEvents = new EventHandlers();\n }\n return this._internalEvents.register(event, eventHandler, atTheBeginning);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsHas\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, eventHandler) {\n return !!this._internalEvents && this._internalEvents.has(event, eventHandler);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsUnregister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, eventHandler) {\n if (this._internalEvents) {\n this._internalEvents.unregister(event, eventHandler);\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsEmit\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (this._internalEvents) {\n (_a = this._internalEvents).emit.apply(_a, __spread([event], args));\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsClear\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n if (this._internalEvents) {\n this._internalEvents.clear(event);\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsClearAll\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._internalEvents) {\n this._internalEvents.clearAll();\n }\n }\n });\n return ObjectNode;\n}(BaseNode));\nObjectNode.prototype.createObservableInstance = action(ObjectNode.prototype.createObservableInstance);\nObjectNode.prototype.detach = action(ObjectNode.prototype.detach);\nObjectNode.prototype.die = action(ObjectNode.prototype.die);\n\nvar _a;\n/**\n * @internal\n * @hidden\n */\nvar TypeFlags;\n(function (TypeFlags) {\n TypeFlags[TypeFlags[\"String\"] = 1] = \"String\";\n TypeFlags[TypeFlags[\"Number\"] = 2] = \"Number\";\n TypeFlags[TypeFlags[\"Boolean\"] = 4] = \"Boolean\";\n TypeFlags[TypeFlags[\"Date\"] = 8] = \"Date\";\n TypeFlags[TypeFlags[\"Literal\"] = 16] = \"Literal\";\n TypeFlags[TypeFlags[\"Array\"] = 32] = \"Array\";\n TypeFlags[TypeFlags[\"Map\"] = 64] = \"Map\";\n TypeFlags[TypeFlags[\"Object\"] = 128] = \"Object\";\n TypeFlags[TypeFlags[\"Frozen\"] = 256] = \"Frozen\";\n TypeFlags[TypeFlags[\"Optional\"] = 512] = \"Optional\";\n TypeFlags[TypeFlags[\"Reference\"] = 1024] = \"Reference\";\n TypeFlags[TypeFlags[\"Identifier\"] = 2048] = \"Identifier\";\n TypeFlags[TypeFlags[\"Late\"] = 4096] = \"Late\";\n TypeFlags[TypeFlags[\"Refinement\"] = 8192] = \"Refinement\";\n TypeFlags[TypeFlags[\"Union\"] = 16384] = \"Union\";\n TypeFlags[TypeFlags[\"Null\"] = 32768] = \"Null\";\n TypeFlags[TypeFlags[\"Undefined\"] = 65536] = \"Undefined\";\n TypeFlags[TypeFlags[\"Integer\"] = 131072] = \"Integer\";\n TypeFlags[TypeFlags[\"Custom\"] = 262144] = \"Custom\";\n TypeFlags[TypeFlags[\"SnapshotProcessor\"] = 524288] = \"SnapshotProcessor\";\n})(TypeFlags || (TypeFlags = {}));\n/**\n * @internal\n * @hidden\n */\nvar cannotDetermineSubtype = \"cannotDetermine\";\n/** @hidden */\nvar $type = Symbol(\"$type\");\n/**\n * A base type produces a MST node (Node in the state tree)\n *\n * @internal\n * @hidden\n */\nvar BaseType = /** @class */ (function () {\n function BaseType(name) {\n Object.defineProperty(this, _a, {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // these are just to make inner types avaialable to inherited classes\n Object.defineProperty(this, \"C\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"S\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"T\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"N\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"isType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name;\n }\n Object.defineProperty(BaseType.prototype, \"create\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot, environment) {\n typecheckInternal(this, snapshot);\n return this.instantiate(null, \"\", environment, snapshot).value;\n }\n });\n Object.defineProperty(BaseType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, applyPostProcess) {\n // istanbul ignore next\n throw fail$1(\"unimplemented method\");\n }\n });\n Object.defineProperty(BaseType.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return type === this;\n }\n });\n Object.defineProperty(BaseType.prototype, \"validate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var node = getStateTreeNodeSafe(value);\n if (node) {\n var valueType = getType(value);\n return this.isAssignableFrom(valueType)\n ? typeCheckSuccess()\n : typeCheckFailure(context, value);\n // it is tempting to compare snapshots, but in that case we should always clone on assignments...\n }\n return this.isValidSnapshot(value, context);\n }\n });\n Object.defineProperty(BaseType.prototype, \"is\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (thing) {\n return this.validate(thing, [{ path: \"\", type: this }]).length === 0;\n }\n });\n Object.defineProperty(BaseType.prototype, \"Type\", {\n get: function () {\n // istanbul ignore next\n throw fail$1(\"Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`\");\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseType.prototype, \"TypeWithoutSTN\", {\n get: function () {\n // istanbul ignore next\n throw fail$1(\"Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`\");\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseType.prototype, \"SnapshotType\", {\n get: function () {\n // istanbul ignore next\n throw fail$1(\"Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`\");\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseType.prototype, \"CreationType\", {\n get: function () {\n // istanbul ignore next\n throw fail$1(\"Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`\");\n },\n enumerable: false,\n configurable: true\n });\n return BaseType;\n}());\n_a = $type;\nBaseType.prototype.create = action(BaseType.prototype.create);\n/**\n * A complex type produces a MST node (Node in the state tree)\n *\n * @internal\n * @hidden\n */\nvar ComplexType = /** @class */ (function (_super) {\n __extends(ComplexType, _super);\n function ComplexType(name) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"identifierAttribute\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n return _this;\n }\n Object.defineProperty(ComplexType.prototype, \"create\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot, environment) {\n if (snapshot === void 0) { snapshot = this.getDefaultSnapshot(); }\n return _super.prototype.create.call(this, snapshot, environment);\n }\n });\n Object.defineProperty(ComplexType.prototype, \"getValue\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n node.createObservableInstanceIfNeeded();\n return node.storedValue;\n }\n });\n Object.defineProperty(ComplexType.prototype, \"tryToReconcileNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue) {\n if (current.isDetaching)\n return false;\n if (current.snapshot === newValue) {\n // newValue is the current snapshot of the node, noop\n return true;\n }\n if (isStateTreeNode(newValue) && getStateTreeNode(newValue) === current) {\n // the current node is the same as the new one\n return true;\n }\n if (current.type === this &&\n isMutable(newValue) &&\n !isStateTreeNode(newValue) &&\n (!current.identifierAttribute ||\n current.identifier ===\n normalizeIdentifier(newValue[current.identifierAttribute]))) {\n // the newValue has no node, so can be treated like a snapshot\n // we can reconcile\n current.applySnapshot(newValue);\n return true;\n }\n return false;\n }\n });\n Object.defineProperty(ComplexType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n var nodeReconciled = this.tryToReconcileNode(current, newValue);\n if (nodeReconciled) {\n current.setParent(parent, subpath);\n return current;\n }\n // current node cannot be recycled in any way\n current.die(); // noop if detaching\n // attempt to reuse the new one\n if (isStateTreeNode(newValue) && this.isAssignableFrom(getType(newValue))) {\n // newValue is a Node as well, move it here..\n var newNode = getStateTreeNode(newValue);\n newNode.setParent(parent, subpath);\n return newNode;\n }\n // nothing to do, we have to create a new node\n return this.instantiate(parent, subpath, undefined, newValue);\n }\n });\n Object.defineProperty(ComplexType.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return null;\n }\n });\n return ComplexType;\n}(BaseType));\nComplexType.prototype.create = action(ComplexType.prototype.create);\n/**\n * @internal\n * @hidden\n */\nvar SimpleType = /** @class */ (function (_super) {\n __extends(SimpleType, _super);\n function SimpleType() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SimpleType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n return snapshot;\n }\n });\n Object.defineProperty(SimpleType.prototype, \"getValue\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n // if we ever find a case where scalar nodes can be accessed without iterating through its parent\n // uncomment this to make sure the parent chain is created when this is accessed\n // if (node.parent) {\n // node.parent.createObservableInstanceIfNeeded()\n // }\n return node.storedValue;\n }\n });\n Object.defineProperty(SimpleType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return node.storedValue;\n }\n });\n Object.defineProperty(SimpleType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n // reconcile only if type and value are still the same, and only if the node is not detaching\n if (!current.isDetaching && current.type === this && current.storedValue === newValue) {\n return current;\n }\n var res = this.instantiate(parent, subpath, undefined, newValue);\n current.die(); // noop if detaching\n return res;\n }\n });\n Object.defineProperty(SimpleType.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return null;\n }\n });\n return SimpleType;\n}(BaseType));\n/**\n * Returns if a given value represents a type.\n *\n * @param value Value to check.\n * @returns `true` if the value is a type.\n */\nfunction isType(value) {\n return typeof value === \"object\" && value && value.isType === true;\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsType(type, argNumber) {\n assertArg(type, isType, \"mobx-state-tree type\", argNumber);\n}\n\nvar runningActions = new Map();\n/**\n * Note: Consider migrating to `createActionTrackingMiddleware2`, it is easier to use.\n *\n * Convenience utility to create action based middleware that supports async processes more easily.\n * All hooks are called for both synchronous and asynchronous actions. Except that either `onSuccess` or `onFail` is called\n *\n * The create middleware tracks the process of an action (assuming it passes the `filter`).\n * `onResume` can return any value, which will be passed as second argument to any other hook. This makes it possible to keep state during a process.\n *\n * See the `atomic` middleware for an example\n *\n * @param hooks\n * @returns\n */\nfunction createActionTrackingMiddleware(hooks) {\n return function actionTrackingMiddleware(call, next, abort) {\n switch (call.type) {\n case \"action\": {\n if (!hooks.filter || hooks.filter(call) === true) {\n var context = hooks.onStart(call);\n hooks.onResume(call, context);\n runningActions.set(call.id, {\n call: call,\n context: context,\n async: false\n });\n try {\n var res = next(call);\n hooks.onSuspend(call, context);\n if (runningActions.get(call.id).async === false) {\n runningActions.delete(call.id);\n hooks.onSuccess(call, context, res);\n }\n return res;\n }\n catch (e) {\n runningActions.delete(call.id);\n hooks.onFail(call, context, e);\n throw e;\n }\n }\n else {\n return next(call);\n }\n }\n case \"flow_spawn\": {\n var root = runningActions.get(call.rootId);\n root.async = true;\n return next(call);\n }\n case \"flow_resume\":\n case \"flow_resume_error\": {\n var root = runningActions.get(call.rootId);\n hooks.onResume(call, root.context);\n try {\n return next(call);\n }\n finally {\n hooks.onSuspend(call, root.context);\n }\n }\n case \"flow_throw\": {\n var root = runningActions.get(call.rootId);\n runningActions.delete(call.rootId);\n hooks.onFail(call, root.context, call.args[0]);\n return next(call);\n }\n case \"flow_return\": {\n var root = runningActions.get(call.rootId);\n runningActions.delete(call.rootId);\n hooks.onSuccess(call, root.context, call.args[0]);\n return next(call);\n }\n }\n };\n}\n\nvar RunningAction = /** @class */ (function () {\n function RunningAction(hooks, call) {\n Object.defineProperty(this, \"hooks\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: hooks\n });\n Object.defineProperty(this, \"call\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: call\n });\n Object.defineProperty(this, \"flowsPending\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"running\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n if (hooks) {\n hooks.onStart(call);\n }\n }\n Object.defineProperty(RunningAction.prototype, \"finish\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (error) {\n if (this.running) {\n this.running = false;\n if (this.hooks) {\n this.hooks.onFinish(this.call, error);\n }\n }\n }\n });\n Object.defineProperty(RunningAction.prototype, \"incFlowsPending\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.flowsPending++;\n }\n });\n Object.defineProperty(RunningAction.prototype, \"decFlowsPending\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.flowsPending--;\n }\n });\n Object.defineProperty(RunningAction.prototype, \"hasFlowsPending\", {\n get: function () {\n return this.flowsPending > 0;\n },\n enumerable: false,\n configurable: true\n });\n return RunningAction;\n}());\n/**\n * Convenience utility to create action based middleware that supports async processes more easily.\n * The flow is like this:\n * - for each action: if filter passes -> `onStart` -> (inner actions recursively) -> `onFinish`\n *\n * Example: if we had an action `a` that called inside an action `b1`, then `b2` the flow would be:\n * - `filter(a)`\n * - `onStart(a)`\n * - `filter(b1)`\n * - `onStart(b1)`\n * - `onFinish(b1)`\n * - `filter(b2)`\n * - `onStart(b2)`\n * - `onFinish(b2)`\n * - `onFinish(a)`\n *\n * The flow is the same no matter if the actions are sync or async.\n *\n * See the `atomic` middleware for an example\n *\n * @param hooks\n * @returns\n */\nfunction createActionTrackingMiddleware2(middlewareHooks) {\n var runningActions = new WeakMap();\n return function actionTrackingMiddleware(call, next) {\n // find parentRunningAction\n var parentRunningAction = call.parentActionEvent\n ? runningActions.get(call.parentActionEvent)\n : undefined;\n if (call.type === \"action\") {\n var newCall = __assign(__assign({}, call), { \n // make a shallow copy of the parent action env\n env: parentRunningAction && parentRunningAction.call.env, parentCall: parentRunningAction && parentRunningAction.call });\n var passesFilter = !middlewareHooks.filter || middlewareHooks.filter(newCall);\n var hooks = passesFilter ? middlewareHooks : undefined;\n var runningAction = new RunningAction(hooks, newCall);\n runningActions.set(call, runningAction);\n var res = void 0;\n try {\n res = next(call);\n }\n catch (e) {\n runningAction.finish(e);\n throw e;\n }\n if (!runningAction.hasFlowsPending) {\n // sync action finished\n runningAction.finish();\n }\n return res;\n }\n else {\n if (!parentRunningAction) {\n return next(call);\n }\n switch (call.type) {\n case \"flow_spawn\": {\n parentRunningAction.incFlowsPending();\n return next(call);\n }\n case \"flow_resume\":\n case \"flow_resume_error\": {\n return next(call);\n }\n case \"flow_throw\": {\n var error = call.args[0];\n try {\n return next(call);\n }\n finally {\n parentRunningAction.decFlowsPending();\n if (!parentRunningAction.hasFlowsPending) {\n parentRunningAction.finish(error);\n }\n }\n }\n case \"flow_return\": {\n try {\n return next(call);\n }\n finally {\n parentRunningAction.decFlowsPending();\n if (!parentRunningAction.hasFlowsPending) {\n parentRunningAction.finish();\n }\n }\n }\n }\n }\n };\n}\n\nfunction serializeArgument(node, actionName, index, arg) {\n if (arg instanceof Date)\n return { $MST_DATE: arg.getTime() };\n if (isPrimitive(arg))\n return arg;\n // We should not serialize MST nodes, even if we can, because we don't know if the receiving party can handle a raw snapshot instead of an\n // MST type instance. So if one wants to serialize a MST node that was pass in, either explitly pass: 1: an id, 2: a (relative) path, 3: a snapshot\n if (isStateTreeNode(arg))\n return serializeTheUnserializable(\"[MSTNode: \" + getType(arg).name + \"]\");\n if (typeof arg === \"function\")\n return serializeTheUnserializable(\"[function]\");\n if (typeof arg === \"object\" && !isPlainObject(arg) && !isArray(arg))\n return serializeTheUnserializable(\"[object \" + ((arg && arg.constructor && arg.constructor.name) ||\n \"Complex Object\") + \"]\");\n try {\n // Check if serializable, cycle free etc...\n // MWE: there must be a better way....\n JSON.stringify(arg); // or throws\n return arg;\n }\n catch (e) {\n return serializeTheUnserializable(\"\" + e);\n }\n}\nfunction deserializeArgument(adm, value) {\n if (value && typeof value === \"object\" && \"$MST_DATE\" in value)\n return new Date(value[\"$MST_DATE\"]);\n return value;\n}\nfunction serializeTheUnserializable(baseType) {\n return {\n $MST_UNSERIALIZABLE: true,\n type: baseType\n };\n}\n/**\n * Applies an action or a series of actions in a single MobX transaction.\n * Does not return any value\n * Takes an action description as produced by the `onAction` middleware.\n *\n * @param target\n * @param actions\n */\nfunction applyAction(target, actions) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertArg(actions, function (a) { return typeof a === \"object\"; }, \"object or array\", 2);\n runInAction(function () {\n asArray(actions).forEach(function (action) { return baseApplyAction(target, action); });\n });\n}\nfunction baseApplyAction(target, action) {\n var resolvedTarget = tryResolve(target, action.path || \"\");\n if (!resolvedTarget)\n throw fail$1(\"Invalid action path: \" + (action.path || \"\"));\n var node = getStateTreeNode(resolvedTarget);\n // Reserved functions\n if (action.name === \"@APPLY_PATCHES\") {\n return applyPatch.call(null, resolvedTarget, action.args[0]);\n }\n if (action.name === \"@APPLY_SNAPSHOT\") {\n return applySnapshot.call(null, resolvedTarget, action.args[0]);\n }\n if (!(typeof resolvedTarget[action.name] === \"function\"))\n throw fail$1(\"Action '\" + action.name + \"' does not exist in '\" + node.path + \"'\");\n return resolvedTarget[action.name].apply(resolvedTarget, action.args ? action.args.map(function (v) { return deserializeArgument(node, v); }) : []);\n}\n/**\n * Small abstraction around `onAction` and `applyAction`, attaches an action listener to a tree and records all the actions emitted.\n * Returns an recorder object with the following signature:\n *\n * Example:\n * ```ts\n * export interface IActionRecorder {\n * // the recorded actions\n * actions: ISerializedActionCall[]\n * // true if currently recording\n * recording: boolean\n * // stop recording actions\n * stop(): void\n * // resume recording actions\n * resume(): void\n * // apply all the recorded actions on the given object\n * replay(target: IAnyStateTreeNode): void\n * }\n * ```\n *\n * The optional filter function allows to skip recording certain actions.\n *\n * @param subject\n * @returns\n */\nfunction recordActions(subject, filter) {\n // check all arguments\n assertIsStateTreeNode(subject, 1);\n var actions = [];\n var listener = function (call) {\n var recordThis = filter ? filter(call, getRunningActionContext()) : true;\n if (recordThis) {\n actions.push(call);\n }\n };\n var disposer;\n var recorder = {\n actions: actions,\n get recording() {\n return !!disposer;\n },\n stop: function () {\n if (disposer) {\n disposer();\n disposer = undefined;\n }\n },\n resume: function () {\n if (disposer)\n return;\n disposer = onAction(subject, listener);\n },\n replay: function (target) {\n applyAction(target, actions);\n }\n };\n recorder.resume();\n return recorder;\n}\n/**\n * Registers a function that will be invoked for each action that is called on the provided model instance, or to any of its children.\n * See [actions](https://github.com/mobxjs/mobx-state-tree#actions) for more details. onAction events are emitted only for the outermost called action in the stack.\n * Action can also be intercepted by middleware using addMiddleware to change the function call before it will be run.\n *\n * Not all action arguments might be serializable. For unserializable arguments, a struct like `{ $MST_UNSERIALIZABLE: true, type: \"someType\" }` will be generated.\n * MST Nodes are considered non-serializable as well (they could be serialized as there snapshot, but it is uncertain whether an replaying party will be able to handle such a non-instantiated snapshot).\n * Rather, when using `onAction` middleware, one should consider in passing arguments which are 1: an id, 2: a (relative) path, or 3: a snapshot. Instead of a real MST node.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * task: types.string\n * })\n *\n * const TodoStore = types.model({\n * todos: types.array(Todo)\n * }).actions(self => ({\n * add(todo) {\n * self.todos.push(todo);\n * }\n * }))\n *\n * const s = TodoStore.create({ todos: [] })\n *\n * let disposer = onAction(s, (call) => {\n * console.log(call);\n * })\n *\n * s.add({ task: \"Grab a coffee\" })\n * // Logs: { name: \"add\", path: \"\", args: [{ task: \"Grab a coffee\" }] }\n * ```\n *\n * @param target\n * @param listener\n * @param attachAfter (default false) fires the listener *after* the action has executed instead of before.\n * @returns\n */\nfunction onAction(target, listener, attachAfter) {\n if (attachAfter === void 0) { attachAfter = false; }\n // check all arguments\n assertIsStateTreeNode(target, 1);\n if (devMode()) {\n if (!isRoot(target))\n warnError(\"Warning: Attaching onAction listeners to non root nodes is dangerous: No events will be emitted for actions initiated higher up in the tree.\");\n if (!isProtected(target))\n warnError(\"Warning: Attaching onAction listeners to non protected nodes is dangerous: No events will be emitted for direct modifications without action.\");\n }\n return addMiddleware(target, function handler(rawCall, next) {\n if (rawCall.type === \"action\" && rawCall.id === rawCall.rootId) {\n var sourceNode_1 = getStateTreeNode(rawCall.context);\n var info = {\n name: rawCall.name,\n path: getRelativePathBetweenNodes(getStateTreeNode(target), sourceNode_1),\n args: rawCall.args.map(function (arg, index) {\n return serializeArgument(sourceNode_1, rawCall.name, index, arg);\n })\n };\n if (attachAfter) {\n var res = next(rawCall);\n listener(info);\n return res;\n }\n else {\n listener(info);\n return next(rawCall);\n }\n }\n else {\n return next(rawCall);\n }\n });\n}\n\nvar nextActionId = 1;\nvar currentActionContext;\n/**\n * @internal\n * @hidden\n */\nfunction getCurrentActionContext() {\n return currentActionContext;\n}\n/**\n * @internal\n * @hidden\n */\nfunction getNextActionId() {\n return nextActionId++;\n}\n// TODO: optimize away entire action context if there is no middleware in tree?\n/**\n * @internal\n * @hidden\n */\nfunction runWithActionContext(context, fn) {\n var node = getStateTreeNode(context.context);\n if (context.type === \"action\") {\n node.assertAlive({\n actionContext: context\n });\n }\n var baseIsRunningAction = node._isRunningAction;\n node._isRunningAction = true;\n var previousContext = currentActionContext;\n currentActionContext = context;\n try {\n return runMiddleWares(node, context, fn);\n }\n finally {\n currentActionContext = previousContext;\n node._isRunningAction = baseIsRunningAction;\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction getParentActionContext(parentContext) {\n if (!parentContext)\n return undefined;\n if (parentContext.type === \"action\")\n return parentContext;\n return parentContext.parentActionEvent;\n}\n/**\n * @internal\n * @hidden\n */\nfunction createActionInvoker(target, name, fn) {\n var res = function () {\n var id = getNextActionId();\n var parentContext = currentActionContext;\n var parentActionContext = getParentActionContext(parentContext);\n return runWithActionContext({\n type: \"action\",\n name: name,\n id: id,\n args: argsToArray(arguments),\n context: target,\n tree: getRoot(target),\n rootId: parentContext ? parentContext.rootId : id,\n parentId: parentContext ? parentContext.id : 0,\n allParentIds: parentContext\n ? __spread(parentContext.allParentIds, [parentContext.id]) : [],\n parentEvent: parentContext,\n parentActionEvent: parentActionContext\n }, fn);\n };\n res._isMSTAction = true;\n return res;\n}\n/**\n * Middleware can be used to intercept any action is invoked on the subtree where it is attached.\n * If a tree is protected (by default), this means that any mutation of the tree will pass through your middleware.\n *\n * For more details, see the [middleware docs](concepts/middleware.md)\n *\n * @param target Node to apply the middleware to.\n * @param middleware Middleware to apply.\n * @returns A callable function to dispose the middleware.\n */\nfunction addMiddleware(target, handler, includeHooks) {\n if (includeHooks === void 0) { includeHooks = true; }\n var node = getStateTreeNode(target);\n if (devMode()) {\n if (!node.isProtectionEnabled) {\n warnError(\"It is recommended to protect the state tree before attaching action middleware, as otherwise it cannot be guaranteed that all changes are passed through middleware. See `protect`\");\n }\n }\n return node.addMiddleWare(handler, includeHooks);\n}\n/**\n * Binds middleware to a specific action.\n *\n * Example:\n * ```ts\n * type.actions(self => {\n * function takeA____() {\n * self.toilet.donate()\n * self.wipe()\n * self.wipe()\n * self.toilet.flush()\n * }\n * return {\n * takeA____: decorate(atomic, takeA____)\n * }\n * })\n * ```\n *\n * @param handler\n * @param fn\n * @param includeHooks\n * @returns The original function\n */\nfunction decorate(handler, fn, includeHooks) {\n if (includeHooks === void 0) { includeHooks = true; }\n var middleware = { handler: handler, includeHooks: includeHooks };\n fn.$mst_middleware = fn.$mst_middleware || [];\n fn.$mst_middleware.push(middleware);\n return fn;\n}\nvar CollectedMiddlewares = /** @class */ (function () {\n function CollectedMiddlewares(node, fn) {\n Object.defineProperty(this, \"arrayIndex\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"inArrayIndex\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"middlewares\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n // we just push middleware arrays into an array of arrays to avoid making copies\n if (fn.$mst_middleware) {\n this.middlewares.push(fn.$mst_middleware);\n }\n var n = node;\n // Find all middlewares. Optimization: cache this?\n while (n) {\n if (n.middlewares)\n this.middlewares.push(n.middlewares);\n n = n.parent;\n }\n }\n Object.defineProperty(CollectedMiddlewares.prototype, \"isEmpty\", {\n get: function () {\n return this.middlewares.length <= 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CollectedMiddlewares.prototype, \"getNextMiddleware\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var array = this.middlewares[this.arrayIndex];\n if (!array)\n return undefined;\n var item = array[this.inArrayIndex++];\n if (!item) {\n this.arrayIndex++;\n this.inArrayIndex = 0;\n return this.getNextMiddleware();\n }\n return item;\n }\n });\n return CollectedMiddlewares;\n}());\nfunction runMiddleWares(node, baseCall, originalFn) {\n var middlewares = new CollectedMiddlewares(node, originalFn);\n // Short circuit\n if (middlewares.isEmpty)\n return action(originalFn).apply(null, baseCall.args);\n var result = null;\n function runNextMiddleware(call) {\n var middleware = middlewares.getNextMiddleware();\n var handler = middleware && middleware.handler;\n if (!handler) {\n return action(originalFn).apply(null, call.args);\n }\n // skip hooks if asked to\n if (!middleware.includeHooks && Hook[call.name]) {\n return runNextMiddleware(call);\n }\n var nextInvoked = false;\n function next(call2, callback) {\n nextInvoked = true;\n // the result can contain\n // - the non manipulated return value from an action\n // - the non manipulated abort value\n // - one of the above but manipulated through the callback function\n result = runNextMiddleware(call2);\n if (callback) {\n result = callback(result);\n }\n }\n var abortInvoked = false;\n function abort(value) {\n abortInvoked = true;\n // overwrite the result\n // can be manipulated through middlewares earlier in the queue using the callback fn\n result = value;\n }\n handler(call, next, abort);\n if (devMode()) {\n if (!nextInvoked && !abortInvoked) {\n var node2 = getStateTreeNode(call.tree);\n throw fail$1(\"Neither the next() nor the abort() callback within the middleware \" + handler.name + \" for the action: \\\"\" + call.name + \"\\\" on the node: \" + node2.type.name + \" was invoked.\");\n }\n else if (nextInvoked && abortInvoked) {\n var node2 = getStateTreeNode(call.tree);\n throw fail$1(\"The next() and abort() callback within the middleware \" + handler.name + \" for the action: \\\"\" + call.name + \"\\\" on the node: \" + node2.type.name + \" were invoked.\");\n }\n }\n return result;\n }\n return runNextMiddleware(baseCall);\n}\n\n/**\n * Returns the currently executing MST action context, or undefined if none.\n */\nfunction getRunningActionContext() {\n var current = getCurrentActionContext();\n while (current && current.type !== \"action\") {\n current = current.parentActionEvent;\n }\n return current;\n}\nfunction _isActionContextThisOrChildOf(actionContext, sameOrParent, includeSame) {\n var parentId = typeof sameOrParent === \"number\" ? sameOrParent : sameOrParent.id;\n var current = includeSame\n ? actionContext\n : actionContext.parentActionEvent;\n while (current) {\n if (current.id === parentId) {\n return true;\n }\n current = current.parentActionEvent;\n }\n return false;\n}\n/**\n * Returns if the given action context is a parent of this action context.\n */\nfunction isActionContextChildOf(actionContext, parent) {\n return _isActionContextThisOrChildOf(actionContext, parent, false);\n}\n/**\n * Returns if the given action context is this or a parent of this action context.\n */\nfunction isActionContextThisOrChildOf(actionContext, parentOrThis) {\n return _isActionContextThisOrChildOf(actionContext, parentOrThis, true);\n}\n\nfunction safeStringify(value) {\n try {\n return JSON.stringify(value);\n }\n catch (e) {\n // istanbul ignore next\n return \"<Unserializable: \" + e + \">\";\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction prettyPrintValue(value) {\n return typeof value === \"function\"\n ? \"<function\" + (value.name ? \" \" + value.name : \"\") + \">\"\n : isStateTreeNode(value)\n ? \"<\" + value + \">\"\n : \"`\" + safeStringify(value) + \"`\";\n}\nfunction shortenPrintValue(valueInString) {\n return valueInString.length < 280\n ? valueInString\n : valueInString.substring(0, 272) + \"......\" + valueInString.substring(valueInString.length - 8);\n}\nfunction toErrorString(error) {\n var value = error.value;\n var type = error.context[error.context.length - 1].type;\n var fullPath = error.context\n .map(function (_a) {\n var path = _a.path;\n return path;\n })\n .filter(function (path) { return path.length > 0; })\n .join(\"/\");\n var pathPrefix = fullPath.length > 0 ? \"at path \\\"/\" + fullPath + \"\\\" \" : \"\";\n var currentTypename = isStateTreeNode(value)\n ? \"value of type \" + getStateTreeNode(value).type.name + \":\"\n : isPrimitive(value)\n ? \"value\"\n : \"snapshot\";\n var isSnapshotCompatible = type && isStateTreeNode(value) && type.is(getStateTreeNode(value).snapshot);\n return (\"\" + pathPrefix + currentTypename + \" \" + prettyPrintValue(value) + \" is not assignable \" + (type ? \"to type: `\" + type.name + \"`\" : \"\") +\n (error.message ? \" (\" + error.message + \")\" : \"\") +\n (type\n ? isPrimitiveType(type) || isPrimitive(value)\n ? \".\"\n : \", expected an instance of `\" + type.name + \"` or a snapshot like `\" + type.describe() + \"` instead.\" +\n (isSnapshotCompatible\n ? \" (Note that a snapshot of the provided value is compatible with the targeted type)\"\n : \"\")\n : \".\"));\n}\n/**\n * @internal\n * @hidden\n */\nfunction getContextForPath(context, path, type) {\n return context.concat([{ path: path, type: type }]);\n}\n/**\n * @internal\n * @hidden\n */\nfunction typeCheckSuccess() {\n return EMPTY_ARRAY;\n}\n/**\n * @internal\n * @hidden\n */\nfunction typeCheckFailure(context, value, message) {\n return [{ context: context, value: value, message: message }];\n}\n/**\n * @internal\n * @hidden\n */\nfunction flattenTypeErrors(errors) {\n return errors.reduce(function (a, i) { return a.concat(i); }, []);\n}\n// TODO; doublecheck: typecheck should only needed to be invoked from: type.create and array / map / value.property will change\n/**\n * @internal\n * @hidden\n */\nfunction typecheckInternal(type, value) {\n // runs typeChecking if it is in dev-mode or through a process.env.ENABLE_TYPE_CHECK flag\n if (isTypeCheckingEnabled()) {\n typecheck(type, value);\n }\n}\n/**\n * Run's the typechecker for the given type on the given value, which can be a snapshot or an instance.\n * Throws if the given value is not according the provided type specification.\n * Use this if you need typechecks even in a production build (by default all automatic runtime type checks will be skipped in production builds)\n *\n * @param type Type to check against.\n * @param value Value to be checked, either a snapshot or an instance.\n */\nfunction typecheck(type, value) {\n var errors = type.validate(value, [{ path: \"\", type: type }]);\n if (errors.length > 0) {\n throw fail$1(validationErrorsToString(type, value, errors));\n }\n}\nfunction validationErrorsToString(type, value, errors) {\n if (errors.length === 0) {\n return undefined;\n }\n return (\"Error while converting \" + shortenPrintValue(prettyPrintValue(value)) + \" to `\" + type.name + \"`:\\n\\n \" + errors.map(toErrorString).join(\"\\n \"));\n}\n\nvar identifierCacheId = 0;\n/**\n * @internal\n * @hidden\n */\nvar IdentifierCache = /** @class */ (function () {\n function IdentifierCache() {\n Object.defineProperty(this, \"cacheId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: identifierCacheId++\n });\n // n.b. in cache all identifiers are normalized to strings\n Object.defineProperty(this, \"cache\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: observable.map()\n });\n // last time the cache (array) for a given time changed\n // n.b. it is not really the time, but just an integer that gets increased after each modification to the array\n Object.defineProperty(this, \"lastCacheModificationPerId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: observable.map()\n });\n }\n Object.defineProperty(IdentifierCache.prototype, \"updateLastCacheModificationPerId\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (identifier) {\n var lcm = this.lastCacheModificationPerId.get(identifier);\n // we start at 1 since 0 means no update since cache creation\n this.lastCacheModificationPerId.set(identifier, lcm === undefined ? 1 : lcm + 1);\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"getLastCacheModificationPerId\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (identifier) {\n var modificationId = this.lastCacheModificationPerId.get(identifier) || 0;\n return this.cacheId + \"-\" + modificationId;\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"addNodeToCache\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, lastCacheUpdate) {\n if (lastCacheUpdate === void 0) { lastCacheUpdate = true; }\n if (node.identifierAttribute) {\n var identifier = node.identifier;\n if (!this.cache.has(identifier)) {\n this.cache.set(identifier, observable.array([], mobxShallow));\n }\n var set = this.cache.get(identifier);\n if (set.indexOf(node) !== -1)\n throw fail$1(\"Already registered\");\n set.push(node);\n if (lastCacheUpdate) {\n this.updateLastCacheModificationPerId(identifier);\n }\n }\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"mergeCache\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var _this = this;\n values(node.identifierCache.cache).forEach(function (nodes) {\n return nodes.forEach(function (child) {\n _this.addNodeToCache(child);\n });\n });\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"notifyDied\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n if (node.identifierAttribute) {\n var id = node.identifier;\n var set = this.cache.get(id);\n if (set) {\n set.remove(node);\n // remove empty sets from cache\n if (!set.length) {\n this.cache.delete(id);\n }\n this.updateLastCacheModificationPerId(node.identifier);\n }\n }\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"splitCache\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var _this = this;\n var res = new IdentifierCache();\n var basePath = node.path;\n entries(this.cache).forEach(function (_a) {\n var _b = __read(_a, 2), id = _b[0], nodes = _b[1];\n var modified = false;\n for (var i = nodes.length - 1; i >= 0; i--) {\n if (nodes[i].path.indexOf(basePath) === 0) {\n res.addNodeToCache(nodes[i], false); // no need to update lastUpdated since it is a whole new cache\n nodes.splice(i, 1);\n modified = true;\n }\n }\n if (modified) {\n _this.updateLastCacheModificationPerId(id);\n }\n });\n return res;\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"has\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type, identifier) {\n var set = this.cache.get(identifier);\n if (!set)\n return false;\n return set.some(function (candidate) { return type.isAssignableFrom(candidate.type); });\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"resolve\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type, identifier) {\n var set = this.cache.get(identifier);\n if (!set)\n return null;\n var matches = set.filter(function (candidate) { return type.isAssignableFrom(candidate.type); });\n switch (matches.length) {\n case 0:\n return null;\n case 1:\n return matches[0];\n default:\n throw fail$1(\"Cannot resolve a reference to type '\" + type.name + \"' with id: '\" + identifier + \"' unambigously, there are multiple candidates: \" + matches\n .map(function (n) { return n.path; })\n .join(\", \"));\n }\n }\n });\n return IdentifierCache;\n}());\n\n/**\n * @internal\n * @hidden\n */\nfunction createObjectNode(type, parent, subpath, environment, initialValue) {\n var existingNode = getStateTreeNodeSafe(initialValue);\n if (existingNode) {\n if (existingNode.parent) {\n // istanbul ignore next\n throw fail$1(\"Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '\" + (parent ? parent.path : \"\") + \"/\" + subpath + \"', but it lives already at '\" + existingNode.path + \"'\");\n }\n if (parent) {\n existingNode.setParent(parent, subpath);\n }\n // else it already has no parent since it is a pre-requisite\n return existingNode;\n }\n // not a node, a snapshot\n return new ObjectNode(type, parent, subpath, environment, initialValue);\n}\n/**\n * @internal\n * @hidden\n */\nfunction createScalarNode(type, parent, subpath, environment, initialValue) {\n return new ScalarNode(type, parent, subpath, environment, initialValue);\n}\n/**\n * @internal\n * @hidden\n */\nfunction isNode(value) {\n return value instanceof ScalarNode || value instanceof ObjectNode;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar NodeLifeCycle;\n(function (NodeLifeCycle) {\n NodeLifeCycle[NodeLifeCycle[\"INITIALIZING\"] = 0] = \"INITIALIZING\";\n NodeLifeCycle[NodeLifeCycle[\"CREATED\"] = 1] = \"CREATED\";\n NodeLifeCycle[NodeLifeCycle[\"FINALIZED\"] = 2] = \"FINALIZED\";\n NodeLifeCycle[NodeLifeCycle[\"DETACHING\"] = 3] = \"DETACHING\";\n NodeLifeCycle[NodeLifeCycle[\"DEAD\"] = 4] = \"DEAD\"; // no coming back from this one\n})(NodeLifeCycle || (NodeLifeCycle = {}));\n/**\n * Returns true if the given value is a node in a state tree.\n * More precisely, that is, if the value is an instance of a\n * `types.model`, `types.array` or `types.map`.\n *\n * @param value\n * @returns true if the value is a state tree node.\n */\nfunction isStateTreeNode(value) {\n return !!(value && value.$treenode);\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsStateTreeNode(value, argNumber) {\n assertArg(value, isStateTreeNode, \"mobx-state-tree node\", argNumber);\n}\n/**\n * @internal\n * @hidden\n */\nfunction getStateTreeNode(value) {\n if (!isStateTreeNode(value)) {\n // istanbul ignore next\n throw fail$1(\"Value \" + value + \" is no MST Node\");\n }\n return value.$treenode;\n}\n/**\n * @internal\n * @hidden\n */\nfunction getStateTreeNodeSafe(value) {\n return (value && value.$treenode) || null;\n}\n/**\n * @internal\n * @hidden\n */\nfunction toJSON() {\n return getStateTreeNode(this).snapshot;\n}\nvar doubleDot = function (_) { return \"..\"; };\n/**\n * @internal\n * @hidden\n */\nfunction getRelativePathBetweenNodes(base, target) {\n // PRE condition target is (a child of) base!\n if (base.root !== target.root) {\n throw fail$1(\"Cannot calculate relative path: objects '\" + base + \"' and '\" + target + \"' are not part of the same object tree\");\n }\n var baseParts = splitJsonPath(base.path);\n var targetParts = splitJsonPath(target.path);\n var common = 0;\n for (; common < baseParts.length; common++) {\n if (baseParts[common] !== targetParts[common])\n break;\n }\n // TODO: assert that no targetParts paths are \"..\", \".\" or \"\"!\n return (baseParts.slice(common).map(doubleDot).join(\"/\") + joinJsonPath(targetParts.slice(common)));\n}\n/**\n * @internal\n * @hidden\n */\nfunction resolveNodeByPath(base, path, failIfResolveFails) {\n if (failIfResolveFails === void 0) { failIfResolveFails = true; }\n return resolveNodeByPathParts(base, splitJsonPath(path), failIfResolveFails);\n}\n/**\n * @internal\n * @hidden\n */\nfunction resolveNodeByPathParts(base, pathParts, failIfResolveFails) {\n if (failIfResolveFails === void 0) { failIfResolveFails = true; }\n var current = base;\n for (var i = 0; i < pathParts.length; i++) {\n var part = pathParts[i];\n if (part === \"..\") {\n current = current.parent;\n if (current)\n continue; // not everything has a parent\n }\n else if (part === \".\") {\n continue;\n }\n else if (current) {\n if (current instanceof ScalarNode) {\n // check if the value of a scalar resolves to a state tree node (e.g. references)\n // then we can continue resolving...\n try {\n var value = current.value;\n if (isStateTreeNode(value)) {\n current = getStateTreeNode(value);\n // fall through\n }\n }\n catch (e) {\n if (!failIfResolveFails) {\n return undefined;\n }\n throw e;\n }\n }\n if (current instanceof ObjectNode) {\n var subType = current.getChildType(part);\n if (subType) {\n current = current.getChildNode(part);\n if (current)\n continue;\n }\n }\n }\n if (failIfResolveFails)\n throw fail$1(\"Could not resolve '\" + part + \"' in path '\" + (joinJsonPath(pathParts.slice(0, i)) || \"/\") + \"' while resolving '\" + joinJsonPath(pathParts) + \"'\");\n else\n return undefined;\n }\n return current;\n}\n/**\n * @internal\n * @hidden\n */\nfunction convertChildNodesToArray(childNodes) {\n if (!childNodes)\n return EMPTY_ARRAY;\n var keys = Object.keys(childNodes);\n if (!keys.length)\n return EMPTY_ARRAY;\n var result = new Array(keys.length);\n keys.forEach(function (key, index) {\n result[index] = childNodes[key];\n });\n return result;\n}\n\n// based on: https://github.com/mobxjs/mobx-utils/blob/master/src/async-action.ts\n/*\n All contents of this file are deprecated.\n\n The term `process` has been replaced with `flow` to avoid conflicts with the\n global `process` object.\n\n Refer to `flow.ts` for any further changes to this implementation.\n*/\nvar DEPRECATION_MESSAGE = \"See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. \" +\n \"Note that the middleware event types starting with `process` now start with `flow`.\";\n/**\n * @hidden\n *\n * @deprecated has been renamed to `flow()`.\n * See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information.\n * Note that the middleware event types starting with `process` now start with `flow`.\n *\n * @returns {Promise}\n */\nfunction process$1(asyncAction) {\n deprecated(\"process\", \"`process()` has been renamed to `flow()`. \" + DEPRECATION_MESSAGE);\n return flow(asyncAction);\n}\n\nvar plainObjectString = Object.toString();\n/**\n * @internal\n * @hidden\n */\nvar EMPTY_ARRAY = Object.freeze([]);\n/**\n * @internal\n * @hidden\n */\nvar EMPTY_OBJECT = Object.freeze({});\n/**\n * @internal\n * @hidden\n */\nvar mobxShallow = _getGlobalState().useProxies\n ? { deep: false }\n : { deep: false, proxy: false };\nObject.freeze(mobxShallow);\n/**\n * @internal\n * @hidden\n */\nfunction fail$1(message) {\n if (message === void 0) { message = \"Illegal state\"; }\n return new Error(\"[mobx-state-tree] \" + message);\n}\n/**\n * @internal\n * @hidden\n */\nfunction identity(_) {\n return _;\n}\n/**\n * pollyfill (for IE) suggested in MDN:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\n * @internal\n * @hidden\n */\nvar isInteger = Number.isInteger ||\n function (value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n };\n/**\n * @internal\n * @hidden\n */\nfunction isArray(val) {\n return Array.isArray(val) || isObservableArray(val);\n}\n/**\n * @internal\n * @hidden\n */\nfunction asArray(val) {\n if (!val)\n return EMPTY_ARRAY;\n if (isArray(val))\n return val;\n return [val];\n}\n/**\n * @internal\n * @hidden\n */\nfunction extend(a) {\n var b = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n b[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < b.length; i++) {\n var current = b[i];\n for (var key in current)\n a[key] = current[key];\n }\n return a;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isPlainObject(value) {\n var _a;\n if (value === null || typeof value !== \"object\")\n return false;\n var proto = Object.getPrototypeOf(value);\n if (proto == null)\n return true;\n return ((_a = proto.constructor) === null || _a === void 0 ? void 0 : _a.toString()) === plainObjectString;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isMutable(value) {\n return (value !== null &&\n typeof value === \"object\" &&\n !(value instanceof Date) &&\n !(value instanceof RegExp));\n}\n/**\n * @internal\n * @hidden\n */\nfunction isPrimitive(value, includeDate) {\n if (includeDate === void 0) { includeDate = true; }\n if (value === null || value === undefined)\n return true;\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\" ||\n (includeDate && value instanceof Date))\n return true;\n return false;\n}\n/**\n * @internal\n * @hidden\n * Freeze a value and return it (if not in production)\n */\nfunction freeze(value) {\n if (!devMode())\n return value;\n return isPrimitive(value) || isObservableArray(value) ? value : Object.freeze(value);\n}\n/**\n * @internal\n * @hidden\n * Recursively freeze a value (if not in production)\n */\nfunction deepFreeze(value) {\n if (!devMode())\n return value;\n freeze(value);\n if (isPlainObject(value)) {\n Object.keys(value).forEach(function (propKey) {\n if (!isPrimitive(value[propKey]) &&\n !Object.isFrozen(value[propKey])) {\n deepFreeze(value[propKey]);\n }\n });\n }\n return value;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isSerializable(value) {\n return typeof value !== \"function\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction addHiddenFinalProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\n/**\n * @internal\n * @hidden\n */\nfunction addHiddenWritableProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\n/**\n * @internal\n * @hidden\n */\nvar EventHandler = /** @class */ (function () {\n function EventHandler() {\n Object.defineProperty(this, \"handlers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n }\n Object.defineProperty(EventHandler.prototype, \"hasSubscribers\", {\n get: function () {\n return this.handlers.length > 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventHandler.prototype, \"register\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn, atTheBeginning) {\n var _this = this;\n if (atTheBeginning === void 0) { atTheBeginning = false; }\n if (atTheBeginning) {\n this.handlers.unshift(fn);\n }\n else {\n this.handlers.push(fn);\n }\n return function () {\n _this.unregister(fn);\n };\n }\n });\n Object.defineProperty(EventHandler.prototype, \"has\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n return this.handlers.indexOf(fn) >= 0;\n }\n });\n Object.defineProperty(EventHandler.prototype, \"unregister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var index = this.handlers.indexOf(fn);\n if (index >= 0) {\n this.handlers.splice(index, 1);\n }\n }\n });\n Object.defineProperty(EventHandler.prototype, \"clear\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.handlers.length = 0;\n }\n });\n Object.defineProperty(EventHandler.prototype, \"emit\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // make a copy just in case it changes\n var handlers = this.handlers.slice();\n handlers.forEach(function (f) { return f.apply(void 0, __spread(args)); });\n }\n });\n return EventHandler;\n}());\n/**\n * @internal\n * @hidden\n */\nvar EventHandlers = /** @class */ (function () {\n function EventHandlers() {\n Object.defineProperty(this, \"eventHandlers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n Object.defineProperty(EventHandlers.prototype, \"hasSubscribers\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n var handler = this.eventHandlers && this.eventHandlers[event];\n return !!handler && handler.hasSubscribers;\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"register\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, fn, atTheBeginning) {\n if (atTheBeginning === void 0) { atTheBeginning = false; }\n if (!this.eventHandlers) {\n this.eventHandlers = {};\n }\n var handler = this.eventHandlers[event];\n if (!handler) {\n handler = this.eventHandlers[event] = new EventHandler();\n }\n return handler.register(fn, atTheBeginning);\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"has\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, fn) {\n var handler = this.eventHandlers && this.eventHandlers[event];\n return !!handler && handler.has(fn);\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"unregister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, fn) {\n var handler = this.eventHandlers && this.eventHandlers[event];\n if (handler) {\n handler.unregister(fn);\n }\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"clear\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n if (this.eventHandlers) {\n delete this.eventHandlers[event];\n }\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"clearAll\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.eventHandlers = undefined;\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"emit\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var handler = this.eventHandlers && this.eventHandlers[event];\n if (handler) {\n (_a = handler).emit.apply(_a, __spread(args));\n }\n }\n });\n return EventHandlers;\n}());\n/**\n * @internal\n * @hidden\n */\nfunction argsToArray(args) {\n var res = new Array(args.length);\n for (var i = 0; i < args.length; i++)\n res[i] = args[i];\n return res;\n}\n/**\n * @internal\n * @hidden\n */\nfunction stringStartsWith(str, beginning) {\n return str.indexOf(beginning) === 0;\n}\n/**\n * @internal\n * @hidden\n */\nvar deprecated = function (id, message) {\n // skip if running production\n if (!devMode())\n return;\n // warn if hasn't been warned before\n if (deprecated.ids && !deprecated.ids.hasOwnProperty(id)) {\n warnError(\"Deprecation warning: \" + message);\n }\n // mark as warned to avoid duplicate warn message\n if (deprecated.ids)\n deprecated.ids[id] = true;\n};\ndeprecated.ids = {};\n/**\n * @internal\n * @hidden\n */\nfunction warnError(msg) {\n console.warn(new Error(\"[mobx-state-tree] \" + msg));\n}\n/**\n * @internal\n * @hidden\n */\nfunction isTypeCheckingEnabled() {\n return (devMode() ||\n (typeof process !== \"undefined\" && process.env && process.env.ENABLE_TYPE_CHECK === \"true\"));\n}\n/**\n * @internal\n * @hidden\n */\nfunction devMode() {\n return process.env.NODE_ENV !== \"production\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertArg(value, fn, typeName, argNumber) {\n if (devMode()) {\n if (!fn(value)) {\n // istanbul ignore next\n throw fail$1(\"expected \" + typeName + \" as argument \" + asArray(argNumber).join(\" or \") + \", got \" + value + \" instead\");\n }\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsFunction(value, argNumber) {\n assertArg(value, function (fn) { return typeof fn === \"function\"; }, \"function\", argNumber);\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsNumber(value, argNumber, min, max) {\n assertArg(value, function (n) { return typeof n === \"number\"; }, \"number\", argNumber);\n if (min !== undefined) {\n assertArg(value, function (n) { return n >= min; }, \"number greater than \" + min, argNumber);\n }\n if (max !== undefined) {\n assertArg(value, function (n) { return n <= max; }, \"number lesser than \" + max, argNumber);\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsString(value, argNumber, canBeEmpty) {\n if (canBeEmpty === void 0) { canBeEmpty = true; }\n assertArg(value, function (s) { return typeof s === \"string\"; }, \"string\", argNumber);\n if (!canBeEmpty) {\n assertArg(value, function (s) { return s !== \"\"; }, \"not empty string\", argNumber);\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction setImmediateWithFallback(fn) {\n if (typeof queueMicrotask === \"function\") {\n queueMicrotask(fn);\n }\n else if (typeof setImmediate === \"function\") {\n setImmediate(fn);\n }\n else {\n setTimeout(fn, 1);\n }\n}\n\n/**\n * See [asynchronous actions](concepts/async-actions.md).\n *\n * @returns The flow as a promise.\n */\nfunction flow(generator) {\n return createFlowSpawner(generator.name, generator);\n}\n/**\n * @deprecated Not needed since TS3.6.\n * Used for TypeScript to make flows that return a promise return the actual promise result.\n *\n * @param val\n * @returns\n */\nfunction castFlowReturn(val) {\n return val;\n}\n/**\n * @experimental\n * experimental api - might change on minor/patch releases\n *\n * Convert a promise-returning function to a generator-returning one.\n * This is intended to allow for usage of `yield*` in async actions to\n * retain the promise return type.\n *\n * Example:\n * ```ts\n * function getDataAsync(input: string): Promise<number> { ... }\n * const getDataGen = toGeneratorFunction(getDataAsync);\n *\n * const someModel.actions(self => ({\n * someAction: flow(function*() {\n * // value is typed as number\n * const value = yield* getDataGen(\"input value\");\n * ...\n * })\n * }))\n * ```\n */\nfunction toGeneratorFunction(p) {\n return function () {\n var _i;\n var args = [];\n for (_i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, p.apply(void 0, __spread(args))];\n case 1: return [2 /*return*/, (_a.sent())];\n }\n });\n };\n}\n/**\n * @experimental\n * experimental api - might change on minor/patch releases\n *\n * Convert a promise to a generator yielding that promise\n * This is intended to allow for usage of `yield*` in async actions to\n * retain the promise return type.\n *\n * Example:\n * ```ts\n * function getDataAsync(input: string): Promise<number> { ... }\n *\n * const someModel.actions(self => ({\n * someAction: flow(function*() {\n * // value is typed as number\n * const value = yield* toGenerator(getDataAsync(\"input value\"));\n * ...\n * })\n * }))\n * ```\n */\nfunction toGenerator(p) {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, p];\n case 1: return [2 /*return*/, (_a.sent())];\n }\n });\n}\n/**\n * @internal\n * @hidden\n */\nfunction createFlowSpawner(name, generator) {\n var spawner = function flowSpawner() {\n // Implementation based on https://github.com/tj/co/blob/master/index.js\n var runId = getNextActionId();\n var parentContext = getCurrentActionContext();\n if (!parentContext) {\n throw fail$1(\"a mst flow must always have a parent context\");\n }\n var parentActionContext = getParentActionContext(parentContext);\n if (!parentActionContext) {\n throw fail$1(\"a mst flow must always have a parent action context\");\n }\n var contextBase = {\n name: name,\n id: runId,\n tree: parentContext.tree,\n context: parentContext.context,\n parentId: parentContext.id,\n allParentIds: __spread(parentContext.allParentIds, [parentContext.id]),\n rootId: parentContext.rootId,\n parentEvent: parentContext,\n parentActionEvent: parentActionContext\n };\n var args = arguments;\n function wrap(fn, type, arg) {\n fn.$mst_middleware = spawner.$mst_middleware; // pick up any middleware attached to the flow\n runWithActionContext(__assign(__assign({}, contextBase), { type: type, args: [arg] }), fn);\n }\n return new Promise(function (resolve, reject) {\n var gen;\n var init = function asyncActionInit() {\n gen = generator.apply(null, arguments);\n onFulfilled(undefined); // kick off the flow\n };\n init.$mst_middleware = spawner.$mst_middleware;\n runWithActionContext(__assign(__assign({}, contextBase), { type: \"flow_spawn\", args: argsToArray(args) }), init);\n function onFulfilled(res) {\n var ret;\n try {\n // prettier-ignore\n wrap(function (r) { ret = gen.next(r); }, \"flow_resume\", res);\n }\n catch (e) {\n // prettier-ignore\n setImmediateWithFallback(function () {\n wrap(function (r) { reject(e); }, \"flow_throw\", e);\n });\n return;\n }\n next(ret);\n return;\n }\n function onRejected(err) {\n var ret;\n try {\n // prettier-ignore\n wrap(function (r) { ret = gen.throw(r); }, \"flow_resume_error\", err); // or yieldError?\n }\n catch (e) {\n // prettier-ignore\n setImmediateWithFallback(function () {\n wrap(function (r) { reject(e); }, \"flow_throw\", e);\n });\n return;\n }\n next(ret);\n }\n function next(ret) {\n if (ret.done) {\n // prettier-ignore\n setImmediateWithFallback(function () {\n wrap(function (r) { resolve(r); }, \"flow_return\", ret.value);\n });\n return;\n }\n // TODO: support more type of values? See https://github.com/tj/co/blob/249bbdc72da24ae44076afd716349d2089b31c4c/index.js#L100\n if (!ret.value || typeof ret.value.then !== \"function\") {\n // istanbul ignore next\n throw fail$1(\"Only promises can be yielded to `async`, got: \" + ret);\n }\n return ret.value.then(onFulfilled, onRejected);\n }\n });\n };\n return spawner;\n}\n\n/**\n * @internal\n * @hidden\n */\nfunction splitPatch(patch) {\n if (!(\"oldValue\" in patch))\n throw fail$1(\"Patches without `oldValue` field cannot be inversed\");\n return [stripPatch(patch), invertPatch(patch)];\n}\n/**\n * @internal\n * @hidden\n */\nfunction stripPatch(patch) {\n // strips `oldvalue` information from the patch, so that it becomes a patch conform the json-patch spec\n // this removes the ability to undo the patch\n switch (patch.op) {\n case \"add\":\n return { op: \"add\", path: patch.path, value: patch.value };\n case \"remove\":\n return { op: \"remove\", path: patch.path };\n case \"replace\":\n return { op: \"replace\", path: patch.path, value: patch.value };\n }\n}\nfunction invertPatch(patch) {\n switch (patch.op) {\n case \"add\":\n return {\n op: \"remove\",\n path: patch.path\n };\n case \"remove\":\n return {\n op: \"add\",\n path: patch.path,\n value: patch.oldValue\n };\n case \"replace\":\n return {\n op: \"replace\",\n path: patch.path,\n value: patch.oldValue\n };\n }\n}\n/**\n * Simple simple check to check it is a number.\n */\nfunction isNumber(x) {\n return typeof x === \"number\";\n}\n/**\n * Escape slashes and backslashes.\n *\n * http://tools.ietf.org/html/rfc6901\n */\nfunction escapeJsonPath(path) {\n if (isNumber(path) === true) {\n return \"\" + path;\n }\n if (path.indexOf(\"/\") === -1 && path.indexOf(\"~\") === -1)\n return path;\n return path.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\n/**\n * Unescape slashes and backslashes.\n */\nfunction unescapeJsonPath(path) {\n return path.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n}\n/**\n * Generates a json-path compliant json path from path parts.\n *\n * @param path\n * @returns\n */\nfunction joinJsonPath(path) {\n // `/` refers to property with an empty name, while `` refers to root itself!\n if (path.length === 0)\n return \"\";\n var getPathStr = function (p) { return p.map(escapeJsonPath).join(\"/\"); };\n if (path[0] === \".\" || path[0] === \"..\") {\n // relative\n return getPathStr(path);\n }\n else {\n // absolute\n return \"/\" + getPathStr(path);\n }\n}\n/**\n * Splits and decodes a json path into several parts.\n *\n * @param path\n * @returns\n */\nfunction splitJsonPath(path) {\n // `/` refers to property with an empty name, while `` refers to root itself!\n var parts = path.split(\"/\").map(unescapeJsonPath);\n var valid = path === \"\" ||\n path === \".\" ||\n path === \"..\" ||\n stringStartsWith(path, \"/\") ||\n stringStartsWith(path, \"./\") ||\n stringStartsWith(path, \"../\");\n if (!valid) {\n throw fail$1(\"a json path must be either rooted, empty or relative, but got '\" + path + \"'\");\n }\n // '/a/b/c' -> [\"a\", \"b\", \"c\"]\n // '../../b/c' -> [\"..\", \"..\", \"b\", \"c\"]\n // '' -> []\n // '/' -> ['']\n // './a' -> [\".\", \"a\"]\n // /./a' -> [\".\", \"a\"] equivalent to './a'\n if (parts[0] === \"\") {\n parts.shift();\n }\n return parts;\n}\n\nvar SnapshotProcessor = /** @class */ (function (_super) {\n __extends(SnapshotProcessor, _super);\n function SnapshotProcessor(_subtype, _processors, name) {\n var _this = _super.call(this, name || _subtype.name) || this;\n Object.defineProperty(_this, \"_subtype\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subtype\n });\n Object.defineProperty(_this, \"_processors\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _processors\n });\n return _this;\n }\n Object.defineProperty(SnapshotProcessor.prototype, \"flags\", {\n get: function () {\n return this._subtype.flags | TypeFlags.SnapshotProcessor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"snapshotProcessor(\" + this._subtype.describe() + \")\";\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"preProcessSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (sn) {\n if (this._processors.preProcessor) {\n return this._processors.preProcessor.call(null, sn);\n }\n return sn;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"postProcessSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (sn) {\n if (this._processors.postProcessor) {\n return this._processors.postProcessor.call(null, sn);\n }\n return sn;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"_fixNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var _this = this;\n // the node has to use these methods rather than the original type ones\n proxyNodeTypeMethods(node.type, this, \"create\");\n var oldGetSnapshot = node.getSnapshot;\n node.getSnapshot = function () {\n return _this.postProcessSnapshot(oldGetSnapshot.call(node));\n };\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var processedInitialValue = isStateTreeNode(initialValue)\n ? initialValue\n : this.preProcessSnapshot(initialValue);\n var node = this._subtype.instantiate(parent, subpath, environment, processedInitialValue);\n this._fixNode(node);\n return node;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n var node = this._subtype.reconcile(current, isStateTreeNode(newValue) ? newValue : this.preProcessSnapshot(newValue), parent, subpath);\n if (node !== current) {\n this._fixNode(node);\n }\n return node;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, applyPostProcess) {\n if (applyPostProcess === void 0) { applyPostProcess = true; }\n var sn = this._subtype.getSnapshot(node);\n return applyPostProcess ? this.postProcessSnapshot(sn) : sn;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var processedSn = this.preProcessSnapshot(value);\n return this._subtype.validate(processedSn, context);\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subtype;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"is\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (thing) {\n var value = isType(thing)\n ? this._subtype\n : isStateTreeNode(thing)\n ? getSnapshot(thing, false)\n : this.preProcessSnapshot(thing);\n return this._subtype.validate(value, [{ path: \"\", type: this._subtype }]).length === 0;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this._subtype.isAssignableFrom(type);\n }\n });\n return SnapshotProcessor;\n}(BaseType));\nfunction proxyNodeTypeMethods(nodeType, snapshotProcessorType) {\n var e_1, _a;\n var methods = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n methods[_i - 2] = arguments[_i];\n }\n try {\n for (var methods_1 = __values(methods), methods_1_1 = methods_1.next(); !methods_1_1.done; methods_1_1 = methods_1.next()) {\n var method = methods_1_1.value;\n nodeType[method] = snapshotProcessorType[method].bind(snapshotProcessorType);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (methods_1_1 && !methods_1_1.done && (_a = methods_1.return)) _a.call(methods_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n}\n/**\n * `types.snapshotProcessor` - Runs a pre/post snapshot processor before/after serializing a given type.\n *\n * Example:\n * ```ts\n * const Todo1 = types.model({ text: types.string })\n * // in the backend the text type must be null when empty\n * interface BackendTodo {\n * text: string | null\n * }\n * const Todo2 = types.snapshotProcessor(Todo1, {\n * // from snapshot to instance\n * preProcessor(sn: BackendTodo) {\n * return {\n * text: sn.text || \"\";\n * }\n * },\n * // from instance to snapshot\n * postProcessor(sn): BackendTodo {\n * return {\n * text: !sn.text ? null : sn.text\n * }\n * }\n * })\n * ```\n *\n * @param type Type to run the processors over.\n * @param processors Processors to run.\n * @param name Type name, or undefined to inherit the inner type one.\n * @returns\n */\nfunction snapshotProcessor(type, processors, name) {\n assertIsType(type, 1);\n if (devMode()) {\n if (processors.postProcessor && typeof processors.postProcessor !== \"function\") {\n // istanbul ignore next\n throw fail(\"postSnapshotProcessor must be a function\");\n }\n if (processors.preProcessor && typeof processors.preProcessor !== \"function\") {\n // istanbul ignore next\n throw fail(\"preSnapshotProcessor must be a function\");\n }\n }\n return new SnapshotProcessor(type, processors, name);\n}\n\nvar needsIdentifierError = \"Map.put can only be used to store complex values that have an identifier type attribute\";\nfunction tryCollectModelTypes(type, modelTypes) {\n var e_1, _a;\n var subtypes = type.getSubTypes();\n if (subtypes === cannotDetermineSubtype) {\n return false;\n }\n if (subtypes) {\n var subtypesArray = asArray(subtypes);\n try {\n for (var subtypesArray_1 = __values(subtypesArray), subtypesArray_1_1 = subtypesArray_1.next(); !subtypesArray_1_1.done; subtypesArray_1_1 = subtypesArray_1.next()) {\n var subtype = subtypesArray_1_1.value;\n if (!tryCollectModelTypes(subtype, modelTypes))\n return false;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (subtypesArray_1_1 && !subtypesArray_1_1.done && (_a = subtypesArray_1.return)) _a.call(subtypesArray_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n if (type instanceof ModelType) {\n modelTypes.push(type);\n }\n return true;\n}\n/**\n * @internal\n * @hidden\n */\nvar MapIdentifierMode;\n(function (MapIdentifierMode) {\n MapIdentifierMode[MapIdentifierMode[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n MapIdentifierMode[MapIdentifierMode[\"YES\"] = 1] = \"YES\";\n MapIdentifierMode[MapIdentifierMode[\"NO\"] = 2] = \"NO\";\n})(MapIdentifierMode || (MapIdentifierMode = {}));\nvar MSTMap = /** @class */ (function (_super) {\n __extends(MSTMap, _super);\n function MSTMap(initialData) {\n return _super.call(this, initialData, observable.ref.enhancer) || this;\n }\n Object.defineProperty(MSTMap.prototype, \"get\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (key) {\n // maybe this is over-enthousiastic? normalize numeric keys to strings\n return _super.prototype.get.call(this, \"\" + key);\n }\n });\n Object.defineProperty(MSTMap.prototype, \"has\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (key) {\n return _super.prototype.has.call(this, \"\" + key);\n }\n });\n Object.defineProperty(MSTMap.prototype, \"delete\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (key) {\n return _super.prototype.delete.call(this, \"\" + key);\n }\n });\n Object.defineProperty(MSTMap.prototype, \"set\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (key, value) {\n return _super.prototype.set.call(this, \"\" + key, value);\n }\n });\n Object.defineProperty(MSTMap.prototype, \"put\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value) {\n if (!value)\n throw fail$1(\"Map.put cannot be used to set empty values\");\n if (isStateTreeNode(value)) {\n var node = getStateTreeNode(value);\n if (devMode()) {\n if (!node.identifierAttribute) {\n throw fail$1(needsIdentifierError);\n }\n }\n if (node.identifier === null) {\n throw fail$1(needsIdentifierError);\n }\n this.set(node.identifier, value);\n return value;\n }\n else if (!isMutable(value)) {\n throw fail$1(\"Map.put can only be used to store complex values\");\n }\n else {\n var mapNode = getStateTreeNode(this);\n var mapType = mapNode.type;\n if (mapType.identifierMode !== MapIdentifierMode.YES) {\n throw fail$1(needsIdentifierError);\n }\n var idAttr = mapType.mapIdentifierAttribute;\n var id = value[idAttr];\n if (!isValidIdentifier(id)) {\n // try again but this time after creating a node for the value\n // since it might be an optional identifier\n var newNode = this.put(mapType.getChildType().create(value, mapNode.environment));\n return this.put(getSnapshot(newNode));\n }\n var key = normalizeIdentifier(id);\n this.set(key, value);\n return this.get(key);\n }\n }\n });\n return MSTMap;\n}(ObservableMap));\n/**\n * @internal\n * @hidden\n */\nvar MapType = /** @class */ (function (_super) {\n __extends(MapType, _super);\n function MapType(name, _subType, hookInitializers) {\n if (hookInitializers === void 0) { hookInitializers = []; }\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_subType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subType\n });\n Object.defineProperty(_this, \"identifierMode\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: MapIdentifierMode.UNKNOWN\n });\n Object.defineProperty(_this, \"mapIdentifierAttribute\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: undefined\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Map\n });\n Object.defineProperty(_this, \"hookInitializers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n _this._determineIdentifierMode();\n _this.hookInitializers = hookInitializers;\n return _this;\n }\n Object.defineProperty(MapType.prototype, \"hooks\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (hooks) {\n var hookInitializers = this.hookInitializers.length > 0 ? this.hookInitializers.concat(hooks) : [hooks];\n return new MapType(this.name, this._subType, hookInitializers);\n }\n });\n Object.defineProperty(MapType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n this._determineIdentifierMode();\n return createObjectNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(MapType.prototype, \"_determineIdentifierMode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this.identifierMode !== MapIdentifierMode.UNKNOWN) {\n return;\n }\n var modelTypes = [];\n if (tryCollectModelTypes(this._subType, modelTypes)) {\n var identifierAttribute_1 = undefined;\n modelTypes.forEach(function (type) {\n if (type.identifierAttribute) {\n if (identifierAttribute_1 && identifierAttribute_1 !== type.identifierAttribute) {\n throw fail$1(\"The objects in a map should all have the same identifier attribute, expected '\" + identifierAttribute_1 + \"', but child of type '\" + type.name + \"' declared attribute '\" + type.identifierAttribute + \"' as identifier\");\n }\n identifierAttribute_1 = type.identifierAttribute;\n }\n });\n if (identifierAttribute_1) {\n this.identifierMode = MapIdentifierMode.YES;\n this.mapIdentifierAttribute = identifierAttribute_1;\n }\n else {\n this.identifierMode = MapIdentifierMode.NO;\n }\n }\n }\n });\n Object.defineProperty(MapType.prototype, \"initializeChildNodes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (objNode, initialSnapshot) {\n if (initialSnapshot === void 0) { initialSnapshot = {}; }\n var subType = objNode.type._subType;\n var result = {};\n Object.keys(initialSnapshot).forEach(function (name) {\n result[name] = subType.instantiate(objNode, name, undefined, initialSnapshot[name]);\n });\n return result;\n }\n });\n Object.defineProperty(MapType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n return new MSTMap(childNodes);\n }\n });\n Object.defineProperty(MapType.prototype, \"finalizeNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, instance) {\n _interceptReads(instance, node.unbox);\n var type = node.type;\n type.hookInitializers.forEach(function (initializer) {\n var hooks = initializer(instance);\n Object.keys(hooks).forEach(function (name) {\n var hook = hooks[name];\n var actionInvoker = createActionInvoker(instance, name, hook);\n (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(instance, name, actionInvoker);\n });\n });\n intercept(instance, this.willChange);\n observe(instance, this.didChange);\n }\n });\n Object.defineProperty(MapType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"Map<string, \" + this._subType.describe() + \">\";\n }\n });\n Object.defineProperty(MapType.prototype, \"getChildren\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n // return (node.storedValue as ObservableMap<any>).values()\n return values(node.storedValue);\n }\n });\n Object.defineProperty(MapType.prototype, \"getChildNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, key) {\n var childNode = node.storedValue.get(\"\" + key);\n if (!childNode)\n throw fail$1(\"Not a child \" + key);\n return childNode;\n }\n });\n Object.defineProperty(MapType.prototype, \"willChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (change) {\n var node = getStateTreeNode(change.object);\n var key = change.name;\n node.assertWritable({ subpath: key });\n var mapType = node.type;\n var subType = mapType._subType;\n switch (change.type) {\n case \"update\":\n {\n var newValue = change.newValue;\n var oldValue = change.object.get(key);\n if (newValue === oldValue)\n return null;\n typecheckInternal(subType, newValue);\n change.newValue = subType.reconcile(node.getChildNode(key), change.newValue, node, key);\n mapType.processIdentifier(key, change.newValue);\n }\n break;\n case \"add\":\n {\n typecheckInternal(subType, change.newValue);\n change.newValue = subType.instantiate(node, key, undefined, change.newValue);\n mapType.processIdentifier(key, change.newValue);\n }\n break;\n }\n return change;\n }\n });\n Object.defineProperty(MapType.prototype, \"processIdentifier\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (expected, node) {\n if (this.identifierMode === MapIdentifierMode.YES && node instanceof ObjectNode) {\n var identifier = node.identifier;\n if (identifier !== expected)\n throw fail$1(\"A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '\" + identifier + \"', but expected: '\" + expected + \"'\");\n }\n }\n });\n Object.defineProperty(MapType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var res = {};\n node.getChildren().forEach(function (childNode) {\n res[childNode.subpath] = childNode.snapshot;\n });\n return res;\n }\n });\n Object.defineProperty(MapType.prototype, \"processInitialSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n var processed = {};\n Object.keys(childNodes).forEach(function (key) {\n processed[key] = childNodes[key].getSnapshot();\n });\n return processed;\n }\n });\n Object.defineProperty(MapType.prototype, \"didChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (change) {\n var node = getStateTreeNode(change.object);\n switch (change.type) {\n case \"update\":\n return void node.emitPatch({\n op: \"replace\",\n path: escapeJsonPath(change.name),\n value: change.newValue.snapshot,\n oldValue: change.oldValue ? change.oldValue.snapshot : undefined\n }, node);\n case \"add\":\n return void node.emitPatch({\n op: \"add\",\n path: escapeJsonPath(change.name),\n value: change.newValue.snapshot,\n oldValue: undefined\n }, node);\n case \"delete\":\n // a node got deleted, get the old snapshot and make the node die\n var oldSnapshot = change.oldValue.snapshot;\n change.oldValue.die();\n // emit the patch\n return void node.emitPatch({\n op: \"remove\",\n path: escapeJsonPath(change.name),\n oldValue: oldSnapshot\n }, node);\n }\n }\n });\n Object.defineProperty(MapType.prototype, \"applyPatchLocally\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath, patch) {\n var target = node.storedValue;\n switch (patch.op) {\n case \"add\":\n case \"replace\":\n target.set(subpath, patch.value);\n break;\n case \"remove\":\n target.delete(subpath);\n break;\n }\n }\n });\n Object.defineProperty(MapType.prototype, \"applySnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, snapshot) {\n typecheckInternal(this, snapshot);\n var target = node.storedValue;\n var currentKeys = {};\n Array.from(target.keys()).forEach(function (key) {\n currentKeys[key] = false;\n });\n if (snapshot) {\n // Don't use target.replace, as it will throw away all existing items first\n for (var key in snapshot) {\n target.set(key, snapshot[key]);\n currentKeys[\"\" + key] = true;\n }\n }\n Object.keys(currentKeys).forEach(function (key) {\n if (currentKeys[key] === false)\n target.delete(key);\n });\n }\n });\n Object.defineProperty(MapType.prototype, \"getChildType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subType;\n }\n });\n Object.defineProperty(MapType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var _this = this;\n if (!isPlainObject(value)) {\n return typeCheckFailure(context, value, \"Value is not a plain object\");\n }\n return flattenTypeErrors(Object.keys(value).map(function (path) {\n return _this._subType.validate(value[path], getContextForPath(context, path, _this._subType));\n }));\n }\n });\n Object.defineProperty(MapType.prototype, \"getDefaultSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return EMPTY_OBJECT;\n }\n });\n Object.defineProperty(MapType.prototype, \"removeChild\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath) {\n node.storedValue.delete(subpath);\n }\n });\n return MapType;\n}(ComplexType));\nMapType.prototype.applySnapshot = action(MapType.prototype.applySnapshot);\n/**\n * `types.map` - Creates a key based collection type who's children are all of a uniform declared type.\n * If the type stored in a map has an identifier, it is mandatory to store the child under that identifier in the map.\n *\n * This type will always produce [observable maps](https://mobx.js.org/refguide/map.html)\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * id: types.identifier,\n * task: types.string\n * })\n *\n * const TodoStore = types.model({\n * todos: types.map(Todo)\n * })\n *\n * const s = TodoStore.create({ todos: {} })\n * unprotect(s)\n * s.todos.set(17, { task: \"Grab coffee\", id: 17 })\n * s.todos.put({ task: \"Grab cookie\", id: 18 }) // put will infer key from the identifier\n * console.log(s.todos.get(17).task) // prints: \"Grab coffee\"\n * ```\n *\n * @param subtype\n * @returns\n */\nfunction map(subtype) {\n return new MapType(\"map<string, \" + subtype.name + \">\", subtype);\n}\n/**\n * Returns if a given value represents a map type.\n *\n * @param type\n * @returns `true` if it is a map type.\n */\nfunction isMapType(type) {\n return isType(type) && (type.flags & TypeFlags.Map) > 0;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar ArrayType = /** @class */ (function (_super) {\n __extends(ArrayType, _super);\n function ArrayType(name, _subType, hookInitializers) {\n if (hookInitializers === void 0) { hookInitializers = []; }\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_subType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subType\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Array\n });\n Object.defineProperty(_this, \"hookInitializers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n _this.hookInitializers = hookInitializers;\n return _this;\n }\n Object.defineProperty(ArrayType.prototype, \"hooks\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (hooks) {\n var hookInitializers = this.hookInitializers.length > 0 ? this.hookInitializers.concat(hooks) : [hooks];\n return new ArrayType(this.name, this._subType, hookInitializers);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n return createObjectNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"initializeChildNodes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (objNode, snapshot) {\n if (snapshot === void 0) { snapshot = []; }\n var subType = objNode.type._subType;\n var result = {};\n snapshot.forEach(function (item, index) {\n var subpath = \"\" + index;\n result[subpath] = subType.instantiate(objNode, subpath, undefined, item);\n });\n return result;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n return observable.array(convertChildNodesToArray(childNodes), mobxShallow);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"finalizeNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, instance) {\n _getAdministration(instance).dehancer = node.unbox;\n var type = node.type;\n type.hookInitializers.forEach(function (initializer) {\n var hooks = initializer(instance);\n Object.keys(hooks).forEach(function (name) {\n var hook = hooks[name];\n var actionInvoker = createActionInvoker(instance, name, hook);\n (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(instance, name, actionInvoker);\n });\n });\n intercept(instance, this.willChange);\n observe(instance, this.didChange);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subType.describe() + \"[]\";\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getChildren\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return node.storedValue.slice();\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getChildNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, key) {\n var index = Number(key);\n if (index < node.storedValue.length)\n return node.storedValue[index];\n throw fail$1(\"Not a child: \" + key);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"willChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (change) {\n var node = getStateTreeNode(change.object);\n node.assertWritable({ subpath: \"\" + change.index });\n var subType = node.type._subType;\n var childNodes = node.getChildren();\n switch (change.type) {\n case \"update\":\n {\n if (change.newValue === change.object[change.index])\n return null;\n var updatedNodes = reconcileArrayChildren(node, subType, [childNodes[change.index]], [change.newValue], [change.index]);\n if (!updatedNodes) {\n return null;\n }\n change.newValue = updatedNodes[0];\n }\n break;\n case \"splice\":\n {\n var index_1 = change.index, removedCount = change.removedCount, added = change.added;\n var addedNodes = reconcileArrayChildren(node, subType, childNodes.slice(index_1, index_1 + removedCount), added, added.map(function (_, i) { return index_1 + i; }));\n if (!addedNodes) {\n return null;\n }\n change.added = addedNodes;\n // update paths of remaining items\n for (var i = index_1 + removedCount; i < childNodes.length; i++) {\n childNodes[i].setParent(node, \"\" + (i + added.length - removedCount));\n }\n }\n break;\n }\n return change;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return node.getChildren().map(function (childNode) { return childNode.snapshot; });\n }\n });\n Object.defineProperty(ArrayType.prototype, \"processInitialSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n var processed = [];\n Object.keys(childNodes).forEach(function (key) {\n processed.push(childNodes[key].getSnapshot());\n });\n return processed;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"didChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (change) {\n var node = getStateTreeNode(change.object);\n switch (change.type) {\n case \"update\":\n return void node.emitPatch({\n op: \"replace\",\n path: \"\" + change.index,\n value: change.newValue.snapshot,\n oldValue: change.oldValue ? change.oldValue.snapshot : undefined\n }, node);\n case \"splice\":\n for (var i = change.removedCount - 1; i >= 0; i--)\n node.emitPatch({\n op: \"remove\",\n path: \"\" + (change.index + i),\n oldValue: change.removed[i].snapshot\n }, node);\n for (var i = 0; i < change.addedCount; i++)\n node.emitPatch({\n op: \"add\",\n path: \"\" + (change.index + i),\n value: node.getChildNode(\"\" + (change.index + i)).snapshot,\n oldValue: undefined\n }, node);\n return;\n }\n }\n });\n Object.defineProperty(ArrayType.prototype, \"applyPatchLocally\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath, patch) {\n var target = node.storedValue;\n var index = subpath === \"-\" ? target.length : Number(subpath);\n switch (patch.op) {\n case \"replace\":\n target[index] = patch.value;\n break;\n case \"add\":\n target.splice(index, 0, patch.value);\n break;\n case \"remove\":\n target.splice(index, 1);\n break;\n }\n }\n });\n Object.defineProperty(ArrayType.prototype, \"applySnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, snapshot) {\n typecheckInternal(this, snapshot);\n var target = node.storedValue;\n target.replace(snapshot);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getChildType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subType;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var _this = this;\n if (!isArray(value)) {\n return typeCheckFailure(context, value, \"Value is not an array\");\n }\n return flattenTypeErrors(value.map(function (item, index) {\n return _this._subType.validate(item, getContextForPath(context, \"\" + index, _this._subType));\n }));\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getDefaultSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return EMPTY_ARRAY;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"removeChild\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath) {\n node.storedValue.splice(Number(subpath), 1);\n }\n });\n return ArrayType;\n}(ComplexType));\nArrayType.prototype.applySnapshot = action(ArrayType.prototype.applySnapshot);\n/**\n * `types.array` - Creates an index based collection type who's children are all of a uniform declared type.\n *\n * This type will always produce [observable arrays](https://mobx.js.org/refguide/array.html)\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * task: types.string\n * })\n *\n * const TodoStore = types.model({\n * todos: types.array(Todo)\n * })\n *\n * const s = TodoStore.create({ todos: [] })\n * unprotect(s) // needed to allow modifying outside of an action\n * s.todos.push({ task: \"Grab coffee\" })\n * console.log(s.todos[0]) // prints: \"Grab coffee\"\n * ```\n *\n * @param subtype\n * @returns\n */\nfunction array(subtype) {\n assertIsType(subtype, 1);\n return new ArrayType(subtype.name + \"[]\", subtype);\n}\nfunction reconcileArrayChildren(parent, childType, oldNodes, newValues, newPaths) {\n var nothingChanged = true;\n for (var i = 0;; i++) {\n var hasNewNode = i <= newValues.length - 1;\n var oldNode = oldNodes[i];\n var newValue = hasNewNode ? newValues[i] : undefined;\n var newPath = \"\" + newPaths[i];\n // for some reason, instead of newValue we got a node, fallback to the storedValue\n // TODO: https://github.com/mobxjs/mobx-state-tree/issues/340#issuecomment-325581681\n if (isNode(newValue))\n newValue = newValue.storedValue;\n if (!oldNode && !hasNewNode) {\n // both are empty, end\n break;\n }\n else if (!hasNewNode) {\n // new one does not exists\n nothingChanged = false;\n oldNodes.splice(i, 1);\n if (oldNode instanceof ObjectNode) {\n // since it is going to be returned by pop/splice/shift better create it before killing it\n // so it doesn't end up in an undead state\n oldNode.createObservableInstanceIfNeeded();\n }\n oldNode.die();\n i--;\n }\n else if (!oldNode) {\n // there is no old node, create it\n // check if already belongs to the same parent. if so, avoid pushing item in. only swapping can occur.\n if (isStateTreeNode(newValue) && getStateTreeNode(newValue).parent === parent) {\n // this node is owned by this parent, but not in the reconcilable set, so it must be double\n throw fail$1(\"Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '\" + parent.path + \"/\" + newPath + \"', but it lives already at '\" + getStateTreeNode(newValue).path + \"'\");\n }\n nothingChanged = false;\n var newNode = valueAsNode(childType, parent, newPath, newValue);\n oldNodes.splice(i, 0, newNode);\n }\n else if (areSame(oldNode, newValue)) {\n // both are the same, reconcile\n oldNodes[i] = valueAsNode(childType, parent, newPath, newValue, oldNode);\n }\n else {\n // nothing to do, try to reorder\n var oldMatch = undefined;\n // find a possible candidate to reuse\n for (var j = i; j < oldNodes.length; j++) {\n if (areSame(oldNodes[j], newValue)) {\n oldMatch = oldNodes.splice(j, 1)[0];\n break;\n }\n }\n nothingChanged = false;\n var newNode = valueAsNode(childType, parent, newPath, newValue, oldMatch);\n oldNodes.splice(i, 0, newNode);\n }\n }\n return nothingChanged ? null : oldNodes;\n}\n/**\n * Convert a value to a node at given parent and subpath. Attempts to reuse old node if possible and given.\n */\nfunction valueAsNode(childType, parent, subpath, newValue, oldNode) {\n // ensure the value is valid-ish\n typecheckInternal(childType, newValue);\n function getNewNode() {\n // the new value has a MST node\n if (isStateTreeNode(newValue)) {\n var childNode = getStateTreeNode(newValue);\n childNode.assertAlive(EMPTY_OBJECT);\n // the node lives here\n if (childNode.parent !== null && childNode.parent === parent) {\n childNode.setParent(parent, subpath);\n return childNode;\n }\n }\n // there is old node and new one is a value/snapshot\n if (oldNode) {\n return childType.reconcile(oldNode, newValue, parent, subpath);\n }\n // nothing to do, create from scratch\n return childType.instantiate(parent, subpath, undefined, newValue);\n }\n var newNode = getNewNode();\n if (oldNode && oldNode !== newNode) {\n if (oldNode instanceof ObjectNode) {\n // since it is going to be returned by pop/splice/shift better create it before killing it\n // so it doesn't end up in an undead state\n oldNode.createObservableInstanceIfNeeded();\n }\n oldNode.die();\n }\n return newNode;\n}\n/**\n * Check if a node holds a value.\n */\nfunction areSame(oldNode, newValue) {\n // never consider dead old nodes for reconciliation\n if (!oldNode.isAlive) {\n return false;\n }\n // the new value has the same node\n if (isStateTreeNode(newValue)) {\n var newNode = getStateTreeNode(newValue);\n return newNode.isAlive && newNode === oldNode;\n }\n // the provided value is the snapshot of the old node\n if (oldNode.snapshot === newValue) {\n return true;\n }\n // new value is a snapshot with the correct identifier\n return (oldNode instanceof ObjectNode &&\n oldNode.identifier !== null &&\n oldNode.identifierAttribute &&\n isPlainObject(newValue) &&\n oldNode.identifier === normalizeIdentifier(newValue[oldNode.identifierAttribute]) &&\n oldNode.type.is(newValue));\n}\n/**\n * Returns if a given value represents an array type.\n *\n * @param type\n * @returns `true` if the type is an array type.\n */\nfunction isArrayType(type) {\n return isType(type) && (type.flags & TypeFlags.Array) > 0;\n}\n\nvar PRE_PROCESS_SNAPSHOT = \"preProcessSnapshot\";\nvar POST_PROCESS_SNAPSHOT = \"postProcessSnapshot\";\nfunction objectTypeToString() {\n return getStateTreeNode(this).toString();\n}\nvar defaultObjectOptions = {\n name: \"AnonymousModel\",\n properties: {},\n initializers: EMPTY_ARRAY\n};\nfunction toPropertiesObject(declaredProps) {\n // loop through properties and ensures that all items are types\n return Object.keys(declaredProps).reduce(function (props, key) {\n var _a, _b, _c;\n // warn if user intended a HOOK\n if (key in Hook)\n throw fail$1(\"Hook '\" + key + \"' was defined as property. Hooks should be defined as part of the actions\");\n // the user intended to use a view\n var descriptor = Object.getOwnPropertyDescriptor(props, key);\n if (\"get\" in descriptor) {\n throw fail$1(\"Getters are not supported as properties. Please use views instead\");\n }\n // undefined and null are not valid\n var value = descriptor.value;\n if (value === null || value === undefined) {\n throw fail$1(\"The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?\");\n // its a primitive, convert to its type\n }\n else if (isPrimitive(value)) {\n return Object.assign({}, props, (_a = {},\n _a[key] = optional(getPrimitiveFactoryFromValue(value), value),\n _a));\n // map defaults to empty object automatically for models\n }\n else if (value instanceof MapType) {\n return Object.assign({}, props, (_b = {},\n _b[key] = optional(value, {}),\n _b));\n }\n else if (value instanceof ArrayType) {\n return Object.assign({}, props, (_c = {}, _c[key] = optional(value, []), _c));\n // its already a type\n }\n else if (isType(value)) {\n return props;\n // its a function, maybe the user wanted a view?\n }\n else if (devMode() && typeof value === \"function\") {\n throw fail$1(\"Invalid type definition for property '\" + key + \"', it looks like you passed a function. Did you forget to invoke it, or did you intend to declare a view / action?\");\n // no other complex values\n }\n else if (devMode() && typeof value === \"object\") {\n throw fail$1(\"Invalid type definition for property '\" + key + \"', it looks like you passed an object. Try passing another model type or a types.frozen.\");\n // WTF did you pass in mate?\n }\n else {\n throw fail$1(\"Invalid type definition for property '\" + key + \"', cannot infer a type from a value like '\" + value + \"' (\" + typeof value + \")\");\n }\n }, declaredProps);\n}\n/**\n * @internal\n * @hidden\n */\nvar ModelType = /** @class */ (function (_super) {\n __extends(ModelType, _super);\n function ModelType(opts) {\n var _this = _super.call(this, opts.name || defaultObjectOptions.name) || this;\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Object\n });\n /*\n * The original object definition\n */\n Object.defineProperty(_this, \"initializers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"properties\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"preProcessor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"postProcessor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"propertyNames\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"named\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (name) {\n return _this.cloneAndEnhance({ name: name });\n }\n });\n Object.defineProperty(_this, \"props\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (properties) {\n return _this.cloneAndEnhance({ properties: properties });\n }\n });\n Object.defineProperty(_this, \"preProcessSnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (preProcessor) {\n var currentPreprocessor = _this.preProcessor;\n if (!currentPreprocessor)\n return _this.cloneAndEnhance({ preProcessor: preProcessor });\n else\n return _this.cloneAndEnhance({\n preProcessor: function (snapshot) { return currentPreprocessor(preProcessor(snapshot)); }\n });\n }\n });\n Object.defineProperty(_this, \"postProcessSnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (postProcessor) {\n var currentPostprocessor = _this.postProcessor;\n if (!currentPostprocessor)\n return _this.cloneAndEnhance({ postProcessor: postProcessor });\n else\n return _this.cloneAndEnhance({\n postProcessor: function (snapshot) { return postProcessor(currentPostprocessor(snapshot)); }\n });\n }\n });\n Object.assign(_this, defaultObjectOptions, opts);\n // ensures that any default value gets converted to its related type\n _this.properties = toPropertiesObject(_this.properties);\n freeze(_this.properties); // make sure nobody messes with it\n _this.propertyNames = Object.keys(_this.properties);\n _this.identifierAttribute = _this._getIdentifierAttribute();\n return _this;\n }\n Object.defineProperty(ModelType.prototype, \"_getIdentifierAttribute\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var identifierAttribute = undefined;\n this.forAllProps(function (propName, propType) {\n if (propType.flags & TypeFlags.Identifier) {\n if (identifierAttribute)\n throw fail$1(\"Cannot define property '\" + propName + \"' as object identifier, property '\" + identifierAttribute + \"' is already defined as identifier property\");\n identifierAttribute = propName;\n }\n });\n return identifierAttribute;\n }\n });\n Object.defineProperty(ModelType.prototype, \"cloneAndEnhance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (opts) {\n return new ModelType({\n name: opts.name || this.name,\n properties: Object.assign({}, this.properties, opts.properties),\n initializers: this.initializers.concat(opts.initializers || []),\n preProcessor: opts.preProcessor || this.preProcessor,\n postProcessor: opts.postProcessor || this.postProcessor\n });\n }\n });\n Object.defineProperty(ModelType.prototype, \"actions\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n var actionInitializer = function (self) {\n _this.instantiateActions(self, fn(self));\n return self;\n };\n return this.cloneAndEnhance({ initializers: [actionInitializer] });\n }\n });\n Object.defineProperty(ModelType.prototype, \"instantiateActions\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (self, actions) {\n // check if return is correct\n if (!isPlainObject(actions))\n throw fail$1(\"actions initializer should return a plain object containing actions\");\n // bind actions to the object created\n Object.keys(actions).forEach(function (name) {\n // warn if preprocessor was given\n if (name === PRE_PROCESS_SNAPSHOT)\n throw fail$1(\"Cannot define action '\" + PRE_PROCESS_SNAPSHOT + \"', it should be defined using 'type.preProcessSnapshot(fn)' instead\");\n // warn if postprocessor was given\n if (name === POST_PROCESS_SNAPSHOT)\n throw fail$1(\"Cannot define action '\" + POST_PROCESS_SNAPSHOT + \"', it should be defined using 'type.postProcessSnapshot(fn)' instead\");\n var action2 = actions[name];\n // apply hook composition\n var baseAction = self[name];\n if (name in Hook && baseAction) {\n var specializedAction_1 = action2;\n action2 = function () {\n baseAction.apply(null, arguments);\n specializedAction_1.apply(null, arguments);\n };\n }\n // the goal of this is to make sure actions using \"this\" can call themselves,\n // while still allowing the middlewares to register them\n var middlewares = action2.$mst_middleware; // make sure middlewares are not lost\n var boundAction = action2.bind(actions);\n boundAction.$mst_middleware = middlewares;\n var actionInvoker = createActionInvoker(self, name, boundAction);\n actions[name] = actionInvoker;\n (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(self, name, actionInvoker);\n });\n }\n });\n Object.defineProperty(ModelType.prototype, \"volatile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n if (typeof fn !== \"function\") {\n throw fail$1(\"You passed an \" + typeof fn + \" to volatile state as an argument, when function is expected\");\n }\n var stateInitializer = function (self) {\n _this.instantiateVolatileState(self, fn(self));\n return self;\n };\n return this.cloneAndEnhance({ initializers: [stateInitializer] });\n }\n });\n Object.defineProperty(ModelType.prototype, \"instantiateVolatileState\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (self, state) {\n // check views return\n if (!isPlainObject(state))\n throw fail$1(\"volatile state initializer should return a plain object containing state\");\n set(self, state);\n }\n });\n Object.defineProperty(ModelType.prototype, \"extend\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n var initializer = function (self) {\n var _a = fn(self), actions = _a.actions, views = _a.views, state = _a.state, rest = __rest(_a, [\"actions\", \"views\", \"state\"]);\n for (var key in rest)\n throw fail$1(\"The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '\" + key + \"'\");\n if (state)\n _this.instantiateVolatileState(self, state);\n if (views)\n _this.instantiateViews(self, views);\n if (actions)\n _this.instantiateActions(self, actions);\n return self;\n };\n return this.cloneAndEnhance({ initializers: [initializer] });\n }\n });\n Object.defineProperty(ModelType.prototype, \"views\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n var viewInitializer = function (self) {\n _this.instantiateViews(self, fn(self));\n return self;\n };\n return this.cloneAndEnhance({ initializers: [viewInitializer] });\n }\n });\n Object.defineProperty(ModelType.prototype, \"instantiateViews\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (self, views) {\n // check views return\n if (!isPlainObject(views))\n throw fail$1(\"views initializer should return a plain object containing views\");\n Object.keys(views).forEach(function (key) {\n var _a;\n // is this a computed property?\n var descriptor = Object.getOwnPropertyDescriptor(views, key);\n if (\"get\" in descriptor) {\n if (isComputedProp(self, key)) {\n var computedValue = _getAdministration(self, key);\n // TODO: mobx currently does not allow redefining computes yet, pending #1121\n // FIXME: this binds to the internals of mobx!\n computedValue.derivation = descriptor.get;\n computedValue.scope = self;\n if (descriptor.set)\n computedValue.setter = action(computedValue.name + \"-setter\", descriptor.set);\n }\n else {\n Object.defineProperty(self, key, descriptor);\n makeObservable(self, (_a = {}, _a[key] = computed, _a));\n }\n }\n else if (typeof descriptor.value === \"function\") {\n (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(self, key, descriptor.value);\n }\n else {\n throw fail$1(\"A view member should either be a function or getter based property\");\n }\n });\n }\n });\n Object.defineProperty(ModelType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var value = isStateTreeNode(initialValue)\n ? initialValue\n : this.applySnapshotPreProcessor(initialValue);\n return createObjectNode(this, parent, subpath, environment, value);\n // Optimization: record all prop- view- and action names after first construction, and generate an optimal base class\n // that pre-reserves all these fields for fast object-member lookups\n }\n });\n Object.defineProperty(ModelType.prototype, \"initializeChildNodes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (objNode, initialSnapshot) {\n if (initialSnapshot === void 0) { initialSnapshot = {}; }\n var type = objNode.type;\n var result = {};\n type.forAllProps(function (name, childType) {\n result[name] = childType.instantiate(objNode, name, undefined, initialSnapshot[name]);\n });\n return result;\n }\n });\n Object.defineProperty(ModelType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n return observable.object(childNodes, EMPTY_OBJECT, mobxShallow);\n }\n });\n Object.defineProperty(ModelType.prototype, \"finalizeNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, instance) {\n addHiddenFinalProp(instance, \"toString\", objectTypeToString);\n this.forAllProps(function (name) {\n _interceptReads(instance, name, node.unbox);\n });\n this.initializers.reduce(function (self, fn) { return fn(self); }, instance);\n intercept(instance, this.willChange);\n observe(instance, this.didChange);\n }\n });\n Object.defineProperty(ModelType.prototype, \"willChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (chg) {\n // TODO: mobx typings don't seem to take into account that newValue can be set even when removing a prop\n var change = chg;\n var node = getStateTreeNode(change.object);\n var subpath = change.name;\n node.assertWritable({ subpath: subpath });\n var childType = node.type.properties[subpath];\n // only properties are typed, state are stored as-is references\n if (childType) {\n typecheckInternal(childType, change.newValue);\n change.newValue = childType.reconcile(node.getChildNode(subpath), change.newValue, node, subpath);\n }\n return change;\n }\n });\n Object.defineProperty(ModelType.prototype, \"didChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (chg) {\n // TODO: mobx typings don't seem to take into account that newValue can be set even when removing a prop\n var change = chg;\n var childNode = getStateTreeNode(change.object);\n var childType = childNode.type.properties[change.name];\n if (!childType) {\n // don't emit patches for volatile state\n return;\n }\n var oldChildValue = change.oldValue ? change.oldValue.snapshot : undefined;\n childNode.emitPatch({\n op: \"replace\",\n path: escapeJsonPath(change.name),\n value: change.newValue.snapshot,\n oldValue: oldChildValue\n }, childNode);\n }\n });\n Object.defineProperty(ModelType.prototype, \"getChildren\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var _this = this;\n var res = [];\n this.forAllProps(function (name) {\n res.push(_this.getChildNode(node, name));\n });\n return res;\n }\n });\n Object.defineProperty(ModelType.prototype, \"getChildNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, key) {\n if (!(key in this.properties))\n throw fail$1(\"Not a value property: \" + key);\n var adm = _getAdministration(node.storedValue, key);\n var childNode = adm.raw();\n if (!childNode)\n throw fail$1(\"Node not available for property \" + key);\n return childNode;\n }\n });\n Object.defineProperty(ModelType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, applyPostProcess) {\n var _this = this;\n if (applyPostProcess === void 0) { applyPostProcess = true; }\n var res = {};\n this.forAllProps(function (name, type) {\n getAtom(node.storedValue, name).reportObserved();\n res[name] = _this.getChildNode(node, name).snapshot;\n });\n if (applyPostProcess) {\n return this.applySnapshotPostProcessor(res);\n }\n return res;\n }\n });\n Object.defineProperty(ModelType.prototype, \"processInitialSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n var processed = {};\n Object.keys(childNodes).forEach(function (key) {\n processed[key] = childNodes[key].getSnapshot();\n });\n return this.applySnapshotPostProcessor(processed);\n }\n });\n Object.defineProperty(ModelType.prototype, \"applyPatchLocally\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath, patch) {\n if (!(patch.op === \"replace\" || patch.op === \"add\")) {\n throw fail$1(\"object does not support operation \" + patch.op);\n }\n node.storedValue[subpath] = patch.value;\n }\n });\n Object.defineProperty(ModelType.prototype, \"applySnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, snapshot) {\n var preProcessedSnapshot = this.applySnapshotPreProcessor(snapshot);\n typecheckInternal(this, preProcessedSnapshot);\n this.forAllProps(function (name) {\n node.storedValue[name] = preProcessedSnapshot[name];\n });\n }\n });\n Object.defineProperty(ModelType.prototype, \"applySnapshotPreProcessor\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n var processor = this.preProcessor;\n return processor ? processor.call(null, snapshot) : snapshot;\n }\n });\n Object.defineProperty(ModelType.prototype, \"applySnapshotPostProcessor\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n var postProcessor = this.postProcessor;\n if (postProcessor)\n return postProcessor.call(null, snapshot);\n return snapshot;\n }\n });\n Object.defineProperty(ModelType.prototype, \"getChildType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (propertyName) {\n assertIsString(propertyName, 1);\n return this.properties[propertyName];\n }\n });\n Object.defineProperty(ModelType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var _this = this;\n var snapshot = this.applySnapshotPreProcessor(value);\n if (!isPlainObject(snapshot)) {\n return typeCheckFailure(context, snapshot, \"Value is not a plain object\");\n }\n return flattenTypeErrors(this.propertyNames.map(function (key) {\n return _this.properties[key].validate(snapshot[key], getContextForPath(context, key, _this.properties[key]));\n }));\n }\n });\n Object.defineProperty(ModelType.prototype, \"forAllProps\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n this.propertyNames.forEach(function (key) { return fn(key, _this.properties[key]); });\n }\n });\n Object.defineProperty(ModelType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var _this = this;\n // optimization: cache\n return (\"{ \" +\n this.propertyNames\n .map(function (key) { return key + \": \" + _this.properties[key].describe(); })\n .join(\"; \") +\n \" }\");\n }\n });\n Object.defineProperty(ModelType.prototype, \"getDefaultSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return EMPTY_OBJECT;\n }\n });\n Object.defineProperty(ModelType.prototype, \"removeChild\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath) {\n node.storedValue[subpath] = undefined;\n }\n });\n return ModelType;\n}(ComplexType));\nModelType.prototype.applySnapshot = action(ModelType.prototype.applySnapshot);\n/**\n * `types.model` - Creates a new model type by providing a name, properties, volatile state and actions.\n *\n * See the [model type](/concepts/trees#creating-models) description or the [getting started](intro/getting-started.md#getting-started-1) tutorial.\n */\nfunction model() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var name = typeof args[0] === \"string\" ? args.shift() : \"AnonymousModel\";\n var properties = args.shift() || {};\n return new ModelType({ name: name, properties: properties });\n}\n/**\n * `types.compose` - Composes a new model from one or more existing model types.\n * This method can be invoked in two forms:\n * Given 2 or more model types, the types are composed into a new Type.\n * Given first parameter as a string and 2 or more model types,\n * the types are composed into a new Type with the given name\n */\nfunction compose() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // TODO: just join the base type names if no name is provided\n var hasTypename = typeof args[0] === \"string\";\n var typeName = hasTypename ? args[0] : \"AnonymousModel\";\n if (hasTypename) {\n args.shift();\n }\n // check all parameters\n if (devMode()) {\n args.forEach(function (type, i) {\n assertArg(type, isModelType, \"mobx-state-tree model type\", hasTypename ? i + 2 : i + 1);\n });\n }\n return args\n .reduce(function (prev, cur) {\n return prev.cloneAndEnhance({\n name: prev.name + \"_\" + cur.name,\n properties: cur.properties,\n initializers: cur.initializers,\n preProcessor: function (snapshot) {\n return cur.applySnapshotPreProcessor(prev.applySnapshotPreProcessor(snapshot));\n },\n postProcessor: function (snapshot) {\n return cur.applySnapshotPostProcessor(prev.applySnapshotPostProcessor(snapshot));\n }\n });\n })\n .named(typeName);\n}\n/**\n * Returns if a given value represents a model type.\n *\n * @param type\n * @returns\n */\nfunction isModelType(type) {\n return isType(type) && (type.flags & TypeFlags.Object) > 0;\n}\n\n// TODO: implement CoreType using types.custom ?\n/**\n * @internal\n * @hidden\n */\nvar CoreType = /** @class */ (function (_super) {\n __extends(CoreType, _super);\n function CoreType(name, flags, checker, initializer) {\n if (initializer === void 0) { initializer = identity; }\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: flags\n });\n Object.defineProperty(_this, \"checker\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: checker\n });\n Object.defineProperty(_this, \"initializer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: initializer\n });\n _this.flags = flags;\n return _this;\n }\n Object.defineProperty(CoreType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.name;\n }\n });\n Object.defineProperty(CoreType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n return createScalarNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(CoreType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n return this.initializer(snapshot);\n }\n });\n Object.defineProperty(CoreType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (isPrimitive(value) && this.checker(value)) {\n return typeCheckSuccess();\n }\n var typeName = this.name === \"Date\" ? \"Date or a unix milliseconds timestamp\" : this.name;\n return typeCheckFailure(context, value, \"Value is not a \" + typeName);\n }\n });\n return CoreType;\n}(SimpleType));\n/**\n * `types.string` - Creates a type that can only contain a string value.\n * This type is used for string values by default\n *\n * Example:\n * ```ts\n * const Person = types.model({\n * firstName: types.string,\n * lastName: \"Doe\"\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nvar string = new CoreType(\"string\", TypeFlags.String, function (v) { return typeof v === \"string\"; });\n/**\n * `types.number` - Creates a type that can only contain a numeric value.\n * This type is used for numeric values by default\n *\n * Example:\n * ```ts\n * const Vector = types.model({\n * x: types.number,\n * y: 1.5\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nvar number = new CoreType(\"number\", TypeFlags.Number, function (v) { return typeof v === \"number\"; });\n/**\n * `types.integer` - Creates a type that can only contain an integer value.\n * This type is used for integer values by default\n *\n * Example:\n * ```ts\n * const Size = types.model({\n * width: types.integer,\n * height: 10\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nvar integer = new CoreType(\"integer\", TypeFlags.Integer, function (v) { return isInteger(v); });\n/**\n * `types.boolean` - Creates a type that can only contain a boolean value.\n * This type is used for boolean values by default\n *\n * Example:\n * ```ts\n * const Thing = types.model({\n * isCool: types.boolean,\n * isAwesome: false\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nvar boolean = new CoreType(\"boolean\", TypeFlags.Boolean, function (v) { return typeof v === \"boolean\"; });\n/**\n * `types.null` - The type of the value `null`\n */\nvar nullType = new CoreType(\"null\", TypeFlags.Null, function (v) { return v === null; });\n/**\n * `types.undefined` - The type of the value `undefined`\n */\nvar undefinedType = new CoreType(\"undefined\", TypeFlags.Undefined, function (v) { return v === undefined; });\nvar _DatePrimitive = new CoreType(\"Date\", TypeFlags.Date, function (v) { return typeof v === \"number\" || v instanceof Date; }, function (v) { return (v instanceof Date ? v : new Date(v)); });\n_DatePrimitive.getSnapshot = function (node) {\n return node.storedValue.getTime();\n};\n/**\n * `types.Date` - Creates a type that can only contain a javascript Date value.\n *\n * Example:\n * ```ts\n * const LogLine = types.model({\n * timestamp: types.Date,\n * })\n *\n * LogLine.create({ timestamp: new Date() })\n * ```\n */\nvar DatePrimitive = _DatePrimitive;\n/**\n * @internal\n * @hidden\n */\nfunction getPrimitiveFactoryFromValue(value) {\n switch (typeof value) {\n case \"string\":\n return string;\n case \"number\":\n return number; // In the future, isInteger(value) ? integer : number would be interesting, but would be too breaking for now\n case \"boolean\":\n return boolean;\n case \"object\":\n if (value instanceof Date)\n return DatePrimitive;\n }\n throw fail$1(\"Cannot determine primitive type from value \" + value);\n}\n/**\n * Returns if a given value represents a primitive type.\n *\n * @param type\n * @returns\n */\nfunction isPrimitiveType(type) {\n return (isType(type) &&\n (type.flags &\n (TypeFlags.String |\n TypeFlags.Number |\n TypeFlags.Integer |\n TypeFlags.Boolean |\n TypeFlags.Date)) >\n 0);\n}\n\n/**\n * @internal\n * @hidden\n */\nvar Literal = /** @class */ (function (_super) {\n __extends(Literal, _super);\n function Literal(value) {\n var _this = _super.call(this, JSON.stringify(value)) || this;\n Object.defineProperty(_this, \"value\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Literal\n });\n _this.value = value;\n return _this;\n }\n Object.defineProperty(Literal.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n return createScalarNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(Literal.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return JSON.stringify(this.value);\n }\n });\n Object.defineProperty(Literal.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (isPrimitive(value) && value === this.value) {\n return typeCheckSuccess();\n }\n return typeCheckFailure(context, value, \"Value is not a literal \" + JSON.stringify(this.value));\n }\n });\n return Literal;\n}(SimpleType));\n/**\n * `types.literal` - The literal type will return a type that will match only the exact given type.\n * The given value must be a primitive, in order to be serialized to a snapshot correctly.\n * You can use literal to match exact strings for example the exact male or female string.\n *\n * Example:\n * ```ts\n * const Person = types.model({\n * name: types.string,\n * gender: types.union(types.literal('male'), types.literal('female'))\n * })\n * ```\n *\n * @param value The value to use in the strict equal check\n * @returns\n */\nfunction literal(value) {\n // check that the given value is a primitive\n assertArg(value, isPrimitive, \"primitive\", 1);\n return new Literal(value);\n}\n/**\n * Returns if a given value represents a literal type.\n *\n * @param type\n * @returns\n */\nfunction isLiteralType(type) {\n return isType(type) && (type.flags & TypeFlags.Literal) > 0;\n}\n\nvar Refinement = /** @class */ (function (_super) {\n __extends(Refinement, _super);\n function Refinement(name, _subtype, _predicate, _message) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_subtype\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subtype\n });\n Object.defineProperty(_this, \"_predicate\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _predicate\n });\n Object.defineProperty(_this, \"_message\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _message\n });\n return _this;\n }\n Object.defineProperty(Refinement.prototype, \"flags\", {\n get: function () {\n return this._subtype.flags | TypeFlags.Refinement;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Refinement.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.name;\n }\n });\n Object.defineProperty(Refinement.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n // create the child type\n return this._subtype.instantiate(parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(Refinement.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this._subtype.isAssignableFrom(type);\n }\n });\n Object.defineProperty(Refinement.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var subtypeErrors = this._subtype.validate(value, context);\n if (subtypeErrors.length > 0)\n return subtypeErrors;\n var snapshot = isStateTreeNode(value) ? getStateTreeNode(value).snapshot : value;\n if (!this._predicate(snapshot)) {\n return typeCheckFailure(context, value, this._message(value));\n }\n return typeCheckSuccess();\n }\n });\n Object.defineProperty(Refinement.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n return this._subtype.reconcile(current, newValue, parent, subpath);\n }\n });\n Object.defineProperty(Refinement.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subtype;\n }\n });\n return Refinement;\n}(BaseType));\n/**\n * `types.refinement` - Creates a type that is more specific than the base type, e.g. `types.refinement(types.string, value => value.length > 5)` to create a type of strings that can only be longer then 5.\n *\n * @param name\n * @param type\n * @param predicate\n * @returns\n */\nfunction refinement() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var name = typeof args[0] === \"string\" ? args.shift() : isType(args[0]) ? args[0].name : null;\n var type = args[0];\n var predicate = args[1];\n var message = args[2]\n ? args[2]\n : function (v) { return \"Value does not respect the refinement predicate\"; };\n // ensures all parameters are correct\n assertIsType(type, [1, 2]);\n assertIsString(name, 1);\n assertIsFunction(predicate, [2, 3]);\n assertIsFunction(message, [3, 4]);\n return new Refinement(name, type, predicate, message);\n}\n/**\n * Returns if a given value is a refinement type.\n *\n * @param type\n * @returns\n */\nfunction isRefinementType(type) {\n return (type.flags & TypeFlags.Refinement) > 0;\n}\n\n/**\n * `types.enumeration` - Can be used to create an string based enumeration.\n * (note: this methods is just sugar for a union of string literals)\n *\n * Example:\n * ```ts\n * const TrafficLight = types.model({\n * color: types.enumeration(\"Color\", [\"Red\", \"Orange\", \"Green\"])\n * })\n * ```\n *\n * @param name descriptive name of the enumeration (optional)\n * @param options possible values this enumeration can have\n * @returns\n */\nfunction enumeration(name, options) {\n var realOptions = typeof name === \"string\" ? options : name;\n // check all options\n if (devMode()) {\n realOptions.forEach(function (option, i) {\n assertIsString(option, i + 1);\n });\n }\n var type = union.apply(void 0, __spread(realOptions.map(function (option) { return literal(\"\" + option); })));\n if (typeof name === \"string\")\n type.name = name;\n return type;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar Union = /** @class */ (function (_super) {\n __extends(Union, _super);\n function Union(name, _types, options) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_types\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _types\n });\n Object.defineProperty(_this, \"_dispatcher\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_eager\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n options = __assign({ eager: true, dispatcher: undefined }, options);\n _this._dispatcher = options.dispatcher;\n if (!options.eager)\n _this._eager = false;\n return _this;\n }\n Object.defineProperty(Union.prototype, \"flags\", {\n get: function () {\n var result = TypeFlags.Union;\n this._types.forEach(function (type) {\n result |= type.flags;\n });\n return result;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Union.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this._types.some(function (subType) { return subType.isAssignableFrom(type); });\n }\n });\n Object.defineProperty(Union.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"(\" + this._types.map(function (factory) { return factory.describe(); }).join(\" | \") + \")\";\n }\n });\n Object.defineProperty(Union.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var type = this.determineType(initialValue, undefined);\n if (!type)\n throw fail$1(\"No matching type for union \" + this.describe()); // can happen in prod builds\n return type.instantiate(parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(Union.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n var type = this.determineType(newValue, current.type);\n if (!type)\n throw fail$1(\"No matching type for union \" + this.describe()); // can happen in prod builds\n return type.reconcile(current, newValue, parent, subpath);\n }\n });\n Object.defineProperty(Union.prototype, \"determineType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, reconcileCurrentType) {\n // try the dispatcher, if defined\n if (this._dispatcher) {\n return this._dispatcher(value);\n }\n // find the most accomodating type\n // if we are using reconciliation try the current node type first (fix for #1045)\n if (reconcileCurrentType) {\n if (reconcileCurrentType.is(value)) {\n return reconcileCurrentType;\n }\n return this._types\n .filter(function (t) { return t !== reconcileCurrentType; })\n .find(function (type) { return type.is(value); });\n }\n else {\n return this._types.find(function (type) { return type.is(value); });\n }\n }\n });\n Object.defineProperty(Union.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (this._dispatcher) {\n return this._dispatcher(value).validate(value, context);\n }\n var allErrors = [];\n var applicableTypes = 0;\n for (var i = 0; i < this._types.length; i++) {\n var type = this._types[i];\n var errors = type.validate(value, context);\n if (errors.length === 0) {\n if (this._eager)\n return typeCheckSuccess();\n else\n applicableTypes++;\n }\n else {\n allErrors.push(errors);\n }\n }\n if (applicableTypes === 1)\n return typeCheckSuccess();\n return typeCheckFailure(context, value, \"No type is applicable for the union\").concat(flattenTypeErrors(allErrors));\n }\n });\n Object.defineProperty(Union.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._types;\n }\n });\n return Union;\n}(BaseType));\n/**\n * `types.union` - Create a union of multiple types. If the correct type cannot be inferred unambiguously from a snapshot, provide a dispatcher function of the form `(snapshot) => Type`.\n *\n * @param optionsOrType\n * @param otherTypes\n * @returns\n */\nfunction union(optionsOrType) {\n var otherTypes = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherTypes[_i - 1] = arguments[_i];\n }\n var options = isType(optionsOrType) ? undefined : optionsOrType;\n var types = isType(optionsOrType) ? __spread([optionsOrType], otherTypes) : otherTypes;\n var name = \"(\" + types.map(function (type) { return type.name; }).join(\" | \") + \")\";\n // check all options\n if (devMode()) {\n if (options) {\n assertArg(options, function (o) { return isPlainObject(o); }, \"object { eager?: boolean, dispatcher?: Function }\", 1);\n }\n types.forEach(function (type, i) {\n assertIsType(type, options ? i + 2 : i + 1);\n });\n }\n return new Union(name, types, options);\n}\n/**\n * Returns if a given value represents a union type.\n *\n * @param type\n * @returns\n */\nfunction isUnionType(type) {\n return (type.flags & TypeFlags.Union) > 0;\n}\n\n/**\n * @hidden\n * @internal\n */\nvar OptionalValue = /** @class */ (function (_super) {\n __extends(OptionalValue, _super);\n function OptionalValue(_subtype, _defaultValue, optionalValues) {\n var _this = _super.call(this, _subtype.name) || this;\n Object.defineProperty(_this, \"_subtype\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subtype\n });\n Object.defineProperty(_this, \"_defaultValue\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _defaultValue\n });\n Object.defineProperty(_this, \"optionalValues\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: optionalValues\n });\n return _this;\n }\n Object.defineProperty(OptionalValue.prototype, \"flags\", {\n get: function () {\n return this._subtype.flags | TypeFlags.Optional;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(OptionalValue.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subtype.describe() + \"?\";\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n if (this.optionalValues.indexOf(initialValue) >= 0) {\n var defaultInstanceOrSnapshot = this.getDefaultInstanceOrSnapshot();\n return this._subtype.instantiate(parent, subpath, environment, defaultInstanceOrSnapshot);\n }\n return this._subtype.instantiate(parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n return this._subtype.reconcile(current, this.optionalValues.indexOf(newValue) < 0 && this._subtype.is(newValue)\n ? newValue\n : this.getDefaultInstanceOrSnapshot(), parent, subpath);\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"getDefaultInstanceOrSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var defaultInstanceOrSnapshot = typeof this._defaultValue === \"function\"\n ? this._defaultValue()\n : this._defaultValue;\n // while static values are already snapshots and checked on types.optional\n // generator functions must always be rechecked just in case\n if (typeof this._defaultValue === \"function\") {\n typecheckInternal(this, defaultInstanceOrSnapshot);\n }\n return defaultInstanceOrSnapshot;\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n // defaulted values can be skipped\n if (this.optionalValues.indexOf(value) >= 0) {\n return typeCheckSuccess();\n }\n // bounce validation to the sub-type\n return this._subtype.validate(value, context);\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this._subtype.isAssignableFrom(type);\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subtype;\n }\n });\n return OptionalValue;\n}(BaseType));\nfunction checkOptionalPreconditions(type, defaultValueOrFunction) {\n // make sure we never pass direct instances\n if (typeof defaultValueOrFunction !== \"function\" && isStateTreeNode(defaultValueOrFunction)) {\n throw fail$1(\"default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead\");\n }\n assertIsType(type, 1);\n if (devMode()) {\n // we only check default values if they are passed directly\n // if they are generator functions they will be checked once they are generated\n // we don't check generator function results here to avoid generating a node just for type-checking purposes\n // which might generate side-effects\n if (typeof defaultValueOrFunction !== \"function\") {\n typecheckInternal(type, defaultValueOrFunction);\n }\n }\n}\n/**\n * `types.optional` - Can be used to create a property with a default value.\n *\n * Depending on the third argument (`optionalValues`) there are two ways of operation:\n * - If the argument is not provided, then if a value is not provided in the snapshot (`undefined` or missing),\n * it will default to the provided `defaultValue`\n * - If the argument is provided, then if the value in the snapshot matches one of the optional values inside the array then it will\n * default to the provided `defaultValue`. Additionally, if one of the optional values inside the array is `undefined` then a missing\n * property is also valid.\n *\n * Note that it is also possible to include values of the same type as the intended subtype as optional values,\n * in this case the optional value will be transformed into the `defaultValue` (e.g. `types.optional(types.string, \"unnamed\", [undefined, \"\"])`\n * will transform the snapshot values `undefined` (and therefore missing) and empty strings into the string `\"unnamed\"` when it gets\n * instantiated).\n *\n * If `defaultValue` is a function, the function will be invoked for every new instance.\n * Applying a snapshot in which the optional value is one of the optional values (or `undefined`/_not_ present if none are provided) causes the\n * value to be reset.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * title: types.string,\n * subtitle1: types.optional(types.string, \"\", [null]),\n * subtitle2: types.optional(types.string, \"\", [null, undefined]),\n * done: types.optional(types.boolean, false),\n * created: types.optional(types.Date, () => new Date()),\n * })\n *\n * // if done is missing / undefined it will become false\n * // if created is missing / undefined it will get a freshly generated timestamp\n * // if subtitle1 is null it will default to \"\", but it cannot be missing or undefined\n * // if subtitle2 is null or undefined it will default to \"\"; since it can be undefined it can also be missing\n * const todo = Todo.create({ title: \"Get coffee\", subtitle1: null })\n * ```\n *\n * @param type\n * @param defaultValueOrFunction\n * @param optionalValues an optional array with zero or more primitive values (string, number, boolean, null or undefined)\n * that will be converted into the default. `[ undefined ]` is assumed when none is provided\n * @returns\n */\nfunction optional(type, defaultValueOrFunction, optionalValues) {\n checkOptionalPreconditions(type, defaultValueOrFunction);\n return new OptionalValue(type, defaultValueOrFunction, optionalValues ? optionalValues : undefinedAsOptionalValues);\n}\nvar undefinedAsOptionalValues = [undefined];\n/**\n * Returns if a value represents an optional type.\n *\n * @template IT\n * @param type\n * @returns\n */\nfunction isOptionalType(type) {\n return isType(type) && (type.flags & TypeFlags.Optional) > 0;\n}\n\nvar optionalUndefinedType = optional(undefinedType, undefined);\nvar optionalNullType = optional(nullType, null);\n/**\n * `types.maybe` - Maybe will make a type nullable, and also optional.\n * The value `undefined` will be used to represent nullability.\n *\n * @param type\n * @returns\n */\nfunction maybe(type) {\n assertIsType(type, 1);\n return union(type, optionalUndefinedType);\n}\n/**\n * `types.maybeNull` - Maybe will make a type nullable, and also optional.\n * The value `null` will be used to represent no value.\n *\n * @param type\n * @returns\n */\nfunction maybeNull(type) {\n assertIsType(type, 1);\n return union(type, optionalNullType);\n}\n\nvar Late = /** @class */ (function (_super) {\n __extends(Late, _super);\n function Late(name, _definition) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_definition\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _definition\n });\n Object.defineProperty(_this, \"_subType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n return _this;\n }\n Object.defineProperty(Late.prototype, \"flags\", {\n get: function () {\n return (this._subType ? this._subType.flags : 0) | TypeFlags.Late;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Late.prototype, \"getSubType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (mustSucceed) {\n if (!this._subType) {\n var t = undefined;\n try {\n t = this._definition();\n }\n catch (e) {\n if (e instanceof ReferenceError)\n // can happen in strict ES5 code when a definition is self refering\n t = undefined;\n else\n throw e;\n }\n if (mustSucceed && t === undefined)\n throw fail$1(\"Late type seems to be used too early, the definition (still) returns undefined\");\n if (t) {\n if (devMode() && !isType(t))\n throw fail$1(\"Failed to determine subtype, make sure types.late returns a type definition.\");\n this._subType = t;\n }\n }\n return this._subType;\n }\n });\n Object.defineProperty(Late.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n return this.getSubType(true).instantiate(parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(Late.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n return this.getSubType(true).reconcile(current, newValue, parent, subpath);\n }\n });\n Object.defineProperty(Late.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var t = this.getSubType(false);\n return t ? t.name : \"<uknown late type>\";\n }\n });\n Object.defineProperty(Late.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var t = this.getSubType(false);\n if (!t) {\n // See #916; the variable the definition closure is pointing to wasn't defined yet, so can't be evaluted yet here\n return typeCheckSuccess();\n }\n return t.validate(value, context);\n }\n });\n Object.defineProperty(Late.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n var t = this.getSubType(false);\n return t ? t.isAssignableFrom(type) : false;\n }\n });\n Object.defineProperty(Late.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var subtype = this.getSubType(false);\n return subtype ? subtype : cannotDetermineSubtype;\n }\n });\n return Late;\n}(BaseType));\n/**\n * `types.late` - Defines a type that gets implemented later. This is useful when you have to deal with circular dependencies.\n * Please notice that when defining circular dependencies TypeScript isn't smart enough to inference them.\n *\n * Example:\n * ```ts\n * // TypeScript isn't smart enough to infer self referencing types.\n * const Node = types.model({\n * children: types.array(types.late((): IAnyModelType => Node)) // then typecast each array element to Instance<typeof Node>\n * })\n * ```\n *\n * @param name The name to use for the type that will be returned.\n * @param type A function that returns the type that will be defined.\n * @returns\n */\nfunction late(nameOrType, maybeType) {\n var name = typeof nameOrType === \"string\" ? nameOrType : \"late(\" + nameOrType.toString() + \")\";\n var type = typeof nameOrType === \"string\" ? maybeType : nameOrType;\n // checks that the type is actually a late type\n if (devMode()) {\n if (!(typeof type === \"function\" && type.length === 0))\n throw fail$1(\"Invalid late type, expected a function with zero arguments that returns a type, got: \" +\n type);\n }\n return new Late(name, type);\n}\n/**\n * Returns if a given value represents a late type.\n *\n * @param type\n * @returns\n */\nfunction isLateType(type) {\n return isType(type) && (type.flags & TypeFlags.Late) > 0;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar Frozen = /** @class */ (function (_super) {\n __extends(Frozen, _super);\n function Frozen(subType) {\n var _this = _super.call(this, subType ? \"frozen(\" + subType.name + \")\" : \"frozen\") || this;\n Object.defineProperty(_this, \"subType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: subType\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Frozen\n });\n return _this;\n }\n Object.defineProperty(Frozen.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"<any immutable value>\";\n }\n });\n Object.defineProperty(Frozen.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, value) {\n // create the node\n return createScalarNode(this, parent, subpath, environment, deepFreeze(value));\n }\n });\n Object.defineProperty(Frozen.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (!isSerializable(value)) {\n return typeCheckFailure(context, value, \"Value is not serializable and cannot be frozen\");\n }\n if (this.subType)\n return this.subType.validate(value, context);\n return typeCheckSuccess();\n }\n });\n return Frozen;\n}(SimpleType));\nvar untypedFrozenInstance = new Frozen();\n/**\n * `types.frozen` - Frozen can be used to store any value that is serializable in itself (that is valid JSON).\n * Frozen values need to be immutable or treated as if immutable. They need be serializable as well.\n * Values stored in frozen will snapshotted as-is by MST, and internal changes will not be tracked.\n *\n * This is useful to store complex, but immutable values like vectors etc. It can form a powerful bridge to parts of your application that should be immutable, or that assume data to be immutable.\n *\n * Note: if you want to store free-form state that is mutable, or not serializeable, consider using volatile state instead.\n *\n * Frozen properties can be defined in three different ways\n * 1. `types.frozen(SubType)` - provide a valid MST type and frozen will check if the provided data conforms the snapshot for that type\n * 2. `types.frozen({ someDefaultValue: true})` - provide a primitive value, object or array, and MST will infer the type from that object, and also make it the default value for the field\n * 3. `types.frozen<TypeScriptType>()` - provide a typescript type, to help in strongly typing the field (design time only)\n *\n * Example:\n * ```ts\n * const GameCharacter = types.model({\n * name: string,\n * location: types.frozen({ x: 0, y: 0})\n * })\n *\n * const hero = GameCharacter.create({\n * name: \"Mario\",\n * location: { x: 7, y: 4 }\n * })\n *\n * hero.location = { x: 10, y: 2 } // OK\n * hero.location.x = 7 // Not ok!\n * ```\n *\n * ```ts\n * type Point = { x: number, y: number }\n * const Mouse = types.model({\n * loc: types.frozen<Point>()\n * })\n * ```\n *\n * @param defaultValueOrType\n * @returns\n */\nfunction frozen(arg) {\n if (arguments.length === 0)\n return untypedFrozenInstance;\n else if (isType(arg))\n return new Frozen(arg);\n else\n return optional(untypedFrozenInstance, arg);\n}\n/**\n * Returns if a given value represents a frozen type.\n *\n * @param type\n * @returns\n */\nfunction isFrozenType(type) {\n return isType(type) && (type.flags & TypeFlags.Frozen) > 0;\n}\n\nfunction getInvalidationCause(hook) {\n switch (hook) {\n case Hook.beforeDestroy:\n return \"destroy\";\n case Hook.beforeDetach:\n return \"detach\";\n default:\n return undefined;\n }\n}\nvar StoredReference = /** @class */ (function () {\n function StoredReference(value, targetType) {\n Object.defineProperty(this, \"targetType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: targetType\n });\n Object.defineProperty(this, \"identifier\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"node\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"resolvedReference\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n if (isValidIdentifier(value)) {\n this.identifier = value;\n }\n else if (isStateTreeNode(value)) {\n var targetNode = getStateTreeNode(value);\n if (!targetNode.identifierAttribute)\n throw fail$1(\"Can only store references with a defined identifier attribute.\");\n var id = targetNode.unnormalizedIdentifier;\n if (id === null || id === undefined) {\n throw fail$1(\"Can only store references to tree nodes with a defined identifier.\");\n }\n this.identifier = id;\n }\n else {\n throw fail$1(\"Can only store references to tree nodes or identifiers, got: '\" + value + \"'\");\n }\n }\n Object.defineProperty(StoredReference.prototype, \"updateResolvedReference\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var normalizedId = normalizeIdentifier(this.identifier);\n var root = node.root;\n var lastCacheModification = root.identifierCache.getLastCacheModificationPerId(normalizedId);\n if (!this.resolvedReference ||\n this.resolvedReference.lastCacheModification !== lastCacheModification) {\n var targetType = this.targetType;\n // reference was initialized with the identifier of the target\n var target = root.identifierCache.resolve(targetType, normalizedId);\n if (!target) {\n throw new InvalidReferenceError(\"[mobx-state-tree] Failed to resolve reference '\" + this.identifier + \"' to type '\" + this.targetType.name + \"' (from node: \" + node.path + \")\");\n }\n this.resolvedReference = {\n node: target,\n lastCacheModification: lastCacheModification\n };\n }\n }\n });\n Object.defineProperty(StoredReference.prototype, \"resolvedValue\", {\n get: function () {\n this.updateResolvedReference(this.node);\n return this.resolvedReference.node.value;\n },\n enumerable: false,\n configurable: true\n });\n return StoredReference;\n}());\n/**\n * @internal\n * @hidden\n */\nvar InvalidReferenceError = /** @class */ (function (_super) {\n __extends(InvalidReferenceError, _super);\n function InvalidReferenceError(m) {\n var _this = _super.call(this, m) || this;\n Object.setPrototypeOf(_this, InvalidReferenceError.prototype);\n return _this;\n }\n return InvalidReferenceError;\n}(Error));\n/**\n * @internal\n * @hidden\n */\nvar BaseReferenceType = /** @class */ (function (_super) {\n __extends(BaseReferenceType, _super);\n function BaseReferenceType(targetType, onInvalidated) {\n var _this = _super.call(this, \"reference(\" + targetType.name + \")\") || this;\n Object.defineProperty(_this, \"targetType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: targetType\n });\n Object.defineProperty(_this, \"onInvalidated\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: onInvalidated\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Reference\n });\n return _this;\n }\n Object.defineProperty(BaseReferenceType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.name;\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this.targetType.isAssignableFrom(type);\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n return isValidIdentifier(value)\n ? typeCheckSuccess()\n : typeCheckFailure(context, value, \"Value is not a valid identifier, which is a string or a number\");\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"fireInvalidated\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (cause, storedRefNode, referenceId, refTargetNode) {\n // to actually invalidate a reference we need an alive parent,\n // since it is a scalar value (immutable-ish) and we need to change it\n // from the parent\n var storedRefParentNode = storedRefNode.parent;\n if (!storedRefParentNode || !storedRefParentNode.isAlive) {\n return;\n }\n var storedRefParentValue = storedRefParentNode.storedValue;\n if (!storedRefParentValue) {\n return;\n }\n this.onInvalidated({\n cause: cause,\n parent: storedRefParentValue,\n invalidTarget: refTargetNode ? refTargetNode.storedValue : undefined,\n invalidId: referenceId,\n replaceRef: function (newRef) {\n applyPatch(storedRefNode.root.storedValue, {\n op: \"replace\",\n value: newRef,\n path: storedRefNode.path\n });\n },\n removeRef: function () {\n if (isModelType(storedRefParentNode.type)) {\n this.replaceRef(undefined);\n }\n else {\n applyPatch(storedRefNode.root.storedValue, {\n op: \"remove\",\n path: storedRefNode.path\n });\n }\n }\n });\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"addTargetNodeWatcher\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode, referenceId) {\n var _this = this;\n // this will make sure the target node becomes created\n var refTargetValue = this.getValue(storedRefNode);\n if (!refTargetValue) {\n return undefined;\n }\n var refTargetNode = getStateTreeNode(refTargetValue);\n var hookHandler = function (_, refTargetNodeHook) {\n var cause = getInvalidationCause(refTargetNodeHook);\n if (!cause) {\n return;\n }\n _this.fireInvalidated(cause, storedRefNode, referenceId, refTargetNode);\n };\n var refTargetDetachHookDisposer = refTargetNode.registerHook(Hook.beforeDetach, hookHandler);\n var refTargetDestroyHookDisposer = refTargetNode.registerHook(Hook.beforeDestroy, hookHandler);\n return function () {\n refTargetDetachHookDisposer();\n refTargetDestroyHookDisposer();\n };\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"watchTargetNodeForInvalidations\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode, identifier, customGetSet) {\n var _this = this;\n if (!this.onInvalidated) {\n return;\n }\n var onRefTargetDestroyedHookDisposer;\n // get rid of the watcher hook when the stored ref node is destroyed\n // detached is ignored since scalar nodes (where the reference resides) cannot be detached\n storedRefNode.registerHook(Hook.beforeDestroy, function () {\n if (onRefTargetDestroyedHookDisposer) {\n onRefTargetDestroyedHookDisposer();\n }\n });\n var startWatching = function (sync) {\n // re-create hook in case the stored ref gets reattached\n if (onRefTargetDestroyedHookDisposer) {\n onRefTargetDestroyedHookDisposer();\n }\n // make sure the target node is actually there and initialized\n var storedRefParentNode = storedRefNode.parent;\n var storedRefParentValue = storedRefParentNode && storedRefParentNode.storedValue;\n if (storedRefParentNode && storedRefParentNode.isAlive && storedRefParentValue) {\n var refTargetNodeExists = void 0;\n if (customGetSet) {\n refTargetNodeExists = !!customGetSet.get(identifier, storedRefParentValue);\n }\n else {\n refTargetNodeExists = storedRefNode.root.identifierCache.has(_this.targetType, normalizeIdentifier(identifier));\n }\n if (!refTargetNodeExists) {\n // we cannot change the reference in sync mode\n // since we are in the middle of a reconciliation/instantiation and the change would be overwritten\n // for those cases just let the wrong reference be assigned and fail upon usage\n // (like current references do)\n // this means that effectively this code will only run when it is created from a snapshot\n if (!sync) {\n _this.fireInvalidated(\"invalidSnapshotReference\", storedRefNode, identifier, null);\n }\n }\n else {\n onRefTargetDestroyedHookDisposer = _this.addTargetNodeWatcher(storedRefNode, identifier);\n }\n }\n };\n if (storedRefNode.state === NodeLifeCycle.FINALIZED) {\n // already attached, so the whole tree is ready\n startWatching(true);\n }\n else {\n if (!storedRefNode.isRoot) {\n // start watching once the whole tree is ready\n storedRefNode.root.registerHook(Hook.afterCreationFinalization, function () {\n // make sure to attach it so it can start listening\n if (storedRefNode.parent) {\n storedRefNode.parent.createObservableInstanceIfNeeded();\n }\n });\n }\n // start watching once the node is attached somewhere / parent changes\n storedRefNode.registerHook(Hook.afterAttach, function () {\n startWatching(false);\n });\n }\n }\n });\n return BaseReferenceType;\n}(SimpleType));\n/**\n * @internal\n * @hidden\n */\nvar IdentifierReferenceType = /** @class */ (function (_super) {\n __extends(IdentifierReferenceType, _super);\n function IdentifierReferenceType(targetType, onInvalidated) {\n return _super.call(this, targetType, onInvalidated) || this;\n }\n Object.defineProperty(IdentifierReferenceType.prototype, \"getValue\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode) {\n if (!storedRefNode.isAlive)\n return undefined;\n var storedRef = storedRefNode.storedValue;\n return storedRef.resolvedValue;\n }\n });\n Object.defineProperty(IdentifierReferenceType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode) {\n var ref = storedRefNode.storedValue;\n return ref.identifier;\n }\n });\n Object.defineProperty(IdentifierReferenceType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var identifier = isStateTreeNode(initialValue)\n ? getIdentifier(initialValue)\n : initialValue;\n var storedRef = new StoredReference(initialValue, this.targetType);\n var storedRefNode = createScalarNode(this, parent, subpath, environment, storedRef);\n storedRef.node = storedRefNode;\n this.watchTargetNodeForInvalidations(storedRefNode, identifier, undefined);\n return storedRefNode;\n }\n });\n Object.defineProperty(IdentifierReferenceType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n if (!current.isDetaching && current.type === this) {\n var compareByValue = isStateTreeNode(newValue);\n var ref = current.storedValue;\n if ((!compareByValue && ref.identifier === newValue) ||\n (compareByValue && ref.resolvedValue === newValue)) {\n current.setParent(parent, subpath);\n return current;\n }\n }\n var newNode = this.instantiate(parent, subpath, undefined, newValue);\n current.die(); // noop if detaching\n return newNode;\n }\n });\n return IdentifierReferenceType;\n}(BaseReferenceType));\n/**\n * @internal\n * @hidden\n */\nvar CustomReferenceType = /** @class */ (function (_super) {\n __extends(CustomReferenceType, _super);\n function CustomReferenceType(targetType, options, onInvalidated) {\n var _this = _super.call(this, targetType, onInvalidated) || this;\n Object.defineProperty(_this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n return _this;\n }\n Object.defineProperty(CustomReferenceType.prototype, \"getValue\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode) {\n if (!storedRefNode.isAlive)\n return undefined;\n var referencedNode = this.options.get(storedRefNode.storedValue, storedRefNode.parent ? storedRefNode.parent.storedValue : null);\n return referencedNode;\n }\n });\n Object.defineProperty(CustomReferenceType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode) {\n return storedRefNode.storedValue;\n }\n });\n Object.defineProperty(CustomReferenceType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, newValue) {\n var identifier = isStateTreeNode(newValue)\n ? this.options.set(newValue, parent ? parent.storedValue : null)\n : newValue;\n var storedRefNode = createScalarNode(this, parent, subpath, environment, identifier);\n this.watchTargetNodeForInvalidations(storedRefNode, identifier, this.options);\n return storedRefNode;\n }\n });\n Object.defineProperty(CustomReferenceType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n var newIdentifier = isStateTreeNode(newValue)\n ? this.options.set(newValue, current ? current.storedValue : null)\n : newValue;\n if (!current.isDetaching &&\n current.type === this &&\n current.storedValue === newIdentifier) {\n current.setParent(parent, subpath);\n return current;\n }\n var newNode = this.instantiate(parent, subpath, undefined, newIdentifier);\n current.die(); // noop if detaching\n return newNode;\n }\n });\n return CustomReferenceType;\n}(BaseReferenceType));\n/**\n * `types.reference` - Creates a reference to another type, which should have defined an identifier.\n * See also the [reference and identifiers](https://github.com/mobxjs/mobx-state-tree#references-and-identifiers) section.\n */\nfunction reference(subType, options) {\n assertIsType(subType, 1);\n if (devMode()) {\n if (arguments.length === 2 && typeof arguments[1] === \"string\") {\n // istanbul ignore next\n throw fail$1(\"References with base path are no longer supported. Please remove the base path.\");\n }\n }\n var getSetOptions = options ? options : undefined;\n var onInvalidated = options\n ? options.onInvalidated\n : undefined;\n if (getSetOptions && (getSetOptions.get || getSetOptions.set)) {\n if (devMode()) {\n if (!getSetOptions.get || !getSetOptions.set) {\n throw fail$1(\"reference options must either contain both a 'get' and a 'set' method or none of them\");\n }\n }\n return new CustomReferenceType(subType, {\n get: getSetOptions.get,\n set: getSetOptions.set\n }, onInvalidated);\n }\n else {\n return new IdentifierReferenceType(subType, onInvalidated);\n }\n}\n/**\n * Returns if a given value represents a reference type.\n *\n * @param type\n * @returns\n */\nfunction isReferenceType(type) {\n return (type.flags & TypeFlags.Reference) > 0;\n}\n/**\n * `types.safeReference` - A safe reference is like a standard reference, except that it accepts the undefined value by default\n * and automatically sets itself to undefined (when the parent is a model) / removes itself from arrays and maps\n * when the reference it is pointing to gets detached/destroyed.\n *\n * The optional options parameter object accepts a parameter named `acceptsUndefined`, which is set to true by default, so it is suitable\n * for model properties.\n * When used inside collections (arrays/maps), it is recommended to set this option to false so it can't take undefined as value,\n * which is usually the desired in those cases.\n * Additionally, the optional options parameter object accepts a parameter named `onInvalidated`, which will be called when the reference target node that the reference is pointing to is about to be detached/destroyed\n *\n * Strictly speaking it is a `types.maybe(types.reference(X))` (when `acceptsUndefined` is set to true, the default) and\n * `types.reference(X)` (when `acceptsUndefined` is set to false), both of them with a customized `onInvalidated` option.\n *\n * @param subType\n * @param options\n * @returns\n */\nfunction safeReference(subType, options) {\n var refType = reference(subType, __assign(__assign({}, options), { onInvalidated: function (ev) {\n if (options && options.onInvalidated) {\n options.onInvalidated(ev);\n }\n ev.removeRef();\n } }));\n if (options && options.acceptsUndefined === false) {\n return refType;\n }\n else {\n return maybe(refType);\n }\n}\n\nvar BaseIdentifierType = /** @class */ (function (_super) {\n __extends(BaseIdentifierType, _super);\n function BaseIdentifierType(name, validType) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"validType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: validType\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Identifier\n });\n return _this;\n }\n Object.defineProperty(BaseIdentifierType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n if (!parent || !(parent.type instanceof ModelType))\n throw fail$1(\"Identifier types can only be instantiated as direct child of a model type\");\n return createScalarNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(BaseIdentifierType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n // we don't consider detaching here since identifier are scalar nodes, and scalar nodes cannot be detached\n if (current.storedValue !== newValue)\n throw fail$1(\"Tried to change identifier from '\" + current.storedValue + \"' to '\" + newValue + \"'. Changing identifiers is not allowed.\");\n current.setParent(parent, subpath);\n return current;\n }\n });\n Object.defineProperty(BaseIdentifierType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (typeof value !== this.validType) {\n return typeCheckFailure(context, value, \"Value is not a valid \" + this.describe() + \", expected a \" + this.validType);\n }\n return typeCheckSuccess();\n }\n });\n return BaseIdentifierType;\n}(SimpleType));\n/**\n * @internal\n * @hidden\n */\nvar IdentifierType = /** @class */ (function (_super) {\n __extends(IdentifierType, _super);\n function IdentifierType() {\n var _this = _super.call(this, \"identifier\", \"string\") || this;\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Identifier\n });\n return _this;\n }\n Object.defineProperty(IdentifierType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"identifier\";\n }\n });\n return IdentifierType;\n}(BaseIdentifierType));\n/**\n * @internal\n * @hidden\n */\nvar IdentifierNumberType = /** @class */ (function (_super) {\n __extends(IdentifierNumberType, _super);\n function IdentifierNumberType() {\n return _super.call(this, \"identifierNumber\", \"number\") || this;\n }\n Object.defineProperty(IdentifierNumberType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return node.storedValue;\n }\n });\n Object.defineProperty(IdentifierNumberType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"identifierNumber\";\n }\n });\n return IdentifierNumberType;\n}(BaseIdentifierType));\n/**\n * `types.identifier` - Identifiers are used to make references, lifecycle events and reconciling works.\n * Inside a state tree, for each type can exist only one instance for each given identifier.\n * For example there couldn't be 2 instances of user with id 1. If you need more, consider using references.\n * Identifier can be used only as type property of a model.\n * This type accepts as parameter the value type of the identifier field that can be either string or number.\n *\n * Example:\n * ```ts\n * const Todo = types.model(\"Todo\", {\n * id: types.identifier,\n * title: types.string\n * })\n * ```\n *\n * @returns\n */\nvar identifier = new IdentifierType();\n/**\n * `types.identifierNumber` - Similar to `types.identifier`. This one will serialize from / to a number when applying snapshots\n *\n * Example:\n * ```ts\n * const Todo = types.model(\"Todo\", {\n * id: types.identifierNumber,\n * title: types.string\n * })\n * ```\n *\n * @returns\n */\nvar identifierNumber = new IdentifierNumberType();\n/**\n * Returns if a given value represents an identifier type.\n *\n * @param type\n * @returns\n */\nfunction isIdentifierType(type) {\n return isType(type) && (type.flags & TypeFlags.Identifier) > 0;\n}\n/**\n * @internal\n * @hidden\n */\nfunction normalizeIdentifier(id) {\n return \"\" + id;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isValidIdentifier(id) {\n return typeof id === \"string\" || typeof id === \"number\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsValidIdentifier(id, argNumber) {\n assertArg(id, isValidIdentifier, \"string or number (identifier)\", argNumber);\n}\n\n/**\n * `types.custom` - Creates a custom type. Custom types can be used for arbitrary immutable values, that have a serializable representation. For example, to create your own Date representation, Decimal type etc.\n *\n * The signature of the options is:\n * ```ts\n * export interface CustomTypeOptions<S, T> {\n * // Friendly name\n * name: string\n * // given a serialized value and environment, how to turn it into the target type\n * fromSnapshot(snapshot: S, env: any): T\n * // return the serialization of the current value\n * toSnapshot(value: T): S\n * // if true, this is a converted value, if false, it's a snapshot\n * isTargetType(value: T | S): value is T\n * // a non empty string is assumed to be a validation error\n * getValidationMessage?(snapshot: S): string\n * }\n * ```\n *\n * Example:\n * ```ts\n * const DecimalPrimitive = types.custom<string, Decimal>({\n * name: \"Decimal\",\n * fromSnapshot(value: string) {\n * return new Decimal(value)\n * },\n * toSnapshot(value: Decimal) {\n * return value.toString()\n * },\n * isTargetType(value: string | Decimal): boolean {\n * return value instanceof Decimal\n * },\n * getValidationMessage(value: string): string {\n * if (/^-?\\d+\\.\\d+$/.test(value)) return \"\" // OK\n * return `'${value}' doesn't look like a valid decimal number`\n * }\n * })\n *\n * const Wallet = types.model({\n * balance: DecimalPrimitive\n * })\n * ```\n *\n * @param options\n * @returns\n */\nfunction custom(options) {\n return new CustomType(options);\n}\n/**\n * @internal\n * @hidden\n */\nvar CustomType = /** @class */ (function (_super) {\n __extends(CustomType, _super);\n function CustomType(options) {\n var _this = _super.call(this, options.name) || this;\n Object.defineProperty(_this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Custom\n });\n return _this;\n }\n Object.defineProperty(CustomType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.name;\n }\n });\n Object.defineProperty(CustomType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (this.options.isTargetType(value))\n return typeCheckSuccess();\n var typeError = this.options.getValidationMessage(value);\n if (typeError) {\n return typeCheckFailure(context, value, \"Invalid value for type '\" + this.name + \"': \" + typeError);\n }\n return typeCheckSuccess();\n }\n });\n Object.defineProperty(CustomType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return this.options.toSnapshot(node.storedValue);\n }\n });\n Object.defineProperty(CustomType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var valueToStore = this.options.isTargetType(initialValue)\n ? initialValue\n : this.options.fromSnapshot(initialValue, parent && parent.root.environment);\n return createScalarNode(this, parent, subpath, environment, valueToStore);\n }\n });\n Object.defineProperty(CustomType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, value, parent, subpath) {\n var isSnapshot = !this.options.isTargetType(value);\n // in theory customs use scalar nodes which cannot be detached, but still...\n if (!current.isDetaching) {\n var unchanged = current.type === this &&\n (isSnapshot ? value === current.snapshot : value === current.storedValue);\n if (unchanged) {\n current.setParent(parent, subpath);\n return current;\n }\n }\n var valueToStore = isSnapshot\n ? this.options.fromSnapshot(value, parent.root.environment)\n : value;\n var newNode = this.instantiate(parent, subpath, undefined, valueToStore);\n current.die(); // noop if detaching\n return newNode;\n }\n });\n return CustomType;\n}(SimpleType));\n\n// we import the types to re-export them inside types.\nvar types = {\n enumeration: enumeration,\n model: model,\n compose: compose,\n custom: custom,\n reference: reference,\n safeReference: safeReference,\n union: union,\n optional: optional,\n literal: literal,\n maybe: maybe,\n maybeNull: maybeNull,\n refinement: refinement,\n string: string,\n boolean: boolean,\n number: number,\n integer: integer,\n Date: DatePrimitive,\n map: map,\n array: array,\n frozen: frozen,\n identifier: identifier,\n identifierNumber: identifierNumber,\n late: late,\n undefined: undefinedType,\n null: nullType,\n snapshotProcessor: snapshotProcessor\n};\n\nexport { addDisposer, addMiddleware, applyAction, applyPatch, applySnapshot, cast, castFlowReturn, castToReferenceSnapshot, castToSnapshot, clone, createActionTrackingMiddleware, createActionTrackingMiddleware2, decorate, destroy, detach, escapeJsonPath, flow, getChildType, getEnv, getIdentifier, getLivelinessChecking, getMembers, getNodeId, getParent, getParentOfType, getPath, getPathParts, getPropertyMembers, getRelativePath, getRoot, getRunningActionContext, getSnapshot, getType, hasParent, hasParentOfType, isActionContextChildOf, isActionContextThisOrChildOf, isAlive, isArrayType, isFrozenType, isIdentifierType, isLateType, isLiteralType, isMapType, isModelType, isOptionalType, isPrimitiveType, isProtected, isReferenceType, isRefinementType, isRoot, isStateTreeNode, isType, isUnionType, isValidReference, joinJsonPath, onAction, onPatch, onSnapshot, process$1 as process, protect, recordActions, recordPatches, resolveIdentifier, resolvePath, setLivelinessChecking, setLivelynessChecking, splitJsonPath, toGenerator, toGeneratorFunction, tryReference, tryResolve, typecheck, types, unescapeJsonPath, unprotect, walk };\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport AccessibilityUtil from '../../modules/AccessibilityUtil';\nimport createDOMProps from '../../modules/createDOMProps';\nimport React from 'react';\n\nvar createElement = function createElement(component, props) {\n // Use equivalent platform elements where possible.\n var accessibilityComponent;\n\n if (component && component.constructor === String) {\n accessibilityComponent = AccessibilityUtil.propsToAccessibilityComponent(props);\n }\n\n var Component = accessibilityComponent || component;\n var domProps = createDOMProps(Component, props);\n\n for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n children[_key - 2] = arguments[_key];\n }\n\n return /*#__PURE__*/React.createElement.apply(React, [Component, domProps].concat(children));\n};\n\nexport default createElement;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedNode from './AnimatedNode';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\n\nvar AnimatedWithChildren = /*#__PURE__*/function (_AnimatedNode) {\n _inheritsLoose(AnimatedWithChildren, _AnimatedNode);\n\n function AnimatedWithChildren() {\n var _this;\n\n _this = _AnimatedNode.call(this) || this;\n _this._children = [];\n return _this;\n }\n\n var _proto = AnimatedWithChildren.prototype;\n\n _proto.__makeNative = function __makeNative() {\n if (!this.__isNative) {\n this.__isNative = true;\n\n for (var _iterator = _createForOfIteratorHelperLoose(this._children), _step; !(_step = _iterator()).done;) {\n var child = _step.value;\n\n child.__makeNative();\n\n NativeAnimatedHelper.API.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n }\n\n _AnimatedNode.prototype.__makeNative.call(this);\n };\n\n _proto.__addChild = function __addChild(child) {\n if (this._children.length === 0) {\n this.__attach();\n }\n\n this._children.push(child);\n\n if (this.__isNative) {\n // Only accept \"native\" animated nodes as children\n child.__makeNative();\n\n NativeAnimatedHelper.API.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n };\n\n _proto.__removeChild = function __removeChild(child) {\n var index = this._children.indexOf(child);\n\n if (index === -1) {\n console.warn(\"Trying to remove a child that doesn't exist\");\n return;\n }\n\n if (this.__isNative && child.__isNative) {\n NativeAnimatedHelper.API.disconnectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n\n this._children.splice(index, 1);\n\n if (this._children.length === 0) {\n this.__detach();\n }\n };\n\n _proto.__getChildren = function __getChildren() {\n return this._children;\n };\n\n _proto.__callListeners = function __callListeners(value) {\n _AnimatedNode.prototype.__callListeners.call(this, value);\n\n if (!this.__isNative) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this._children), _step2; !(_step2 = _iterator2()).done;) {\n var child = _step2.value;\n\n if (child.__getValue) {\n child.__callListeners(child.__getValue());\n }\n }\n }\n };\n\n return AnimatedWithChildren;\n}(AnimatedNode);\n\nexport default AnimatedWithChildren;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport invariant from 'fbjs/lib/invariant';\nvar dimensions = {\n window: {\n fontScale: 1,\n height: 0,\n scale: 1,\n width: 0\n },\n screen: {\n fontScale: 1,\n height: 0,\n scale: 1,\n width: 0\n }\n};\nvar listeners = {};\n\nvar Dimensions = /*#__PURE__*/function () {\n function Dimensions() {}\n\n Dimensions.get = function get(dimension) {\n invariant(dimensions[dimension], \"No dimension set for key \" + dimension);\n return dimensions[dimension];\n };\n\n Dimensions.set = function set(initialDimensions) {\n if (initialDimensions) {\n if (canUseDOM) {\n invariant(false, 'Dimensions cannot be set in the browser');\n } else {\n if (initialDimensions.screen != null) {\n dimensions.screen = initialDimensions.screen;\n }\n\n if (initialDimensions.window != null) {\n dimensions.window = initialDimensions.window;\n }\n }\n }\n };\n\n Dimensions._update = function _update() {\n if (!canUseDOM) {\n return;\n }\n\n var win = window;\n var docEl = win.document.documentElement;\n dimensions.window = {\n fontScale: 1,\n height: docEl.clientHeight,\n scale: win.devicePixelRatio || 1,\n width: docEl.clientWidth\n };\n dimensions.screen = {\n fontScale: 1,\n height: win.screen.height,\n scale: win.devicePixelRatio || 1,\n width: win.screen.width\n };\n\n if (Array.isArray(listeners['change'])) {\n listeners['change'].forEach(function (handler) {\n return handler(dimensions);\n });\n }\n };\n\n Dimensions.addEventListener = function addEventListener(type, handler) {\n listeners[type] = listeners[type] || [];\n listeners[type].push(handler);\n };\n\n Dimensions.removeEventListener = function removeEventListener(type, handler) {\n if (Array.isArray(listeners[type])) {\n listeners[type] = listeners[type].filter(function (_handler) {\n return _handler !== handler;\n });\n }\n };\n\n return Dimensions;\n}();\n\nexport { Dimensions as default };\n\nif (canUseDOM) {\n Dimensions._update();\n\n window.addEventListener('resize', Dimensions._update, false);\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n\n/* eslint no-bitwise: 0 */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nimport normalizeColor from 'normalize-css-color';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar linear = function linear(t) {\n return t;\n};\n/**\n * Very handy helper to map input ranges to output ranges with an easing\n * function and custom behavior outside of the ranges.\n */\n\n\nfunction createInterpolation(config) {\n if (config.outputRange && typeof config.outputRange[0] === 'string') {\n return createInterpolationFromStringOutputRange(config);\n }\n\n var outputRange = config.outputRange;\n checkInfiniteRange('outputRange', outputRange);\n var inputRange = config.inputRange;\n checkInfiniteRange('inputRange', inputRange);\n checkValidInputRange(inputRange);\n invariant(inputRange.length === outputRange.length, 'inputRange (' + inputRange.length + ') and outputRange (' + outputRange.length + ') must have the same length');\n var easing = config.easing || linear;\n var extrapolateLeft = 'extend';\n\n if (config.extrapolateLeft !== undefined) {\n extrapolateLeft = config.extrapolateLeft;\n } else if (config.extrapolate !== undefined) {\n extrapolateLeft = config.extrapolate;\n }\n\n var extrapolateRight = 'extend';\n\n if (config.extrapolateRight !== undefined) {\n extrapolateRight = config.extrapolateRight;\n } else if (config.extrapolate !== undefined) {\n extrapolateRight = config.extrapolate;\n }\n\n return function (input) {\n invariant(typeof input === 'number', 'Cannot interpolation an input which is not a number');\n var range = findRange(input, inputRange);\n return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight);\n };\n}\n\nfunction interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight) {\n var result = input; // Extrapolate\n\n if (result < inputMin) {\n if (extrapolateLeft === 'identity') {\n return result;\n } else if (extrapolateLeft === 'clamp') {\n result = inputMin;\n } else if (extrapolateLeft === 'extend') {// noop\n }\n }\n\n if (result > inputMax) {\n if (extrapolateRight === 'identity') {\n return result;\n } else if (extrapolateRight === 'clamp') {\n result = inputMax;\n } else if (extrapolateRight === 'extend') {// noop\n }\n }\n\n if (outputMin === outputMax) {\n return outputMin;\n }\n\n if (inputMin === inputMax) {\n if (input <= inputMin) {\n return outputMin;\n }\n\n return outputMax;\n } // Input Range\n\n\n if (inputMin === -Infinity) {\n result = -result;\n } else if (inputMax === Infinity) {\n result = result - inputMin;\n } else {\n result = (result - inputMin) / (inputMax - inputMin);\n } // Easing\n\n\n result = easing(result); // Output Range\n\n if (outputMin === -Infinity) {\n result = -result;\n } else if (outputMax === Infinity) {\n result = result + outputMin;\n } else {\n result = result * (outputMax - outputMin) + outputMin;\n }\n\n return result;\n}\n\nfunction colorToRgba(input) {\n var normalizedColor = normalizeColor(input);\n\n if (normalizedColor === null || typeof normalizedColor !== 'number') {\n return input;\n }\n\n normalizedColor = normalizedColor || 0;\n var r = (normalizedColor & 0xff000000) >>> 24;\n var g = (normalizedColor & 0x00ff0000) >>> 16;\n var b = (normalizedColor & 0x0000ff00) >>> 8;\n var a = (normalizedColor & 0x000000ff) / 255;\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + a + \")\";\n}\n\nvar stringShapeRegex = /[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?/g;\n/**\n * Supports string shapes by extracting numbers so new values can be computed,\n * and recombines those values into new strings of the same shape. Supports\n * things like:\n *\n * rgba(123, 42, 99, 0.36) // colors\n * -45deg // values with units\n */\n\nfunction createInterpolationFromStringOutputRange(config) {\n var outputRange = config.outputRange;\n invariant(outputRange.length >= 2, 'Bad output range');\n outputRange = outputRange.map(colorToRgba);\n checkPattern(outputRange); // ['rgba(0, 100, 200, 0)', 'rgba(50, 150, 250, 0.5)']\n // ->\n // [\n // [0, 50],\n // [100, 150],\n // [200, 250],\n // [0, 0.5],\n // ]\n\n /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to\n * guard against this possibility.\n */\n\n var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {\n return [];\n });\n outputRange.forEach(function (value) {\n /* $FlowFixMe(>=0.18.0): `value.match()` can return `null`. Need to guard\n * against this possibility.\n */\n value.match(stringShapeRegex).forEach(function (number, i) {\n outputRanges[i].push(+number);\n });\n });\n var interpolations = outputRange[0].match(stringShapeRegex)\n /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need\n * to guard against this possibility. */\n .map(function (value, i) {\n return createInterpolation(_objectSpread(_objectSpread({}, config), {}, {\n outputRange: outputRanges[i]\n }));\n }); // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to\n // round the opacity (4th column).\n\n var shouldRound = isRgbOrRgba(outputRange[0]);\n return function (input) {\n var i = 0; // 'rgba(0, 100, 200, 0)'\n // ->\n // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'\n\n return outputRange[0].replace(stringShapeRegex, function () {\n var val = +interpolations[i++](input);\n\n if (shouldRound) {\n val = i < 4 ? Math.round(val) : Math.round(val * 1000) / 1000;\n }\n\n return String(val);\n });\n };\n}\n\nfunction isRgbOrRgba(range) {\n return typeof range === 'string' && range.startsWith('rgb');\n}\n\nfunction checkPattern(arr) {\n var pattern = arr[0].replace(stringShapeRegex, '');\n\n for (var i = 1; i < arr.length; ++i) {\n invariant(pattern === arr[i].replace(stringShapeRegex, ''), 'invalid pattern ' + arr[0] + ' and ' + arr[i]);\n }\n}\n\nfunction findRange(input, inputRange) {\n var i;\n\n for (i = 1; i < inputRange.length - 1; ++i) {\n if (inputRange[i] >= input) {\n break;\n }\n }\n\n return i - 1;\n}\n\nfunction checkValidInputRange(arr) {\n invariant(arr.length >= 2, 'inputRange must have at least 2 elements');\n\n for (var i = 1; i < arr.length; ++i) {\n invariant(arr[i] >= arr[i - 1],\n /* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,\n * one or both of the operands may be something that doesn't cleanly\n * convert to a string, like undefined, null, and object, etc. If you really\n * mean this implicit string conversion, you can do something like\n * String(myThing)\n */\n 'inputRange must be monotonically non-decreasing ' + arr);\n }\n}\n\nfunction checkInfiniteRange(name, arr) {\n invariant(arr.length >= 2, name + ' must have at least 2 elements');\n invariant(arr.length !== 2 || arr[0] !== -Infinity || arr[1] !== Infinity,\n /* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,\n * one or both of the operands may be something that doesn't cleanly convert\n * to a string, like undefined, null, and object, etc. If you really mean\n * this implicit string conversion, you can do something like\n * String(myThing)\n */\n name + 'cannot be ]-infinity;+infinity[ ' + arr);\n}\n\nvar AnimatedInterpolation = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedInterpolation, _AnimatedWithChildren);\n\n // Export for testing.\n function AnimatedInterpolation(parent, config) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._parent = parent;\n _this._config = config;\n _this._interpolation = createInterpolation(config);\n return _this;\n }\n\n var _proto = AnimatedInterpolation.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._parent.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n var parentValue = this._parent.__getValue();\n\n invariant(typeof parentValue === 'number', 'Cannot interpolate an input which is not a number.');\n return this._interpolation(parentValue);\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._parent.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._parent.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__transformDataType = function __transformDataType(range) {\n return range.map(NativeAnimatedHelper.transformDataType);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n if (__DEV__) {\n NativeAnimatedHelper.validateInterpolation(this._config);\n }\n\n return {\n inputRange: this._config.inputRange,\n // Only the `outputRange` can contain strings so we don't need to transform `inputRange` here\n\n /* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of\n * v0.38.0. To see the error, remove this comment and run flow */\n outputRange: this.__transformDataType(this._config.outputRange),\n extrapolateLeft: this._config.extrapolateLeft || this._config.extrapolate || 'extend',\n extrapolateRight: this._config.extrapolateRight || this._config.extrapolate || 'extend',\n type: 'interpolation'\n };\n };\n\n return AnimatedInterpolation;\n}(AnimatedWithChildren);\n\nAnimatedInterpolation.__createInterpolation = createInterpolation;\nexport default AnimatedInterpolation;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment';\nvar doLeftAndRightSwapInRTL = true;\nvar isPreferredLanguageRTL = false;\nvar isRTLAllowed = true;\nvar isRTLForced = false;\n\nvar isRTL = function isRTL() {\n if (isRTLForced) {\n return true;\n }\n\n return isRTLAllowed && isPreferredLanguageRTL;\n};\n\nvar onDirectionChange = function onDirectionChange() {\n if (ExecutionEnvironment.canUseDOM) {\n if (document.documentElement && document.documentElement.setAttribute) {\n document.documentElement.setAttribute('dir', isRTL() ? 'rtl' : 'ltr');\n }\n }\n};\n\nvar I18nManager = {\n allowRTL: function allowRTL(bool) {\n isRTLAllowed = bool;\n onDirectionChange();\n },\n forceRTL: function forceRTL(bool) {\n isRTLForced = bool;\n onDirectionChange();\n },\n getConstants: function getConstants() {\n return {\n doLeftAndRightSwapInRTL: doLeftAndRightSwapInRTL,\n isRTL: isRTL()\n };\n },\n setPreferredLanguageRTL: function setPreferredLanguageRTL(bool) {\n isPreferredLanguageRTL = bool;\n onDirectionChange();\n },\n swapLeftAndRightInRTL: function swapLeftAndRightInRTL(bool) {\n doLeftAndRightSwapInRTL = bool;\n }\n};\nexport default I18nManager;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport mergeRefs from '../mergeRefs';\nexport default function useMergeRefs() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return React.useMemo(function () {\n return mergeRefs.apply(void 0, args);\n }, // eslint-disable-next-line\n [].concat(args));\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar assets = [];\nexport function registerAsset(asset) {\n // `push` returns new array length, so the first asset will\n // get id 1 (not 0) to make the value truthy\n return assets.push(asset);\n}\nexport function getAssetByID(assetId) {\n return assets[assetId - 1];\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar dataUriPattern = /^data:/;\nexport var ImageUriCache = /*#__PURE__*/function () {\n function ImageUriCache() {}\n\n ImageUriCache.has = function has(uri) {\n var entries = ImageUriCache._entries;\n var isDataUri = dataUriPattern.test(uri);\n return isDataUri || Boolean(entries[uri]);\n };\n\n ImageUriCache.add = function add(uri) {\n var entries = ImageUriCache._entries;\n var lastUsedTimestamp = Date.now();\n\n if (entries[uri]) {\n entries[uri].lastUsedTimestamp = lastUsedTimestamp;\n entries[uri].refCount += 1;\n } else {\n entries[uri] = {\n lastUsedTimestamp: lastUsedTimestamp,\n refCount: 1\n };\n }\n };\n\n ImageUriCache.remove = function remove(uri) {\n var entries = ImageUriCache._entries;\n\n if (entries[uri]) {\n entries[uri].refCount -= 1;\n } // Free up entries when the cache is \"full\"\n\n\n ImageUriCache._cleanUpIfNeeded();\n };\n\n ImageUriCache._cleanUpIfNeeded = function _cleanUpIfNeeded() {\n var entries = ImageUriCache._entries;\n var imageUris = Object.keys(entries);\n\n if (imageUris.length + 1 > ImageUriCache._maximumEntries) {\n var leastRecentlyUsedKey;\n var leastRecentlyUsedEntry;\n imageUris.forEach(function (uri) {\n var entry = entries[uri];\n\n if ((!leastRecentlyUsedEntry || entry.lastUsedTimestamp < leastRecentlyUsedEntry.lastUsedTimestamp) && entry.refCount === 0) {\n leastRecentlyUsedKey = uri;\n leastRecentlyUsedEntry = entry;\n }\n });\n\n if (leastRecentlyUsedKey) {\n delete entries[leastRecentlyUsedKey];\n }\n }\n };\n\n return ImageUriCache;\n}();\nImageUriCache._maximumEntries = 256;\nImageUriCache._entries = {};\nvar id = 0;\nvar requests = {};\nvar ImageLoader = {\n abort: function abort(requestId) {\n var image = requests[\"\" + requestId];\n\n if (image) {\n image.onerror = null;\n image.onload = null;\n image = null;\n delete requests[\"\" + requestId];\n }\n },\n getSize: function getSize(uri, success, failure) {\n var complete = false;\n var interval = setInterval(callback, 16);\n var requestId = ImageLoader.load(uri, callback, errorCallback);\n\n function callback() {\n var image = requests[\"\" + requestId];\n\n if (image) {\n var naturalHeight = image.naturalHeight,\n naturalWidth = image.naturalWidth;\n\n if (naturalHeight && naturalWidth) {\n success(naturalWidth, naturalHeight);\n complete = true;\n }\n }\n\n if (complete) {\n ImageLoader.abort(requestId);\n clearInterval(interval);\n }\n }\n\n function errorCallback() {\n if (typeof failure === 'function') {\n failure();\n }\n\n ImageLoader.abort(requestId);\n clearInterval(interval);\n }\n },\n has: function has(uri) {\n return ImageUriCache.has(uri);\n },\n load: function load(uri, onLoad, onError) {\n id += 1;\n var image = new window.Image();\n image.onerror = onError;\n\n image.onload = function (e) {\n // avoid blocking the main thread\n var onDecode = function onDecode() {\n return onLoad({\n nativeEvent: e\n });\n };\n\n if (typeof image.decode === 'function') {\n // Safari currently throws exceptions when decoding svgs.\n // We want to catch that error and allow the load handler\n // to be forwarded to the onLoad handler in this case\n image.decode().then(onDecode, onDecode);\n } else {\n setTimeout(onDecode, 0);\n }\n };\n\n image.src = uri;\n requests[\"\" + id] = image;\n return id;\n },\n prefetch: function prefetch(uri) {\n return new Promise(function (resolve, reject) {\n ImageLoader.load(uri, function () {\n // Add the uri to the cache so it can be immediately displayed when used\n // but also immediately remove it to correctly reflect that it has no active references\n ImageUriCache.add(uri);\n ImageUriCache.remove(uri);\n resolve();\n }, reject);\n });\n },\n queryCache: function queryCache(uris) {\n var result = {};\n uris.forEach(function (u) {\n if (ImageUriCache.has(u)) {\n result[u] = 'disk/memory';\n }\n });\n return Promise.resolve(result);\n }\n};\nexport default ImageLoader;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport css from '../StyleSheet/css';\nimport { getAssetByID } from '../../modules/AssetRegistry';\nimport resolveShadowValue from '../StyleSheet/resolveShadowValue';\nimport ImageLoader from '../../modules/ImageLoader';\nimport PixelRatio from '../PixelRatio';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from '../Text/TextAncestorContext';\nimport View from '../View';\nvar ERRORED = 'ERRORED';\nvar LOADED = 'LOADED';\nvar LOADING = 'LOADING';\nvar IDLE = 'IDLE';\nvar _filterId = 0;\nvar svgDataUriPattern = /^(data:image\\/svg\\+xml;utf8,)(.*)/;\n\nfunction createTintColorSVG(tintColor, id) {\n return tintColor && id != null ? /*#__PURE__*/React.createElement(\"svg\", {\n style: {\n position: 'absolute',\n height: 0,\n visibility: 'hidden',\n width: 0\n }\n }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"filter\", {\n id: \"tint-\" + id,\n suppressHydrationWarning: true\n }, /*#__PURE__*/React.createElement(\"feFlood\", {\n floodColor: \"\" + tintColor,\n key: tintColor\n }), /*#__PURE__*/React.createElement(\"feComposite\", {\n in2: \"SourceAlpha\",\n operator: \"atop\"\n })))) : null;\n}\n\nfunction getFlatStyle(style, blurRadius, filterId) {\n var flatStyle = _objectSpread({}, StyleSheet.flatten(style));\n\n var filter = flatStyle.filter,\n resizeMode = flatStyle.resizeMode,\n shadowOffset = flatStyle.shadowOffset,\n tintColor = flatStyle.tintColor; // Add CSS filters\n // React Native exposes these features as props and proprietary styles\n\n var filters = [];\n var _filter = null;\n\n if (filter) {\n filters.push(filter);\n }\n\n if (blurRadius) {\n filters.push(\"blur(\" + blurRadius + \"px)\");\n }\n\n if (shadowOffset) {\n var shadowString = resolveShadowValue(flatStyle);\n\n if (shadowString) {\n filters.push(\"drop-shadow(\" + shadowString + \")\");\n }\n }\n\n if (tintColor && filterId != null) {\n filters.push(\"url(#tint-\" + filterId + \")\");\n }\n\n if (filters.length > 0) {\n _filter = filters.join(' ');\n } // These styles are converted to CSS filters applied to the\n // element displaying the background image.\n\n\n delete flatStyle.blurRadius;\n delete flatStyle.shadowColor;\n delete flatStyle.shadowOpacity;\n delete flatStyle.shadowOffset;\n delete flatStyle.shadowRadius;\n delete flatStyle.tintColor; // These styles are not supported on View\n\n delete flatStyle.overlayColor;\n delete flatStyle.resizeMode;\n return [flatStyle, resizeMode, _filter, tintColor];\n}\n\nfunction resolveAssetDimensions(source) {\n if (typeof source === 'number') {\n var _getAssetByID = getAssetByID(source),\n _height = _getAssetByID.height,\n _width = _getAssetByID.width;\n\n return {\n height: _height,\n width: _width\n };\n } else if (source != null && !Array.isArray(source) && typeof source === 'object') {\n var _height2 = source.height,\n _width2 = source.width;\n return {\n height: _height2,\n width: _width2\n };\n }\n}\n\nfunction resolveAssetUri(source) {\n var uri = null;\n\n if (typeof source === 'number') {\n // get the URI from the packager\n var asset = getAssetByID(source);\n var scale = asset.scales[0];\n\n if (asset.scales.length > 1) {\n var preferredScale = PixelRatio.get(); // Get the scale which is closest to the preferred scale\n\n scale = asset.scales.reduce(function (prev, curr) {\n return Math.abs(curr - preferredScale) < Math.abs(prev - preferredScale) ? curr : prev;\n });\n }\n\n var scaleSuffix = scale !== 1 ? \"@\" + scale + \"x\" : '';\n uri = asset ? asset.httpServerLocation + \"/\" + asset.name + scaleSuffix + \".\" + asset.type : '';\n } else if (typeof source === 'string') {\n uri = source;\n } else if (source && typeof source.uri === 'string') {\n uri = source.uri;\n }\n\n if (uri) {\n var match = uri.match(svgDataUriPattern); // inline SVG markup may contain characters (e.g., #, \") that need to be escaped\n\n if (match) {\n var prefix = match[1],\n svg = match[2];\n var encodedSvg = encodeURIComponent(svg);\n return \"\" + prefix + encodedSvg;\n }\n }\n\n return uri;\n}\n\nvar Image = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var accessibilityLabel = props.accessibilityLabel,\n blurRadius = props.blurRadius,\n defaultSource = props.defaultSource,\n draggable = props.draggable,\n onError = props.onError,\n onLayout = props.onLayout,\n onLoad = props.onLoad,\n onLoadEnd = props.onLoadEnd,\n onLoadStart = props.onLoadStart,\n pointerEvents = props.pointerEvents,\n source = props.source,\n style = props.style,\n rest = _objectWithoutPropertiesLoose(props, [\"accessibilityLabel\", \"blurRadius\", \"defaultSource\", \"draggable\", \"onError\", \"onLayout\", \"onLoad\", \"onLoadEnd\", \"onLoadStart\", \"pointerEvents\", \"source\", \"style\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.children) {\n throw new Error('The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.');\n }\n }\n\n var _React$useState = React.useState(function () {\n var uri = resolveAssetUri(source);\n\n if (uri != null) {\n var isLoaded = ImageLoader.has(uri);\n\n if (isLoaded) {\n return LOADED;\n }\n }\n\n return IDLE;\n }),\n state = _React$useState[0],\n updateState = _React$useState[1];\n\n var _React$useState2 = React.useState({}),\n layout = _React$useState2[0],\n updateLayout = _React$useState2[1];\n\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hiddenImageRef = React.useRef(null);\n var filterRef = React.useRef(_filterId++);\n var requestRef = React.useRef(null);\n var shouldDisplaySource = state === LOADED || state === LOADING && defaultSource == null;\n\n var _getFlatStyle = getFlatStyle(style, blurRadius, filterRef.current),\n flatStyle = _getFlatStyle[0],\n _resizeMode = _getFlatStyle[1],\n filter = _getFlatStyle[2],\n tintColor = _getFlatStyle[3];\n\n var resizeMode = props.resizeMode || _resizeMode || 'cover';\n var selectedSource = shouldDisplaySource ? source : defaultSource;\n var displayImageUri = resolveAssetUri(selectedSource);\n var imageSizeStyle = resolveAssetDimensions(selectedSource);\n var backgroundImage = displayImageUri ? \"url(\\\"\" + displayImageUri + \"\\\")\" : null;\n var backgroundSize = getBackgroundSize(); // Accessibility image allows users to trigger the browser's image context menu\n\n var hiddenImage = displayImageUri ? createElement('img', {\n alt: accessibilityLabel || '',\n classList: [classes.accessibilityImage],\n draggable: draggable || false,\n ref: hiddenImageRef,\n src: displayImageUri\n }) : null;\n\n function getBackgroundSize() {\n if (hiddenImageRef.current != null && (resizeMode === 'center' || resizeMode === 'repeat')) {\n var _hiddenImageRef$curre = hiddenImageRef.current,\n naturalHeight = _hiddenImageRef$curre.naturalHeight,\n naturalWidth = _hiddenImageRef$curre.naturalWidth;\n var _height3 = layout.height,\n _width3 = layout.width;\n\n if (naturalHeight && naturalWidth && _height3 && _width3) {\n var scaleFactor = Math.min(1, _width3 / naturalWidth, _height3 / naturalHeight);\n var x = Math.ceil(scaleFactor * naturalWidth);\n var y = Math.ceil(scaleFactor * naturalHeight);\n return x + \"px \" + y + \"px\";\n }\n }\n }\n\n function handleLayout(e) {\n if (resizeMode === 'center' || resizeMode === 'repeat' || onLayout) {\n var _layout = e.nativeEvent.layout;\n onLayout && onLayout(e);\n updateLayout(_layout);\n }\n } // Image loading\n\n\n var uri = resolveAssetUri(source);\n React.useEffect(function () {\n abortPendingRequest();\n\n if (uri != null) {\n updateState(LOADING);\n\n if (onLoadStart) {\n onLoadStart();\n }\n\n requestRef.current = ImageLoader.load(uri, function load(e) {\n updateState(LOADED);\n\n if (onLoad) {\n onLoad(e);\n }\n\n if (onLoadEnd) {\n onLoadEnd();\n }\n }, function error() {\n updateState(ERRORED);\n\n if (onError) {\n onError({\n nativeEvent: {\n error: \"Failed to load resource \" + uri + \" (404)\"\n }\n });\n }\n\n if (onLoadEnd) {\n onLoadEnd();\n }\n });\n }\n\n function abortPendingRequest() {\n if (requestRef.current != null) {\n ImageLoader.abort(requestRef.current);\n requestRef.current = null;\n }\n }\n\n return abortPendingRequest;\n }, [uri, requestRef, updateState, onError, onLoad, onLoadEnd, onLoadStart]);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n accessibilityLabel: accessibilityLabel,\n onLayout: handleLayout,\n pointerEvents: pointerEvents,\n ref: ref,\n style: [styles.root, hasTextAncestor && styles.inline, imageSizeStyle, flatStyle]\n }), /*#__PURE__*/React.createElement(View, {\n style: [styles.image, resizeModeStyles[resizeMode], {\n backgroundImage: backgroundImage,\n filter: filter\n }, backgroundSize != null && {\n backgroundSize: backgroundSize\n }],\n suppressHydrationWarning: true\n }), hiddenImage, createTintColorSVG(tintColor, filterRef.current));\n});\nImage.displayName = 'Image'; // $FlowIgnore: This is the correct type, but casting makes it unhappy since the variables aren't defined yet\n\nvar ImageWithStatics = Image;\n\nImageWithStatics.getSize = function (uri, success, failure) {\n ImageLoader.getSize(uri, success, failure);\n};\n\nImageWithStatics.prefetch = function (uri) {\n return ImageLoader.prefetch(uri);\n};\n\nImageWithStatics.queryCache = function (uris) {\n return ImageLoader.queryCache(uris);\n};\n\nvar classes = css.create({\n accessibilityImage: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '100%',\n opacity: 0,\n width: '100%',\n zIndex: -1\n })\n});\nvar styles = StyleSheet.create({\n root: {\n flexBasis: 'auto',\n overflow: 'hidden',\n zIndex: 0\n },\n inline: {\n display: 'inline-flex'\n },\n image: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n backgroundColor: 'transparent',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: '100%',\n width: '100%',\n zIndex: -1\n })\n});\nvar resizeModeStyles = StyleSheet.create({\n center: {\n backgroundSize: 'auto'\n },\n contain: {\n backgroundSize: 'contain'\n },\n cover: {\n backgroundSize: 'cover'\n },\n none: {\n backgroundPosition: '0 0',\n backgroundSize: 'auto'\n },\n repeat: {\n backgroundPosition: '0 0',\n backgroundRepeat: 'repeat',\n backgroundSize: 'auto'\n },\n stretch: {\n backgroundSize: '100% 100%'\n }\n});\nexport default ImageWithStatics;","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}\nmodule.exports = _curry2;","import * as React from 'react';\nimport type {\n NavigationAction,\n NavigationState,\n ParamListBase,\n} from '@react-navigation/routers';\nimport type { NavigationHelpers } from './types';\n\nexport type ListenerMap = {\n action: ChildActionListener;\n focus: FocusedNavigationListener;\n};\n\nexport type KeyedListenerMap = {\n getState: GetStateListener;\n beforeRemove: ChildBeforeRemoveListener;\n};\n\nexport type AddListener = <T extends keyof ListenerMap>(\n type: T,\n listener: ListenerMap[T]\n) => void;\n\nexport type AddKeyedListener = <T extends keyof KeyedListenerMap>(\n type: T,\n key: string,\n listener: KeyedListenerMap[T]\n) => void;\n\nexport type ChildActionListener = (\n action: NavigationAction,\n visitedNavigators?: Set<string>\n) => boolean;\n\nexport type FocusedNavigationCallback<T> = (\n navigation: NavigationHelpers<ParamListBase>\n) => T;\n\nexport type FocusedNavigationListener = <T>(\n callback: FocusedNavigationCallback<T>\n) => { handled: boolean; result: T };\n\nexport type GetStateListener = () => NavigationState;\n\nexport type ChildBeforeRemoveListener = (action: NavigationAction) => boolean;\n\n/**\n * Context which holds the required helpers needed to build nested navigators.\n */\nconst NavigationBuilderContext = React.createContext<{\n onAction?: (\n action: NavigationAction,\n visitedNavigators?: Set<string>\n ) => boolean;\n addListener?: AddListener;\n addKeyedListener?: AddKeyedListener;\n onRouteFocus?: (key: string) => void;\n onDispatchAction: (action: NavigationAction, noop: boolean) => void;\n onOptionsChange: (options: object) => void;\n}>({\n onDispatchAction: () => undefined,\n onOptionsChange: () => undefined,\n});\n\nexport default NavigationBuilderContext;\n","// This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped\n// optimize the gzip compression for this alphabet.\nlet urlAlphabet =\n 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\n\nlet customAlphabet = (alphabet, size) => {\n return () => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\n\nlet nanoid = (size = 21) => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\n\nexport { nanoid, customAlphabet }\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport var STYLE_ELEMENT_ID = 'react-native-stylesheet';\nexport var STYLE_GROUPS = {\n reset: 0,\n modality: 0.1,\n classicReset: 0.5,\n classic: 1,\n atomic: 2.2,\n custom: {\n borderColor: 2,\n borderRadius: 2,\n borderStyle: 2,\n borderWidth: 2,\n display: 2,\n flex: 2,\n margin: 2,\n overflow: 2,\n overscrollBehavior: 2,\n padding: 2,\n marginHorizontal: 2.1,\n marginVertical: 2.1,\n paddingHorizontal: 2.1,\n paddingVertical: 2.1\n }\n};\nexport var STYLE_SHORT_FORM_EXPANSIONS = {\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n marginHorizontal: ['marginRight', 'marginLeft'],\n marginVertical: ['marginTop', 'marginBottom'],\n overflow: ['overflowX', 'overflowY'],\n overscrollBehavior: ['overscrollBehaviorX', 'overscrollBehaviorY'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n paddingHorizontal: ['paddingRight', 'paddingLeft'],\n paddingVertical: ['paddingTop', 'paddingBottom']\n};\nexport var MONOSPACE_FONT_STACK = 'monospace,monospace';\nexport var SYSTEM_FONT_STACK = '-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif';","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","'use strict';var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));var _objectWithoutProperties2=_interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));var _react=_interopRequireDefault(require(\"react\"));var _reactNative=require(\"react-native\");var _RNCSliderNativeComponent=_interopRequireDefault(require(\"./RNCSliderNativeComponent\"));var _jsxFileName=\"/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/Slider.js\";var SliderComponent=function SliderComponent(props,forwardedRef){var style=_reactNative.StyleSheet.compose(styles.slider,props.style);var onValueChange=props.onValueChange,onSlidingStart=props.onSlidingStart,onSlidingComplete=props.onSlidingComplete,localProps=(0,_objectWithoutProperties2.default)(props,[\"onValueChange\",\"onSlidingStart\",\"onSlidingComplete\"]);var onValueChangeEvent=onValueChange?function(event){var userEvent=true;if(_reactNative.Platform.OS==='android'){userEvent=event.nativeEvent.fromUser!=null&&event.nativeEvent.fromUser;}userEvent&&onValueChange(event.nativeEvent.value);}:null;var onChangeEvent=onValueChangeEvent;var onSlidingStartEvent=onSlidingStart?function(event){onSlidingStart(event.nativeEvent.value);}:null;var onSlidingCompleteEvent=onSlidingComplete?function(event){onSlidingComplete(event.nativeEvent.value);}:null;return _react.default.createElement(_RNCSliderNativeComponent.default,(0,_extends2.default)({},localProps,{thumbImage:_reactNative.Platform.OS==='web'?props.thumbImage:_reactNative.Image.resolveAssetSource(props.thumbImage),ref:forwardedRef,style:style,onChange:onChangeEvent,onRNCSliderSlidingStart:onSlidingStartEvent,onRNCSliderSlidingComplete:onSlidingCompleteEvent,onRNCSliderValueChange:onValueChangeEvent,enabled:!props.disabled,onStartShouldSetResponder:function onStartShouldSetResponder(){return true;},onResponderTerminationRequest:function onResponderTerminationRequest(){return false;},__source:{fileName:_jsxFileName,lineNumber:270}}));};var SliderWithRef=_react.default.forwardRef(SliderComponent);SliderWithRef.defaultProps={disabled:false,value:0,minimumValue:0,maximumValue:1,step:0,inverted:false};var styles;if(_reactNative.Platform.OS==='ios'){styles=_reactNative.StyleSheet.create({slider:{height:40}});}else{styles=_reactNative.StyleSheet.create({slider:{}});}var Slider=SliderWithRef;var _default=Slider;exports.default=_default;","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import * as React from 'react';\nimport type { Route } from '@react-navigation/routers';\n\n/**\n * Context which holds the route prop for a screen.\n */\nconst NavigationContext = React.createContext<Route<string> | undefined>(\n undefined\n);\n\nexport default NavigationContext;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from 'react';\nimport { useCallback, useMemo, useState, useRef } from 'react';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePressEvents from '../../modules/usePressEvents';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n\n/**\n * A wrapper for making views respond properly to touches.\n * On press down, the opacity of the wrapped view is decreased, dimming it.\n */\nfunction TouchableOpacity(props, forwardedRef) {\n var activeOpacity = props.activeOpacity,\n delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n delayLongPress = props.delayLongPress,\n disabled = props.disabled,\n focusable = props.focusable,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n rejectResponderTermination = props.rejectResponderTermination,\n style = props.style,\n rest = _objectWithoutPropertiesLoose(props, [\"activeOpacity\", \"delayPressIn\", \"delayPressOut\", \"delayLongPress\", \"disabled\", \"focusable\", \"onLongPress\", \"onPress\", \"onPressIn\", \"onPressOut\", \"rejectResponderTermination\", \"style\"]);\n\n var hostRef = useRef(null);\n var setRef = useMergeRefs(forwardedRef, hostRef);\n\n var _useState = useState('0s'),\n duration = _useState[0],\n setDuration = _useState[1];\n\n var _useState2 = useState(null),\n opacityOverride = _useState2[0],\n setOpacityOverride = _useState2[1];\n\n var setOpacityTo = useCallback(function (value, duration) {\n setOpacityOverride(value);\n setDuration(duration ? duration / 1000 + \"s\" : '0s');\n }, [setOpacityOverride, setDuration]);\n var setOpacityActive = useCallback(function (duration) {\n setOpacityTo(activeOpacity !== null && activeOpacity !== void 0 ? activeOpacity : 0.2, duration);\n }, [activeOpacity, setOpacityTo]);\n var setOpacityInactive = useCallback(function (duration) {\n setOpacityTo(null, duration);\n }, [setOpacityTo]);\n var pressConfig = useMemo(function () {\n return {\n cancelable: !rejectResponderTermination,\n disabled: disabled,\n delayLongPress: delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressStart: function onPressStart(event) {\n var isGrant = event.dispatchConfig != null ? event.dispatchConfig.registrationName === 'onResponderGrant' : event.type === 'keydown';\n setOpacityActive(isGrant ? 0 : 150);\n\n if (onPressIn != null) {\n onPressIn(event);\n }\n },\n onPressEnd: function onPressEnd(event) {\n setOpacityInactive(250);\n\n if (onPressOut != null) {\n onPressOut(event);\n }\n }\n };\n }, [delayLongPress, delayPressIn, delayPressOut, disabled, onLongPress, onPress, onPressIn, onPressOut, rejectResponderTermination, setOpacityActive, setOpacityInactive]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, pressEventHandlers, {\n accessibilityDisabled: disabled,\n focusable: !disabled && focusable !== false,\n ref: setRef,\n style: [styles.root, !disabled && styles.actionable, style, opacityOverride != null && {\n opacity: opacityOverride\n }, {\n transitionDuration: duration\n }]\n }));\n}\n\nvar styles = StyleSheet.create({\n root: {\n transitionProperty: 'opacity',\n transitionDuration: '0.15s',\n userSelect: 'none'\n },\n actionable: {\n cursor: 'pointer',\n touchAction: 'manipulation'\n }\n});\nvar MemoedTouchableOpacity = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(TouchableOpacity));\nMemoedTouchableOpacity.displayName = 'TouchableOpacity';\nexport default MemoedTouchableOpacity;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { findDOMNode } from 'react-dom';\n\nvar findNodeHandle = function findNodeHandle(component) {\n var node;\n\n try {\n node = findDOMNode(component);\n } catch (e) {}\n\n return node;\n};\n\nexport default findNodeHandle;","import { makeObservable } from \"mobx\";\nimport { useState } from \"react\";\nif (!useState) {\n throw new Error(\"mobx-react-lite requires React with Hooks support\");\n}\nif (!makeObservable) {\n throw new Error(\"mobx-react-lite@3 requires mobx at least version 6 to be available\");\n}\n//# sourceMappingURL=assertEnvironment.js.map","import { configure } from \"mobx\";\nexport function defaultNoopBatch(callback) {\n callback();\n}\nexport function observerBatching(reactionScheduler) {\n if (!reactionScheduler) {\n reactionScheduler = defaultNoopBatch;\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[MobX] Failed to get unstable_batched updates from react-dom / react-native\");\n }\n }\n configure({ reactionScheduler: reactionScheduler });\n}\nexport var isObserverBatched = function () {\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[MobX] Deprecated\");\n }\n return true;\n};\n//# sourceMappingURL=observerBatching.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { useCallback, useState } from \"react\";\nvar EMPTY_ARRAY = [];\nexport function useForceUpdate() {\n var _a = __read(useState(0), 2), setTick = _a[1];\n var update = useCallback(function () {\n setTick(function (tick) { return tick + 1; });\n }, EMPTY_ARRAY);\n return update;\n}\nvar deprecatedMessages = [];\nexport function useDeprecated(msg) {\n if (!deprecatedMessages.includes(msg)) {\n deprecatedMessages.push(msg);\n console.warn(msg);\n }\n}\n//# sourceMappingURL=utils.js.map","import { getDependencyTree } from \"mobx\";\nexport function printDebugValue(v) {\n return getDependencyTree(v);\n}\n//# sourceMappingURL=printDebugValue.js.map","var FinalizationRegistryLocal = typeof FinalizationRegistry === \"undefined\" ? undefined : FinalizationRegistry;\nexport { FinalizationRegistryLocal as FinalizationRegistry };\n//# sourceMappingURL=FinalizationRegistryWrapper.js.map","export function createTrackingData(reaction) {\n var trackingData = {\n reaction: reaction,\n mounted: false,\n changedBeforeMount: false,\n cleanAt: Date.now() + CLEANUP_LEAKED_REACTIONS_AFTER_MILLIS\n };\n return trackingData;\n}\n/**\n * The minimum time before we'll clean up a Reaction created in a render\n * for a component that hasn't managed to run its effects. This needs to\n * be big enough to ensure that a component won't turn up and have its\n * effects run without being re-rendered.\n */\nexport var CLEANUP_LEAKED_REACTIONS_AFTER_MILLIS = 10000;\n/**\n * The frequency with which we'll check for leaked reactions.\n */\nexport var CLEANUP_TIMER_LOOP_MILLIS = 10000;\n//# sourceMappingURL=reactionCleanupTrackingCommon.js.map","var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { CLEANUP_TIMER_LOOP_MILLIS, createTrackingData } from \"./reactionCleanupTrackingCommon\";\n/**\n * timers, gc-style, uncommitted reaction cleanup\n */\nexport function createTimerBasedReactionCleanupTracking() {\n /**\n * Reactions created by components that have yet to be fully mounted.\n */\n var uncommittedReactionRefs = new Set();\n /**\n * Latest 'uncommitted reactions' cleanup timer handle.\n */\n var reactionCleanupHandle;\n /* istanbul ignore next */\n /**\n * Only to be used by test functions; do not export outside of mobx-react-lite\n */\n function forceCleanupTimerToRunNowForTests() {\n // This allows us to control the execution of the cleanup timer\n // to force it to run at awkward times in unit tests.\n if (reactionCleanupHandle) {\n clearTimeout(reactionCleanupHandle);\n cleanUncommittedReactions();\n }\n }\n /* istanbul ignore next */\n function resetCleanupScheduleForTests() {\n var e_1, _a;\n if (uncommittedReactionRefs.size > 0) {\n try {\n for (var uncommittedReactionRefs_1 = __values(uncommittedReactionRefs), uncommittedReactionRefs_1_1 = uncommittedReactionRefs_1.next(); !uncommittedReactionRefs_1_1.done; uncommittedReactionRefs_1_1 = uncommittedReactionRefs_1.next()) {\n var ref = uncommittedReactionRefs_1_1.value;\n var tracking = ref.current;\n if (tracking) {\n tracking.reaction.dispose();\n ref.current = null;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (uncommittedReactionRefs_1_1 && !uncommittedReactionRefs_1_1.done && (_a = uncommittedReactionRefs_1.return)) _a.call(uncommittedReactionRefs_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n uncommittedReactionRefs.clear();\n }\n if (reactionCleanupHandle) {\n clearTimeout(reactionCleanupHandle);\n reactionCleanupHandle = undefined;\n }\n }\n function ensureCleanupTimerRunning() {\n if (reactionCleanupHandle === undefined) {\n reactionCleanupHandle = setTimeout(cleanUncommittedReactions, CLEANUP_TIMER_LOOP_MILLIS);\n }\n }\n function scheduleCleanupOfReactionIfLeaked(ref) {\n uncommittedReactionRefs.add(ref);\n ensureCleanupTimerRunning();\n }\n function recordReactionAsCommitted(reactionRef) {\n uncommittedReactionRefs.delete(reactionRef);\n }\n /**\n * Run by the cleanup timer to dispose any outstanding reactions\n */\n function cleanUncommittedReactions() {\n reactionCleanupHandle = undefined;\n // Loop through all the candidate leaked reactions; those older\n // than CLEANUP_LEAKED_REACTIONS_AFTER_MILLIS get tidied.\n var now = Date.now();\n uncommittedReactionRefs.forEach(function (ref) {\n var tracking = ref.current;\n if (tracking) {\n if (now >= tracking.cleanAt) {\n // It's time to tidy up this leaked reaction.\n tracking.reaction.dispose();\n ref.current = null;\n uncommittedReactionRefs.delete(ref);\n }\n }\n });\n if (uncommittedReactionRefs.size > 0) {\n // We've just finished a round of cleanups but there are still\n // some leak candidates outstanding.\n ensureCleanupTimerRunning();\n }\n }\n return {\n addReactionToTrack: function (reactionTrackingRef, reaction, \n /**\n * On timer based implementation we don't really need this object,\n * but we keep the same api\n */\n objectRetainedByReact) {\n reactionTrackingRef.current = createTrackingData(reaction);\n scheduleCleanupOfReactionIfLeaked(reactionTrackingRef);\n return reactionTrackingRef.current;\n },\n recordReactionAsCommitted: recordReactionAsCommitted,\n forceCleanupTimerToRunNowForTests: forceCleanupTimerToRunNowForTests,\n resetCleanupScheduleForTests: resetCleanupScheduleForTests\n };\n}\n//# sourceMappingURL=createTimerBasedReactionCleanupTracking.js.map","import { FinalizationRegistry as FinalizationRegistryMaybeUndefined } from \"./FinalizationRegistryWrapper\";\nimport { createReactionCleanupTrackingUsingFinalizationRegister } from \"./createReactionCleanupTrackingUsingFinalizationRegister\";\nimport { createTimerBasedReactionCleanupTracking } from \"./createTimerBasedReactionCleanupTracking\";\nvar _a = FinalizationRegistryMaybeUndefined\n ? createReactionCleanupTrackingUsingFinalizationRegister(FinalizationRegistryMaybeUndefined)\n : createTimerBasedReactionCleanupTracking(), addReactionToTrack = _a.addReactionToTrack, recordReactionAsCommitted = _a.recordReactionAsCommitted, resetCleanupScheduleForTests = _a.resetCleanupScheduleForTests, forceCleanupTimerToRunNowForTests = _a.forceCleanupTimerToRunNowForTests;\nexport { addReactionToTrack, recordReactionAsCommitted, resetCleanupScheduleForTests, forceCleanupTimerToRunNowForTests };\n//# sourceMappingURL=reactionCleanupTracking.js.map","import { createTrackingData } from \"./reactionCleanupTrackingCommon\";\n/**\n * FinalizationRegistry-based uncommitted reaction cleanup\n */\nexport function createReactionCleanupTrackingUsingFinalizationRegister(FinalizationRegistry) {\n var cleanupTokenToReactionTrackingMap = new Map();\n var globalCleanupTokensCounter = 1;\n var registry = new FinalizationRegistry(function cleanupFunction(token) {\n var trackedReaction = cleanupTokenToReactionTrackingMap.get(token);\n if (trackedReaction) {\n trackedReaction.reaction.dispose();\n cleanupTokenToReactionTrackingMap.delete(token);\n }\n });\n return {\n addReactionToTrack: function (reactionTrackingRef, reaction, objectRetainedByReact) {\n var token = globalCleanupTokensCounter++;\n registry.register(objectRetainedByReact, token, reactionTrackingRef);\n reactionTrackingRef.current = createTrackingData(reaction);\n reactionTrackingRef.current.finalizationRegistryCleanupToken = token;\n cleanupTokenToReactionTrackingMap.set(token, reactionTrackingRef.current);\n return reactionTrackingRef.current;\n },\n recordReactionAsCommitted: function (reactionRef) {\n registry.unregister(reactionRef);\n if (reactionRef.current && reactionRef.current.finalizationRegistryCleanupToken) {\n cleanupTokenToReactionTrackingMap.delete(reactionRef.current.finalizationRegistryCleanupToken);\n }\n },\n forceCleanupTimerToRunNowForTests: function () {\n // When FinalizationRegistry in use, this this is no-op\n },\n resetCleanupScheduleForTests: function () {\n // When FinalizationRegistry in use, this this is no-op\n }\n };\n}\n//# sourceMappingURL=createReactionCleanupTrackingUsingFinalizationRegister.js.map","var globalIsUsingStaticRendering = false;\nexport function enableStaticRendering(enable) {\n globalIsUsingStaticRendering = enable;\n}\nexport function isUsingStaticRendering() {\n return globalIsUsingStaticRendering;\n}\n//# sourceMappingURL=staticRendering.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { Reaction } from \"mobx\";\nimport React from \"react\";\nimport { printDebugValue } from \"./utils/printDebugValue\";\nimport { addReactionToTrack, recordReactionAsCommitted } from \"./utils/reactionCleanupTracking\";\nimport { isUsingStaticRendering } from \"./staticRendering\";\nimport { useForceUpdate } from \"./utils/utils\";\nfunction observerComponentNameFor(baseComponentName) {\n return \"observer\" + baseComponentName;\n}\n/**\n * We use class to make it easier to detect in heap snapshots by name\n */\nvar ObjectToBeRetainedByReact = /** @class */ (function () {\n function ObjectToBeRetainedByReact() {\n }\n return ObjectToBeRetainedByReact;\n}());\nexport function useObserver(fn, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if (isUsingStaticRendering()) {\n return fn();\n }\n var _a = __read(React.useState(new ObjectToBeRetainedByReact()), 1), objectRetainedByReact = _a[0];\n var forceUpdate = useForceUpdate();\n // StrictMode/ConcurrentMode/Suspense may mean that our component is\n // rendered and abandoned multiple times, so we need to track leaked\n // Reactions.\n var reactionTrackingRef = React.useRef(null);\n if (!reactionTrackingRef.current) {\n // First render for this component (or first time since a previous\n // reaction from an abandoned render was disposed).\n var newReaction = new Reaction(observerComponentNameFor(baseComponentName), function () {\n // Observable has changed, meaning we want to re-render\n // BUT if we're a component that hasn't yet got to the useEffect()\n // stage, we might be a component that _started_ to render, but\n // got dropped, and we don't want to make state changes then.\n // (It triggers warnings in StrictMode, for a start.)\n if (trackingData_1.mounted) {\n // We have reached useEffect(), so we're mounted, and can trigger an update\n forceUpdate();\n }\n else {\n // We haven't yet reached useEffect(), so we'll need to trigger a re-render\n // when (and if) useEffect() arrives.\n trackingData_1.changedBeforeMount = true;\n }\n });\n var trackingData_1 = addReactionToTrack(reactionTrackingRef, newReaction, objectRetainedByReact);\n }\n var reaction = reactionTrackingRef.current.reaction;\n React.useDebugValue(reaction, printDebugValue);\n React.useEffect(function () {\n // Called on first mount only\n recordReactionAsCommitted(reactionTrackingRef);\n if (reactionTrackingRef.current) {\n // Great. We've already got our reaction from our render;\n // all we need to do is to record that it's now mounted,\n // to allow future observable changes to trigger re-renders\n reactionTrackingRef.current.mounted = true;\n // Got a change before first mount, force an update\n if (reactionTrackingRef.current.changedBeforeMount) {\n reactionTrackingRef.current.changedBeforeMount = false;\n forceUpdate();\n }\n }\n else {\n // The reaction we set up in our render has been disposed.\n // This can be due to bad timings of renderings, e.g. our\n // component was paused for a _very_ long time, and our\n // reaction got cleaned up\n // Re-create the reaction\n reactionTrackingRef.current = {\n reaction: new Reaction(observerComponentNameFor(baseComponentName), function () {\n // We've definitely already been mounted at this point\n forceUpdate();\n }),\n mounted: true,\n changedBeforeMount: false,\n cleanAt: Infinity\n };\n forceUpdate();\n }\n return function () {\n reactionTrackingRef.current.reaction.dispose();\n reactionTrackingRef.current = null;\n };\n }, []);\n // render the original component, but have the\n // reaction track the observables, so that rendering\n // can be invalidated (see above) once a dependency changes\n var rendering;\n var exception;\n reaction.track(function () {\n try {\n rendering = fn();\n }\n catch (e) {\n exception = e;\n }\n });\n if (exception) {\n throw exception; // re-throw any exceptions caught during rendering\n }\n return rendering;\n}\n//# sourceMappingURL=useObserver.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { forwardRef, memo } from \"react\";\nimport { isUsingStaticRendering } from \"./staticRendering\";\nimport { useObserver } from \"./useObserver\";\n// n.b. base case is not used for actual typings or exported in the typing files\nexport function observer(baseComponent, options) {\n // The working of observer is explained step by step in this talk: https://www.youtube.com/watch?v=cPF4iBedoF0&feature=youtu.be&t=1307\n if (isUsingStaticRendering()) {\n return baseComponent;\n }\n var realOptions = __assign({ forwardRef: false }, options);\n var baseComponentName = baseComponent.displayName || baseComponent.name;\n var wrappedComponent = function (props, ref) {\n return useObserver(function () { return baseComponent(props, ref); }, baseComponentName);\n };\n wrappedComponent.displayName = baseComponentName;\n // memo; we are not interested in deep updates\n // in props; we assume that if deep objects are changed,\n // this is in observables, which would have been tracked anyway\n var memoComponent;\n if (realOptions.forwardRef) {\n // we have to use forwardRef here because:\n // 1. it cannot go before memo, only after it\n // 2. forwardRef converts the function into an actual component, so we can't let the baseComponent do it\n // since it wouldn't be a callable function anymore\n memoComponent = memo(forwardRef(wrappedComponent));\n }\n else {\n memoComponent = memo(wrappedComponent);\n }\n copyStaticProperties(baseComponent, memoComponent);\n memoComponent.displayName = baseComponentName;\n return memoComponent;\n}\n// based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js\nvar hoistBlackList = {\n $$typeof: true,\n render: true,\n compare: true,\n type: true\n};\nfunction copyStaticProperties(base, target) {\n Object.keys(base).forEach(function (key) {\n if (!hoistBlackList[key]) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(base, key));\n }\n });\n}\n//# sourceMappingURL=observer.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { useDeprecated } from \"./utils/utils\";\nimport { observable, runInAction } from \"mobx\";\nimport { useState } from \"react\";\nexport function useAsObservableSource(current) {\n if (\"production\" !== process.env.NODE_ENV)\n useDeprecated(\"[mobx-react-lite] 'useAsObservableSource' is deprecated, please store the values directly in an observable, for example by using 'useLocalObservable', and sync future updates using 'useEffect' when needed. See the README for examples.\");\n var _a = __read(useState(function () { return observable(current, {}, { deep: false }); }), 1), res = _a[0];\n runInAction(function () {\n Object.assign(res, current);\n });\n return res;\n}\n//# sourceMappingURL=useAsObservableSource.js.map","import \"./utils/assertEnvironment\";\nimport { unstable_batchedUpdates as batch } from \"./utils/reactBatchedUpdates\";\nimport { observerBatching } from \"./utils/observerBatching\";\nimport { useDeprecated } from \"./utils/utils\";\nimport { useObserver as useObserverOriginal } from \"./useObserver\";\nimport { enableStaticRendering } from \"./staticRendering\";\nobserverBatching(batch);\nexport { isUsingStaticRendering, enableStaticRendering } from \"./staticRendering\";\nexport { observer } from \"./observer\";\nexport { Observer } from \"./ObserverComponent\";\nexport { useLocalObservable } from \"./useLocalObservable\";\nexport { useLocalStore } from \"./useLocalStore\";\nexport { useAsObservableSource } from \"./useAsObservableSource\";\nexport { resetCleanupScheduleForTests as clearTimers } from \"./utils/reactionCleanupTracking\";\nexport function useObserver(fn, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if (\"production\" !== process.env.NODE_ENV) {\n useDeprecated(\"[mobx-react-lite] 'useObserver(fn)' is deprecated. Use `<Observer>{fn}</Observer>` instead, or wrap the entire component in `observer`.\");\n }\n return useObserverOriginal(fn, baseComponentName);\n}\nexport { isObserverBatched, observerBatching } from \"./utils/observerBatching\";\nexport function useStaticRendering(enable) {\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[mobx-react-lite] 'useStaticRendering' is deprecated, use 'enableStaticRendering' instead\");\n }\n enableStaticRendering(enable);\n}\n//# sourceMappingURL=index.js.map","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport unitlessNumbers from '../../modules/unitlessNumbers';\nimport normalizeColor from '../../modules/normalizeColor';\nvar colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true\n};\nexport default function normalizeValueWithProperty(value, property) {\n var returnValue = value;\n\n if ((property == null || !unitlessNumbers[property]) && typeof value === 'number') {\n returnValue = value + \"px\";\n } else if (property != null && colorProps[property]) {\n returnValue = normalizeColor(value);\n }\n\n return returnValue;\n}","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport Dimensions from '../../exports/Dimensions';\nimport findNodeHandle from '../../exports/findNodeHandle';\nimport invariant from 'fbjs/lib/invariant';\nimport Platform from '../../exports/Platform';\nimport TextInputState from '../TextInputState';\nimport UIManager from '../../exports/UIManager';\nimport warning from 'fbjs/lib/warning';\n/**\n * Mixin that can be integrated in order to handle scrolling that plays well\n * with `ResponderEventPlugin`. Integrate with your platform specific scroll\n * views, or even your custom built (every-frame animating) scroll views so that\n * all of these systems play well with the `ResponderEventPlugin`.\n *\n * iOS scroll event timing nuances:\n * ===============================\n *\n *\n * Scrolling without bouncing, if you touch down:\n * -------------------------------\n *\n * 1. `onMomentumScrollBegin` (when animation begins after letting up)\n * ... physical touch starts ...\n * 2. `onTouchStartCapture` (when you press down to stop the scroll)\n * 3. `onTouchStart` (same, but bubble phase)\n * 4. `onResponderRelease` (when lifting up - you could pause forever before * lifting)\n * 5. `onMomentumScrollEnd`\n *\n *\n * Scrolling with bouncing, if you touch down:\n * -------------------------------\n *\n * 1. `onMomentumScrollBegin` (when animation begins after letting up)\n * ... bounce begins ...\n * ... some time elapses ...\n * ... physical touch during bounce ...\n * 2. `onMomentumScrollEnd` (Makes no sense why this occurs first during bounce)\n * 3. `onTouchStartCapture` (immediately after `onMomentumScrollEnd`)\n * 4. `onTouchStart` (same, but bubble phase)\n * 5. `onTouchEnd` (You could hold the touch start for a long time)\n * 6. `onMomentumScrollBegin` (When releasing the view starts bouncing back)\n *\n * So when we receive an `onTouchStart`, how can we tell if we are touching\n * *during* an animation (which then causes the animation to stop)? The only way\n * to tell is if the `touchStart` occurred immediately after the\n * `onMomentumScrollEnd`.\n *\n * This is abstracted out for you, so you can just call this.scrollResponderIsAnimating() if\n * necessary\n *\n * `ScrollResponder` also includes logic for blurring a currently focused input\n * if one is focused while scrolling. The `ScrollResponder` is a natural place\n * to put this logic since it can support not dismissing the keyboard while\n * scrolling, unless a recognized \"tap\"-like gesture has occurred.\n *\n * The public lifecycle API includes events for keyboard interaction, responder\n * interaction, and scrolling (among others). The keyboard callbacks\n * `onKeyboardWill/Did/*` are *global* events, but are invoked on scroll\n * responder's props so that you can guarantee that the scroll responder's\n * internal state has been updated accordingly (and deterministically) by\n * the time the props callbacks are invoke. Otherwise, you would always wonder\n * if the scroll responder is currently in a state where it recognizes new\n * keyboard positions etc. If coordinating scrolling with keyboard movement,\n * *always* use these hooks instead of listening to your own global keyboard\n * events.\n *\n * Public keyboard lifecycle API: (props callbacks)\n *\n * Standard Keyboard Appearance Sequence:\n *\n * this.props.onKeyboardWillShow\n * this.props.onKeyboardDidShow\n *\n * `onScrollResponderKeyboardDismissed` will be invoked if an appropriate\n * tap inside the scroll responder's scrollable region was responsible\n * for the dismissal of the keyboard. There are other reasons why the\n * keyboard could be dismissed.\n *\n * this.props.onScrollResponderKeyboardDismissed\n *\n * Standard Keyboard Hide Sequence:\n *\n * this.props.onKeyboardWillHide\n * this.props.onKeyboardDidHide\n */\n\nvar emptyObject = {};\nvar IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;\nvar ScrollResponderMixin = {\n // mixins: [Subscribable.Mixin],\n scrollResponderMixinGetInitialState: function scrollResponderMixinGetInitialState() {\n return {\n isTouching: false,\n lastMomentumScrollBeginTime: 0,\n lastMomentumScrollEndTime: 0,\n // Reset to false every time becomes responder. This is used to:\n // - Determine if the scroll view has been scrolled and therefore should\n // refuse to give up its responder lock.\n // - Determine if releasing should dismiss the keyboard when we are in\n // tap-to-dismiss mode (!this.props.keyboardShouldPersistTaps).\n observedScrollSinceBecomingResponder: false,\n becameResponderWhileAnimating: false\n };\n },\n\n /**\n * Invoke this from an `onScroll` event.\n */\n scrollResponderHandleScrollShouldSetResponder: function scrollResponderHandleScrollShouldSetResponder() {\n return this.state.isTouching;\n },\n\n /**\n * Merely touch starting is not sufficient for a scroll view to become the\n * responder. Being the \"responder\" means that the very next touch move/end\n * event will result in an action/movement.\n *\n * Invoke this from an `onStartShouldSetResponder` event.\n *\n * `onStartShouldSetResponder` is used when the next move/end will trigger\n * some UI movement/action, but when you want to yield priority to views\n * nested inside of the view.\n *\n * There may be some cases where scroll views actually should return `true`\n * from `onStartShouldSetResponder`: Any time we are detecting a standard tap\n * that gives priority to nested views.\n *\n * - If a single tap on the scroll view triggers an action such as\n * recentering a map style view yet wants to give priority to interaction\n * views inside (such as dropped pins or labels), then we would return true\n * from this method when there is a single touch.\n *\n * - Similar to the previous case, if a two finger \"tap\" should trigger a\n * zoom, we would check the `touches` count, and if `>= 2`, we would return\n * true.\n *\n */\n scrollResponderHandleStartShouldSetResponder: function scrollResponderHandleStartShouldSetResponder() {\n return false;\n },\n\n /**\n * There are times when the scroll view wants to become the responder\n * (meaning respond to the next immediate `touchStart/touchEnd`), in a way\n * that *doesn't* give priority to nested views (hence the capture phase):\n *\n * - Currently animating.\n * - Tapping anywhere that is not the focused input, while the keyboard is\n * up (which should dismiss the keyboard).\n *\n * Invoke this from an `onStartShouldSetResponderCapture` event.\n */\n scrollResponderHandleStartShouldSetResponderCapture: function scrollResponderHandleStartShouldSetResponderCapture(e) {\n // First see if we want to eat taps while the keyboard is up\n // var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();\n // if (!this.props.keyboardShouldPersistTaps &&\n // currentlyFocusedTextInput != null &&\n // e.target !== currentlyFocusedTextInput) {\n // return true;\n // }\n return this.scrollResponderIsAnimating();\n },\n\n /**\n * Invoke this from an `onResponderReject` event.\n *\n * Some other element is not yielding its role as responder. Normally, we'd\n * just disable the `UIScrollView`, but a touch has already began on it, the\n * `UIScrollView` will not accept being disabled after that. The easiest\n * solution for now is to accept the limitation of disallowing this\n * altogether. To improve this, find a way to disable the `UIScrollView` after\n * a touch has already started.\n */\n scrollResponderHandleResponderReject: function scrollResponderHandleResponderReject() {\n warning(false, \"ScrollView doesn't take rejection well - scrolls anyway\");\n },\n\n /**\n * We will allow the scroll view to give up its lock iff it acquired the lock\n * during an animation. This is a very useful default that happens to satisfy\n * many common user experiences.\n *\n * - Stop a scroll on the left edge, then turn that into an outer view's\n * backswipe.\n * - Stop a scroll mid-bounce at the top, continue pulling to have the outer\n * view dismiss.\n * - However, without catching the scroll view mid-bounce (while it is\n * motionless), if you drag far enough for the scroll view to become\n * responder (and therefore drag the scroll view a bit), any backswipe\n * navigation of a swipe gesture higher in the view hierarchy, should be\n * rejected.\n */\n scrollResponderHandleTerminationRequest: function scrollResponderHandleTerminationRequest() {\n return !this.state.observedScrollSinceBecomingResponder;\n },\n\n /**\n * Invoke this from an `onTouchEnd` event.\n *\n * @param {SyntheticEvent} e Event.\n */\n scrollResponderHandleTouchEnd: function scrollResponderHandleTouchEnd(e) {\n var nativeEvent = e.nativeEvent;\n this.state.isTouching = nativeEvent.touches.length !== 0;\n this.props.onTouchEnd && this.props.onTouchEnd(e);\n },\n\n /**\n * Invoke this from an `onResponderRelease` event.\n */\n scrollResponderHandleResponderRelease: function scrollResponderHandleResponderRelease(e) {\n this.props.onResponderRelease && this.props.onResponderRelease(e); // By default scroll views will unfocus a textField\n // if another touch occurs outside of it\n\n var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();\n\n if (!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput && !this.state.observedScrollSinceBecomingResponder && !this.state.becameResponderWhileAnimating) {\n this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e);\n TextInputState.blurTextInput(currentlyFocusedTextInput);\n }\n },\n scrollResponderHandleScroll: function scrollResponderHandleScroll(e) {\n this.state.observedScrollSinceBecomingResponder = true;\n this.props.onScroll && this.props.onScroll(e);\n },\n\n /**\n * Invoke this from an `onResponderGrant` event.\n */\n scrollResponderHandleResponderGrant: function scrollResponderHandleResponderGrant(e) {\n this.state.observedScrollSinceBecomingResponder = false;\n this.props.onResponderGrant && this.props.onResponderGrant(e);\n this.state.becameResponderWhileAnimating = this.scrollResponderIsAnimating();\n },\n\n /**\n * Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll\n * animation, and there's not an easy way to distinguish a drag vs. stopping\n * momentum.\n *\n * Invoke this from an `onScrollBeginDrag` event.\n */\n scrollResponderHandleScrollBeginDrag: function scrollResponderHandleScrollBeginDrag(e) {\n this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);\n },\n\n /**\n * Invoke this from an `onScrollEndDrag` event.\n */\n scrollResponderHandleScrollEndDrag: function scrollResponderHandleScrollEndDrag(e) {\n this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);\n },\n\n /**\n * Invoke this from an `onMomentumScrollBegin` event.\n */\n scrollResponderHandleMomentumScrollBegin: function scrollResponderHandleMomentumScrollBegin(e) {\n this.state.lastMomentumScrollBeginTime = Date.now();\n this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);\n },\n\n /**\n * Invoke this from an `onMomentumScrollEnd` event.\n */\n scrollResponderHandleMomentumScrollEnd: function scrollResponderHandleMomentumScrollEnd(e) {\n this.state.lastMomentumScrollEndTime = Date.now();\n this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);\n },\n\n /**\n * Invoke this from an `onTouchStart` event.\n *\n * Since we know that the `SimpleEventPlugin` occurs later in the plugin\n * order, after `ResponderEventPlugin`, we can detect that we were *not*\n * permitted to be the responder (presumably because a contained view became\n * responder). The `onResponderReject` won't fire in that case - it only\n * fires when a *current* responder rejects our request.\n *\n * @param {SyntheticEvent} e Touch Start event.\n */\n scrollResponderHandleTouchStart: function scrollResponderHandleTouchStart(e) {\n this.state.isTouching = true;\n this.props.onTouchStart && this.props.onTouchStart(e);\n },\n\n /**\n * Invoke this from an `onTouchMove` event.\n *\n * Since we know that the `SimpleEventPlugin` occurs later in the plugin\n * order, after `ResponderEventPlugin`, we can detect that we were *not*\n * permitted to be the responder (presumably because a contained view became\n * responder). The `onResponderReject` won't fire in that case - it only\n * fires when a *current* responder rejects our request.\n *\n * @param {SyntheticEvent} e Touch Start event.\n */\n scrollResponderHandleTouchMove: function scrollResponderHandleTouchMove(e) {\n this.props.onTouchMove && this.props.onTouchMove(e);\n },\n\n /**\n * A helper function for this class that lets us quickly determine if the\n * view is currently animating. This is particularly useful to know when\n * a touch has just started or ended.\n */\n scrollResponderIsAnimating: function scrollResponderIsAnimating() {\n var now = Date.now();\n var timeSinceLastMomentumScrollEnd = now - this.state.lastMomentumScrollEndTime;\n var isAnimating = timeSinceLastMomentumScrollEnd < IS_ANIMATING_TOUCH_START_THRESHOLD_MS || this.state.lastMomentumScrollEndTime < this.state.lastMomentumScrollBeginTime;\n return isAnimating;\n },\n\n /**\n * Returns the node that represents native view that can be scrolled.\n * Components can pass what node to use by defining a `getScrollableNode`\n * function otherwise `this` is used.\n */\n scrollResponderGetScrollableNode: function scrollResponderGetScrollableNode() {\n return this.getScrollableNode ? this.getScrollableNode() : findNodeHandle(this);\n },\n\n /**\n * A helper function to scroll to a specific point in the scrollview.\n * This is currently used to help focus on child textviews, but can also\n * be used to quickly scroll to any element we want to focus. Syntax:\n *\n * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})\n *\n * Note: The weird argument signature is due to the fact that, for historical reasons,\n * the function also accepts separate arguments as as alternative to the options object.\n * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.\n */\n scrollResponderScrollTo: function scrollResponderScrollTo(x, y, animated) {\n if (typeof x === 'number') {\n console.warn('`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.');\n } else {\n var _ref = x || emptyObject;\n\n x = _ref.x;\n y = _ref.y;\n animated = _ref.animated;\n }\n\n var node = this.scrollResponderGetScrollableNode();\n var left = x || 0;\n var top = y || 0;\n\n if (typeof node.scroll === 'function') {\n node.scroll({\n top: top,\n left: left,\n behavior: !animated ? 'auto' : 'smooth'\n });\n } else {\n node.scrollLeft = left;\n node.scrollTop = top;\n }\n },\n\n /**\n * A helper function to zoom to a specific rect in the scrollview. The argument has the shape\n * {x: number; y: number; width: number; height: number; animated: boolean = true}\n *\n * @platform ios\n */\n scrollResponderZoomTo: function scrollResponderZoomTo(rect, animated) // deprecated, put this inside the rect argument instead\n {\n if (Platform.OS !== 'ios') {\n invariant('zoomToRect is not implemented');\n }\n },\n\n /**\n * Displays the scroll indicators momentarily.\n */\n scrollResponderFlashScrollIndicators: function scrollResponderFlashScrollIndicators() {},\n\n /**\n * This method should be used as the callback to onFocus in a TextInputs'\n * parent view. Note that any module using this mixin needs to return\n * the parent view's ref in getScrollViewRef() in order to use this method.\n * @param {any} nodeHandle The TextInput node handle\n * @param {number} additionalOffset The scroll view's top \"contentInset\".\n * Default is 0.\n * @param {bool} preventNegativeScrolling Whether to allow pulling the content\n * down to make it meet the keyboard's top. Default is false.\n */\n scrollResponderScrollNativeHandleToKeyboard: function scrollResponderScrollNativeHandleToKeyboard(nodeHandle, additionalOffset, preventNegativeScrollOffset) {\n this.additionalScrollOffset = additionalOffset || 0;\n this.preventNegativeScrollOffset = !!preventNegativeScrollOffset;\n UIManager.measureLayout(nodeHandle, findNodeHandle(this.getInnerViewNode()), this.scrollResponderTextInputFocusError, this.scrollResponderInputMeasureAndScrollToKeyboard);\n },\n\n /**\n * The calculations performed here assume the scroll view takes up the entire\n * screen - even if has some content inset. We then measure the offsets of the\n * keyboard, and compensate both for the scroll view's \"contentInset\".\n *\n * @param {number} left Position of input w.r.t. table view.\n * @param {number} top Position of input w.r.t. table view.\n * @param {number} width Width of the text input.\n * @param {number} height Height of the text input.\n */\n scrollResponderInputMeasureAndScrollToKeyboard: function scrollResponderInputMeasureAndScrollToKeyboard(left, top, width, height) {\n var keyboardScreenY = Dimensions.get('window').height;\n\n if (this.keyboardWillOpenTo) {\n keyboardScreenY = this.keyboardWillOpenTo.endCoordinates.screenY;\n }\n\n var scrollOffsetY = top - keyboardScreenY + height + this.additionalScrollOffset; // By default, this can scroll with negative offset, pulling the content\n // down so that the target component's bottom meets the keyboard's top.\n // If requested otherwise, cap the offset at 0 minimum to avoid content\n // shifting down.\n\n if (this.preventNegativeScrollOffset) {\n scrollOffsetY = Math.max(0, scrollOffsetY);\n }\n\n this.scrollResponderScrollTo({\n x: 0,\n y: scrollOffsetY,\n animated: true\n });\n this.additionalOffset = 0;\n this.preventNegativeScrollOffset = false;\n },\n scrollResponderTextInputFocusError: function scrollResponderTextInputFocusError(e) {\n console.error('Error measuring text field: ', e);\n },\n\n /**\n * `componentWillMount` is the closest thing to a standard \"constructor\" for\n * React components.\n *\n * The `keyboardWillShow` is called before input focus.\n */\n UNSAFE_componentWillMount: function UNSAFE_componentWillMount() {\n this.keyboardWillOpenTo = null;\n this.additionalScrollOffset = 0; // this.addListenerOn(RCTDeviceEventEmitter, 'keyboardWillShow', this.scrollResponderKeyboardWillShow);\n // this.addListenerOn(RCTDeviceEventEmitter, 'keyboardWillHide', this.scrollResponderKeyboardWillHide);\n // this.addListenerOn(RCTDeviceEventEmitter, 'keyboardDidShow', this.scrollResponderKeyboardDidShow);\n // this.addListenerOn(RCTDeviceEventEmitter, 'keyboardDidHide', this.scrollResponderKeyboardDidHide);\n },\n\n /**\n * Warning, this may be called several times for a single keyboard opening.\n * It's best to store the information in this method and then take any action\n * at a later point (either in `keyboardDidShow` or other).\n *\n * Here's the order that events occur in:\n * - focus\n * - willShow {startCoordinates, endCoordinates} several times\n * - didShow several times\n * - blur\n * - willHide {startCoordinates, endCoordinates} several times\n * - didHide several times\n *\n * The `ScrollResponder` providesModule callbacks for each of these events.\n * Even though any user could have easily listened to keyboard events\n * themselves, using these `props` callbacks ensures that ordering of events\n * is consistent - and not dependent on the order that the keyboard events are\n * subscribed to. This matters when telling the scroll view to scroll to where\n * the keyboard is headed - the scroll responder better have been notified of\n * the keyboard destination before being instructed to scroll to where the\n * keyboard will be. Stick to the `ScrollResponder` callbacks, and everything\n * will work.\n *\n * WARNING: These callbacks will fire even if a keyboard is displayed in a\n * different navigation pane. Filter out the events to determine if they are\n * relevant to you. (For example, only if you receive these callbacks after\n * you had explicitly focused a node etc).\n */\n scrollResponderKeyboardWillShow: function scrollResponderKeyboardWillShow(e) {\n this.keyboardWillOpenTo = e;\n this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);\n },\n scrollResponderKeyboardWillHide: function scrollResponderKeyboardWillHide(e) {\n this.keyboardWillOpenTo = null;\n this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e);\n },\n scrollResponderKeyboardDidShow: function scrollResponderKeyboardDidShow(e) {\n // TODO(7693961): The event for DidShow is not available on iOS yet.\n // Use the one from WillShow and do not assign.\n if (e) {\n this.keyboardWillOpenTo = e;\n }\n\n this.props.onKeyboardDidShow && this.props.onKeyboardDidShow(e);\n },\n scrollResponderKeyboardDidHide: function scrollResponderKeyboardDidHide(e) {\n this.keyboardWillOpenTo = null;\n this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(e);\n }\n};\nvar ScrollResponder = {\n Mixin: ScrollResponderMixin\n};\nexport default ScrollResponder;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nimport useMergeRefs from '../../modules/useMergeRefs';\n\nfunction normalizeScrollEvent(e) {\n return {\n nativeEvent: {\n contentOffset: {\n get x() {\n return e.target.scrollLeft;\n },\n\n get y() {\n return e.target.scrollTop;\n }\n\n },\n contentSize: {\n get height() {\n return e.target.scrollHeight;\n },\n\n get width() {\n return e.target.scrollWidth;\n }\n\n },\n layoutMeasurement: {\n get height() {\n return e.target.offsetHeight;\n },\n\n get width() {\n return e.target.offsetWidth;\n }\n\n }\n },\n timeStamp: Date.now()\n };\n}\n\nfunction shouldEmitScrollEvent(lastTick, eventThrottle) {\n var timeSinceLastTick = Date.now() - lastTick;\n return eventThrottle > 0 && timeSinceLastTick >= eventThrottle;\n}\n/**\n * Encapsulates the Web-specific scroll throttling and disabling logic\n */\n\n\nvar ScrollViewBase = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var onScroll = props.onScroll,\n onTouchMove = props.onTouchMove,\n onWheel = props.onWheel,\n _props$scrollEnabled = props.scrollEnabled,\n scrollEnabled = _props$scrollEnabled === void 0 ? true : _props$scrollEnabled,\n _props$scrollEventThr = props.scrollEventThrottle,\n scrollEventThrottle = _props$scrollEventThr === void 0 ? 0 : _props$scrollEventThr,\n showsHorizontalScrollIndicator = props.showsHorizontalScrollIndicator,\n showsVerticalScrollIndicator = props.showsVerticalScrollIndicator,\n style = props.style,\n rest = _objectWithoutPropertiesLoose(props, [\"onScroll\", \"onTouchMove\", \"onWheel\", \"scrollEnabled\", \"scrollEventThrottle\", \"showsHorizontalScrollIndicator\", \"showsVerticalScrollIndicator\", \"style\"]);\n\n var scrollState = React.useRef({\n isScrolling: false,\n scrollLastTick: 0\n });\n var scrollTimeout = React.useRef(null);\n var scrollRef = React.useRef(null);\n\n function createPreventableScrollHandler(handler) {\n return function (e) {\n if (scrollEnabled) {\n if (handler) {\n handler(e);\n }\n }\n };\n }\n\n function handleScroll(e) {\n e.stopPropagation();\n\n if (e.target === scrollRef.current) {\n e.persist(); // A scroll happened, so the scroll resets the scrollend timeout.\n\n if (scrollTimeout.current != null) {\n clearTimeout(scrollTimeout.current);\n }\n\n scrollTimeout.current = setTimeout(function () {\n handleScrollEnd(e);\n }, 100);\n\n if (scrollState.current.isScrolling) {\n // Scroll last tick may have changed, check if we need to notify\n if (shouldEmitScrollEvent(scrollState.current.scrollLastTick, scrollEventThrottle)) {\n handleScrollTick(e);\n }\n } else {\n // Weren't scrolling, so we must have just started\n handleScrollStart(e);\n }\n }\n }\n\n function handleScrollStart(e) {\n scrollState.current.isScrolling = true;\n handleScrollTick(e);\n }\n\n function handleScrollTick(e) {\n scrollState.current.scrollLastTick = Date.now();\n\n if (onScroll) {\n onScroll(normalizeScrollEvent(e));\n }\n }\n\n function handleScrollEnd(e) {\n scrollState.current.isScrolling = false;\n\n if (onScroll) {\n onScroll(normalizeScrollEvent(e));\n }\n }\n\n var hideScrollbar = showsHorizontalScrollIndicator === false || showsVerticalScrollIndicator === false;\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n onScroll: handleScroll,\n onTouchMove: createPreventableScrollHandler(onTouchMove),\n onWheel: createPreventableScrollHandler(onWheel),\n ref: useMergeRefs(scrollRef, forwardedRef),\n style: [style, !scrollEnabled && styles.scrollDisabled, hideScrollbar && styles.hideScrollbar]\n }));\n}); // Chrome doesn't support e.preventDefault in this case; touch-action must be\n// used to disable scrolling.\n// https://developers.google.com/web/updates/2017/01/scrolling-intervention\n\nvar styles = StyleSheet.create({\n scrollDisabled: {\n overflowX: 'hidden',\n overflowY: 'hidden',\n touchAction: 'none'\n },\n hideScrollbar: {\n scrollbarWidth: 'none'\n }\n});\nexport default ScrollViewBase;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createReactClass from 'create-react-class';\nimport dismissKeyboard from '../../modules/dismissKeyboard';\nimport invariant from 'fbjs/lib/invariant';\nimport mergeRefs from '../../modules/mergeRefs';\nimport ScrollResponder from '../../modules/ScrollResponder';\nimport ScrollViewBase from './ScrollViewBase';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nimport React from 'react';\nvar emptyObject = {};\n/* eslint-disable react/prefer-es6-class */\n\nvar ScrollView = createReactClass({\n displayName: \"ScrollView\",\n mixins: [ScrollResponder.Mixin],\n getInitialState: function getInitialState() {\n return this.scrollResponderMixinGetInitialState();\n },\n flashScrollIndicators: function flashScrollIndicators() {\n this.scrollResponderFlashScrollIndicators();\n },\n\n /**\n * Returns a reference to the underlying scroll responder, which supports\n * operations like `scrollTo`. All ScrollView-like components should\n * implement this method so that they can be composed while providing access\n * to the underlying scroll responder's methods.\n */\n getScrollResponder: function getScrollResponder() {\n return this;\n },\n getScrollableNode: function getScrollableNode() {\n return this._scrollNodeRef;\n },\n getInnerViewRef: function getInnerViewRef() {\n return this._innerViewRef;\n },\n getInnerViewNode: function getInnerViewNode() {\n return this._innerViewRef;\n },\n getNativeScrollRef: function getNativeScrollRef() {\n return this._scrollNodeRef;\n },\n\n /**\n * Scrolls to a given x, y offset, either immediately or with a smooth animation.\n * Syntax:\n *\n * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})\n *\n * Note: The weird argument signature is due to the fact that, for historical reasons,\n * the function also accepts separate arguments as as alternative to the options object.\n * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.\n */\n scrollTo: function scrollTo(y, x, animated) {\n if (typeof y === 'number') {\n console.warn('`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.');\n } else {\n var _ref = y || emptyObject;\n\n x = _ref.x;\n y = _ref.y;\n animated = _ref.animated;\n }\n\n this.getScrollResponder().scrollResponderScrollTo({\n x: x || 0,\n y: y || 0,\n animated: animated !== false\n });\n },\n\n /**\n * If this is a vertical ScrollView scrolls to the bottom.\n * If this is a horizontal ScrollView scrolls to the right.\n *\n * Use `scrollToEnd({ animated: true })` for smooth animated scrolling,\n * `scrollToEnd({ animated: false })` for immediate scrolling.\n * If no options are passed, `animated` defaults to true.\n */\n scrollToEnd: function scrollToEnd(options) {\n // Default to true\n var animated = (options && options.animated) !== false;\n var horizontal = this.props.horizontal;\n var scrollResponder = this.getScrollResponder();\n var scrollResponderNode = scrollResponder.scrollResponderGetScrollableNode();\n var x = horizontal ? scrollResponderNode.scrollWidth : 0;\n var y = horizontal ? 0 : scrollResponderNode.scrollHeight;\n scrollResponder.scrollResponderScrollTo({\n x: x,\n y: y,\n animated: animated\n });\n },\n render: function render() {\n var _this$props = this.props,\n contentContainerStyle = _this$props.contentContainerStyle,\n horizontal = _this$props.horizontal,\n onContentSizeChange = _this$props.onContentSizeChange,\n refreshControl = _this$props.refreshControl,\n stickyHeaderIndices = _this$props.stickyHeaderIndices,\n pagingEnabled = _this$props.pagingEnabled,\n forwardedRef = _this$props.forwardedRef,\n keyboardDismissMode = _this$props.keyboardDismissMode,\n onScroll = _this$props.onScroll,\n other = _objectWithoutPropertiesLoose(_this$props, [\"contentContainerStyle\", \"horizontal\", \"onContentSizeChange\", \"refreshControl\", \"stickyHeaderIndices\", \"pagingEnabled\", \"forwardedRef\", \"keyboardDismissMode\", \"onScroll\"]);\n\n if (process.env.NODE_ENV !== 'production' && this.props.style) {\n var style = StyleSheet.flatten(this.props.style);\n var childLayoutProps = ['alignItems', 'justifyContent'].filter(function (prop) {\n return style && style[prop] !== undefined;\n });\n invariant(childLayoutProps.length === 0, \"ScrollView child layout (\" + JSON.stringify(childLayoutProps) + \") \" + 'must be applied through the contentContainerStyle prop.');\n }\n\n var contentSizeChangeProps = {};\n\n if (onContentSizeChange) {\n contentSizeChangeProps = {\n onLayout: this._handleContentOnLayout\n };\n }\n\n var hasStickyHeaderIndices = !horizontal && Array.isArray(stickyHeaderIndices);\n var children = hasStickyHeaderIndices || pagingEnabled ? React.Children.map(this.props.children, function (child, i) {\n var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1;\n\n if (child != null && (isSticky || pagingEnabled)) {\n return /*#__PURE__*/React.createElement(View, {\n style: StyleSheet.compose(isSticky && styles.stickyHeader, pagingEnabled && styles.pagingEnabledChild)\n }, child);\n } else {\n return child;\n }\n }) : this.props.children;\n var contentContainer = /*#__PURE__*/React.createElement(View, _extends({}, contentSizeChangeProps, {\n children: children,\n collapsable: false,\n ref: this._setInnerViewRef,\n style: StyleSheet.compose(horizontal && styles.contentContainerHorizontal, contentContainerStyle)\n }));\n var baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical;\n var pagingEnabledStyle = horizontal ? styles.pagingEnabledHorizontal : styles.pagingEnabledVertical;\n\n var props = _objectSpread(_objectSpread({}, other), {}, {\n style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style],\n onTouchStart: this.scrollResponderHandleTouchStart,\n onTouchMove: this.scrollResponderHandleTouchMove,\n onTouchEnd: this.scrollResponderHandleTouchEnd,\n onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag,\n onScrollEndDrag: this.scrollResponderHandleScrollEndDrag,\n onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin,\n onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd,\n onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder,\n onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture,\n onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder,\n onScroll: this._handleScroll,\n onResponderGrant: this.scrollResponderHandleResponderGrant,\n onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest,\n onResponderTerminate: this.scrollResponderHandleTerminate,\n onResponderRelease: this.scrollResponderHandleResponderRelease,\n onResponderReject: this.scrollResponderHandleResponderReject\n });\n\n var ScrollViewClass = ScrollViewBase;\n invariant(ScrollViewClass !== undefined, 'ScrollViewClass must not be undefined');\n var scrollView = /*#__PURE__*/React.createElement(ScrollViewClass, _extends({}, props, {\n ref: this._setScrollNodeRef\n }), contentContainer);\n\n if (refreshControl) {\n return /*#__PURE__*/React.cloneElement(refreshControl, {\n style: props.style\n }, scrollView);\n }\n\n return scrollView;\n },\n _handleContentOnLayout: function _handleContentOnLayout(e) {\n var _e$nativeEvent$layout = e.nativeEvent.layout,\n width = _e$nativeEvent$layout.width,\n height = _e$nativeEvent$layout.height;\n this.props.onContentSizeChange(width, height);\n },\n _handleScroll: function _handleScroll(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (this.props.onScroll && this.props.scrollEventThrottle == null) {\n console.log('You specified `onScroll` on a <ScrollView> but not ' + '`scrollEventThrottle`. You will only receive one event. ' + 'Using `16` you get all the events but be aware that it may ' + \"cause frame drops, use a bigger number if you don't need as \" + 'much precision.');\n }\n }\n\n if (this.props.keyboardDismissMode === 'on-drag') {\n dismissKeyboard();\n }\n\n this.scrollResponderHandleScroll(e);\n },\n _setInnerViewRef: function _setInnerViewRef(node) {\n this._innerViewRef = node;\n },\n _setScrollNodeRef: function _setScrollNodeRef(node) {\n this._scrollNodeRef = node; // ScrollView needs to add more methods to the hostNode in addition to those\n // added by `usePlatformMethods`. This is temporarily until an API like\n // `ScrollView.scrollTo(hostNode, { x, y })` is added to React Native.\n\n if (node != null) {\n node.getScrollResponder = this.getScrollResponder;\n node.getInnerViewNode = this.getInnerViewNode;\n node.getInnerViewRef = this.getInnerViewRef;\n node.getNativeScrollRef = this.getNativeScrollRef;\n node.getScrollableNode = this.getScrollableNode;\n node.scrollTo = this.scrollTo;\n node.scrollToEnd = this.scrollToEnd;\n node.flashScrollIndicators = this.flashScrollIndicators;\n node.scrollResponderZoomTo = this.scrollResponderZoomTo;\n node.scrollResponderScrollNativeHandleToKeyboard = this.scrollResponderScrollNativeHandleToKeyboard;\n }\n\n var ref = mergeRefs(this.props.forwardedRef);\n ref(node);\n }\n});\nvar commonStyle = {\n flexGrow: 1,\n flexShrink: 1,\n // Enable hardware compositing in modern browsers.\n // Creates a new layer with its own backing surface that can significantly\n // improve scroll performance.\n transform: [{\n translateZ: 0\n }],\n // iOS native scrolling\n WebkitOverflowScrolling: 'touch'\n};\nvar styles = StyleSheet.create({\n baseVertical: _objectSpread(_objectSpread({}, commonStyle), {}, {\n flexDirection: 'column',\n overflowX: 'hidden',\n overflowY: 'auto'\n }),\n baseHorizontal: _objectSpread(_objectSpread({}, commonStyle), {}, {\n flexDirection: 'row',\n overflowX: 'auto',\n overflowY: 'hidden'\n }),\n contentContainerHorizontal: {\n flexDirection: 'row'\n },\n stickyHeader: {\n position: 'sticky',\n top: 0,\n zIndex: 10\n },\n pagingEnabledHorizontal: {\n scrollSnapType: 'x mandatory'\n },\n pagingEnabledVertical: {\n scrollSnapType: 'y mandatory'\n },\n pagingEnabledChild: {\n scrollSnapAlign: 'start'\n }\n});\nvar ForwardedScrollView = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n return /*#__PURE__*/React.createElement(ScrollView, _extends({}, props, {\n forwardedRef: forwardedRef\n }));\n});\nForwardedScrollView.displayName = 'ScrollView';\nexport default ForwardedScrollView;","import debounce from 'debounce';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar Prop = function Prop(name, _ref) {\n var _ref$default = _ref[\"default\"],\n defaultVal = _ref$default === void 0 ? null : _ref$default,\n _ref$triggerUpdate = _ref.triggerUpdate,\n triggerUpdate = _ref$triggerUpdate === void 0 ? true : _ref$triggerUpdate,\n _ref$onChange = _ref.onChange,\n onChange = _ref$onChange === void 0 ? function (newVal, state) {} : _ref$onChange;\n\n _classCallCheck(this, Prop);\n\n this.name = name;\n this.defaultVal = defaultVal;\n this.triggerUpdate = triggerUpdate;\n this.onChange = onChange;\n};\n\nfunction index (_ref2) {\n var _ref2$stateInit = _ref2.stateInit,\n stateInit = _ref2$stateInit === void 0 ? function () {\n return {};\n } : _ref2$stateInit,\n _ref2$props = _ref2.props,\n rawProps = _ref2$props === void 0 ? {} : _ref2$props,\n _ref2$methods = _ref2.methods,\n methods = _ref2$methods === void 0 ? {} : _ref2$methods,\n _ref2$aliases = _ref2.aliases,\n aliases = _ref2$aliases === void 0 ? {} : _ref2$aliases,\n _ref2$init = _ref2.init,\n initFn = _ref2$init === void 0 ? function () {} : _ref2$init,\n _ref2$update = _ref2.update,\n updateFn = _ref2$update === void 0 ? function () {} : _ref2$update;\n // Parse props into Prop instances\n var props = Object.keys(rawProps).map(function (propName) {\n return new Prop(propName, rawProps[propName]);\n });\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Holds component state\n var state = Object.assign({}, stateInit instanceof Function ? stateInit(options) : stateInit, // Support plain objects for backwards compatibility\n {\n initialised: false\n }); // keeps track of which props triggered an update\n\n var changedProps = {}; // Component constructor\n\n function comp(nodeElement) {\n initStatic(nodeElement, options);\n digest();\n return comp;\n }\n\n var initStatic = function initStatic(nodeElement, options) {\n initFn.call(comp, nodeElement, state, options);\n state.initialised = true;\n };\n\n var digest = debounce(function () {\n if (!state.initialised) {\n return;\n }\n\n updateFn.call(comp, state, changedProps);\n changedProps = {};\n }, 1); // Getter/setter methods\n\n props.forEach(function (prop) {\n comp[prop.name] = getSetProp(prop);\n\n function getSetProp(_ref3) {\n var prop = _ref3.name,\n _ref3$triggerUpdate = _ref3.triggerUpdate,\n redigest = _ref3$triggerUpdate === void 0 ? false : _ref3$triggerUpdate,\n _ref3$onChange = _ref3.onChange,\n onChange = _ref3$onChange === void 0 ? function (newVal, state) {} : _ref3$onChange,\n _ref3$defaultVal = _ref3.defaultVal,\n defaultVal = _ref3$defaultVal === void 0 ? null : _ref3$defaultVal;\n return function (_) {\n var curVal = state[prop];\n\n if (!arguments.length) {\n return curVal;\n } // Getter mode\n\n\n var val = _ === undefined ? defaultVal : _; // pick default if value passed is undefined\n\n state[prop] = val;\n onChange.call(comp, val, state, curVal); // track changed props\n\n !changedProps.hasOwnProperty(prop) && (changedProps[prop] = curVal);\n\n if (redigest) {\n digest();\n }\n\n return comp;\n };\n }\n }); // Other methods\n\n Object.keys(methods).forEach(function (methodName) {\n comp[methodName] = function () {\n var _methods$methodName;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_methods$methodName = methods[methodName]).call.apply(_methods$methodName, [comp, state].concat(args));\n };\n }); // Link aliases\n\n Object.entries(aliases).forEach(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n alias = _ref5[0],\n target = _ref5[1];\n\n return comp[alias] = comp[target];\n }); // Reset all component props to their default value\n\n comp.resetProps = function () {\n props.forEach(function (prop) {\n comp[prop.name](prop.defaultVal);\n });\n return comp;\n }; //\n\n\n comp.resetProps(); // Apply all prop defaults\n\n state._rerender = digest; // Expose digest method\n\n return comp;\n };\n}\n\nexport default index;\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nvar _requestIdleCallback = function _requestIdleCallback(cb, options) {\n return setTimeout(function () {\n var start = Date.now();\n cb({\n didTimeout: false,\n timeRemaining: function timeRemaining() {\n return Math.max(0, 50 - (Date.now() - start));\n }\n });\n }, 1);\n};\n\nvar _cancelIdleCallback = function _cancelIdleCallback(id) {\n clearTimeout(id);\n};\n\nvar isSupported = canUseDOM && typeof window.requestIdleCallback !== 'undefined';\nvar requestIdleCallback = isSupported ? window.requestIdleCallback : _requestIdleCallback;\nvar cancelIdleCallback = isSupported ? window.cancelIdleCallback : _cancelIdleCallback;\nexport default requestIdleCallback;\nexport { cancelIdleCallback };","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport invariant from 'fbjs/lib/invariant';\nimport requestIdleCallback, { cancelIdleCallback } from '../../modules/requestIdleCallback';\nvar InteractionManager = {\n Events: {\n interactionStart: 'interactionStart',\n interactionComplete: 'interactionComplete'\n },\n\n /**\n * Schedule a function to run after all interactions have completed.\n */\n runAfterInteractions: function runAfterInteractions(task) {\n var handle;\n var promise = new Promise(function (resolve) {\n handle = requestIdleCallback(function () {\n if (task) {\n resolve(task());\n } else {\n resolve();\n }\n });\n });\n return {\n then: promise.then.bind(promise),\n done: promise.then.bind(promise),\n cancel: function cancel() {\n cancelIdleCallback(handle);\n }\n };\n },\n\n /**\n * Notify manager that an interaction has started.\n */\n createInteractionHandle: function createInteractionHandle() {\n return 1;\n },\n\n /**\n * Notify manager that an interaction has completed.\n */\n clearInteractionHandle: function clearInteractionHandle(handle) {\n invariant(!!handle, 'Must provide a handle to clear.');\n },\n addListener: function addListener() {}\n};\nexport default InteractionManager;","var _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}\nmodule.exports = _curry1;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport css from '../StyleSheet/css';\nimport * as forwardedProps from '../../modules/forwardedProps';\nimport pick from '../../modules/pick';\nimport useElementLayout from '../../modules/useElementLayout';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport useResponderEvents from '../../modules/useResponderEvents';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from './TextAncestorContext';\n\nvar forwardPropsList = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, forwardedProps.defaultProps), forwardedProps.accessibilityProps), forwardedProps.clickProps), forwardedProps.focusProps), forwardedProps.keyboardProps), forwardedProps.mouseProps), forwardedProps.touchProps), forwardedProps.styleProps), {}, {\n href: true,\n lang: true,\n pointerEvents: true\n});\n\nvar pickProps = function pickProps(props) {\n return pick(props, forwardPropsList);\n};\n\nvar Text = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var dir = props.dir,\n hrefAttrs = props.hrefAttrs,\n numberOfLines = props.numberOfLines,\n onClick = props.onClick,\n onLayout = props.onLayout,\n onPress = props.onPress,\n onMoveShouldSetResponder = props.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = props.onMoveShouldSetResponderCapture,\n onResponderEnd = props.onResponderEnd,\n onResponderGrant = props.onResponderGrant,\n onResponderMove = props.onResponderMove,\n onResponderReject = props.onResponderReject,\n onResponderRelease = props.onResponderRelease,\n onResponderStart = props.onResponderStart,\n onResponderTerminate = props.onResponderTerminate,\n onResponderTerminationRequest = props.onResponderTerminationRequest,\n onScrollShouldSetResponder = props.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = props.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = props.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = props.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = props.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture,\n selectable = props.selectable;\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hostRef = React.useRef(null);\n var classList = [classes.text, hasTextAncestor === true && classes.textHasAncestor, numberOfLines === 1 && classes.textOneLine, numberOfLines != null && numberOfLines > 1 && classes.textMultiLine];\n var style = [props.style, numberOfLines != null && numberOfLines > 1 && {\n WebkitLineClamp: numberOfLines\n }, selectable === true && styles.selectable, selectable === false && styles.notSelectable, onPress && styles.pressable];\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder: onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture,\n onResponderEnd: onResponderEnd,\n onResponderGrant: onResponderGrant,\n onResponderMove: onResponderMove,\n onResponderReject: onResponderReject,\n onResponderRelease: onResponderRelease,\n onResponderStart: onResponderStart,\n onResponderTerminate: onResponderTerminate,\n onResponderTerminationRequest: onResponderTerminationRequest,\n onScrollShouldSetResponder: onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture: onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder: onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture: onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder: onStartShouldSetResponder,\n onStartShouldSetResponderCapture: onStartShouldSetResponderCapture\n });\n\n function handleClick(e) {\n if (onClick != null) {\n onClick(e);\n }\n\n if (onClick == null && onPress != null) {\n e.stopPropagation();\n onPress(e);\n }\n }\n\n var component = hasTextAncestor ? 'span' : 'div';\n var supportedProps = pickProps(props);\n supportedProps.classList = classList;\n supportedProps.dir = dir; // 'auto' by default allows browsers to infer writing direction (root elements only)\n\n if (!hasTextAncestor) {\n supportedProps.dir = dir != null ? dir : 'auto';\n }\n\n supportedProps.onClick = handleClick;\n supportedProps.style = style;\n\n if (props.href != null && hrefAttrs != null) {\n var download = hrefAttrs.download,\n rel = hrefAttrs.rel,\n target = hrefAttrs.target;\n\n if (download != null) {\n supportedProps.download = download;\n }\n\n if (rel != null) {\n supportedProps.rel = rel;\n }\n\n if (typeof target === 'string') {\n supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;\n }\n }\n\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n supportedProps.ref = setRef;\n var element = createElement(component, supportedProps);\n return hasTextAncestor ? element : /*#__PURE__*/React.createElement(TextAncestorContext.Provider, {\n value: true\n }, element);\n});\nText.displayName = 'Text';\nvar classes = css.create({\n text: {\n border: '0 solid black',\n boxSizing: 'border-box',\n color: 'black',\n display: 'inline',\n font: '14px System',\n margin: 0,\n padding: 0,\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word'\n },\n textHasAncestor: {\n color: 'inherit',\n font: 'inherit',\n whiteSpace: 'inherit'\n },\n textOneLine: {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n },\n // See #13\n textMultiLine: {\n display: '-webkit-box',\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical'\n }\n});\nvar styles = StyleSheet.create({\n notSelectable: {\n userSelect: 'none'\n },\n selectable: {\n userSelect: 'text'\n },\n pressable: {\n cursor: 'pointer'\n }\n});\nexport default Text;","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport type { NavigationProp } from './types';\n\n/**\n * Context which holds the navigation prop for a screen.\n */\nconst NavigationContext = React.createContext<\n NavigationProp<ParamListBase, string, any, any> | undefined\n>(undefined);\n\nexport default NavigationContext;\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport css from '../StyleSheet/css';\nimport * as forwardedProps from '../../modules/forwardedProps';\nimport pick from '../../modules/pick';\nimport useElementLayout from '../../modules/useElementLayout';\nimport useLayoutEffect from '../../modules/useLayoutEffect';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport useResponderEvents from '../../modules/useResponderEvents';\nimport StyleSheet from '../StyleSheet';\nimport TextInputState from '../../modules/TextInputState';\n/**\n * Determines whether a 'selection' prop differs from a node's existing\n * selection state.\n */\n\nvar isSelectionStale = function isSelectionStale(node, selection) {\n var selectionEnd = node.selectionEnd,\n selectionStart = node.selectionStart;\n var start = selection.start,\n end = selection.end;\n return start !== selectionStart || end !== selectionEnd;\n};\n/**\n * Certain input types do no support 'selectSelectionRange' and will throw an\n * error.\n */\n\n\nvar setSelection = function setSelection(node, selection) {\n if (isSelectionStale(node, selection)) {\n var start = selection.start,\n end = selection.end;\n\n try {\n node.setSelectionRange(start, end || start);\n } catch (e) {}\n }\n};\n\nvar forwardPropsList = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, forwardedProps.defaultProps), forwardedProps.accessibilityProps), forwardedProps.clickProps), forwardedProps.focusProps), forwardedProps.keyboardProps), forwardedProps.mouseProps), forwardedProps.touchProps), forwardedProps.styleProps), {}, {\n autoCapitalize: true,\n autoComplete: true,\n autoCorrect: true,\n autoFocus: true,\n defaultValue: true,\n disabled: true,\n lang: true,\n maxLength: true,\n onChange: true,\n onScroll: true,\n placeholder: true,\n pointerEvents: true,\n readOnly: true,\n rows: true,\n spellCheck: true,\n value: true,\n type: true\n});\n\nvar pickProps = function pickProps(props) {\n return pick(props, forwardPropsList);\n}; // If an Input Method Editor is processing key input, the 'keyCode' is 229.\n// https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode\n\n\nfunction isEventComposing(nativeEvent) {\n return nativeEvent.isComposing || nativeEvent.keyCode === 229;\n}\n\nvar TextInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var _props$autoCapitalize = props.autoCapitalize,\n autoCapitalize = _props$autoCapitalize === void 0 ? 'sentences' : _props$autoCapitalize,\n autoComplete = props.autoComplete,\n autoCompleteType = props.autoCompleteType,\n _props$autoCorrect = props.autoCorrect,\n autoCorrect = _props$autoCorrect === void 0 ? true : _props$autoCorrect,\n blurOnSubmit = props.blurOnSubmit,\n clearTextOnFocus = props.clearTextOnFocus,\n dir = props.dir,\n _props$editable = props.editable,\n editable = _props$editable === void 0 ? true : _props$editable,\n _props$keyboardType = props.keyboardType,\n keyboardType = _props$keyboardType === void 0 ? 'default' : _props$keyboardType,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$numberOfLines = props.numberOfLines,\n numberOfLines = _props$numberOfLines === void 0 ? 1 : _props$numberOfLines,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onChangeText = props.onChangeText,\n onContentSizeChange = props.onContentSizeChange,\n onFocus = props.onFocus,\n onKeyPress = props.onKeyPress,\n onLayout = props.onLayout,\n onMoveShouldSetResponder = props.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = props.onMoveShouldSetResponderCapture,\n onResponderEnd = props.onResponderEnd,\n onResponderGrant = props.onResponderGrant,\n onResponderMove = props.onResponderMove,\n onResponderReject = props.onResponderReject,\n onResponderRelease = props.onResponderRelease,\n onResponderStart = props.onResponderStart,\n onResponderTerminate = props.onResponderTerminate,\n onResponderTerminationRequest = props.onResponderTerminationRequest,\n onScrollShouldSetResponder = props.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = props.onScrollShouldSetResponderCapture,\n onSelectionChange = props.onSelectionChange,\n onSelectionChangeShouldSetResponder = props.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = props.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = props.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture,\n onSubmitEditing = props.onSubmitEditing,\n placeholderTextColor = props.placeholderTextColor,\n returnKeyType = props.returnKeyType,\n _props$secureTextEntr = props.secureTextEntry,\n secureTextEntry = _props$secureTextEntr === void 0 ? false : _props$secureTextEntr,\n selection = props.selection,\n selectTextOnFocus = props.selectTextOnFocus,\n spellCheck = props.spellCheck;\n var type;\n var inputMode;\n\n switch (keyboardType) {\n case 'email-address':\n type = 'email';\n break;\n\n case 'number-pad':\n case 'numeric':\n inputMode = 'numeric';\n break;\n\n case 'decimal-pad':\n inputMode = 'decimal';\n break;\n\n case 'phone-pad':\n type = 'tel';\n break;\n\n case 'search':\n case 'web-search':\n type = 'search';\n break;\n\n case 'url':\n type = 'url';\n break;\n\n default:\n type = 'text';\n }\n\n if (secureTextEntry) {\n type = 'password';\n }\n\n var dimensions = React.useRef({\n height: null,\n width: null\n });\n var hostRef = React.useRef(null);\n var handleContentSizeChange = React.useCallback(function (hostNode) {\n if (multiline && onContentSizeChange && hostNode != null) {\n var newHeight = hostNode.scrollHeight;\n var newWidth = hostNode.scrollWidth;\n\n if (newHeight !== dimensions.current.height || newWidth !== dimensions.current.width) {\n dimensions.current.height = newHeight;\n dimensions.current.width = newWidth;\n onContentSizeChange({\n nativeEvent: {\n contentSize: {\n height: dimensions.current.height,\n width: dimensions.current.width\n }\n }\n });\n }\n }\n }, [multiline, onContentSizeChange]);\n var imperativeRef = React.useMemo(function () {\n return function (hostNode) {\n // TextInput needs to add more methods to the hostNode in addition to those\n // added by `usePlatformMethods`. This is temporarily until an API like\n // `TextInput.clear(hostRef)` is added to React Native.\n if (hostNode != null) {\n hostNode.clear = function () {\n if (hostNode != null) {\n hostNode.value = '';\n }\n };\n\n hostNode.isFocused = function () {\n return hostNode != null && TextInputState.currentlyFocusedField() === hostNode;\n };\n\n handleContentSizeChange(hostNode);\n }\n };\n }, [handleContentSizeChange]);\n\n function handleBlur(e) {\n TextInputState._currentlyFocusedNode = null;\n\n if (onBlur) {\n e.nativeEvent.text = e.target.value;\n onBlur(e);\n }\n }\n\n function handleChange(e) {\n var hostNode = e.target;\n var text = hostNode.value;\n e.nativeEvent.text = text;\n handleContentSizeChange(hostNode);\n\n if (onChange) {\n onChange(e);\n }\n\n if (onChangeText) {\n onChangeText(text);\n }\n }\n\n function handleFocus(e) {\n var hostNode = e.target;\n\n if (onFocus) {\n e.nativeEvent.text = hostNode.value;\n onFocus(e);\n }\n\n if (hostNode != null) {\n TextInputState._currentlyFocusedNode = hostNode;\n\n if (clearTextOnFocus) {\n hostNode.value = '';\n }\n\n if (selectTextOnFocus) {\n // Safari requires selection to occur in a setTimeout\n setTimeout(function () {\n hostNode.select();\n }, 0);\n }\n }\n }\n\n function handleKeyDown(e) {\n var hostNode = e.target; // Prevent key events bubbling (see #612)\n\n e.stopPropagation();\n var blurOnSubmitDefault = !multiline;\n var shouldBlurOnSubmit = blurOnSubmit == null ? blurOnSubmitDefault : blurOnSubmit;\n var nativeEvent = e.nativeEvent;\n var isComposing = isEventComposing(nativeEvent);\n\n if (onKeyPress) {\n onKeyPress(e);\n }\n\n if (e.key === 'Enter' && !e.shiftKey && // Do not call submit if composition is occuring.\n !isComposing && !e.isDefaultPrevented()) {\n if ((blurOnSubmit || !multiline) && onSubmitEditing) {\n // prevent \"Enter\" from inserting a newline or submitting a form\n e.preventDefault();\n nativeEvent.text = e.target.value;\n onSubmitEditing(e);\n }\n\n if (shouldBlurOnSubmit && hostNode != null) {\n hostNode.blur();\n }\n }\n }\n\n function handleSelectionChange(e) {\n if (onSelectionChange) {\n try {\n var node = e.target;\n var selectionStart = node.selectionStart,\n selectionEnd = node.selectionEnd;\n e.nativeEvent.selection = {\n start: selectionStart,\n end: selectionEnd\n };\n e.nativeEvent.text = e.target.value;\n onSelectionChange(e);\n } catch (e) {}\n }\n }\n\n useLayoutEffect(function () {\n var node = hostRef.current;\n\n if (node != null && selection != null) {\n setSelection(node, selection);\n }\n\n if (document.activeElement === node) {\n TextInputState._currentlyFocusedNode = node;\n }\n }, [hostRef, selection]);\n var component = multiline ? 'textarea' : 'input';\n var classList = [classes.textinput];\n var style = StyleSheet.compose(props.style, placeholderTextColor && {\n placeholderTextColor: placeholderTextColor\n });\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder: onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture,\n onResponderEnd: onResponderEnd,\n onResponderGrant: onResponderGrant,\n onResponderMove: onResponderMove,\n onResponderReject: onResponderReject,\n onResponderRelease: onResponderRelease,\n onResponderStart: onResponderStart,\n onResponderTerminate: onResponderTerminate,\n onResponderTerminationRequest: onResponderTerminationRequest,\n onScrollShouldSetResponder: onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture: onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder: onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture: onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder: onStartShouldSetResponder,\n onStartShouldSetResponderCapture: onStartShouldSetResponderCapture\n });\n var supportedProps = pickProps(props);\n supportedProps.autoCapitalize = autoCapitalize;\n supportedProps.autoComplete = autoComplete || autoCompleteType || 'on';\n supportedProps.autoCorrect = autoCorrect ? 'on' : 'off';\n supportedProps.classList = classList; // 'auto' by default allows browsers to infer writing direction\n\n supportedProps.dir = dir !== undefined ? dir : 'auto';\n supportedProps.enterKeyHint = returnKeyType;\n supportedProps.onBlur = handleBlur;\n supportedProps.onChange = handleChange;\n supportedProps.onFocus = handleFocus;\n supportedProps.onKeyDown = handleKeyDown;\n supportedProps.onSelect = handleSelectionChange;\n supportedProps.readOnly = !editable;\n supportedProps.rows = multiline ? numberOfLines : undefined;\n supportedProps.spellCheck = spellCheck != null ? spellCheck : autoCorrect;\n supportedProps.style = style;\n supportedProps.type = multiline ? undefined : type;\n supportedProps.inputMode = inputMode;\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, imperativeRef, forwardedRef);\n supportedProps.ref = setRef;\n return createElement(component, supportedProps);\n});\nTextInput.displayName = 'TextInput'; // $FlowFixMe\n\nTextInput.State = TextInputState;\nvar classes = css.create({\n textinput: {\n MozAppearance: 'textfield',\n WebkitAppearance: 'none',\n backgroundColor: 'transparent',\n border: '0 solid black',\n borderRadius: 0,\n boxSizing: 'border-box',\n font: '14px System',\n margin: 0,\n padding: 0,\n resize: 'none'\n }\n});\nexport default TextInput;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UIManager from '../../exports/UIManager';\n/**\n * This class is responsible for coordinating the \"focused\"\n * state for TextInputs. All calls relating to the keyboard\n * should be funneled through here\n */\n\nvar TextInputState = {\n /**\n * Internal state\n */\n _currentlyFocusedNode: null,\n\n /**\n * Returns the ID of the currently focused text field, if one exists\n * If no text field is focused it returns null\n */\n currentlyFocusedField: function currentlyFocusedField() {\n if (document.activeElement !== this._currentlyFocusedNode) {\n this._currentlyFocusedNode = null;\n }\n\n return this._currentlyFocusedNode;\n },\n\n /**\n * @param {Object} TextInputID id of the text field to focus\n * Focuses the specified text field\n * noop if the text field was already focused\n */\n focusTextInput: function focusTextInput(textFieldNode) {\n if (textFieldNode !== null) {\n this._currentlyFocusedNode = textFieldNode;\n\n if (document.activeElement !== textFieldNode) {\n UIManager.focus(textFieldNode);\n }\n }\n },\n\n /**\n * @param {Object} textFieldNode id of the text field to focus\n * Unfocuses the specified text field\n * noop if it wasn't focused\n */\n blurTextInput: function blurTextInput(textFieldNode) {\n if (textFieldNode !== null) {\n this._currentlyFocusedNode = null;\n\n if (document.activeElement === textFieldNode) {\n UIManager.blur(textFieldNode);\n }\n }\n }\n};\nexport default TextInputState;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport multiplyStyleLengthValue from '../../modules/multiplyStyleLengthValue';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar emptyObject = {};\nvar thumbDefaultBoxShadow = '0px 1px 3px rgba(0,0,0,0.5)';\nvar thumbFocusedBoxShadow = thumbDefaultBoxShadow + \", 0 0 0 10px rgba(0,0,0,0.1)\";\nvar Switch = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var accessibilityLabel = props.accessibilityLabel,\n _props$activeThumbCol = props.activeThumbColor,\n activeThumbColor = _props$activeThumbCol === void 0 ? '#009688' : _props$activeThumbCol,\n _props$activeTrackCol = props.activeTrackColor,\n activeTrackColor = _props$activeTrackCol === void 0 ? '#A3D3CF' : _props$activeTrackCol,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n onValueChange = props.onValueChange,\n _props$style = props.style,\n style = _props$style === void 0 ? emptyObject : _props$style,\n _props$thumbColor = props.thumbColor,\n thumbColor = _props$thumbColor === void 0 ? '#FAFAFA' : _props$thumbColor,\n _props$trackColor = props.trackColor,\n trackColor = _props$trackColor === void 0 ? '#939393' : _props$trackColor,\n _props$value = props.value,\n value = _props$value === void 0 ? false : _props$value,\n other = _objectWithoutPropertiesLoose(props, [\"accessibilityLabel\", \"activeThumbColor\", \"activeTrackColor\", \"disabled\", \"onValueChange\", \"style\", \"thumbColor\", \"trackColor\", \"value\"]);\n\n var thumbRef = React.useRef(null);\n\n function handleChange(event) {\n if (onValueChange != null) {\n onValueChange(event.nativeEvent.target.checked);\n }\n }\n\n function handleFocusState(event) {\n var isFocused = event.nativeEvent.type === 'focus';\n var boxShadow = isFocused ? thumbFocusedBoxShadow : thumbDefaultBoxShadow;\n\n if (thumbRef.current != null) {\n thumbRef.current.style.boxShadow = boxShadow;\n }\n }\n\n var _StyleSheet$flatten = StyleSheet.flatten(style),\n styleHeight = _StyleSheet$flatten.height,\n styleWidth = _StyleSheet$flatten.width;\n\n var height = styleHeight || '20px';\n var minWidth = multiplyStyleLengthValue(height, 2);\n var width = styleWidth > minWidth ? styleWidth : minWidth;\n var trackBorderRadius = multiplyStyleLengthValue(height, 0.5);\n\n var trackCurrentColor = function () {\n if (value === true) {\n if (trackColor != null && typeof trackColor === 'object') {\n return trackColor.true;\n } else {\n return activeTrackColor;\n }\n } else {\n if (trackColor != null && typeof trackColor === 'object') {\n return trackColor.false;\n } else {\n return trackColor;\n }\n }\n }();\n\n var thumbCurrentColor = value ? activeThumbColor : thumbColor;\n var thumbHeight = height;\n var thumbWidth = thumbHeight;\n var rootStyle = [styles.root, style, disabled && styles.cursorDefault, {\n height: height,\n width: width\n }];\n var trackStyle = [styles.track, {\n backgroundColor: disabled ? '#D5D5D5' : trackCurrentColor,\n borderRadius: trackBorderRadius\n }];\n var thumbStyle = [styles.thumb, value && styles.thumbActive, {\n backgroundColor: disabled ? '#BDBDBD' : thumbCurrentColor,\n height: thumbHeight,\n marginStart: value ? multiplyStyleLengthValue(thumbWidth, -1) : 0,\n width: thumbWidth\n }];\n var nativeControl = createElement('input', {\n accessibilityLabel: accessibilityLabel,\n checked: value,\n disabled: disabled,\n onBlur: handleFocusState,\n onChange: handleChange,\n onFocus: handleFocusState,\n ref: forwardedRef,\n style: [styles.nativeControl, styles.cursorInherit],\n type: 'checkbox',\n role: 'switch'\n });\n return /*#__PURE__*/React.createElement(View, _extends({}, other, {\n style: rootStyle\n }), /*#__PURE__*/React.createElement(View, {\n style: trackStyle\n }), /*#__PURE__*/React.createElement(View, {\n ref: thumbRef,\n style: thumbStyle\n }), nativeControl);\n});\nSwitch.displayName = 'Switch';\nvar styles = StyleSheet.create({\n root: {\n cursor: 'pointer',\n userSelect: 'none'\n },\n cursorDefault: {\n cursor: 'default'\n },\n cursorInherit: {\n cursor: 'inherit'\n },\n track: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '70%',\n margin: 'auto',\n transitionDuration: '0.1s',\n width: '100%'\n }),\n thumb: {\n alignSelf: 'flex-start',\n borderRadius: '100%',\n boxShadow: thumbDefaultBoxShadow,\n start: '0%',\n transform: [{\n translateZ: 0\n }],\n transitionDuration: '0.1s'\n },\n thumbActive: {\n start: '100%'\n },\n nativeControl: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '100%',\n margin: 0,\n opacity: 0,\n padding: 0,\n width: '100%'\n })\n});\nexport default Switch;","/**\n * The Ease class provides a collection of easing functions for use with tween.js.\n */\nvar Easing = {\n Linear: {\n None: function (amount) {\n return amount;\n },\n },\n Quadratic: {\n In: function (amount) {\n return amount * amount;\n },\n Out: function (amount) {\n return amount * (2 - amount);\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount;\n }\n return -0.5 * (--amount * (amount - 2) - 1);\n },\n },\n Cubic: {\n In: function (amount) {\n return amount * amount * amount;\n },\n Out: function (amount) {\n return --amount * amount * amount + 1;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount;\n }\n return 0.5 * ((amount -= 2) * amount * amount + 2);\n },\n },\n Quartic: {\n In: function (amount) {\n return amount * amount * amount * amount;\n },\n Out: function (amount) {\n return 1 - --amount * amount * amount * amount;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount * amount;\n }\n return -0.5 * ((amount -= 2) * amount * amount * amount - 2);\n },\n },\n Quintic: {\n In: function (amount) {\n return amount * amount * amount * amount * amount;\n },\n Out: function (amount) {\n return --amount * amount * amount * amount * amount + 1;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount * amount * amount;\n }\n return 0.5 * ((amount -= 2) * amount * amount * amount * amount + 2);\n },\n },\n Sinusoidal: {\n In: function (amount) {\n return 1 - Math.cos((amount * Math.PI) / 2);\n },\n Out: function (amount) {\n return Math.sin((amount * Math.PI) / 2);\n },\n InOut: function (amount) {\n return 0.5 * (1 - Math.cos(Math.PI * amount));\n },\n },\n Exponential: {\n In: function (amount) {\n return amount === 0 ? 0 : Math.pow(1024, amount - 1);\n },\n Out: function (amount) {\n return amount === 1 ? 1 : 1 - Math.pow(2, -10 * amount);\n },\n InOut: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n if ((amount *= 2) < 1) {\n return 0.5 * Math.pow(1024, amount - 1);\n }\n return 0.5 * (-Math.pow(2, -10 * (amount - 1)) + 2);\n },\n },\n Circular: {\n In: function (amount) {\n return 1 - Math.sqrt(1 - amount * amount);\n },\n Out: function (amount) {\n return Math.sqrt(1 - --amount * amount);\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return -0.5 * (Math.sqrt(1 - amount * amount) - 1);\n }\n return 0.5 * (Math.sqrt(1 - (amount -= 2) * amount) + 1);\n },\n },\n Elastic: {\n In: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n return -Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);\n },\n Out: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n return Math.pow(2, -10 * amount) * Math.sin((amount - 0.1) * 5 * Math.PI) + 1;\n },\n InOut: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n amount *= 2;\n if (amount < 1) {\n return -0.5 * Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);\n }\n return 0.5 * Math.pow(2, -10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI) + 1;\n },\n },\n Back: {\n In: function (amount) {\n var s = 1.70158;\n return amount * amount * ((s + 1) * amount - s);\n },\n Out: function (amount) {\n var s = 1.70158;\n return --amount * amount * ((s + 1) * amount + s) + 1;\n },\n InOut: function (amount) {\n var s = 1.70158 * 1.525;\n if ((amount *= 2) < 1) {\n return 0.5 * (amount * amount * ((s + 1) * amount - s));\n }\n return 0.5 * ((amount -= 2) * amount * ((s + 1) * amount + s) + 2);\n },\n },\n Bounce: {\n In: function (amount) {\n return 1 - Easing.Bounce.Out(1 - amount);\n },\n Out: function (amount) {\n if (amount < 1 / 2.75) {\n return 7.5625 * amount * amount;\n }\n else if (amount < 2 / 2.75) {\n return 7.5625 * (amount -= 1.5 / 2.75) * amount + 0.75;\n }\n else if (amount < 2.5 / 2.75) {\n return 7.5625 * (amount -= 2.25 / 2.75) * amount + 0.9375;\n }\n else {\n return 7.5625 * (amount -= 2.625 / 2.75) * amount + 0.984375;\n }\n },\n InOut: function (amount) {\n if (amount < 0.5) {\n return Easing.Bounce.In(amount * 2) * 0.5;\n }\n return Easing.Bounce.Out(amount * 2 - 1) * 0.5 + 0.5;\n },\n },\n};\n\nvar now;\n// Include a performance.now polyfill.\n// In node.js, use process.hrtime.\n// eslint-disable-next-line\n// @ts-ignore\nif (typeof self === 'undefined' && typeof process !== 'undefined' && process.hrtime) {\n now = function () {\n // eslint-disable-next-line\n // @ts-ignore\n var time = process.hrtime();\n // Convert [seconds, nanoseconds] to milliseconds.\n return time[0] * 1000 + time[1] / 1000000;\n };\n}\n// In a browser, use self.performance.now if it is available.\nelse if (typeof self !== 'undefined' && self.performance !== undefined && self.performance.now !== undefined) {\n // This must be bound, because directly assigning this function\n // leads to an invocation exception in Chrome.\n now = self.performance.now.bind(self.performance);\n}\n// Use Date.now if it is available.\nelse if (Date.now !== undefined) {\n now = Date.now;\n}\n// Otherwise, use 'new Date().getTime()'.\nelse {\n now = function () {\n return new Date().getTime();\n };\n}\nvar now$1 = now;\n\n/**\n * Controlling groups of tweens\n *\n * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.\n * In these cases, you may want to create your own smaller groups of tween\n */\nvar Group = /** @class */ (function () {\n function Group() {\n this._tweens = {};\n this._tweensAddedDuringUpdate = {};\n }\n Group.prototype.getAll = function () {\n var _this = this;\n return Object.keys(this._tweens).map(function (tweenId) {\n return _this._tweens[tweenId];\n });\n };\n Group.prototype.removeAll = function () {\n this._tweens = {};\n };\n Group.prototype.add = function (tween) {\n this._tweens[tween.getId()] = tween;\n this._tweensAddedDuringUpdate[tween.getId()] = tween;\n };\n Group.prototype.remove = function (tween) {\n delete this._tweens[tween.getId()];\n delete this._tweensAddedDuringUpdate[tween.getId()];\n };\n Group.prototype.update = function (time, preserve) {\n if (time === void 0) { time = now$1(); }\n if (preserve === void 0) { preserve = false; }\n var tweenIds = Object.keys(this._tweens);\n if (tweenIds.length === 0) {\n return false;\n }\n // Tweens are updated in \"batches\". If you add a new tween during an\n // update, then the new tween will be updated in the next batch.\n // If you remove a tween during an update, it may or may not be updated.\n // However, if the removed tween was added during the current batch,\n // then it will not be updated.\n while (tweenIds.length > 0) {\n this._tweensAddedDuringUpdate = {};\n for (var i = 0; i < tweenIds.length; i++) {\n var tween = this._tweens[tweenIds[i]];\n var autoStart = !preserve;\n if (tween && tween.update(time, autoStart) === false && !preserve) {\n delete this._tweens[tweenIds[i]];\n }\n }\n tweenIds = Object.keys(this._tweensAddedDuringUpdate);\n }\n return true;\n };\n return Group;\n}());\n\n/**\n *\n */\nvar Interpolation = {\n Linear: function (v, k) {\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n var fn = Interpolation.Utils.Linear;\n if (k < 0) {\n return fn(v[0], v[1], f);\n }\n if (k > 1) {\n return fn(v[m], v[m - 1], m - f);\n }\n return fn(v[i], v[i + 1 > m ? m : i + 1], f - i);\n },\n Bezier: function (v, k) {\n var b = 0;\n var n = v.length - 1;\n var pw = Math.pow;\n var bn = Interpolation.Utils.Bernstein;\n for (var i = 0; i <= n; i++) {\n b += pw(1 - k, n - i) * pw(k, i) * v[i] * bn(n, i);\n }\n return b;\n },\n CatmullRom: function (v, k) {\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n var fn = Interpolation.Utils.CatmullRom;\n if (v[0] === v[m]) {\n if (k < 0) {\n i = Math.floor((f = m * (1 + k)));\n }\n return fn(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i);\n }\n else {\n if (k < 0) {\n return v[0] - (fn(v[0], v[0], v[1], v[1], -f) - v[0]);\n }\n if (k > 1) {\n return v[m] - (fn(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]);\n }\n return fn(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i);\n }\n },\n Utils: {\n Linear: function (p0, p1, t) {\n return (p1 - p0) * t + p0;\n },\n Bernstein: function (n, i) {\n var fc = Interpolation.Utils.Factorial;\n return fc(n) / fc(i) / fc(n - i);\n },\n Factorial: (function () {\n var a = [1];\n return function (n) {\n var s = 1;\n if (a[n]) {\n return a[n];\n }\n for (var i = n; i > 1; i--) {\n s *= i;\n }\n a[n] = s;\n return s;\n };\n })(),\n CatmullRom: function (p0, p1, p2, p3, t) {\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n var t2 = t * t;\n var t3 = t * t2;\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n },\n },\n};\n\n/**\n * Utils\n */\nvar Sequence = /** @class */ (function () {\n function Sequence() {\n }\n Sequence.nextId = function () {\n return Sequence._nextId++;\n };\n Sequence._nextId = 0;\n return Sequence;\n}());\n\nvar mainGroup = new Group();\n\n/**\n * Tween.js - Licensed under the MIT license\n * https://github.com/tweenjs/tween.js\n * ----------------------------------------------\n *\n * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.\n * Thank you all, you're awesome!\n */\nvar Tween = /** @class */ (function () {\n function Tween(_object, _group) {\n if (_group === void 0) { _group = mainGroup; }\n this._object = _object;\n this._group = _group;\n this._isPaused = false;\n this._pauseStart = 0;\n this._valuesStart = {};\n this._valuesEnd = {};\n this._valuesStartRepeat = {};\n this._duration = 1000;\n this._initialRepeat = 0;\n this._repeat = 0;\n this._yoyo = false;\n this._isPlaying = false;\n this._reversed = false;\n this._delayTime = 0;\n this._startTime = 0;\n this._easingFunction = Easing.Linear.None;\n this._interpolationFunction = Interpolation.Linear;\n this._chainedTweens = [];\n this._onStartCallbackFired = false;\n this._id = Sequence.nextId();\n this._isChainStopped = false;\n this._goToEnd = false;\n }\n Tween.prototype.getId = function () {\n return this._id;\n };\n Tween.prototype.isPlaying = function () {\n return this._isPlaying;\n };\n Tween.prototype.isPaused = function () {\n return this._isPaused;\n };\n Tween.prototype.to = function (properties, duration) {\n // TODO? restore this, then update the 07_dynamic_to example to set fox\n // tween's to on each update. That way the behavior is opt-in (there's\n // currently no opt-out).\n // for (const prop in properties) this._valuesEnd[prop] = properties[prop]\n this._valuesEnd = Object.create(properties);\n if (duration !== undefined) {\n this._duration = duration;\n }\n return this;\n };\n Tween.prototype.duration = function (d) {\n this._duration = d;\n return this;\n };\n Tween.prototype.start = function (time) {\n if (this._isPlaying) {\n return this;\n }\n // eslint-disable-next-line\n this._group && this._group.add(this);\n this._repeat = this._initialRepeat;\n if (this._reversed) {\n // If we were reversed (f.e. using the yoyo feature) then we need to\n // flip the tween direction back to forward.\n this._reversed = false;\n for (var property in this._valuesStartRepeat) {\n this._swapEndStartRepeatValues(property);\n this._valuesStart[property] = this._valuesStartRepeat[property];\n }\n }\n this._isPlaying = true;\n this._isPaused = false;\n this._onStartCallbackFired = false;\n this._isChainStopped = false;\n this._startTime = time !== undefined ? (typeof time === 'string' ? now$1() + parseFloat(time) : time) : now$1();\n this._startTime += this._delayTime;\n this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat);\n return this;\n };\n Tween.prototype._setupProperties = function (_object, _valuesStart, _valuesEnd, _valuesStartRepeat) {\n for (var property in _valuesEnd) {\n var startValue = _object[property];\n var startValueIsArray = Array.isArray(startValue);\n var propType = startValueIsArray ? 'array' : typeof startValue;\n var isInterpolationList = !startValueIsArray && Array.isArray(_valuesEnd[property]);\n // If `to()` specifies a property that doesn't exist in the source object,\n // we should not set that property in the object\n if (propType === 'undefined' || propType === 'function') {\n continue;\n }\n // Check if an Array was provided as property value\n if (isInterpolationList) {\n var endValues = _valuesEnd[property];\n if (endValues.length === 0) {\n continue;\n }\n // handle an array of relative values\n endValues = endValues.map(this._handleRelativeValue.bind(this, startValue));\n // Create a local copy of the Array with the start value at the front\n _valuesEnd[property] = [startValue].concat(endValues);\n }\n // handle the deepness of the values\n if ((propType === 'object' || startValueIsArray) && startValue && !isInterpolationList) {\n _valuesStart[property] = startValueIsArray ? [] : {};\n // eslint-disable-next-line\n for (var prop in startValue) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _valuesStart[property][prop] = startValue[prop];\n }\n _valuesStartRepeat[property] = startValueIsArray ? [] : {}; // TODO? repeat nested values? And yoyo? And array values?\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n this._setupProperties(startValue, _valuesStart[property], _valuesEnd[property], _valuesStartRepeat[property]);\n }\n else {\n // Save the starting value, but only once.\n if (typeof _valuesStart[property] === 'undefined') {\n _valuesStart[property] = startValue;\n }\n if (!startValueIsArray) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _valuesStart[property] *= 1.0; // Ensures we're using numbers, not strings\n }\n if (isInterpolationList) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _valuesStartRepeat[property] = _valuesEnd[property].slice().reverse();\n }\n else {\n _valuesStartRepeat[property] = _valuesStart[property] || 0;\n }\n }\n }\n };\n Tween.prototype.stop = function () {\n if (!this._isChainStopped) {\n this._isChainStopped = true;\n this.stopChainedTweens();\n }\n if (!this._isPlaying) {\n return this;\n }\n // eslint-disable-next-line\n this._group && this._group.remove(this);\n this._isPlaying = false;\n this._isPaused = false;\n if (this._onStopCallback) {\n this._onStopCallback(this._object);\n }\n return this;\n };\n Tween.prototype.end = function () {\n this._goToEnd = true;\n this.update(Infinity);\n return this;\n };\n Tween.prototype.pause = function (time) {\n if (time === void 0) { time = now$1(); }\n if (this._isPaused || !this._isPlaying) {\n return this;\n }\n this._isPaused = true;\n this._pauseStart = time;\n // eslint-disable-next-line\n this._group && this._group.remove(this);\n return this;\n };\n Tween.prototype.resume = function (time) {\n if (time === void 0) { time = now$1(); }\n if (!this._isPaused || !this._isPlaying) {\n return this;\n }\n this._isPaused = false;\n this._startTime += time - this._pauseStart;\n this._pauseStart = 0;\n // eslint-disable-next-line\n this._group && this._group.add(this);\n return this;\n };\n Tween.prototype.stopChainedTweens = function () {\n for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {\n this._chainedTweens[i].stop();\n }\n return this;\n };\n Tween.prototype.group = function (group) {\n this._group = group;\n return this;\n };\n Tween.prototype.delay = function (amount) {\n this._delayTime = amount;\n return this;\n };\n Tween.prototype.repeat = function (times) {\n this._initialRepeat = times;\n this._repeat = times;\n return this;\n };\n Tween.prototype.repeatDelay = function (amount) {\n this._repeatDelayTime = amount;\n return this;\n };\n Tween.prototype.yoyo = function (yoyo) {\n this._yoyo = yoyo;\n return this;\n };\n Tween.prototype.easing = function (easingFunction) {\n this._easingFunction = easingFunction;\n return this;\n };\n Tween.prototype.interpolation = function (interpolationFunction) {\n this._interpolationFunction = interpolationFunction;\n return this;\n };\n Tween.prototype.chain = function () {\n var tweens = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n tweens[_i] = arguments[_i];\n }\n this._chainedTweens = tweens;\n return this;\n };\n Tween.prototype.onStart = function (callback) {\n this._onStartCallback = callback;\n return this;\n };\n Tween.prototype.onUpdate = function (callback) {\n this._onUpdateCallback = callback;\n return this;\n };\n Tween.prototype.onRepeat = function (callback) {\n this._onRepeatCallback = callback;\n return this;\n };\n Tween.prototype.onComplete = function (callback) {\n this._onCompleteCallback = callback;\n return this;\n };\n Tween.prototype.onStop = function (callback) {\n this._onStopCallback = callback;\n return this;\n };\n /**\n * @returns true if the tween is still playing after the update, false\n * otherwise (calling update on a paused tween still returns true because\n * it is still playing, just paused).\n */\n Tween.prototype.update = function (time, autoStart) {\n if (time === void 0) { time = now$1(); }\n if (autoStart === void 0) { autoStart = true; }\n if (this._isPaused)\n return true;\n var property;\n var elapsed;\n var endTime = this._startTime + this._duration;\n if (!this._goToEnd && !this._isPlaying) {\n if (time > endTime)\n return false;\n if (autoStart)\n this.start(time);\n }\n this._goToEnd = false;\n if (time < this._startTime) {\n return true;\n }\n if (this._onStartCallbackFired === false) {\n if (this._onStartCallback) {\n this._onStartCallback(this._object);\n }\n this._onStartCallbackFired = true;\n }\n elapsed = (time - this._startTime) / this._duration;\n elapsed = this._duration === 0 || elapsed > 1 ? 1 : elapsed;\n var value = this._easingFunction(elapsed);\n // properties transformations\n this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value);\n if (this._onUpdateCallback) {\n this._onUpdateCallback(this._object, elapsed);\n }\n if (elapsed === 1) {\n if (this._repeat > 0) {\n if (isFinite(this._repeat)) {\n this._repeat--;\n }\n // Reassign starting values, restart by making startTime = now\n for (property in this._valuesStartRepeat) {\n if (!this._yoyo && typeof this._valuesEnd[property] === 'string') {\n this._valuesStartRepeat[property] =\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n this._valuesStartRepeat[property] + parseFloat(this._valuesEnd[property]);\n }\n if (this._yoyo) {\n this._swapEndStartRepeatValues(property);\n }\n this._valuesStart[property] = this._valuesStartRepeat[property];\n }\n if (this._yoyo) {\n this._reversed = !this._reversed;\n }\n if (this._repeatDelayTime !== undefined) {\n this._startTime = time + this._repeatDelayTime;\n }\n else {\n this._startTime = time + this._delayTime;\n }\n if (this._onRepeatCallback) {\n this._onRepeatCallback(this._object);\n }\n return true;\n }\n else {\n if (this._onCompleteCallback) {\n this._onCompleteCallback(this._object);\n }\n for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {\n // Make the chained tweens start exactly at the time they should,\n // even if the `update()` method was called way past the duration of the tween\n this._chainedTweens[i].start(this._startTime + this._duration);\n }\n this._isPlaying = false;\n return false;\n }\n }\n return true;\n };\n Tween.prototype._updateProperties = function (_object, _valuesStart, _valuesEnd, value) {\n for (var property in _valuesEnd) {\n // Don't update properties that do not exist in the source object\n if (_valuesStart[property] === undefined) {\n continue;\n }\n var start = _valuesStart[property] || 0;\n var end = _valuesEnd[property];\n var startIsArray = Array.isArray(_object[property]);\n var endIsArray = Array.isArray(end);\n var isInterpolationList = !startIsArray && endIsArray;\n if (isInterpolationList) {\n _object[property] = this._interpolationFunction(end, value);\n }\n else if (typeof end === 'object' && end) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n this._updateProperties(_object[property], start, end, value);\n }\n else {\n // Parses relative end values with start as base (e.g.: +10, -3)\n end = this._handleRelativeValue(start, end);\n // Protect against non numeric properties.\n if (typeof end === 'number') {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _object[property] = start + (end - start) * value;\n }\n }\n }\n };\n Tween.prototype._handleRelativeValue = function (start, end) {\n if (typeof end !== 'string') {\n return end;\n }\n if (end.charAt(0) === '+' || end.charAt(0) === '-') {\n return start + parseFloat(end);\n }\n else {\n return parseFloat(end);\n }\n };\n Tween.prototype._swapEndStartRepeatValues = function (property) {\n var tmp = this._valuesStartRepeat[property];\n var endValue = this._valuesEnd[property];\n if (typeof endValue === 'string') {\n this._valuesStartRepeat[property] = this._valuesStartRepeat[property] + parseFloat(endValue);\n }\n else {\n this._valuesStartRepeat[property] = this._valuesEnd[property];\n }\n this._valuesEnd[property] = tmp;\n };\n return Tween;\n}());\n\nvar VERSION = '18.6.4';\n\n/**\n * Tween.js - Licensed under the MIT license\n * https://github.com/tweenjs/tween.js\n * ----------------------------------------------\n *\n * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.\n * Thank you all, you're awesome!\n */\nvar nextId = Sequence.nextId;\n/**\n * Controlling groups of tweens\n *\n * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.\n * In these cases, you may want to create your own smaller groups of tweens.\n */\nvar TWEEN = mainGroup;\n// This is the best way to export things in a way that's compatible with both ES\n// Modules and CommonJS, without build hacks, and so as not to break the\n// existing API.\n// https://github.com/rollup/rollup/issues/1961#issuecomment-423037881\nvar getAll = TWEEN.getAll.bind(TWEEN);\nvar removeAll = TWEEN.removeAll.bind(TWEEN);\nvar add = TWEEN.add.bind(TWEEN);\nvar remove = TWEEN.remove.bind(TWEEN);\nvar update = TWEEN.update.bind(TWEEN);\nvar exports = {\n Easing: Easing,\n Group: Group,\n Interpolation: Interpolation,\n now: now$1,\n Sequence: Sequence,\n nextId: nextId,\n Tween: Tween,\n VERSION: VERSION,\n getAll: getAll,\n removeAll: removeAll,\n add: add,\n remove: remove,\n update: update,\n};\n\nexport default exports;\nexport { Easing, Group, Interpolation, Sequence, Tween, VERSION, add, getAll, nextId, now$1 as now, remove, removeAll, update };\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport styleResolver from './styleResolver';\n/**\n * A simple (and dangerous) CSS system.\n * The order of CSS rule insertion is not guaranteed.\n * Avoiding combining 2 or more classes that modify the same property.\n */\n\nvar css = {\n /**\n * const classes = css.create({ base: {}, extra: {} })\n */\n create: function create(rules, group) {\n return styleResolver.createCSS(rules, group);\n }\n};\nexport default css;","function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport View from '../../exports/View';\nimport React from 'react';\n/**\n * Common implementation for a simple stubbed view.\n */\n\nvar UnimplementedView = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(UnimplementedView, _React$Component);\n\n function UnimplementedView() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = UnimplementedView.prototype;\n\n _proto.setNativeProps = function setNativeProps() {// Do nothing.\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(View, {\n style: [unimplementedViewStyles, this.props.style]\n }, this.props.children);\n };\n\n return UnimplementedView;\n}(React.Component);\n\nvar unimplementedViewStyles = process.env.NODE_ENV !== 'production' ? {\n alignSelf: 'flex-start',\n borderColor: 'red',\n borderWidth: 1\n} : {};\nexport default UnimplementedView;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport merge from 'deep-assign';\n\nconst mergeLocalStorageItem = (key, value) => {\n const oldValue = window.localStorage.getItem(key);\n const oldObject = JSON.parse(oldValue);\n const newObject = JSON.parse(value);\n const nextValue = JSON.stringify(merge({}, oldObject, newObject));\n window.localStorage.setItem(key, nextValue);\n};\n\nconst createPromise = (getValue, callback): Promise<*> => {\n return new Promise((resolve, reject) => {\n try {\n const value = getValue();\n if (callback) {\n callback(null, value);\n }\n resolve(value);\n } catch (err) {\n if (callback) {\n callback(err);\n }\n reject(err);\n }\n });\n};\n\nconst createPromiseAll = (promises, callback, processResult): Promise<*> => {\n return Promise.all(promises).then(\n result => {\n const value = processResult ? processResult(result) : null;\n callback && callback(null, value);\n return Promise.resolve(value);\n },\n errors => {\n callback && callback(errors);\n return Promise.reject(errors);\n }\n );\n};\n\nexport default class AsyncStorage {\n\n /**\n * Fetches `key` value.\n */\n static getItem(key: string, callback?: Function): Promise<*> {\n return createPromise(() => {\n return window.localStorage.getItem(key);\n }, callback);\n }\n\n /**\n * Sets `value` for `key`.\n */\n static setItem(key: string, value: string, callback?: Function): Promise<*> {\n return createPromise(() => {\n window.localStorage.setItem(key, value);\n }, callback);\n }\n\n /**\n * Removes a `key`\n */\n static removeItem(key: string, callback?: Function): Promise<*> {\n return createPromise(() => {\n return window.localStorage.removeItem(key);\n }, callback);\n }\n\n /**\n * Merges existing value with input value, assuming they are stringified JSON.\n */\n static mergeItem(key: string, value: string, callback?: Function): Promise<*> {\n return createPromise(() => {\n mergeLocalStorageItem(key, value);\n }, callback);\n }\n\n /**\n * Erases *all* AsyncStorage for the domain.\n */\n static clear(callback?: Function): Promise<*> {\n return createPromise(() => {\n window.localStorage.clear();\n }, callback);\n }\n\n /**\n * Gets *all* keys known to the app, for all callers, libraries, etc.\n */\n static getAllKeys(callback?: Function): Promise<*> {\n return createPromise(() => {\n const numberOfKeys = window.localStorage.length;\n const keys = [];\n for (let i = 0; i < numberOfKeys; i += 1) {\n const key = window.localStorage.key(i);\n keys.push(key);\n }\n return keys;\n }, callback);\n }\n\n /**\n * (stub) Flushes any pending requests using a single batch call to get the data.\n */\n static flushGetRequests() {}\n\n /**\n * multiGet resolves to an array of key-value pair arrays that matches the\n * input format of multiSet.\n *\n * multiGet(['k1', 'k2']) -> [['k1', 'val1'], ['k2', 'val2']]\n */\n static multiGet(keys: Array<string>, callback?: Function): Promise<*> {\n const promises = keys.map(key => AsyncStorage.getItem(key));\n const processResult = result => result.map((value, i) => [keys[i], value]);\n return createPromiseAll(promises, callback, processResult);\n }\n\n /**\n * Takes an array of key-value array pairs.\n * multiSet([['k1', 'val1'], ['k2', 'val2']])\n */\n static multiSet(keyValuePairs: Array<Array<string>>, callback?: Function): Promise<*> {\n const promises = keyValuePairs.map(item => AsyncStorage.setItem(item[0], item[1]));\n return createPromiseAll(promises, callback);\n }\n\n /**\n * Delete all the keys in the `keys` array.\n */\n static multiRemove(keys: Array<string>, callback?: Function): Promise<*> {\n const promises = keys.map(key => AsyncStorage.removeItem(key));\n return createPromiseAll(promises, callback);\n }\n\n /**\n * Takes an array of key-value array pairs and merges them with existing\n * values, assuming they are stringified JSON.\n *\n * multiMerge([['k1', 'val1'], ['k2', 'val2']])\n */\n static multiMerge(keyValuePairs: Array<Array<string>>, callback?: Function): Promise<*> {\n const promises = keyValuePairs.map(item => AsyncStorage.mergeItem(item[0], item[1]));\n return createPromiseAll(promises, callback);\n }\n}\n","/**\n * @format\n * @flow\n */\n\nimport AsyncStorage from './AsyncStorage';\n\nexport default AsyncStorage;\nexport {useAsyncStorage} from './hooks';\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * useLayoutEffect throws an error on the server. On the few occasions where is\n * problematic, use this hook.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport { useEffect, useLayoutEffect } from 'react';\nvar useLayoutEffectImpl = canUseDOM ? useLayoutEffect : useEffect;\nexport default useLayoutEffectImpl;","import * as React from 'react';\nimport type { NavigationState, PartialState } from '@react-navigation/routers';\n\nconst MISSING_CONTEXT_ERROR =\n \"Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.\";\n\nexport default React.createContext<{\n isDefault?: true;\n state?: NavigationState | PartialState<NavigationState>;\n getKey: () => string | undefined;\n setKey: (key: string) => void;\n getState: () => NavigationState | PartialState<NavigationState> | undefined;\n setState: (\n state: NavigationState | PartialState<NavigationState> | undefined\n ) => void;\n getIsInitial: () => boolean;\n addOptionsGetter?: (\n key: string,\n getter: () => object | undefined | null\n ) => void;\n}>({\n isDefault: true,\n\n get getKey(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get setKey(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get getState(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get setState(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get getIsInitial(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n});\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport _EventSubscription from './_EventSubscription';\n\n/**\n * EmitterSubscription represents a subscription with listener and context data.\n */\nvar EmitterSubscription = /*#__PURE__*/function (_EventSubscription2) {\n _inheritsLoose(EmitterSubscription, _EventSubscription2);\n\n /**\n * @param {EventEmitter} emitter - The event emitter that registered this\n * subscription\n * @param {EventSubscriptionVendor} subscriber - The subscriber that controls\n * this subscription\n * @param {function} listener - Function to invoke when the specified event is\n * emitted\n * @param {*} context - Optional context object to use when invoking the\n * listener\n */\n function EmitterSubscription(emitter, subscriber, listener, context) {\n var _this;\n\n _this = _EventSubscription2.call(this, subscriber) || this;\n _this.emitter = emitter;\n _this.listener = listener;\n _this.context = context;\n return _this;\n }\n /**\n * Removes this subscription from the emitter that registered it.\n * Note: we're overriding the `remove()` method of _EventSubscription here\n * but deliberately not calling `super.remove()` as the responsibility\n * for removing the subscription lies with the EventEmitter.\n */\n\n\n var _proto = EmitterSubscription.prototype;\n\n _proto.remove = function remove() {\n this.emitter.removeSubscription(this);\n };\n\n return EmitterSubscription;\n}(_EventSubscription);\n\nexport default EmitterSubscription;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\n/**\n * EventSubscription represents a subscription to a particular event. It can\n * remove its own subscription.\n */\nvar _EventSubscription = /*#__PURE__*/function () {\n /**\n * @param {EventSubscriptionVendor} subscriber the subscriber that controls\n * this subscription.\n */\n function _EventSubscription(subscriber) {\n this.subscriber = subscriber;\n }\n /**\n * Removes this subscription from the subscriber that controls it.\n */\n\n\n var _proto = _EventSubscription.prototype;\n\n _proto.remove = function remove() {\n this.subscriber.removeSubscription(this);\n };\n\n return _EventSubscription;\n}();\n\nexport default _EventSubscription;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * EventSubscriptionVendor stores a set of EventSubscriptions that are\n * subscribed to a particular event type.\n */\nvar EventSubscriptionVendor = /*#__PURE__*/function () {\n function EventSubscriptionVendor() {\n this._subscriptionsForType = {};\n }\n /**\n * Adds a subscription keyed by an event type.\n *\n * @param {string} eventType\n * @param {EventSubscription} subscription\n */\n\n\n var _proto = EventSubscriptionVendor.prototype;\n\n _proto.addSubscription = function addSubscription(eventType, subscription) {\n invariant(subscription.subscriber === this, 'The subscriber of the subscription is incorrectly set.');\n\n if (!this._subscriptionsForType[eventType]) {\n this._subscriptionsForType[eventType] = [];\n }\n\n var key = this._subscriptionsForType[eventType].length;\n\n this._subscriptionsForType[eventType].push(subscription);\n\n subscription.eventType = eventType;\n subscription.key = key;\n return subscription;\n }\n /**\n * Removes a bulk set of the subscriptions.\n *\n * @param {?string} eventType - Optional name of the event type whose\n * registered supscriptions to remove, if null remove all subscriptions.\n */\n ;\n\n _proto.removeAllSubscriptions = function removeAllSubscriptions(eventType) {\n if (eventType == null) {\n this._subscriptionsForType = {};\n } else {\n delete this._subscriptionsForType[eventType];\n }\n }\n /**\n * Removes a specific subscription. Instead of calling this function, call\n * `subscription.remove()` directly.\n *\n * @param {object} subscription\n */\n ;\n\n _proto.removeSubscription = function removeSubscription(subscription) {\n var eventType = subscription.eventType;\n var key = subscription.key;\n var subscriptionsForType = this._subscriptionsForType[eventType];\n\n if (subscriptionsForType) {\n delete subscriptionsForType[key];\n }\n }\n /**\n * Returns the array of subscriptions that are currently registered for the\n * given event type.\n *\n * Note: This array can be potentially sparse as subscriptions are deleted\n * from it when they are removed.\n *\n * TODO: This returns a nullable array. wat?\n *\n * @param {string} eventType\n * @returns {?array}\n */\n ;\n\n _proto.getSubscriptionsForType = function getSubscriptionsForType(eventType) {\n return this._subscriptionsForType[eventType];\n };\n\n return EventSubscriptionVendor;\n}();\n\nexport default EventSubscriptionVendor;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @typecheck\n */\nimport invariant from 'fbjs/lib/invariant';\nimport EmitterSubscription from './_EmitterSubscription';\nimport EventSubscriptionVendor from './_EventSubscriptionVendor';\n\nvar sparseFilterPredicate = function sparseFilterPredicate() {\n return true;\n};\n\n/**\n * @class EventEmitter\n * @description\n * An EventEmitter is responsible for managing a set of listeners and publishing\n * events to them when it is told that such events happened. In addition to the\n * data for the given event it also sends a event control object which allows\n * the listeners/handlers to prevent the default behavior of the given event.\n *\n * The emitter is designed to be generic enough to support all the different\n * contexts in which one might want to emit events. It is a simple multicast\n * mechanism on top of which extra functionality can be composed. For example, a\n * more advanced emitter may use an EventHolder and EventFactory.\n */\nvar EventEmitter = /*#__PURE__*/function () {\n /**\n * @constructor\n *\n * @param {EventSubscriptionVendor} subscriber - Optional subscriber instance\n * to use. If omitted, a new subscriber will be created for the emitter.\n */\n function EventEmitter(subscriber) {\n this._subscriber = subscriber || new EventSubscriptionVendor();\n }\n /**\n * Adds a listener to be invoked when events of the specified type are\n * emitted. An optional calling context may be provided. The data arguments\n * emitted will be passed to the listener function.\n *\n * TODO: Annotate the listener arg's type. This is tricky because listeners\n * can be invoked with varargs.\n *\n * @param {string} eventType - Name of the event to listen to\n * @param {function} listener - Function to invoke when the specified event is\n * emitted\n * @param {*} context - Optional context object to use when invoking the\n * listener\n */\n\n\n var _proto = EventEmitter.prototype;\n\n _proto.addListener = function addListener(eventType, // FIXME: listeners should return void instead of mixed to prevent issues\n listener, context) {\n return this._subscriber.addSubscription(eventType, new EmitterSubscription(this, this._subscriber, listener, context));\n }\n /**\n * Removes all of the registered listeners, including those registered as\n * listener maps.\n *\n * @param {?string} eventType - Optional name of the event whose registered\n * listeners to remove\n */\n ;\n\n _proto.removeAllListeners = function removeAllListeners(eventType) {\n this._subscriber.removeAllSubscriptions(eventType);\n }\n /**\n * @deprecated Use `remove` on the EventSubscription from `addListener`.\n */\n ;\n\n _proto.removeSubscription = function removeSubscription(subscription) {\n invariant(subscription.emitter === this, 'Subscription does not belong to this emitter.');\n\n this._subscriber.removeSubscription(subscription);\n }\n /**\n * Returns the number of listeners that are currently registered for the given\n * event.\n *\n * @param {string} eventType - Name of the event to query\n * @returns {number}\n */\n ;\n\n _proto.listenerCount = function listenerCount(eventType) {\n var subscriptions = this._subscriber.getSubscriptionsForType(eventType);\n\n return subscriptions ? // We filter out missing entries because the array is sparse.\n // \"callbackfn is called only for elements of the array which actually\n // exist; it is not called for missing elements of the array.\"\n // https://www.ecma-international.org/ecma-262/9.0/index.html#sec-array.prototype.filter\n subscriptions.filter(sparseFilterPredicate).length : 0;\n }\n /**\n * Emits an event of the given type with the given data. All handlers of that\n * particular type will be notified.\n *\n * @param {string} eventType - Name of the event to emit\n * @param {...*} Arbitrary arguments to be passed to each registered listener\n *\n * @example\n * emitter.addListener('someEvent', function(message) {\n * console.log(message);\n * });\n *\n * emitter.emit('someEvent', 'abc'); // logs 'abc'\n */\n ;\n\n _proto.emit = function emit(eventType) {\n var subscriptions = this._subscriber.getSubscriptionsForType(eventType);\n\n if (subscriptions) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n for (var i = 0, l = subscriptions.length; i < l; i++) {\n var subscription = subscriptions[i]; // The subscription may have been removed during this event loop.\n\n if (subscription && subscription.listener) {\n subscription.listener.apply(subscription.context, args);\n }\n }\n }\n }\n /**\n * @deprecated Use `remove` on the EventSubscription from `addListener`.\n */\n ;\n\n _proto.removeListener = function removeListener(eventType, // FIXME: listeners should return void instead of mixed to prevent issues\n listener) {\n console.error(\"EventEmitter.removeListener('\" + eventType + \"', ...): Method has been \" + 'deprecated. Please instead use `remove()` on the subscription ' + 'returned by `EventEmitter.addListener`.');\n\n var subscriptions = this._subscriber.getSubscriptionsForType(eventType);\n\n if (subscriptions) {\n for (var i = 0, l = subscriptions.length; i < l; i++) {\n var subscription = subscriptions[i]; // The subscription may have been removed during this event loop.\n // its listener matches the listener in method parameters\n\n if (subscription && subscription.listener === listener) {\n subscription.remove();\n }\n }\n }\n };\n\n return EventEmitter;\n}();\n\nexport default EventEmitter;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport EventEmitter from './_EventEmitter';\nexport default EventEmitter;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport EventEmitter from '../emitter/EventEmitter'; // FIXME: use typed events\n\n/**\n * Global EventEmitter used by the native platform to emit events to JavaScript.\n * Events are identified by globally unique event names.\n *\n * NativeModules that emit events should instead subclass `NativeEventEmitter`.\n */\nexport default new EventEmitter();","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport NavigationContext from './NavigationContext';\nimport type { NavigationProp } from './types';\n\n/**\n * Hook to access the navigation prop of the parent screen anywhere.\n *\n * @returns Navigation prop of the parent screen.\n */\nexport default function useNavigation<\n T extends NavigationProp<ParamListBase>\n>(): T {\n const navigation = React.useContext(NavigationContext);\n\n if (navigation === undefined) {\n throw new Error(\n \"Couldn't find a navigation object. Is your component inside a screen in a navigator?\"\n );\n }\n\n return navigation as T;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n/*\n * @returns {bool} true if different, false if equal\n */\n\nvar deepDiffer = function deepDiffer(one, two, maxDepth) {\n if (maxDepth === void 0) {\n maxDepth = -1;\n }\n\n if (maxDepth === 0) {\n return true;\n }\n\n if (one === two) {\n // Short circuit on identical object references instead of traversing them.\n return false;\n }\n\n if (typeof one === 'function' && typeof two === 'function') {\n // We consider all functions equal\n return false;\n }\n\n if (typeof one !== 'object' || one === null) {\n // Primitives can be directly compared\n return one !== two;\n }\n\n if (typeof two !== 'object' || two === null) {\n // We know they are different because the previous case would have triggered\n // otherwise.\n return true;\n }\n\n if (one.constructor !== two.constructor) {\n return true;\n }\n\n if (Array.isArray(one)) {\n // We know two is also an array because the constructors are equal\n var len = one.length;\n\n if (two.length !== len) {\n return true;\n }\n\n for (var ii = 0; ii < len; ii++) {\n if (deepDiffer(one[ii], two[ii], maxDepth - 1)) {\n return true;\n }\n }\n } else {\n for (var key in one) {\n if (deepDiffer(one[key], two[key], maxDepth - 1)) {\n return true;\n }\n }\n\n for (var twoKey in two) {\n // The only case we haven't checked yet is keys that are in two but aren't\n // in one, which means they are different.\n if (one[twoKey] === undefined && two[twoKey] !== undefined) {\n return true;\n }\n }\n }\n\n return false;\n};\n\nexport default deepDiffer;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport deepDiffer from '../deepDiffer';\nimport * as React from 'react';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport View from '../../../exports/View';\nimport ScrollView from '../../../exports/ScrollView';\nimport VirtualizedList from '../VirtualizedList';\nimport invariant from 'fbjs/lib/invariant';\n\nvar defaultProps = _objectSpread(_objectSpread({}, VirtualizedList.defaultProps), {}, {\n numColumns: 1\n});\n\n/**\n * A performant interface for rendering simple, flat lists, supporting the most handy features:\n *\n * - Fully cross-platform.\n * - Optional horizontal mode.\n * - Configurable viewability callbacks.\n * - Header support.\n * - Footer support.\n * - Separator support.\n * - Pull to Refresh.\n * - Scroll loading.\n * - ScrollToIndex support.\n *\n * If you need section support, use [`<SectionList>`](docs/sectionlist.html).\n *\n * Minimal Example:\n *\n * <FlatList\n * data={[{key: 'a'}, {key: 'b'}]}\n * renderItem={({item}) => <Text>{item.key}</Text>}\n * />\n *\n * More complex, multi-select example demonstrating `PureComponent` usage for perf optimization and avoiding bugs.\n *\n * - By binding the `onPressItem` handler, the props will remain `===` and `PureComponent` will\n * prevent wasteful re-renders unless the actual `id`, `selected`, or `title` props change, even\n * if the components rendered in `MyListItem` did not have such optimizations.\n * - By passing `extraData={this.state}` to `FlatList` we make sure `FlatList` itself will re-render\n * when the `state.selected` changes. Without setting this prop, `FlatList` would not know it\n * needs to re-render any items because it is also a `PureComponent` and the prop comparison will\n * not show any changes.\n * - `keyExtractor` tells the list to use the `id`s for the react keys instead of the default `key` property.\n *\n *\n * class MyListItem extends React.PureComponent {\n * _onPress = () => {\n * this.props.onPressItem(this.props.id);\n * };\n *\n * render() {\n * const textColor = this.props.selected ? \"red\" : \"black\";\n * return (\n * <TouchableOpacity onPress={this._onPress}>\n * <View>\n * <Text style={{ color: textColor }}>\n * {this.props.title}\n * </Text>\n * </View>\n * </TouchableOpacity>\n * );\n * }\n * }\n *\n * class MultiSelectList extends React.PureComponent {\n * state = {selected: (new Map(): Map<string, boolean>)};\n *\n * _keyExtractor = (item, index) => item.id;\n *\n * _onPressItem = (id: string) => {\n * // updater functions are preferred for transactional updates\n * this.setState((state) => {\n * // copy the map rather than modifying state.\n * const selected = new Map(state.selected);\n * selected.set(id, !selected.get(id)); // toggle\n * return {selected};\n * });\n * };\n *\n * _renderItem = ({item}) => (\n * <MyListItem\n * id={item.id}\n * onPressItem={this._onPressItem}\n * selected={!!this.state.selected.get(item.id)}\n * title={item.title}\n * />\n * );\n *\n * render() {\n * return (\n * <FlatList\n * data={this.props.data}\n * extraData={this.state}\n * keyExtractor={this._keyExtractor}\n * renderItem={this._renderItem}\n * />\n * );\n * }\n * }\n *\n * This is a convenience wrapper around [`<VirtualizedList>`](docs/virtualizedlist.html),\n * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed\n * here, along with the following caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n * Also inherits [ScrollView Props](docs/scrollview.html#props), unless it is nested in another FlatList of same orientation.\n */\nvar FlatList = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(FlatList, _React$PureComponent);\n\n var _proto = FlatList.prototype;\n\n /**\n * Scrolls to the end of the content. May be janky without `getItemLayout` prop.\n */\n _proto.scrollToEnd = function scrollToEnd(params) {\n if (this._listRef) {\n this._listRef.scrollToEnd(params);\n }\n }\n /**\n * Scrolls to the item at the specified index such that it is positioned in the viewable area\n * such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the\n * middle. `viewOffset` is a fixed number of pixels to offset the final target position.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n ;\n\n _proto.scrollToIndex = function scrollToIndex(params) {\n if (this._listRef) {\n this._listRef.scrollToIndex(params);\n }\n }\n /**\n * Requires linear scan through data - use `scrollToIndex` instead if possible.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n ;\n\n _proto.scrollToItem = function scrollToItem(params) {\n if (this._listRef) {\n this._listRef.scrollToItem(params);\n }\n }\n /**\n * Scroll to a specific content pixel offset in the list.\n *\n * Check out [scrollToOffset](docs/virtualizedlist.html#scrolltooffset) of VirtualizedList\n */\n ;\n\n _proto.scrollToOffset = function scrollToOffset(params) {\n if (this._listRef) {\n this._listRef.scrollToOffset(params);\n }\n }\n /**\n * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.\n * if `waitForInteractions` is true and the user has not scrolled. This is typically called by\n * taps on items or by navigation actions.\n */\n ;\n\n _proto.recordInteraction = function recordInteraction() {\n if (this._listRef) {\n this._listRef.recordInteraction();\n }\n }\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n ;\n\n _proto.flashScrollIndicators = function flashScrollIndicators() {\n if (this._listRef) {\n this._listRef.flashScrollIndicators();\n }\n }\n /**\n * Provides a handle to the underlying scroll responder.\n */\n ;\n\n _proto.getScrollResponder = function getScrollResponder() {\n if (this._listRef) {\n return this._listRef.getScrollResponder();\n }\n }\n /**\n * Provides a reference to the underlying host component\n */\n ;\n\n _proto.getNativeScrollRef = function getNativeScrollRef() {\n if (this._listRef) {\n /* $FlowFixMe[incompatible-return] Suppresses errors found when fixing\n * TextInput typing */\n return this._listRef.getScrollRef();\n }\n };\n\n _proto.getScrollableNode = function getScrollableNode() {\n if (this._listRef) {\n return this._listRef.getScrollableNode();\n }\n };\n\n _proto.setNativeProps = function setNativeProps(props) {\n if (this._listRef) {\n this._listRef.setNativeProps(props);\n }\n };\n\n function FlatList(_props) {\n var _this;\n\n _this = _React$PureComponent.call(this, _props) || this;\n _this._virtualizedListPairs = [];\n\n _this._captureRef = function (ref) {\n _this._listRef = ref;\n };\n\n _this._getItem = function (data, index) {\n var numColumns = _this.props.numColumns;\n\n if (numColumns > 1) {\n var ret = [];\n\n for (var kk = 0; kk < numColumns; kk++) {\n var _item = data[index * numColumns + kk];\n\n if (_item != null) {\n ret.push(_item);\n }\n }\n\n return ret;\n } else {\n return data[index];\n }\n };\n\n _this._getItemCount = function (data) {\n if (data) {\n var numColumns = _this.props.numColumns;\n return numColumns > 1 ? Math.ceil(data.length / numColumns) : data.length;\n } else {\n return 0;\n }\n };\n\n _this._keyExtractor = function (items, index) {\n var _this$props = _this.props,\n keyExtractor = _this$props.keyExtractor,\n numColumns = _this$props.numColumns;\n\n if (numColumns > 1) {\n invariant(Array.isArray(items), 'FlatList: Encountered internal consistency error, expected each item to consist of an ' + 'array with 1-%s columns; instead, received a single item.', numColumns);\n return items // $FlowFixMe[incompatible-call]\n .map(function (it, kk) {\n return keyExtractor(it, index * numColumns + kk);\n }).join(':');\n } else {\n // $FlowFixMe Can't call keyExtractor with an array\n return keyExtractor(items, index);\n }\n };\n\n _this._renderer = function () {\n var _ref;\n\n var _this$props2 = _this.props,\n ListItemComponent = _this$props2.ListItemComponent,\n renderItem = _this$props2.renderItem,\n numColumns = _this$props2.numColumns,\n columnWrapperStyle = _this$props2.columnWrapperStyle;\n var virtualizedListRenderKey = ListItemComponent ? 'ListItemComponent' : 'renderItem';\n\n var renderer = function renderer(props) {\n if (ListItemComponent) {\n // $FlowFixMe Component isn't valid\n return /*#__PURE__*/React.createElement(ListItemComponent, props);\n } else if (renderItem) {\n // $FlowFixMe[incompatible-call]\n return renderItem(props);\n } else {\n return null;\n }\n };\n\n return _ref = {}, _ref[virtualizedListRenderKey] = function (info) {\n if (numColumns > 1) {\n var _item2 = info.item,\n _index = info.index;\n invariant(Array.isArray(_item2), 'Expected array of items with numColumns > 1');\n return /*#__PURE__*/React.createElement(View, {\n style: StyleSheet.compose(styles.row, columnWrapperStyle)\n }, _item2.map(function (it, kk) {\n var element = renderer({\n item: it,\n index: _index * numColumns + kk,\n separators: info.separators\n });\n return element != null ? /*#__PURE__*/React.createElement(React.Fragment, {\n key: kk\n }, element) : null;\n }));\n } else {\n return renderer(info);\n }\n }, _ref;\n };\n\n _this._checkProps(_this.props);\n\n if (_this.props.viewabilityConfigCallbackPairs) {\n _this._virtualizedListPairs = _this.props.viewabilityConfigCallbackPairs.map(function (pair) {\n return {\n viewabilityConfig: pair.viewabilityConfig,\n onViewableItemsChanged: _this._createOnViewableItemsChanged(pair.onViewableItemsChanged)\n };\n });\n } else if (_this.props.onViewableItemsChanged) {\n _this._virtualizedListPairs.push({\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.63 was deployed. To see the error delete\n * this comment and run Flow. */\n viewabilityConfig: _this.props.viewabilityConfig,\n onViewableItemsChanged: _this._createOnViewableItemsChanged(_this.props.onViewableItemsChanged)\n });\n }\n\n return _this;\n }\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n invariant(prevProps.numColumns === this.props.numColumns, 'Changing numColumns on the fly is not supported. Change the key prop on FlatList when ' + 'changing the number of columns to force a fresh render of the component.');\n invariant(prevProps.onViewableItemsChanged === this.props.onViewableItemsChanged, 'Changing onViewableItemsChanged on the fly is not supported');\n invariant(!deepDiffer(prevProps.viewabilityConfig, this.props.viewabilityConfig), 'Changing viewabilityConfig on the fly is not supported');\n invariant(prevProps.viewabilityConfigCallbackPairs === this.props.viewabilityConfigCallbackPairs, 'Changing viewabilityConfigCallbackPairs on the fly is not supported');\n\n this._checkProps(this.props);\n };\n\n _proto._checkProps = function _checkProps(props) {\n var getItem = props.getItem,\n getItemCount = props.getItemCount,\n horizontal = props.horizontal,\n numColumns = props.numColumns,\n columnWrapperStyle = props.columnWrapperStyle,\n onViewableItemsChanged = props.onViewableItemsChanged,\n viewabilityConfigCallbackPairs = props.viewabilityConfigCallbackPairs;\n invariant(!getItem && !getItemCount, 'FlatList does not support custom data formats.');\n\n if (numColumns > 1) {\n invariant(!horizontal, 'numColumns does not support horizontal.');\n } else {\n invariant(!columnWrapperStyle, 'columnWrapperStyle not supported for single column lists');\n }\n\n invariant(!(onViewableItemsChanged && viewabilityConfigCallbackPairs), 'FlatList does not support setting both onViewableItemsChanged and ' + 'viewabilityConfigCallbackPairs.');\n };\n\n _proto._pushMultiColumnViewable = function _pushMultiColumnViewable(arr, v) {\n var _this$props3 = this.props,\n numColumns = _this$props3.numColumns,\n keyExtractor = _this$props3.keyExtractor;\n v.item.forEach(function (item, ii) {\n invariant(v.index != null, 'Missing index!');\n var index = v.index * numColumns + ii;\n arr.push(_objectSpread(_objectSpread({}, v), {}, {\n item: item,\n key: keyExtractor(item, index),\n index: index\n }));\n });\n };\n\n _proto._createOnViewableItemsChanged = function _createOnViewableItemsChanged(onViewableItemsChanged) {\n var _this2 = this;\n\n return function (info) {\n var numColumns = _this2.props.numColumns;\n\n if (onViewableItemsChanged) {\n if (numColumns > 1) {\n var changed = [];\n var viewableItems = [];\n info.viewableItems.forEach(function (v) {\n return _this2._pushMultiColumnViewable(viewableItems, v);\n });\n info.changed.forEach(function (v) {\n return _this2._pushMultiColumnViewable(changed, v);\n });\n onViewableItemsChanged({\n viewableItems: viewableItems,\n changed: changed\n });\n } else {\n onViewableItemsChanged(info);\n }\n }\n };\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n numColumns = _this$props4.numColumns,\n columnWrapperStyle = _this$props4.columnWrapperStyle,\n restProps = _objectWithoutPropertiesLoose(_this$props4, [\"numColumns\", \"columnWrapperStyle\"]);\n\n return /*#__PURE__*/React.createElement(VirtualizedList, _extends({}, restProps, {\n getItem: this._getItem,\n getItemCount: this._getItemCount,\n keyExtractor: this._keyExtractor,\n ref: this._captureRef,\n viewabilityConfigCallbackPairs: this._virtualizedListPairs\n }, this._renderer()));\n };\n\n return FlatList;\n}(React.PureComponent);\n\nFlatList.defaultProps = defaultProps;\nvar styles = StyleSheet.create({\n row: {\n flexDirection: 'row'\n }\n});\nexport default FlatList;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport FlatList from '../../vendor/react-native/FlatList';\nexport default FlatList;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport default function pick(obj, list) {\n var nextObj = {};\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (list[key] === true || // Temporary until ARIA is mapped to explicit props\n key.indexOf('aria-') === 0) {\n nextObj[key] = obj[key];\n }\n }\n }\n\n return nextObj;\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UIManager from '../../exports/UIManager';\nimport createDOMProps from '../createDOMProps';\nimport useStable from '../useStable';\nimport { useRef } from 'react';\nvar emptyObject = {};\n\nfunction setNativeProps(node, nativeProps, classList, pointerEvents, style, previousStyleRef) {\n if (node != null && nativeProps) {\n var domProps = createDOMProps(null, _objectSpread(_objectSpread({\n pointerEvents: pointerEvents\n }, nativeProps), {}, {\n classList: [classList, nativeProps.className],\n style: [style, nativeProps.style]\n }));\n var nextDomStyle = domProps.style;\n\n if (previousStyleRef.current != null) {\n if (domProps.style == null) {\n domProps.style = {};\n }\n\n for (var styleName in previousStyleRef.current) {\n if (domProps.style[styleName] == null) {\n domProps.style[styleName] = '';\n }\n }\n }\n\n previousStyleRef.current = nextDomStyle;\n UIManager.updateView(node, domProps);\n }\n}\n/**\n * Adds non-standard methods to the hode element. This is temporarily until an\n * API like `ReactNative.measure(hostRef, callback)` is added to React Native.\n */\n\n\nexport default function usePlatformMethods(_ref) {\n var classList = _ref.classList,\n pointerEvents = _ref.pointerEvents,\n style = _ref.style;\n var previousStyleRef = useRef(null);\n var setNativePropsArgsRef = useRef(null);\n setNativePropsArgsRef.current = {\n classList: classList,\n pointerEvents: pointerEvents,\n style: style\n }; // Avoid creating a new ref on every render. The props only need to be\n // available to 'setNativeProps' when it is called.\n\n var ref = useStable(function () {\n return function (hostNode) {\n if (hostNode != null) {\n hostNode.measure = function (callback) {\n return UIManager.measure(hostNode, callback);\n };\n\n hostNode.measureLayout = function (relativeToNode, success, failure) {\n return UIManager.measureLayout(hostNode, relativeToNode, failure, success);\n };\n\n hostNode.measureInWindow = function (callback) {\n return UIManager.measureInWindow(hostNode, callback);\n };\n\n hostNode.setNativeProps = function (nativeProps) {\n var _ref2 = setNativePropsArgsRef.current || emptyObject,\n classList = _ref2.classList,\n style = _ref2.style,\n pointerEvents = _ref2.pointerEvents;\n\n setNativeProps(hostNode, nativeProps, classList, pointerEvents, style, previousStyleRef);\n };\n }\n };\n });\n return ref;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nvar DELAY = 'DELAY';\nvar ERROR = 'ERROR';\nvar LONG_PRESS_DETECTED = 'LONG_PRESS_DETECTED';\nvar NOT_RESPONDER = 'NOT_RESPONDER';\nvar RESPONDER_ACTIVE_LONG_PRESS_START = 'RESPONDER_ACTIVE_LONG_PRESS_START';\nvar RESPONDER_ACTIVE_PRESS_START = 'RESPONDER_ACTIVE_PRESS_START';\nvar RESPONDER_INACTIVE_PRESS_START = 'RESPONDER_INACTIVE_PRESS_START';\nvar RESPONDER_GRANT = 'RESPONDER_GRANT';\nvar RESPONDER_RELEASE = 'RESPONDER_RELEASE';\nvar RESPONDER_TERMINATED = 'RESPONDER_TERMINATED';\nvar Transitions = Object.freeze({\n NOT_RESPONDER: {\n DELAY: ERROR,\n RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START,\n RESPONDER_RELEASE: ERROR,\n RESPONDER_TERMINATED: ERROR,\n LONG_PRESS_DETECTED: ERROR\n },\n RESPONDER_INACTIVE_PRESS_START: {\n DELAY: RESPONDER_ACTIVE_PRESS_START,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: ERROR\n },\n RESPONDER_ACTIVE_PRESS_START: {\n DELAY: ERROR,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: RESPONDER_ACTIVE_LONG_PRESS_START\n },\n RESPONDER_ACTIVE_LONG_PRESS_START: {\n DELAY: ERROR,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: RESPONDER_ACTIVE_LONG_PRESS_START\n },\n ERROR: {\n DELAY: NOT_RESPONDER,\n RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: NOT_RESPONDER\n }\n});\n\nvar isActiveSignal = function isActiveSignal(signal) {\n return signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START;\n};\n\nvar isButtonRole = function isButtonRole(element) {\n return element.getAttribute('role') === 'button';\n};\n\nvar isPressStartSignal = function isPressStartSignal(signal) {\n return signal === RESPONDER_INACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START;\n};\n\nvar isTerminalSignal = function isTerminalSignal(signal) {\n return signal === RESPONDER_TERMINATED || signal === RESPONDER_RELEASE;\n};\n\nvar isValidKeyPress = function isValidKeyPress(event) {\n var key = event.key;\n var target = event.currentTarget;\n var role = target.getAttribute('role');\n var isSpacebar = key === ' ' || key === 'Spacebar';\n return !event.repeat && (key === 'Enter' || isSpacebar && (role === 'button' || role === 'menuitem'));\n};\n\nvar DEFAULT_LONG_PRESS_DELAY_MS = 450; // 500 - 50\n\nvar DEFAULT_PRESS_DELAY_MS = 50;\n/**\n * =========================== PressResponder Tutorial ===========================\n *\n * The `PressResponder` class helps you create press interactions by analyzing the\n * geometry of elements and observing when another responder (e.g. ScrollView)\n * has stolen the touch lock. It offers hooks for your component to provide\n * interaction feedback to the user:\n *\n * - When a press has activated (e.g. highlight an element)\n * - When a press has deactivated (e.g. un-highlight an element)\n * - When a press sould trigger an action, meaning it activated and deactivated\n * while within the geometry of the element without the lock being stolen.\n *\n * A high quality interaction isn't as simple as you might think. There should\n * be a slight delay before activation. Moving your finger beyond an element's\n * bounds should trigger deactivation, but moving the same finger back within an\n * element's bounds should trigger reactivation.\n *\n * In order to use `PressResponder`, do the following:\n *\n * const pressResponder = new PressResponder(config);\n *\n * 2. Choose the rendered component who should collect the press events. On that\n * element, spread `pressability.getEventHandlers()` into its props.\n *\n * return (\n * <View {...this.state.pressResponder.getEventHandlers()} />\n * );\n *\n * 3. Reset `PressResponder` when your component unmounts.\n *\n * componentWillUnmount() {\n * this.state.pressResponder.reset();\n * }\n *\n * ==================== Implementation Details ====================\n *\n * `PressResponder` only assumes that there exists a `HitRect` node. The `PressRect`\n * is an abstract box that is extended beyond the `HitRect`.\n *\n * # Geometry\n *\n * ┌────────────────────────┐\n * │ ┌──────────────────┐ │ - Presses start anywhere within `HitRect`.\n * │ │ ┌────────────┐ │ │\n * │ │ │ VisualRect │ │ │\n * │ │ └────────────┘ │ │ - When pressed down for sufficient amount of time\n * │ │ HitRect │ │ before letting up, `VisualRect` activates.\n * │ └──────────────────┘ │\n * │ Out Region o │\n * └────────────────────│───┘\n * └────── When the press is released outside the `HitRect`,\n * the responder is NOT eligible for a \"press\".\n *\n * # State Machine\n *\n * ┌───────────────┐ ◀──── RESPONDER_RELEASE\n * │ NOT_RESPONDER │\n * └───┬───────────┘ ◀──── RESPONDER_TERMINATED\n * │\n * │ RESPONDER_GRANT (HitRect)\n * │\n * ▼\n * ┌─────────────────────┐ ┌───────────────────┐ ┌───────────────────┐\n * │ RESPONDER_INACTIVE_ │ DELAY │ RESPONDER_ACTIVE_ │ T + DELAY │ RESPONDER_ACTIVE_ │\n * │ PRESS_START ├────────▶ │ PRESS_START ├────────────▶ │ LONG_PRESS_START │\n * └─────────────────────┘ └───────────────────┘ └───────────────────┘\n *\n * T + DELAY => LONG_PRESS_DELAY + DELAY\n *\n * Not drawn are the side effects of each transition. The most important side\n * effect is the invocation of `onLongPress`. Only when the browser produces a\n * `click` event is `onPress` invoked.\n */\n\nvar PressResponder = /*#__PURE__*/function () {\n function PressResponder(config) {\n this._eventHandlers = null;\n this._isPointerTouch = false;\n this._longPressDelayTimeout = null;\n this._longPressDispatched = false;\n this._pressDelayTimeout = null;\n this._pressOutDelayTimeout = null;\n this._touchState = NOT_RESPONDER;\n this.configure(config);\n }\n\n var _proto = PressResponder.prototype;\n\n _proto.configure = function configure(config) {\n this._config = config;\n }\n /**\n * Resets any pending timers. This should be called on unmount.\n */\n ;\n\n _proto.reset = function reset() {\n this._cancelLongPressDelayTimeout();\n\n this._cancelPressDelayTimeout();\n\n this._cancelPressOutDelayTimeout();\n }\n /**\n * Returns a set of props to spread into the interactive element.\n */\n ;\n\n _proto.getEventHandlers = function getEventHandlers() {\n if (this._eventHandlers == null) {\n this._eventHandlers = this._createEventHandlers();\n }\n\n return this._eventHandlers;\n };\n\n _proto._createEventHandlers = function _createEventHandlers() {\n var _this = this;\n\n var start = function start(event, shouldDelay) {\n event.persist();\n\n _this._cancelPressOutDelayTimeout();\n\n _this._longPressDispatched = false;\n _this._selectionTerminated = false;\n _this._touchState = NOT_RESPONDER;\n _this._isPointerTouch = event.nativeEvent.type === 'touchstart';\n\n _this._receiveSignal(RESPONDER_GRANT, event);\n\n var delayPressStart = normalizeDelay(_this._config.delayPressStart, 0, DEFAULT_PRESS_DELAY_MS);\n\n if (shouldDelay !== false && delayPressStart > 0) {\n _this._pressDelayTimeout = setTimeout(function () {\n _this._receiveSignal(DELAY, event);\n }, delayPressStart);\n } else {\n _this._receiveSignal(DELAY, event);\n }\n\n var delayLongPress = normalizeDelay(_this._config.delayLongPress, 10, DEFAULT_LONG_PRESS_DELAY_MS);\n _this._longPressDelayTimeout = setTimeout(function () {\n _this._handleLongPress(event);\n }, delayLongPress + delayPressStart);\n };\n\n var end = function end(event) {\n _this._receiveSignal(RESPONDER_RELEASE, event);\n };\n\n var keyupHandler = function keyupHandler(event) {\n if (_this._touchState !== NOT_RESPONDER) {\n end(event);\n document.removeEventListener('keyup', keyupHandler);\n }\n };\n\n return {\n onStartShouldSetResponder: function onStartShouldSetResponder(event) {\n var disabled = _this._config.disabled;\n\n if (disabled && isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n\n if (disabled == null) {\n return true;\n }\n\n return !disabled;\n },\n onKeyDown: function onKeyDown(event) {\n if (isValidKeyPress(event)) {\n if (_this._touchState === NOT_RESPONDER) {\n start(event, false); // Listen to 'keyup' on document to account for situations where\n // focus is moved to another element during 'keydown'.\n\n document.addEventListener('keyup', keyupHandler);\n }\n\n event.stopPropagation();\n }\n },\n onResponderGrant: function onResponderGrant(event) {\n return start(event);\n },\n onResponderMove: function onResponderMove(event) {\n if (_this._config.onPressMove != null) {\n _this._config.onPressMove(event);\n }\n\n var touch = getTouchFromResponderEvent(event);\n\n if (_this._touchActivatePosition != null) {\n var deltaX = _this._touchActivatePosition.pageX - touch.pageX;\n var deltaY = _this._touchActivatePosition.pageY - touch.pageY;\n\n if (Math.hypot(deltaX, deltaY) > 10) {\n _this._cancelLongPressDelayTimeout();\n }\n }\n },\n onResponderRelease: function onResponderRelease(event) {\n return end(event);\n },\n onResponderTerminate: function onResponderTerminate(event) {\n if (event.nativeEvent.type === 'selectionchange') {\n _this._selectionTerminated = true;\n }\n\n _this._receiveSignal(RESPONDER_TERMINATED, event);\n },\n onResponderTerminationRequest: function onResponderTerminationRequest(event) {\n var _this$_config = _this._config,\n cancelable = _this$_config.cancelable,\n disabled = _this$_config.disabled,\n onLongPress = _this$_config.onLongPress; // If `onLongPress` is provided, don't terminate on `contextmenu` as default\n // behavior will be prevented for non-mouse pointers.\n\n if (!disabled && onLongPress != null && _this._isPointerTouch && event.nativeEvent.type === 'contextmenu') {\n return false;\n }\n\n if (cancelable == null) {\n return true;\n }\n\n return cancelable;\n },\n // NOTE: this diverges from react-native in 3 significant ways:\n // * The `onPress` callback is not connected to the responder system (the native\n // `click` event must be used but is dispatched in many scenarios where no pointers\n // are on the screen.) Therefore, it's possible for `onPress` to be called without\n // `onPress{Start,End}` being called first.\n // * The `onPress` callback is only be called on the first ancestor of the native\n // `click` target that is using the PressResponder.\n // * The event's `nativeEvent` is a `MouseEvent` not a `TouchEvent`.\n onClick: function onClick(event) {\n var _this$_config2 = _this._config,\n disabled = _this$_config2.disabled,\n onPress = _this$_config2.onPress;\n\n if (!disabled) {\n // If long press dispatched, cancel default click behavior.\n // If the responder terminated because text was selected during the gesture,\n // cancel the default click behavior.\n event.stopPropagation();\n\n if (_this._longPressDispatched || _this._selectionTerminated) {\n event.preventDefault();\n } else if (onPress != null && event.altKey === false) {\n onPress(event);\n }\n } else {\n if (isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n }\n },\n // If `onLongPress` is provided and a touch pointer is being used, prevent the\n // default context menu from opening.\n onContextMenu: function onContextMenu(event) {\n var _this$_config3 = _this._config,\n disabled = _this$_config3.disabled,\n onLongPress = _this$_config3.onLongPress;\n\n if (!disabled) {\n if (onLongPress != null && _this._isPointerTouch && !event.defaultPrevented) {\n event.preventDefault();\n event.stopPropagation();\n }\n } else {\n if (isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n }\n }\n };\n }\n /**\n * Receives a state machine signal, performs side effects of the transition\n * and stores the new state. Validates the transition as well.\n */\n ;\n\n _proto._receiveSignal = function _receiveSignal(signal, event) {\n var prevState = this._touchState;\n var nextState = null;\n\n if (Transitions[prevState] != null) {\n nextState = Transitions[prevState][signal];\n }\n\n if (this._touchState === NOT_RESPONDER && signal === RESPONDER_RELEASE) {\n return;\n }\n\n if (nextState == null || nextState === ERROR) {\n console.error(\"PressResponder: Invalid signal \" + signal + \" for state \" + prevState + \" on responder\");\n } else if (prevState !== nextState) {\n this._performTransitionSideEffects(prevState, nextState, signal, event);\n\n this._touchState = nextState;\n }\n }\n /**\n * Performs a transition between touchable states and identify any activations\n * or deactivations (and callback invocations).\n */\n ;\n\n _proto._performTransitionSideEffects = function _performTransitionSideEffects(prevState, nextState, signal, event) {\n if (isTerminalSignal(signal)) {\n this._isPointerTouch = false;\n this._touchActivatePosition = null;\n\n this._cancelLongPressDelayTimeout();\n }\n\n if (isPressStartSignal(prevState) && signal === LONG_PRESS_DETECTED) {\n var onLongPress = this._config.onLongPress; // Long press is not supported for keyboards because 'click' can be dispatched\n // immediately (and multiple times) after 'keydown'.\n\n if (onLongPress != null && event.nativeEvent.key == null) {\n onLongPress(event);\n this._longPressDispatched = true;\n }\n }\n\n var isPrevActive = isActiveSignal(prevState);\n var isNextActive = isActiveSignal(nextState);\n\n if (!isPrevActive && isNextActive) {\n this._activate(event);\n } else if (isPrevActive && !isNextActive) {\n this._deactivate(event);\n }\n\n if (isPressStartSignal(prevState) && signal === RESPONDER_RELEASE) {\n var _this$_config4 = this._config,\n _onLongPress = _this$_config4.onLongPress,\n onPress = _this$_config4.onPress;\n\n if (onPress != null) {\n var isPressCanceledByLongPress = _onLongPress != null && prevState === RESPONDER_ACTIVE_LONG_PRESS_START;\n\n if (!isPressCanceledByLongPress) {\n // If we never activated (due to delays), activate and deactivate now.\n if (!isNextActive && !isPrevActive) {\n this._activate(event);\n\n this._deactivate(event);\n }\n }\n }\n }\n\n this._cancelPressDelayTimeout();\n };\n\n _proto._activate = function _activate(event) {\n var _this$_config5 = this._config,\n onPressChange = _this$_config5.onPressChange,\n onPressStart = _this$_config5.onPressStart;\n var touch = getTouchFromResponderEvent(event);\n this._touchActivatePosition = {\n pageX: touch.pageX,\n pageY: touch.pageY\n };\n\n if (onPressStart != null) {\n onPressStart(event);\n }\n\n if (onPressChange != null) {\n onPressChange(true);\n }\n };\n\n _proto._deactivate = function _deactivate(event) {\n var _this$_config6 = this._config,\n onPressChange = _this$_config6.onPressChange,\n onPressEnd = _this$_config6.onPressEnd;\n\n function end() {\n if (onPressEnd != null) {\n onPressEnd(event);\n }\n\n if (onPressChange != null) {\n onPressChange(false);\n }\n }\n\n var delayPressEnd = normalizeDelay(this._config.delayPressEnd);\n\n if (delayPressEnd > 0) {\n this._pressOutDelayTimeout = setTimeout(function () {\n end();\n }, delayPressEnd);\n } else {\n end();\n }\n };\n\n _proto._handleLongPress = function _handleLongPress(event) {\n if (this._touchState === RESPONDER_ACTIVE_PRESS_START || this._touchState === RESPONDER_ACTIVE_LONG_PRESS_START) {\n this._receiveSignal(LONG_PRESS_DETECTED, event);\n }\n };\n\n _proto._cancelLongPressDelayTimeout = function _cancelLongPressDelayTimeout() {\n if (this._longPressDelayTimeout != null) {\n clearTimeout(this._longPressDelayTimeout);\n this._longPressDelayTimeout = null;\n }\n };\n\n _proto._cancelPressDelayTimeout = function _cancelPressDelayTimeout() {\n if (this._pressDelayTimeout != null) {\n clearTimeout(this._pressDelayTimeout);\n this._pressDelayTimeout = null;\n }\n };\n\n _proto._cancelPressOutDelayTimeout = function _cancelPressOutDelayTimeout() {\n if (this._pressOutDelayTimeout != null) {\n clearTimeout(this._pressOutDelayTimeout);\n this._pressOutDelayTimeout = null;\n }\n };\n\n return PressResponder;\n}();\n\nexport { PressResponder as default };\n\nfunction normalizeDelay(delay, min, fallback) {\n if (min === void 0) {\n min = 0;\n }\n\n if (fallback === void 0) {\n fallback = 0;\n }\n\n return Math.max(min, delay !== null && delay !== void 0 ? delay : fallback);\n}\n\nfunction getTouchFromResponderEvent(event) {\n var _event$nativeEvent = event.nativeEvent,\n changedTouches = _event$nativeEvent.changedTouches,\n touches = _event$nativeEvent.touches;\n\n if (touches != null && touches.length > 0) {\n return touches[0];\n }\n\n if (changedTouches != null && changedTouches.length > 0) {\n return changedTouches[0];\n }\n\n return event.nativeEvent;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport PressResponder from './PressResponder';\nimport { useDebugValue, useEffect, useRef } from 'react';\nexport default function usePressEvents(hostRef, config) {\n var pressResponderRef = useRef(null);\n\n if (pressResponderRef.current == null) {\n pressResponderRef.current = new PressResponder(config);\n }\n\n var pressResponder = pressResponderRef.current; // Re-configure to use the current node and configuration.\n\n useEffect(function () {\n pressResponder.configure(config);\n }, [config, pressResponder]); // Reset the `pressResponder` when cleanup needs to occur. This is\n // a separate effect because we do not want to rest the responder when `config` changes.\n\n useEffect(function () {\n return function () {\n pressResponder.reset();\n };\n }, [pressResponder]);\n useDebugValue(config);\n return pressResponder.getEventHandlers();\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nimport InteractionManager from '../../../exports/InteractionManager';\n/**\n * A simple class for batching up invocations of a low-pri callback. A timeout is set to run the\n * callback once after a delay, no matter how many times it's scheduled. Once the delay is reached,\n * InteractionManager.runAfterInteractions is used to invoke the callback after any hi-pri\n * interactions are done running.\n *\n * Make sure to cleanup with dispose(). Example:\n *\n * class Widget extends React.Component {\n * _batchedSave: new Batchinator(() => this._saveState, 1000);\n * _saveSate() {\n * // save this.state to disk\n * }\n * componentDidUpdate() {\n * this._batchedSave.schedule();\n * }\n * componentWillUnmount() {\n * this._batchedSave.dispose();\n * }\n * ...\n * }\n */\n\nvar Batchinator = /*#__PURE__*/function () {\n function Batchinator(callback, delayMS) {\n this._delay = delayMS;\n this._callback = callback;\n }\n /*\n * Cleanup any pending tasks.\n *\n * By default, if there is a pending task the callback is run immediately. Set the option abort to\n * true to not call the callback if it was pending.\n */\n\n\n var _proto = Batchinator.prototype;\n\n _proto.dispose = function dispose(options) {\n if (options === void 0) {\n options = {\n abort: false\n };\n }\n\n if (this._taskHandle) {\n this._taskHandle.cancel();\n\n if (!options.abort) {\n this._callback();\n }\n\n this._taskHandle = null;\n }\n };\n\n _proto.schedule = function schedule() {\n var _this = this;\n\n if (this._taskHandle) {\n return;\n }\n\n var timeoutHandle = setTimeout(function () {\n _this._taskHandle = InteractionManager.runAfterInteractions(function () {\n // Note that we clear the handle before invoking the callback so that if the callback calls\n // schedule again, it will actually schedule another task.\n _this._taskHandle = null;\n\n _this._callback();\n });\n }, this._delay);\n this._taskHandle = {\n cancel: function cancel() {\n return clearTimeout(timeoutHandle);\n }\n };\n };\n\n return Batchinator;\n}();\n\nexport default Batchinator;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * A Utility class for calculating viewable items based on current metrics like scroll position and\n * layout.\n *\n * An item is said to be in a \"viewable\" state when any of the following\n * is true for longer than `minimumViewTime` milliseconds (after an interaction if `waitForInteraction`\n * is true):\n *\n * - Occupying >= `viewAreaCoveragePercentThreshold` of the view area XOR fraction of the item\n * visible in the view area >= `itemVisiblePercentThreshold`.\n * - Entirely visible on screen\n */\nvar ViewabilityHelper = /*#__PURE__*/function () {\n function ViewabilityHelper(config) {\n if (config === void 0) {\n config = {\n viewAreaCoveragePercentThreshold: 0\n };\n }\n\n this._hasInteracted = false;\n this._timers = new Set();\n this._viewableIndices = [];\n this._viewableItems = new Map();\n this._config = config;\n }\n /**\n * Cleanup, e.g. on unmount. Clears any pending timers.\n */\n\n\n var _proto = ViewabilityHelper.prototype;\n\n _proto.dispose = function dispose() {\n this._timers.forEach(clearTimeout);\n }\n /**\n * Determines which items are viewable based on the current metrics and config.\n */\n ;\n\n _proto.computeViewableItems = function computeViewableItems(itemCount, scrollOffset, viewportHeight, getFrameMetrics, renderRange) {\n var _this$_config = this._config,\n itemVisiblePercentThreshold = _this$_config.itemVisiblePercentThreshold,\n viewAreaCoveragePercentThreshold = _this$_config.viewAreaCoveragePercentThreshold;\n var viewAreaMode = viewAreaCoveragePercentThreshold != null;\n var viewablePercentThreshold = viewAreaMode ? viewAreaCoveragePercentThreshold : itemVisiblePercentThreshold;\n invariant(viewablePercentThreshold != null && itemVisiblePercentThreshold != null !== (viewAreaCoveragePercentThreshold != null), 'Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold');\n var viewableIndices = [];\n\n if (itemCount === 0) {\n return viewableIndices;\n }\n\n var firstVisible = -1;\n\n var _ref = renderRange || {\n first: 0,\n last: itemCount - 1\n },\n first = _ref.first,\n last = _ref.last;\n\n if (last >= itemCount) {\n console.warn('Invalid render range computing viewability ' + JSON.stringify({\n renderRange: renderRange,\n itemCount: itemCount\n }));\n return [];\n }\n\n for (var idx = first; idx <= last; idx++) {\n var metrics = getFrameMetrics(idx);\n\n if (!metrics) {\n continue;\n }\n\n var top = metrics.offset - scrollOffset;\n var bottom = top + metrics.length;\n\n if (top < viewportHeight && bottom > 0) {\n firstVisible = idx;\n\n if (_isViewable(viewAreaMode, viewablePercentThreshold, top, bottom, viewportHeight, metrics.length)) {\n viewableIndices.push(idx);\n }\n } else if (firstVisible >= 0) {\n break;\n }\n }\n\n return viewableIndices;\n }\n /**\n * Figures out which items are viewable and how that has changed from before and calls\n * `onViewableItemsChanged` as appropriate.\n */\n ;\n\n _proto.onUpdate = function onUpdate(itemCount, scrollOffset, viewportHeight, getFrameMetrics, createViewToken, onViewableItemsChanged, renderRange) {\n var _this = this;\n\n if (this._config.waitForInteraction && !this._hasInteracted || itemCount === 0 || !getFrameMetrics(0)) {\n return;\n }\n\n var viewableIndices = [];\n\n if (itemCount) {\n viewableIndices = this.computeViewableItems(itemCount, scrollOffset, viewportHeight, getFrameMetrics, renderRange);\n }\n\n if (this._viewableIndices.length === viewableIndices.length && this._viewableIndices.every(function (v, ii) {\n return v === viewableIndices[ii];\n })) {\n // We might get a lot of scroll events where visibility doesn't change and we don't want to do\n // extra work in those cases.\n return;\n }\n\n this._viewableIndices = viewableIndices;\n\n if (this._config.minimumViewTime) {\n var handle = setTimeout(function () {\n _this._timers.delete(handle);\n\n _this._onUpdateSync(viewableIndices, onViewableItemsChanged, createViewToken);\n }, this._config.minimumViewTime);\n\n this._timers.add(handle);\n } else {\n this._onUpdateSync(viewableIndices, onViewableItemsChanged, createViewToken);\n }\n }\n /**\n * clean-up cached _viewableIndices to evaluate changed items on next update\n */\n ;\n\n _proto.resetViewableIndices = function resetViewableIndices() {\n this._viewableIndices = [];\n }\n /**\n * Records that an interaction has happened even if there has been no scroll.\n */\n ;\n\n _proto.recordInteraction = function recordInteraction() {\n this._hasInteracted = true;\n };\n\n _proto._onUpdateSync = function _onUpdateSync( // $FlowFixMe\n viewableIndicesToCheck, // $FlowFixMe\n onViewableItemsChanged, // $FlowFixMe\n createViewToken) {\n var _this2 = this;\n\n // Filter out indices that have gone out of view since this call was scheduled.\n viewableIndicesToCheck = viewableIndicesToCheck.filter(function (ii) {\n return _this2._viewableIndices.includes(ii);\n });\n var prevItems = this._viewableItems;\n var nextItems = new Map(viewableIndicesToCheck.map(function (ii) {\n var viewable = createViewToken(ii, true);\n return [viewable.key, viewable];\n }));\n var changed = [];\n\n for (var _iterator = _createForOfIteratorHelperLoose(nextItems), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n viewable = _step$value[1];\n\n if (!prevItems.has(key)) {\n changed.push(viewable);\n }\n }\n\n for (var _iterator2 = _createForOfIteratorHelperLoose(prevItems), _step2; !(_step2 = _iterator2()).done;) {\n var _step2$value = _step2.value,\n _key = _step2$value[0],\n _viewable = _step2$value[1];\n\n if (!nextItems.has(_key)) {\n changed.push(_objectSpread(_objectSpread({}, _viewable), {}, {\n isViewable: false\n }));\n }\n }\n\n if (changed.length > 0) {\n this._viewableItems = nextItems;\n onViewableItemsChanged({\n viewableItems: Array.from(nextItems.values()),\n changed: changed,\n viewabilityConfig: this._config\n });\n }\n };\n\n return ViewabilityHelper;\n}();\n\nfunction _isViewable(viewAreaMode, viewablePercentThreshold, top, bottom, viewportHeight, itemLength) {\n if (_isEntirelyVisible(top, bottom, viewportHeight)) {\n return true;\n } else {\n var pixels = _getPixelsVisible(top, bottom, viewportHeight);\n\n var percent = 100 * (viewAreaMode ? pixels / viewportHeight : pixels / itemLength);\n return percent >= viewablePercentThreshold;\n }\n}\n\nfunction _getPixelsVisible(top, bottom, viewportHeight) {\n var visibleHeight = Math.min(bottom, viewportHeight) - Math.max(top, 0);\n return Math.max(0, visibleHeight);\n}\n\nfunction _isEntirelyVisible(top, bottom, viewportHeight) {\n return top >= 0 && bottom <= viewportHeight && bottom > top;\n}\n\nexport default ViewabilityHelper;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n/**\n * Intentional info-level logging for clear separation from ad-hoc console debug logging.\n */\n\nfunction infoLog() {\n var _console;\n\n return (_console = console).log.apply(_console, arguments);\n}\n\nexport default infoLog;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport invariant from 'fbjs/lib/invariant';\n/**\n * Used to find the indices of the frames that overlap the given offsets. Useful for finding the\n * items that bound different windows of content, such as the visible area or the buffered overscan\n * area.\n */\n\nfunction elementsThatOverlapOffsets(offsets, itemCount, getFrameMetrics) {\n var out = [];\n var outLength = 0;\n\n for (var ii = 0; ii < itemCount; ii++) {\n var frame = getFrameMetrics(ii);\n var trailingOffset = frame.offset + frame.length;\n\n for (var kk = 0; kk < offsets.length; kk++) {\n if (out[kk] == null && trailingOffset >= offsets[kk]) {\n out[kk] = ii;\n outLength++;\n\n if (kk === offsets.length - 1) {\n invariant(outLength === offsets.length, 'bad offsets input, should be in increasing order: %s', JSON.stringify(offsets));\n return out;\n }\n }\n }\n }\n\n return out;\n}\n/**\n * Computes the number of elements in the `next` range that are new compared to the `prev` range.\n * Handy for calculating how many new items will be rendered when the render window changes so we\n * can restrict the number of new items render at once so that content can appear on the screen\n * faster.\n */\n\n\nfunction newRangeCount(prev, next) {\n return next.last - next.first + 1 - Math.max(0, 1 + Math.min(next.last, prev.last) - Math.max(next.first, prev.first));\n}\n/**\n * Custom logic for determining which items should be rendered given the current frame and scroll\n * metrics, as well as the previous render state. The algorithm may evolve over time, but generally\n * prioritizes the visible area first, then expands that with overscan regions ahead and behind,\n * biased in the direction of scroll.\n */\n\n\nfunction computeWindowedRenderLimits(props, prev, getFrameMetricsApprox, scrollMetrics) {\n var data = props.data,\n getItemCount = props.getItemCount,\n maxToRenderPerBatch = props.maxToRenderPerBatch,\n windowSize = props.windowSize;\n var itemCount = getItemCount(data);\n\n if (itemCount === 0) {\n return prev;\n }\n\n var offset = scrollMetrics.offset,\n velocity = scrollMetrics.velocity,\n visibleLength = scrollMetrics.visibleLength; // Start with visible area, then compute maximum overscan region by expanding from there, biased\n // in the direction of scroll. Total overscan area is capped, which should cap memory consumption\n // too.\n\n var visibleBegin = Math.max(0, offset);\n var visibleEnd = visibleBegin + visibleLength;\n var overscanLength = (windowSize - 1) * visibleLength; // Considering velocity seems to introduce more churn than it's worth.\n\n var leadFactor = 0.5; // Math.max(0, Math.min(1, velocity / 25 + 0.5));\n\n var fillPreference = velocity > 1 ? 'after' : velocity < -1 ? 'before' : 'none';\n var overscanBegin = Math.max(0, visibleBegin - (1 - leadFactor) * overscanLength);\n var overscanEnd = Math.max(0, visibleEnd + leadFactor * overscanLength);\n var lastItemOffset = getFrameMetricsApprox(itemCount - 1).offset;\n\n if (lastItemOffset < overscanBegin) {\n // Entire list is before our overscan window\n return {\n first: Math.max(0, itemCount - 1 - maxToRenderPerBatch),\n last: itemCount - 1\n };\n } // Find the indices that correspond to the items at the render boundaries we're targeting.\n\n\n var _elementsThatOverlapO = elementsThatOverlapOffsets([overscanBegin, visibleBegin, visibleEnd, overscanEnd], props.getItemCount(props.data), getFrameMetricsApprox),\n overscanFirst = _elementsThatOverlapO[0],\n first = _elementsThatOverlapO[1],\n last = _elementsThatOverlapO[2],\n overscanLast = _elementsThatOverlapO[3];\n\n overscanFirst = overscanFirst == null ? 0 : overscanFirst;\n first = first == null ? Math.max(0, overscanFirst) : first;\n overscanLast = overscanLast == null ? itemCount - 1 : overscanLast;\n last = last == null ? Math.min(overscanLast, first + maxToRenderPerBatch - 1) : last;\n var visible = {\n first: first,\n last: last\n }; // We want to limit the number of new cells we're rendering per batch so that we can fill the\n // content on the screen quickly. If we rendered the entire overscan window at once, the user\n // could be staring at white space for a long time waiting for a bunch of offscreen content to\n // render.\n\n var newCellCount = newRangeCount(prev, visible);\n\n while (true) {\n if (first <= overscanFirst && last >= overscanLast) {\n // If we fill the entire overscan range, we're done.\n break;\n }\n\n var maxNewCells = newCellCount >= maxToRenderPerBatch;\n var firstWillAddMore = first <= prev.first || first > prev.last;\n var firstShouldIncrement = first > overscanFirst && (!maxNewCells || !firstWillAddMore);\n var lastWillAddMore = last >= prev.last || last < prev.first;\n var lastShouldIncrement = last < overscanLast && (!maxNewCells || !lastWillAddMore);\n\n if (maxNewCells && !firstShouldIncrement && !lastShouldIncrement) {\n // We only want to stop if we've hit maxNewCells AND we cannot increment first or last\n // without rendering new items. This let's us preserve as many already rendered items as\n // possible, reducing render churn and keeping the rendered overscan range as large as\n // possible.\n break;\n }\n\n if (firstShouldIncrement && !(fillPreference === 'after' && lastShouldIncrement && lastWillAddMore)) {\n if (firstWillAddMore) {\n newCellCount++;\n }\n\n first--;\n }\n\n if (lastShouldIncrement && !(fillPreference === 'before' && firstShouldIncrement && firstWillAddMore)) {\n if (lastWillAddMore) {\n newCellCount++;\n }\n\n last++;\n }\n }\n\n if (!(last >= first && first >= 0 && last < itemCount && first >= overscanFirst && last <= overscanLast && first <= visible.first && last >= visible.last)) {\n throw new Error('Bad window calculation ' + JSON.stringify({\n first: first,\n last: last,\n itemCount: itemCount,\n overscanFirst: overscanFirst,\n overscanLast: overscanLast,\n visible: visible\n }));\n }\n\n return {\n first: first,\n last: last\n };\n}\n\nvar VirtualizeUtils = {\n computeWindowedRenderLimits: computeWindowedRenderLimits,\n elementsThatOverlapOffsets: elementsThatOverlapOffsets,\n newRangeCount: newRangeCount\n};\nexport { computeWindowedRenderLimits, elementsThatOverlapOffsets, newRangeCount };\nexport default VirtualizeUtils;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport { useMemo, useContext } from 'react';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nexport var VirtualizedListContext = /*#__PURE__*/React.createContext(null);\n\nif (__DEV__) {\n VirtualizedListContext.displayName = 'VirtualizedListContext';\n}\n/**\n * Resets the context. Intended for use by portal-like components (e.g. Modal).\n */\n\n\nexport function VirtualizedListContextResetter(_ref) {\n var children = _ref.children;\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: null\n }, children);\n}\n/**\n * Sets the context with memoization. Intended to be used by `VirtualizedList`.\n */\n\nexport function VirtualizedListContextProvider(_ref2) {\n var children = _ref2.children,\n value = _ref2.value;\n // Avoid setting a newly created context object if the values are identical.\n var context = useMemo(function () {\n return {\n cellKey: null,\n getScrollMetrics: value.getScrollMetrics,\n horizontal: value.horizontal,\n getOutermostParentListRef: value.getOutermostParentListRef,\n getNestedChildState: value.getNestedChildState,\n registerAsNestedChild: value.registerAsNestedChild,\n unregisterAsNestedChild: value.unregisterAsNestedChild,\n debugInfo: {\n cellKey: value.debugInfo.cellKey,\n horizontal: value.debugInfo.horizontal,\n listKey: value.debugInfo.listKey,\n parent: value.debugInfo.parent\n }\n };\n }, [value.getScrollMetrics, value.horizontal, value.getOutermostParentListRef, value.getNestedChildState, value.registerAsNestedChild, value.unregisterAsNestedChild, value.debugInfo.cellKey, value.debugInfo.horizontal, value.debugInfo.listKey, value.debugInfo.parent]);\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: context\n }, children);\n}\n/**\n * Sets the `cellKey`. Intended to be used by `VirtualizedList` for each cell.\n */\n\nexport function VirtualizedListCellContextProvider(_ref3) {\n var cellKey = _ref3.cellKey,\n children = _ref3.children;\n var context = useContext(VirtualizedListContext);\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: context == null ? null : _objectSpread(_objectSpread({}, context), {}, {\n cellKey: cellKey\n })\n }, children);\n}","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport Batchinator from '../Batchinator';\nimport FillRateHelper from '../FillRateHelper';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport RefreshControl from '../../../exports/RefreshControl';\nimport ScrollView from '../../../exports/ScrollView';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport UIManager from '../../../exports/UIManager';\nimport View from '../../../exports/View';\nimport ViewabilityHelper from '../ViewabilityHelper';\nimport findNodeHandle from '../../../exports/findNodeHandle';\nvar flattenStyle = StyleSheet.flatten;\nimport infoLog from '../infoLog';\nimport invariant from 'fbjs/lib/invariant';\nimport warning from 'fbjs/lib/warning';\nimport { computeWindowedRenderLimits } from '../VirtualizeUtils';\nimport { VirtualizedListCellContextProvider, VirtualizedListContext, VirtualizedListContextProvider } from './VirtualizedListContext.js';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar _usedIndexForKey = false;\nvar _keylessItemComponentName = '';\n\n/**\n * Base implementation for the more convenient [`<FlatList>`](https://reactnative.dev/docs/flatlist.html)\n * and [`<SectionList>`](https://reactnative.dev/docs/sectionlist.html) components, which are also better\n * documented. In general, this should only really be used if you need more flexibility than\n * `FlatList` provides, e.g. for use with immutable data instead of plain arrays.\n *\n * Virtualization massively improves memory consumption and performance of large lists by\n * maintaining a finite render window of active items and replacing all items outside of the render\n * window with appropriately sized blank space. The window adapts to scrolling behavior, and items\n * are rendered incrementally with low-pri (after any running interactions) if they are far from the\n * visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.\n *\n * Some caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` or `id` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n */\nvar VirtualizedList = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(VirtualizedList, _React$PureComponent);\n\n var _proto = VirtualizedList.prototype;\n\n // scrollToEnd may be janky without getItemLayout prop\n _proto.scrollToEnd = function scrollToEnd(params) {\n var animated = params ? params.animated : true;\n var veryLast = this.props.getItemCount(this.props.data) - 1;\n\n var frame = this._getFrameMetricsApprox(veryLast);\n\n var offset = Math.max(0, frame.offset + frame.length + this._footerLength - this._scrollMetrics.visibleLength);\n\n if (this._scrollRef == null) {\n return;\n }\n\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n\n this._scrollRef.scrollTo(this.props.horizontal ? {\n x: offset,\n animated: animated\n } : {\n y: offset,\n animated: animated\n });\n } // scrollToIndex may be janky without getItemLayout prop\n ;\n\n _proto.scrollToIndex = function scrollToIndex(params) {\n var _this$props = this.props,\n data = _this$props.data,\n horizontal = _this$props.horizontal,\n getItemCount = _this$props.getItemCount,\n getItemLayout = _this$props.getItemLayout,\n onScrollToIndexFailed = _this$props.onScrollToIndexFailed;\n var animated = params.animated,\n index = params.index,\n viewOffset = params.viewOffset,\n viewPosition = params.viewPosition;\n invariant(index >= 0, \"scrollToIndex out of range: requested index \" + index + \" but minimum is 0\");\n invariant(getItemCount(data) >= 1, \"scrollToIndex out of range: item length \" + getItemCount(data) + \" but minimum is 1\");\n invariant(index < getItemCount(data), \"scrollToIndex out of range: requested index \" + index + \" is out of 0 to \" + (getItemCount(data) - 1));\n\n if (!getItemLayout && index > this._highestMeasuredFrameIndex) {\n invariant(!!onScrollToIndexFailed, 'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' + 'otherwise there is no way to know the location of offscreen indices or handle failures.');\n onScrollToIndexFailed({\n averageItemLength: this._averageCellLength,\n highestMeasuredFrameIndex: this._highestMeasuredFrameIndex,\n index: index\n });\n return;\n }\n\n var frame = this._getFrameMetricsApprox(index);\n\n var offset = Math.max(0, frame.offset - (viewPosition || 0) * (this._scrollMetrics.visibleLength - frame.length)) - (viewOffset || 0);\n\n if (this._scrollRef == null) {\n return;\n }\n\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n\n this._scrollRef.scrollTo(horizontal ? {\n x: offset,\n animated: animated\n } : {\n y: offset,\n animated: animated\n });\n } // scrollToItem may be janky without getItemLayout prop. Required linear scan through items -\n // use scrollToIndex instead if possible.\n ;\n\n _proto.scrollToItem = function scrollToItem(params) {\n var item = params.item;\n var _this$props2 = this.props,\n data = _this$props2.data,\n getItem = _this$props2.getItem,\n getItemCount = _this$props2.getItemCount;\n var itemCount = getItemCount(data);\n\n for (var _index = 0; _index < itemCount; _index++) {\n if (getItem(data, _index) === item) {\n this.scrollToIndex(_objectSpread(_objectSpread({}, params), {}, {\n index: _index\n }));\n break;\n }\n }\n }\n /**\n * Scroll to a specific content pixel offset in the list.\n *\n * Param `offset` expects the offset to scroll to.\n * In case of `horizontal` is true, the offset is the x-value,\n * in any other case the offset is the y-value.\n *\n * Param `animated` (`true` by default) defines whether the list\n * should do an animation while scrolling.\n */\n ;\n\n _proto.scrollToOffset = function scrollToOffset(params) {\n var animated = params.animated,\n offset = params.offset;\n\n if (this._scrollRef == null) {\n return;\n }\n\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n\n this._scrollRef.scrollTo(this.props.horizontal ? {\n x: offset,\n animated: animated\n } : {\n y: offset,\n animated: animated\n });\n };\n\n _proto.recordInteraction = function recordInteraction() {\n this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref.recordInteraction();\n });\n\n this._viewabilityTuples.forEach(function (t) {\n t.viewabilityHelper.recordInteraction();\n });\n\n this._updateViewableItems(this.props.data);\n };\n\n _proto.flashScrollIndicators = function flashScrollIndicators() {\n if (this._scrollRef == null) {\n return;\n }\n\n this._scrollRef.flashScrollIndicators();\n }\n /**\n * Provides a handle to the underlying scroll responder.\n * Note that `this._scrollRef` might not be a `ScrollView`, so we\n * need to check that it responds to `getScrollResponder` before calling it.\n */\n ;\n\n _proto.getScrollResponder = function getScrollResponder() {\n if (this._scrollRef && this._scrollRef.getScrollResponder) {\n return this._scrollRef.getScrollResponder();\n }\n };\n\n _proto.getScrollableNode = function getScrollableNode() {\n if (this._scrollRef && this._scrollRef.getScrollableNode) {\n return this._scrollRef.getScrollableNode();\n } else {\n return findNodeHandle(this._scrollRef);\n }\n };\n\n _proto.getScrollRef = function getScrollRef() {\n if (this._scrollRef && this._scrollRef.getScrollRef) {\n return this._scrollRef.getScrollRef();\n } else {\n return this._scrollRef;\n }\n };\n\n _proto.setNativeProps = function setNativeProps(props) {\n if (this._scrollRef) {\n this._scrollRef.setNativeProps(props);\n }\n };\n\n _proto._getCellKey = function _getCellKey() {\n var _this$context;\n\n return ((_this$context = this.context) == null ? void 0 : _this$context.cellKey) || 'rootList';\n };\n\n _proto._getListKey = function _getListKey() {\n return this.props.listKey || this._getCellKey();\n };\n\n _proto._getDebugInfo = function _getDebugInfo() {\n var _this$context2;\n\n return {\n listKey: this._getListKey(),\n cellKey: this._getCellKey(),\n horizontal: !!this.props.horizontal,\n parent: (_this$context2 = this.context) == null ? void 0 : _this$context2.debugInfo\n };\n };\n\n _proto.hasMore = function hasMore() {\n return this._hasMore;\n };\n\n function VirtualizedList(_props) {\n var _this;\n\n _this = _React$PureComponent.call(this, _props) || this;\n\n _this._getScrollMetrics = function () {\n return _this._scrollMetrics;\n };\n\n _this._getOutermostParentListRef = function () {\n if (_this._isNestedWithSameOrientation()) {\n return _this.context.getOutermostParentListRef();\n } else {\n return _assertThisInitialized(_this);\n }\n };\n\n _this._getNestedChildState = function (key) {\n var existingChildData = _this._nestedChildLists.get(key);\n\n return existingChildData && existingChildData.state;\n };\n\n _this._registerAsNestedChild = function (childList) {\n // Register the mapping between this child key and the cellKey for its cell\n var childListsInCell = _this._cellKeysToChildListKeys.get(childList.cellKey) || new Set();\n childListsInCell.add(childList.key);\n\n _this._cellKeysToChildListKeys.set(childList.cellKey, childListsInCell);\n\n var existingChildData = _this._nestedChildLists.get(childList.key);\n\n if (existingChildData && existingChildData.ref !== null) {\n console.error('A VirtualizedList contains a cell which itself contains ' + 'more than one VirtualizedList of the same orientation as the parent ' + 'list. You must pass a unique listKey prop to each sibling list.\\n\\n' + describeNestedLists(_objectSpread(_objectSpread({}, childList), {}, {\n // We're called from the child's componentDidMount, so it's safe to\n // read the child's props here (albeit weird).\n horizontal: !!childList.ref.props.horizontal\n })));\n }\n\n _this._nestedChildLists.set(childList.key, {\n ref: childList.ref,\n state: null\n });\n\n if (_this._hasInteracted) {\n childList.ref.recordInteraction();\n }\n };\n\n _this._unregisterAsNestedChild = function (childList) {\n _this._nestedChildLists.set(childList.key, {\n ref: null,\n state: childList.state\n });\n };\n\n _this._onUpdateSeparators = function (keys, newProps) {\n keys.forEach(function (key) {\n var ref = key != null && _this._cellRefs[key];\n ref && ref.updateSeparatorProps(newProps);\n });\n };\n\n _this._averageCellLength = 0;\n _this._cellKeysToChildListKeys = new Map();\n _this._cellRefs = {};\n _this._frames = {};\n _this._footerLength = 0;\n _this._hasDoneInitialScroll = false;\n _this._hasInteracted = false;\n _this._hasMore = false;\n _this._hasWarned = {};\n _this._headerLength = 0;\n _this._hiPriInProgress = false;\n _this._highestMeasuredFrameIndex = 0;\n _this._indicesToKeys = new Map();\n _this._nestedChildLists = new Map();\n _this._offsetFromParentVirtualizedList = 0;\n _this._prevParentOffset = 0;\n _this._scrollMetrics = {\n contentLength: 0,\n dOffset: 0,\n dt: 10,\n offset: 0,\n timestamp: 0,\n velocity: 0,\n visibleLength: 0\n };\n _this._scrollRef = null;\n _this._sentEndForContentLength = 0;\n _this._totalCellLength = 0;\n _this._totalCellsMeasured = 0;\n _this._viewabilityTuples = [];\n\n _this._captureScrollRef = function (ref) {\n _this._scrollRef = ref;\n };\n\n _this._defaultRenderScrollComponent = function (props) {\n var onRefresh = props.onRefresh;\n\n if (_this._isNestedWithSameOrientation()) {\n // $FlowFixMe - Typing ReactNativeComponent revealed errors\n return /*#__PURE__*/React.createElement(View, props);\n } else if (onRefresh) {\n invariant(typeof props.refreshing === 'boolean', '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' +\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n * an error found when Flow v0.111 was deployed. To see the error,\n * delete this comment and run Flow. */\n JSON.stringify(props.refreshing) + '`');\n return (\n /*#__PURE__*/\n // $FlowFixMe Invalid prop usage\n React.createElement(ScrollView, _extends({}, props, {\n refreshControl: props.refreshControl == null ? /*#__PURE__*/React.createElement(RefreshControl, {\n refreshing: props.refreshing,\n onRefresh: onRefresh,\n progressViewOffset: props.progressViewOffset\n }) : props.refreshControl\n }))\n );\n } else {\n // $FlowFixMe Invalid prop usage\n return /*#__PURE__*/React.createElement(ScrollView, props);\n }\n };\n\n _this._onCellUnmount = function (cellKey) {\n var curr = _this._frames[cellKey];\n\n if (curr) {\n _this._frames[cellKey] = _objectSpread(_objectSpread({}, curr), {}, {\n inLayout: false\n });\n }\n };\n\n _this._onLayout = function (e) {\n if (_this._isNestedWithSameOrientation()) {\n // Need to adjust our scroll metrics to be relative to our containing\n // VirtualizedList before we can make claims about list item viewability\n _this.measureLayoutRelativeToContainingList();\n } else {\n _this._scrollMetrics.visibleLength = _this._selectLength(e.nativeEvent.layout);\n }\n\n _this.props.onLayout && _this.props.onLayout(e);\n\n _this._scheduleCellsToRenderUpdate();\n\n _this._maybeCallOnEndReached();\n };\n\n _this._onLayoutEmpty = function (e) {\n _this.props.onLayout && _this.props.onLayout(e);\n };\n\n _this._onLayoutFooter = function (e) {\n _this._triggerRemeasureForChildListsInCell(_this._getFooterCellKey());\n\n _this._footerLength = _this._selectLength(e.nativeEvent.layout);\n };\n\n _this._onLayoutHeader = function (e) {\n _this._headerLength = _this._selectLength(e.nativeEvent.layout);\n };\n\n _this._onContentSizeChange = function (width, height) {\n if (width > 0 && height > 0 && _this.props.initialScrollIndex != null && _this.props.initialScrollIndex > 0 && !_this._hasDoneInitialScroll) {\n _this._hasDoneInitialScroll = true;\n }\n\n if (_this.props.onContentSizeChange) {\n _this.props.onContentSizeChange(width, height);\n }\n\n _this._scrollMetrics.contentLength = _this._selectLength({\n height: height,\n width: width\n });\n\n _this._scheduleCellsToRenderUpdate();\n\n _this._maybeCallOnEndReached();\n };\n\n _this._convertParentScrollMetrics = function (metrics) {\n // Offset of the top of the nested list relative to the top of its parent's viewport\n var offset = metrics.offset - _this._offsetFromParentVirtualizedList; // Child's visible length is the same as its parent's\n\n var visibleLength = metrics.visibleLength;\n var dOffset = offset - _this._scrollMetrics.offset;\n var contentLength = _this._scrollMetrics.contentLength;\n return {\n visibleLength: visibleLength,\n contentLength: contentLength,\n offset: offset,\n dOffset: dOffset\n };\n };\n\n _this._onScroll = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onScroll(e);\n });\n\n if (_this.props.onScroll) {\n _this.props.onScroll(e);\n }\n\n var timestamp = e.timeStamp;\n\n var visibleLength = _this._selectLength(e.nativeEvent.layoutMeasurement);\n\n var contentLength = _this._selectLength(e.nativeEvent.contentSize);\n\n var offset = _this._selectOffset(e.nativeEvent.contentOffset);\n\n var dOffset = offset - _this._scrollMetrics.offset;\n\n if (_this._isNestedWithSameOrientation()) {\n if (_this._scrollMetrics.contentLength === 0) {\n // Ignore scroll events until onLayout has been called and we\n // know our offset from our offset from our parent\n return;\n }\n\n var _this$_convertParentS = _this._convertParentScrollMetrics({\n visibleLength: visibleLength,\n offset: offset\n });\n\n visibleLength = _this$_convertParentS.visibleLength;\n contentLength = _this$_convertParentS.contentLength;\n offset = _this$_convertParentS.offset;\n dOffset = _this$_convertParentS.dOffset;\n }\n\n var dt = _this._scrollMetrics.timestamp ? Math.max(1, timestamp - _this._scrollMetrics.timestamp) : 1;\n var velocity = dOffset / dt;\n\n if (dt > 500 && _this._scrollMetrics.dt > 500 && contentLength > 5 * visibleLength && !_this._hasWarned.perf) {\n infoLog('VirtualizedList: You have a large list that is slow to update - make sure your ' + 'renderItem function renders components that follow React performance best practices ' + 'like PureComponent, shouldComponentUpdate, etc.', {\n dt: dt,\n prevDt: _this._scrollMetrics.dt,\n contentLength: contentLength\n });\n _this._hasWarned.perf = true;\n }\n\n _this._scrollMetrics = {\n contentLength: contentLength,\n dt: dt,\n dOffset: dOffset,\n offset: offset,\n timestamp: timestamp,\n velocity: velocity,\n visibleLength: visibleLength\n };\n\n _this._updateViewableItems(_this.props.data);\n\n if (!_this.props) {\n return;\n }\n\n _this._maybeCallOnEndReached();\n\n if (velocity !== 0) {\n _this._fillRateHelper.activate();\n }\n\n _this._computeBlankness();\n\n _this._scheduleCellsToRenderUpdate();\n };\n\n _this._onScrollBeginDrag = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onScrollBeginDrag(e);\n });\n\n _this._viewabilityTuples.forEach(function (tuple) {\n tuple.viewabilityHelper.recordInteraction();\n });\n\n _this._hasInteracted = true;\n _this.props.onScrollBeginDrag && _this.props.onScrollBeginDrag(e);\n };\n\n _this._onScrollEndDrag = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onScrollEndDrag(e);\n });\n\n var velocity = e.nativeEvent.velocity;\n\n if (velocity) {\n _this._scrollMetrics.velocity = _this._selectOffset(velocity);\n }\n\n _this._computeBlankness();\n\n _this.props.onScrollEndDrag && _this.props.onScrollEndDrag(e);\n };\n\n _this._onMomentumScrollBegin = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onMomentumScrollBegin(e);\n });\n\n _this.props.onMomentumScrollBegin && _this.props.onMomentumScrollBegin(e);\n };\n\n _this._onMomentumScrollEnd = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onMomentumScrollEnd(e);\n });\n\n _this._scrollMetrics.velocity = 0;\n\n _this._computeBlankness();\n\n _this.props.onMomentumScrollEnd && _this.props.onMomentumScrollEnd(e);\n };\n\n _this._updateCellsToRender = function () {\n var _this$props3 = _this.props,\n data = _this$props3.data,\n getItemCount = _this$props3.getItemCount,\n onEndReachedThreshold = _this$props3.onEndReachedThreshold;\n\n var isVirtualizationDisabled = _this._isVirtualizationDisabled();\n\n _this._updateViewableItems(data);\n\n if (!data) {\n return;\n }\n\n _this.setState(function (state) {\n var newState;\n var _this$_scrollMetrics = _this._scrollMetrics,\n contentLength = _this$_scrollMetrics.contentLength,\n offset = _this$_scrollMetrics.offset,\n visibleLength = _this$_scrollMetrics.visibleLength;\n\n if (!isVirtualizationDisabled) {\n // If we run this with bogus data, we'll force-render window {first: 0, last: 0},\n // and wipe out the initialNumToRender rendered elements.\n // So let's wait until the scroll view metrics have been set up. And until then,\n // we will trust the initialNumToRender suggestion\n if (visibleLength > 0 && contentLength > 0) {\n // If we have a non-zero initialScrollIndex and run this before we've scrolled,\n // we'll wipe out the initialNumToRender rendered elements starting at initialScrollIndex.\n // So let's wait until we've scrolled the view to the right place. And until then,\n // we will trust the initialScrollIndex suggestion.\n if (!_this.props.initialScrollIndex || _this._scrollMetrics.offset) {\n newState = computeWindowedRenderLimits(_this.props, state, _this._getFrameMetricsApprox, _this._scrollMetrics);\n }\n }\n } else {\n var distanceFromEnd = contentLength - visibleLength - offset;\n var renderAhead =\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses\n * an error found when Flow v0.63 was deployed. To see the error\n * delete this comment and run Flow. */\n distanceFromEnd < onEndReachedThreshold * visibleLength ? _this.props.maxToRenderPerBatch : 0;\n newState = {\n first: 0,\n last: Math.min(state.last + renderAhead, getItemCount(data) - 1)\n };\n }\n\n if (newState && _this._nestedChildLists.size > 0) {\n var newFirst = newState.first;\n var newLast = newState.last; // If some cell in the new state has a child list in it, we should only render\n // up through that item, so that we give that list a chance to render.\n // Otherwise there's churn from multiple child lists mounting and un-mounting\n // their items.\n\n for (var ii = newFirst; ii <= newLast; ii++) {\n var cellKeyForIndex = _this._indicesToKeys.get(ii);\n\n var childListKeys = cellKeyForIndex && _this._cellKeysToChildListKeys.get(cellKeyForIndex);\n\n if (!childListKeys) {\n continue;\n }\n\n var someChildHasMore = false; // For each cell, need to check whether any child list in it has more elements to render\n\n for (var _iterator = _createForOfIteratorHelperLoose(childListKeys), _step; !(_step = _iterator()).done;) {\n var childKey = _step.value;\n\n var childList = _this._nestedChildLists.get(childKey);\n\n if (childList && childList.ref && childList.ref.hasMore()) {\n someChildHasMore = true;\n break;\n }\n }\n\n if (someChildHasMore && newState) {\n newState.last = ii;\n break;\n }\n }\n }\n\n if (newState != null && newState.first === state.first && newState.last === state.last) {\n newState = null;\n }\n\n return newState;\n });\n };\n\n _this._createViewToken = function (index, isViewable) {\n var _this$props4 = _this.props,\n data = _this$props4.data,\n getItem = _this$props4.getItem,\n keyExtractor = _this$props4.keyExtractor;\n var item = getItem(data, index);\n return {\n index: index,\n item: item,\n key: keyExtractor(item, index),\n isViewable: isViewable\n };\n };\n\n _this._getFrameMetricsApprox = function (index) {\n var frame = _this._getFrameMetrics(index);\n\n if (frame && frame.index === index) {\n // check for invalid frames due to row re-ordering\n return frame;\n } else {\n var getItemLayout = _this.props.getItemLayout;\n invariant(!getItemLayout, 'Should not have to estimate frames when a measurement metrics function is provided');\n return {\n length: _this._averageCellLength,\n offset: _this._averageCellLength * index\n };\n }\n };\n\n _this._getFrameMetrics = function (index) {\n var _this$props5 = _this.props,\n data = _this$props5.data,\n getItem = _this$props5.getItem,\n getItemCount = _this$props5.getItemCount,\n getItemLayout = _this$props5.getItemLayout,\n keyExtractor = _this$props5.keyExtractor;\n invariant(getItemCount(data) > index, 'Tried to get frame for out of range index ' + index);\n var item = getItem(data, index);\n\n var frame = item && _this._frames[keyExtractor(item, index)];\n\n if (!frame || frame.index !== index) {\n if (getItemLayout) {\n frame = getItemLayout(data, index);\n }\n }\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.63 was deployed. To see the error delete this\n * comment and run Flow. */\n\n\n return frame;\n };\n\n invariant( // $FlowFixMe\n !_props.onScroll || !_props.onScroll.__isNative, 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' + 'to support native onScroll events with useNativeDriver');\n invariant(_props.windowSize > 0, 'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.');\n _this._fillRateHelper = new FillRateHelper(_this._getFrameMetrics);\n _this._updateCellsToRenderBatcher = new Batchinator(_this._updateCellsToRender, _this.props.updateCellsBatchingPeriod);\n\n if (_this.props.viewabilityConfigCallbackPairs) {\n _this._viewabilityTuples = _this.props.viewabilityConfigCallbackPairs.map(function (pair) {\n return {\n viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig),\n onViewableItemsChanged: pair.onViewableItemsChanged\n };\n });\n } else if (_this.props.onViewableItemsChanged) {\n var onViewableItemsChanged = _this.props.onViewableItemsChanged;\n\n _this._viewabilityTuples.push({\n viewabilityHelper: new ViewabilityHelper(_this.props.viewabilityConfig),\n onViewableItemsChanged: onViewableItemsChanged\n });\n }\n\n var initialState = {\n first: _this.props.initialScrollIndex || 0,\n last: Math.min(_this.props.getItemCount(_this.props.data), (_this.props.initialScrollIndex || 0) + _this.props.initialNumToRender) - 1\n };\n\n if (_this._isNestedWithSameOrientation()) {\n var storedState = _this.context.getNestedChildState(_this._getListKey());\n\n if (storedState) {\n initialState = storedState;\n _this.state = storedState;\n _this._frames = storedState.frames;\n }\n }\n\n _this.state = initialState;\n return _this;\n }\n\n _proto.componentDidMount = function componentDidMount() {\n if (this._isNestedWithSameOrientation()) {\n this.context.registerAsNestedChild({\n cellKey: this._getCellKey(),\n key: this._getListKey(),\n ref: this,\n // NOTE: When the child mounts (here) it's not necessarily safe to read\n // the parent's props. This is why we explicitly propagate debugInfo\n // \"down\" via context and \"up\" again via this method call on the\n // parent.\n parentDebugInfo: this.context.debugInfo\n });\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._isNestedWithSameOrientation()) {\n this.context.unregisterAsNestedChild({\n key: this._getListKey(),\n state: {\n first: this.state.first,\n last: this.state.last,\n frames: this._frames\n }\n });\n }\n\n this._updateViewableItems(null);\n\n this._updateCellsToRenderBatcher.dispose({\n abort: true\n });\n\n this._viewabilityTuples.forEach(function (tuple) {\n tuple.viewabilityHelper.dispose();\n });\n\n this._fillRateHelper.deactivateAndFlush();\n };\n\n VirtualizedList.getDerivedStateFromProps = function getDerivedStateFromProps(newProps, prevState) {\n var data = newProps.data,\n getItemCount = newProps.getItemCount,\n maxToRenderPerBatch = newProps.maxToRenderPerBatch; // first and last could be stale (e.g. if a new, shorter items props is passed in), so we make\n // sure we're rendering a reasonable range here.\n\n return {\n first: Math.max(0, Math.min(prevState.first, getItemCount(data) - 1 - maxToRenderPerBatch)),\n last: Math.max(0, Math.min(prevState.last, getItemCount(data) - 1))\n };\n };\n\n _proto._pushCells = function _pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, first, last, inversionStyle) {\n var _this2 = this;\n\n var _this$props6 = this.props,\n CellRendererComponent = _this$props6.CellRendererComponent,\n ItemSeparatorComponent = _this$props6.ItemSeparatorComponent,\n data = _this$props6.data,\n getItem = _this$props6.getItem,\n getItemCount = _this$props6.getItemCount,\n horizontal = _this$props6.horizontal,\n keyExtractor = _this$props6.keyExtractor;\n var stickyOffset = this.props.ListHeaderComponent ? 1 : 0;\n var end = getItemCount(data) - 1;\n var prevCellKey;\n last = Math.min(end, last);\n\n var _loop = function _loop(ii) {\n var item = getItem(data, ii);\n var key = keyExtractor(item, ii);\n\n _this2._indicesToKeys.set(ii, key);\n\n if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n stickyHeaderIndices.push(cells.length);\n }\n\n cells.push( /*#__PURE__*/React.createElement(CellRenderer, {\n CellRendererComponent: CellRendererComponent,\n ItemSeparatorComponent: ii < end ? ItemSeparatorComponent : undefined,\n cellKey: key,\n fillRateHelper: _this2._fillRateHelper,\n horizontal: horizontal,\n index: ii,\n inversionStyle: inversionStyle,\n item: item,\n key: key,\n prevCellKey: prevCellKey,\n onUpdateSeparators: _this2._onUpdateSeparators,\n onLayout: function onLayout(e) {\n return _this2._onCellLayout(e, key, ii);\n },\n onUnmount: _this2._onCellUnmount,\n parentProps: _this2.props,\n ref: function ref(_ref) {\n _this2._cellRefs[key] = _ref;\n }\n }));\n prevCellKey = key;\n };\n\n for (var ii = first; ii <= last; ii++) {\n _loop(ii);\n }\n };\n\n _proto._isVirtualizationDisabled = function _isVirtualizationDisabled() {\n return this.props.disableVirtualization || false;\n };\n\n _proto._isNestedWithSameOrientation = function _isNestedWithSameOrientation() {\n var nestedContext = this.context;\n return !!(nestedContext && !!nestedContext.horizontal === !!this.props.horizontal);\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n if (__DEV__) {\n var flatStyles = flattenStyle(this.props.contentContainerStyle);\n\n if (flatStyles != null && flatStyles.flexWrap === 'wrap') {\n console.warn('`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' + 'Consider using `numColumns` with `FlatList` instead.');\n }\n }\n\n var _this$props7 = this.props,\n ListEmptyComponent = _this$props7.ListEmptyComponent,\n ListFooterComponent = _this$props7.ListFooterComponent,\n ListHeaderComponent = _this$props7.ListHeaderComponent;\n var _this$props8 = this.props,\n data = _this$props8.data,\n horizontal = _this$props8.horizontal;\n\n var isVirtualizationDisabled = this._isVirtualizationDisabled();\n\n var inversionStyle = this.props.inverted ? this.props.horizontal ? styles.horizontallyInverted : styles.verticallyInverted : null;\n var cells = [];\n var stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);\n var stickyHeaderIndices = [];\n\n if (ListHeaderComponent) {\n if (stickyIndicesFromProps.has(0)) {\n stickyHeaderIndices.push(0);\n }\n\n var element = /*#__PURE__*/React.isValidElement(ListHeaderComponent) ? ListHeaderComponent :\n /*#__PURE__*/\n // $FlowFixMe\n React.createElement(ListHeaderComponent, null);\n cells.push( /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this._getCellKey() + '-header',\n key: \"$header\"\n }, /*#__PURE__*/React.createElement(View, {\n onLayout: this._onLayoutHeader,\n style: StyleSheet.compose(inversionStyle, this.props.ListHeaderComponentStyle)\n }, // $FlowFixMe - Typing ReactNativeComponent revealed errors\n element)));\n }\n\n var itemCount = this.props.getItemCount(data);\n\n if (itemCount > 0) {\n _usedIndexForKey = false;\n _keylessItemComponentName = '';\n var spacerKey = !horizontal ? 'height' : 'width';\n var lastInitialIndex = this.props.initialScrollIndex ? -1 : this.props.initialNumToRender - 1;\n var _this$state = this.state,\n first = _this$state.first,\n last = _this$state.last;\n\n this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, 0, lastInitialIndex, inversionStyle);\n\n var firstAfterInitial = Math.max(lastInitialIndex + 1, first);\n\n if (!isVirtualizationDisabled && first > lastInitialIndex + 1) {\n var insertedStickySpacer = false;\n\n if (stickyIndicesFromProps.size > 0) {\n var stickyOffset = ListHeaderComponent ? 1 : 0; // See if there are any sticky headers in the virtualized space that we need to render.\n\n for (var ii = firstAfterInitial - 1; ii > lastInitialIndex; ii--) {\n if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n var _ref2, _ref3;\n\n var initBlock = this._getFrameMetricsApprox(lastInitialIndex);\n\n var stickyBlock = this._getFrameMetricsApprox(ii);\n\n var leadSpace = stickyBlock.offset - initBlock.offset - (this.props.initialScrollIndex ? 0 : initBlock.length);\n cells.push(\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.111 was deployed. To\n * see the error, delete this comment and run Flow. */\n React.createElement(View, {\n key: \"$sticky_lead\",\n style: (_ref2 = {}, _ref2[spacerKey] = leadSpace, _ref2)\n }));\n\n this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, ii, ii, inversionStyle);\n\n var trailSpace = this._getFrameMetricsApprox(first).offset - (stickyBlock.offset + stickyBlock.length);\n cells.push(\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.111 was deployed. To\n * see the error, delete this comment and run Flow. */\n React.createElement(View, {\n key: \"$sticky_trail\",\n style: (_ref3 = {}, _ref3[spacerKey] = trailSpace, _ref3)\n }));\n insertedStickySpacer = true;\n break;\n }\n }\n }\n\n if (!insertedStickySpacer) {\n var _ref4;\n\n var _initBlock = this._getFrameMetricsApprox(lastInitialIndex);\n\n var firstSpace = this._getFrameMetricsApprox(first).offset - (_initBlock.offset + _initBlock.length);\n\n cells.push(\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.111 was deployed. To see\n * the error, delete this comment and run Flow. */\n React.createElement(View, {\n key: \"$lead_spacer\",\n style: (_ref4 = {}, _ref4[spacerKey] = firstSpace, _ref4)\n }));\n }\n }\n\n this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, firstAfterInitial, last, inversionStyle);\n\n if (!this._hasWarned.keys && _usedIndexForKey) {\n console.warn('VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' + 'item or provide a custom keyExtractor.', _keylessItemComponentName);\n this._hasWarned.keys = true;\n }\n\n if (!isVirtualizationDisabled && last < itemCount - 1) {\n var _ref5;\n\n var lastFrame = this._getFrameMetricsApprox(last); // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to\n // prevent the user for hyperscrolling into un-measured area because otherwise content will\n // likely jump around as it renders in above the viewport.\n\n\n var end = this.props.getItemLayout ? itemCount - 1 : Math.min(itemCount - 1, this._highestMeasuredFrameIndex);\n\n var endFrame = this._getFrameMetricsApprox(end);\n\n var tailSpacerLength = endFrame.offset + endFrame.length - (lastFrame.offset + lastFrame.length);\n cells.push(\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n * an error found when Flow v0.111 was deployed. To see the error,\n * delete this comment and run Flow. */\n React.createElement(View, {\n key: \"$tail_spacer\",\n style: (_ref5 = {}, _ref5[spacerKey] = tailSpacerLength, _ref5)\n }));\n }\n } else if (ListEmptyComponent) {\n var _element = /*#__PURE__*/React.isValidElement(ListEmptyComponent) ? ListEmptyComponent :\n /*#__PURE__*/\n // $FlowFixMe\n React.createElement(ListEmptyComponent, null);\n\n cells.push( /*#__PURE__*/React.cloneElement(_element, {\n key: '$empty',\n onLayout: function onLayout(event) {\n _this3._onLayoutEmpty(event);\n\n if (_element.props.onLayout) {\n _element.props.onLayout(event);\n }\n },\n style: StyleSheet.compose(inversionStyle, _element.props.style)\n }));\n }\n\n if (ListFooterComponent) {\n var _element2 = /*#__PURE__*/React.isValidElement(ListFooterComponent) ? ListFooterComponent :\n /*#__PURE__*/\n // $FlowFixMe\n React.createElement(ListFooterComponent, null);\n\n cells.push( /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this._getFooterCellKey(),\n key: \"$footer\"\n }, /*#__PURE__*/React.createElement(View, {\n onLayout: this._onLayoutFooter,\n style: StyleSheet.compose(inversionStyle, this.props.ListFooterComponentStyle)\n }, // $FlowFixMe - Typing ReactNativeComponent revealed errors\n _element2)));\n }\n\n var scrollProps = _objectSpread(_objectSpread({}, this.props), {}, {\n onContentSizeChange: this._onContentSizeChange,\n onLayout: this._onLayout,\n onScroll: this._onScroll,\n onScrollBeginDrag: this._onScrollBeginDrag,\n onScrollEndDrag: this._onScrollEndDrag,\n onMomentumScrollBegin: this._onMomentumScrollBegin,\n onMomentumScrollEnd: this._onMomentumScrollEnd,\n scrollEventThrottle: this.props.scrollEventThrottle,\n // TODO: Android support\n stickyHeaderIndices: stickyHeaderIndices,\n style: inversionStyle ? [inversionStyle, this.props.style] : this.props.style\n });\n\n this._hasMore = this.state.last < this.props.getItemCount(this.props.data) - 1;\n var innerRet = /*#__PURE__*/React.createElement(VirtualizedListContextProvider, {\n value: {\n cellKey: null,\n getScrollMetrics: this._getScrollMetrics,\n horizontal: this.props.horizontal,\n getOutermostParentListRef: this._getOutermostParentListRef,\n getNestedChildState: this._getNestedChildState,\n registerAsNestedChild: this._registerAsNestedChild,\n unregisterAsNestedChild: this._unregisterAsNestedChild,\n debugInfo: this._getDebugInfo()\n }\n }, /*#__PURE__*/React.cloneElement((this.props.renderScrollComponent || this._defaultRenderScrollComponent)(scrollProps), {\n ref: this._captureScrollRef\n }, cells));\n var ret = innerRet;\n\n if (this.props.debug) {\n return /*#__PURE__*/React.createElement(View, {\n style: styles.debug\n }, ret, this._renderDebugOverlay());\n } else {\n return ret;\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props9 = this.props,\n data = _this$props9.data,\n extraData = _this$props9.extraData;\n\n if (data !== prevProps.data || extraData !== prevProps.extraData) {\n // clear the viewableIndices cache to also trigger\n // the onViewableItemsChanged callback with the new data\n this._viewabilityTuples.forEach(function (tuple) {\n tuple.viewabilityHelper.resetViewableIndices();\n });\n } // The `this._hiPriInProgress` is guaranteeing a hiPri cell update will only happen\n // once per fiber update. The `_scheduleCellsToRenderUpdate` will set it to true\n // if a hiPri update needs to perform. If `componentDidUpdate` is triggered with\n // `this._hiPriInProgress=true`, means it's triggered by the hiPri update. The\n // `_scheduleCellsToRenderUpdate` will check this condition and not perform\n // another hiPri update.\n\n\n var hiPriInProgress = this._hiPriInProgress;\n\n this._scheduleCellsToRenderUpdate(); // Make sure setting `this._hiPriInProgress` back to false after `componentDidUpdate`\n // is triggered with `this._hiPriInProgress = true`\n\n\n if (hiPriInProgress) {\n this._hiPriInProgress = false;\n }\n };\n\n _proto._computeBlankness = function _computeBlankness() {\n this._fillRateHelper.computeBlankness(this.props, this.state, this._scrollMetrics);\n };\n\n _proto._onCellLayout = function _onCellLayout(e, cellKey, index) {\n var layout = e.nativeEvent.layout;\n var next = {\n offset: this._selectOffset(layout),\n length: this._selectLength(layout),\n index: index,\n inLayout: true\n };\n var curr = this._frames[cellKey];\n\n if (!curr || next.offset !== curr.offset || next.length !== curr.length || index !== curr.index) {\n this._totalCellLength += next.length - (curr ? curr.length : 0);\n this._totalCellsMeasured += curr ? 0 : 1;\n this._averageCellLength = this._totalCellLength / this._totalCellsMeasured;\n this._frames[cellKey] = next;\n this._highestMeasuredFrameIndex = Math.max(this._highestMeasuredFrameIndex, index);\n\n this._scheduleCellsToRenderUpdate();\n } else {\n this._frames[cellKey].inLayout = true;\n }\n\n this._triggerRemeasureForChildListsInCell(cellKey);\n\n this._computeBlankness();\n\n this._updateViewableItems(this.props.data);\n };\n\n _proto._triggerRemeasureForChildListsInCell = function _triggerRemeasureForChildListsInCell(cellKey) {\n var childListKeys = this._cellKeysToChildListKeys.get(cellKey);\n\n if (childListKeys) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(childListKeys), _step2; !(_step2 = _iterator2()).done;) {\n var childKey = _step2.value;\n\n var childList = this._nestedChildLists.get(childKey);\n\n childList && childList.ref && childList.ref.measureLayoutRelativeToContainingList();\n }\n }\n };\n\n _proto.measureLayoutRelativeToContainingList = function measureLayoutRelativeToContainingList() {\n var _this4 = this;\n\n // TODO (T35574538): findNodeHandle sometimes crashes with \"Unable to find\n // node on an unmounted component\" during scrolling\n try {\n if (!this._scrollRef) {\n return;\n } // We are assuming that getOutermostParentListRef().getScrollRef()\n // is a non-null reference to a ScrollView\n\n\n this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(), function (x, y, width, height) {\n _this4._offsetFromParentVirtualizedList = _this4._selectOffset({\n x: x,\n y: y\n });\n _this4._scrollMetrics.contentLength = _this4._selectLength({\n width: width,\n height: height\n });\n\n var scrollMetrics = _this4._convertParentScrollMetrics(_this4.context.getScrollMetrics());\n\n _this4._scrollMetrics.visibleLength = scrollMetrics.visibleLength;\n _this4._scrollMetrics.offset = scrollMetrics.offset;\n }, function (error) {\n console.warn(\"VirtualizedList: Encountered an error while measuring a list's\" + ' offset from its containing VirtualizedList.');\n });\n } catch (error) {\n console.warn('measureLayoutRelativeToContainingList threw an error', error.stack);\n }\n };\n\n _proto._getFooterCellKey = function _getFooterCellKey() {\n return this._getCellKey() + '-footer';\n };\n\n _proto._renderDebugOverlay = function _renderDebugOverlay() {\n var normalize = this._scrollMetrics.visibleLength / (this._scrollMetrics.contentLength || 1);\n var framesInLayout = [];\n var itemCount = this.props.getItemCount(this.props.data);\n\n for (var ii = 0; ii < itemCount; ii++) {\n var frame = this._getFrameMetricsApprox(ii);\n /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.68 was deployed. To see the error delete this\n * comment and run Flow. */\n\n\n if (frame.inLayout) {\n framesInLayout.push(frame);\n }\n }\n\n var windowTop = this._getFrameMetricsApprox(this.state.first).offset;\n\n var frameLast = this._getFrameMetricsApprox(this.state.last);\n\n var windowLen = frameLast.offset + frameLast.length - windowTop;\n var visTop = this._scrollMetrics.offset;\n var visLen = this._scrollMetrics.visibleLength;\n return /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlay]\n }, framesInLayout.map(function (f, ii) {\n return /*#__PURE__*/React.createElement(View, {\n key: 'f' + ii,\n style: [styles.debugOverlayBase, styles.debugOverlayFrame, {\n top: f.offset * normalize,\n height: f.length * normalize\n }]\n });\n }), /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlayFrameLast, {\n top: windowTop * normalize,\n height: windowLen * normalize\n }]\n }), /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlayFrameVis, {\n top: visTop * normalize,\n height: visLen * normalize\n }]\n }));\n };\n\n _proto._selectLength = function _selectLength(metrics) {\n return !this.props.horizontal ? metrics.height : metrics.width;\n };\n\n _proto._selectOffset = function _selectOffset(metrics) {\n return !this.props.horizontal ? metrics.y : metrics.x;\n };\n\n _proto._maybeCallOnEndReached = function _maybeCallOnEndReached() {\n var _this$props10 = this.props,\n data = _this$props10.data,\n getItemCount = _this$props10.getItemCount,\n onEndReached = _this$props10.onEndReached,\n onEndReachedThreshold = _this$props10.onEndReachedThreshold;\n var _this$_scrollMetrics2 = this._scrollMetrics,\n contentLength = _this$_scrollMetrics2.contentLength,\n visibleLength = _this$_scrollMetrics2.visibleLength,\n offset = _this$_scrollMetrics2.offset;\n var distanceFromEnd = contentLength - visibleLength - offset;\n var threshold = onEndReachedThreshold ? onEndReachedThreshold * visibleLength : 2;\n\n if (onEndReached && this.state.last === getItemCount(data) - 1 && distanceFromEnd < threshold && this._scrollMetrics.contentLength !== this._sentEndForContentLength) {\n // Only call onEndReached once for a given content length\n this._sentEndForContentLength = this._scrollMetrics.contentLength;\n onEndReached({\n distanceFromEnd: distanceFromEnd\n });\n } else if (distanceFromEnd > threshold) {\n // If the user scrolls away from the end and back again cause\n // an onEndReached to be triggered again\n this._sentEndForContentLength = 0;\n }\n };\n\n _proto._scheduleCellsToRenderUpdate = function _scheduleCellsToRenderUpdate() {\n var _this$state2 = this.state,\n first = _this$state2.first,\n last = _this$state2.last;\n var _this$_scrollMetrics3 = this._scrollMetrics,\n offset = _this$_scrollMetrics3.offset,\n visibleLength = _this$_scrollMetrics3.visibleLength,\n velocity = _this$_scrollMetrics3.velocity;\n var itemCount = this.props.getItemCount(this.props.data);\n var hiPri = false;\n var scrollingThreshold =\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.63 was deployed. To see the error delete\n * this comment and run Flow. */\n this.props.onEndReachedThreshold * visibleLength / 2; // Mark as high priority if we're close to the start of the first item\n // But only if there are items before the first rendered item\n\n if (first > 0) {\n var distTop = offset - this._getFrameMetricsApprox(first).offset;\n\n hiPri = hiPri || distTop < 0 || velocity < -2 && distTop < scrollingThreshold;\n } // Mark as high priority if we're close to the end of the last item\n // But only if there are items after the last rendered item\n\n\n if (last < itemCount - 1) {\n var distBottom = this._getFrameMetricsApprox(last).offset - (offset + visibleLength);\n hiPri = hiPri || distBottom < 0 || velocity > 2 && distBottom < scrollingThreshold;\n } // Only trigger high-priority updates if we've actually rendered cells,\n // and with that size estimate, accurately compute how many cells we should render.\n // Otherwise, it would just render as many cells as it can (of zero dimension),\n // each time through attempting to render more (limited by maxToRenderPerBatch),\n // starving the renderer from actually laying out the objects and computing _averageCellLength.\n // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate\n // We shouldn't do another hipri cellToRenderUpdate\n\n\n if (hiPri && (this._averageCellLength || this.props.getItemLayout) && !this._hiPriInProgress) {\n this._hiPriInProgress = true; // Don't worry about interactions when scrolling quickly; focus on filling content as fast\n // as possible.\n\n this._updateCellsToRenderBatcher.dispose({\n abort: true\n });\n\n this._updateCellsToRender();\n\n return;\n } else {\n this._updateCellsToRenderBatcher.schedule();\n }\n };\n\n _proto._updateViewableItems = function _updateViewableItems(data) {\n var _this5 = this;\n\n var getItemCount = this.props.getItemCount;\n\n this._viewabilityTuples.forEach(function (tuple) {\n tuple.viewabilityHelper.onUpdate(getItemCount(data), _this5._scrollMetrics.offset, _this5._scrollMetrics.visibleLength, _this5._getFrameMetrics, _this5._createViewToken, tuple.onViewableItemsChanged, _this5.state);\n });\n };\n\n return VirtualizedList;\n}(React.PureComponent);\n\nVirtualizedList.contextType = VirtualizedListContext;\nVirtualizedList.defaultProps = {\n disableVirtualization: false,\n horizontal: false,\n initialNumToRender: 10,\n keyExtractor: function keyExtractor(item, index) {\n if (item.key != null) {\n return item.key;\n }\n\n if (item.id != null) {\n return item.id;\n }\n\n _usedIndexForKey = true;\n\n if (item.type && item.type.displayName) {\n _keylessItemComponentName = item.type.displayName;\n }\n\n return String(index);\n },\n maxToRenderPerBatch: 10,\n onEndReachedThreshold: 2,\n // multiples of length\n scrollEventThrottle: 50,\n updateCellsBatchingPeriod: 50,\n windowSize: 21 // multiples of length\n\n};\n\nvar CellRenderer = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CellRenderer, _React$Component);\n\n function CellRenderer() {\n var _this6;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this6 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this6.state = {\n separatorProps: {\n highlighted: false,\n leadingItem: _this6.props.item\n }\n };\n _this6._separators = {\n highlight: function highlight() {\n var _this6$props = _this6.props,\n cellKey = _this6$props.cellKey,\n prevCellKey = _this6$props.prevCellKey;\n\n _this6.props.onUpdateSeparators([cellKey, prevCellKey], {\n highlighted: true\n });\n },\n unhighlight: function unhighlight() {\n var _this6$props2 = _this6.props,\n cellKey = _this6$props2.cellKey,\n prevCellKey = _this6$props2.prevCellKey;\n\n _this6.props.onUpdateSeparators([cellKey, prevCellKey], {\n highlighted: false\n });\n },\n updateProps: function updateProps(select, newProps) {\n var _this6$props3 = _this6.props,\n cellKey = _this6$props3.cellKey,\n prevCellKey = _this6$props3.prevCellKey;\n\n _this6.props.onUpdateSeparators([select === 'leading' ? prevCellKey : cellKey], newProps);\n }\n };\n return _this6;\n }\n\n CellRenderer.getDerivedStateFromProps = function getDerivedStateFromProps(props, prevState) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n leadingItem: props.item\n })\n };\n } // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not\n // reused by SectionList and we can keep VirtualizedList simpler.\n ;\n\n var _proto2 = CellRenderer.prototype;\n\n _proto2.updateSeparatorProps = function updateSeparatorProps(newProps) {\n this.setState(function (state) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n };\n });\n };\n\n _proto2.componentWillUnmount = function componentWillUnmount() {\n this.props.onUnmount(this.props.cellKey);\n };\n\n _proto2._renderElement = function _renderElement(renderItem, ListItemComponent, item, index) {\n if (renderItem && ListItemComponent) {\n console.warn('VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' + ' precedence over renderItem.');\n }\n\n if (ListItemComponent) {\n /* $FlowFixMe(>=0.108.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.108 was deployed. To see the error, delete\n * this comment and run Flow. */\n return /*#__PURE__*/React.createElement(ListItemComponent, {\n item: item,\n index: index,\n separators: this._separators\n });\n }\n\n if (renderItem) {\n return renderItem({\n item: item,\n index: index,\n separators: this._separators\n });\n }\n\n invariant(false, 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.');\n };\n\n _proto2.render = function render() {\n var _this$props11 = this.props,\n CellRendererComponent = _this$props11.CellRendererComponent,\n ItemSeparatorComponent = _this$props11.ItemSeparatorComponent,\n fillRateHelper = _this$props11.fillRateHelper,\n horizontal = _this$props11.horizontal,\n item = _this$props11.item,\n index = _this$props11.index,\n inversionStyle = _this$props11.inversionStyle,\n parentProps = _this$props11.parentProps;\n var renderItem = parentProps.renderItem,\n getItemLayout = parentProps.getItemLayout,\n ListItemComponent = parentProps.ListItemComponent;\n\n var element = this._renderElement(renderItem, ListItemComponent, item, index);\n\n var onLayout =\n /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.68 was deployed. To see the error delete this\n * comment and run Flow. */\n getItemLayout && !parentProps.debug && !fillRateHelper.enabled() ? undefined : this.props.onLayout; // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and\n // called explicitly by `ScrollViewStickyHeader`.\n\n var itemSeparator = ItemSeparatorComponent && /*#__PURE__*/React.createElement(ItemSeparatorComponent, this.state.separatorProps);\n var cellStyle = inversionStyle ? horizontal ? [styles.rowReverse, inversionStyle] : [styles.columnReverse, inversionStyle] : horizontal ? [styles.row, inversionStyle] : inversionStyle;\n var result = !CellRendererComponent ?\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.89 was deployed. To see the error, delete\n * this comment and run Flow. */\n React.createElement(View, {\n style: cellStyle,\n onLayout: onLayout\n }, element, itemSeparator) : /*#__PURE__*/React.createElement(CellRendererComponent, _extends({}, this.props, {\n style: cellStyle,\n onLayout: onLayout\n }), element, itemSeparator);\n return /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this.props.cellKey\n }, result);\n };\n\n return CellRenderer;\n}(React.Component);\n\nfunction describeNestedLists(childList) {\n var trace = 'VirtualizedList trace:\\n' + (\" Child (\" + (childList.horizontal ? 'horizontal' : 'vertical') + \"):\\n\") + (\" listKey: \" + childList.key + \"\\n\") + (\" cellKey: \" + childList.cellKey);\n var debugInfo = childList.parentDebugInfo;\n\n while (debugInfo) {\n trace += \"\\n Parent (\" + (debugInfo.horizontal ? 'horizontal' : 'vertical') + \"):\\n\" + (\" listKey: \" + debugInfo.listKey + \"\\n\") + (\" cellKey: \" + debugInfo.cellKey);\n debugInfo = debugInfo.parent;\n }\n\n return trace;\n}\n\nvar styles = StyleSheet.create({\n verticallyInverted: {\n transform: [{\n scaleY: -1\n }]\n },\n horizontallyInverted: {\n transform: [{\n scaleX: -1\n }]\n },\n row: {\n flexDirection: 'row'\n },\n rowReverse: {\n flexDirection: 'row-reverse'\n },\n columnReverse: {\n flexDirection: 'column-reverse'\n },\n debug: {\n flex: 1\n },\n debugOverlayBase: {\n position: 'absolute',\n top: 0,\n right: 0\n },\n debugOverlay: {\n bottom: 0,\n width: 20,\n borderColor: 'blue',\n borderWidth: 1\n },\n debugOverlayFrame: {\n left: 0,\n backgroundColor: 'orange'\n },\n debugOverlayFrameLast: {\n left: 0,\n borderColor: 'green',\n borderWidth: 2\n },\n debugOverlayFrameVis: {\n left: 0,\n borderColor: 'red',\n borderWidth: 2\n }\n});\nexport default VirtualizedList;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar emptyFunction = function emptyFunction() {};\n\nfunction StatusBar() {\n return null;\n}\n\nStatusBar.setBackgroundColor = emptyFunction;\nStatusBar.setBarStyle = emptyFunction;\nStatusBar.setHidden = emptyFunction;\nStatusBar.setNetworkActivityIndicatorVisible = emptyFunction;\nStatusBar.setTranslucent = emptyFunction;\nexport default StatusBar;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\n/**\n * 2D Value for driving 2D animations, such as pan gestures. Almost identical\n * API to normal `Animated.Value`, but multiplexed.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html\n */\n\nvar AnimatedValueXY = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedValueXY, _AnimatedWithChildren);\n\n function AnimatedValueXY(valueIn) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n var value = valueIn || {\n x: 0,\n y: 0\n }; // fixme: shouldn't need `: any`\n\n if (typeof value.x === 'number' && typeof value.y === 'number') {\n _this.x = new AnimatedValue(value.x);\n _this.y = new AnimatedValue(value.y);\n } else {\n invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, 'AnimatedValueXY must be initialized with an object of numbers or ' + 'AnimatedValues.');\n _this.x = value.x;\n _this.y = value.y;\n }\n\n _this._listeners = {};\n return _this;\n }\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#setvalue\n */\n\n\n var _proto = AnimatedValueXY.prototype;\n\n _proto.setValue = function setValue(value) {\n this.x.setValue(value.x);\n this.y.setValue(value.y);\n }\n /**\n * Sets an offset that is applied on top of whatever value is set, whether\n * via `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#setoffset\n */\n ;\n\n _proto.setOffset = function setOffset(offset) {\n this.x.setOffset(offset.x);\n this.y.setOffset(offset.y);\n }\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#flattenoffset\n */\n ;\n\n _proto.flattenOffset = function flattenOffset() {\n this.x.flattenOffset();\n this.y.flattenOffset();\n }\n /**\n * Sets the offset value to the base value, and resets the base value to\n * zero. The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#extractoffset\n */\n ;\n\n _proto.extractOffset = function extractOffset() {\n this.x.extractOffset();\n this.y.extractOffset();\n };\n\n _proto.__getValue = function __getValue() {\n return {\n x: this.x.__getValue(),\n y: this.y.__getValue()\n };\n }\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#resetanimation\n */\n ;\n\n _proto.resetAnimation = function resetAnimation(callback) {\n this.x.resetAnimation();\n this.y.resetAnimation();\n callback && callback(this.__getValue());\n }\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#stopanimation\n */\n ;\n\n _proto.stopAnimation = function stopAnimation(callback) {\n this.x.stopAnimation();\n this.y.stopAnimation();\n callback && callback(this.__getValue());\n }\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to synchronously read\n * the value because it might be driven natively.\n *\n * Returns a string that serves as an identifier for the listener.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#addlistener\n */\n ;\n\n _proto.addListener = function addListener(callback) {\n var _this2 = this;\n\n var id = String(_uniqueId++);\n\n var jointCallback = function jointCallback(_ref) {\n var number = _ref.value;\n callback(_this2.__getValue());\n };\n\n this._listeners[id] = {\n x: this.x.addListener(jointCallback),\n y: this.y.addListener(jointCallback)\n };\n return id;\n }\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#removelistener\n */\n ;\n\n _proto.removeListener = function removeListener(id) {\n this.x.removeListener(this._listeners[id].x);\n this.y.removeListener(this._listeners[id].y);\n delete this._listeners[id];\n }\n /**\n * Remove all registered listeners.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#removealllisteners\n */\n ;\n\n _proto.removeAllListeners = function removeAllListeners() {\n this.x.removeAllListeners();\n this.y.removeAllListeners();\n this._listeners = {};\n }\n /**\n * Converts `{x, y}` into `{left, top}` for use in style.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#getlayout\n */\n ;\n\n _proto.getLayout = function getLayout() {\n return {\n left: this.x,\n top: this.y\n };\n }\n /**\n * Converts `{x, y}` into a useable translation transform.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#gettranslatetransform\n */\n ;\n\n _proto.getTranslateTransform = function getTranslateTransform() {\n return [{\n translateX: this.x\n }, {\n translateY: this.y\n }];\n };\n\n return AnimatedValueXY;\n}(AnimatedWithChildren);\n\nexport default AnimatedValueXY;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction emptyFunction() {}\n\nvar BackHandler = {\n exitApp: emptyFunction,\n addEventListener: function addEventListener() {\n return {\n remove: emptyFunction\n };\n },\n removeEventListener: emptyFunction\n};\nexport default BackHandler;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { createContext } from 'react';\nvar TextAncestorContext = /*#__PURE__*/createContext(false);\nexport default TextAncestorContext;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport ReactNativePropRegistry from './ReactNativePropRegistry';\nimport invariant from 'fbjs/lib/invariant';\n\nfunction getStyle(style) {\n if (typeof style === 'number') {\n return ReactNativePropRegistry.getByID(style);\n }\n\n return style;\n}\n\nfunction flattenStyle(style) {\n if (!style) {\n return undefined;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n invariant(style !== true, 'style may be false but not true');\n }\n\n if (!Array.isArray(style)) {\n return getStyle(style);\n }\n\n var result = {};\n\n for (var i = 0, styleLength = style.length; i < styleLength; ++i) {\n var computedStyle = flattenStyle(style[i]);\n\n if (computedStyle) {\n for (var key in computedStyle) {\n var value = computedStyle[key];\n result[key] = value;\n }\n }\n }\n\n return result;\n}\n\nexport default flattenStyle;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\n\nvar ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n canUseWorkers: typeof Worker !== 'undefined',\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n canUseViewport: canUseDOM && !!window.screen,\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\nmodule.exports = ExecutionEnvironment;","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nvar MAX_DIMENSIONS = 3;\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nexport function z(d) {\n return d.z;\n}\n\nvar initialRadius = 10,\n initialAngleRoll = Math.PI * (3 - Math.sqrt(5)), // Golden ratio angle\n initialAngleYaw = Math.PI * 20 / (9 + Math.sqrt(221)); // Markov irrational number\n\nexport default function(nodes, numDimensions) {\n numDimensions = numDimensions || 2;\n\n var nDim = Math.min(MAX_DIMENSIONS, Math.max(1, Math.round(numDimensions))),\n simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function (force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (nDim > 1) {\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n if (nDim > 2) {\n if (node.fz == null) node.z += node.vz *= velocityDecay;\n else node.z = node.fz, node.vz = 0;\n }\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (node.fz != null) node.z = node.fz;\n if (isNaN(node.x) || (nDim > 1 && isNaN(node.y)) || (nDim > 2 && isNaN(node.z))) {\n var radius = initialRadius * (nDim > 2 ? Math.cbrt(0.5 + i) : (nDim > 1 ? Math.sqrt(0.5 + i) : i)),\n rollAngle = i * initialAngleRoll,\n yawAngle = i * initialAngleYaw;\n\n if (nDim === 1) {\n node.x = radius;\n } else if (nDim === 2) {\n node.x = radius * Math.cos(rollAngle);\n node.y = radius * Math.sin(rollAngle);\n } else { // 3 dimensions: use spherical distribution along 2 irrational number angles\n node.x = radius * Math.sin(rollAngle) * Math.cos(yawAngle);\n node.y = radius * Math.cos(rollAngle);\n node.z = radius * Math.sin(rollAngle) * Math.sin(yawAngle);\n }\n }\n if (isNaN(node.vx) || (nDim > 1 && isNaN(node.vy)) || (nDim > 2 && isNaN(node.vz))) {\n node.vx = 0;\n if (nDim > 1) { node.vy = 0; }\n if (nDim > 2) { node.vz = 0; }\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random, nDim);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n numDimensions: function(_) {\n return arguments.length\n ? (nDim = Math.min(MAX_DIMENSIONS, Math.max(1, Math.round(_))), forces.forEach(initializeForce), simulation)\n : nDim;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function() {\n var args = Array.prototype.slice.call(arguments);\n var x = args.shift() || 0,\n y = (nDim > 1 ? args.shift() : null) || 0,\n z = (nDim > 2 ? args.shift() : null) || 0,\n radius = args.shift() || Infinity;\n\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n dz,\n d2,\n node,\n closest;\n\n radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - (node.y || 0);\n dz = z - (node.z ||0);\n d2 = dx * dx + dy * dy + dz * dz;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n","const getVariableName = require('./getVariableName');\n\nmodule.exports = function createPatternBuilder(dimension) {\n\n return pattern;\n \n function pattern(template, config) {\n let indent = (config && config.indent) || 0;\n let join = (config && config.join !== undefined) ? config.join : '\\n';\n let indentString = Array(indent + 1).join(' ');\n let buffer = [];\n for (let i = 0; i < dimension; ++i) {\n let variableName = getVariableName(i);\n let prefix = (i === 0) ? '' : indentString;\n buffer.push(prefix + template.replace(/{var}/g, variableName));\n }\n return buffer.join(join);\n }\n};\n","function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}\nmodule.exports = _arity;","import type * as React from 'react';\nimport type {\n DefaultRouterOptions,\n NavigationState,\n NavigationAction,\n InitialState,\n PartialState,\n Route,\n ParamListBase,\n} from '@react-navigation/routers';\n\nexport type DefaultNavigatorOptions<\n ScreenOptions extends {},\n ParamList extends ParamListBase = ParamListBase\n> = DefaultRouterOptions<Extract<keyof ParamList, string>> & {\n /**\n * Children React Elements to extract the route configuration from.\n * Only `Screen` components are supported as children.\n */\n children: React.ReactNode;\n /**\n * Default options for all screens under this navigator.\n */\n screenOptions?:\n | ScreenOptions\n | ((props: {\n route: RouteProp<ParamList, keyof ParamList>;\n navigation: any;\n }) => ScreenOptions);\n};\n\nexport type EventMapBase = Record<\n string,\n { data?: any; canPreventDefault?: boolean }\n>;\n\nexport type EventMapCore<State extends NavigationState> = {\n focus: { data: undefined };\n blur: { data: undefined };\n state: { data: { state: State } };\n beforeRemove: { data: { action: NavigationAction }; canPreventDefault: true };\n};\n\nexport type EventArg<\n EventName extends string,\n CanPreventDefault extends boolean | undefined = false,\n Data = undefined\n> = {\n /**\n * Type of the event (e.g. `focus`, `blur`)\n */\n readonly type: EventName;\n readonly target?: string;\n} & (CanPreventDefault extends true\n ? {\n /**\n * Whether `event.preventDefault()` was called on this event object.\n */\n readonly defaultPrevented: boolean;\n /**\n * Prevent the default action which happens on this event.\n */\n preventDefault(): void;\n }\n : {}) &\n (undefined extends Data\n ? { readonly data?: Readonly<Data> }\n : { readonly data: Readonly<Data> });\n\nexport type EventListenerCallback<\n EventMap extends EventMapBase,\n EventName extends keyof EventMap\n> = (\n e: EventArg<\n Extract<EventName, string>,\n EventMap[EventName]['canPreventDefault'],\n EventMap[EventName]['data']\n >\n) => void;\n\nexport type EventConsumer<EventMap extends EventMapBase> = {\n /**\n * Subscribe to events from the parent navigator.\n *\n * @param type Type of the event (e.g. `focus`, `blur`)\n * @param callback Callback listener which is executed upon receiving the event.\n */\n addListener<EventName extends Extract<keyof EventMap, string>>(\n type: EventName,\n callback: EventListenerCallback<EventMap, EventName>\n ): () => void;\n removeListener<EventName extends Extract<keyof EventMap, string>>(\n type: EventName,\n callback: EventListenerCallback<EventMap, EventName>\n ): void;\n};\n\nexport type EventEmitter<EventMap extends EventMapBase> = {\n /**\n * Emit an event to child screens.\n *\n * @param options.type Type of the event (e.g. `focus`, `blur`)\n * @param [options.data] Optional information regarding the event.\n * @param [options.target] Key of the target route which should receive the event.\n * If not specified, all routes receive the event.\n */\n emit<EventName extends Extract<keyof EventMap, string>>(\n options: {\n type: EventName;\n target?: string;\n } & (EventMap[EventName]['canPreventDefault'] extends true\n ? { canPreventDefault: true }\n : {}) &\n (undefined extends EventMap[EventName]['data']\n ? { data?: EventMap[EventName]['data'] }\n : { data: EventMap[EventName]['data'] })\n ): EventArg<\n EventName,\n EventMap[EventName]['canPreventDefault'],\n EventMap[EventName]['data']\n >;\n};\n\nexport class PrivateValueStore<A, B, C> {\n /**\n * UGLY HACK! DO NOT USE THE TYPE!!!\n *\n * TypeScript requires a type to be used to be able to infer it.\n * The type should exist as its own without any operations such as union.\n * So we need to figure out a way to store this type in a property.\n * The problem with a normal property is that it shows up in intelliSense.\n * Adding private keyword works, but the annotation is stripped away in declaration.\n * Turns out if we use an empty string, it doesn't show up in intelliSense.\n */\n protected ''?: { a: A; b: B; c: C };\n}\n\ntype NavigationHelpersCommon<\n ParamList extends ParamListBase,\n State extends NavigationState = NavigationState\n> = {\n /**\n * Dispatch an action or an update function to the router.\n * The update function will receive the current state,\n *\n * @param action Action object or update function.\n */\n dispatch(\n action: NavigationAction | ((state: State) => NavigationAction)\n ): void;\n\n /**\n * Navigate to a route in current navigation tree.\n *\n * @param name Name of the route to navigate to.\n * @param [params] Params object for the route.\n */\n navigate<RouteName extends keyof ParamList>(\n ...args: undefined extends ParamList[RouteName]\n ? [RouteName] | [RouteName, ParamList[RouteName]]\n : [RouteName, ParamList[RouteName]]\n ): void;\n\n /**\n * Navigate to a route in current navigation tree.\n *\n * @param route Object with `key` or `name` for the route to navigate to, and a `params` object.\n */\n navigate<RouteName extends keyof ParamList>(\n route:\n | { key: string; params?: ParamList[RouteName] }\n | { name: RouteName; key?: string; params: ParamList[RouteName] }\n ): void;\n\n /**\n * Reset the navigation state to the provided state.\n *\n * @param state Navigation state object.\n */\n reset(state: PartialState<State> | State): void;\n\n /**\n * Go back to the previous route in history.\n */\n goBack(): void;\n\n /**\n * Check if the screen is focused. The method returns `true` if focused, `false` otherwise.\n * Note that this method doesn't re-render screen when the focus changes. So don't use it in `render`.\n * To get notified of focus changes, use `addListener('focus', cb)` and `addListener('blur', cb)`.\n * To conditionally render content based on focus state, use the `useIsFocused` hook.\n */\n isFocused(): boolean;\n\n /**\n * Check if dispatching back action will be handled by navigation.\n * Note that this method doesn't re-render screen when the result changes. So don't use it in `render`.\n */\n canGoBack(): boolean;\n\n /**\n * Returns the parent navigator, if any. Reason why the function is called\n * dangerouslyGetParent is to warn developers against overusing it to eg. get parent\n * of parent and other hard-to-follow patterns.\n */\n dangerouslyGetParent<T = NavigationProp<ParamListBase> | undefined>(): T;\n\n /**\n * Returns the navigator's state. Reason why the function is called\n * dangerouslyGetState is to discourage developers to use internal navigation's state.\n * Note that this method doesn't re-render screen when the result changes. So don't use it in `render`.\n */\n dangerouslyGetState(): State;\n} & PrivateValueStore<ParamList, keyof ParamList, {}>;\n\nexport type NavigationHelpers<\n ParamList extends ParamListBase,\n EventMap extends EventMapBase = {}\n> = NavigationHelpersCommon<ParamList> &\n EventEmitter<EventMap> & {\n /**\n * Update the param object for the route.\n * The new params will be shallow merged with the old one.\n *\n * @param params Params object for the current route.\n */\n setParams<RouteName extends keyof ParamList>(\n params: Partial<ParamList[RouteName]>\n ): void;\n };\n\nexport type NavigationContainerProps = {\n /**\n * Initial navigation state for the child navigators.\n */\n initialState?: InitialState;\n /**\n * Callback which is called with the latest navigation state when it changes.\n */\n onStateChange?: (state: NavigationState | undefined) => void;\n /**\n * Callback which is called when an action is not handled.\n */\n onUnhandledAction?: (action: NavigationAction) => void;\n /**\n * Whether this navigation container should be independent of parent containers.\n * If this is not set to `true`, this container cannot be nested inside another container.\n * Setting it to `true` disconnects any children navigators from parent container.\n */\n independent?: boolean;\n /**\n * Children elements to render.\n */\n children: React.ReactNode;\n};\n\nexport type NavigationProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = string,\n State extends NavigationState = NavigationState<ParamList>,\n ScreenOptions extends {} = {},\n EventMap extends EventMapBase = {}\n> = NavigationHelpersCommon<ParamList, State> & {\n /**\n * Update the param object for the route.\n * The new params will be shallow merged with the old one.\n *\n * @param params Params object for the current route.\n */\n setParams(params: Partial<ParamList[RouteName]>): void;\n\n /**\n * Update the options for the route.\n * The options object will be shallow merged with default options object.\n *\n * @param options Options object for the route.\n */\n setOptions(options: Partial<ScreenOptions>): void;\n} & EventConsumer<EventMap & EventMapCore<State>> &\n PrivateValueStore<ParamList, RouteName, EventMap>;\n\nexport type RouteProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList\n> = Route<Extract<RouteName, string>, ParamList[RouteName]>;\n\nexport type CompositeNavigationProp<\n A extends NavigationProp<ParamListBase, string, any, any>,\n B extends NavigationHelpersCommon<ParamListBase, any>\n> = Omit<A & B, keyof NavigationProp<any>> &\n NavigationProp<\n /**\n * Param list from both navigation objects needs to be combined\n * For example, we should be able to navigate to screens in both A and B\n */\n (A extends NavigationHelpersCommon<infer T> ? T : never) &\n (B extends NavigationHelpersCommon<infer U> ? U : never),\n /**\n * The route name should refer to the route name specified in the first type\n * Ideally it should work for any of them, but it's not possible to infer that way\n */\n A extends NavigationProp<any, infer R> ? R : string,\n /**\n * The type of state should refer to the state specified in the first type\n */\n A extends NavigationProp<any, any, infer S> ? S : NavigationState,\n /**\n * Screen options from both navigation objects needs to be combined\n * This allows typechecking `setOptions`\n */\n (A extends NavigationProp<any, any, any, infer O> ? O : {}) &\n (B extends NavigationProp<any, any, any, infer P> ? P : {}),\n /**\n * Event consumer config should refer to the config specified in the first type\n * This allows typechecking `addListener`/`removeListener`\n */\n A extends NavigationProp<any, any, any, any, infer E> ? E : {}\n >;\n\nexport type Descriptor<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = string,\n State extends NavigationState = NavigationState,\n ScreenOptions extends {} = {},\n EventMap extends EventMapBase = {}\n> = {\n /**\n * Render the component associated with this route.\n */\n render(): JSX.Element;\n\n /**\n * Options for the route.\n */\n options: ScreenOptions;\n\n /**\n * Navigation object for the screen\n */\n navigation: NavigationProp<\n ParamList,\n RouteName,\n State,\n ScreenOptions,\n EventMap\n >;\n};\n\nexport type ScreenListeners<\n State extends NavigationState,\n EventMap extends EventMapBase\n> = Partial<\n {\n [EventName in keyof (EventMap &\n EventMapCore<State>)]: EventListenerCallback<EventMap, EventName>;\n }\n>;\n\nexport type RouteConfig<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList,\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n> = {\n /**\n * Route name of this screen.\n */\n name: RouteName;\n\n /**\n * Navigator options for this screen.\n */\n options?:\n | ScreenOptions\n | ((props: {\n route: RouteProp<ParamList, RouteName>;\n navigation: any;\n }) => ScreenOptions);\n\n /**\n * Event listeners for this screen.\n */\n listeners?:\n | ScreenListeners<State, EventMap>\n | ((props: {\n route: RouteProp<ParamList, RouteName>;\n navigation: any;\n }) => ScreenListeners<State, EventMap>);\n\n /**\n * Function to return an unique ID for this screen.\n * Receives an object with the route params.\n * For a given screen name, there will always be only one screen corresponding to an ID.\n * If `undefined` is returned, it acts same as no `getId` being specified.\n */\n getId?: ({ params }: { params: ParamList[RouteName] }) => string | undefined;\n\n /**\n * Initial params object for the route.\n */\n initialParams?: Partial<ParamList[RouteName]>;\n} & (\n | {\n /**\n * React component to render for this screen.\n */\n component: React.ComponentType<any>;\n getComponent?: never;\n children?: never;\n }\n | {\n /**\n * Lazily get a React component to render for this screen.\n */\n getComponent: () => React.ComponentType<any>;\n component?: never;\n children?: never;\n }\n | {\n /**\n * Render callback to render content of this screen.\n */\n children: (props: {\n route: RouteProp<ParamList, RouteName>;\n navigation: any;\n }) => React.ReactNode;\n component?: never;\n getComponent?: never;\n }\n);\n\nexport type NavigationContainerEventMap = {\n /**\n * Event which fires when the navigation state changes.\n */\n state: {\n data: {\n /**\n * The updated state object after the state change.\n */\n state: NavigationState | PartialState<NavigationState> | undefined;\n };\n };\n /**\n * Event which fires when current options changes.\n */\n options: { data: { options: object } };\n /**\n * Event which fires when an action is dispatched.\n * Only intended for debugging purposes, don't use it for app logic.\n * This event will be emitted before state changes have been applied.\n */\n __unsafe_action__: {\n data: {\n /**\n * The action object which was dispatched.\n */\n action: NavigationAction;\n /**\n * Whether the action was a no-op, i.e. resulted any state changes.\n */\n noop: boolean;\n };\n };\n};\n\nexport type NavigationContainerRef = NavigationHelpers<ParamListBase> &\n EventConsumer<NavigationContainerEventMap> & {\n /**\n * Reset the navigation state of the root navigator to the provided state.\n *\n * @param state Navigation state object.\n */\n resetRoot(state?: PartialState<NavigationState> | NavigationState): void;\n /**\n * Get the rehydrated navigation state of the navigation tree.\n */\n getRootState(): NavigationState;\n /**\n * Get the currently focused navigation route.\n */\n getCurrentRoute(): Route<string> | undefined;\n /**\n * Get the currently focused route's options.\n */\n getCurrentOptions(): object | undefined;\n };\n\nexport type TypedNavigator<\n ParamList extends ParamListBase,\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase,\n Navigator extends React.ComponentType<any>\n> = {\n /**\n * Navigator component which manages the child screens.\n */\n Navigator: React.ComponentType<\n Omit<\n React.ComponentProps<Navigator>,\n keyof DefaultNavigatorOptions<any, any>\n > &\n DefaultNavigatorOptions<ScreenOptions, ParamList>\n >;\n /**\n * Component used for specifying route configuration.\n */\n Screen: <RouteName extends keyof ParamList>(\n _: RouteConfig<ParamList, RouteName, State, ScreenOptions, EventMap>\n ) => null;\n};\n\nexport type NavigatorScreenParams<\n ParamList,\n State extends NavigationState = NavigationState\n> =\n | {\n screen?: never;\n params?: never;\n initial?: never;\n state: PartialState<State> | State | undefined;\n }\n | {\n [RouteName in keyof ParamList]: undefined extends ParamList[RouteName]\n ? {\n screen: RouteName;\n params?: ParamList[RouteName];\n initial?: boolean;\n state?: never;\n }\n : {\n screen: RouteName;\n params: ParamList[RouteName];\n initial?: boolean;\n state?: never;\n };\n }[keyof ParamList];\n\nexport type PathConfig = {\n path?: string;\n exact?: boolean;\n parse?: Record<string, (value: string) => any>;\n stringify?: Record<string, (value: any) => string>;\n screens?: PathConfigMap;\n initialRouteName?: string;\n};\n\nexport type PathConfigMap = {\n [routeName: string]: string | PathConfig;\n};\n","import type { Theme } from '../types';\n\nconst DefaultTheme: Theme = {\n dark: false,\n colors: {\n primary: 'rgb(0, 122, 255)',\n background: 'rgb(242, 242, 242)',\n card: 'rgb(255, 255, 255)',\n text: 'rgb(28, 28, 30)',\n border: 'rgb(216, 216, 216)',\n notification: 'rgb(255, 59, 48)',\n },\n};\n\nexport default DefaultTheme;\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport useLayoutEffect from '../useLayoutEffect';\nimport UIManager from '../../exports/UIManager';\nvar DOM_LAYOUT_HANDLER_NAME = '__reactLayoutHandler';\nvar didWarn = !canUseDOM;\nvar resizeObserver = null;\n\nfunction getResizeObserver() {\n if (canUseDOM && typeof window.ResizeObserver !== 'undefined') {\n if (resizeObserver == null) {\n resizeObserver = new window.ResizeObserver(function (entries) {\n entries.forEach(function (entry) {\n var node = entry.target;\n var onLayout = node[DOM_LAYOUT_HANDLER_NAME];\n\n if (typeof onLayout === 'function') {\n // We still need to measure the view because browsers don't yet provide\n // border-box dimensions in the entry\n UIManager.measure(node, function (x, y, width, height, left, top) {\n var event = {\n // $FlowFixMe\n nativeEvent: {\n layout: {\n x: x,\n y: y,\n width: width,\n height: height,\n left: left,\n top: top\n }\n },\n timeStamp: Date.now()\n };\n Object.defineProperty(event.nativeEvent, 'target', {\n enumerable: true,\n get: function get() {\n return entry.target;\n }\n });\n onLayout(event);\n });\n }\n });\n });\n }\n } else if (!didWarn) {\n if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n console.warn('onLayout relies on ResizeObserver which is not supported by your browser. ' + 'Please include a polyfill, e.g., https://github.com/que-etc/resize-observer-polyfill.');\n didWarn = true;\n }\n }\n\n return resizeObserver;\n}\n\nexport default function useElementLayout(ref, onLayout) {\n var observer = getResizeObserver();\n useLayoutEffect(function () {\n var node = ref.current;\n\n if (node != null) {\n node[DOM_LAYOUT_HANDLER_NAME] = onLayout;\n }\n }, [ref, onLayout]); // Observing is done in a separate effect to avoid this effect running\n // when 'onLayout' changes.\n\n useLayoutEffect(function () {\n var node = ref.current;\n\n if (node != null && observer != null) {\n if (typeof node[DOM_LAYOUT_HANDLER_NAME] === 'function') {\n observer.observe(node);\n } else {\n observer.unobserve(node);\n }\n }\n\n return function () {\n if (node != null && observer != null) {\n observer.unobserve(node);\n }\n };\n }, [ref, observer]);\n}","/*\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\nfunction normalizeColor(color) {\n var match;\n\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color))) {\n return parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n if (names.hasOwnProperty(color)) {\n return names[color];\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.rgba.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16\n ) >>> 0;\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) {\n return parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = matchers.hex4.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16\n ) >>> 0;\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.hsla.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n return null;\n}\n\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n\nfunction hslToRgb(h, s, l) {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n var r = hue2rgb(p, q, h + 1 / 3);\n var g = hue2rgb(p, q, h);\n var b = hue2rgb(p, q, h - 1 / 3);\n\n return (\n Math.round(r * 255) << 24 |\n Math.round(g * 255) << 16 |\n Math.round(b * 255) << 8\n );\n}\n\n// var INTEGER = '[-+]?\\\\d+';\nvar NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+';\nvar PERCENTAGE = NUMBER + '%';\n\nfunction toArray(arrayLike) {\n return Array.prototype.slice.call(arrayLike, 0);\n}\n\nfunction call() {\n return '\\\\(\\\\s*(' + toArray(arguments).join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nvar matchers = {\n rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),\n rgba: new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)),\n hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hsla: new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)),\n hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#([0-9a-fA-F]{6})$/,\n hex8: /^#([0-9a-fA-F]{8})$/,\n};\n\nfunction parse255(str) {\n var int = parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\n\nfunction parse360(str) {\n var int = parseFloat(str);\n return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str) {\n var num = parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str) {\n // parseFloat conveniently ignores the final %\n var int = parseFloat(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\n\nvar names = {\n transparent: 0x00000000,\n\n // http://www.w3.org/TR/css3-color/#svg-color\n aliceblue: 0xf0f8ffff,\n antiquewhite: 0xfaebd7ff,\n aqua: 0x00ffffff,\n aquamarine: 0x7fffd4ff,\n azure: 0xf0ffffff,\n beige: 0xf5f5dcff,\n bisque: 0xffe4c4ff,\n black: 0x000000ff,\n blanchedalmond: 0xffebcdff,\n blue: 0x0000ffff,\n blueviolet: 0x8a2be2ff,\n brown: 0xa52a2aff,\n burlywood: 0xdeb887ff,\n burntsienna: 0xea7e5dff,\n cadetblue: 0x5f9ea0ff,\n chartreuse: 0x7fff00ff,\n chocolate: 0xd2691eff,\n coral: 0xff7f50ff,\n cornflowerblue: 0x6495edff,\n cornsilk: 0xfff8dcff,\n crimson: 0xdc143cff,\n cyan: 0x00ffffff,\n darkblue: 0x00008bff,\n darkcyan: 0x008b8bff,\n darkgoldenrod: 0xb8860bff,\n darkgray: 0xa9a9a9ff,\n darkgreen: 0x006400ff,\n darkgrey: 0xa9a9a9ff,\n darkkhaki: 0xbdb76bff,\n darkmagenta: 0x8b008bff,\n darkolivegreen: 0x556b2fff,\n darkorange: 0xff8c00ff,\n darkorchid: 0x9932ccff,\n darkred: 0x8b0000ff,\n darksalmon: 0xe9967aff,\n darkseagreen: 0x8fbc8fff,\n darkslateblue: 0x483d8bff,\n darkslategray: 0x2f4f4fff,\n darkslategrey: 0x2f4f4fff,\n darkturquoise: 0x00ced1ff,\n darkviolet: 0x9400d3ff,\n deeppink: 0xff1493ff,\n deepskyblue: 0x00bfffff,\n dimgray: 0x696969ff,\n dimgrey: 0x696969ff,\n dodgerblue: 0x1e90ffff,\n firebrick: 0xb22222ff,\n floralwhite: 0xfffaf0ff,\n forestgreen: 0x228b22ff,\n fuchsia: 0xff00ffff,\n gainsboro: 0xdcdcdcff,\n ghostwhite: 0xf8f8ffff,\n gold: 0xffd700ff,\n goldenrod: 0xdaa520ff,\n gray: 0x808080ff,\n green: 0x008000ff,\n greenyellow: 0xadff2fff,\n grey: 0x808080ff,\n honeydew: 0xf0fff0ff,\n hotpink: 0xff69b4ff,\n indianred: 0xcd5c5cff,\n indigo: 0x4b0082ff,\n ivory: 0xfffff0ff,\n khaki: 0xf0e68cff,\n lavender: 0xe6e6faff,\n lavenderblush: 0xfff0f5ff,\n lawngreen: 0x7cfc00ff,\n lemonchiffon: 0xfffacdff,\n lightblue: 0xadd8e6ff,\n lightcoral: 0xf08080ff,\n lightcyan: 0xe0ffffff,\n lightgoldenrodyellow: 0xfafad2ff,\n lightgray: 0xd3d3d3ff,\n lightgreen: 0x90ee90ff,\n lightgrey: 0xd3d3d3ff,\n lightpink: 0xffb6c1ff,\n lightsalmon: 0xffa07aff,\n lightseagreen: 0x20b2aaff,\n lightskyblue: 0x87cefaff,\n lightslategray: 0x778899ff,\n lightslategrey: 0x778899ff,\n lightsteelblue: 0xb0c4deff,\n lightyellow: 0xffffe0ff,\n lime: 0x00ff00ff,\n limegreen: 0x32cd32ff,\n linen: 0xfaf0e6ff,\n magenta: 0xff00ffff,\n maroon: 0x800000ff,\n mediumaquamarine: 0x66cdaaff,\n mediumblue: 0x0000cdff,\n mediumorchid: 0xba55d3ff,\n mediumpurple: 0x9370dbff,\n mediumseagreen: 0x3cb371ff,\n mediumslateblue: 0x7b68eeff,\n mediumspringgreen: 0x00fa9aff,\n mediumturquoise: 0x48d1ccff,\n mediumvioletred: 0xc71585ff,\n midnightblue: 0x191970ff,\n mintcream: 0xf5fffaff,\n mistyrose: 0xffe4e1ff,\n moccasin: 0xffe4b5ff,\n navajowhite: 0xffdeadff,\n navy: 0x000080ff,\n oldlace: 0xfdf5e6ff,\n olive: 0x808000ff,\n olivedrab: 0x6b8e23ff,\n orange: 0xffa500ff,\n orangered: 0xff4500ff,\n orchid: 0xda70d6ff,\n palegoldenrod: 0xeee8aaff,\n palegreen: 0x98fb98ff,\n paleturquoise: 0xafeeeeff,\n palevioletred: 0xdb7093ff,\n papayawhip: 0xffefd5ff,\n peachpuff: 0xffdab9ff,\n peru: 0xcd853fff,\n pink: 0xffc0cbff,\n plum: 0xdda0ddff,\n powderblue: 0xb0e0e6ff,\n purple: 0x800080ff,\n rebeccapurple: 0x663399ff,\n red: 0xff0000ff,\n rosybrown: 0xbc8f8fff,\n royalblue: 0x4169e1ff,\n saddlebrown: 0x8b4513ff,\n salmon: 0xfa8072ff,\n sandybrown: 0xf4a460ff,\n seagreen: 0x2e8b57ff,\n seashell: 0xfff5eeff,\n sienna: 0xa0522dff,\n silver: 0xc0c0c0ff,\n skyblue: 0x87ceebff,\n slateblue: 0x6a5acdff,\n slategray: 0x708090ff,\n slategrey: 0x708090ff,\n snow: 0xfffafaff,\n springgreen: 0x00ff7fff,\n steelblue: 0x4682b4ff,\n tan: 0xd2b48cff,\n teal: 0x008080ff,\n thistle: 0xd8bfd8ff,\n tomato: 0xff6347ff,\n turquoise: 0x40e0d0ff,\n violet: 0xee82eeff,\n wheat: 0xf5deb3ff,\n white: 0xffffffff,\n whitesmoke: 0xf5f5f5ff,\n yellow: 0xffff00ff,\n yellowgreen: 0x9acd32ff,\n};\n\nfunction rgba(colorInt) {\n var r = Math.round(((colorInt & 0xff000000) >>> 24));\n var g = Math.round(((colorInt & 0x00ff0000) >>> 16));\n var b = Math.round(((colorInt & 0x0000ff00) >>> 8));\n var a = ((colorInt & 0x000000ff) >>> 0) / 255;\n return {\n r: r,\n g: g,\n b: b,\n a: a,\n };\n};\n\nnormalizeColor.rgba = rgba;\n\nmodule.exports = normalizeColor;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar startNativeAnimationNextId = 1; // Important note: start() and stop() will only be called at most once.\n// Once an animation has been stopped or finished its course, it will\n// not be reused.\n\nvar Animation = /*#__PURE__*/function () {\n function Animation() {}\n\n var _proto = Animation.prototype;\n\n _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {};\n\n _proto.stop = function stop() {\n if (this.__nativeId) {\n NativeAnimatedHelper.API.stopAnimation(this.__nativeId);\n }\n };\n\n _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n // Subclasses that have corresponding animation implementation done in native\n // should override this method\n throw new Error('This animation type cannot be offloaded to native');\n } // Helper function for subclasses to make sure onEnd is only called once.\n ;\n\n _proto.__debouncedOnEnd = function __debouncedOnEnd(result) {\n var onEnd = this.__onEnd;\n this.__onEnd = null;\n onEnd && onEnd(result);\n };\n\n _proto.__startNativeAnimation = function __startNativeAnimation(animatedValue) {\n var startNativeAnimationWaitId = startNativeAnimationNextId + \":startAnimation\";\n startNativeAnimationNextId += 1;\n NativeAnimatedHelper.API.setWaitingForIdentifier(startNativeAnimationWaitId);\n\n try {\n animatedValue.__makeNative();\n\n this.__nativeId = NativeAnimatedHelper.generateNewAnimationId();\n NativeAnimatedHelper.API.startAnimatingNode(this.__nativeId, animatedValue.__getNativeTag(), this.__getNativeAnimationConfig(), this.__debouncedOnEnd.bind(this));\n } catch (e) {\n throw e;\n } finally {\n NativeAnimatedHelper.API.unsetWaitingForIdentifier(startNativeAnimationWaitId);\n }\n };\n\n return Animation;\n}();\n\nexport default Animation;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UnimplementedView from '../../modules/UnimplementedView';\nexport default UnimplementedView;","import * as React from 'react';\n\ntype Props = {\n children: React.ReactNode;\n};\n\nconst MULTIPLE_NAVIGATOR_ERROR = `Another navigator is already registered for this container. You likely have multiple navigators under a single \"NavigationContainer\" or \"Screen\". Make sure each navigator is under a separate \"Screen\" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.`;\n\nexport const SingleNavigatorContext = React.createContext<\n | {\n register(key: string): void;\n unregister(key: string): void;\n }\n | undefined\n>(undefined);\n\n/**\n * Component which ensures that there's only one navigator nested under it.\n */\nexport default function EnsureSingleNavigator({ children }: Props) {\n const navigatorKeyRef = React.useRef<string | undefined>();\n\n const value = React.useMemo(\n () => ({\n register(key: string) {\n const currentKey = navigatorKeyRef.current;\n\n if (currentKey !== undefined && key !== currentKey) {\n throw new Error(MULTIPLE_NAVIGATOR_ERROR);\n }\n\n navigatorKeyRef.current = key;\n },\n unregister(key: string) {\n const currentKey = navigatorKeyRef.current;\n\n if (key !== currentKey) {\n return;\n }\n\n navigatorKeyRef.current = undefined;\n },\n }),\n []\n );\n\n return (\n <SingleNavigatorContext.Provider value={value}>\n {children}\n </SingleNavigatorContext.Provider>\n );\n}\n","function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\nimport resolveShadowValue from './resolveShadowValue';\nvar defaultOffset = {\n height: 0,\n width: 0\n};\n\nfunction boxShadowReducer(resolvedStyle, style) {\n var boxShadow = style.boxShadow;\n var shadow = resolveShadowValue(style);\n\n if (shadow != null) {\n resolvedStyle.boxShadow = boxShadow ? boxShadow + \", \" + shadow : shadow;\n }\n}\n\nfunction textShadowReducer(resolvedStyle, style) {\n var textShadowColor = style.textShadowColor,\n textShadowOffset = style.textShadowOffset,\n textShadowRadius = style.textShadowRadius;\n\n var _ref = textShadowOffset || defaultOffset,\n height = _ref.height,\n width = _ref.width;\n\n var radius = textShadowRadius || 0;\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(radius);\n var color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');\n\n if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {\n resolvedStyle.textShadow = offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n}\n\nvar createCompileableStyle = function createCompileableStyle(styles) {\n var shadowColor = styles.shadowColor,\n shadowOffset = styles.shadowOffset,\n shadowOpacity = styles.shadowOpacity,\n shadowRadius = styles.shadowRadius,\n textShadowColor = styles.textShadowColor,\n textShadowOffset = styles.textShadowOffset,\n textShadowRadius = styles.textShadowRadius,\n nextStyles = _objectWithoutPropertiesLoose(styles, [\"shadowColor\", \"shadowOffset\", \"shadowOpacity\", \"shadowRadius\", \"textShadowColor\", \"textShadowOffset\", \"textShadowRadius\"]);\n\n if (shadowColor != null || shadowOffset != null || shadowOpacity != null || shadowRadius != null) {\n boxShadowReducer(nextStyles, styles);\n }\n\n if (textShadowColor != null || textShadowOffset != null || textShadowRadius != null) {\n textShadowReducer(nextStyles, styles);\n }\n\n return nextStyles;\n};\n\nexport default createCompileableStyle;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar slice = Array.prototype.slice;\n/**\n * Order-based insertion of CSS.\n *\n * Each rule is associated with a numerically defined group.\n * Groups are ordered within the style sheet according to their number, with the\n * lowest first.\n *\n * Groups are implemented using marker rules. The selector of the first rule of\n * each group is used only to encode the group number for hydration. An\n * alternative implementation could rely on CSSMediaRule, allowing groups to be\n * treated as a sub-sheet, but the Edge implementation of CSSMediaRule is\n * broken.\n * https://developer.mozilla.org/en-US/docs/Web/API/CSSMediaRule\n * https://gist.github.com/necolas/aa0c37846ad6bd3b05b727b959e82674\n */\n\nexport default function createOrderedCSSStyleSheet(sheet) {\n var groups = {};\n var selectors = {};\n /**\n * Hydrate approximate record from any existing rules in the sheet.\n */\n\n if (sheet != null) {\n var group;\n slice.call(sheet.cssRules).forEach(function (cssRule, i) {\n var cssText = cssRule.cssText; // Create record of existing selectors and rules\n\n if (cssText.indexOf('stylesheet-group') > -1) {\n group = decodeGroupRule(cssRule);\n groups[group] = {\n start: i,\n rules: [cssText]\n };\n } else {\n var selectorText = getSelectorText(cssText);\n\n if (selectorText != null) {\n selectors[selectorText] = true;\n groups[group].rules.push(cssText);\n }\n }\n });\n }\n\n function sheetInsert(sheet, group, text) {\n var orderedGroups = getOrderedGroups(groups);\n var groupIndex = orderedGroups.indexOf(group);\n var nextGroupIndex = groupIndex + 1;\n var nextGroup = orderedGroups[nextGroupIndex]; // Insert rule before the next group, or at the end of the stylesheet\n\n var position = nextGroup != null && groups[nextGroup].start != null ? groups[nextGroup].start : sheet.cssRules.length;\n var isInserted = insertRuleAt(sheet, text, position);\n\n if (isInserted) {\n // Set the starting index of the new group\n if (groups[group].start == null) {\n groups[group].start = position;\n } // Increment the starting index of all subsequent groups\n\n\n for (var i = nextGroupIndex; i < orderedGroups.length; i += 1) {\n var groupNumber = orderedGroups[i];\n var previousStart = groups[groupNumber].start || 0;\n groups[groupNumber].start = previousStart + 1;\n }\n }\n\n return isInserted;\n }\n\n var OrderedCSSStyleSheet = {\n /**\n * The textContent of the style sheet.\n */\n getTextContent: function getTextContent() {\n return getOrderedGroups(groups).map(function (group) {\n var rules = groups[group].rules;\n return rules.join('\\n');\n }).join('\\n');\n },\n\n /**\n * Insert a rule into the style sheet\n */\n insert: function insert(cssText, groupValue) {\n var group = Number(groupValue); // Create a new group.\n\n if (groups[group] == null) {\n var markerRule = encodeGroupRule(group); // Create the internal record.\n\n groups[group] = {\n start: null,\n rules: [markerRule]\n }; // Update CSSOM.\n\n if (sheet != null) {\n sheetInsert(sheet, group, markerRule);\n }\n } // selectorText is more reliable than cssText for insertion checks. The\n // browser excludes vendor-prefixed properties and rewrites certain values\n // making cssText more likely to be different from what was inserted.\n\n\n var selectorText = getSelectorText(cssText);\n\n if (selectorText != null && selectors[selectorText] == null) {\n // Update the internal records.\n selectors[selectorText] = true;\n groups[group].rules.push(cssText); // Update CSSOM.\n\n if (sheet != null) {\n var isInserted = sheetInsert(sheet, group, cssText);\n\n if (!isInserted) {\n // Revert internal record change if a rule was rejected (e.g.,\n // unrecognized pseudo-selector)\n groups[group].rules.pop();\n }\n }\n }\n }\n };\n return OrderedCSSStyleSheet;\n}\n/**\n * Helper functions\n */\n\nfunction encodeGroupRule(group) {\n return \"[stylesheet-group=\\\"\" + group + \"\\\"]{}\";\n}\n\nfunction decodeGroupRule(cssRule) {\n return Number(cssRule.selectorText.split(/[\"']/)[1]);\n}\n\nfunction getOrderedGroups(obj) {\n return Object.keys(obj).map(Number).sort(function (a, b) {\n return a > b ? 1 : -1;\n });\n}\n\nvar pattern = /\\s*([,])\\s*/g;\n\nfunction getSelectorText(cssText) {\n var selector = cssText.split('{')[0].trim();\n return selector !== '' ? selector.replace(pattern, '$1') : null;\n}\n\nfunction insertRuleAt(root, cssText, position) {\n try {\n // $FlowFixMe: Flow is missing CSSOM types needed to type 'root'.\n root.insertRule(cssText, position);\n return true;\n } catch (e) {\n // JSDOM doesn't support `CSSSMediaRule#insertRule`.\n // Also ignore errors that occur from attempting to insert vendor-prefixed selectors.\n return false;\n }\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction flattenArray(array) {\n function flattenDown(array, result) {\n for (var i = 0; i < array.length; i++) {\n var value = array[i];\n\n if (Array.isArray(value)) {\n flattenDown(value, result);\n } else if (value != null && value !== false) {\n result.push(value);\n }\n }\n\n return result;\n }\n\n return flattenDown(array, []);\n}\n\nexport default flattenArray;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport I18nManager from '../I18nManager';\nimport multiplyStyleLengthValue from '../../modules/multiplyStyleLengthValue';\nvar emptyObject = {};\nvar borderTopLeftRadius = 'borderTopLeftRadius';\nvar borderTopRightRadius = 'borderTopRightRadius';\nvar borderBottomLeftRadius = 'borderBottomLeftRadius';\nvar borderBottomRightRadius = 'borderBottomRightRadius';\nvar borderLeftColor = 'borderLeftColor';\nvar borderLeftStyle = 'borderLeftStyle';\nvar borderLeftWidth = 'borderLeftWidth';\nvar borderRightColor = 'borderRightColor';\nvar borderRightStyle = 'borderRightStyle';\nvar borderRightWidth = 'borderRightWidth';\nvar right = 'right';\nvar marginLeft = 'marginLeft';\nvar marginRight = 'marginRight';\nvar paddingLeft = 'paddingLeft';\nvar paddingRight = 'paddingRight';\nvar left = 'left'; // Map of LTR property names to their BiDi equivalent.\n\nvar PROPERTIES_FLIP = {\n borderTopLeftRadius: borderTopRightRadius,\n borderTopRightRadius: borderTopLeftRadius,\n borderBottomLeftRadius: borderBottomRightRadius,\n borderBottomRightRadius: borderBottomLeftRadius,\n borderLeftColor: borderRightColor,\n borderLeftStyle: borderRightStyle,\n borderLeftWidth: borderRightWidth,\n borderRightColor: borderLeftColor,\n borderRightStyle: borderLeftStyle,\n borderRightWidth: borderLeftWidth,\n left: right,\n marginLeft: marginRight,\n marginRight: marginLeft,\n paddingLeft: paddingRight,\n paddingRight: paddingLeft,\n right: left\n}; // Map of I18N property names to their LTR equivalent.\n\nvar PROPERTIES_I18N = {\n borderTopStartRadius: borderTopLeftRadius,\n borderTopEndRadius: borderTopRightRadius,\n borderBottomStartRadius: borderBottomLeftRadius,\n borderBottomEndRadius: borderBottomRightRadius,\n borderStartColor: borderLeftColor,\n borderStartStyle: borderLeftStyle,\n borderStartWidth: borderLeftWidth,\n borderEndColor: borderRightColor,\n borderEndStyle: borderRightStyle,\n borderEndWidth: borderRightWidth,\n end: right,\n marginStart: marginLeft,\n marginEnd: marginRight,\n paddingStart: paddingLeft,\n paddingEnd: paddingRight,\n start: left\n};\nvar PROPERTIES_VALUE = {\n clear: true,\n float: true,\n textAlign: true\n}; // Invert the sign of a numeric-like value\n\nvar additiveInverse = function additiveInverse(value) {\n return multiplyStyleLengthValue(value, -1);\n};\n\nvar i18nStyle = function i18nStyle(originalStyle) {\n var _I18nManager$getConst = I18nManager.getConstants(),\n doLeftAndRightSwapInRTL = _I18nManager$getConst.doLeftAndRightSwapInRTL,\n isRTL = _I18nManager$getConst.isRTL;\n\n var style = originalStyle || emptyObject;\n var frozenProps = {};\n var nextStyle = {};\n\n for (var originalProp in style) {\n if (!Object.prototype.hasOwnProperty.call(style, originalProp)) {\n continue;\n }\n\n var originalValue = style[originalProp];\n var prop = originalProp;\n var value = originalValue; // BiDi flip properties\n\n if (PROPERTIES_I18N.hasOwnProperty(originalProp)) {\n // convert start/end\n var convertedProp = PROPERTIES_I18N[originalProp];\n prop = isRTL ? PROPERTIES_FLIP[convertedProp] : convertedProp;\n } else if (isRTL && doLeftAndRightSwapInRTL && PROPERTIES_FLIP[originalProp]) {\n prop = PROPERTIES_FLIP[originalProp];\n } // BiDi flip values\n\n\n if (PROPERTIES_VALUE.hasOwnProperty(originalProp)) {\n if (originalValue === 'start') {\n value = isRTL ? 'right' : 'left';\n } else if (originalValue === 'end') {\n value = isRTL ? 'left' : 'right';\n } else if (isRTL && doLeftAndRightSwapInRTL) {\n if (originalValue === 'left') {\n value = 'right';\n } else if (originalValue === 'right') {\n value = 'left';\n }\n }\n } // BiDi flip transitionProperty value\n\n\n if (prop === 'transitionProperty') {\n // BiDi flip properties\n if (PROPERTIES_I18N.hasOwnProperty(value)) {\n // convert start/end\n var convertedValue = PROPERTIES_I18N[originalValue];\n value = isRTL ? PROPERTIES_FLIP[convertedValue] : convertedValue;\n } else if (isRTL && doLeftAndRightSwapInRTL) {\n var flippedValue = PROPERTIES_FLIP[originalValue];\n\n if (flippedValue != null) {\n value = flippedValue;\n }\n }\n } // Create finalized style\n\n\n if (isRTL && prop === 'textShadowOffset') {\n var invertedValue = additiveInverse(value.width);\n value.width = invertedValue;\n nextStyle[prop] = value;\n } else if (!frozenProps[prop]) {\n nextStyle[prop] = value;\n }\n\n if (PROPERTIES_I18N[originalProp]) {\n frozenProps[prop] = true;\n }\n } // $FlowIgnore\n\n\n return nextStyle;\n};\n\nexport default i18nStyle;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport { MONOSPACE_FONT_STACK, SYSTEM_FONT_STACK, STYLE_SHORT_FORM_EXPANSIONS } from './constants';\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\n/**\n * The browser implements the CSS cascade, where the order of properties is a\n * factor in determining which styles to paint. React Native is different. It\n * gives giving precedence to the more specific style property. For example,\n * the value of `paddingTop` takes precedence over that of `padding`.\n *\n * This module creates mutally exclusive style declarations by expanding all of\n * React Native's supported shortform properties (e.g. `padding`) to their\n * longfrom equivalents.\n */\n\nvar emptyObject = {};\nvar supportsCSS3TextDecoration = !canUseDOM || window.CSS != null && window.CSS.supports != null && (window.CSS.supports('text-decoration-line', 'none') || window.CSS.supports('-webkit-text-decoration-line', 'none'));\n/**\n * Transform\n */\n// { scale: 2 } => 'scale(2)'\n// { translateX: 20 } => 'translateX(20px)'\n// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'\n\nvar mapTransform = function mapTransform(transform) {\n var type = Object.keys(transform)[0];\n var value = transform[type];\n\n if (type === 'matrix' || type === 'matrix3d') {\n return type + \"(\" + value.join(',') + \")\";\n } else {\n var normalizedValue = normalizeValueWithProperty(value, type);\n return type + \"(\" + normalizedValue + \")\";\n }\n};\n\nvar resolveTransform = function resolveTransform(resolvedStyle, style) {\n var transform = style.transform;\n\n if (Array.isArray(style.transform)) {\n transform = style.transform.map(mapTransform).join(' ');\n }\n\n resolvedStyle.transform = transform;\n};\n/**\n * Reducer\n */\n\n\nvar createReactDOMStyle = function createReactDOMStyle(style) {\n if (!style) {\n return emptyObject;\n }\n\n var resolvedStyle = {};\n Object.keys(style).sort().forEach(function (prop) {\n var value = normalizeValueWithProperty(style[prop], prop); // Ignore everything else with a null value\n\n if (value == null) {\n return;\n }\n\n switch (prop) {\n // Ignore some React Native styles\n case 'elevation':\n case 'overlayColor':\n case 'resizeMode':\n case 'tintColor':\n {\n break;\n }\n\n case 'aspectRatio':\n {\n resolvedStyle[prop] = value.toString();\n break;\n }\n // TODO: remove once this issue is fixed\n // https://github.com/rofrischmann/inline-style-prefixer/issues/159\n\n case 'backgroundClip':\n {\n if (value === 'text') {\n resolvedStyle.backgroundClip = value;\n resolvedStyle.WebkitBackgroundClip = value;\n }\n\n break;\n }\n // The 'flex' property value in React Native must be a positive integer,\n // 0, or -1.\n\n case 'flex':\n {\n if (value === -1) {\n resolvedStyle.flexGrow = 0;\n resolvedStyle.flexShrink = 1;\n resolvedStyle.flexBasis = 'auto';\n } else {\n resolvedStyle.flex = value;\n }\n\n break;\n }\n\n case 'font':\n {\n resolvedStyle[prop] = value.replace('System', SYSTEM_FONT_STACK);\n break;\n }\n\n case 'fontFamily':\n {\n if (value.indexOf('System') > -1) {\n var stack = value.split(/,\\s*/);\n stack[stack.indexOf('System')] = SYSTEM_FONT_STACK;\n resolvedStyle[prop] = stack.join(',');\n } else if (value === 'monospace') {\n resolvedStyle[prop] = MONOSPACE_FONT_STACK;\n } else {\n resolvedStyle[prop] = value;\n }\n\n break;\n }\n\n case 'fontVariant':\n {\n if (Array.isArray(value) && value.length > 0) {\n resolvedStyle.fontVariant = value.join(' ');\n }\n\n break;\n }\n\n case 'textAlignVertical':\n {\n resolvedStyle.verticalAlign = value === 'center' ? 'middle' : value;\n break;\n }\n\n case 'textDecorationLine':\n {\n // use 'text-decoration' for browsers that only support CSS2\n // text-decoration (e.g., IE, Edge)\n if (!supportsCSS3TextDecoration) {\n resolvedStyle.textDecoration = value;\n } else {\n resolvedStyle.textDecorationLine = value;\n }\n\n break;\n }\n\n case 'transform':\n case 'transformMatrix':\n {\n resolveTransform(resolvedStyle, style);\n break;\n }\n\n case 'writingDirection':\n {\n resolvedStyle.direction = value;\n break;\n }\n\n default:\n {\n var longFormProperties = STYLE_SHORT_FORM_EXPANSIONS[prop];\n\n if (longFormProperties) {\n longFormProperties.forEach(function (longForm, i) {\n // The value of any longform property in the original styles takes\n // precedence over the shortform's value.\n if (typeof style[longForm] === 'undefined') {\n resolvedStyle[longForm] = value;\n }\n });\n } else {\n resolvedStyle[prop] = Array.isArray(value) ? value.join(',') : value;\n }\n }\n }\n });\n return resolvedStyle;\n};\n\nexport default createReactDOMStyle;","/* eslint-disable */\n\n/**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:[email protected]\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:[email protected]\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n *\n * \n */\nfunction murmurhash2_32_gc(str, seed) {\n var l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n k ^= k >>> 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n }\n\n h ^= h >>> 13;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h ^= h >>> 15;\n return h >>> 0;\n}\n\nvar hash = function hash(str) {\n return murmurhash2_32_gc(str, 1).toString(36);\n};\n\nexport default hash;","import backgroundClip from 'inline-style-prefixer/lib/plugins/backgroundClip';\nimport crossFade from 'inline-style-prefixer/lib/plugins/crossFade';\nimport cursor from 'inline-style-prefixer/lib/plugins/cursor';\nimport filter from 'inline-style-prefixer/lib/plugins/filter';\nimport flex from 'inline-style-prefixer/lib/plugins/flex';\nimport flexboxIE from 'inline-style-prefixer/lib/plugins/flexboxIE';\nimport flexboxOld from 'inline-style-prefixer/lib/plugins/flexboxOld';\nimport gradient from 'inline-style-prefixer/lib/plugins/gradient';\nimport grid from 'inline-style-prefixer/lib/plugins/grid';\nimport imageSet from 'inline-style-prefixer/lib/plugins/imageSet';\nimport logical from 'inline-style-prefixer/lib/plugins/logical';\nimport position from 'inline-style-prefixer/lib/plugins/position';\nimport sizing from 'inline-style-prefixer/lib/plugins/sizing';\nimport transition from 'inline-style-prefixer/lib/plugins/transition';\nvar w = ['Webkit'];\nvar m = ['Moz'];\nvar ms = ['ms'];\nvar wm = ['Webkit', 'Moz'];\nvar wms = ['Webkit', 'ms'];\nvar wmms = ['Webkit', 'Moz', 'ms'];\nexport default {\n plugins: [backgroundClip, crossFade, cursor, filter, flex, flexboxIE, flexboxOld, gradient, grid, imageSet, logical, position, sizing, transition],\n prefixMap: {\n animation: w,\n animationDelay: w,\n animationDirection: w,\n animationFillMode: w,\n animationDuration: w,\n animationIterationCount: w,\n animationName: w,\n animationPlayState: w,\n animationTimingFunction: w,\n appearance: wm,\n userSelect: wmms,\n textEmphasisPosition: w,\n textEmphasis: w,\n textEmphasisStyle: w,\n textEmphasisColor: w,\n boxDecorationBreak: w,\n clipPath: w,\n maskImage: w,\n maskMode: w,\n maskRepeat: w,\n maskPosition: w,\n maskClip: w,\n maskOrigin: w,\n maskSize: w,\n maskComposite: w,\n mask: w,\n maskBorderSource: w,\n maskBorderMode: w,\n maskBorderSlice: w,\n maskBorderWidth: w,\n maskBorderOutset: w,\n maskBorderRepeat: w,\n maskBorder: w,\n maskType: w,\n textDecorationStyle: w,\n textDecorationSkip: w,\n textDecorationLine: w,\n textDecorationColor: w,\n filter: w,\n fontFeatureSettings: w,\n breakAfter: wmms,\n breakBefore: wmms,\n breakInside: wmms,\n columnCount: wm,\n columnFill: wm,\n columnGap: wm,\n columnRule: wm,\n columnRuleColor: wm,\n columnRuleStyle: wm,\n columnRuleWidth: wm,\n columns: wm,\n columnSpan: wm,\n columnWidth: wm,\n writingMode: wms,\n flex: wms,\n flexBasis: w,\n flexDirection: wms,\n flexGrow: w,\n flexFlow: wms,\n flexShrink: w,\n flexWrap: wms,\n alignContent: w,\n alignItems: w,\n alignSelf: w,\n justifyContent: w,\n order: w,\n transform: w,\n transformOrigin: w,\n transformOriginX: w,\n transformOriginY: w,\n backfaceVisibility: w,\n perspective: w,\n perspectiveOrigin: w,\n transformStyle: w,\n transformOriginZ: w,\n backdropFilter: w,\n fontKerning: w,\n scrollSnapType: wms,\n scrollSnapPointsX: wms,\n scrollSnapPointsY: wms,\n scrollSnapDestination: wms,\n scrollSnapCoordinate: wms,\n shapeImageThreshold: w,\n shapeImageMargin: w,\n shapeImageOutside: w,\n hyphens: wmms,\n flowInto: wms,\n flowFrom: wms,\n regionFragment: wms,\n textOrientation: w,\n textAlignLast: m,\n tabSize: m,\n wrapFlow: ms,\n wrapThrough: ms,\n wrapMargin: ms,\n touchAction: ms,\n textSizeAdjust: ['ms', 'Webkit'],\n borderImage: w,\n borderImageOutset: w,\n borderImageRepeat: w,\n borderImageSlice: w,\n borderImageSource: w,\n borderImageWidth: w,\n transitionDelay: w,\n transitionDuration: w,\n transitionProperty: w,\n transitionTimingFunction: w\n }\n};","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createPrefixer from 'inline-style-prefixer/lib/createPrefixer';\nimport staticData from './static';\nvar prefixAll = createPrefixer(staticData);\nexport var prefixInlineStyles = function prefixInlineStyles(style) {\n var prefixedStyles = prefixAll(style); // React@15 removed undocumented support for fallback values in\n // inline-styles. Revert array values to the standard CSS value\n\n Object.keys(prefixedStyles).forEach(function (prop) {\n var value = prefixedStyles[prop];\n\n if (Array.isArray(value)) {\n prefixedStyles[prop] = value[value.length - 1];\n }\n });\n return prefixedStyles;\n};\nexport default prefixAll;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createReactDOMStyle from './createReactDOMStyle';\nimport hash from '../../vendor/hash';\nimport hyphenateStyleName from 'hyphenate-style-name';\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\nimport prefixStyles, { prefixInlineStyles } from '../../modules/prefixStyles';\nvar cache = {\n get: function get(property, value) {\n if (cache[property] != null && cache[property].hasOwnProperty(value) && cache[property][value] != null) {\n return cache[property][value];\n }\n },\n set: function set(property, value, object) {\n if (cache[property] == null) {\n cache[property] = {};\n }\n\n return cache[property][value] = object;\n }\n};\n/**\n * Compile style to atomic CSS rules.\n */\n\nexport function atomic(style) {\n return Object.keys(style).sort().reduce(function (acc, property) {\n var value = style[property];\n\n if (value != null) {\n var valueString = stringifyValueWithProperty(value, property);\n var cachedResult = cache.get(property, valueString);\n\n if (cachedResult != null) {\n var identifier = cachedResult.identifier;\n acc[identifier] = cachedResult;\n } else {\n var _identifier = createIdentifier('r', property, value);\n\n var rules = createAtomicRules(_identifier, property, value);\n\n var _cachedResult = cache.set(property, valueString, {\n property: property,\n value: stringifyValueWithProperty(value, property),\n identifier: _identifier,\n rules: rules\n });\n\n acc[_identifier] = _cachedResult;\n }\n }\n\n return acc;\n }, {});\n}\n/**\n * Compile simple style object to classic CSS rules.\n * No support for 'placeholderTextColor', 'scrollbarWidth', or 'pointerEvents'.\n */\n\nexport function classic(style, name) {\n var _ref;\n\n var identifier = createIdentifier('css', name, style);\n\n var animationKeyframes = style.animationKeyframes,\n rest = _objectWithoutPropertiesLoose(style, [\"animationKeyframes\"]);\n\n var rules = [];\n var selector = \".\" + identifier;\n var animationName;\n\n if (animationKeyframes != null) {\n var _processKeyframesValu = processKeyframesValue(animationKeyframes),\n animationNames = _processKeyframesValu.animationNames,\n keyframesRules = _processKeyframesValu.rules;\n\n animationName = animationNames.join(',');\n rules.push.apply(rules, keyframesRules);\n }\n\n var block = createDeclarationBlock(_objectSpread(_objectSpread({}, rest), {}, {\n animationName: animationName\n }));\n rules.push(\"\" + selector + block);\n return _ref = {}, _ref[identifier] = {\n identifier: identifier,\n rules: rules\n }, _ref;\n}\n/**\n * Compile simple style object to inline DOM styles.\n * No support for 'animationKeyframes', 'placeholderTextColor', 'scrollbarWidth', or 'pointerEvents'.\n */\n\nexport function inline(style) {\n return prefixInlineStyles(createReactDOMStyle(style));\n}\n/**\n * Create a value string that normalizes different input values with a common\n * output.\n */\n\nexport function stringifyValueWithProperty(value, property) {\n // e.g., 0 => '0px', 'black' => 'rgba(0,0,0,1)'\n var normalizedValue = normalizeValueWithProperty(value, property);\n return typeof normalizedValue !== 'string' ? JSON.stringify(normalizedValue || '') : normalizedValue;\n}\n/**\n * Create the Atomic CSS rules needed for a given StyleSheet rule.\n * Translates StyleSheet declarations to CSS.\n */\n\nfunction createAtomicRules(identifier, property, value) {\n var rules = [];\n var selector = \".\" + identifier; // Handle non-standard properties and object values that require multiple\n // CSS rules to be created.\n\n switch (property) {\n case 'animationKeyframes':\n {\n var _processKeyframesValu2 = processKeyframesValue(value),\n animationNames = _processKeyframesValu2.animationNames,\n keyframesRules = _processKeyframesValu2.rules;\n\n var block = createDeclarationBlock({\n animationName: animationNames.join(',')\n });\n rules.push.apply(rules, [\"\" + selector + block].concat(keyframesRules));\n break;\n }\n // Equivalent to using '::placeholder'\n\n case 'placeholderTextColor':\n {\n var _block = createDeclarationBlock({\n color: value,\n opacity: 1\n });\n\n rules.push(selector + \"::-webkit-input-placeholder\" + _block, selector + \"::-moz-placeholder\" + _block, selector + \":-ms-input-placeholder\" + _block, selector + \"::placeholder\" + _block);\n break;\n }\n // Polyfill for additional 'pointer-events' values\n // See d13f78622b233a0afc0c7a200c0a0792c8ca9e58\n\n case 'pointerEvents':\n {\n var finalValue = value;\n\n if (value === 'auto' || value === 'box-only') {\n finalValue = 'auto!important';\n\n if (value === 'box-only') {\n var _block3 = createDeclarationBlock({\n pointerEvents: 'none'\n });\n\n rules.push(selector + \">*\" + _block3);\n }\n } else if (value === 'none' || value === 'box-none') {\n finalValue = 'none!important';\n\n if (value === 'box-none') {\n var _block4 = createDeclarationBlock({\n pointerEvents: 'auto'\n });\n\n rules.push(selector + \">*\" + _block4);\n }\n }\n\n var _block2 = createDeclarationBlock({\n pointerEvents: finalValue\n });\n\n rules.push(\"\" + selector + _block2);\n break;\n }\n // Polyfill for draft spec\n // https://drafts.csswg.org/css-scrollbars-1/\n\n case 'scrollbarWidth':\n {\n if (value === 'none') {\n rules.push(selector + \"::-webkit-scrollbar{display:none}\");\n }\n\n var _block5 = createDeclarationBlock({\n scrollbarWidth: value\n });\n\n rules.push(\"\" + selector + _block5);\n break;\n }\n\n default:\n {\n var _createDeclarationBlo;\n\n var _block6 = createDeclarationBlock((_createDeclarationBlo = {}, _createDeclarationBlo[property] = value, _createDeclarationBlo));\n\n rules.push(\"\" + selector + _block6);\n break;\n }\n }\n\n return rules;\n}\n/**\n * Creates a CSS declaration block from a StyleSheet object.\n */\n\n\nfunction createDeclarationBlock(style) {\n var domStyle = prefixStyles(createReactDOMStyle(style));\n var declarationsString = Object.keys(domStyle).map(function (property) {\n var value = domStyle[property];\n var prop = hyphenateStyleName(property); // The prefixer may return an array of values:\n // { display: [ '-webkit-flex', 'flex' ] }\n // to represent \"fallback\" declarations\n // { display: -webkit-flex; display: flex; }\n\n if (Array.isArray(value)) {\n return value.map(function (v) {\n return prop + \":\" + v;\n }).join(';');\n } else {\n return prop + \":\" + value;\n }\n }) // Once properties are hyphenated, this will put the vendor\n // prefixed and short-form properties first in the list.\n .sort().join(';');\n return \"{\" + declarationsString + \";}\";\n}\n/**\n * An identifier is associated with a unique set of styles.\n */\n\n\nfunction createIdentifier(prefix, name, value) {\n var hashedString = hash(name + stringifyValueWithProperty(value, name));\n return process.env.NODE_ENV !== 'production' ? prefix + \"-\" + name + \"-\" + hashedString : prefix + \"-\" + hashedString;\n}\n/**\n * Create individual CSS keyframes rules.\n */\n\n\nfunction createKeyframes(keyframes) {\n var prefixes = ['-webkit-', ''];\n var identifier = createIdentifier('r', 'animation', keyframes);\n var steps = '{' + Object.keys(keyframes).map(function (stepName) {\n var rule = keyframes[stepName];\n var block = createDeclarationBlock(rule);\n return \"\" + stepName + block;\n }).join('') + '}';\n var rules = prefixes.map(function (prefix) {\n return \"@\" + prefix + \"keyframes \" + identifier + steps;\n });\n return {\n identifier: identifier,\n rules: rules\n };\n}\n/**\n * Create CSS keyframes rules and names from a StyleSheet keyframes object.\n */\n\n\nfunction processKeyframesValue(keyframesValue) {\n if (typeof keyframesValue === 'number') {\n throw new Error(\"Invalid CSS keyframes type: \" + typeof keyframesValue);\n }\n\n var animationNames = [];\n var rules = [];\n var value = Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue];\n value.forEach(function (keyframes) {\n if (typeof keyframes === 'string') {\n // Support external animation libraries (identifiers only)\n animationNames.push(keyframes);\n } else {\n // Create rules for each of the keyframes\n var _createKeyframes = createKeyframes(keyframes),\n identifier = _createKeyframes.identifier,\n keyframesRules = _createKeyframes.rules;\n\n animationNames.push(identifier);\n rules.push.apply(rules, keyframesRules);\n }\n });\n return {\n animationNames: animationNames,\n rules: rules\n };\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar resets = [// minimal top-level reset\n'html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}', 'body{margin:0;}', // minimal form pseudo-element reset\n'button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}', 'input::-webkit-inner-spin-button,input::-webkit-outer-spin-button,' + 'input::-webkit-search-cancel-button,input::-webkit-search-decoration,' + 'input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}'];\nexport default resets;","/**\n * Adapts focus styles based on the user's active input modality (i.e., how\n * they are interacting with the UI right now).\n *\n * Focus styles are only relevant when using the keyboard to interact with the\n * page. If we only show the focus ring when relevant, we can avoid user\n * confusion without compromising accessibility.\n *\n * The script uses two heuristics to determine whether the keyboard is being used:\n *\n * 1. a keydown event occurred immediately before a focus event;\n * 2. a focus event happened on an element which requires keyboard interaction (e.g., a text field);\n *\n * This software or document includes material copied from or derived from https://github.com/WICG/focus-visible.\n * Copyright © 2018 W3C® (MIT, ERCIM, Keio, Beihang).\n * W3C Software Notice and License: https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nvar focusVisibleAttributeName = 'data-focusvisible-polyfill';\nvar rule = \":focus:not([\" + focusVisibleAttributeName + \"]){outline: none;}\";\n\nvar modality = function modality(insertRule) {\n insertRule(rule);\n\n if (!canUseDOM) {\n return;\n }\n\n var hadKeyboardEvent = true;\n var hadFocusVisibleRecently = false;\n var hadFocusVisibleRecentlyTimeout = null;\n var inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n };\n /**\n * Helper function for legacy browsers and iframes which sometimes focus\n * elements like document, body, and non-interactive SVG.\n */\n\n function isValidFocusTarget(el) {\n if (el && el !== document && el.nodeName !== 'HTML' && el.nodeName !== 'BODY' && 'classList' in el && 'contains' in el.classList) {\n return true;\n }\n\n return false;\n }\n /**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` attribute being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n */\n\n\n function focusTriggersKeyboardModality(el) {\n var type = el.type;\n var tagName = el.tagName;\n var isReadOnly = el.readOnly;\n\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !isReadOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !isReadOnly) {\n return true;\n }\n\n if (el.isContentEditable) {\n return true;\n }\n\n return false;\n }\n /**\n * Add the `focus-visible` attribute to the given element if it was not added by\n * the author.\n */\n\n\n function addFocusVisibleAttribute(el) {\n if (el.hasAttribute(focusVisibleAttributeName)) {\n return;\n }\n\n el.setAttribute(focusVisibleAttributeName, true);\n }\n /**\n * Remove the `focus-visible` attribute from the given element if it was not\n * originally added by the author.\n */\n\n\n function removeFocusVisibleAttribute(el) {\n el.removeAttribute(focusVisibleAttributeName);\n }\n /**\n * Remove the `focus-visible` attribute from all elements in the document.\n */\n\n\n function removeAllFocusVisibleAttributes() {\n var list = document.querySelectorAll(\"[\" + focusVisibleAttributeName + \"]\");\n\n for (var i = 0; i < list.length; i += 1) {\n removeFocusVisibleAttribute(list[i]);\n }\n }\n /**\n * Treat `keydown` as a signal that the user is in keyboard modality.\n * Apply `focus-visible` to any current active element and keep track\n * of our keyboard modality state with `hadKeyboardEvent`.\n */\n\n\n function onKeyDown(e) {\n if (e.key !== 'Tab' && (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)) {\n return;\n }\n\n if (isValidFocusTarget(document.activeElement)) {\n addFocusVisibleAttribute(document.activeElement);\n }\n\n hadKeyboardEvent = true;\n }\n /**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n * It also avoids the situation where a user presses on an element within a\n * previously keyboard-focused element (i.e., `e.target` is not the previously\n * focused element, but one of its descendants) and we need to remove the\n * focus ring because a `blur` event doesn't occur.\n */\n\n\n function onPointerDown(e) {\n if (hadKeyboardEvent === true) {\n removeAllFocusVisibleAttributes();\n }\n\n hadKeyboardEvent = false;\n }\n /**\n * On `focus`, add the `focus-visible` attribute to the target if:\n * - the target received focus as a result of keyboard navigation, or\n * - the event target is an element that will likely require interaction\n * via the keyboard (e.g. a text box)\n */\n\n\n function onFocus(e) {\n // Prevent IE from focusing the document or HTML element.\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {\n addFocusVisibleAttribute(e.target);\n }\n }\n /**\n * On `blur`, remove the `focus-visible` attribute from the target.\n */\n\n\n function onBlur(e) {\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (e.target.hasAttribute(focusVisibleAttributeName)) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function () {\n hadFocusVisibleRecently = false;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n }, 100);\n removeFocusVisibleAttribute(e.target);\n }\n }\n /**\n * If the user changes tabs, keep track of whether or not the previously\n * focused element had the focus-visible attribute.\n */\n\n\n function onVisibilityChange(e) {\n if (document.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the attribute when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n\n addInitialPointerMoveListeners();\n }\n }\n /**\n * Add a group of listeners to detect usage of any pointing devices.\n * These listeners will be added when the polyfill first loads, and anytime\n * the window is blurred, so that they are active when the window regains\n * focus.\n */\n\n\n function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }\n\n function removeInitialPointerMoveListeners() {\n document.removeEventListener('mousemove', onInitialPointerMove);\n document.removeEventListener('mousedown', onInitialPointerMove);\n document.removeEventListener('mouseup', onInitialPointerMove);\n document.removeEventListener('pointermove', onInitialPointerMove);\n document.removeEventListener('pointerdown', onInitialPointerMove);\n document.removeEventListener('pointerup', onInitialPointerMove);\n document.removeEventListener('touchmove', onInitialPointerMove);\n document.removeEventListener('touchstart', onInitialPointerMove);\n document.removeEventListener('touchend', onInitialPointerMove);\n }\n /**\n * When the polfyill first loads, assume the user is in keyboard modality.\n * If any event is received from a pointing device (e.g. mouse, pointer,\n * touch), turn off keyboard modality.\n * This accounts for situations where focus enters the page from the URL bar.\n */\n\n\n function onInitialPointerMove(e) {\n // Work around a Safari quirk that fires a mousemove on <html> whenever the\n // window blurs, even if you're tabbing out of the page. ¯\\_(ツ)_/¯\n if (e.target.nodeName === 'HTML') {\n return;\n }\n\n hadKeyboardEvent = false;\n removeInitialPointerMoveListeners();\n }\n\n document.addEventListener('keydown', onKeyDown, true);\n document.addEventListener('mousedown', onPointerDown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('touchstart', onPointerDown, true);\n document.addEventListener('focus', onFocus, true);\n document.addEventListener('blur', onBlur, true);\n document.addEventListener('visibilitychange', onVisibilityChange, true);\n addInitialPointerMoveListeners();\n};\n\nexport default modality;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n/**\n * WARNING: changes to this file in particular can cause significant changes to\n * the results of render performance benchmarks.\n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport createCSSStyleSheet from './createCSSStyleSheet';\nimport createCompileableStyle from './createCompileableStyle';\nimport createOrderedCSSStyleSheet from './createOrderedCSSStyleSheet';\nimport flattenArray from '../../modules/flattenArray';\nimport flattenStyle from './flattenStyle';\nimport I18nManager from '../I18nManager';\nimport i18nStyle from './i18nStyle';\nimport { atomic, classic, inline, stringifyValueWithProperty } from './compile';\nimport initialRules from './initialRules';\nimport modality from './modality';\nimport { STYLE_ELEMENT_ID, STYLE_GROUPS } from './constants';\nexport default function createStyleResolver() {\n var inserted, sheet, cache;\n var resolved = {\n css: {},\n ltr: {},\n rtl: {},\n rtlNoSwap: {}\n };\n\n var init = function init() {\n inserted = {\n css: {},\n ltr: {},\n rtl: {},\n rtlNoSwap: {}\n };\n sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(STYLE_ELEMENT_ID));\n cache = {};\n modality(function (rule) {\n return sheet.insert(rule, STYLE_GROUPS.modality);\n });\n initialRules.forEach(function (rule) {\n sheet.insert(rule, STYLE_GROUPS.reset);\n });\n };\n\n init();\n\n function addToCache(className, prop, value) {\n if (!cache[prop]) {\n cache[prop] = {};\n }\n\n cache[prop][value] = className;\n }\n\n function getClassName(prop, value) {\n var val = stringifyValueWithProperty(value, prop);\n return cache[prop] && cache[prop].hasOwnProperty(val) && cache[prop][val];\n }\n\n function _injectRegisteredStyle(id) {\n var _I18nManager$getConst = I18nManager.getConstants(),\n doLeftAndRightSwapInRTL = _I18nManager$getConst.doLeftAndRightSwapInRTL,\n isRTL = _I18nManager$getConst.isRTL;\n\n var dir = isRTL ? doLeftAndRightSwapInRTL ? 'rtl' : 'rtlNoSwap' : 'ltr';\n\n if (!inserted[dir][id]) {\n var style = createCompileableStyle(i18nStyle(flattenStyle(id)));\n var results = atomic(style);\n Object.keys(results).forEach(function (key) {\n var _results$key = results[key],\n identifier = _results$key.identifier,\n property = _results$key.property,\n rules = _results$key.rules,\n value = _results$key.value;\n addToCache(identifier, property, value);\n rules.forEach(function (rule) {\n var group = STYLE_GROUPS.custom[property] || STYLE_GROUPS.atomic;\n sheet.insert(rule, group);\n });\n });\n inserted[dir][id] = true;\n }\n }\n /**\n * Resolves a React Native style object to DOM attributes\n */\n\n\n function resolve(style, classList) {\n var nextClassList = [];\n var props = {};\n\n if (!style && !classList) {\n return props;\n }\n\n if (Array.isArray(classList)) {\n flattenArray(classList).forEach(function (identifier) {\n if (identifier) {\n if (inserted.css[identifier] == null && resolved.css[identifier] != null) {\n var item = resolved.css[identifier];\n item.rules.forEach(function (rule) {\n sheet.insert(rule, item.group);\n });\n inserted.css[identifier] = true;\n }\n\n nextClassList.push(identifier);\n }\n });\n }\n\n if (typeof style === 'number') {\n // fast and cachable\n _injectRegisteredStyle(style);\n\n var key = createCacheKey(style);\n props = _resolveStyle(style, key);\n } else if (!Array.isArray(style)) {\n // resolve a plain RN style object\n props = _resolveStyle(style);\n } else {\n // flatten the style array\n // cache resolved props when all styles are registered\n // otherwise fallback to resolving\n var flatArray = flattenArray(style);\n var isArrayOfNumbers = true;\n var cacheKey = '';\n\n for (var i = 0; i < flatArray.length; i++) {\n var id = flatArray[i];\n\n if (typeof id !== 'number') {\n isArrayOfNumbers = false;\n } else {\n if (isArrayOfNumbers) {\n cacheKey += id + '-';\n }\n\n _injectRegisteredStyle(id);\n }\n }\n\n var _key = isArrayOfNumbers ? createCacheKey(cacheKey) : null;\n\n props = _resolveStyle(flatArray, _key);\n }\n\n nextClassList.push.apply(nextClassList, props.classList);\n var finalProps = {\n className: classListToString(nextClassList),\n classList: nextClassList\n };\n\n if (props.style) {\n finalProps.style = props.style;\n }\n\n return finalProps;\n }\n /**\n * Resolves a React Native style object\n */\n\n\n function _resolveStyle(style, key) {\n var _I18nManager$getConst2 = I18nManager.getConstants(),\n doLeftAndRightSwapInRTL = _I18nManager$getConst2.doLeftAndRightSwapInRTL,\n isRTL = _I18nManager$getConst2.isRTL;\n\n var dir = isRTL ? doLeftAndRightSwapInRTL ? 'rtl' : 'rtlNoSwap' : 'ltr'; // faster: memoized\n\n if (key != null && resolved[dir][key] != null) {\n return resolved[dir][key];\n }\n\n var flatStyle = flattenStyle(style);\n var localizedStyle = createCompileableStyle(i18nStyle(flatStyle)); // slower: convert style object to props and cache\n\n var props = Object.keys(localizedStyle).sort().reduce(function (props, styleProp) {\n var value = localizedStyle[styleProp];\n\n if (value != null) {\n var className = getClassName(styleProp, value);\n\n if (className) {\n props.classList.push(className);\n } else {\n // Certain properties and values are not transformed by 'createReactDOMStyle' as they\n // require more complex transforms into multiple CSS rules. Here we assume that StyleManager\n // can bind these styles to a className, and prevent them becoming invalid inline-styles.\n if (styleProp === 'animationKeyframes' || styleProp === 'placeholderTextColor' || styleProp === 'pointerEvents' || styleProp === 'scrollbarWidth') {\n var _atomic;\n\n var a = atomic((_atomic = {}, _atomic[styleProp] = value, _atomic));\n Object.keys(a).forEach(function (key) {\n var _a$key = a[key],\n identifier = _a$key.identifier,\n rules = _a$key.rules;\n props.classList.push(identifier);\n rules.forEach(function (rule) {\n sheet.insert(rule, STYLE_GROUPS.atomic);\n });\n });\n } else {\n if (!props.style) {\n props.style = {};\n } // 4x slower render\n\n\n props.style[styleProp] = value;\n }\n }\n }\n\n return props;\n }, {\n classList: []\n });\n\n if (props.style) {\n props.style = inline(props.style);\n }\n\n if (key != null) {\n resolved[dir][key] = props;\n }\n\n return props;\n }\n\n return {\n getStyleSheet: function getStyleSheet() {\n var textContent = sheet.getTextContent(); // Reset state on the server so critical css is always the result\n\n if (!canUseDOM) {\n init();\n }\n\n return {\n id: STYLE_ELEMENT_ID,\n textContent: textContent\n };\n },\n createCSS: function createCSS(rules, group) {\n var result = {};\n Object.keys(rules).forEach(function (name) {\n var style = rules[name];\n var compiled = classic(style, name);\n Object.keys(compiled).forEach(function (key) {\n var _compiled$key = compiled[key],\n identifier = _compiled$key.identifier,\n rules = _compiled$key.rules;\n resolved.css[identifier] = {\n group: group || STYLE_GROUPS.classic,\n rules: rules\n };\n result[name] = identifier;\n });\n });\n return result;\n },\n resolve: resolve,\n\n get sheet() {\n return sheet;\n }\n\n };\n}\n/**\n * Misc helpers\n */\n\nvar createCacheKey = function createCacheKey(id) {\n var prefix = 'rn';\n return prefix + \"-\" + id;\n};\n\nvar classListToString = function classListToString(list) {\n return list.join(' ').trim();\n};","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createStyleResolver from './createStyleResolver';\nvar styleResolver = createStyleResolver();\nexport default styleResolver;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment'; // $FlowFixMe: HTMLStyleElement is incorrectly typed - https://github.com/facebook/flow/issues/2696\n\nexport default function createCSSStyleSheet(id) {\n if (canUseDOM) {\n var element = document.getElementById(id);\n\n if (element != null) {\n // $FlowFixMe: HTMLElement is incorrectly typed\n return element.sheet;\n } else {\n var _element = document.createElement('style');\n\n _element.setAttribute('id', id);\n\n var head = document.head;\n\n if (head) {\n head.insertBefore(_element, head.firstChild);\n }\n\n return _element.sheet;\n }\n } else {\n return null;\n }\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport var BLUR = 'blur';\nexport var CONTEXT_MENU = 'contextmenu';\nexport var FOCUS_OUT = 'focusout';\nexport var MOUSE_DOWN = 'mousedown';\nexport var MOUSE_MOVE = 'mousemove';\nexport var MOUSE_UP = 'mouseup';\nexport var MOUSE_CANCEL = 'dragstart';\nexport var TOUCH_START = 'touchstart';\nexport var TOUCH_MOVE = 'touchmove';\nexport var TOUCH_END = 'touchend';\nexport var TOUCH_CANCEL = 'touchcancel';\nexport var SCROLL = 'scroll';\nexport var SELECT = 'select';\nexport var SELECTION_CHANGE = 'selectionchange';\nexport function isStartish(eventType) {\n return eventType === TOUCH_START || eventType === MOUSE_DOWN;\n}\nexport function isMoveish(eventType) {\n return eventType === TOUCH_MOVE || eventType === MOUSE_MOVE;\n}\nexport function isEndish(eventType) {\n return eventType === TOUCH_END || eventType === MOUSE_UP || isCancelish(eventType);\n}\nexport function isCancelish(eventType) {\n return eventType === TOUCH_CANCEL || eventType === MOUSE_CANCEL;\n}\nexport function isScroll(eventType) {\n return eventType === SCROLL;\n}\nexport function isSelectionChange(eventType) {\n return eventType === SELECT || eventType === SELECTION_CHANGE;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { isStartish, isMoveish, isEndish } from './ResponderEventTypes';\n\n/**\n * Tracks the position and time of each active touch by `touch.identifier`. We\n * should typically only see IDs in the range of 1-20 because IDs get recycled\n * when touches end and start again.\n */\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar MAX_TOUCH_BANK = 20;\nvar touchBank = [];\nvar touchHistory = {\n touchBank: touchBank,\n numberActiveTouches: 0,\n // If there is only one active touch, we remember its location. This prevents\n // us having to loop through all of the touches all the time in the most\n // common case.\n indexOfSingleActiveTouch: -1,\n mostRecentTimeStamp: 0\n};\n\nfunction timestampForTouch(touch) {\n // The legacy internal implementation provides \"timeStamp\", which has been\n // renamed to \"timestamp\".\n return touch.timeStamp || touch.timestamp;\n}\n/**\n * TODO: Instead of making gestures recompute filtered velocity, we could\n * include a built in velocity computation that can be reused globally.\n */\n\n\nfunction createTouchRecord(touch) {\n return {\n touchActive: true,\n startPageX: touch.pageX,\n startPageY: touch.pageY,\n startTimeStamp: timestampForTouch(touch),\n currentPageX: touch.pageX,\n currentPageY: touch.pageY,\n currentTimeStamp: timestampForTouch(touch),\n previousPageX: touch.pageX,\n previousPageY: touch.pageY,\n previousTimeStamp: timestampForTouch(touch)\n };\n}\n\nfunction resetTouchRecord(touchRecord, touch) {\n touchRecord.touchActive = true;\n touchRecord.startPageX = touch.pageX;\n touchRecord.startPageY = touch.pageY;\n touchRecord.startTimeStamp = timestampForTouch(touch);\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchRecord.previousPageX = touch.pageX;\n touchRecord.previousPageY = touch.pageY;\n touchRecord.previousTimeStamp = timestampForTouch(touch);\n}\n\nfunction getTouchIdentifier(_ref) {\n var identifier = _ref.identifier;\n\n if (identifier == null) {\n console.error('Touch object is missing identifier.');\n }\n\n if (__DEV__) {\n if (identifier > MAX_TOUCH_BANK) {\n console.error('Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK);\n }\n }\n\n return identifier;\n}\n\nfunction recordTouchStart(touch) {\n var identifier = getTouchIdentifier(touch);\n var touchRecord = touchBank[identifier];\n\n if (touchRecord) {\n resetTouchRecord(touchRecord, touch);\n } else {\n touchBank[identifier] = createTouchRecord(touch);\n }\n\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n}\n\nfunction recordTouchMove(touch) {\n var touchRecord = touchBank[getTouchIdentifier(touch)];\n\n if (touchRecord) {\n touchRecord.touchActive = true;\n touchRecord.previousPageX = touchRecord.currentPageX;\n touchRecord.previousPageY = touchRecord.currentPageY;\n touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n } else {\n console.warn('Cannot record touch move without a touch start.\\n', \"Touch Move: \" + printTouch(touch) + \"\\n\", \"Touch Bank: \" + printTouchBank());\n }\n}\n\nfunction recordTouchEnd(touch) {\n var touchRecord = touchBank[getTouchIdentifier(touch)];\n\n if (touchRecord) {\n touchRecord.touchActive = false;\n touchRecord.previousPageX = touchRecord.currentPageX;\n touchRecord.previousPageY = touchRecord.currentPageY;\n touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n } else {\n console.warn('Cannot record touch end without a touch start.\\n', \"Touch End: \" + printTouch(touch) + \"\\n\", \"Touch Bank: \" + printTouchBank());\n }\n}\n\nfunction printTouch(touch) {\n return JSON.stringify({\n identifier: touch.identifier,\n pageX: touch.pageX,\n pageY: touch.pageY,\n timestamp: timestampForTouch(touch)\n });\n}\n\nfunction printTouchBank() {\n var printed = JSON.stringify(touchBank.slice(0, MAX_TOUCH_BANK));\n\n if (touchBank.length > MAX_TOUCH_BANK) {\n printed += ' (original size: ' + touchBank.length + ')';\n }\n\n return printed;\n}\n\nvar ResponderTouchHistoryStore = {\n recordTouchTrack: function recordTouchTrack(topLevelType, nativeEvent) {\n if (isMoveish(topLevelType)) {\n nativeEvent.changedTouches.forEach(recordTouchMove);\n } else if (isStartish(topLevelType)) {\n nativeEvent.changedTouches.forEach(recordTouchStart);\n touchHistory.numberActiveTouches = nativeEvent.touches.length;\n\n if (touchHistory.numberActiveTouches === 1) {\n touchHistory.indexOfSingleActiveTouch = nativeEvent.touches[0].identifier;\n }\n } else if (isEndish(topLevelType)) {\n nativeEvent.changedTouches.forEach(recordTouchEnd);\n touchHistory.numberActiveTouches = nativeEvent.touches.length;\n\n if (touchHistory.numberActiveTouches === 1) {\n for (var i = 0; i < touchBank.length; i++) {\n var touchTrackToCheck = touchBank[i];\n\n if (touchTrackToCheck != null && touchTrackToCheck.touchActive) {\n touchHistory.indexOfSingleActiveTouch = i;\n break;\n }\n }\n\n if (__DEV__) {\n var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];\n\n if (!(activeRecord != null && activeRecord.touchActive)) {\n console.error('Cannot find single active touch.');\n }\n }\n }\n }\n },\n touchHistory: touchHistory\n};\nexport default ResponderTouchHistoryStore;","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport getBoundingClientRect from '../../modules/getBoundingClientRect';\nimport ResponderTouchHistoryStore from './ResponderTouchHistoryStore';\n\nvar emptyFunction = function emptyFunction() {};\n\nvar emptyObject = {};\nvar emptyArray = [];\n/**\n * Safari produces very large identifiers that would cause the `touchBank` array\n * length to be so large as to crash the browser, if not normalized like this.\n * In the future the `touchBank` should use an object/map instead.\n */\n\nfunction normalizeIdentifier(identifier) {\n return identifier > 20 ? identifier % 20 : identifier;\n}\n/**\n * Converts a native DOM event to a ResponderEvent.\n * Mouse events are transformed into fake touch events.\n */\n\n\nexport default function createResponderEvent(domEvent) {\n var rect;\n var propagationWasStopped = false;\n var changedTouches;\n var touches;\n var domEventChangedTouches = domEvent.changedTouches;\n var domEventType = domEvent.type;\n var metaKey = domEvent.metaKey === true;\n var shiftKey = domEvent.shiftKey === true;\n var force = domEventChangedTouches && domEventChangedTouches[0].force || 0;\n var identifier = normalizeIdentifier(domEventChangedTouches && domEventChangedTouches[0].identifier || 0);\n var clientX = domEventChangedTouches && domEventChangedTouches[0].clientX || domEvent.clientX;\n var clientY = domEventChangedTouches && domEventChangedTouches[0].clientY || domEvent.clientY;\n var pageX = domEventChangedTouches && domEventChangedTouches[0].pageX || domEvent.pageX;\n var pageY = domEventChangedTouches && domEventChangedTouches[0].pageY || domEvent.pageY;\n var preventDefault = typeof domEvent.preventDefault === 'function' ? domEvent.preventDefault.bind(domEvent) : emptyFunction;\n var timestamp = domEvent.timeStamp;\n\n function normalizeTouches(touches) {\n return Array.prototype.slice.call(touches).map(function (touch) {\n return {\n force: touch.force,\n identifier: normalizeIdentifier(touch.identifier),\n\n get locationX() {\n return locationX(touch.clientX);\n },\n\n get locationY() {\n return locationY(touch.clientY);\n },\n\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target,\n timestamp: timestamp\n };\n });\n }\n\n if (domEventChangedTouches != null) {\n changedTouches = normalizeTouches(domEventChangedTouches);\n touches = normalizeTouches(domEvent.touches);\n } else {\n var emulatedTouches = [{\n force: force,\n identifier: identifier,\n\n get locationX() {\n return locationX(clientX);\n },\n\n get locationY() {\n return locationY(clientY);\n },\n\n pageX: pageX,\n pageY: pageY,\n target: domEvent.target,\n timestamp: timestamp\n }];\n changedTouches = emulatedTouches;\n touches = domEventType === 'mouseup' || domEventType === 'dragstart' ? emptyArray : emulatedTouches;\n }\n\n var responderEvent = {\n bubbles: true,\n cancelable: true,\n // `currentTarget` is set before dispatch\n currentTarget: null,\n defaultPrevented: domEvent.defaultPrevented,\n dispatchConfig: emptyObject,\n eventPhase: domEvent.eventPhase,\n isDefaultPrevented: function isDefaultPrevented() {\n return domEvent.defaultPrevented;\n },\n isPropagationStopped: function isPropagationStopped() {\n return propagationWasStopped;\n },\n isTrusted: domEvent.isTrusted,\n nativeEvent: {\n altKey: false,\n ctrlKey: false,\n metaKey: metaKey,\n shiftKey: shiftKey,\n changedTouches: changedTouches,\n force: force,\n identifier: identifier,\n\n get locationX() {\n return locationX(clientX);\n },\n\n get locationY() {\n return locationY(clientY);\n },\n\n pageX: pageX,\n pageY: pageY,\n target: domEvent.target,\n timestamp: timestamp,\n touches: touches,\n type: domEventType\n },\n persist: emptyFunction,\n preventDefault: preventDefault,\n stopPropagation: function stopPropagation() {\n propagationWasStopped = true;\n },\n target: domEvent.target,\n timeStamp: timestamp,\n touchHistory: ResponderTouchHistoryStore.touchHistory\n }; // Using getters and functions serves two purposes:\n // 1) The value of `currentTarget` is not initially available.\n // 2) Measuring the clientRect may cause layout jank and should only be done on-demand.\n\n function locationX(x) {\n rect = rect || getBoundingClientRect(responderEvent.currentTarget);\n\n if (rect) {\n return x - rect.left;\n }\n }\n\n function locationY(y) {\n rect = rect || getBoundingClientRect(responderEvent.currentTarget);\n\n if (rect) {\n return y - rect.top;\n }\n }\n\n return responderEvent;\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport isSelectionValid from '../../modules/isSelectionValid';\nvar keyName = '__reactResponderId';\n\nfunction getEventPath(domEvent) {\n // The 'selectionchange' event always has the 'document' as the target.\n // Use the anchor node as the initial target to reconstruct a path.\n // (We actually only need the first \"responder\" node in practice.)\n if (domEvent.type === 'selectionchange') {\n var target = window.getSelection().anchorNode;\n return composedPathFallback(target);\n } else {\n var path = domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);\n return path;\n }\n}\n\nfunction composedPathFallback(target) {\n var path = [];\n\n while (target != null && target !== document.body) {\n path.push(target);\n target = target.parentNode;\n }\n\n return path;\n}\n/**\n * Retrieve the responderId from a host node\n */\n\n\nfunction getResponderId(node) {\n if (node != null) {\n return node[keyName];\n }\n\n return null;\n}\n/**\n * Store the responderId on a host node\n */\n\n\nexport function setResponderId(node, id) {\n if (node != null) {\n node[keyName] = id;\n }\n}\n/**\n * Filter the event path to contain only the nodes attached to the responder system\n */\n\nexport function getResponderPaths(domEvent) {\n var idPath = [];\n var nodePath = [];\n var eventPath = getEventPath(domEvent);\n\n for (var i = 0; i < eventPath.length; i++) {\n var node = eventPath[i];\n var id = getResponderId(node);\n\n if (id != null) {\n idPath.push(id);\n nodePath.push(node);\n }\n }\n\n return {\n idPath: idPath,\n nodePath: nodePath\n };\n}\n/**\n * Walk the paths and find the first common ancestor\n */\n\nexport function getLowestCommonAncestor(pathA, pathB) {\n var pathALength = pathA.length;\n var pathBLength = pathB.length;\n\n if ( // If either path is empty\n pathALength === 0 || pathBLength === 0 || // If the last elements aren't the same there can't be a common ancestor\n // that is connected to the responder system\n pathA[pathALength - 1] !== pathB[pathBLength - 1]) {\n return null;\n }\n\n var itemA = pathA[0];\n var indexA = 0;\n var itemB = pathB[0];\n var indexB = 0; // If A is deeper, skip indices that can't match.\n\n if (pathALength - pathBLength > 0) {\n indexA = pathALength - pathBLength;\n itemA = pathA[indexA];\n pathALength = pathBLength;\n } // If B is deeper, skip indices that can't match\n\n\n if (pathBLength - pathALength > 0) {\n indexB = pathBLength - pathALength;\n itemB = pathB[indexB];\n pathBLength = pathALength;\n } // Walk in lockstep until a match is found\n\n\n var depth = pathALength;\n\n while (depth--) {\n if (itemA === itemB) {\n return itemA;\n }\n\n itemA = pathA[indexA++];\n itemB = pathB[indexB++];\n }\n\n return null;\n}\n/**\n * Determine whether any of the active touches are within the current responder.\n * This cannot rely on W3C `targetTouches`, as neither IE11 nor Safari implement it.\n */\n\nexport function hasTargetTouches(target, touches) {\n if (!touches || touches.length === 0) {\n return false;\n }\n\n for (var i = 0; i < touches.length; i++) {\n var node = touches[i].target;\n\n if (node != null) {\n if (target.contains(node)) {\n return true;\n }\n }\n }\n\n return false;\n}\n/**\n * Ignore 'selectionchange' events that don't correspond with a person's intent to\n * select text.\n */\n\nexport function hasValidSelection(domEvent) {\n if (domEvent.type === 'selectionchange') {\n return isSelectionValid();\n }\n\n return domEvent.type === 'select';\n}\n/**\n * Events are only valid if the primary button was used without specific modifier keys.\n */\n\nexport function isPrimaryPointerDown(domEvent) {\n var altKey = domEvent.altKey,\n button = domEvent.button,\n buttons = domEvent.buttons,\n ctrlKey = domEvent.ctrlKey,\n type = domEvent.type;\n var isTouch = type === 'touchstart' || type === 'touchmove';\n var isPrimaryMouseDown = type === 'mousedown' && (button === 0 || buttons === 1);\n var isPrimaryMouseMove = type === 'mousemove' && buttons === 1;\n var noModifiers = altKey === false && ctrlKey === false;\n\n if (isTouch || isPrimaryMouseDown && noModifiers || isPrimaryMouseMove && noModifiers) {\n return true;\n }\n\n return false;\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport default function isSelectionValid() {\n var selection = window.getSelection();\n var string = selection.toString();\n var anchorNode = selection.anchorNode;\n var focusNode = selection.focusNode;\n var isTextNode = anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE || focusNode && focusNode.nodeType === window.Node.TEXT_NODE;\n return string.length >= 1 && string !== '\\n' && isTextNode;\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n/**\n * RESPONDER EVENT SYSTEM\n *\n * A single, global \"interaction lock\" on views. For a view to be the \"responder\" means\n * that pointer interactions are exclusive to that view and none other. The \"interaction\n * lock\" can be transferred (only) to ancestors of the current \"responder\" as long as\n * pointers continue to be active.\n *\n * Responder being granted:\n *\n * A view can become the \"responder\" after the following events:\n * * \"pointerdown\" (implemented using \"touchstart\", \"mousedown\")\n * * \"pointermove\" (implemented using \"touchmove\", \"mousemove\")\n * * \"scroll\" (while a pointer is down)\n * * \"selectionchange\" (while a pointer is down)\n *\n * If nothing is already the \"responder\", the event propagates to (capture) and from\n * (bubble) the event target until a view returns `true` for\n * `on*ShouldSetResponder(Capture)`.\n *\n * If something is already the responder, the event propagates to (capture) and from\n * (bubble) the lowest common ancestor of the event target and the current \"responder\".\n * Then negotiation happens between the current \"responder\" and a view that wants to\n * become the \"responder\": see the timing diagram below.\n *\n * (NOTE: Scrolled views either automatically become the \"responder\" or release the\n * \"interaction lock\". A native scroll view that isn't built on top of the responder\n * system must result in the current \"responder\" being notified that it no longer has\n * the \"interaction lock\" - the native system has taken over.\n *\n * Responder being released:\n *\n * As soon as there are no more active pointers that *started* inside descendants\n * of the *current* \"responder\", an `onResponderRelease` event is dispatched to the\n * current \"responder\", and the responder lock is released.\n *\n * Typical sequence of events:\n * * startShouldSetResponder\n * * responderGrant/Reject\n * * responderStart\n * * responderMove\n * * responderEnd\n * * responderRelease\n */\n\n/* Negotiation Performed\n +-----------------------+\n / \\\nProcess low level events to + Current Responder + wantsResponderID\ndetermine who to perform negot-| (if any exists at all) |\niation/transition | Otherwise just pass through|\n-------------------------------+----------------------------+------------------+\nBubble to find first ID | |\nto return true:wantsResponderID| |\n | |\n +--------------+ | |\n | onTouchStart | | |\n +------+-------+ none | |\n | return| |\n+-----------v-------------+true| +------------------------+ |\n|onStartShouldSetResponder|----->| onResponderStart (cur) |<-----------+\n+-----------+-------------+ | +------------------------+ | |\n | | | +--------+-------+\n | returned true for| false:REJECT +-------->|onResponderReject\n | wantsResponderID | | | +----------------+\n | (now attempt | +------------------+-----+ |\n | handoff) | | onResponder | |\n +------------------->| TerminationRequest | |\n | +------------------+-----+ |\n | | | +----------------+\n | true:GRANT +-------->|onResponderGrant|\n | | +--------+-------+\n | +------------------------+ | |\n | | onResponderTerminate |<-----------+\n | +------------------+-----+ |\n | | | +----------------+\n | +-------->|onResponderStart|\n | | +----------------+\nBubble to find first ID | |\nto return true:wantsResponderID| |\n | |\n +-------------+ | |\n | onTouchMove | | |\n +------+------+ none | |\n | return| |\n+-----------v-------------+true| +------------------------+ |\n|onMoveShouldSetResponder |----->| onResponderMove (cur) |<-----------+\n+-----------+-------------+ | +------------------------+ | |\n | | | +--------+-------+\n | returned true for| false:REJECT +-------->|onResponderReject\n | wantsResponderID | | | +----------------+\n | (now attempt | +------------------+-----+ |\n | handoff) | | onResponder | |\n +------------------->| TerminationRequest| |\n | +------------------+-----+ |\n | | | +----------------+\n | true:GRANT +-------->|onResponderGrant|\n | | +--------+-------+\n | +------------------------+ | |\n | | onResponderTerminate |<-----------+\n | +------------------+-----+ |\n | | | +----------------+\n | +-------->|onResponderMove |\n | | +----------------+\n | |\n | |\n Some active touch started| |\n inside current responder | +------------------------+ |\n +------------------------->| onResponderEnd | |\n | | +------------------------+ |\n +---+---------+ | |\n | onTouchEnd | | |\n +---+---------+ | |\n | | +------------------------+ |\n +------------------------->| onResponderEnd | |\n No active touches started| +-----------+------------+ |\n inside current responder | | |\n | v |\n | +------------------------+ |\n | | onResponderRelease | |\n | +------------------------+ |\n | |\n + + */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport createResponderEvent from './createResponderEvent';\nimport { isCancelish, isEndish, isMoveish, isScroll, isSelectionChange, isStartish } from './ResponderEventTypes';\nimport { getLowestCommonAncestor, getResponderPaths, hasTargetTouches, hasValidSelection, isPrimaryPointerDown, setResponderId } from './utils';\nimport ResponderTouchHistoryStore from './ResponderTouchHistoryStore';\n/* ------------ TYPES ------------ */\n\nvar emptyObject = {};\n/* ------------ IMPLEMENTATION ------------ */\n\nvar startRegistration = ['onStartShouldSetResponderCapture', 'onStartShouldSetResponder', {\n bubbles: true\n}];\nvar moveRegistration = ['onMoveShouldSetResponderCapture', 'onMoveShouldSetResponder', {\n bubbles: true\n}];\nvar scrollRegistration = ['onScrollShouldSetResponderCapture', 'onScrollShouldSetResponder', {\n bubbles: false\n}];\nvar shouldSetResponderEvents = {\n touchstart: startRegistration,\n mousedown: startRegistration,\n touchmove: moveRegistration,\n mousemove: moveRegistration,\n scroll: scrollRegistration\n};\nvar emptyResponder = {\n id: null,\n idPath: null,\n node: null\n};\nvar responderListenersMap = new Map();\nvar isEmulatingMouseEvents = false;\nvar trackedTouchCount = 0;\nvar currentResponder = {\n id: null,\n node: null,\n idPath: null\n};\n\nfunction changeCurrentResponder(responder) {\n currentResponder = responder;\n}\n\nfunction getResponderConfig(id) {\n var config = responderListenersMap.get(id);\n return config != null ? config : emptyObject;\n}\n/**\n * Process native events\n *\n * A single event listener is used to manage the responder system.\n * All pointers are tracked in the ResponderTouchHistoryStore. Native events\n * are interpreted in terms of the Responder System and checked to see if\n * the responder should be transferred. Each host node that is attached to\n * the Responder System has an ID, which is used to look up its associated\n * callbacks.\n */\n\n\nfunction eventListener(domEvent) {\n var eventType = domEvent.type;\n var eventTarget = domEvent.target;\n /**\n * Manage emulated events and early bailout.\n * Since PointerEvent is not used yet (lack of support in older Safari), it's\n * necessary to manually manage the mess of browser touch/mouse events.\n * And bailout early for termination events when there is no active responder.\n */\n // Flag when browser may produce emulated events\n\n if (eventType === 'touchstart') {\n isEmulatingMouseEvents = true;\n } // Remove flag when browser will not produce emulated events\n\n\n if (eventType === 'touchmove' || trackedTouchCount > 1) {\n isEmulatingMouseEvents = false;\n } // Ignore various events in particular circumstances\n\n\n if ( // Ignore browser emulated mouse events\n eventType === 'mousedown' && isEmulatingMouseEvents || eventType === 'mousemove' && isEmulatingMouseEvents || // Ignore mousemove if a mousedown didn't occur first\n eventType === 'mousemove' && trackedTouchCount < 1) {\n return;\n } // Remove flag after emulated events are finished\n\n\n if (isEmulatingMouseEvents && eventType === 'mouseup') {\n if (trackedTouchCount === 0) {\n isEmulatingMouseEvents = false;\n }\n\n return;\n }\n\n var isStartEvent = isStartish(eventType) && isPrimaryPointerDown(domEvent);\n var isMoveEvent = isMoveish(eventType);\n var isEndEvent = isEndish(eventType);\n var isScrollEvent = isScroll(eventType);\n var isSelectionChangeEvent = isSelectionChange(eventType);\n var responderEvent = createResponderEvent(domEvent);\n /**\n * Record the state of active pointers\n */\n\n if (isStartEvent || isMoveEvent || isEndEvent) {\n if (domEvent.touches) {\n trackedTouchCount = domEvent.touches.length;\n } else {\n if (isStartEvent) {\n trackedTouchCount = 1;\n } else if (isEndEvent) {\n trackedTouchCount = 0;\n }\n }\n\n ResponderTouchHistoryStore.recordTouchTrack(eventType, responderEvent.nativeEvent);\n }\n /**\n * Responder System logic\n */\n\n\n var eventPaths = getResponderPaths(domEvent);\n var wasNegotiated = false;\n var wantsResponder; // If an event occured that might change the current responder...\n\n if (isStartEvent || isMoveEvent || isScrollEvent && trackedTouchCount > 0) {\n // If there is already a responder, prune the event paths to the lowest common ancestor\n // of the existing responder and deepest target of the event.\n var currentResponderIdPath = currentResponder.idPath;\n var eventIdPath = eventPaths.idPath;\n\n if (currentResponderIdPath != null && eventIdPath != null) {\n var lowestCommonAncestor = getLowestCommonAncestor(currentResponderIdPath, eventIdPath);\n\n if (lowestCommonAncestor != null) {\n var indexOfLowestCommonAncestor = eventIdPath.indexOf(lowestCommonAncestor); // Skip the current responder so it doesn't receive unexpected \"shouldSet\" events.\n\n var index = indexOfLowestCommonAncestor + (lowestCommonAncestor === currentResponder.id ? 1 : 0);\n eventPaths = {\n idPath: eventIdPath.slice(index),\n nodePath: eventPaths.nodePath.slice(index)\n };\n } else {\n eventPaths = null;\n }\n }\n\n if (eventPaths != null) {\n // If a node wants to become the responder, attempt to transfer.\n wantsResponder = findWantsResponder(eventPaths, domEvent, responderEvent);\n\n if (wantsResponder != null) {\n // Sets responder if none exists, or negotates with existing responder.\n attemptTransfer(responderEvent, wantsResponder);\n wasNegotiated = true;\n }\n }\n } // If there is now a responder, invoke its callbacks for the lifecycle of the gesture.\n\n\n if (currentResponder.id != null && currentResponder.node != null) {\n var _currentResponder = currentResponder,\n id = _currentResponder.id,\n node = _currentResponder.node;\n\n var _getResponderConfig = getResponderConfig(id),\n onResponderStart = _getResponderConfig.onResponderStart,\n onResponderMove = _getResponderConfig.onResponderMove,\n onResponderEnd = _getResponderConfig.onResponderEnd,\n onResponderRelease = _getResponderConfig.onResponderRelease,\n onResponderTerminate = _getResponderConfig.onResponderTerminate,\n onResponderTerminationRequest = _getResponderConfig.onResponderTerminationRequest;\n\n responderEvent.bubbles = false;\n responderEvent.cancelable = false;\n responderEvent.currentTarget = node; // Start\n\n if (isStartEvent) {\n if (onResponderStart != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderStart';\n onResponderStart(responderEvent);\n }\n } // Move\n else if (isMoveEvent) {\n if (onResponderMove != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderMove';\n onResponderMove(responderEvent);\n }\n } else {\n var isTerminateEvent = isCancelish(eventType) || // native context menu\n eventType === 'contextmenu' || // window blur\n eventType === 'blur' && eventTarget === window || // responder (or ancestors) blur\n eventType === 'blur' && eventTarget.contains(node) && domEvent.relatedTarget !== node || // native scroll without using a pointer\n isScrollEvent && trackedTouchCount === 0 || // native scroll on node that is parent of the responder (allow siblings to scroll)\n isScrollEvent && eventTarget.contains(node) && eventTarget !== node || // native select/selectionchange on node\n isSelectionChangeEvent && hasValidSelection(domEvent);\n var isReleaseEvent = isEndEvent && !isTerminateEvent && !hasTargetTouches(node, domEvent.touches); // End\n\n if (isEndEvent) {\n if (onResponderEnd != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderEnd';\n onResponderEnd(responderEvent);\n }\n } // Release\n\n\n if (isReleaseEvent) {\n if (onResponderRelease != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderRelease';\n onResponderRelease(responderEvent);\n }\n\n changeCurrentResponder(emptyResponder);\n } // Terminate\n\n\n if (isTerminateEvent) {\n var shouldTerminate = true; // Responders can still avoid termination but only for these events.\n\n if (eventType === 'contextmenu' || eventType === 'scroll' || eventType === 'selectionchange') {\n // Only call this function is it wasn't already called during negotiation.\n if (wasNegotiated) {\n shouldTerminate = false;\n } else if (onResponderTerminationRequest != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminationRequest';\n\n if (onResponderTerminationRequest(responderEvent) === false) {\n shouldTerminate = false;\n }\n }\n }\n\n if (shouldTerminate) {\n if (onResponderTerminate != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminate';\n onResponderTerminate(responderEvent);\n }\n\n changeCurrentResponder(emptyResponder);\n isEmulatingMouseEvents = false;\n trackedTouchCount = 0;\n }\n }\n }\n }\n}\n/**\n * Walk the event path to/from the target node. At each node, stop and call the\n * relevant \"shouldSet\" functions for the given event type. If any of those functions\n * call \"stopPropagation\" on the event, stop searching for a responder.\n */\n\n\nfunction findWantsResponder(eventPaths, domEvent, responderEvent) {\n var shouldSetCallbacks = shouldSetResponderEvents[domEvent.type]; // for Flow\n\n if (shouldSetCallbacks != null) {\n var idPath = eventPaths.idPath,\n nodePath = eventPaths.nodePath;\n var shouldSetCallbackCaptureName = shouldSetCallbacks[0];\n var shouldSetCallbackBubbleName = shouldSetCallbacks[1];\n var bubbles = shouldSetCallbacks[2].bubbles;\n\n var check = function check(id, node, callbackName) {\n var config = getResponderConfig(id);\n var shouldSetCallback = config[callbackName];\n\n if (shouldSetCallback != null) {\n responderEvent.currentTarget = node;\n\n if (shouldSetCallback(responderEvent) === true) {\n // Start the path from the potential responder\n var prunedIdPath = idPath.slice(idPath.indexOf(id));\n return {\n id: id,\n node: node,\n idPath: prunedIdPath\n };\n }\n }\n }; // capture\n\n\n for (var i = idPath.length - 1; i >= 0; i--) {\n var id = idPath[i];\n var node = nodePath[i];\n var result = check(id, node, shouldSetCallbackCaptureName);\n\n if (result != null) {\n return result;\n }\n\n if (responderEvent.isPropagationStopped() === true) {\n return;\n }\n } // bubble\n\n\n if (bubbles) {\n for (var _i = 0; _i < idPath.length; _i++) {\n var _id = idPath[_i];\n var _node = nodePath[_i];\n\n var _result = check(_id, _node, shouldSetCallbackBubbleName);\n\n if (_result != null) {\n return _result;\n }\n\n if (responderEvent.isPropagationStopped() === true) {\n return;\n }\n }\n } else {\n var _id2 = idPath[0];\n var _node2 = nodePath[0];\n var target = domEvent.target;\n\n if (target === _node2) {\n return check(_id2, _node2, shouldSetCallbackBubbleName);\n }\n }\n }\n}\n/**\n * Attempt to transfer the responder.\n */\n\n\nfunction attemptTransfer(responderEvent, wantsResponder) {\n var _currentResponder2 = currentResponder,\n currentId = _currentResponder2.id,\n currentNode = _currentResponder2.node;\n var id = wantsResponder.id,\n node = wantsResponder.node;\n\n var _getResponderConfig2 = getResponderConfig(id),\n onResponderGrant = _getResponderConfig2.onResponderGrant,\n onResponderReject = _getResponderConfig2.onResponderReject;\n\n responderEvent.bubbles = false;\n responderEvent.cancelable = false;\n responderEvent.currentTarget = node; // Set responder\n\n if (currentId == null) {\n if (onResponderGrant != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderGrant';\n onResponderGrant(responderEvent);\n }\n\n changeCurrentResponder(wantsResponder);\n } // Negotiate with current responder\n else {\n var _getResponderConfig3 = getResponderConfig(currentId),\n onResponderTerminate = _getResponderConfig3.onResponderTerminate,\n onResponderTerminationRequest = _getResponderConfig3.onResponderTerminationRequest;\n\n var allowTransfer = true;\n\n if (onResponderTerminationRequest != null) {\n responderEvent.currentTarget = currentNode;\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminationRequest';\n\n if (onResponderTerminationRequest(responderEvent) === false) {\n allowTransfer = false;\n }\n }\n\n if (allowTransfer) {\n // Terminate existing responder\n if (onResponderTerminate != null) {\n responderEvent.currentTarget = currentNode;\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminate';\n onResponderTerminate(responderEvent);\n } // Grant next responder\n\n\n if (onResponderGrant != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderGrant';\n onResponderGrant(responderEvent);\n }\n\n changeCurrentResponder(wantsResponder);\n } else {\n // Reject responder request\n if (onResponderReject != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderReject';\n onResponderReject(responderEvent);\n }\n }\n }\n}\n/* ------------ PUBLIC API ------------ */\n\n/**\n * Attach Listeners\n *\n * Use native events as ReactDOM doesn't have a non-plugin API to implement\n * this system.\n */\n\n\nvar documentEventsCapturePhase = ['blur', 'scroll'];\nvar documentEventsBubblePhase = [// mouse\n'mousedown', 'mousemove', 'mouseup', 'dragstart', // touch\n'touchstart', 'touchmove', 'touchend', 'touchcancel', // other\n'contextmenu', 'select', 'selectionchange'];\nexport function attachListeners() {\n if (canUseDOM && window.__reactResponderSystemActive == null) {\n window.addEventListener('blur', eventListener);\n documentEventsBubblePhase.forEach(function (eventType) {\n document.addEventListener(eventType, eventListener);\n });\n documentEventsCapturePhase.forEach(function (eventType) {\n document.addEventListener(eventType, eventListener, true);\n });\n window.__reactResponderSystemActive = true;\n }\n}\n/**\n * Register a node with the ResponderSystem.\n */\n\nexport function addNode(id, node, config) {\n setResponderId(node, id);\n responderListenersMap.set(id, config);\n}\n/**\n * Unregister a node with the ResponderSystem.\n */\n\nexport function removeNode(id) {\n if (currentResponder.id === id) {\n terminateResponder();\n }\n\n if (responderListenersMap.has(id)) {\n responderListenersMap.delete(id);\n }\n}\n/**\n * Allow the current responder to be terminated from within components to support\n * more complex requirements, such as use with other React libraries for working\n * with scroll views, input views, etc.\n */\n\nexport function terminateResponder() {\n var _currentResponder3 = currentResponder,\n id = _currentResponder3.id,\n node = _currentResponder3.node;\n\n if (id != null && node != null) {\n var _getResponderConfig4 = getResponderConfig(id),\n onResponderTerminate = _getResponderConfig4.onResponderTerminate;\n\n if (onResponderTerminate != null) {\n var event = createResponderEvent({});\n event.currentTarget = node;\n onResponderTerminate(event);\n }\n\n changeCurrentResponder(emptyResponder);\n }\n\n isEmulatingMouseEvents = false;\n trackedTouchCount = 0;\n}\n/**\n * Allow unit tests to inspect the current responder in the system.\n * FOR TESTING ONLY.\n */\n\nexport function getResponderNode() {\n return currentResponder.node;\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n/**\n * Hook for integrating the Responder System into React\n *\n * function SomeComponent({ onStartShouldSetResponder }) {\n * const ref = useRef(null);\n * useResponderEvents(ref, { onStartShouldSetResponder });\n * return <div ref={ref} />\n * }\n */\nimport * as React from 'react';\nimport * as ResponderSystem from './ResponderSystem';\nvar emptyObject = {};\nvar idCounter = 0;\n\nfunction useStable(getInitialValue) {\n var ref = React.useRef(null);\n\n if (ref.current == null) {\n ref.current = getInitialValue();\n }\n\n return ref.current;\n}\n\nexport default function useResponderEvents(hostRef, config) {\n if (config === void 0) {\n config = emptyObject;\n }\n\n var id = useStable(function () {\n return idCounter++;\n });\n var isAttachedRef = React.useRef(false); // This is a separate effects so it doesn't run when the config changes.\n // On initial mount, attach global listeners if needed.\n // On unmount, remove node potentially attached to the Responder System.\n\n React.useEffect(function () {\n ResponderSystem.attachListeners();\n return function () {\n ResponderSystem.removeNode(id);\n };\n }, [id]); // Register and unregister with the Responder System as necessary\n\n React.useEffect(function () {\n var _config = config,\n onMoveShouldSetResponder = _config.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = _config.onMoveShouldSetResponderCapture,\n onScrollShouldSetResponder = _config.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = _config.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = _config.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = _config.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = _config.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = _config.onStartShouldSetResponderCapture;\n var requiresResponderSystem = onMoveShouldSetResponder != null || onMoveShouldSetResponderCapture != null || onScrollShouldSetResponder != null || onScrollShouldSetResponderCapture != null || onSelectionChangeShouldSetResponder != null || onSelectionChangeShouldSetResponderCapture != null || onStartShouldSetResponder != null || onStartShouldSetResponderCapture != null;\n var node = hostRef.current;\n\n if (requiresResponderSystem) {\n ResponderSystem.addNode(id, node, config);\n isAttachedRef.current = true;\n } else if (isAttachedRef.current) {\n ResponderSystem.removeNode(id);\n isAttachedRef.current = false;\n }\n }, [config, hostRef, id]);\n React.useDebugValue({\n isResponder: hostRef.current === ResponderSystem.getResponderNode()\n });\n React.useDebugValue(config);\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar buttonLikeRoles = {\n // ARIA button behaves like native 'button' element\n button: true,\n // ARIA menuitem responds to Enter/Space like a button. Spec requires AT to\n // ignore ARIA roles of any children.\n // https://www.w3.org/WAI/GL/wiki/Using_ARIA_menus\n menuitem: true\n};\nexport default buttonLikeRoles;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar accessibilityRoleToWebRole = {\n adjustable: 'slider',\n button: 'button',\n header: 'heading',\n image: 'img',\n imagebutton: null,\n keyboardkey: null,\n label: null,\n link: 'link',\n none: 'presentation',\n search: 'search',\n summary: 'region',\n text: null\n};\n\nvar propsToAriaRole = function propsToAriaRole(_ref) {\n var accessibilityRole = _ref.accessibilityRole;\n\n if (accessibilityRole) {\n var inferredRole = accessibilityRoleToWebRole[accessibilityRole];\n\n if (inferredRole !== null) {\n // ignore roles that don't map to web\n return inferredRole || accessibilityRole;\n }\n }\n};\n\nexport default propsToAriaRole;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport propsToAriaRole from './propsToAriaRole';\nvar roleComponents = {\n article: 'article',\n banner: 'header',\n blockquote: 'blockquote',\n code: 'code',\n complementary: 'aside',\n contentinfo: 'footer',\n deletion: 'del',\n emphasis: 'em',\n figure: 'figure',\n insertion: 'ins',\n form: 'form',\n link: 'a',\n list: 'ul',\n listitem: 'li',\n main: 'main',\n navigation: 'nav',\n region: 'section',\n strong: 'strong'\n};\nvar emptyObject = {};\n\nvar propsToAccessibilityComponent = function propsToAccessibilityComponent(props) {\n if (props === void 0) {\n props = emptyObject;\n }\n\n // special-case for \"label\" role which doesn't map to an ARIA role\n if (props.accessibilityRole === 'label') {\n return 'label';\n } // special-case for \"href\" which becomes a link\n\n\n if (props.href != null) {\n return 'a';\n }\n\n var role = propsToAriaRole(props);\n\n if (role) {\n if (role === 'heading') {\n var level = props.accessibilityLevel || props['aria-level'];\n\n if (level != null) {\n return \"h\" + level;\n }\n\n return 'h1';\n }\n\n return roleComponents[role];\n }\n};\n\nexport default propsToAccessibilityComponent;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport buttonLikeRoles from './buttonLikeRoles';\nimport isDisabled from './isDisabled';\nimport propsToAccessibilityComponent from './propsToAccessibilityComponent';\nimport propsToAriaRole from './propsToAriaRole';\nvar AccessibilityUtil = {\n buttonLikeRoles: buttonLikeRoles,\n isDisabled: isDisabled,\n propsToAccessibilityComponent: propsToAccessibilityComponent,\n propsToAriaRole: propsToAriaRole\n};\nexport default AccessibilityUtil;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar isDisabled = function isDisabled(props) {\n return props.disabled || Array.isArray(props.accessibilityStates) && props.accessibilityStates.indexOf('disabled') > -1;\n};\n\nexport default isDisabled;","// I18n.js\n// =======\n//\n// This small library provides the Rails I18n API on the Javascript.\n// You don't actually have to use Rails (or even Ruby) to use I18n.js.\n// Just make sure you export all translations in an object like this:\n//\n// I18n.translations.en = {\n// hello: \"Hello World\"\n// };\n//\n// See tests for specific formatting like numbers and dates.\n//\n\n// Using UMD pattern from\n// https://github.com/umdjs/umd#regular-module\n// `returnExports.js` version\n;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(\"i18n\", function(){ return factory(root);});\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(root);\n } else {\n // Browser globals (root is window)\n root.I18n = factory(root);\n }\n}(this, function(global) {\n \"use strict\";\n\n // Use previously defined object if exists in current scope\n var I18n = global && global.I18n || {};\n\n // Just cache the Array#slice function.\n var slice = Array.prototype.slice;\n\n // Apply number padding.\n var padding = function(number) {\n return (\"0\" + number.toString()).substr(-2);\n };\n\n // Improved toFixed number rounding function with support for unprecise floating points\n // JavaScript's standard toFixed function does not round certain numbers correctly (for example 0.105 with precision 2).\n var toFixed = function(number, precision) {\n return decimalAdjust('round', number, -precision).toFixed(precision);\n };\n\n // Is a given variable an object?\n // Borrowed from Underscore.js\n var isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object'\n };\n\n var isFunction = function(func) {\n var type = typeof func;\n return type === 'function'\n };\n\n // Check if value is different than undefined and null;\n var isSet = function(value) {\n return typeof(value) !== 'undefined' && value !== null;\n };\n\n // Is a given value an array?\n // Borrowed from Underscore.js\n var isArray = function(val) {\n if (Array.isArray) {\n return Array.isArray(val);\n }\n return Object.prototype.toString.call(val) === '[object Array]';\n };\n\n var isString = function(val) {\n return typeof val === 'string' || Object.prototype.toString.call(val) === '[object String]';\n };\n\n var isNumber = function(val) {\n return typeof val === 'number' || Object.prototype.toString.call(val) === '[object Number]';\n };\n\n var isBoolean = function(val) {\n return val === true || val === false;\n };\n\n var isNull = function(val) {\n return val === null;\n };\n\n var decimalAdjust = function(type, value, exp) {\n // If the exp is undefined or zero...\n if (typeof exp === 'undefined' || +exp === 0) {\n return Math[type](value);\n }\n value = +value;\n exp = +exp;\n // If the value is not a number or the exp is not an integer...\n if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {\n return NaN;\n }\n // Shift\n value = value.toString().split('e');\n value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));\n // Shift back\n value = value.toString().split('e');\n return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));\n };\n\n var lazyEvaluate = function(message, scope) {\n if (isFunction(message)) {\n return message(scope);\n } else {\n return message;\n }\n };\n\n var merge = function (dest, obj) {\n var key, value;\n for (key in obj) if (obj.hasOwnProperty(key)) {\n value = obj[key];\n if (isString(value) || isNumber(value) || isBoolean(value) || isArray(value) || isNull(value)) {\n dest[key] = value;\n } else {\n if (dest[key] == null) dest[key] = {};\n merge(dest[key], value);\n }\n }\n return dest;\n };\n\n // Set default days/months translations.\n var DATE = {\n day_names: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]\n , abbr_day_names: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\n , month_names: [null, \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]\n , abbr_month_names: [null, \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n , meridian: [\"AM\", \"PM\"]\n };\n\n // Set default number format.\n var NUMBER_FORMAT = {\n precision: 3\n , separator: \".\"\n , delimiter: \",\"\n , strip_insignificant_zeros: false\n };\n\n // Set default currency format.\n var CURRENCY_FORMAT = {\n unit: \"$\"\n , precision: 2\n , format: \"%u%n\"\n , sign_first: true\n , delimiter: \",\"\n , separator: \".\"\n };\n\n // Set default percentage format.\n var PERCENTAGE_FORMAT = {\n unit: \"%\"\n , precision: 3\n , format: \"%n%u\"\n , separator: \".\"\n , delimiter: \"\"\n };\n\n // Set default size units.\n var SIZE_UNITS = [null, \"kb\", \"mb\", \"gb\", \"tb\"];\n\n // Other default options\n var DEFAULT_OPTIONS = {\n // Set default locale. This locale will be used when fallback is enabled and\n // the translation doesn't exist in a particular locale.\n defaultLocale: \"en\"\n // Set the current locale to `en`.\n , locale: \"en\"\n // Set the translation key separator.\n , defaultSeparator: \".\"\n // Set the placeholder format. Accepts `{{placeholder}}` and `%{placeholder}`.\n , placeholder: /(?:\\{\\{|%\\{)(.*?)(?:\\}\\}?)/gm\n // Set if engine should fallback to the default locale when a translation\n // is missing.\n , fallbacks: false\n // Set the default translation object.\n , translations: {}\n // Set missing translation behavior. 'message' will display a message\n // that the translation is missing, 'guess' will try to guess the string\n , missingBehaviour: 'message'\n // if you use missingBehaviour with 'message', but want to know that the\n // string is actually missing for testing purposes, you can prefix the\n // guessed string by setting the value here. By default, no prefix!\n , missingTranslationPrefix: ''\n };\n\n // Set default locale. This locale will be used when fallback is enabled and\n // the translation doesn't exist in a particular locale.\n I18n.reset = function() {\n var key;\n for (key in DEFAULT_OPTIONS) {\n this[key] = DEFAULT_OPTIONS[key];\n }\n };\n\n // Much like `reset`, but only assign options if not already assigned\n I18n.initializeOptions = function() {\n var key;\n for (key in DEFAULT_OPTIONS) if (!isSet(this[key])) {\n this[key] = DEFAULT_OPTIONS[key];\n }\n };\n I18n.initializeOptions();\n\n // Return a list of all locales that must be tried before returning the\n // missing translation message. By default, this will consider the inline option,\n // current locale and fallback locale.\n //\n // I18n.locales.get(\"de-DE\");\n // // [\"de-DE\", \"de\", \"en\"]\n //\n // You can define custom rules for any locale. Just make sure you return a array\n // containing all locales.\n //\n // // Default the Wookie locale to English.\n // I18n.locales[\"wk\"] = function(locale) {\n // return [\"en\"];\n // };\n //\n I18n.locales = {};\n\n // Retrieve locales based on inline locale, current locale or default to\n // I18n's detection.\n I18n.locales.get = function(locale) {\n var result = this[locale] || this[I18n.locale] || this[\"default\"];\n\n if (isFunction(result)) {\n result = result(locale);\n }\n\n if (isArray(result) === false) {\n result = [result];\n }\n\n return result;\n };\n\n // The default locale list.\n I18n.locales[\"default\"] = function(locale) {\n var locales = []\n , list = []\n ;\n\n // Handle the inline locale option that can be provided to\n // the `I18n.t` options.\n if (locale) {\n locales.push(locale);\n }\n\n // Add the current locale to the list.\n if (!locale && I18n.locale) {\n locales.push(I18n.locale);\n }\n\n // Add the default locale if fallback strategy is enabled.\n if (I18n.fallbacks && I18n.defaultLocale) {\n locales.push(I18n.defaultLocale);\n }\n\n // Locale code format 1:\n // According to RFC4646 (http://www.ietf.org/rfc/rfc4646.txt)\n // language codes for Traditional Chinese should be `zh-Hant`\n //\n // But due to backward compatibility\n // We use older version of IETF language tag\n // @see http://www.w3.org/TR/html401/struct/dirlang.html\n // @see http://en.wikipedia.org/wiki/IETF_language_tag\n //\n // Format: `language-code = primary-code ( \"-\" subcode )*`\n //\n // primary-code uses ISO639-1\n // @see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\n // @see http://www.iso.org/iso/home/standards/language_codes.htm\n //\n // subcode uses ISO 3166-1 alpha-2\n // @see http://en.wikipedia.org/wiki/ISO_3166\n // @see http://www.iso.org/iso/country_codes.htm\n //\n // @note\n // subcode can be in upper case or lower case\n // defining it in upper case is a convention only\n\n\n // Locale code format 2:\n // Format: `code = primary-code ( \"-\" region-code )*`\n // primary-code uses ISO 639-1\n // script-code uses ISO 15924\n // region-code uses ISO 3166-1 alpha-2\n // Example: zh-Hant-TW, en-HK, zh-Hant-CN\n //\n // It is similar to RFC4646 (or actually the same),\n // but seems to be limited to language, script, region\n\n // Compute each locale with its country code.\n // So this will return an array containing\n // `de-DE` and `de`\n // or\n // `zh-hans-tw`, `zh-hans`, `zh`\n // locales.\n locales.forEach(function(locale) {\n var localeParts = locale.split(\"-\");\n var firstFallback = null;\n var secondFallback = null;\n if (localeParts.length === 3) {\n firstFallback = [\n localeParts[0],\n localeParts[1]\n ].join(\"-\");\n secondFallback = localeParts[0];\n }\n else if (localeParts.length === 2) {\n firstFallback = localeParts[0];\n }\n\n if (list.indexOf(locale) === -1) {\n list.push(locale);\n }\n\n if (! I18n.fallbacks) {\n return;\n }\n\n [\n firstFallback,\n secondFallback\n ].forEach(function(nullableFallbackLocale) {\n // We don't want null values\n if (typeof nullableFallbackLocale === \"undefined\") { return; }\n if (nullableFallbackLocale === null) { return; }\n // We don't want duplicate values\n //\n // Comparing with `locale` first is faster than\n // checking whether value's presence in the list\n if (nullableFallbackLocale === locale) { return; }\n if (list.indexOf(nullableFallbackLocale) !== -1) { return; }\n\n list.push(nullableFallbackLocale);\n });\n });\n\n // No locales set? English it is.\n if (!locales.length) {\n locales.push(\"en\");\n }\n\n return list;\n };\n\n // Hold pluralization rules.\n I18n.pluralization = {};\n\n // Return the pluralizer for a specific locale.\n // If no specify locale is found, then I18n's default will be used.\n I18n.pluralization.get = function(locale) {\n return this[locale] || this[I18n.locale] || this[\"default\"];\n };\n\n // The default pluralizer rule.\n // It detects the `zero`, `one`, and `other` scopes.\n I18n.pluralization[\"default\"] = function(count) {\n switch (count) {\n case 0: return [\"zero\", \"other\"];\n case 1: return [\"one\"];\n default: return [\"other\"];\n }\n };\n\n // Return current locale. If no locale has been set, then\n // the current locale will be the default locale.\n I18n.currentLocale = function() {\n return this.locale || this.defaultLocale;\n };\n\n // Check if value is different than undefined and null;\n I18n.isSet = isSet;\n\n // Find and process the translation using the provided scope and options.\n // This is used internally by some functions and should not be used as an\n // public API.\n I18n.lookup = function(scope, options) {\n options = options || {};\n\n var locales = this.locales.get(options.locale).slice()\n , locale\n , scopes\n , fullScope\n , translations\n ;\n\n fullScope = this.getFullScope(scope, options);\n\n while (locales.length) {\n locale = locales.shift();\n scopes = fullScope.split(options.separator || this.defaultSeparator);\n translations = this.translations[locale];\n\n if (!translations) {\n continue;\n }\n while (scopes.length) {\n translations = translations[scopes.shift()];\n\n if (translations === undefined || translations === null) {\n break;\n }\n }\n\n if (translations !== undefined && translations !== null) {\n return translations;\n }\n }\n\n if (isSet(options.defaultValue)) {\n return lazyEvaluate(options.defaultValue, scope);\n }\n };\n\n // lookup pluralization rule key into translations\n I18n.pluralizationLookupWithoutFallback = function(count, locale, translations) {\n var pluralizer = this.pluralization.get(locale)\n , pluralizerKeys = pluralizer(count)\n , pluralizerKey\n , message;\n\n if (isObject(translations)) {\n while (pluralizerKeys.length) {\n pluralizerKey = pluralizerKeys.shift();\n if (isSet(translations[pluralizerKey])) {\n message = translations[pluralizerKey];\n break;\n }\n }\n }\n\n return message;\n };\n\n // Lookup dedicated to pluralization\n I18n.pluralizationLookup = function(count, scope, options) {\n options = options || {};\n var locales = this.locales.get(options.locale).slice()\n , locale\n , scopes\n , translations\n , message\n ;\n scope = this.getFullScope(scope, options);\n\n while (locales.length) {\n locale = locales.shift();\n scopes = scope.split(options.separator || this.defaultSeparator);\n translations = this.translations[locale];\n\n if (!translations) {\n continue;\n }\n\n while (scopes.length) {\n translations = translations[scopes.shift()];\n if (!isObject(translations)) {\n break;\n }\n if (scopes.length === 0) {\n message = this.pluralizationLookupWithoutFallback(count, locale, translations);\n }\n }\n if (typeof message !== \"undefined\" && message !== null) {\n break;\n }\n }\n\n if (typeof message === \"undefined\" || message === null) {\n if (isSet(options.defaultValue)) {\n if (isObject(options.defaultValue)) {\n message = this.pluralizationLookupWithoutFallback(count, options.locale, options.defaultValue);\n } else {\n message = options.defaultValue;\n }\n translations = options.defaultValue;\n }\n }\n\n return { message: message, translations: translations };\n };\n\n // Rails changed the way the meridian is stored.\n // It started with `date.meridian` returning an array,\n // then it switched to `time.am` and `time.pm`.\n // This function abstracts this difference and returns\n // the correct meridian or the default value when none is provided.\n I18n.meridian = function() {\n var time = this.lookup(\"time\");\n var date = this.lookup(\"date\");\n\n if (time && time.am && time.pm) {\n return [time.am, time.pm];\n } else if (date && date.meridian) {\n return date.meridian;\n } else {\n return DATE.meridian;\n }\n };\n\n // Merge serveral hash options, checking if value is set before\n // overwriting any value. The precedence is from left to right.\n //\n // I18n.prepareOptions({name: \"John Doe\"}, {name: \"Mary Doe\", role: \"user\"});\n // #=> {name: \"John Doe\", role: \"user\"}\n //\n I18n.prepareOptions = function() {\n var args = slice.call(arguments)\n , options = {}\n , subject\n ;\n\n while (args.length) {\n subject = args.shift();\n\n if (typeof(subject) != \"object\") {\n continue;\n }\n\n for (var attr in subject) {\n if (!subject.hasOwnProperty(attr)) {\n continue;\n }\n\n if (isSet(options[attr])) {\n continue;\n }\n\n options[attr] = subject[attr];\n }\n }\n\n return options;\n };\n\n // Generate a list of translation options for default fallbacks.\n // `defaultValue` is also deleted from options as it is returned as part of\n // the translationOptions array.\n I18n.createTranslationOptions = function(scope, options) {\n var translationOptions = [{scope: scope}];\n\n // Defaults should be an array of hashes containing either\n // fallback scopes or messages\n if (isSet(options.defaults)) {\n translationOptions = translationOptions.concat(options.defaults);\n }\n\n // Maintain support for defaultValue. Since it is always a message\n // insert it in to the translation options as such.\n if (isSet(options.defaultValue)) {\n translationOptions.push({ message: options.defaultValue });\n }\n\n return translationOptions;\n };\n\n // Translate the given scope with the provided options.\n I18n.translate = function(scope, options) {\n options = options || {};\n\n var translationOptions = this.createTranslationOptions(scope, options);\n\n var translation;\n var usedScope = scope;\n\n var optionsWithoutDefault = this.prepareOptions(options)\n delete optionsWithoutDefault.defaultValue\n\n // Iterate through the translation options until a translation\n // or message is found.\n var translationFound =\n translationOptions.some(function(translationOption) {\n if (isSet(translationOption.scope)) {\n usedScope = translationOption.scope;\n translation = this.lookup(usedScope, optionsWithoutDefault);\n } else if (isSet(translationOption.message)) {\n translation = lazyEvaluate(translationOption.message, scope);\n }\n\n if (translation !== undefined && translation !== null) {\n return true;\n }\n }, this);\n\n if (!translationFound) {\n return this.missingTranslation(scope, options);\n }\n\n if (typeof(translation) === \"string\") {\n translation = this.interpolate(translation, options);\n } else if (isArray(translation)) {\n translation = translation.map(function(t) {\n return (typeof(t) === \"string\" ? this.interpolate(t, options) : t);\n }, this);\n } else if (isObject(translation) && isSet(options.count)) {\n translation = this.pluralize(options.count, usedScope, options);\n }\n\n return translation;\n };\n\n // This function interpolates the all variables in the given message.\n I18n.interpolate = function(message, options) {\n if (message == null) {\n return message;\n }\n\n options = options || {};\n var matches = message.match(this.placeholder)\n , placeholder\n , value\n , name\n , regex\n ;\n\n if (!matches) {\n return message;\n }\n\n while (matches.length) {\n placeholder = matches.shift();\n name = placeholder.replace(this.placeholder, \"$1\");\n\n if (isSet(options[name])) {\n value = options[name].toString().replace(/\\$/gm, \"_#$#_\");\n } else if (name in options) {\n value = this.nullPlaceholder(placeholder, message, options);\n } else {\n value = this.missingPlaceholder(placeholder, message, options);\n }\n\n regex = new RegExp(placeholder.replace(/{/gm, \"\\\\{\").replace(/}/gm, \"\\\\}\"));\n message = message.replace(regex, value);\n }\n\n return message.replace(/_#\\$#_/g, \"$\");\n };\n\n // Pluralize the given scope using the `count` value.\n // The pluralized translation may have other placeholders,\n // which will be retrieved from `options`.\n I18n.pluralize = function(count, scope, options) {\n options = this.prepareOptions({count: String(count)}, options)\n var pluralizer, result;\n\n result = this.pluralizationLookup(count, scope, options);\n if (typeof result.translations === \"undefined\" || result.translations == null) {\n return this.missingTranslation(scope, options);\n }\n\n if (typeof result.message !== \"undefined\" && result.message != null) {\n return this.interpolate(result.message, options);\n }\n else {\n pluralizer = this.pluralization.get(options.locale);\n return this.missingTranslation(scope + '.' + pluralizer(count)[0], options);\n }\n };\n\n // Return a missing translation message for the given parameters.\n I18n.missingTranslation = function(scope, options) {\n //guess intended string\n if(this.missingBehaviour === 'guess'){\n //get only the last portion of the scope\n var s = scope.split('.').slice(-1)[0];\n //replace underscore with space && camelcase with space and lowercase letter\n return (this.missingTranslationPrefix.length > 0 ? this.missingTranslationPrefix : '') +\n s.replace(/_/g,' ').replace(/([a-z])([A-Z])/g,\n function(match, p1, p2) {return p1 + ' ' + p2.toLowerCase()} );\n }\n\n var localeForTranslation = (options != null && options.locale != null) ? options.locale : this.currentLocale();\n var fullScope = this.getFullScope(scope, options);\n var fullScopeWithLocale = [localeForTranslation, fullScope].join(options.separator || this.defaultSeparator);\n\n return '[missing \"' + fullScopeWithLocale + '\" translation]';\n };\n\n // Return a missing placeholder message for given parameters\n I18n.missingPlaceholder = function(placeholder, message, options) {\n return \"[missing \" + placeholder + \" value]\";\n };\n\n I18n.nullPlaceholder = function() {\n return I18n.missingPlaceholder.apply(I18n, arguments);\n };\n\n // Format number using localization rules.\n // The options will be retrieved from the `number.format` scope.\n // If this isn't present, then the following options will be used:\n //\n // - `precision`: `3`\n // - `separator`: `\".\"`\n // - `delimiter`: `\",\"`\n // - `strip_insignificant_zeros`: `false`\n //\n // You can also override these options by providing the `options` argument.\n //\n I18n.toNumber = function(number, options) {\n options = this.prepareOptions(\n options\n , this.lookup(\"number.format\")\n , NUMBER_FORMAT\n );\n\n var negative = number < 0\n , string = toFixed(Math.abs(number), options.precision).toString()\n , parts = string.split(\".\")\n , precision\n , buffer = []\n , formattedNumber\n , format = options.format || \"%n\"\n , sign = negative ? \"-\" : \"\"\n ;\n\n number = parts[0];\n precision = parts[1];\n\n while (number.length > 0) {\n buffer.unshift(number.substr(Math.max(0, number.length - 3), 3));\n number = number.substr(0, number.length -3);\n }\n\n formattedNumber = buffer.join(options.delimiter);\n\n if (options.strip_insignificant_zeros && precision) {\n precision = precision.replace(/0+$/, \"\");\n }\n\n if (options.precision > 0 && precision) {\n formattedNumber += options.separator + precision;\n }\n\n if (options.sign_first) {\n format = \"%s\" + format;\n }\n else {\n format = format.replace(\"%n\", \"%s%n\");\n }\n\n formattedNumber = format\n .replace(\"%u\", options.unit)\n .replace(\"%n\", formattedNumber)\n .replace(\"%s\", sign)\n ;\n\n return formattedNumber;\n };\n\n // Format currency with localization rules.\n // The options will be retrieved from the `number.currency.format` and\n // `number.format` scopes, in that order.\n //\n // Any missing option will be retrieved from the `I18n.toNumber` defaults and\n // the following options:\n //\n // - `unit`: `\"$\"`\n // - `precision`: `2`\n // - `format`: `\"%u%n\"`\n // - `delimiter`: `\",\"`\n // - `separator`: `\".\"`\n //\n // You can also override these options by providing the `options` argument.\n //\n I18n.toCurrency = function(number, options) {\n options = this.prepareOptions(\n options\n , this.lookup(\"number.currency.format\", options)\n , this.lookup(\"number.format\", options)\n , CURRENCY_FORMAT\n );\n\n return this.toNumber(number, options);\n };\n\n // Localize several values.\n // You can provide the following scopes: `currency`, `number`, or `percentage`.\n // If you provide a scope that matches the `/^(date|time)/` regular expression\n // then the `value` will be converted by using the `I18n.toTime` function.\n //\n // It will default to the value's `toString` function.\n //\n I18n.localize = function(scope, value, options) {\n options || (options = {});\n\n switch (scope) {\n case \"currency\":\n return this.toCurrency(value, options);\n case \"number\":\n scope = this.lookup(\"number.format\", options);\n return this.toNumber(value, scope);\n case \"percentage\":\n return this.toPercentage(value, options);\n default:\n var localizedValue;\n\n if (scope.match(/^(date|time)/)) {\n localizedValue = this.toTime(scope, value, options);\n } else {\n localizedValue = value.toString();\n }\n\n return this.interpolate(localizedValue, options);\n }\n };\n\n // Parse a given `date` string into a JavaScript Date object.\n // This function is time zone aware.\n //\n // The following string formats are recognized:\n //\n // yyyy-mm-dd\n // yyyy-mm-dd[ T]hh:mm::ss\n // yyyy-mm-dd[ T]hh:mm::ss\n // yyyy-mm-dd[ T]hh:mm::ssZ\n // yyyy-mm-dd[ T]hh:mm::ss+0000\n // yyyy-mm-dd[ T]hh:mm::ss+00:00\n // yyyy-mm-dd[ T]hh:mm::ss.123Z\n //\n I18n.parseDate = function(date) {\n var matches, convertedDate, fraction;\n // A date input of `null` or `undefined` will be returned as-is\n if (date == null) {\n return date;\n }\n // we have a date, so just return it.\n if (typeof(date) === \"object\") {\n return date;\n }\n\n matches = date.toString().match(/(\\d{4})-(\\d{2})-(\\d{2})(?:[ T](\\d{2}):(\\d{2}):(\\d{2})([\\.,]\\d{1,3})?)?(Z|\\+00:?00)?/);\n\n if (matches) {\n for (var i = 1; i <= 6; i++) {\n matches[i] = parseInt(matches[i], 10) || 0;\n }\n\n // month starts on 0\n matches[2] -= 1;\n\n fraction = matches[7] ? 1000 * (\"0\" + matches[7]) : null;\n\n if (matches[8]) {\n convertedDate = new Date(Date.UTC(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6], fraction));\n } else {\n convertedDate = new Date(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6], fraction);\n }\n } else if (typeof(date) == \"number\") {\n // UNIX timestamp\n convertedDate = new Date();\n convertedDate.setTime(date);\n } else if (date.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\\d+) (\\d+:\\d+:\\d+) ([+-]\\d+) (\\d+)/)) {\n // This format `Wed Jul 20 13:03:39 +0000 2011` is parsed by\n // webkit/firefox, but not by IE, so we must parse it manually.\n convertedDate = new Date();\n convertedDate.setTime(Date.parse([\n RegExp.$1, RegExp.$2, RegExp.$3, RegExp.$6, RegExp.$4, RegExp.$5\n ].join(\" \")));\n } else if (date.match(/\\d+ \\d+:\\d+:\\d+ [+-]\\d+ \\d+/)) {\n // a valid javascript format with timezone info\n convertedDate = new Date();\n convertedDate.setTime(Date.parse(date));\n } else {\n // an arbitrary javascript string\n convertedDate = new Date();\n convertedDate.setTime(Date.parse(date));\n }\n\n return convertedDate;\n };\n\n // Formats time according to the directives in the given format string.\n // The directives begins with a percent (%) character. Any text not listed as a\n // directive will be passed through to the output string.\n //\n // The accepted formats are:\n //\n // %a - The abbreviated weekday name (Sun)\n // %A - The full weekday name (Sunday)\n // %b - The abbreviated month name (Jan)\n // %B - The full month name (January)\n // %c - The preferred local date and time representation\n // %d - Day of the month (01..31)\n // %-d - Day of the month (1..31)\n // %H - Hour of the day, 24-hour clock (00..23)\n // %-H/%k - Hour of the day, 24-hour clock (0..23)\n // %I - Hour of the day, 12-hour clock (01..12)\n // %-I/%l - Hour of the day, 12-hour clock (1..12)\n // %m - Month of the year (01..12)\n // %-m - Month of the year (1..12)\n // %M - Minute of the hour (00..59)\n // %-M - Minute of the hour (0..59)\n // %p - Meridian indicator (AM or PM)\n // %P - Meridian indicator (am or pm)\n // %S - Second of the minute (00..60)\n // %-S - Second of the minute (0..60)\n // %w - Day of the week (Sunday is 0, 0..6)\n // %y - Year without a century (00..99)\n // %-y - Year without a century (0..99)\n // %Y - Year with century\n // %z/%Z - Timezone offset (+0545)\n //\n I18n.strftime = function(date, format, options) {\n var options = this.lookup(\"date\", options)\n , meridianOptions = I18n.meridian()\n ;\n\n if (!options) {\n options = {};\n }\n\n options = this.prepareOptions(options, DATE);\n\n if (isNaN(date.getTime())) {\n throw new Error('I18n.strftime() requires a valid date object, but received an invalid date.');\n }\n\n var weekDay = date.getDay()\n , day = date.getDate()\n , year = date.getFullYear()\n , month = date.getMonth() + 1\n , hour = date.getHours()\n , hour12 = hour\n , meridian = hour > 11 ? 1 : 0\n , secs = date.getSeconds()\n , mins = date.getMinutes()\n , offset = date.getTimezoneOffset()\n , absOffsetHours = Math.floor(Math.abs(offset / 60))\n , absOffsetMinutes = Math.abs(offset) - (absOffsetHours * 60)\n , timezoneoffset = (offset > 0 ? \"-\" : \"+\") +\n (absOffsetHours.toString().length < 2 ? \"0\" + absOffsetHours : absOffsetHours) +\n (absOffsetMinutes.toString().length < 2 ? \"0\" + absOffsetMinutes : absOffsetMinutes)\n ;\n\n if (hour12 > 12) {\n hour12 = hour12 - 12;\n } else if (hour12 === 0) {\n hour12 = 12;\n }\n\n format = format.replace(\"%a\", options.abbr_day_names[weekDay]);\n format = format.replace(\"%A\", options.day_names[weekDay]);\n format = format.replace(\"%b\", options.abbr_month_names[month]);\n format = format.replace(\"%B\", options.month_names[month]);\n format = format.replace(\"%d\", padding(day));\n format = format.replace(\"%e\", day);\n format = format.replace(\"%-d\", day);\n format = format.replace(\"%H\", padding(hour));\n format = format.replace(\"%-H\", hour);\n format = format.replace(\"%k\", hour);\n format = format.replace(\"%I\", padding(hour12));\n format = format.replace(\"%-I\", hour12);\n format = format.replace(\"%l\", hour12);\n format = format.replace(\"%m\", padding(month));\n format = format.replace(\"%-m\", month);\n format = format.replace(\"%M\", padding(mins));\n format = format.replace(\"%-M\", mins);\n format = format.replace(\"%p\", meridianOptions[meridian]);\n format = format.replace(\"%P\", meridianOptions[meridian].toLowerCase());\n format = format.replace(\"%S\", padding(secs));\n format = format.replace(\"%-S\", secs);\n format = format.replace(\"%w\", weekDay);\n format = format.replace(\"%y\", padding(year));\n format = format.replace(\"%-y\", padding(year).replace(/^0+/, \"\"));\n format = format.replace(\"%Y\", year);\n format = format.replace(\"%z\", timezoneoffset);\n format = format.replace(\"%Z\", timezoneoffset);\n\n return format;\n };\n\n // Convert the given dateString into a formatted date.\n I18n.toTime = function(scope, dateString, options) {\n var date = this.parseDate(dateString)\n , format = this.lookup(scope, options)\n ;\n\n // A date input of `null` or `undefined` will be returned as-is\n if (date == null) {\n return date;\n }\n\n var date_string = date.toString()\n if (date_string.match(/invalid/i)) {\n return date_string;\n }\n\n if (!format) {\n return date_string;\n }\n\n return this.strftime(date, format, options);\n };\n\n // Convert a number into a formatted percentage value.\n I18n.toPercentage = function(number, options) {\n options = this.prepareOptions(\n options\n , this.lookup(\"number.percentage.format\", options)\n , this.lookup(\"number.format\", options)\n , PERCENTAGE_FORMAT\n );\n\n return this.toNumber(number, options);\n };\n\n // Convert a number into a readable size representation.\n I18n.toHumanSize = function(number, options) {\n var kb = 1024\n , size = number\n , iterations = 0\n , unit\n , precision\n , fullScope\n ;\n\n while (size >= kb && iterations < 4) {\n size = size / kb;\n iterations += 1;\n }\n\n if (iterations === 0) {\n fullScope = this.getFullScope(\"number.human.storage_units.units.byte\", options);\n unit = this.t(fullScope, {count: size});\n precision = 0;\n } else {\n fullScope = this.getFullScope(\"number.human.storage_units.units.\" + SIZE_UNITS[iterations], options);\n unit = this.t(fullScope);\n precision = (size - Math.floor(size) === 0) ? 0 : 1;\n }\n\n options = this.prepareOptions(\n options\n , {unit: unit, precision: precision, format: \"%n%u\", delimiter: \"\"}\n );\n\n return this.toNumber(size, options);\n };\n\n I18n.getFullScope = function(scope, options) {\n options = options || {};\n\n // Deal with the scope as an array.\n if (isArray(scope)) {\n scope = scope.join(options.separator || this.defaultSeparator);\n }\n\n // Deal with the scope option provided through the second argument.\n //\n // I18n.t('hello', {scope: 'greetings'});\n //\n if (options.scope) {\n scope = [options.scope, scope].join(options.separator || this.defaultSeparator);\n }\n\n return scope;\n };\n /**\n * Merge obj1 with obj2 (shallow merge), without modifying inputs\n * @param {Object} obj1\n * @param {Object} obj2\n * @returns {Object} Merged values of obj1 and obj2\n *\n * In order to support ES3, `Object.prototype.hasOwnProperty.call` is used\n * Idea is from:\n * https://stackoverflow.com/questions/8157700/object-has-no-hasownproperty-method-i-e-its-undefined-ie8\n */\n I18n.extend = function ( obj1, obj2 ) {\n if (typeof(obj1) === \"undefined\" && typeof(obj2) === \"undefined\") {\n return {};\n }\n return merge(obj1, obj2);\n };\n\n // Set aliases, so we can save some typing.\n I18n.t = I18n.translate.bind(I18n);\n I18n.l = I18n.localize.bind(I18n);\n I18n.p = I18n.pluralize.bind(I18n);\n\n return I18n;\n}));\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar getBoundingClientRect = function getBoundingClientRect(node) {\n if (node != null) {\n var isElement = node.nodeType === 1;\n /* Node.ELEMENT_NODE */\n\n if (isElement && typeof node.getBoundingClientRect === 'function') {\n return node.getBoundingClientRect();\n }\n }\n};\n\nexport default getBoundingClientRect;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar CSS_UNIT_RE = /^[+-]?\\d*(?:\\.\\d+)?(?:[Ee][+-]?\\d+)?(%|\\w*)/;\n\nvar getUnit = function getUnit(str) {\n return str.match(CSS_UNIT_RE)[1];\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n};\n\nvar multiplyStyleLengthValue = function multiplyStyleLengthValue(value, multiple) {\n if (typeof value === 'string') {\n var number = parseFloat(value) * multiple;\n var unit = getUnit(value);\n return \"\" + number + unit;\n } else if (isNumeric(value)) {\n return value * multiple;\n }\n};\n\nexport default multiplyStyleLengthValue;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isPrefixedValue;\nvar regex = /-webkit-|-moz-|-ms-/;\n\nfunction isPrefixedValue(value) {\n return typeof value === 'string' && regex.test(value);\n}\nmodule.exports = exports['default'];","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport View from '../View';\n\nvar KeyboardAvoidingView = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(KeyboardAvoidingView, _React$Component);\n\n function KeyboardAvoidingView() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.frame = null;\n\n _this.onLayout = function (event) {\n _this.frame = event.nativeEvent.layout;\n };\n\n return _this;\n }\n\n var _proto = KeyboardAvoidingView.prototype;\n\n _proto.relativeKeyboardHeight = function relativeKeyboardHeight(keyboardFrame) {\n var frame = this.frame;\n\n if (!frame || !keyboardFrame) {\n return 0;\n }\n\n var keyboardY = keyboardFrame.screenY - (this.props.keyboardVerticalOffset || 0);\n return Math.max(frame.y + frame.height - keyboardY, 0);\n };\n\n _proto.onKeyboardChange = function onKeyboardChange(event) {};\n\n _proto.render = function render() {\n var _this$props = this.props,\n behavior = _this$props.behavior,\n contentContainerStyle = _this$props.contentContainerStyle,\n keyboardVerticalOffset = _this$props.keyboardVerticalOffset,\n rest = _objectWithoutPropertiesLoose(_this$props, [\"behavior\", \"contentContainerStyle\", \"keyboardVerticalOffset\"]);\n\n return /*#__PURE__*/React.createElement(View, _extends({\n onLayout: this.onLayout\n }, rest));\n };\n\n return KeyboardAvoidingView;\n}(React.Component);\n\nexport default KeyboardAvoidingView;","import { nanoid } from 'nanoid/non-secure';\nimport type {\n CommonNavigationAction,\n NavigationState,\n PartialState,\n} from './types';\n\n/**\n * Base router object that can be used when writing custom routers.\n * This provides few helper methods to handle common actions such as `RESET`.\n */\nconst BaseRouter = {\n getStateForAction<State extends NavigationState>(\n state: State,\n action: CommonNavigationAction\n ): State | PartialState<State> | null {\n switch (action.type) {\n case 'SET_PARAMS': {\n const index = action.source\n ? state.routes.findIndex((r) => r.key === action.source)\n : state.index;\n\n if (index === -1) {\n return null;\n }\n\n return {\n ...state,\n routes: state.routes.map((r, i) =>\n i === index\n ? { ...r, params: { ...r.params, ...action.payload.params } }\n : r\n ),\n };\n }\n\n case 'RESET': {\n const nextState = action.payload as State | PartialState<State>;\n\n if (\n nextState.routes.length === 0 ||\n nextState.routes.some(\n (route: { name: string }) => !state.routeNames.includes(route.name)\n )\n ) {\n return null;\n }\n\n if (nextState.stale === false) {\n if (\n state.routeNames.length !== nextState.routeNames.length ||\n nextState.routeNames.some(\n (name) => !state.routeNames.includes(name)\n )\n ) {\n return null;\n }\n\n return {\n ...nextState,\n routes: nextState.routes.map((route) =>\n route.key ? route : { ...route, key: `${route.name}-${nanoid()}` }\n ),\n };\n }\n\n return nextState;\n }\n\n default:\n return null;\n }\n },\n\n shouldActionChangeFocus(action: CommonNavigationAction) {\n return action.type === 'NAVIGATE';\n },\n};\n\nexport default BaseRouter;\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar RootTagContext = /*#__PURE__*/React.createContext(null);\nexport default function AppContainer(props) {\n var children = props.children,\n WrapperComponent = props.WrapperComponent;\n var innerView = /*#__PURE__*/React.createElement(View, {\n children: children,\n key: 1,\n pointerEvents: \"box-none\",\n style: styles.appContainer\n });\n\n if (WrapperComponent) {\n innerView = /*#__PURE__*/React.createElement(WrapperComponent, null, innerView);\n }\n\n return /*#__PURE__*/React.createElement(RootTagContext.Provider, {\n value: props.rootTag\n }, /*#__PURE__*/React.createElement(View, {\n pointerEvents: \"box-none\",\n style: styles.appContainer\n }, innerView));\n}\nvar styles = StyleSheet.create({\n appContainer: {\n flex: 1\n }\n});","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport AppContainer from './AppContainer';\nimport invariant from 'fbjs/lib/invariant';\nimport render, { hydrate } from '../render';\nimport styleResolver from '../StyleSheet/styleResolver';\nimport React from 'react';\nexport default function renderApplication(RootComponent, WrapperComponent, callback, options) {\n var shouldHydrate = options.hydrate,\n initialProps = options.initialProps,\n rootTag = options.rootTag;\n var renderFn = shouldHydrate ? hydrate : render;\n invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);\n renderFn( /*#__PURE__*/React.createElement(AppContainer, {\n WrapperComponent: WrapperComponent,\n rootTag: rootTag\n }, /*#__PURE__*/React.createElement(RootComponent, initialProps)), rootTag, callback);\n}\nexport function getApplication(RootComponent, initialProps, WrapperComponent) {\n var element = /*#__PURE__*/React.createElement(AppContainer, {\n WrapperComponent: WrapperComponent,\n rootTag: {}\n }, /*#__PURE__*/React.createElement(RootComponent, initialProps)); // Don't escape CSS text\n\n var getStyleElement = function getStyleElement(props) {\n var sheet = styleResolver.getStyleSheet();\n return /*#__PURE__*/React.createElement(\"style\", _extends({}, props, {\n dangerouslySetInnerHTML: {\n __html: sheet.textContent\n },\n id: sheet.id\n }));\n };\n\n return {\n element: element,\n getStyleElement: getStyleElement\n };\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport invariant from 'fbjs/lib/invariant';\nimport unmountComponentAtNode from '../unmountComponentAtNode';\nimport renderApplication, { getApplication as _getApplication } from './renderApplication';\nvar emptyObject = {};\nvar runnables = {};\n\nvar componentProviderInstrumentationHook = function componentProviderInstrumentationHook(component) {\n return component();\n};\n\nvar wrapperComponentProvider;\n/**\n * `AppRegistry` is the JS entry point to running all React Native apps.\n */\n\nvar AppRegistry = /*#__PURE__*/function () {\n function AppRegistry() {}\n\n AppRegistry.getAppKeys = function getAppKeys() {\n return Object.keys(runnables);\n };\n\n AppRegistry.getApplication = function getApplication(appKey, appParameters) {\n invariant(runnables[appKey] && runnables[appKey].getApplication, \"Application \" + appKey + \" has not been registered. \" + 'This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.');\n return runnables[appKey].getApplication(appParameters);\n };\n\n AppRegistry.registerComponent = function registerComponent(appKey, componentProvider) {\n runnables[appKey] = {\n getApplication: function getApplication(appParameters) {\n return _getApplication(componentProviderInstrumentationHook(componentProvider), appParameters ? appParameters.initialProps : emptyObject, wrapperComponentProvider && wrapperComponentProvider(appParameters));\n },\n run: function run(appParameters) {\n return renderApplication(componentProviderInstrumentationHook(componentProvider), wrapperComponentProvider && wrapperComponentProvider(appParameters), appParameters.callback, {\n hydrate: appParameters.hydrate || false,\n initialProps: appParameters.initialProps || emptyObject,\n rootTag: appParameters.rootTag\n });\n }\n };\n return appKey;\n };\n\n AppRegistry.registerConfig = function registerConfig(config) {\n config.forEach(function (_ref) {\n var appKey = _ref.appKey,\n component = _ref.component,\n run = _ref.run;\n\n if (run) {\n AppRegistry.registerRunnable(appKey, run);\n } else {\n invariant(component, 'No component provider passed in');\n AppRegistry.registerComponent(appKey, component);\n }\n });\n } // TODO: fix style sheet creation when using this method\n ;\n\n AppRegistry.registerRunnable = function registerRunnable(appKey, run) {\n runnables[appKey] = {\n run: run\n };\n return appKey;\n };\n\n AppRegistry.runApplication = function runApplication(appKey, appParameters) {\n var isDevelopment = process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test';\n\n if (isDevelopment) {\n var params = _objectSpread({}, appParameters);\n\n params.rootTag = \"#\" + params.rootTag.id;\n console.log(\"Running application \\\"\" + appKey + \"\\\" with appParams:\\n\", params, \"\\nDevelopment-level warnings: \" + (isDevelopment ? 'ON' : 'OFF') + \".\" + (\"\\nPerformance optimizations: \" + (isDevelopment ? 'OFF' : 'ON') + \".\"));\n }\n\n invariant(runnables[appKey] && runnables[appKey].run, \"Application \\\"\" + appKey + \"\\\" has not been registered. \" + 'This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.');\n runnables[appKey].run(appParameters);\n };\n\n AppRegistry.setComponentProviderInstrumentationHook = function setComponentProviderInstrumentationHook(hook) {\n componentProviderInstrumentationHook = hook;\n };\n\n AppRegistry.setWrapperComponentProvider = function setWrapperComponentProvider(provider) {\n wrapperComponentProvider = provider;\n };\n\n AppRegistry.unmountApplicationComponentAtRootTag = function unmountApplicationComponentAtRootTag(rootTag) {\n unmountComponentAtNode(rootTag);\n };\n\n return AppRegistry;\n}();\n\nexport { AppRegistry as default };","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar unitlessNumbers = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n // transform types\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n // RN properties\n shadowOpacity: true\n};\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\nvar prefixes = ['ms', 'Moz', 'O', 'Webkit'];\n\nvar prefixKey = function prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n};\n\nObject.keys(unitlessNumbers).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n unitlessNumbers[prefixKey(prefix, prop)] = unitlessNumbers[prop];\n });\n});\nexport default unitlessNumbers;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar emptyObject = {};\nvar objects = {};\nvar prefix = 'r';\nvar uniqueID = 1;\n\nvar createKey = function createKey(id) {\n return prefix + \"-\" + id;\n};\n\nvar ReactNativePropRegistry = /*#__PURE__*/function () {\n function ReactNativePropRegistry() {}\n\n ReactNativePropRegistry.register = function register(object) {\n var id = uniqueID++;\n\n if (process.env.NODE_ENV !== 'production') {\n Object.freeze(object);\n }\n\n var key = createKey(id);\n objects[key] = object;\n return id;\n };\n\n ReactNativePropRegistry.getByID = function getByID(id) {\n if (!id) {\n // Used in the style={[condition && id]} pattern,\n // we want it to be a no-op when the value is false or null\n return emptyObject;\n }\n\n var key = createKey(id);\n var object = objects[key];\n\n if (!object) {\n console.warn('Invalid style with id `' + id + '`. Skipping ...');\n return emptyObject;\n }\n\n return object;\n };\n\n return ReactNativePropRegistry;\n}();\n\nexport { ReactNativePropRegistry as default };","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nvar UNINITIALIZED = typeof Symbol === 'function' && typeof Symbol() === 'symbol' ? Symbol() : Object.freeze({});\nexport default function useStable(getInitialValue) {\n var ref = React.useRef(UNINITIALIZED);\n\n if (ref.current === UNINITIALIZED) {\n ref.current = getInitialValue();\n } // $FlowFixMe (#64650789) Trouble refining types where `Symbol` is concerned.\n\n\n return ref.current;\n}","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n\n return (hint === \"string\" ? String : Number)(input);\n}\n\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar index = (function () {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var keyAccessors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var multiItem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var flattenKeys = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var keys = (keyAccessors instanceof Array ? keyAccessors.length ? keyAccessors : [undefined] : [keyAccessors]).map(function (key) {\n return {\n keyAccessor: key,\n isProp: !(key instanceof Function)\n };\n });\n var indexedResult = list.reduce(function (res, item) {\n var iterObj = res;\n var itemVal = item;\n keys.forEach(function (_ref, idx) {\n var keyAccessor = _ref.keyAccessor,\n isProp = _ref.isProp;\n var key;\n\n if (isProp) {\n var _itemVal = itemVal,\n propVal = _itemVal[keyAccessor],\n rest = _objectWithoutProperties(_itemVal, [keyAccessor].map(_toPropertyKey));\n\n key = propVal;\n itemVal = rest;\n } else {\n key = keyAccessor(itemVal, idx);\n }\n\n if (idx + 1 < keys.length) {\n if (!iterObj.hasOwnProperty(key)) {\n iterObj[key] = {};\n }\n\n iterObj = iterObj[key];\n } else {\n // Leaf key\n if (multiItem) {\n if (!iterObj.hasOwnProperty(key)) {\n iterObj[key] = [];\n }\n\n iterObj[key].push(itemVal);\n } else {\n iterObj[key] = itemVal;\n }\n }\n });\n return res;\n }, {});\n\n if (multiItem instanceof Function) {\n // Reduce leaf multiple values\n (function reduce(node) {\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n if (level === keys.length) {\n Object.keys(node).forEach(function (k) {\n return node[k] = multiItem(node[k]);\n });\n } else {\n Object.values(node).forEach(function (child) {\n return reduce(child, level + 1);\n });\n }\n })(indexedResult); // IIFE\n\n }\n\n var result = indexedResult;\n\n if (flattenKeys) {\n // flatten into array\n result = [];\n\n (function flatten(node) {\n var accKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n if (accKeys.length === keys.length) {\n result.push({\n keys: accKeys,\n vals: node\n });\n } else {\n Object.entries(node).forEach(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n key = _ref3[0],\n val = _ref3[1];\n\n return flatten(val, [].concat(_toConsumableArray(accKeys), [key]));\n });\n }\n })(indexedResult); //IIFE\n\n\n if (keyAccessors instanceof Array && keyAccessors.length === 0 && result.length === 1) {\n // clear keys if there's no key accessors (single result)\n result[0].keys = [];\n }\n }\n\n return result;\n});\n\nexport default index;\n","// TinyColor v1.4.2\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\n(function(Math) {\n\nvar trimLeft = /^\\s+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n mathRound = Math.round,\n mathMin = Math.min,\n mathMax = Math.max,\n mathRandom = Math.random;\n\nfunction tinycolor (color, opts) {\n\n color = (color) ? color : '';\n opts = opts || { };\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n this._originalInput = color,\n this._r = rgb.r,\n this._g = rgb.g,\n this._b = rgb.b,\n this._a = rgb.a,\n this._roundA = mathRound(100*this._a) / 100,\n this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) { this._r = mathRound(this._r); }\n if (this._g < 1) { this._g = mathRound(this._g); }\n if (this._b < 1) { this._b = mathRound(this._b); }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n}\n\ntinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r/255;\n GsRGB = rgb.g/255;\n BsRGB = rgb.b/255;\n\n if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}\n if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}\n if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}\n return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100*this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);\n return (this._a == 1) ?\n \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" :\n \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \"+ this._roundA + \")\";\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);\n return (this._a == 1) ?\n \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" :\n \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \"+ this._roundA + \")\";\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function(allow4Char) {\n return '#' + this.toHex8(allow4Char);\n },\n toRgb: function() {\n return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };\n },\n toRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \")\" :\n \"rgba(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function() {\n return { r: mathRound(bound01(this._r, 255) * 100) + \"%\", g: mathRound(bound01(this._g, 255) * 100) + \"%\", b: mathRound(bound01(this._b, 255) * 100) + \"%\", a: this._a };\n },\n toPercentageRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%)\" :\n \"rgba(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function() {\n if (this._a === 0) {\n return \"transparent\";\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n\n return \"progid:DXImageTransform.Microsoft.gradient(\"+gradientType+\"startColorstr=\"+hex8String+\",endColorstr=\"+secondHex8String+\")\";\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n clone: function() {\n return tinycolor(this.toString());\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function(color, opts) {\n if (typeof color == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n }\n else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n// \"red\"\n// \"#f00\" or \"f00\"\n// \"#ff0000\" or \"ff0000\"\n// \"#ff000000\" or \"ff000000\"\n// \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n// \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n// \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n// \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n// \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n// \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n// \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n}\n\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>\n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// <http://www.w3.org/TR/css3-color/>\n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b){\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, l = (max + min) / 2;\n\n if(max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if(t < 0) t += 1;\n if(t > 1) t -= 1;\n if(t < 1/6) return p + (q - p) * 6 * t;\n if(t < 1/2) return q;\n if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n }\n\n if(s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if(max == min) {\n h = 0; // achromatic\n }\n else {\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n pad2(convertDecimalToHex(a))\n ];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) { return false; }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\n\ntinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n};\n\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>\n\nfunction desaturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction saturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction greyscale(color) {\n return tinycolor(color).desaturate(100);\n}\n\nfunction lighten (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\nfunction brighten(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));\n return tinycolor(rgb);\n}\n\nfunction darken (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>\n\nfunction complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n}\n\nfunction triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})\n ];\n}\n\nfunction analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n}\n\nfunction monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h, s = hsv.s, v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v}));\n v = (v + modification) % 1;\n }\n\n return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function(color1, color2, amount) {\n amount = (amount === 0) ? 0 : (amount || 50);\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n\n var rgba = {\n r: ((rgb2.r - rgb1.r) * p) + rgb1.r,\n g: ((rgb2.g - rgb1.g) * p) + rgb1.g,\n b: ((rgb2.b - rgb1.b) * p) + rgb1.b,\n a: ((rgb2.a - rgb1.a) * p) + rgb1.a\n };\n\n return tinycolor(rgba);\n};\n\n\n// Readability Functions\n// ---------------------\n// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)\n\n// `contrast`\n// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)\ntinycolor.readability = function(color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);\n};\n\n// `isReadable`\n// Ensure that foreground and background color combinations meet WCAG2 guidelines.\n// The third argument is an optional Object.\n// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';\n// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.\n// If the entire object is absent, isReadable defaults to {level:\"AA\",size:\"small\"}.\n\n// *Example*\n// tinycolor.isReadable(\"#000\", \"#111\") => false\n// tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function(color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n\n out = false;\n\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function(baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size ;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors ;\n level = args.level;\n size = args.size;\n\n for (var i= 0; i < colorList.length ; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n\n if (tinycolor.isReadable(baseColor, bestColor, {\"level\":level,\"size\":size}) || !includeFallbackColors) {\n return bestColor;\n }\n else {\n args.includeFallbackColors=false;\n return tinycolor.mostReadable(baseColor,[\"#fff\", \"#000\"],args);\n }\n};\n\n\n// Big List of Colors\n// ------------------\n// <http://www.w3.org/TR/css3-color/#svg-color>\nvar names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n var flipped = { };\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n if (isOnePointZero(n)) { n = \"100%\"; }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if ((Math.abs(n - max) < 0.000001)) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n return mathMin(1, mathMax(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\nfunction isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf('.') != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n}\n\nvar matchers = (function() {\n\n // <http://www.w3.org/TR/css3-values/#integers>\n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // <http://www.w3.org/TR/css3-values/#number-value>\n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n})();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n\n color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: \"name\" };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if ((match = matchers.hex4.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: convertHexToDecimal(match[4] + '' + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n\n return false;\n}\n\nfunction validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\"level\":\"AA\", \"size\":\"small\"};\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\"level\":level, \"size\":size};\n}\n\n// Node: Export function\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports = tinycolor;\n}\n// AMD/requirejs: Define the module\nelse if (typeof define === 'function' && define.amd) {\n define(function () {return tinycolor;});\n}\n// Browser: Expose to window\nelse {\n window.tinycolor = tinycolor;\n}\n\n})(Math);\n","import * as React from 'react';\nimport type {\n ParamListBase,\n NavigationState,\n Route,\n} from '@react-navigation/routers';\nimport type { RouteProp } from './types';\n\ntype RouteCache = Map<Route<string>, RouteProp<ParamListBase, string>>;\n\n/**\n * Utilites such as `getFocusedRouteNameFromRoute` need to access state.\n * So we need a way to suppress the warning for those use cases.\n * This is fine since they are internal utilities and this is not public API.\n */\nexport const SUPPRESS_STATE_ACCESS_WARNING = { value: false };\n\n/**\n * Hook to cache route props for each screen in the navigator.\n * This lets add warnings and modifications to the route object but keep references between renders.\n */\nexport default function useRouteCache<State extends NavigationState>(\n routes: State['routes']\n) {\n // Cache object which holds route objects for each screen\n const cache = React.useMemo(() => ({ current: new Map() as RouteCache }), []);\n\n if (process.env.NODE_ENV === 'production') {\n // We don't want the overhead of creating extra maps every render in prod\n return routes;\n }\n\n cache.current = routes.reduce((acc, route) => {\n const previous = cache.current.get(route);\n\n if (previous) {\n // If a cached route object already exists, reuse it\n acc.set(route, previous);\n } else {\n const proxy = { ...route };\n\n Object.defineProperty(proxy, 'state', {\n get() {\n if (!SUPPRESS_STATE_ACCESS_WARNING.value) {\n console.warn(\n \"Accessing the 'state' property of the 'route' object is not supported. If you want to get the focused route name, use the 'getFocusedRouteNameFromRoute' helper instead: https://reactnavigation.org/docs/screen-options-resolution/#setting-parent-screen-options-based-on-child-navigators-state\"\n );\n }\n\n return route.state;\n },\n });\n\n acc.set(route, proxy);\n }\n\n return acc;\n }, new Map() as RouteCache);\n\n return Array.from(cache.current.values());\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, props) {\n object = Object(object);\n return basePickBy(object, props, function(value, key) {\n return key in object;\n });\n}\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick from.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, props, predicate) {\n var index = -1,\n length = props.length,\n result = {};\n\n while (++index < length) {\n var key = props[index],\n value = object[key];\n\n if (predicate(value, key)) {\n result[key] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [props] The property identifiers to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = baseRest(function(object, props) {\n return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));\n});\n\nmodule.exports = pick;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}\nmodule.exports = _isPlaceholder;","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar _curryN = /*#__PURE__*/require('./internal/_curryN');\n\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n * var sumArgs = (...args) => R.sum(args);\n *\n * var curriedAddFourNumbers = R.curryN(4, sumArgs);\n * var f = curriedAddFourNumbers(1, 2);\n * var g = f(3);\n * g(4); //=> 10\n */\n\n\nvar curryN = /*#__PURE__*/_curry2(function curryN(length, fn) {\n if (length === 1) {\n return _curry1(fn);\n }\n return _arity(length, _curryN(length, [], fn));\n});\nmodule.exports = curryN;","function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nmodule.exports = _has;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport normalizeColor from 'normalize-css-color';\n\nvar processColor = function processColor(color) {\n if (color === undefined || color === null) {\n return color;\n } // convert number and hex\n\n\n var int32Color = normalizeColor(color);\n\n if (int32Color === undefined || int32Color === null) {\n return undefined;\n }\n\n int32Color = (int32Color << 24 | int32Color >>> 8) >>> 0;\n return int32Color;\n};\n\nexport default processColor;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport Dimensions from '../Dimensions';\n/**\n * PixelRatio gives access to the device pixel density.\n */\n\nvar PixelRatio = /*#__PURE__*/function () {\n function PixelRatio() {}\n\n /**\n * Returns the device pixel density.\n */\n PixelRatio.get = function get() {\n return Dimensions.get('window').scale;\n }\n /**\n * No equivalent for Web\n */\n ;\n\n PixelRatio.getFontScale = function getFontScale() {\n return Dimensions.get('window').fontScale || PixelRatio.get();\n }\n /**\n * Converts a layout size (dp) to pixel size (px).\n * Guaranteed to return an integer number.\n */\n ;\n\n PixelRatio.getPixelSizeForLayoutSize = function getPixelSizeForLayoutSize(layoutSize) {\n return Math.round(layoutSize * PixelRatio.get());\n }\n /**\n * Rounds a layout size (dp) to the nearest layout size that corresponds to\n * an integer number of pixels. For example, on a device with a PixelRatio\n * of 3, `PixelRatio.roundToNearestPixel(8.4) = 8.33`, which corresponds to\n * exactly (8.33 * 3) = 25 pixels.\n */\n ;\n\n PixelRatio.roundToNearestPixel = function roundToNearestPixel(layoutSize) {\n var ratio = PixelRatio.get();\n return Math.round(layoutSize * ratio) / ratio;\n };\n\n return PixelRatio;\n}();\n\nexport { PixelRatio as default };","function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport View from '../View';\nimport React from 'react';\n\nfunction RefreshControl(props) {\n var colors = props.colors,\n enabled = props.enabled,\n onRefresh = props.onRefresh,\n progressBackgroundColor = props.progressBackgroundColor,\n progressViewOffset = props.progressViewOffset,\n refreshing = props.refreshing,\n size = props.size,\n tintColor = props.tintColor,\n title = props.title,\n titleColor = props.titleColor,\n rest = _objectWithoutPropertiesLoose(props, [\"colors\", \"enabled\", \"onRefresh\", \"progressBackgroundColor\", \"progressViewOffset\", \"refreshing\", \"size\", \"tintColor\", \"title\", \"titleColor\"]);\n\n return /*#__PURE__*/React.createElement(View, rest);\n}\n\nexport default RefreshControl;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport * as React from 'react';\nimport { useMemo, useRef } from 'react';\nimport pick from '../../modules/pick';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePressEvents from '../../modules/usePressEvents';\nvar forwardPropsList = {\n accessibilityDisabled: true,\n accessibilityLabel: true,\n accessibilityLiveRegion: true,\n accessibilityRole: true,\n accessibilityState: true,\n accessibilityValue: true,\n children: true,\n disabled: true,\n focusable: true,\n nativeID: true,\n onBlur: true,\n onFocus: true,\n onLayout: true,\n testID: true\n};\n\nvar pickProps = function pickProps(props) {\n return pick(props, forwardPropsList);\n};\n\nfunction TouchableWithoutFeedback(props, forwardedRef) {\n var delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n delayLongPress = props.delayLongPress,\n disabled = props.disabled,\n focusable = props.focusable,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n rejectResponderTermination = props.rejectResponderTermination;\n var hostRef = useRef(null);\n var pressConfig = useMemo(function () {\n return {\n cancelable: !rejectResponderTermination,\n disabled: disabled,\n delayLongPress: delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressStart: onPressIn,\n onPressEnd: onPressOut\n };\n }, [disabled, delayPressIn, delayPressOut, delayLongPress, onLongPress, onPress, onPressIn, onPressOut, rejectResponderTermination]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n var element = React.Children.only(props.children);\n var children = [element.props.children];\n var supportedProps = pickProps(props);\n supportedProps.accessibilityDisabled = disabled;\n supportedProps.focusable = !disabled && focusable !== false;\n supportedProps.ref = useMergeRefs(forwardedRef, hostRef, element.ref);\n var elementProps = Object.assign(supportedProps, pressEventHandlers);\n return /*#__PURE__*/React.cloneElement.apply(React, [element, elementProps].concat(children));\n}\n\nvar MemoedTouchableWithoutFeedback = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(TouchableWithoutFeedback));\nMemoedTouchableWithoutFeedback.displayName = 'TouchableWithoutFeedback';\nexport default MemoedTouchableWithoutFeedback;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { hydrate, render } from 'react-dom';\nexport { hydrate };\nexport default render;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { unmountComponentAtNode } from 'react-dom';\nexport default unmountComponentAtNode;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport dismissKeyboard from '../../modules/dismissKeyboard';\nvar Keyboard = {\n addListener: function addListener() {\n return {\n remove: function remove() {}\n };\n },\n dismiss: function dismiss() {\n dismissKeyboard();\n },\n removeAllListeners: function removeAllListeners() {},\n removeListener: function removeListener() {}\n};\nexport default Keyboard;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n\nvar cssFunction = function () {\n if (canUseDOM && window.CSS && window.CSS.supports && window.CSS.supports('top: constant(safe-area-inset-top)')) {\n return 'constant';\n }\n\n return 'env';\n}();\n\nvar SafeAreaView = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var style = props.style,\n rest = _objectWithoutPropertiesLoose(props, [\"style\"]);\n\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n ref: ref,\n style: StyleSheet.compose(styles.root, style)\n }));\n});\nSafeAreaView.displayName = 'SafeAreaView';\nvar styles = StyleSheet.create({\n root: {\n paddingTop: cssFunction + \"(safe-area-inset-top)\",\n paddingRight: cssFunction + \"(safe-area-inset-right)\",\n paddingBottom: cssFunction + \"(safe-area-inset-bottom)\",\n paddingLeft: cssFunction + \"(safe-area-inset-left)\"\n }\n});\nexport default SafeAreaView;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from 'react';\nimport { useCallback, useMemo, useState, useRef } from 'react';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePressEvents from '../../modules/usePressEvents';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n\nfunction createExtraStyles(activeOpacity, underlayColor) {\n return {\n child: {\n opacity: activeOpacity !== null && activeOpacity !== void 0 ? activeOpacity : 0.85\n },\n underlay: {\n backgroundColor: underlayColor === undefined ? 'black' : underlayColor\n }\n };\n}\n\nfunction hasPressHandler(props) {\n return props.onPress != null || props.onPressIn != null || props.onPressOut != null || props.onLongPress != null;\n}\n/**\n * A wrapper for making views respond properly to touches.\n * On press down, the opacity of the wrapped view is decreased, which allows\n * the underlay color to show through, darkening or tinting the view.\n *\n * The underlay comes from wrapping the child in a new View, which can affect\n * layout, and sometimes cause unwanted visual artifacts if not used correctly,\n * for example if the backgroundColor of the wrapped view isn't explicitly set\n * to an opaque color.\n *\n * TouchableHighlight must have one child (not zero or more than one).\n * If you wish to have several child components, wrap them in a View.\n */\n\n\nfunction TouchableHighlight(props, forwardedRef) {\n var activeOpacity = props.activeOpacity,\n children = props.children,\n delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n delayLongPress = props.delayLongPress,\n disabled = props.disabled,\n focusable = props.focusable,\n onHideUnderlay = props.onHideUnderlay,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n onShowUnderlay = props.onShowUnderlay,\n rejectResponderTermination = props.rejectResponderTermination,\n style = props.style,\n testOnly_pressed = props.testOnly_pressed,\n underlayColor = props.underlayColor,\n rest = _objectWithoutPropertiesLoose(props, [\"activeOpacity\", \"children\", \"delayPressIn\", \"delayPressOut\", \"delayLongPress\", \"disabled\", \"focusable\", \"onHideUnderlay\", \"onLongPress\", \"onPress\", \"onPressIn\", \"onPressOut\", \"onShowUnderlay\", \"rejectResponderTermination\", \"style\", \"testOnly_pressed\", \"underlayColor\"]);\n\n var hostRef = useRef(null);\n var setRef = useMergeRefs(forwardedRef, hostRef);\n\n var _useState = useState(testOnly_pressed === true ? createExtraStyles(activeOpacity, underlayColor) : null),\n extraStyles = _useState[0],\n setExtraStyles = _useState[1];\n\n var showUnderlay = useCallback(function () {\n if (!hasPressHandler(props)) {\n return;\n }\n\n setExtraStyles(createExtraStyles(activeOpacity, underlayColor));\n\n if (onShowUnderlay != null) {\n onShowUnderlay();\n }\n }, [activeOpacity, onShowUnderlay, props, underlayColor]);\n var hideUnderlay = useCallback(function () {\n if (testOnly_pressed === true) {\n return;\n }\n\n if (hasPressHandler(props)) {\n setExtraStyles(null);\n\n if (onHideUnderlay != null) {\n onHideUnderlay();\n }\n }\n }, [onHideUnderlay, props, testOnly_pressed]);\n var pressConfig = useMemo(function () {\n return {\n cancelable: !rejectResponderTermination,\n disabled: disabled,\n delayLongPress: delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressStart: function onPressStart(event) {\n showUnderlay();\n\n if (onPressIn != null) {\n onPressIn(event);\n }\n },\n onPressEnd: function onPressEnd(event) {\n hideUnderlay();\n\n if (onPressOut != null) {\n onPressOut(event);\n }\n }\n };\n }, [delayLongPress, delayPressIn, delayPressOut, disabled, onLongPress, onPress, onPressIn, onPressOut, rejectResponderTermination, showUnderlay, hideUnderlay]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n var child = React.Children.only(children);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, pressEventHandlers, {\n accessibilityDisabled: disabled,\n focusable: !disabled && focusable !== false,\n ref: setRef,\n style: [styles.root, style, !disabled && styles.actionable, extraStyles && extraStyles.underlay]\n }), /*#__PURE__*/React.cloneElement(child, {\n style: StyleSheet.compose(child.props.style, extraStyles && extraStyles.child)\n }));\n}\n\nvar styles = StyleSheet.create({\n root: {\n userSelect: 'none'\n },\n actionable: {\n cursor: 'pointer',\n touchAction: 'manipulation'\n }\n});\nvar MemoedTouchableHighlight = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(TouchableHighlight));\nMemoedTouchableHighlight.displayName = 'TouchableHighlight';\nexport default MemoedTouchableHighlight;","import * as React from 'react';\n\n/**\n * Context which holds the values for the current navigation tree.\n * Intended for use in SSR. This is not safe to use on the client.\n */\nconst CurrentRenderContext = React.createContext<\n { options?: object } | undefined\n>(undefined);\n\nexport default CurrentRenderContext;\n","import * as React from 'react';\nimport { BackHandler } from 'react-native';\nimport type { NavigationContainerRef } from '@react-navigation/core';\n\nexport default function useBackButton(\n ref: React.RefObject<NavigationContainerRef>\n) {\n React.useEffect(() => {\n const subscription = BackHandler.addEventListener(\n 'hardwareBackPress',\n () => {\n const navigation = ref.current;\n\n if (navigation == null) {\n return false;\n }\n\n if (navigation.canGoBack()) {\n navigation.goBack();\n\n return true;\n }\n\n return false;\n }\n );\n\n return () => subscription.remove();\n }, [ref]);\n}\n","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\nimport type { Theme } from '../types';\n\ntype Props = {\n value: Theme;\n children: React.ReactNode;\n};\n\nexport default function ThemeProvider({ value, children }: Props) {\n return (\n <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n );\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport View from '../../../exports/View';\nimport VirtualizedList from '../VirtualizedList';\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * Right now this just flattens everything into one list and uses VirtualizedList under the\n * hood. The only operation that might not scale well is concatting the data arrays of all the\n * sections when new props are received, which should be plenty fast for up to ~10,000 items.\n */\nvar VirtualizedSectionList = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(VirtualizedSectionList, _React$PureComponent);\n\n function VirtualizedSectionList() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n _this._getItem = function (props, sections, index) {\n if (!sections) {\n return null;\n }\n\n var itemIdx = index - 1;\n\n for (var i = 0; i < sections.length; i++) {\n var section = sections[i];\n var sectionData = section.data;\n var itemCount = props.getItemCount(sectionData);\n\n if (itemIdx === -1 || itemIdx === itemCount) {\n // We intend for there to be overflow by one on both ends of the list.\n // This will be for headers and footers. When returning a header or footer\n // item the section itself is the item.\n return section;\n } else if (itemIdx < itemCount) {\n // If we are in the bounds of the list's data then return the item.\n return props.getItem(sectionData, itemIdx);\n } else {\n itemIdx -= itemCount + 2; // Add two for the header and footer\n }\n }\n\n return null;\n };\n\n _this._keyExtractor = function (item, index) {\n var info = _this._subExtractor(index);\n\n return info && info.key || String(index);\n };\n\n _this._convertViewable = function (viewable) {\n invariant(viewable.index != null, 'Received a broken ViewToken');\n\n var info = _this._subExtractor(viewable.index);\n\n if (!info) {\n return null;\n }\n\n var keyExtractor = info.section.keyExtractor || _this.props.keyExtractor;\n return _objectSpread(_objectSpread({}, viewable), {}, {\n index: info.index,\n\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.63 was deployed. To see the error delete this\n * comment and run Flow. */\n key: keyExtractor(viewable.item, info.index),\n section: info.section\n });\n };\n\n _this._onViewableItemsChanged = function (_ref) {\n var viewableItems = _ref.viewableItems,\n changed = _ref.changed;\n var onViewableItemsChanged = _this.props.onViewableItemsChanged;\n\n if (onViewableItemsChanged != null) {\n onViewableItemsChanged({\n viewableItems: viewableItems.map(_this._convertViewable, _assertThisInitialized(_this)).filter(Boolean),\n changed: changed.map(_this._convertViewable, _assertThisInitialized(_this)).filter(Boolean)\n });\n }\n };\n\n _this._renderItem = function (listItemCount) {\n return function (_ref2) {\n var item = _ref2.item,\n index = _ref2.index;\n\n var info = _this._subExtractor(index);\n\n if (!info) {\n return null;\n }\n\n var infoIndex = info.index;\n\n if (infoIndex == null) {\n var section = info.section;\n\n if (info.header === true) {\n var renderSectionHeader = _this.props.renderSectionHeader;\n return renderSectionHeader ? renderSectionHeader({\n section: section\n }) : null;\n } else {\n var renderSectionFooter = _this.props.renderSectionFooter;\n return renderSectionFooter ? renderSectionFooter({\n section: section\n }) : null;\n }\n } else {\n var renderItem = info.section.renderItem || _this.props.renderItem;\n\n var SeparatorComponent = _this._getSeparatorComponent(index, info, listItemCount);\n\n invariant(renderItem, 'no renderItem!');\n return /*#__PURE__*/React.createElement(ItemWithSeparator, {\n SeparatorComponent: SeparatorComponent,\n LeadingSeparatorComponent: infoIndex === 0 ? _this.props.SectionSeparatorComponent : undefined,\n cellKey: info.key,\n index: infoIndex,\n item: item,\n leadingItem: info.leadingItem,\n leadingSection: info.leadingSection,\n onUpdateSeparator: _this._onUpdateSeparator,\n prevCellKey: (_this._subExtractor(index - 1) || {}).key,\n ref: function ref(_ref3) {\n _this._cellRefs[info.key] = _ref3;\n },\n renderItem: renderItem,\n section: info.section,\n trailingItem: info.trailingItem,\n trailingSection: info.trailingSection,\n inverted: !!_this.props.inverted\n });\n }\n };\n };\n\n _this._onUpdateSeparator = function (key, newProps) {\n var ref = _this._cellRefs[key];\n ref && ref.updateSeparatorProps(newProps);\n };\n\n _this._cellRefs = {};\n\n _this._captureRef = function (ref) {\n _this._listRef = ref;\n };\n\n return _this;\n }\n\n var _proto = VirtualizedSectionList.prototype;\n\n _proto.scrollToLocation = function scrollToLocation(params) {\n var index = params.itemIndex;\n\n for (var i = 0; i < params.sectionIndex; i++) {\n index += this.props.getItemCount(this.props.sections[i].data) + 2;\n }\n\n var viewOffset = params.viewOffset || 0;\n\n if (this._listRef == null) {\n return;\n }\n\n if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) {\n // $FlowFixMe[prop-missing] Cannot access private property\n var frame = this._listRef._getFrameMetricsApprox(index - params.itemIndex);\n\n viewOffset += frame.length;\n }\n\n var toIndexParams = _objectSpread(_objectSpread({}, params), {}, {\n viewOffset: viewOffset,\n index: index\n });\n\n this._listRef.scrollToIndex(toIndexParams);\n };\n\n _proto.getListRef = function getListRef() {\n return this._listRef;\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n ItemSeparatorComponent = _this$props.ItemSeparatorComponent,\n SectionSeparatorComponent = _this$props.SectionSeparatorComponent,\n _renderItem = _this$props.renderItem,\n renderSectionFooter = _this$props.renderSectionFooter,\n renderSectionHeader = _this$props.renderSectionHeader,\n _sections = _this$props.sections,\n stickySectionHeadersEnabled = _this$props.stickySectionHeadersEnabled,\n passThroughProps = _objectWithoutPropertiesLoose(_this$props, [\"ItemSeparatorComponent\", \"SectionSeparatorComponent\", \"renderItem\", \"renderSectionFooter\", \"renderSectionHeader\", \"sections\", \"stickySectionHeadersEnabled\"]);\n\n var listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0;\n var stickyHeaderIndices = this.props.stickySectionHeadersEnabled ? [] : undefined;\n var itemCount = 0;\n\n for (var _iterator = _createForOfIteratorHelperLoose(this.props.sections), _step; !(_step = _iterator()).done;) {\n var section = _step.value;\n\n // Track the section header indices\n if (stickyHeaderIndices != null) {\n stickyHeaderIndices.push(itemCount + listHeaderOffset);\n } // Add two for the section header and footer.\n\n\n itemCount += 2;\n itemCount += this.props.getItemCount(section.data);\n }\n\n var renderItem = this._renderItem(itemCount);\n\n return /*#__PURE__*/React.createElement(VirtualizedList, _extends({}, passThroughProps, {\n keyExtractor: this._keyExtractor,\n stickyHeaderIndices: stickyHeaderIndices,\n renderItem: renderItem,\n data: this.props.sections,\n getItem: function getItem(sections, index) {\n return _this2._getItem(_this2.props, sections, index);\n },\n getItemCount: function getItemCount() {\n return itemCount;\n },\n onViewableItemsChanged: this.props.onViewableItemsChanged ? this._onViewableItemsChanged : undefined,\n ref: this._captureRef\n }));\n };\n\n _proto._subExtractor = function _subExtractor(index) {\n var itemIndex = index;\n var _this$props2 = this.props,\n getItem = _this$props2.getItem,\n getItemCount = _this$props2.getItemCount,\n keyExtractor = _this$props2.keyExtractor,\n sections = _this$props2.sections;\n\n for (var i = 0; i < sections.length; i++) {\n var section = sections[i];\n var sectionData = section.data;\n var key = section.key || String(i);\n itemIndex -= 1; // The section adds an item for the header\n\n if (itemIndex >= getItemCount(sectionData) + 1) {\n itemIndex -= getItemCount(sectionData) + 1; // The section adds an item for the footer.\n } else if (itemIndex === -1) {\n return {\n section: section,\n key: key + ':header',\n index: null,\n header: true,\n trailingSection: sections[i + 1]\n };\n } else if (itemIndex === getItemCount(sectionData)) {\n return {\n section: section,\n key: key + ':footer',\n index: null,\n header: false,\n trailingSection: sections[i + 1]\n };\n } else {\n var extractor = section.keyExtractor || keyExtractor;\n return {\n section: section,\n key: key + ':' + extractor(getItem(sectionData, itemIndex), itemIndex),\n index: itemIndex,\n leadingItem: getItem(sectionData, itemIndex - 1),\n leadingSection: sections[i - 1],\n trailingItem: getItem(sectionData, itemIndex + 1),\n trailingSection: sections[i + 1]\n };\n }\n }\n };\n\n _proto._getSeparatorComponent = function _getSeparatorComponent(index, info, listItemCount) {\n info = info || this._subExtractor(index);\n\n if (!info) {\n return null;\n }\n\n var ItemSeparatorComponent = info.section.ItemSeparatorComponent || this.props.ItemSeparatorComponent;\n var SectionSeparatorComponent = this.props.SectionSeparatorComponent;\n var isLastItemInList = index === listItemCount - 1;\n var isLastItemInSection = info.index === this.props.getItemCount(info.section.data) - 1;\n\n if (SectionSeparatorComponent && isLastItemInSection) {\n return SectionSeparatorComponent;\n }\n\n if (ItemSeparatorComponent && !isLastItemInSection && !isLastItemInList) {\n return ItemSeparatorComponent;\n }\n\n return null;\n };\n\n return VirtualizedSectionList;\n}(React.PureComponent);\n\nVirtualizedSectionList.defaultProps = _objectSpread(_objectSpread({}, VirtualizedList.defaultProps), {}, {\n data: []\n});\n\nvar ItemWithSeparator = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ItemWithSeparator, _React$Component);\n\n function ItemWithSeparator() {\n var _this3;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this3 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this3.state = {\n separatorProps: {\n highlighted: false,\n leadingItem: _this3.props.item,\n leadingSection: _this3.props.leadingSection,\n section: _this3.props.section,\n trailingItem: _this3.props.trailingItem,\n trailingSection: _this3.props.trailingSection\n },\n leadingSeparatorProps: {\n highlighted: false,\n leadingItem: _this3.props.leadingItem,\n leadingSection: _this3.props.leadingSection,\n section: _this3.props.section,\n trailingItem: _this3.props.item,\n trailingSection: _this3.props.trailingSection\n }\n };\n _this3._separators = {\n highlight: function highlight() {\n ['leading', 'trailing'].forEach(function (s) {\n return _this3._separators.updateProps(s, {\n highlighted: true\n });\n });\n },\n unhighlight: function unhighlight() {\n ['leading', 'trailing'].forEach(function (s) {\n return _this3._separators.updateProps(s, {\n highlighted: false\n });\n });\n },\n updateProps: function updateProps(select, newProps) {\n var _this3$props = _this3.props,\n LeadingSeparatorComponent = _this3$props.LeadingSeparatorComponent,\n cellKey = _this3$props.cellKey,\n prevCellKey = _this3$props.prevCellKey;\n\n if (select === 'leading' && LeadingSeparatorComponent != null) {\n _this3.setState(function (state) {\n return {\n leadingSeparatorProps: _objectSpread(_objectSpread({}, state.leadingSeparatorProps), newProps)\n };\n });\n } else {\n _this3.props.onUpdateSeparator(select === 'leading' && prevCellKey || cellKey, newProps);\n }\n }\n };\n return _this3;\n }\n\n ItemWithSeparator.getDerivedStateFromProps = function getDerivedStateFromProps(props, prevState) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n leadingItem: props.item,\n leadingSection: props.leadingSection,\n section: props.section,\n trailingItem: props.trailingItem,\n trailingSection: props.trailingSection\n }),\n leadingSeparatorProps: _objectSpread(_objectSpread({}, prevState.leadingSeparatorProps), {}, {\n leadingItem: props.leadingItem,\n leadingSection: props.leadingSection,\n section: props.section,\n trailingItem: props.item,\n trailingSection: props.trailingSection\n })\n };\n };\n\n var _proto2 = ItemWithSeparator.prototype;\n\n _proto2.updateSeparatorProps = function updateSeparatorProps(newProps) {\n this.setState(function (state) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n };\n });\n };\n\n _proto2.render = function render() {\n var _this$props3 = this.props,\n LeadingSeparatorComponent = _this$props3.LeadingSeparatorComponent,\n SeparatorComponent = _this$props3.SeparatorComponent,\n item = _this$props3.item,\n index = _this$props3.index,\n section = _this$props3.section,\n inverted = _this$props3.inverted;\n var element = this.props.renderItem({\n item: item,\n index: index,\n section: section,\n separators: this._separators\n });\n var leadingSeparator = LeadingSeparatorComponent != null && /*#__PURE__*/React.createElement(LeadingSeparatorComponent, this.state.leadingSeparatorProps);\n var separator = SeparatorComponent != null && /*#__PURE__*/React.createElement(SeparatorComponent, this.state.separatorProps);\n return leadingSeparator || separator ? /*#__PURE__*/React.createElement(View, null, inverted === false ? leadingSeparator : separator, element, inverted === false ? separator : leadingSeparator) : element;\n };\n\n return ItemWithSeparator;\n}(React.Component);\n\nexport default VirtualizedSectionList;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Platform from '../../../exports/Platform';\nimport * as React from 'react';\nimport ScrollView from '../../../exports/ScrollView';\nimport VirtualizedSectionList from '../VirtualizedSectionList';\n\nvar defaultProps = _objectSpread(_objectSpread({}, VirtualizedSectionList.defaultProps), {}, {\n stickySectionHeadersEnabled: Platform.OS === 'ios'\n});\n\n/**\n * A performant interface for rendering sectioned lists, supporting the most handy features:\n *\n * - Fully cross-platform.\n * - Configurable viewability callbacks.\n * - List header support.\n * - List footer support.\n * - Item separator support.\n * - Section header support.\n * - Section separator support.\n * - Heterogeneous data and item rendering support.\n * - Pull to Refresh.\n * - Scroll loading.\n *\n * If you don't need section support and want a simpler interface, use\n * [`<FlatList>`](/react-native/docs/flatlist.html).\n *\n * Simple Examples:\n *\n * <SectionList\n * renderItem={({item}) => <ListItem title={item} />}\n * renderSectionHeader={({section}) => <Header title={section.title} />}\n * sections={[ // homogeneous rendering between sections\n * {data: [...], title: ...},\n * {data: [...], title: ...},\n * {data: [...], title: ...},\n * ]}\n * />\n *\n * <SectionList\n * sections={[ // heterogeneous rendering between sections\n * {data: [...], renderItem: ...},\n * {data: [...], renderItem: ...},\n * {data: [...], renderItem: ...},\n * ]}\n * />\n *\n * This is a convenience wrapper around [`<VirtualizedList>`](docs/virtualizedlist.html),\n * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed\n * here, along with the following caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate and momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n */\nvar SectionList = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(SectionList, _React$PureComponent);\n\n function SectionList() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n _this._captureRef = function (ref) {\n // $FlowFixMe\n _this._wrapperListRef = ref;\n };\n\n return _this;\n }\n\n var _proto = SectionList.prototype;\n\n /**\n * Scrolls to the item at the specified `sectionIndex` and `itemIndex` (within the section)\n * positioned in the viewable area such that `viewPosition` 0 places it at the top (and may be\n * covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle. `viewOffset` is a\n * fixed number of pixels to offset the final target position, e.g. to compensate for sticky\n * headers.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n _proto.scrollToLocation = function scrollToLocation(params) {\n if (this._wrapperListRef != null) {\n this._wrapperListRef.scrollToLocation(params);\n }\n }\n /**\n * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.\n * if `waitForInteractions` is true and the user has not scrolled. This is typically called by\n * taps on items or by navigation actions.\n */\n ;\n\n _proto.recordInteraction = function recordInteraction() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n listRef && listRef.recordInteraction();\n }\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n ;\n\n _proto.flashScrollIndicators = function flashScrollIndicators() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n listRef && listRef.flashScrollIndicators();\n }\n /**\n * Provides a handle to the underlying scroll responder.\n */\n ;\n\n _proto.getScrollResponder = function getScrollResponder() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n if (listRef) {\n return listRef.getScrollResponder();\n }\n };\n\n _proto.getScrollableNode = function getScrollableNode() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n if (listRef) {\n return listRef.getScrollableNode();\n }\n };\n\n _proto.setNativeProps = function setNativeProps(props) {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n if (listRef) {\n listRef.setNativeProps(props);\n }\n };\n\n _proto.render = function render() {\n return (\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.66.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.66 was deployed. To see the error delete this\n * comment and run Flow. */\n React.createElement(VirtualizedSectionList, _extends({}, this.props, {\n ref: this._captureRef,\n getItemCount: function getItemCount(items) {\n return items.length;\n },\n getItem: function getItem(items, index) {\n return items[index];\n }\n }))\n );\n };\n\n return SectionList;\n}(React.PureComponent);\n\nSectionList.defaultProps = defaultProps;\nexport default SectionList;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport SectionList from '../../vendor/react-native/SectionList';\nexport default SectionList;","import * as React from 'react';\n\nexport type ServerContextType = {\n location?: {\n pathname: string;\n search: string;\n };\n};\n\nconst ServerContext = React.createContext<ServerContextType | undefined>(\n undefined\n);\n\nexport default ServerContext;\n","import * as React from 'react';\nimport {\n getStateFromPath as getStateFromPathDefault,\n getPathFromState as getPathFromStateDefault,\n getActionFromState as getActionFromStateDefault,\n NavigationContainerRef,\n NavigationState,\n} from '@react-navigation/core';\nimport { nanoid } from 'nanoid/non-secure';\nimport ServerContext from './ServerContext';\nimport type { LinkingOptions } from './types';\n\ntype ResultState = ReturnType<typeof getStateFromPathDefault>;\n\ntype HistoryRecord = {\n // Unique identifier for this record to match it with window.history.state\n id: string;\n // Navigation state object for the history entry\n state: NavigationState;\n // Path of the history entry\n path: string;\n};\n\nconst createMemoryHistory = () => {\n let index = 0;\n let items: HistoryRecord[] = [];\n\n // Pending callbacks for `history.go(n)`\n // We might modify the callback stored if it was interrupted, so we have a ref to identify it\n const pending: { ref: unknown; cb: (interrupted?: boolean) => void }[] = [];\n\n const interrupt = () => {\n // If another history operation was performed we need to interrupt existing ones\n // This makes sure that calls such as `history.replace` after `history.go` don't happen\n // Since otherwise it won't be correct if something else has changed\n pending.forEach((it) => {\n const cb = it.cb;\n it.cb = () => cb(true);\n });\n };\n\n const history = {\n get index(): number {\n // We store an id in the state instead of an index\n // Index could get out of sync with in-memory values if page reloads\n const id = window.history.state?.id;\n\n if (id) {\n const index = items.findIndex((item) => item.id === id);\n\n return index > -1 ? index : 0;\n }\n\n return 0;\n },\n\n get(index: number) {\n return items[index];\n },\n\n backIndex({ path }: { path: string }) {\n // We need to find the index from the element before current to get closest path to go back to\n for (let i = index - 1; i >= 0; i--) {\n const item = items[i];\n\n if (item.path === path) {\n return i;\n }\n }\n\n return -1;\n },\n\n push({ path, state }: { path: string; state: NavigationState }) {\n interrupt();\n\n const id = nanoid();\n\n // When a new entry is pushed, all the existing entries after index will be inaccessible\n // So we remove any existing entries after the current index to clean them up\n items = items.slice(0, index + 1);\n\n items.push({ path, state, id });\n index = items.length - 1;\n\n // We pass empty string for title because it's ignored in all browsers except safari\n // We don't store state object in history.state because:\n // - browsers have limits on how big it can be, and we don't control the size\n // - while not recommended, there could be non-serializable data in state\n window.history.pushState({ id }, '', path);\n },\n\n replace({ path, state }: { path: string; state: NavigationState }) {\n interrupt();\n\n const id = window.history.state?.id ?? nanoid();\n\n if (items.length) {\n items[index] = { path, state, id };\n } else {\n // This is the first time any state modifications are done\n // So we need to push the entry as there's nothing to replace\n items.push({ path, state, id });\n }\n\n window.history.replaceState({ id }, '', path);\n },\n\n // `history.go(n)` is asynchronous, there are couple of things to keep in mind:\n // - it won't do anything if we can't go `n` steps, the `popstate` event won't fire.\n // - each `history.go(n)` call will trigger a separate `popstate` event with correct location.\n // - the `popstate` event fires before the next frame after calling `history.go(n)`.\n // This method differs from `history.go(n)` in the sense that it'll go back as many steps it can.\n go(n: number) {\n interrupt();\n\n if (n > 0) {\n // We shouldn't go forward more than available index\n n = Math.min(n, items.length - 1);\n } else if (n < 0) {\n // We shouldn't go back more than the 0 index\n // Otherwise we'll exit the page\n n = index + n < 0 ? -index : n;\n }\n\n if (n === 0) {\n return;\n }\n\n index += n;\n\n // When we call `history.go`, `popstate` will fire when there's history to go back to\n // So we need to somehow handle following cases:\n // - There's history to go back, `history.go` is called, and `popstate` fires\n // - `history.go` is called multiple times, we need to resolve on respective `popstate`\n // - No history to go back, but `history.go` was called, browser has no API to detect it\n return new Promise<void>((resolve, reject) => {\n const done = (interrupted?: boolean) => {\n clearTimeout(timer);\n\n if (interrupted) {\n reject(new Error('History was changed during navigation.'));\n return;\n }\n\n // There seems to be a bug in Chrome regarding updating the title\n // If we set a title just before calling `history.go`, the title gets lost\n // However the value of `document.title` is still what we set it to\n // It's just not displayed in the tab bar\n // To update the tab bar, we need to reset the title to something else first (e.g. '')\n // And set the title to what it was before so it gets applied\n // It won't work without setting it to empty string coz otherwise title isn't changing\n // Which means that the browser won't do anything after setting the title\n const { title } = window.document;\n\n window.document.title = '';\n window.document.title = title;\n\n resolve();\n };\n\n pending.push({ ref: done, cb: done });\n\n // If navigation didn't happen within 100ms, assume that it won't happen\n // This may not be accurate, but hopefully it won't take so much time\n // In Chrome, navigation seems to happen instantly in next microtask\n // But on Firefox, it seems to take much longer, around 50ms from our testing\n // We're using a hacky timeout since there doesn't seem to be way to know for sure\n const timer = setTimeout(() => {\n const index = pending.findIndex((it) => it.ref === done);\n\n if (index > -1) {\n pending[index].cb();\n pending.splice(index, 1);\n }\n }, 100);\n\n const onPopState = () => {\n const last = pending.pop();\n\n window.removeEventListener('popstate', onPopState);\n last?.cb();\n };\n\n window.addEventListener('popstate', onPopState);\n window.history.go(n);\n });\n },\n\n // The `popstate` event is triggered when history changes, except `pushState` and `replaceState`\n // If we call `history.go(n)` ourselves, we don't want it to trigger the listener\n // Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener\n listen(listener: () => void) {\n const onPopState = () => {\n if (pending.length) {\n // This was triggered by `history.go(n)`, we shouldn't call the listener\n return;\n }\n\n listener();\n };\n\n window.addEventListener('popstate', onPopState);\n\n return () => window.removeEventListener('popstate', onPopState);\n },\n };\n\n return history;\n};\n\n/**\n * Find the matching navigation state that changed between 2 navigation states\n * e.g.: a -> b -> c -> d and a -> b -> c -> e -> f, if history in b changed, b is the matching state\n */\nconst findMatchingState = <T extends NavigationState>(\n a: T | undefined,\n b: T | undefined\n): [T | undefined, T | undefined] => {\n if (a === undefined || b === undefined || a.key !== b.key) {\n return [undefined, undefined];\n }\n\n // Tab and drawer will have `history` property, but stack will have history in `routes`\n const aHistoryLength = a.history ? a.history.length : a.routes.length;\n const bHistoryLength = b.history ? b.history.length : b.routes.length;\n\n const aRoute = a.routes[a.index];\n const bRoute = b.routes[b.index];\n\n const aChildState = aRoute.state as T | undefined;\n const bChildState = bRoute.state as T | undefined;\n\n // Stop here if this is the state object that changed:\n // - history length is different\n // - focused routes are different\n // - one of them doesn't have child state\n // - child state keys are different\n if (\n aHistoryLength !== bHistoryLength ||\n aRoute.key !== bRoute.key ||\n aChildState === undefined ||\n bChildState === undefined ||\n aChildState.key !== bChildState.key\n ) {\n return [a, b];\n }\n\n return findMatchingState(aChildState, bChildState);\n};\n\n/**\n * Run async function in series as it's called.\n */\nconst series = (cb: () => Promise<void>) => {\n // Whether we're currently handling a callback\n let handling = false;\n let queue: (() => Promise<void>)[] = [];\n\n const callback = async () => {\n try {\n if (handling) {\n // If we're currently handling a previous event, wait before handling this one\n // Add the callback to the beginning of the queue\n queue.unshift(callback);\n return;\n }\n\n handling = true;\n\n await cb();\n } finally {\n handling = false;\n\n if (queue.length) {\n // If we have queued items, handle the last one\n const last = queue.pop();\n\n last?.();\n }\n }\n };\n\n return callback;\n};\n\nlet isUsingLinking = false;\n\nexport default function useLinking(\n ref: React.RefObject<NavigationContainerRef>,\n {\n enabled = true,\n config,\n getStateFromPath = getStateFromPathDefault,\n getPathFromState = getPathFromStateDefault,\n getActionFromState = getActionFromStateDefault,\n }: LinkingOptions\n) {\n React.useEffect(() => {\n if (enabled !== false && isUsingLinking) {\n throw new Error(\n [\n 'Looks like you have configured linking in multiple places. This is likely an error since URL integration should only be handled in one place to avoid conflicts. Make sure that:',\n \"- You are not using both 'linking' prop and 'useLinking'\",\n \"- You don't have 'useLinking' in multiple components\",\n ]\n .join('\\n')\n .trim()\n );\n } else {\n isUsingLinking = enabled !== false;\n }\n\n return () => {\n isUsingLinking = false;\n };\n });\n\n const [history] = React.useState(createMemoryHistory);\n\n // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners\n // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo`\n // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect\n const enabledRef = React.useRef(enabled);\n const configRef = React.useRef(config);\n const getStateFromPathRef = React.useRef(getStateFromPath);\n const getActionFromStateRef = React.useRef(getActionFromState);\n const getPathFromStateRef = React.useRef(getPathFromState);\n\n React.useEffect(() => {\n enabledRef.current = enabled;\n configRef.current = config;\n getStateFromPathRef.current = getStateFromPath;\n getActionFromStateRef.current = getActionFromState;\n getPathFromStateRef.current = getPathFromState;\n });\n\n const server = React.useContext(ServerContext);\n\n const getInitialState = React.useCallback(() => {\n let value: ResultState | undefined;\n\n if (enabledRef.current) {\n const location =\n server?.location ??\n (typeof window !== 'undefined' ? window.location : undefined);\n\n const path = location ? location.pathname + location.search : undefined;\n\n if (path) {\n value = getStateFromPathRef.current(path, configRef.current);\n }\n }\n\n const thenable = {\n then(onfulfilled?: (state: ResultState | undefined) => void) {\n return Promise.resolve(onfulfilled ? onfulfilled(value) : value);\n },\n catch() {\n return thenable;\n },\n };\n\n return thenable as PromiseLike<ResultState | undefined>;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const previousIndexRef = React.useRef<number | undefined>(undefined);\n const previousStateRef = React.useRef<NavigationState | undefined>(undefined);\n const pendingPopStatePathRef = React.useRef<string | undefined>(undefined);\n\n React.useEffect(() => {\n previousIndexRef.current = history.index;\n\n return history.listen(() => {\n const navigation = ref.current;\n\n if (!navigation || !enabled) {\n return;\n }\n\n const path = location.pathname + location.search;\n const index = history.index;\n\n const previousIndex = previousIndexRef.current ?? 0;\n\n previousIndexRef.current = index;\n pendingPopStatePathRef.current = path;\n\n // When browser back/forward is clicked, we first need to check if state object for this index exists\n // If it does we'll reset to that state object\n // Otherwise, we'll handle it like a regular deep link\n const record = history.get(index);\n\n if (record?.path === path && record?.state) {\n navigation.resetRoot(record.state);\n return;\n }\n\n const state = getStateFromPathRef.current(path, configRef.current);\n\n // We should only dispatch an action when going forward\n // Otherwise the action will likely add items to history, which would mess things up\n if (state) {\n // Make sure that the routes in the state exist in the root navigator\n // Otherwise there's an error in the linking configuration\n const rootState = navigation.getRootState();\n\n if (state.routes.some((r) => !rootState?.routeNames.includes(r.name))) {\n console.warn(\n \"The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.\"\n );\n return;\n }\n\n if (index > previousIndex) {\n const action = getActionFromStateRef.current(\n state,\n configRef.current\n );\n\n if (action !== undefined) {\n try {\n navigation.dispatch(action);\n } catch (e) {\n // Ignore any errors from deep linking.\n // This could happen in case of malformed links, navigation object not being initialized etc.\n console.warn(\n `An error occurred when trying to handle the link '${path}': ${e.message}`\n );\n }\n } else {\n navigation.resetRoot(state);\n }\n } else {\n navigation.resetRoot(state);\n }\n } else {\n // if current path didn't return any state, we should revert to initial state\n navigation.resetRoot(state);\n }\n });\n }, [enabled, history, ref]);\n\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n\n if (ref.current) {\n // We need to record the current metadata on the first render if they aren't set\n // This will allow the initial state to be in the history entry\n const state = ref.current.getRootState();\n\n if (state) {\n const path = getPathFromStateRef.current(state, configRef.current);\n\n if (previousStateRef.current === undefined) {\n previousStateRef.current = state;\n }\n\n history.replace({ path, state });\n }\n }\n\n const onStateChange = async () => {\n const navigation = ref.current;\n\n if (!navigation || !enabled) {\n return;\n }\n\n const previousState = previousStateRef.current;\n const state = navigation.getRootState();\n\n const pendingPath = pendingPopStatePathRef.current;\n const path = getPathFromStateRef.current(state, configRef.current);\n\n previousStateRef.current = state;\n pendingPopStatePathRef.current = undefined;\n\n // To detect the kind of state change, we need to:\n // - Find the common focused navigation state in previous and current state\n // - If only the route keys changed, compare history/routes.length to check if we go back/forward/replace\n // - If no common focused navigation state found, it's a replace\n const [previousFocusedState, focusedState] = findMatchingState(\n previousState,\n state\n );\n\n if (\n previousFocusedState &&\n focusedState &&\n // We should only handle push/pop if path changed from what was in last `popstate`\n // Otherwise it's likely a change triggered by `popstate`\n path !== pendingPath\n ) {\n const historyDelta =\n (focusedState.history\n ? focusedState.history.length\n : focusedState.routes.length) -\n (previousFocusedState.history\n ? previousFocusedState.history.length\n : previousFocusedState.routes.length);\n\n if (historyDelta > 0) {\n // If history length is increased, we should pushState\n // Note that path might not actually change here, for example, drawer open should pushState\n history.push({ path, state });\n } else if (historyDelta < 0) {\n // If history length is decreased, i.e. entries were removed, we want to go back\n\n const nextIndex = history.backIndex({ path });\n const currentIndex = history.index;\n\n try {\n if (nextIndex !== -1 && nextIndex < currentIndex) {\n // An existing entry for this path exists and it's less than current index, go back to that\n await history.go(nextIndex - currentIndex);\n } else {\n // We couldn't find an existing entry to go back to, so we'll go back by the delta\n // This won't be correct if multiple routes were pushed in one go before\n // Usually this shouldn't happen and this is a fallback for that\n await history.go(historyDelta);\n }\n\n // Store the updated state as well as fix the path if incorrect\n history.replace({ path, state });\n } catch (e) {\n // The navigation was interrupted\n }\n } else {\n // If history length is unchanged, we want to replaceState\n history.replace({ path, state });\n }\n } else {\n // If no common navigation state was found, assume it's a replace\n // This would happen if the user did a reset/conditionally changed navigators\n history.replace({ path, state });\n }\n };\n\n // We debounce onStateChange coz we don't want multiple state changes to be handled at one time\n // This could happen since `history.go(n)` is asynchronous\n // If `pushState` or `replaceState` were called before `history.go(n)` completes, it'll mess stuff up\n return ref.current?.addListener('state', series(onStateChange));\n });\n\n return {\n getInitialState,\n };\n}\n","function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport AccessibilityUtil from '../AccessibilityUtil';\nimport css from '../../exports/StyleSheet/css';\nimport StyleSheet from '../../exports/StyleSheet';\nimport styleResolver from '../../exports/StyleSheet/styleResolver';\nimport { STYLE_GROUPS } from '../../exports/StyleSheet/constants';\nvar emptyObject = {};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\nvar uppercasePattern = /[A-Z]/g;\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase();\n}\n\nfunction hyphenateString(str) {\n return str.replace(uppercasePattern, toHyphenLower);\n}\n\nfunction processIDRefList(idRefList) {\n return isArray(idRefList) ? idRefList.join(' ') : idRefList;\n} // Reset styles for heading, link, and list DOM elements\n\n\nvar classes = css.create({\n reset: {\n backgroundColor: 'transparent',\n color: 'inherit',\n font: 'inherit',\n listStyle: 'none',\n margin: 0,\n textAlign: 'inherit',\n textDecoration: 'none'\n },\n cursor: {\n cursor: 'pointer'\n }\n}, STYLE_GROUPS.classicReset);\nvar pointerEventsStyles = StyleSheet.create({\n auto: {\n pointerEvents: 'auto'\n },\n 'box-none': {\n pointerEvents: 'box-none'\n },\n 'box-only': {\n pointerEvents: 'box-only'\n },\n none: {\n pointerEvents: 'none'\n }\n});\n\nvar createDOMProps = function createDOMProps(elementType, props) {\n if (!props) {\n props = emptyObject;\n }\n\n var _props = props,\n accessibilityActiveDescendant = _props.accessibilityActiveDescendant,\n accessibilityAtomic = _props.accessibilityAtomic,\n accessibilityAutoComplete = _props.accessibilityAutoComplete,\n accessibilityBusy = _props.accessibilityBusy,\n accessibilityChecked = _props.accessibilityChecked,\n accessibilityColumnCount = _props.accessibilityColumnCount,\n accessibilityColumnIndex = _props.accessibilityColumnIndex,\n accessibilityColumnSpan = _props.accessibilityColumnSpan,\n accessibilityControls = _props.accessibilityControls,\n accessibilityCurrent = _props.accessibilityCurrent,\n accessibilityDescribedBy = _props.accessibilityDescribedBy,\n accessibilityDetails = _props.accessibilityDetails,\n accessibilityDisabled = _props.accessibilityDisabled,\n accessibilityErrorMessage = _props.accessibilityErrorMessage,\n accessibilityExpanded = _props.accessibilityExpanded,\n accessibilityFlowTo = _props.accessibilityFlowTo,\n accessibilityHasPopup = _props.accessibilityHasPopup,\n accessibilityHidden = _props.accessibilityHidden,\n accessibilityInvalid = _props.accessibilityInvalid,\n accessibilityKeyShortcuts = _props.accessibilityKeyShortcuts,\n accessibilityLabel = _props.accessibilityLabel,\n accessibilityLabelledBy = _props.accessibilityLabelledBy,\n accessibilityLevel = _props.accessibilityLevel,\n accessibilityLiveRegion = _props.accessibilityLiveRegion,\n accessibilityModal = _props.accessibilityModal,\n accessibilityMultiline = _props.accessibilityMultiline,\n accessibilityMultiSelectable = _props.accessibilityMultiSelectable,\n accessibilityOrientation = _props.accessibilityOrientation,\n accessibilityOwns = _props.accessibilityOwns,\n accessibilityPlaceholder = _props.accessibilityPlaceholder,\n accessibilityPosInSet = _props.accessibilityPosInSet,\n accessibilityPressed = _props.accessibilityPressed,\n accessibilityReadOnly = _props.accessibilityReadOnly,\n accessibilityRequired = _props.accessibilityRequired,\n accessibilityRole = _props.accessibilityRole,\n accessibilityRoleDescription = _props.accessibilityRoleDescription,\n accessibilityRowCount = _props.accessibilityRowCount,\n accessibilityRowIndex = _props.accessibilityRowIndex,\n accessibilityRowSpan = _props.accessibilityRowSpan,\n accessibilitySelected = _props.accessibilitySelected,\n accessibilitySetSize = _props.accessibilitySetSize,\n accessibilitySort = _props.accessibilitySort,\n accessibilityValueMax = _props.accessibilityValueMax,\n accessibilityValueMin = _props.accessibilityValueMin,\n accessibilityValueNow = _props.accessibilityValueNow,\n accessibilityValueText = _props.accessibilityValueText,\n classList = _props.classList,\n dataSet = _props.dataSet,\n focusable = _props.focusable,\n nativeID = _props.nativeID,\n pointerEvents = _props.pointerEvents,\n providedStyle = _props.style,\n testID = _props.testID,\n accessible = _props.accessible,\n accessibilityState = _props.accessibilityState,\n accessibilityValue = _props.accessibilityValue,\n domProps = _objectWithoutPropertiesLoose(_props, [\"accessibilityActiveDescendant\", \"accessibilityAtomic\", \"accessibilityAutoComplete\", \"accessibilityBusy\", \"accessibilityChecked\", \"accessibilityColumnCount\", \"accessibilityColumnIndex\", \"accessibilityColumnSpan\", \"accessibilityControls\", \"accessibilityCurrent\", \"accessibilityDescribedBy\", \"accessibilityDetails\", \"accessibilityDisabled\", \"accessibilityErrorMessage\", \"accessibilityExpanded\", \"accessibilityFlowTo\", \"accessibilityHasPopup\", \"accessibilityHidden\", \"accessibilityInvalid\", \"accessibilityKeyShortcuts\", \"accessibilityLabel\", \"accessibilityLabelledBy\", \"accessibilityLevel\", \"accessibilityLiveRegion\", \"accessibilityModal\", \"accessibilityMultiline\", \"accessibilityMultiSelectable\", \"accessibilityOrientation\", \"accessibilityOwns\", \"accessibilityPlaceholder\", \"accessibilityPosInSet\", \"accessibilityPressed\", \"accessibilityReadOnly\", \"accessibilityRequired\", \"accessibilityRole\", \"accessibilityRoleDescription\", \"accessibilityRowCount\", \"accessibilityRowIndex\", \"accessibilityRowSpan\", \"accessibilitySelected\", \"accessibilitySetSize\", \"accessibilitySort\", \"accessibilityValueMax\", \"accessibilityValueMin\", \"accessibilityValueNow\", \"accessibilityValueText\", \"classList\", \"dataSet\", \"focusable\", \"nativeID\", \"pointerEvents\", \"style\", \"testID\", \"accessible\", \"accessibilityState\", \"accessibilityValue\"]);\n\n var disabled = accessibilityState != null && accessibilityState.disabled === true || accessibilityDisabled;\n var role = AccessibilityUtil.propsToAriaRole(props);\n var isNativeInteractiveElement = role === 'link' || elementType === 'a' || elementType === 'button' || elementType === 'input' || elementType === 'select' || elementType === 'textarea' || domProps.contentEditable != null; // DEPRECATED\n\n if (accessibilityState != null) {\n for (var prop in accessibilityState) {\n var value = accessibilityState[prop];\n\n if (value != null) {\n if (prop === 'disabled' || prop === 'hidden') {\n if (value === true) {\n domProps[\"aria-\" + prop] = value; // also set prop directly to pick up host elementType behaviour\n\n domProps[prop] = value;\n }\n } else {\n domProps[\"aria-\" + prop] = value;\n }\n }\n }\n }\n\n if (accessibilityValue != null) {\n for (var _prop in accessibilityValue) {\n var _value = accessibilityValue[_prop];\n\n if (_value != null) {\n domProps[\"aria-value\" + _prop] = _value;\n }\n }\n } // ACCESSIBILITY\n\n\n if (accessibilityActiveDescendant != null) {\n domProps['aria-activedescendant'] = accessibilityActiveDescendant;\n }\n\n if (accessibilityAtomic != null) {\n domProps['aria-atomic'] = accessibilityAtomic;\n }\n\n if (accessibilityAutoComplete != null) {\n domProps['aria-autocomplete'] = accessibilityAutoComplete;\n }\n\n if (accessibilityBusy != null) {\n domProps['aria-busy'] = accessibilityBusy;\n }\n\n if (accessibilityChecked != null) {\n domProps['aria-checked'] = accessibilityChecked;\n }\n\n if (accessibilityColumnCount != null) {\n domProps['aria-colcount'] = accessibilityColumnCount;\n }\n\n if (accessibilityColumnIndex != null) {\n domProps['aria-colindex'] = accessibilityColumnIndex;\n }\n\n if (accessibilityColumnSpan != null) {\n domProps['aria-colspan'] = accessibilityColumnSpan;\n }\n\n if (accessibilityControls != null) {\n domProps['aria-controls'] = processIDRefList(accessibilityControls);\n }\n\n if (accessibilityCurrent != null) {\n domProps['aria-current'] = accessibilityCurrent;\n }\n\n if (accessibilityDescribedBy != null) {\n domProps['aria-describedby'] = processIDRefList(accessibilityDescribedBy);\n }\n\n if (accessibilityDetails != null) {\n domProps['aria-details'] = accessibilityDetails;\n }\n\n if (disabled === true) {\n domProps['aria-disabled'] = true; // Enhance with native semantics\n\n if (elementType === 'button' || elementType === 'form' || elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.disabled = true;\n }\n }\n\n if (accessibilityErrorMessage != null) {\n domProps['aria-errormessage'] = accessibilityErrorMessage;\n }\n\n if (accessibilityExpanded != null) {\n domProps['aria-expanded'] = accessibilityExpanded;\n }\n\n if (accessibilityFlowTo != null) {\n domProps['aria-flowto'] = processIDRefList(accessibilityFlowTo);\n }\n\n if (accessibilityHasPopup != null) {\n domProps['aria-haspopup'] = accessibilityHasPopup;\n }\n\n if (accessibilityHidden === true) {\n domProps['aria-hidden'] = accessibilityHidden;\n }\n\n if (accessibilityInvalid != null) {\n domProps['aria-invalid'] = accessibilityInvalid;\n }\n\n if (accessibilityKeyShortcuts != null && Array.isArray(accessibilityKeyShortcuts)) {\n domProps['aria-keyshortcuts'] = accessibilityKeyShortcuts.join(' ');\n }\n\n if (accessibilityLabel != null) {\n domProps['aria-label'] = accessibilityLabel;\n }\n\n if (accessibilityLabelledBy != null) {\n domProps['aria-labelledby'] = processIDRefList(accessibilityLabelledBy);\n }\n\n if (accessibilityLevel != null) {\n domProps['aria-level'] = accessibilityLevel;\n }\n\n if (accessibilityLiveRegion != null) {\n domProps['aria-live'] = accessibilityLiveRegion === 'none' ? 'off' : accessibilityLiveRegion;\n }\n\n if (accessibilityModal != null) {\n domProps['aria-modal'] = accessibilityModal;\n }\n\n if (accessibilityMultiline != null) {\n domProps['aria-multiline'] = accessibilityMultiline;\n }\n\n if (accessibilityMultiSelectable != null) {\n domProps['aria-multiselectable'] = accessibilityMultiSelectable;\n }\n\n if (accessibilityOrientation != null) {\n domProps['aria-orientation'] = accessibilityOrientation;\n }\n\n if (accessibilityOwns != null) {\n domProps['aria-owns'] = processIDRefList(accessibilityOwns);\n }\n\n if (accessibilityPlaceholder != null) {\n domProps['aria-placeholder'] = accessibilityPlaceholder;\n }\n\n if (accessibilityPosInSet != null) {\n domProps['aria-posinset'] = accessibilityPosInSet;\n }\n\n if (accessibilityPressed != null) {\n domProps['aria-pressed'] = accessibilityPressed;\n }\n\n if (accessibilityReadOnly != null) {\n domProps['aria-readonly'] = accessibilityReadOnly; // Enhance with native semantics\n\n if (elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.readOnly = true;\n }\n }\n\n if (accessibilityRequired != null) {\n domProps['aria-required'] = accessibilityRequired; // Enhance with native semantics\n\n if (elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.required = true;\n }\n }\n\n if (role != null) {\n // 'presentation' synonym has wider browser support\n domProps['role'] = role === 'none' ? 'presentation' : role;\n }\n\n if (accessibilityRoleDescription != null) {\n domProps['aria-roledescription'] = accessibilityRoleDescription;\n }\n\n if (accessibilityRowCount != null) {\n domProps['aria-rowcount'] = accessibilityRowCount;\n }\n\n if (accessibilityRowIndex != null) {\n domProps['aria-rowindex'] = accessibilityRowIndex;\n }\n\n if (accessibilityRowSpan != null) {\n domProps['aria-rowspan'] = accessibilityRowSpan;\n }\n\n if (accessibilitySelected != null) {\n domProps['aria-selected'] = accessibilitySelected;\n }\n\n if (accessibilitySetSize != null) {\n domProps['aria-setsize'] = accessibilitySetSize;\n }\n\n if (accessibilitySort != null) {\n domProps['aria-sort'] = accessibilitySort;\n }\n\n if (accessibilityValueMax != null) {\n domProps['aria-valuemax'] = accessibilityValueMax;\n }\n\n if (accessibilityValueMin != null) {\n domProps['aria-valuemin'] = accessibilityValueMin;\n }\n\n if (accessibilityValueNow != null) {\n domProps['aria-valuenow'] = accessibilityValueNow;\n }\n\n if (accessibilityValueText != null) {\n domProps['aria-valuetext'] = accessibilityValueText;\n } // \"dataSet\" replaced with \"data-*\"\n\n\n if (dataSet != null) {\n for (var dataProp in dataSet) {\n if (hasOwnProperty.call(dataSet, dataProp)) {\n var dataName = hyphenateString(dataProp);\n var dataValue = dataSet[dataProp];\n\n if (dataValue != null) {\n domProps[\"data-\" + dataName] = dataValue;\n }\n }\n }\n } // FOCUS\n // \"focusable\" indicates that an element may be a keyboard tab-stop.\n\n\n var _focusable = focusable != null ? focusable : accessible;\n\n if (_focusable === false) {\n domProps.tabIndex = '-1';\n }\n\n if ( // These native elements are focusable by default\n elementType === 'a' || elementType === 'button' || elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n if (_focusable === false || accessibilityDisabled === true) {\n domProps.tabIndex = '-1';\n }\n } else if ( // These roles are made focusable by default\n role === 'button' || role === 'checkbox' || role === 'link' || role === 'menuitem' || role === 'radio' || role === 'textbox' || role === 'switch') {\n if (_focusable !== false) {\n domProps.tabIndex = '0';\n }\n } else {\n // Everything else must explicitly set the prop\n if (_focusable === true) {\n domProps.tabIndex = '0';\n }\n } // STYLE\n\n\n var reactNativeStyle = StyleSheet.compose(pointerEvents && pointerEventsStyles[pointerEvents], providedStyle); // Additional style resets for interactive elements\n\n var needsCursor = (role === 'button' || role === 'link') && !disabled;\n var needsReset = elementType === 'a' || elementType === 'button' || elementType === 'li' || elementType === 'ul' || role === 'heading'; // Classic CSS styles\n\n var finalClassList = [needsReset && classes.reset, needsCursor && classes.cursor, classList]; // Resolve styles\n\n var _styleResolver$resolv = styleResolver.resolve(reactNativeStyle, finalClassList),\n className = _styleResolver$resolv.className,\n style = _styleResolver$resolv.style;\n\n if (className != null && className !== '') {\n domProps.className = className;\n }\n\n if (style) {\n domProps.style = style;\n } // OTHER\n // Native element ID\n\n\n if (nativeID != null) {\n domProps.id = nativeID;\n } // Automated test IDs\n\n\n if (testID != null) {\n domProps['data-testid'] = testID;\n } // Keyboard accessibility\n // Button-like roles should trigger 'onClick' if SPACE key is pressed.\n // Button-like roles should not trigger 'onClick' if they are disabled.\n\n\n if (isNativeInteractiveElement || role === 'button' || role === 'menuitem' || _focusable === true && !disabled) {\n var onClick = domProps.onClick;\n\n if (onClick != null) {\n if (disabled) {\n // Prevent click propagating if the element is disabled. See #1757\n domProps.onClick = function (e) {\n e.stopPropagation();\n };\n } else if (!isNativeInteractiveElement) {\n // For native elements that are focusable but don't dispatch 'click' events\n // for keyboards.\n var onKeyDown = domProps.onKeyDown;\n\n domProps.onKeyDown = function (e) {\n var key = e.key,\n repeat = e.repeat;\n var isSpacebarKey = key === ' ' || key === 'Spacebar';\n var isButtonRole = role === 'button' || role === 'menuitem';\n\n if (onKeyDown != null) {\n onKeyDown(e);\n }\n\n if (!repeat && key === 'Enter') {\n onClick(e);\n } else if (isSpacebarKey && isButtonRole) {\n if (!repeat) {\n onClick(e);\n } // Prevent spacebar scrolling the window\n\n\n e.preventDefault();\n }\n };\n }\n }\n }\n\n return domProps;\n};\n\nexport default createDOMProps;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport normalizeColor from '../../modules/normalizeColor';\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\nvar defaultOffset = {\n height: 0,\n width: 0\n};\n\nvar resolveShadowValue = function resolveShadowValue(style) {\n var shadowColor = style.shadowColor,\n shadowOffset = style.shadowOffset,\n shadowOpacity = style.shadowOpacity,\n shadowRadius = style.shadowRadius;\n\n var _ref = shadowOffset || defaultOffset,\n height = _ref.height,\n width = _ref.width;\n\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(shadowRadius || 0);\n var color = normalizeColor(shadowColor || 'black', shadowOpacity);\n\n if (color != null && offsetX != null && offsetY != null && blurRadius != null) {\n return offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n};\n\nexport default resolveShadowValue;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nexport default function mergeRefs() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return function forwardRef(node) {\n args.forEach(function (ref) {\n if (ref == null) {\n return;\n }\n\n if (typeof ref === 'function') {\n ref(node);\n return;\n }\n\n if (typeof ref === 'object') {\n ref.current = node;\n return;\n }\n\n console.error(\"mergeRefs cannot handle Refs of type boolean, number or string, received ref \" + String(ref));\n });\n };\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport TextInputState from '../TextInputState';\n\nvar dismissKeyboard = function dismissKeyboard() {\n TextInputState.blurTextInput(TextInputState.currentlyFocusedField());\n};\n\nexport default dismissKeyboard;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport invariant from 'fbjs/lib/invariant';\nexport function get(name) {\n return null;\n}\nexport function getEnforcing(name) {\n var module = get(name);\n invariant(module != null, \"TurboModuleRegistry.getEnforcing(...): '\" + name + \"' could not be found. \" + 'Verify that a module by this name is registered in the native binary.');\n return module;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport Platform from '../../../exports/Platform';\nimport RCTDeviceEventEmitter from './RCTDeviceEventEmitter';\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * `NativeEventEmitter` is intended for use by Native Modules to emit events to\n * JavaScript listeners. If a `NativeModule` is supplied to the constructor, it\n * will be notified (via `addListener` and `removeListeners`) when the listener\n * count changes to manage \"native memory\".\n *\n * Currently, all native events are fired via a global `RCTDeviceEventEmitter`.\n * This means event names must be globally unique, and it means that call sites\n * can theoretically listen to `RCTDeviceEventEmitter` (although discouraged).\n */\nvar NativeEventEmitter = /*#__PURE__*/function () {\n function NativeEventEmitter(nativeModule) {\n if (Platform.OS === 'ios') {\n invariant(nativeModule != null, '`new NativeEventEmitter()` requires a non-null argument.');\n this._nativeModule = nativeModule;\n }\n }\n\n var _proto = NativeEventEmitter.prototype;\n\n _proto.addListener = function addListener(eventType, listener, context) {\n var _this$_nativeModule,\n _this = this;\n\n (_this$_nativeModule = this._nativeModule) == null ? void 0 : _this$_nativeModule.addListener(eventType);\n var subscription = RCTDeviceEventEmitter.addListener(eventType, listener, context);\n return {\n remove: function remove() {\n if (subscription != null) {\n var _this$_nativeModule2;\n\n (_this$_nativeModule2 = _this._nativeModule) == null ? void 0 : _this$_nativeModule2.removeListeners(1); // $FlowFixMe[incompatible-use]\n\n subscription.remove();\n subscription = null;\n }\n }\n };\n }\n /**\n * @deprecated Use `remove` on the EventSubscription from `addListener`.\n */\n ;\n\n _proto.removeListener = function removeListener(eventType, listener) {\n var _this$_nativeModule3;\n\n (_this$_nativeModule3 = this._nativeModule) == null ? void 0 : _this$_nativeModule3.removeListeners(1); // NOTE: This will report a deprecation notice via `console.error`.\n // $FlowFixMe[prop-missing] - `removeListener` exists but is deprecated.\n\n RCTDeviceEventEmitter.removeListener(eventType, listener);\n };\n\n _proto.emit = function emit(eventType) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n // Generally, `RCTDeviceEventEmitter` is directly invoked. But this is\n // included for completeness.\n RCTDeviceEventEmitter.emit.apply(RCTDeviceEventEmitter, [eventType].concat(args));\n };\n\n _proto.removeAllListeners = function removeAllListeners(eventType) {\n var _this$_nativeModule4;\n\n invariant(eventType != null, '`NativeEventEmitter.removeAllListener()` requires a non-null argument.');\n (_this$_nativeModule4 = this._nativeModule) == null ? void 0 : _this$_nativeModule4.removeListeners(this.listenerCount(eventType));\n RCTDeviceEventEmitter.removeAllListeners(eventType);\n };\n\n _proto.listenerCount = function listenerCount(eventType) {\n return RCTDeviceEventEmitter.listenerCount(eventType);\n };\n\n return NativeEventEmitter;\n}();\n\nexport { NativeEventEmitter as default };","import * as React from 'react';\nimport type { NavigationAction } from '@react-navigation/routers';\n\nconst UnhandledActionContext = React.createContext<\n ((action: NavigationAction) => void) | undefined\n>(undefined);\n\nexport default UnhandledActionContext;\n","import * as React from 'react';\n\nconst MISSING_CONTEXT_ERROR = \"Couldn't find a schedule context.\";\n\nexport const ScheduleUpdateContext = React.createContext<{\n scheduleUpdate: (callback: () => void) => void;\n flushUpdates: () => void;\n}>({\n scheduleUpdate() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n flushUpdates() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n});\n\n/**\n * When screen config changes, we want to update the navigator in the same update phase.\n * However, navigation state is in the root component and React won't let us update it from a child.\n * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState.\n * It lets all subsequent updates access the latest state so it stays correct.\n * Then we call setState during after the component updates.\n */\nexport default function useScheduleUpdate(callback: () => void) {\n const { scheduleUpdate, flushUpdates } = React.useContext(\n ScheduleUpdateContext\n );\n\n scheduleUpdate(callback);\n\n React.useEffect(flushUpdates);\n}\n","import * as React from 'react';\nimport type { ListenerMap } from './NavigationBuilderContext';\n\n/**\n * Hook which lets child navigators add action listeners.\n */\nexport default function useChildListeners() {\n const { current: listeners } = React.useRef<\n {\n [K in keyof ListenerMap]: ListenerMap[K][];\n }\n >({\n action: [],\n focus: [],\n });\n\n const addListener = React.useCallback(\n <T extends keyof ListenerMap>(type: T, listener: ListenerMap[T]) => {\n // @ts-expect-error: listener should be correct type according to `type`\n listeners[type].push(listener);\n\n return () => {\n // @ts-expect-error: listener should be correct type according to `type`\n const index = listeners[type].indexOf(listener);\n\n listeners[type].splice(index, 1);\n };\n },\n [listeners]\n );\n\n return {\n listeners,\n addListener,\n };\n}\n","import * as React from 'react';\nimport type { KeyedListenerMap } from './NavigationBuilderContext';\n\n/**\n * Hook which lets child navigators add getters to be called for obtaining rehydrated state.\n */\n\nexport default function useKeyedChildListeners() {\n const { current: keyedListeners } = React.useRef<\n {\n [K in keyof KeyedListenerMap]: Record<\n string,\n KeyedListenerMap[K] | undefined\n >;\n }\n >({\n getState: {},\n beforeRemove: {},\n });\n\n const addKeyedListener = React.useCallback(\n <T extends keyof KeyedListenerMap>(\n type: T,\n key: string,\n listener: KeyedListenerMap[T]\n ) => {\n // @ts-expect-error: listener should be correct type according to `type`\n keyedListeners[type][key] = listener;\n\n return () => {\n // @ts-expect-error: listener should be correct type according to `type`\n keyedListeners[type][key] = undefined;\n };\n },\n [keyedListeners]\n );\n\n return {\n keyedListeners,\n addKeyedListener,\n };\n}\n","import * as React from 'react';\nimport type { ParamListBase, NavigationState } from '@react-navigation/routers';\nimport NavigationStateContext from './NavigationStateContext';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport type { NavigationProp } from './types';\n\ntype Options = {\n key?: string;\n navigation?: NavigationProp<ParamListBase, string, NavigationState, object>;\n options?: object | undefined;\n};\n\nexport default function useOptionsGetters({\n key,\n options,\n navigation,\n}: Options) {\n const optionsRef = React.useRef<object | undefined>(options);\n const optionsGettersFromChildRef = React.useRef<\n Record<string, () => object | undefined | null>\n >({});\n\n const { onOptionsChange } = React.useContext(NavigationBuilderContext);\n const { addOptionsGetter: parentAddOptionsGetter } = React.useContext(\n NavigationStateContext\n );\n\n const optionsChangeListener = React.useCallback(() => {\n const isFocused = navigation?.isFocused() ?? true;\n const hasChildren = Object.keys(optionsGettersFromChildRef.current).length;\n\n if (isFocused && !hasChildren) {\n onOptionsChange(optionsRef.current ?? {});\n }\n }, [navigation, onOptionsChange]);\n\n React.useEffect(() => {\n optionsRef.current = options;\n optionsChangeListener();\n\n return navigation?.addListener('focus', optionsChangeListener);\n }, [navigation, options, optionsChangeListener]);\n\n const getOptionsFromListener = React.useCallback(() => {\n for (let key in optionsGettersFromChildRef.current) {\n if (optionsGettersFromChildRef.current.hasOwnProperty(key)) {\n const result = optionsGettersFromChildRef.current[key]?.();\n\n // null means unfocused route\n if (result !== null) {\n return result;\n }\n }\n }\n\n return null;\n }, []);\n\n const getCurrentOptions = React.useCallback(() => {\n const isFocused = navigation?.isFocused() ?? true;\n\n if (!isFocused) {\n return null;\n }\n\n const optionsFromListener = getOptionsFromListener();\n\n if (optionsFromListener !== null) {\n return optionsFromListener;\n }\n\n return optionsRef.current;\n }, [navigation, getOptionsFromListener]);\n\n React.useEffect(() => {\n return parentAddOptionsGetter?.(key!, getCurrentOptions);\n }, [getCurrentOptions, parentAddOptionsGetter, key]);\n\n const addOptionsGetter = React.useCallback(\n (key: string, getter: () => object | undefined | null) => {\n optionsGettersFromChildRef.current[key] = getter;\n optionsChangeListener();\n\n return () => {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete optionsGettersFromChildRef.current[key];\n optionsChangeListener();\n };\n },\n [optionsChangeListener]\n );\n\n return {\n addOptionsGetter,\n getCurrentOptions,\n };\n}\n","import * as React from 'react';\nimport type { EventEmitter, EventConsumer, EventArg } from './types';\n\nexport type NavigationEventEmitter<\n T extends Record<string, any>\n> = EventEmitter<T> & {\n create: (target: string) => EventConsumer<T>;\n};\n\ntype Listeners = ((e: any) => void)[];\n\n/**\n * Hook to manage the event system used by the navigator to notify screens of various events.\n */\nexport default function useEventEmitter<T extends Record<string, any>>(\n listen?: (e: any) => void\n): NavigationEventEmitter<T> {\n const listenRef = React.useRef(listen);\n\n React.useEffect(() => {\n listenRef.current = listen;\n });\n\n const listeners = React.useRef<Record<string, Record<string, Listeners>>>({});\n\n const create = React.useCallback((target: string) => {\n const removeListener = (type: string, callback: (data: any) => void) => {\n const callbacks = listeners.current[type]\n ? listeners.current[type][target]\n : undefined;\n\n if (!callbacks) {\n return;\n }\n\n const index = callbacks.indexOf(callback);\n\n callbacks.splice(index, 1);\n };\n\n const addListener = (type: string, callback: (data: any) => void) => {\n listeners.current[type] = listeners.current[type] || {};\n listeners.current[type][target] = listeners.current[type][target] || [];\n listeners.current[type][target].push(callback);\n\n return () => removeListener(type, callback);\n };\n\n return {\n addListener,\n removeListener,\n };\n }, []);\n\n const emit = React.useCallback(\n ({\n type,\n data,\n target,\n canPreventDefault,\n }: {\n type: string;\n data?: any;\n target?: string;\n canPreventDefault?: boolean;\n }) => {\n const items = listeners.current[type] || {};\n\n // Copy the current list of callbacks in case they are mutated during execution\n const callbacks =\n target !== undefined\n ? items[target]?.slice()\n : ([] as Listeners)\n .concat(...Object.keys(items).map((t) => items[t]))\n .filter((cb, i, self) => self.lastIndexOf(cb) === i);\n\n const event: EventArg<any, any, any> = {\n get type() {\n return type;\n },\n };\n\n if (target !== undefined) {\n Object.defineProperty(event, 'target', {\n enumerable: true,\n get() {\n return target;\n },\n });\n }\n\n if (data !== undefined) {\n Object.defineProperty(event, 'data', {\n enumerable: true,\n get() {\n return data;\n },\n });\n }\n\n if (canPreventDefault) {\n let defaultPrevented = false;\n\n Object.defineProperties(event, {\n defaultPrevented: {\n enumerable: true,\n get() {\n return defaultPrevented;\n },\n },\n preventDefault: {\n enumerable: true,\n value() {\n defaultPrevented = true;\n },\n },\n });\n }\n\n listenRef.current?.(event);\n\n callbacks?.forEach((cb) => cb(event));\n\n return event as any;\n },\n []\n );\n\n return React.useMemo(() => ({ create, emit }), [create, emit]);\n}\n","import type { ParamListBase, NavigationState } from '@react-navigation/routers';\nimport type { RouteConfig, EventMapBase } from './types';\n\n/**\n * Empty component used for specifying route configuration.\n */\nexport default function Screen<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList,\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n>(_: RouteConfig<ParamList, RouteName, State, ScreenOptions, EventMap>) {\n /* istanbul ignore next */\n return null;\n}\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (value === null || value === undefined || value.length === 0) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${encode(object.fragmentIdentifier, options)}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","import type { PathConfigMap } from './types';\n\ntype Options = {\n initialRouteName?: string;\n screens: PathConfigMap;\n};\n\nexport default function checkLegacyPathConfig(\n config?: Options\n): [boolean, Options | undefined] {\n let legacy = false;\n\n if (config) {\n // Assume legacy configuration if config has any other keys except `screens` and `initialRouteName`\n legacy = Object.keys(config).some(\n (key) => key !== 'screens' && key !== 'initialRouteName'\n );\n\n if (\n legacy &&\n (config.hasOwnProperty('screens') ||\n config.hasOwnProperty('initialRouteName'))\n ) {\n throw new Error(\n 'Found invalid keys in the configuration object. See https://reactnavigation.org/docs/configuring-links/ for more details on the shape of the configuration object.'\n );\n }\n }\n\n if (legacy) {\n // @ts-expect-error: we have incorrect type for config since we don't type legacy config\n return [legacy, { screens: config }];\n }\n\n return [legacy, config];\n}\n","import * as React from 'react';\nimport DefaultTheme from './DefaultTheme';\nimport type { Theme } from '../types';\n\nconst ThemeContext = React.createContext<Theme>(DefaultTheme);\n\nThemeContext.displayName = 'ThemeContext';\n\nexport default ThemeContext;\n","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from './_isPlaceholder';\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _concat from './internal/_concat';\nimport _curry3 from './internal/_curry3';\n\n/**\n * Applies a function to the value at the given index of an array, returning a\n * new copy of the array with the element at the given index replaced with the\n * result of the function application.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig (a -> a) -> Number -> [a] -> [a]\n * @param {Function} fn The function to apply.\n * @param {Number} idx The index.\n * @param {Array|Arguments} list An array-like object whose value\n * at the supplied index will be replaced.\n * @return {Array} A copy of the supplied array-like object with\n * the element at index `idx` replaced with the value\n * returned by applying `fn` to the existing element.\n * @see R.update\n * @example\n *\n * R.adjust(R.add(10), 1, [1, 2, 3]); //=> [1, 12, 3]\n * R.adjust(R.add(10))(1)([1, 2, 3]); //=> [1, 12, 3]\n * @symb R.adjust(f, -1, [a, b]) = [a, f(b)]\n * @symb R.adjust(f, 0, [a, b]) = [f(a), b]\n */\nvar adjust = /*#__PURE__*/_curry3(function adjust(fn, idx, list) {\n if (idx >= list.length || idx < -list.length) {\n return list;\n }\n var start = idx < 0 ? list.length : 0;\n var _idx = start + idx;\n var _list = _concat(list);\n _list[_idx] = fn(list[_idx]);\n return _list;\n});\nexport default adjust;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _curry1 from './_curry1';\nimport _isArray from './_isArray';\nimport _isString from './_isString';\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n */\nvar _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n if (!x) {\n return false;\n }\n if (typeof x !== 'object') {\n return false;\n }\n if (_isString(x)) {\n return false;\n }\n if (x.nodeType === 1) {\n return !!x.length;\n }\n if (x.length === 0) {\n return true;\n }\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n return false;\n});\nexport default _isArrayLike;","import _isArrayLike from './_isArrayLike';\nimport _xwrap from './_xwrap';\nimport bind from '../bind';\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n idx += 1;\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n step = iter.next();\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\n\nexport default function _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _has from './_has';\n\nvar toString = Object.prototype.toString;\nvar _isArguments = function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n};\n\nexport default _isArguments;","import _curry1 from './internal/_curry1';\nimport _has from './internal/_has';\nimport _isArguments from './internal/_isArguments';\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar _keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n} : function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n};\nvar keys = /*#__PURE__*/_curry1(_keys);\nexport default keys;","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","import _isArrayLike from './_isArrayLike';\n\n/**\n * `_makeFlat` is a helper function that returns a one-level or fully recursive\n * function based on the flag passed in.\n *\n * @private\n */\nexport default function _makeFlat(recursive) {\n return function flatt(list) {\n var value, jlen, j;\n var result = [];\n var idx = 0;\n var ilen = list.length;\n\n while (idx < ilen) {\n if (_isArrayLike(list[idx])) {\n value = recursive ? flatt(list[idx]) : list[idx];\n j = 0;\n jlen = value.length;\n while (j < jlen) {\n result[result.length] = value[j];\n j += 1;\n }\n } else {\n result[result.length] = list[idx];\n }\n idx += 1;\n }\n return result;\n };\n}","/**\n * Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\nexport default _toISOString;","import _curry2 from './_curry2';\nimport _reduce from './_reduce';\nimport _xfBase from './_xfBase';\n\nvar XDropLastWhile = /*#__PURE__*/function () {\n function XDropLastWhile(fn, xf) {\n this.f = fn;\n this.retained = [];\n this.xf = xf;\n }\n XDropLastWhile.prototype['@@transducer/init'] = _xfBase.init;\n XDropLastWhile.prototype['@@transducer/result'] = function (result) {\n this.retained = null;\n return this.xf['@@transducer/result'](result);\n };\n XDropLastWhile.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.retain(result, input) : this.flush(result, input);\n };\n XDropLastWhile.prototype.flush = function (result, input) {\n result = _reduce(this.xf['@@transducer/step'], result, this.retained);\n this.retained = [];\n return this.xf['@@transducer/step'](result, input);\n };\n XDropLastWhile.prototype.retain = function (result, input) {\n this.retained.push(input);\n return result;\n };\n\n return XDropLastWhile;\n}();\n\nvar _xdropLastWhile = /*#__PURE__*/_curry2(function _xdropLastWhile(fn, xf) {\n return new XDropLastWhile(fn, xf);\n});\nexport default _xdropLastWhile;","import _curry1 from './internal/_curry1';\nimport _makeFlat from './internal/_makeFlat';\n\n/**\n * Returns a new list by pulling every item out of it (and all its sub-arrays)\n * and putting them in a new array, depth-first.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b]\n * @param {Array} list The array to consider.\n * @return {Array} The flattened list.\n * @see R.unnest\n * @example\n *\n * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);\n * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n */\nvar flatten = /*#__PURE__*/_curry1( /*#__PURE__*/_makeFlat(true));\nexport default flatten;","import _objectAssign from './_objectAssign';\n\nexport default typeof Object.assign === 'function' ? Object.assign : _objectAssign;","import _cloneRegExp from './internal/_cloneRegExp';\nimport _curry2 from './internal/_curry2';\nimport _isRegExp from './internal/_isRegExp';\nimport toString from './toString';\n\n/**\n * Determines whether a given string matches a given regular expression.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category String\n * @sig RegExp -> String -> Boolean\n * @param {RegExp} pattern\n * @param {String} str\n * @return {Boolean}\n * @see R.match\n * @example\n *\n * R.test(/^x/, 'xyz'); //=> true\n * R.test(/^y/, 'xyz'); //=> false\n */\nvar test = /*#__PURE__*/_curry2(function test(pattern, str) {\n if (!_isRegExp(pattern)) {\n throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern));\n }\n return _cloneRegExp(pattern).test(str);\n});\nexport default test;","import _curry1 from './internal/_curry1';\n\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\nvar _trim = !hasProtoTrim || /*#__PURE__*/ws.trim() || ! /*#__PURE__*/zeroWidth.trim() ? function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n} : function trim(str) {\n return str.trim();\n};\nvar trim = /*#__PURE__*/_curry1(_trim);\nexport default trim;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar isWebColor = function isWebColor(color) {\n return color === 'currentcolor' || color === 'currentColor' || color === 'inherit' || color.indexOf('var(') === 0;\n};\n\nexport default isWebColor;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport isWebColor from '../isWebColor';\nimport processColor from '../../exports/processColor';\n\nvar normalizeColor = function normalizeColor(color, opacity) {\n if (opacity === void 0) {\n opacity = 1;\n }\n\n if (color == null) return;\n\n if (typeof color === 'string' && isWebColor(color)) {\n return color;\n }\n\n var colorInt = processColor(color);\n\n if (colorInt != null) {\n var r = colorInt >> 16 & 255;\n var g = colorInt >> 8 & 255;\n var b = colorInt & 255;\n var a = (colorInt >> 24 & 255) / 255;\n var alpha = (a * opacity).toFixed(2);\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + alpha + \")\";\n }\n};\n\nexport default normalizeColor;","import indexBy from 'index-array-by';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction diffArrays(prev, next, idAccessor) {\n var result = {\n enter: [],\n update: [],\n exit: []\n };\n\n if (!idAccessor) {\n // use object references for comparison\n var prevSet = new Set(prev);\n var nextSet = new Set(next);\n new Set([].concat(_toConsumableArray(prevSet), _toConsumableArray(nextSet))).forEach(function (item) {\n var type = !prevSet.has(item) ? 'enter' : !nextSet.has(item) ? 'exit' : 'update';\n result[type].push(type === 'update' ? [item, item] : item);\n });\n } else {\n // compare by id (duplicate keys are ignored)\n var prevById = indexBy(prev, idAccessor, false);\n var nextById = indexBy(next, idAccessor, false);\n var byId = Object.assign({}, prevById, nextById);\n Object.entries(byId).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n id = _ref2[0],\n item = _ref2[1];\n\n var type = !prevById.hasOwnProperty(id) ? 'enter' : !nextById.hasOwnProperty(id) ? 'exit' : 'update';\n result[type].push(type === 'update' ? [prevById[id], nextById[id]] : item);\n });\n }\n\n return result;\n}\n\nfunction dataBindDiff(data, existingObjs, _ref3) {\n var _ref3$objBindAttr = _ref3.objBindAttr,\n objBindAttr = _ref3$objBindAttr === void 0 ? '__obj' : _ref3$objBindAttr,\n _ref3$dataBindAttr = _ref3.dataBindAttr,\n dataBindAttr = _ref3$dataBindAttr === void 0 ? '__data' : _ref3$dataBindAttr,\n idAccessor = _ref3.idAccessor,\n _ref3$purge = _ref3.purge,\n purge = _ref3$purge === void 0 ? false : _ref3$purge;\n\n var isObjValid = function isObjValid(obj) {\n return obj.hasOwnProperty(dataBindAttr);\n };\n\n var removeObjs = existingObjs.filter(function (obj) {\n return !isObjValid(obj);\n });\n var prevD = existingObjs.filter(isObjValid).map(function (obj) {\n return obj[dataBindAttr];\n });\n var nextD = data;\n var diff = purge ? {\n enter: nextD,\n exit: prevD,\n update: []\n } // don't diff data in purge mode\n : diffArrays(prevD, nextD, idAccessor);\n diff.update = diff.update.map(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n prevD = _ref5[0],\n nextD = _ref5[1];\n\n if (prevD !== nextD) {\n // transfer obj to new data point (if different)\n nextD[objBindAttr] = prevD[objBindAttr];\n nextD[objBindAttr][dataBindAttr] = nextD;\n }\n\n return nextD;\n });\n diff.exit = diff.exit.concat(removeObjs.map(function (obj) {\n return _defineProperty({}, objBindAttr, obj);\n }));\n return diff;\n}\n\nfunction viewDigest(data, existingObjs, // list\nappendObj, // item => {...} function\nremoveObj, // item => {...} function\n_ref7) {\n var _ref7$createObj = _ref7.createObj,\n createObj = _ref7$createObj === void 0 ? function (d) {\n return {};\n } : _ref7$createObj,\n _ref7$updateObj = _ref7.updateObj,\n updateObj = _ref7$updateObj === void 0 ? function (obj, d) {} : _ref7$updateObj,\n _ref7$exitObj = _ref7.exitObj,\n exitObj = _ref7$exitObj === void 0 ? function (obj) {} : _ref7$exitObj,\n _ref7$objBindAttr = _ref7.objBindAttr,\n objBindAttr = _ref7$objBindAttr === void 0 ? '__obj' : _ref7$objBindAttr,\n _ref7$dataBindAttr = _ref7.dataBindAttr,\n dataBindAttr = _ref7$dataBindAttr === void 0 ? '__data' : _ref7$dataBindAttr,\n dataDiffOptions = _objectWithoutProperties(_ref7, [\"createObj\", \"updateObj\", \"exitObj\", \"objBindAttr\", \"dataBindAttr\"]);\n\n var _dataBindDiff = dataBindDiff(data, existingObjs, _objectSpread2({\n objBindAttr: objBindAttr,\n dataBindAttr: dataBindAttr\n }, dataDiffOptions)),\n enter = _dataBindDiff.enter,\n update = _dataBindDiff.update,\n exit = _dataBindDiff.exit; // Remove exiting points\n\n\n exit.forEach(function (d) {\n var obj = d[objBindAttr];\n delete d[objBindAttr]; // unbind obj\n\n exitObj(obj);\n removeObj(obj);\n });\n var newObjs = createObjs(enter);\n var pointsData = [].concat(_toConsumableArray(enter), _toConsumableArray(update));\n updateObjs(pointsData); // Add new points\n\n newObjs.forEach(appendObj); //\n\n function createObjs(data) {\n var newObjs = [];\n data.forEach(function (d) {\n var obj = createObj(d);\n\n if (obj) {\n obj[dataBindAttr] = d;\n d[objBindAttr] = obj;\n newObjs.push(obj);\n }\n });\n return newObjs;\n }\n\n function updateObjs(data) {\n data.forEach(function (d) {\n var obj = d[objBindAttr];\n\n if (obj) {\n obj[dataBindAttr] = d;\n updateObj(obj, d);\n }\n });\n }\n}\n\nexport default viewDigest;\n","import { Group, Mesh, MeshLambertMaterial, Color, BufferGeometry, BufferAttribute, Matrix4, Vector3, SphereBufferGeometry, CylinderBufferGeometry, TubeBufferGeometry, ConeBufferGeometry, Line, LineBasicMaterial, QuadraticBezierCurve3, CubicBezierCurve3, Box3 } from 'three';\nimport { forceSimulation, forceLink, forceManyBody, forceCenter, forceRadial } from 'd3-force-3d';\nimport graph from 'ngraph.graph';\nimport forcelayout from 'ngraph.forcelayout';\nimport Kapsule from 'kapsule';\nimport accessorFn from 'accessor-fn';\nimport { min, max } from 'd3-array';\nimport dataJoint from 'data-joint';\nimport { scaleOrdinal } from 'd3-scale';\nimport { schemePaired } from 'd3-scale-chromatic';\nimport tinyColor from 'tinycolor2';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar materialDispose = function materialDispose(material) {\n if (material instanceof Array) {\n material.forEach(materialDispose);\n } else {\n if (material.map) {\n material.map.dispose();\n }\n\n material.dispose();\n }\n};\n\nvar deallocate = function deallocate(obj) {\n if (obj.geometry) {\n obj.geometry.dispose();\n }\n\n if (obj.material) {\n materialDispose(obj.material);\n }\n\n if (obj.texture) {\n obj.texture.dispose();\n }\n\n if (obj.children) {\n obj.children.forEach(deallocate);\n }\n};\n\nvar emptyObject = function emptyObject(obj) {\n while (obj.children.length) {\n var childObj = obj.children[0];\n obj.remove(childObj);\n deallocate(childObj);\n }\n};\n\nvar _excluded = [\"objFilter\"];\n\nfunction threeDigest(data, scene) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var _ref$objFilter = _ref.objFilter,\n objFilter = _ref$objFilter === void 0 ? function () {\n return true;\n } : _ref$objFilter,\n options = _objectWithoutProperties(_ref, _excluded);\n\n return dataJoint(data, scene.children.filter(objFilter), function (obj) {\n return scene.add(obj);\n }, function (obj) {\n scene.remove(obj);\n emptyObject(obj);\n }, _objectSpread2({\n objBindAttr: '__threeObj'\n }, options));\n}\n\nvar colorStr2Hex = function colorStr2Hex(str) {\n return isNaN(str) ? parseInt(tinyColor(str).toHex(), 16) : str;\n};\n\nvar colorAlpha = function colorAlpha(str) {\n return isNaN(str) ? tinyColor(str).getAlpha() : 1;\n};\n\nvar autoColorScale = scaleOrdinal(schemePaired); // Autoset attribute colorField by colorByAccessor property\n// If an object has already a color, don't set it\n// Objects can be nodes or links\n\nfunction autoColorObjects(objects, colorByAccessor, colorField) {\n if (!colorByAccessor || typeof colorField !== 'string') return;\n objects.filter(function (obj) {\n return !obj[colorField];\n }).forEach(function (obj) {\n obj[colorField] = autoColorScale(colorByAccessor(obj));\n });\n}\n\nfunction getDagDepths (_ref, idAccessor) {\n var nodes = _ref.nodes,\n links = _ref.links;\n\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$nodeFilter = _ref2.nodeFilter,\n nodeFilter = _ref2$nodeFilter === void 0 ? function () {\n return true;\n } : _ref2$nodeFilter,\n _ref2$onLoopError = _ref2.onLoopError,\n onLoopError = _ref2$onLoopError === void 0 ? function (loopIds) {\n throw \"Invalid DAG structure! Found cycle in node path: \".concat(loopIds.join(' -> '), \".\");\n } : _ref2$onLoopError;\n\n // linked graph\n var graph = {};\n nodes.forEach(function (node) {\n return graph[idAccessor(node)] = {\n data: node,\n out: [],\n depth: -1,\n skip: !nodeFilter(node)\n };\n });\n links.forEach(function (_ref3) {\n var source = _ref3.source,\n target = _ref3.target;\n var sourceId = getNodeId(source);\n var targetId = getNodeId(target);\n if (!graph.hasOwnProperty(sourceId)) throw \"Missing source node with id: \".concat(sourceId);\n if (!graph.hasOwnProperty(targetId)) throw \"Missing target node with id: \".concat(targetId);\n var sourceNode = graph[sourceId];\n var targetNode = graph[targetId];\n sourceNode.out.push(targetNode);\n\n function getNodeId(node) {\n return _typeof(node) === 'object' ? idAccessor(node) : node;\n }\n });\n var foundLoops = [];\n traverse(Object.values(graph));\n var nodeDepths = Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(graph).filter(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n node = _ref5[1];\n\n return !node.skip;\n }).map(function (_ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n id = _ref7[0],\n node = _ref7[1];\n\n return _defineProperty({}, id, node.depth);\n }))));\n return nodeDepths;\n\n function traverse(nodes) {\n var nodeStack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var currentDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n\n if (nodeStack.indexOf(node) !== -1) {\n var _ret = function () {\n var loop = [].concat(_toConsumableArray(nodeStack.slice(nodeStack.indexOf(node))), [node]).map(function (d) {\n return idAccessor(d.data);\n });\n\n if (!foundLoops.some(function (foundLoop) {\n return foundLoop.length === loop.length && foundLoop.every(function (id, idx) {\n return id === loop[idx];\n });\n })) {\n foundLoops.push(loop);\n onLoopError(loop);\n }\n\n return \"continue\";\n }();\n\n if (_ret === \"continue\") continue;\n }\n\n if (currentDepth > node.depth) {\n // Don't unnecessarily revisit chunks of the graph\n node.depth = currentDepth;\n traverse(node.out, [].concat(_toConsumableArray(nodeStack), [node]), currentDepth + (node.skip ? 0 : 1));\n }\n }\n }\n}\n\nvar three$1 = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists\n: {\n Group: Group,\n Mesh: Mesh,\n MeshLambertMaterial: MeshLambertMaterial,\n Color: Color,\n BufferGeometry: BufferGeometry,\n BufferAttribute: BufferAttribute,\n Matrix4: Matrix4,\n Vector3: Vector3,\n SphereBufferGeometry: SphereBufferGeometry,\n CylinderBufferGeometry: CylinderBufferGeometry,\n TubeBufferGeometry: TubeBufferGeometry,\n ConeBufferGeometry: ConeBufferGeometry,\n Line: Line,\n LineBasicMaterial: LineBasicMaterial,\n QuadraticBezierCurve3: QuadraticBezierCurve3,\n CubicBezierCurve3: CubicBezierCurve3,\n Box3: Box3\n};\nvar ngraph = {\n graph: graph,\n forcelayout: forcelayout\n};\n\nvar DAG_LEVEL_NODE_RATIO = 2; // support multiple method names for backwards threejs compatibility\n\nvar setAttributeFn = new three$1.BufferGeometry().setAttribute ? 'setAttribute' : 'addAttribute';\nvar applyMatrix4Fn = new three$1.BufferGeometry().applyMatrix4 ? 'applyMatrix4' : 'applyMatrix';\nvar ForceGraph = Kapsule({\n props: {\n jsonUrl: {\n onChange: function onChange(jsonUrl, state) {\n var _this = this;\n\n if (jsonUrl && !state.fetchingJson) {\n // Load data asynchronously\n state.fetchingJson = true;\n state.onLoading();\n fetch(jsonUrl).then(function (r) {\n return r.json();\n }).then(function (json) {\n state.fetchingJson = false;\n state.onFinishLoading(json);\n\n _this.graphData(json);\n });\n }\n },\n triggerUpdate: false\n },\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n },\n onChange: function onChange(graphData, state) {\n state.engineRunning = false; // Pause simulation immediately\n }\n },\n numDimensions: {\n \"default\": 3,\n onChange: function onChange(numDim, state) {\n var chargeForce = state.d3ForceLayout.force('charge'); // Increase repulsion on 3D mode for improved spatial separation\n\n if (chargeForce) {\n chargeForce.strength(numDim > 2 ? -60 : -30);\n }\n\n if (numDim < 3) {\n eraseDimension(state.graphData.nodes, 'z');\n }\n\n if (numDim < 2) {\n eraseDimension(state.graphData.nodes, 'y');\n }\n\n function eraseDimension(nodes, dim) {\n nodes.forEach(function (d) {\n delete d[dim]; // position\n\n delete d[\"v\".concat(dim)]; // velocity\n });\n }\n }\n },\n dagMode: {\n onChange: function onChange(dagMode, state) {\n // td, bu, lr, rl, zin, zout, radialin, radialout\n !dagMode && state.forceEngine === 'd3' && (state.graphData.nodes || []).forEach(function (n) {\n return n.fx = n.fy = n.fz = undefined;\n }); // unfix nodes when disabling dag mode\n }\n },\n dagLevelDistance: {},\n dagNodeFilter: {\n \"default\": function _default(node) {\n return true;\n }\n },\n onDagError: {\n triggerUpdate: false\n },\n nodeRelSize: {\n \"default\": 4\n },\n // volume per val unit\n nodeId: {\n \"default\": 'id'\n },\n nodeVal: {\n \"default\": 'val'\n },\n nodeResolution: {\n \"default\": 8\n },\n // how many slice segments in the sphere's circumference\n nodeColor: {\n \"default\": 'color'\n },\n nodeAutoColorBy: {},\n nodeOpacity: {\n \"default\": 0.75\n },\n nodeVisibility: {\n \"default\": true\n },\n nodeThreeObject: {},\n nodeThreeObjectExtend: {\n \"default\": false\n },\n linkSource: {\n \"default\": 'source'\n },\n linkTarget: {\n \"default\": 'target'\n },\n linkVisibility: {\n \"default\": true\n },\n linkColor: {\n \"default\": 'color'\n },\n linkAutoColorBy: {},\n linkOpacity: {\n \"default\": 0.2\n },\n linkWidth: {},\n // Rounded to nearest decimal. For falsy values use dimensionless line with 1px regardless of distance.\n linkResolution: {\n \"default\": 6\n },\n // how many radial segments in each line tube's geometry\n linkCurvature: {\n \"default\": 0,\n triggerUpdate: false\n },\n // line curvature radius (0: straight, 1: semi-circle)\n linkCurveRotation: {\n \"default\": 0,\n triggerUpdate: false\n },\n // line curve rotation along the line axis (0: interection with XY plane, PI: upside down)\n linkMaterial: {},\n linkThreeObject: {},\n linkThreeObjectExtend: {\n \"default\": false\n },\n linkPositionUpdate: {\n triggerUpdate: false\n },\n // custom function to call for updating the link's position. Signature: (threeObj, { start: { x, y, z}, end: { x, y, z }}, link). If the function returns a truthy value, the regular link position update will not run.\n linkDirectionalArrowLength: {\n \"default\": 0\n },\n linkDirectionalArrowColor: {},\n linkDirectionalArrowRelPos: {\n \"default\": 0.5,\n triggerUpdate: false\n },\n // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalArrowResolution: {\n \"default\": 8\n },\n // how many slice segments in the arrow's conic circumference\n linkDirectionalParticles: {\n \"default\": 0\n },\n // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: {\n \"default\": 0.01,\n triggerUpdate: false\n },\n // in link length ratio per frame\n linkDirectionalParticleWidth: {\n \"default\": 0.5\n },\n linkDirectionalParticleColor: {},\n linkDirectionalParticleResolution: {\n \"default\": 4\n },\n // how many slice segments in the particle sphere's circumference\n forceEngine: {\n \"default\": 'd3'\n },\n // d3 or ngraph\n d3AlphaMin: {\n \"default\": 0\n },\n d3AlphaDecay: {\n \"default\": 0.0228,\n triggerUpdate: false,\n onChange: function onChange(alphaDecay, state) {\n state.d3ForceLayout.alphaDecay(alphaDecay);\n }\n },\n d3AlphaTarget: {\n \"default\": 0,\n triggerUpdate: false,\n onChange: function onChange(alphaTarget, state) {\n state.d3ForceLayout.alphaTarget(alphaTarget);\n }\n },\n d3VelocityDecay: {\n \"default\": 0.4,\n triggerUpdate: false,\n onChange: function onChange(velocityDecay, state) {\n state.d3ForceLayout.velocityDecay(velocityDecay);\n }\n },\n ngraphPhysics: {\n \"default\": {\n // defaults from https://github.com/anvaka/ngraph.physics.simulator/blob/master/index.js\n timeStep: 20,\n gravity: -1.2,\n theta: 0.8,\n springLength: 30,\n springCoefficient: 0.0008,\n dragCoefficient: 0.02\n }\n },\n warmupTicks: {\n \"default\": 0,\n triggerUpdate: false\n },\n // how many times to tick the force engine at init before starting to render\n cooldownTicks: {\n \"default\": Infinity,\n triggerUpdate: false\n },\n cooldownTime: {\n \"default\": 15000,\n triggerUpdate: false\n },\n // ms\n onLoading: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onFinishLoading: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onUpdate: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onFinishUpdate: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onEngineTick: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onEngineStop: {\n \"default\": function _default() {},\n triggerUpdate: false\n }\n },\n methods: {\n refresh: function refresh(state) {\n state._flushObjects = true;\n\n state._rerender();\n\n return this;\n },\n // Expose d3 forces for external manipulation\n d3Force: function d3Force(state, forceName, forceFn) {\n if (forceFn === undefined) {\n return state.d3ForceLayout.force(forceName); // Force getter\n }\n\n state.d3ForceLayout.force(forceName, forceFn); // Force setter\n\n return this;\n },\n d3ReheatSimulation: function d3ReheatSimulation(state) {\n state.d3ForceLayout.alpha(1);\n this.resetCountdown();\n return this;\n },\n // reset cooldown state\n resetCountdown: function resetCountdown(state) {\n state.cntTicks = 0;\n state.startTickTime = new Date();\n state.engineRunning = true;\n return this;\n },\n tickFrame: function tickFrame(state) {\n var isD3Sim = state.forceEngine !== 'ngraph';\n\n if (state.engineRunning) {\n layoutTick();\n }\n\n updateArrows();\n updatePhotons();\n return this; //\n\n function layoutTick() {\n if (++state.cntTicks > state.cooldownTicks || new Date() - state.startTickTime > state.cooldownTime || isD3Sim && state.d3AlphaMin > 0 && state.d3ForceLayout.alpha() < state.d3AlphaMin) {\n state.engineRunning = false; // Stop ticking graph\n\n state.onEngineStop();\n } else {\n state.layout[isD3Sim ? 'tick' : 'step'](); // Tick it\n\n state.onEngineTick();\n } // Update nodes position\n\n\n state.graphData.nodes.forEach(function (node) {\n var obj = node.__threeObj;\n if (!obj) return;\n var pos = isD3Sim ? node : state.layout.getNodePosition(node[state.nodeId]);\n obj.position.x = pos.x;\n obj.position.y = pos.y || 0;\n obj.position.z = pos.z || 0;\n }); // Update links position\n\n var linkWidthAccessor = accessorFn(state.linkWidth);\n var linkCurvatureAccessor = accessorFn(state.linkCurvature);\n var linkCurveRotationAccessor = accessorFn(state.linkCurveRotation);\n var linkThreeObjectExtendAccessor = accessorFn(state.linkThreeObjectExtend);\n state.graphData.links.forEach(function (link) {\n var lineObj = link.__lineObj;\n if (!lineObj) return;\n var pos = isD3Sim ? link : state.layout.getLinkPosition(state.layout.graph.getLink(link.source, link.target).id);\n var start = pos[isD3Sim ? 'source' : 'from'];\n var end = pos[isD3Sim ? 'target' : 'to'];\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n calcLinkCurve(link); // calculate link curve for all links, including custom replaced, so it can be used in directional functionality\n\n var extendedObj = linkThreeObjectExtendAccessor(link);\n\n if (state.linkPositionUpdate && state.linkPositionUpdate(extendedObj ? lineObj.children[1] : lineObj, // pass child custom object if extending the default\n {\n start: {\n x: start.x,\n y: start.y,\n z: start.z\n },\n end: {\n x: end.x,\n y: end.y,\n z: end.z\n }\n }, link) && !extendedObj) {\n // exit if successfully custom updated position of non-extended obj\n return;\n }\n\n var curveResolution = 30; // # line segments\n\n var curve = link.__curve; // select default line obj if it's an extended group\n\n var line = lineObj.children.length ? lineObj.children[0] : lineObj;\n\n if (line.type === 'Line') {\n // Update line geometry\n if (!curve) {\n // straight line\n var linePos = line.geometry.getAttribute('position');\n\n if (!linePos || !linePos.array || linePos.array.length !== 6) {\n line.geometry[setAttributeFn]('position', linePos = new three$1.BufferAttribute(new Float32Array(2 * 3), 3));\n }\n\n linePos.array[0] = start.x;\n linePos.array[1] = start.y || 0;\n linePos.array[2] = start.z || 0;\n linePos.array[3] = end.x;\n linePos.array[4] = end.y || 0;\n linePos.array[5] = end.z || 0;\n linePos.needsUpdate = true;\n } else {\n // bezier curve line\n line.geometry.setFromPoints(curve.getPoints(curveResolution));\n }\n\n line.geometry.computeBoundingSphere();\n } else if (line.type === 'Mesh') {\n // Update cylinder geometry\n if (!curve) {\n // straight tube\n if (!line.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)) {\n var linkWidth = Math.ceil(linkWidthAccessor(link) * 10) / 10;\n var r = linkWidth / 2;\n var geometry = new three$1.CylinderBufferGeometry(r, r, 1, state.linkResolution, 1, false);\n geometry[applyMatrix4Fn](new three$1.Matrix4().makeTranslation(0, 1 / 2, 0));\n geometry[applyMatrix4Fn](new three$1.Matrix4().makeRotationX(Math.PI / 2));\n line.geometry.dispose();\n line.geometry = geometry;\n }\n\n var vStart = new three$1.Vector3(start.x, start.y || 0, start.z || 0);\n var vEnd = new three$1.Vector3(end.x, end.y || 0, end.z || 0);\n var distance = vStart.distanceTo(vEnd);\n line.position.x = vStart.x;\n line.position.y = vStart.y;\n line.position.z = vStart.z;\n line.scale.z = distance;\n line.parent.localToWorld(vEnd); // lookAt requires world coords\n\n line.lookAt(vEnd);\n } else {\n // curved tube\n if (!line.geometry.type.match(/^Tube(Buffer)?Geometry$/)) {\n // reset object positioning\n line.position.set(0, 0, 0);\n line.rotation.set(0, 0, 0);\n line.scale.set(1, 1, 1);\n }\n\n var _linkWidth = Math.ceil(linkWidthAccessor(link) * 10) / 10;\n\n var _r = _linkWidth / 2;\n\n var _geometry = new three$1.TubeBufferGeometry(curve, curveResolution, _r, state.linkResolution, false);\n\n line.geometry.dispose();\n line.geometry = _geometry;\n }\n }\n }); //\n\n function calcLinkCurve(link) {\n var pos = isD3Sim ? link : state.layout.getLinkPosition(state.layout.graph.getLink(link.source, link.target).id);\n var start = pos[isD3Sim ? 'source' : 'from'];\n var end = pos[isD3Sim ? 'target' : 'to'];\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var curvature = linkCurvatureAccessor(link);\n\n if (!curvature) {\n link.__curve = null; // Straight line\n } else {\n // bezier curve line (only for line types)\n var vStart = new three$1.Vector3(start.x, start.y || 0, start.z || 0);\n var vEnd = new three$1.Vector3(end.x, end.y || 0, end.z || 0);\n var l = vStart.distanceTo(vEnd); // line length\n\n var curve;\n var curveRotation = linkCurveRotationAccessor(link);\n\n if (l > 0) {\n var dx = end.x - start.x;\n var dy = end.y - start.y || 0;\n var vLine = new three$1.Vector3().subVectors(vEnd, vStart);\n var cp = vLine.clone().multiplyScalar(curvature).cross(dx !== 0 || dy !== 0 ? new three$1.Vector3(0, 0, 1) : new three$1.Vector3(0, 1, 0)) // avoid cross-product of parallel vectors (prefer Z, fallback to Y)\n .applyAxisAngle(vLine.normalize(), curveRotation) // rotate along line axis according to linkCurveRotation\n .add(new three$1.Vector3().addVectors(vStart, vEnd).divideScalar(2));\n curve = new three$1.QuadraticBezierCurve3(vStart, cp, vEnd);\n } else {\n // Same point, draw a loop\n var d = curvature * 70;\n var endAngle = -curveRotation; // Rotate clockwise (from Z angle perspective)\n\n var startAngle = endAngle + Math.PI / 2;\n curve = new three$1.CubicBezierCurve3(vStart, new three$1.Vector3(d * Math.cos(startAngle), d * Math.sin(startAngle), 0).add(vStart), new three$1.Vector3(d * Math.cos(endAngle), d * Math.sin(endAngle), 0).add(vStart), vEnd);\n }\n\n link.__curve = curve;\n }\n }\n }\n\n function updateArrows() {\n // update link arrow position\n var arrowRelPosAccessor = accessorFn(state.linkDirectionalArrowRelPos);\n var arrowLengthAccessor = accessorFn(state.linkDirectionalArrowLength);\n var nodeValAccessor = accessorFn(state.nodeVal);\n state.graphData.links.forEach(function (link) {\n var arrowObj = link.__arrowObj;\n if (!arrowObj) return;\n var pos = isD3Sim ? link : state.layout.getLinkPosition(state.layout.graph.getLink(link.source, link.target).id);\n var start = pos[isD3Sim ? 'source' : 'from'];\n var end = pos[isD3Sim ? 'target' : 'to'];\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var startR = Math.sqrt(Math.max(0, nodeValAccessor(start) || 1)) * state.nodeRelSize;\n var endR = Math.sqrt(Math.max(0, nodeValAccessor(end) || 1)) * state.nodeRelSize;\n var arrowLength = arrowLengthAccessor(link);\n var arrowRelPos = arrowRelPosAccessor(link);\n var getPosAlongLine = link.__curve ? function (t) {\n return link.__curve.getPoint(t);\n } // interpolate along bezier curve\n : function (t) {\n // straight line: interpolate linearly\n var iplt = function iplt(dim, start, end, t) {\n return start[dim] + (end[dim] - start[dim]) * t || 0;\n };\n\n return {\n x: iplt('x', start, end, t),\n y: iplt('y', start, end, t),\n z: iplt('z', start, end, t)\n };\n };\n var lineLen = link.__curve ? link.__curve.getLength() : Math.sqrt(['x', 'y', 'z'].map(function (dim) {\n return Math.pow((end[dim] || 0) - (start[dim] || 0), 2);\n }).reduce(function (acc, v) {\n return acc + v;\n }, 0));\n var posAlongLine = startR + arrowLength + (lineLen - startR - endR - arrowLength) * arrowRelPos;\n var arrowHead = getPosAlongLine(posAlongLine / lineLen);\n var arrowTail = getPosAlongLine((posAlongLine - arrowLength) / lineLen);\n ['x', 'y', 'z'].forEach(function (dim) {\n return arrowObj.position[dim] = arrowTail[dim];\n });\n\n var headVec = _construct(three$1.Vector3, _toConsumableArray(['x', 'y', 'z'].map(function (c) {\n return arrowHead[c];\n })));\n\n arrowObj.parent.localToWorld(headVec); // lookAt requires world coords\n\n arrowObj.lookAt(headVec);\n });\n }\n\n function updatePhotons() {\n // update link particle positions\n var particleSpeedAccessor = accessorFn(state.linkDirectionalParticleSpeed);\n state.graphData.links.forEach(function (link) {\n var cyclePhotons = link.__photonsObj && link.__photonsObj.children;\n var singleHopPhotons = link.__singleHopPhotonsObj && link.__singleHopPhotonsObj.children;\n if ((!singleHopPhotons || !singleHopPhotons.length) && (!cyclePhotons || !cyclePhotons.length)) return;\n var pos = isD3Sim ? link : state.layout.getLinkPosition(state.layout.graph.getLink(link.source, link.target).id);\n var start = pos[isD3Sim ? 'source' : 'from'];\n var end = pos[isD3Sim ? 'target' : 'to'];\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var particleSpeed = particleSpeedAccessor(link);\n var getPhotonPos = link.__curve ? function (t) {\n return link.__curve.getPoint(t);\n } // interpolate along bezier curve\n : function (t) {\n // straight line: interpolate linearly\n var iplt = function iplt(dim, start, end, t) {\n return start[dim] + (end[dim] - start[dim]) * t || 0;\n };\n\n return {\n x: iplt('x', start, end, t),\n y: iplt('y', start, end, t),\n z: iplt('z', start, end, t)\n };\n };\n var photons = [].concat(_toConsumableArray(cyclePhotons || []), _toConsumableArray(singleHopPhotons || []));\n photons.forEach(function (photon, idx) {\n var singleHop = photon.parent.__linkThreeObjType === 'singleHopPhotons';\n\n if (!photon.hasOwnProperty('__progressRatio')) {\n photon.__progressRatio = singleHop ? 0 : idx / cyclePhotons.length;\n }\n\n photon.__progressRatio += particleSpeed;\n\n if (photon.__progressRatio >= 1) {\n if (!singleHop) {\n photon.__progressRatio = photon.__progressRatio % 1;\n } else {\n // remove particle\n photon.parent.remove(photon);\n emptyObject(photon);\n return;\n }\n }\n\n var photonPosRatio = photon.__progressRatio;\n var pos = getPhotonPos(photonPosRatio);\n ['x', 'y', 'z'].forEach(function (dim) {\n return photon.position[dim] = pos[dim];\n });\n });\n });\n }\n },\n emitParticle: function emitParticle(state, link) {\n if (link) {\n if (!link.__singleHopPhotonsObj) {\n var obj = new three$1.Group();\n obj.__linkThreeObjType = 'singleHopPhotons';\n link.__singleHopPhotonsObj = obj;\n state.graphScene.add(obj);\n }\n\n var particleWidthAccessor = accessorFn(state.linkDirectionalParticleWidth);\n var photonR = Math.ceil(particleWidthAccessor(link) * 10) / 10 / 2;\n var numSegments = state.linkDirectionalParticleResolution;\n var particleGeometry = new three$1.SphereBufferGeometry(photonR, numSegments, numSegments);\n var linkColorAccessor = accessorFn(state.linkColor);\n var particleColorAccessor = accessorFn(state.linkDirectionalParticleColor);\n var photonColor = particleColorAccessor(link) || linkColorAccessor(link) || '#f0f0f0';\n var materialColor = new three$1.Color(colorStr2Hex(photonColor));\n var opacity = state.linkOpacity * 3;\n var particleMaterial = new three$1.MeshLambertMaterial({\n color: materialColor,\n transparent: true,\n opacity: opacity\n }); // add a single hop particle\n\n link.__singleHopPhotonsObj.add(new three$1.Mesh(particleGeometry, particleMaterial));\n }\n\n return this;\n },\n getGraphBbox: function getGraphBbox(state) {\n var nodeFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {\n return true;\n };\n if (!state.initialised) return null; // recursively collect all nested geometries bboxes\n\n var bboxes = function getBboxes(obj) {\n var bboxes = [];\n\n if (obj.geometry) {\n obj.geometry.computeBoundingBox();\n var box = new three$1.Box3();\n box.copy(obj.geometry.boundingBox).applyMatrix4(obj.matrixWorld);\n bboxes.push(box);\n }\n\n return bboxes.concat.apply(bboxes, _toConsumableArray((obj.children || []).filter(function (obj) {\n return !obj.hasOwnProperty('__graphObjType') || obj.__graphObjType === 'node' && nodeFilter(obj.__data);\n } // exclude filtered out nodes\n ).map(getBboxes)));\n }(state.graphScene);\n\n if (!bboxes.length) return null; // extract global x,y,z min/max\n\n return Object.assign.apply(Object, _toConsumableArray(['x', 'y', 'z'].map(function (c) {\n return _defineProperty({}, c, [min(bboxes, function (bb) {\n return bb.min[c];\n }), max(bboxes, function (bb) {\n return bb.max[c];\n })]);\n })));\n }\n },\n stateInit: function stateInit() {\n return {\n d3ForceLayout: forceSimulation().force('link', forceLink()).force('charge', forceManyBody()).force('center', forceCenter()).force('dagRadial', null).stop(),\n engineRunning: false\n };\n },\n init: function init(threeObj, state) {\n // Main three object to manipulate\n state.graphScene = threeObj;\n },\n update: function update(state, changedProps) {\n var hasAnyPropChanged = function hasAnyPropChanged(propList) {\n return propList.some(function (p) {\n return changedProps.hasOwnProperty(p);\n });\n };\n\n state.engineRunning = false; // pause simulation\n\n state.onUpdate();\n\n if (state.nodeAutoColorBy !== null && hasAnyPropChanged(['nodeAutoColorBy', 'graphData', 'nodeColor'])) {\n // Auto add color to uncolored nodes\n autoColorObjects(state.graphData.nodes, accessorFn(state.nodeAutoColorBy), state.nodeColor);\n }\n\n if (state.linkAutoColorBy !== null && hasAnyPropChanged(['linkAutoColorBy', 'graphData', 'linkColor'])) {\n // Auto add color to uncolored links\n autoColorObjects(state.graphData.links, accessorFn(state.linkAutoColorBy), state.linkColor);\n } // Digest nodes WebGL objects\n\n\n if (state._flushObjects || hasAnyPropChanged(['graphData', 'nodeThreeObject', 'nodeThreeObjectExtend', 'nodeVal', 'nodeColor', 'nodeVisibility', 'nodeRelSize', 'nodeResolution', 'nodeOpacity'])) {\n var customObjectAccessor = accessorFn(state.nodeThreeObject);\n var customObjectExtendAccessor = accessorFn(state.nodeThreeObjectExtend);\n var valAccessor = accessorFn(state.nodeVal);\n var colorAccessor = accessorFn(state.nodeColor);\n var visibilityAccessor = accessorFn(state.nodeVisibility);\n var sphereGeometries = {}; // indexed by node value\n\n var sphereMaterials = {}; // indexed by color\n\n threeDigest(state.graphData.nodes.filter(visibilityAccessor), state.graphScene, {\n purge: state._flushObjects || hasAnyPropChanged([// recreate objects if any of these props have changed\n 'nodeThreeObject', 'nodeThreeObjectExtend']),\n objFilter: function objFilter(obj) {\n return obj.__graphObjType === 'node';\n },\n createObj: function createObj(node) {\n var customObj = customObjectAccessor(node);\n var extendObj = customObjectExtendAccessor(node);\n\n if (customObj && state.nodeThreeObject === customObj) {\n // clone object if it's a shared object among all nodes\n customObj = customObj.clone();\n }\n\n var obj;\n\n if (customObj && !extendObj) {\n obj = customObj;\n } else {\n // Add default object (sphere mesh)\n obj = new three$1.Mesh();\n obj.__graphDefaultObj = true;\n\n if (customObj && extendObj) {\n obj.add(customObj); // extend default with custom\n }\n }\n\n obj.__graphObjType = 'node'; // Add object type\n\n return obj;\n },\n updateObj: function updateObj(obj, node) {\n if (obj.__graphDefaultObj) {\n // bypass internal updates for custom node objects\n var val = valAccessor(node) || 1;\n var radius = Math.cbrt(val) * state.nodeRelSize;\n var numSegments = state.nodeResolution;\n\n if (!obj.geometry.type.match(/^Sphere(Buffer)?Geometry$/) || obj.geometry.parameters.radius !== radius || obj.geometry.parameters.widthSegments !== numSegments) {\n if (!sphereGeometries.hasOwnProperty(val)) {\n sphereGeometries[val] = new three$1.SphereBufferGeometry(radius, numSegments, numSegments);\n }\n\n obj.geometry.dispose();\n obj.geometry = sphereGeometries[val];\n }\n\n var color = colorAccessor(node);\n var materialColor = new three$1.Color(colorStr2Hex(color || '#ffffaa'));\n var opacity = state.nodeOpacity * colorAlpha(color);\n\n if (obj.material.type !== 'MeshLambertMaterial' || !obj.material.color.equals(materialColor) || obj.material.opacity !== opacity) {\n if (!sphereMaterials.hasOwnProperty(color)) {\n sphereMaterials[color] = new three$1.MeshLambertMaterial({\n color: materialColor,\n transparent: true,\n opacity: opacity\n });\n }\n\n obj.material.dispose();\n obj.material = sphereMaterials[color];\n }\n }\n }\n });\n } // Digest links WebGL objects\n\n\n if (state._flushObjects || hasAnyPropChanged(['graphData', 'linkThreeObject', 'linkThreeObjectExtend', 'linkMaterial', 'linkColor', 'linkWidth', 'linkVisibility', 'linkResolution', 'linkOpacity', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowResolution', 'linkDirectionalParticles', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'linkDirectionalParticleResolution'])) {\n var _customObjectAccessor = accessorFn(state.linkThreeObject);\n\n var _customObjectExtendAccessor = accessorFn(state.linkThreeObjectExtend);\n\n var customMaterialAccessor = accessorFn(state.linkMaterial);\n\n var _visibilityAccessor = accessorFn(state.linkVisibility);\n\n var _colorAccessor = accessorFn(state.linkColor);\n\n var widthAccessor = accessorFn(state.linkWidth);\n var cylinderGeometries = {}; // indexed by link width\n\n var lambertLineMaterials = {}; // for cylinder objects, indexed by link color\n\n var basicLineMaterials = {}; // for line objects, indexed by link color\n\n var visibleLinks = state.graphData.links.filter(_visibilityAccessor); // lines digest cycle\n\n threeDigest(visibleLinks, state.graphScene, {\n objBindAttr: '__lineObj',\n purge: state._flushObjects || hasAnyPropChanged([// recreate objects if any of these props have changed\n 'linkThreeObject', 'linkThreeObjectExtend', 'linkWidth']),\n objFilter: function objFilter(obj) {\n return obj.__graphObjType === 'link';\n },\n createObj: function createObj(link) {\n var customObj = _customObjectAccessor(link);\n\n var extendObj = _customObjectExtendAccessor(link);\n\n if (customObj && state.linkThreeObject === customObj) {\n // clone object if it's a shared object among all links\n customObj = customObj.clone();\n }\n\n var defaultObj;\n\n if (!customObj || extendObj) {\n // construct default line obj\n var useCylinder = !!widthAccessor(link);\n\n if (useCylinder) {\n defaultObj = new three$1.Mesh();\n } else {\n // Use plain line (constant width)\n var lineGeometry = new three$1.BufferGeometry();\n lineGeometry[setAttributeFn]('position', new three$1.BufferAttribute(new Float32Array(2 * 3), 3));\n defaultObj = new three$1.Line(lineGeometry);\n }\n }\n\n var obj;\n\n if (!customObj) {\n obj = defaultObj;\n obj.__graphDefaultObj = true;\n } else {\n if (!extendObj) {\n // use custom object\n obj = customObj;\n } else {\n // extend default with custom in a group\n obj = new three$1.Group();\n obj.__graphDefaultObj = true;\n obj.add(defaultObj);\n obj.add(customObj);\n }\n }\n\n obj.renderOrder = 10; // Prevent visual glitches of dark lines on top of nodes by rendering them last\n\n obj.__graphObjType = 'link'; // Add object type\n\n return obj;\n },\n updateObj: function updateObj(updObj, link) {\n if (updObj.__graphDefaultObj) {\n // bypass internal updates for custom link objects\n // select default object if it's an extended group\n var obj = updObj.children.length ? updObj.children[0] : updObj;\n var linkWidth = Math.ceil(widthAccessor(link) * 10) / 10;\n var useCylinder = !!linkWidth;\n\n if (useCylinder) {\n var r = linkWidth / 2;\n var numSegments = state.linkResolution;\n\n if (!obj.geometry.type.match(/^Cylinder(Buffer)?Geometry$/) || obj.geometry.parameters.radiusTop !== r || obj.geometry.parameters.radialSegments !== numSegments) {\n if (!cylinderGeometries.hasOwnProperty(linkWidth)) {\n var geometry = new three$1.CylinderBufferGeometry(r, r, 1, numSegments, 1, false);\n geometry[applyMatrix4Fn](new three$1.Matrix4().makeTranslation(0, 1 / 2, 0));\n geometry[applyMatrix4Fn](new three$1.Matrix4().makeRotationX(Math.PI / 2));\n cylinderGeometries[linkWidth] = geometry;\n }\n\n obj.geometry.dispose();\n obj.geometry = cylinderGeometries[linkWidth];\n }\n }\n\n var customMaterial = customMaterialAccessor(link);\n\n if (customMaterial) {\n obj.material = customMaterial;\n } else {\n var color = _colorAccessor(link);\n\n var materialColor = new three$1.Color(colorStr2Hex(color || '#f0f0f0'));\n var opacity = state.linkOpacity * colorAlpha(color);\n var materialType = useCylinder ? 'MeshLambertMaterial' : 'LineBasicMaterial';\n\n if (obj.material.type !== materialType || !obj.material.color.equals(materialColor) || obj.material.opacity !== opacity) {\n var lineMaterials = useCylinder ? lambertLineMaterials : basicLineMaterials;\n\n if (!lineMaterials.hasOwnProperty(color)) {\n lineMaterials[color] = new three$1[materialType]({\n color: materialColor,\n transparent: opacity < 1,\n opacity: opacity,\n depthWrite: opacity >= 1 // Prevent transparency issues\n\n });\n }\n\n obj.material.dispose();\n obj.material = lineMaterials[color];\n }\n }\n }\n }\n }); // Arrows digest cycle\n\n if (state.linkDirectionalArrowLength || changedProps.hasOwnProperty('linkDirectionalArrowLength')) {\n var arrowLengthAccessor = accessorFn(state.linkDirectionalArrowLength);\n var arrowColorAccessor = accessorFn(state.linkDirectionalArrowColor);\n threeDigest(visibleLinks.filter(arrowLengthAccessor), state.graphScene, {\n objBindAttr: '__arrowObj',\n objFilter: function objFilter(obj) {\n return obj.__linkThreeObjType === 'arrow';\n },\n createObj: function createObj() {\n var obj = new three$1.Mesh(undefined, new three$1.MeshLambertMaterial({\n transparent: true\n }));\n obj.__linkThreeObjType = 'arrow'; // Add object type\n\n return obj;\n },\n updateObj: function updateObj(obj, link) {\n var arrowLength = arrowLengthAccessor(link);\n var numSegments = state.linkDirectionalArrowResolution;\n\n if (!obj.geometry.type.match(/^Cone(Buffer)?Geometry$/) || obj.geometry.parameters.height !== arrowLength || obj.geometry.parameters.radialSegments !== numSegments) {\n var coneGeometry = new three$1.ConeBufferGeometry(arrowLength * 0.25, arrowLength, numSegments); // Correct orientation\n\n coneGeometry.translate(0, arrowLength / 2, 0);\n coneGeometry.rotateX(Math.PI / 2);\n obj.geometry.dispose();\n obj.geometry = coneGeometry;\n }\n\n obj.material.color = new three$1.Color(arrowColorAccessor(link) || _colorAccessor(link) || '#f0f0f0');\n obj.material.opacity = state.linkOpacity * 3;\n }\n });\n } // Photon particles digest cycle\n\n\n if (state.linkDirectionalParticles || changedProps.hasOwnProperty('linkDirectionalParticles')) {\n var particlesAccessor = accessorFn(state.linkDirectionalParticles);\n var particleWidthAccessor = accessorFn(state.linkDirectionalParticleWidth);\n var particleColorAccessor = accessorFn(state.linkDirectionalParticleColor);\n var particleMaterials = {}; // indexed by link color\n\n var particleGeometries = {}; // indexed by particle width\n\n threeDigest(visibleLinks.filter(particlesAccessor), state.graphScene, {\n objBindAttr: '__photonsObj',\n objFilter: function objFilter(obj) {\n return obj.__linkThreeObjType === 'photons';\n },\n createObj: function createObj() {\n var obj = new three$1.Group();\n obj.__linkThreeObjType = 'photons'; // Add object type\n\n return obj;\n },\n updateObj: function updateObj(obj, link) {\n var numPhotons = Math.round(Math.abs(particlesAccessor(link)));\n var curPhoton = !!obj.children.length && obj.children[0];\n var photonR = Math.ceil(particleWidthAccessor(link) * 10) / 10 / 2;\n var numSegments = state.linkDirectionalParticleResolution;\n var particleGeometry;\n\n if (curPhoton && curPhoton.geometry.parameters.radius === photonR && curPhoton.geometry.parameters.widthSegments === numSegments) {\n particleGeometry = curPhoton.geometry;\n } else {\n if (!particleGeometries.hasOwnProperty(photonR)) {\n particleGeometries[photonR] = new three$1.SphereBufferGeometry(photonR, numSegments, numSegments);\n }\n\n particleGeometry = particleGeometries[photonR];\n curPhoton && curPhoton.geometry.dispose();\n }\n\n var photonColor = particleColorAccessor(link) || _colorAccessor(link) || '#f0f0f0';\n var materialColor = new three$1.Color(colorStr2Hex(photonColor));\n var opacity = state.linkOpacity * 3;\n var particleMaterial;\n\n if (curPhoton && curPhoton.material.color.equals(materialColor) && curPhoton.material.opacity === opacity) {\n particleMaterial = curPhoton.material;\n } else {\n if (!particleMaterials.hasOwnProperty(photonColor)) {\n particleMaterials[photonColor] = new three$1.MeshLambertMaterial({\n color: materialColor,\n transparent: true,\n opacity: opacity\n });\n }\n\n particleMaterial = particleMaterials[photonColor];\n curPhoton && curPhoton.material.dispose();\n } // digest cycle for each photon\n\n\n threeDigest(_toConsumableArray(new Array(numPhotons)).map(function (_, idx) {\n return {\n idx: idx\n };\n }), obj, {\n idAccessor: function idAccessor(d) {\n return d.idx;\n },\n createObj: function createObj() {\n return new three$1.Mesh(particleGeometry, particleMaterial);\n },\n updateObj: function updateObj(obj) {\n obj.geometry = particleGeometry;\n obj.material = particleMaterial;\n }\n });\n }\n });\n }\n }\n\n state._flushObjects = false; // reset objects refresh flag\n // simulation engine\n\n if (hasAnyPropChanged(['graphData', 'nodeId', 'linkSource', 'linkTarget', 'numDimensions', 'forceEngine', 'dagMode', 'dagNodeFilter', 'dagLevelDistance'])) {\n state.engineRunning = false; // Pause simulation\n // parse links\n\n state.graphData.links.forEach(function (link) {\n link.source = link[state.linkSource];\n link.target = link[state.linkTarget];\n }); // Feed data to force-directed layout\n\n var isD3Sim = state.forceEngine !== 'ngraph';\n var layout;\n\n if (isD3Sim) {\n // D3-force\n (layout = state.d3ForceLayout).stop().alpha(1) // re-heat the simulation\n .numDimensions(state.numDimensions).nodes(state.graphData.nodes); // add links (if link force is still active)\n\n var linkForce = state.d3ForceLayout.force('link');\n\n if (linkForce) {\n linkForce.id(function (d) {\n return d[state.nodeId];\n }).links(state.graphData.links);\n } // setup dag force constraints\n\n\n var nodeDepths = state.dagMode && getDagDepths(state.graphData, function (node) {\n return node[state.nodeId];\n }, {\n nodeFilter: state.dagNodeFilter,\n onLoopError: state.onDagError || undefined\n });\n var maxDepth = Math.max.apply(Math, _toConsumableArray(Object.values(nodeDepths || [])));\n var dagLevelDistance = state.dagLevelDistance || state.graphData.nodes.length / (maxDepth || 1) * DAG_LEVEL_NODE_RATIO * (['radialin', 'radialout'].indexOf(state.dagMode) !== -1 ? 0.7 : 1); // Fix nodes to x,y,z for dag mode\n\n if (state.dagMode) {\n var getFFn = function getFFn(fix, invert) {\n return function (node) {\n return !fix ? undefined : (nodeDepths[node[state.nodeId]] - maxDepth / 2) * dagLevelDistance * (invert ? -1 : 1);\n };\n };\n\n var fxFn = getFFn(['lr', 'rl'].indexOf(state.dagMode) !== -1, state.dagMode === 'rl');\n var fyFn = getFFn(['td', 'bu'].indexOf(state.dagMode) !== -1, state.dagMode === 'td');\n var fzFn = getFFn(['zin', 'zout'].indexOf(state.dagMode) !== -1, state.dagMode === 'zout');\n state.graphData.nodes.filter(state.dagNodeFilter).forEach(function (node) {\n node.fx = fxFn(node);\n node.fy = fyFn(node);\n node.fz = fzFn(node);\n });\n } // Use radial force for radial dags\n\n\n state.d3ForceLayout.force('dagRadial', ['radialin', 'radialout'].indexOf(state.dagMode) !== -1 ? forceRadial(function (node) {\n var nodeDepth = nodeDepths[node[state.nodeId]] || -1;\n return (state.dagMode === 'radialin' ? maxDepth - nodeDepth : nodeDepth) * dagLevelDistance;\n }).strength(function (node) {\n return state.dagNodeFilter(node) ? 1 : 0;\n }) : null);\n } else {\n // ngraph\n var _graph = ngraph.graph();\n\n state.graphData.nodes.forEach(function (node) {\n _graph.addNode(node[state.nodeId]);\n });\n state.graphData.links.forEach(function (link) {\n _graph.addLink(link.source, link.target);\n });\n layout = ngraph.forcelayout(_graph, _objectSpread2({\n dimensions: state.numDimensions\n }, state.ngraphPhysics));\n layout.graph = _graph; // Attach graph reference to layout\n }\n\n for (var i = 0; i < state.warmupTicks && !(isD3Sim && state.d3AlphaMin > 0 && state.d3ForceLayout.alpha() < state.d3AlphaMin); i++) {\n layout[isD3Sim ? \"tick\" : \"step\"]();\n } // Initial ticks before starting to render\n\n\n state.layout = layout;\n this.resetCountdown();\n }\n\n state.engineRunning = true; // resume simulation\n\n state.onFinishUpdate();\n }\n});\n\nfunction fromKapsule (kapsule) {\n var baseClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Object;\n var initKapsuleWithSelf = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var FromKapsule = /*#__PURE__*/function (_baseClass) {\n _inherits(FromKapsule, _baseClass);\n\n var _super = _createSuper(FromKapsule);\n\n function FromKapsule() {\n var _this;\n\n _classCallCheck(this, FromKapsule);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.__kapsuleInstance = kapsule().apply(void 0, [].concat(_toConsumableArray(initKapsuleWithSelf ? [_assertThisInitialized(_this)] : []), args));\n return _this;\n }\n\n return FromKapsule;\n }(baseClass); // attach kapsule props/methods to class prototype\n\n\n Object.keys(kapsule()).forEach(function (m) {\n return FromKapsule.prototype[m] = function () {\n var _this$__kapsuleInstan;\n\n var returnVal = (_this$__kapsuleInstan = this.__kapsuleInstance)[m].apply(_this$__kapsuleInstan, arguments);\n\n return returnVal === this.__kapsuleInstance ? this // chain based on this class, not the kapsule obj\n : returnVal;\n };\n });\n return FromKapsule;\n}\n\nvar three = window.THREE ? window.THREE : {\n Group: Group\n}; // Prefer consumption from global THREE, if exists\nvar threeForcegraph = fromKapsule(ForceGraph, three.Group, true);\n\nexport default threeForcegraph;\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","module.exports = function eventify(subject) {\n validateSubject(subject);\n\n var eventsStorage = createEventsStorage(subject);\n subject.on = eventsStorage.on;\n subject.off = eventsStorage.off;\n subject.fire = eventsStorage.fire;\n return subject;\n};\n\nfunction createEventsStorage(subject) {\n // Store all event listeners to this hash. Key is event name, value is array\n // of callback records.\n //\n // A callback record consists of callback function and its optional context:\n // { 'eventName' => [{callback: function, ctx: object}] }\n var registeredEvents = Object.create(null);\n\n return {\n on: function (eventName, callback, ctx) {\n if (typeof callback !== 'function') {\n throw new Error('callback is expected to be a function');\n }\n var handlers = registeredEvents[eventName];\n if (!handlers) {\n handlers = registeredEvents[eventName] = [];\n }\n handlers.push({callback: callback, ctx: ctx});\n\n return subject;\n },\n\n off: function (eventName, callback) {\n var wantToRemoveAll = (typeof eventName === 'undefined');\n if (wantToRemoveAll) {\n // Killing old events storage should be enough in this case:\n registeredEvents = Object.create(null);\n return subject;\n }\n\n if (registeredEvents[eventName]) {\n var deleteAllCallbacksForEvent = (typeof callback !== 'function');\n if (deleteAllCallbacksForEvent) {\n delete registeredEvents[eventName];\n } else {\n var callbacks = registeredEvents[eventName];\n for (var i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].callback === callback) {\n callbacks.splice(i, 1);\n }\n }\n }\n }\n\n return subject;\n },\n\n fire: function (eventName) {\n var callbacks = registeredEvents[eventName];\n if (!callbacks) {\n return subject;\n }\n\n var fireArguments;\n if (arguments.length > 1) {\n fireArguments = Array.prototype.splice.call(arguments, 1);\n }\n for(var i = 0; i < callbacks.length; ++i) {\n var callbackInfo = callbacks[i];\n callbackInfo.callback.apply(callbackInfo.ctx, fireArguments);\n }\n\n return subject;\n }\n };\n}\n\nfunction validateSubject(subject) {\n if (!subject) {\n throw new Error('Eventify cannot use falsy object as events subject');\n }\n var reservedWords = ['on', 'fire', 'off'];\n for (var i = 0; i < reservedWords.length; ++i) {\n if (subject.hasOwnProperty(reservedWords[i])) {\n throw new Error(\"Subject cannot be eventified, since it already has property '\" + reservedWords[i] + \"'\");\n }\n }\n}\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import { nanoid } from 'nanoid/non-secure';\nimport BaseRouter from './BaseRouter';\nimport type {\n NavigationState,\n CommonNavigationAction,\n Router,\n DefaultRouterOptions,\n Route,\n ParamListBase,\n} from './types';\n\nexport type StackActionType =\n | {\n type: 'REPLACE';\n payload: { name: string; key?: string | undefined; params?: object };\n source?: string;\n target?: string;\n }\n | {\n type: 'PUSH';\n payload: { name: string; key?: string | undefined; params?: object };\n source?: string;\n target?: string;\n }\n | {\n type: 'POP';\n payload: { count: number };\n source?: string;\n target?: string;\n }\n | {\n type: 'POP_TO_TOP';\n source?: string;\n target?: string;\n };\n\nexport type StackRouterOptions = DefaultRouterOptions;\n\nexport type StackNavigationState<\n ParamList extends ParamListBase\n> = NavigationState<ParamList> & {\n /**\n * Type of the router, in this case, it's stack.\n */\n type: 'stack';\n};\n\nexport type StackActionHelpers<ParamList extends ParamListBase> = {\n /**\n * Replace the current route with a new one.\n *\n * @param name Route name of the new route.\n * @param [params] Params object for the new route.\n */\n replace<RouteName extends keyof ParamList>(\n ...args: undefined extends ParamList[RouteName]\n ? [RouteName] | [RouteName, ParamList[RouteName]]\n : [RouteName, ParamList[RouteName]]\n ): void;\n\n /**\n * Push a new screen onto the stack.\n *\n * @param name Name of the route for the tab.\n * @param [params] Params object for the route.\n */\n push<RouteName extends keyof ParamList>(\n ...args: undefined extends ParamList[RouteName]\n ? [RouteName] | [RouteName, ParamList[RouteName]]\n : [RouteName, ParamList[RouteName]]\n ): void;\n\n /**\n * Pop a screen from the stack.\n */\n pop(count?: number): void;\n\n /**\n * Pop to the first route in the stack, dismissing all other screens.\n */\n popToTop(): void;\n};\n\nexport const StackActions = {\n replace(name: string, params?: object): StackActionType {\n return { type: 'REPLACE', payload: { name, params } };\n },\n push(name: string, params?: object): StackActionType {\n return { type: 'PUSH', payload: { name, params } };\n },\n pop(count: number = 1): StackActionType {\n return { type: 'POP', payload: { count } };\n },\n popToTop(): StackActionType {\n return { type: 'POP_TO_TOP' };\n },\n};\n\nexport default function StackRouter(options: StackRouterOptions) {\n const router: Router<\n StackNavigationState<ParamListBase>,\n CommonNavigationAction | StackActionType\n > = {\n ...BaseRouter,\n\n type: 'stack',\n\n getInitialState({ routeNames, routeParamList }) {\n const initialRouteName =\n options.initialRouteName !== undefined &&\n routeNames.includes(options.initialRouteName)\n ? options.initialRouteName\n : routeNames[0];\n\n return {\n stale: false,\n type: 'stack',\n key: `stack-${nanoid()}`,\n index: 0,\n routeNames,\n routes: [\n {\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName],\n },\n ],\n };\n },\n\n getRehydratedState(partialState, { routeNames, routeParamList }) {\n let state = partialState;\n\n if (state.stale === false) {\n return state;\n }\n\n const routes = state.routes\n .filter((route) => routeNames.includes(route.name))\n .map(\n (route) =>\n ({\n ...route,\n key: route.key || `${route.name}-${nanoid()}`,\n params:\n routeParamList[route.name] !== undefined\n ? {\n ...routeParamList[route.name],\n ...route.params,\n }\n : route.params,\n } as Route<string>)\n );\n\n if (routes.length === 0) {\n const initialRouteName =\n options.initialRouteName !== undefined\n ? options.initialRouteName\n : routeNames[0];\n\n routes.push({\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName],\n });\n }\n\n return {\n stale: false,\n type: 'stack',\n key: `stack-${nanoid()}`,\n index: routes.length - 1,\n routeNames,\n routes,\n };\n },\n\n getStateForRouteNamesChange(state, { routeNames, routeParamList }) {\n const routes = state.routes.filter((route) =>\n routeNames.includes(route.name)\n );\n\n if (routes.length === 0) {\n const initialRouteName =\n options.initialRouteName !== undefined &&\n routeNames.includes(options.initialRouteName)\n ? options.initialRouteName\n : routeNames[0];\n\n routes.push({\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName],\n });\n }\n\n return {\n ...state,\n routeNames,\n routes,\n index: Math.min(state.index, routes.length - 1),\n };\n },\n\n getStateForRouteFocus(state, key) {\n const index = state.routes.findIndex((r) => r.key === key);\n\n if (index === -1 || index === state.index) {\n return state;\n }\n\n return {\n ...state,\n index,\n routes: state.routes.slice(0, index + 1),\n };\n },\n\n getStateForAction(state, action, options) {\n const { routeParamList } = options;\n\n switch (action.type) {\n case 'REPLACE': {\n const index =\n action.target === state.key && action.source\n ? state.routes.findIndex((r) => r.key === action.source)\n : state.index;\n\n if (index === -1) {\n return null;\n }\n\n const { name, key, params } = action.payload;\n\n if (!state.routeNames.includes(name)) {\n return null;\n }\n\n return {\n ...state,\n routes: state.routes.map((route, i) =>\n i === index\n ? {\n key: key !== undefined ? key : `${name}-${nanoid()}`,\n name,\n params:\n routeParamList[name] !== undefined\n ? {\n ...routeParamList[name],\n ...params,\n }\n : params,\n }\n : route\n ),\n };\n }\n\n case 'PUSH':\n if (state.routeNames.includes(action.payload.name)) {\n const getId = options.routeGetIdList[action.payload.name];\n const id = getId?.({ params: action.payload.params });\n\n const route =\n action.payload.name && action.payload.key\n ? state.routes.find(\n (route) =>\n route.name === action.payload.name &&\n route.key === action.payload.key\n )\n : id\n ? state.routes.find(\n (route) =>\n route.name === action.payload.name &&\n id === getId?.({ params: route.params })\n )\n : undefined;\n\n let routes: Route<string>[];\n\n if (route) {\n routes = state.routes.filter((r) => r.key !== route.key);\n routes.push({\n ...route,\n params:\n action.payload.params !== undefined\n ? {\n ...route.params,\n ...action.payload.params,\n }\n : route.params,\n });\n } else {\n routes = [\n ...state.routes,\n {\n key:\n action.payload.key ?? `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n params:\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params,\n },\n ];\n }\n\n return {\n ...state,\n index: routes.length - 1,\n routes,\n };\n }\n\n return null;\n\n case 'POP': {\n const index =\n action.target === state.key && action.source\n ? state.routes.findIndex((r) => r.key === action.source)\n : state.index;\n\n if (index > 0) {\n const count = Math.max(index - action.payload.count + 1, 1);\n const routes = state.routes\n .slice(0, count)\n .concat(state.routes.slice(index + 1));\n\n return {\n ...state,\n index: routes.length - 1,\n routes,\n };\n }\n\n return null;\n }\n\n case 'POP_TO_TOP':\n return router.getStateForAction(\n state,\n {\n type: 'POP',\n payload: { count: state.routes.length - 1 },\n },\n options\n );\n\n case 'NAVIGATE':\n if (\n action.payload.name !== undefined &&\n !state.routeNames.includes(action.payload.name)\n ) {\n return null;\n }\n\n if (action.payload.key || action.payload.name) {\n // If the route already exists, navigate to that\n let index = -1;\n\n const getId =\n // `getId` and `key` can't be used together\n action.payload.key === undefined &&\n action.payload.name !== undefined\n ? options.routeGetIdList[action.payload.name]\n : undefined;\n const id = getId?.({ params: action.payload.params });\n\n if (id) {\n index = state.routes.findIndex(\n (route) =>\n route.name === action.payload.name &&\n id === getId?.({ params: route.params })\n );\n } else if (\n (state.routes[state.index].name === action.payload.name &&\n action.payload.key === undefined) ||\n state.routes[state.index].key === action.payload.key\n ) {\n index = state.index;\n } else {\n for (let i = state.routes.length - 1; i >= 0; i--) {\n if (\n (state.routes[i].name === action.payload.name &&\n action.payload.key === undefined) ||\n state.routes[i].key === action.payload.key\n ) {\n index = i;\n break;\n }\n }\n }\n\n if (\n index === -1 &&\n action.payload.key &&\n action.payload.name === undefined\n ) {\n return null;\n }\n\n if (index === -1 && action.payload.name !== undefined) {\n const routes = [\n ...state.routes,\n {\n key:\n action.payload.key ?? `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n params:\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params,\n },\n ];\n\n return {\n ...state,\n routes,\n index: routes.length - 1,\n };\n }\n\n const route = state.routes[index];\n\n let params;\n\n if (action.payload.merge === false) {\n params =\n routeParamList[route.name] !== undefined\n ? {\n ...routeParamList[route.name],\n ...action.payload.params,\n }\n : action.payload.params;\n } else {\n params = action.payload.params\n ? {\n ...route.params,\n ...action.payload.params,\n }\n : route.params;\n }\n\n return {\n ...state,\n index,\n routes: [\n ...state.routes.slice(0, index),\n params !== route.params\n ? { ...route, params }\n : state.routes[index],\n ],\n };\n }\n\n return null;\n\n case 'GO_BACK':\n if (state.index > 0) {\n return router.getStateForAction(\n state,\n {\n type: 'POP',\n payload: { count: 1 },\n target: action.target,\n source: action.source,\n },\n options\n );\n }\n\n return null;\n\n default:\n return BaseRouter.getStateForAction(state, action);\n }\n },\n\n actionCreators: StackActions,\n };\n\n return router;\n}\n","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _curry2 = /*#__PURE__*/require('./_curry2');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}\nmodule.exports = _curry3;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nmodule.exports = Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","var _isArray = /*#__PURE__*/require('./_isArray');\n\n/**\n * This checks whether a function has a [methodname] function. If it isn't an\n * array it will execute that function otherwise it will default to the ramda\n * implementation.\n *\n * @private\n * @param {Function} fn ramda implemtation\n * @param {String} methodname property to check for a custom implementation\n * @return {Object} Whatever the return value of the method is.\n */\n\n\nfunction _checkForMethod(methodname, fn) {\n return function () {\n var length = arguments.length;\n if (length === 0) {\n return fn();\n }\n var obj = arguments[length - 1];\n return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));\n };\n}\nmodule.exports = _checkForMethod;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar _has = /*#__PURE__*/require('./internal/_has');\n\nvar _isArguments = /*#__PURE__*/require('./internal/_isArguments');\n\n// cover IE < 9 keys issues\n\n\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar _keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n} : function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n};\nvar keys = /*#__PURE__*/_curry1(_keys);\nmodule.exports = keys;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nfunction isScreenReaderEnabled() {\n return new Promise(function (resolve, reject) {\n resolve(true);\n });\n}\n\nvar prefersReducedMotionMedia = canUseDOM && typeof window.matchMedia === 'function' ? window.matchMedia('(prefers-reduced-motion: reduce)') : null;\n\nfunction isReduceMotionEnabled() {\n return new Promise(function (resolve, reject) {\n resolve(prefersReducedMotionMedia ? prefersReducedMotionMedia.matches : true);\n });\n}\n\nfunction addChangeListener(fn) {\n if (prefersReducedMotionMedia != null) {\n prefersReducedMotionMedia.addEventListener != null ? prefersReducedMotionMedia.addEventListener('change', fn) : prefersReducedMotionMedia.addListener(fn);\n }\n}\n\nfunction removeChangeListener(fn) {\n if (prefersReducedMotionMedia != null) {\n prefersReducedMotionMedia.removeEventListener != null ? prefersReducedMotionMedia.removeEventListener('change', fn) : prefersReducedMotionMedia.removeListener(fn);\n }\n}\n\nvar handlers = {};\nvar AccessibilityInfo = {\n /**\n * Query whether a screen reader is currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when a screen reader is enabled and `false` otherwise.\n */\n isScreenReaderEnabled: isScreenReaderEnabled,\n\n /**\n * Query whether the user prefers reduced motion.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when a screen reader is enabled and `false` otherwise.\n */\n isReduceMotionEnabled: isReduceMotionEnabled,\n\n /**\n * Deprecated\n */\n fetch: isScreenReaderEnabled,\n\n /**\n * Add an event handler. Supported events: reduceMotionChanged\n */\n addEventListener: function addEventListener(eventName, handler) {\n if (eventName === 'reduceMotionChanged') {\n if (!prefersReducedMotionMedia) {\n return;\n }\n\n var listener = function listener(event) {\n handler(event.matches);\n };\n\n addChangeListener(listener);\n handlers[handler] = listener;\n }\n\n return {\n remove: function remove() {\n return AccessibilityInfo.removeEventListener(eventName, handler);\n }\n };\n },\n\n /**\n * Set accessibility focus to a react component.\n */\n setAccessibilityFocus: function setAccessibilityFocus(reactTag) {},\n\n /**\n * Post a string to be announced by the screen reader.\n */\n announceForAccessibility: function announceForAccessibility(announcement) {},\n\n /**\n * Remove an event handler.\n */\n removeEventListener: function removeEventListener(eventName, handler) {\n if (eventName === 'reduceMotionChanged') {\n var listener = handlers[handler];\n\n if (!listener || !prefersReducedMotionMedia) {\n return;\n }\n\n removeChangeListener(listener);\n }\n\n return;\n }\n};\nexport default AccessibilityInfo;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar Alert = /*#__PURE__*/function () {\n function Alert() {}\n\n Alert.alert = function alert() {};\n\n return Alert;\n}();\n\nexport default Alert;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nfunction getQuery() {\n return canUseDOM && window.matchMedia != null ? window.matchMedia('(prefers-color-scheme: dark)') : null;\n}\n\nvar query = getQuery();\nvar listenerMapping = new WeakMap();\nvar Appearance = {\n getColorScheme: function getColorScheme() {\n return query && query.matches ? 'dark' : 'light';\n },\n addChangeListener: function addChangeListener(listener) {\n var mappedListener = listenerMapping.get(listener);\n\n if (!mappedListener) {\n mappedListener = function mappedListener(_ref) {\n var matches = _ref.matches;\n listener({\n colorScheme: matches ? 'dark' : 'light'\n });\n };\n\n listenerMapping.set(listener, mappedListener);\n }\n\n if (query) {\n query.addListener(mappedListener);\n }\n },\n removeChangeListener: function removeChangeListener(listener) {\n var mappedListener = listenerMapping.get(listener);\n\n if (mappedListener) {\n if (query) {\n query.removeListener(mappedListener);\n }\n\n listenerMapping.delete(listener);\n }\n }\n};\nexport default Appearance;","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport findIndex from 'array-find-index';\nimport invariant from 'fbjs/lib/invariant'; // Android 4.4 browser\n\nvar isPrefixed = canUseDOM && !document.hasOwnProperty('hidden') && document.hasOwnProperty('webkitHidden');\nvar EVENT_TYPES = ['change', 'memoryWarning'];\nvar VISIBILITY_CHANGE_EVENT = isPrefixed ? 'webkitvisibilitychange' : 'visibilitychange';\nvar VISIBILITY_STATE_PROPERTY = isPrefixed ? 'webkitVisibilityState' : 'visibilityState';\nvar AppStates = {\n BACKGROUND: 'background',\n ACTIVE: 'active'\n};\nvar listeners = [];\n\nvar AppState = /*#__PURE__*/function () {\n function AppState() {}\n\n AppState.addEventListener = function addEventListener(type, handler) {\n if (AppState.isAvailable) {\n invariant(EVENT_TYPES.indexOf(type) !== -1, 'Trying to subscribe to unknown event: \"%s\"', type);\n\n if (type === 'change') {\n var callback = function callback() {\n return handler(AppState.currentState);\n };\n\n listeners.push([handler, callback]);\n document.addEventListener(VISIBILITY_CHANGE_EVENT, callback, false);\n }\n }\n };\n\n AppState.removeEventListener = function removeEventListener(type, handler) {\n if (AppState.isAvailable) {\n invariant(EVENT_TYPES.indexOf(type) !== -1, 'Trying to remove listener for unknown event: \"%s\"', type);\n\n if (type === 'change') {\n var listenerIndex = findIndex(listeners, function (pair) {\n return pair[0] === handler;\n });\n invariant(listenerIndex !== -1, 'Trying to remove AppState listener for unregistered handler');\n var callback = listeners[listenerIndex][1];\n document.removeEventListener(VISIBILITY_CHANGE_EVENT, callback, false);\n listeners.splice(listenerIndex, 1);\n }\n }\n };\n\n _createClass(AppState, null, [{\n key: \"currentState\",\n get: function get() {\n if (!AppState.isAvailable) {\n return AppStates.ACTIVE;\n }\n\n switch (document[VISIBILITY_STATE_PROPERTY]) {\n case 'hidden':\n case 'prerender':\n case 'unloaded':\n return AppStates.BACKGROUND;\n\n default:\n return AppStates.ACTIVE;\n }\n }\n }]);\n\n return AppState;\n}();\n\nAppState.isAvailable = canUseDOM && document[VISIBILITY_STATE_PROPERTY];\nexport { AppState as default };","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar clipboardAvailable;\n\nvar Clipboard = /*#__PURE__*/function () {\n function Clipboard() {}\n\n Clipboard.isAvailable = function isAvailable() {\n if (clipboardAvailable === undefined) {\n clipboardAvailable = typeof document.queryCommandSupported === 'function' && document.queryCommandSupported('copy');\n }\n\n return clipboardAvailable;\n };\n\n Clipboard.getString = function getString() {\n return Promise.resolve('');\n };\n\n Clipboard.setString = function setString(text) {\n var success = false;\n var body = document.body;\n\n if (body) {\n // add the text to a hidden node\n var node = document.createElement('span');\n node.textContent = text;\n node.style.opacity = '0';\n node.style.position = 'absolute';\n node.style.whiteSpace = 'pre-wrap';\n node.style.userSelect = 'auto';\n body.appendChild(node); // select the text\n\n var selection = window.getSelection();\n selection.removeAllRanges();\n var range = document.createRange();\n range.selectNodeContents(node);\n selection.addRange(range); // attempt to copy\n\n try {\n document.execCommand('copy');\n success = true;\n } catch (e) {} // remove selection and node\n\n\n selection.removeAllRanges();\n body.removeChild(node);\n }\n\n return success;\n };\n\n return Clipboard;\n}();\n\nexport { Clipboard as default };","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport Dimensions from '../Dimensions';\nvar DeviceInfo = {\n Dimensions: {\n get windowPhysicalPixels() {\n var _Dimensions$get = Dimensions.get('window'),\n width = _Dimensions$get.width,\n height = _Dimensions$get.height,\n fontScale = _Dimensions$get.fontScale,\n scale = _Dimensions$get.scale;\n\n return {\n width: width * scale,\n height: height * scale,\n scale: scale,\n fontScale: fontScale\n };\n },\n\n get screenPhysicalPixels() {\n var _Dimensions$get2 = Dimensions.get('screen'),\n width = _Dimensions$get2.width,\n height = _Dimensions$get2.height,\n fontScale = _Dimensions$get2.fontScale,\n scale = _Dimensions$get2.scale;\n\n return {\n width: width * scale,\n height: height * scale,\n scale: scale,\n fontScale: fontScale\n };\n }\n\n },\n\n get locale() {\n if (canUseDOM) {\n if (navigator.languages) {\n return navigator.languages[0];\n } else {\n return navigator.language;\n }\n }\n },\n\n get totalMemory() {\n // $FlowIssue deviceMemory not defined in navigator\n return canUseDOM ? navigator.deviceMemory : undefined;\n },\n\n get userAgent() {\n return canUseDOM ? navigator.userAgent : '';\n }\n\n};\nexport default DeviceInfo;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport Platform from '../../../exports/Platform';\nimport UIManager from '../../../exports/UIManager';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nfunction configureNext(config, onAnimationDidEnd) {\n if (!Platform.isTesting) {\n UIManager.configureNextLayoutAnimation(config, onAnimationDidEnd !== null && onAnimationDidEnd !== void 0 ? onAnimationDidEnd : function () {}, function () {}\n /* unused onError */\n );\n }\n}\n\nfunction create(duration, type, property) {\n return {\n duration: duration,\n create: {\n type: type,\n property: property\n },\n update: {\n type: type\n },\n delete: {\n type: type,\n property: property\n }\n };\n}\n\nvar Presets = {\n easeInEaseOut: create(300, 'easeInEaseOut', 'opacity'),\n linear: create(500, 'linear', 'opacity'),\n spring: {\n duration: 700,\n create: {\n type: 'linear',\n property: 'opacity'\n },\n update: {\n type: 'spring',\n springDamping: 0.4\n },\n delete: {\n type: 'linear',\n property: 'opacity'\n }\n }\n};\n/**\n * Automatically animates views to their new positions when the\n * next layout happens.\n *\n * A common way to use this API is to call it before calling `setState`.\n *\n * Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:\n *\n * UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);\n */\n\nvar LayoutAnimation = {\n /**\n * Schedules an animation to happen on the next layout.\n *\n * @param config Specifies animation properties:\n *\n * - `duration` in milliseconds\n * - `create`, `AnimationConfig` for animating in new views\n * - `update`, `AnimationConfig` for animating views that have been updated\n *\n * @param onAnimationDidEnd Called when the animation finished.\n * Only supported on iOS.\n * @param onError Called on error. Only supported on iOS.\n */\n configureNext: configureNext,\n\n /**\n * Helper for creating a config for `configureNext`.\n */\n create: create,\n Types: Object.freeze({\n spring: 'spring',\n linear: 'linear',\n easeInEaseOut: 'easeInEaseOut',\n easeIn: 'easeIn',\n easeOut: 'easeOut',\n keyboard: 'keyboard'\n }),\n Properties: Object.freeze({\n opacity: 'opacity',\n scaleX: 'scaleX',\n scaleY: 'scaleY',\n scaleXY: 'scaleXY'\n }),\n checkConfig: function checkConfig() {\n console.error('LayoutAnimation.checkConfig(...) has been disabled.');\n },\n Presets: Presets,\n easeInEaseOut: configureNext.bind(null, Presets.easeInEaseOut),\n linear: configureNext.bind(null, Presets.linear),\n spring: configureNext.bind(null, Presets.spring)\n};\nexport default LayoutAnimation;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport LayoutAnimation from '../../vendor/react-native/LayoutAnimation';\nexport default LayoutAnimation;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport invariant from 'fbjs/lib/invariant';\nvar initialURL = canUseDOM ? window.location.href : '';\n\nvar Linking = /*#__PURE__*/function () {\n function Linking() {\n var _this = this;\n\n this._eventCallbacks = {};\n\n this.addEventListener = function (event, callback) {\n if (!_this._eventCallbacks[event]) {\n _this._eventCallbacks[event] = [callback];\n return;\n }\n\n _this._eventCallbacks[event].push(callback);\n };\n\n this.removeEventListener = function (event, callback) {\n var callbacks = _this._eventCallbacks[event];\n var filteredCallbacks = callbacks.filter(function (c) {\n return c.toString() !== callback.toString();\n });\n _this._eventCallbacks[event] = filteredCallbacks;\n };\n }\n\n var _proto = Linking.prototype;\n\n _proto._dispatchEvent = function _dispatchEvent(event) {\n for (var _len = arguments.length, data = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n data[_key - 1] = arguments[_key];\n }\n\n var listeners = this._eventCallbacks[event];\n\n if (listeners != null && Array.isArray(listeners)) {\n listeners.map(function (listener) {\n listener.apply(void 0, data);\n });\n }\n }\n /**\n * Adds a event listener for the specified event. The callback will be called when the\n * said event is dispatched.\n */\n ;\n\n _proto.canOpenURL = function canOpenURL() {\n return Promise.resolve(true);\n };\n\n _proto.getInitialURL = function getInitialURL() {\n return Promise.resolve(initialURL);\n }\n /**\n * Try to open the given url in a secure fashion. The method returns a Promise object.\n * If the url opens, the promise is resolved. If not, the promise is rejected.\n * Dispatches the `onOpen` event if `url` is opened successfully\n */\n ;\n\n _proto.openURL = function openURL(url) {\n try {\n open(url);\n\n this._dispatchEvent('onOpen', url);\n\n return Promise.resolve();\n } catch (e) {\n return Promise.reject(e);\n }\n };\n\n _proto._validateURL = function _validateURL(url) {\n invariant(typeof url === 'string', 'Invalid URL: should be a string. Was: ' + url);\n invariant(url, 'Invalid URL: cannot be empty');\n };\n\n return Linking;\n}();\n\nvar open = function open(url) {\n if (canUseDOM) {\n var urlToOpen = new URL(url, window.location).toString();\n window.open(urlToOpen, '_blank', 'noopener');\n }\n};\n\nexport default new Linking();","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport NativeEventEmitter from '../../vendor/react-native/NativeEventEmitter';\nexport default NativeEventEmitter;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\nvar TouchHistoryMath = {\n /**\n * This code is optimized and not intended to look beautiful. This allows\n * computing of touch centroids that have moved after `touchesChangedAfter`\n * timeStamp. You can compute the current centroid involving all touches\n * moves after `touchesChangedAfter`, or you can compute the previous\n * centroid of all touches that were moved after `touchesChangedAfter`.\n *\n * @param {TouchHistoryMath} touchHistory Standard Responder touch track\n * data.\n * @param {number} touchesChangedAfter timeStamp after which moved touches\n * are considered \"actively moving\" - not just \"active\".\n * @param {boolean} isXAxis Consider `x` dimension vs. `y` dimension.\n * @param {boolean} ofCurrent Compute current centroid for actively moving\n * touches vs. previous centroid of now actively moving touches.\n * @return {number} value of centroid in specified dimension.\n */\n centroidDimension: function centroidDimension(touchHistory, touchesChangedAfter, isXAxis, ofCurrent) {\n var touchBank = touchHistory.touchBank;\n var total = 0;\n var count = 0;\n var oneTouchData = touchHistory.numberActiveTouches === 1 ? touchHistory.touchBank[touchHistory.indexOfSingleActiveTouch] : null;\n\n if (oneTouchData !== null) {\n if (oneTouchData.touchActive && oneTouchData.currentTimeStamp > touchesChangedAfter) {\n total += ofCurrent && isXAxis ? oneTouchData.currentPageX : ofCurrent && !isXAxis ? oneTouchData.currentPageY : !ofCurrent && isXAxis ? oneTouchData.previousPageX : oneTouchData.previousPageY;\n count = 1;\n }\n } else {\n for (var i = 0; i < touchBank.length; i++) {\n var touchTrack = touchBank[i];\n\n if (touchTrack !== null && touchTrack !== undefined && touchTrack.touchActive && touchTrack.currentTimeStamp >= touchesChangedAfter) {\n var toAdd = void 0; // Yuck, program temporarily in invalid state.\n\n if (ofCurrent && isXAxis) {\n toAdd = touchTrack.currentPageX;\n } else if (ofCurrent && !isXAxis) {\n toAdd = touchTrack.currentPageY;\n } else if (!ofCurrent && isXAxis) {\n toAdd = touchTrack.previousPageX;\n } else {\n toAdd = touchTrack.previousPageY;\n }\n\n total += toAdd;\n count++;\n }\n }\n }\n\n return count > 0 ? total / count : TouchHistoryMath.noCentroid;\n },\n currentCentroidXOfTouchesChangedAfter: function currentCentroidXOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {\n return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, true, // isXAxis\n true // ofCurrent\n );\n },\n currentCentroidYOfTouchesChangedAfter: function currentCentroidYOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {\n return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, false, // isXAxis\n true // ofCurrent\n );\n },\n previousCentroidXOfTouchesChangedAfter: function previousCentroidXOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {\n return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, true, // isXAxis\n false // ofCurrent\n );\n },\n previousCentroidYOfTouchesChangedAfter: function previousCentroidYOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {\n return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, false, // isXAxis\n false // ofCurrent\n );\n },\n currentCentroidX: function currentCentroidX(touchHistory) {\n return TouchHistoryMath.centroidDimension(touchHistory, 0, // touchesChangedAfter\n true, // isXAxis\n true // ofCurrent\n );\n },\n currentCentroidY: function currentCentroidY(touchHistory) {\n return TouchHistoryMath.centroidDimension(touchHistory, 0, // touchesChangedAfter\n false, // isXAxis\n true // ofCurrent\n );\n },\n noCentroid: -1\n};\nexport default TouchHistoryMath;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport InteractionManager from '../../../exports/InteractionManager';\nimport TouchHistoryMath from '../TouchHistoryMath';\nvar currentCentroidXOfTouchesChangedAfter = TouchHistoryMath.currentCentroidXOfTouchesChangedAfter;\nvar currentCentroidYOfTouchesChangedAfter = TouchHistoryMath.currentCentroidYOfTouchesChangedAfter;\nvar previousCentroidXOfTouchesChangedAfter = TouchHistoryMath.previousCentroidXOfTouchesChangedAfter;\nvar previousCentroidYOfTouchesChangedAfter = TouchHistoryMath.previousCentroidYOfTouchesChangedAfter;\nvar currentCentroidX = TouchHistoryMath.currentCentroidX;\nvar currentCentroidY = TouchHistoryMath.currentCentroidY;\n/**\n * `PanResponder` reconciles several touches into a single gesture. It makes\n * single-touch gestures resilient to extra touches, and can be used to\n * recognize simple multi-touch gestures.\n *\n * By default, `PanResponder` holds an `InteractionManager` handle to block\n * long-running JS events from interrupting active gestures.\n *\n * It provides a predictable wrapper of the responder handlers provided by the\n * [gesture responder system](docs/gesture-responder-system.html).\n * For each handler, it provides a new `gestureState` object alongside the\n * native event object:\n *\n * ```\n * onPanResponderMove: (event, gestureState) => {}\n * ```\n *\n * A native event is a synthetic touch event with the following form:\n *\n * - `nativeEvent`\n * + `changedTouches` - Array of all touch events that have changed since the last event\n * + `identifier` - The ID of the touch\n * + `locationX` - The X position of the touch, relative to the element\n * + `locationY` - The Y position of the touch, relative to the element\n * + `pageX` - The X position of the touch, relative to the root element\n * + `pageY` - The Y position of the touch, relative to the root element\n * + `target` - The node id of the element receiving the touch event\n * + `timestamp` - A time identifier for the touch, useful for velocity calculation\n * + `touches` - Array of all current touches on the screen\n *\n * A `gestureState` object has the following:\n *\n * - `stateID` - ID of the gestureState- persisted as long as there at least\n * one touch on screen\n * - `moveX` - the latest screen coordinates of the recently-moved touch\n * - `moveY` - the latest screen coordinates of the recently-moved touch\n * - `x0` - the screen coordinates of the responder grant\n * - `y0` - the screen coordinates of the responder grant\n * - `dx` - accumulated distance of the gesture since the touch started\n * - `dy` - accumulated distance of the gesture since the touch started\n * - `vx` - current velocity of the gesture\n * - `vy` - current velocity of the gesture\n * - `numberActiveTouches` - Number of touches currently on screen\n *\n * ### Basic Usage\n *\n * ```\n * componentWillMount: function() {\n * this._panResponder = PanResponder.create({\n * // Ask to be the responder:\n * onStartShouldSetPanResponder: (evt, gestureState) => true,\n * onStartShouldSetPanResponderCapture: (evt, gestureState) => true,\n * onMoveShouldSetPanResponder: (evt, gestureState) => true,\n * onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,\n *\n * onPanResponderGrant: (evt, gestureState) => {\n * // The gesture has started. Show visual feedback so the user knows\n * // what is happening!\n *\n * // gestureState.d{x,y} will be set to zero now\n * },\n * onPanResponderMove: (evt, gestureState) => {\n * // The most recent move distance is gestureState.move{X,Y}\n *\n * // The accumulated gesture distance since becoming responder is\n * // gestureState.d{x,y}\n * },\n * onPanResponderTerminationRequest: (evt, gestureState) => true,\n * onPanResponderRelease: (evt, gestureState) => {\n * // The user has released all touches while this view is the\n * // responder. This typically means a gesture has succeeded\n * },\n * onPanResponderTerminate: (evt, gestureState) => {\n * // Another component has become the responder, so this gesture\n * // should be cancelled\n * },\n * onShouldBlockNativeResponder: (evt, gestureState) => {\n * // Returns whether this component should block native components from becoming the JS\n * // responder. Returns true by default. Is currently only supported on android.\n * return true;\n * },\n * });\n * },\n *\n * render: function() {\n * return (\n * <View {...this._panResponder.panHandlers} />\n * );\n * },\n *\n * ```\n *\n * ### Working Example\n *\n * To see it in action, try the\n * [PanResponder example in RNTester](https://github.com/facebook/react-native/blob/master/RNTester/js/PanResponderExample.js)\n */\n\nvar PanResponder = {\n /**\n *\n * A graphical explanation of the touch data flow:\n *\n * +----------------------------+ +--------------------------------+\n * | ResponderTouchHistoryStore | |TouchHistoryMath |\n * +----------------------------+ +----------+---------------------+\n * |Global store of touchHistory| |Allocation-less math util |\n * |including activeness, start | |on touch history (centroids |\n * |position, prev/cur position.| |and multitouch movement etc) |\n * | | | |\n * +----^-----------------------+ +----^---------------------------+\n * | |\n * | (records relevant history |\n * | of touches relevant for |\n * | implementing higher level |\n * | gestures) |\n * | |\n * +----+-----------------------+ +----|---------------------------+\n * | ResponderEventPlugin | | | Your App/Component |\n * +----------------------------+ +----|---------------------------+\n * |Negotiates which view gets | Low level | | High level |\n * |onResponderMove events. | events w/ | +-+-------+ events w/ |\n * |Also records history into | touchHistory| | Pan | multitouch + |\n * |ResponderTouchHistoryStore. +---------------->Responder+-----> accumulative|\n * +----------------------------+ attached to | | | distance and |\n * each event | +---------+ velocity. |\n * | |\n * | |\n * +--------------------------------+\n *\n *\n *\n * Gesture that calculates cumulative movement over time in a way that just\n * \"does the right thing\" for multiple touches. The \"right thing\" is very\n * nuanced. When moving two touches in opposite directions, the cumulative\n * distance is zero in each dimension. When two touches move in parallel five\n * pixels in the same direction, the cumulative distance is five, not ten. If\n * two touches start, one moves five in a direction, then stops and the other\n * touch moves fives in the same direction, the cumulative distance is ten.\n *\n * This logic requires a kind of processing of time \"clusters\" of touch events\n * so that two touch moves that essentially occur in parallel but move every\n * other frame respectively, are considered part of the same movement.\n *\n * Explanation of some of the non-obvious fields:\n *\n * - moveX/moveY: If no move event has been observed, then `(moveX, moveY)` is\n * invalid. If a move event has been observed, `(moveX, moveY)` is the\n * centroid of the most recently moved \"cluster\" of active touches.\n * (Currently all move have the same timeStamp, but later we should add some\n * threshold for what is considered to be \"moving\"). If a palm is\n * accidentally counted as a touch, but a finger is moving greatly, the palm\n * will move slightly, but we only want to count the single moving touch.\n * - x0/y0: Centroid location (non-cumulative) at the time of becoming\n * responder.\n * - dx/dy: Cumulative touch distance - not the same thing as sum of each touch\n * distance. Accounts for touch moves that are clustered together in time,\n * moving the same direction. Only valid when currently responder (otherwise,\n * it only represents the drag distance below the threshold).\n * - vx/vy: Velocity.\n */\n _initializeGestureState: function _initializeGestureState(gestureState) {\n gestureState.moveX = 0;\n gestureState.moveY = 0;\n gestureState.x0 = 0;\n gestureState.y0 = 0;\n gestureState.dx = 0;\n gestureState.dy = 0;\n gestureState.vx = 0;\n gestureState.vy = 0;\n gestureState.numberActiveTouches = 0; // All `gestureState` accounts for timeStamps up until:\n\n gestureState._accountsForMovesUpTo = 0;\n },\n\n /**\n * This is nuanced and is necessary. It is incorrect to continuously take all\n * active *and* recently moved touches, find the centroid, and track how that\n * result changes over time. Instead, we must take all recently moved\n * touches, and calculate how the centroid has changed just for those\n * recently moved touches, and append that change to an accumulator. This is\n * to (at least) handle the case where the user is moving three fingers, and\n * then one of the fingers stops but the other two continue.\n *\n * This is very different than taking all of the recently moved touches and\n * storing their centroid as `dx/dy`. For correctness, we must *accumulate\n * changes* in the centroid of recently moved touches.\n *\n * There is also some nuance with how we handle multiple moved touches in a\n * single event. With the way `ReactNativeEventEmitter` dispatches touches as\n * individual events, multiple touches generate two 'move' events, each of\n * them triggering `onResponderMove`. But with the way `PanResponder` works,\n * all of the gesture inference is performed on the first dispatch, since it\n * looks at all of the touches (even the ones for which there hasn't been a\n * native dispatch yet). Therefore, `PanResponder` does not call\n * `onResponderMove` passed the first dispatch. This diverges from the\n * typical responder callback pattern (without using `PanResponder`), but\n * avoids more dispatches than necessary.\n */\n _updateGestureStateOnMove: function _updateGestureStateOnMove(gestureState, touchHistory) {\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n gestureState.moveX = currentCentroidXOfTouchesChangedAfter(touchHistory, gestureState._accountsForMovesUpTo);\n gestureState.moveY = currentCentroidYOfTouchesChangedAfter(touchHistory, gestureState._accountsForMovesUpTo);\n var movedAfter = gestureState._accountsForMovesUpTo;\n var prevX = previousCentroidXOfTouchesChangedAfter(touchHistory, movedAfter);\n var x = currentCentroidXOfTouchesChangedAfter(touchHistory, movedAfter);\n var prevY = previousCentroidYOfTouchesChangedAfter(touchHistory, movedAfter);\n var y = currentCentroidYOfTouchesChangedAfter(touchHistory, movedAfter);\n var nextDX = gestureState.dx + (x - prevX);\n var nextDY = gestureState.dy + (y - prevY); // TODO: This must be filtered intelligently.\n\n var dt = touchHistory.mostRecentTimeStamp - gestureState._accountsForMovesUpTo;\n gestureState.vx = (nextDX - gestureState.dx) / dt;\n gestureState.vy = (nextDY - gestureState.dy) / dt;\n gestureState.dx = nextDX;\n gestureState.dy = nextDY;\n gestureState._accountsForMovesUpTo = touchHistory.mostRecentTimeStamp;\n },\n\n /**\n * @param {object} config Enhanced versions of all of the responder callbacks\n * that provide not only the typical `ResponderSyntheticEvent`, but also the\n * `PanResponder` gesture state. Simply replace the word `Responder` with\n * `PanResponder` in each of the typical `onResponder*` callbacks. For\n * example, the `config` object would look like:\n *\n * - `onMoveShouldSetPanResponder: (e, gestureState) => {...}`\n * - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}`\n * - `onStartShouldSetPanResponder: (e, gestureState) => {...}`\n * - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}`\n * - `onPanResponderReject: (e, gestureState) => {...}`\n * - `onPanResponderGrant: (e, gestureState) => {...}`\n * - `onPanResponderStart: (e, gestureState) => {...}`\n * - `onPanResponderEnd: (e, gestureState) => {...}`\n * - `onPanResponderRelease: (e, gestureState) => {...}`\n * - `onPanResponderMove: (e, gestureState) => {...}`\n * - `onPanResponderTerminate: (e, gestureState) => {...}`\n * - `onPanResponderTerminationRequest: (e, gestureState) => {...}`\n * - `onShouldBlockNativeResponder: (e, gestureState) => {...}`\n *\n * In general, for events that have capture equivalents, we update the\n * gestureState once in the capture phase and can use it in the bubble phase\n * as well.\n *\n * Be careful with onStartShould* callbacks. They only reflect updated\n * `gestureState` for start/end events that bubble/capture to the Node.\n * Once the node is the responder, you can rely on every start/end event\n * being processed by the gesture and `gestureState` being updated\n * accordingly. (numberActiveTouches) may not be totally accurate unless you\n * are the responder.\n */\n create: function create(config) {\n var interactionState = {\n handle: null,\n shouldCancelClick: false,\n timeout: null\n };\n var gestureState = {\n // Useful for debugging\n stateID: Math.random(),\n moveX: 0,\n moveY: 0,\n x0: 0,\n y0: 0,\n dx: 0,\n dy: 0,\n vx: 0,\n vy: 0,\n numberActiveTouches: 0,\n _accountsForMovesUpTo: 0\n };\n var panHandlers = {\n onStartShouldSetResponder: function onStartShouldSetResponder(event) {\n return config.onStartShouldSetPanResponder == null ? false : config.onStartShouldSetPanResponder(event, gestureState);\n },\n onMoveShouldSetResponder: function onMoveShouldSetResponder(event) {\n return config.onMoveShouldSetPanResponder == null ? false : config.onMoveShouldSetPanResponder(event, gestureState);\n },\n onStartShouldSetResponderCapture: function onStartShouldSetResponderCapture(event) {\n // TODO: Actually, we should reinitialize the state any time\n // touches.length increases from 0 active to > 0 active.\n if (event.nativeEvent.touches.length === 1) {\n PanResponder._initializeGestureState(gestureState);\n }\n\n gestureState.numberActiveTouches = event.touchHistory.numberActiveTouches;\n return config.onStartShouldSetPanResponderCapture != null ? config.onStartShouldSetPanResponderCapture(event, gestureState) : false;\n },\n onMoveShouldSetResponderCapture: function onMoveShouldSetResponderCapture(event) {\n var touchHistory = event.touchHistory; // Responder system incorrectly dispatches should* to current responder\n // Filter out any touch moves past the first one - we would have\n // already processed multi-touch geometry during the first event.\n\n if (gestureState._accountsForMovesUpTo === touchHistory.mostRecentTimeStamp) {\n return false;\n }\n\n PanResponder._updateGestureStateOnMove(gestureState, touchHistory);\n\n return config.onMoveShouldSetPanResponderCapture ? config.onMoveShouldSetPanResponderCapture(event, gestureState) : false;\n },\n onResponderGrant: function onResponderGrant(event) {\n if (!interactionState.handle) {\n interactionState.handle = InteractionManager.createInteractionHandle();\n }\n\n if (interactionState.timeout) {\n clearInteractionTimeout(interactionState);\n }\n\n interactionState.shouldCancelClick = true;\n gestureState.x0 = currentCentroidX(event.touchHistory);\n gestureState.y0 = currentCentroidY(event.touchHistory);\n gestureState.dx = 0;\n gestureState.dy = 0;\n\n if (config.onPanResponderGrant) {\n config.onPanResponderGrant(event, gestureState);\n } // TODO: t7467124 investigate if this can be removed\n\n\n return config.onShouldBlockNativeResponder == null ? true : config.onShouldBlockNativeResponder(event, gestureState);\n },\n onResponderReject: function onResponderReject(event) {\n clearInteractionHandle(interactionState, config.onPanResponderReject, event, gestureState);\n },\n onResponderRelease: function onResponderRelease(event) {\n clearInteractionHandle(interactionState, config.onPanResponderRelease, event, gestureState);\n setInteractionTimeout(interactionState);\n\n PanResponder._initializeGestureState(gestureState);\n },\n onResponderStart: function onResponderStart(event) {\n var touchHistory = event.touchHistory;\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n\n if (config.onPanResponderStart) {\n config.onPanResponderStart(event, gestureState);\n }\n },\n onResponderMove: function onResponderMove(event) {\n var touchHistory = event.touchHistory; // Guard against the dispatch of two touch moves when there are two\n // simultaneously changed touches.\n\n if (gestureState._accountsForMovesUpTo === touchHistory.mostRecentTimeStamp) {\n return;\n } // Filter out any touch moves past the first one - we would have\n // already processed multi-touch geometry during the first event.\n\n\n PanResponder._updateGestureStateOnMove(gestureState, touchHistory);\n\n if (config.onPanResponderMove) {\n config.onPanResponderMove(event, gestureState);\n }\n },\n onResponderEnd: function onResponderEnd(event) {\n var touchHistory = event.touchHistory;\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n clearInteractionHandle(interactionState, config.onPanResponderEnd, event, gestureState);\n },\n onResponderTerminate: function onResponderTerminate(event) {\n clearInteractionHandle(interactionState, config.onPanResponderTerminate, event, gestureState);\n setInteractionTimeout(interactionState);\n\n PanResponder._initializeGestureState(gestureState);\n },\n onResponderTerminationRequest: function onResponderTerminationRequest(event) {\n return config.onPanResponderTerminationRequest == null ? true : config.onPanResponderTerminationRequest(event, gestureState);\n },\n // We do not want to trigger 'click' activated gestures or native behaviors\n // on any pan target that is under a mouse cursor when it is released.\n // Browsers will natively cancel 'click' events on a target if a non-mouse\n // active pointer moves.\n onClickCapture: function onClickCapture(event) {\n if (interactionState.shouldCancelClick === true) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n };\n return {\n panHandlers: panHandlers,\n getInteractionHandle: function getInteractionHandle() {\n return interactionState.handle;\n }\n };\n }\n};\n\nfunction clearInteractionHandle(interactionState, callback, event, gestureState) {\n if (interactionState.handle) {\n InteractionManager.clearInteractionHandle(interactionState.handle);\n interactionState.handle = null;\n }\n\n if (callback) {\n callback(event, gestureState);\n }\n}\n\nfunction clearInteractionTimeout(interactionState) {\n clearTimeout(interactionState.timeout);\n}\n\nfunction setInteractionTimeout(interactionState) {\n interactionState.timeout = setTimeout(function () {\n interactionState.shouldCancelClick = false;\n }, 250);\n}\n\nexport default PanResponder;","import PanResponder from '../../vendor/react-native/PanResponder';\nexport default PanResponder;","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport invariant from 'fbjs/lib/invariant';\n\nvar Share = /*#__PURE__*/function () {\n function Share() {}\n\n Share.share = function share(content, options) {\n if (options === void 0) {\n options = {};\n }\n\n invariant(typeof content === 'object' && content !== null, 'Content to share must be a valid object');\n invariant(typeof content.url === 'string' || typeof content.message === 'string', 'At least one of URL and message is required');\n invariant(typeof options === 'object' && options !== null, 'Options must be a valid object');\n invariant(!content.title || typeof content.title === 'string', 'Invalid title: title should be a string.');\n\n if (window.navigator.share !== undefined) {\n return window.navigator.share({\n title: content.title,\n text: content.message,\n url: content.url\n });\n } else {\n return Promise.reject(new Error('Share is not supported in this browser'));\n }\n }\n /**\n * The content was successfully shared.\n */\n ;\n\n _createClass(Share, null, [{\n key: \"sharedAction\",\n get: function get() {\n return 'sharedAction';\n }\n /**\n * The dialog has been dismissed.\n * @platform ios\n */\n\n }, {\n key: \"dismissedAction\",\n get: function get() {\n return 'dismissedAction';\n }\n }]);\n\n return Share;\n}();\n\nexport default Share;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar _vibrate = function vibrate(pattern) {\n if ('vibrate' in window.navigator) {\n window.navigator.vibrate(pattern);\n }\n};\n\nvar Vibration = {\n cancel: function cancel() {\n _vibrate(0);\n },\n vibrate: function vibrate(pattern) {\n if (pattern === void 0) {\n pattern = 400;\n }\n\n _vibrate(pattern);\n }\n};\nexport default Vibration;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar accessibilityValue = {\n max: 1,\n min: 0\n};\n\nvar createSvgCircle = function createSvgCircle(style) {\n return /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"16\",\n cy: \"16\",\n fill: \"none\",\n r: \"14\",\n strokeWidth: \"4\",\n style: style\n });\n};\n\nvar ActivityIndicator = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var _props$animating = props.animating,\n animating = _props$animating === void 0 ? true : _props$animating,\n _props$color = props.color,\n color = _props$color === void 0 ? '#1976D2' : _props$color,\n _props$hidesWhenStopp = props.hidesWhenStopped,\n hidesWhenStopped = _props$hidesWhenStopp === void 0 ? true : _props$hidesWhenStopp,\n _props$size = props.size,\n size = _props$size === void 0 ? 'small' : _props$size,\n style = props.style,\n other = _objectWithoutPropertiesLoose(props, [\"animating\", \"color\", \"hidesWhenStopped\", \"size\", \"style\"]);\n\n var svg = /*#__PURE__*/React.createElement(\"svg\", {\n height: \"100%\",\n viewBox: \"0 0 32 32\",\n width: \"100%\"\n }, createSvgCircle({\n stroke: color,\n opacity: 0.2\n }), createSvgCircle({\n stroke: color,\n strokeDasharray: 80,\n strokeDashoffset: 60\n }));\n return /*#__PURE__*/React.createElement(View, _extends({}, other, {\n accessibilityRole: \"progressbar\",\n accessibilityValue: accessibilityValue,\n ref: forwardedRef,\n style: [styles.container, style]\n }), /*#__PURE__*/React.createElement(View, {\n children: svg,\n style: [typeof size === 'number' ? {\n height: size,\n width: size\n } : indicatorSizes[size], styles.animation, !animating && styles.animationPause, !animating && hidesWhenStopped && styles.hidesWhenStopped]\n }));\n});\nActivityIndicator.displayName = 'ActivityIndicator';\nvar styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n hidesWhenStopped: {\n visibility: 'hidden'\n },\n animation: {\n animationDuration: '0.75s',\n animationKeyframes: [{\n '0%': {\n transform: [{\n rotate: '0deg'\n }]\n },\n '100%': {\n transform: [{\n rotate: '360deg'\n }]\n }\n }],\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite'\n },\n animationPause: {\n animationPlayState: 'paused'\n }\n});\nvar indicatorSizes = StyleSheet.create({\n small: {\n width: 20,\n height: 20\n },\n large: {\n width: 36,\n height: 36\n }\n});\nexport default ActivityIndicator;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport TouchableOpacity from '../TouchableOpacity';\nimport Text from '../Text';\nvar Button = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var accessibilityLabel = props.accessibilityLabel,\n color = props.color,\n disabled = props.disabled,\n onPress = props.onPress,\n testID = props.testID,\n title = props.title;\n return /*#__PURE__*/React.createElement(TouchableOpacity, {\n accessibilityLabel: accessibilityLabel,\n accessibilityRole: \"button\",\n disabled: disabled,\n focusable: !disabled,\n onPress: onPress,\n ref: forwardedRef,\n style: [styles.button, color && {\n backgroundColor: color\n }, disabled && styles.buttonDisabled],\n testID: testID\n }, /*#__PURE__*/React.createElement(Text, {\n style: [styles.text, disabled && styles.textDisabled]\n }, title));\n});\nButton.displayName = 'Button';\nvar styles = StyleSheet.create({\n button: {\n backgroundColor: '#2196F3',\n borderRadius: 2\n },\n text: {\n color: '#fff',\n fontWeight: '500',\n padding: 8,\n textAlign: 'center',\n textTransform: 'uppercase'\n },\n buttonDisabled: {\n backgroundColor: '#dfdfdf'\n },\n textDisabled: {\n color: '#a1a1a1'\n }\n});\nexport default Button;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar CheckBox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var color = props.color,\n disabled = props.disabled,\n onChange = props.onChange,\n onValueChange = props.onValueChange,\n style = props.style,\n value = props.value,\n other = _objectWithoutPropertiesLoose(props, [\"color\", \"disabled\", \"onChange\", \"onValueChange\", \"style\", \"value\"]);\n\n function handleChange(event) {\n var value = event.nativeEvent.target.checked;\n event.nativeEvent.value = value;\n onChange && onChange(event);\n onValueChange && onValueChange(value);\n }\n\n var fakeControl = /*#__PURE__*/React.createElement(View, {\n style: [styles.fakeControl, value && styles.fakeControlChecked, // custom color\n value && color && {\n backgroundColor: color,\n borderColor: color\n }, disabled && styles.fakeControlDisabled, value && disabled && styles.fakeControlCheckedAndDisabled]\n });\n var nativeControl = createElement('input', {\n checked: value,\n disabled: disabled,\n onChange: handleChange,\n ref: forwardedRef,\n style: [styles.nativeControl, styles.cursorInherit],\n type: 'checkbox'\n });\n return /*#__PURE__*/React.createElement(View, _extends({}, other, {\n accessibilityDisabled: disabled,\n style: [styles.root, style, disabled && styles.cursorDefault]\n }), fakeControl, nativeControl);\n});\nCheckBox.displayName = 'CheckBox';\nvar styles = StyleSheet.create({\n root: {\n cursor: 'pointer',\n height: 16,\n userSelect: 'none',\n width: 16\n },\n cursorDefault: {\n cursor: 'default'\n },\n cursorInherit: {\n cursor: 'inherit'\n },\n fakeControl: {\n alignItems: 'center',\n backgroundColor: '#fff',\n borderColor: '#657786',\n borderRadius: 2,\n borderStyle: 'solid',\n borderWidth: 2,\n height: '100%',\n justifyContent: 'center',\n width: '100%'\n },\n fakeControlChecked: {\n backgroundColor: '#009688',\n backgroundImage: 'url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K\")',\n backgroundRepeat: 'no-repeat',\n borderColor: '#009688'\n },\n fakeControlDisabled: {\n borderColor: '#CCD6DD'\n },\n fakeControlCheckedAndDisabled: {\n backgroundColor: '#AAB8C2',\n borderColor: '#AAB8C2'\n },\n nativeControl: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '100%',\n margin: 0,\n opacity: 0,\n padding: 0,\n width: '100%'\n })\n});\nexport default CheckBox;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport Image from '../Image';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar emptyObject = {};\n/**\n * Very simple drop-in replacement for <Image> which supports nesting views.\n */\n\nvar ImageBackground = /*#__PURE__*/forwardRef(function (props, forwardedRef) {\n var children = props.children,\n _props$style = props.style,\n style = _props$style === void 0 ? emptyObject : _props$style,\n imageStyle = props.imageStyle,\n imageRef = props.imageRef,\n rest = _objectWithoutPropertiesLoose(props, [\"children\", \"style\", \"imageStyle\", \"imageRef\"]);\n\n var _StyleSheet$flatten = StyleSheet.flatten(style),\n height = _StyleSheet$flatten.height,\n width = _StyleSheet$flatten.width;\n\n return /*#__PURE__*/React.createElement(View, {\n ref: forwardedRef,\n style: style\n }, /*#__PURE__*/React.createElement(Image, _extends({}, rest, {\n ref: imageRef,\n style: [StyleSheet.absoluteFill, {\n // Temporary Workaround:\n // Current (imperfect yet) implementation of <Image> overwrites width and height styles\n // (which is not quite correct), and these styles conflict with explicitly set styles\n // of <ImageBackground> and with our internal layout model here.\n // So, we have to proxy/reapply these styles explicitly for actual <Image> component.\n // This workaround should be removed after implementing proper support of\n // intrinsic content size of the <Image>.\n width: width,\n height: height,\n zIndex: -1\n }, imageStyle]\n })), children);\n});\nImageBackground.displayName = 'ImageBackground';\nexport default ImageBackground;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport ReactDOM from 'react-dom';\n\nfunction ModalPortal(props) {\n var children = props.children;\n var elementRef = React.useRef(null);\n\n if (canUseDOM && !elementRef.current) {\n var element = document.createElement('div');\n\n if (element && document.body) {\n document.body.appendChild(element);\n elementRef.current = element;\n }\n }\n\n React.useEffect(function () {\n if (canUseDOM) {\n return function () {\n if (document.body && elementRef.current) {\n document.body.removeChild(elementRef.current);\n elementRef.current = null;\n }\n };\n }\n }, []);\n return elementRef.current && canUseDOM ? /*#__PURE__*/ReactDOM.createPortal(children, elementRef.current) : null;\n}\n\nexport default ModalPortal;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport createElement from '../createElement';\nvar ANIMATION_DURATION = 300;\n\nfunction getAnimationStyle(animationType, visible) {\n if (animationType === 'slide') {\n return visible ? animatedSlideInStyles : animatedSlideOutStyles;\n }\n\n if (animationType === 'fade') {\n return visible ? animatedFadeInStyles : animatedFadeOutStyles;\n }\n\n return visible ? styles.container : styles.hidden;\n}\n\nfunction ModalAnimation(props) {\n var animationType = props.animationType,\n children = props.children,\n onDismiss = props.onDismiss,\n onShow = props.onShow,\n visible = props.visible;\n\n var _React$useState = React.useState(false),\n isRendering = _React$useState[0],\n setIsRendering = _React$useState[1];\n\n var wasVisible = React.useRef(false);\n var isAnimated = animationType && animationType !== 'none';\n var animationEndCallback = React.useCallback(function (e) {\n if (e && e.currentTarget !== e.target) {\n // If the event was generated for something NOT this element we\n // should ignore it as it's not relevant to us\n return;\n }\n\n if (visible) {\n if (onShow) {\n onShow();\n }\n } else {\n setIsRendering(false);\n\n if (onDismiss) {\n onDismiss();\n }\n }\n }, [onDismiss, onShow, visible]);\n React.useEffect(function () {\n if (visible) {\n setIsRendering(true);\n }\n\n if (visible !== wasVisible.current && !isAnimated) {\n // Manually call `animationEndCallback` if no animation is used\n animationEndCallback();\n }\n\n wasVisible.current = visible;\n }, [isAnimated, visible, animationEndCallback]);\n return isRendering || visible ? createElement('div', {\n style: isRendering ? getAnimationStyle(animationType, visible) : styles.hidden,\n onAnimationEnd: animationEndCallback,\n children: children\n }) : null;\n}\n\nvar styles = StyleSheet.create({\n container: {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n zIndex: 9999\n },\n animatedIn: {\n animationDuration: ANIMATION_DURATION + \"ms\",\n animationTimingFunction: 'ease-in'\n },\n animatedOut: {\n pointerEvents: 'none',\n animationDuration: ANIMATION_DURATION + \"ms\",\n animationTimingFunction: 'ease-out'\n },\n fadeIn: {\n opacity: 1,\n animationKeyframes: {\n '0%': {\n opacity: 0\n },\n '100%': {\n opacity: 1\n }\n }\n },\n fadeOut: {\n opacity: 0,\n animationKeyframes: {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n }\n },\n slideIn: {\n transform: [{\n translateY: '0%'\n }],\n animationKeyframes: {\n '0%': {\n transform: [{\n translateY: '100%'\n }]\n },\n '100%': {\n transform: [{\n translateY: '0%'\n }]\n }\n }\n },\n slideOut: {\n transform: [{\n translateY: '100%'\n }],\n animationKeyframes: {\n '0%': {\n transform: [{\n translateY: '0%'\n }]\n },\n '100%': {\n transform: [{\n translateY: '100%'\n }]\n }\n }\n },\n hidden: {\n opacity: 0\n }\n});\nvar animatedSlideInStyles = [styles.container, styles.animatedIn, styles.slideIn];\nvar animatedSlideOutStyles = [styles.container, styles.animatedOut, styles.slideOut];\nvar animatedFadeInStyles = [styles.container, styles.animatedIn, styles.fadeIn];\nvar animatedFadeOutStyles = [styles.container, styles.animatedOut, styles.fadeOut];\nexport default ModalAnimation;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport View from '../View';\nimport StyleSheet from '../StyleSheet';\nvar ModalContent = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var active = props.active,\n children = props.children,\n onRequestClose = props.onRequestClose,\n transparent = props.transparent;\n React.useEffect(function () {\n if (canUseDOM) {\n var closeOnEscape = function closeOnEscape(e) {\n if (active && e.key === 'Escape') {\n e.stopPropagation();\n\n if (onRequestClose) {\n onRequestClose();\n }\n }\n };\n\n document.addEventListener('keyup', closeOnEscape, false);\n return function () {\n return document.removeEventListener('keyup', closeOnEscape, false);\n };\n }\n }, [active, onRequestClose]);\n var style = React.useMemo(function () {\n return [styles.modal, transparent ? styles.modalTransparent : styles.modalOpaque];\n }, [transparent]);\n return /*#__PURE__*/React.createElement(View, {\n accessibilityRole: active ? 'dialog' : null,\n \"aria-modal\": true,\n ref: forwardedRef,\n style: style\n }, /*#__PURE__*/React.createElement(View, {\n style: styles.container\n }, children));\n});\nvar styles = StyleSheet.create({\n modal: {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n modalTransparent: {\n backgroundColor: 'transparent'\n },\n modalOpaque: {\n backgroundColor: 'white'\n },\n container: {\n top: 0,\n flex: 1\n }\n});\nexport default ModalContent;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport View from '../View';\nimport createElement from '../createElement';\nimport StyleSheet from '../StyleSheet';\nimport UIManager from '../UIManager';\n/**\n * This Component is used to \"wrap\" the modal we're opening\n * so that changing focus via tab will never leave the document.\n *\n * This allows us to properly trap the focus within a modal\n * even if the modal is at the start or end of a document.\n */\n\nvar FocusBracket = function FocusBracket() {\n return createElement('div', {\n accessibilityRole: 'none',\n tabIndex: 0,\n style: styles.focusBracket\n });\n};\n\nfunction attemptFocus(element) {\n if (!canUseDOM) {\n return false;\n }\n\n try {\n element.focus();\n } catch (e) {// Do nothing\n }\n\n return document.activeElement === element;\n}\n\nfunction focusFirstDescendant(element) {\n for (var i = 0; i < element.childNodes.length; i++) {\n var child = element.childNodes[i];\n\n if (attemptFocus(child) || focusFirstDescendant(child)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction focusLastDescendant(element) {\n for (var i = element.childNodes.length - 1; i >= 0; i--) {\n var child = element.childNodes[i];\n\n if (attemptFocus(child) || focusLastDescendant(child)) {\n return true;\n }\n }\n\n return false;\n}\n\nvar ModalFocusTrap = function ModalFocusTrap(_ref) {\n var active = _ref.active,\n children = _ref.children;\n var trapElementRef = React.useRef();\n var focusRef = React.useRef({\n trapFocusInProgress: false,\n lastFocusedElement: null\n });\n React.useEffect(function () {\n if (canUseDOM) {\n var trapFocus = function trapFocus() {\n // We should not trap focus if:\n // - The modal hasn't fully initialized with an HTMLElement ref\n // - Focus is already in the process of being trapped (e.g., we're refocusing)\n // - isTrapActive prop being falsey tells us to do nothing\n if (trapElementRef.current == null || focusRef.current.trapFocusInProgress || !active) {\n return;\n }\n\n try {\n focusRef.current.trapFocusInProgress = true;\n\n if (document.activeElement instanceof Node && !trapElementRef.current.contains(document.activeElement)) {\n // To handle keyboard focusing we can make an assumption here.\n // If you're tabbing through the focusable elements, the previously\n // active element will either be the first or the last.\n // If the previously selected element is the \"first\" descendant\n // and we're leaving it - this means that we should be looping\n // around to the other side of the modal.\n var hasFocused = focusFirstDescendant(trapElementRef.current);\n\n if (focusRef.current.lastFocusedElement === document.activeElement) {\n hasFocused = focusLastDescendant(trapElementRef.current);\n } // If we couldn't focus a new element then we need to focus onto the trap target\n\n\n if (!hasFocused && trapElementRef.current != null && document.activeElement) {\n UIManager.focus(trapElementRef.current);\n }\n }\n } finally {\n focusRef.current.trapFocusInProgress = false;\n }\n\n focusRef.current.lastFocusedElement = document.activeElement;\n }; // Call the trapFocus callback at least once when this modal has been activated.\n\n\n trapFocus();\n document.addEventListener('focus', trapFocus, true);\n return function () {\n return document.removeEventListener('focus', trapFocus, true);\n };\n }\n }, [active]); // To be fully compliant with WCAG we need to refocus element that triggered opening modal\n // after closing it\n\n React.useEffect(function () {\n if (canUseDOM) {\n var lastFocusedElementOutsideTrap = document.activeElement;\n return function () {\n if (lastFocusedElementOutsideTrap && document.contains(lastFocusedElementOutsideTrap)) {\n UIManager.focus(lastFocusedElementOutsideTrap);\n }\n };\n }\n }, []);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FocusBracket, null), /*#__PURE__*/React.createElement(View, {\n ref: trapElementRef\n }, children), /*#__PURE__*/React.createElement(FocusBracket, null));\n};\n\nexport default ModalFocusTrap;\nvar styles = StyleSheet.create({\n focusBracket: {\n outlineStyle: 'none'\n }\n});","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport ModalPortal from './ModalPortal';\nimport ModalAnimation from './ModalAnimation';\nimport ModalContent from './ModalContent';\nimport ModalFocusTrap from './ModalFocusTrap';\nvar uniqueModalIdentifier = 0;\nvar activeModalStack = [];\nvar activeModalListeners = {};\n\nfunction notifyActiveModalListeners() {\n if (activeModalStack.length === 0) {\n return;\n }\n\n var activeModalId = activeModalStack[activeModalStack.length - 1];\n activeModalStack.forEach(function (modalId) {\n if (modalId in activeModalListeners) {\n activeModalListeners[modalId](modalId === activeModalId);\n }\n });\n}\n\nfunction removeActiveModal(modalId) {\n if (modalId in activeModalListeners) {\n // Before removing this listener we should probably tell it\n // that it's no longer the active modal for sure.\n activeModalListeners[modalId](false);\n delete activeModalListeners[modalId];\n }\n\n var index = activeModalStack.indexOf(modalId);\n\n if (index !== -1) {\n activeModalStack.splice(index, 1);\n notifyActiveModalListeners();\n }\n}\n\nfunction addActiveModal(modalId, listener) {\n removeActiveModal(modalId);\n activeModalStack.push(modalId);\n activeModalListeners[modalId] = listener;\n notifyActiveModalListeners();\n}\n\nvar Modal = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var animationType = props.animationType,\n children = props.children,\n onDismiss = props.onDismiss,\n onRequestClose = props.onRequestClose,\n onShow = props.onShow,\n transparent = props.transparent,\n _props$visible = props.visible,\n visible = _props$visible === void 0 ? true : _props$visible; // Set a unique model identifier so we can correctly route\n // dismissals and check the layering of modals.\n\n var modalId = React.useMemo(function () {\n return uniqueModalIdentifier++;\n }, []);\n\n var _React$useState = React.useState(false),\n isActive = _React$useState[0],\n setIsActive = _React$useState[1];\n\n var onDismissCallback = React.useCallback(function () {\n removeActiveModal(modalId);\n\n if (onDismiss) {\n onDismiss();\n }\n }, [modalId, onDismiss]);\n var onShowCallback = React.useCallback(function () {\n addActiveModal(modalId, setIsActive);\n\n if (onShow) {\n onShow();\n }\n }, [modalId, onShow]);\n React.useEffect(function () {\n return function () {\n return removeActiveModal(modalId);\n };\n }, [modalId]);\n return /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(ModalAnimation, {\n animationType: animationType,\n onDismiss: onDismissCallback,\n onShow: onShowCallback,\n visible: visible\n }, /*#__PURE__*/React.createElement(ModalFocusTrap, {\n active: isActive\n }, /*#__PURE__*/React.createElement(ModalContent, {\n active: isActive,\n onRequestClose: onRequestClose,\n ref: forwardedRef,\n transparent: transparent\n }, children))));\n});\nexport default Modal;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport PickerItem from './PickerItem';\nimport StyleSheet from '../StyleSheet';\nvar Picker = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var children = props.children,\n enabled = props.enabled,\n onValueChange = props.onValueChange,\n selectedValue = props.selectedValue,\n style = props.style,\n testID = props.testID,\n itemStyle = props.itemStyle,\n mode = props.mode,\n prompt = props.prompt,\n other = _objectWithoutPropertiesLoose(props, [\"children\", \"enabled\", \"onValueChange\", \"selectedValue\", \"style\", \"testID\", \"itemStyle\", \"mode\", \"prompt\"]);\n\n var hostRef = React.useRef(null);\n\n function handleChange(e) {\n var _e$target = e.target,\n selectedIndex = _e$target.selectedIndex,\n value = _e$target.value;\n\n if (onValueChange) {\n onValueChange(value, selectedIndex);\n }\n } // $FlowFixMe\n\n\n var supportedProps = _objectSpread({\n children: children,\n disabled: enabled === false ? true : undefined,\n onChange: handleChange,\n style: [styles.initial, style],\n testID: testID,\n value: selectedValue\n }, other);\n\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n supportedProps.ref = setRef;\n return createElement('select', supportedProps);\n}); // $FlowFixMe\n\nPicker.Item = PickerItem;\nvar styles = StyleSheet.create({\n initial: {\n fontFamily: 'System',\n fontSize: 'inherit',\n margin: 0\n }\n});\nexport default Picker;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createElement from '../createElement';\nexport default function PickerItem(props) {\n var color = props.color,\n label = props.label,\n testID = props.testID,\n value = props.value;\n var style = {\n color: color\n };\n return createElement('option', {\n style: style,\n testID: testID,\n value: value\n }, label);\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n'use strict';\n\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nvar emptyFunction = function emptyFunction() {};\n\nfunction supportsPassiveEvents() {\n var supported = false; // Check if browser supports event with passive listeners\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\n if (canUseDOM) {\n try {\n var options = {};\n Object.defineProperty(options, 'passive', {\n get: function get() {\n supported = true;\n return false;\n }\n });\n window.addEventListener('test', null, options);\n window.removeEventListener('test', null, options);\n } catch (e) {}\n }\n\n return supported;\n}\n\nvar canUsePassiveEvents = supportsPassiveEvents();\n\nfunction getOptions(options) {\n if (options == null) {\n return false;\n }\n\n return canUsePassiveEvents ? options : Boolean(options.capture);\n}\n/**\n * Shim generic API compatibility with ReactDOM's synthetic events, without needing the\n * large amount of code ReactDOM uses to do this. Ideally we wouldn't use a synthetic\n * event wrapper at all.\n */\n\n\nfunction isPropagationStopped() {\n return this.cancelBubble;\n}\n\nfunction isDefaultPrevented() {\n return this.defaultPrevented;\n}\n\nfunction normalizeEvent(event) {\n event.nativeEvent = event;\n event.persist = emptyFunction;\n event.isDefaultPrevented = isDefaultPrevented;\n event.isPropagationStopped = isPropagationStopped;\n return event;\n}\n/**\n *\n */\n\n\nexport default function createEventHandle(type, options) {\n var opts = getOptions(options);\n return function (target, listener) {\n if (target == null || typeof target.addEventListener !== 'function') {\n throw new Error('createEventHandle: called on an invalid target.');\n }\n\n var element = target;\n\n if (listener != null) {\n var compatListener = function compatListener(e) {\n return listener(normalizeEvent(e));\n };\n\n element.addEventListener(type, compatListener, opts);\n return function removeListener() {\n if (element != null) {\n element.removeEventListener(type, compatListener, opts);\n }\n };\n } else {\n return emptyFunction;\n }\n };\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport createEventHandle from '../createEventHandle';\n\nvar supportsPointerEvent = function supportsPointerEvent() {\n return !!(typeof window !== 'undefined' && window.PointerEvent != null);\n};\n\nvar activeModality = 'keyboard';\nvar modality = 'keyboard';\nvar previousModality;\nvar previousActiveModality;\nvar isEmulatingMouseEvents = false;\nvar listeners = new Set();\nvar KEYBOARD = 'keyboard';\nvar MOUSE = 'mouse';\nvar TOUCH = 'touch';\nvar BLUR = 'blur';\nvar CONTEXTMENU = 'contextmenu';\nvar FOCUS = 'focus';\nvar KEYDOWN = 'keydown';\nvar MOUSEDOWN = 'mousedown';\nvar MOUSEMOVE = 'mousemove';\nvar MOUSEUP = 'mouseup';\nvar POINTERDOWN = 'pointerdown';\nvar POINTERMOVE = 'pointermove';\nvar SCROLL = 'scroll';\nvar SELECTIONCHANGE = 'selectionchange';\nvar TOUCHCANCEL = 'touchcancel';\nvar TOUCHMOVE = 'touchmove';\nvar TOUCHSTART = 'touchstart';\nvar VISIBILITYCHANGE = 'visibilitychange';\nvar bubbleOptions = {\n passive: true\n};\nvar captureOptions = {\n capture: true,\n passive: true\n}; // Window events\n\nvar addBlurListener = createEventHandle(BLUR, bubbleOptions);\nvar addFocusListener = createEventHandle(FOCUS, bubbleOptions); // Must be capture phase because 'stopPropagation' might prevent these\n// events bubbling to the document.\n\nvar addVisibilityChangeListener = createEventHandle(VISIBILITYCHANGE, captureOptions);\nvar addKeyDownListener = createEventHandle(KEYDOWN, captureOptions);\nvar addPointerDownListener = createEventHandle(POINTERDOWN, captureOptions);\nvar addPointerMoveListener = createEventHandle(POINTERMOVE, captureOptions); // Fallback events\n\nvar addContextMenuListener = createEventHandle(CONTEXTMENU, captureOptions);\nvar addMouseDownListener = createEventHandle(MOUSEDOWN, captureOptions);\nvar addMouseMoveListener = createEventHandle(MOUSEMOVE, captureOptions);\nvar addMouseUpListener = createEventHandle(MOUSEUP, captureOptions);\nvar addScrollListener = createEventHandle(SCROLL, captureOptions);\nvar addSelectiomChangeListener = createEventHandle(SELECTIONCHANGE, captureOptions);\nvar addTouchCancelListener = createEventHandle(TOUCHCANCEL, captureOptions);\nvar addTouchMoveListener = createEventHandle(TOUCHMOVE, captureOptions);\nvar addTouchStartListener = createEventHandle(TOUCHSTART, captureOptions);\n\nfunction restoreModality() {\n if (previousModality != null || previousActiveModality != null) {\n if (previousModality != null) {\n modality = previousModality;\n previousModality = null;\n }\n\n if (previousActiveModality != null) {\n activeModality = previousActiveModality;\n previousActiveModality = null;\n }\n\n callListeners();\n }\n}\n\nfunction onBlurWindow() {\n previousModality = modality;\n previousActiveModality = activeModality;\n activeModality = KEYBOARD;\n modality = KEYBOARD;\n callListeners(); // for fallback events\n\n isEmulatingMouseEvents = false;\n}\n\nfunction onFocusWindow() {\n restoreModality();\n}\n\nfunction onKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n\n if (modality !== KEYBOARD) {\n modality = KEYBOARD;\n activeModality = KEYBOARD;\n callListeners();\n }\n}\n\nfunction onVisibilityChange() {\n if (document.visibilityState !== 'hidden') {\n restoreModality();\n }\n}\n\nfunction onPointerish(event) {\n var eventType = event.type;\n\n if (supportsPointerEvent()) {\n if (eventType === POINTERDOWN) {\n if (activeModality !== event.pointerType) {\n modality = event.pointerType;\n activeModality = event.pointerType;\n callListeners();\n }\n\n return;\n }\n\n if (eventType === POINTERMOVE) {\n if (modality !== event.pointerType) {\n modality = event.pointerType;\n callListeners();\n }\n\n return;\n }\n } // Fallback for non-PointerEvent environment\n else {\n if (!isEmulatingMouseEvents) {\n if (eventType === MOUSEDOWN) {\n if (activeModality !== MOUSE) {\n modality = MOUSE;\n activeModality = MOUSE;\n callListeners();\n }\n }\n\n if (eventType === MOUSEMOVE) {\n if (modality !== MOUSE) {\n modality = MOUSE;\n callListeners();\n }\n }\n } // Flag when browser may produce emulated events\n\n\n if (eventType === TOUCHSTART) {\n isEmulatingMouseEvents = true;\n\n if (event.touches && event.touches.length > 1) {\n isEmulatingMouseEvents = false;\n }\n\n if (activeModality !== TOUCH) {\n modality = TOUCH;\n activeModality = TOUCH;\n callListeners();\n }\n\n return;\n } // Remove flag after emulated events are finished or cancelled, and if an\n // event occurs that cuts short a touch event sequence.\n\n\n if (eventType === CONTEXTMENU || eventType === MOUSEUP || eventType === SELECTIONCHANGE || eventType === SCROLL || eventType === TOUCHCANCEL || eventType === TOUCHMOVE) {\n isEmulatingMouseEvents = false;\n }\n }\n}\n\nif (canUseDOM) {\n addBlurListener(window, onBlurWindow);\n addFocusListener(window, onFocusWindow);\n addKeyDownListener(document, onKeyDown);\n addPointerDownListener(document, onPointerish);\n addPointerMoveListener(document, onPointerish);\n addVisibilityChangeListener(document, onVisibilityChange); // fallbacks\n\n addContextMenuListener(document, onPointerish);\n addMouseDownListener(document, onPointerish);\n addMouseMoveListener(document, onPointerish);\n addMouseUpListener(document, onPointerish);\n addTouchCancelListener(document, onPointerish);\n addTouchMoveListener(document, onPointerish);\n addTouchStartListener(document, onPointerish);\n addSelectiomChangeListener(document, onPointerish);\n addScrollListener(document, onPointerish);\n}\n\nfunction callListeners() {\n var value = {\n activeModality: activeModality,\n modality: modality\n };\n listeners.forEach(function (listener) {\n listener(value);\n });\n}\n\nexport function getActiveModality() {\n return activeModality;\n}\nexport function getModality() {\n return modality;\n}\nexport function addModalityListener(listener) {\n listeners.add(listener);\n return function () {\n listeners.delete(listener);\n };\n}\nexport function testOnly_resetActiveModality() {\n isEmulatingMouseEvents = false;\n activeModality = KEYBOARD;\n modality = KEYBOARD;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createEventHandle from '../createEventHandle';\nimport useLayoutEffect from '../useLayoutEffect';\nimport useStable from '../useStable';\n\n/**\n * This can be used with any event type include custom events.\n *\n * const click = useEvent('click', options);\n * useEffect(() => {\n * click.setListener(target, onClick);\n * return () => click.clear();\n * }).\n */\nexport default function useEvent(event, options) {\n var targetListeners = useStable(function () {\n return new Map();\n });\n var addListener = useStable(function () {\n var addEventListener = createEventHandle(event, options);\n return function (target, callback) {\n var removeTargetListener = targetListeners.get(target);\n\n if (removeTargetListener != null) {\n removeTargetListener();\n }\n\n if (callback == null) {\n targetListeners.delete(target);\n }\n\n var removeEventListener = addEventListener(target, callback);\n targetListeners.set(target, removeEventListener);\n return removeEventListener;\n };\n });\n useLayoutEffect(function () {\n return function () {\n targetListeners.forEach(function (removeListener) {\n removeListener();\n });\n targetListeners.clear();\n };\n }, []);\n return addListener;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { getModality } from '../modality';\nimport useEvent from '../useEvent';\nimport useLayoutEffect from '../useLayoutEffect';\n/**\n * Types\n */\n\n/**\n * Implementation\n */\nvar emptyObject = {};\nvar opts = {\n passive: true\n};\nvar lockEventType = 'react-gui:hover:lock';\nvar unlockEventType = 'react-gui:hover:unlock';\n\nvar supportsPointerEvent = function supportsPointerEvent() {\n return !!(typeof window !== 'undefined' && window.PointerEvent != null);\n};\n\nfunction dispatchCustomEvent(target, type, payload) {\n var event = document.createEvent('CustomEvent');\n\n var _ref = payload || emptyObject,\n _ref$bubbles = _ref.bubbles,\n bubbles = _ref$bubbles === void 0 ? true : _ref$bubbles,\n _ref$cancelable = _ref.cancelable,\n cancelable = _ref$cancelable === void 0 ? true : _ref$cancelable,\n detail = _ref.detail;\n\n event.initCustomEvent(type, bubbles, cancelable, detail);\n target.dispatchEvent(event);\n} // This accounts for the non-PointerEvent fallback events.\n\n\nfunction getPointerType(event) {\n var pointerType = event.pointerType;\n return pointerType != null ? pointerType : getModality();\n}\n\nexport default function useHover(targetRef, config) {\n var contain = config.contain,\n disabled = config.disabled,\n onHoverStart = config.onHoverStart,\n onHoverChange = config.onHoverChange,\n onHoverUpdate = config.onHoverUpdate,\n onHoverEnd = config.onHoverEnd;\n var canUsePE = supportsPointerEvent();\n var addMoveListener = useEvent(canUsePE ? 'pointermove' : 'mousemove', opts);\n var addEnterListener = useEvent(canUsePE ? 'pointerenter' : 'mouseenter', opts);\n var addLeaveListener = useEvent(canUsePE ? 'pointerleave' : 'mouseleave', opts); // These custom events are used to implement the \"contain\" prop.\n\n var addLockListener = useEvent(lockEventType, opts);\n var addUnlockListener = useEvent(unlockEventType, opts);\n useLayoutEffect(function () {\n var target = targetRef.current;\n\n if (target !== null) {\n /**\n * End the hover gesture\n */\n var hoverEnd = function hoverEnd(e) {\n if (onHoverEnd != null) {\n onHoverEnd(e);\n }\n\n if (onHoverChange != null) {\n onHoverChange(false);\n } // Remove the listeners once finished.\n\n\n addMoveListener(target, null);\n addLeaveListener(target, null);\n };\n /**\n * Leave element\n */\n\n\n var leaveListener = function leaveListener(e) {\n var target = targetRef.current;\n\n if (target != null && getPointerType(e) !== 'touch') {\n if (contain) {\n dispatchCustomEvent(target, unlockEventType);\n }\n\n hoverEnd(e);\n }\n };\n /**\n * Move within element\n */\n\n\n var moveListener = function moveListener(e) {\n if (getPointerType(e) !== 'touch') {\n if (onHoverUpdate != null) {\n // Not all browsers have these properties\n if (e.x == null) {\n e.x = e.clientX;\n }\n\n if (e.y == null) {\n e.y = e.clientY;\n }\n\n onHoverUpdate(e);\n }\n }\n };\n /**\n * Start the hover gesture\n */\n\n\n var hoverStart = function hoverStart(e) {\n if (onHoverStart != null) {\n onHoverStart(e);\n }\n\n if (onHoverChange != null) {\n onHoverChange(true);\n } // Set the listeners needed for the rest of the hover gesture.\n\n\n if (onHoverUpdate != null) {\n addMoveListener(target, !disabled ? moveListener : null);\n }\n\n addLeaveListener(target, !disabled ? leaveListener : null);\n };\n /**\n * Enter element\n */\n\n\n var enterListener = function enterListener(e) {\n var target = targetRef.current;\n\n if (target != null && getPointerType(e) !== 'touch') {\n if (contain) {\n dispatchCustomEvent(target, lockEventType);\n }\n\n hoverStart(e);\n\n var lockListener = function lockListener(lockEvent) {\n if (lockEvent.target !== target) {\n hoverEnd(e);\n }\n };\n\n var unlockListener = function unlockListener(lockEvent) {\n if (lockEvent.target !== target) {\n hoverStart(e);\n }\n };\n\n addLockListener(target, !disabled ? lockListener : null);\n addUnlockListener(target, !disabled ? unlockListener : null);\n }\n };\n\n addEnterListener(target, !disabled ? enterListener : null);\n }\n }, [addEnterListener, addMoveListener, addLeaveListener, addLockListener, addUnlockListener, contain, disabled, onHoverStart, onHoverChange, onHoverUpdate, onHoverEnd, targetRef]);\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from 'react';\nimport { forwardRef, memo, useMemo, useState, useRef } from 'react';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport useHover from '../../modules/useHover';\nimport usePressEvents from '../../modules/usePressEvents';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n\n/**\n * Component used to build display components that should respond to whether the\n * component is currently pressed or not.\n */\nfunction Pressable(props, forwardedRef) {\n var children = props.children,\n delayLongPress = props.delayLongPress,\n delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n disabled = props.disabled,\n focusable = props.focusable,\n onBlur = props.onBlur,\n onContextMenu = props.onContextMenu,\n onFocus = props.onFocus,\n onHoverIn = props.onHoverIn,\n onHoverOut = props.onHoverOut,\n onKeyDown = props.onKeyDown,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressMove = props.onPressMove,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n style = props.style,\n testOnly_hovered = props.testOnly_hovered,\n testOnly_pressed = props.testOnly_pressed,\n rest = _objectWithoutPropertiesLoose(props, [\"children\", \"delayLongPress\", \"delayPressIn\", \"delayPressOut\", \"disabled\", \"focusable\", \"onBlur\", \"onContextMenu\", \"onFocus\", \"onHoverIn\", \"onHoverOut\", \"onKeyDown\", \"onLongPress\", \"onPress\", \"onPressMove\", \"onPressIn\", \"onPressOut\", \"style\", \"testOnly_hovered\", \"testOnly_pressed\"]);\n\n var _useForceableState = useForceableState(testOnly_hovered === true),\n hovered = _useForceableState[0],\n setHovered = _useForceableState[1];\n\n var _useForceableState2 = useForceableState(false),\n focused = _useForceableState2[0],\n setFocused = _useForceableState2[1];\n\n var _useForceableState3 = useForceableState(testOnly_pressed === true),\n pressed = _useForceableState3[0],\n setPressed = _useForceableState3[1];\n\n var hostRef = useRef(null);\n var setRef = useMergeRefs(forwardedRef, hostRef);\n var pressConfig = useMemo(function () {\n return {\n delayLongPress: delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n disabled: disabled,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressChange: setPressed,\n onPressStart: onPressIn,\n onPressMove: onPressMove,\n onPressEnd: onPressOut\n };\n }, [delayLongPress, delayPressIn, delayPressOut, disabled, onLongPress, onPress, onPressIn, onPressMove, onPressOut, setPressed]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n var onContextMenuPress = pressEventHandlers.onContextMenu,\n onKeyDownPress = pressEventHandlers.onKeyDown;\n useHover(hostRef, {\n contain: true,\n disabled: disabled,\n onHoverChange: setHovered,\n onHoverStart: onHoverIn,\n onHoverEnd: onHoverOut\n });\n var interactionState = {\n hovered: hovered,\n focused: focused,\n pressed: pressed\n };\n var blurHandler = React.useCallback(function (e) {\n if (e.nativeEvent.target === hostRef.current) {\n setFocused(false);\n\n if (onBlur != null) {\n onBlur(e);\n }\n }\n }, [hostRef, setFocused, onBlur]);\n var focusHandler = React.useCallback(function (e) {\n if (e.nativeEvent.target === hostRef.current) {\n setFocused(true);\n\n if (onFocus != null) {\n onFocus(e);\n }\n }\n }, [hostRef, setFocused, onFocus]);\n var contextMenuHandler = React.useCallback(function (e) {\n if (onContextMenuPress != null) {\n onContextMenuPress(e);\n }\n\n if (onContextMenu != null) {\n onContextMenu(e);\n }\n }, [onContextMenu, onContextMenuPress]);\n var keyDownHandler = React.useCallback(function (e) {\n if (onKeyDownPress != null) {\n onKeyDownPress(e);\n }\n\n if (onKeyDown != null) {\n onKeyDown(e);\n }\n }, [onKeyDown, onKeyDownPress]);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, pressEventHandlers, {\n accessibilityDisabled: disabled,\n focusable: !disabled && focusable !== false,\n onBlur: blurHandler,\n onContextMenu: contextMenuHandler,\n onFocus: focusHandler,\n onKeyDown: keyDownHandler,\n ref: setRef,\n style: [!disabled && styles.root, typeof style === 'function' ? style(interactionState) : style]\n }), typeof children === 'function' ? children(interactionState) : children);\n}\n\nfunction useForceableState(forced) {\n var _useState = useState(false),\n bool = _useState[0],\n setBool = _useState[1];\n\n return [bool || forced, setBool];\n}\n\nvar styles = StyleSheet.create({\n root: {\n cursor: 'pointer',\n touchAction: 'manipulation'\n }\n});\nvar MemoedPressable = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(Pressable));\nMemoedPressable.displayName = 'Pressable';\nexport default MemoedPressable;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar ProgressBar = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _props$color = props.color,\n color = _props$color === void 0 ? '#1976D2' : _props$color,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$progress = props.progress,\n progress = _props$progress === void 0 ? 0 : _props$progress,\n _props$trackColor = props.trackColor,\n trackColor = _props$trackColor === void 0 ? 'transparent' : _props$trackColor,\n style = props.style,\n other = _objectWithoutPropertiesLoose(props, [\"color\", \"indeterminate\", \"progress\", \"trackColor\", \"style\"]);\n\n var percentageProgress = progress * 100;\n var progressRef = React.useRef(null);\n React.useEffect(function () {\n var width = indeterminate ? '25%' : percentageProgress + \"%\";\n\n if (progressRef.current != null) {\n progressRef.current.setNativeProps({\n style: {\n width: width\n }\n });\n }\n }, [indeterminate, percentageProgress, progressRef]);\n return /*#__PURE__*/React.createElement(View, _extends({}, other, {\n accessibilityRole: \"progressbar\",\n accessibilityValue: {\n max: 100,\n min: 0,\n now: indeterminate ? null : percentageProgress\n },\n ref: ref,\n style: [styles.track, style, {\n backgroundColor: trackColor\n }]\n }), /*#__PURE__*/React.createElement(View, {\n ref: progressRef,\n style: [styles.progress, indeterminate && styles.animation, {\n backgroundColor: color\n }]\n }));\n});\nProgressBar.displayName = 'ProgressBar';\nvar styles = StyleSheet.create({\n track: {\n height: 5,\n overflow: 'hidden',\n userSelect: 'none',\n zIndex: 0\n },\n progress: {\n height: '100%',\n zIndex: -1\n },\n animation: {\n animationDuration: '1s',\n animationKeyframes: [{\n '0%': {\n transform: [{\n translateX: '-100%'\n }]\n },\n '100%': {\n transform: [{\n translateX: '400%'\n }]\n }\n }],\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite'\n }\n});\nexport default ProgressBar;","/* eslint-disable */\n\n/**\n * Copyright 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * From React 16.0.0\n */\nimport invariant from 'fbjs/lib/invariant';\n\nvar twoArgumentPooler = function twoArgumentPooler(a1, a2) {\n var Klass = this;\n\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\n\nvar standardReleaser = function standardReleaser(instance) {\n var Klass = this;\n instance.destructor();\n\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\n\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = twoArgumentPooler;\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\n\nvar addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\n\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n twoArgumentPooler: twoArgumentPooler\n};\nexport default PooledClass;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport PooledClass from '../../vendor/react-native/PooledClass';\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\n/**\n * PooledClass representing the bounding rectangle of a region.\n */\n\nfunction BoundingDimensions(width, height) {\n this.width = width;\n this.height = height;\n}\n\nBoundingDimensions.prototype.destructor = function () {\n this.width = null;\n this.height = null;\n};\n\nBoundingDimensions.getPooledFromElement = function (element) {\n return BoundingDimensions.getPooled(element.offsetWidth, element.offsetHeight);\n};\n\nPooledClass.addPoolingTo(BoundingDimensions, twoArgumentPooler);\nexport default BoundingDimensions;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport PooledClass from '../../vendor/react-native/PooledClass';\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\n\nfunction Position(left, top) {\n this.left = left;\n this.top = top;\n}\n\nPosition.prototype.destructor = function () {\n this.left = null;\n this.top = null;\n};\n\nPooledClass.addPoolingTo(Position, twoArgumentPooler);\nexport default Position;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport AccessibilityUtil from '../../modules/AccessibilityUtil';\nimport BoundingDimensions from './BoundingDimensions';\nimport findNodeHandle from '../findNodeHandle';\nimport normalizeColor from 'normalize-css-color';\nimport Position from './Position';\nimport React from 'react';\nimport UIManager from '../UIManager';\nimport View from '../View';\n\nvar extractSingleTouch = function extractSingleTouch(nativeEvent) {\n var touches = nativeEvent.touches;\n var changedTouches = nativeEvent.changedTouches;\n var hasTouches = touches && touches.length > 0;\n var hasChangedTouches = changedTouches && changedTouches.length > 0;\n return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent;\n};\n/**\n * `Touchable`: Taps done right.\n *\n * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable`\n * will measure time/geometry and tells you when to give feedback to the user.\n *\n * ====================== Touchable Tutorial ===============================\n * The `Touchable` mixin helps you handle the \"press\" interaction. It analyzes\n * the geometry of elements, and observes when another responder (scroll view\n * etc) has stolen the touch lock. It notifies your component when it should\n * give feedback to the user. (bouncing/highlighting/unhighlighting).\n *\n * - When a touch was activated (typically you highlight)\n * - When a touch was deactivated (typically you unhighlight)\n * - When a touch was \"pressed\" - a touch ended while still within the geometry\n * of the element, and no other element (like scroller) has \"stolen\" touch\n * lock (\"responder\") (Typically you bounce the element).\n *\n * A good tap interaction isn't as simple as you might think. There should be a\n * slight delay before showing a highlight when starting a touch. If a\n * subsequent touch move exceeds the boundary of the element, it should\n * unhighlight, but if that same touch is brought back within the boundary, it\n * should rehighlight again. A touch can move in and out of that boundary\n * several times, each time toggling highlighting, but a \"press\" is only\n * triggered if that touch ends while within the element's boundary and no\n * scroller (or anything else) has stolen the lock on touches.\n *\n * To create a new type of component that handles interaction using the\n * `Touchable` mixin, do the following:\n *\n * - Initialize the `Touchable` state.\n *\n * getInitialState: function() {\n * return merge(this.touchableGetInitialState(), yourComponentState);\n * }\n *\n * - Choose the rendered component who's touches should start the interactive\n * sequence. On that rendered node, forward all `Touchable` responder\n * handlers. You can choose any rendered node you like. Choose a node whose\n * hit target you'd like to instigate the interaction sequence:\n *\n * // In render function:\n * return (\n * <View\n * onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}\n * onResponderTerminationRequest={this.touchableHandleResponderTerminationRequest}\n * onResponderGrant={this.touchableHandleResponderGrant}\n * onResponderMove={this.touchableHandleResponderMove}\n * onResponderRelease={this.touchableHandleResponderRelease}\n * onResponderTerminate={this.touchableHandleResponderTerminate}>\n * <View>\n * Even though the hit detection/interactions are triggered by the\n * wrapping (typically larger) node, we usually end up implementing\n * custom logic that highlights this inner one.\n * </View>\n * </View>\n * );\n *\n * - You may set up your own handlers for each of these events, so long as you\n * also invoke the `touchable*` handlers inside of your custom handler.\n *\n * - Implement the handlers on your component class in order to provide\n * feedback to the user. See documentation for each of these class methods\n * that you should implement.\n *\n * touchableHandlePress: function() {\n * this.performBounceAnimation(); // or whatever you want to do.\n * },\n * touchableHandleActivePressIn: function() {\n * this.beginHighlighting(...); // Whatever you like to convey activation\n * },\n * touchableHandleActivePressOut: function() {\n * this.endHighlighting(...); // Whatever you like to convey deactivation\n * },\n *\n * - There are more advanced methods you can implement (see documentation below):\n * touchableGetHighlightDelayMS: function() {\n * return 20;\n * }\n * // In practice, *always* use a predeclared constant (conserve memory).\n * touchableGetPressRectOffset: function() {\n * return {top: 20, left: 20, right: 20, bottom: 100};\n * }\n */\n\n/**\n * Touchable states.\n */\n\n\nvar States = {\n NOT_RESPONDER: 'NOT_RESPONDER',\n // Not the responder\n RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN',\n // Responder, inactive, in the `PressRect`\n RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT',\n // Responder, inactive, out of `PressRect`\n RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN',\n // Responder, active, in the `PressRect`\n RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT',\n // Responder, active, out of `PressRect`\n RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN',\n // Responder, active, in the `PressRect`, after long press threshold\n RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT',\n // Responder, active, out of `PressRect`, after long press threshold\n ERROR: 'ERROR'\n};\n\n/*\n * Quick lookup map for states that are considered to be \"active\"\n */\nvar baseStatesConditions = {\n NOT_RESPONDER: false,\n RESPONDER_INACTIVE_PRESS_IN: false,\n RESPONDER_INACTIVE_PRESS_OUT: false,\n RESPONDER_ACTIVE_PRESS_IN: false,\n RESPONDER_ACTIVE_PRESS_OUT: false,\n RESPONDER_ACTIVE_LONG_PRESS_IN: false,\n RESPONDER_ACTIVE_LONG_PRESS_OUT: false,\n ERROR: false\n};\n\nvar IsActive = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_ACTIVE_PRESS_OUT: true,\n RESPONDER_ACTIVE_PRESS_IN: true\n});\n/**\n * Quick lookup for states that are considered to be \"pressing\" and are\n * therefore eligible to result in a \"selection\" if the press stops.\n */\n\n\nvar IsPressingIn = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_INACTIVE_PRESS_IN: true,\n RESPONDER_ACTIVE_PRESS_IN: true,\n RESPONDER_ACTIVE_LONG_PRESS_IN: true\n});\n\nvar IsLongPressingIn = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_ACTIVE_LONG_PRESS_IN: true\n});\n/**\n * Inputs to the state machine.\n */\n\n\nvar Signals = {\n DELAY: 'DELAY',\n RESPONDER_GRANT: 'RESPONDER_GRANT',\n RESPONDER_RELEASE: 'RESPONDER_RELEASE',\n RESPONDER_TERMINATED: 'RESPONDER_TERMINATED',\n ENTER_PRESS_RECT: 'ENTER_PRESS_RECT',\n LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT',\n LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED'\n};\n\n/**\n * Mapping from States x Signals => States\n */\nvar Transitions = {\n NOT_RESPONDER: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,\n RESPONDER_RELEASE: States.ERROR,\n RESPONDER_TERMINATED: States.ERROR,\n ENTER_PRESS_RECT: States.ERROR,\n LEAVE_PRESS_RECT: States.ERROR,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_INACTIVE_PRESS_IN: {\n DELAY: States.RESPONDER_ACTIVE_PRESS_IN,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_INACTIVE_PRESS_OUT: {\n DELAY: States.RESPONDER_ACTIVE_PRESS_OUT,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_ACTIVE_PRESS_IN: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN\n },\n RESPONDER_ACTIVE_PRESS_OUT: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_ACTIVE_LONG_PRESS_IN: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,\n LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN\n },\n RESPONDER_ACTIVE_LONG_PRESS_OUT: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n error: {\n DELAY: States.NOT_RESPONDER,\n RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.NOT_RESPONDER,\n LEAVE_PRESS_RECT: States.NOT_RESPONDER,\n LONG_PRESS_DETECTED: States.NOT_RESPONDER\n }\n}; // ==== Typical Constants for integrating into UI components ====\n// var HIT_EXPAND_PX = 20;\n// var HIT_VERT_OFFSET_PX = 10;\n\nvar HIGHLIGHT_DELAY_MS = 130;\nvar PRESS_EXPAND_PX = 20;\nvar LONG_PRESS_THRESHOLD = 500;\nvar LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS;\nvar LONG_PRESS_ALLOWED_MOVEMENT = 10; // Default amount \"active\" region protrudes beyond box\n\n/**\n * By convention, methods prefixed with underscores are meant to be @private,\n * and not @protected. Mixers shouldn't access them - not even to provide them\n * as callback handlers.\n *\n *\n * ========== Geometry =========\n * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect`\n * is an abstract box that is extended beyond the `HitRect`.\n *\n * +--------------------------+\n * | | - \"Start\" events in `HitRect` cause `HitRect`\n * | +--------------------+ | to become the responder.\n * | | +--------------+ | | - `HitRect` is typically expanded around\n * | | | | | | the `VisualRect`, but shifted downward.\n * | | | VisualRect | | | - After pressing down, after some delay,\n * | | | | | | and before letting up, the Visual React\n * | | +--------------+ | | will become \"active\". This makes it eligible\n * | | HitRect | | for being highlighted (so long as the\n * | +--------------------+ | press remains in the `PressRect`).\n * | PressRect o |\n * +----------------------|---+\n * Out Region |\n * +-----+ This gap between the `HitRect` and\n * `PressRect` allows a touch to move far away\n * from the original hit rect, and remain\n * highlighted, and eligible for a \"Press\".\n * Customize this via\n * `touchableGetPressRectOffset()`.\n *\n *\n *\n * ======= State Machine =======\n *\n * +-------------+ <---+ RESPONDER_RELEASE\n * |NOT_RESPONDER|\n * +-------------+ <---+ RESPONDER_TERMINATED\n * +\n * | RESPONDER_GRANT (HitRect)\n * v\n * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+\n * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN|\n * +---------------------------+ +-------------------------+ +------------------------------+\n * + ^ + ^ + ^\n * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_\n * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT\n * | | | | | |\n * v + v + v +\n * +----------------------------+ DELAY +--------------------------+ +-------------------------------+\n * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT|\n * +----------------------------+ +--------------------------+ +-------------------------------+\n *\n * T + DELAY => LONG_PRESS_DELAY_MS + DELAY\n *\n * Not drawn are the side effects of each transition. The most important side\n * effect is the `touchableHandlePress` abstract method invocation that occurs\n * when a responder is released while in either of the \"Press\" states.\n *\n * The other important side effects are the highlight abstract method\n * invocations (internal callbacks) to be implemented by the mixer.\n *\n *\n * @lends Touchable.prototype\n */\n\nvar TouchableMixin = {\n // HACK (part 1): basic support for touchable interactions using a keyboard\n componentDidMount: function componentDidMount() {\n var _this = this;\n\n this._touchableNode = findNodeHandle(this);\n\n if (this._touchableNode && this._touchableNode.addEventListener) {\n this._touchableBlurListener = function (e) {\n if (_this._isTouchableKeyboardActive) {\n if (_this.state.touchable.touchState && _this.state.touchable.touchState !== States.NOT_RESPONDER) {\n _this.touchableHandleResponderTerminate({\n nativeEvent: e\n });\n }\n\n _this._isTouchableKeyboardActive = false;\n }\n };\n\n this._touchableNode.addEventListener('blur', this._touchableBlurListener);\n }\n },\n\n /**\n * Clear all timeouts on unmount\n */\n componentWillUnmount: function componentWillUnmount() {\n if (this._touchableNode && this._touchableNode.addEventListener) {\n this._touchableNode.removeEventListener('blur', this._touchableBlurListener);\n }\n\n this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);\n this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);\n this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); // Clear DOM nodes\n\n this.pressInLocation = null;\n this.state.touchable.responderID = null;\n this._touchableNode = null;\n },\n\n /**\n * It's prefer that mixins determine state in this way, having the class\n * explicitly mix the state in the one and only `getInitialState` method.\n *\n * @return {object} State object to be placed inside of\n * `this.state.touchable`.\n */\n touchableGetInitialState: function touchableGetInitialState() {\n return {\n touchable: {\n touchState: undefined,\n responderID: null\n }\n };\n },\n // ==== Hooks to Gesture Responder system ====\n\n /**\n * Must return true if embedded in a native platform scroll view.\n */\n touchableHandleResponderTerminationRequest: function touchableHandleResponderTerminationRequest() {\n return !this.props.rejectResponderTermination;\n },\n\n /**\n * Must return true to start the process of `Touchable`.\n */\n touchableHandleStartShouldSetResponder: function touchableHandleStartShouldSetResponder() {\n return !this.props.disabled;\n },\n\n /**\n * Return true to cancel press on long press.\n */\n touchableLongPressCancelsPress: function touchableLongPressCancelsPress() {\n return true;\n },\n\n /**\n * Place as callback for a DOM element's `onResponderGrant` event.\n * @param {SyntheticEvent} e Synthetic event from event system.\n *\n */\n touchableHandleResponderGrant: function touchableHandleResponderGrant(e) {\n var dispatchID = e.currentTarget; // Since e is used in a callback invoked on another event loop\n // (as in setTimeout etc), we need to call e.persist() on the\n // event to make sure it doesn't get reused in the event object pool.\n\n e.persist();\n this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);\n this.pressOutDelayTimeout = null;\n this.state.touchable.touchState = States.NOT_RESPONDER;\n this.state.touchable.responderID = dispatchID;\n\n this._receiveSignal(Signals.RESPONDER_GRANT, e);\n\n var delayMS = this.touchableGetHighlightDelayMS !== undefined ? Math.max(this.touchableGetHighlightDelayMS(), 0) : HIGHLIGHT_DELAY_MS;\n delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS;\n\n if (delayMS !== 0) {\n this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS);\n } else {\n this._handleDelay(e);\n }\n\n var longDelayMS = this.touchableGetLongPressDelayMS !== undefined ? Math.max(this.touchableGetLongPressDelayMS(), 10) : LONG_PRESS_DELAY_MS;\n longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS;\n this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), longDelayMS + delayMS);\n },\n\n /**\n * Place as callback for a DOM element's `onResponderRelease` event.\n */\n touchableHandleResponderRelease: function touchableHandleResponderRelease(e) {\n this.pressInLocation = null;\n\n this._receiveSignal(Signals.RESPONDER_RELEASE, e);\n },\n\n /**\n * Place as callback for a DOM element's `onResponderTerminate` event.\n */\n touchableHandleResponderTerminate: function touchableHandleResponderTerminate(e) {\n this.pressInLocation = null;\n\n this._receiveSignal(Signals.RESPONDER_TERMINATED, e);\n },\n\n /**\n * Place as callback for a DOM element's `onResponderMove` event.\n */\n touchableHandleResponderMove: function touchableHandleResponderMove(e) {\n // Measurement may not have returned yet.\n if (!this.state.touchable.positionOnActivate) {\n return;\n }\n\n var positionOnActivate = this.state.touchable.positionOnActivate;\n var dimensionsOnActivate = this.state.touchable.dimensionsOnActivate;\n var pressRectOffset = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : {\n left: PRESS_EXPAND_PX,\n right: PRESS_EXPAND_PX,\n top: PRESS_EXPAND_PX,\n bottom: PRESS_EXPAND_PX\n };\n var pressExpandLeft = pressRectOffset.left;\n var pressExpandTop = pressRectOffset.top;\n var pressExpandRight = pressRectOffset.right;\n var pressExpandBottom = pressRectOffset.bottom;\n var hitSlop = this.touchableGetHitSlop ? this.touchableGetHitSlop() : null;\n\n if (hitSlop) {\n pressExpandLeft += hitSlop.left || 0;\n pressExpandTop += hitSlop.top || 0;\n pressExpandRight += hitSlop.right || 0;\n pressExpandBottom += hitSlop.bottom || 0;\n }\n\n var touch = extractSingleTouch(e.nativeEvent);\n var pageX = touch && touch.pageX;\n var pageY = touch && touch.pageY;\n\n if (this.pressInLocation) {\n var movedDistance = this._getDistanceBetweenPoints(pageX, pageY, this.pressInLocation.pageX, this.pressInLocation.pageY);\n\n if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) {\n this._cancelLongPressDelayTimeout();\n }\n }\n\n var isTouchWithinActive = pageX > positionOnActivate.left - pressExpandLeft && pageY > positionOnActivate.top - pressExpandTop && pageX < positionOnActivate.left + dimensionsOnActivate.width + pressExpandRight && pageY < positionOnActivate.top + dimensionsOnActivate.height + pressExpandBottom;\n\n if (isTouchWithinActive) {\n var prevState = this.state.touchable.touchState;\n\n this._receiveSignal(Signals.ENTER_PRESS_RECT, e);\n\n var curState = this.state.touchable.touchState;\n\n if (curState === States.RESPONDER_INACTIVE_PRESS_IN && prevState !== States.RESPONDER_INACTIVE_PRESS_IN) {\n // fix for t7967420\n this._cancelLongPressDelayTimeout();\n }\n } else {\n this._cancelLongPressDelayTimeout();\n\n this._receiveSignal(Signals.LEAVE_PRESS_RECT, e);\n }\n },\n\n /**\n * Invoked when the item receives focus. Mixers might override this to\n * visually distinguish the `VisualRect` so that the user knows that it\n * currently has the focus. Most platforms only support a single element being\n * focused at a time, in which case there may have been a previously focused\n * element that was blurred just prior to this. This can be overridden when\n * using `Touchable.Mixin.withoutDefaultFocusAndBlur`.\n */\n touchableHandleFocus: function touchableHandleFocus(e) {\n this.props.onFocus && this.props.onFocus(e);\n },\n\n /**\n * Invoked when the item loses focus. Mixers might override this to\n * visually distinguish the `VisualRect` so that the user knows that it\n * no longer has focus. Most platforms only support a single element being\n * focused at a time, in which case the focus may have moved to another.\n * This can be overridden when using\n * `Touchable.Mixin.withoutDefaultFocusAndBlur`.\n */\n touchableHandleBlur: function touchableHandleBlur(e) {\n this.props.onBlur && this.props.onBlur(e);\n },\n // ==== Abstract Application Callbacks ====\n\n /**\n * Invoked when the item should be highlighted. Mixers should implement this\n * to visually distinguish the `VisualRect` so that the user knows that\n * releasing a touch will result in a \"selection\" (analog to click).\n *\n * @abstract\n * touchableHandleActivePressIn: function,\n */\n\n /**\n * Invoked when the item is \"active\" (in that it is still eligible to become\n * a \"select\") but the touch has left the `PressRect`. Usually the mixer will\n * want to unhighlight the `VisualRect`. If the user (while pressing) moves\n * back into the `PressRect` `touchableHandleActivePressIn` will be invoked\n * again and the mixer should probably highlight the `VisualRect` again. This\n * event will not fire on an `touchEnd/mouseUp` event, only move events while\n * the user is depressing the mouse/touch.\n *\n * @abstract\n * touchableHandleActivePressOut: function\n */\n\n /**\n * Invoked when the item is \"selected\" - meaning the interaction ended by\n * letting up while the item was either in the state\n * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`.\n *\n * @abstract\n * touchableHandlePress: function\n */\n\n /**\n * Invoked when the item is long pressed - meaning the interaction ended by\n * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If\n * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will\n * be called as it normally is. If `touchableHandleLongPress` is provided, by\n * default any `touchableHandlePress` callback will not be invoked. To\n * override this default behavior, override `touchableLongPressCancelsPress`\n * to return false. As a result, `touchableHandlePress` will be called when\n * lifting up, even if `touchableHandleLongPress` has also been called.\n *\n * @abstract\n * touchableHandleLongPress: function\n */\n\n /**\n * Returns the number of millis to wait before triggering a highlight.\n *\n * @abstract\n * touchableGetHighlightDelayMS: function\n */\n\n /**\n * Returns the amount to extend the `HitRect` into the `PressRect`. Positive\n * numbers mean the size expands outwards.\n *\n * @abstract\n * touchableGetPressRectOffset: function\n */\n // ==== Internal Logic ====\n\n /**\n * Measures the `HitRect` node on activation. The Bounding rectangle is with\n * respect to viewport - not page, so adding the `pageXOffset/pageYOffset`\n * should result in points that are in the same coordinate system as an\n * event's `globalX/globalY` data values.\n *\n * - Consider caching this for the lifetime of the component, or possibly\n * being able to share this cache between any `ScrollMap` view.\n *\n * @sideeffects\n * @private\n */\n _remeasureMetricsOnActivation: function _remeasureMetricsOnActivation() {\n var tag = this.state.touchable.responderID;\n\n if (tag == null) {\n return;\n }\n\n UIManager.measure(tag, this._handleQueryLayout);\n },\n _handleQueryLayout: function _handleQueryLayout(l, t, w, h, globalX, globalY) {\n //don't do anything UIManager failed to measure node\n if (!l && !t && !w && !h && !globalX && !globalY) {\n return;\n }\n\n this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate);\n this.state.touchable.dimensionsOnActivate && // $FlowFixMe\n BoundingDimensions.release(this.state.touchable.dimensionsOnActivate);\n this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY); // $FlowFixMe\n\n this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h);\n },\n _handleDelay: function _handleDelay(e) {\n this.touchableDelayTimeout = null;\n\n this._receiveSignal(Signals.DELAY, e);\n },\n _handleLongDelay: function _handleLongDelay(e) {\n this.longPressDelayTimeout = null;\n var curState = this.state.touchable.touchState;\n\n if (curState !== States.RESPONDER_ACTIVE_PRESS_IN && curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) {\n console.error('Attempted to transition from state `' + curState + '` to `' + States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' + 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.');\n } else {\n this._receiveSignal(Signals.LONG_PRESS_DETECTED, e);\n }\n },\n\n /**\n * Receives a state machine signal, performs side effects of the transition\n * and stores the new state. Validates the transition as well.\n *\n * @param {Signals} signal State machine signal.\n * @throws Error if invalid state transition or unrecognized signal.\n * @sideeffects\n */\n _receiveSignal: function _receiveSignal(signal, e) {\n var responderID = this.state.touchable.responderID;\n var curState = this.state.touchable.touchState;\n var nextState = Transitions[curState] && Transitions[curState][signal];\n\n if (!responderID && signal === Signals.RESPONDER_RELEASE) {\n return;\n }\n\n if (!nextState) {\n throw new Error('Unrecognized signal `' + signal + '` or state `' + curState + '` for Touchable responder `' + responderID + '`');\n }\n\n if (nextState === States.ERROR) {\n throw new Error('Touchable cannot transition from `' + curState + '` to `' + signal + '` for responder `' + responderID + '`');\n }\n\n if (curState !== nextState) {\n this._performSideEffectsForTransition(curState, nextState, signal, e);\n\n this.state.touchable.touchState = nextState;\n }\n },\n _cancelLongPressDelayTimeout: function _cancelLongPressDelayTimeout() {\n this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);\n this.longPressDelayTimeout = null;\n },\n _isHighlight: function _isHighlight(state) {\n return state === States.RESPONDER_ACTIVE_PRESS_IN || state === States.RESPONDER_ACTIVE_LONG_PRESS_IN;\n },\n _savePressInLocation: function _savePressInLocation(e) {\n var touch = extractSingleTouch(e.nativeEvent);\n var pageX = touch && touch.pageX;\n var pageY = touch && touch.pageY;\n var locationX = touch && touch.locationX;\n var locationY = touch && touch.locationY;\n this.pressInLocation = {\n pageX: pageX,\n pageY: pageY,\n locationX: locationX,\n locationY: locationY\n };\n },\n _getDistanceBetweenPoints: function _getDistanceBetweenPoints(aX, aY, bX, bY) {\n var deltaX = aX - bX;\n var deltaY = aY - bY;\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n },\n\n /**\n * Will perform a transition between touchable states, and identify any\n * highlighting or unhighlighting that must be performed for this particular\n * transition.\n *\n * @param {States} curState Current Touchable state.\n * @param {States} nextState Next Touchable state.\n * @param {Signal} signal Signal that triggered the transition.\n * @param {Event} e Native event.\n * @sideeffects\n */\n _performSideEffectsForTransition: function _performSideEffectsForTransition(curState, nextState, signal, e) {\n var curIsHighlight = this._isHighlight(curState);\n\n var newIsHighlight = this._isHighlight(nextState);\n\n var isFinalSignal = signal === Signals.RESPONDER_TERMINATED || signal === Signals.RESPONDER_RELEASE;\n\n if (isFinalSignal) {\n this._cancelLongPressDelayTimeout();\n }\n\n var isInitialTransition = curState === States.NOT_RESPONDER && nextState === States.RESPONDER_INACTIVE_PRESS_IN;\n var isActiveTransition = !IsActive[curState] && IsActive[nextState];\n\n if (isInitialTransition || isActiveTransition) {\n this._remeasureMetricsOnActivation();\n }\n\n if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) {\n this.touchableHandleLongPress && this.touchableHandleLongPress(e);\n }\n\n if (newIsHighlight && !curIsHighlight) {\n this._startHighlight(e);\n } else if (!newIsHighlight && curIsHighlight) {\n this._endHighlight(e);\n }\n\n if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) {\n var hasLongPressHandler = !!this.props.onLongPress;\n var pressIsLongButStillCallOnPress = IsLongPressingIn[curState] && ( // We *are* long pressing.. // But either has no long handler\n !hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it.\n\n var shouldInvokePress = !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress;\n\n if (shouldInvokePress && this.touchableHandlePress) {\n if (!newIsHighlight && !curIsHighlight) {\n // we never highlighted because of delay, but we should highlight now\n this._startHighlight(e);\n\n this._endHighlight(e);\n }\n\n this.touchableHandlePress(e);\n }\n }\n\n this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);\n this.touchableDelayTimeout = null;\n },\n _playTouchSound: function _playTouchSound() {\n UIManager.playTouchSound();\n },\n _startHighlight: function _startHighlight(e) {\n this._savePressInLocation(e);\n\n this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);\n },\n _endHighlight: function _endHighlight(e) {\n var _this2 = this;\n\n if (this.touchableHandleActivePressOut) {\n if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) {\n this.pressOutDelayTimeout = setTimeout(function () {\n _this2.touchableHandleActivePressOut(e);\n }, this.touchableGetPressOutDelayMS());\n } else {\n this.touchableHandleActivePressOut(e);\n }\n }\n },\n // HACK (part 2): basic support for touchable interactions using a keyboard (including\n // delays and longPress)\n touchableHandleKeyEvent: function touchableHandleKeyEvent(e) {\n var type = e.type,\n key = e.key;\n\n if (key === 'Enter' || key === ' ') {\n if (type === 'keydown') {\n if (!this._isTouchableKeyboardActive) {\n if (!this.state.touchable.touchState || this.state.touchable.touchState === States.NOT_RESPONDER) {\n this.touchableHandleResponderGrant(e);\n this._isTouchableKeyboardActive = true;\n }\n }\n } else if (type === 'keyup') {\n if (this._isTouchableKeyboardActive) {\n if (this.state.touchable.touchState && this.state.touchable.touchState !== States.NOT_RESPONDER) {\n this.touchableHandleResponderRelease(e);\n this._isTouchableKeyboardActive = false;\n }\n }\n }\n\n e.stopPropagation(); // prevent the default behaviour unless the Touchable functions as a link\n // and Enter is pressed\n\n if (!(key === 'Enter' && AccessibilityUtil.propsToAriaRole(this.props) === 'link')) {\n e.preventDefault();\n }\n }\n },\n withoutDefaultFocusAndBlur: {}\n};\n/**\n * Provide an optional version of the mixin where `touchableHandleFocus` and\n * `touchableHandleBlur` can be overridden. This allows appropriate defaults to\n * be set on TV platforms, without breaking existing implementations of\n * `Touchable`.\n */\n\nvar touchableHandleFocus = TouchableMixin.touchableHandleFocus,\n touchableHandleBlur = TouchableMixin.touchableHandleBlur,\n TouchableMixinWithoutDefaultFocusAndBlur = _objectWithoutPropertiesLoose(TouchableMixin, [\"touchableHandleFocus\", \"touchableHandleBlur\"]);\n\nTouchableMixin.withoutDefaultFocusAndBlur = TouchableMixinWithoutDefaultFocusAndBlur;\nvar Touchable = {\n Mixin: TouchableMixin,\n TOUCH_TARGET_DEBUG: false,\n // Highlights all touchable targets. Toggle with Inspector.\n\n /**\n * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android).\n */\n renderDebugView: function renderDebugView(_ref) {\n var color = _ref.color,\n hitSlop = _ref.hitSlop;\n\n if (!Touchable.TOUCH_TARGET_DEBUG) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n throw Error('Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!');\n }\n\n var debugHitSlopStyle = {};\n hitSlop = hitSlop || {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n };\n\n for (var key in hitSlop) {\n debugHitSlopStyle[key] = -hitSlop[key];\n }\n\n var normalizedColor = normalizeColor(color);\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n var hexColor = '#' + ('00000000' + normalizedColor.toString(16)).substr(-8);\n return /*#__PURE__*/React.createElement(View, {\n pointerEvents: \"none\",\n style: _objectSpread({\n position: 'absolute',\n borderColor: hexColor.slice(0, -2) + '55',\n // More opaque\n borderWidth: 1,\n borderStyle: 'dashed',\n backgroundColor: hexColor.slice(0, -2) + '0F'\n }, debugHitSlopStyle)\n });\n }\n};\nexport default Touchable;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport VirtualizedList from '../../vendor/react-native/VirtualizedList';\nexport default VirtualizedList;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport React from 'react';\nimport UnimplementedView from '../../modules/UnimplementedView';\n\nfunction YellowBox(props) {\n return /*#__PURE__*/React.createElement(UnimplementedView, props);\n}\n\nYellowBox.ignoreWarnings = function () {};\n\nexport default YellowBox;","import UnimplementedView from '../../modules/UnimplementedView';\nexport default UnimplementedView;","import UnimplementedView from '../../modules/UnimplementedView';\nexport default UnimplementedView;","import UnimplementedView from '../../modules/UnimplementedView';\nexport default UnimplementedView;","var promiseMock = function promiseMock() {\n return Promise.resolve(false);\n};\n\nexport default {\n PERMISSIONS: {},\n RESULTS: {},\n checkPermission: promiseMock,\n check: promiseMock,\n requestPermission: promiseMock,\n request: promiseMock,\n requestMultiple: promiseMock\n};","export default {};","export default {};","export default {};","import RCTDeviceEventEmitter from '../../vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter';\nexport default RCTDeviceEventEmitter;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport Appearance from '../Appearance';\nexport default function useColorScheme() {\n var _React$useState = React.useState(Appearance.getColorScheme()),\n colorScheme = _React$useState[0],\n setColorScheme = _React$useState[1];\n\n React.useEffect(function () {\n function listener(appearance) {\n setColorScheme(appearance.colorScheme);\n }\n\n Appearance.addChangeListener(listener);\n return function () {\n return Appearance.removeChangeListener(listener);\n };\n });\n return colorScheme;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nimport Dimensions from '../Dimensions';\nimport { useEffect, useState } from 'react';\nexport default function useWindowDimensions() {\n var _useState = useState(function () {\n return Dimensions.get('window');\n }),\n dims = _useState[0],\n setDims = _useState[1];\n\n useEffect(function () {\n function handleChange(_ref) {\n var window = _ref.window;\n\n if (window != null) {\n setDims(window);\n }\n }\n\n Dimensions.addEventListener('change', handleChange); // We might have missed an update between calling `get` in render and\n // `addEventListener` in this handler, so we set it here. If there was\n // no change, React will filter out this update as a no-op.\n\n setDims(Dimensions.get('window'));\n return function () {\n Dimensions.removeEventListener('change', handleChange);\n };\n }, []);\n return dims;\n}","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyFunction = require(\"./emptyFunction\");\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nfunction printWarning(format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n}\n\nvar warning = process.env.NODE_ENV !== \"production\" ? function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n} : emptyFunction;\nmodule.exports = warning;","module.exports = require('./lib/axios');","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from '../nodes/AnimatedValue';\nimport AnimatedValueXY from '../nodes/AnimatedValueXY';\nimport AnimatedInterpolation from '../nodes/AnimatedInterpolation';\nimport Animation from './Animation';\nimport SpringConfig from '../SpringConfig';\nimport invariant from 'fbjs/lib/invariant';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\n\nvar SpringAnimation = /*#__PURE__*/function (_Animation) {\n _inheritsLoose(SpringAnimation, _Animation);\n\n function SpringAnimation(config) {\n var _config$overshootClam, _config$restDisplacem, _config$restSpeedThre, _config$velocity, _config$velocity2, _config$delay, _config$isInteraction, _config$iterations;\n\n var _this;\n\n _this = _Animation.call(this) || this;\n _this._overshootClamping = (_config$overshootClam = config.overshootClamping) !== null && _config$overshootClam !== void 0 ? _config$overshootClam : false;\n _this._restDisplacementThreshold = (_config$restDisplacem = config.restDisplacementThreshold) !== null && _config$restDisplacem !== void 0 ? _config$restDisplacem : 0.001;\n _this._restSpeedThreshold = (_config$restSpeedThre = config.restSpeedThreshold) !== null && _config$restSpeedThre !== void 0 ? _config$restSpeedThre : 0.001;\n _this._initialVelocity = (_config$velocity = config.velocity) !== null && _config$velocity !== void 0 ? _config$velocity : 0;\n _this._lastVelocity = (_config$velocity2 = config.velocity) !== null && _config$velocity2 !== void 0 ? _config$velocity2 : 0;\n _this._toValue = config.toValue;\n _this._delay = (_config$delay = config.delay) !== null && _config$delay !== void 0 ? _config$delay : 0;\n _this._useNativeDriver = shouldUseNativeDriver(config);\n _this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !_this._useNativeDriver;\n _this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n\n if (config.stiffness !== undefined || config.damping !== undefined || config.mass !== undefined) {\n var _config$stiffness, _config$damping, _config$mass;\n\n invariant(config.bounciness === undefined && config.speed === undefined && config.tension === undefined && config.friction === undefined, 'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one');\n _this._stiffness = (_config$stiffness = config.stiffness) !== null && _config$stiffness !== void 0 ? _config$stiffness : 100;\n _this._damping = (_config$damping = config.damping) !== null && _config$damping !== void 0 ? _config$damping : 10;\n _this._mass = (_config$mass = config.mass) !== null && _config$mass !== void 0 ? _config$mass : 1;\n } else if (config.bounciness !== undefined || config.speed !== undefined) {\n var _config$bounciness, _config$speed;\n\n // Convert the origami bounciness/speed values to stiffness/damping\n // We assume mass is 1.\n invariant(config.tension === undefined && config.friction === undefined && config.stiffness === undefined && config.damping === undefined && config.mass === undefined, 'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one');\n var springConfig = SpringConfig.fromBouncinessAndSpeed((_config$bounciness = config.bounciness) !== null && _config$bounciness !== void 0 ? _config$bounciness : 8, (_config$speed = config.speed) !== null && _config$speed !== void 0 ? _config$speed : 12);\n _this._stiffness = springConfig.stiffness;\n _this._damping = springConfig.damping;\n _this._mass = 1;\n } else {\n var _config$tension, _config$friction;\n\n // Convert the origami tension/friction values to stiffness/damping\n // We assume mass is 1.\n var _springConfig = SpringConfig.fromOrigamiTensionAndFriction((_config$tension = config.tension) !== null && _config$tension !== void 0 ? _config$tension : 40, (_config$friction = config.friction) !== null && _config$friction !== void 0 ? _config$friction : 7);\n\n _this._stiffness = _springConfig.stiffness;\n _this._damping = _springConfig.damping;\n _this._mass = 1;\n }\n\n invariant(_this._stiffness > 0, 'Stiffness value must be greater than 0');\n invariant(_this._damping > 0, 'Damping value must be greater than 0');\n invariant(_this._mass > 0, 'Mass value must be greater than 0');\n return _this;\n }\n\n var _proto = SpringAnimation.prototype;\n\n _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n var _this$_initialVelocit;\n\n return {\n type: 'spring',\n overshootClamping: this._overshootClamping,\n restDisplacementThreshold: this._restDisplacementThreshold,\n restSpeedThreshold: this._restSpeedThreshold,\n stiffness: this._stiffness,\n damping: this._damping,\n mass: this._mass,\n initialVelocity: (_this$_initialVelocit = this._initialVelocity) !== null && _this$_initialVelocit !== void 0 ? _this$_initialVelocit : this._lastVelocity,\n toValue: this._toValue,\n iterations: this.__iterations\n };\n };\n\n _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n var _this2 = this;\n\n this.__active = true;\n this._startPosition = fromValue;\n this._lastPosition = this._startPosition;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n this._lastTime = Date.now();\n this._frameTime = 0.0;\n\n if (previousAnimation instanceof SpringAnimation) {\n var internalState = previousAnimation.getInternalState();\n this._lastPosition = internalState.lastPosition;\n this._lastVelocity = internalState.lastVelocity; // Set the initial velocity to the last velocity\n\n this._initialVelocity = this._lastVelocity;\n this._lastTime = internalState.lastTime;\n }\n\n var start = function start() {\n if (_this2._useNativeDriver) {\n _this2.__startNativeAnimation(animatedValue);\n } else {\n _this2.onUpdate();\n }\n }; // If this._delay is more than 0, we start after the timeout.\n\n\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n };\n\n _proto.getInternalState = function getInternalState() {\n return {\n lastPosition: this._lastPosition,\n lastVelocity: this._lastVelocity,\n lastTime: this._lastTime\n };\n }\n /**\n * This spring model is based off of a damped harmonic oscillator\n * (https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator).\n *\n * We use the closed form of the second order differential equation:\n *\n * x'' + (2ζ⍵_0)x' + ⍵^2x = 0\n *\n * where\n * ⍵_0 = √(k / m) (undamped angular frequency of the oscillator),\n * ζ = c / 2√mk (damping ratio),\n * c = damping constant\n * k = stiffness\n * m = mass\n *\n * The derivation of the closed form is described in detail here:\n * http://planetmath.org/sites/default/files/texpdf/39745.pdf\n *\n * This algorithm happens to match the algorithm used by CASpringAnimation,\n * a QuartzCore (iOS) API that creates spring animations.\n */\n ;\n\n _proto.onUpdate = function onUpdate() {\n // If for some reason we lost a lot of frames (e.g. process large payload or\n // stopped in the debugger), we only advance by 4 frames worth of\n // computation and will continue on the next frame. It's better to have it\n // running at faster speed than jumping to the end.\n var MAX_STEPS = 64;\n var now = Date.now();\n\n if (now > this._lastTime + MAX_STEPS) {\n now = this._lastTime + MAX_STEPS;\n }\n\n var deltaTime = (now - this._lastTime) / 1000;\n this._frameTime += deltaTime;\n var c = this._damping;\n var m = this._mass;\n var k = this._stiffness;\n var v0 = -this._initialVelocity;\n var zeta = c / (2 * Math.sqrt(k * m)); // damping ratio\n\n var omega0 = Math.sqrt(k / m); // undamped angular frequency of the oscillator (rad/ms)\n\n var omega1 = omega0 * Math.sqrt(1.0 - zeta * zeta); // exponential decay\n\n var x0 = this._toValue - this._startPosition; // calculate the oscillation from x0 = 1 to x = 0\n\n var position = 0.0;\n var velocity = 0.0;\n var t = this._frameTime;\n\n if (zeta < 1) {\n // Under damped\n var envelope = Math.exp(-zeta * omega0 * t);\n position = this._toValue - envelope * ((v0 + zeta * omega0 * x0) / omega1 * Math.sin(omega1 * t) + x0 * Math.cos(omega1 * t)); // This looks crazy -- it's actually just the derivative of the\n // oscillation function\n\n velocity = zeta * omega0 * envelope * (Math.sin(omega1 * t) * (v0 + zeta * omega0 * x0) / omega1 + x0 * Math.cos(omega1 * t)) - envelope * (Math.cos(omega1 * t) * (v0 + zeta * omega0 * x0) - omega1 * x0 * Math.sin(omega1 * t));\n } else {\n // Critically damped\n var _envelope = Math.exp(-omega0 * t);\n\n position = this._toValue - _envelope * (x0 + (v0 + omega0 * x0) * t);\n velocity = _envelope * (v0 * (t * omega0 - 1) + t * x0 * (omega0 * omega0));\n }\n\n this._lastTime = now;\n this._lastPosition = position;\n this._lastVelocity = velocity;\n\n this._onUpdate(position);\n\n if (!this.__active) {\n // a listener might have stopped us in _onUpdate\n return;\n } // Conditions for stopping the spring animation\n\n\n var isOvershooting = false;\n\n if (this._overshootClamping && this._stiffness !== 0) {\n if (this._startPosition < this._toValue) {\n isOvershooting = position > this._toValue;\n } else {\n isOvershooting = position < this._toValue;\n }\n }\n\n var isVelocity = Math.abs(velocity) <= this._restSpeedThreshold;\n\n var isDisplacement = true;\n\n if (this._stiffness !== 0) {\n isDisplacement = Math.abs(this._toValue - position) <= this._restDisplacementThreshold;\n }\n\n if (isOvershooting || isVelocity && isDisplacement) {\n if (this._stiffness !== 0) {\n // Ensure that we end up with a round value\n this._lastPosition = this._toValue;\n this._lastVelocity = 0;\n\n this._onUpdate(this._toValue);\n }\n\n this.__debouncedOnEnd({\n finished: true\n });\n\n return;\n }\n\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n };\n\n _proto.stop = function stop() {\n _Animation.prototype.stop.call(this);\n\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n\n this.__debouncedOnEnd({\n finished: false\n });\n };\n\n return SpringAnimation;\n}(Animation);\n\nexport default SpringAnimation;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nfunction stiffnessFromOrigamiValue(oValue) {\n return (oValue - 30) * 3.62 + 194;\n}\n\nfunction dampingFromOrigamiValue(oValue) {\n return (oValue - 8) * 3 + 25;\n}\n\nfunction fromOrigamiTensionAndFriction(tension, friction) {\n return {\n stiffness: stiffnessFromOrigamiValue(tension),\n damping: dampingFromOrigamiValue(friction)\n };\n}\n\nfunction fromBouncinessAndSpeed(bounciness, speed) {\n function normalize(value, startValue, endValue) {\n return (value - startValue) / (endValue - startValue);\n }\n\n function projectNormal(n, start, end) {\n return start + n * (end - start);\n }\n\n function linearInterpolation(t, start, end) {\n return t * end + (1 - t) * start;\n }\n\n function quadraticOutInterpolation(t, start, end) {\n return linearInterpolation(2 * t - t * t, start, end);\n }\n\n function b3Friction1(x) {\n return 0.0007 * Math.pow(x, 3) - 0.031 * Math.pow(x, 2) + 0.64 * x + 1.28;\n }\n\n function b3Friction2(x) {\n return 0.000044 * Math.pow(x, 3) - 0.006 * Math.pow(x, 2) + 0.36 * x + 2;\n }\n\n function b3Friction3(x) {\n return 0.00000045 * Math.pow(x, 3) - 0.000332 * Math.pow(x, 2) + 0.1078 * x + 5.84;\n }\n\n function b3Nobounce(tension) {\n if (tension <= 18) {\n return b3Friction1(tension);\n } else if (tension > 18 && tension <= 44) {\n return b3Friction2(tension);\n } else {\n return b3Friction3(tension);\n }\n }\n\n var b = normalize(bounciness / 1.7, 0, 20);\n b = projectNormal(b, 0, 0.8);\n var s = normalize(speed / 1.7, 0, 20);\n var bouncyTension = projectNormal(s, 0.5, 200);\n var bouncyFriction = quadraticOutInterpolation(b, b3Nobounce(bouncyTension), 0.01);\n return {\n stiffness: stiffnessFromOrigamiValue(bouncyTension),\n damping: dampingFromOrigamiValue(bouncyFriction)\n };\n}\n\nexport default {\n fromOrigamiTensionAndFriction: fromOrigamiTensionAndFriction,\n fromBouncinessAndSpeed: fromBouncinessAndSpeed\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from '../nodes/AnimatedValue';\nimport AnimatedValueXY from '../nodes/AnimatedValueXY';\nimport AnimatedInterpolation from '../nodes/AnimatedInterpolation';\nimport Animation from './Animation';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\nimport Easing from '../../../../exports/Easing';\n\nvar _easeInOut;\n\nfunction easeInOut() {\n if (!_easeInOut) {\n _easeInOut = Easing.inOut(Easing.ease);\n }\n\n return _easeInOut;\n}\n\nvar TimingAnimation = /*#__PURE__*/function (_Animation) {\n _inheritsLoose(TimingAnimation, _Animation);\n\n function TimingAnimation(config) {\n var _config$easing, _config$duration, _config$delay, _config$iterations, _config$isInteraction;\n\n var _this;\n\n _this = _Animation.call(this) || this;\n _this._toValue = config.toValue;\n _this._easing = (_config$easing = config.easing) !== null && _config$easing !== void 0 ? _config$easing : easeInOut();\n _this._duration = (_config$duration = config.duration) !== null && _config$duration !== void 0 ? _config$duration : 500;\n _this._delay = (_config$delay = config.delay) !== null && _config$delay !== void 0 ? _config$delay : 0;\n _this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n _this._useNativeDriver = shouldUseNativeDriver(config);\n _this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !_this._useNativeDriver;\n return _this;\n }\n\n var _proto = TimingAnimation.prototype;\n\n _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n var frameDuration = 1000.0 / 60.0;\n var frames = [];\n var numFrames = Math.round(this._duration / frameDuration);\n\n for (var frame = 0; frame < numFrames; frame++) {\n frames.push(this._easing(frame / numFrames));\n }\n\n frames.push(this._easing(1));\n return {\n type: 'frames',\n frames: frames,\n toValue: this._toValue,\n iterations: this.__iterations\n };\n };\n\n _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n var _this2 = this;\n\n this.__active = true;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n\n var start = function start() {\n // Animations that sometimes have 0 duration and sometimes do not\n // still need to use the native driver when duration is 0 so as to\n // not cause intermixed JS and native animations.\n if (_this2._duration === 0 && !_this2._useNativeDriver) {\n _this2._onUpdate(_this2._toValue);\n\n _this2.__debouncedOnEnd({\n finished: true\n });\n } else {\n _this2._startTime = Date.now();\n\n if (_this2._useNativeDriver) {\n _this2.__startNativeAnimation(animatedValue);\n } else {\n _this2._animationFrame = requestAnimationFrame(_this2.onUpdate.bind(_this2));\n }\n }\n };\n\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n };\n\n _proto.onUpdate = function onUpdate() {\n var now = Date.now();\n\n if (now >= this._startTime + this._duration) {\n if (this._duration === 0) {\n this._onUpdate(this._toValue);\n } else {\n this._onUpdate(this._fromValue + this._easing(1) * (this._toValue - this._fromValue));\n }\n\n this.__debouncedOnEnd({\n finished: true\n });\n\n return;\n }\n\n this._onUpdate(this._fromValue + this._easing((now - this._startTime) / this._duration) * (this._toValue - this._fromValue));\n\n if (this.__active) {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n };\n\n _proto.stop = function stop() {\n _Animation.prototype.stop.call(this);\n\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n\n this.__debouncedOnEnd({\n finished: false\n });\n };\n\n return TimingAnimation;\n}(Animation);\n\nexport default TimingAnimation;","/*! fromentries. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nmodule.exports = function fromEntries (iterable) {\n return [...iterable].reduce((obj, [key, val]) => {\n obj[key] = val\n return obj\n }, {})\n}\n","module.exports = __webpack_public_path__ + \"static/media/bezier.799a5c8c.cjs\";","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar pluck = function pluck(obj, keys) {\n return Object.assign.apply(Object, [{}].concat(_toConsumableArray(keys.map(function (key) {\n return _defineProperty({}, key, obj[key]);\n }))));\n};\n\nvar omit = function omit(obj, keys) {\n var keySet = new Set(keys);\n return Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(obj).filter(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 1),\n key = _ref3[0];\n\n return !keySet.has(key);\n }).map(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n key = _ref5[0],\n val = _ref5[1];\n\n return _defineProperty({}, key, val);\n }))));\n};\n\nexport { omit, pluck };\n","import React, { forwardRef, useRef, useState, useEffect, useMemo, useLayoutEffect, useCallback, useImperativeHandle } from 'react';\nimport { omit } from 'jerrypick';\nimport fromEntries from 'fromentries';\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction index (kapsuleComponent, comboParam) {\n var _ref = _typeof(comboParam) === 'object' ? comboParam : {\n // support old schema for backwards compatibility\n wrapperElementType: comboParam,\n methodNames: (arguments.length <= 2 ? undefined : arguments[2]) || undefined,\n initPropNames: (arguments.length <= 3 ? undefined : arguments[3]) || undefined\n },\n _ref$wrapperElementTy = _ref.wrapperElementType,\n wrapperElementType = _ref$wrapperElementTy === void 0 ? 'div' : _ref$wrapperElementTy,\n _ref$nodeMapper = _ref.nodeMapper,\n nodeMapper = _ref$nodeMapper === void 0 ? function (node) {\n return node;\n } : _ref$nodeMapper,\n _ref$methodNames = _ref.methodNames,\n methodNames = _ref$methodNames === void 0 ? [] : _ref$methodNames,\n _ref$initPropNames = _ref.initPropNames,\n initPropNames = _ref$initPropNames === void 0 ? [] : _ref$initPropNames;\n\n return /*#__PURE__*/forwardRef(function (props, ref) {\n var domEl = useRef();\n\n var _useState = useState({}),\n _useState2 = _slicedToArray(_useState, 2),\n prevProps = _useState2[0],\n setPrevProps = _useState2[1];\n\n useEffect(function () {\n return setPrevProps(props);\n }); // remember previous props\n // instantiate the inner kapsule component with the defined initPropNames\n\n var comp = useMemo(function () {\n var configOptions = fromEntries(initPropNames.filter(function (p) {\n return props.hasOwnProperty(p);\n }).map(function (prop) {\n return [prop, props[prop]];\n }));\n return kapsuleComponent(configOptions);\n }, []);\n useLayoutEffect(function () {\n comp(nodeMapper(domEl.current)); // mount kapsule synchronously on this element ref, optionally mapped into an object that the kapsule understands\n }, []);\n useEffect(function () {\n // invoke destructor on unmount, if it exists\n return comp._destructor instanceof Function ? comp._destructor : undefined;\n }, []); // Call a component method\n\n var _call = useCallback(function (method) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return comp[method] instanceof Function ? comp[method].apply(comp, args) : undefined;\n } // method not found\n , [comp]); // propagate component props that have changed\n\n\n var dynamicProps = omit(props, [].concat(_toConsumableArray(methodNames), _toConsumableArray(initPropNames))); // initPropNames or methodNames should not be called\n\n Object.keys(dynamicProps).filter(function (p) {\n return prevProps[p] !== props[p];\n }).forEach(function (p) {\n return _call(p, props[p]);\n }); // bind external methods to parent ref\n\n useImperativeHandle(ref, function () {\n return fromEntries(methodNames.map(function (method) {\n return [method, function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _call.apply(void 0, [method].concat(args));\n }];\n }));\n });\n return /*#__PURE__*/React.createElement(wrapperElementType, {\n ref: domEl\n });\n });\n}\n\nexport default index;\n","import 'aframe';\nimport 'aframe-extras';\nimport 'aframe-forcegraph-component';\nimport Kapsule from 'kapsule';\nimport accessorFn from 'accessor-fn';\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".graph-nav-info {\\n position: absolute;\\n bottom: 5px;\\n width: 100%;\\n text-align: center;\\n color: slategrey;\\n opacity: 0.7;\\n font-size: 10px;\\n font-family: Sans-serif;\\n z-index: 1000;\\n}\";\nstyleInject(css_248z);\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar _3dForceGraphVr = Kapsule({\n props: {\n width: {\n \"default\": window.innerWidth,\n triggerUpdate: false,\n onChange: function onChange(width, state) {\n if (state.container) state.container.style.width = width;\n }\n },\n height: {\n \"default\": window.innerHeight,\n triggerUpdate: false,\n onChange: function onChange(height, state) {\n if (state.container) state.container.style.height = height;\n }\n },\n jsonUrl: {},\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n }\n },\n numDimensions: {\n \"default\": 3\n },\n dagMode: {},\n dagLevelDistance: {},\n dagNodeFilter: {\n \"default\": function _default() {\n return true;\n }\n },\n onDagError: {\n \"default\": undefined\n },\n backgroundColor: {\n \"default\": '#002'\n },\n showNavInfo: {\n \"default\": true\n },\n nodeRelSize: {\n \"default\": 4\n },\n // volume per val unit\n nodeId: {\n \"default\": 'id'\n },\n nodeLabel: {\n \"default\": 'name'\n },\n nodeDesc: {\n \"default\": 'desc'\n },\n onNodeHover: {},\n onNodeClick: {},\n nodeVal: {\n \"default\": 'val'\n },\n nodeResolution: {\n \"default\": 8\n },\n // how many slice segments in the sphere's circumference\n nodeVisibility: {\n \"default\": true\n },\n nodeColor: {\n \"default\": 'color'\n },\n nodeAutoColorBy: {},\n nodeOpacity: {\n \"default\": 0.75\n },\n nodeThreeObject: {},\n nodeThreeObjectExtend: {\n \"default\": false\n },\n linkSource: {\n \"default\": 'source'\n },\n linkTarget: {\n \"default\": 'target'\n },\n linkLabel: {\n \"default\": 'name'\n },\n linkDesc: {\n \"default\": 'desc'\n },\n onLinkHover: {},\n onLinkClick: {},\n linkVisibility: {\n \"default\": true\n },\n linkColor: {\n \"default\": 'color'\n },\n linkAutoColorBy: {},\n linkOpacity: {\n \"default\": 0.2\n },\n linkWidth: {\n \"default\": 0\n },\n linkResolution: {\n \"default\": 6\n },\n // how many radial segments in each line cylinder's geometry\n linkCurvature: {\n \"default\": 0\n },\n linkCurveRotation: {\n \"default\": 0\n },\n linkMaterial: {},\n linkThreeObject: {},\n linkThreeObjectExtend: {\n \"default\": false\n },\n linkPositionUpdate: {},\n linkDirectionalArrowLength: {\n \"default\": 0\n },\n linkDirectionalArrowColor: {},\n linkDirectionalArrowRelPos: {\n \"default\": 0.5\n },\n // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalArrowResolution: {\n \"default\": 8\n },\n // how many slice segments in the arrow's conic circumference\n linkDirectionalParticles: {\n \"default\": 0\n },\n // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: {\n \"default\": 0.01\n },\n // in link length ratio per frame\n linkDirectionalParticleWidth: {\n \"default\": 0.5\n },\n linkDirectionalParticleColor: {},\n linkDirectionalParticleResolution: {\n \"default\": 4\n },\n // how many slice segments in the particle sphere's circumference\n forceEngine: {\n \"default\": 'd3'\n },\n // d3 or ngraph\n d3AlphaMin: {\n \"default\": 0\n },\n d3AlphaDecay: {\n \"default\": 0.0228\n },\n d3VelocityDecay: {\n \"default\": 0.4\n },\n ngraphPhysics: {},\n warmupTicks: {\n \"default\": 0\n },\n // how many times to tick the force engine at init before starting to render\n cooldownTicks: {},\n cooldownTime: {\n \"default\": 15000\n },\n // ms\n onEngineTick: {},\n onEngineStop: {}\n },\n methods: _objectSpread2(_objectSpread2({}, Object.assign.apply(Object, [{}].concat(_toConsumableArray(['getGraphBbox', 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'refresh'].map(function (method) {\n return _defineProperty({}, method, function (state) {\n var aframeComp = state.forcegraph.components.forcegraph;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var returnVal = aframeComp[method].apply(aframeComp, args);\n return returnVal === aframeComp ? this // chain based on this object, not the inner aframe component\n : returnVal;\n });\n }))))), {}, {\n _destructor: function _destructor() {\n this.graphData({\n nodes: [],\n links: []\n });\n }\n }),\n init: function init(domNode, state) {\n // Wipe DOM\n domNode.innerHTML = '';\n state.container = document.createElement('div');\n domNode.appendChild(state.container);\n state.container.style.position = 'relative';\n state.container.style.width = state.width;\n state.container.style.height = state.height; // Add nav info section\n\n state.container.appendChild(state.navInfo = document.createElement('div'));\n state.navInfo.className = 'graph-nav-info';\n state.navInfo.textContent = 'Mouse drag: look, gamepad/arrow/wasd keys: move'; // Create scene\n\n var scene = document.createElement('a-scene');\n scene.setAttribute('embedded', ''); //scene.setAttribute('stats', null);\n\n scene.appendChild(state.sky = document.createElement('a-sky'));\n state.sky.setAttribute('radius', 3000); // Add camera\n\n var cameraG;\n scene.appendChild(cameraG = document.createElement('a-entity'));\n cameraG.setAttribute('position', '0 0 300');\n cameraG.setAttribute('movement-controls', 'fly: true; speed: 7');\n var camera;\n cameraG.appendChild(camera = document.createElement('a-entity'));\n camera.setAttribute('camera', '');\n camera.setAttribute('position', '0 0 0');\n camera.setAttribute('look-controls', 'reverseMouseDrag: false; pointerLockEnabled: false'); // display cursor in middle of screen\n // let cursor;\n // camera.appendChild(cursor = document.createElement('a-cursor'));\n // cursor.setAttribute('color', 'lavender');\n // cursor.setAttribute('opacity', 0.5);\n // cursor.setAttribute('raycaster', 'objects: ----none----'); // disable cursor raycaster\n // Setup tooltip\n\n var tooltipEl;\n camera.appendChild(tooltipEl = document.createElement('a-text'));\n tooltipEl.setAttribute('position', '0 -0.3 -1');\n tooltipEl.setAttribute('width', 2);\n tooltipEl.setAttribute('align', 'center');\n tooltipEl.setAttribute('color', 'lavender');\n tooltipEl.setAttribute('value', ''); // Setup sub-tooltip\n\n var subTooltipEl;\n camera.appendChild(subTooltipEl = document.createElement('a-text'));\n subTooltipEl.setAttribute('position', '0 -0.4 -1');\n subTooltipEl.setAttribute('width', 1.3);\n subTooltipEl.setAttribute('align', 'center');\n subTooltipEl.setAttribute('color', 'lavender');\n subTooltipEl.setAttribute('value', ''); // Setup mouse cursor and laser raycasting controls\n\n var mouseCursor;\n scene.appendChild(mouseCursor = document.createElement('a-entity'));\n mouseCursor.setAttribute('cursor', 'rayOrigin: mouse; mouseCursorStylesEnabled: true');\n mouseCursor.setAttribute('raycaster', 'objects: [forcegraph]; interval: 100');\n ['left', 'right'].forEach(function (hand) {\n var laser;\n cameraG.appendChild(laser = document.createElement('a-entity'));\n laser.setAttribute('laser-controls', \"hand: \".concat(hand));\n laser.setAttribute('raycaster', 'objects: [forcegraph]; interval: 100; lineColor: steelblue; lineOpacity: 0.85');\n }); // Add forcegraph entity\n\n scene.appendChild(state.forcegraph = document.createElement('a-entity'));\n state.forcegraph.setAttribute('forcegraph', null); // attach scene\n\n state.container.appendChild(scene); // update tooltips\n\n state.forcegraph.setAttribute('forcegraph', Object.assign.apply(Object, _toConsumableArray(['node', 'link'].map(function (t) {\n var cct = {\n node: 'Node',\n link: 'Link'\n }[t]; // camel-case version\n\n return _defineProperty({}, \"on\".concat(cct, \"Hover\"), function onHover(obj, prevObj) {\n var label = obj ? accessorFn(state[\"\".concat(t, \"Label\")])(obj) || '' : '';\n var subLabel = obj ? accessorFn(state[\"\".concat(t, \"Desc\")])(obj) || '' : '';\n tooltipEl.setAttribute('value', label);\n subTooltipEl.setAttribute('value', subLabel);\n state[\"on\".concat(cct, \"Hover\")] && state[\"on\".concat(cct, \"Hover\")](obj, prevObj);\n });\n }))));\n },\n update: function update(state, changedProps) {\n changedProps.hasOwnProperty('backgroundColor') && state.sky.setAttribute('color', state.backgroundColor);\n changedProps.hasOwnProperty('showNavInfo') && (state.navInfo.style.display = state.showNavInfo ? null : 'none');\n var passThroughProps = ['jsonUrl', 'numDimensions', 'dagMode', 'dagLevelDistance', 'dagNodeFilter', 'onDagError', 'nodeRelSize', 'nodeId', 'onNodeClick', 'nodeVal', 'nodeResolution', 'nodeVisibility', 'nodeColor', 'nodeAutoColorBy', 'nodeOpacity', 'nodeThreeObject', 'nodeThreeObjectExtend', 'linkSource', 'linkTarget', 'onLinkClick', 'linkVisibility', 'linkColor', 'linkAutoColorBy', 'linkOpacity', 'linkWidth', 'linkResolution', 'linkCurvature', 'linkCurveRotation', 'linkMaterial', 'linkThreeObject', 'linkThreeObjectExtend', 'linkPositionUpdate', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowRelPos', 'linkDirectionalArrowResolution', 'linkDirectionalParticles', 'linkDirectionalParticleSpeed', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'linkDirectionalParticleResolution', 'forceEngine', 'd3AlphaMin', 'd3AlphaDecay', 'd3VelocityDecay', 'ngraphPhysics', 'warmupTicks', 'cooldownTicks', 'cooldownTime', 'onEngineTick', 'onEngineStop'];\n var newProps = Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(state).filter(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n prop = _ref4[0],\n val = _ref4[1];\n\n return changedProps.hasOwnProperty(prop) && passThroughProps.indexOf(prop) !== -1 && val !== undefined && val !== null;\n }).map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n key = _ref6[0],\n val = _ref6[1];\n\n return _defineProperty({}, key, val);\n })), _toConsumableArray(Object.entries(state.graphData).map(function (_ref8) {\n var _ref9 = _slicedToArray(_ref8, 2),\n key = _ref9[0],\n val = _ref9[1];\n\n return _defineProperty({}, key, val);\n }))));\n state.forcegraph.setAttribute('forcegraph', newProps);\n }\n});\n\nexport default _3dForceGraphVr;\n","import 'aframe-forcegraph-component';\nimport Kapsule from 'kapsule';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar _3dForceGraphAr = Kapsule({\n props: {\n width: {},\n height: {},\n yOffset: {\n \"default\": 1.5\n },\n // marker size units\n glScale: {\n \"default\": 200\n },\n // gl units per marker width\n jsonUrl: {},\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n }\n },\n numDimensions: {\n \"default\": 3\n },\n dagMode: {},\n dagLevelDistance: {},\n dagNodeFilter: {\n \"default\": function _default() {\n return true;\n }\n },\n onDagError: {\n \"default\": undefined\n },\n nodeRelSize: {\n \"default\": 4\n },\n // volume per val unit\n nodeId: {\n \"default\": 'id'\n },\n nodeVal: {\n \"default\": 'val'\n },\n nodeResolution: {\n \"default\": 8\n },\n // how many slice segments in the sphere's circumference\n nodeVisibility: {\n \"default\": true\n },\n nodeColor: {\n \"default\": 'color'\n },\n nodeAutoColorBy: {},\n nodeOpacity: {\n \"default\": 0.75\n },\n nodeThreeObject: {},\n nodeThreeObjectExtend: {\n \"default\": false\n },\n linkSource: {\n \"default\": 'source'\n },\n linkTarget: {\n \"default\": 'target'\n },\n linkVisibility: {\n \"default\": true\n },\n linkColor: {\n \"default\": 'color'\n },\n linkAutoColorBy: {},\n linkOpacity: {\n \"default\": 0.2\n },\n linkWidth: {\n \"default\": 0\n },\n linkResolution: {\n \"default\": 6\n },\n // how many radial segments in each line cylinder's geometry\n linkCurvature: {\n \"default\": 0\n },\n linkCurveRotation: {\n \"default\": 0\n },\n linkMaterial: {},\n linkThreeObject: {},\n linkThreeObjectExtend: {\n \"default\": false\n },\n linkPositionUpdate: {},\n linkDirectionalArrowLength: {\n \"default\": 0\n },\n linkDirectionalArrowColor: {},\n linkDirectionalArrowRelPos: {\n \"default\": 0.5\n },\n // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalArrowResolution: {\n \"default\": 8\n },\n // how many slice segments in the arrow's conic circumference\n linkDirectionalParticles: {\n \"default\": 0\n },\n // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: {\n \"default\": 0.01\n },\n // in link length ratio per frame\n linkDirectionalParticleWidth: {\n \"default\": 0.5\n },\n linkDirectionalParticleColor: {},\n linkDirectionalParticleResolution: {\n \"default\": 4\n },\n // how many slice segments in the particle sphere's circumference\n onNodeHover: {},\n onNodeClick: {},\n onLinkHover: {},\n onLinkClick: {},\n forceEngine: {\n \"default\": 'd3'\n },\n // d3 or ngraph\n d3AlphaMin: {\n \"default\": 0\n },\n d3AlphaDecay: {\n \"default\": 0.0228\n },\n d3VelocityDecay: {\n \"default\": 0.4\n },\n ngraphPhysics: {},\n warmupTicks: {\n \"default\": 0\n },\n // how many times to tick the force engine at init before starting to render\n cooldownTicks: {},\n cooldownTime: {\n \"default\": 15000\n },\n // ms\n onEngineTick: {},\n onEngineStop: {}\n },\n methods: _objectSpread2(_objectSpread2({}, Object.assign.apply(Object, [{}].concat(_toConsumableArray(['getGraphBbox', 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'refresh'].map(function (method) {\n return _defineProperty({}, method, function (state) {\n var aframeComp = state.forcegraph.components.forcegraph;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var returnVal = aframeComp[method].apply(aframeComp, args);\n return returnVal === aframeComp ? this // chain based on this object, not the inner aframe component\n : returnVal;\n });\n }))))), {}, {\n _destructor: function _destructor() {\n this.graphData({\n nodes: [],\n links: []\n });\n }\n }),\n init: function init(domNode, state) {\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$markerAttrs = _ref2.markerAttrs,\n markerAttrs = _ref2$markerAttrs === void 0 ? {\n preset: 'hiro'\n } : _ref2$markerAttrs;\n\n // Wipe DOM\n domNode.innerHTML = '';\n state.container = document.createElement('div');\n domNode.appendChild(state.container); // Create scene\n\n var scene = document.createElement('a-scene');\n scene.setAttribute('embedded', '');\n scene.setAttribute('arjs', 'debugUIEnabled: false;');\n var arMarker = document.createElement('a-marker'); // add marker attributes\n\n Object.entries(markerAttrs).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n attr = _ref4[0],\n val = _ref4[1];\n\n return arMarker.setAttribute(attr, val);\n });\n scene.appendChild(arMarker); // Setup raycaster cursor\n\n var mouseCursor;\n scene.appendChild(mouseCursor = document.createElement('a-entity'));\n mouseCursor.setAttribute('cursor'\n /*, 'rayOrigin: mouse'*/\n ); // mouse raycaster has accuracy issues in ar.js: https://github.com/AR-js-org/AR.js/issues/40\n\n mouseCursor.setAttribute('raycaster', 'objects: [forcegraph]'); // Add forcegraph entity\n\n state.forcegraph = document.createElement('a-entity');\n state.forcegraph.setAttribute('forcegraph', null);\n arMarker.appendChild(state.forcegraph);\n var cameraEntity = document.createElement('a-entity');\n cameraEntity.setAttribute('camera', '');\n scene.appendChild(cameraEntity); // attach scene\n\n state.container.appendChild(scene); //domNode.appendChild(scene);\n },\n update: function update(state, changedProps) {\n changedProps.hasOwnProperty('width') && state.width && (state.container.style.width = state.width);\n changedProps.hasOwnProperty('height') && state.height && (state.container.style.height = state.height);\n changedProps.hasOwnProperty('glScale') && state.forcegraph.setAttribute('scale', _toConsumableArray(new Array(3)).map(function () {\n return 1 / state.glScale;\n }).join(' '));\n changedProps.hasOwnProperty('yOffset') && state.forcegraph.setAttribute('position', \"0 \".concat(state.yOffset, \" 0\"));\n var passThroughProps = ['jsonUrl', 'numDimensions', 'dagMode', 'dagLevelDistance', 'dagNodeFilter', 'onDagError', 'nodeRelSize', 'nodeId', 'nodeVal', 'nodeResolution', 'nodeVisibility', 'nodeColor', 'nodeAutoColorBy', 'nodeOpacity', 'nodeThreeObject', 'nodeThreeObjectExtend', 'linkSource', 'linkTarget', 'linkVisibility', 'linkColor', 'linkAutoColorBy', 'linkOpacity', 'linkWidth', 'linkResolution', 'linkCurvature', 'linkCurveRotation', 'linkMaterial', 'linkThreeObject', 'linkThreeObjectExtend', 'linkPositionUpdate', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowRelPos', 'linkDirectionalArrowResolution', 'linkDirectionalParticles', 'linkDirectionalParticleSpeed', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'linkDirectionalParticleResolution', 'onNodeHover', 'onNodeClick', 'onLinkHover', 'onLinkClick', 'forceEngine', 'd3AlphaMin', 'd3AlphaDecay', 'd3VelocityDecay', 'ngraphPhysics', 'warmupTicks', 'cooldownTicks', 'cooldownTime', 'onEngineTick', 'onEngineStop'];\n var newProps = Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(state).filter(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n prop = _ref6[0],\n val = _ref6[1];\n\n return changedProps.hasOwnProperty(prop) && passThroughProps.indexOf(prop) !== -1 && val !== undefined && val !== null;\n }).map(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n key = _ref8[0],\n val = _ref8[1];\n\n return _defineProperty({}, key, val);\n })), _toConsumableArray(Object.entries(state.graphData).map(function (_ref10) {\n var _ref11 = _slicedToArray(_ref10, 2),\n key = _ref11[0],\n val = _ref11[1];\n\n return _defineProperty({}, key, val);\n }))));\n state.forcegraph.setAttribute('forcegraph', newProps);\n }\n});\n\nexport default _3dForceGraphAr;\n","import {\n\tEventDispatcher,\n\tMatrix4,\n\tPlane,\n\tRaycaster,\n\tVector2,\n\tVector3\n} from 'three';\n\nconst _plane = new Plane();\nconst _raycaster = new Raycaster();\n\nconst _pointer = new Vector2();\nconst _offset = new Vector3();\nconst _intersection = new Vector3();\nconst _worldPosition = new Vector3();\nconst _inverseMatrix = new Matrix4();\n\nclass DragControls extends EventDispatcher {\n\n\tconstructor( _objects, _camera, _domElement ) {\n\n\t\tsuper();\n\n\t\t_domElement.style.touchAction = 'none'; // disable touch scroll\n\n\t\tlet _selected = null, _hovered = null;\n\n\t\tconst _intersections = [];\n\n\t\t//\n\n\t\tconst scope = this;\n\n\t\tfunction activate() {\n\n\t\t\t_domElement.addEventListener( 'pointermove', onPointerMove );\n\t\t\t_domElement.addEventListener( 'pointerdown', onPointerDown );\n\t\t\t_domElement.addEventListener( 'pointerup', onPointerCancel );\n\t\t\t_domElement.addEventListener( 'pointerleave', onPointerCancel );\n\n\t\t}\n\n\t\tfunction deactivate() {\n\n\t\t\t_domElement.removeEventListener( 'pointermove', onPointerMove );\n\t\t\t_domElement.removeEventListener( 'pointerdown', onPointerDown );\n\t\t\t_domElement.removeEventListener( 'pointerup', onPointerCancel );\n\t\t\t_domElement.removeEventListener( 'pointerleave', onPointerCancel );\n\n\t\t\t_domElement.style.cursor = '';\n\n\t\t}\n\n\t\tfunction dispose() {\n\n\t\t\tdeactivate();\n\n\t\t}\n\n\t\tfunction getObjects() {\n\n\t\t\treturn _objects;\n\n\t\t}\n\n\t\tfunction onPointerMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tupdatePointer( event );\n\n\t\t\t_raycaster.setFromCamera( _pointer, _camera );\n\n\t\t\tif ( _selected ) {\n\n\t\t\t\tif ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) {\n\n\t\t\t\t\t_selected.position.copy( _intersection.sub( _offset ).applyMatrix4( _inverseMatrix ) );\n\n\t\t\t\t}\n\n\t\t\t\tscope.dispatchEvent( { type: 'drag', object: _selected } );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t// hover support\n\n\t\t\tif ( event.pointerType === 'mouse' || event.pointerType === 'pen' ) {\n\n\t\t\t\t_intersections.length = 0;\n\n\t\t\t\t_raycaster.setFromCamera( _pointer, _camera );\n\t\t\t\t_raycaster.intersectObjects( _objects, true, _intersections );\n\n\t\t\t\tif ( _intersections.length > 0 ) {\n\n\t\t\t\t\tconst object = _intersections[ 0 ].object;\n\n\t\t\t\t\t_plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _worldPosition.setFromMatrixPosition( object.matrixWorld ) );\n\n\t\t\t\t\tif ( _hovered !== object && _hovered !== null ) {\n\n\t\t\t\t\t\tscope.dispatchEvent( { type: 'hoveroff', object: _hovered } );\n\n\t\t\t\t\t\t_domElement.style.cursor = 'auto';\n\t\t\t\t\t\t_hovered = null;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( _hovered !== object ) {\n\n\t\t\t\t\t\tscope.dispatchEvent( { type: 'hoveron', object: object } );\n\n\t\t\t\t\t\t_domElement.style.cursor = 'pointer';\n\t\t\t\t\t\t_hovered = object;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( _hovered !== null ) {\n\n\t\t\t\t\t\tscope.dispatchEvent( { type: 'hoveroff', object: _hovered } );\n\n\t\t\t\t\t\t_domElement.style.cursor = 'auto';\n\t\t\t\t\t\t_hovered = null;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerDown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tupdatePointer( event );\n\n\t\t\t_intersections.length = 0;\n\n\t\t\t_raycaster.setFromCamera( _pointer, _camera );\n\t\t\t_raycaster.intersectObjects( _objects, true, _intersections );\n\n\t\t\tif ( _intersections.length > 0 ) {\n\n\t\t\t\t_selected = ( scope.transformGroup === true ) ? _objects[ 0 ] : _intersections[ 0 ].object;\n\n\t\t\t\t_plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) );\n\n\t\t\t\tif ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) {\n\n\t\t\t\t\t_inverseMatrix.copy( _selected.parent.matrixWorld ).invert();\n\t\t\t\t\t_offset.copy( _intersection ).sub( _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) );\n\n\t\t\t\t}\n\n\t\t\t\t_domElement.style.cursor = 'move';\n\n\t\t\t\tscope.dispatchEvent( { type: 'dragstart', object: _selected } );\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tfunction onPointerCancel() {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( _selected ) {\n\n\t\t\t\tscope.dispatchEvent( { type: 'dragend', object: _selected } );\n\n\t\t\t\t_selected = null;\n\n\t\t\t}\n\n\t\t\t_domElement.style.cursor = _hovered ? 'pointer' : 'auto';\n\n\t\t}\n\n\t\tfunction updatePointer( event ) {\n\n\t\t\tconst rect = _domElement.getBoundingClientRect();\n\n\t\t\t_pointer.x = ( event.clientX - rect.left ) / rect.width * 2 - 1;\n\t\t\t_pointer.y = - ( event.clientY - rect.top ) / rect.height * 2 + 1;\n\n\t\t}\n\n\t\tactivate();\n\n\t\t// API\n\n\t\tthis.enabled = true;\n\t\tthis.transformGroup = false;\n\n\t\tthis.activate = activate;\n\t\tthis.deactivate = deactivate;\n\t\tthis.dispose = dispose;\n\t\tthis.getObjects = getObjects;\n\n\t}\n\n}\n\nexport { DragControls };\n","import {\n\tEventDispatcher,\n\tMOUSE,\n\tQuaternion,\n\tVector2,\n\tVector3\n} from 'three';\n\nconst _changeEvent = { type: 'change' };\nconst _startEvent = { type: 'start' };\nconst _endEvent = { type: 'end' };\n\nclass TrackballControls extends EventDispatcher {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper();\n\n\t\tif ( domElement === undefined ) console.warn( 'THREE.TrackballControls: The second parameter \"domElement\" is now mandatory.' );\n\t\tif ( domElement === document ) console.error( 'THREE.TrackballControls: \"document\" should not be used as the target \"domElement\". Please use \"renderer.domElement\" instead.' );\n\n\t\tconst scope = this;\n\t\tconst STATE = { NONE: - 1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM_PAN: 4 };\n\n\t\tthis.object = object;\n\t\tthis.domElement = domElement;\n\t\tthis.domElement.style.touchAction = 'none'; // disable touch scroll\n\n\t\t// API\n\n\t\tthis.enabled = true;\n\n\t\tthis.screen = { left: 0, top: 0, width: 0, height: 0 };\n\n\t\tthis.rotateSpeed = 1.0;\n\t\tthis.zoomSpeed = 1.2;\n\t\tthis.panSpeed = 0.3;\n\n\t\tthis.noRotate = false;\n\t\tthis.noZoom = false;\n\t\tthis.noPan = false;\n\n\t\tthis.staticMoving = false;\n\t\tthis.dynamicDampingFactor = 0.2;\n\n\t\tthis.minDistance = 0;\n\t\tthis.maxDistance = Infinity;\n\n\t\tthis.keys = [ 'KeyA' /*A*/, 'KeyS' /*S*/, 'KeyD' /*D*/ ];\n\n\t\tthis.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN };\n\n\t\t// internals\n\n\t\tthis.target = new Vector3();\n\n\t\tconst EPS = 0.000001;\n\n\t\tconst lastPosition = new Vector3();\n\t\tlet lastZoom = 1;\n\n\t\tlet _state = STATE.NONE,\n\t\t\t_keyState = STATE.NONE,\n\n\t\t\t_touchZoomDistanceStart = 0,\n\t\t\t_touchZoomDistanceEnd = 0,\n\n\t\t\t_lastAngle = 0;\n\n\t\tconst _eye = new Vector3(),\n\n\t\t\t_movePrev = new Vector2(),\n\t\t\t_moveCurr = new Vector2(),\n\n\t\t\t_lastAxis = new Vector3(),\n\n\t\t\t_zoomStart = new Vector2(),\n\t\t\t_zoomEnd = new Vector2(),\n\n\t\t\t_panStart = new Vector2(),\n\t\t\t_panEnd = new Vector2(),\n\n\t\t\t_pointers = [],\n\t\t\t_pointerPositions = {};\n\n\t\t// for reset\n\n\t\tthis.target0 = this.target.clone();\n\t\tthis.position0 = this.object.position.clone();\n\t\tthis.up0 = this.object.up.clone();\n\t\tthis.zoom0 = this.object.zoom;\n\n\t\t// methods\n\n\t\tthis.handleResize = function () {\n\n\t\t\tconst box = scope.domElement.getBoundingClientRect();\n\t\t\t// adjustments come from similar code in the jquery offset() function\n\t\t\tconst d = scope.domElement.ownerDocument.documentElement;\n\t\t\tscope.screen.left = box.left + window.pageXOffset - d.clientLeft;\n\t\t\tscope.screen.top = box.top + window.pageYOffset - d.clientTop;\n\t\t\tscope.screen.width = box.width;\n\t\t\tscope.screen.height = box.height;\n\n\t\t};\n\n\t\tconst getMouseOnScreen = ( function () {\n\n\t\t\tconst vector = new Vector2();\n\n\t\t\treturn function getMouseOnScreen( pageX, pageY ) {\n\n\t\t\t\tvector.set(\n\t\t\t\t\t( pageX - scope.screen.left ) / scope.screen.width,\n\t\t\t\t\t( pageY - scope.screen.top ) / scope.screen.height\n\t\t\t\t);\n\n\t\t\t\treturn vector;\n\n\t\t\t};\n\n\t\t}() );\n\n\t\tconst getMouseOnCircle = ( function () {\n\n\t\t\tconst vector = new Vector2();\n\n\t\t\treturn function getMouseOnCircle( pageX, pageY ) {\n\n\t\t\t\tvector.set(\n\t\t\t\t\t( ( pageX - scope.screen.width * 0.5 - scope.screen.left ) / ( scope.screen.width * 0.5 ) ),\n\t\t\t\t\t( ( scope.screen.height + 2 * ( scope.screen.top - pageY ) ) / scope.screen.width ) // screen.width intentional\n\t\t\t\t);\n\n\t\t\t\treturn vector;\n\n\t\t\t};\n\n\t\t}() );\n\n\t\tthis.rotateCamera = ( function () {\n\n\t\t\tconst axis = new Vector3(),\n\t\t\t\tquaternion = new Quaternion(),\n\t\t\t\teyeDirection = new Vector3(),\n\t\t\t\tobjectUpDirection = new Vector3(),\n\t\t\t\tobjectSidewaysDirection = new Vector3(),\n\t\t\t\tmoveDirection = new Vector3();\n\n\t\t\treturn function rotateCamera() {\n\n\t\t\t\tmoveDirection.set( _moveCurr.x - _movePrev.x, _moveCurr.y - _movePrev.y, 0 );\n\t\t\t\tlet angle = moveDirection.length();\n\n\t\t\t\tif ( angle ) {\n\n\t\t\t\t\t_eye.copy( scope.object.position ).sub( scope.target );\n\n\t\t\t\t\teyeDirection.copy( _eye ).normalize();\n\t\t\t\t\tobjectUpDirection.copy( scope.object.up ).normalize();\n\t\t\t\t\tobjectSidewaysDirection.crossVectors( objectUpDirection, eyeDirection ).normalize();\n\n\t\t\t\t\tobjectUpDirection.setLength( _moveCurr.y - _movePrev.y );\n\t\t\t\t\tobjectSidewaysDirection.setLength( _moveCurr.x - _movePrev.x );\n\n\t\t\t\t\tmoveDirection.copy( objectUpDirection.add( objectSidewaysDirection ) );\n\n\t\t\t\t\taxis.crossVectors( moveDirection, _eye ).normalize();\n\n\t\t\t\t\tangle *= scope.rotateSpeed;\n\t\t\t\t\tquaternion.setFromAxisAngle( axis, angle );\n\n\t\t\t\t\t_eye.applyQuaternion( quaternion );\n\t\t\t\t\tscope.object.up.applyQuaternion( quaternion );\n\n\t\t\t\t\t_lastAxis.copy( axis );\n\t\t\t\t\t_lastAngle = angle;\n\n\t\t\t\t} else if ( ! scope.staticMoving && _lastAngle ) {\n\n\t\t\t\t\t_lastAngle *= Math.sqrt( 1.0 - scope.dynamicDampingFactor );\n\t\t\t\t\t_eye.copy( scope.object.position ).sub( scope.target );\n\t\t\t\t\tquaternion.setFromAxisAngle( _lastAxis, _lastAngle );\n\t\t\t\t\t_eye.applyQuaternion( quaternion );\n\t\t\t\t\tscope.object.up.applyQuaternion( quaternion );\n\n\t\t\t\t}\n\n\t\t\t\t_movePrev.copy( _moveCurr );\n\n\t\t\t};\n\n\t\t}() );\n\n\n\t\tthis.zoomCamera = function () {\n\n\t\t\tlet factor;\n\n\t\t\tif ( _state === STATE.TOUCH_ZOOM_PAN ) {\n\n\t\t\t\tfactor = _touchZoomDistanceStart / _touchZoomDistanceEnd;\n\t\t\t\t_touchZoomDistanceStart = _touchZoomDistanceEnd;\n\n\t\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\t\t_eye.multiplyScalar( factor );\n\n\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\tscope.object.zoom *= factor;\n\t\t\t\t\tscope.object.updateProjectionMatrix();\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.TrackballControls: Unsupported camera type' );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tfactor = 1.0 + ( _zoomEnd.y - _zoomStart.y ) * scope.zoomSpeed;\n\n\t\t\t\tif ( factor !== 1.0 && factor > 0.0 ) {\n\n\t\t\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\t\t\t_eye.multiplyScalar( factor );\n\n\t\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\t\tscope.object.zoom /= factor;\n\t\t\t\t\t\tscope.object.updateProjectionMatrix();\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.TrackballControls: Unsupported camera type' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( scope.staticMoving ) {\n\n\t\t\t\t\t_zoomStart.copy( _zoomEnd );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_zoomStart.y += ( _zoomEnd.y - _zoomStart.y ) * this.dynamicDampingFactor;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.panCamera = ( function () {\n\n\t\t\tconst mouseChange = new Vector2(),\n\t\t\t\tobjectUp = new Vector3(),\n\t\t\t\tpan = new Vector3();\n\n\t\t\treturn function panCamera() {\n\n\t\t\t\tmouseChange.copy( _panEnd ).sub( _panStart );\n\n\t\t\t\tif ( mouseChange.lengthSq() ) {\n\n\t\t\t\t\tif ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\t\tconst scale_x = ( scope.object.right - scope.object.left ) / scope.object.zoom / scope.domElement.clientWidth;\n\t\t\t\t\t\tconst scale_y = ( scope.object.top - scope.object.bottom ) / scope.object.zoom / scope.domElement.clientWidth;\n\n\t\t\t\t\t\tmouseChange.x *= scale_x;\n\t\t\t\t\t\tmouseChange.y *= scale_y;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmouseChange.multiplyScalar( _eye.length() * scope.panSpeed );\n\n\t\t\t\t\tpan.copy( _eye ).cross( scope.object.up ).setLength( mouseChange.x );\n\t\t\t\t\tpan.add( objectUp.copy( scope.object.up ).setLength( mouseChange.y ) );\n\n\t\t\t\t\tscope.object.position.add( pan );\n\t\t\t\t\tscope.target.add( pan );\n\n\t\t\t\t\tif ( scope.staticMoving ) {\n\n\t\t\t\t\t\t_panStart.copy( _panEnd );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_panStart.add( mouseChange.subVectors( _panEnd, _panStart ).multiplyScalar( scope.dynamicDampingFactor ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t}() );\n\n\t\tthis.checkDistances = function () {\n\n\t\t\tif ( ! scope.noZoom || ! scope.noPan ) {\n\n\t\t\t\tif ( _eye.lengthSq() > scope.maxDistance * scope.maxDistance ) {\n\n\t\t\t\t\tscope.object.position.addVectors( scope.target, _eye.setLength( scope.maxDistance ) );\n\t\t\t\t\t_zoomStart.copy( _zoomEnd );\n\n\t\t\t\t}\n\n\t\t\t\tif ( _eye.lengthSq() < scope.minDistance * scope.minDistance ) {\n\n\t\t\t\t\tscope.object.position.addVectors( scope.target, _eye.setLength( scope.minDistance ) );\n\t\t\t\t\t_zoomStart.copy( _zoomEnd );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.update = function () {\n\n\t\t\t_eye.subVectors( scope.object.position, scope.target );\n\n\t\t\tif ( ! scope.noRotate ) {\n\n\t\t\t\tscope.rotateCamera();\n\n\t\t\t}\n\n\t\t\tif ( ! scope.noZoom ) {\n\n\t\t\t\tscope.zoomCamera();\n\n\t\t\t}\n\n\t\t\tif ( ! scope.noPan ) {\n\n\t\t\t\tscope.panCamera();\n\n\t\t\t}\n\n\t\t\tscope.object.position.addVectors( scope.target, _eye );\n\n\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\tscope.checkDistances();\n\n\t\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\t\tif ( lastPosition.distanceToSquared( scope.object.position ) > EPS ) {\n\n\t\t\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\t\t\tlastPosition.copy( scope.object.position );\n\n\t\t\t\t}\n\n\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\t\tif ( lastPosition.distanceToSquared( scope.object.position ) > EPS || lastZoom !== scope.object.zoom ) {\n\n\t\t\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\t\t\tlastPosition.copy( scope.object.position );\n\t\t\t\t\tlastZoom = scope.object.zoom;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.TrackballControls: Unsupported camera type' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.reset = function () {\n\n\t\t\t_state = STATE.NONE;\n\t\t\t_keyState = STATE.NONE;\n\n\t\t\tscope.target.copy( scope.target0 );\n\t\t\tscope.object.position.copy( scope.position0 );\n\t\t\tscope.object.up.copy( scope.up0 );\n\t\t\tscope.object.zoom = scope.zoom0;\n\n\t\t\tscope.object.updateProjectionMatrix();\n\n\t\t\t_eye.subVectors( scope.object.position, scope.target );\n\n\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\tlastPosition.copy( scope.object.position );\n\t\t\tlastZoom = scope.object.zoom;\n\n\t\t};\n\n\t\t// listeners\n\n\t\tfunction onPointerDown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( _pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\taddPointer( event );\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchStart( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseDown( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchMove( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseMove( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerUp( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchEnd( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseUp();\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tremovePointer( event );\n\n\t\t\tif ( _pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tfunction onPointerCancel( event ) {\n\n\t\t\tremovePointer( event );\n\n\t\t}\n\n\t\tfunction keydown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\twindow.removeEventListener( 'keydown', keydown );\n\n\t\t\tif ( _keyState !== STATE.NONE ) {\n\n\t\t\t\treturn;\n\n\t\t\t} else if ( event.code === scope.keys[ STATE.ROTATE ] && ! scope.noRotate ) {\n\n\t\t\t\t_keyState = STATE.ROTATE;\n\n\t\t\t} else if ( event.code === scope.keys[ STATE.ZOOM ] && ! scope.noZoom ) {\n\n\t\t\t\t_keyState = STATE.ZOOM;\n\n\t\t\t} else if ( event.code === scope.keys[ STATE.PAN ] && ! scope.noPan ) {\n\n\t\t\t\t_keyState = STATE.PAN;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction keyup() {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\t_keyState = STATE.NONE;\n\n\t\t\twindow.addEventListener( 'keydown', keydown );\n\n\t\t}\n\n\t\tfunction onMouseDown( event ) {\n\n\t\t\tif ( _state === STATE.NONE ) {\n\n\t\t\t\tswitch ( event.button ) {\n\n\t\t\t\t\tcase scope.mouseButtons.LEFT:\n\t\t\t\t\t\t_state = STATE.ROTATE;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase scope.mouseButtons.MIDDLE:\n\t\t\t\t\t\t_state = STATE.ZOOM;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase scope.mouseButtons.RIGHT:\n\t\t\t\t\t\t_state = STATE.PAN;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t_state = STATE.NONE;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst state = ( _keyState !== STATE.NONE ) ? _keyState : _state;\n\n\t\t\tif ( state === STATE.ROTATE && ! scope.noRotate ) {\n\n\t\t\t\t_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );\n\t\t\t\t_movePrev.copy( _moveCurr );\n\n\t\t\t} else if ( state === STATE.ZOOM && ! scope.noZoom ) {\n\n\t\t\t\t_zoomStart.copy( getMouseOnScreen( event.pageX, event.pageY ) );\n\t\t\t\t_zoomEnd.copy( _zoomStart );\n\n\t\t\t} else if ( state === STATE.PAN && ! scope.noPan ) {\n\n\t\t\t\t_panStart.copy( getMouseOnScreen( event.pageX, event.pageY ) );\n\t\t\t\t_panEnd.copy( _panStart );\n\n\t\t\t}\n\n\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointermove', onPointerMove );\n\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointerup', onPointerUp );\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t}\n\n\t\tfunction onMouseMove( event ) {\n\n\t\t\tconst state = ( _keyState !== STATE.NONE ) ? _keyState : _state;\n\n\t\t\tif ( state === STATE.ROTATE && ! scope.noRotate ) {\n\n\t\t\t\t_movePrev.copy( _moveCurr );\n\t\t\t\t_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );\n\n\t\t\t} else if ( state === STATE.ZOOM && ! scope.noZoom ) {\n\n\t\t\t\t_zoomEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) );\n\n\t\t\t} else if ( state === STATE.PAN && ! scope.noPan ) {\n\n\t\t\t\t_panEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onMouseUp() {\n\n\t\t\t_state = STATE.NONE;\n\n\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointermove', onPointerMove );\n\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointerup', onPointerUp );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction onMouseWheel( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( scope.noZoom === true ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t\tswitch ( event.deltaMode ) {\n\n\t\t\t\tcase 2:\n\t\t\t\t\t// Zoom in pages\n\t\t\t\t\t_zoomStart.y -= event.deltaY * 0.025;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\t// Zoom in lines\n\t\t\t\t\t_zoomStart.y -= event.deltaY * 0.01;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// undefined, 0, assume pixels\n\t\t\t\t\t_zoomStart.y -= event.deltaY * 0.00025;\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction onTouchStart( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( _pointers.length ) {\n\n\t\t\t\tcase 1:\n\t\t\t\t\t_state = STATE.TOUCH_ROTATE;\n\t\t\t\t\t_moveCurr.copy( getMouseOnCircle( _pointers[ 0 ].pageX, _pointers[ 0 ].pageY ) );\n\t\t\t\t\t_movePrev.copy( _moveCurr );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // 2 or more\n\t\t\t\t\t_state = STATE.TOUCH_ZOOM_PAN;\n\t\t\t\t\tconst dx = _pointers[ 0 ].pageX - _pointers[ 1 ].pageX;\n\t\t\t\t\tconst dy = _pointers[ 0 ].pageY - _pointers[ 1 ].pageY;\n\t\t\t\t\t_touchZoomDistanceEnd = _touchZoomDistanceStart = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\t\t\tconst x = ( _pointers[ 0 ].pageX + _pointers[ 1 ].pageX ) / 2;\n\t\t\t\t\tconst y = ( _pointers[ 0 ].pageY + _pointers[ 1 ].pageY ) / 2;\n\t\t\t\t\t_panStart.copy( getMouseOnScreen( x, y ) );\n\t\t\t\t\t_panEnd.copy( _panStart );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t}\n\n\t\tfunction onTouchMove( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( _pointers.length ) {\n\n\t\t\t\tcase 1:\n\t\t\t\t\t_movePrev.copy( _moveCurr );\n\t\t\t\t\t_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // 2 or more\n\n\t\t\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\t\t\tconst dx = event.pageX - position.x;\n\t\t\t\t\tconst dy = event.pageY - position.y;\n\t\t\t\t\t_touchZoomDistanceEnd = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\t\t\tconst x = ( event.pageX + position.x ) / 2;\n\t\t\t\t\tconst y = ( event.pageY + position.y ) / 2;\n\t\t\t\t\t_panEnd.copy( getMouseOnScreen( x, y ) );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onTouchEnd( event ) {\n\n\t\t\tswitch ( _pointers.length ) {\n\n\t\t\t\tcase 0:\n\t\t\t\t\t_state = STATE.NONE;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\t_state = STATE.TOUCH_ROTATE;\n\t\t\t\t\t_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );\n\t\t\t\t\t_movePrev.copy( _moveCurr );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction contextmenu( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t}\n\n\t\tfunction addPointer( event ) {\n\n\t\t\t_pointers.push( event );\n\n\t\t}\n\n\t\tfunction removePointer( event ) {\n\n\t\t\tdelete _pointerPositions[ event.pointerId ];\n\n\t\t\tfor ( let i = 0; i < _pointers.length; i ++ ) {\n\n\t\t\t\tif ( _pointers[ i ].pointerId == event.pointerId ) {\n\n\t\t\t\t\t_pointers.splice( i, 1 );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction trackPointer( event ) {\n\n\t\t\tlet position = _pointerPositions[ event.pointerId ];\n\n\t\t\tif ( position === undefined ) {\n\n\t\t\t\tposition = new Vector2();\n\t\t\t\t_pointerPositions[ event.pointerId ] = position;\n\n\t\t\t}\n\n\t\t\tposition.set( event.pageX, event.pageY );\n\n\t\t}\n\n\t\tfunction getSecondPointerPosition( event ) {\n\n\t\t\tconst pointer = ( event.pointerId === _pointers[ 0 ].pointerId ) ? _pointers[ 1 ] : _pointers[ 0 ];\n\n\t\t\treturn _pointerPositions[ pointer.pointerId ];\n\n\t\t}\n\n\t\tthis.dispose = function () {\n\n\t\t\tscope.domElement.removeEventListener( 'contextmenu', contextmenu );\n\n\t\t\tscope.domElement.removeEventListener( 'pointerdown', onPointerDown );\n\t\t\tscope.domElement.removeEventListener( 'pointercancel', onPointerCancel );\n\t\t\tscope.domElement.removeEventListener( 'wheel', onMouseWheel );\n\n\t\t\twindow.removeEventListener( 'keydown', keydown );\n\t\t\twindow.removeEventListener( 'keyup', keyup );\n\n\t\t};\n\n\t\tthis.domElement.addEventListener( 'contextmenu', contextmenu );\n\n\t\tthis.domElement.addEventListener( 'pointerdown', onPointerDown );\n\t\tthis.domElement.addEventListener( 'pointercancel', onPointerCancel );\n\t\tthis.domElement.addEventListener( 'wheel', onMouseWheel, { passive: false } );\n\n\n\t\twindow.addEventListener( 'keydown', keydown );\n\t\twindow.addEventListener( 'keyup', keyup );\n\n\t\tthis.handleResize();\n\n\t\t// force an update at start\n\t\tthis.update();\n\n\t}\n\n}\n\nexport { TrackballControls };\n","import {\n\tEventDispatcher,\n\tMOUSE,\n\tQuaternion,\n\tSpherical,\n\tTOUCH,\n\tVector2,\n\tVector3\n} from 'three';\n\n// This set of controls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n//\n// Orbit - left mouse / touch: one-finger move\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move\n\nconst _changeEvent = { type: 'change' };\nconst _startEvent = { type: 'start' };\nconst _endEvent = { type: 'end' };\n\nclass OrbitControls extends EventDispatcher {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper();\n\n\t\tif ( domElement === undefined ) console.warn( 'THREE.OrbitControls: The second parameter \"domElement\" is now mandatory.' );\n\t\tif ( domElement === document ) console.error( 'THREE.OrbitControls: \"document\" should not be used as the target \"domElement\". Please use \"renderer.domElement\" instead.' );\n\n\t\tthis.object = object;\n\t\tthis.domElement = domElement;\n\t\tthis.domElement.style.touchAction = 'none'; // disable touch scroll\n\n\t\t// Set to false to disable this control\n\t\tthis.enabled = true;\n\n\t\t// \"target\" sets the location of focus, where the object orbits around\n\t\tthis.target = new Vector3();\n\n\t\t// How far you can dolly in and out ( PerspectiveCamera only )\n\t\tthis.minDistance = 0;\n\t\tthis.maxDistance = Infinity;\n\n\t\t// How far you can zoom in and out ( OrthographicCamera only )\n\t\tthis.minZoom = 0;\n\t\tthis.maxZoom = Infinity;\n\n\t\t// How far you can orbit vertically, upper and lower limits.\n\t\t// Range is 0 to Math.PI radians.\n\t\tthis.minPolarAngle = 0; // radians\n\t\tthis.maxPolarAngle = Math.PI; // radians\n\n\t\t// How far you can orbit horizontally, upper and lower limits.\n\t\t// If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI )\n\t\tthis.minAzimuthAngle = - Infinity; // radians\n\t\tthis.maxAzimuthAngle = Infinity; // radians\n\n\t\t// Set to true to enable damping (inertia)\n\t\t// If damping is enabled, you must call controls.update() in your animation loop\n\t\tthis.enableDamping = false;\n\t\tthis.dampingFactor = 0.05;\n\n\t\t// This option actually enables dollying in and out; left as \"zoom\" for backwards compatibility.\n\t\t// Set to false to disable zooming\n\t\tthis.enableZoom = true;\n\t\tthis.zoomSpeed = 1.0;\n\n\t\t// Set to false to disable rotating\n\t\tthis.enableRotate = true;\n\t\tthis.rotateSpeed = 1.0;\n\n\t\t// Set to false to disable panning\n\t\tthis.enablePan = true;\n\t\tthis.panSpeed = 1.0;\n\t\tthis.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up\n\t\tthis.keyPanSpeed = 7.0;\t// pixels moved per arrow key push\n\n\t\t// Set to true to automatically rotate around the target\n\t\t// If auto-rotate is enabled, you must call controls.update() in your animation loop\n\t\tthis.autoRotate = false;\n\t\tthis.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60\n\n\t\t// The four arrow keys\n\t\tthis.keys = { LEFT: 'ArrowLeft', UP: 'ArrowUp', RIGHT: 'ArrowRight', BOTTOM: 'ArrowDown' };\n\n\t\t// Mouse buttons\n\t\tthis.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN };\n\n\t\t// Touch fingers\n\t\tthis.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN };\n\n\t\t// for reset\n\t\tthis.target0 = this.target.clone();\n\t\tthis.position0 = this.object.position.clone();\n\t\tthis.zoom0 = this.object.zoom;\n\n\t\t// the target DOM element for key events\n\t\tthis._domElementKeyEvents = null;\n\n\t\t//\n\t\t// public methods\n\t\t//\n\n\t\tthis.getPolarAngle = function () {\n\n\t\t\treturn spherical.phi;\n\n\t\t};\n\n\t\tthis.getAzimuthalAngle = function () {\n\n\t\t\treturn spherical.theta;\n\n\t\t};\n\n\t\tthis.listenToKeyEvents = function ( domElement ) {\n\n\t\t\tdomElement.addEventListener( 'keydown', onKeyDown );\n\t\t\tthis._domElementKeyEvents = domElement;\n\n\t\t};\n\n\t\tthis.saveState = function () {\n\n\t\t\tscope.target0.copy( scope.target );\n\t\t\tscope.position0.copy( scope.object.position );\n\t\t\tscope.zoom0 = scope.object.zoom;\n\n\t\t};\n\n\t\tthis.reset = function () {\n\n\t\t\tscope.target.copy( scope.target0 );\n\t\t\tscope.object.position.copy( scope.position0 );\n\t\t\tscope.object.zoom = scope.zoom0;\n\n\t\t\tscope.object.updateProjectionMatrix();\n\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\tscope.update();\n\n\t\t\tstate = STATE.NONE;\n\n\t\t};\n\n\t\t// this method is exposed, but perhaps it would be better if we can make it private...\n\t\tthis.update = function () {\n\n\t\t\tconst offset = new Vector3();\n\n\t\t\t// so camera.up is the orbit axis\n\t\t\tconst quat = new Quaternion().setFromUnitVectors( object.up, new Vector3( 0, 1, 0 ) );\n\t\t\tconst quatInverse = quat.clone().invert();\n\n\t\t\tconst lastPosition = new Vector3();\n\t\t\tconst lastQuaternion = new Quaternion();\n\n\t\t\tconst twoPI = 2 * Math.PI;\n\n\t\t\treturn function update() {\n\n\t\t\t\tconst position = scope.object.position;\n\n\t\t\t\toffset.copy( position ).sub( scope.target );\n\n\t\t\t\t// rotate offset to \"y-axis-is-up\" space\n\t\t\t\toffset.applyQuaternion( quat );\n\n\t\t\t\t// angle from z-axis around y-axis\n\t\t\t\tspherical.setFromVector3( offset );\n\n\t\t\t\tif ( scope.autoRotate && state === STATE.NONE ) {\n\n\t\t\t\t\trotateLeft( getAutoRotationAngle() );\n\n\t\t\t\t}\n\n\t\t\t\tif ( scope.enableDamping ) {\n\n\t\t\t\t\tspherical.theta += sphericalDelta.theta * scope.dampingFactor;\n\t\t\t\t\tspherical.phi += sphericalDelta.phi * scope.dampingFactor;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tspherical.theta += sphericalDelta.theta;\n\t\t\t\t\tspherical.phi += sphericalDelta.phi;\n\n\t\t\t\t}\n\n\t\t\t\t// restrict theta to be between desired limits\n\n\t\t\t\tlet min = scope.minAzimuthAngle;\n\t\t\t\tlet max = scope.maxAzimuthAngle;\n\n\t\t\t\tif ( isFinite( min ) && isFinite( max ) ) {\n\n\t\t\t\t\tif ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;\n\n\t\t\t\t\tif ( max < - Math.PI ) max += twoPI; else if ( max > Math.PI ) max -= twoPI;\n\n\t\t\t\t\tif ( min <= max ) {\n\n\t\t\t\t\t\tspherical.theta = Math.max( min, Math.min( max, spherical.theta ) );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tspherical.theta = ( spherical.theta > ( min + max ) / 2 ) ?\n\t\t\t\t\t\t\tMath.max( min, spherical.theta ) :\n\t\t\t\t\t\t\tMath.min( max, spherical.theta );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// restrict phi to be between desired limits\n\t\t\t\tspherical.phi = Math.max( scope.minPolarAngle, Math.min( scope.maxPolarAngle, spherical.phi ) );\n\n\t\t\t\tspherical.makeSafe();\n\n\n\t\t\t\tspherical.radius *= scale;\n\n\t\t\t\t// restrict radius to be between desired limits\n\t\t\t\tspherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) );\n\n\t\t\t\t// move target to panned location\n\n\t\t\t\tif ( scope.enableDamping === true ) {\n\n\t\t\t\t\tscope.target.addScaledVector( panOffset, scope.dampingFactor );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tscope.target.add( panOffset );\n\n\t\t\t\t}\n\n\t\t\t\toffset.setFromSpherical( spherical );\n\n\t\t\t\t// rotate offset back to \"camera-up-vector-is-up\" space\n\t\t\t\toffset.applyQuaternion( quatInverse );\n\n\t\t\t\tposition.copy( scope.target ).add( offset );\n\n\t\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\t\tif ( scope.enableDamping === true ) {\n\n\t\t\t\t\tsphericalDelta.theta *= ( 1 - scope.dampingFactor );\n\t\t\t\t\tsphericalDelta.phi *= ( 1 - scope.dampingFactor );\n\n\t\t\t\t\tpanOffset.multiplyScalar( 1 - scope.dampingFactor );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tsphericalDelta.set( 0, 0, 0 );\n\n\t\t\t\t\tpanOffset.set( 0, 0, 0 );\n\n\t\t\t\t}\n\n\t\t\t\tscale = 1;\n\n\t\t\t\t// update condition is:\n\t\t\t\t// min(camera displacement, camera rotation in radians)^2 > EPS\n\t\t\t\t// using small-angle approximation cos(x/2) = 1 - x^2 / 8\n\n\t\t\t\tif ( zoomChanged ||\n\t\t\t\t\tlastPosition.distanceToSquared( scope.object.position ) > EPS ||\n\t\t\t\t\t8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ) {\n\n\t\t\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\t\t\tlastPosition.copy( scope.object.position );\n\t\t\t\t\tlastQuaternion.copy( scope.object.quaternion );\n\t\t\t\t\tzoomChanged = false;\n\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\n\t\t\t};\n\n\t\t}();\n\n\t\tthis.dispose = function () {\n\n\t\t\tscope.domElement.removeEventListener( 'contextmenu', onContextMenu );\n\n\t\t\tscope.domElement.removeEventListener( 'pointerdown', onPointerDown );\n\t\t\tscope.domElement.removeEventListener( 'pointercancel', onPointerCancel );\n\t\t\tscope.domElement.removeEventListener( 'wheel', onMouseWheel );\n\n\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointermove', onPointerMove );\n\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointerup', onPointerUp );\n\n\n\t\t\tif ( scope._domElementKeyEvents !== null ) {\n\n\t\t\t\tscope._domElementKeyEvents.removeEventListener( 'keydown', onKeyDown );\n\n\t\t\t}\n\n\t\t\t//scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?\n\n\t\t};\n\n\t\t//\n\t\t// internals\n\t\t//\n\n\t\tconst scope = this;\n\n\t\tconst STATE = {\n\t\t\tNONE: - 1,\n\t\t\tROTATE: 0,\n\t\t\tDOLLY: 1,\n\t\t\tPAN: 2,\n\t\t\tTOUCH_ROTATE: 3,\n\t\t\tTOUCH_PAN: 4,\n\t\t\tTOUCH_DOLLY_PAN: 5,\n\t\t\tTOUCH_DOLLY_ROTATE: 6\n\t\t};\n\n\t\tlet state = STATE.NONE;\n\n\t\tconst EPS = 0.000001;\n\n\t\t// current position in spherical coordinates\n\t\tconst spherical = new Spherical();\n\t\tconst sphericalDelta = new Spherical();\n\n\t\tlet scale = 1;\n\t\tconst panOffset = new Vector3();\n\t\tlet zoomChanged = false;\n\n\t\tconst rotateStart = new Vector2();\n\t\tconst rotateEnd = new Vector2();\n\t\tconst rotateDelta = new Vector2();\n\n\t\tconst panStart = new Vector2();\n\t\tconst panEnd = new Vector2();\n\t\tconst panDelta = new Vector2();\n\n\t\tconst dollyStart = new Vector2();\n\t\tconst dollyEnd = new Vector2();\n\t\tconst dollyDelta = new Vector2();\n\n\t\tconst pointers = [];\n\t\tconst pointerPositions = {};\n\n\t\tfunction getAutoRotationAngle() {\n\n\t\t\treturn 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;\n\n\t\t}\n\n\t\tfunction getZoomScale() {\n\n\t\t\treturn Math.pow( 0.95, scope.zoomSpeed );\n\n\t\t}\n\n\t\tfunction rotateLeft( angle ) {\n\n\t\t\tsphericalDelta.theta -= angle;\n\n\t\t}\n\n\t\tfunction rotateUp( angle ) {\n\n\t\t\tsphericalDelta.phi -= angle;\n\n\t\t}\n\n\t\tconst panLeft = function () {\n\n\t\t\tconst v = new Vector3();\n\n\t\t\treturn function panLeft( distance, objectMatrix ) {\n\n\t\t\t\tv.setFromMatrixColumn( objectMatrix, 0 ); // get X column of objectMatrix\n\t\t\t\tv.multiplyScalar( - distance );\n\n\t\t\t\tpanOffset.add( v );\n\n\t\t\t};\n\n\t\t}();\n\n\t\tconst panUp = function () {\n\n\t\t\tconst v = new Vector3();\n\n\t\t\treturn function panUp( distance, objectMatrix ) {\n\n\t\t\t\tif ( scope.screenSpacePanning === true ) {\n\n\t\t\t\t\tv.setFromMatrixColumn( objectMatrix, 1 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tv.setFromMatrixColumn( objectMatrix, 0 );\n\t\t\t\t\tv.crossVectors( scope.object.up, v );\n\n\t\t\t\t}\n\n\t\t\t\tv.multiplyScalar( distance );\n\n\t\t\t\tpanOffset.add( v );\n\n\t\t\t};\n\n\t\t}();\n\n\t\t// deltaX and deltaY are in pixels; right and down are positive\n\t\tconst pan = function () {\n\n\t\t\tconst offset = new Vector3();\n\n\t\t\treturn function pan( deltaX, deltaY ) {\n\n\t\t\t\tconst element = scope.domElement;\n\n\t\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\t\t// perspective\n\t\t\t\t\tconst position = scope.object.position;\n\t\t\t\t\toffset.copy( position ).sub( scope.target );\n\t\t\t\t\tlet targetDistance = offset.length();\n\n\t\t\t\t\t// half of the fov is center to top of screen\n\t\t\t\t\ttargetDistance *= Math.tan( ( scope.object.fov / 2 ) * Math.PI / 180.0 );\n\n\t\t\t\t\t// we use only clientHeight here so aspect ratio does not distort speed\n\t\t\t\t\tpanLeft( 2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix );\n\t\t\t\t\tpanUp( 2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix );\n\n\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\t// orthographic\n\t\t\t\t\tpanLeft( deltaX * ( scope.object.right - scope.object.left ) / scope.object.zoom / element.clientWidth, scope.object.matrix );\n\t\t\t\t\tpanUp( deltaY * ( scope.object.top - scope.object.bottom ) / scope.object.zoom / element.clientHeight, scope.object.matrix );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// camera neither orthographic nor perspective\n\t\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' );\n\t\t\t\t\tscope.enablePan = false;\n\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t}();\n\n\t\tfunction dollyOut( dollyScale ) {\n\n\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\tscale /= dollyScale;\n\n\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\tscope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom * dollyScale ) );\n\t\t\t\tscope.object.updateProjectionMatrix();\n\t\t\t\tzoomChanged = true;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );\n\t\t\t\tscope.enableZoom = false;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction dollyIn( dollyScale ) {\n\n\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\tscale *= dollyScale;\n\n\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\tscope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / dollyScale ) );\n\t\t\t\tscope.object.updateProjectionMatrix();\n\t\t\t\tzoomChanged = true;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );\n\t\t\t\tscope.enableZoom = false;\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\t\t// event callbacks - update the object state\n\t\t//\n\n\t\tfunction handleMouseDownRotate( event ) {\n\n\t\t\trotateStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseDownDolly( event ) {\n\n\t\t\tdollyStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseDownPan( event ) {\n\n\t\t\tpanStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseMoveRotate( event ) {\n\n\t\t\trotateEnd.set( event.clientX, event.clientY );\n\n\t\t\trotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );\n\n\t\t\tconst element = scope.domElement;\n\n\t\t\trotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height\n\n\t\t\trotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );\n\n\t\t\trotateStart.copy( rotateEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseMoveDolly( event ) {\n\n\t\t\tdollyEnd.set( event.clientX, event.clientY );\n\n\t\t\tdollyDelta.subVectors( dollyEnd, dollyStart );\n\n\t\t\tif ( dollyDelta.y > 0 ) {\n\n\t\t\t\tdollyOut( getZoomScale() );\n\n\t\t\t} else if ( dollyDelta.y < 0 ) {\n\n\t\t\t\tdollyIn( getZoomScale() );\n\n\t\t\t}\n\n\t\t\tdollyStart.copy( dollyEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseMovePan( event ) {\n\n\t\t\tpanEnd.set( event.clientX, event.clientY );\n\n\t\t\tpanDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );\n\n\t\t\tpan( panDelta.x, panDelta.y );\n\n\t\t\tpanStart.copy( panEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseUp( /*event*/ ) {\n\n\t\t\t// no-op\n\n\t\t}\n\n\t\tfunction handleMouseWheel( event ) {\n\n\t\t\tif ( event.deltaY < 0 ) {\n\n\t\t\t\tdollyIn( getZoomScale() );\n\n\t\t\t} else if ( event.deltaY > 0 ) {\n\n\t\t\t\tdollyOut( getZoomScale() );\n\n\t\t\t}\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleKeyDown( event ) {\n\n\t\t\tlet needsUpdate = false;\n\n\t\t\tswitch ( event.code ) {\n\n\t\t\t\tcase scope.keys.UP:\n\t\t\t\t\tpan( 0, scope.keyPanSpeed );\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.BOTTOM:\n\t\t\t\t\tpan( 0, - scope.keyPanSpeed );\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.LEFT:\n\t\t\t\t\tpan( scope.keyPanSpeed, 0 );\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.RIGHT:\n\t\t\t\t\tpan( - scope.keyPanSpeed, 0 );\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif ( needsUpdate ) {\n\n\t\t\t\t// prevent the browser from scrolling on cursor keys\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tscope.update();\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tfunction handleTouchStartRotate() {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\trotateStart.set( pointers[ 0 ].pageX, pointers[ 0 ].pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst x = 0.5 * ( pointers[ 0 ].pageX + pointers[ 1 ].pageX );\n\t\t\t\tconst y = 0.5 * ( pointers[ 0 ].pageY + pointers[ 1 ].pageY );\n\n\t\t\t\trotateStart.set( x, y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction handleTouchStartPan() {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\tpanStart.set( pointers[ 0 ].pageX, pointers[ 0 ].pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst x = 0.5 * ( pointers[ 0 ].pageX + pointers[ 1 ].pageX );\n\t\t\t\tconst y = 0.5 * ( pointers[ 0 ].pageY + pointers[ 1 ].pageY );\n\n\t\t\t\tpanStart.set( x, y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction handleTouchStartDolly() {\n\n\t\t\tconst dx = pointers[ 0 ].pageX - pointers[ 1 ].pageX;\n\t\t\tconst dy = pointers[ 0 ].pageY - pointers[ 1 ].pageY;\n\n\t\t\tconst distance = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\tdollyStart.set( 0, distance );\n\n\t\t}\n\n\t\tfunction handleTouchStartDollyPan() {\n\n\t\t\tif ( scope.enableZoom ) handleTouchStartDolly();\n\n\t\t\tif ( scope.enablePan ) handleTouchStartPan();\n\n\t\t}\n\n\t\tfunction handleTouchStartDollyRotate() {\n\n\t\t\tif ( scope.enableZoom ) handleTouchStartDolly();\n\n\t\t\tif ( scope.enableRotate ) handleTouchStartRotate();\n\n\t\t}\n\n\t\tfunction handleTouchMoveRotate( event ) {\n\n\t\t\tif ( pointers.length == 1 ) {\n\n\t\t\t\trotateEnd.set( event.pageX, event.pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\t\tconst x = 0.5 * ( event.pageX + position.x );\n\t\t\t\tconst y = 0.5 * ( event.pageY + position.y );\n\n\t\t\t\trotateEnd.set( x, y );\n\n\t\t\t}\n\n\t\t\trotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );\n\n\t\t\tconst element = scope.domElement;\n\n\t\t\trotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height\n\n\t\t\trotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );\n\n\t\t\trotateStart.copy( rotateEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMovePan( event ) {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\tpanEnd.set( event.pageX, event.pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\t\tconst x = 0.5 * ( event.pageX + position.x );\n\t\t\t\tconst y = 0.5 * ( event.pageY + position.y );\n\n\t\t\t\tpanEnd.set( x, y );\n\n\t\t\t}\n\n\t\t\tpanDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );\n\n\t\t\tpan( panDelta.x, panDelta.y );\n\n\t\t\tpanStart.copy( panEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDolly( event ) {\n\n\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\tconst dx = event.pageX - position.x;\n\t\t\tconst dy = event.pageY - position.y;\n\n\t\t\tconst distance = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\tdollyEnd.set( 0, distance );\n\n\t\t\tdollyDelta.set( 0, Math.pow( dollyEnd.y / dollyStart.y, scope.zoomSpeed ) );\n\n\t\t\tdollyOut( dollyDelta.y );\n\n\t\t\tdollyStart.copy( dollyEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDollyPan( event ) {\n\n\t\t\tif ( scope.enableZoom ) handleTouchMoveDolly( event );\n\n\t\t\tif ( scope.enablePan ) handleTouchMovePan( event );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDollyRotate( event ) {\n\n\t\t\tif ( scope.enableZoom ) handleTouchMoveDolly( event );\n\n\t\t\tif ( scope.enableRotate ) handleTouchMoveRotate( event );\n\n\t\t}\n\n\t\tfunction handleTouchEnd( /*event*/ ) {\n\n\t\t\t// no-op\n\n\t\t}\n\n\t\t//\n\t\t// event handlers - FSM: listen for events and reset state\n\t\t//\n\n\t\tfunction onPointerDown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\taddPointer( event );\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchStart( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseDown( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchMove( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseMove( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerUp( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchEnd();\n\n\t\t\t} else {\n\n\t\t\t\tonMouseUp( event );\n\n\t\t\t}\n\n\t\t\tremovePointer( event );\n\n\t\t\t//\n\n\t\t\tif ( pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerCancel( event ) {\n\n\t\t\tremovePointer( event );\n\n\t\t}\n\n\t\tfunction onMouseDown( event ) {\n\n\t\t\tlet mouseAction;\n\n\t\t\tswitch ( event.button ) {\n\n\t\t\t\tcase 0:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.LEFT;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.MIDDLE;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.RIGHT;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tmouseAction = - 1;\n\n\t\t\t}\n\n\t\t\tswitch ( mouseAction ) {\n\n\t\t\t\tcase MOUSE.DOLLY:\n\n\t\t\t\t\tif ( scope.enableZoom === false ) return;\n\n\t\t\t\t\thandleMouseDownDolly( event );\n\n\t\t\t\t\tstate = STATE.DOLLY;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MOUSE.ROTATE:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\thandleMouseDownPan( event );\n\n\t\t\t\t\t\tstate = STATE.PAN;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\thandleMouseDownRotate( event );\n\n\t\t\t\t\t\tstate = STATE.ROTATE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MOUSE.PAN:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\thandleMouseDownRotate( event );\n\n\t\t\t\t\t\tstate = STATE.ROTATE;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\thandleMouseDownPan( event );\n\n\t\t\t\t\t\tstate = STATE.PAN;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t\tif ( state !== STATE.NONE ) {\n\n\t\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onMouseMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tswitch ( state ) {\n\n\t\t\t\tcase STATE.ROTATE:\n\n\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleMouseMoveRotate( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.DOLLY:\n\n\t\t\t\t\tif ( scope.enableZoom === false ) return;\n\n\t\t\t\t\thandleMouseMoveDolly( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.PAN:\n\n\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\thandleMouseMovePan( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onMouseUp( event ) {\n\n\t\t\thandleMouseUp( event );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t\tstate = STATE.NONE;\n\n\t\t}\n\n\t\tfunction onMouseWheel( event ) {\n\n\t\t\tif ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\thandleMouseWheel( event );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction onKeyDown( event ) {\n\n\t\t\tif ( scope.enabled === false || scope.enablePan === false ) return;\n\n\t\t\thandleKeyDown( event );\n\n\t\t}\n\n\t\tfunction onTouchStart( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( pointers.length ) {\n\n\t\t\t\tcase 1:\n\n\t\t\t\t\tswitch ( scope.touches.ONE ) {\n\n\t\t\t\t\t\tcase TOUCH.ROTATE:\n\n\t\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartRotate();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_ROTATE;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase TOUCH.PAN:\n\n\t\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartPan();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_PAN;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\n\t\t\t\t\tswitch ( scope.touches.TWO ) {\n\n\t\t\t\t\t\tcase TOUCH.DOLLY_PAN:\n\n\t\t\t\t\t\t\tif ( scope.enableZoom === false && scope.enablePan === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartDollyPan();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_DOLLY_PAN;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase TOUCH.DOLLY_ROTATE:\n\n\t\t\t\t\t\t\tif ( scope.enableZoom === false && scope.enableRotate === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartDollyRotate();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_DOLLY_ROTATE;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t\tif ( state !== STATE.NONE ) {\n\n\t\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onTouchMove( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( state ) {\n\n\t\t\t\tcase STATE.TOUCH_ROTATE:\n\n\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleTouchMoveRotate( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_PAN:\n\n\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\thandleTouchMovePan( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_DOLLY_PAN:\n\n\t\t\t\t\tif ( scope.enableZoom === false && scope.enablePan === false ) return;\n\n\t\t\t\t\thandleTouchMoveDollyPan( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_DOLLY_ROTATE:\n\n\t\t\t\t\tif ( scope.enableZoom === false && scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleTouchMoveDollyRotate( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onTouchEnd( event ) {\n\n\t\t\thandleTouchEnd( event );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t\tstate = STATE.NONE;\n\n\t\t}\n\n\t\tfunction onContextMenu( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t}\n\n\t\tfunction addPointer( event ) {\n\n\t\t\tpointers.push( event );\n\n\t\t}\n\n\t\tfunction removePointer( event ) {\n\n\t\t\tdelete pointerPositions[ event.pointerId ];\n\n\t\t\tfor ( let i = 0; i < pointers.length; i ++ ) {\n\n\t\t\t\tif ( pointers[ i ].pointerId == event.pointerId ) {\n\n\t\t\t\t\tpointers.splice( i, 1 );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction trackPointer( event ) {\n\n\t\t\tlet position = pointerPositions[ event.pointerId ];\n\n\t\t\tif ( position === undefined ) {\n\n\t\t\t\tposition = new Vector2();\n\t\t\t\tpointerPositions[ event.pointerId ] = position;\n\n\t\t\t}\n\n\t\t\tposition.set( event.pageX, event.pageY );\n\n\t\t}\n\n\t\tfunction getSecondPointerPosition( event ) {\n\n\t\t\tconst pointer = ( event.pointerId === pointers[ 0 ].pointerId ) ? pointers[ 1 ] : pointers[ 0 ];\n\n\t\t\treturn pointerPositions[ pointer.pointerId ];\n\n\t\t}\n\n\t\t//\n\n\t\tscope.domElement.addEventListener( 'contextmenu', onContextMenu );\n\n\t\tscope.domElement.addEventListener( 'pointerdown', onPointerDown );\n\t\tscope.domElement.addEventListener( 'pointercancel', onPointerCancel );\n\t\tscope.domElement.addEventListener( 'wheel', onMouseWheel, { passive: false } );\n\n\t\t// force an update at start\n\n\t\tthis.update();\n\n\t}\n\n}\n\n\n// This set of controls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n// This is very similar to OrbitControls, another set of touch behavior\n//\n// Orbit - right mouse, or left mouse + ctrl/meta/shiftKey / touch: two-finger rotate\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - left mouse, or arrow keys / touch: one-finger move\n\nclass MapControls extends OrbitControls {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper( object, domElement );\n\n\t\tthis.screenSpacePanning = false; // pan orthogonal to world-space direction camera.up\n\n\t\tthis.mouseButtons.LEFT = MOUSE.PAN;\n\t\tthis.mouseButtons.RIGHT = MOUSE.ROTATE;\n\n\t\tthis.touches.ONE = TOUCH.PAN;\n\t\tthis.touches.TWO = TOUCH.DOLLY_ROTATE;\n\n\t}\n\n}\n\nexport { OrbitControls, MapControls };\n","import {\n\tEventDispatcher,\n\tQuaternion,\n\tVector3\n} from 'three';\n\nconst _changeEvent = { type: 'change' };\n\nclass FlyControls extends EventDispatcher {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper();\n\n\t\tif ( domElement === undefined ) {\n\n\t\t\tconsole.warn( 'THREE.FlyControls: The second parameter \"domElement\" is now mandatory.' );\n\t\t\tdomElement = document;\n\n\t\t}\n\n\t\tthis.object = object;\n\t\tthis.domElement = domElement;\n\n\t\t// API\n\n\t\tthis.movementSpeed = 1.0;\n\t\tthis.rollSpeed = 0.005;\n\n\t\tthis.dragToLook = false;\n\t\tthis.autoForward = false;\n\n\t\t// disable default target object behavior\n\n\t\t// internals\n\n\t\tconst scope = this;\n\n\t\tconst EPS = 0.000001;\n\n\t\tconst lastQuaternion = new Quaternion();\n\t\tconst lastPosition = new Vector3();\n\n\t\tthis.tmpQuaternion = new Quaternion();\n\n\t\tthis.mouseStatus = 0;\n\n\t\tthis.moveState = { up: 0, down: 0, left: 0, right: 0, forward: 0, back: 0, pitchUp: 0, pitchDown: 0, yawLeft: 0, yawRight: 0, rollLeft: 0, rollRight: 0 };\n\t\tthis.moveVector = new Vector3( 0, 0, 0 );\n\t\tthis.rotationVector = new Vector3( 0, 0, 0 );\n\n\t\tthis.keydown = function ( event ) {\n\n\t\t\tif ( event.altKey ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\n\t\t\t\tcase 'ShiftLeft':\n\t\t\t\tcase 'ShiftRight': this.movementSpeedMultiplier = .1; break;\n\n\t\t\t\tcase 'KeyW': this.moveState.forward = 1; break;\n\t\t\t\tcase 'KeyS': this.moveState.back = 1; break;\n\n\t\t\t\tcase 'KeyA': this.moveState.left = 1; break;\n\t\t\t\tcase 'KeyD': this.moveState.right = 1; break;\n\n\t\t\t\tcase 'KeyR': this.moveState.up = 1; break;\n\t\t\t\tcase 'KeyF': this.moveState.down = 1; break;\n\n\t\t\t\tcase 'ArrowUp': this.moveState.pitchUp = 1; break;\n\t\t\t\tcase 'ArrowDown': this.moveState.pitchDown = 1; break;\n\n\t\t\t\tcase 'ArrowLeft': this.moveState.yawLeft = 1; break;\n\t\t\t\tcase 'ArrowRight': this.moveState.yawRight = 1; break;\n\n\t\t\t\tcase 'KeyQ': this.moveState.rollLeft = 1; break;\n\t\t\t\tcase 'KeyE': this.moveState.rollRight = 1; break;\n\n\t\t\t}\n\n\t\t\tthis.updateMovementVector();\n\t\t\tthis.updateRotationVector();\n\n\t\t};\n\n\t\tthis.keyup = function ( event ) {\n\n\t\t\tswitch ( event.code ) {\n\n\t\t\t\tcase 'ShiftLeft':\n\t\t\t\tcase 'ShiftRight': this.movementSpeedMultiplier = 1; break;\n\n\t\t\t\tcase 'KeyW': this.moveState.forward = 0; break;\n\t\t\t\tcase 'KeyS': this.moveState.back = 0; break;\n\n\t\t\t\tcase 'KeyA': this.moveState.left = 0; break;\n\t\t\t\tcase 'KeyD': this.moveState.right = 0; break;\n\n\t\t\t\tcase 'KeyR': this.moveState.up = 0; break;\n\t\t\t\tcase 'KeyF': this.moveState.down = 0; break;\n\n\t\t\t\tcase 'ArrowUp': this.moveState.pitchUp = 0; break;\n\t\t\t\tcase 'ArrowDown': this.moveState.pitchDown = 0; break;\n\n\t\t\t\tcase 'ArrowLeft': this.moveState.yawLeft = 0; break;\n\t\t\t\tcase 'ArrowRight': this.moveState.yawRight = 0; break;\n\n\t\t\t\tcase 'KeyQ': this.moveState.rollLeft = 0; break;\n\t\t\t\tcase 'KeyE': this.moveState.rollRight = 0; break;\n\n\t\t\t}\n\n\t\t\tthis.updateMovementVector();\n\t\t\tthis.updateRotationVector();\n\n\t\t};\n\n\t\tthis.mousedown = function ( event ) {\n\n\t\t\tif ( this.dragToLook ) {\n\n\t\t\t\tthis.mouseStatus ++;\n\n\t\t\t} else {\n\n\t\t\t\tswitch ( event.button ) {\n\n\t\t\t\t\tcase 0: this.moveState.forward = 1; break;\n\t\t\t\t\tcase 2: this.moveState.back = 1; break;\n\n\t\t\t\t}\n\n\t\t\t\tthis.updateMovementVector();\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.mousemove = function ( event ) {\n\n\t\t\tif ( ! this.dragToLook || this.mouseStatus > 0 ) {\n\n\t\t\t\tconst container = this.getContainerDimensions();\n\t\t\t\tconst halfWidth = container.size[ 0 ] / 2;\n\t\t\t\tconst halfHeight = container.size[ 1 ] / 2;\n\n\t\t\t\tthis.moveState.yawLeft = - ( ( event.pageX - container.offset[ 0 ] ) - halfWidth ) / halfWidth;\n\t\t\t\tthis.moveState.pitchDown = ( ( event.pageY - container.offset[ 1 ] ) - halfHeight ) / halfHeight;\n\n\t\t\t\tthis.updateRotationVector();\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.mouseup = function ( event ) {\n\n\t\t\tif ( this.dragToLook ) {\n\n\t\t\t\tthis.mouseStatus --;\n\n\t\t\t\tthis.moveState.yawLeft = this.moveState.pitchDown = 0;\n\n\t\t\t} else {\n\n\t\t\t\tswitch ( event.button ) {\n\n\t\t\t\t\tcase 0: this.moveState.forward = 0; break;\n\t\t\t\t\tcase 2: this.moveState.back = 0; break;\n\n\t\t\t\t}\n\n\t\t\t\tthis.updateMovementVector();\n\n\t\t\t}\n\n\t\t\tthis.updateRotationVector();\n\n\t\t};\n\n\t\tthis.update = function ( delta ) {\n\n\t\t\tconst moveMult = delta * scope.movementSpeed;\n\t\t\tconst rotMult = delta * scope.rollSpeed;\n\n\t\t\tscope.object.translateX( scope.moveVector.x * moveMult );\n\t\t\tscope.object.translateY( scope.moveVector.y * moveMult );\n\t\t\tscope.object.translateZ( scope.moveVector.z * moveMult );\n\n\t\t\tscope.tmpQuaternion.set( scope.rotationVector.x * rotMult, scope.rotationVector.y * rotMult, scope.rotationVector.z * rotMult, 1 ).normalize();\n\t\t\tscope.object.quaternion.multiply( scope.tmpQuaternion );\n\n\t\t\tif (\n\t\t\t\tlastPosition.distanceToSquared( scope.object.position ) > EPS ||\n\t\t\t\t8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS\n\t\t\t) {\n\n\t\t\t\tscope.dispatchEvent( _changeEvent );\n\t\t\t\tlastQuaternion.copy( scope.object.quaternion );\n\t\t\t\tlastPosition.copy( scope.object.position );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.updateMovementVector = function () {\n\n\t\t\tconst forward = ( this.moveState.forward || ( this.autoForward && ! this.moveState.back ) ) ? 1 : 0;\n\n\t\t\tthis.moveVector.x = ( - this.moveState.left + this.moveState.right );\n\t\t\tthis.moveVector.y = ( - this.moveState.down + this.moveState.up );\n\t\t\tthis.moveVector.z = ( - forward + this.moveState.back );\n\n\t\t\t//console.log( 'move:', [ this.moveVector.x, this.moveVector.y, this.moveVector.z ] );\n\n\t\t};\n\n\t\tthis.updateRotationVector = function () {\n\n\t\t\tthis.rotationVector.x = ( - this.moveState.pitchDown + this.moveState.pitchUp );\n\t\t\tthis.rotationVector.y = ( - this.moveState.yawRight + this.moveState.yawLeft );\n\t\t\tthis.rotationVector.z = ( - this.moveState.rollRight + this.moveState.rollLeft );\n\n\t\t\t//console.log( 'rotate:', [ this.rotationVector.x, this.rotationVector.y, this.rotationVector.z ] );\n\n\t\t};\n\n\t\tthis.getContainerDimensions = function () {\n\n\t\t\tif ( this.domElement != document ) {\n\n\t\t\t\treturn {\n\t\t\t\t\tsize: [ this.domElement.offsetWidth, this.domElement.offsetHeight ],\n\t\t\t\t\toffset: [ this.domElement.offsetLeft, this.domElement.offsetTop ]\n\t\t\t\t};\n\n\t\t\t} else {\n\n\t\t\t\treturn {\n\t\t\t\t\tsize: [ window.innerWidth, window.innerHeight ],\n\t\t\t\t\toffset: [ 0, 0 ]\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.dispose = function () {\n\n\t\t\tthis.domElement.removeEventListener( 'contextmenu', contextmenu );\n\t\t\tthis.domElement.removeEventListener( 'mousedown', _mousedown );\n\t\t\tthis.domElement.removeEventListener( 'mousemove', _mousemove );\n\t\t\tthis.domElement.removeEventListener( 'mouseup', _mouseup );\n\n\t\t\twindow.removeEventListener( 'keydown', _keydown );\n\t\t\twindow.removeEventListener( 'keyup', _keyup );\n\n\t\t};\n\n\t\tconst _mousemove = this.mousemove.bind( this );\n\t\tconst _mousedown = this.mousedown.bind( this );\n\t\tconst _mouseup = this.mouseup.bind( this );\n\t\tconst _keydown = this.keydown.bind( this );\n\t\tconst _keyup = this.keyup.bind( this );\n\n\t\tthis.domElement.addEventListener( 'contextmenu', contextmenu );\n\n\t\tthis.domElement.addEventListener( 'mousemove', _mousemove );\n\t\tthis.domElement.addEventListener( 'mousedown', _mousedown );\n\t\tthis.domElement.addEventListener( 'mouseup', _mouseup );\n\n\t\twindow.addEventListener( 'keydown', _keydown );\n\t\twindow.addEventListener( 'keyup', _keyup );\n\n\t\tthis.updateMovementVector();\n\t\tthis.updateRotationVector();\n\n\t}\n\n}\n\nfunction contextmenu( event ) {\n\n\tevent.preventDefault();\n\n}\n\nexport { FlyControls };\n","/**\n * Full-screen textured quad shader\n */\n\nvar CopyShader = {\n\n\tuniforms: {\n\n\t\t'tDiffuse': { value: null },\n\t\t'opacity': { value: 1.0 }\n\n\t},\n\n\tvertexShader: /* glsl */`\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}`,\n\n\tfragmentShader: /* glsl */`\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\t\t}`\n\n};\n\nexport { CopyShader };\n","import {\n\tBufferGeometry,\n\tFloat32BufferAttribute,\n\tOrthographicCamera,\n\tMesh\n} from 'three';\n\nclass Pass {\n\n\tconstructor() {\n\n\t\t// if set to true, the pass is processed by the composer\n\t\tthis.enabled = true;\n\n\t\t// if set to true, the pass indicates to swap read and write buffer after rendering\n\t\tthis.needsSwap = true;\n\n\t\t// if set to true, the pass clears its buffer before rendering\n\t\tthis.clear = false;\n\n\t\t// if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer.\n\t\tthis.renderToScreen = false;\n\n\t}\n\n\tsetSize( /* width, height */ ) {}\n\n\trender( /* renderer, writeBuffer, readBuffer, deltaTime, maskActive */ ) {\n\n\t\tconsole.error( 'THREE.Pass: .render() must be implemented in derived pass.' );\n\n\t}\n\n}\n\n// Helper for passes that need to fill the viewport with a single quad.\n\nconst _camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );\n\n// https://github.com/mrdoob/three.js/pull/21358\n\nconst _geometry = new BufferGeometry();\n_geometry.setAttribute( 'position', new Float32BufferAttribute( [ - 1, 3, 0, - 1, - 1, 0, 3, - 1, 0 ], 3 ) );\n_geometry.setAttribute( 'uv', new Float32BufferAttribute( [ 0, 2, 0, 0, 2, 0 ], 2 ) );\n\nclass FullScreenQuad {\n\n\tconstructor( material ) {\n\n\t\tthis._mesh = new Mesh( _geometry, material );\n\n\t}\n\n\tdispose() {\n\n\t\tthis._mesh.geometry.dispose();\n\n\t}\n\n\trender( renderer ) {\n\n\t\trenderer.render( this._mesh, _camera );\n\n\t}\n\n\tget material() {\n\n\t\treturn this._mesh.material;\n\n\t}\n\n\tset material( value ) {\n\n\t\tthis._mesh.material = value;\n\n\t}\n\n}\n\nexport { Pass, FullScreenQuad };\n","import {\n\tShaderMaterial,\n\tUniformsUtils\n} from 'three';\nimport { Pass, FullScreenQuad } from '../postprocessing/Pass.js';\n\nclass ShaderPass extends Pass {\n\n\tconstructor( shader, textureID ) {\n\n\t\tsuper();\n\n\t\tthis.textureID = ( textureID !== undefined ) ? textureID : 'tDiffuse';\n\n\t\tif ( shader instanceof ShaderMaterial ) {\n\n\t\t\tthis.uniforms = shader.uniforms;\n\n\t\t\tthis.material = shader;\n\n\t\t} else if ( shader ) {\n\n\t\t\tthis.uniforms = UniformsUtils.clone( shader.uniforms );\n\n\t\t\tthis.material = new ShaderMaterial( {\n\n\t\t\t\tdefines: Object.assign( {}, shader.defines ),\n\t\t\t\tuniforms: this.uniforms,\n\t\t\t\tvertexShader: shader.vertexShader,\n\t\t\t\tfragmentShader: shader.fragmentShader\n\n\t\t\t} );\n\n\t\t}\n\n\t\tthis.fsQuad = new FullScreenQuad( this.material );\n\n\t}\n\n\trender( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {\n\n\t\tif ( this.uniforms[ this.textureID ] ) {\n\n\t\t\tthis.uniforms[ this.textureID ].value = readBuffer.texture;\n\n\t\t}\n\n\t\tthis.fsQuad.material = this.material;\n\n\t\tif ( this.renderToScreen ) {\n\n\t\t\trenderer.setRenderTarget( null );\n\t\t\tthis.fsQuad.render( renderer );\n\n\t\t} else {\n\n\t\t\trenderer.setRenderTarget( writeBuffer );\n\t\t\t// TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600\n\t\t\tif ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\t\t\tthis.fsQuad.render( renderer );\n\n\t\t}\n\n\t}\n\n}\n\nexport { ShaderPass };\n","import { Pass } from '../postprocessing/Pass.js';\n\nclass MaskPass extends Pass {\n\n\tconstructor( scene, camera ) {\n\n\t\tsuper();\n\n\t\tthis.scene = scene;\n\t\tthis.camera = camera;\n\n\t\tthis.clear = true;\n\t\tthis.needsSwap = false;\n\n\t\tthis.inverse = false;\n\n\t}\n\n\trender( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {\n\n\t\tconst context = renderer.getContext();\n\t\tconst state = renderer.state;\n\n\t\t// don't update color or depth\n\n\t\tstate.buffers.color.setMask( false );\n\t\tstate.buffers.depth.setMask( false );\n\n\t\t// lock buffers\n\n\t\tstate.buffers.color.setLocked( true );\n\t\tstate.buffers.depth.setLocked( true );\n\n\t\t// set up stencil\n\n\t\tlet writeValue, clearValue;\n\n\t\tif ( this.inverse ) {\n\n\t\t\twriteValue = 0;\n\t\t\tclearValue = 1;\n\n\t\t} else {\n\n\t\t\twriteValue = 1;\n\t\t\tclearValue = 0;\n\n\t\t}\n\n\t\tstate.buffers.stencil.setTest( true );\n\t\tstate.buffers.stencil.setOp( context.REPLACE, context.REPLACE, context.REPLACE );\n\t\tstate.buffers.stencil.setFunc( context.ALWAYS, writeValue, 0xffffffff );\n\t\tstate.buffers.stencil.setClear( clearValue );\n\t\tstate.buffers.stencil.setLocked( true );\n\n\t\t// draw into the stencil buffer\n\n\t\trenderer.setRenderTarget( readBuffer );\n\t\tif ( this.clear ) renderer.clear();\n\t\trenderer.render( this.scene, this.camera );\n\n\t\trenderer.setRenderTarget( writeBuffer );\n\t\tif ( this.clear ) renderer.clear();\n\t\trenderer.render( this.scene, this.camera );\n\n\t\t// unlock color and depth buffer for subsequent rendering\n\n\t\tstate.buffers.color.setLocked( false );\n\t\tstate.buffers.depth.setLocked( false );\n\n\t\t// only render where stencil is set to 1\n\n\t\tstate.buffers.stencil.setLocked( false );\n\t\tstate.buffers.stencil.setFunc( context.EQUAL, 1, 0xffffffff ); // draw if == 1\n\t\tstate.buffers.stencil.setOp( context.KEEP, context.KEEP, context.KEEP );\n\t\tstate.buffers.stencil.setLocked( true );\n\n\t}\n\n}\n\nclass ClearMaskPass extends Pass {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.needsSwap = false;\n\n\t}\n\n\trender( renderer /*, writeBuffer, readBuffer, deltaTime, maskActive */ ) {\n\n\t\trenderer.state.buffers.stencil.setLocked( false );\n\t\trenderer.state.buffers.stencil.setTest( false );\n\n\t}\n\n}\n\nexport { MaskPass, ClearMaskPass };\n","import {\n\tBufferGeometry,\n\tClock,\n\tFloat32BufferAttribute,\n\tLinearFilter,\n\tMesh,\n\tOrthographicCamera,\n\tRGBAFormat,\n\tVector2,\n\tWebGLRenderTarget\n} from 'three';\nimport { CopyShader } from '../shaders/CopyShader.js';\nimport { ShaderPass } from '../postprocessing/ShaderPass.js';\nimport { MaskPass } from '../postprocessing/MaskPass.js';\nimport { ClearMaskPass } from '../postprocessing/MaskPass.js';\n\nclass EffectComposer {\n\n\tconstructor( renderer, renderTarget ) {\n\n\t\tthis.renderer = renderer;\n\n\t\tif ( renderTarget === undefined ) {\n\n\t\t\tconst parameters = {\n\t\t\t\tminFilter: LinearFilter,\n\t\t\t\tmagFilter: LinearFilter,\n\t\t\t\tformat: RGBAFormat\n\t\t\t};\n\n\t\t\tconst size = renderer.getSize( new Vector2() );\n\t\t\tthis._pixelRatio = renderer.getPixelRatio();\n\t\t\tthis._width = size.width;\n\t\t\tthis._height = size.height;\n\n\t\t\trenderTarget = new WebGLRenderTarget( this._width * this._pixelRatio, this._height * this._pixelRatio, parameters );\n\t\t\trenderTarget.texture.name = 'EffectComposer.rt1';\n\n\t\t} else {\n\n\t\t\tthis._pixelRatio = 1;\n\t\t\tthis._width = renderTarget.width;\n\t\t\tthis._height = renderTarget.height;\n\n\t\t}\n\n\t\tthis.renderTarget1 = renderTarget;\n\t\tthis.renderTarget2 = renderTarget.clone();\n\t\tthis.renderTarget2.texture.name = 'EffectComposer.rt2';\n\n\t\tthis.writeBuffer = this.renderTarget1;\n\t\tthis.readBuffer = this.renderTarget2;\n\n\t\tthis.renderToScreen = true;\n\n\t\tthis.passes = [];\n\n\t\t// dependencies\n\n\t\tif ( CopyShader === undefined ) {\n\n\t\t\tconsole.error( 'THREE.EffectComposer relies on CopyShader' );\n\n\t\t}\n\n\t\tif ( ShaderPass === undefined ) {\n\n\t\t\tconsole.error( 'THREE.EffectComposer relies on ShaderPass' );\n\n\t\t}\n\n\t\tthis.copyPass = new ShaderPass( CopyShader );\n\n\t\tthis.clock = new Clock();\n\n\t}\n\n\tswapBuffers() {\n\n\t\tconst tmp = this.readBuffer;\n\t\tthis.readBuffer = this.writeBuffer;\n\t\tthis.writeBuffer = tmp;\n\n\t}\n\n\taddPass( pass ) {\n\n\t\tthis.passes.push( pass );\n\t\tpass.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );\n\n\t}\n\n\tinsertPass( pass, index ) {\n\n\t\tthis.passes.splice( index, 0, pass );\n\t\tpass.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );\n\n\t}\n\n\tremovePass( pass ) {\n\n\t\tconst index = this.passes.indexOf( pass );\n\n\t\tif ( index !== - 1 ) {\n\n\t\t\tthis.passes.splice( index, 1 );\n\n\t\t}\n\n\t}\n\n\tisLastEnabledPass( passIndex ) {\n\n\t\tfor ( let i = passIndex + 1; i < this.passes.length; i ++ ) {\n\n\t\t\tif ( this.passes[ i ].enabled ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\trender( deltaTime ) {\n\n\t\t// deltaTime value is in seconds\n\n\t\tif ( deltaTime === undefined ) {\n\n\t\t\tdeltaTime = this.clock.getDelta();\n\n\t\t}\n\n\t\tconst currentRenderTarget = this.renderer.getRenderTarget();\n\n\t\tlet maskActive = false;\n\n\t\tfor ( let i = 0, il = this.passes.length; i < il; i ++ ) {\n\n\t\t\tconst pass = this.passes[ i ];\n\n\t\t\tif ( pass.enabled === false ) continue;\n\n\t\t\tpass.renderToScreen = ( this.renderToScreen && this.isLastEnabledPass( i ) );\n\t\t\tpass.render( this.renderer, this.writeBuffer, this.readBuffer, deltaTime, maskActive );\n\n\t\t\tif ( pass.needsSwap ) {\n\n\t\t\t\tif ( maskActive ) {\n\n\t\t\t\t\tconst context = this.renderer.getContext();\n\t\t\t\t\tconst stencil = this.renderer.state.buffers.stencil;\n\n\t\t\t\t\t//context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff );\n\t\t\t\t\tstencil.setFunc( context.NOTEQUAL, 1, 0xffffffff );\n\n\t\t\t\t\tthis.copyPass.render( this.renderer, this.writeBuffer, this.readBuffer, deltaTime );\n\n\t\t\t\t\t//context.stencilFunc( context.EQUAL, 1, 0xffffffff );\n\t\t\t\t\tstencil.setFunc( context.EQUAL, 1, 0xffffffff );\n\n\t\t\t\t}\n\n\t\t\t\tthis.swapBuffers();\n\n\t\t\t}\n\n\t\t\tif ( MaskPass !== undefined ) {\n\n\t\t\t\tif ( pass instanceof MaskPass ) {\n\n\t\t\t\t\tmaskActive = true;\n\n\t\t\t\t} else if ( pass instanceof ClearMaskPass ) {\n\n\t\t\t\t\tmaskActive = false;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.renderer.setRenderTarget( currentRenderTarget );\n\n\t}\n\n\treset( renderTarget ) {\n\n\t\tif ( renderTarget === undefined ) {\n\n\t\t\tconst size = this.renderer.getSize( new Vector2() );\n\t\t\tthis._pixelRatio = this.renderer.getPixelRatio();\n\t\t\tthis._width = size.width;\n\t\t\tthis._height = size.height;\n\n\t\t\trenderTarget = this.renderTarget1.clone();\n\t\t\trenderTarget.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );\n\n\t\t}\n\n\t\tthis.renderTarget1.dispose();\n\t\tthis.renderTarget2.dispose();\n\t\tthis.renderTarget1 = renderTarget;\n\t\tthis.renderTarget2 = renderTarget.clone();\n\n\t\tthis.writeBuffer = this.renderTarget1;\n\t\tthis.readBuffer = this.renderTarget2;\n\n\t}\n\n\tsetSize( width, height ) {\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\n\t\tconst effectiveWidth = this._width * this._pixelRatio;\n\t\tconst effectiveHeight = this._height * this._pixelRatio;\n\n\t\tthis.renderTarget1.setSize( effectiveWidth, effectiveHeight );\n\t\tthis.renderTarget2.setSize( effectiveWidth, effectiveHeight );\n\n\t\tfor ( let i = 0; i < this.passes.length; i ++ ) {\n\n\t\t\tthis.passes[ i ].setSize( effectiveWidth, effectiveHeight );\n\n\t\t}\n\n\t}\n\n\tsetPixelRatio( pixelRatio ) {\n\n\t\tthis._pixelRatio = pixelRatio;\n\n\t\tthis.setSize( this._width, this._height );\n\n\t}\n\n}\n\n\nclass Pass {\n\n\tconstructor() {\n\n\t\t// if set to true, the pass is processed by the composer\n\t\tthis.enabled = true;\n\n\t\t// if set to true, the pass indicates to swap read and write buffer after rendering\n\t\tthis.needsSwap = true;\n\n\t\t// if set to true, the pass clears its buffer before rendering\n\t\tthis.clear = false;\n\n\t\t// if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer.\n\t\tthis.renderToScreen = false;\n\n\t}\n\n\tsetSize( /* width, height */ ) {}\n\n\trender( /* renderer, writeBuffer, readBuffer, deltaTime, maskActive */ ) {\n\n\t\tconsole.error( 'THREE.Pass: .render() must be implemented in derived pass.' );\n\n\t}\n\n}\n\n// Helper for passes that need to fill the viewport with a single quad.\n\nconst _camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );\n\n// https://github.com/mrdoob/three.js/pull/21358\n\nconst _geometry = new BufferGeometry();\n_geometry.setAttribute( 'position', new Float32BufferAttribute( [ - 1, 3, 0, - 1, - 1, 0, 3, - 1, 0 ], 3 ) );\n_geometry.setAttribute( 'uv', new Float32BufferAttribute( [ 0, 2, 0, 0, 2, 0 ], 2 ) );\n\nclass FullScreenQuad {\n\n\tconstructor( material ) {\n\n\t\tthis._mesh = new Mesh( _geometry, material );\n\n\t}\n\n\tdispose() {\n\n\t\tthis._mesh.geometry.dispose();\n\n\t}\n\n\trender( renderer ) {\n\n\t\trenderer.render( this._mesh, _camera );\n\n\t}\n\n\tget material() {\n\n\t\treturn this._mesh.material;\n\n\t}\n\n\tset material( value ) {\n\n\t\tthis._mesh.material = value;\n\n\t}\n\n}\n\nexport { EffectComposer, Pass, FullScreenQuad };\n","import {\n\tColor\n} from 'three';\nimport { Pass } from '../postprocessing/Pass.js';\n\nclass RenderPass extends Pass {\n\n\tconstructor( scene, camera, overrideMaterial, clearColor, clearAlpha ) {\n\n\t\tsuper();\n\n\t\tthis.scene = scene;\n\t\tthis.camera = camera;\n\n\t\tthis.overrideMaterial = overrideMaterial;\n\n\t\tthis.clearColor = clearColor;\n\t\tthis.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0;\n\n\t\tthis.clear = true;\n\t\tthis.clearDepth = false;\n\t\tthis.needsSwap = false;\n\t\tthis._oldClearColor = new Color();\n\n\t}\n\n\trender( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {\n\n\t\tconst oldAutoClear = renderer.autoClear;\n\t\trenderer.autoClear = false;\n\n\t\tlet oldClearAlpha, oldOverrideMaterial;\n\n\t\tif ( this.overrideMaterial !== undefined ) {\n\n\t\t\toldOverrideMaterial = this.scene.overrideMaterial;\n\n\t\t\tthis.scene.overrideMaterial = this.overrideMaterial;\n\n\t\t}\n\n\t\tif ( this.clearColor ) {\n\n\t\t\trenderer.getClearColor( this._oldClearColor );\n\t\t\toldClearAlpha = renderer.getClearAlpha();\n\n\t\t\trenderer.setClearColor( this.clearColor, this.clearAlpha );\n\n\t\t}\n\n\t\tif ( this.clearDepth ) {\n\n\t\t\trenderer.clearDepth();\n\n\t\t}\n\n\t\trenderer.setRenderTarget( this.renderToScreen ? null : readBuffer );\n\n\t\t// TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600\n\t\tif ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\t\trenderer.render( this.scene, this.camera );\n\n\t\tif ( this.clearColor ) {\n\n\t\t\trenderer.setClearColor( this._oldClearColor, oldClearAlpha );\n\n\t\t}\n\n\t\tif ( this.overrideMaterial !== undefined ) {\n\n\t\t\tthis.scene.overrideMaterial = oldOverrideMaterial;\n\n\t\t}\n\n\t\trenderer.autoClear = oldAutoClear;\n\n\t}\n\n}\n\nexport { RenderPass };\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _wrapNativeSuper from '@babel/runtime/helpers/esm/wrapNativeSuper';\nimport _taggedTemplateLiteralLoose from '@babel/runtime/helpers/esm/taggedTemplateLiteralLoose';\n\nfunction last() {\n var _ref;\n\n return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];\n}\n\nfunction negation(a) {\n return -a;\n}\n\nfunction addition(a, b) {\n return a + b;\n}\n\nfunction subtraction(a, b) {\n return a - b;\n}\n\nfunction multiplication(a, b) {\n return a * b;\n}\n\nfunction division(a, b) {\n return a / b;\n}\n\nfunction max() {\n return Math.max.apply(Math, arguments);\n}\n\nfunction min() {\n return Math.min.apply(Math, arguments);\n}\n\nfunction comma() {\n return Array.of.apply(Array, arguments);\n}\n\nvar defaultSymbols = {\n symbols: {\n '*': {\n infix: {\n symbol: '*',\n f: multiplication,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '*',\n regSymbol: '\\\\*'\n },\n '/': {\n infix: {\n symbol: '/',\n f: division,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '/',\n regSymbol: '/'\n },\n '+': {\n infix: {\n symbol: '+',\n f: addition,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '+',\n f: last,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '+',\n regSymbol: '\\\\+'\n },\n '-': {\n infix: {\n symbol: '-',\n f: subtraction,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '-',\n f: negation,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '-',\n regSymbol: '-'\n },\n ',': {\n infix: {\n symbol: ',',\n f: comma,\n notation: 'infix',\n precedence: 1,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: ',',\n regSymbol: ','\n },\n '(': {\n prefix: {\n symbol: '(',\n f: last,\n notation: 'prefix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '(',\n regSymbol: '\\\\('\n },\n ')': {\n postfix: {\n symbol: ')',\n f: undefined,\n notation: 'postfix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: ')',\n regSymbol: '\\\\)'\n },\n min: {\n func: {\n symbol: 'min',\n f: min,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'min',\n regSymbol: 'min\\\\b'\n },\n max: {\n func: {\n symbol: 'max',\n f: max,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'max',\n regSymbol: 'max\\\\b'\n }\n }\n};\n\n// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found and no default was provided.\\n\\n\",\n \"75\": \"important requires a valid style object, got a %s instead.\\n\\n\",\n \"76\": \"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\\n\\n\",\n \"77\": \"remToPx expects a value in \\\"rem\\\" but you provided it in \\\"%s\\\".\\n\\n\",\n \"78\": \"base must be set in \\\"px\\\" or \\\"%\\\" but you set it in \\\"%s\\\".\\n\"\n};\n/**\n * super basic version of sprintf\n * @private\n */\n\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var a = args[0];\n var b = [];\n var c;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\n\n\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n\n function PolishedError(code) {\n var _this;\n\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n\n return _assertThisInitialized(_this);\n }\n\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar unitRegExp = /((?!\\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\\D|$)|ged|darg?|nrut)/g; // Merges additional math functionality into the defaults.\n\nfunction mergeSymbolMaps(additionalSymbols) {\n var symbolMap = {};\n symbolMap.symbols = additionalSymbols ? _extends({}, defaultSymbols.symbols, additionalSymbols.symbols) : _extends({}, defaultSymbols.symbols);\n return symbolMap;\n}\n\nfunction exec(operators, values) {\n var _ref;\n\n var op = operators.pop();\n values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));\n return op.precedence;\n}\n\nfunction calculate(expression, additionalSymbols) {\n var symbolMap = mergeSymbolMaps(additionalSymbols);\n var match;\n var operators = [symbolMap.symbols['('].prefix];\n var values = [];\n var pattern = new RegExp( // Pattern for numbers\n \"\\\\d+(?:\\\\.\\\\d+)?|\" + // ...and patterns for individual operators/function names\n Object.keys(symbolMap.symbols).map(function (key) {\n return symbolMap.symbols[key];\n }) // longer symbols should be listed first\n // $FlowFixMe\n .sort(function (a, b) {\n return b.symbol.length - a.symbol.length;\n }) // $FlowFixMe\n .map(function (val) {\n return val.regSymbol;\n }).join('|') + \"|(\\\\S)\", 'g');\n pattern.lastIndex = 0; // Reset regular expression object\n\n var afterValue = false;\n\n do {\n match = pattern.exec(expression);\n\n var _ref2 = match || [')', undefined],\n token = _ref2[0],\n bad = _ref2[1];\n\n var notNumber = symbolMap.symbols[token];\n var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;\n var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix; // Check for syntax errors:\n\n if (bad || (afterValue ? notAfterValue : notNewValue)) {\n throw new PolishedError(37, match ? match.index : expression.length, expression);\n }\n\n if (afterValue) {\n // We either have an infix or postfix operator (they should be mutually exclusive)\n var curr = notNumber.postfix || notNumber.infix;\n\n do {\n var prev = operators[operators.length - 1];\n if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break; // Apply previous operator, since it has precedence over current one\n } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function\n\n\n afterValue = curr.notation === 'postfix';\n\n if (curr.symbol !== ')') {\n operators.push(curr); // Postfix always has precedence over any operator that follows after it\n\n if (afterValue) exec(operators, values);\n }\n } else if (notNumber) {\n // prefix operator or function\n operators.push(notNumber.prefix || notNumber.func);\n\n if (notNumber.func) {\n // Require an opening parenthesis\n match = pattern.exec(expression);\n\n if (!match || match[0] !== '(') {\n throw new PolishedError(38, match ? match.index : expression.length, expression);\n }\n }\n } else {\n // number\n values.push(+token);\n afterValue = true;\n }\n } while (match && operators.length);\n\n if (operators.length) {\n throw new PolishedError(39, match ? match.index : expression.length, expression);\n } else if (match) {\n throw new PolishedError(40, match ? match.index : expression.length, expression);\n } else {\n return values.pop();\n }\n}\n\nfunction reverseString(str) {\n return str.split('').reverse().join('');\n}\n/**\n * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.\n *\n *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).\n *\n * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: math('12rem + 8rem'),\n * fontSize: math('(12px + 2px) * 3'),\n * fontSize: math('3px^2 + sqrt(4)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${math('12rem + 8rem')};\n * fontSize: ${math('(12px + 2px) * 3')};\n * fontSize: ${math('3px^2 + sqrt(4)')};\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * fontSize: '20rem',\n * fontSize: '42px',\n * fontSize: '11px',\n * }\n */\n\n\nfunction math(formula, additionalSymbols) {\n var reversedFormula = reverseString(formula);\n var formulaMatch = reversedFormula.match(unitRegExp); // Check that all units are the same\n\n if (formulaMatch && !formulaMatch.every(function (unit) {\n return unit === formulaMatch[0];\n })) {\n throw new PolishedError(41);\n }\n\n var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));\n return \"\" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');\n}\n\nvar cssVariableRegex = /--[\\S]*/g;\n/**\n * Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'background': cssVar('--background-color'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${cssVar('--background-color')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'background': 'red'\n * }\n */\n\nfunction cssVar(cssVariable, defaultValue) {\n if (!cssVariable || !cssVariable.match(cssVariableRegex)) {\n throw new PolishedError(73);\n }\n\n var variableValue;\n /* eslint-disable */\n\n /* istanbul ignore next */\n\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);\n }\n /* eslint-enable */\n\n\n if (variableValue) {\n return variableValue.trim();\n } else if (defaultValue) {\n return defaultValue;\n }\n\n throw new PolishedError(74);\n}\n\n// @private\nfunction capitalizeString(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar positionMap$1 = ['Top', 'Right', 'Bottom', 'Left'];\n\nfunction generateProperty(property, position) {\n if (!property) return position.toLowerCase();\n var splitProperty = property.split('-');\n\n if (splitProperty.length > 1) {\n splitProperty.splice(1, 0, position);\n return splitProperty.reduce(function (acc, val) {\n return \"\" + acc + capitalizeString(val);\n });\n }\n\n var joinedProperty = property.replace(/([a-z])([A-Z])/g, \"$1\" + position + \"$2\");\n return property === joinedProperty ? \"\" + property + position : joinedProperty;\n}\n\nfunction generateStyles(property, valuesWithDefaults) {\n var styles = {};\n\n for (var i = 0; i < valuesWithDefaults.length; i += 1) {\n if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {\n styles[generateProperty(property, positionMap$1[i])] = valuesWithDefaults[i];\n }\n }\n\n return styles;\n}\n/**\n * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...directionalProperty('padding', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\n\n\nfunction directionalProperty(property) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n // prettier-ignore\n var firstValue = values[0],\n _values$ = values[1],\n secondValue = _values$ === void 0 ? firstValue : _values$,\n _values$2 = values[2],\n thirdValue = _values$2 === void 0 ? firstValue : _values$2,\n _values$3 = values[3],\n fourthValue = _values$3 === void 0 ? secondValue : _values$3;\n var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];\n return generateStyles(property, valuesWithDefaults);\n}\n\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith(string, suffix) {\n return string.substr(-suffix.length) === suffix;\n}\n\nvar cssRegex$1 = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\n\nfunction stripUnit(value) {\n if (typeof value !== 'string') return value;\n var matchedValue = value.match(cssRegex$1);\n return matchedValue ? parseFloat(value) : value;\n}\n\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\n\nvar pxtoFactory = function pxtoFactory(to) {\n return function (pxval, base) {\n if (base === void 0) {\n base = '16px';\n }\n\n var newPxval = pxval;\n var newBase = base;\n\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n\n newPxval = stripUnit(pxval);\n }\n\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n\n newBase = stripUnit(base);\n }\n\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n\n return \"\" + newPxval / newBase + to;\n };\n};\n\n/**\n * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': em('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${em('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1em'\n * }\n */\n\nvar em = /*#__PURE__*/pxtoFactory('em');\n\nvar cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value and its unit as elements of an array.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': getValueAndUnit('100px')[0],\n * '--unit': getValueAndUnit('100px')[1],\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${getValueAndUnit('100px')[0]};\n * --unit: ${getValueAndUnit('100px')[1]};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100,\n * '--unit': 'px',\n * }\n */\n\nfunction getValueAndUnit(value) {\n if (typeof value !== 'string') return [value, ''];\n var matchedValue = value.match(cssRegex);\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n}\n\n/**\n * Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...important(cover())\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${important(cover())}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute !important',\n * 'top': '0 !important',\n * 'right: '0 !important',\n * 'bottom': '0 !important',\n * 'left: '0 !important'\n * }\n */\n\nfunction important(styleBlock, rules) {\n if (typeof styleBlock !== 'object' || styleBlock === null) {\n throw new PolishedError(75, typeof styleBlock);\n }\n\n var newStyleBlock = {};\n Object.keys(styleBlock).forEach(function (key) {\n if (typeof styleBlock[key] === 'object' && styleBlock[key] !== null) {\n newStyleBlock[key] = important(styleBlock[key], rules);\n } else if (!rules || rules && (rules === key || rules.indexOf(key) >= 0)) {\n newStyleBlock[key] = styleBlock[key] + \" !important\";\n } else {\n newStyleBlock[key] = styleBlock[key];\n }\n });\n return newStyleBlock;\n}\n\nvar ratioNames = {\n minorSecond: 1.067,\n majorSecond: 1.125,\n minorThird: 1.2,\n majorThird: 1.25,\n perfectFourth: 1.333,\n augFourth: 1.414,\n perfectFifth: 1.5,\n minorSixth: 1.6,\n goldenSection: 1.618,\n majorSixth: 1.667,\n minorSeventh: 1.778,\n majorSeventh: 1.875,\n octave: 2,\n majorTenth: 2.5,\n majorEleventh: 2.667,\n majorTwelfth: 3,\n doubleOctave: 4\n};\n\nfunction getRatio(ratioName) {\n return ratioNames[ratioName];\n}\n/**\n * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.\n * @example\n * // Styles as object usage\n * const styles = {\n * // Increment two steps up the default scale\n * 'fontSize': modularScale(2)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * // Increment two steps up the default scale\n * fontSize: ${modularScale(2)}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'fontSize': '1.77689em'\n * }\n */\n\n\nfunction modularScale(steps, base, ratio) {\n if (base === void 0) {\n base = '1em';\n }\n\n if (ratio === void 0) {\n ratio = 1.333;\n }\n\n if (typeof steps !== 'number') {\n throw new PolishedError(42);\n }\n\n if (typeof ratio === 'string' && !ratioNames[ratio]) {\n throw new PolishedError(43);\n }\n\n var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],\n realBase = _ref[0],\n unit = _ref[1];\n\n var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;\n\n if (typeof realBase === 'string') {\n throw new PolishedError(44, base);\n }\n\n return \"\" + realBase * Math.pow(realRatio, steps) + (unit || '');\n}\n\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\n\nvar rem = /*#__PURE__*/pxtoFactory('rem');\n\nvar defaultFontSize = 16;\n\nfunction convertBase(base) {\n var deconstructedValue = getValueAndUnit(base);\n\n if (deconstructedValue[1] === 'px') {\n return parseFloat(base);\n }\n\n if (deconstructedValue[1] === '%') {\n return parseFloat(base) / 100 * defaultFontSize;\n }\n\n throw new PolishedError(78, deconstructedValue[1]);\n}\n\nfunction getBaseFromDoc() {\n /* eslint-disable */\n\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n var rootFontSize = getComputedStyle(document.documentElement).fontSize;\n return rootFontSize ? convertBase(rootFontSize) : defaultFontSize;\n }\n /* eslint-enable */\n\n /* istanbul ignore next */\n\n\n return defaultFontSize;\n}\n/**\n * Convert rem values to px. By default, the base value is pulled from the font-size property on the root element (if it is set in % or px). It defaults to 16px if not found on the root. You can also override the base value by providing your own base in % or px.\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': remToPx('1.6rem')\n * 'height': remToPx('1.6rem', '10px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${remToPx('1.6rem')}\n * height: ${remToPx('1.6rem', '10px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '25.6px',\n * 'height': '16px',\n * }\n */\n\n\nfunction remToPx(value, base) {\n var deconstructedValue = getValueAndUnit(value);\n\n if (deconstructedValue[1] !== 'rem' && deconstructedValue[1] !== '') {\n throw new PolishedError(77, deconstructedValue[1]);\n }\n\n var newBase = base ? convertBase(base) : getBaseFromDoc();\n return deconstructedValue[0] * newBase + \"px\";\n}\n\nvar functionsMap$3 = {\n back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeIn('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeIn('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\nfunction easeIn(functionName) {\n return functionsMap$3[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$2 = {\n back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeInOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeInOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n * }\n */\n\nfunction easeInOut(functionName) {\n return functionsMap$2[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$1 = {\n back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n * }\n */\n\nfunction easeOut(functionName) {\n return functionsMap$1[functionName.toLowerCase().trim()];\n}\n\n/**\n * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: between('20px', '100px', '400px', '1000px'),\n * fontSize: between('20px', '100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${between('20px', '100px', '400px', '1000px')};\n * fontSize: ${between('20px', '100px')}\n * `\n *\n * // CSS as JS Output\n *\n * h1: {\n * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',\n * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'\n * }\n */\n\nfunction between(fromSize, toSize, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n var _getValueAndUnit = getValueAndUnit(fromSize),\n unitlessFromSize = _getValueAndUnit[0],\n fromSizeUnit = _getValueAndUnit[1];\n\n var _getValueAndUnit2 = getValueAndUnit(toSize),\n unitlessToSize = _getValueAndUnit2[0],\n toSizeUnit = _getValueAndUnit2[1];\n\n var _getValueAndUnit3 = getValueAndUnit(minScreen),\n unitlessMinScreen = _getValueAndUnit3[0],\n minScreenUnit = _getValueAndUnit3[1];\n\n var _getValueAndUnit4 = getValueAndUnit(maxScreen),\n unitlessMaxScreen = _getValueAndUnit4[0],\n maxScreenUnit = _getValueAndUnit4[1];\n\n if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {\n throw new PolishedError(47);\n }\n\n if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {\n throw new PolishedError(48);\n }\n\n if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {\n throw new PolishedError(76);\n }\n\n var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);\n var base = unitlessToSize - slope * unitlessMaxScreen;\n return \"calc(\" + base.toFixed(2) + (fromSizeUnit || '') + \" + \" + (100 * slope).toFixed(2) + \"vw)\";\n}\n\n/**\n * CSS to contain a float (credit to CSSMojo).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...clearFix(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${clearFix()}\n * `\n *\n * // CSS as JS Output\n *\n * '&::after': {\n * 'clear': 'both',\n * 'content': '\"\"',\n * 'display': 'table'\n * }\n */\nfunction clearFix(parent) {\n var _ref;\n\n if (parent === void 0) {\n parent = '&';\n }\n\n var pseudoSelector = parent + \"::after\";\n return _ref = {}, _ref[pseudoSelector] = {\n clear: 'both',\n content: '\"\"',\n display: 'table'\n }, _ref;\n}\n\n/**\n * CSS to fully cover an area. Can optionally be passed an offset to act as a \"padding\".\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...cover()\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${cover()}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute',\n * 'top': '0',\n * 'right: '0',\n * 'bottom': '0',\n * 'left: '0'\n * }\n */\nfunction cover(offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n return {\n position: 'absolute',\n top: offset,\n right: offset,\n bottom: offset,\n left: offset\n };\n}\n\n/**\n * CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...ellipsis('250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${ellipsis('250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'display': 'inline-block',\n * 'maxWidth': '250px',\n * 'overflow': 'hidden',\n * 'textOverflow': 'ellipsis',\n * 'whiteSpace': 'nowrap',\n * 'wordWrap': 'normal'\n * }\n */\nfunction ellipsis(width, lines) {\n if (lines === void 0) {\n lines = 1;\n }\n\n var styles = {\n display: 'inline-block',\n maxWidth: width || '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n };\n return lines > 1 ? _extends({}, styles, {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lines,\n display: '-webkit-box',\n whiteSpace: 'normal'\n }) : styles;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * \"@media (min-width: 1000px)\": Object {\n * \"padding\": \"100px\",\n * },\n * \"@media (min-width: 400px)\": Object {\n * \"padding\": \"calc(-33.33333333333334px + 13.333333333333334vw)\",\n * },\n * \"padding\": \"20px\",\n * }\n */\nfunction fluidRange(cssProp, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {\n throw new PolishedError(49);\n }\n\n if (Array.isArray(cssProp)) {\n var mediaQueries = {};\n var fallbacks = {};\n\n for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {\n var _extends2, _extends3;\n\n var obj = _step.value;\n\n if (!obj.prop || !obj.fromSize || !obj.toSize) {\n throw new PolishedError(50);\n }\n\n fallbacks[obj.prop] = obj.fromSize;\n mediaQueries[\"@media (min-width: \" + minScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + minScreen + \")\"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));\n mediaQueries[\"@media (min-width: \" + maxScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + maxScreen + \")\"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));\n }\n\n return _extends({}, fallbacks, mediaQueries);\n } else {\n var _ref, _ref2, _ref3;\n\n if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {\n throw new PolishedError(51);\n }\n\n return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3[\"@media (min-width: \" + minScreen + \")\"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3[\"@media (min-width: \" + maxScreen + \")\"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;\n }\n}\n\nvar dataURIRegex = /^\\s*data:([a-z]+\\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\\-._~:@/?%\\s]*\\s*$/i;\nvar formatHintMap = {\n woff: 'woff',\n woff2: 'woff2',\n ttf: 'truetype',\n otf: 'opentype',\n eot: 'embedded-opentype',\n svg: 'svg',\n svgz: 'svg'\n};\n\nfunction generateFormatHint(format, formatHint) {\n if (!formatHint) return '';\n return \" format(\\\"\" + formatHintMap[format] + \"\\\")\";\n}\n\nfunction isDataURI(fontFilePath) {\n return !!fontFilePath.replace(/\\s+/g, ' ').match(dataURIRegex);\n}\n\nfunction generateFileReferences(fontFilePath, fileFormats, formatHint) {\n if (isDataURI(fontFilePath)) {\n return \"url(\\\"\" + fontFilePath + \"\\\")\" + generateFormatHint(fileFormats[0], formatHint);\n }\n\n var fileFontReferences = fileFormats.map(function (format) {\n return \"url(\\\"\" + fontFilePath + \".\" + format + \"\\\")\" + generateFormatHint(format, formatHint);\n });\n return fileFontReferences.join(', ');\n}\n\nfunction generateLocalReferences(localFonts) {\n var localFontReferences = localFonts.map(function (font) {\n return \"local(\\\"\" + font + \"\\\")\";\n });\n return localFontReferences.join(', ');\n}\n\nfunction generateSources(fontFilePath, localFonts, fileFormats, formatHint) {\n var fontReferences = [];\n if (localFonts) fontReferences.push(generateLocalReferences(localFonts));\n\n if (fontFilePath) {\n fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));\n }\n\n return fontReferences.join(', ');\n}\n/**\n * CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.\n *\n * @example\n * // Styles as object basic usage\n * const styles = {\n * ...fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * })\n * }\n *\n * // styled-components basic usage\n * const GlobalStyle = createGlobalStyle`${\n * fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * }\n * )}`\n *\n * // CSS as JS Output\n *\n * '@font-face': {\n * 'fontFamily': 'Sans-Pro',\n * 'src': 'url(\"path/to/file.eot\"), url(\"path/to/file.woff2\"), url(\"path/to/file.woff\"), url(\"path/to/file.ttf\"), url(\"path/to/file.svg\")',\n * }\n */\n\n\nfunction fontFace(_ref) {\n var fontFamily = _ref.fontFamily,\n fontFilePath = _ref.fontFilePath,\n fontStretch = _ref.fontStretch,\n fontStyle = _ref.fontStyle,\n fontVariant = _ref.fontVariant,\n fontWeight = _ref.fontWeight,\n _ref$fileFormats = _ref.fileFormats,\n fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,\n _ref$formatHint = _ref.formatHint,\n formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,\n _ref$localFonts = _ref.localFonts,\n localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,\n unicodeRange = _ref.unicodeRange,\n fontDisplay = _ref.fontDisplay,\n fontVariationSettings = _ref.fontVariationSettings,\n fontFeatureSettings = _ref.fontFeatureSettings;\n // Error Handling\n if (!fontFamily) throw new PolishedError(55);\n\n if (!fontFilePath && !localFonts) {\n throw new PolishedError(52);\n }\n\n if (localFonts && !Array.isArray(localFonts)) {\n throw new PolishedError(53);\n }\n\n if (!Array.isArray(fileFormats)) {\n throw new PolishedError(54);\n }\n\n var fontFaceDeclaration = {\n '@font-face': {\n fontFamily: fontFamily,\n src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),\n unicodeRange: unicodeRange,\n fontStretch: fontStretch,\n fontStyle: fontStyle,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n fontDisplay: fontDisplay,\n fontVariationSettings: fontVariationSettings,\n fontFeatureSettings: fontFeatureSettings\n }\n }; // Removes undefined fields for cleaner css object.\n\n return JSON.parse(JSON.stringify(fontFaceDeclaration));\n}\n\n/**\n * CSS to hide text to show a background image in a SEO-friendly way.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'backgroundImage': 'url(logo.png)',\n * ...hideText(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * backgroundImage: url(logo.png);\n * ${hideText()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'backgroundImage': 'url(logo.png)',\n * 'textIndent': '101%',\n * 'overflow': 'hidden',\n * 'whiteSpace': 'nowrap',\n * }\n */\nfunction hideText() {\n return {\n textIndent: '101%',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n };\n}\n\n/**\n * CSS to hide content visually but remain accessible to screen readers.\n * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...hideVisually(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hideVisually()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'border': '0',\n * 'clip': 'rect(0 0 0 0)',\n * 'height': '1px',\n * 'margin': '-1px',\n * 'overflow': 'hidden',\n * 'padding': '0',\n * 'position': 'absolute',\n * 'whiteSpace': 'nowrap',\n * 'width': '1px',\n * }\n */\nfunction hideVisually() {\n return {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n };\n}\n\n/**\n * Generates a media query to target HiDPI devices.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * [hiDPI(1.5)]: {\n * width: 200px;\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hiDPI(1.5)} {\n * width: 200px;\n * }\n * `\n *\n * // CSS as JS Output\n *\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\n * only screen and (min--moz-device-pixel-ratio: 1.5),\n * only screen and (-o-min-device-pixel-ratio: 1.5/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * 'width': '200px',\n * }\n */\nfunction hiDPI(ratio) {\n if (ratio === void 0) {\n ratio = 1.3;\n }\n\n return \"\\n @media only screen and (-webkit-min-device-pixel-ratio: \" + ratio + \"),\\n only screen and (min--moz-device-pixel-ratio: \" + ratio + \"),\\n only screen and (-o-min-device-pixel-ratio: \" + ratio + \"/1),\\n only screen and (min-resolution: \" + Math.round(ratio * 96) + \"dpi),\\n only screen and (min-resolution: \" + ratio + \"dppx)\\n \";\n}\n\nfunction constructGradientValue(literals) {\n var template = '';\n\n for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n substitutions[_key - 1] = arguments[_key];\n }\n\n for (var i = 0; i < literals.length; i += 1) {\n template += literals[i];\n\n if (i === substitutions.length - 1 && substitutions[i]) {\n var definedValues = substitutions.filter(function (substitute) {\n return !!substitute;\n }); // Adds leading coma if properties preceed color-stops\n\n if (definedValues.length > 1) {\n template = template.slice(0, -1);\n template += \", \" + substitutions[i]; // No trailing space if color-stops is the only param provided\n } else if (definedValues.length === 1) {\n template += \"\" + substitutions[i];\n }\n } else if (substitutions[i]) {\n template += substitutions[i] + \" \";\n }\n }\n\n return template.trim();\n}\n\nvar _templateObject$1;\n\n/**\n * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#FFF',\n * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction linearGradient(_ref) {\n var colorStops = _ref.colorStops,\n fallback = _ref.fallback,\n _ref$toDirection = _ref.toDirection,\n toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(56);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].replace(/,\\s+/g, ',').split(' ')[0].replace(/,(?=\\S)/g, ', '),\n backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose([\"linear-gradient(\", \"\", \")\"])), toDirection, colorStops.join(', ').replace(/,(?=\\S)/g, ', '))\n };\n}\n\n/**\n * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...normalize(),\n * }\n *\n * // styled-components usage\n * const GlobalStyle = createGlobalStyle`${normalize()}`\n *\n * // CSS as JS Output\n *\n * html {\n * lineHeight: 1.15,\n * textSizeAdjust: 100%,\n * } ...\n */\nfunction normalize() {\n var _ref;\n\n return [(_ref = {\n html: {\n lineHeight: '1.15',\n textSizeAdjust: '100%'\n },\n body: {\n margin: '0'\n },\n main: {\n display: 'block'\n },\n h1: {\n fontSize: '2em',\n margin: '0.67em 0'\n },\n hr: {\n boxSizing: 'content-box',\n height: '0',\n overflow: 'visible'\n },\n pre: {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n },\n a: {\n backgroundColor: 'transparent'\n },\n 'abbr[title]': {\n borderBottom: 'none',\n textDecoration: 'underline'\n }\n }, _ref[\"b,\\n strong\"] = {\n fontWeight: 'bolder'\n }, _ref[\"code,\\n kbd,\\n samp\"] = {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n }, _ref.small = {\n fontSize: '80%'\n }, _ref[\"sub,\\n sup\"] = {\n fontSize: '75%',\n lineHeight: '0',\n position: 'relative',\n verticalAlign: 'baseline'\n }, _ref.sub = {\n bottom: '-0.25em'\n }, _ref.sup = {\n top: '-0.5em'\n }, _ref.img = {\n borderStyle: 'none'\n }, _ref[\"button,\\n input,\\n optgroup,\\n select,\\n textarea\"] = {\n fontFamily: 'inherit',\n fontSize: '100%',\n lineHeight: '1.15',\n margin: '0'\n }, _ref[\"button,\\n input\"] = {\n overflow: 'visible'\n }, _ref[\"button,\\n select\"] = {\n textTransform: 'none'\n }, _ref[\"button,\\n html [type=\\\"button\\\"],\\n [type=\\\"reset\\\"],\\n [type=\\\"submit\\\"]\"] = {\n WebkitAppearance: 'button'\n }, _ref[\"button::-moz-focus-inner,\\n [type=\\\"button\\\"]::-moz-focus-inner,\\n [type=\\\"reset\\\"]::-moz-focus-inner,\\n [type=\\\"submit\\\"]::-moz-focus-inner\"] = {\n borderStyle: 'none',\n padding: '0'\n }, _ref[\"button:-moz-focusring,\\n [type=\\\"button\\\"]:-moz-focusring,\\n [type=\\\"reset\\\"]:-moz-focusring,\\n [type=\\\"submit\\\"]:-moz-focusring\"] = {\n outline: '1px dotted ButtonText'\n }, _ref.fieldset = {\n padding: '0.35em 0.625em 0.75em'\n }, _ref.legend = {\n boxSizing: 'border-box',\n color: 'inherit',\n display: 'table',\n maxWidth: '100%',\n padding: '0',\n whiteSpace: 'normal'\n }, _ref.progress = {\n verticalAlign: 'baseline'\n }, _ref.textarea = {\n overflow: 'auto'\n }, _ref[\"[type=\\\"checkbox\\\"],\\n [type=\\\"radio\\\"]\"] = {\n boxSizing: 'border-box',\n padding: '0'\n }, _ref[\"[type=\\\"number\\\"]::-webkit-inner-spin-button,\\n [type=\\\"number\\\"]::-webkit-outer-spin-button\"] = {\n height: 'auto'\n }, _ref['[type=\"search\"]'] = {\n WebkitAppearance: 'textfield',\n outlineOffset: '-2px'\n }, _ref['[type=\"search\"]::-webkit-search-decoration'] = {\n WebkitAppearance: 'none'\n }, _ref['::-webkit-file-upload-button'] = {\n WebkitAppearance: 'button',\n font: 'inherit'\n }, _ref.details = {\n display: 'block'\n }, _ref.summary = {\n display: 'list-item'\n }, _ref.template = {\n display: 'none'\n }, _ref['[hidden]'] = {\n display: 'none'\n }, _ref), {\n 'abbr[title]': {\n textDecoration: 'underline dotted'\n }\n }];\n}\n\nvar _templateObject;\n\n/**\n * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#00FFFF',\n * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction radialGradient(_ref) {\n var colorStops = _ref.colorStops,\n _ref$extent = _ref.extent,\n extent = _ref$extent === void 0 ? '' : _ref$extent,\n fallback = _ref.fallback,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? '' : _ref$position,\n _ref$shape = _ref.shape,\n shape = _ref$shape === void 0 ? '' : _ref$shape;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(57);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"radial-gradient(\", \"\", \"\", \"\", \")\"])), position, shape, extent, colorStops.join(', '))\n };\n}\n\n/**\n * A helper to generate a retina background image and non-retina\n * background image. The retina background image will output to a HiDPI media query. The mixin uses\n * a _2x.png filename suffix by default.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...retinaImage('my-img')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${retinaImage('my-img')}\n * `\n *\n * // CSS as JS Output\n * div {\n * backgroundImage: 'url(my-img.png)',\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),\n * only screen and (min--moz-device-pixel-ratio: 1.3),\n * only screen and (-o-min-device-pixel-ratio: 1.3/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * backgroundImage: 'url(my-img_2x.png)',\n * }\n * }\n */\nfunction retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {\n var _ref;\n\n if (extension === void 0) {\n extension = 'png';\n }\n\n if (retinaSuffix === void 0) {\n retinaSuffix = '_2x';\n }\n\n if (!filename) {\n throw new PolishedError(58);\n } // Replace the dot at the beginning of the passed extension if one exists\n\n\n var ext = extension.replace(/^\\./, '');\n var rFilename = retinaFilename ? retinaFilename + \".\" + ext : \"\" + filename + retinaSuffix + \".\" + ext;\n return _ref = {\n backgroundImage: \"url(\" + filename + \".\" + ext + \")\"\n }, _ref[hiDPI()] = _extends({\n backgroundImage: \"url(\" + rFilename + \")\"\n }, backgroundSize ? {\n backgroundSize: backgroundSize\n } : {}), _ref;\n}\n\n/* eslint-disable key-spacing */\nvar functionsMap = {\n easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/* eslint-enable key-spacing */\n\nfunction getTimingFunction(functionName) {\n return functionsMap[functionName];\n}\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': timingFunctions('easeInQuad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${timingFunctions('easeInQuad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\n\nfunction timingFunctions(timingFunction) {\n return getTimingFunction(timingFunction);\n}\n\nvar getBorderWidth = function getBorderWidth(pointingDirection, height, width) {\n var fullWidth = \"\" + width[0] + (width[1] || '');\n var halfWidth = \"\" + width[0] / 2 + (width[1] || '');\n var fullHeight = \"\" + height[0] + (height[1] || '');\n var halfHeight = \"\" + height[0] / 2 + (height[1] || '');\n\n switch (pointingDirection) {\n case 'top':\n return \"0 \" + halfWidth + \" \" + fullHeight + \" \" + halfWidth;\n\n case 'topLeft':\n return fullWidth + \" \" + fullHeight + \" 0 0\";\n\n case 'left':\n return halfHeight + \" \" + fullWidth + \" \" + halfHeight + \" 0\";\n\n case 'bottomLeft':\n return fullWidth + \" 0 0 \" + fullHeight;\n\n case 'bottom':\n return fullHeight + \" \" + halfWidth + \" 0 \" + halfWidth;\n\n case 'bottomRight':\n return \"0 0 \" + fullWidth + \" \" + fullHeight;\n\n case 'right':\n return halfHeight + \" 0 \" + halfHeight + \" \" + fullWidth;\n\n case 'topRight':\n default:\n return \"0 \" + fullWidth + \" \" + fullHeight + \" 0\";\n }\n};\n\nvar getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {\n switch (pointingDirection) {\n case 'top':\n case 'bottomRight':\n return {\n borderBottomColor: foregroundColor\n };\n\n case 'right':\n case 'bottomLeft':\n return {\n borderLeftColor: foregroundColor\n };\n\n case 'bottom':\n case 'topLeft':\n return {\n borderTopColor: foregroundColor\n };\n\n case 'left':\n case 'topRight':\n return {\n borderRightColor: foregroundColor\n };\n\n default:\n throw new PolishedError(59);\n }\n};\n/**\n * CSS to represent triangle with any pointing direction with an optional background color.\n *\n * @example\n * // Styles as object usage\n *\n * const styles = {\n * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })\n * }\n *\n *\n * // styled-components usage\n * const div = styled.div`\n * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}\n *\n *\n * // CSS as JS Output\n *\n * div: {\n * 'borderColor': 'transparent transparent transparent red',\n * 'borderStyle': 'solid',\n * 'borderWidth': '50px 0 50px 100px',\n * 'height': '0',\n * 'width': '0',\n * }\n */\n\n\nfunction triangle(_ref) {\n var pointingDirection = _ref.pointingDirection,\n height = _ref.height,\n width = _ref.width,\n foregroundColor = _ref.foregroundColor,\n _ref$backgroundColor = _ref.backgroundColor,\n backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;\n var widthAndUnit = getValueAndUnit(width);\n var heightAndUnit = getValueAndUnit(height);\n\n if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {\n throw new PolishedError(60);\n }\n\n return _extends({\n width: '0',\n height: '0',\n borderColor: backgroundColor\n }, getBorderColor(pointingDirection, foregroundColor), {\n borderStyle: 'solid',\n borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)\n });\n}\n\n/**\n * Provides an easy way to change the `wordWrap` property.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...wordWrap('break-word')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${wordWrap('break-word')}\n * `\n *\n * // CSS as JS Output\n *\n * const styles = {\n * overflowWrap: 'break-word',\n * wordWrap: 'break-word',\n * wordBreak: 'break-all',\n * }\n */\nfunction wordWrap(wrap) {\n if (wrap === void 0) {\n wrap = 'break-word';\n }\n\n var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;\n return {\n overflowWrap: wrap,\n wordWrap: wrap,\n wordBreak: wordBreak\n };\n}\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\n\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\n\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n\n\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\n\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^hsla\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\n\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n\n var normalizedColor = nameToHex(color);\n\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n\n var rgbMatched = rgbRegex.exec(normalizedColor);\n\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n\n var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));\n\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4])\n };\n }\n\n var hslMatched = hslRegex.exec(normalizedColor);\n\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n\n var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));\n\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4])\n };\n }\n\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n\n case green:\n hue = (blue - red) / delta + 2;\n break;\n\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n\n hue *= 60;\n\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n\n return value;\n};\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\n\nfunction convertToHex(red, green, blue) {\n return reduceHexValue(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\n\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n\n throw new PolishedError(1);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n\n throw new PolishedError(2);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n\n throw new PolishedError(6);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\n\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n}\n\n// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n} // eslint-disable-next-line no-redeclare\n\n\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\n/**\n * Changes the hue of the color. Hue is a number between 0 to 360. The first\n * argument for adjustHue is the amount of degrees the color is rotated around\n * the color wheel, always producing a positive hue value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: adjustHue(180, '#448'),\n * background: adjustHue('180', 'rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${adjustHue(180, '#448')};\n * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#888844\";\n * background: \"rgba(136,136,68,0.7)\";\n * }\n */\n\nfunction adjustHue(degree, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: hslColor.hue + parseFloat(degree)\n }));\n} // prettier-ignore\n\n\nvar curriedAdjustHue = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(adjustHue);\n\n/**\n * Returns the complement of the provided color. This is identical to adjustHue(180, <color>).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: complement('#448'),\n * background: complement('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${complement('#448')};\n * background: ${complement('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#884\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction complement(color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: (hslColor.hue + 180) % 360\n }));\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\n\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDarken = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(darken);\n\n/**\n * Decreases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the desaturate function is the amount by how much the color\n * intensity should be decreased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: desaturate(0.2, '#CCCD64'),\n * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${desaturate(0.2, '#CCCD64')};\n * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#b8b979\";\n * background: \"rgba(184,185,121,0.7)\";\n * }\n */\n\nfunction desaturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDesaturate = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(desaturate);\n\n/**\n * Returns a number (float) representing the luminance of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',\n * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)',\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};\n * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)'};\n *\n * // CSS in JS Output\n *\n * div {\n * background: \"#CCCD64\";\n * background: \"rgba(58, 133, 255, 1)\";\n * }\n */\n\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n var rgbColor = parseToRgb(color);\n\n var _Object$keys$map = Object.keys(rgbColor).map(function (key) {\n var channel = rgbColor[key] / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }),\n r = _Object$keys$map[0],\n g = _Object$keys$map[1],\n b = _Object$keys$map[2];\n\n return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));\n}\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n *\n * @example\n * const contrastRatio = getContrast('#444', '#fff');\n */\n\nfunction getContrast(color1, color2) {\n var luminance1 = getLuminance(color1);\n var luminance2 = getLuminance(color2);\n return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));\n}\n\n/**\n * Converts the color to a grayscale, by reducing its saturation to 0.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: grayscale('#CCCD64'),\n * background: grayscale('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${grayscale('#CCCD64')};\n * background: ${grayscale('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#999\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction grayscale(color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: 0\n }));\n}\n\n/**\n * Converts a HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\nfunction hslToColorString(color) {\n if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {\n if (color.alpha && typeof color.alpha === 'number') {\n return hsla({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness,\n alpha: color.alpha\n });\n }\n\n return hsl({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness\n });\n }\n\n throw new PolishedError(45);\n}\n\n/**\n * Inverts the red, green and blue values of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: invert('#CCCD64'),\n * background: invert('rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${invert('#CCCD64')};\n * background: ${invert('rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#33329b\";\n * background: \"rgba(154,155,50,0.7)\";\n * }\n */\n\nfunction invert(color) {\n if (color === 'transparent') return color; // parse color string to rgb\n\n var value = parseToRgb(color);\n return toColorString(_extends({}, value, {\n red: 255 - value.red,\n green: 255 - value.green,\n blue: 255 - value.blue\n }));\n}\n\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\n\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedLighten = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(lighten);\n\n/**\n * Determines which contrast guidelines have been met for two colors.\n * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).\n *\n * @example\n * const scores = meetsContrastGuidelines('#444', '#fff');\n */\nfunction meetsContrastGuidelines(color1, color2) {\n var contrastRatio = getContrast(color1, color2);\n return {\n AA: contrastRatio >= 4.5,\n AALarge: contrastRatio >= 3,\n AAA: contrastRatio >= 7,\n AAALarge: contrastRatio >= 4.5\n };\n}\n\n/**\n * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: mix(0.5, '#f00', '#00f')\n * background: mix(0.25, '#f00', '#00f')\n * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${mix(0.5, '#f00', '#00f')};\n * background: ${mix(0.25, '#f00', '#00f')};\n * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#7f007f\";\n * background: \"#3f00bf\";\n * background: \"rgba(63, 0, 191, 0.75)\";\n * }\n */\n\nfunction mix(weight, color, otherColor) {\n if (color === 'transparent') return otherColor;\n if (otherColor === 'transparent') return color;\n if (weight === 0) return otherColor;\n var parsedColor1 = parseToRgb(color);\n\n var color1 = _extends({}, parsedColor1, {\n alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1\n });\n\n var parsedColor2 = parseToRgb(otherColor);\n\n var color2 = _extends({}, parsedColor2, {\n alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1\n }); // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n\n\n var alphaDelta = color1.alpha - color2.alpha;\n var x = parseFloat(weight) * 2 - 1;\n var y = x * alphaDelta === -1 ? x : x + alphaDelta;\n var z = 1 + x * alphaDelta;\n var weight1 = (y / z + 1) / 2.0;\n var weight2 = 1 - weight1;\n var mixedColor = {\n red: Math.floor(color1.red * weight1 + color2.red * weight2),\n green: Math.floor(color1.green * weight1 + color2.green * weight2),\n blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),\n alpha: color1.alpha * (parseFloat(weight) / 1.0) + color2.alpha * (1 - parseFloat(weight) / 1.0)\n };\n return rgba(mixedColor);\n} // prettier-ignore\n\n\nvar curriedMix = /*#__PURE__*/curry\n/* ::<number | string, string, string, string> */\n(mix);\n\n/**\n * Increases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');\n * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),\n * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};\n * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},\n * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#fff\";\n * background: \"rgba(255,255,255,0.7)\";\n * background: \"rgba(255,0,0,0.7)\";\n * }\n */\n\nfunction opacify(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedOpacify = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(opacify);\n\nvar defaultReturnIfLightColor = '#000';\nvar defaultReturnIfDarkColor = '#fff';\n/**\n * Returns black or white (or optional passed colors) for best\n * contrast depending on the luminosity of the given color.\n * When passing custom return colors, strict mode ensures that the\n * return color always meets or exceeds WCAG level AA or greater. If this test\n * fails, the default return color (black or white) is returned in place of the\n * custom return color. You can optionally turn off strict mode.\n *\n * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * color: readableColor('#000'),\n * color: readableColor('black', '#001', '#ff8'),\n * color: readableColor('white', '#001', '#ff8'),\n * color: readableColor('red', '#333', '#ddd', true)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * color: ${readableColor('#000')};\n * color: ${readableColor('black', '#001', '#ff8')};\n * color: ${readableColor('white', '#001', '#ff8')};\n * color: ${readableColor('red', '#333', '#ddd', true)};\n * `\n *\n * // CSS in JS Output\n * element {\n * color: \"#fff\";\n * color: \"#ff8\";\n * color: \"#001\";\n * color: \"#000\";\n * }\n */\n\nfunction readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {\n if (returnIfLightColor === void 0) {\n returnIfLightColor = defaultReturnIfLightColor;\n }\n\n if (returnIfDarkColor === void 0) {\n returnIfDarkColor = defaultReturnIfDarkColor;\n }\n\n if (strict === void 0) {\n strict = true;\n }\n\n var isColorLight = getLuminance(color) > 0.179;\n var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;\n\n if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {\n return preferredReturnColor;\n }\n\n return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;\n}\n\n/**\n * Converts a RgbColor or RgbaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb` or `rgba`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),\n * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * }\n */\nfunction rgbToColorString(color) {\n if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {\n if (typeof color.alpha === 'number') {\n return rgba({\n red: color.red,\n green: color.green,\n blue: color.blue,\n alpha: color.alpha\n });\n }\n\n return rgb({\n red: color.red,\n green: color.green,\n blue: color.blue\n });\n }\n\n throw new PolishedError(46);\n}\n\n/**\n * Increases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the saturate function is the amount by how much the color\n * intensity should be increased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: saturate(0.2, '#CCCD64'),\n * background: saturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${saturate(0.2, '#FFCD64')};\n * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e0e250\";\n * background: \"rgba(224,226,80,0.7)\";\n * }\n */\n\nfunction saturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedSaturate = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(saturate);\n\n/**\n * Sets the hue of a color to the provided value. The hue range can be\n * from 0 and 359.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setHue(42, '#CCCD64'),\n * background: setHue('244', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setHue(42, '#CCCD64')};\n * background: ${setHue('244', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#cdae64\";\n * background: \"rgba(107,100,205,0.7)\";\n * }\n */\n\nfunction setHue(hue, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n hue: parseFloat(hue)\n }));\n} // prettier-ignore\n\n\nvar curriedSetHue = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setHue);\n\n/**\n * Sets the lightness of a color to the provided value. The lightness range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setLightness(0.2, '#CCCD64'),\n * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setLightness(0.2, '#CCCD64')};\n * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#4d4d19\";\n * background: \"rgba(223,224,159,0.7)\";\n * }\n */\n\nfunction setLightness(lightness, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n lightness: parseFloat(lightness)\n }));\n} // prettier-ignore\n\n\nvar curriedSetLightness = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setLightness);\n\n/**\n * Sets the saturation of a color to the provided value. The saturation range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setSaturation(0.2, '#CCCD64'),\n * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setSaturation(0.2, '#CCCD64')};\n * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#adad84\";\n * background: \"rgba(228,229,76,0.7)\";\n * }\n */\n\nfunction setSaturation(saturation, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: parseFloat(saturation)\n }));\n} // prettier-ignore\n\n\nvar curriedSetSaturation = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setSaturation);\n\n/**\n * Shades a color by mixing it with black. `shade` can produce\n * hue shifts, where as `darken` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: shade(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${shade(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#00003f\";\n * }\n */\n\nfunction shade(percentage, color) {\n if (color === 'transparent') return color;\n return curriedMix(parseFloat(percentage), 'rgb(0, 0, 0)', color);\n} // prettier-ignore\n\n\nvar curriedShade = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(shade);\n\n/**\n * Tints a color by mixing it with white. `tint` can produce\n * hue shifts, where as `lighten` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: tint(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${tint(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#bfbfff\";\n * }\n */\n\nfunction tint(percentage, color) {\n if (color === 'transparent') return color;\n return curriedMix(parseFloat(percentage), 'rgb(255, 255, 255)', color);\n} // prettier-ignore\n\n\nvar curriedTint = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(tint);\n\n/**\n * Decreases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: transparentize(0.1, '#fff');\n * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),\n * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${transparentize(0.1, '#fff')};\n * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')},\n * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,255,255,0.9)\";\n * background: \"rgba(255,255,255,0.8)\";\n * background: \"rgba(255,0,0,0.3)\";\n * }\n */\n\nfunction transparentize(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedTransparentize = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(transparentize);\n\n/**\n * Shorthand for easily setting the animation property. Allows either multiple arrays with animations\n * or a single animation spread over the arguments.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out, colorchange 2s'\n * }\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation('rotate', '1s', 'ease-in-out')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation('rotate', '1s', 'ease-in-out')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out'\n * }\n */\nfunction animation() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Allow single or multiple animations passed\n var multiMode = Array.isArray(args[0]);\n\n if (!multiMode && args.length > 8) {\n throw new PolishedError(64);\n }\n\n var code = args.map(function (arg) {\n if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {\n throw new PolishedError(65);\n }\n\n if (Array.isArray(arg) && arg.length > 8) {\n throw new PolishedError(66);\n }\n\n return Array.isArray(arg) ? arg.join(' ') : arg;\n }).join(', ');\n return {\n animation: code\n };\n}\n\n/**\n * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'backgroundImage': 'url(\"/image/background.jpg\"), linear-gradient(red, green)'\n * }\n */\nfunction backgroundImages() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n backgroundImage: properties.join(', ')\n };\n}\n\n/**\n * Shorthand that accepts any number of background values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'background': 'url(\"/image/background.jpg\"), linear-gradient(red, green), center no-repeat'\n * }\n */\nfunction backgrounds() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n background: properties.join(', ')\n };\n}\n\nvar sideMap = ['top', 'right', 'bottom', 'left'];\n/**\n * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...border('1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderColor': 'red',\n * 'borderStyle': 'solid',\n * 'borderWidth': `1px`,\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...border('top', '1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('top', '1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderTopStyle': 'solid',\n * 'borderTopWidth': `1px`,\n * }\n */\n\nfunction border(sideKeyword) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + capitalizeString(sideKeyword) + \"Width\"] = values[0], _ref[\"border\" + capitalizeString(sideKeyword) + \"Style\"] = values[1], _ref[\"border\" + capitalizeString(sideKeyword) + \"Color\"] = values[2], _ref;\n } else {\n values.unshift(sideKeyword);\n return {\n borderWidth: values[0],\n borderStyle: values[1],\n borderColor: values[2]\n };\n }\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderColor('red', 'green', 'blue', 'yellow')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderColor('red', 'green', 'blue', 'yellow')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderRightColor': 'green',\n * 'borderBottomColor': 'blue',\n * 'borderLeftColor': 'yellow'\n * }\n */\nfunction borderColor() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderColor'].concat(values));\n}\n\n/**\n * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderRadius('top', '5px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderRadius('top', '5px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopRightRadius': '5px',\n * 'borderTopLeftRadius': '5px',\n * }\n */\nfunction borderRadius(side, radius) {\n var uppercaseSide = capitalizeString(side);\n\n if (!radius && radius !== 0) {\n throw new PolishedError(62);\n }\n\n if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + uppercaseSide + \"RightRadius\"] = radius, _ref[\"border\" + uppercaseSide + \"LeftRadius\"] = radius, _ref;\n }\n\n if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {\n var _ref2;\n\n return _ref2 = {}, _ref2[\"borderTop\" + uppercaseSide + \"Radius\"] = radius, _ref2[\"borderBottom\" + uppercaseSide + \"Radius\"] = radius, _ref2;\n }\n\n throw new PolishedError(63);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderStyle('solid', 'dashed', 'dotted', 'double')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderStyle('solid', 'dashed', 'dotted', 'double')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopStyle': 'solid',\n * 'borderRightStyle': 'dashed',\n * 'borderBottomStyle': 'dotted',\n * 'borderLeftStyle': 'double'\n * }\n */\nfunction borderStyle() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderStyle'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderWidth('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderWidth('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopWidth': '12px',\n * 'borderRightWidth': '24px',\n * 'borderBottomWidth': '36px',\n * 'borderLeftWidth': '48px'\n * }\n */\nfunction borderWidth() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderWidth'].concat(values));\n}\n\nfunction generateSelectors(template, state) {\n var stateSuffix = state ? \":\" + state : '';\n return template(stateSuffix);\n}\n/**\n * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.\n * @private\n */\n\n\nfunction statefulSelectors(states, template, stateMap) {\n if (!template) throw new PolishedError(67);\n if (states.length === 0) return generateSelectors(template, null);\n var selectors = [];\n\n for (var i = 0; i < states.length; i += 1) {\n if (stateMap && stateMap.indexOf(states[i]) < 0) {\n throw new PolishedError(68);\n }\n\n selectors.push(generateSelectors(template, states[i]));\n }\n\n selectors = selectors.join(',');\n return selectors;\n}\n\nvar stateMap$1 = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template$1(state) {\n return \"button\" + state + \",\\n input[type=\\\"button\\\"]\" + state + \",\\n input[type=\\\"reset\\\"]\" + state + \",\\n input[type=\\\"submit\\\"]\" + state;\n}\n/**\n * Populates selectors that target all buttons. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [buttons('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${buttons('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'button:active,\n * 'input[type=\"button\"]:active,\n * 'input[type=\\\"reset\\\"]:active,\n * 'input[type=\\\"submit\\\"]:active: {\n * 'border': 'none'\n * }\n */\n\n\nfunction buttons() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template$1, stateMap$1);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...margin('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${margin('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'marginTop': '12px',\n * 'marginRight': '24px',\n * 'marginBottom': '36px',\n * 'marginLeft': '48px'\n * }\n */\nfunction margin() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['margin'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...padding('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${padding('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction padding() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['padding'].concat(values));\n}\n\nvar positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];\n/**\n * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...position('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...position('absolute', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('absolute', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'position': 'absolute',\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n */\n\nfunction position(firstValue) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (positionMap.indexOf(firstValue) >= 0 && firstValue) {\n return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {\n position: firstValue\n });\n } else {\n return directionalProperty.apply(void 0, ['', firstValue].concat(values));\n }\n}\n\n/**\n * Shorthand to set the height and width properties in a single statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...size('300px', '250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${size('300px', '250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'height': '300px',\n * 'width': '250px',\n * }\n */\nfunction size(height, width) {\n if (width === void 0) {\n width = height;\n }\n\n return {\n height: height,\n width: width\n };\n}\n\nvar stateMap = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template(state) {\n return \"input[type=\\\"color\\\"]\" + state + \",\\n input[type=\\\"date\\\"]\" + state + \",\\n input[type=\\\"datetime\\\"]\" + state + \",\\n input[type=\\\"datetime-local\\\"]\" + state + \",\\n input[type=\\\"email\\\"]\" + state + \",\\n input[type=\\\"month\\\"]\" + state + \",\\n input[type=\\\"number\\\"]\" + state + \",\\n input[type=\\\"password\\\"]\" + state + \",\\n input[type=\\\"search\\\"]\" + state + \",\\n input[type=\\\"tel\\\"]\" + state + \",\\n input[type=\\\"text\\\"]\" + state + \",\\n input[type=\\\"time\\\"]\" + state + \",\\n input[type=\\\"url\\\"]\" + state + \",\\n input[type=\\\"week\\\"]\" + state + \",\\n input:not([type])\" + state + \",\\n textarea\" + state;\n}\n/**\n * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [textInputs('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${textInputs('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'input[type=\"color\"]:active,\n * input[type=\"date\"]:active,\n * input[type=\"datetime\"]:active,\n * input[type=\"datetime-local\"]:active,\n * input[type=\"email\"]:active,\n * input[type=\"month\"]:active,\n * input[type=\"number\"]:active,\n * input[type=\"password\"]:active,\n * input[type=\"search\"]:active,\n * input[type=\"tel\"]:active,\n * input[type=\"text\"]:active,\n * input[type=\"time\"]:active,\n * input[type=\"url\"]:active,\n * input[type=\"week\"]:active,\n * input:not([type]):active,\n * textarea:active': {\n * 'border': 'none'\n * }\n */\n\n\nfunction textInputs() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template, stateMap);\n}\n\n/**\n * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).\n * @example\n * // Styles as object usage\n * const styles = {\n * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),\n * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};\n * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'\n * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',\n * }\n */\n\nfunction transitions() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n if (Array.isArray(properties[0]) && properties.length === 2) {\n var value = properties[1];\n\n if (typeof value !== 'string') {\n throw new PolishedError(61);\n }\n\n var transitionsString = properties[0].map(function (property) {\n return property + \" \" + value;\n }).join(', ');\n return {\n transition: transitionsString\n };\n } else {\n return {\n transition: properties.join(', ')\n };\n }\n}\n\nexport { curriedAdjustHue as adjustHue, animation, backgroundImages, backgrounds, between, border, borderColor, borderRadius, borderStyle, borderWidth, buttons, clearFix, complement, cover, cssVar, curriedDarken as darken, curriedDesaturate as desaturate, directionalProperty, easeIn, easeInOut, easeOut, ellipsis, em, fluidRange, fontFace, getContrast, getLuminance, getValueAndUnit, grayscale, hiDPI, hideText, hideVisually, hsl, hslToColorString, hsla, important, invert, curriedLighten as lighten, linearGradient, margin, math, meetsContrastGuidelines, curriedMix as mix, modularScale, normalize, curriedOpacify as opacify, padding, parseToHsl, parseToRgb, position, radialGradient, readableColor, rem, remToPx, retinaImage, rgb, rgbToColorString, rgba, curriedSaturate as saturate, curriedSetHue as setHue, curriedSetLightness as setLightness, curriedSetSaturation as setSaturation, curriedShade as shade, size, stripUnit, textInputs, timingFunctions, curriedTint as tint, toColorString, transitions, curriedTransparentize as transparentize, triangle, wordWrap };\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import { WebGLRenderer, Scene, PerspectiveCamera, Raycaster, TextureLoader, Vector2, Vector3, Box3, Color, Mesh, SphereGeometry, MeshBasicMaterial, BackSide, EventDispatcher, MOUSE, Quaternion, Spherical, Clock } from 'three';\nimport { TrackballControls } from 'three/examples/jsm/controls/TrackballControls.js';\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\nimport { FlyControls } from 'three/examples/jsm/controls/FlyControls.js';\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\nimport { parseToRgb, opacify } from 'polished';\nimport TWEEN from '@tweenjs/tween.js';\nimport accessorFn from 'accessor-fn';\nimport Kapsule from 'kapsule';\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".scene-nav-info {\\n bottom: 5px;\\n width: 100%;\\n text-align: center;\\n color: slategrey;\\n opacity: 0.7;\\n font-size: 10px;\\n}\\n\\n.scene-tooltip {\\n color: lavender;\\n font-size: 15px;\\n}\\n\\n.scene-nav-info, .scene-tooltip {\\n position: absolute;\\n font-family: sans-serif;\\n pointer-events: none;\\n}\\n\\n.scene-container canvas:focus {\\n outline: none;\\n}\";\nstyleInject(css_248z);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar three = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists\n: {\n WebGLRenderer: WebGLRenderer,\n Scene: Scene,\n PerspectiveCamera: PerspectiveCamera,\n Raycaster: Raycaster,\n TextureLoader: TextureLoader,\n Vector2: Vector2,\n Vector3: Vector3,\n Box3: Box3,\n Color: Color,\n Mesh: Mesh,\n SphereGeometry: SphereGeometry,\n MeshBasicMaterial: MeshBasicMaterial,\n BackSide: BackSide,\n EventDispatcher: EventDispatcher,\n MOUSE: MOUSE,\n Quaternion: Quaternion,\n Spherical: Spherical,\n Clock: Clock\n};\nvar threeRenderObjects = Kapsule({\n props: {\n width: {\n \"default\": window.innerWidth,\n onChange: function onChange(width, state, prevWidth) {\n isNaN(width) && (state.width = prevWidth);\n }\n },\n height: {\n \"default\": window.innerHeight,\n onChange: function onChange(height, state, prevHeight) {\n isNaN(height) && (state.height = prevHeight);\n }\n },\n backgroundColor: {\n \"default\": '#000011'\n },\n backgroundImageUrl: {},\n onBackgroundImageLoaded: {},\n showNavInfo: {\n \"default\": true\n },\n skyRadius: {\n \"default\": 50000\n },\n objects: {\n \"default\": []\n },\n enablePointerInteraction: {\n \"default\": true,\n onChange: function onChange(_, state) {\n // Reset hover state\n state.hoverObj = null;\n if (state.toolTipElem) state.toolTipElem.innerHTML = '';\n },\n triggerUpdate: false\n },\n lineHoverPrecision: {\n \"default\": 1,\n triggerUpdate: false\n },\n hoverOrderComparator: {\n \"default\": function _default() {\n return -1;\n },\n triggerUpdate: false\n },\n // keep existing order by default\n hoverFilter: {\n \"default\": function _default() {\n return true;\n },\n triggerUpdate: false\n },\n // exclude objects from interaction\n tooltipContent: {\n triggerUpdate: false\n },\n hoverDuringDrag: {\n \"default\": false,\n triggerUpdate: false\n },\n clickAfterDrag: {\n \"default\": false,\n triggerUpdate: false\n },\n onHover: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onClick: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onRightClick: {\n triggerUpdate: false\n }\n },\n methods: {\n tick: function tick(state) {\n if (state.initialised) {\n state.controls.update && state.controls.update(state.clock.getDelta()); // timedelta is required for fly controls\n\n state.postProcessingComposer ? state.postProcessingComposer.render() // if using postprocessing, switch the output to it\n : state.renderer.render(state.scene, state.camera);\n state.extraRenderers.forEach(function (r) {\n return r.render(state.scene, state.camera);\n });\n\n if (state.enablePointerInteraction) {\n // Update tooltip and trigger onHover events\n var topObject = null;\n\n if (state.hoverDuringDrag || !state.isPointerDragging) {\n var intersects = this.intersectingObjects(state.pointerPos.x, state.pointerPos.y).filter(function (d) {\n return state.hoverFilter(d.object);\n }).sort(function (a, b) {\n return state.hoverOrderComparator(a.object, b.object);\n });\n var topIntersect = intersects.length ? intersects[0] : null;\n topObject = topIntersect ? topIntersect.object : null;\n state.intersectionPoint = topIntersect ? topIntersect.point : null;\n }\n\n if (topObject !== state.hoverObj) {\n state.onHover(topObject, state.hoverObj);\n state.toolTipElem.innerHTML = topObject ? accessorFn(state.tooltipContent)(topObject) || '' : '';\n state.hoverObj = topObject;\n }\n }\n\n TWEEN.update(); // update camera animation tweens\n }\n\n return this;\n },\n getPointerPos: function getPointerPos(state) {\n var _state$pointerPos = state.pointerPos,\n x = _state$pointerPos.x,\n y = _state$pointerPos.y;\n return {\n x: x,\n y: y\n };\n },\n cameraPosition: function cameraPosition(state, position, lookAt, transitionDuration) {\n var camera = state.camera; // Setter\n\n if (position && state.initialised) {\n var finalPos = position;\n var finalLookAt = lookAt || {\n x: 0,\n y: 0,\n z: 0\n };\n\n if (!transitionDuration) {\n // no animation\n setCameraPos(finalPos);\n setLookAt(finalLookAt);\n } else {\n var camPos = Object.assign({}, camera.position);\n var camLookAt = getLookAt();\n new TWEEN.Tween(camPos).to(finalPos, transitionDuration).easing(TWEEN.Easing.Quadratic.Out).onUpdate(setCameraPos).start(); // Face direction in 1/3rd of time\n\n new TWEEN.Tween(camLookAt).to(finalLookAt, transitionDuration / 3).easing(TWEEN.Easing.Quadratic.Out).onUpdate(setLookAt).start();\n }\n\n return this;\n } // Getter\n\n\n return Object.assign({}, camera.position, {\n lookAt: getLookAt()\n }); //\n\n function setCameraPos(pos) {\n var x = pos.x,\n y = pos.y,\n z = pos.z;\n if (x !== undefined) camera.position.x = x;\n if (y !== undefined) camera.position.y = y;\n if (z !== undefined) camera.position.z = z;\n }\n\n function setLookAt(lookAt) {\n state.controls.target = new three.Vector3(lookAt.x, lookAt.y, lookAt.z);\n }\n\n function getLookAt() {\n return Object.assign(new three.Vector3(0, 0, -1000).applyQuaternion(camera.quaternion).add(camera.position));\n }\n },\n zoomToFit: function zoomToFit(state) {\n var transitionDuration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;\n\n for (var _len = arguments.length, bboxArgs = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n bboxArgs[_key - 3] = arguments[_key];\n }\n\n return this.fitToBbox(this.getBbox.apply(this, bboxArgs), transitionDuration, padding);\n },\n fitToBbox: function fitToBbox(state, bbox) {\n var transitionDuration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var padding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;\n // based on https://discourse.threejs.org/t/camera-zoom-to-fit-object/936/24\n var camera = state.camera;\n\n if (bbox) {\n var center = new three.Vector3(0, 0, 0); // reset camera aim to center\n\n var maxBoxSide = Math.max.apply(Math, _toConsumableArray(Object.entries(bbox).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n coordType = _ref2[0],\n coords = _ref2[1];\n\n return Math.max.apply(Math, _toConsumableArray(coords.map(function (c) {\n return Math.abs(center[coordType] - c);\n })));\n }))) * 2; // find distance that fits whole bbox within padded fov\n\n var paddedFov = (1 - padding * 2 / state.height) * camera.fov;\n var fitHeightDistance = maxBoxSide / Math.atan(paddedFov * Math.PI / 180);\n var fitWidthDistance = fitHeightDistance / camera.aspect;\n var distance = Math.max(fitHeightDistance, fitWidthDistance);\n\n if (distance > 0) {\n var newCameraPosition = center.clone().sub(camera.position).normalize().multiplyScalar(-distance);\n this.cameraPosition(newCameraPosition, center, transitionDuration);\n }\n }\n\n return this;\n },\n getBbox: function getBbox(state) {\n var objFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {\n return true;\n };\n var box = new three.Box3(new three.Vector3(0, 0, 0), new three.Vector3(0, 0, 0));\n var objs = state.objects.filter(objFilter);\n if (!objs.length) return null;\n objs.forEach(function (obj) {\n return box.expandByObject(obj);\n }); // extract global x,y,z min/max\n\n return Object.assign.apply(Object, _toConsumableArray(['x', 'y', 'z'].map(function (c) {\n return _defineProperty({}, c, [box.min[c], box.max[c]]);\n })));\n },\n getScreenCoords: function getScreenCoords(state, x, y, z) {\n var vec = new three.Vector3(x, y, z);\n vec.project(this.camera()); // project to the camera plane\n\n return {\n // align relative pos to canvas dimensions\n x: (vec.x + 1) * state.width / 2,\n y: -(vec.y - 1) * state.height / 2\n };\n },\n getSceneCoords: function getSceneCoords(state, screenX, screenY) {\n var distance = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var relCoords = new three.Vector2(screenX / state.width * 2 - 1, -(screenY / state.height) * 2 + 1);\n var raycaster = new three.Raycaster();\n raycaster.setFromCamera(relCoords, state.camera);\n return Object.assign({}, raycaster.ray.at(distance, new three.Vector3()));\n },\n intersectingObjects: function intersectingObjects(state, x, y) {\n var relCoords = new three.Vector2(x / state.width * 2 - 1, -(y / state.height) * 2 + 1);\n var raycaster = new three.Raycaster();\n raycaster.params.Line.threshold = state.lineHoverPrecision; // set linePrecision\n\n raycaster.setFromCamera(relCoords, state.camera);\n return raycaster.intersectObjects(state.objects, true);\n },\n renderer: function renderer(state) {\n return state.renderer;\n },\n scene: function scene(state) {\n return state.scene;\n },\n camera: function camera(state) {\n return state.camera;\n },\n postProcessingComposer: function postProcessingComposer(state) {\n return state.postProcessingComposer;\n },\n controls: function controls(state) {\n return state.controls;\n },\n tbControls: function tbControls(state) {\n return state.controls;\n } // to be deprecated\n\n },\n stateInit: function stateInit() {\n return {\n scene: new three.Scene(),\n camera: new three.PerspectiveCamera(),\n clock: new three.Clock()\n };\n },\n init: function init(domNode, state) {\n var _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref4$controlType = _ref4.controlType,\n controlType = _ref4$controlType === void 0 ? 'trackball' : _ref4$controlType,\n _ref4$rendererConfig = _ref4.rendererConfig,\n rendererConfig = _ref4$rendererConfig === void 0 ? {} : _ref4$rendererConfig,\n _ref4$extraRenderers = _ref4.extraRenderers,\n extraRenderers = _ref4$extraRenderers === void 0 ? [] : _ref4$extraRenderers,\n _ref4$waitForLoadComp = _ref4.waitForLoadComplete,\n waitForLoadComplete = _ref4$waitForLoadComp === void 0 ? true : _ref4$waitForLoadComp;\n\n // Wipe DOM\n domNode.innerHTML = ''; // Add relative container\n\n domNode.appendChild(state.container = document.createElement('div'));\n state.container.className = 'scene-container';\n state.container.style.position = 'relative'; // Add nav info section\n\n state.container.appendChild(state.navInfo = document.createElement('div'));\n state.navInfo.className = 'scene-nav-info';\n state.navInfo.textContent = {\n orbit: 'Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan',\n trackball: 'Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan',\n fly: 'WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw'\n }[controlType] || '';\n state.navInfo.style.display = state.showNavInfo ? null : 'none'; // Setup tooltip\n\n state.toolTipElem = document.createElement('div');\n state.toolTipElem.classList.add('scene-tooltip');\n state.container.appendChild(state.toolTipElem); // Capture pointer coords on move or touchstart\n\n state.pointerPos = new three.Vector2();\n state.pointerPos.x = -2; // Initialize off canvas\n\n state.pointerPos.y = -2;\n ['pointermove', 'pointerdown'].forEach(function (evType) {\n return state.container.addEventListener(evType, function (ev) {\n // track click state\n evType === 'pointerdown' && (state.isPointerPressed = true); // detect point drag\n\n !state.isPointerDragging && ev.type === 'pointermove' && (ev.pressure > 0 || state.isPointerPressed) // ev.pressure always 0 on Safari, so we used the isPointerPressed tracker\n && (ev.pointerType !== 'touch' || ev.movementX === undefined || [ev.movementX, ev.movementY].some(function (m) {\n return Math.abs(m) > 1;\n })) // relax drag trigger sensitivity on touch events\n && (state.isPointerDragging = true);\n\n if (state.enablePointerInteraction) {\n // update the pointer pos\n var offset = getOffset(state.container);\n state.pointerPos.x = ev.pageX - offset.left;\n state.pointerPos.y = ev.pageY - offset.top; // Move tooltip\n\n state.toolTipElem.style.top = \"\".concat(state.pointerPos.y, \"px\");\n state.toolTipElem.style.left = \"\".concat(state.pointerPos.x, \"px\");\n state.toolTipElem.style.transform = \"translate(-\".concat(state.pointerPos.x / state.width * 100, \"%, 21px)\"); // adjust horizontal position to not exceed canvas boundaries\n }\n\n function getOffset(el) {\n var rect = el.getBoundingClientRect(),\n scrollLeft = window.pageXOffset || document.documentElement.scrollLeft,\n scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n return {\n top: rect.top + scrollTop,\n left: rect.left + scrollLeft\n };\n }\n }, {\n passive: true\n });\n }); // Handle click events on objs\n\n state.container.addEventListener('pointerup', function (ev) {\n state.isPointerPressed = false;\n\n if (state.isPointerDragging) {\n state.isPointerDragging = false;\n if (!state.clickAfterDrag) return; // don't trigger onClick after pointer drag (camera motion via controls)\n }\n\n requestAnimationFrame(function () {\n // trigger click events asynchronously, to allow hoverObj to be set (on frame)\n if (ev.button === 0) {\n // left-click\n state.onClick(state.hoverObj || null, ev, state.intersectionPoint); // trigger background clicks with null\n }\n\n if (ev.button === 2 && state.onRightClick) {\n // right-click\n state.onRightClick(state.hoverObj || null, ev, state.intersectionPoint);\n }\n });\n }, {\n passive: true,\n capture: true\n }); // use capture phase to prevent propagation blocking from controls (specifically for fly)\n\n state.container.addEventListener('contextmenu', function (ev) {\n if (state.onRightClick) ev.preventDefault(); // prevent default contextmenu behavior and allow pointerup to fire instead\n }); // Setup renderer, camera and controls\n\n state.renderer = new three.WebGLRenderer(Object.assign({\n antialias: true,\n alpha: true\n }, rendererConfig));\n state.renderer.setPixelRatio(Math.min(2, window.devicePixelRatio)); // clamp device pixel ratio\n\n state.container.appendChild(state.renderer.domElement); // Setup extra renderers\n\n state.extraRenderers = extraRenderers;\n state.extraRenderers.forEach(function (r) {\n // overlay them on top of main renderer\n r.domElement.style.position = 'absolute';\n r.domElement.style.top = '0px';\n r.domElement.style.pointerEvents = 'none';\n state.container.appendChild(r.domElement);\n }); // configure post-processing composer\n\n state.postProcessingComposer = new EffectComposer(state.renderer);\n state.postProcessingComposer.addPass(new RenderPass(state.scene, state.camera)); // render scene as first pass\n // configure controls\n\n state.controls = new {\n trackball: TrackballControls,\n orbit: OrbitControls,\n fly: FlyControls\n }[controlType](state.camera, state.renderer.domElement);\n\n if (controlType === 'fly') {\n state.controls.movementSpeed = 300;\n state.controls.rollSpeed = Math.PI / 6;\n state.controls.dragToLook = true;\n }\n\n if (controlType === 'trackball' || controlType === 'orbit') {\n state.controls.minDistance = 0.1;\n state.controls.maxDistance = state.skyRadius;\n state.controls.addEventListener('start', function () {\n state.controlsEngaged = true;\n });\n state.controls.addEventListener('change', function () {\n if (state.controlsEngaged) {\n state.controlsDragging = true;\n }\n });\n state.controls.addEventListener('end', function () {\n state.controlsEngaged = false;\n state.controlsDragging = false;\n });\n }\n\n [state.renderer, state.postProcessingComposer].concat(_toConsumableArray(state.extraRenderers)).forEach(function (r) {\n return r.setSize(state.width, state.height);\n });\n state.camera.aspect = state.width / state.height;\n state.camera.updateProjectionMatrix();\n state.camera.position.z = 1000; // add sky\n\n state.scene.add(state.skysphere = new three.Mesh());\n state.skysphere.visible = false;\n state.loadComplete = state.scene.visible = !waitForLoadComplete;\n window.scene = state.scene;\n },\n update: function update(state, changedProps) {\n // resize canvas\n if (state.width && state.height && (changedProps.hasOwnProperty('width') || changedProps.hasOwnProperty('height'))) {\n state.container.style.width = state.width;\n state.container.style.height = state.height;\n [state.renderer, state.postProcessingComposer].concat(_toConsumableArray(state.extraRenderers)).forEach(function (r) {\n return r.setSize(state.width, state.height);\n });\n state.camera.aspect = state.width / state.height;\n state.camera.updateProjectionMatrix();\n }\n\n if (changedProps.hasOwnProperty('skyRadius') && state.skyRadius) {\n state.controls.hasOwnProperty('maxDistance') && changedProps.skyRadius && (state.controls.maxDistance = state.skyRadius);\n state.camera.far = state.skyRadius * 2.5;\n state.camera.updateProjectionMatrix();\n state.skysphere.geometry = new three.SphereGeometry(state.skyRadius);\n }\n\n if (changedProps.hasOwnProperty('backgroundColor')) {\n var alpha = parseToRgb(state.backgroundColor).alpha;\n if (alpha === undefined) alpha = 1;\n state.renderer.setClearColor(new three.Color(opacify(1, state.backgroundColor)), alpha);\n }\n\n if (changedProps.hasOwnProperty('backgroundImageUrl')) {\n if (!state.backgroundImageUrl) {\n state.skysphere.visible = false;\n state.skysphere.material.map = null;\n !state.loadComplete && finishLoad();\n } else {\n new three.TextureLoader().load(state.backgroundImageUrl, function (texture) {\n state.skysphere.material = new three.MeshBasicMaterial({\n map: texture,\n side: three.BackSide\n });\n state.skysphere.visible = true; // triggered when background image finishes loading (asynchronously to allow 1 frame to load texture)\n\n state.onBackgroundImageLoaded && setTimeout(state.onBackgroundImageLoaded);\n !state.loadComplete && finishLoad();\n });\n }\n }\n\n changedProps.hasOwnProperty('showNavInfo') && (state.navInfo.style.display = state.showNavInfo ? null : 'none');\n\n if (changedProps.hasOwnProperty('objects')) {\n (changedProps.objects || []).forEach(function (obj) {\n return state.scene.remove(obj);\n }); // Clear the place\n\n state.objects.forEach(function (obj) {\n return state.scene.add(obj);\n }); // Add to scene\n } //\n\n\n function finishLoad() {\n state.loadComplete = state.scene.visible = true;\n }\n }\n});\n\nexport default threeRenderObjects;\n","import { AmbientLight, DirectionalLight, Vector3 } from 'three';\nimport { DragControls } from 'three/examples/jsm/controls/DragControls.js';\nimport ThreeForceGraph from 'three-forcegraph';\nimport ThreeRenderObjects from 'three-render-objects';\nimport accessorFn from 'accessor-fn';\nimport Kapsule from 'kapsule';\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".graph-info-msg {\\n top: 50%;\\n width: 100%;\\n text-align: center;\\n color: lavender;\\n opacity: 0.7;\\n font-size: 22px;\\n position: absolute;\\n font-family: Sans-serif;\\n}\\n\\n.scene-container .clickable {\\n cursor: pointer;\\n}\\n\\n.scene-container .grabbable {\\n cursor: move;\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n}\\n\\n.scene-container .grabbable:active {\\n cursor: grabbing;\\n cursor: -moz-grabbing;\\n cursor: -webkit-grabbing;\\n}\";\nstyleInject(css_248z);\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction linkKapsule (kapsulePropName, kapsuleType) {\n var dummyK = new kapsuleType(); // To extract defaults\n\n return {\n linkProp: function linkProp(prop) {\n // link property config\n return {\n \"default\": dummyK[prop](),\n onChange: function onChange(v, state) {\n state[kapsulePropName][prop](v);\n },\n triggerUpdate: false\n };\n },\n linkMethod: function linkMethod(method) {\n // link method pass-through\n return function (state) {\n var kapsuleInstance = state[kapsulePropName];\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var returnVal = kapsuleInstance[method].apply(kapsuleInstance, args);\n return returnVal === kapsuleInstance ? this // chain based on the parent object, not the inner kapsule\n : returnVal;\n };\n }\n };\n}\n\nvar three = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists\n: {\n AmbientLight: AmbientLight,\n DirectionalLight: DirectionalLight,\n Vector3: Vector3\n};\n\nvar CAMERA_DISTANCE2NODES_FACTOR = 170; //\n// Expose config from forceGraph\n\nvar bindFG = linkKapsule('forceGraph', ThreeForceGraph);\nvar linkedFGProps = Object.assign.apply(Object, _toConsumableArray(['jsonUrl', 'graphData', 'numDimensions', 'dagMode', 'dagLevelDistance', 'dagNodeFilter', 'onDagError', 'nodeRelSize', 'nodeId', 'nodeVal', 'nodeResolution', 'nodeColor', 'nodeAutoColorBy', 'nodeOpacity', 'nodeVisibility', 'nodeThreeObject', 'nodeThreeObjectExtend', 'linkSource', 'linkTarget', 'linkVisibility', 'linkColor', 'linkAutoColorBy', 'linkOpacity', 'linkWidth', 'linkResolution', 'linkCurvature', 'linkCurveRotation', 'linkMaterial', 'linkThreeObject', 'linkThreeObjectExtend', 'linkPositionUpdate', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowRelPos', 'linkDirectionalArrowResolution', 'linkDirectionalParticles', 'linkDirectionalParticleSpeed', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'linkDirectionalParticleResolution', 'forceEngine', 'd3AlphaDecay', 'd3VelocityDecay', 'd3AlphaMin', 'ngraphPhysics', 'warmupTicks', 'cooldownTicks', 'cooldownTime', 'onEngineTick', 'onEngineStop'].map(function (p) {\n return _defineProperty({}, p, bindFG.linkProp(p));\n})));\nvar linkedFGMethods = Object.assign.apply(Object, _toConsumableArray(['refresh', 'getGraphBbox', 'd3Force', 'd3ReheatSimulation', 'emitParticle'].map(function (p) {\n return _defineProperty({}, p, bindFG.linkMethod(p));\n}))); // Expose config from renderObjs\n\nvar bindRenderObjs = linkKapsule('renderObjs', ThreeRenderObjects);\nvar linkedRenderObjsProps = Object.assign.apply(Object, _toConsumableArray(['width', 'height', 'backgroundColor', 'showNavInfo', 'enablePointerInteraction'].map(function (p) {\n return _defineProperty({}, p, bindRenderObjs.linkProp(p));\n})));\nvar linkedRenderObjsMethods = Object.assign.apply(Object, _toConsumableArray(['cameraPosition', 'postProcessingComposer'].map(function (p) {\n return _defineProperty({}, p, bindRenderObjs.linkMethod(p));\n})).concat([{\n graph2ScreenCoords: bindRenderObjs.linkMethod('getScreenCoords'),\n screen2GraphCoords: bindRenderObjs.linkMethod('getSceneCoords')\n}])); //\n\nvar _3dForceGraph = Kapsule({\n props: _objectSpread2(_objectSpread2({\n nodeLabel: {\n \"default\": 'name',\n triggerUpdate: false\n },\n linkLabel: {\n \"default\": 'name',\n triggerUpdate: false\n },\n linkHoverPrecision: {\n \"default\": 1,\n onChange: function onChange(p, state) {\n return state.renderObjs.lineHoverPrecision(p);\n },\n triggerUpdate: false\n },\n enableNavigationControls: {\n \"default\": true,\n onChange: function onChange(enable, state) {\n var controls = state.renderObjs.controls();\n\n if (controls) {\n controls.enabled = enable;\n }\n },\n triggerUpdate: false\n },\n enableNodeDrag: {\n \"default\": true,\n triggerUpdate: false\n },\n onNodeDrag: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNodeDragEnd: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNodeClick: {\n triggerUpdate: false\n },\n onNodeRightClick: {\n triggerUpdate: false\n },\n onNodeHover: {\n triggerUpdate: false\n },\n onLinkClick: {\n triggerUpdate: false\n },\n onLinkRightClick: {\n triggerUpdate: false\n },\n onLinkHover: {\n triggerUpdate: false\n },\n onBackgroundClick: {\n triggerUpdate: false\n },\n onBackgroundRightClick: {\n triggerUpdate: false\n }\n }, linkedFGProps), linkedRenderObjsProps),\n methods: _objectSpread2(_objectSpread2({\n zoomToFit: function zoomToFit(state, transitionDuration, padding) {\n var _state$forceGraph;\n\n for (var _len = arguments.length, bboxArgs = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n bboxArgs[_key - 3] = arguments[_key];\n }\n\n state.renderObjs.fitToBbox((_state$forceGraph = state.forceGraph).getGraphBbox.apply(_state$forceGraph, bboxArgs), transitionDuration, padding);\n return this;\n },\n pauseAnimation: function pauseAnimation(state) {\n if (state.animationFrameRequestId !== null) {\n cancelAnimationFrame(state.animationFrameRequestId);\n state.animationFrameRequestId = null;\n }\n\n return this;\n },\n resumeAnimation: function resumeAnimation(state) {\n if (state.animationFrameRequestId === null) {\n this._animationCycle();\n }\n\n return this;\n },\n _animationCycle: function _animationCycle(state) {\n if (state.enablePointerInteraction) {\n // reset canvas cursor (override dragControls cursor)\n this.renderer().domElement.style.cursor = null;\n } // Frame cycle\n\n\n state.forceGraph.tickFrame();\n state.renderObjs.tick();\n state.animationFrameRequestId = requestAnimationFrame(this._animationCycle);\n },\n scene: function scene(state) {\n return state.renderObjs.scene();\n },\n // Expose scene\n camera: function camera(state) {\n return state.renderObjs.camera();\n },\n // Expose camera\n renderer: function renderer(state) {\n return state.renderObjs.renderer();\n },\n // Expose renderer\n controls: function controls(state) {\n return state.renderObjs.controls();\n },\n // Expose controls\n tbControls: function tbControls(state) {\n return state.renderObjs.tbControls();\n },\n // To be deprecated\n _destructor: function _destructor() {\n this.pauseAnimation();\n this.graphData({\n nodes: [],\n links: []\n });\n }\n }, linkedFGMethods), linkedRenderObjsMethods),\n stateInit: function stateInit(_ref5) {\n var controlType = _ref5.controlType,\n rendererConfig = _ref5.rendererConfig,\n extraRenderers = _ref5.extraRenderers;\n return {\n forceGraph: new ThreeForceGraph(),\n renderObjs: ThreeRenderObjects({\n controlType: controlType,\n rendererConfig: rendererConfig,\n extraRenderers: extraRenderers\n })\n };\n },\n init: function init(domNode, state) {\n // Wipe DOM\n domNode.innerHTML = ''; // Add relative container\n\n domNode.appendChild(state.container = document.createElement('div'));\n state.container.style.position = 'relative'; // Add renderObjs\n\n var roDomNode = document.createElement('div');\n state.container.appendChild(roDomNode);\n state.renderObjs(roDomNode);\n var camera = state.renderObjs.camera();\n var renderer = state.renderObjs.renderer();\n var controls = state.renderObjs.controls();\n controls.enabled = !!state.enableNavigationControls;\n state.lastSetCameraZ = camera.position.z; // Add info space\n\n var infoElem;\n state.container.appendChild(infoElem = document.createElement('div'));\n infoElem.className = 'graph-info-msg';\n infoElem.textContent = ''; // config forcegraph\n\n state.forceGraph.onLoading(function () {\n infoElem.textContent = 'Loading...';\n }).onFinishLoading(function () {\n infoElem.textContent = '';\n }).onUpdate(function () {\n // sync graph data structures\n state.graphData = state.forceGraph.graphData(); // re-aim camera, if still in default position (not user modified)\n\n if (camera.position.x === 0 && camera.position.y === 0 && camera.position.z === state.lastSetCameraZ && state.graphData.nodes.length) {\n camera.lookAt(state.forceGraph.position);\n state.lastSetCameraZ = camera.position.z = Math.cbrt(state.graphData.nodes.length) * CAMERA_DISTANCE2NODES_FACTOR;\n }\n }).onFinishUpdate(function () {\n // Setup node drag interaction\n if (state._dragControls) {\n var curNodeDrag = state.graphData.nodes.find(function (node) {\n return node.__initialFixedPos && !node.__disposeControlsAfterDrag;\n }); // detect if there's a node being dragged using the existing drag controls\n\n if (curNodeDrag) {\n curNodeDrag.__disposeControlsAfterDrag = true; // postpone previous controls disposal until drag ends\n } else {\n state._dragControls.dispose(); // cancel previous drag controls\n\n }\n\n state._dragControls = undefined;\n }\n\n if (state.enableNodeDrag && state.enablePointerInteraction && state.forceEngine === 'd3') {\n // Can't access node positions programatically in ngraph\n var dragControls = state._dragControls = new DragControls(state.graphData.nodes.map(function (node) {\n return node.__threeObj;\n }).filter(function (obj) {\n return obj;\n }), camera, renderer.domElement);\n dragControls.addEventListener('dragstart', function (event) {\n controls.enabled = false; // Disable controls while dragging\n // track drag object movement\n\n event.object.__initialPos = event.object.position.clone();\n event.object.__prevPos = event.object.position.clone();\n\n var node = getGraphObj(event.object).__data;\n\n !node.__initialFixedPos && (node.__initialFixedPos = {\n fx: node.fx,\n fy: node.fy,\n fz: node.fz\n });\n !node.__initialPos && (node.__initialPos = {\n x: node.x,\n y: node.y,\n z: node.z\n }); // lock node\n\n ['x', 'y', 'z'].forEach(function (c) {\n return node[\"f\".concat(c)] = node[c];\n }); // drag cursor\n\n renderer.domElement.classList.add('grabbable');\n });\n dragControls.addEventListener('drag', function (event) {\n var nodeObj = getGraphObj(event.object);\n\n if (!event.object.hasOwnProperty('__graphObjType')) {\n // If dragging a child of the node, update the node object instead\n var initPos = event.object.__initialPos;\n var prevPos = event.object.__prevPos;\n var _newPos = event.object.position;\n nodeObj.position.add(_newPos.clone().sub(prevPos)); // translate node object by the motion delta\n\n prevPos.copy(_newPos);\n\n _newPos.copy(initPos); // reset child back to its initial position\n\n }\n\n var node = nodeObj.__data;\n var newPos = nodeObj.position;\n var translate = {\n x: newPos.x - node.x,\n y: newPos.y - node.y,\n z: newPos.z - node.z\n }; // Move fx/fy/fz (and x/y/z) of nodes based on object new position\n\n ['x', 'y', 'z'].forEach(function (c) {\n return node[\"f\".concat(c)] = node[c] = newPos[c];\n });\n state.forceGraph.d3AlphaTarget(0.3) // keep engine running at low intensity throughout drag\n .resetCountdown(); // prevent freeze while dragging\n\n node.__dragged = true;\n state.onNodeDrag(node, translate);\n });\n dragControls.addEventListener('dragend', function (event) {\n delete event.object.__initialPos; // remove tracking attributes\n\n delete event.object.__prevPos;\n\n var node = getGraphObj(event.object).__data; // dispose previous controls if needed\n\n\n if (node.__disposeControlsAfterDrag) {\n dragControls.dispose();\n delete node.__disposeControlsAfterDrag;\n }\n\n var initFixedPos = node.__initialFixedPos;\n var initPos = node.__initialPos;\n var translate = {\n x: initPos.x - node.x,\n y: initPos.y - node.y,\n z: initPos.z - node.z\n };\n\n if (initFixedPos) {\n ['x', 'y', 'z'].forEach(function (c) {\n var fc = \"f\".concat(c);\n\n if (initFixedPos[fc] === undefined) {\n delete node[fc];\n }\n });\n delete node.__initialFixedPos;\n delete node.__initialPos;\n\n if (node.__dragged) {\n delete node.__dragged;\n state.onNodeDragEnd(node, translate);\n }\n }\n\n state.forceGraph.d3AlphaTarget(0) // release engine low intensity\n .resetCountdown(); // let the engine readjust after releasing fixed nodes\n\n if (state.enableNavigationControls) {\n controls.enabled = true; // Re-enable controls\n\n controls.domElement && controls.domElement.ownerDocument && controls.domElement.ownerDocument.dispatchEvent( // simulate mouseup to ensure the controls don't take over after dragend\n new PointerEvent('pointerup', {\n pointerType: 'touch'\n }));\n } // clear cursor\n\n\n renderer.domElement.classList.remove('grabbable');\n });\n }\n }); // config renderObjs\n\n state.renderObjs.objects([// Populate scene\n new three.AmbientLight(0xbbbbbb), new three.DirectionalLight(0xffffff, 0.6), state.forceGraph]).hoverOrderComparator(function (a, b) {\n // Prioritize graph objects\n var aObj = getGraphObj(a);\n if (!aObj) return 1;\n var bObj = getGraphObj(b);\n if (!bObj) return -1; // Prioritize nodes over links\n\n var isNode = function isNode(o) {\n return o.__graphObjType === 'node';\n };\n\n return isNode(bObj) - isNode(aObj);\n }).tooltipContent(function (obj) {\n var graphObj = getGraphObj(obj);\n return graphObj ? accessorFn(state[\"\".concat(graphObj.__graphObjType, \"Label\")])(graphObj.__data) || '' : '';\n }).hoverDuringDrag(false).onHover(function (obj) {\n // Update tooltip and trigger onHover events\n var hoverObj = getGraphObj(obj);\n\n if (hoverObj !== state.hoverObj) {\n var prevObjType = state.hoverObj ? state.hoverObj.__graphObjType : null;\n var prevObjData = state.hoverObj ? state.hoverObj.__data : null;\n var objType = hoverObj ? hoverObj.__graphObjType : null;\n var objData = hoverObj ? hoverObj.__data : null;\n\n if (prevObjType && prevObjType !== objType) {\n // Hover out\n var fn = state[\"on\".concat(prevObjType === 'node' ? 'Node' : 'Link', \"Hover\")];\n fn && fn(null, prevObjData);\n }\n\n if (objType) {\n // Hover in\n var _fn = state[\"on\".concat(objType === 'node' ? 'Node' : 'Link', \"Hover\")];\n _fn && _fn(objData, prevObjType === objType ? prevObjData : null);\n } // set pointer if hovered object is clickable\n\n\n renderer.domElement.classList[hoverObj && state[\"on\".concat(objType === 'node' ? 'Node' : 'Link', \"Click\")] || !hoverObj && state.onBackgroundClick ? 'add' : 'remove']('clickable');\n state.hoverObj = hoverObj;\n }\n }).clickAfterDrag(false).onClick(function (obj, ev) {\n var graphObj = getGraphObj(obj);\n\n if (graphObj) {\n var fn = state[\"on\".concat(graphObj.__graphObjType === 'node' ? 'Node' : 'Link', \"Click\")];\n fn && fn(graphObj.__data, ev);\n } else {\n state.onBackgroundClick && state.onBackgroundClick(ev);\n }\n }).onRightClick(function (obj, ev) {\n // Handle right-click events\n var graphObj = getGraphObj(obj);\n\n if (graphObj) {\n var fn = state[\"on\".concat(graphObj.__graphObjType === 'node' ? 'Node' : 'Link', \"RightClick\")];\n fn && fn(graphObj.__data, ev);\n } else {\n state.onBackgroundRightClick && state.onBackgroundRightClick(ev);\n }\n }); //\n // Kick-off renderer\n\n this._animationCycle();\n }\n}); //\n\nfunction getGraphObj(object) {\n var obj = object; // recurse up object chain until finding the graph object\n\n while (obj && !obj.hasOwnProperty('__graphObjType')) {\n obj = obj.parent;\n }\n\n return obj;\n}\n\nexport default _3dForceGraph;\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n","import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n","export default function() {\n return !this.node();\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n","import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nexport const nonpassive = {passive: false};\nexport const nonpassivecapture = {capture: true, passive: false};\n\nexport function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {select} from \"d3-selection\";\nimport noevent, {nonpassivecapture} from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, nonpassivecapture);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, nonpassivecapture);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, nonpassivecapture);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","var epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n","import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\n","export default function(event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}\n","import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n","import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n","function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n","function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n","import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n","import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n","import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n","import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n","export default x => () => x;\n","export default function ZoomEvent(type, {\n sourceEvent,\n target,\n transform,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n transform: {value: transform, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p, event) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = pointer(event);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won’t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n","export default x => () => x;\n","export default function DragEvent(type, {\n sourceEvent,\n subject,\n target,\n identifier,\n active,\n x, y, dx, dy,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n subject: {value: subject, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n identifier: {value: identifier, enumerable: true, configurable: true},\n active: {value: active, enumerable: true, configurable: true},\n x: {value: x, enumerable: true, configurable: true},\n y: {value: y, enumerable: true, configurable: true},\n dx: {value: dx, enumerable: true, configurable: true},\n dy: {value: dy, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n","import {dispatch} from \"d3-dispatch\";\nimport {select, pointer} from \"d3-selection\";\nimport nodrag, {yesdrag} from \"./nodrag.js\";\nimport noevent, {nonpassive, nonpassivecapture, nopropagation} from \"./noevent.js\";\nimport constant from \"./constant.js\";\nimport DragEvent from \"./event.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nexport default function() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved, nonpassive)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned(event, d) {\n if (touchending || !filter.call(this, event, d)) return;\n var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n if (!gesture) return;\n select(event.view)\n .on(\"mousemove.drag\", mousemoved, nonpassivecapture)\n .on(\"mouseup.drag\", mouseupped, nonpassivecapture);\n nodrag(event.view);\n nopropagation(event);\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\", event);\n }\n\n function mousemoved(event) {\n noevent(event);\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\", event);\n }\n\n function mouseupped(event) {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent(event);\n gestures.mouse(\"end\", event);\n }\n\n function touchstarted(event, d) {\n if (!filter.call(this, event, d)) return;\n var touches = event.changedTouches,\n c = container.call(this, event, d),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n nopropagation(event);\n gesture(\"start\", event, touches[i]);\n }\n }\n }\n\n function touchmoved(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent(event);\n gesture(\"drag\", event, touches[i]);\n }\n }\n }\n\n function touchended(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation(event);\n gesture(\"end\", event, touches[i]);\n }\n }\n }\n\n function beforestart(that, container, event, d, identifier, touch) {\n var dispatch = listeners.copy(),\n p = pointer(touch || event, container), dx, dy,\n s;\n\n if ((s = subject.call(that, new DragEvent(\"beforestart\", {\n sourceEvent: event,\n target: drag,\n identifier,\n active,\n x: p[0],\n y: p[1],\n dx: 0,\n dy: 0,\n dispatch\n }), d)) == null) return;\n\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n\n return function gesture(type, event, touch) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[identifier] = gesture, n = active++; break;\n case \"end\": delete gestures[identifier], --active; // falls through\n case \"drag\": p = pointer(touch || event, container), n = active; break;\n }\n dispatch.call(\n type,\n that,\n new DragEvent(type, {\n sourceEvent: event,\n subject: s,\n target: drag,\n identifier,\n active: n,\n x: p[0] + dx,\n y: p[1] + dy,\n dx: p[0] - p0[0],\n dy: p[1] - p0[1],\n dispatch\n }),\n d\n );\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}\n","import tinyColor from 'tinycolor2';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar ENTROPY = 123; // Raise numbers to prevent collisions in lower indexes\n\nvar int2HexColor = function int2HexColor(num) {\n return \"#\".concat(Math.min(num, Math.pow(2, 24)).toString(16).padStart(6, '0'));\n};\n\nvar rgb2Int = function rgb2Int(r, g, b) {\n return (r << 16) + (g << 8) + b;\n};\n\nvar colorStr2Int = function colorStr2Int(str) {\n var _tinyColor$toRgb = tinyColor(str).toRgb(),\n r = _tinyColor$toRgb.r,\n g = _tinyColor$toRgb.g,\n b = _tinyColor$toRgb.b;\n\n return rgb2Int(r, g, b);\n};\n\nvar checksum = function checksum(n, csBits) {\n return n * ENTROPY % Math.pow(2, csBits);\n};\n\nvar _default = /*#__PURE__*/function () {\n function _default() {\n var csBits = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6;\n\n _classCallCheck(this, _default);\n\n this.csBits = csBits; // How many bits to reserve for checksum. Will eat away into the usable size of the registry.\n\n this.registry = ['__reserved for background__']; // indexed objects for rgb lookup;\n }\n\n _createClass(_default, [{\n key: \"register\",\n value: function register(obj) {\n if (this.registry.length >= Math.pow(2, 24 - this.csBits)) {\n // color has 24 bits (-checksum)\n return null; // Registry is full\n }\n\n var idx = this.registry.length;\n var cs = checksum(idx, this.csBits);\n var color = int2HexColor(idx + (cs << 24 - this.csBits));\n this.registry.push(obj);\n return color;\n }\n }, {\n key: \"lookup\",\n value: function lookup(color) {\n var n = typeof color === 'string' ? colorStr2Int(color) : rgb2Int.apply(void 0, _toConsumableArray(color));\n if (!n) return null; // 0 index is reserved for background\n\n var idx = n & Math.pow(2, 24 - this.csBits) - 1; // registry index\n\n var cs = n >> 24 - this.csBits & Math.pow(2, this.csBits) - 1; // extract bits reserved for checksum\n\n if (checksum(idx, this.csBits) !== cs || idx >= this.registry.length) return null; // failed checksum or registry out of bounds\n\n return this.registry[idx];\n }\n }]);\n\n return _default;\n}();\n\nexport default _default;\n","import { select } from 'd3-selection';\nimport { zoomTransform, zoom } from 'd3-zoom';\nimport { drag } from 'd3-drag';\nimport { min, max } from 'd3-array';\nimport throttle from 'lodash.throttle';\nimport TWEEN from '@tweenjs/tween.js';\nimport Kapsule from 'kapsule';\nimport accessorFn from 'accessor-fn';\nimport ColorTracker from 'canvas-color-tracker';\nimport { forceSimulation, forceLink, forceManyBody, forceCenter, forceRadial } from 'd3-force-3d';\nimport { Bezier } from 'bezier-js';\nimport indexBy from 'index-array-by';\nimport { scaleOrdinal } from 'd3-scale';\nimport { schemePaired } from 'd3-scale-chromatic';\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".force-graph-container canvas {\\n display: block;\\n user-select: none;\\n outline: none;\\n -webkit-tap-highlight-color: transparent;\\n}\\n\\n.force-graph-container .graph-tooltip {\\n position: absolute;\\n transform: translate(-50%, 25px);\\n font-family: sans-serif;\\n font-size: 16px;\\n padding: 4px;\\n border-radius: 3px;\\n color: #eee;\\n background: rgba(0,0,0,0.65);\\n visibility: hidden; /* by default */\\n}\\n\\n.force-graph-container .clickable {\\n cursor: pointer;\\n}\\n\\n.force-graph-container .grabbable {\\n cursor: move;\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n}\\n\\n.force-graph-container .grabbable:active {\\n cursor: grabbing;\\n cursor: -moz-grabbing;\\n cursor: -webkit-grabbing;\\n}\\n\";\nstyleInject(css_248z);\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar autoColorScale = scaleOrdinal(schemePaired); // Autoset attribute colorField by colorByAccessor property\n// If an object has already a color, don't set it\n// Objects can be nodes or links\n\nfunction autoColorObjects(objects, colorByAccessor, colorField) {\n if (!colorByAccessor || typeof colorField !== 'string') return;\n objects.filter(function (obj) {\n return !obj[colorField];\n }).forEach(function (obj) {\n obj[colorField] = autoColorScale(colorByAccessor(obj));\n });\n}\n\nfunction getDagDepths (_ref, idAccessor) {\n var nodes = _ref.nodes,\n links = _ref.links;\n\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$nodeFilter = _ref2.nodeFilter,\n nodeFilter = _ref2$nodeFilter === void 0 ? function () {\n return true;\n } : _ref2$nodeFilter,\n _ref2$onLoopError = _ref2.onLoopError,\n onLoopError = _ref2$onLoopError === void 0 ? function (loopIds) {\n throw \"Invalid DAG structure! Found cycle in node path: \".concat(loopIds.join(' -> '), \".\");\n } : _ref2$onLoopError;\n\n // linked graph\n var graph = {};\n nodes.forEach(function (node) {\n return graph[idAccessor(node)] = {\n data: node,\n out: [],\n depth: -1,\n skip: !nodeFilter(node)\n };\n });\n links.forEach(function (_ref3) {\n var source = _ref3.source,\n target = _ref3.target;\n var sourceId = getNodeId(source);\n var targetId = getNodeId(target);\n if (!graph.hasOwnProperty(sourceId)) throw \"Missing source node with id: \".concat(sourceId);\n if (!graph.hasOwnProperty(targetId)) throw \"Missing target node with id: \".concat(targetId);\n var sourceNode = graph[sourceId];\n var targetNode = graph[targetId];\n sourceNode.out.push(targetNode);\n\n function getNodeId(node) {\n return _typeof(node) === 'object' ? idAccessor(node) : node;\n }\n });\n var foundLoops = [];\n traverse(Object.values(graph));\n var nodeDepths = Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(graph).filter(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n node = _ref5[1];\n\n return !node.skip;\n }).map(function (_ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n id = _ref7[0],\n node = _ref7[1];\n\n return _defineProperty({}, id, node.depth);\n }))));\n return nodeDepths;\n\n function traverse(nodes) {\n var nodeStack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var currentDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n\n if (nodeStack.indexOf(node) !== -1) {\n var _ret = function () {\n var loop = [].concat(_toConsumableArray(nodeStack.slice(nodeStack.indexOf(node))), [node]).map(function (d) {\n return idAccessor(d.data);\n });\n\n if (!foundLoops.some(function (foundLoop) {\n return foundLoop.length === loop.length && foundLoop.every(function (id, idx) {\n return id === loop[idx];\n });\n })) {\n foundLoops.push(loop);\n onLoopError(loop);\n }\n\n return \"continue\";\n }();\n\n if (_ret === \"continue\") continue;\n }\n\n if (currentDepth > node.depth) {\n // Don't unnecessarily revisit chunks of the graph\n node.depth = currentDepth;\n traverse(node.out, [].concat(_toConsumableArray(nodeStack), [node]), currentDepth + (node.skip ? 0 : 1));\n }\n }\n }\n}\n\nvar DAG_LEVEL_NODE_RATIO = 2; // whenever styling props are changed that require a canvas redraw\n\nvar notifyRedraw = function notifyRedraw(_, state) {\n return state.onNeedsRedraw && state.onNeedsRedraw();\n};\n\nvar CanvasForceGraph = Kapsule({\n props: {\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n },\n onChange: function onChange(_, state) {\n state.engineRunning = false;\n } // Pause simulation\n\n },\n dagMode: {\n onChange: function onChange(dagMode, state) {\n // td, bu, lr, rl, radialin, radialout\n !dagMode && (state.graphData.nodes || []).forEach(function (n) {\n return n.fx = n.fy = undefined;\n }); // unfix nodes when disabling dag mode\n }\n },\n dagLevelDistance: {},\n dagNodeFilter: {\n \"default\": function _default(node) {\n return true;\n }\n },\n onDagError: {\n triggerUpdate: false\n },\n nodeRelSize: {\n \"default\": 4,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n // area per val unit\n nodeId: {\n \"default\": 'id'\n },\n nodeVal: {\n \"default\": 'val',\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n nodeColor: {\n \"default\": 'color',\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n nodeAutoColorBy: {},\n nodeCanvasObject: {\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n nodeCanvasObjectMode: {\n \"default\": function _default() {\n return 'replace';\n },\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n nodeVisibility: {\n \"default\": true,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkSource: {\n \"default\": 'source'\n },\n linkTarget: {\n \"default\": 'target'\n },\n linkVisibility: {\n \"default\": true,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkColor: {\n \"default\": 'color',\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkAutoColorBy: {},\n linkLineDash: {\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkWidth: {\n \"default\": 1,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkCurvature: {\n \"default\": 0,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkCanvasObject: {\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkCanvasObjectMode: {\n \"default\": function _default() {\n return 'replace';\n },\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkDirectionalArrowLength: {\n \"default\": 0,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkDirectionalArrowColor: {\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkDirectionalArrowRelPos: {\n \"default\": 0.5,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalParticles: {\n \"default\": 0\n },\n // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: {\n \"default\": 0.01,\n triggerUpdate: false\n },\n // in link length ratio per frame\n linkDirectionalParticleWidth: {\n \"default\": 4,\n triggerUpdate: false\n },\n linkDirectionalParticleColor: {\n triggerUpdate: false\n },\n globalScale: {\n \"default\": 1,\n triggerUpdate: false\n },\n d3AlphaMin: {\n \"default\": 0,\n triggerUpdate: false\n },\n d3AlphaDecay: {\n \"default\": 0.0228,\n triggerUpdate: false,\n onChange: function onChange(alphaDecay, state) {\n state.forceLayout.alphaDecay(alphaDecay);\n }\n },\n d3AlphaTarget: {\n \"default\": 0,\n triggerUpdate: false,\n onChange: function onChange(alphaTarget, state) {\n state.forceLayout.alphaTarget(alphaTarget);\n }\n },\n d3VelocityDecay: {\n \"default\": 0.4,\n triggerUpdate: false,\n onChange: function onChange(velocityDecay, state) {\n state.forceLayout.velocityDecay(velocityDecay);\n }\n },\n warmupTicks: {\n \"default\": 0,\n triggerUpdate: false\n },\n // how many times to tick the force engine at init before starting to render\n cooldownTicks: {\n \"default\": Infinity,\n triggerUpdate: false\n },\n cooldownTime: {\n \"default\": 15000,\n triggerUpdate: false\n },\n // ms\n onUpdate: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onFinishUpdate: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onEngineTick: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onEngineStop: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNeedsRedraw: {\n triggerUpdate: false\n },\n isShadow: {\n \"default\": false,\n triggerUpdate: false\n }\n },\n methods: {\n // Expose d3 forces for external manipulation\n d3Force: function d3Force(state, forceName, forceFn) {\n if (forceFn === undefined) {\n return state.forceLayout.force(forceName); // Force getter\n }\n\n state.forceLayout.force(forceName, forceFn); // Force setter\n\n return this;\n },\n d3ReheatSimulation: function d3ReheatSimulation(state) {\n state.forceLayout.alpha(1);\n this.resetCountdown();\n return this;\n },\n // reset cooldown state\n resetCountdown: function resetCountdown(state) {\n state.cntTicks = 0;\n state.startTickTime = new Date();\n state.engineRunning = true;\n return this;\n },\n isEngineRunning: function isEngineRunning(state) {\n return !!state.engineRunning;\n },\n tickFrame: function tickFrame(state) {\n !state.isShadow && layoutTick();\n paintLinks();\n !state.isShadow && paintArrows();\n !state.isShadow && paintPhotons();\n paintNodes();\n return this; //\n\n function layoutTick() {\n if (state.engineRunning) {\n if (++state.cntTicks > state.cooldownTicks || new Date() - state.startTickTime > state.cooldownTime || state.d3AlphaMin > 0 && state.forceLayout.alpha() < state.d3AlphaMin) {\n state.engineRunning = false; // Stop ticking graph\n\n state.onEngineStop();\n } else {\n state.forceLayout.tick(); // Tick it\n\n state.onEngineTick();\n }\n }\n }\n\n function paintNodes() {\n var getVisibility = accessorFn(state.nodeVisibility);\n var getVal = accessorFn(state.nodeVal);\n var getColor = accessorFn(state.nodeColor);\n var getNodeCanvasObjectMode = accessorFn(state.nodeCanvasObjectMode);\n var ctx = state.ctx; // Draw wider nodes by 1px on shadow canvas for more precise hovering (due to boundary anti-aliasing)\n\n var padAmount = state.isShadow / state.globalScale;\n var visibleNodes = state.graphData.nodes.filter(getVisibility);\n ctx.save();\n visibleNodes.forEach(function (node) {\n var nodeCanvasObjectMode = getNodeCanvasObjectMode(node);\n\n if (state.nodeCanvasObject && (nodeCanvasObjectMode === 'before' || nodeCanvasObjectMode === 'replace')) {\n // Custom node before/replace paint\n state.nodeCanvasObject(node, ctx, state.globalScale);\n\n if (nodeCanvasObjectMode === 'replace') {\n ctx.restore();\n return;\n }\n } // Draw wider nodes by 1px on shadow canvas for more precise hovering (due to boundary anti-aliasing)\n\n\n var r = Math.sqrt(Math.max(0, getVal(node) || 1)) * state.nodeRelSize + padAmount;\n ctx.beginPath();\n ctx.arc(node.x, node.y, r, 0, 2 * Math.PI, false);\n ctx.fillStyle = getColor(node) || 'rgba(31, 120, 180, 0.92)';\n ctx.fill();\n\n if (state.nodeCanvasObject && nodeCanvasObjectMode === 'after') {\n // Custom node after paint\n state.nodeCanvasObject(node, state.ctx, state.globalScale);\n }\n });\n ctx.restore();\n }\n\n function paintLinks() {\n var getVisibility = accessorFn(state.linkVisibility);\n var getColor = accessorFn(state.linkColor);\n var getWidth = accessorFn(state.linkWidth);\n var getLineDash = accessorFn(state.linkLineDash);\n var getCurvature = accessorFn(state.linkCurvature);\n var getLinkCanvasObjectMode = accessorFn(state.linkCanvasObjectMode);\n var ctx = state.ctx; // Draw wider lines by 2px on shadow canvas for more precise hovering (due to boundary anti-aliasing)\n\n var padAmount = state.isShadow * 2;\n var visibleLinks = state.graphData.links.filter(getVisibility);\n visibleLinks.forEach(calcLinkControlPoints); // calculate curvature control points for all visible links\n\n var beforeCustomLinks = [],\n afterCustomLinks = [],\n defaultPaintLinks = visibleLinks;\n\n if (state.linkCanvasObject) {\n var replaceCustomLinks = [],\n otherCustomLinks = [];\n visibleLinks.forEach(function (d) {\n return ({\n before: beforeCustomLinks,\n after: afterCustomLinks,\n replace: replaceCustomLinks\n }[getLinkCanvasObjectMode(d)] || otherCustomLinks).push(d);\n });\n defaultPaintLinks = [].concat(_toConsumableArray(beforeCustomLinks), afterCustomLinks, otherCustomLinks);\n beforeCustomLinks = beforeCustomLinks.concat(replaceCustomLinks);\n } // Custom link before paints\n\n\n ctx.save();\n beforeCustomLinks.forEach(function (link) {\n return state.linkCanvasObject(link, ctx, state.globalScale);\n });\n ctx.restore(); // Bundle strokes per unique color/width/dash for performance optimization\n\n var linksPerColor = indexBy(defaultPaintLinks, [getColor, getWidth, getLineDash]);\n ctx.save();\n Object.entries(linksPerColor).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n color = _ref2[0],\n linksPerWidth = _ref2[1];\n\n var lineColor = !color || color === 'undefined' ? 'rgba(0,0,0,0.15)' : color;\n Object.entries(linksPerWidth).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n width = _ref4[0],\n linesPerLineDash = _ref4[1];\n\n var lineWidth = (width || 1) / state.globalScale + padAmount;\n Object.entries(linesPerLineDash).forEach(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2);\n _ref6[0];\n var links = _ref6[1];\n\n var lineDashSegments = getLineDash(links[0]);\n ctx.beginPath();\n links.forEach(function (link) {\n var start = link.source;\n var end = link.target;\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n ctx.moveTo(start.x, start.y);\n var controlPoints = link.__controlPoints;\n\n if (!controlPoints) {\n // Straight line\n ctx.lineTo(end.x, end.y);\n } else {\n // Use quadratic curves for regular lines and bezier for loops\n ctx[controlPoints.length === 2 ? 'quadraticCurveTo' : 'bezierCurveTo'].apply(ctx, _toConsumableArray(controlPoints).concat([end.x, end.y]));\n }\n });\n ctx.strokeStyle = lineColor;\n ctx.lineWidth = lineWidth;\n ctx.setLineDash(lineDashSegments || []);\n ctx.stroke();\n });\n });\n });\n ctx.restore(); // Custom link after paints\n\n ctx.save();\n afterCustomLinks.forEach(function (link) {\n return state.linkCanvasObject(link, ctx, state.globalScale);\n });\n ctx.restore(); //\n\n function calcLinkControlPoints(link) {\n var curvature = getCurvature(link);\n\n if (!curvature) {\n // straight line\n link.__controlPoints = null;\n return;\n }\n\n var start = link.source;\n var end = link.target;\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var l = Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2)); // line length\n\n if (l > 0) {\n var a = Math.atan2(end.y - start.y, end.x - start.x); // line angle\n\n var d = l * curvature; // control point distance\n\n var cp = {\n // control point\n x: (start.x + end.x) / 2 + d * Math.cos(a - Math.PI / 2),\n y: (start.y + end.y) / 2 + d * Math.sin(a - Math.PI / 2)\n };\n link.__controlPoints = [cp.x, cp.y];\n } else {\n // Same point, draw a loop\n var _d = curvature * 70;\n\n link.__controlPoints = [end.x, end.y - _d, end.x + _d, end.y];\n }\n }\n }\n\n function paintArrows() {\n var ARROW_WH_RATIO = 1.6;\n var ARROW_VLEN_RATIO = 0.2;\n var getLength = accessorFn(state.linkDirectionalArrowLength);\n var getRelPos = accessorFn(state.linkDirectionalArrowRelPos);\n var getVisibility = accessorFn(state.linkVisibility);\n var getColor = accessorFn(state.linkDirectionalArrowColor || state.linkColor);\n var getNodeVal = accessorFn(state.nodeVal);\n var ctx = state.ctx;\n ctx.save();\n state.graphData.links.filter(getVisibility).forEach(function (link) {\n var arrowLength = getLength(link);\n if (!arrowLength || arrowLength < 0) return;\n var start = link.source;\n var end = link.target;\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var startR = Math.sqrt(Math.max(0, getNodeVal(start) || 1)) * state.nodeRelSize;\n var endR = Math.sqrt(Math.max(0, getNodeVal(end) || 1)) * state.nodeRelSize;\n var arrowRelPos = Math.min(1, Math.max(0, getRelPos(link)));\n var arrowColor = getColor(link) || 'rgba(0,0,0,0.28)';\n var arrowHalfWidth = arrowLength / ARROW_WH_RATIO / 2; // Construct bezier for curved lines\n\n var bzLine = link.__controlPoints && _construct(Bezier, [start.x, start.y].concat(_toConsumableArray(link.__controlPoints), [end.x, end.y]));\n\n var getCoordsAlongLine = bzLine ? function (t) {\n return bzLine.get(t);\n } // get position along bezier line\n : function (t) {\n return {\n // straight line: interpolate linearly\n x: start.x + (end.x - start.x) * t || 0,\n y: start.y + (end.y - start.y) * t || 0\n };\n };\n var lineLen = bzLine ? bzLine.length() : Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2));\n var posAlongLine = startR + arrowLength + (lineLen - startR - endR - arrowLength) * arrowRelPos;\n var arrowHead = getCoordsAlongLine(posAlongLine / lineLen);\n var arrowTail = getCoordsAlongLine((posAlongLine - arrowLength) / lineLen);\n var arrowTailVertex = getCoordsAlongLine((posAlongLine - arrowLength * (1 - ARROW_VLEN_RATIO)) / lineLen);\n var arrowTailAngle = Math.atan2(arrowHead.y - arrowTail.y, arrowHead.x - arrowTail.x) - Math.PI / 2;\n ctx.beginPath();\n ctx.moveTo(arrowHead.x, arrowHead.y);\n ctx.lineTo(arrowTail.x + arrowHalfWidth * Math.cos(arrowTailAngle), arrowTail.y + arrowHalfWidth * Math.sin(arrowTailAngle));\n ctx.lineTo(arrowTailVertex.x, arrowTailVertex.y);\n ctx.lineTo(arrowTail.x - arrowHalfWidth * Math.cos(arrowTailAngle), arrowTail.y - arrowHalfWidth * Math.sin(arrowTailAngle));\n ctx.fillStyle = arrowColor;\n ctx.fill();\n });\n ctx.restore();\n }\n\n function paintPhotons() {\n var getNumPhotons = accessorFn(state.linkDirectionalParticles);\n var getSpeed = accessorFn(state.linkDirectionalParticleSpeed);\n var getDiameter = accessorFn(state.linkDirectionalParticleWidth);\n var getVisibility = accessorFn(state.linkVisibility);\n var getColor = accessorFn(state.linkDirectionalParticleColor || state.linkColor);\n var ctx = state.ctx;\n ctx.save();\n state.graphData.links.filter(getVisibility).forEach(function (link) {\n var numCyclePhotons = getNumPhotons(link);\n if (!link.hasOwnProperty('__photons') || !link.__photons.length) return;\n var start = link.source;\n var end = link.target;\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var particleSpeed = getSpeed(link);\n var photons = link.__photons || [];\n var photonR = Math.max(0, getDiameter(link) / 2) / Math.sqrt(state.globalScale);\n var photonColor = getColor(link) || 'rgba(0,0,0,0.28)';\n ctx.fillStyle = photonColor; // Construct bezier for curved lines\n\n var bzLine = link.__controlPoints ? _construct(Bezier, [start.x, start.y].concat(_toConsumableArray(link.__controlPoints), [end.x, end.y])) : null;\n var cyclePhotonIdx = 0;\n var needsCleanup = false; // whether some photons need to be removed from list\n\n photons.forEach(function (photon) {\n var singleHop = !!photon.__singleHop;\n\n if (!photon.hasOwnProperty('__progressRatio')) {\n photon.__progressRatio = singleHop ? 0 : cyclePhotonIdx / numCyclePhotons;\n }\n\n !singleHop && cyclePhotonIdx++; // increase regular photon index\n\n photon.__progressRatio += particleSpeed;\n\n if (photon.__progressRatio >= 1) {\n if (!singleHop) {\n photon.__progressRatio = photon.__progressRatio % 1;\n } else {\n needsCleanup = true;\n return;\n }\n }\n\n var photonPosRatio = photon.__progressRatio;\n var coords = bzLine ? bzLine.get(photonPosRatio) // get position along bezier line\n : {\n // straight line: interpolate linearly\n x: start.x + (end.x - start.x) * photonPosRatio || 0,\n y: start.y + (end.y - start.y) * photonPosRatio || 0\n };\n ctx.beginPath();\n ctx.arc(coords.x, coords.y, photonR, 0, 2 * Math.PI, false);\n ctx.fill();\n });\n\n if (needsCleanup) {\n // remove expired single hop photons\n link.__photons = link.__photons.filter(function (photon) {\n return !photon.__singleHop || photon.__progressRatio <= 1;\n });\n }\n });\n ctx.restore();\n }\n },\n emitParticle: function emitParticle(state, link) {\n if (link) {\n !link.__photons && (link.__photons = []);\n\n link.__photons.push({\n __singleHop: true\n }); // add a single hop particle\n\n }\n\n return this;\n }\n },\n stateInit: function stateInit() {\n return {\n forceLayout: forceSimulation().force('link', forceLink()).force('charge', forceManyBody()).force('center', forceCenter()).force('dagRadial', null).stop(),\n engineRunning: false\n };\n },\n init: function init(canvasCtx, state) {\n // Main canvas object to manipulate\n state.ctx = canvasCtx;\n },\n update: function update(state) {\n state.engineRunning = false; // Pause simulation\n\n state.onUpdate();\n\n if (state.nodeAutoColorBy !== null) {\n // Auto add color to uncolored nodes\n autoColorObjects(state.graphData.nodes, accessorFn(state.nodeAutoColorBy), state.nodeColor);\n }\n\n if (state.linkAutoColorBy !== null) {\n // Auto add color to uncolored links\n autoColorObjects(state.graphData.links, accessorFn(state.linkAutoColorBy), state.linkColor);\n } // parse links\n\n\n state.graphData.links.forEach(function (link) {\n link.source = link[state.linkSource];\n link.target = link[state.linkTarget];\n });\n\n if (!state.isShadow) {\n // Add photon particles\n var linkParticlesAccessor = accessorFn(state.linkDirectionalParticles);\n state.graphData.links.forEach(function (link) {\n var numPhotons = Math.round(Math.abs(linkParticlesAccessor(link)));\n\n if (numPhotons) {\n link.__photons = _toConsumableArray(Array(numPhotons)).map(function () {\n return {};\n });\n } else {\n delete link.__photons;\n }\n });\n } // Feed data to force-directed layout\n\n\n state.forceLayout.stop().alpha(1) // re-heat the simulation\n .nodes(state.graphData.nodes); // add links (if link force is still active)\n\n var linkForce = state.forceLayout.force('link');\n\n if (linkForce) {\n linkForce.id(function (d) {\n return d[state.nodeId];\n }).links(state.graphData.links);\n } // setup dag force constraints\n\n\n var nodeDepths = state.dagMode && getDagDepths(state.graphData, function (node) {\n return node[state.nodeId];\n }, {\n nodeFilter: state.dagNodeFilter,\n onLoopError: state.onDagError || undefined\n });\n var maxDepth = Math.max.apply(Math, _toConsumableArray(Object.values(nodeDepths || [])));\n var dagLevelDistance = state.dagLevelDistance || state.graphData.nodes.length / (maxDepth || 1) * DAG_LEVEL_NODE_RATIO * (['radialin', 'radialout'].indexOf(state.dagMode) !== -1 ? 0.7 : 1); // Fix nodes to x,y for dag mode\n\n if (state.dagMode) {\n var getFFn = function getFFn(fix, invert) {\n return function (node) {\n return !fix ? undefined : (nodeDepths[node[state.nodeId]] - maxDepth / 2) * dagLevelDistance * (invert ? -1 : 1);\n };\n };\n\n var fxFn = getFFn(['lr', 'rl'].indexOf(state.dagMode) !== -1, state.dagMode === 'rl');\n var fyFn = getFFn(['td', 'bu'].indexOf(state.dagMode) !== -1, state.dagMode === 'bu');\n state.graphData.nodes.filter(state.dagNodeFilter).forEach(function (node) {\n node.fx = fxFn(node);\n node.fy = fyFn(node);\n });\n } // Use radial force for radial dags\n\n\n state.forceLayout.force('dagRadial', ['radialin', 'radialout'].indexOf(state.dagMode) !== -1 ? forceRadial(function (node) {\n var nodeDepth = nodeDepths[node[state.nodeId]] || -1;\n return (state.dagMode === 'radialin' ? maxDepth - nodeDepth : nodeDepth) * dagLevelDistance;\n }).strength(function (node) {\n return state.dagNodeFilter(node) ? 1 : 0;\n }) : null);\n\n for (var i = 0; i < state.warmupTicks && !(state.d3AlphaMin > 0 && state.forceLayout.alpha() < state.d3AlphaMin); i++) {\n state.forceLayout.tick();\n } // Initial ticks before starting to render\n\n\n this.resetCountdown();\n state.onFinishUpdate();\n }\n});\n\nfunction linkKapsule (kapsulePropNames, kapsuleType) {\n var propNames = kapsulePropNames instanceof Array ? kapsulePropNames : [kapsulePropNames];\n var dummyK = new kapsuleType(); // To extract defaults\n\n return {\n linkProp: function linkProp(prop) {\n // link property config\n return {\n \"default\": dummyK[prop](),\n onChange: function onChange(v, state) {\n propNames.forEach(function (propName) {\n return state[propName][prop](v);\n });\n },\n triggerUpdate: false\n };\n },\n linkMethod: function linkMethod(method) {\n // link method pass-through\n return function (state) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var returnVals = [];\n propNames.forEach(function (propName) {\n var kapsuleInstance = state[propName];\n var returnVal = kapsuleInstance[method].apply(kapsuleInstance, args);\n\n if (returnVal !== kapsuleInstance) {\n returnVals.push(returnVal);\n }\n });\n return returnVals.length ? returnVals[0] : this; // chain based on the parent object, not the inner kapsule\n };\n }\n };\n}\n\nvar HOVER_CANVAS_THROTTLE_DELAY = 800; // ms to throttle shadow canvas updates for perf improvement\n\nvar ZOOM2NODES_FACTOR = 4; // Expose config from forceGraph\n\nvar bindFG = linkKapsule('forceGraph', CanvasForceGraph);\nvar bindBoth = linkKapsule(['forceGraph', 'shadowGraph'], CanvasForceGraph);\nvar linkedProps = Object.assign.apply(Object, _toConsumableArray(['nodeColor', 'nodeAutoColorBy', 'nodeCanvasObject', 'nodeCanvasObjectMode', 'linkColor', 'linkAutoColorBy', 'linkLineDash', 'linkWidth', 'linkCanvasObject', 'linkCanvasObjectMode', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowRelPos', 'linkDirectionalParticles', 'linkDirectionalParticleSpeed', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'dagMode', 'dagLevelDistance', 'dagNodeFilter', 'onDagError', 'd3AlphaMin', 'd3AlphaDecay', 'd3VelocityDecay', 'warmupTicks', 'cooldownTicks', 'cooldownTime', 'onEngineTick', 'onEngineStop'].map(function (p) {\n return _defineProperty({}, p, bindFG.linkProp(p));\n})).concat(_toConsumableArray(['nodeRelSize', 'nodeId', 'nodeVal', 'nodeVisibility', 'linkSource', 'linkTarget', 'linkVisibility', 'linkCurvature'].map(function (p) {\n return _defineProperty({}, p, bindBoth.linkProp(p));\n}))));\nvar linkedMethods = Object.assign.apply(Object, _toConsumableArray(['d3Force', 'd3ReheatSimulation', 'emitParticle'].map(function (p) {\n return _defineProperty({}, p, bindFG.linkMethod(p));\n})));\n\nfunction adjustCanvasSize(state) {\n if (state.canvas) {\n var curWidth = state.canvas.width;\n var curHeight = state.canvas.height;\n\n if (curWidth === 300 && curHeight === 150) {\n // Default canvas dimensions\n curWidth = curHeight = 0;\n }\n\n var pxScale = window.devicePixelRatio; // 2 on retina displays\n\n curWidth /= pxScale;\n curHeight /= pxScale; // Resize canvases\n\n [state.canvas, state.shadowCanvas].forEach(function (canvas) {\n // Element size\n canvas.style.width = \"\".concat(state.width, \"px\");\n canvas.style.height = \"\".concat(state.height, \"px\"); // Memory size (scaled to avoid blurriness)\n\n canvas.width = state.width * pxScale;\n canvas.height = state.height * pxScale; // Normalize coordinate system to use css pixels (on init only)\n\n if (!curWidth && !curHeight) {\n canvas.getContext('2d').scale(pxScale, pxScale);\n }\n }); // Relative center panning based on 0,0\n\n var k = zoomTransform(state.canvas).k;\n state.zoom.translateBy(state.zoom.__baseElem, (state.width - curWidth) / 2 / k, (state.height - curHeight) / 2 / k);\n state.needsRedraw = true;\n }\n}\n\nfunction resetTransform(ctx) {\n var pxRatio = window.devicePixelRatio;\n ctx.setTransform(pxRatio, 0, 0, pxRatio, 0, 0);\n}\n\nfunction clearCanvas(ctx, width, height) {\n ctx.save();\n resetTransform(ctx); // reset transform\n\n ctx.clearRect(0, 0, width, height);\n ctx.restore(); //restore transforms\n} //\n\n\nvar forceGraph = Kapsule({\n props: _objectSpread2({\n width: {\n \"default\": window.innerWidth,\n onChange: function onChange(_, state) {\n return adjustCanvasSize(state);\n },\n triggerUpdate: false\n },\n height: {\n \"default\": window.innerHeight,\n onChange: function onChange(_, state) {\n return adjustCanvasSize(state);\n },\n triggerUpdate: false\n },\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n },\n onChange: function onChange(d, state) {\n [{\n type: 'Node',\n objs: d.nodes\n }, {\n type: 'Link',\n objs: d.links\n }].forEach(hexIndex);\n state.forceGraph.graphData(d);\n state.shadowGraph.graphData(d);\n\n function hexIndex(_ref4) {\n var type = _ref4.type,\n objs = _ref4.objs;\n objs.filter(function (d) {\n if (!d.hasOwnProperty('__indexColor')) return true;\n var cur = state.colorTracker.lookup(d.__indexColor);\n return !cur || !cur.hasOwnProperty('d') || cur.d !== d;\n }).forEach(function (d) {\n // store object lookup color\n d.__indexColor = state.colorTracker.register({\n type: type,\n d: d\n });\n });\n }\n },\n triggerUpdate: false\n },\n backgroundColor: {\n onChange: function onChange(color, state) {\n state.canvas && color && (state.canvas.style.background = color);\n },\n triggerUpdate: false\n },\n nodeLabel: {\n \"default\": 'name',\n triggerUpdate: false\n },\n nodePointerAreaPaint: {\n onChange: function onChange(paintFn, state) {\n state.shadowGraph.nodeCanvasObject(!paintFn ? null : function (node, ctx, globalScale) {\n return paintFn(node, node.__indexColor, ctx, globalScale);\n });\n },\n triggerUpdate: false\n },\n linkPointerAreaPaint: {\n onChange: function onChange(paintFn, state) {\n state.shadowGraph.linkCanvasObject(!paintFn ? null : function (link, ctx, globalScale) {\n return paintFn(link, link.__indexColor, ctx, globalScale);\n });\n },\n triggerUpdate: false\n },\n linkLabel: {\n \"default\": 'name',\n triggerUpdate: false\n },\n linkHoverPrecision: {\n \"default\": 4,\n triggerUpdate: false\n },\n minZoom: {\n \"default\": 0.01,\n onChange: function onChange(minZoom, state) {\n state.zoom.scaleExtent([minZoom, state.zoom.scaleExtent()[1]]);\n },\n triggerUpdate: false\n },\n maxZoom: {\n \"default\": 1000,\n onChange: function onChange(maxZoom, state) {\n state.zoom.scaleExtent([state.zoom.scaleExtent()[0], maxZoom]);\n },\n triggerUpdate: false\n },\n enableNodeDrag: {\n \"default\": true,\n triggerUpdate: false\n },\n enableZoomInteraction: {\n \"default\": true,\n triggerUpdate: false\n },\n enablePanInteraction: {\n \"default\": true,\n triggerUpdate: false\n },\n enableZoomPanInteraction: {\n \"default\": true,\n triggerUpdate: false\n },\n // to be deprecated\n enablePointerInteraction: {\n \"default\": true,\n onChange: function onChange(_, state) {\n state.hoverObj = null;\n },\n triggerUpdate: false\n },\n autoPauseRedraw: {\n \"default\": true,\n triggerUpdate: false\n },\n onNodeDrag: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNodeDragEnd: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNodeClick: {\n triggerUpdate: false\n },\n onNodeRightClick: {\n triggerUpdate: false\n },\n onNodeHover: {\n triggerUpdate: false\n },\n onLinkClick: {\n triggerUpdate: false\n },\n onLinkRightClick: {\n triggerUpdate: false\n },\n onLinkHover: {\n triggerUpdate: false\n },\n onBackgroundClick: {\n triggerUpdate: false\n },\n onBackgroundRightClick: {\n triggerUpdate: false\n },\n onZoom: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onZoomEnd: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onRenderFramePre: {\n triggerUpdate: false\n },\n onRenderFramePost: {\n triggerUpdate: false\n }\n }, linkedProps),\n aliases: {\n // Prop names supported for backwards compatibility\n stopAnimation: 'pauseAnimation'\n },\n methods: _objectSpread2({\n graph2ScreenCoords: function graph2ScreenCoords(state, x, y) {\n var t = zoomTransform(state.canvas);\n return {\n x: x * t.k + t.x,\n y: y * t.k + t.y\n };\n },\n screen2GraphCoords: function screen2GraphCoords(state, x, y) {\n var t = zoomTransform(state.canvas);\n return {\n x: (x - t.x) / t.k,\n y: (y - t.y) / t.k\n };\n },\n centerAt: function centerAt(state, x, y, transitionDuration) {\n if (!state.canvas) return null; // no canvas yet\n // setter\n\n if (x !== undefined || y !== undefined) {\n var finalPos = Object.assign({}, x !== undefined ? {\n x: x\n } : {}, y !== undefined ? {\n y: y\n } : {});\n\n if (!transitionDuration) {\n // no animation\n setCenter(finalPos);\n } else {\n new TWEEN.Tween(getCenter()).to(finalPos, transitionDuration).easing(TWEEN.Easing.Quadratic.Out).onUpdate(setCenter).start();\n }\n\n return this;\n } // getter\n\n\n return getCenter(); //\n\n function getCenter() {\n var t = zoomTransform(state.canvas);\n return {\n x: (state.width / 2 - t.x) / t.k,\n y: (state.height / 2 - t.y) / t.k\n };\n }\n\n function setCenter(_ref5) {\n var x = _ref5.x,\n y = _ref5.y;\n state.zoom.translateTo(state.zoom.__baseElem, x === undefined ? getCenter().x : x, y === undefined ? getCenter().y : y);\n state.needsRedraw = true;\n }\n },\n zoom: function zoom(state, k, transitionDuration) {\n if (!state.canvas) return null; // no canvas yet\n // setter\n\n if (k !== undefined) {\n if (!transitionDuration) {\n // no animation\n setZoom(k);\n } else {\n new TWEEN.Tween({\n k: getZoom()\n }).to({\n k: k\n }, transitionDuration).easing(TWEEN.Easing.Quadratic.Out).onUpdate(function (_ref6) {\n var k = _ref6.k;\n return setZoom(k);\n }).start();\n }\n\n return this;\n } // getter\n\n\n return getZoom(); //\n\n function getZoom() {\n return zoomTransform(state.canvas).k;\n }\n\n function setZoom(k) {\n state.zoom.scaleTo(state.zoom.__baseElem, k);\n state.needsRedraw = true;\n }\n },\n zoomToFit: function zoomToFit(state) {\n var transitionDuration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;\n\n for (var _len = arguments.length, bboxArgs = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n bboxArgs[_key - 3] = arguments[_key];\n }\n\n var bbox = this.getGraphBbox.apply(this, bboxArgs);\n\n if (bbox) {\n var center = {\n x: (bbox.x[0] + bbox.x[1]) / 2,\n y: (bbox.y[0] + bbox.y[1]) / 2\n };\n var zoomK = Math.max(1e-12, Math.min(1e12, (state.width - padding * 2) / (bbox.x[1] - bbox.x[0]), (state.height - padding * 2) / (bbox.y[1] - bbox.y[0])));\n this.centerAt(center.x, center.y, transitionDuration);\n this.zoom(zoomK, transitionDuration);\n }\n\n return this;\n },\n getGraphBbox: function getGraphBbox(state) {\n var nodeFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {\n return true;\n };\n var getVal = accessorFn(state.nodeVal);\n\n var getR = function getR(node) {\n return Math.sqrt(Math.max(0, getVal(node) || 1)) * state.nodeRelSize;\n };\n\n var nodesPos = state.graphData.nodes.filter(nodeFilter).map(function (node) {\n return {\n x: node.x,\n y: node.y,\n r: getR(node)\n };\n });\n return !nodesPos.length ? null : {\n x: [min(nodesPos, function (node) {\n return node.x - node.r;\n }), max(nodesPos, function (node) {\n return node.x + node.r;\n })],\n y: [min(nodesPos, function (node) {\n return node.y - node.r;\n }), max(nodesPos, function (node) {\n return node.y + node.r;\n })]\n };\n },\n pauseAnimation: function pauseAnimation(state) {\n if (state.animationFrameRequestId) {\n cancelAnimationFrame(state.animationFrameRequestId);\n state.animationFrameRequestId = null;\n }\n\n return this;\n },\n resumeAnimation: function resumeAnimation(state) {\n if (!state.animationFrameRequestId) {\n this._animationCycle();\n }\n\n return this;\n },\n _destructor: function _destructor() {\n this.pauseAnimation();\n this.graphData({\n nodes: [],\n links: []\n });\n }\n }, linkedMethods),\n stateInit: function stateInit() {\n return {\n lastSetZoom: 1,\n zoom: zoom(),\n forceGraph: new CanvasForceGraph(),\n shadowGraph: new CanvasForceGraph().cooldownTicks(0).nodeColor('__indexColor').linkColor('__indexColor').isShadow(true),\n colorTracker: new ColorTracker() // indexed objects for rgb lookup\n\n };\n },\n init: function init(domNode, state) {\n // Wipe DOM\n domNode.innerHTML = ''; // Container anchor for canvas and tooltip\n\n var container = document.createElement('div');\n container.classList.add('force-graph-container');\n container.style.position = 'relative';\n domNode.appendChild(container);\n state.canvas = document.createElement('canvas');\n if (state.backgroundColor) state.canvas.style.background = state.backgroundColor;\n container.appendChild(state.canvas);\n state.shadowCanvas = document.createElement('canvas'); // Show shadow canvas\n //state.shadowCanvas.style.position = 'absolute';\n //state.shadowCanvas.style.top = '0';\n //state.shadowCanvas.style.left = '0';\n //container.appendChild(state.shadowCanvas);\n\n var ctx = state.canvas.getContext('2d');\n var shadowCtx = state.shadowCanvas.getContext('2d');\n var pointerPos = {\n x: -1e12,\n y: -1e12\n };\n\n var getObjUnderPointer = function getObjUnderPointer() {\n var obj = null;\n var pxScale = window.devicePixelRatio;\n var px = pointerPos.x > 0 && pointerPos.y > 0 ? shadowCtx.getImageData(pointerPos.x * pxScale, pointerPos.y * pxScale, 1, 1) : null; // Lookup object per pixel color\n\n px && (obj = state.colorTracker.lookup(px.data));\n return obj;\n }; // Setup node drag interaction\n\n\n select(state.canvas).call(drag().subject(function () {\n if (!state.enableNodeDrag) {\n return null;\n }\n\n var obj = getObjUnderPointer();\n return obj && obj.type === 'Node' ? obj.d : null; // Only drag nodes\n }).on('start', function (ev) {\n var obj = ev.subject;\n obj.__initialDragPos = {\n x: obj.x,\n y: obj.y,\n fx: obj.fx,\n fy: obj.fy\n }; // keep engine running at low intensity throughout drag\n\n if (!ev.active) {\n obj.fx = obj.x;\n obj.fy = obj.y; // Fix points\n } // drag cursor\n\n\n state.canvas.classList.add('grabbable');\n }).on('drag', function (ev) {\n var obj = ev.subject;\n var initPos = obj.__initialDragPos;\n var dragPos = ev;\n var k = zoomTransform(state.canvas).k;\n var translate = {\n x: initPos.x + (dragPos.x - initPos.x) / k - obj.x,\n y: initPos.y + (dragPos.y - initPos.y) / k - obj.y\n }; // Move fx/fy (and x/y) of nodes based on the scaled drag distance since the drag start\n\n ['x', 'y'].forEach(function (c) {\n return obj[\"f\".concat(c)] = obj[c] = initPos[c] + (dragPos[c] - initPos[c]) / k;\n }); // prevent freeze while dragging\n\n state.forceGraph.d3AlphaTarget(0.3) // keep engine running at low intensity throughout drag\n .resetCountdown(); // prevent freeze while dragging\n\n state.isPointerDragging = true;\n obj.__dragged = true;\n state.onNodeDrag(obj, translate);\n }).on('end', function (ev) {\n var obj = ev.subject;\n var initPos = obj.__initialDragPos;\n var translate = {\n x: obj.x - initPos.x,\n y: obj.y - initPos.y\n };\n\n if (initPos.fx === undefined) {\n obj.fx = undefined;\n }\n\n if (initPos.fy === undefined) {\n obj.fy = undefined;\n }\n\n delete obj.__initialDragPos;\n state.forceGraph.d3AlphaTarget(0) // release engine low intensity\n .resetCountdown(); // let the engine readjust after releasing fixed nodes\n // drag cursor\n\n state.canvas.classList.remove('grabbable');\n state.isPointerDragging = false;\n\n if (obj.__dragged) {\n delete obj.__dragged;\n state.onNodeDragEnd(obj, translate);\n }\n })); // Setup zoom / pan interaction\n\n state.zoom(state.zoom.__baseElem = select(state.canvas)); // Attach controlling elem for easy access\n\n state.zoom.__baseElem.on('dblclick.zoom', null); // Disable double-click to zoom\n\n\n state.zoom.filter(function (ev) {\n return (// disable zoom interaction\n !ev.button && state.enableZoomPanInteraction && (state.enableZoomInteraction || ev.type !== 'wheel') && (state.enablePanInteraction || ev.type === 'wheel')\n );\n }).on('zoom', function (ev) {\n var t = ev.transform;\n [ctx, shadowCtx].forEach(function (c) {\n resetTransform(c);\n c.translate(t.x, t.y);\n c.scale(t.k, t.k);\n });\n state.onZoom(_objectSpread2({}, t));\n state.needsRedraw = true;\n }).on('end', function (ev) {\n return state.onZoomEnd(_objectSpread2({}, ev.transform));\n });\n adjustCanvasSize(state);\n state.forceGraph.onNeedsRedraw(function () {\n return state.needsRedraw = true;\n }).onFinishUpdate(function () {\n // re-zoom, if still in default position (not user modified)\n if (zoomTransform(state.canvas).k === state.lastSetZoom && state.graphData.nodes.length) {\n state.zoom.scaleTo(state.zoom.__baseElem, state.lastSetZoom = ZOOM2NODES_FACTOR / Math.cbrt(state.graphData.nodes.length));\n state.needsRedraw = true;\n }\n }); // Setup tooltip\n\n var toolTipElem = document.createElement('div');\n toolTipElem.classList.add('graph-tooltip');\n container.appendChild(toolTipElem); // Capture pointer coords on move or touchstart\n\n ['pointermove', 'pointerdown'].forEach(function (evType) {\n return container.addEventListener(evType, function (ev) {\n if (evType === 'pointerdown') {\n state.isPointerPressed = true; // track click state\n\n state.pointerDownEvent = ev;\n } // detect pointer drag on canvas pan\n\n\n !state.isPointerDragging && ev.type === 'pointermove' && state.onBackgroundClick // only bother detecting drags this way if background clicks are enabled (so they don't trigger accidentally on canvas panning)\n && (ev.pressure > 0 || state.isPointerPressed) // ev.pressure always 0 on Safari, so we use the isPointerPressed tracker\n && (ev.pointerType !== 'touch' || ev.movementX === undefined || [ev.movementX, ev.movementY].some(function (m) {\n return Math.abs(m) > 1;\n })) // relax drag trigger sensitivity on touch events\n && (state.isPointerDragging = true); // update the pointer pos\n\n var offset = getOffset(container);\n pointerPos.x = ev.pageX - offset.left;\n pointerPos.y = ev.pageY - offset.top; // Move tooltip\n\n toolTipElem.style.top = \"\".concat(pointerPos.y, \"px\");\n toolTipElem.style.left = \"\".concat(pointerPos.x, \"px\"); //\n\n function getOffset(el) {\n var rect = el.getBoundingClientRect(),\n scrollLeft = window.pageXOffset || document.documentElement.scrollLeft,\n scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n return {\n top: rect.top + scrollTop,\n left: rect.left + scrollLeft\n };\n }\n }, {\n passive: true\n });\n }); // Handle click/touch events on nodes/links\n\n container.addEventListener('pointerup', function (ev) {\n state.isPointerPressed = false;\n\n if (state.isPointerDragging) {\n state.isPointerDragging = false;\n return; // don't trigger click events after pointer drag (pan / node drag functionality)\n }\n\n var cbEvents = [ev, state.pointerDownEvent];\n requestAnimationFrame(function () {\n // trigger click events asynchronously, to allow hoverObj to be set (on frame)\n if (ev.button === 0) {\n // mouse left-click or touch\n if (state.hoverObj) {\n var fn = state[\"on\".concat(state.hoverObj.type, \"Click\")];\n fn && fn.apply(void 0, [state.hoverObj.d].concat(cbEvents));\n } else {\n state.onBackgroundClick && state.onBackgroundClick.apply(state, cbEvents);\n }\n }\n\n if (ev.button === 2) {\n // mouse right-click\n if (state.hoverObj) {\n var _fn = state[\"on\".concat(state.hoverObj.type, \"RightClick\")];\n _fn && _fn.apply(void 0, [state.hoverObj.d].concat(cbEvents));\n } else {\n state.onBackgroundRightClick && state.onBackgroundRightClick.apply(state, cbEvents);\n }\n }\n });\n }, {\n passive: true\n });\n container.addEventListener('contextmenu', function (ev) {\n if (!state.onBackgroundRightClick && !state.onNodeRightClick && !state.onLinkRightClick) return true; // default contextmenu behavior\n\n ev.preventDefault();\n return false;\n });\n state.forceGraph(ctx);\n state.shadowGraph(shadowCtx); //\n\n var refreshShadowCanvas = throttle(function () {\n // wipe canvas\n clearCanvas(shadowCtx, state.width, state.height); // Adjust link hover area\n\n state.shadowGraph.linkWidth(function (l) {\n return accessorFn(state.linkWidth)(l) + state.linkHoverPrecision;\n }); // redraw\n\n var t = zoomTransform(state.canvas);\n state.shadowGraph.globalScale(t.k).tickFrame();\n }, HOVER_CANVAS_THROTTLE_DELAY); // Kick-off renderer\n\n (this._animationCycle = function animate() {\n // IIFE\n var doRedraw = !state.autoPauseRedraw || !!state.needsRedraw || state.forceGraph.isEngineRunning() || state.graphData.links.some(function (d) {\n return d.__photons && d.__photons.length;\n });\n state.needsRedraw = false;\n\n if (state.enablePointerInteraction) {\n // Update tooltip and trigger onHover events\n var obj = !state.isPointerDragging ? getObjUnderPointer() : null; // don't hover during drag\n\n if (obj !== state.hoverObj) {\n var prevObj = state.hoverObj;\n var prevObjType = prevObj ? prevObj.type : null;\n var objType = obj ? obj.type : null;\n\n if (prevObjType && prevObjType !== objType) {\n // Hover out\n var fn = state[\"on\".concat(prevObjType, \"Hover\")];\n fn && fn(null, prevObj.d);\n }\n\n if (objType) {\n // Hover in\n var _fn2 = state[\"on\".concat(objType, \"Hover\")];\n _fn2 && _fn2(obj.d, prevObjType === objType ? prevObj.d : null);\n }\n\n var tooltipContent = obj ? accessorFn(state[\"\".concat(obj.type.toLowerCase(), \"Label\")])(obj.d) || '' : '';\n toolTipElem.style.visibility = tooltipContent ? 'visible' : 'hidden';\n toolTipElem.innerHTML = tooltipContent; // set pointer if hovered object is clickable\n\n state.canvas.classList[obj && state[\"on\".concat(objType, \"Click\")] || !obj && state.onBackgroundClick ? 'add' : 'remove']('clickable');\n state.hoverObj = obj;\n }\n\n doRedraw && refreshShadowCanvas();\n }\n\n if (doRedraw) {\n // Wipe canvas\n clearCanvas(ctx, state.width, state.height); // Frame cycle\n\n var globalScale = zoomTransform(state.canvas).k;\n state.onRenderFramePre && state.onRenderFramePre(ctx, globalScale);\n state.forceGraph.globalScale(globalScale).tickFrame();\n state.onRenderFramePost && state.onRenderFramePost(ctx, globalScale);\n }\n\n TWEEN.update(); // update canvas animation tweens\n\n state.animationFrameRequestId = requestAnimationFrame(animate);\n })();\n },\n update: function updateFn(state) {}\n});\n\nexport default forceGraph;\n","import fromKapsule from 'react-kapsule';\nimport ForceGraphVRKapsule from '3d-force-graph-vr';\nimport PropTypes from 'prop-types';\nimport ForceGraphARKapsule from '3d-force-graph-ar';\nimport ForceGraph3DKapsule from '3d-force-graph';\nimport ForceGraph2DKapsule from 'force-graph';\n\nvar commonPropTypes = {\n width: PropTypes.number,\n height: PropTypes.number,\n graphData: PropTypes.shape({\n nodes: PropTypes.arrayOf(PropTypes.object).isRequired,\n links: PropTypes.arrayOf(PropTypes.object).isRequired\n }),\n backgroundColor: PropTypes.string,\n nodeRelSize: PropTypes.number,\n nodeId: PropTypes.string,\n nodeLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n nodeVal: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n nodeVisibility: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),\n nodeColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n nodeAutoColorBy: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n onNodeHover: PropTypes.func,\n onNodeClick: PropTypes.func,\n linkSource: PropTypes.string,\n linkTarget: PropTypes.string,\n linkLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkVisibility: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),\n linkColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkAutoColorBy: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkCurvature: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalArrowLength: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalArrowColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkDirectionalArrowRelPos: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalParticles: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalParticleSpeed: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalParticleWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalParticleColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n onLinkHover: PropTypes.func,\n onLinkClick: PropTypes.func,\n dagMode: PropTypes.oneOf(['td', 'bu', 'lr', 'rl', 'zin', 'zout', 'radialin', 'radialout']),\n dagLevelDistance: PropTypes.number,\n dagNodeFilter: PropTypes.func,\n onDagError: PropTypes.func,\n d3AlphaMin: PropTypes.number,\n d3AlphaDecay: PropTypes.number,\n d3VelocityDecay: PropTypes.number,\n warmupTicks: PropTypes.number,\n cooldownTicks: PropTypes.number,\n cooldownTime: PropTypes.number,\n onEngineTick: PropTypes.func,\n onEngineStop: PropTypes.func,\n getGraphBbox: PropTypes.func\n};\nvar pointerBasedPropTypes = {\n zoomToFit: PropTypes.func,\n onNodeRightClick: PropTypes.func,\n onNodeDrag: PropTypes.func,\n onNodeDragEnd: PropTypes.func,\n onLinkRightClick: PropTypes.func,\n linkHoverPrecision: PropTypes.number,\n onBackgroundClick: PropTypes.func,\n onBackgroundRightClick: PropTypes.func,\n enablePointerInteraction: PropTypes.bool,\n enableNodeDrag: PropTypes.bool\n};\nvar threeBasedPropTypes = {\n showNavInfo: PropTypes.bool,\n nodeOpacity: PropTypes.number,\n nodeResolution: PropTypes.number,\n nodeThreeObject: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),\n nodeThreeObjectExtend: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),\n linkOpacity: PropTypes.number,\n linkResolution: PropTypes.number,\n linkCurveRotation: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkMaterial: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),\n linkThreeObject: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),\n linkThreeObjectExtend: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),\n linkPositionUpdate: PropTypes.func,\n linkDirectionalArrowResolution: PropTypes.number,\n linkDirectionalParticleResolution: PropTypes.number,\n forceEngine: PropTypes.oneOf(['d3', 'ngraph']),\n ngraphPhysics: PropTypes.object,\n numDimensions: PropTypes.oneOf([1, 2, 3])\n};\nvar ForceGraph2DPropTypes = Object.assign({}, commonPropTypes, pointerBasedPropTypes, {\n linkLineDash: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.string, PropTypes.func]),\n nodeCanvasObjectMode: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n nodeCanvasObject: PropTypes.func,\n nodePointerAreaPaint: PropTypes.func,\n linkCanvasObjectMode: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkCanvasObject: PropTypes.func,\n linkPointerAreaPaint: PropTypes.func,\n autoPauseRedraw: PropTypes.bool,\n minZoom: PropTypes.number,\n maxZoom: PropTypes.number,\n enableZoomInteraction: PropTypes.bool,\n enablePanInteraction: PropTypes.bool,\n onZoom: PropTypes.func,\n onZoomEnd: PropTypes.func,\n onRenderFramePre: PropTypes.func,\n onRenderFramePost: PropTypes.func\n});\nvar ForceGraph3DPropTypes = Object.assign({}, commonPropTypes, pointerBasedPropTypes, threeBasedPropTypes, {\n enableNavigationControls: PropTypes.bool,\n controlType: PropTypes.oneOf(['trackball', 'orbit', 'fly']),\n rendererConfig: PropTypes.object,\n extraRenderers: PropTypes.arrayOf(PropTypes.shape({\n render: PropTypes.func.isRequired\n }))\n});\nvar ForceGraphVRPropTypes = Object.assign({}, commonPropTypes, threeBasedPropTypes, {\n nodeDesc: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkDesc: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n});\nvar ForceGraphARPropTypes = Object.assign({}, commonPropTypes, threeBasedPropTypes, {\n markerAttrs: PropTypes.object,\n yOffset: PropTypes.number,\n glScale: PropTypes.number\n});\n\nconst ForceGraphVR = fromKapsule(ForceGraphVRKapsule, {\n methodNames: [// bind methods\n 'getGraphBbox', 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'refresh']\n});\nForceGraphVR.displayName = 'ForceGraphVR';\nForceGraphVR.propTypes = ForceGraphVRPropTypes;\n\nconst ForceGraphAR = fromKapsule(ForceGraphARKapsule, {\n methodNames: [// bind methods\n 'getGraphBbox', 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'refresh'],\n initPropNames: ['markerAttrs']\n});\nForceGraphAR.displayName = 'ForceGraphAR';\nForceGraphAR.propTypes = ForceGraphARPropTypes;\n\nconst ForceGraph3D = fromKapsule(ForceGraph3DKapsule, {\n methodNames: [// bind methods\n 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'stopAnimation', 'pauseAnimation', 'resumeAnimation', 'cameraPosition', 'zoomToFit', 'getGraphBbox', 'screen2GraphCoords', 'graph2ScreenCoords', 'postProcessingComposer', 'scene', 'camera', 'renderer', 'controls', 'refresh'],\n initPropNames: ['controlType', 'rendererConfig', 'extraRenderers']\n});\nForceGraph3D.displayName = 'ForceGraph3D';\nForceGraph3D.propTypes = ForceGraph3DPropTypes;\n\nconst ForceGraph2D = fromKapsule(ForceGraph2DKapsule, {\n methodNames: [// bind methods\n 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'stopAnimation', 'pauseAnimation', 'resumeAnimation', 'centerAt', 'zoom', 'zoomToFit', 'getGraphBbox', 'screen2GraphCoords', 'graph2ScreenCoords']\n});\nForceGraph2D.displayName = 'ForceGraph2D';\nForceGraph2D.propTypes = ForceGraph2DPropTypes;\n\nexport { ForceGraph2D, ForceGraph3D, ForceGraphAR, ForceGraphVR };\n","// These styles need to be nested in a transform array\nconst TRANSFORM_STYLE_PROPERTIES = [\n 'perspective',\n 'rotate',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'scale',\n 'scaleX',\n 'scaleY',\n 'skewX',\n 'skewY',\n 'translateX',\n 'translateY',\n];\n\n// Transforms { translateX: 1 } to { transform: [{ translateX: 1 }]}\nexport default function wrapStyleTransforms(style) {\n const wrapped = {};\n Object.keys(style).forEach(key => {\n if (TRANSFORM_STYLE_PROPERTIES.indexOf(key) !== -1) {\n if (!wrapped.transform) {\n wrapped.transform = [];\n }\n wrapped.transform.push({\n [key]: style[key],\n });\n } else {\n wrapped[key] = style[key];\n }\n });\n return wrapped;\n}\n","import { StyleSheet } from 'react-native';\n\nexport default function flattenStyle(style) {\n const flatStyle = Object.assign({}, StyleSheet.flatten(style));\n if (flatStyle.transform) {\n flatStyle.transform.forEach(transform => {\n const key = Object.keys(transform)[0];\n flatStyle[key] = transform[key];\n });\n delete flatStyle.transform;\n }\n return flatStyle;\n}\n","/* eslint-disable no-plusplus */\n\nconst DIRECTIONAL_FALLBACKS = {\n Top: ['Vertical', ''],\n Bottom: ['Vertical', ''],\n Vertical: [''],\n Left: ['Horizontal', ''],\n Right: ['Horizontal', ''],\n Horizontal: [''],\n};\n\nconst DIRECTIONAL_SUFFICES = Object.keys(DIRECTIONAL_FALLBACKS);\n\nexport default function getDefaultStyleValue(key, flatStyle) {\n if (key === 'backgroundColor') {\n return 'rgba(0,0,0,0)';\n }\n if (key === 'color' || key.indexOf('Color') !== -1) {\n return 'rgba(0,0,0,1)';\n }\n if (key.indexOf('rotate') === 0 || key.indexOf('skew') === 0) {\n return '0deg';\n }\n if (key === 'opacity' || key.indexOf('scale') === 0) {\n return 1;\n }\n if (key === 'fontSize') {\n return 14;\n }\n if (key.indexOf('margin') === 0 || key.indexOf('padding') === 0) {\n for (let suffix, i = 0; i < DIRECTIONAL_SUFFICES.length; i++) {\n suffix = DIRECTIONAL_SUFFICES[i];\n if (key.substr(-suffix.length) === suffix) {\n const prefix = key.substr(0, key.length - suffix.length);\n const fallbacks = DIRECTIONAL_FALLBACKS[suffix];\n for (let fallback, j = 0; j < fallbacks.length; j++) {\n fallback = prefix + fallbacks[j];\n if (fallback in flatStyle) {\n return flatStyle[fallback];\n }\n }\n break;\n }\n }\n }\n return 0;\n}\n","import flattenStyle from './flattenStyle';\nimport getDefaultStyleValue from './getDefaultStyleValue';\n\n// Returns a flattened version of style with only `keys` values.\nexport default function getStyleValues(keys, style) {\n const values = {};\n const flatStyle = flattenStyle(style);\n\n (typeof keys === 'string' ? [keys] : keys).forEach(key => {\n values[key] =\n key in flatStyle ? flatStyle[key] : getDefaultStyleValue(key, flatStyle);\n });\n return values;\n}\n","import flattenStyle from './flattenStyle';\n\nfunction compareNumbers(a, b) {\n return a - b;\n}\n\nfunction notNull(value) {\n return value !== null;\n}\n\nfunction parsePosition(value) {\n if (value === 'from') {\n return 0;\n }\n if (value === 'to') {\n return 1;\n }\n const parsed = parseFloat(value, 10);\n if (Number.isNaN(parsed) || parsed < 0 || parsed > 1) {\n return null;\n }\n return parsed;\n}\n\nconst cache = {};\n\nexport default function createAnimation(definition) {\n const cacheKey = JSON.stringify(definition);\n if (cache[cacheKey]) {\n return cache[cacheKey];\n }\n\n const positions = Object.keys(definition)\n .map(parsePosition)\n .filter(notNull);\n positions.sort(compareNumbers);\n\n if (positions.length < 2) {\n throw new Error('Animation definitions must have at least two values.');\n }\n\n const compiled = {};\n if (definition.easing) {\n compiled.easing = definition.easing;\n }\n if (definition.style) {\n compiled.style = definition.style;\n }\n\n for (let i = 0; i < positions.length; i += 1) {\n const position = positions[i];\n let keyframe = definition[position];\n if (!keyframe) {\n if (position === 0) {\n keyframe = definition.from;\n } else if (position === 1) {\n keyframe = definition.to;\n }\n }\n if (!keyframe) {\n throw new Error('Missing animation keyframe, this should not happen');\n }\n\n keyframe = flattenStyle(keyframe);\n Object.keys(keyframe).forEach(key => {\n if (!(key in compiled)) {\n compiled[key] = {\n inputRange: [],\n outputRange: [],\n };\n }\n compiled[key].inputRange.push(position);\n compiled[key].outputRange.push(keyframe[key]);\n });\n }\n\n cache[cacheKey] = compiled;\n\n return compiled;\n}\n","import createAnimation from './createAnimation';\n\nconst animationRegistry = {};\n\nexport function registerAnimation(animationName, animation) {\n animationRegistry[animationName] = animation;\n}\n\nexport function getAnimationByName(animationName) {\n return animationRegistry[animationName];\n}\n\nexport function getAnimationNames() {\n return Object.keys(animationRegistry);\n}\n\nexport function initializeRegistryWithDefinitions(definitions) {\n Object.keys(definitions).forEach(animationName => {\n registerAnimation(\n animationName,\n createAnimation(definitions[animationName]),\n );\n });\n}\n","import { Easing } from 'react-native';\n\nconst EASING_FUNCTIONS = {\n // Standard CSS easings\n\n linear: Easing.linear,\n ease: Easing.bezier(0.25, 0.1, 0.25, 1),\n 'ease-in': Easing.bezier(0.42, 0, 1, 1),\n 'ease-out': Easing.bezier(0, 0, 0.58, 1),\n 'ease-in-out': Easing.bezier(0.42, 0, 0.58, 1),\n\n // Penner Equations - http://matthewlein.com/ceaser/ & http://easings.net\n\n 'ease-in-cubic': Easing.bezier(0.55, 0.055, 0.675, 0.19),\n 'ease-out-cubic': Easing.bezier(0.215, 0.61, 0.355, 1.0),\n 'ease-in-out-cubic': Easing.bezier(0.645, 0.045, 0.355, 1.0),\n\n 'ease-in-circ': Easing.bezier(0.6, 0.04, 0.98, 0.335),\n 'ease-out-circ': Easing.bezier(0.075, 0.82, 0.165, 1.0),\n 'ease-in-out-circ': Easing.bezier(0.785, 0.135, 0.15, 0.86),\n\n 'ease-in-expo': Easing.bezier(0.95, 0.05, 0.795, 0.035),\n 'ease-out-expo': Easing.bezier(0.19, 1.0, 0.22, 1.0),\n 'ease-in-out-expo': Easing.bezier(1.0, 0.0, 0.0, 1.0),\n\n 'ease-in-quad': Easing.bezier(0.55, 0.085, 0.68, 0.53),\n 'ease-out-quad': Easing.bezier(0.25, 0.46, 0.45, 0.94),\n 'ease-in-out-quad': Easing.bezier(0.455, 0.03, 0.515, 0.955),\n\n 'ease-in-quart': Easing.bezier(0.895, 0.03, 0.685, 0.22),\n 'ease-out-quart': Easing.bezier(0.165, 0.84, 0.44, 1.0),\n 'ease-in-out-quart': Easing.bezier(0.77, 0.0, 0.175, 1.0),\n\n 'ease-in-quint': Easing.bezier(0.755, 0.05, 0.855, 0.06),\n 'ease-out-quint': Easing.bezier(0.23, 1.0, 0.32, 1.0),\n 'ease-in-out-quint': Easing.bezier(0.86, 0.0, 0.07, 1.0),\n\n 'ease-in-sine': Easing.bezier(0.47, 0.0, 0.745, 0.715),\n 'ease-out-sine': Easing.bezier(0.39, 0.575, 0.565, 1.0),\n 'ease-in-out-sine': Easing.bezier(0.445, 0.05, 0.55, 0.95),\n\n 'ease-in-back': Easing.bezier(0.6, -0.28, 0.735, 0.045),\n 'ease-out-back': Easing.bezier(0.175, 0.885, 0.32, 1.275),\n 'ease-in-out-back': Easing.bezier(0.68, -0.55, 0.265, 1.55),\n};\n\nexport default EASING_FUNCTIONS;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Animated, Easing } from 'react-native';\nimport wrapStyleTransforms from './wrapStyleTransforms';\nimport getStyleValues from './getStyleValues';\nimport flattenStyle from './flattenStyle';\nimport createAnimation from './createAnimation';\nimport { getAnimationByName, getAnimationNames } from './registry';\nimport EASING_FUNCTIONS from './easing';\n\n// These styles are not number based and thus needs to be interpolated\nconst INTERPOLATION_STYLE_PROPERTIES = [\n // Transform styles\n 'rotate',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'skewX',\n 'skewY',\n 'transformMatrix',\n // View styles\n 'backgroundColor',\n 'borderColor',\n 'borderTopColor',\n 'borderRightColor',\n 'borderBottomColor',\n 'borderLeftColor',\n 'shadowColor',\n // Text styles\n 'color',\n 'textDecorationColor',\n // Image styles\n 'tintColor',\n];\n\nconst ZERO_CLAMPED_STYLE_PROPERTIES = ['width', 'height'];\n\n// Create a copy of `source` without `keys`\nfunction omit(keys, source) {\n const filtered = {};\n Object.keys(source).forEach(key => {\n if (keys.indexOf(key) === -1) {\n filtered[key] = source[key];\n }\n });\n return filtered;\n}\n\n// Yes it's absurd, but actually fast\nfunction deepEquals(a, b) {\n return a === b || JSON.stringify(a) === JSON.stringify(b);\n}\n\n// Determine to what value the animation should tween to\nfunction getAnimationTarget(iteration, direction) {\n switch (direction) {\n case 'reverse':\n return 0;\n case 'alternate':\n return iteration % 2 ? 0 : 1;\n case 'alternate-reverse':\n return iteration % 2 ? 1 : 0;\n case 'normal':\n default:\n return 1;\n }\n}\n\n// Like getAnimationTarget but opposite\nfunction getAnimationOrigin(iteration, direction) {\n return getAnimationTarget(iteration, direction) ? 0 : 1;\n}\n\nfunction getCompiledAnimation(animation) {\n if (typeof animation === 'string') {\n const compiledAnimation = getAnimationByName(animation);\n if (!compiledAnimation) {\n throw new Error(`No animation registred by the name of ${animation}`);\n }\n return compiledAnimation;\n }\n return createAnimation(animation);\n}\n\nfunction makeInterpolatedStyle(compiledAnimation, animationValue) {\n const style = {};\n Object.keys(compiledAnimation).forEach(key => {\n if (key === 'style') {\n Object.assign(style, compiledAnimation.style);\n } else if (key !== 'easing') {\n style[key] = animationValue.interpolate(compiledAnimation[key]);\n }\n });\n return wrapStyleTransforms(style);\n}\n\nfunction transitionToValue(\n property,\n transitionValue,\n toValue,\n duration,\n easing,\n useNativeDriver = false,\n delay,\n onTransitionBegin,\n onTransitionEnd,\n) {\n const animation =\n duration || easing || delay\n ? Animated.timing(transitionValue, {\n toValue,\n delay,\n duration: duration || 1000,\n easing:\n typeof easing === 'function'\n ? easing\n : EASING_FUNCTIONS[easing || 'ease'],\n useNativeDriver,\n })\n : Animated.spring(transitionValue, { toValue, useNativeDriver });\n setTimeout(() => onTransitionBegin(property), delay);\n animation.start(() => onTransitionEnd(property));\n}\n\n// Make (almost) any component animatable, similar to Animated.createAnimatedComponent\nexport default function createAnimatableComponent(WrappedComponent) {\n const wrappedComponentName =\n WrappedComponent.displayName || WrappedComponent.name || 'Component';\n\n const Animatable = Animated.createAnimatedComponent(WrappedComponent);\n\n return class AnimatableComponent extends Component {\n static displayName = `withAnimatable(${wrappedComponentName})`;\n\n static propTypes = {\n animation: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n duration: PropTypes.number,\n direction: PropTypes.oneOf([\n 'normal',\n 'reverse',\n 'alternate',\n 'alternate-reverse',\n ]),\n delay: PropTypes.number,\n easing: PropTypes.oneOfType([\n PropTypes.oneOf(Object.keys(EASING_FUNCTIONS)),\n PropTypes.func,\n ]),\n iterationCount(props, propName) {\n const val = props[propName];\n if (val !== 'infinite' && !(typeof val === 'number' && val >= 1)) {\n return new Error(\n 'iterationCount must be a positive number or \"infinite\"',\n );\n }\n return null;\n },\n iterationDelay: PropTypes.number,\n onAnimationBegin: PropTypes.func,\n onAnimationEnd: PropTypes.func,\n onTransitionBegin: PropTypes.func,\n onTransitionEnd: PropTypes.func,\n style: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.array,\n PropTypes.object,\n ]),\n transition: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n ]),\n useNativeDriver: PropTypes.bool,\n };\n\n static defaultProps = {\n animation: undefined,\n delay: 0,\n direction: 'normal',\n duration: undefined,\n easing: undefined,\n iterationCount: 1,\n iterationDelay: 0,\n onAnimationBegin() {},\n onAnimationEnd() {},\n onTransitionBegin() {},\n onTransitionEnd() {},\n style: undefined,\n transition: undefined,\n useNativeDriver: false,\n };\n\n constructor(props) {\n super(props);\n\n const animationValue = new Animated.Value(\n getAnimationOrigin(0, this.props.direction),\n );\n let animationStyle = {};\n let compiledAnimation = {};\n if (props.animation) {\n compiledAnimation = getCompiledAnimation(props.animation);\n animationStyle = makeInterpolatedStyle(\n compiledAnimation,\n animationValue,\n );\n }\n this.state = {\n animationValue,\n animationStyle,\n compiledAnimation,\n transitionStyle: {},\n transitionValues: {},\n currentTransitionValues: {},\n };\n\n if (props.transition) {\n this.state = {\n ...this.state,\n ...this.initializeTransitionState(props.transition),\n };\n }\n this.delayTimer = null;\n\n // Alias registered animations for backwards compatibility\n getAnimationNames().forEach(animationName => {\n if (!(animationName in this)) {\n this[animationName] = this.animate.bind(this, animationName);\n }\n });\n }\n\n initializeTransitionState(transitionKeys) {\n const transitionValues = {};\n const styleValues = {};\n\n const currentTransitionValues = getStyleValues(\n transitionKeys,\n this.props.style,\n );\n Object.keys(currentTransitionValues).forEach(key => {\n const value = currentTransitionValues[key];\n if (\n INTERPOLATION_STYLE_PROPERTIES.indexOf(key) !== -1 ||\n typeof value !== 'number'\n ) {\n transitionValues[key] = new Animated.Value(0);\n styleValues[key] = value;\n } else {\n const animationValue = new Animated.Value(value);\n transitionValues[key] = animationValue;\n styleValues[key] = animationValue;\n }\n });\n\n return {\n currentTransitionValues,\n transitionStyle: styleValues,\n transitionValues,\n };\n }\n\n getTransitionState(keys) {\n const transitionKeys = typeof keys === 'string' ? [keys] : keys;\n let {\n transitionValues,\n currentTransitionValues,\n transitionStyle,\n } = this.state;\n const missingKeys = transitionKeys.filter(\n key => !this.state.transitionValues[key],\n );\n if (missingKeys.length) {\n const transitionState = this.initializeTransitionState(missingKeys);\n transitionValues = {\n ...transitionValues,\n ...transitionState.transitionValues,\n };\n currentTransitionValues = {\n ...currentTransitionValues,\n ...transitionState.currentTransitionValues,\n };\n transitionStyle = {\n ...transitionStyle,\n ...transitionState.transitionStyle,\n };\n }\n return { transitionValues, currentTransitionValues, transitionStyle };\n }\n\n ref = null;\n\n handleRef = ref => {\n this.ref = ref;\n };\n\n setNativeProps(nativeProps) {\n if (this.ref) {\n this.ref.setNativeProps(nativeProps);\n }\n }\n\n componentDidMount() {\n const {\n animation,\n duration,\n delay,\n onAnimationBegin,\n iterationDelay,\n } = this.props;\n if (animation) {\n const startAnimation = () => {\n onAnimationBegin();\n this.startAnimation(duration, 0, iterationDelay, endState =>\n this.props.onAnimationEnd(endState),\n );\n this.delayTimer = null;\n };\n if (delay) {\n this.delayTimer = setTimeout(startAnimation, delay);\n } else {\n startAnimation();\n }\n }\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillReceiveProps(props) {\n const {\n animation,\n delay,\n duration,\n easing,\n iterationDelay,\n transition,\n onAnimationBegin,\n } = props;\n\n if (transition) {\n const values = getStyleValues(transition, props.style);\n this.transitionTo(values, duration, easing, delay);\n } else if (!deepEquals(animation, this.props.animation)) {\n if (animation) {\n if (this.delayTimer) {\n this.setAnimation(animation);\n } else {\n onAnimationBegin();\n this.animate(animation, duration, iterationDelay).then(endState =>\n this.props.onAnimationEnd(endState),\n );\n }\n } else {\n this.stopAnimation();\n }\n }\n }\n\n componentWillUnmount() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n }\n }\n\n setAnimation(animation, callback) {\n const compiledAnimation = getCompiledAnimation(animation);\n this.setState(\n state => ({\n animationStyle: makeInterpolatedStyle(\n compiledAnimation,\n state.animationValue,\n ),\n compiledAnimation,\n }),\n callback,\n );\n }\n\n animate(animation, duration, iterationDelay) {\n return new Promise(resolve => {\n this.setAnimation(animation, () => {\n this.startAnimation(duration, 0, iterationDelay, resolve);\n });\n });\n }\n\n stopAnimation() {\n this.setState({\n scheduledAnimation: false,\n animationStyle: {},\n });\n this.state.animationValue.stopAnimation();\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n\n startAnimation(duration, iteration, iterationDelay, callback) {\n const { animationValue, compiledAnimation } = this.state;\n const { direction, iterationCount, useNativeDriver } = this.props;\n let easing = this.props.easing || compiledAnimation.easing || 'ease';\n let currentIteration = iteration || 0;\n const fromValue = getAnimationOrigin(currentIteration, direction);\n const toValue = getAnimationTarget(currentIteration, direction);\n animationValue.setValue(fromValue);\n\n if (typeof easing === 'string') {\n easing = EASING_FUNCTIONS[easing];\n }\n // Reverse easing if on the way back\n const reversed =\n direction === 'reverse' ||\n (direction === 'alternate' && !toValue) ||\n (direction === 'alternate-reverse' && !toValue);\n if (reversed) {\n easing = Easing.out(easing);\n }\n const config = {\n toValue,\n easing,\n isInteraction: iterationCount <= 1,\n duration: duration || this.props.duration || 1000,\n useNativeDriver,\n delay: iterationDelay || 0,\n };\n\n Animated.timing(animationValue, config).start(endState => {\n currentIteration += 1;\n if (\n endState.finished &&\n this.props.animation &&\n (iterationCount === 'infinite' || currentIteration < iterationCount)\n ) {\n this.startAnimation(\n duration,\n currentIteration,\n iterationDelay,\n callback,\n );\n } else if (callback) {\n callback(endState);\n }\n });\n }\n\n transition(fromValues, toValues, duration, easing) {\n const fromValuesFlat = flattenStyle(fromValues);\n const toValuesFlat = flattenStyle(toValues);\n const transitionKeys = Object.keys(toValuesFlat);\n const {\n transitionValues,\n currentTransitionValues,\n transitionStyle,\n } = this.getTransitionState(transitionKeys);\n\n transitionKeys.forEach(property => {\n const fromValue = fromValuesFlat[property];\n const toValue = toValuesFlat[property];\n let transitionValue = transitionValues[property];\n if (!transitionValue) {\n transitionValue = new Animated.Value(0);\n }\n const needsInterpolation =\n INTERPOLATION_STYLE_PROPERTIES.indexOf(property) !== -1 ||\n typeof value !== 'number';\n const needsZeroClamping =\n ZERO_CLAMPED_STYLE_PROPERTIES.indexOf(property) !== -1;\n if (needsInterpolation) {\n transitionValue.setValue(0);\n transitionStyle[property] = transitionValue.interpolate({\n inputRange: [0, 1],\n outputRange: [fromValue, toValue],\n });\n currentTransitionValues[property] = toValue;\n toValuesFlat[property] = 1;\n } else {\n if (needsZeroClamping) {\n transitionStyle[property] = transitionValue.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolateLeft: 'clamp',\n });\n currentTransitionValues[property] = toValue;\n } else {\n transitionStyle[property] = transitionValue;\n }\n transitionValue.setValue(fromValue);\n }\n });\n this.setState(\n { transitionValues, transitionStyle, currentTransitionValues },\n () => {\n this.transitionToValues(\n toValuesFlat,\n duration || this.props.duration,\n easing,\n this.props.delay,\n );\n },\n );\n }\n\n transitionTo(toValues, duration, easing, delay) {\n const { currentTransitionValues } = this.state;\n const toValuesFlat = flattenStyle(toValues);\n const transitions = {\n from: {},\n to: {},\n };\n\n Object.keys(toValuesFlat).forEach(property => {\n const toValue = toValuesFlat[property];\n const needsInterpolation =\n INTERPOLATION_STYLE_PROPERTIES.indexOf(property) !== -1 ||\n typeof value !== 'number';\n const needsZeroClamping =\n ZERO_CLAMPED_STYLE_PROPERTIES.indexOf(property) !== -1;\n const transitionStyle = this.state.transitionStyle[property];\n const transitionValue = this.state.transitionValues[property];\n if (\n !needsInterpolation &&\n !needsZeroClamping &&\n transitionStyle &&\n transitionStyle === transitionValue\n ) {\n transitionToValue(\n property,\n transitionValue,\n toValue,\n duration,\n easing,\n this.props.useNativeDriver,\n delay,\n prop => this.props.onTransitionBegin(prop),\n prop => this.props.onTransitionEnd(prop),\n );\n } else {\n let currentTransitionValue = currentTransitionValues[property];\n if (\n typeof currentTransitionValue === 'undefined' &&\n this.props.style\n ) {\n const style = getStyleValues(property, this.props.style);\n currentTransitionValue = style[property];\n }\n transitions.from[property] = currentTransitionValue;\n transitions.to[property] = toValue;\n }\n });\n\n if (Object.keys(transitions.from).length) {\n this.transition(transitions.from, transitions.to, duration, easing);\n }\n }\n\n transitionToValues(toValues, duration, easing, delay) {\n Object.keys(toValues).forEach(property => {\n const transitionValue = this.state.transitionValues[property];\n const toValue = toValues[property];\n transitionToValue(\n property,\n transitionValue,\n toValue,\n duration,\n easing,\n this.props.useNativeDriver,\n delay,\n prop => this.props.onTransitionBegin(prop),\n prop => this.props.onTransitionEnd(prop),\n );\n });\n }\n\n render() {\n const { style, animation, transition } = this.props;\n if (animation && transition) {\n throw new Error('You cannot combine animation and transition props');\n }\n const restProps = omit(\n [\n 'animation',\n 'duration',\n 'direction',\n 'delay',\n 'easing',\n 'iterationCount',\n 'iterationDelay',\n 'onAnimationBegin',\n 'onAnimationEnd',\n 'onTransitionBegin',\n 'onTransitionEnd',\n 'style',\n 'transition',\n 'useNativeDriver',\n ],\n this.props,\n );\n\n return (\n <Animatable\n ref={this.handleRef}\n style={[\n style,\n this.state.animationStyle,\n wrapStyleTransforms(this.state.transitionStyle),\n ]}\n {...restProps}\n />\n );\n }\n };\n}\n","export const bounce = {\n 0: {\n translateY: 0,\n },\n 0.2: {\n translateY: 0,\n },\n 0.4: {\n translateY: -30,\n },\n 0.43: {\n translateY: -30,\n },\n 0.53: {\n translateY: 0,\n },\n 0.7: {\n translateY: -15,\n },\n 0.8: {\n translateY: 0,\n },\n 0.9: {\n translateY: -4,\n },\n 1: {\n translateY: 0,\n },\n};\n\nexport const flash = {\n 0: {\n opacity: 1,\n },\n 0.25: {\n opacity: 0,\n },\n 0.5: {\n opacity: 1,\n },\n 0.75: {\n opacity: 0,\n },\n 1: {\n opacity: 1,\n },\n};\n\nexport const jello = {\n 0: {\n skewX: '0deg',\n skewY: '0deg',\n },\n 0.111: {\n skewX: '0deg',\n skewY: '0deg',\n },\n 0.222: {\n skewX: '-12.5deg',\n skewY: '-12.5deg',\n },\n 0.333: {\n skewX: '6.25deg',\n skewY: '6.25deg',\n },\n 0.444: {\n skewX: '-3.125deg',\n skewY: '-3.125deg',\n },\n 0.555: {\n skewX: '1.5625deg',\n skewY: '1.5625deg',\n },\n 0.666: {\n skewX: '-0.78125deg',\n skewY: '-0.78125deg',\n },\n 0.777: {\n skewX: '0.390625deg',\n skewY: '0.390625deg',\n },\n 0.888: {\n skewX: '-0.1953125deg',\n skewY: '-0.1953125deg',\n },\n 1: {\n skewX: '0deg',\n skewY: '0deg',\n },\n};\n\nexport const pulse = {\n 0: {\n scale: 1,\n },\n 0.5: {\n scale: 1.05,\n },\n 1: {\n scale: 1,\n },\n};\n\nexport const rotate = {\n 0: {\n rotate: '0deg',\n },\n 0.25: {\n rotate: '90deg',\n },\n 0.5: {\n rotate: '180deg',\n },\n 0.75: {\n rotate: '270deg',\n },\n 1: {\n rotate: '360deg',\n },\n};\n\nexport const shake = {\n 0: {\n translateX: 0,\n },\n 0.1: {\n translateX: -10,\n },\n 0.2: {\n translateX: 10,\n },\n 0.3: {\n translateX: -10,\n },\n 0.4: {\n translateX: 10,\n },\n 0.5: {\n translateX: -10,\n },\n 0.6: {\n translateX: 10,\n },\n 0.7: {\n translateX: -10,\n },\n 0.8: {\n translateX: 10,\n },\n 0.9: {\n translateX: -10,\n },\n 1: {\n translateX: 0,\n },\n};\n\nexport const swing = {\n 0: {\n rotate: '0deg',\n },\n 0.2: {\n rotate: '15deg',\n },\n 0.4: {\n rotate: '-10deg',\n },\n 0.6: {\n rotate: '5deg',\n },\n 0.8: {\n rotate: '-5deg',\n },\n 1: {\n rotate: '0deg',\n },\n};\n\nexport const rubberBand = {\n 0: {\n scaleX: 1,\n scaleY: 1,\n },\n 0.3: {\n scaleX: 1.25,\n scaleY: 0.75,\n },\n 0.4: {\n scaleX: 0.75,\n scaleY: 1.25,\n },\n 0.5: {\n scaleX: 1.15,\n scaleY: 0.85,\n },\n 0.65: {\n scaleX: 0.95,\n scaleY: 1.05,\n },\n 0.75: {\n scaleX: 1.05,\n scaleY: 0.95,\n },\n 1: {\n scaleX: 1,\n scaleY: 1,\n },\n};\n\nexport const tada = {\n 0: {\n scale: 1,\n rotate: '0deg',\n },\n 0.1: {\n scale: 0.9,\n rotate: '-3deg',\n },\n 0.2: {\n scale: 0.9,\n rotate: '-3deg',\n },\n 0.3: {\n scale: 1.1,\n rotate: '-3deg',\n },\n 0.4: {\n rotate: '3deg',\n },\n 0.5: {\n rotate: '-3deg',\n },\n 0.6: {\n rotate: '3deg',\n },\n 0.7: {\n rotate: '-3deg',\n },\n 0.8: {\n rotate: '3deg',\n },\n 0.9: {\n scale: 1.1,\n rotate: '3deg',\n },\n 1: {\n scale: 1,\n rotate: '0deg',\n },\n};\n\nexport const wobble = {\n 0: {\n translateX: 0,\n rotate: '0deg',\n },\n 0.15: {\n translateX: -25,\n rotate: '-5deg',\n },\n 0.3: {\n translateX: 20,\n rotate: '3deg',\n },\n 0.45: {\n translateX: -15,\n rotate: '-3deg',\n },\n 0.6: {\n translateX: 10,\n rotate: '2deg',\n },\n 0.75: {\n translateX: -5,\n rotate: '-1deg',\n },\n 1: {\n translateX: 0,\n rotate: '0deg',\n },\n};\n","export const bounceIn = {\n 0: {\n opacity: 0,\n scale: 0.3,\n },\n 0.2: {\n scale: 1.1,\n },\n 0.4: {\n scale: 0.9,\n },\n 0.6: {\n opacity: 1,\n scale: 1.03,\n },\n 0.8: {\n scale: 0.97,\n },\n 1: {\n opacity: 1,\n scale: 1,\n },\n};\n\nexport const bounceInUp = {\n 0: {\n opacity: 0,\n translateY: 800,\n },\n 0.6: {\n opacity: 1,\n translateY: -25,\n },\n 0.75: {\n translateY: 10,\n },\n 0.9: {\n translateY: -5,\n },\n 1: {\n translateY: 0,\n },\n};\n\nexport const bounceInDown = {\n 0: {\n opacity: 0,\n translateY: -800,\n },\n 0.6: {\n opacity: 1,\n translateY: 25,\n },\n 0.75: {\n translateY: -10,\n },\n 0.9: {\n translateY: 5,\n },\n 1: {\n translateY: 0,\n },\n};\n\nexport const bounceInRight = {\n 0: {\n opacity: 0,\n translateX: 600,\n },\n 0.6: {\n opacity: 1,\n translateX: -20,\n },\n 0.75: {\n translateX: 8,\n },\n 0.9: {\n translateX: -4,\n },\n 1: {\n translateX: 0,\n },\n};\n\nexport const bounceInLeft = {\n 0: {\n opacity: 0,\n translateX: -600,\n },\n 0.6: {\n opacity: 1,\n translateX: 20,\n },\n 0.75: {\n translateX: -8,\n },\n 0.9: {\n translateX: 4,\n },\n 1: {\n translateX: 0,\n },\n};\n","export const bounceOut = {\n 0: {\n opacity: 1,\n scale: 1,\n },\n 0.2: {\n scale: 0.9,\n },\n 0.5: {\n opacity: 1,\n scale: 1.11,\n },\n 0.55: {\n scale: 1.11,\n },\n 1: {\n opacity: 0,\n scale: 0.3,\n },\n};\n\nexport const bounceOutUp = {\n 0: {\n opacity: 1,\n translateY: 0,\n },\n 0.2: {\n opacity: 1,\n translateY: -10,\n },\n 0.4: {\n translateY: 20,\n },\n 0.45: {\n translateY: 20,\n },\n 0.55: {\n opacity: 1,\n },\n 1: {\n opacity: 0,\n translateY: -800,\n },\n};\n\nexport const bounceOutDown = {\n 0: {\n opacity: 1,\n translateY: 0,\n },\n 0.2: {\n opacity: 1,\n translateY: 10,\n },\n 0.4: {\n translateY: -20,\n },\n 0.45: {\n translateY: -20,\n },\n 0.55: {\n opacity: 1,\n },\n 1: {\n opacity: 0,\n translateY: 800,\n },\n};\n\nexport const bounceOutRight = {\n 0: {\n opacity: 1,\n translateX: 0,\n },\n 0.2: {\n opacity: 1,\n translateX: 10,\n },\n 0.4: {\n translateX: -20,\n },\n 0.45: {\n translateX: -20,\n },\n 0.55: {\n opacity: 1,\n },\n 1: {\n opacity: 0,\n translateX: 600,\n },\n};\n\nexport const bounceOutLeft = {\n 0: {\n opacity: 1,\n translateX: 0,\n },\n 0.2: {\n opacity: 1,\n translateX: -10,\n },\n 0.4: {\n translateX: 20,\n },\n 0.45: {\n translateX: 20,\n },\n 0.55: {\n opacity: 1,\n },\n 1: {\n opacity: 0,\n translateX: -600,\n },\n};\n","function makeFadeInTranslation(translationType, fromValue) {\n return {\n from: {\n opacity: 0,\n [translationType]: fromValue,\n },\n to: {\n opacity: 1,\n [translationType]: 0,\n },\n };\n}\n\nexport const fadeIn = {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 1,\n },\n};\n\nexport const fadeInDown = makeFadeInTranslation('translateY', -100);\n\nexport const fadeInUp = makeFadeInTranslation('translateY', 100);\n\nexport const fadeInLeft = makeFadeInTranslation('translateX', -100);\n\nexport const fadeInRight = makeFadeInTranslation('translateX', 100);\n\nexport const fadeInDownBig = makeFadeInTranslation('translateY', -500);\n\nexport const fadeInUpBig = makeFadeInTranslation('translateY', 500);\n\nexport const fadeInLeftBig = makeFadeInTranslation('translateX', -500);\n\nexport const fadeInRightBig = makeFadeInTranslation('translateX', 500);\n","function makeFadeOutTranslation(translationType, toValue) {\n return {\n from: {\n opacity: 1,\n [translationType]: 0,\n },\n to: {\n opacity: 0,\n [translationType]: toValue,\n },\n };\n}\n\nexport const fadeOut = {\n from: {\n opacity: 1,\n },\n to: {\n opacity: 0,\n },\n};\n\nexport const fadeOutDown = makeFadeOutTranslation('translateY', 100);\n\nexport const fadeOutUp = makeFadeOutTranslation('translateY', -100);\n\nexport const fadeOutLeft = makeFadeOutTranslation('translateX', -100);\n\nexport const fadeOutRight = makeFadeOutTranslation('translateX', 100);\n\nexport const fadeOutDownBig = makeFadeOutTranslation('translateY', 500);\n\nexport const fadeOutUpBig = makeFadeOutTranslation('translateY', -500);\n\nexport const fadeOutLeftBig = makeFadeOutTranslation('translateX', -500);\n\nexport const fadeOutRightBig = makeFadeOutTranslation('translateX', 500);\n","export const flipInX = {\n easing: 'ease-in',\n style: {\n backfaceVisibility: 'visible',\n perspective: 400,\n },\n 0: {\n opacity: 0,\n rotateX: '90deg',\n },\n 0.4: {\n rotateX: '-20deg',\n },\n 0.6: {\n opacity: 1,\n rotateX: '10deg',\n },\n 0.8: {\n rotateX: '-5deg',\n },\n 1: {\n opacity: 1,\n rotateX: '0deg',\n },\n};\n\nexport const flipInY = {\n easing: 'ease-in',\n style: {\n backfaceVisibility: 'visible',\n perspective: 400,\n },\n 0: {\n opacity: 0,\n rotateY: '90deg',\n },\n 0.4: {\n rotateY: '-20deg',\n },\n 0.6: {\n opacity: 1,\n rotateY: '10deg',\n },\n 0.8: {\n rotateY: '-5deg',\n },\n 1: {\n opacity: 1,\n rotateY: '0deg',\n },\n};\n\nexport const flipOutX = {\n style: {\n backfaceVisibility: 'visible',\n perspective: 400,\n },\n 0: {\n opacity: 1,\n rotateX: '0deg',\n },\n 0.3: {\n opacity: 1,\n rotateX: '-20deg',\n },\n 1: {\n opacity: 0,\n rotateX: '90deg',\n },\n};\n\nexport const flipOutY = {\n style: {\n backfaceVisibility: 'visible',\n perspective: 400,\n },\n 0: {\n opacity: 1,\n rotateY: '0deg',\n },\n 0.3: {\n opacity: 1,\n rotateY: '-20deg',\n },\n 1: {\n opacity: 0,\n rotateY: '90deg',\n },\n};\n","export const lightSpeedIn = {\n easing: 'ease-out',\n 0: {\n opacity: 0,\n translateX: 200,\n skewX: '-30deg',\n },\n 0.6: {\n opacity: 1,\n translateX: 0,\n skewX: '20deg',\n },\n 0.8: {\n skewX: '-5deg',\n },\n 1: {\n opacity: 1,\n translateX: 0,\n skewX: '0deg',\n },\n};\n\nexport const lightSpeedOut = {\n easing: 'ease-in',\n 0: {\n opacity: 1,\n translateX: 0,\n skewX: '0deg',\n },\n 1: {\n opacity: 0,\n translateX: 200,\n skewX: '30deg',\n },\n};\n","function makeSlideInTranslation(translationType, fromValue) {\n return {\n from: {\n [translationType]: fromValue,\n },\n to: {\n [translationType]: 0,\n },\n };\n}\n\nexport const slideInDown = makeSlideInTranslation('translateY', -100);\n\nexport const slideInUp = makeSlideInTranslation('translateY', 100);\n\nexport const slideInLeft = makeSlideInTranslation('translateX', -100);\n\nexport const slideInRight = makeSlideInTranslation('translateX', 100);\n","function makeSlideOutTranslation(translationType, fromValue) {\n return {\n from: {\n [translationType]: 0,\n },\n to: {\n [translationType]: fromValue,\n },\n };\n}\n\nexport const slideOutDown = makeSlideOutTranslation('translateY', 100);\n\nexport const slideOutUp = makeSlideOutTranslation('translateY', -100);\n\nexport const slideOutLeft = makeSlideOutTranslation('translateX', -100);\n\nexport const slideOutRight = makeSlideOutTranslation('translateX', 100);\n","import { Easing } from 'react-native';\n\nfunction makeZoomInTranslation(translationType, pivotPoint) {\n const modifier = Math.min(1, Math.max(-1, pivotPoint));\n return {\n easing: Easing.bezier(0.175, 0.885, 0.32, 1),\n 0: {\n opacity: 0,\n scale: 0.1,\n [translationType]: modifier * -1000,\n },\n 0.6: {\n opacity: 1,\n scale: 0.457,\n [translationType]: pivotPoint,\n },\n 1: {\n scale: 1,\n [translationType]: 0,\n },\n };\n}\n\nexport const zoomIn = {\n from: {\n opacity: 0,\n scale: 0.3,\n },\n 0.5: {\n opacity: 1,\n },\n to: {\n opacity: 1,\n scale: 1,\n },\n};\n\nexport const zoomInDown = makeZoomInTranslation('translateY', 60);\n\nexport const zoomInUp = makeZoomInTranslation('translateY', -60);\n\nexport const zoomInLeft = makeZoomInTranslation('translateX', 10);\n\nexport const zoomInRight = makeZoomInTranslation('translateX', -10);\n","import { Easing } from 'react-native';\n\nfunction makeZoomOutTranslation(translationType, pivotPoint) {\n const modifier = Math.min(1, Math.max(-1, pivotPoint));\n return {\n easing: Easing.bezier(0.175, 0.885, 0.32, 1),\n 0: {\n opacity: 1,\n scale: 1,\n [translationType]: 0,\n },\n 0.4: {\n opacity: 1,\n scale: 0.457,\n [translationType]: pivotPoint,\n },\n 1: {\n opacity: 0,\n scale: 0.1,\n [translationType]: modifier * -1000,\n },\n };\n}\n\nexport const zoomOut = {\n from: {\n opacity: 1,\n scale: 1,\n },\n 0.5: {\n opacity: 1,\n scale: 0.3,\n },\n to: {\n opacity: 0,\n scale: 0,\n },\n};\n\nexport const zoomOutDown = makeZoomOutTranslation('translateY', 60);\n\nexport const zoomOutUp = makeZoomOutTranslation('translateY', -60);\n\nexport const zoomOutLeft = makeZoomOutTranslation('translateX', 10);\n\nexport const zoomOutRight = makeZoomOutTranslation('translateX', -10);\n","import {\n View as CoreView,\n Text as CoreText,\n Image as CoreImage,\n} from 'react-native';\nimport createComponent from './createAnimatableComponent';\nimport { initializeRegistryWithDefinitions } from './registry';\nimport * as ANIMATION_DEFINITIONS from './definitions';\n\ninitializeRegistryWithDefinitions(ANIMATION_DEFINITIONS);\n\nexport const createAnimatableComponent = createComponent;\nexport const View = createComponent(CoreView);\nexport const Text = createComponent(CoreText);\nexport const Image = createComponent(CoreImage);\nexport { default as createAnimation } from './createAnimation';\nexport {\n registerAnimation,\n initializeRegistryWithDefinitions,\n} from './registry';\n","import { Asset } from 'expo-asset';\n\n/**\n * The different types of assets you can provide to the [`loadAsync()`](#loadAsync) function.\n * A font source can be a URI, a module ID, or an Expo Asset.\n */\nexport type FontSource = string | number | Asset | FontResource;\n\n/**\n * Used to dictate the resource that is loaded into the provided font namespace when used with [`loadAsync`](#loadasync).\n * Optionally on web you can define a `display` value which sets the [`font-display`](#FontDisplay) property for a given typeface in the browser.\n */\nexport type FontResource = {\n uri: string | number;\n display?: FontDisplay;\n};\n\n/**\n * Sets the [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display) for a given typeface.\n * This currently **only works on web**. The default font value on web is `FontDisplay.AUTO`.\n * Even though setting the `fontDisplay` does nothing on native platforms, the default behavior emulates `FontDisplay.SWAP`\n * on flagship devices like iOS, Samsung, Pixel, etc. Default functionality varies on One Plus devices.\n * In the browser this value is set in the generated `@font-face` CSS block and not as a style property meaning you cannot dynamically\n * change this value based on the element it's used in.\n */\nexport enum FontDisplay {\n /**\n * (Default on web) The font display strategy is defined by the user agent or platform.\n * This generally defaults to the text being invisible until the font is loaded.\n * Good for buttons or banners that require a specific treatment.\n */\n AUTO = 'auto',\n /**\n * Fallback text is rendered immediately with a default font while the desired font is loaded.\n * This is good for making the content appear to load instantly and is usally preferred.\n */\n SWAP = 'swap',\n /**\n * The text will be invisible until the font has loaded.\n * If the font fails to load, nothing will appear.\n */\n BLOCK = 'block',\n /**\n * Splits the behavior between `SWAP` and `BLOCK`.\n * There will be a [100ms timeout](https://developers.google.com/web/updates/2016/02/font-display?hl=en) where the text with a custom font is invisible,\n * after that the text will either swap to the styled text or it'll show the unstyled text and continue to load the custom font.\n * This is good for buttons that need a custom font but should also be quickly available to screen-readers.\n */\n FALLBACK = 'fallback',\n /**\n * This works almost identically to `FALLBACK`,\n * the only difference is that the browser will decide to load the font based on slow connection speed or critical resource demand.\n */\n OPTIONAL = 'optional',\n}\n\n/**\n * Used to query fonts for unloading\n */\nexport type UnloadFontOptions = Pick<FontResource, 'display'>;\n","import { CodedError } from '@unimodules/core';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport FontObserver from 'fontfaceobserver';\n\nimport { UnloadFontOptions } from './Font';\nimport { FontDisplay, FontResource } from './Font.types';\n\nfunction getFontFaceStyleSheet(): CSSStyleSheet | null {\n if (!canUseDOM) {\n return null;\n }\n const styleSheet = getStyleElement();\n return styleSheet.sheet ? (styleSheet.sheet as CSSStyleSheet) : null;\n}\n\ntype RuleItem = { rule: CSSFontFaceRule; index: number };\n\nfunction getFontFaceRules(): RuleItem[] {\n const sheet = getFontFaceStyleSheet();\n if (sheet) {\n // @ts-ignore: rule iterator\n const rules = [...sheet.cssRules];\n\n const items: RuleItem[] = [];\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n if (rule instanceof CSSFontFaceRule) {\n items.push({ rule, index: i });\n }\n }\n return items;\n }\n return [];\n}\n\nfunction getFontFaceRulesMatchingResource(\n fontFamilyName: string,\n options?: UnloadFontOptions\n): RuleItem[] {\n const rules = getFontFaceRules();\n return rules.filter(({ rule }) => {\n return (\n rule.style.fontFamily === fontFamilyName &&\n (options && options.display ? options.display === (rule.style as any).fontDisplay : true)\n );\n });\n}\n\nexport default {\n get name(): string {\n return 'ExpoFontLoader';\n },\n\n async unloadAllAsync(): Promise<void> {\n if (!canUseDOM) return;\n\n const element = document.getElementById(ID);\n if (element && element instanceof HTMLStyleElement) {\n document.removeChild(element);\n }\n },\n\n async unloadAsync(fontFamilyName: string, options?: UnloadFontOptions): Promise<void> {\n const sheet = getFontFaceStyleSheet();\n if (!sheet) return;\n const items = getFontFaceRulesMatchingResource(fontFamilyName, options);\n for (const item of items) {\n sheet.deleteRule(item.index);\n }\n },\n\n async loadAsync(fontFamilyName: string, resource: FontResource): Promise<void> {\n if (!canUseDOM) {\n return;\n }\n\n const canInjectStyle = document.head && typeof document.head.appendChild === 'function';\n if (!canInjectStyle) {\n throw new CodedError(\n 'ERR_WEB_ENVIRONMENT',\n `The browser's \\`document.head\\` element doesn't support injecting fonts.`\n );\n }\n\n const style = _createWebStyle(fontFamilyName, resource);\n document.head!.appendChild(style);\n\n if (!isFontLoadingListenerSupported()) {\n return;\n }\n\n return new FontObserver(fontFamilyName, { display: resource.display }).load();\n },\n};\n\nconst ID = 'expo-generated-fonts';\n\nfunction getStyleElement(): HTMLStyleElement {\n const element = document.getElementById(ID);\n if (element && element instanceof HTMLStyleElement) {\n return element;\n }\n const styleElement = document.createElement('style');\n styleElement.id = ID;\n styleElement.type = 'text/css';\n return styleElement;\n}\n\nfunction _createWebStyle(fontFamily: string, resource: FontResource): HTMLStyleElement {\n const fontStyle = `@font-face {\n font-family: ${fontFamily};\n src: url(${resource.uri});\n font-display: ${resource.display || FontDisplay.AUTO};\n }`;\n\n const styleElement = getStyleElement();\n // @ts-ignore: TypeScript does not define HTMLStyleElement::styleSheet. This is just for IE and\n // possibly can be removed if it's unnecessary on IE 11.\n if (styleElement.styleSheet) {\n const styleElementIE = styleElement as any;\n styleElementIE.styleSheet.cssText = styleElementIE.styleSheet.cssText\n ? styleElementIE.styleSheet.cssText + fontStyle\n : fontStyle;\n } else {\n const textNode = document.createTextNode(fontStyle);\n styleElement.appendChild(textNode);\n }\n return styleElement;\n}\n\nfunction isFontLoadingListenerSupported(): boolean {\n const { userAgent } = window.navigator;\n // WebKit is broken https://github.com/bramstein/fontfaceobserver/issues/95\n const isIOS = !!userAgent.match(/iPad|iPhone/i);\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n // Edge is broken https://github.com/bramstein/fontfaceobserver/issues/109#issuecomment-333356795\n const isEdge = userAgent.includes('Edge');\n // Internet Explorer\n const isIE = userAgent.includes('Trident');\n // Firefox\n const isFirefox = userAgent.includes('Firefox');\n return !isSafari && !isIOS && !isEdge && !isIE && !isFirefox;\n}\n","import { CodedError } from '@unimodules/core';\nimport { Asset } from 'expo-asset';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontDisplay } from './Font';\nimport { FontResource, FontSource } from './Font.types';\n\nfunction uriFromFontSource(asset: any): string | null {\n if (typeof asset === 'string') {\n return asset || null;\n } else if (typeof asset === 'object') {\n return asset.uri || asset.localUri || null;\n }\n return null;\n}\n\nfunction displayFromFontSource(asset: any): FontDisplay | undefined {\n return asset.display || FontDisplay.AUTO;\n}\n\nexport function fontFamilyNeedsScoping(name: string): boolean {\n return false;\n}\n\nexport function getAssetForSource(source: FontSource): Asset | FontResource {\n const uri = uriFromFontSource(source);\n const display = displayFromFontSource(source);\n\n if (!uri || typeof uri !== 'string') {\n throwInvalidSourceError(uri);\n }\n\n return {\n uri: uri!,\n display,\n };\n}\n\nfunction throwInvalidSourceError(source: any): never {\n let type: string = typeof source;\n if (type === 'object') type = JSON.stringify(source, null, 2);\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n `Expected font asset of type \\`string | FontResource | Asset\\` (number is not supported on web) instead got: ${type}`\n );\n}\n\nexport async function loadSingleFontAsync(\n name: string,\n input: Asset | FontResource\n): Promise<void> {\n if (typeof input !== 'object' || typeof input.uri !== 'string' || (input as any).downloadAsync) {\n throwInvalidSourceError(input);\n }\n\n await ExpoFontLoader.loadAsync(name, input);\n}\n\nexport function getNativeFontName(name: string): string {\n return name;\n}\n","import { CodedError, UnavailabilityError } from '@unimodules/core';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontDisplay, FontSource, FontResource, UnloadFontOptions } from './Font.types';\nimport {\n getAssetForSource,\n loadSingleFontAsync,\n fontFamilyNeedsScoping,\n getNativeFontName,\n} from './FontLoader';\n\nconst loaded: { [name: string]: boolean } = {};\nconst loadPromises: { [name: string]: Promise<void> } = {};\n\n/**\n * Used to transform font family names to the scoped name. This does not need to\n * be called in standalone or bare apps but it will return unscoped font family\n * names if it is called in those contexts.\n * note(brentvatne): at some point we may want to warn if this is called\n * outside of a managed app.\n *\n * @param fontFamily name to process\n * @returns a name processed for use with the [current workflow](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/)\n */\nexport function processFontFamily(fontFamily: string | null): string | null {\n if (!fontFamily || !fontFamilyNeedsScoping(fontFamily)) {\n return fontFamily;\n }\n\n if (!isLoaded(fontFamily)) {\n if (__DEV__) {\n if (isLoading(fontFamily)) {\n console.error(\n `You started loading the font \"${fontFamily}\", but used it before it finished loading.\\n\n- You need to wait for Font.loadAsync to complete before using the font.\\n\n- We recommend loading all fonts before rendering the app, and rendering only Expo.AppLoading while waiting for loading to complete.`\n );\n } else {\n console.error(\n `fontFamily \"${fontFamily}\" is not a system font and has not been loaded through Font.loadAsync.\\n\n- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.\\n\n- If this is a custom font, be sure to load it with Font.loadAsync.`\n );\n }\n }\n\n return 'System';\n }\n\n return `ExpoFont-${getNativeFontName(fontFamily)}`;\n}\n\n/**\n * Synchronously detect if the font for `fontFamily` has finished loading\n *\n * @param fontFamily the name used to load the `FontResource`.\n * @returns `true` if the the font has fully loaded.\n */\nexport function isLoaded(fontFamily: string): boolean {\n return fontFamily in loaded;\n}\n\n/**\n * Synchronously detect if the font for `fontFamily` is still being loaded\n *\n * @param fontFamily the name used to load the `FontResource`.\n * @returns `true` if the the font is still loading.\n */\nexport function isLoading(fontFamily: string): boolean {\n return fontFamily in loadPromises;\n}\n\n/**\n * Natively load a font for use with Text elements.\n * @param fontFamilyOrFontMap string or map of values that can be used as the [`fontFamily`](https://reactnative.dev/docs/text#style) style prop with React Native Text elements.\n * @param source the font asset that should be loaded into the `fontFamily` namespace.\n */\nexport async function loadAsync(\n fontFamilyOrFontMap: string | { [fontFamily: string]: FontSource },\n source?: FontSource\n): Promise<void> {\n if (typeof fontFamilyOrFontMap === 'object') {\n if (source) {\n throw new CodedError(\n `ERR_FONT_API`,\n `No fontFamily can be used for the provided source: ${source}. The second argument of \\`loadAsync()\\` can only be used with a \\`string\\` value as the first argument.`\n );\n }\n const fontMap = fontFamilyOrFontMap;\n const names = Object.keys(fontMap);\n await Promise.all(names.map(name => loadFontInNamespaceAsync(name, fontMap[name])));\n return;\n }\n\n return await loadFontInNamespaceAsync(fontFamilyOrFontMap, source);\n}\n\nasync function loadFontInNamespaceAsync(\n fontFamily: string,\n source?: FontSource | null\n): Promise<void> {\n if (!source) {\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n `Cannot load null or undefined font source: { \"${fontFamily}\": ${source} }. Expected asset of type \\`FontSource\\` for fontFamily of name: \"${fontFamily}\"`\n );\n }\n\n if (loaded[fontFamily]) {\n return;\n }\n\n if (loadPromises[fontFamily]) {\n return loadPromises[fontFamily];\n }\n\n // Important: we want all callers that concurrently try to load the same font to await the same\n // promise. If we're here, we haven't created the promise yet. To ensure we create only one\n // promise in the program, we need to create the promise synchronously without yielding the event\n // loop from this point.\n\n const asset = getAssetForSource(source);\n loadPromises[fontFamily] = (async () => {\n try {\n await loadSingleFontAsync(fontFamily, asset);\n loaded[fontFamily] = true;\n } finally {\n delete loadPromises[fontFamily];\n }\n })();\n\n await loadPromises[fontFamily];\n}\n\n/**\n * Unloads all of the custom fonts. This is used for testing.\n */\nexport async function unloadAllAsync(): Promise<void> {\n if (!ExpoFontLoader.unloadAllAsync) {\n throw new UnavailabilityError('expo-font', 'unloadAllAsync');\n }\n\n if (Object.keys(loadPromises).length) {\n throw new CodedError(\n `ERR_UNLOAD`,\n `Cannot unload fonts while they're still loading: ${Object.keys(loadPromises).join(', ')}`\n );\n }\n\n for (const fontFamily of Object.keys(loaded)) {\n delete loaded[fontFamily];\n }\n\n await ExpoFontLoader.unloadAllAsync();\n}\n\n/**\n * Unload custom fonts matching the `fontFamily`s and display values provided.\n * Because fonts are automatically unloaded on every platform this is mostly used for testing.\n *\n * @param fontFamilyOrFontMap the names of the custom fonts that will be unloaded.\n * @param source when `fontFamilyOrFontMap` is a string, this should be the font source used to load the custom font originally.\n */\nexport async function unloadAsync(\n fontFamilyOrFontMap: string | { [fontFamily: string]: UnloadFontOptions },\n options?: UnloadFontOptions\n): Promise<void> {\n if (!ExpoFontLoader.unloadAsync) {\n throw new UnavailabilityError('expo-font', 'unloadAsync');\n }\n if (typeof fontFamilyOrFontMap === 'object') {\n if (options) {\n throw new CodedError(\n `ERR_FONT_API`,\n `No fontFamily can be used for the provided options: ${options}. The second argument of \\`unloadAsync()\\` can only be used with a \\`string\\` value as the first argument.`\n );\n }\n const fontMap = fontFamilyOrFontMap;\n const names = Object.keys(fontMap);\n await Promise.all(names.map(name => unloadFontInNamespaceAsync(name, fontMap[name])));\n return;\n }\n\n return await unloadFontInNamespaceAsync(fontFamilyOrFontMap, options);\n}\n\nasync function unloadFontInNamespaceAsync(\n fontFamily: string,\n options?: UnloadFontOptions | null\n): Promise<void> {\n if (!loaded[fontFamily]) {\n return;\n } else {\n delete loaded[fontFamily];\n }\n\n // Important: we want all callers that concurrently try to load the same font to await the same\n // promise. If we're here, we haven't created the promise yet. To ensure we create only one\n // promise in the program, we need to create the promise synchronously without yielding the event\n // loop from this point.\n\n const nativeFontName = getNativeFontName(fontFamily);\n\n if (!nativeFontName) {\n throw new CodedError(`ERR_FONT_FAMILY`, `Cannot unload an empty name`);\n }\n\n await ExpoFontLoader.unloadAsync(nativeFontName, options);\n}\n\nexport { FontDisplay, FontSource, FontResource, UnloadFontOptions };\n","import { Platform, NativeModules } from './react-native';\n\nconst NativeIconAPI =\n NativeModules.RNVectorIconsManager || NativeModules.RNVectorIconsModule;\n\nexport default function ensureNativeModuleAvailable() {\n if (!NativeIconAPI) {\n if (Platform.OS === 'android') {\n throw new Error(\n 'RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.'\n );\n }\n throw new Error(\n 'RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.'\n );\n }\n}\n","import isString from 'lodash.isstring';\nimport omit from 'lodash.omit';\nimport pick from 'lodash.pick';\nimport React, { PureComponent } from 'react';\nimport { StyleSheet, Text, TouchableHighlight, View } from './react-native';\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n padding: 8,\n },\n touchable: {\n overflow: 'hidden',\n },\n icon: {\n marginRight: 10,\n },\n text: {\n fontWeight: '600',\n backgroundColor: 'transparent',\n },\n});\n\nconst IOS7_BLUE = '#007AFF';\n\nconst TEXT_PROP_NAMES = [\n 'ellipsizeMode',\n 'numberOfLines',\n 'textBreakStrategy',\n 'selectable',\n 'suppressHighlighting',\n 'allowFontScaling',\n 'adjustsFontSizeToFit',\n 'minimumFontScale',\n];\n\nconst TOUCHABLE_PROP_NAMES = [\n 'accessible',\n 'accessibilityLabel',\n 'accessibilityHint',\n 'accessibilityComponentType',\n 'accessibilityRole',\n 'accessibilityStates',\n 'accessibilityTraits',\n 'onFocus',\n 'onBlur',\n 'disabled',\n 'onPress',\n 'onPressIn',\n 'onPressOut',\n 'onLayout',\n 'onLongPress',\n 'nativeID',\n 'testID',\n 'delayPressIn',\n 'delayPressOut',\n 'delayLongPress',\n 'activeOpacity',\n 'underlayColor',\n 'selectionColor',\n 'onShowUnderlay',\n 'onHideUnderlay',\n 'hasTVPreferredFocus',\n 'tvParallaxProperties',\n];\n\nexport default function createIconButtonComponent(Icon) {\n return class IconButton extends PureComponent {\n static defaultProps = {\n backgroundColor: IOS7_BLUE,\n borderRadius: 5,\n color: 'white',\n size: 20,\n };\n\n render() {\n const { style, iconStyle, children, ...restProps } = this.props;\n\n const iconProps = pick(\n restProps,\n TEXT_PROP_NAMES,\n 'style',\n 'name',\n 'size',\n 'color'\n );\n const touchableProps = pick(restProps, TOUCHABLE_PROP_NAMES);\n const props = omit(\n restProps,\n Object.keys(iconProps),\n Object.keys(touchableProps),\n 'iconStyle',\n 'borderRadius',\n 'backgroundColor'\n );\n iconProps.style = iconStyle ? [styles.icon, iconStyle] : styles.icon;\n\n const colorStyle = pick(this.props, 'color');\n const blockStyle = pick(this.props, 'backgroundColor', 'borderRadius');\n\n return (\n <TouchableHighlight\n style={[styles.touchable, blockStyle]}\n {...touchableProps}\n >\n <View style={[styles.container, blockStyle, style]} {...props}>\n <Icon {...iconProps} />\n {isString(children) ? (\n <Text style={[styles.text, colorStyle]}>{children}</Text>\n ) : (\n children\n )}\n </View>\n </TouchableHighlight>\n );\n }\n };\n}\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NativeModules,\n Platform,\n PixelRatio,\n processColor,\n Text,\n} from './react-native';\n\nimport ensureNativeModuleAvailable from './ensure-native-module-available';\nimport createIconSourceCache from './create-icon-source-cache';\nimport createIconButtonComponent from './icon-button';\nimport createTabBarItemIOSComponent from './tab-bar-item-ios';\n\nexport const NativeIconAPI =\n NativeModules.RNVectorIconsManager || NativeModules.RNVectorIconsModule;\n\nexport const DEFAULT_ICON_SIZE = 12;\nexport const DEFAULT_ICON_COLOR = 'black';\n\nexport default function createIconSet(\n glyphMap,\n fontFamily,\n fontFile,\n fontStyle\n) {\n // Android doesn't care about actual fontFamily name, it will only look in fonts folder.\n const fontBasename = fontFile\n ? fontFile.replace(/\\.(otf|ttf)$/, '')\n : fontFamily;\n\n const fontReference = Platform.select({\n windows: `/Assets/${fontFile}#${fontFamily}`,\n android: fontBasename,\n web: fontBasename,\n default: fontFamily,\n });\n\n class Icon extends PureComponent {\n root = null;\n\n static defaultProps = {\n size: DEFAULT_ICON_SIZE,\n allowFontScaling: false,\n };\n\n setNativeProps(nativeProps) {\n if (this.root) {\n this.root.setNativeProps(nativeProps);\n }\n }\n\n handleRef = ref => {\n this.root = ref;\n };\n\n render() {\n const { name, size, color, style, children, ...props } = this.props;\n\n let glyph = name ? glyphMap[name] || '?' : '';\n if (typeof glyph === 'number') {\n glyph = String.fromCodePoint(glyph);\n }\n\n const styleDefaults = {\n fontSize: size,\n color,\n };\n\n const styleOverrides = {\n fontFamily: fontReference,\n fontWeight: 'normal',\n fontStyle: 'normal',\n };\n\n props.style = [styleDefaults, style, styleOverrides, fontStyle || {}];\n props.ref = this.handleRef;\n\n return (\n <Text {...props}>\n {glyph}\n {children}\n </Text>\n );\n }\n }\n\n const imageSourceCache = createIconSourceCache();\n\n function resolveGlyph(name) {\n const glyph = glyphMap[name] || '?';\n if (typeof glyph === 'number') {\n return String.fromCodePoint(glyph);\n }\n return glyph;\n }\n\n function getImageSourceSync(\n name,\n size = DEFAULT_ICON_SIZE,\n color = DEFAULT_ICON_COLOR\n ) {\n ensureNativeModuleAvailable();\n\n const glyph = resolveGlyph(name);\n const processedColor = processColor(color);\n const cacheKey = `${glyph}:${size}:${processedColor}`;\n\n if (imageSourceCache.has(cacheKey)) {\n return imageSourceCache.get(cacheKey);\n }\n try {\n const imagePath = NativeIconAPI.getImageForFontSync(\n fontReference,\n glyph,\n size,\n processedColor\n );\n const value = { uri: imagePath, scale: PixelRatio.get() };\n imageSourceCache.setValue(cacheKey, value);\n return value;\n } catch (error) {\n imageSourceCache.setError(cacheKey, error);\n throw error;\n }\n }\n\n async function getImageSource(\n name,\n size = DEFAULT_ICON_SIZE,\n color = DEFAULT_ICON_COLOR\n ) {\n ensureNativeModuleAvailable();\n\n const glyph = resolveGlyph(name);\n const processedColor = processColor(color);\n const cacheKey = `${glyph}:${size}:${processedColor}`;\n\n if (imageSourceCache.has(cacheKey)) {\n return imageSourceCache.get(cacheKey);\n }\n try {\n const imagePath = await NativeIconAPI.getImageForFont(\n fontReference,\n glyph,\n size,\n processedColor\n );\n const value = { uri: imagePath, scale: PixelRatio.get() };\n imageSourceCache.setValue(cacheKey, value);\n return value;\n } catch (error) {\n imageSourceCache.setError(cacheKey, error);\n throw error;\n }\n }\n\n async function loadFont(file = fontFile) {\n if (Platform.OS === 'ios') {\n ensureNativeModuleAvailable();\n if (!file) {\n throw new Error('Unable to load font, because no file was specified. ');\n }\n await NativeIconAPI.loadFontWithFileName(...file.split('.'));\n }\n }\n\n function hasIcon(name) {\n return Object.prototype.hasOwnProperty.call(glyphMap, name);\n }\n\n function getRawGlyphMap() {\n return glyphMap;\n }\n\n function getFontFamily() {\n return fontReference;\n }\n\n Icon.Button = createIconButtonComponent(Icon);\n Icon.TabBarItemIOS = Icon.TabBarItem;\n Icon.getImageSource = getImageSource;\n Icon.getImageSourceSync = getImageSourceSync;\n Icon.loadFont = loadFont;\n Icon.hasIcon = hasIcon;\n Icon.getRawGlyphMap = getRawGlyphMap;\n Icon.getFontFamily = getFontFamily;\n\n return Icon;\n}\n","const TYPE_VALUE = 'value';\nconst TYPE_ERROR = 'error';\n\nexport default function createIconSourceCache() {\n const cache = new Map();\n\n const setValue = (key, value) =>\n cache.set(key, { type: TYPE_VALUE, data: value });\n\n const setError = (key, error) =>\n cache.set(key, { type: TYPE_ERROR, data: error });\n\n const has = key => cache.has(key);\n\n const get = key => {\n if (!cache.has(key)) {\n return undefined;\n }\n const { type, data } = cache.get(key);\n if (type === TYPE_ERROR) {\n throw data;\n }\n return data;\n };\n\n return { setValue, setError, has, get };\n}\n","import * as Font from \"expo-font\";\nimport React, { ComponentClass } from \"react\";\nimport {\n Text,\n TextProps,\n TouchableHighlightProps,\n ViewProps,\n OpaqueColorValue,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\n\nimport createIconSet from \"./vendor/react-native-vector-icons/lib/create-icon-set\";\nimport createIconButtonComponent from \"./vendor/react-native-vector-icons/lib/icon-button\";\n\nexport {\n DEFAULT_ICON_COLOR,\n DEFAULT_ICON_SIZE,\n} from \"./vendor/react-native-vector-icons/lib/create-icon-set\";\n\nexport interface IconProps<GLYPHS extends string> extends TextProps {\n /**\n * Size of the icon, can also be passed as fontSize in the style object.\n *\n * @default 12\n */\n size?: number;\n\n /**\n * Name of the icon to show\n *\n * See Icon Explorer app\n * {@link https://expo.github.io/vector-icons/}\n */\n name: GLYPHS;\n\n /**\n * Color of the icon. Can be a string or OpaqueColorValue (returned from\n * PlatformColor(..))\n *\n */\n color?: string | OpaqueColorValue;\n}\n\nexport interface IconButtonProps<GLYPHS extends string>\n extends IconProps<GLYPHS>,\n ViewProps,\n TouchableHighlightProps {\n /**\n * Text and icon color\n * Use iconStyle or nest a Text component if you need different colors.\n * Can be a string or OpaqueColorValue (returned from PlatformColor(..))\n *\n * @default 'white'\n */\n color?: string | OpaqueColorValue;\n\n /**\n * Border radius of the button\n * Set to 0 to disable.\n *\n * @default 5\n */\n borderRadius?: number;\n\n /**\n * Styles applied to the icon only\n * Good for setting margins or a different color.\n *\n * @default {marginRight: 10}\n */\n iconStyle?: TextStyle;\n\n /**\n * Style prop inherited from TextProps and TouchableWithoutFeedbackProperties\n * Only exist here so we can have ViewStyle or TextStyle\n *\n */\n style?: ViewStyle | TextStyle;\n\n /**\n * Background color of the button. Can be a string or OpaqueColorValue (returned from\n * PlatformColor(..))\n *\n * @default '#007AFF'\n */\n backgroundColor?: string | OpaqueColorValue;\n}\n\nexport type GlyphMap<G extends string> = { [K in G]: number | string };\n\nexport interface Icon<G extends string, FN extends string> {\n defaultProps: any;\n Button: ComponentClass<IconButtonProps<G>>;\n glyphMap: GlyphMap<G>;\n getRawGlyphMap: () => GlyphMap<G>;\n getFontFamily: () => FN;\n loadFont: () => Promise<void>;\n font: { [x: string]: any };\n new (props: IconProps<G>): React.Component<IconProps<G>>;\n}\n\nexport default function <G extends string, FN extends string>(\n glyphMap: GlyphMap<G>,\n fontName: FN,\n expoAssetId,\n fontStyle?: any\n): Icon<G, FN> {\n const font = { [fontName]: expoAssetId };\n const RNVIconComponent = createIconSet(glyphMap, fontName, null, fontStyle);\n\n return class Icon extends React.Component<IconProps<G>> {\n static defaultProps = RNVIconComponent.defaultProps;\n static Button = createIconButtonComponent(Icon);\n static glyphMap = glyphMap;\n static getRawGlyphMap = () => glyphMap;\n static getFontFamily = () => fontName;\n static loadFont = () => Font.loadAsync(font);\n static font = font;\n\n _mounted = false;\n _icon?: any;\n\n state = {\n fontIsLoaded: Font.isLoaded(fontName),\n };\n\n async componentDidMount() {\n this._mounted = true;\n if (!this.state.fontIsLoaded) {\n await Font.loadAsync(font);\n this._mounted && this.setState({ fontIsLoaded: true });\n }\n }\n\n componentWillUnmount() {\n this._mounted = false;\n }\n\n setNativeProps(props) {\n if (this._icon) {\n this._icon.setNativeProps(props);\n }\n }\n\n render() {\n if (__DEV__ && this.props.name && !(this.props.name in glyphMap)) {\n console.warn(\n `\"${this.props.name}\" is not a valid icon name for family \"${fontName}\"`\n );\n }\n\n if (!this.state.fontIsLoaded) {\n return <Text />;\n }\n\n return (\n <RNVIconComponent\n ref={(view) => {\n this._icon = view;\n }}\n {...this.props}\n />\n );\n }\n };\n}\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json';\n\nexport default createIconSet(glyphMap, 'material-community', font);\n","import MaterialCommunityIcons from './build/MaterialCommunityIcons';\nexport default MaterialCommunityIcons;\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) 2016-present, Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar LogBox = {\n ignoreLogs: function ignoreLogs() {},\n ignoreAllLogs: function ignoreAllLogs() {},\n uninstall: function uninstall() {},\n install: function install() {}\n};\nexport default LogBox;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = capitalizeString;\nfunction capitalizeString(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}","/* global AFRAME */\n\nif (typeof AFRAME === 'undefined') {\n throw new Error('Component attempted to register before AFRAME was available.');\n}\n\nlet accessorFn = require('accessor-fn');\nif ('default' in accessorFn) {\n // unwrap default export\n accessorFn = accessorFn.default;\n}\n\nlet ThreeForceGraph = require('three-forcegraph');\nif ('default' in ThreeForceGraph) {\n // unwrap default export\n ThreeForceGraph = ThreeForceGraph.default;\n}\n\nconst parseJson = function (prop) {\n return (typeof prop === 'string')\n ? JSON.parse(prop)\n : prop; // already parsed\n};\n\nconst parseFn = function (prop) {\n if (typeof prop === 'function') return prop; // already a function\n const geval = eval; // Avoid using eval directly https://github.com/rollup/rollup/wiki/Troubleshooting#avoiding-eval\n try {\n const evalled = geval('(' + prop + ')');\n return evalled;\n } catch (e) {} // Can't eval, not a function\n return null;\n};\n\nconst parseAccessor = function (prop) {\n if (!isNaN(parseFloat(prop))) { return parseFloat(prop); } // parse numbers\n if (parseFn(prop)) { return parseFn(prop); } // parse functions\n return prop; // strings\n};\n\n/**\n * 3D Force-Directed Graph component for A-Frame.\n */\nAFRAME.registerComponent('forcegraph', {\n schema: {\n jsonUrl: { type: 'string', default: '' },\n nodes: { parse: parseJson, default: [] },\n links: { parse: parseJson, default: [] },\n numDimensions: { type: 'number', default: 3 },\n dagMode: { type: 'string', default: '' },\n dagLevelDistance: { type: 'number', default: 0 },\n dagNodeFilter: { parse: parseFn, function() { return true; }},\n onDagError: { parse: parseFn, default: undefined },\n nodeRelSize: { type: 'number', default: 4 }, // volume per val unit\n nodeId: { type: 'string', default: 'id' },\n nodeVal: { parse: parseAccessor, default: 'val' },\n nodeResolution: { type: 'number', default: 8 }, // how many slice segments in the sphere's circumference\n nodeVisibility: { parse: parseAccessor, default: true },\n nodeColor: { parse: parseAccessor, default: 'color' },\n nodeAutoColorBy: { parse: parseAccessor, default: '' }, // color nodes with the same field equally\n nodeOpacity: { type: 'number', default: 0.75 },\n nodeThreeObject: { parse: parseAccessor, default: null },\n nodeThreeObjectExtend: { parse: parseAccessor, default: false },\n linkSource: { type: 'string', default: 'source' },\n linkTarget: { type: 'string', default: 'target' },\n linkVisibility: { parse: parseAccessor, default: true },\n linkColor: { parse: parseAccessor, default: 'color' },\n linkAutoColorBy: { parse: parseAccessor, default: '' }, // color links with the same field equally\n linkOpacity: { type: 'number', default: 0.2 },\n linkWidth: { parse: parseAccessor, default: 0 },\n linkResolution: { type: 'number', default: 6 }, // how many radial segments in each line cylinder's geometry\n linkCurvature: { parse: parseAccessor, default: 0 },\n linkCurveRotation: { parse: parseAccessor, default: 0 },\n linkMaterial: { parse: parseAccessor, default: null },\n linkThreeObject: { parse: parseAccessor, default: null },\n linkThreeObjectExtend: { parse: parseAccessor, default: false },\n linkPositionUpdate: { parse: parseFn, default: null },\n linkDirectionalArrowLength: { parse: parseAccessor, default: 0 },\n linkDirectionalArrowColor: { parse: parseAccessor, default: null },\n linkDirectionalArrowRelPos: { parse: parseAccessor, default: 0.5 }, // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalArrowResolution: { type: 'number', default: 8 }, // how many slice segments in the arrow's conic circumference\n linkDirectionalParticles: { parse: parseAccessor, default: 0 }, // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: { parse: parseAccessor, default: 0.01 }, // in link length ratio per frame\n linkDirectionalParticleWidth: { parse: parseAccessor, default: 0.5 },\n linkDirectionalParticleColor: { parse: parseAccessor, default: null },\n linkDirectionalParticleResolution: { type: 'number', default: 4 }, // how many slice segments in the particle sphere's circumference\n onNodeHover: { parse: parseFn, default: () => {} },\n onLinkHover: { parse: parseFn, default: () => {} },\n onNodeClick: { parse: parseFn, default: () => {} },\n onLinkClick: { parse: parseFn, default: () => {} },\n forceEngine: { type: 'string', default: 'd3' }, // 'd3' or 'ngraph'\n d3AlphaMin: { type: 'number', default: 0 },\n d3AlphaDecay: { type: 'number', default: 0.0228 },\n d3VelocityDecay: { type: 'number', default: 0.4 },\n ngraphPhysics: { parse: parseJson, default: null },\n warmupTicks: { type: 'int', default: 0 }, // how many times to tick the force engine at init before starting to render\n cooldownTicks: { type: 'int', default: 1e18 }, // Simulate infinity (int parser doesn't accept Infinity object)\n cooldownTime: { type: 'int', default: 15000 }, // ms\n onEngineTick: { parse: parseFn, default: function () {} },\n onEngineStop: { parse: parseFn, default: function () {} }\n },\n\n // Bind component methods\n getGraphBbox: function() {\n if (!this.forceGraph) {\n // Got here before component init -> initialize forceGraph\n this.forceGraph = new ThreeForceGraph();\n }\n\n return this.forceGraph.getGraphBbox();\n },\n emitParticle: function () {\n if (!this.forceGraph) {\n // Got here before component init -> initialize forceGraph\n this.forceGraph = new ThreeForceGraph();\n }\n\n const forceGraph = this.forceGraph;\n const returnVal = forceGraph.emitParticle.apply(forceGraph, arguments);\n\n return returnVal === forceGraph\n ? this // return self, not the inner forcegraph component\n : returnVal;\n },\n\n d3Force: function () {\n if (!this.forceGraph) {\n // Got here before component init -> initialize forceGraph\n this.forceGraph = new ThreeForceGraph();\n }\n\n const forceGraph = this.forceGraph;\n const returnVal = forceGraph.d3Force.apply(forceGraph, arguments);\n\n return returnVal === forceGraph\n ? this // return self, not the inner forcegraph component\n : returnVal;\n },\n\n d3ReheatSimulation: function () {\n this.forceGraph && this.forceGraph.d3ReheatSimulation();\n return this;\n },\n\n refresh: function () {\n this.forceGraph && this.forceGraph.refresh();\n return this;\n },\n\n init: function () {\n const state = this.state = {}; // Internal state\n\n // Add info msg\n state.infoEl = document.createElement('a-text');\n state.infoEl.setAttribute('position', '0 -0.1 -1'); // Canvas center\n state.infoEl.setAttribute('width', 1);\n state.infoEl.setAttribute('align', 'center');\n state.infoEl.setAttribute('color', 'lavender');\n\n // Get camera dom element and attach fixed view elements to camera\n const cameraEl = document.querySelector('a-entity[camera], a-camera');\n cameraEl.appendChild(state.infoEl);\n\n // Keep reference to Three camera object\n state.cameraObj = cameraEl.object3D.children\n .filter(function (child) { return child.type === 'PerspectiveCamera'; })[0];\n\n // On camera switch\n this.el.sceneEl.addEventListener('camera-set-active', function (evt) {\n // Switch camera reference\n state.cameraObj = evt.detail.cameraEl.components.camera.camera;\n });\n\n // setup FG object\n if (!this.forceGraph) this.forceGraph = new ThreeForceGraph(); // initialize forceGraph if it doesn't exist yet\n this.forceGraph\n .onFinishUpdate(() => this.el.setObject3D('forcegraphGroup', this.forceGraph)) // Bind forcegraph to elem\n .onLoading(() => state.infoEl.setAttribute('value', 'Loading...')) // Add loading msg\n .onFinishLoading(() => state.infoEl.setAttribute('value', ''));\n\n // prefer raycaster events over mouseenter/mouseleave because they expose immediately available intersection data via detail.getIntersection()\n this.el.addEventListener('raycaster-intersected', ev => state.hoverDetail = ev.detail);\n this.el.addEventListener('raycaster-intersected-cleared', ev => state.hoverDetail = ev.detail);\n\n this.el.addEventListener('click', () =>\n state.hoverObj && this.data['on' + (state.hoverObj.__graphObjType === 'node' ? 'Node' : 'Link') + 'Click'](state.hoverObj.__data)\n );\n },\n\n remove: function () {\n // Clean-up elems\n this.state.infoEl.remove();\n this.el.removeObject3D('forcegraphGroup');\n },\n\n update: function (oldData) {\n const comp = this;\n const elData = this.data;\n const diff = AFRAME.utils.diff(elData, oldData);\n\n const fgProps = [\n 'jsonUrl',\n 'numDimensions',\n 'dagMode',\n 'dagLevelDistance',\n 'dagNodeFilter',\n 'onDagError',\n 'nodeRelSize',\n 'nodeId',\n 'nodeVal',\n 'nodeResolution',\n 'nodeVisibility',\n 'nodeColor',\n 'nodeAutoColorBy',\n 'nodeOpacity',\n 'nodeThreeObject',\n 'nodeThreeObjectExtend',\n 'linkSource',\n 'linkTarget',\n 'linkVisibility',\n 'linkColor',\n 'linkAutoColorBy',\n 'linkOpacity',\n 'linkWidth',\n 'linkResolution',\n 'linkCurvature',\n 'linkCurveRotation',\n 'linkMaterial',\n 'linkThreeObject',\n 'linkThreeObjectExtend',\n 'linkPositionUpdate',\n 'linkDirectionalArrowLength',\n 'linkDirectionalArrowColor',\n 'linkDirectionalArrowRelPos',\n 'linkDirectionalArrowResolution',\n 'linkDirectionalParticles',\n 'linkDirectionalParticleSpeed',\n 'linkDirectionalParticleWidth',\n 'linkDirectionalParticleColor',\n 'linkDirectionalParticleResolution',\n 'forceEngine',\n 'd3AlphaMin',\n 'd3AphaDecay',\n 'd3VelocityDecay',\n 'ngraphPhysics',\n 'warmupTicks',\n 'cooldownTicks',\n 'cooldownTime',\n 'onEngineTick',\n 'onEngineStop'\n ];\n\n fgProps\n .filter(function (p) { return p in diff; })\n .forEach(function (p) { comp.forceGraph[p](elData[p] !== '' ? elData[p] : null); }); // Convert blank values into nulls\n\n if ('nodes' in diff || 'links' in diff) {\n comp.forceGraph.graphData({\n nodes: elData.nodes,\n links: elData.links\n });\n }\n },\n\n tick: function (t, td) {\n const state = this.state;\n const props = this.data;\n\n // Update hover (intersected) object\n const intersection = state.hoverDetail\n ? state.hoverDetail.getIntersection\n ? state.hoverDetail.getIntersection(this.el) // available in raycaster-intersected events\n : state.hoverDetail.intersection || undefined // available in mouseenter/mouseleave events (with delayed update)\n : undefined;\n\n // Note:\n // Unfortunately we only have access to the intersected object closer to the camera (1st element in the raycaster intersectObjects result),\n // there is no \".getIntersections()\" method available in the event details. Therefore, we can't prioritize hover on nodes over links, or even exclude\n // objects that are neither nodes or links. This makes the interaction a bit erratic if nodes have a lot of links in front.\n // Configuring the raycaster.params.Line.threshold might help with this somewhat, but that config is also not available via the a-frame raycaster component.\n\n // recurse up until forcegraph obj is found\n let topObject = intersection ? intersection.object : undefined;\n while (topObject && !topObject.hasOwnProperty('__graphObjType'))\n topObject = topObject.parent;\n\n if (topObject !== state.hoverObj) {\n const prevObjType = state.hoverObj ? state.hoverObj.__graphObjType : null;\n const prevObjData = state.hoverObj ? state.hoverObj.__data : null;\n const objType = topObject ? topObject.__graphObjType : null;\n const objData = topObject ? topObject.__data : null;\n\n if (prevObjType && prevObjType !== objType) {\n // Hover out\n props['on' + (prevObjType === 'node' ? 'Node' : 'Link') + 'Hover'](null, prevObjData);\n }\n if (objType) {\n // Hover in\n props['on' + (objType === 'node' ? 'Node' : 'Link') + 'Hover'](objData, prevObjType === objType ? prevObjData : null);\n }\n\n state.hoverObj = topObject;\n }\n\n // Run force-graph ticker\n this.forceGraph.tickFrame();\n }\n});\n","/**\n * Manages a simulation of physical forces acting on bodies and springs.\n */\nmodule.exports = createPhysicsSimulator;\n\nvar generateCreateBodyFunction = require('./codeGenerators/generateCreateBody');\nvar generateQuadTreeFunction = require('./codeGenerators/generateQuadTree');\nvar generateBoundsFunction = require('./codeGenerators/generateBounds');\nvar generateCreateDragForceFunction = require('./codeGenerators/generateCreateDragForce');\nvar generateCreateSpringForceFunction = require('./codeGenerators/generateCreateSpringForce');\nvar generateIntegratorFunction = require('./codeGenerators/generateIntegrator');\n\nvar dimensionalCache = {};\n\nfunction createPhysicsSimulator(settings) {\n var Spring = require('./spring');\n var merge = require('ngraph.merge');\n var eventify = require('ngraph.events');\n if (settings) {\n // Check for names from older versions of the layout\n if (settings.springCoeff !== undefined) throw new Error('springCoeff was renamed to springCoefficient');\n if (settings.dragCoeff !== undefined) throw new Error('dragCoeff was renamed to dragCoefficient');\n }\n\n settings = merge(settings, {\n /**\n * Ideal length for links (springs in physical model).\n */\n springLength: 10,\n\n /**\n * Hook's law coefficient. 1 - solid spring.\n */\n springCoefficient: 0.8, \n\n /**\n * Coulomb's law coefficient. It's used to repel nodes thus should be negative\n * if you make it positive nodes start attract each other :).\n */\n gravity: -12,\n\n /**\n * Theta coefficient from Barnes Hut simulation. Ranged between (0, 1).\n * The closer it's to 1 the more nodes algorithm will have to go through.\n * Setting it to one makes Barnes Hut simulation no different from\n * brute-force forces calculation (each node is considered).\n */\n theta: 0.8,\n\n /**\n * Drag force coefficient. Used to slow down system, thus should be less than 1.\n * The closer it is to 0 the less tight system will be.\n */\n dragCoefficient: 0.9, // TODO: Need to rename this to something better. E.g. `dragCoefficient`\n\n /**\n * Default time step (dt) for forces integration\n */\n timeStep : 0.5,\n\n /**\n * Adaptive time step uses average spring length to compute actual time step:\n * See: https://twitter.com/anvaka/status/1293067160755957760\n */\n adaptiveTimeStepWeight: 0,\n\n /**\n * This parameter defines number of dimensions of the space where simulation\n * is performed. \n */\n dimensions: 2,\n\n /**\n * In debug mode more checks are performed, this will help you catch errors\n * quickly, however for production build it is recommended to turn off this flag\n * to speed up computation.\n */\n debug: false\n });\n\n var factory = dimensionalCache[settings.dimensions];\n if (!factory) {\n var dimensions = settings.dimensions;\n factory = {\n Body: generateCreateBodyFunction(dimensions, settings.debug),\n createQuadTree: generateQuadTreeFunction(dimensions),\n createBounds: generateBoundsFunction(dimensions),\n createDragForce: generateCreateDragForceFunction(dimensions),\n createSpringForce: generateCreateSpringForceFunction(dimensions),\n integrate: generateIntegratorFunction(dimensions),\n };\n dimensionalCache[dimensions] = factory;\n }\n\n var Body = factory.Body;\n var createQuadTree = factory.createQuadTree;\n var createBounds = factory.createBounds;\n var createDragForce = factory.createDragForce;\n var createSpringForce = factory.createSpringForce;\n var integrate = factory.integrate;\n var createBody = pos => new Body(pos);\n\n var random = require('ngraph.random').random(42);\n var bodies = []; // Bodies in this simulation.\n var springs = []; // Springs in this simulation.\n\n var quadTree = createQuadTree(settings, random);\n var bounds = createBounds(bodies, settings, random);\n var springForce = createSpringForce(settings, random);\n var dragForce = createDragForce(settings);\n\n var totalMovement = 0; // how much movement we made on last step\n var forces = [];\n var forceMap = new Map();\n var iterationNumber = 0;\n \n addForce('nbody', nbodyForce);\n addForce('spring', updateSpringForce);\n\n var publicApi = {\n /**\n * Array of bodies, registered with current simulator\n *\n * Note: To add new body, use addBody() method. This property is only\n * exposed for testing/performance purposes.\n */\n bodies: bodies,\n \n quadTree: quadTree,\n\n /**\n * Array of springs, registered with current simulator\n *\n * Note: To add new spring, use addSpring() method. This property is only\n * exposed for testing/performance purposes.\n */\n springs: springs,\n\n /**\n * Returns settings with which current simulator was initialized\n */\n settings: settings,\n\n /**\n * Adds a new force to simulation\n */\n addForce: addForce,\n \n /**\n * Removes a force from the simulation.\n */\n removeForce: removeForce,\n\n /**\n * Returns a map of all registered forces.\n */\n getForces: getForces,\n\n /**\n * Performs one step of force simulation.\n *\n * @returns {boolean} true if system is considered stable; False otherwise.\n */\n step: function () {\n for (var i = 0; i < forces.length; ++i) {\n forces[i](iterationNumber);\n }\n var movement = integrate(bodies, settings.timeStep, settings.adaptiveTimeStepWeight);\n iterationNumber += 1;\n return movement;\n },\n\n /**\n * Adds body to the system\n *\n * @param {ngraph.physics.primitives.Body} body physical body\n *\n * @returns {ngraph.physics.primitives.Body} added body\n */\n addBody: function (body) {\n if (!body) {\n throw new Error('Body is required');\n }\n bodies.push(body);\n\n return body;\n },\n\n /**\n * Adds body to the system at given position\n *\n * @param {Object} pos position of a body\n *\n * @returns {ngraph.physics.primitives.Body} added body\n */\n addBodyAt: function (pos) {\n if (!pos) {\n throw new Error('Body position is required');\n }\n var body = createBody(pos);\n bodies.push(body);\n\n return body;\n },\n\n /**\n * Removes body from the system\n *\n * @param {ngraph.physics.primitives.Body} body to remove\n *\n * @returns {Boolean} true if body found and removed. falsy otherwise;\n */\n removeBody: function (body) {\n if (!body) { return; }\n\n var idx = bodies.indexOf(body);\n if (idx < 0) { return; }\n\n bodies.splice(idx, 1);\n if (bodies.length === 0) {\n bounds.reset();\n }\n return true;\n },\n\n /**\n * Adds a spring to this simulation.\n *\n * @returns {Object} - a handle for a spring. If you want to later remove\n * spring pass it to removeSpring() method.\n */\n addSpring: function (body1, body2, springLength, springCoefficient) {\n if (!body1 || !body2) {\n throw new Error('Cannot add null spring to force simulator');\n }\n\n if (typeof springLength !== 'number') {\n springLength = -1; // assume global configuration\n }\n\n var spring = new Spring(body1, body2, springLength, springCoefficient >= 0 ? springCoefficient : -1);\n springs.push(spring);\n\n // TODO: could mark simulator as dirty.\n return spring;\n },\n\n /**\n * Returns amount of movement performed on last step() call\n */\n getTotalMovement: function () {\n return totalMovement;\n },\n\n /**\n * Removes spring from the system\n *\n * @param {Object} spring to remove. Spring is an object returned by addSpring\n *\n * @returns {Boolean} true if spring found and removed. falsy otherwise;\n */\n removeSpring: function (spring) {\n if (!spring) { return; }\n var idx = springs.indexOf(spring);\n if (idx > -1) {\n springs.splice(idx, 1);\n return true;\n }\n },\n\n getBestNewBodyPosition: function (neighbors) {\n return bounds.getBestNewPosition(neighbors);\n },\n\n /**\n * Returns bounding box which covers all bodies\n */\n getBBox: getBoundingBox, \n getBoundingBox: getBoundingBox, \n\n invalidateBBox: function () {\n console.warn('invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call');\n },\n\n // TODO: Move the force specific stuff to force\n gravity: function (value) {\n if (value !== undefined) {\n settings.gravity = value;\n quadTree.options({gravity: value});\n return this;\n } else {\n return settings.gravity;\n }\n },\n\n theta: function (value) {\n if (value !== undefined) {\n settings.theta = value;\n quadTree.options({theta: value});\n return this;\n } else {\n return settings.theta;\n }\n },\n\n /**\n * Returns pseudo-random number generator instance.\n */\n random: random\n };\n\n // allow settings modification via public API:\n expose(settings, publicApi);\n\n eventify(publicApi);\n\n return publicApi;\n\n function getBoundingBox() {\n bounds.update();\n return bounds.box;\n }\n\n function addForce(forceName, forceFunction) {\n if (forceMap.has(forceName)) throw new Error('Force ' + forceName + ' is already added');\n\n forceMap.set(forceName, forceFunction);\n forces.push(forceFunction);\n }\n\n function removeForce(forceName) {\n var forceIndex = forces.indexOf(forceMap.get(forceName));\n if (forceIndex < 0) return;\n forces.splice(forceIndex, 1);\n forceMap.delete(forceName);\n }\n\n function getForces() {\n // TODO: Should I trust them or clone the forces?\n return forceMap;\n }\n\n function nbodyForce(/* iterationUmber */) {\n if (bodies.length === 0) return;\n\n quadTree.insertBodies(bodies);\n var i = bodies.length;\n while (i--) {\n var body = bodies[i];\n if (!body.isPinned) {\n body.reset();\n quadTree.updateBodyForce(body);\n dragForce.update(body);\n }\n }\n }\n\n function updateSpringForce() {\n var i = springs.length;\n while (i--) {\n springForce.update(springs[i]);\n }\n }\n\n}\n\nfunction expose(settings, target) {\n for (var key in settings) {\n augment(settings, target, key);\n }\n}\n\nfunction augment(source, target, key) {\n if (!source.hasOwnProperty(key)) return;\n if (typeof target[key] === 'function') {\n // this accessor is already defined. Ignore it\n return;\n }\n var sourceIsNumber = Number.isFinite(source[key]);\n\n if (sourceIsNumber) {\n target[key] = function (value) {\n if (value !== undefined) {\n if (!Number.isFinite(value)) throw new Error('Value of ' + key + ' should be a valid number.');\n source[key] = value;\n return target;\n }\n return source[key];\n };\n } else {\n target[key] = function (value) {\n if (value !== undefined) {\n source[key] = value;\n return target;\n }\n return source[key];\n };\n }\n}\n","module.exports = function getVariableName(index) {\n if (index === 0) return 'x';\n if (index === 1) return 'y';\n if (index === 2) return 'z';\n return 'c' + (index + 1);\n};","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UIManager from '../UIManager'; // NativeModules shim\n\nvar NativeModules = {\n UIManager: UIManager\n};\nexport default NativeModules;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import type { NavigationState, PartialState, Route } from './types';\n\ntype ResetState =\n | PartialState<NavigationState>\n | NavigationState\n | (Omit<NavigationState, 'routes'> & {\n routes: Omit<Route<string>, 'key'>[];\n });\n\nexport type Action =\n | {\n type: 'GO_BACK';\n source?: string;\n target?: string;\n }\n | {\n type: 'NAVIGATE';\n payload:\n | { key: string; name?: undefined; params?: object; merge?: boolean }\n | { name: string; key?: string; params?: object; merge?: boolean };\n source?: string;\n target?: string;\n }\n | {\n type: 'RESET';\n payload: ResetState | undefined;\n source?: string;\n target?: string;\n }\n | {\n type: 'SET_PARAMS';\n payload: { params?: object };\n source?: string;\n target?: string;\n };\n\nexport function goBack(): Action {\n return { type: 'GO_BACK' };\n}\n\nexport function navigate(\n route:\n | { key: string; params?: object }\n | { name: string; key?: string; params?: object }\n): Action;\n// eslint-disable-next-line no-redeclare\nexport function navigate(name: string, params?: object): Action;\n// eslint-disable-next-line no-redeclare\nexport function navigate(...args: any): Action {\n if (typeof args[0] === 'string') {\n return { type: 'NAVIGATE', payload: { name: args[0], params: args[1] } };\n } else {\n const payload = args[0] || {};\n\n if (!payload.hasOwnProperty('key') && !payload.hasOwnProperty('name')) {\n throw new Error(\n 'You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.'\n );\n }\n\n return { type: 'NAVIGATE', payload };\n }\n}\n\nexport function reset(state: ResetState | undefined): Action {\n return { type: 'RESET', payload: state };\n}\n\nexport function setParams(params: object): Action {\n return { type: 'SET_PARAMS', payload: { params } };\n}\n","import * as React from 'react';\nimport {\n CommonActions,\n Route,\n NavigationState,\n InitialState,\n PartialState,\n NavigationAction,\n} from '@react-navigation/routers';\nimport EnsureSingleNavigator from './EnsureSingleNavigator';\nimport UnhandledActionContext from './UnhandledActionContext';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport NavigationStateContext from './NavigationStateContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport NavigationContext from './NavigationContext';\nimport { ScheduleUpdateContext } from './useScheduleUpdate';\nimport useChildListeners from './useChildListeners';\nimport useKeyedChildListeners from './useKeyedChildListeners';\nimport useOptionsGetters from './useOptionsGetters';\nimport useEventEmitter from './useEventEmitter';\nimport useSyncState from './useSyncState';\nimport checkSerializable from './checkSerializable';\nimport type {\n NavigationContainerEventMap,\n NavigationContainerRef,\n NavigationContainerProps,\n} from './types';\n\ntype State = NavigationState | PartialState<NavigationState> | undefined;\n\nconst NOT_INITIALIZED_ERROR =\n \"The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.\";\n\nconst serializableWarnings: string[] = [];\n\ntry {\n /**\n * Migration instructions for removal of devtools from core\n */\n Object.defineProperty(\n global,\n 'REACT_NAVIGATION_REDUX_DEVTOOLS_EXTENSION_INTEGRATION_ENABLED',\n {\n set(_) {\n console.warn(\n \"Redux devtools extension integration can be enabled with the '@react-navigation/devtools' package. For more details, see https://reactnavigation.org/docs/devtools\"\n );\n },\n }\n );\n} catch (e) {\n // Ignore\n}\n\n/**\n * Remove `key` and `routeNames` from the state objects recursively to get partial state.\n *\n * @param state Initial state object.\n */\nconst getPartialState = (\n state: InitialState | undefined\n): PartialState<NavigationState> | undefined => {\n if (state === undefined) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { key, routeNames, ...partialState } = state;\n\n return {\n ...partialState,\n stale: true,\n routes: state.routes.map((route) => {\n if (route.state === undefined) {\n return route as Route<string> & {\n state?: PartialState<NavigationState>;\n };\n }\n\n return { ...route, state: getPartialState(route.state) };\n }),\n };\n};\n\n/**\n * Container component which holds the navigation state.\n * This should be rendered at the root wrapping the whole app.\n *\n * @param props.initialState Initial state object for the navigation tree.\n * @param props.onStateChange Callback which is called with the latest navigation state when it changes.\n * @param props.children Child elements to render the content.\n * @param props.ref Ref object which refers to the navigation object containing helper methods.\n */\nconst BaseNavigationContainer = React.forwardRef(\n function BaseNavigationContainer(\n {\n initialState,\n onStateChange,\n onUnhandledAction,\n independent,\n children,\n }: NavigationContainerProps,\n ref?: React.Ref<NavigationContainerRef>\n ) {\n const parent = React.useContext(NavigationStateContext);\n\n if (!parent.isDefault && !independent) {\n throw new Error(\n \"Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitely. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.\"\n );\n }\n\n const [\n state,\n getState,\n setState,\n scheduleUpdate,\n flushUpdates,\n ] = useSyncState<State>(() =>\n getPartialState(initialState == null ? undefined : initialState)\n );\n\n const isFirstMountRef = React.useRef<boolean>(true);\n\n const navigatorKeyRef = React.useRef<string | undefined>();\n\n const getKey = React.useCallback(() => navigatorKeyRef.current, []);\n\n const setKey = React.useCallback((key: string) => {\n navigatorKeyRef.current = key;\n }, []);\n\n const { listeners, addListener } = useChildListeners();\n\n const { keyedListeners, addKeyedListener } = useKeyedChildListeners();\n\n const dispatch = (\n action: NavigationAction | ((state: NavigationState) => NavigationAction)\n ) => {\n if (listeners.focus[0] == null) {\n throw new Error(NOT_INITIALIZED_ERROR);\n }\n\n listeners.focus[0]((navigation) => navigation.dispatch(action));\n };\n\n const canGoBack = () => {\n if (listeners.focus[0] == null) {\n return false;\n }\n\n const { result, handled } = listeners.focus[0]((navigation) =>\n navigation.canGoBack()\n );\n\n if (handled) {\n return result;\n } else {\n return false;\n }\n };\n\n const resetRoot = React.useCallback(\n (state?: PartialState<NavigationState> | NavigationState) => {\n const target = state?.key ?? keyedListeners.getState.root?.().key;\n\n if (target == null) {\n throw new Error(NOT_INITIALIZED_ERROR);\n }\n\n listeners.focus[0]((navigation) =>\n navigation.dispatch({\n ...CommonActions.reset(state),\n target,\n })\n );\n },\n [keyedListeners.getState, listeners.focus]\n );\n\n const getRootState = React.useCallback(() => {\n return keyedListeners.getState.root?.();\n }, [keyedListeners.getState]);\n\n const getCurrentRoute = React.useCallback(() => {\n let state = getRootState();\n if (state === undefined) {\n return undefined;\n }\n while (state.routes[state.index].state !== undefined) {\n state = state.routes[state.index].state as NavigationState;\n }\n return state.routes[state.index];\n }, [getRootState]);\n\n const emitter = useEventEmitter<NavigationContainerEventMap>();\n\n const { addOptionsGetter, getCurrentOptions } = useOptionsGetters({});\n\n React.useImperativeHandle(ref, () => ({\n ...(Object.keys(CommonActions) as (keyof typeof CommonActions)[]).reduce<\n any\n >((acc, name) => {\n acc[name] = (...args: any[]) =>\n dispatch(\n CommonActions[name](\n // @ts-expect-error: we can't know the type statically\n ...args\n )\n );\n return acc;\n }, {}),\n ...emitter.create('root'),\n resetRoot,\n dispatch,\n canGoBack,\n getRootState,\n dangerouslyGetState: () => state,\n dangerouslyGetParent: () => undefined,\n getCurrentRoute,\n getCurrentOptions,\n }));\n\n const onDispatchAction = React.useCallback(\n (action: NavigationAction, noop: boolean) => {\n emitter.emit({ type: '__unsafe_action__', data: { action, noop } });\n },\n [emitter]\n );\n\n const lastEmittedOptionsRef = React.useRef<object | undefined>();\n\n const onOptionsChange = React.useCallback(\n (options) => {\n if (lastEmittedOptionsRef.current === options) {\n return;\n }\n\n lastEmittedOptionsRef.current = options;\n\n emitter.emit({\n type: 'options',\n data: { options },\n });\n },\n [emitter]\n );\n\n const builderContext = React.useMemo(\n () => ({\n addListener,\n addKeyedListener,\n onDispatchAction,\n onOptionsChange,\n }),\n [addListener, addKeyedListener, onDispatchAction, onOptionsChange]\n );\n\n const scheduleContext = React.useMemo(\n () => ({ scheduleUpdate, flushUpdates }),\n [scheduleUpdate, flushUpdates]\n );\n\n const isInitialRef = React.useRef(true);\n\n const getIsInitial = React.useCallback(() => isInitialRef.current, []);\n\n const context = React.useMemo(\n () => ({\n state,\n getState,\n setState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter,\n }),\n [\n state,\n getState,\n setState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter,\n ]\n );\n\n const onStateChangeRef = React.useRef(onStateChange);\n\n React.useEffect(() => {\n isInitialRef.current = false;\n onStateChangeRef.current = onStateChange;\n });\n\n React.useEffect(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (state !== undefined) {\n const result = checkSerializable(state);\n\n if (!result.serializable) {\n const { location, reason } = result;\n\n let path = '';\n let pointer: Record<any, any> = state;\n let params = false;\n\n for (let i = 0; i < location.length; i++) {\n const curr = location[i];\n const prev = location[i - 1];\n\n pointer = pointer[curr];\n\n if (!params && curr === 'state') {\n continue;\n } else if (!params && curr === 'routes') {\n if (path) {\n path += ' > ';\n }\n } else if (\n !params &&\n typeof curr === 'number' &&\n prev === 'routes'\n ) {\n path += pointer?.name;\n } else if (!params) {\n path += ` > ${curr}`;\n params = true;\n } else {\n if (typeof curr === 'number' || /^[0-9]+$/.test(curr)) {\n path += `[${curr}]`;\n } else if (/^[a-z$_]+$/i.test(curr)) {\n path += `.${curr}`;\n } else {\n path += `[${JSON.stringify(curr)}]`;\n }\n }\n }\n\n const message = `Non-serializable values were found in the navigation state. Check:\\n\\n${path} (${reason})\\n\\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`;\n\n if (!serializableWarnings.includes(message)) {\n serializableWarnings.push(message);\n console.warn(message);\n }\n }\n }\n }\n\n emitter.emit({ type: 'state', data: { state } });\n\n if (!isFirstMountRef.current && onStateChangeRef.current) {\n onStateChangeRef.current(getRootState());\n }\n\n isFirstMountRef.current = false;\n }, [getRootState, emitter, state]);\n\n const defaultOnUnhandledAction = React.useCallback(\n (action: NavigationAction) => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n\n const payload: Record<string, any> | undefined = action.payload;\n\n let message = `The action '${action.type}'${\n payload ? ` with payload ${JSON.stringify(action.payload)}` : ''\n } was not handled by any navigator.`;\n\n switch (action.type) {\n case 'NAVIGATE':\n case 'PUSH':\n case 'REPLACE':\n case 'JUMP_TO':\n if (payload?.name) {\n message += `\\n\\nDo you have a screen named '${payload.name}'?\\n\\nIf you're trying to navigate to a screen in a nested navigator, see https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator.`;\n } else {\n message += `\\n\\nYou need to pass the name of the screen to navigate to.\\n\\nSee https://reactnavigation.org/docs/navigation-actions for usage.`;\n }\n\n break;\n case 'GO_BACK':\n case 'POP':\n case 'POP_TO_TOP':\n message += `\\n\\nIs there any screen to go back to?`;\n break;\n case 'OPEN_DRAWER':\n case 'CLOSE_DRAWER':\n case 'TOGGLE_DRAWER':\n message += `\\n\\nIs your screen inside a Drawer navigator?`;\n break;\n }\n\n message += `\\n\\nThis is a development-only warning and won't be shown in production.`;\n\n console.error(message);\n },\n []\n );\n\n let element = (\n <ScheduleUpdateContext.Provider value={scheduleContext}>\n <NavigationBuilderContext.Provider value={builderContext}>\n <NavigationStateContext.Provider value={context}>\n <UnhandledActionContext.Provider\n value={onUnhandledAction ?? defaultOnUnhandledAction}\n >\n <EnsureSingleNavigator>{children}</EnsureSingleNavigator>\n </UnhandledActionContext.Provider>\n </NavigationStateContext.Provider>\n </NavigationBuilderContext.Provider>\n </ScheduleUpdateContext.Provider>\n );\n\n if (independent) {\n // We need to clear any existing contexts for nested independent container to work correctly\n element = (\n <NavigationRouteContext.Provider value={undefined}>\n <NavigationContext.Provider value={undefined}>\n {element}\n </NavigationContext.Provider>\n </NavigationRouteContext.Provider>\n );\n }\n\n return element;\n }\n);\n\nexport default BaseNavigationContainer;\n","import type * as React from 'react';\nimport type { ParamListBase, NavigationState } from '@react-navigation/routers';\nimport Screen from './Screen';\nimport type { TypedNavigator, EventMapBase } from './types';\n\n/**\n * Higher order component to create a `Navigator` and `Screen` pair.\n * Custom navigators should wrap the navigator component in `createNavigator` before exporting.\n *\n * @param Navigator The navigtor component to wrap.\n * @returns Factory method to create a `Navigator` and `Screen` pair.\n */\nexport default function createNavigatorFactory<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase,\n NavigatorComponent extends React.ComponentType<any>\n>(Navigator: NavigatorComponent) {\n return function <ParamList extends ParamListBase>(): TypedNavigator<\n ParamList,\n State,\n ScreenOptions,\n EventMap,\n typeof Navigator\n > {\n if (arguments[0] !== undefined) {\n throw new Error(\n \"Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API with React Navigation 5? See https://reactnavigation.org/docs/upgrading-from-4.x for migration guide.\"\n );\n }\n\n return {\n Navigator,\n Screen,\n };\n };\n}\n","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport type { NavigationHelpers } from './types';\n\n/**\n * Context which holds the navigation helpers of the parent navigator.\n * Navigators should use this context in their view component.\n */\nconst NavigationHelpersContext = React.createContext<\n NavigationHelpers<ParamListBase> | undefined\n>(undefined);\n\nexport default NavigationHelpersContext;\n","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport type { RouteProp } from './types';\n\n/**\n * Hook to access the route prop of the parent screen anywhere.\n *\n * @returns Route prop of the parent screen.\n */\nexport default function useRoute<\n T extends RouteProp<ParamListBase, string>\n>(): T {\n const route = React.useContext(NavigationRouteContext);\n\n if (route === undefined) {\n throw new Error(\n \"Couldn't find a route object. Is your component inside a screen in a navigator?\"\n );\n }\n\n return route as T;\n}\n","import * as React from 'react';\nimport useNavigation from './useNavigation';\n\ntype EffectCallback = () => undefined | void | (() => void);\n\n/**\n * Hook to run an effect in a focused screen, similar to `React.useEffect`.\n * This can be used to perform side-effects such as fetching data or subscribing to events.\n * The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often.\n *\n * @param callback Memoized callback containing the effect, should optionally return a cleanup function.\n */\nexport default function useFocusEffect(effect: EffectCallback) {\n const navigation = useNavigation();\n\n if (arguments[1] !== undefined) {\n const message =\n \"You passed a second argument to 'useFocusEffect', but it only accepts one argument. \" +\n \"If you want to pass a dependency array, you can use 'React.useCallback':\\n\\n\" +\n 'useFocusEffect(\\n' +\n ' React.useCallback(() => {\\n' +\n ' // Your code here\\n' +\n ' }, [depA, depB])\\n' +\n ');\\n\\n' +\n 'See usage guide: https://reactnavigation.org/docs/use-focus-effect';\n\n console.error(message);\n }\n\n React.useEffect(() => {\n let isFocused = false;\n let cleanup: undefined | void | (() => void);\n\n const callback = () => {\n const destroy = effect();\n\n if (destroy === undefined || typeof destroy === 'function') {\n return destroy;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n let message =\n 'An effect function must not return anything besides a function, which is used for clean-up.';\n\n if (destroy === null) {\n message +=\n \" You returned 'null'. If your effect does not require clean-up, return 'undefined' (or nothing).\";\n } else if (typeof (destroy as any).then === 'function') {\n message +=\n \"\\n\\nIt looks like you wrote 'useFocusEffect(async () => ...)' or returned a Promise. \" +\n 'Instead, write the async function inside your effect ' +\n 'and call it immediately:\\n\\n' +\n 'useFocusEffect(\\n' +\n ' React.useCallback() => {\\n' +\n ' async function fetchData() {\\n' +\n ' // You can await here\\n' +\n ' const response = await MyAPI.getData(someId);\\n' +\n ' // ...\\n' +\n ' }\\n\\n' +\n ' fetchData();\\n' +\n ' }, [someId])\\n' +\n ');\\n\\n' +\n 'See usage guide: https://reactnavigation.org/docs/use-focus-effect';\n } else {\n message += ` You returned '${JSON.stringify(destroy)}'.`;\n }\n\n console.error(message);\n }\n };\n\n // We need to run the effect on intial render/dep changes if the screen is focused\n if (navigation.isFocused()) {\n cleanup = callback();\n isFocused = true;\n }\n\n const unsubscribeFocus = navigation.addListener('focus', () => {\n // If callback was already called for focus, avoid calling it again\n // The focus event may also fire on intial render, so we guard against runing the effect twice\n if (isFocused) {\n return;\n }\n\n if (cleanup !== undefined) {\n cleanup();\n }\n\n cleanup = callback();\n isFocused = true;\n });\n\n const unsubscribeBlur = navigation.addListener('blur', () => {\n if (cleanup !== undefined) {\n cleanup();\n }\n\n cleanup = undefined;\n isFocused = false;\n });\n\n return () => {\n if (cleanup !== undefined) {\n cleanup();\n }\n\n unsubscribeFocus();\n unsubscribeBlur();\n };\n }, [effect, navigation]);\n}\n","import escape from 'escape-string-regexp';\nimport * as queryString from 'query-string';\nimport type {\n NavigationState,\n PartialState,\n InitialState,\n} from '@react-navigation/routers';\nimport checkLegacyPathConfig from './checkLegacyPathConfig';\nimport type { PathConfigMap } from './types';\n\ntype Options = {\n initialRouteName?: string;\n screens: PathConfigMap;\n};\n\ntype ParseConfig = Record<string, (value: string) => any>;\n\ntype RouteConfig = {\n screen: string;\n regex?: RegExp;\n path: string;\n pattern: string;\n routeNames: string[];\n parse?: ParseConfig;\n};\n\ntype InitialRouteConfig = {\n initialRouteName: string;\n parentScreens: string[];\n};\n\ntype ResultState = PartialState<NavigationState> & {\n state?: ResultState;\n};\n\ntype ParsedRoute = {\n name: string;\n params?: Record<string, any> | undefined;\n};\n\n/**\n * Utility to parse a path string to initial state object accepted by the container.\n * This is useful for deep linking when we need to handle the incoming URL.\n *\n * @example\n * ```js\n * getStateFromPath(\n * '/chat/jane/42',\n * {\n * screens: {\n * Chat: {\n * path: 'chat/:author/:id',\n * parse: { id: Number }\n * }\n * }\n * }\n * )\n * ```\n * @param path Path string to parse and convert, e.g. /foo/bar?count=42.\n * @param options Extra options to fine-tune how to parse the path.\n */\nexport default function getStateFromPath(\n path: string,\n options?: Options\n): ResultState | undefined {\n const [legacy, compatOptions] = checkLegacyPathConfig(options);\n\n let initialRoutes: InitialRouteConfig[] = [];\n\n if (compatOptions?.initialRouteName) {\n initialRoutes.push({\n initialRouteName: compatOptions.initialRouteName,\n parentScreens: [],\n });\n }\n\n const screens = compatOptions?.screens;\n\n let remaining = path\n .replace(/\\/+/g, '/') // Replace multiple slash (//) with single ones\n .replace(/^\\//, '') // Remove extra leading slash\n .replace(/\\?.*$/, ''); // Remove query params which we will handle later\n\n // Make sure there is a trailing slash\n remaining = remaining.endsWith('/') ? remaining : `${remaining}/`;\n\n if (screens === undefined) {\n // When no config is specified, use the path segments as route names\n const routes = remaining\n .split('/')\n .filter(Boolean)\n .map((segment, i, self) => {\n const name = decodeURIComponent(segment);\n\n if (i === self.length - 1) {\n return { name, params: parseQueryParams(path) };\n }\n\n return { name };\n });\n\n if (routes.length) {\n return createNestedStateObject(routes, initialRoutes);\n }\n\n return undefined;\n }\n\n // Create a normalized configs array which will be easier to use\n const configs = ([] as RouteConfig[])\n .concat(\n ...Object.keys(screens).map((key) =>\n createNormalizedConfigs(\n legacy,\n key,\n screens as PathConfigMap,\n [],\n initialRoutes,\n []\n )\n )\n )\n .sort((a, b) => {\n // Sort config so that:\n // - the most exhaustive ones are always at the beginning\n // - patterns with wildcard are always at the end\n\n // If 2 patterns are same, move the one with less route names up\n // This is an error state, so it's only useful for consistent error messages\n if (a.pattern === b.pattern) {\n return b.routeNames.join('>').localeCompare(a.routeNames.join('>'));\n }\n\n // If one of the patterns starts with the other, it's more exhaustive\n // So move it up\n if (a.pattern.startsWith(b.pattern)) {\n return -1;\n }\n\n if (b.pattern.startsWith(a.pattern)) {\n return 1;\n }\n\n const aParts = a.pattern.split('/');\n const bParts = b.pattern.split('/');\n\n const aWildcardIndex = aParts.indexOf('*');\n const bWildcardIndex = bParts.indexOf('*');\n\n // If only one of the patterns has a wildcard, move it down in the list\n if (aWildcardIndex === -1 && bWildcardIndex !== -1) {\n return -1;\n }\n\n if (aWildcardIndex !== -1 && bWildcardIndex === -1) {\n return 1;\n }\n\n if (aWildcardIndex === bWildcardIndex) {\n // If `b` has more `/`, it's more exhaustive\n // So we move it up in the list\n return bParts.length - aParts.length;\n }\n\n // If the wildcard appears later in the pattern (has higher index), it's more specific\n // So we move it up in the list\n return bWildcardIndex - aWildcardIndex;\n });\n\n // Check for duplicate patterns in the config\n configs.reduce<Record<string, RouteConfig>>((acc, config) => {\n if (acc[config.pattern]) {\n const a = acc[config.pattern].routeNames;\n const b = config.routeNames;\n\n // It's not a problem if the path string omitted from a inner most screen\n // For example, it's ok if a path resolves to `A > B > C` or `A > B`\n const intersects =\n a.length > b.length\n ? b.every((it, i) => a[i] === it)\n : a.every((it, i) => b[i] === it);\n\n if (!intersects) {\n throw new Error(\n `Found conflicting screens with the same pattern. The pattern '${\n config.pattern\n }' resolves to both '${a.join(' > ')}' and '${b.join(\n ' > '\n )}'. Patterns must be unique and cannot resolve to more than one screen.`\n );\n }\n }\n\n return Object.assign(acc, {\n [config.pattern]: config,\n });\n }, {});\n\n if (remaining === '/') {\n // We need to add special handling of empty path so navigation to empty path also works\n // When handling empty path, we should only look at the root level config\n const match = configs.find(\n (config) =>\n config.path === '' &&\n config.routeNames.every(\n // Make sure that none of the parent configs have a non-empty path defined\n (name) => !configs.find((c) => c.screen === name)?.path\n )\n );\n\n if (match) {\n return createNestedStateObject(\n match.routeNames.map((name, i, self) => {\n if (i === self.length - 1) {\n return { name, params: parseQueryParams(path, match.parse) };\n }\n\n return { name };\n }),\n initialRoutes\n );\n }\n\n return undefined;\n }\n\n let result: PartialState<NavigationState> | undefined;\n let current: PartialState<NavigationState> | undefined;\n\n if (legacy === false) {\n // If we're not in legacy mode,, we match the whole path against the regex instead of segments\n // This makes sure matches such as wildcard will catch any unmatched routes, even if nested\n const { routes, remainingPath } = matchAgainstConfigs(\n remaining,\n configs.map((c) => ({\n ...c,\n // Add `$` to the regex to make sure it matches till end of the path and not just beginning\n regex: c.regex ? new RegExp(c.regex.source + '$') : undefined,\n }))\n );\n\n if (routes !== undefined) {\n // This will always be empty if full path matched\n current = createNestedStateObject(routes, initialRoutes);\n remaining = remainingPath;\n result = current;\n }\n } else {\n // In legacy mode, we divide the path into segments and match piece by piece\n // This preserves the legacy behaviour, but we should remove it in next major\n while (remaining) {\n let { routes, remainingPath } = matchAgainstConfigs(remaining, configs);\n\n remaining = remainingPath;\n\n // If we hadn't matched any segments earlier, use the path as route name\n if (routes === undefined) {\n const segments = remaining.split('/');\n\n routes = [{ name: decodeURIComponent(segments[0]) }];\n segments.shift();\n remaining = segments.join('/');\n }\n\n const state = createNestedStateObject(routes, initialRoutes);\n\n if (current) {\n // The state should be nested inside the deepest route we parsed before\n while (current?.routes[current.index || 0].state) {\n current = current.routes[current.index || 0].state;\n }\n\n (current as PartialState<NavigationState>).routes[\n current?.index || 0\n ].state = state;\n } else {\n result = state;\n }\n\n current = state;\n }\n }\n\n if (current == null || result == null) {\n return undefined;\n }\n\n const route = findFocusedRoute(current);\n const params = parseQueryParams(\n path,\n findParseConfigForRoute(route.name, configs)\n );\n\n if (params) {\n // @ts-expect-error: params should be treated as read-only, but we're creating the state here so it doesn't matter\n route.params = { ...route.params, ...params };\n }\n\n return result;\n}\n\nconst joinPaths = (...paths: string[]): string =>\n ([] as string[])\n .concat(...paths.map((p) => p.split('/')))\n .filter(Boolean)\n .join('/');\n\nconst matchAgainstConfigs = (remaining: string, configs: RouteConfig[]) => {\n let routes: ParsedRoute[] | undefined;\n let remainingPath = remaining;\n\n // Go through all configs, and see if the next path segment matches our regex\n for (const config of configs) {\n if (!config.regex) {\n continue;\n }\n\n const match = remainingPath.match(config.regex);\n\n // If our regex matches, we need to extract params from the path\n if (match) {\n const matchedParams = config.pattern\n ?.split('/')\n .filter((p) => p.startsWith(':'))\n .reduce<Record<string, any>>(\n (acc, p, i) =>\n Object.assign(acc, {\n // The param segments appear every second item starting from 2 in the regex match result\n [p]: match![(i + 1) * 2].replace(/\\//, ''),\n }),\n {}\n );\n\n routes = config.routeNames.map((name) => {\n const config = configs.find((c) => c.screen === name);\n const params = config?.path\n ?.split('/')\n .filter((p) => p.startsWith(':'))\n .reduce<Record<string, any>>((acc, p) => {\n const value = matchedParams[p];\n\n if (value) {\n const key = p.replace(/^:/, '').replace(/\\?$/, '');\n acc[key] = config.parse?.[key] ? config.parse[key](value) : value;\n }\n\n return acc;\n }, {});\n\n if (params && Object.keys(params).length) {\n return { name, params };\n }\n\n return { name };\n });\n\n remainingPath = remainingPath.replace(match[1], '');\n\n break;\n }\n }\n\n return { routes, remainingPath };\n};\n\nconst createNormalizedConfigs = (\n legacy: boolean,\n screen: string,\n routeConfig: PathConfigMap,\n routeNames: string[] = [],\n initials: InitialRouteConfig[],\n parentScreens: string[],\n parentPattern?: string\n): RouteConfig[] => {\n const configs: RouteConfig[] = [];\n\n routeNames.push(screen);\n\n parentScreens.push(screen);\n\n const config = routeConfig[screen];\n\n if (typeof config === 'string') {\n // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern\n const pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n\n configs.push(createConfigItem(legacy, screen, routeNames, pattern, config));\n } else if (typeof config === 'object') {\n let pattern: string | undefined;\n\n // if an object is specified as the value (e.g. Foo: { ... }),\n // it can have `path` property and\n // it could have `screens` prop which has nested configs\n if (typeof config.path === 'string') {\n if (legacy) {\n pattern =\n config.exact !== true && parentPattern\n ? joinPaths(parentPattern, config.path)\n : config.path;\n } else {\n if (config.exact && config.path === undefined) {\n throw new Error(\n \"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\"\n );\n }\n\n pattern =\n config.exact !== true\n ? joinPaths(parentPattern || '', config.path || '')\n : config.path || '';\n }\n\n configs.push(\n createConfigItem(\n legacy,\n screen,\n routeNames,\n pattern,\n config.path,\n config.parse\n )\n );\n }\n\n if (config.screens) {\n // property `initialRouteName` without `screens` has no purpose\n if (config.initialRouteName) {\n initials.push({\n initialRouteName: config.initialRouteName,\n parentScreens,\n });\n }\n\n Object.keys(config.screens).forEach((nestedConfig) => {\n const result = createNormalizedConfigs(\n legacy,\n nestedConfig,\n config.screens as PathConfigMap,\n routeNames,\n initials,\n [...parentScreens],\n pattern ?? parentPattern\n );\n\n configs.push(...result);\n });\n }\n }\n\n routeNames.pop();\n\n return configs;\n};\n\nconst createConfigItem = (\n legacy: boolean,\n screen: string,\n routeNames: string[],\n pattern: string,\n path: string,\n parse?: ParseConfig\n): RouteConfig => {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern = pattern.split('/').filter(Boolean).join('/');\n\n const regex = pattern\n ? new RegExp(\n `^(${pattern\n .split('/')\n .map((it) => {\n if (legacy && it === '*') {\n throw new Error(\n \"Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config\"\n );\n }\n\n if (it.startsWith(':')) {\n return `(([^/]+\\\\/)${it.endsWith('?') ? '?' : ''})`;\n }\n\n return `${it === '*' ? '.*' : escape(it)}\\\\/`;\n })\n .join('')})`\n )\n : undefined;\n\n return {\n screen,\n regex,\n pattern,\n path,\n // The routeNames array is mutated, so copy it to keep the current state\n routeNames: [...routeNames],\n parse,\n };\n};\n\nconst findParseConfigForRoute = (\n routeName: string,\n flatConfig: RouteConfig[]\n): ParseConfig | undefined => {\n for (const config of flatConfig) {\n if (routeName === config.routeNames[config.routeNames.length - 1]) {\n return config.parse;\n }\n }\n\n return undefined;\n};\n\n// Try to find an initial route connected with the one passed\nconst findInitialRoute = (\n routeName: string,\n parentScreens: string[],\n initialRoutes: InitialRouteConfig[]\n): string | undefined => {\n for (const config of initialRoutes) {\n if (parentScreens.length === config.parentScreens.length) {\n let sameParents = true;\n for (let i = 0; i < parentScreens.length; i++) {\n if (parentScreens[i].localeCompare(config.parentScreens[i]) !== 0) {\n sameParents = false;\n break;\n }\n }\n if (sameParents) {\n return routeName !== config.initialRouteName\n ? config.initialRouteName\n : undefined;\n }\n }\n }\n return undefined;\n};\n\n// returns state object with values depending on whether\n// it is the end of state and if there is initialRoute for this level\nconst createStateObject = (\n initialRoute: string | undefined,\n route: ParsedRoute,\n isEmpty: boolean\n): InitialState => {\n if (isEmpty) {\n if (initialRoute) {\n return {\n index: 1,\n routes: [{ name: initialRoute }, route],\n };\n } else {\n return {\n routes: [route],\n };\n }\n } else {\n if (initialRoute) {\n return {\n index: 1,\n routes: [{ name: initialRoute }, { ...route, state: { routes: [] } }],\n };\n } else {\n return {\n routes: [{ ...route, state: { routes: [] } }],\n };\n }\n }\n};\n\nconst createNestedStateObject = (\n routes: ParsedRoute[],\n initialRoutes: InitialRouteConfig[]\n) => {\n let state: InitialState;\n let route = routes.shift() as ParsedRoute;\n const parentScreens: string[] = [];\n\n let initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);\n\n parentScreens.push(route.name);\n\n state = createStateObject(initialRoute, route, routes.length === 0);\n\n if (routes.length > 0) {\n let nestedState = state;\n\n while ((route = routes.shift() as ParsedRoute)) {\n initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);\n\n const nestedStateIndex =\n nestedState.index || nestedState.routes.length - 1;\n\n nestedState.routes[nestedStateIndex].state = createStateObject(\n initialRoute,\n route,\n routes.length === 0\n );\n\n if (routes.length > 0) {\n nestedState = nestedState.routes[nestedStateIndex]\n .state as InitialState;\n }\n\n parentScreens.push(route.name);\n }\n }\n\n return state;\n};\n\nconst findFocusedRoute = (state: InitialState) => {\n let current: InitialState | undefined = state;\n\n while (current?.routes[current.index || 0].state) {\n // The query params apply to the deepest route\n current = current.routes[current.index || 0].state;\n }\n\n const route = (current as PartialState<NavigationState>).routes[\n current?.index || 0\n ];\n\n return route;\n};\n\nconst parseQueryParams = (\n path: string,\n parseConfig?: Record<string, (value: string) => any>\n) => {\n const query = path.split('?')[1];\n const params = queryString.parse(query);\n\n if (parseConfig) {\n Object.keys(params).forEach((name) => {\n if (parseConfig[name] && typeof params[name] === 'string') {\n params[name] = parseConfig[name](params[name] as string);\n }\n });\n }\n\n return Object.keys(params).length ? params : undefined;\n};\n","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp(token, 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn decodeURIComponent(components.join(''));\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher);\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher);\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","import * as queryString from 'query-string';\nimport type {\n NavigationState,\n PartialState,\n Route,\n} from '@react-navigation/routers';\nimport checkLegacyPathConfig from './checkLegacyPathConfig';\nimport type { PathConfig, PathConfigMap } from './types';\n\ntype Options = { initialRouteName?: string; screens: PathConfigMap };\n\ntype State = NavigationState | Omit<PartialState<NavigationState>, 'stale'>;\n\ntype StringifyConfig = Record<string, (value: any) => string>;\n\ntype ConfigItem = {\n pattern?: string;\n stringify?: StringifyConfig;\n screens?: Record<string, ConfigItem>;\n};\n\nconst getActiveRoute = (state: State): { name: string; params?: object } => {\n const route =\n typeof state.index === 'number'\n ? state.routes[state.index]\n : state.routes[state.routes.length - 1];\n\n if (route.state) {\n return getActiveRoute(route.state);\n }\n\n return route;\n};\n\n/**\n * Utility to serialize a navigation state object to a path string.\n *\n * @example\n * ```js\n * getPathFromState(\n * {\n * routes: [\n * {\n * name: 'Chat',\n * params: { author: 'Jane', id: 42 },\n * },\n * ],\n * },\n * {\n * screens: {\n * Chat: {\n * path: 'chat/:author/:id',\n * stringify: { author: author => author.toLowerCase() }\n * }\n * }\n * }\n * )\n * ```\n *\n * @param state Navigation state to serialize.\n * @param options Extra options to fine-tune how to serialize the path.\n * @returns Path representing the state, e.g. /foo/bar?count=42.\n */\nexport default function getPathFromState(\n state: State,\n options?: Options\n): string {\n if (state == null) {\n throw Error(\n \"Got 'undefined' for the navigation state. You must pass a valid state object.\"\n );\n }\n\n const [legacy, compatOptions] = checkLegacyPathConfig(options);\n\n // Create a normalized configs object which will be easier to use\n const configs: Record<string, ConfigItem> = compatOptions\n ? createNormalizedConfigs(legacy, compatOptions.screens)\n : {};\n\n let path = '/';\n let current: State | undefined = state;\n\n const allParams: Record<string, any> = {};\n\n while (current) {\n let index = typeof current.index === 'number' ? current.index : 0;\n let route = current.routes[index] as Route<string> & {\n state?: State;\n };\n\n let pattern: string | undefined;\n\n let focusedParams: Record<string, any> | undefined;\n let focusedRoute = getActiveRoute(state);\n let currentOptions = configs;\n\n // Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined\n let nestedRouteNames = [];\n\n let hasNext = true;\n\n while (route.name in currentOptions && hasNext) {\n pattern = currentOptions[route.name].pattern;\n\n nestedRouteNames.push(route.name);\n\n if (route.params) {\n const stringify = currentOptions[route.name]?.stringify;\n\n const currentParams = fromEntries(\n Object.entries(route.params).map(([key, value]) => [\n key,\n stringify?.[key] ? stringify[key](value) : String(value),\n ])\n );\n\n if (pattern) {\n Object.assign(allParams, currentParams);\n }\n\n if (focusedRoute === route) {\n // If this is the focused route, keep the params for later use\n // We save it here since it's been stringified already\n focusedParams = { ...currentParams };\n\n pattern\n ?.split('/')\n .filter((p) => p.startsWith(':'))\n // eslint-disable-next-line no-loop-func\n .forEach((p) => {\n const name = getParamName(p);\n\n // Remove the params present in the pattern since we'll only use the rest for query string\n if (focusedParams) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[name];\n }\n });\n }\n }\n\n // If there is no `screens` property or no nested state, we return pattern\n if (!currentOptions[route.name].screens || route.state === undefined) {\n hasNext = false;\n } else {\n index =\n typeof route.state.index === 'number'\n ? route.state.index\n : route.state.routes.length - 1;\n\n const nextRoute = route.state.routes[index];\n const nestedConfig = currentOptions[route.name].screens;\n\n // if there is config for next route name, we go deeper\n if (nestedConfig && nextRoute.name in nestedConfig) {\n route = nextRoute as Route<string> & { state?: State };\n currentOptions = nestedConfig;\n } else {\n // If not, there is no sense in going deeper in config\n hasNext = false;\n }\n }\n }\n\n if (pattern === undefined) {\n pattern = nestedRouteNames.join('/');\n }\n\n if (currentOptions[route.name] !== undefined) {\n path += pattern\n .split('/')\n .map((p) => {\n const name = getParamName(p);\n\n // We don't know what to show for wildcard patterns\n // Showing the route name seems ok, though whatever we show here will be incorrect\n // Since the page doesn't actually exist\n if (p === '*') {\n if (legacy) {\n throw new Error(\n \"Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config\"\n );\n }\n\n return route.name;\n }\n\n // If the path has a pattern for a param, put the param in the path\n if (p.startsWith(':')) {\n const value = allParams[name];\n\n if (value === undefined && p.endsWith('?')) {\n // Optional params without value assigned in route.params should be ignored\n return '';\n }\n\n return encodeURIComponent(value);\n }\n\n return encodeURIComponent(p);\n })\n .join('/');\n } else {\n path += encodeURIComponent(route.name);\n }\n\n if (!focusedParams) {\n focusedParams = focusedRoute.params;\n }\n\n if (route.state) {\n path += '/';\n } else if (focusedParams) {\n for (let param in focusedParams) {\n if (focusedParams[param] === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[param];\n }\n }\n\n const query = queryString.stringify(focusedParams);\n\n if (query) {\n path += `?${query}`;\n }\n }\n\n current = route.state;\n }\n\n // Remove multiple as well as trailing slashes\n path = path.replace(/\\/+/g, '/');\n path = path.length > 1 ? path.replace(/\\/$/, '') : path;\n\n return path;\n}\n\n// Object.fromEntries is not available in older iOS versions\nconst fromEntries = <K extends string, V>(entries: (readonly [K, V])[]) =>\n entries.reduce((acc, [k, v]) => {\n if (acc.hasOwnProperty(k)) {\n throw new Error(`A value for key '${k}' already exists in the object.`);\n }\n\n acc[k] = v;\n return acc;\n }, {} as Record<K, V>);\n\nconst getParamName = (pattern: string) =>\n pattern.replace(/^:/, '').replace(/\\?$/, '');\n\nconst joinPaths = (...paths: string[]): string =>\n ([] as string[])\n .concat(...paths.map((p) => p.split('/')))\n .filter(Boolean)\n .join('/');\n\nconst createConfigItem = (\n legacy: boolean,\n config: PathConfig | string,\n parentPattern?: string\n): ConfigItem => {\n if (typeof config === 'string') {\n // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern\n const pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n\n return { pattern };\n }\n\n // If an object is specified as the value (e.g. Foo: { ... }),\n // It can have `path` property and `screens` prop which has nested configs\n let pattern: string | undefined;\n\n if (legacy) {\n pattern =\n config.exact !== true && parentPattern && config.path\n ? joinPaths(parentPattern, config.path)\n : config.path;\n } else {\n if (config.exact && config.path === undefined) {\n throw new Error(\n \"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\"\n );\n }\n\n pattern =\n config.exact !== true\n ? joinPaths(parentPattern || '', config.path || '')\n : config.path || '';\n }\n\n const screens = config.screens\n ? createNormalizedConfigs(legacy, config.screens, pattern)\n : undefined;\n\n return {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern: pattern?.split('/').filter(Boolean).join('/'),\n stringify: config.stringify,\n screens,\n };\n};\n\nconst createNormalizedConfigs = (\n legacy: boolean,\n options: PathConfigMap,\n pattern?: string\n): Record<string, ConfigItem> =>\n fromEntries(\n Object.entries(options).map(([name, c]) => {\n const result = createConfigItem(legacy, c, pattern);\n\n return [name, result];\n })\n );\n","import type {\n Route,\n PartialRoute,\n ParamListBase,\n NavigationState,\n PartialState,\n CommonActions,\n} from '@react-navigation/routers';\nimport type { PathConfig, PathConfigMap, NavigatorScreenParams } from './types';\n\ntype ConfigItem = {\n initialRouteName?: string;\n screens?: Record<string, ConfigItem>;\n};\n\ntype Options = { initialRouteName?: string; screens: PathConfigMap };\n\ntype NavigateAction<State extends NavigationState> = {\n type: 'NAVIGATE';\n payload: {\n name: string;\n params?: NavigatorScreenParams<State>;\n };\n};\n\nexport default function getActionFromState(\n state: PartialState<NavigationState>,\n options?: Options\n): NavigateAction<NavigationState> | CommonActions.Action | undefined {\n // Create a normalized configs object which will be easier to use\n const normalizedConfig = options ? createNormalizedConfigItem(options) : {};\n\n const routes =\n state.index != null ? state.routes.slice(0, state.index + 1) : state.routes;\n\n if (routes.length === 0) {\n return undefined;\n }\n\n if (\n !(\n (routes.length === 1 && routes[0].key === undefined) ||\n (routes.length === 2 &&\n routes[0].key === undefined &&\n routes[0].name === normalizedConfig?.initialRouteName &&\n routes[1].key === undefined)\n )\n ) {\n return {\n type: 'RESET',\n payload: state,\n };\n }\n\n const route = state.routes[state.index ?? state.routes.length - 1];\n\n let current: PartialState<NavigationState> | undefined = route?.state;\n let config: ConfigItem | undefined = normalizedConfig?.screens?.[route?.name];\n let params = { ...route.params } as NavigatorScreenParams<\n ParamListBase,\n NavigationState\n >;\n\n let payload = route ? { name: route.name, params } : undefined;\n\n while (current) {\n if (current.routes.length === 0) {\n return undefined;\n }\n\n const routes =\n current.index != null\n ? current.routes.slice(0, current.index + 1)\n : current.routes;\n\n const route: Route<string> | PartialRoute<Route<string>> =\n routes[routes.length - 1];\n\n // Explicitly set to override existing value when merging params\n Object.assign(params, {\n initial: undefined,\n screen: undefined,\n params: undefined,\n state: undefined,\n });\n\n if (routes.length === 1 && routes[0].key === undefined) {\n params.initial = true;\n params.screen = route.name;\n } else if (\n routes.length === 2 &&\n routes[0].key === undefined &&\n routes[0].name === config?.initialRouteName &&\n routes[1].key === undefined\n ) {\n params.initial = false;\n params.screen = route.name;\n } else {\n params.state = current;\n break;\n }\n\n if (route.state) {\n params.params = { ...route.params };\n params = params.params as NavigatorScreenParams<\n ParamListBase,\n NavigationState\n >;\n } else {\n params.params = route.params;\n }\n\n current = route.state;\n config = config?.screens?.[route.name];\n }\n\n if (!payload) {\n return;\n }\n\n // Try to construct payload for a `NAVIGATE` action from the state\n // This lets us preserve the navigation state and not lose it\n return {\n type: 'NAVIGATE',\n payload,\n };\n}\n\nconst createNormalizedConfigItem = (config: PathConfig | string) =>\n typeof config === 'object' && config != null\n ? {\n initialRouteName: config.initialRouteName,\n screens:\n config.screens != null\n ? createNormalizedConfigs(config.screens)\n : undefined,\n }\n : {};\n\nconst createNormalizedConfigs = (options: PathConfigMap) =>\n Object.entries(options).reduce<Record<string, ConfigItem>>((acc, [k, v]) => {\n acc[k] = createNormalizedConfigItem(v);\n return acc;\n }, {});\n","import type {\n Route,\n PartialState,\n NavigationState,\n} from '@react-navigation/routers';\nimport { SUPPRESS_STATE_ACCESS_WARNING } from './useRouteCache';\n\nexport default function getFocusedRouteNameFromRoute(\n route: Partial<Route<string>> & { state?: PartialState<NavigationState> }\n): string | undefined {\n SUPPRESS_STATE_ACCESS_WARNING.value = true;\n\n const state = route.state;\n\n SUPPRESS_STATE_ACCESS_WARNING.value = false;\n\n const params = route.params as { screen?: unknown } | undefined;\n\n const routeName = state\n ? // Get the currently active route name in the nested navigator\n state.routes[\n // If we have a partial state without index, for tab/drawer, first screen will be focused one, and last for stack\n // The type property will only exist for rehydrated state and not for state from deep link\n state.index ??\n (typeof state.type === 'string' && state.type !== 'stack'\n ? 0\n : state.routes.length - 1)\n ].name\n : // If state doesn't exist, we need to default to `screen` param if available\n typeof params?.screen === 'string'\n ? params.screen\n : undefined;\n\n return routeName;\n}\n","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar _reduce = /*#__PURE__*/require('./internal/_reduce');\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\n\n\nvar reduce = /*#__PURE__*/_curry3(_reduce);\nmodule.exports = reduce;","var _isArrayLike = /*#__PURE__*/require('./_isArrayLike');\n\nvar _xwrap = /*#__PURE__*/require('./_xwrap');\n\nvar bind = /*#__PURE__*/require('../bind');\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n idx += 1;\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n step = iter.next();\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\n\nfunction _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}\nmodule.exports = _reduce;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Returns a function that always returns the given value. Note that for\n * non-primitives the value returned is a reference to the original value.\n *\n * This function is known as `const`, `constant`, or `K` (for K combinator) in\n * other languages and libraries.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> (* -> a)\n * @param {*} val The value to wrap in a function\n * @return {Function} A Function :: * -> val.\n * @example\n *\n * var t = R.always('Tee');\n * t(); //=> 'Tee'\n */\n\n\nvar always = /*#__PURE__*/_curry1(function always(val) {\n return function () {\n return val;\n };\n});\nmodule.exports = always;","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\n\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n\n return theme;\n}\n","/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","import * as React from 'react';\n\n/**\n * Component which prevents updates for children if no props changed\n */\nfunction StaticContainer(props: any) {\n return props.children;\n}\n\nexport default React.memo(StaticContainer, (prevProps: any, nextProps: any) => {\n const prevPropKeys = Object.keys(prevProps);\n const nextPropKeys = Object.keys(nextProps);\n\n if (prevPropKeys.length !== nextPropKeys.length) {\n return false;\n }\n\n for (const key of prevPropKeys) {\n if (key === 'children') {\n continue;\n }\n\n if (prevProps[key] !== nextProps[key]) {\n return false;\n }\n }\n\n return true;\n});\n","import * as React from 'react';\nimport type {\n Route,\n ParamListBase,\n NavigationState,\n PartialState,\n} from '@react-navigation/routers';\nimport NavigationStateContext from './NavigationStateContext';\nimport StaticContainer from './StaticContainer';\nimport EnsureSingleNavigator from './EnsureSingleNavigator';\nimport useOptionsGetters from './useOptionsGetters';\nimport type { NavigationProp, RouteConfig, EventMapBase } from './types';\n\ntype Props<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n> = {\n screen: RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>;\n navigation: NavigationProp<ParamListBase, string, State, ScreenOptions>;\n route: Route<string>;\n routeState: NavigationState | PartialState<NavigationState> | undefined;\n getState: () => State;\n setState: (state: State) => void;\n options: object;\n};\n\n/**\n * Component which takes care of rendering the screen for a route.\n * It provides all required contexts and applies optimizations when applicable.\n */\nexport default function SceneView<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n>({\n screen,\n route,\n navigation,\n routeState,\n getState,\n setState,\n options,\n}: Props<State, ScreenOptions, EventMap>) {\n const navigatorKeyRef = React.useRef<string | undefined>();\n const getKey = React.useCallback(() => navigatorKeyRef.current, []);\n\n const { addOptionsGetter } = useOptionsGetters({\n key: route.key,\n options,\n navigation,\n });\n\n const setKey = React.useCallback((key: string) => {\n navigatorKeyRef.current = key;\n }, []);\n\n const getCurrentState = React.useCallback(() => {\n const state = getState();\n const currentRoute = state.routes.find((r) => r.key === route.key);\n\n return currentRoute ? currentRoute.state : undefined;\n }, [getState, route.key]);\n\n const setCurrentState = React.useCallback(\n (child: NavigationState | PartialState<NavigationState> | undefined) => {\n const state = getState();\n\n setState({\n ...state,\n routes: state.routes.map((r) =>\n r.key === route.key ? { ...r, state: child } : r\n ),\n });\n },\n [getState, route.key, setState]\n );\n\n const isInitialRef = React.useRef(true);\n\n React.useEffect(() => {\n isInitialRef.current = false;\n });\n\n const getIsInitial = React.useCallback(() => isInitialRef.current, []);\n\n const context = React.useMemo(\n () => ({\n state: routeState,\n getState: getCurrentState,\n setState: setCurrentState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter,\n }),\n [\n routeState,\n getCurrentState,\n setCurrentState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter,\n ]\n );\n\n const ScreenComponent = screen.getComponent\n ? screen.getComponent()\n : screen.component;\n\n return (\n <NavigationStateContext.Provider value={context}>\n <EnsureSingleNavigator>\n <StaticContainer\n name={screen.name}\n render={ScreenComponent || screen.children}\n navigation={navigation}\n route={route}\n >\n {ScreenComponent !== undefined ? (\n <ScreenComponent navigation={navigation} route={route} />\n ) : screen.children !== undefined ? (\n screen.children({ navigation, route })\n ) : null}\n </StaticContainer>\n </EnsureSingleNavigator>\n </NavigationStateContext.Provider>\n );\n}\n","import * as React from 'react';\nimport type {\n NavigationAction,\n NavigationState,\n ParamListBase,\n Router,\n} from '@react-navigation/routers';\nimport SceneView from './SceneView';\nimport NavigationBuilderContext, {\n AddListener,\n AddKeyedListener,\n} from './NavigationBuilderContext';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport useNavigationCache from './useNavigationCache';\nimport useRouteCache from './useRouteCache';\nimport NavigationContext from './NavigationContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport type {\n Descriptor,\n NavigationHelpers,\n RouteConfig,\n RouteProp,\n EventMapBase,\n} from './types';\n\ntype Options<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n> = {\n state: State;\n screens: Record<\n string,\n RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>\n >;\n navigation: NavigationHelpers<ParamListBase>;\n screenOptions?:\n | ScreenOptions\n | ((props: {\n route: RouteProp<ParamListBase, string>;\n navigation: any;\n }) => ScreenOptions);\n onAction: (\n action: NavigationAction,\n visitedNavigators?: Set<string>\n ) => boolean;\n getState: () => State;\n setState: (state: State) => void;\n addListener: AddListener;\n addKeyedListener: AddKeyedListener;\n onRouteFocus: (key: string) => void;\n router: Router<State, NavigationAction>;\n emitter: NavigationEventEmitter<any>;\n};\n\n/**\n * Hook to create descriptor objects for the child routes.\n *\n * A descriptor object provides 3 things:\n * - Helper method to render a screen\n * - Options specified by the screen for the navigator\n * - Navigation object intended for the route\n */\nexport default function useDescriptors<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n>({\n state,\n screens,\n navigation,\n screenOptions,\n onAction,\n getState,\n setState,\n addListener,\n addKeyedListener,\n onRouteFocus,\n router,\n emitter,\n}: Options<State, ScreenOptions, EventMap>) {\n const [options, setOptions] = React.useState<Record<string, object>>({});\n const { onDispatchAction, onOptionsChange } = React.useContext(\n NavigationBuilderContext\n );\n\n const context = React.useMemo(\n () => ({\n navigation,\n onAction,\n addListener,\n addKeyedListener,\n onRouteFocus,\n onDispatchAction,\n onOptionsChange,\n }),\n [\n navigation,\n onAction,\n addListener,\n addKeyedListener,\n onRouteFocus,\n onDispatchAction,\n onOptionsChange,\n ]\n );\n\n const navigations = useNavigationCache<State, ScreenOptions>({\n state,\n getState,\n navigation,\n setOptions,\n router,\n emitter,\n });\n\n const routes = useRouteCache(state.routes);\n\n return routes.reduce<\n Record<string, Descriptor<ParamListBase, string, State, ScreenOptions>>\n >((acc, route, i) => {\n const screen = screens[route.name];\n const navigation = navigations[route.key];\n\n const routeOptions = {\n // The default `screenOptions` passed to the navigator\n ...(typeof screenOptions === 'object' || screenOptions == null\n ? screenOptions\n : // @ts-expect-error: this is a function, but typescript doesn't think so\n screenOptions({\n route,\n navigation,\n })),\n // The `options` prop passed to `Screen` elements\n ...(typeof screen.options === 'object' || screen.options == null\n ? screen.options\n : // @ts-expect-error: this is a function, but typescript doesn't think so\n screen.options({\n route,\n navigation,\n })),\n // The options set via `navigation.setOptions`\n ...options[route.key],\n };\n\n acc[route.key] = {\n navigation,\n render() {\n return (\n <NavigationBuilderContext.Provider key={route.key} value={context}>\n <NavigationContext.Provider value={navigation}>\n <NavigationRouteContext.Provider value={route}>\n <SceneView\n navigation={navigation}\n route={route}\n screen={screen}\n routeState={state.routes[i].state}\n getState={getState}\n setState={setState}\n options={routeOptions}\n />\n </NavigationRouteContext.Provider>\n </NavigationContext.Provider>\n </NavigationBuilderContext.Provider>\n );\n },\n options: routeOptions as ScreenOptions,\n };\n\n return acc;\n }, {});\n}\n","import * as React from 'react';\nimport {\n CommonActions,\n NavigationAction,\n ParamListBase,\n NavigationState,\n Router,\n} from '@react-navigation/routers';\nimport type { NavigationEventEmitter } from './useEventEmitter';\n\nimport type { EventMapBase, NavigationHelpers, NavigationProp } from './types';\n\ntype Options<State extends NavigationState> = {\n state: State;\n getState: () => State;\n navigation: NavigationHelpers<ParamListBase> &\n Partial<NavigationProp<ParamListBase, string, any, any, any>>;\n setOptions: (\n cb: (options: Record<string, object>) => Record<string, object>\n ) => void;\n router: Router<State, NavigationAction>;\n emitter: NavigationEventEmitter<EventMapBase>;\n};\n\ntype NavigationCache<\n State extends NavigationState,\n ScreenOptions extends {}\n> = {\n [key: string]: NavigationProp<ParamListBase, string, State, ScreenOptions>;\n};\n\n/**\n * Hook to cache navigation objects for each screen in the navigator.\n * It's important to cache them to make sure navigation objects don't change between renders.\n * This lets us apply optimizations like `React.memo` to minimize re-rendering screens.\n */\nexport default function useNavigationCache<\n State extends NavigationState,\n ScreenOptions extends {}\n>({\n state,\n getState,\n navigation,\n setOptions,\n router,\n emitter,\n}: Options<State>) {\n // Cache object which holds navigation objects for each screen\n // We use `React.useMemo` instead of `React.useRef` coz we want to invalidate it when deps change\n // In reality, these deps will rarely change, if ever\n const cache = React.useMemo(\n () => ({ current: {} as NavigationCache<State, ScreenOptions> }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [getState, navigation, setOptions, router, emitter]\n );\n\n const actions = {\n ...router.actionCreators,\n ...CommonActions,\n };\n\n cache.current = state.routes.reduce<NavigationCache<State, ScreenOptions>>(\n (acc, route) => {\n const previous = cache.current[route.key];\n\n if (previous) {\n // If a cached navigation object already exists, reuse it\n acc[route.key] = previous;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { emit, ...rest } = navigation;\n\n const dispatch = (\n action: NavigationAction | ((state: State) => NavigationAction)\n ) => {\n const payload =\n typeof action === 'function' ? action(getState()) : action;\n\n navigation.dispatch(\n typeof payload === 'object' && payload != null\n ? { source: route.key, ...payload }\n : payload\n );\n };\n\n const helpers = Object.keys(actions).reduce<Record<string, () => void>>(\n (acc, name) => {\n // @ts-expect-error: name is a valid key, but TypeScript is dumb\n acc[name] = (...args: any) => dispatch(actions[name](...args));\n return acc;\n },\n {}\n );\n\n acc[route.key] = {\n ...rest,\n ...helpers,\n ...emitter.create(route.key),\n dispatch,\n setOptions: (options: object) =>\n setOptions((o) => ({\n ...o,\n [route.key]: { ...o[route.key], ...options },\n })),\n isFocused: () => {\n const state = getState();\n\n if (state.routes[state.index].key !== route.key) {\n return false;\n }\n\n // If the current screen is focused, we also need to check if parent navigator is focused\n // This makes sure that we return the focus state in the whole tree, not just this navigator\n return navigation ? navigation.isFocused() : true;\n },\n };\n }\n\n return acc;\n },\n {}\n );\n\n return cache.current;\n}\n","import * as React from 'react';\nimport {\n CommonActions,\n NavigationAction,\n NavigationState,\n ParamListBase,\n Router,\n} from '@react-navigation/routers';\nimport NavigationContext from './NavigationContext';\nimport UnhandledActionContext from './UnhandledActionContext';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport { NavigationHelpers, NavigationProp, PrivateValueStore } from './types';\n\n// This is to make TypeScript compiler happy\n// eslint-disable-next-line babel/no-unused-expressions\nPrivateValueStore;\n\ntype Options<State extends NavigationState, Action extends NavigationAction> = {\n onAction: (\n action: NavigationAction,\n visitedNavigators?: Set<string>\n ) => boolean;\n getState: () => State;\n emitter: NavigationEventEmitter<any>;\n router: Router<State, Action>;\n};\n\n/**\n * Navigation object with helper methods to be used by a navigator.\n * This object includes methods for common actions as well as methods the parent screen's navigation object.\n */\nexport default function useNavigationHelpers<\n State extends NavigationState,\n ActionHelpers extends Record<string, () => void>,\n Action extends NavigationAction,\n EventMap extends Record<string, any>\n>({ onAction, getState, emitter, router }: Options<State, Action>) {\n const onUnhandledAction = React.useContext(UnhandledActionContext);\n const parentNavigationHelpers = React.useContext(NavigationContext);\n\n return React.useMemo(() => {\n const dispatch = (op: Action | ((state: State) => Action)) => {\n const action = typeof op === 'function' ? op(getState()) : op;\n\n const handled = onAction(action);\n\n if (!handled) {\n onUnhandledAction?.(action);\n }\n };\n\n const actions = {\n ...router.actionCreators,\n ...CommonActions,\n };\n\n const helpers = Object.keys(actions).reduce<Record<string, () => void>>(\n (acc, name) => {\n // @ts-expect-error: name is a valid key, but TypeScript is dumb\n acc[name] = (...args: any) => dispatch(actions[name](...args));\n return acc;\n },\n {}\n );\n\n return {\n ...parentNavigationHelpers,\n ...helpers,\n dispatch,\n emit: emitter.emit,\n isFocused: parentNavigationHelpers\n ? parentNavigationHelpers.isFocused\n : () => true,\n canGoBack: () => {\n const state = getState();\n\n return (\n router.getStateForAction(state, CommonActions.goBack() as Action, {\n routeNames: state.routeNames,\n routeParamList: {},\n routeGetIdList: {},\n }) !== null ||\n parentNavigationHelpers?.canGoBack() ||\n false\n );\n },\n dangerouslyGetParent: () => parentNavigationHelpers as any,\n dangerouslyGetState: getState,\n } as NavigationHelpers<ParamListBase, EventMap> &\n (NavigationProp<ParamListBase, string, any, any, any> | undefined) &\n ActionHelpers;\n }, [\n emitter.emit,\n getState,\n onAction,\n onUnhandledAction,\n parentNavigationHelpers,\n router,\n ]);\n}\n","import * as React from 'react';\nimport type {\n NavigationState,\n NavigationAction,\n} from '@react-navigation/routers';\nimport NavigationBuilderContext, {\n ChildBeforeRemoveListener,\n} from './NavigationBuilderContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport type { EventMapCore } from './types';\n\ntype Options = {\n getState: () => NavigationState;\n emitter: NavigationEventEmitter<EventMapCore<any>>;\n beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;\n};\n\nconst VISITED_ROUTE_KEYS = Symbol('VISITED_ROUTE_KEYS');\n\nexport const shouldPreventRemove = (\n emitter: NavigationEventEmitter<EventMapCore<any>>,\n beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>,\n currentRoutes: { key: string }[],\n nextRoutes: { key?: string | undefined }[],\n action: NavigationAction\n) => {\n const nextRouteKeys = nextRoutes.map((route) => route.key);\n\n // Call these in reverse order so last screens handle the event first\n const removedRoutes = currentRoutes\n .filter((route) => !nextRouteKeys.includes(route.key))\n .reverse();\n\n const visitedRouteKeys: Set<string> =\n // @ts-expect-error: add this property to mark that we've already emitted this action\n action[VISITED_ROUTE_KEYS] ?? new Set<string>();\n\n const beforeRemoveAction = {\n ...action,\n [VISITED_ROUTE_KEYS]: visitedRouteKeys,\n };\n\n for (const route of removedRoutes) {\n if (visitedRouteKeys.has(route.key)) {\n // Skip if we've already emitted this action for this screen\n continue;\n }\n\n // First, we need to check if any child screens want to prevent it\n const isPrevented = beforeRemoveListeners[route.key]?.(beforeRemoveAction);\n\n if (isPrevented) {\n return true;\n }\n\n visitedRouteKeys.add(route.key);\n\n const event = emitter.emit({\n type: 'beforeRemove',\n target: route.key,\n data: { action: beforeRemoveAction },\n canPreventDefault: true,\n });\n\n if (event.defaultPrevented) {\n return true;\n }\n }\n\n return false;\n};\n\nexport default function useOnPreventRemove({\n getState,\n emitter,\n beforeRemoveListeners,\n}: Options) {\n const { addKeyedListener } = React.useContext(NavigationBuilderContext);\n const route = React.useContext(NavigationRouteContext);\n const routeKey = route?.key;\n\n React.useEffect(() => {\n if (routeKey) {\n return addKeyedListener?.('beforeRemove', routeKey, (action) => {\n const state = getState();\n\n return shouldPreventRemove(\n emitter,\n beforeRemoveListeners,\n state.routes,\n [],\n action\n );\n });\n }\n }, [addKeyedListener, beforeRemoveListeners, emitter, getState, routeKey]);\n}\n","import * as React from 'react';\nimport type {\n NavigationAction,\n NavigationState,\n PartialState,\n Router,\n RouterConfigOptions,\n} from '@react-navigation/routers';\nimport NavigationBuilderContext, {\n ChildActionListener,\n ChildBeforeRemoveListener,\n} from './NavigationBuilderContext';\nimport useOnPreventRemove, { shouldPreventRemove } from './useOnPreventRemove';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport type { EventMapCore } from './types';\n\ntype Options = {\n router: Router<NavigationState, NavigationAction>;\n key?: string;\n getState: () => NavigationState;\n setState: (state: NavigationState | PartialState<NavigationState>) => void;\n actionListeners: ChildActionListener[];\n beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;\n routerConfigOptions: RouterConfigOptions;\n emitter: NavigationEventEmitter<EventMapCore<any>>;\n};\n\n/**\n * Hook to handle actions for a navigator, including state updates and bubbling.\n *\n * Bubbling an action is achieved in 2 ways:\n * 1. To bubble action to parent, we expose the action handler in context and then access the parent context\n * 2. To bubble action to child, child adds event listeners subscribing to actions from parent\n *\n * When the action handler handles as action, it returns `true`, otherwise `false`.\n */\nexport default function useOnAction({\n router,\n getState,\n setState,\n key,\n actionListeners,\n beforeRemoveListeners,\n routerConfigOptions,\n emitter,\n}: Options) {\n const {\n onAction: onActionParent,\n onRouteFocus: onRouteFocusParent,\n addListener: addListenerParent,\n onDispatchAction,\n } = React.useContext(NavigationBuilderContext);\n\n const routerConfigOptionsRef = React.useRef<RouterConfigOptions>(\n routerConfigOptions\n );\n\n React.useEffect(() => {\n routerConfigOptionsRef.current = routerConfigOptions;\n });\n\n const onAction = React.useCallback(\n (\n action: NavigationAction,\n visitedNavigators: Set<string> = new Set<string>()\n ) => {\n const state = getState();\n\n // Since actions can bubble both up and down, they could come to the same navigator again\n // We keep track of navigators which have already tried to handle the action and return if it's already visited\n if (visitedNavigators.has(state.key)) {\n return false;\n }\n\n visitedNavigators.add(state.key);\n\n if (typeof action.target !== 'string' || action.target === state.key) {\n let result = router.getStateForAction(\n state,\n action,\n routerConfigOptionsRef.current\n );\n\n // If a target is specified and set to current navigator, the action shouldn't bubble\n // So instead of `null`, we use the state object for such cases to signal that action was handled\n result =\n result === null && action.target === state.key ? state : result;\n\n if (result !== null) {\n onDispatchAction(action, state === result);\n\n if (state !== result) {\n const isPrevented = shouldPreventRemove(\n emitter,\n beforeRemoveListeners,\n state.routes,\n result.routes,\n action\n );\n\n if (isPrevented) {\n return true;\n }\n\n setState(result);\n }\n\n if (onRouteFocusParent !== undefined) {\n // Some actions such as `NAVIGATE` also want to bring the navigated route to focus in the whole tree\n // This means we need to focus all of the parent navigators of this navigator as well\n const shouldFocus = router.shouldActionChangeFocus(action);\n\n if (shouldFocus && key !== undefined) {\n onRouteFocusParent(key);\n }\n }\n\n return true;\n }\n }\n\n if (onActionParent !== undefined) {\n // Bubble action to the parent if the current navigator didn't handle it\n if (onActionParent(action, visitedNavigators)) {\n return true;\n }\n }\n\n // If the action wasn't handled by current navigator or a parent navigator, let children handle it\n for (let i = actionListeners.length - 1; i >= 0; i--) {\n const listener = actionListeners[i];\n\n if (listener(action, visitedNavigators)) {\n return true;\n }\n }\n\n return false;\n },\n [\n actionListeners,\n beforeRemoveListeners,\n emitter,\n getState,\n key,\n onActionParent,\n onDispatchAction,\n onRouteFocusParent,\n router,\n setState,\n ]\n );\n\n useOnPreventRemove({\n getState,\n emitter,\n beforeRemoveListeners,\n });\n\n React.useEffect(() => addListenerParent?.('action', onAction), [\n addListenerParent,\n onAction,\n ]);\n\n return onAction;\n}\n","/**\n * Compare two arrays with primitive values as the content.\n * We need to make sure that both values and order match.\n */\nexport default function isArrayEqual(a: any[], b: any[]) {\n return a.length === b.length && a.every((it, index) => it === b[index]);\n}\n","import * as React from 'react';\nimport { isValidElementType } from 'react-is';\nimport {\n CommonActions,\n DefaultRouterOptions,\n NavigationState,\n ParamListBase,\n Router,\n RouterFactory,\n RouterConfigOptions,\n PartialState,\n NavigationAction,\n Route,\n} from '@react-navigation/routers';\nimport NavigationStateContext from './NavigationStateContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport Screen from './Screen';\nimport useEventEmitter from './useEventEmitter';\nimport useRegisterNavigator from './useRegisterNavigator';\nimport useDescriptors from './useDescriptors';\nimport useNavigationHelpers from './useNavigationHelpers';\nimport useOnAction from './useOnAction';\nimport useFocusEvents from './useFocusEvents';\nimport useOnRouteFocus from './useOnRouteFocus';\nimport useChildListeners from './useChildListeners';\nimport useFocusedListenersChildrenAdapter from './useFocusedListenersChildrenAdapter';\nimport useKeyedChildListeners from './useKeyedChildListeners';\nimport useOnGetState from './useOnGetState';\nimport useScheduleUpdate from './useScheduleUpdate';\nimport useCurrentRender from './useCurrentRender';\nimport isArrayEqual from './isArrayEqual';\nimport {\n DefaultNavigatorOptions,\n RouteConfig,\n PrivateValueStore,\n EventMapBase,\n EventMapCore,\n NavigatorScreenParams,\n} from './types';\n\n// This is to make TypeScript compiler happy\n// eslint-disable-next-line babel/no-unused-expressions\nPrivateValueStore;\n\ntype NavigatorRoute<State extends NavigationState> = {\n key: string;\n params?: NavigatorScreenParams<ParamListBase, State>;\n};\n\n/**\n * Extract route config object from React children elements.\n *\n * @param children React Elements to extract the config from.\n */\nconst getRouteConfigsFromChildren = <\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n>(\n children: React.ReactNode\n) => {\n const configs = React.Children.toArray(children).reduce<\n RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>[]\n >((acc, child) => {\n if (React.isValidElement(child)) {\n if (child.type === Screen) {\n // We can only extract the config from `Screen` elements\n // If something else was rendered, it's probably a bug\n acc.push(\n child.props as RouteConfig<\n ParamListBase,\n string,\n State,\n ScreenOptions,\n EventMap\n >\n );\n return acc;\n }\n\n if (child.type === React.Fragment) {\n // When we encounter a fragment, we need to dive into its children to extract the configs\n // This is handy to conditionally define a group of screens\n acc.push(\n ...getRouteConfigsFromChildren<State, ScreenOptions, EventMap>(\n child.props.children\n )\n );\n return acc;\n }\n }\n\n throw new Error(\n `A navigator can only contain 'Screen' components as its direct children (found ${\n React.isValidElement(child)\n ? `'${\n typeof child.type === 'string' ? child.type : child.type?.name\n }'${\n child.props?.name ? ` for the screen '${child.props.name}'` : ''\n }`\n : typeof child === 'object'\n ? JSON.stringify(child)\n : `'${String(child)}'`\n }). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.`\n );\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n configs.forEach((config) => {\n const { name, children, component, getComponent } = config;\n\n if (typeof name !== 'string' || !name) {\n throw new Error(\n `Got an invalid name (${JSON.stringify(\n name\n )}) for the screen. It must be a non-empty string.`\n );\n }\n\n if (\n children != null ||\n component !== undefined ||\n getComponent !== undefined\n ) {\n if (children != null && component !== undefined) {\n throw new Error(\n `Got both 'component' and 'children' props for the screen '${name}'. You must pass only one of them.`\n );\n }\n\n if (children != null && getComponent !== undefined) {\n throw new Error(\n `Got both 'getComponent' and 'children' props for the screen '${name}'. You must pass only one of them.`\n );\n }\n\n if (component !== undefined && getComponent !== undefined) {\n throw new Error(\n `Got both 'component' and 'getComponent' props for the screen '${name}'. You must pass only one of them.`\n );\n }\n\n if (children != null && typeof children !== 'function') {\n throw new Error(\n `Got an invalid value for 'children' prop for the screen '${name}'. It must be a function returning a React Element.`\n );\n }\n\n if (component !== undefined && !isValidElementType(component)) {\n throw new Error(\n `Got an invalid value for 'component' prop for the screen '${name}'. It must be a valid React Component.`\n );\n }\n\n if (getComponent !== undefined && typeof getComponent !== 'function') {\n throw new Error(\n `Got an invalid value for 'getComponent' prop for the screen '${name}'. It must be a function returning a React Component.`\n );\n }\n\n if (typeof component === 'function' && component.name === 'component') {\n // Inline anonymous functions passed in the `component` prop will have the name of the prop\n // It's relatively safe to assume that it's not a component since it should also have PascalCase name\n // We won't catch all scenarios here, but this should catch a good chunk of incorrect use.\n console.warn(\n `Looks like you're passing an inline function for 'component' prop for the screen '${name}' (e.g. component={() => <SomeComponent />}). Passing an inline function will cause the component state to be lost on re-render and cause perf issues since it's re-created every render. You can pass the function as children to 'Screen' instead to achieve the desired behaviour.`\n );\n }\n } else {\n throw new Error(\n `Couldn't find a 'component', 'getComponent' or 'children' prop for the screen '${name}'. This can happen if you passed 'undefined'. You likely forgot to export your component from the file it's defined in, or mixed up default import and named import when importing.`\n );\n }\n });\n }\n\n return configs;\n};\n\n/**\n * Hook for building navigators.\n *\n * @param createRouter Factory method which returns router object.\n * @param options Options object containing `children` and additional options for the router.\n * @returns An object containing `state`, `navigation`, `descriptors` objects.\n */\nexport default function useNavigationBuilder<\n State extends NavigationState,\n RouterOptions extends DefaultRouterOptions,\n ActionHelpers extends Record<string, () => void>,\n ScreenOptions extends {},\n EventMap extends Record<string, any>\n>(\n createRouter: RouterFactory<State, any, RouterOptions>,\n options: DefaultNavigatorOptions<ScreenOptions> & RouterOptions\n) {\n const navigatorKey = useRegisterNavigator();\n\n const route = React.useContext(NavigationRouteContext) as\n | NavigatorRoute<State>\n | undefined;\n\n const { children, ...rest } = options;\n const { current: router } = React.useRef<Router<State, any>>(\n createRouter({\n ...((rest as unknown) as RouterOptions),\n ...(route?.params &&\n route.params.state == null &&\n route.params.initial !== false &&\n typeof route.params.screen === 'string'\n ? { initialRouteName: route.params.screen }\n : null),\n })\n );\n\n const routeConfigs = getRouteConfigsFromChildren<\n State,\n ScreenOptions,\n EventMap\n >(children);\n\n const screens = routeConfigs.reduce<\n Record<\n string,\n RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>\n >\n >((acc, config) => {\n if (config.name in acc) {\n throw new Error(\n `A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.name}')`\n );\n }\n\n acc[config.name] = config;\n return acc;\n }, {});\n\n const routeNames = routeConfigs.map((config) => config.name);\n const routeParamList = routeNames.reduce<Record<string, object | undefined>>(\n (acc, curr) => {\n const { initialParams } = screens[curr];\n const initialParamsFromParams =\n route?.params?.state == null &&\n route?.params?.initial !== false &&\n route?.params?.screen === curr\n ? route.params.params\n : undefined;\n\n acc[curr] =\n initialParams !== undefined || initialParamsFromParams !== undefined\n ? {\n ...initialParams,\n ...initialParamsFromParams,\n }\n : undefined;\n\n return acc;\n },\n {}\n );\n const routeGetIdList = routeNames.reduce<\n RouterConfigOptions['routeGetIdList']\n >(\n (acc, curr) =>\n Object.assign(acc, {\n [curr]: screens[curr].getId,\n }),\n {}\n );\n\n if (!routeNames.length) {\n throw new Error(\n \"Couldn't find any screens for the navigator. Have you defined any screens as its children?\"\n );\n }\n\n const isStateValid = React.useCallback(\n (state) => state.type === undefined || state.type === router.type,\n [router.type]\n );\n\n const isStateInitialized = React.useCallback(\n (state) =>\n state !== undefined && state.stale === false && isStateValid(state),\n [isStateValid]\n );\n\n const {\n state: currentState,\n getState: getCurrentState,\n setState,\n setKey,\n getKey,\n getIsInitial,\n } = React.useContext(NavigationStateContext);\n\n const [initializedState, isFirstStateInitialization] = React.useMemo(() => {\n // If the current state isn't initialized on first render, we initialize it\n // We also need to re-initialize it if the state passed from parent was changed (maybe due to reset)\n // Otherwise assume that the state was provided as initial state\n // So we need to rehydrate it to make it usable\n if (\n (currentState === undefined || !isStateValid(currentState)) &&\n route?.params?.state == null\n ) {\n return [\n router.getInitialState({\n routeNames,\n routeParamList,\n routeGetIdList,\n }),\n true,\n ];\n } else {\n return [\n router.getRehydratedState(\n route?.params?.state ?? (currentState as PartialState<State>),\n {\n routeNames,\n routeParamList,\n routeGetIdList,\n }\n ),\n false,\n ];\n }\n // We explicitly don't include routeNames/routeParamList in the dep list\n // below. We want to avoid forcing a new state to be calculated in cases\n // where routeConfigs change without affecting routeNames/routeParamList.\n // Instead, we handle changes to these in the nextState code below. Note\n // that some changes to routeConfigs are explicitly ignored, such as changes\n // to initialParams\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentState, router, isStateValid]);\n\n let state =\n // If the state isn't initialized, or stale, use the state we initialized instead\n // The state won't update until there's a change needed in the state we have initalized locally\n // So it'll be `undefined` or stale until the first navigation event happens\n isStateInitialized(currentState)\n ? (currentState as State)\n : (initializedState as State);\n\n let nextState: State = state;\n\n if (!isArrayEqual(state.routeNames, routeNames)) {\n // When the list of route names change, the router should handle it to remove invalid routes\n nextState = router.getStateForRouteNamesChange(state, {\n routeNames,\n routeParamList,\n routeGetIdList,\n });\n }\n\n const previousNestedParamsRef = React.useRef(route?.params);\n\n React.useEffect(() => {\n previousNestedParamsRef.current = route?.params;\n }, [route?.params]);\n\n if (route?.params) {\n const previousParams = previousNestedParamsRef.current;\n\n let action: CommonActions.Action | undefined;\n\n if (\n typeof route.params.state === 'object' &&\n route.params.state != null &&\n route.params.state !== previousParams?.state\n ) {\n // If the route was updated with new state, we should reset to it\n action = CommonActions.reset(route.params.state);\n } else if (\n typeof route.params.screen === 'string' &&\n ((route.params.initial === false && isFirstStateInitialization) ||\n route.params !== previousParams)\n ) {\n // FIXME: Since params are merged, `route.params.params` might contain params from an older route\n // If the route was updated with new screen name and/or params, we should navigate there\n action = CommonActions.navigate(route.params.screen, route.params.params);\n }\n\n // The update should be limited to current navigator only, so we call the router manually\n const updatedState = action\n ? router.getStateForAction(nextState, action, {\n routeNames,\n routeParamList,\n routeGetIdList,\n })\n : null;\n\n nextState =\n updatedState !== null\n ? router.getRehydratedState(updatedState, {\n routeNames,\n routeParamList,\n routeGetIdList,\n })\n : nextState;\n }\n\n const shouldUpdate = state !== nextState;\n\n useScheduleUpdate(() => {\n if (shouldUpdate) {\n // If the state needs to be updated, we'll schedule an update\n setState(nextState);\n }\n });\n\n // The up-to-date state will come in next render, but we don't need to wait for it\n // We can't use the outdated state since the screens have changed, which will cause error due to mismatched config\n // So we override the state object we return to use the latest state as soon as possible\n state = nextState;\n\n React.useEffect(() => {\n setKey(navigatorKey);\n\n if (!getIsInitial()) {\n // If it's not initial render, we need to update the state\n // This will make sure that our container gets notifier of state changes due to new mounts\n // This is necessary for proper screen tracking, URL updates etc.\n setState(nextState);\n }\n\n return () => {\n // We need to clean up state for this navigator on unmount\n // We do it in a timeout because we need to detect if another navigator mounted in the meantime\n // For example, if another navigator has started rendering, we should skip cleanup\n // Otherwise, our cleanup step will cleanup state for the other navigator and re-initialize it\n setTimeout(() => {\n if (getCurrentState() !== undefined && getKey() === navigatorKey) {\n setState(undefined);\n }\n }, 0);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // We initialize this ref here to avoid a new getState getting initialized\n // whenever initializedState changes. We want getState to have access to the\n // latest initializedState, but don't need it to change when that happens\n const initializedStateRef = React.useRef<State>();\n initializedStateRef.current = initializedState;\n\n const getState = React.useCallback((): State => {\n const currentState = getCurrentState();\n\n return isStateInitialized(currentState)\n ? (currentState as State)\n : (initializedStateRef.current as State);\n }, [getCurrentState, isStateInitialized]);\n\n const emitter = useEventEmitter<EventMapCore<State>>((e) => {\n let routeNames = [];\n\n let route: Route<string> | undefined;\n\n if (e.target) {\n route = state.routes.find((route) => route.key === e.target);\n\n if (route?.name) {\n routeNames.push(route.name);\n }\n } else {\n route = state.routes[state.index];\n routeNames.push(\n ...Object.keys(screens).filter((name) => route?.name === name)\n );\n }\n\n if (route == null) {\n return;\n }\n\n const navigation = descriptors[route.key].navigation;\n\n const listeners = ([] as (((e: any) => void) | undefined)[])\n .concat(\n ...routeNames.map((name) => {\n const { listeners } = screens[name];\n const map =\n typeof listeners === 'function'\n ? listeners({ route: route as any, navigation })\n : listeners;\n\n return map\n ? Object.keys(map)\n .filter((type) => type === e.type)\n .map((type) => map?.[type])\n : undefined;\n })\n )\n .filter((cb, i, self) => cb && self.lastIndexOf(cb) === i);\n\n listeners.forEach((listener) => listener?.(e));\n });\n\n useFocusEvents({ state, emitter });\n\n React.useEffect(() => {\n emitter.emit({ type: 'state', data: { state } });\n }, [emitter, state]);\n\n const { listeners: childListeners, addListener } = useChildListeners();\n\n const { keyedListeners, addKeyedListener } = useKeyedChildListeners();\n\n const onAction = useOnAction({\n router,\n getState,\n setState,\n key: route?.key,\n actionListeners: childListeners.action,\n beforeRemoveListeners: keyedListeners.beforeRemove,\n routerConfigOptions: {\n routeNames,\n routeParamList,\n routeGetIdList,\n },\n emitter,\n });\n\n const onRouteFocus = useOnRouteFocus({\n router,\n key: route?.key,\n getState,\n setState,\n });\n\n const navigation = useNavigationHelpers<\n State,\n ActionHelpers,\n NavigationAction,\n EventMap\n >({\n onAction,\n getState,\n emitter,\n router,\n });\n\n useFocusedListenersChildrenAdapter({\n navigation,\n focusedListeners: childListeners.focus,\n });\n\n useOnGetState({\n getState,\n getStateListeners: keyedListeners.getState,\n });\n\n const descriptors = useDescriptors<State, ScreenOptions, EventMap>({\n state,\n screens,\n navigation,\n screenOptions: options.screenOptions,\n onAction,\n getState,\n setState,\n onRouteFocus,\n addListener,\n addKeyedListener,\n router,\n emitter,\n });\n\n useCurrentRender({\n state,\n navigation,\n descriptors,\n });\n\n return {\n state,\n navigation,\n descriptors,\n };\n}\n","import * as React from 'react';\nimport { nanoid } from 'nanoid/non-secure';\nimport { SingleNavigatorContext } from './EnsureSingleNavigator';\n\n/**\n * Register a navigator in the parent context (either a navigation container or a screen).\n * This is used to prevent multiple navigators under a single container or screen.\n */\nexport default function useRegisterNavigator() {\n const [key] = React.useState(() => nanoid());\n const container = React.useContext(SingleNavigatorContext);\n\n if (container === undefined) {\n throw new Error(\n \"Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?\"\n );\n }\n\n React.useEffect(() => {\n const { register, unregister } = container;\n\n register(key);\n\n return () => unregister(key);\n }, [container, key]);\n\n return key;\n}\n","import * as React from 'react';\nimport type { NavigationState } from '@react-navigation/routers';\nimport NavigationContext from './NavigationContext';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport type { EventMapCore } from './types';\n\ntype Options<State extends NavigationState> = {\n state: State;\n emitter: NavigationEventEmitter<EventMapCore<State>>;\n};\n\n/**\n * Hook to take care of emitting `focus` and `blur` events.\n */\nexport default function useFocusEvents<State extends NavigationState>({\n state,\n emitter,\n}: Options<State>) {\n const navigation = React.useContext(NavigationContext);\n const lastFocusedKeyRef = React.useRef<string | undefined>();\n\n const currentFocusedKey = state.routes[state.index].key;\n\n // When the parent screen changes its focus state, we also need to change child's focus\n // Coz the child screen can't be focused if the parent screen is out of focus\n React.useEffect(\n () =>\n navigation?.addListener('focus', () => {\n lastFocusedKeyRef.current = currentFocusedKey;\n emitter.emit({ type: 'focus', target: currentFocusedKey });\n }),\n [currentFocusedKey, emitter, navigation]\n );\n\n React.useEffect(\n () =>\n navigation?.addListener('blur', () => {\n lastFocusedKeyRef.current = undefined;\n emitter.emit({ type: 'blur', target: currentFocusedKey });\n }),\n [currentFocusedKey, emitter, navigation]\n );\n\n React.useEffect(() => {\n const lastFocusedKey = lastFocusedKeyRef.current;\n\n lastFocusedKeyRef.current = currentFocusedKey;\n\n // We wouldn't have `lastFocusedKey` on initial mount\n // Fire focus event for the current route on mount if there's no parent navigator\n if (lastFocusedKey === undefined && !navigation) {\n emitter.emit({ type: 'focus', target: currentFocusedKey });\n }\n\n // We should only emit events when the focused key changed and navigator is focused\n // When navigator is not focused, screens inside shouldn't receive focused status either\n if (\n lastFocusedKey === currentFocusedKey ||\n !(navigation ? navigation.isFocused() : true)\n ) {\n return;\n }\n\n if (lastFocusedKey === undefined) {\n // Only fire events after initial mount\n return;\n }\n\n emitter.emit({ type: 'blur', target: lastFocusedKey });\n emitter.emit({ type: 'focus', target: currentFocusedKey });\n }, [currentFocusedKey, emitter, navigation]);\n}\n","import * as React from 'react';\nimport type {\n NavigationAction,\n NavigationState,\n Router,\n} from '@react-navigation/routers';\nimport NavigationBuilderContext from './NavigationBuilderContext';\n\ntype Options<Action extends NavigationAction> = {\n router: Router<NavigationState, Action>;\n getState: () => NavigationState;\n setState: (state: NavigationState) => void;\n key?: string;\n};\n\n/**\n * Hook to handle focus actions for a route.\n * Focus action needs to be treated specially, coz when a nested route is focused,\n * the parent navigators also needs to be focused.\n */\nexport default function useOnRouteFocus<Action extends NavigationAction>({\n router,\n getState,\n key: sourceRouteKey,\n setState,\n}: Options<Action>) {\n const { onRouteFocus: onRouteFocusParent } = React.useContext(\n NavigationBuilderContext\n );\n\n return React.useCallback(\n (key: string) => {\n const state = getState();\n const result = router.getStateForRouteFocus(state, key);\n\n if (result !== state) {\n setState(result);\n }\n\n if (onRouteFocusParent !== undefined && sourceRouteKey !== undefined) {\n onRouteFocusParent(sourceRouteKey);\n }\n },\n [getState, onRouteFocusParent, router, setState, sourceRouteKey]\n );\n}\n","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport NavigationBuilderContext, {\n FocusedNavigationCallback,\n FocusedNavigationListener,\n} from './NavigationBuilderContext';\nimport type { NavigationHelpers } from './types';\n\ntype Options = {\n navigation: NavigationHelpers<ParamListBase>;\n focusedListeners: FocusedNavigationListener[];\n};\n\n/**\n * Hook for passing focus callback to children\n */\nexport default function useFocusedListenersChildrenAdapter({\n navigation,\n focusedListeners,\n}: Options) {\n const { addListener } = React.useContext(NavigationBuilderContext);\n\n const listener = React.useCallback(\n (callback: FocusedNavigationCallback<any>) => {\n if (navigation.isFocused()) {\n for (const listener of focusedListeners) {\n const { handled, result } = listener(callback);\n\n if (handled) {\n return { handled, result };\n }\n }\n\n return { handled: true, result: callback(navigation) };\n } else {\n return { handled: false, result: null };\n }\n },\n [focusedListeners, navigation]\n );\n\n React.useEffect(() => addListener?.('focus', listener), [\n addListener,\n listener,\n ]);\n}\n","import * as React from 'react';\nimport type { NavigationState } from '@react-navigation/routers';\nimport NavigationBuilderContext, {\n GetStateListener,\n} from './NavigationBuilderContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport isArrayEqual from './isArrayEqual';\n\ntype Options = {\n getState: () => NavigationState;\n getStateListeners: Record<string, GetStateListener | undefined>;\n};\n\nexport default function useOnGetState({\n getState,\n getStateListeners,\n}: Options) {\n const { addKeyedListener } = React.useContext(NavigationBuilderContext);\n const route = React.useContext(NavigationRouteContext);\n const key = route ? route.key : 'root';\n\n const getRehydratedState = React.useCallback(() => {\n const state = getState();\n\n // Avoid returning new route objects if we don't need to\n const routes = state.routes.map((route) => {\n const childState = getStateListeners[route.key]?.();\n\n if (route.state === childState) {\n return route;\n }\n\n return { ...route, state: childState };\n });\n\n if (isArrayEqual(state.routes, routes)) {\n return state;\n }\n\n return { ...state, routes };\n }, [getState, getStateListeners]);\n\n React.useEffect(() => {\n return addKeyedListener?.('getState', key, getRehydratedState);\n }, [addKeyedListener, getRehydratedState, key]);\n}\n","import * as React from 'react';\nimport type { NavigationState, ParamListBase } from '@react-navigation/routers';\nimport CurrentRenderContext from './CurrentRenderContext';\nimport type { Descriptor, NavigationHelpers } from './types';\n\ntype Options = {\n state: NavigationState;\n navigation: NavigationHelpers<ParamListBase>;\n descriptors: {\n [key: string]: Descriptor<ParamListBase, string, NavigationState, object>;\n };\n};\n\n/**\n * Write the current options, so that server renderer can get current values\n * Mutating values like this is not safe in async mode, but it doesn't apply to SSR\n */\nexport default function useCurrentRender({\n state,\n navigation,\n descriptors,\n}: Options) {\n const current = React.useContext(CurrentRenderContext);\n\n if (current && navigation.isFocused()) {\n current.options = descriptors[state.routes[state.index].key].options;\n }\n}\n","import * as React from 'react';\nimport type { LinkingOptions } from './types';\n\nconst LinkingContext = React.createContext<{\n options: LinkingOptions | undefined;\n}>({ options: undefined });\n\nLinkingContext.displayName = 'LinkingContext';\n\nexport default LinkingContext;\n","import * as React from 'react';\nimport {\n BaseNavigationContainer,\n NavigationContainerProps,\n NavigationContainerRef,\n} from '@react-navigation/core';\nimport ThemeProvider from './theming/ThemeProvider';\nimport DefaultTheme from './theming/DefaultTheme';\nimport LinkingContext from './LinkingContext';\nimport useThenable from './useThenable';\nimport useLinking from './useLinking';\nimport useDocumentTitle from './useDocumentTitle';\nimport useBackButton from './useBackButton';\nimport type { Theme, LinkingOptions, DocumentTitleOptions } from './types';\n\ntype Props = NavigationContainerProps & {\n theme?: Theme;\n linking?: LinkingOptions;\n fallback?: React.ReactNode;\n documentTitle?: DocumentTitleOptions;\n onReady?: () => void;\n};\n\n/**\n * Container component which holds the navigation state designed for React Native apps.\n * This should be rendered at the root wrapping the whole app.\n *\n * @param props.initialState Initial state object for the navigation tree. When deep link handling is enabled, this will override deep links when specified. Make sure that you don't specify an `initialState` when there's a deep link (`Linking.getInitialURL()`).\n * @param props.onReady Callback which is called after the navigation tree mounts.\n * @param props.onStateChange Callback which is called with the latest navigation state when it changes.\n * @param props.theme Theme object for the navigators.\n * @param props.linking Options for deep linking. Deep link handling is enabled when this prop is provided, unless `linking.enabled` is `false`.\n * @param props.fallback Fallback component to render until we have finished getting initial state when linking is enabled. Defaults to `null`.\n * @param props.documentTitle Options to configure the document title on Web. Updating document title is handled by default unless `documentTitle.enabled` is `false`.\n * @param props.children Child elements to render the content.\n * @param props.ref Ref object which refers to the navigation object containing helper methods.\n */\nconst NavigationContainer = React.forwardRef(function NavigationContainer(\n {\n theme = DefaultTheme,\n linking,\n fallback = null,\n documentTitle,\n onReady,\n ...rest\n }: Props,\n ref?: React.Ref<NavigationContainerRef | null>\n) {\n const isLinkingEnabled = linking ? linking.enabled !== false : false;\n\n const refContainer = React.useRef<NavigationContainerRef>(null);\n\n useBackButton(refContainer);\n useDocumentTitle(refContainer, documentTitle);\n\n const { getInitialState } = useLinking(refContainer, {\n enabled: isLinkingEnabled,\n prefixes: [],\n ...linking,\n });\n\n const [isResolved, initialState] = useThenable(getInitialState);\n\n React.useImperativeHandle(ref, () => refContainer.current);\n\n const linkingContext = React.useMemo(() => ({ options: linking }), [linking]);\n\n const isReady = rest.initialState != null || !isLinkingEnabled || isResolved;\n\n const onReadyRef = React.useRef(onReady);\n\n React.useEffect(() => {\n onReadyRef.current = onReady;\n });\n\n React.useEffect(() => {\n if (isReady) {\n onReadyRef.current?.();\n }\n }, [isReady]);\n\n if (!isReady) {\n // This is temporary until we have Suspense for data-fetching\n // Then the fallback will be handled by a parent `Suspense` component\n return fallback as React.ReactElement;\n }\n\n return (\n <LinkingContext.Provider value={linkingContext}>\n <ThemeProvider value={theme}>\n <BaseNavigationContainer\n {...rest}\n initialState={\n rest.initialState == null ? initialState : rest.initialState\n }\n ref={refContainer}\n />\n </ThemeProvider>\n </LinkingContext.Provider>\n );\n});\n\nexport default NavigationContainer;\n","import * as React from 'react';\nimport type { NavigationContainerRef } from '@react-navigation/core';\nimport type { DocumentTitleOptions } from './types';\n\n/**\n * Set the document title for the active screen\n */\nexport default function useDocumentTitle(\n ref: React.RefObject<NavigationContainerRef>,\n {\n enabled = true,\n formatter = (options, route) => options?.title ?? route?.name,\n }: DocumentTitleOptions = {}\n) {\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n\n const navigation = ref.current;\n\n if (navigation) {\n const title = formatter(\n navigation.getCurrentOptions(),\n navigation.getCurrentRoute()\n );\n\n document.title = title;\n }\n\n return navigation?.addListener('options', (e) => {\n const title = formatter(e.data.options, navigation?.getCurrentRoute());\n\n document.title = title;\n });\n });\n}\n","import * as React from 'react';\n\nexport default function useThenable<T>(create: () => PromiseLike<T>) {\n const [promise] = React.useState(create);\n\n let initialState: [boolean, T | undefined] = [false, undefined];\n\n // Check if our thenable is synchronous\n promise.then((result) => {\n initialState = [true, result];\n });\n\n const [state, setState] = React.useState(initialState);\n const [resolved] = state;\n\n React.useEffect(() => {\n let cancelled = false;\n\n const resolve = async () => {\n let result;\n\n try {\n result = await promise;\n } finally {\n if (!cancelled) {\n setState([true, result]);\n }\n }\n };\n\n if (!resolved) {\n resolve();\n }\n\n return () => {\n cancelled = true;\n };\n }, [promise, resolved]);\n\n return state;\n}\n","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\nvar rtlDetect = require('./lib/rtl-detect');\n\nmodule.exports = {\n\n isRtlLang: rtlDetect.isRtlLang,\n\n getLangDir: rtlDetect.getLangDir\n\n};\n","'use strict';\nvar isObj = require('is-obj');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Sources cannot be null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction assignKey(to, from, key) {\n\tvar val = from[key];\n\n\tif (val === undefined || val === null) {\n\t\treturn;\n\t}\n\n\tif (hasOwnProperty.call(to, key)) {\n\t\tif (to[key] === undefined || to[key] === null) {\n\t\t\tthrow new TypeError('Cannot convert undefined or null to object (' + key + ')');\n\t\t}\n\t}\n\n\tif (!hasOwnProperty.call(to, key) || !isObj(val)) {\n\t\tto[key] = val;\n\t} else {\n\t\tto[key] = assign(Object(to[key]), from[key]);\n\t}\n}\n\nfunction assign(to, from) {\n\tif (to === from) {\n\t\treturn to;\n\t}\n\n\tfrom = Object(from);\n\n\tfor (var key in from) {\n\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\tassignKey(to, from, key);\n\t\t}\n\t}\n\n\tif (Object.getOwnPropertySymbols) {\n\t\tvar symbols = Object.getOwnPropertySymbols(from);\n\n\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\tassignKey(to, from, symbols[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n}\n\nmodule.exports = function deepAssign(target) {\n\ttarget = toObject(target);\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tassign(target, arguments[s]);\n\t}\n\n\treturn target;\n};\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPrefixer;\n\nvar _prefixProperty = require('./utils/prefixProperty');\n\nvar _prefixProperty2 = _interopRequireDefault(_prefixProperty);\n\nvar _prefixValue = require('./utils/prefixValue');\n\nvar _prefixValue2 = _interopRequireDefault(_prefixValue);\n\nvar _addNewValuesOnly = require('./utils/addNewValuesOnly');\n\nvar _addNewValuesOnly2 = _interopRequireDefault(_addNewValuesOnly);\n\nvar _isObject = require('./utils/isObject');\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createPrefixer(_ref) {\n var prefixMap = _ref.prefixMap,\n plugins = _ref.plugins;\n\n return function prefix(style) {\n for (var property in style) {\n var value = style[property];\n\n // handle nested objects\n if ((0, _isObject2.default)(value)) {\n style[property] = prefix(value);\n // handle array values\n } else if (Array.isArray(value)) {\n var combinedValue = [];\n\n for (var i = 0, len = value.length; i < len; ++i) {\n var processedValue = (0, _prefixValue2.default)(plugins, property, value[i], style, prefixMap);\n (0, _addNewValuesOnly2.default)(combinedValue, processedValue || value[i]);\n }\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (combinedValue.length > 0) {\n style[property] = combinedValue;\n }\n } else {\n var _processedValue = (0, _prefixValue2.default)(plugins, property, value, style, prefixMap);\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (_processedValue) {\n style[property] = _processedValue;\n }\n\n style = (0, _prefixProperty2.default)(prefixMap, property, style);\n }\n }\n\n return style;\n };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = backgroundClip;\n\n// https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip#Browser_compatibility\nfunction backgroundClip(property, value) {\n if (typeof value === 'string' && value === 'text') {\n return ['-webkit-text', 'text'];\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = crossFade;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#search=cross-fade\nvar prefixes = ['-webkit-', ''];\nfunction crossFade(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('cross-fade(') > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/cross-fade\\(/g, prefix + 'cross-fade(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = cursor;\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar values = {\n 'zoom-in': true,\n 'zoom-out': true,\n grab: true,\n grabbing: true\n};\n\nfunction cursor(property, value) {\n if (property === 'cursor' && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = filter;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#feat=css-filter-function\nvar prefixes = ['-webkit-', ''];\nfunction filter(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('filter(') > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/filter\\(/g, prefix + 'filter(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flex;\nvar values = {\n flex: ['-webkit-box', '-moz-box', '-ms-flexbox', '-webkit-flex', 'flex'],\n 'inline-flex': ['-webkit-inline-box', '-moz-inline-box', '-ms-inline-flexbox', '-webkit-inline-flex', 'inline-flex']\n};\n\nfunction flex(property, value) {\n if (property === 'display' && values.hasOwnProperty(value)) {\n return values[value];\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flexboxIE;\nvar alternativeValues = {\n 'space-around': 'distribute',\n 'space-between': 'justify',\n 'flex-start': 'start',\n 'flex-end': 'end'\n};\nvar alternativeProps = {\n alignContent: 'msFlexLinePack',\n alignSelf: 'msFlexItemAlign',\n alignItems: 'msFlexAlign',\n justifyContent: 'msFlexPack',\n order: 'msFlexOrder',\n flexGrow: 'msFlexPositive',\n flexShrink: 'msFlexNegative',\n flexBasis: 'msFlexPreferredSize'\n // Full expanded syntax is flex-grow | flex-shrink | flex-basis.\n};var flexShorthandMappings = {\n auto: '1 1 auto',\n inherit: 'inherit',\n initial: '0 1 auto',\n none: '0 0 auto',\n unset: 'unset'\n};\nvar isUnitlessNumber = /^\\d+(\\.\\d+)?$/;\n\nfunction flexboxIE(property, value, style) {\n if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) {\n style[alternativeProps[property]] = alternativeValues[value] || value;\n }\n if (property === 'flex') {\n // For certain values we can do straight mappings based on the spec\n // for the expansions.\n if (Object.prototype.hasOwnProperty.call(flexShorthandMappings, value)) {\n style.msFlex = flexShorthandMappings[value];\n return;\n }\n // Here we have no direct mapping, so we favor looking for a\n // unitless positive number as that will be the most common use-case.\n if (isUnitlessNumber.test(value)) {\n style.msFlex = value + ' 1 0%';\n return;\n }\n\n // The next thing we can look for is if there are multiple values.\n var flexValues = value.split(/\\s/);\n // If we only have a single value that wasn't a positive unitless\n // or a pre-mapped value, then we can assume it is a unit value.\n switch (flexValues.length) {\n case 1:\n style.msFlex = '1 1 ' + value;\n return;\n case 2:\n // If we have 2 units, then we expect that the first will\n // always be a unitless number and represents flex-grow.\n // The second unit will represent flex-shrink for a unitless\n // value, or flex-basis otherwise.\n if (isUnitlessNumber.test(flexValues[1])) {\n style.msFlex = flexValues[0] + ' ' + flexValues[1] + ' 0%';\n } else {\n style.msFlex = flexValues[0] + ' 1 ' + flexValues[1];\n }\n return;\n default:\n style.msFlex = value;\n }\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flexboxOld;\nvar alternativeValues = {\n 'space-around': 'justify',\n 'space-between': 'justify',\n 'flex-start': 'start',\n 'flex-end': 'end',\n 'wrap-reverse': 'multiple',\n wrap: 'multiple'\n};\n\nvar alternativeProps = {\n alignItems: 'WebkitBoxAlign',\n justifyContent: 'WebkitBoxPack',\n flexWrap: 'WebkitBoxLines',\n flexGrow: 'WebkitBoxFlex'\n};\n\nfunction flexboxOld(property, value, style) {\n if (property === 'flexDirection' && typeof value === 'string') {\n if (value.indexOf('column') > -1) {\n style.WebkitBoxOrient = 'vertical';\n } else {\n style.WebkitBoxOrient = 'horizontal';\n }\n if (value.indexOf('reverse') > -1) {\n style.WebkitBoxDirection = 'reverse';\n } else {\n style.WebkitBoxDirection = 'normal';\n }\n }\n if (alternativeProps.hasOwnProperty(property)) {\n style[alternativeProps[property]] = alternativeValues[value] || value;\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = gradient;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;\n\nfunction gradient(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && values.test(value)) {\n return prefixes.map(function (prefix) {\n return value.replace(values, function (grad) {\n return prefix + grad;\n });\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = grid;\nfunction isSimplePositionValue(value) {\n return typeof value === 'number' && !isNaN(value);\n}\n\nfunction isComplexSpanValue(value) {\n return typeof value === 'string' && value.includes('/');\n}\n\nvar alignmentValues = ['center', 'end', 'start', 'stretch'];\n\nvar displayValues = {\n 'inline-grid': ['-ms-inline-grid', 'inline-grid'],\n grid: ['-ms-grid', 'grid']\n};\n\nvar propertyConverters = {\n alignSelf: function alignSelf(value, style) {\n if (alignmentValues.indexOf(value) > -1) {\n style.msGridRowAlign = value;\n }\n },\n\n gridColumn: function gridColumn(value, style) {\n if (isSimplePositionValue(value)) {\n style.msGridColumn = value;\n } else if (isComplexSpanValue(value)) {\n var _value$split = value.split('/'),\n _value$split2 = _slicedToArray(_value$split, 2),\n start = _value$split2[0],\n end = _value$split2[1];\n\n propertyConverters.gridColumnStart(+start, style);\n\n var _end$split = end.split(/ ?span /),\n _end$split2 = _slicedToArray(_end$split, 2),\n maybeSpan = _end$split2[0],\n maybeNumber = _end$split2[1];\n\n if (maybeSpan === '') {\n propertyConverters.gridColumnEnd(+start + +maybeNumber, style);\n } else {\n propertyConverters.gridColumnEnd(+end, style);\n }\n } else {\n propertyConverters.gridColumnStart(value, style);\n }\n },\n\n gridColumnEnd: function gridColumnEnd(value, style) {\n var msGridColumn = style.msGridColumn;\n\n if (isSimplePositionValue(value) && isSimplePositionValue(msGridColumn)) {\n style.msGridColumnSpan = value - msGridColumn;\n }\n },\n\n gridColumnStart: function gridColumnStart(value, style) {\n if (isSimplePositionValue(value)) {\n style.msGridColumn = value;\n }\n },\n\n gridRow: function gridRow(value, style) {\n if (isSimplePositionValue(value)) {\n style.msGridRow = value;\n } else if (isComplexSpanValue(value)) {\n var _value$split3 = value.split('/'),\n _value$split4 = _slicedToArray(_value$split3, 2),\n start = _value$split4[0],\n end = _value$split4[1];\n\n propertyConverters.gridRowStart(+start, style);\n\n var _end$split3 = end.split(/ ?span /),\n _end$split4 = _slicedToArray(_end$split3, 2),\n maybeSpan = _end$split4[0],\n maybeNumber = _end$split4[1];\n\n if (maybeSpan === '') {\n propertyConverters.gridRowEnd(+start + +maybeNumber, style);\n } else {\n propertyConverters.gridRowEnd(+end, style);\n }\n } else {\n propertyConverters.gridRowStart(value, style);\n }\n },\n\n gridRowEnd: function gridRowEnd(value, style) {\n var msGridRow = style.msGridRow;\n\n if (isSimplePositionValue(value) && isSimplePositionValue(msGridRow)) {\n style.msGridRowSpan = value - msGridRow;\n }\n },\n\n gridRowStart: function gridRowStart(value, style) {\n if (isSimplePositionValue(value)) {\n style.msGridRow = value;\n }\n },\n\n gridTemplateColumns: function gridTemplateColumns(value, style) {\n style.msGridColumns = value;\n },\n\n gridTemplateRows: function gridTemplateRows(value, style) {\n style.msGridRows = value;\n },\n\n justifySelf: function justifySelf(value, style) {\n if (alignmentValues.indexOf(value) > -1) {\n style.msGridColumnAlign = value;\n }\n }\n};\n\nfunction grid(property, value, style) {\n if (property === 'display' && value in displayValues) {\n return displayValues[value];\n }\n\n if (property in propertyConverters) {\n var propertyConverter = propertyConverters[property];\n propertyConverter(value, style);\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = imageSet;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#feat=css-image-set\nvar prefixes = ['-webkit-', ''];\nfunction imageSet(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('image-set(') > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/image-set\\(/g, prefix + 'image-set(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = logical;\nvar alternativeProps = {\n marginBlockStart: ['WebkitMarginBefore'],\n marginBlockEnd: ['WebkitMarginAfter'],\n marginInlineStart: ['WebkitMarginStart', 'MozMarginStart'],\n marginInlineEnd: ['WebkitMarginEnd', 'MozMarginEnd'],\n paddingBlockStart: ['WebkitPaddingBefore'],\n paddingBlockEnd: ['WebkitPaddingAfter'],\n paddingInlineStart: ['WebkitPaddingStart', 'MozPaddingStart'],\n paddingInlineEnd: ['WebkitPaddingEnd', 'MozPaddingEnd'],\n borderBlockStart: ['WebkitBorderBefore'],\n borderBlockStartColor: ['WebkitBorderBeforeColor'],\n borderBlockStartStyle: ['WebkitBorderBeforeStyle'],\n borderBlockStartWidth: ['WebkitBorderBeforeWidth'],\n borderBlockEnd: ['WebkitBorderAfter'],\n borderBlockEndColor: ['WebkitBorderAfterColor'],\n borderBlockEndStyle: ['WebkitBorderAfterStyle'],\n borderBlockEndWidth: ['WebkitBorderAfterWidth'],\n borderInlineStart: ['WebkitBorderStart', 'MozBorderStart'],\n borderInlineStartColor: ['WebkitBorderStartColor', 'MozBorderStartColor'],\n borderInlineStartStyle: ['WebkitBorderStartStyle', 'MozBorderStartStyle'],\n borderInlineStartWidth: ['WebkitBorderStartWidth', 'MozBorderStartWidth'],\n borderInlineEnd: ['WebkitBorderEnd', 'MozBorderEnd'],\n borderInlineEndColor: ['WebkitBorderEndColor', 'MozBorderEndColor'],\n borderInlineEndStyle: ['WebkitBorderEndStyle', 'MozBorderEndStyle'],\n borderInlineEndWidth: ['WebkitBorderEndWidth', 'MozBorderEndWidth']\n};\n\nfunction logical(property, value, style) {\n if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) {\n var alternativePropList = alternativeProps[property];\n for (var i = 0, len = alternativePropList.length; i < len; ++i) {\n style[alternativePropList[i]] = value;\n }\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = position;\nfunction position(property, value) {\n if (property === 'position' && value === 'sticky') {\n return ['-webkit-sticky', 'sticky'];\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = sizing;\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar properties = {\n maxHeight: true,\n maxWidth: true,\n width: true,\n height: true,\n columnWidth: true,\n minWidth: true,\n minHeight: true\n};\nvar values = {\n 'min-content': true,\n 'max-content': true,\n 'fill-available': true,\n 'fit-content': true,\n 'contain-floats': true\n};\n\nfunction sizing(property, value) {\n if (properties.hasOwnProperty(property) && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n\nvar _hyphenateProperty = require('css-in-js-utils/lib/hyphenateProperty');\n\nvar _hyphenateProperty2 = _interopRequireDefault(_hyphenateProperty);\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nvar _capitalizeString = require('../utils/capitalizeString');\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar properties = {\n transition: true,\n transitionProperty: true,\n WebkitTransition: true,\n WebkitTransitionProperty: true,\n MozTransition: true,\n MozTransitionProperty: true\n};\n\n\nvar prefixMapping = {\n Webkit: '-webkit-',\n Moz: '-moz-',\n ms: '-ms-'\n};\n\nfunction prefixValue(value, propertyPrefixMap) {\n if ((0, _isPrefixedValue2.default)(value)) {\n return value;\n }\n\n // only split multi values, not cubic beziers\n var multipleValues = value.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g);\n\n for (var i = 0, len = multipleValues.length; i < len; ++i) {\n var singleValue = multipleValues[i];\n var values = [singleValue];\n for (var property in propertyPrefixMap) {\n var dashCaseProperty = (0, _hyphenateProperty2.default)(property);\n\n if (singleValue.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') {\n var prefixes = propertyPrefixMap[property];\n for (var j = 0, pLen = prefixes.length; j < pLen; ++j) {\n // join all prefixes and create a new value\n values.unshift(singleValue.replace(dashCaseProperty, prefixMapping[prefixes[j]] + dashCaseProperty));\n }\n }\n }\n\n multipleValues[i] = values.join(',');\n }\n\n return multipleValues.join(',');\n}\n\nfunction transition(property, value, style, propertyPrefixMap) {\n // also check for already prefixed transitions\n if (typeof value === 'string' && properties.hasOwnProperty(property)) {\n var outputValue = prefixValue(value, propertyPrefixMap);\n // if the property is already prefixed\n var webkitOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-moz-|-ms-/.test(val);\n }).join(',');\n\n if (property.indexOf('Webkit') > -1) {\n return webkitOutput;\n }\n\n var mozOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-webkit-|-ms-/.test(val);\n }).join(',');\n\n if (property.indexOf('Moz') > -1) {\n return mozOutput;\n }\n\n style['Webkit' + (0, _capitalizeString2.default)(property)] = webkitOutput;\n style['Moz' + (0, _capitalizeString2.default)(property)] = mozOutput;\n return outputValue;\n }\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar React = require('react');\nvar factory = require('./factory');\n\nif (typeof React === 'undefined') {\n throw Error(\n 'create-react-class could not find the React object. If you are using script tags, ' +\n 'make sure that React is being loaded before create-react-class.'\n );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n React.Component,\n React.isValidElement,\n ReactNoopUpdateQueue\n);\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';\nexport default TurboModuleRegistry.get('NativeAnimatedTurboModule');","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';\nexport default TurboModuleRegistry.get('NativeAnimatedModule');","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport Animation from './Animation';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\n\nvar DecayAnimation = /*#__PURE__*/function (_Animation) {\n _inheritsLoose(DecayAnimation, _Animation);\n\n function DecayAnimation(config) {\n var _config$deceleration, _config$isInteraction, _config$iterations;\n\n var _this;\n\n _this = _Animation.call(this) || this;\n _this._deceleration = (_config$deceleration = config.deceleration) !== null && _config$deceleration !== void 0 ? _config$deceleration : 0.998;\n _this._velocity = config.velocity;\n _this._useNativeDriver = shouldUseNativeDriver(config);\n _this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !_this._useNativeDriver;\n _this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n return _this;\n }\n\n var _proto = DecayAnimation.prototype;\n\n _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n return {\n type: 'decay',\n deceleration: this._deceleration,\n velocity: this._velocity,\n iterations: this.__iterations\n };\n };\n\n _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n this.__active = true;\n this._lastValue = fromValue;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n this._startTime = Date.now();\n\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n };\n\n _proto.onUpdate = function onUpdate() {\n var now = Date.now();\n var value = this._fromValue + this._velocity / (1 - this._deceleration) * (1 - Math.exp(-(1 - this._deceleration) * (now - this._startTime)));\n\n this._onUpdate(value);\n\n if (Math.abs(this._lastValue - value) < 0.1) {\n this.__debouncedOnEnd({\n finished: true\n });\n\n return;\n }\n\n this._lastValue = value;\n\n if (this.__active) {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n };\n\n _proto.stop = function stop() {\n _Animation.prototype.stop.call(this);\n\n this.__active = false;\n global.cancelAnimationFrame(this._animationFrame);\n\n this.__debouncedOnEnd({\n finished: false\n });\n };\n\n return DecayAnimation;\n}(Animation);\n\nexport default DecayAnimation;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Info = function Info() {\n this.any_blank_count = 0;\n this.any_blank_ms = 0;\n this.any_blank_speed_sum = 0;\n this.mostly_blank_count = 0;\n this.mostly_blank_ms = 0;\n this.pixels_blank = 0;\n this.pixels_sampled = 0;\n this.pixels_scrolled = 0;\n this.total_time_spent = 0;\n this.sample_count = 0;\n};\n\nvar DEBUG = false;\nvar _listeners = [];\nvar _minSampleCount = 10;\n\nvar _sampleRate = DEBUG ? 1 : null;\n/**\n * A helper class for detecting when the maximem fill rate of `VirtualizedList` is exceeded.\n * By default the sampling rate is set to zero and this will do nothing. If you want to collect\n * samples (e.g. to log them), make sure to call `FillRateHelper.setSampleRate(0.0-1.0)`.\n *\n * Listeners and sample rate are global for all `VirtualizedList`s - typical usage will combine with\n * `SceneTracker.getActiveScene` to determine the context of the events.\n */\n\n\nvar FillRateHelper = /*#__PURE__*/function () {\n FillRateHelper.addListener = function addListener(callback) {\n if (_sampleRate === null) {\n console.warn('Call `FillRateHelper.setSampleRate` before `addListener`.');\n }\n\n _listeners.push(callback);\n\n return {\n remove: function remove() {\n _listeners = _listeners.filter(function (listener) {\n return callback !== listener;\n });\n }\n };\n };\n\n FillRateHelper.setSampleRate = function setSampleRate(sampleRate) {\n _sampleRate = sampleRate;\n };\n\n FillRateHelper.setMinSampleCount = function setMinSampleCount(minSampleCount) {\n _minSampleCount = minSampleCount;\n };\n\n function FillRateHelper(getFrameMetrics) {\n this._anyBlankStartTime = null;\n this._enabled = false;\n this._info = new Info();\n this._mostlyBlankStartTime = null;\n this._samplesStartTime = null;\n this._getFrameMetrics = getFrameMetrics;\n this._enabled = (_sampleRate || 0) > Math.random();\n\n this._resetData();\n }\n\n var _proto = FillRateHelper.prototype;\n\n _proto.activate = function activate() {\n if (this._enabled && this._samplesStartTime == null) {\n DEBUG && console.debug('FillRateHelper: activate');\n this._samplesStartTime = global.performance.now();\n }\n };\n\n _proto.deactivateAndFlush = function deactivateAndFlush() {\n if (!this._enabled) {\n return;\n }\n\n var start = this._samplesStartTime; // const for flow\n\n if (start == null) {\n DEBUG && console.debug('FillRateHelper: bail on deactivate with no start time');\n return;\n }\n\n if (this._info.sample_count < _minSampleCount) {\n // Don't bother with under-sampled events.\n this._resetData();\n\n return;\n }\n\n var total_time_spent = global.performance.now() - start;\n\n var info = _objectSpread(_objectSpread({}, this._info), {}, {\n total_time_spent: total_time_spent\n });\n\n if (DEBUG) {\n var derived = {\n avg_blankness: this._info.pixels_blank / this._info.pixels_sampled,\n avg_speed: this._info.pixels_scrolled / (total_time_spent / 1000),\n avg_speed_when_any_blank: this._info.any_blank_speed_sum / this._info.any_blank_count,\n any_blank_per_min: this._info.any_blank_count / (total_time_spent / 1000 / 60),\n any_blank_time_frac: this._info.any_blank_ms / total_time_spent,\n mostly_blank_per_min: this._info.mostly_blank_count / (total_time_spent / 1000 / 60),\n mostly_blank_time_frac: this._info.mostly_blank_ms / total_time_spent\n };\n\n for (var key in derived) {\n derived[key] = Math.round(1000 * derived[key]) / 1000;\n }\n\n console.debug('FillRateHelper deactivateAndFlush: ', {\n derived: derived,\n info: info\n });\n }\n\n _listeners.forEach(function (listener) {\n return listener(info);\n });\n\n this._resetData();\n };\n\n _proto.computeBlankness = function computeBlankness(props, state, scrollMetrics) {\n if (!this._enabled || props.getItemCount(props.data) === 0 || this._samplesStartTime == null) {\n return 0;\n }\n\n var dOffset = scrollMetrics.dOffset,\n offset = scrollMetrics.offset,\n velocity = scrollMetrics.velocity,\n visibleLength = scrollMetrics.visibleLength; // Denominator metrics that we track for all events - most of the time there is no blankness and\n // we want to capture that.\n\n this._info.sample_count++;\n this._info.pixels_sampled += Math.round(visibleLength);\n this._info.pixels_scrolled += Math.round(Math.abs(dOffset));\n var scrollSpeed = Math.round(Math.abs(velocity) * 1000); // px / sec\n // Whether blank now or not, record the elapsed time blank if we were blank last time.\n\n var now = global.performance.now();\n\n if (this._anyBlankStartTime != null) {\n this._info.any_blank_ms += now - this._anyBlankStartTime;\n }\n\n this._anyBlankStartTime = null;\n\n if (this._mostlyBlankStartTime != null) {\n this._info.mostly_blank_ms += now - this._mostlyBlankStartTime;\n }\n\n this._mostlyBlankStartTime = null;\n var blankTop = 0;\n var first = state.first;\n\n var firstFrame = this._getFrameMetrics(first);\n\n while (first <= state.last && (!firstFrame || !firstFrame.inLayout)) {\n firstFrame = this._getFrameMetrics(first);\n first++;\n } // Only count blankTop if we aren't rendering the first item, otherwise we will count the header\n // as blank.\n\n\n if (firstFrame && first > 0) {\n blankTop = Math.min(visibleLength, Math.max(0, firstFrame.offset - offset));\n }\n\n var blankBottom = 0;\n var last = state.last;\n\n var lastFrame = this._getFrameMetrics(last);\n\n while (last >= state.first && (!lastFrame || !lastFrame.inLayout)) {\n lastFrame = this._getFrameMetrics(last);\n last--;\n } // Only count blankBottom if we aren't rendering the last item, otherwise we will count the\n // footer as blank.\n\n\n if (lastFrame && last < props.getItemCount(props.data) - 1) {\n var bottomEdge = lastFrame.offset + lastFrame.length;\n blankBottom = Math.min(visibleLength, Math.max(0, offset + visibleLength - bottomEdge));\n }\n\n var pixels_blank = Math.round(blankTop + blankBottom);\n var blankness = pixels_blank / visibleLength;\n\n if (blankness > 0) {\n this._anyBlankStartTime = now;\n this._info.any_blank_speed_sum += scrollSpeed;\n this._info.any_blank_count++;\n this._info.pixels_blank += pixels_blank;\n\n if (blankness > 0.5) {\n this._mostlyBlankStartTime = now;\n this._info.mostly_blank_count++;\n }\n } else if (scrollSpeed < 0.01 || Math.abs(dOffset) < 1) {\n this.deactivateAndFlush();\n }\n\n return blankness;\n };\n\n _proto.enabled = function enabled() {\n return this._enabled;\n };\n\n _proto._resetData = function _resetData() {\n this._anyBlankStartTime = null;\n this._info = new Info();\n this._mostlyBlankStartTime = null;\n this._samplesStartTime = null;\n };\n\n return FillRateHelper;\n}();\n\nexport default FillRateHelper;","/**\n * @fileOverview Contains definition of the core graph object.\n */\n\n// TODO: need to change storage layer:\n// 1. Be able to get all nodes O(1)\n// 2. Be able to get number of links O(1)\n\n/**\n * @example\n * var graph = require('ngraph.graph')();\n * graph.addNode(1); // graph has one node.\n * graph.addLink(2, 3); // now graph contains three nodes and one link.\n *\n */\nmodule.exports = createGraph;\n\nvar eventify = require('ngraph.events');\n\n/**\n * Creates a new graph\n */\nfunction createGraph(options) {\n // Graph structure is maintained as dictionary of nodes\n // and array of links. Each node has 'links' property which\n // hold all links related to that node. And general links\n // array is used to speed up all links enumeration. This is inefficient\n // in terms of memory, but simplifies coding.\n options = options || {};\n if ('uniqueLinkId' in options) {\n console.warn(\n 'ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\\n' +\n 'Use `multigraph` option instead\\n',\n '\\n',\n 'Note: there is also change in default behavior: From now on each graph\\n'+\n 'is considered to be not a multigraph by default (each edge is unique).'\n );\n\n options.multigraph = options.uniqueLinkId;\n }\n\n // Dear reader, the non-multigraphs do not guarantee that there is only\n // one link for a given pair of node. When this option is set to false\n // we can save some memory and CPU (18% faster for non-multigraph);\n if (options.multigraph === undefined) options.multigraph = false;\n\n if (typeof Map !== 'function') {\n // TODO: Should we polyfill it ourselves? We don't use much operations there..\n throw new Error('ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph');\n } \n\n var nodes = new Map();\n var links = [],\n // Hash of multi-edges. Used to track ids of edges between same nodes\n multiEdges = {},\n suspendEvents = 0,\n\n createLink = options.multigraph ? createUniqueLink : createSingleLink,\n\n // Our graph API provides means to listen to graph changes. Users can subscribe\n // to be notified about changes in the graph by using `on` method. However\n // in some cases they don't use it. To avoid unnecessary memory consumption\n // we will not record graph changes until we have at least one subscriber.\n // Code below supports this optimization.\n //\n // Accumulates all changes made during graph updates.\n // Each change element contains:\n // changeType - one of the strings: 'add', 'remove' or 'update';\n // node - if change is related to node this property is set to changed graph's node;\n // link - if change is related to link this property is set to changed graph's link;\n changes = [],\n recordLinkChange = noop,\n recordNodeChange = noop,\n enterModification = noop,\n exitModification = noop;\n\n // this is our public API:\n var graphPart = {\n /**\n * Adds node to the graph. If node with given id already exists in the graph\n * its data is extended with whatever comes in 'data' argument.\n *\n * @param nodeId the node's identifier. A string or number is preferred.\n * @param [data] additional data for the node being added. If node already\n * exists its data object is augmented with the new one.\n *\n * @return {node} The newly added node or node with given id if it already exists.\n */\n addNode: addNode,\n\n /**\n * Adds a link to the graph. The function always create a new\n * link between two nodes. If one of the nodes does not exists\n * a new node is created.\n *\n * @param fromId link start node id;\n * @param toId link end node id;\n * @param [data] additional data to be set on the new link;\n *\n * @return {link} The newly created link\n */\n addLink: addLink,\n\n /**\n * Removes link from the graph. If link does not exist does nothing.\n *\n * @param link - object returned by addLink() or getLinks() methods.\n *\n * @returns true if link was removed; false otherwise.\n */\n removeLink: removeLink,\n\n /**\n * Removes node with given id from the graph. If node does not exist in the graph\n * does nothing.\n *\n * @param nodeId node's identifier passed to addNode() function.\n *\n * @returns true if node was removed; false otherwise.\n */\n removeNode: removeNode,\n\n /**\n * Gets node with given identifier. If node does not exist undefined value is returned.\n *\n * @param nodeId requested node identifier;\n *\n * @return {node} in with requested identifier or undefined if no such node exists.\n */\n getNode: getNode,\n\n /**\n * Gets number of nodes in this graph.\n *\n * @return number of nodes in the graph.\n */\n getNodeCount: getNodeCount,\n\n /**\n * Gets total number of links in the graph.\n */\n getLinkCount: getLinkCount,\n\n /**\n * Synonym for `getLinkCount()`\n */\n getLinksCount: getLinkCount,\n \n /**\n * Synonym for `getNodeCount()`\n */\n getNodesCount: getNodeCount,\n\n /**\n * Gets all links (inbound and outbound) from the node with given id.\n * If node with given id is not found null is returned.\n *\n * @param nodeId requested node identifier.\n *\n * @return Array of links from and to requested node if such node exists;\n * otherwise null is returned.\n */\n getLinks: getLinks,\n\n /**\n * Invokes callback on each node of the graph.\n *\n * @param {Function(node)} callback Function to be invoked. The function\n * is passed one argument: visited node.\n */\n forEachNode: forEachNode,\n\n /**\n * Invokes callback on every linked (adjacent) node to the given one.\n *\n * @param nodeId Identifier of the requested node.\n * @param {Function(node, link)} callback Function to be called on all linked nodes.\n * The function is passed two parameters: adjacent node and link object itself.\n * @param oriented if true graph treated as oriented.\n */\n forEachLinkedNode: forEachLinkedNode,\n\n /**\n * Enumerates all links in the graph\n *\n * @param {Function(link)} callback Function to be called on all links in the graph.\n * The function is passed one parameter: graph's link object.\n *\n * Link object contains at least the following fields:\n * fromId - node id where link starts;\n * toId - node id where link ends,\n * data - additional data passed to graph.addLink() method.\n */\n forEachLink: forEachLink,\n\n /**\n * Suspend all notifications about graph changes until\n * endUpdate is called.\n */\n beginUpdate: enterModification,\n\n /**\n * Resumes all notifications about graph changes and fires\n * graph 'changed' event in case there are any pending changes.\n */\n endUpdate: exitModification,\n\n /**\n * Removes all nodes and links from the graph.\n */\n clear: clear,\n\n /**\n * Detects whether there is a link between two nodes.\n * Operation complexity is O(n) where n - number of links of a node.\n * NOTE: this function is synonim for getLink()\n *\n * @returns link if there is one. null otherwise.\n */\n hasLink: getLink,\n\n /**\n * Detects whether there is a node with given id\n * \n * Operation complexity is O(1)\n * NOTE: this function is synonim for getNode()\n *\n * @returns node if there is one; Falsy value otherwise.\n */\n hasNode: getNode,\n\n /**\n * Gets an edge between two nodes.\n * Operation complexity is O(n) where n - number of links of a node.\n *\n * @param {string} fromId link start identifier\n * @param {string} toId link end identifier\n *\n * @returns link if there is one. null otherwise.\n */\n getLink: getLink\n };\n\n // this will add `on()` and `fire()` methods.\n eventify(graphPart);\n\n monitorSubscribers();\n\n return graphPart;\n\n function monitorSubscribers() {\n var realOn = graphPart.on;\n\n // replace real `on` with our temporary on, which will trigger change\n // modification monitoring:\n graphPart.on = on;\n\n function on() {\n // now it's time to start tracking stuff:\n graphPart.beginUpdate = enterModification = enterModificationReal;\n graphPart.endUpdate = exitModification = exitModificationReal;\n recordLinkChange = recordLinkChangeReal;\n recordNodeChange = recordNodeChangeReal;\n\n // this will replace current `on` method with real pub/sub from `eventify`.\n graphPart.on = realOn;\n // delegate to real `on` handler:\n return realOn.apply(graphPart, arguments);\n }\n }\n\n function recordLinkChangeReal(link, changeType) {\n changes.push({\n link: link,\n changeType: changeType\n });\n }\n\n function recordNodeChangeReal(node, changeType) {\n changes.push({\n node: node,\n changeType: changeType\n });\n }\n\n function addNode(nodeId, data) {\n if (nodeId === undefined) {\n throw new Error('Invalid node identifier');\n }\n\n enterModification();\n\n var node = getNode(nodeId);\n if (!node) {\n node = new Node(nodeId, data);\n recordNodeChange(node, 'add');\n } else {\n node.data = data;\n recordNodeChange(node, 'update');\n }\n\n nodes.set(nodeId, node);\n\n exitModification();\n return node;\n }\n\n function getNode(nodeId) {\n return nodes.get(nodeId);\n }\n\n function removeNode(nodeId) {\n var node = getNode(nodeId);\n if (!node) {\n return false;\n }\n\n enterModification();\n\n var prevLinks = node.links;\n if (prevLinks) {\n node.links = null;\n for(var i = 0; i < prevLinks.length; ++i) {\n removeLink(prevLinks[i]);\n }\n }\n\n nodes.delete(nodeId)\n\n recordNodeChange(node, 'remove');\n\n exitModification();\n\n return true;\n }\n\n\n function addLink(fromId, toId, data) {\n enterModification();\n\n var fromNode = getNode(fromId) || addNode(fromId);\n var toNode = getNode(toId) || addNode(toId);\n\n var link = createLink(fromId, toId, data);\n\n links.push(link);\n\n // TODO: this is not cool. On large graphs potentially would consume more memory.\n addLinkToNode(fromNode, link);\n if (fromId !== toId) {\n // make sure we are not duplicating links for self-loops\n addLinkToNode(toNode, link);\n }\n\n recordLinkChange(link, 'add');\n\n exitModification();\n\n return link;\n }\n\n function createSingleLink(fromId, toId, data) {\n var linkId = makeLinkId(fromId, toId);\n return new Link(fromId, toId, data, linkId);\n }\n\n function createUniqueLink(fromId, toId, data) {\n // TODO: Get rid of this method.\n var linkId = makeLinkId(fromId, toId);\n var isMultiEdge = multiEdges.hasOwnProperty(linkId);\n if (isMultiEdge || getLink(fromId, toId)) {\n if (!isMultiEdge) {\n multiEdges[linkId] = 0;\n }\n var suffix = '@' + (++multiEdges[linkId]);\n linkId = makeLinkId(fromId + suffix, toId + suffix);\n }\n\n return new Link(fromId, toId, data, linkId);\n }\n\n function getNodeCount() {\n return nodes.size;\n }\n\n function getLinkCount() {\n return links.length;\n }\n\n function getLinks(nodeId) {\n var node = getNode(nodeId);\n return node ? node.links : null;\n }\n\n function removeLink(link) {\n if (!link) {\n return false;\n }\n var idx = indexOfElementInArray(link, links);\n if (idx < 0) {\n return false;\n }\n\n enterModification();\n\n links.splice(idx, 1);\n\n var fromNode = getNode(link.fromId);\n var toNode = getNode(link.toId);\n\n if (fromNode) {\n idx = indexOfElementInArray(link, fromNode.links);\n if (idx >= 0) {\n fromNode.links.splice(idx, 1);\n }\n }\n\n if (toNode) {\n idx = indexOfElementInArray(link, toNode.links);\n if (idx >= 0) {\n toNode.links.splice(idx, 1);\n }\n }\n\n recordLinkChange(link, 'remove');\n\n exitModification();\n\n return true;\n }\n\n function getLink(fromNodeId, toNodeId) {\n // TODO: Use sorted links to speed this up\n var node = getNode(fromNodeId),\n i;\n if (!node || !node.links) {\n return null;\n }\n\n for (i = 0; i < node.links.length; ++i) {\n var link = node.links[i];\n if (link.fromId === fromNodeId && link.toId === toNodeId) {\n return link;\n }\n }\n\n return null; // no link.\n }\n\n function clear() {\n enterModification();\n forEachNode(function(node) {\n removeNode(node.id);\n });\n exitModification();\n }\n\n function forEachLink(callback) {\n var i, length;\n if (typeof callback === 'function') {\n for (i = 0, length = links.length; i < length; ++i) {\n callback(links[i]);\n }\n }\n }\n\n function forEachLinkedNode(nodeId, callback, oriented) {\n var node = getNode(nodeId);\n\n if (node && node.links && typeof callback === 'function') {\n if (oriented) {\n return forEachOrientedLink(node.links, nodeId, callback);\n } else {\n return forEachNonOrientedLink(node.links, nodeId, callback);\n }\n }\n }\n\n function forEachNonOrientedLink(links, nodeId, callback) {\n var quitFast;\n for (var i = 0; i < links.length; ++i) {\n var link = links[i];\n var linkedNodeId = link.fromId === nodeId ? link.toId : link.fromId;\n\n quitFast = callback(nodes.get(linkedNodeId), link);\n if (quitFast) {\n return true; // Client does not need more iterations. Break now.\n }\n }\n }\n\n function forEachOrientedLink(links, nodeId, callback) {\n var quitFast;\n for (var i = 0; i < links.length; ++i) {\n var link = links[i];\n if (link.fromId === nodeId) {\n quitFast = callback(nodes.get(link.toId), link)\n if (quitFast) {\n return true; // Client does not need more iterations. Break now.\n }\n }\n }\n }\n\n // we will not fire anything until users of this library explicitly call `on()`\n // method.\n function noop() {}\n\n // Enter, Exit modification allows bulk graph updates without firing events.\n function enterModificationReal() {\n suspendEvents += 1;\n }\n\n function exitModificationReal() {\n suspendEvents -= 1;\n if (suspendEvents === 0 && changes.length > 0) {\n graphPart.fire('changed', changes);\n changes.length = 0;\n }\n }\n\n function forEachNode(callback) {\n if (typeof callback !== 'function') {\n throw new Error('Function is expected to iterate over graph nodes. You passed ' + callback);\n }\n\n var valuesIterator = nodes.values();\n var nextValue = valuesIterator.next();\n while (!nextValue.done) {\n if (callback(nextValue.value)) {\n return true; // client doesn't want to proceed. Return.\n }\n nextValue = valuesIterator.next();\n }\n }\n}\n\n// need this for old browsers. Should this be a separate module?\nfunction indexOfElementInArray(element, array) {\n if (!array) return -1;\n\n if (array.indexOf) {\n return array.indexOf(element);\n }\n\n var len = array.length,\n i;\n\n for (i = 0; i < len; i += 1) {\n if (array[i] === element) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Internal structure to represent node;\n */\nfunction Node(id, data) {\n this.id = id;\n this.links = null;\n this.data = data;\n}\n\nfunction addLinkToNode(node, link) {\n if (node.links) {\n node.links.push(link);\n } else {\n node.links = [link];\n }\n}\n\n/**\n * Internal structure to represent links;\n */\nfunction Link(fromId, toId, data, id) {\n this.fromId = fromId;\n this.toId = toId;\n this.data = data;\n this.id = id;\n}\n\nfunction makeLinkId(fromId, toId) {\n return fromId.toString() + '👉 ' + toId.toString();\n}\n","module.exports = createLayout;\nmodule.exports.simulator = require('./lib/createPhysicsSimulator');\n\nvar eventify = require('ngraph.events');\n\n/**\n * Creates force based layout for a given graph.\n *\n * @param {ngraph.graph} graph which needs to be laid out\n * @param {object} physicsSettings if you need custom settings\n * for physics simulator you can pass your own settings here. If it's not passed\n * a default one will be created.\n */\nfunction createLayout(graph, physicsSettings) {\n if (!graph) {\n throw new Error('Graph structure cannot be undefined');\n }\n\n var createSimulator = (physicsSettings && physicsSettings.createSimulator) || require('./lib/createPhysicsSimulator');\n var physicsSimulator = createSimulator(physicsSettings);\n if (Array.isArray(physicsSettings)) throw new Error('Physics settings is expected to be an object');\n\n var nodeMass = defaultNodeMass;\n if (physicsSettings && typeof physicsSettings.nodeMass === 'function') {\n nodeMass = physicsSettings.nodeMass;\n }\n\n var nodeBodies = new Map();\n var springs = {};\n var bodiesCount = 0;\n\n var springTransform = physicsSimulator.settings.springTransform || noop;\n\n // Initialize physics with what we have in the graph:\n initPhysics();\n listenToEvents();\n\n var wasStable = false;\n\n var api = {\n /**\n * Performs one step of iterative layout algorithm\n *\n * @returns {boolean} true if the system should be considered stable; False otherwise.\n * The system is stable if no further call to `step()` can improve the layout.\n */\n step: function() {\n if (bodiesCount === 0) {\n updateStableStatus(true);\n return true;\n }\n\n var lastMove = physicsSimulator.step();\n\n // Save the movement in case if someone wants to query it in the step\n // callback.\n api.lastMove = lastMove;\n\n // Allow listeners to perform low-level actions after nodes are updated.\n api.fire('step');\n\n var ratio = lastMove/bodiesCount;\n var isStableNow = ratio <= 0.01; // TODO: The number is somewhat arbitrary...\n updateStableStatus(isStableNow);\n\n\n return isStableNow;\n },\n\n /**\n * For a given `nodeId` returns position\n */\n getNodePosition: function (nodeId) {\n return getInitializedBody(nodeId).pos;\n },\n\n /**\n * Sets position of a node to a given coordinates\n * @param {string} nodeId node identifier\n * @param {number} x position of a node\n * @param {number} y position of a node\n * @param {number=} z position of node (only if applicable to body)\n */\n setNodePosition: function (nodeId) {\n var body = getInitializedBody(nodeId);\n body.setPosition.apply(body, Array.prototype.slice.call(arguments, 1));\n },\n\n /**\n * @returns {Object} Link position by link id\n * @returns {Object.from} {x, y} coordinates of link start\n * @returns {Object.to} {x, y} coordinates of link end\n */\n getLinkPosition: function (linkId) {\n var spring = springs[linkId];\n if (spring) {\n return {\n from: spring.from.pos,\n to: spring.to.pos\n };\n }\n },\n\n /**\n * @returns {Object} area required to fit in the graph. Object contains\n * `x1`, `y1` - top left coordinates\n * `x2`, `y2` - bottom right coordinates\n */\n getGraphRect: function () {\n return physicsSimulator.getBBox();\n },\n\n /**\n * Iterates over each body in the layout simulator and performs a callback(body, nodeId)\n */\n forEachBody: forEachBody,\n\n /*\n * Requests layout algorithm to pin/unpin node to its current position\n * Pinned nodes should not be affected by layout algorithm and always\n * remain at their position\n */\n pinNode: function (node, isPinned) {\n var body = getInitializedBody(node.id);\n body.isPinned = !!isPinned;\n },\n\n /**\n * Checks whether given graph's node is currently pinned\n */\n isNodePinned: function (node) {\n return getInitializedBody(node.id).isPinned;\n },\n\n /**\n * Request to release all resources\n */\n dispose: function() {\n graph.off('changed', onGraphChanged);\n api.fire('disposed');\n },\n\n /**\n * Gets physical body for a given node id. If node is not found undefined\n * value is returned.\n */\n getBody: getBody,\n\n /**\n * Gets spring for a given edge.\n *\n * @param {string} linkId link identifer. If two arguments are passed then\n * this argument is treated as formNodeId\n * @param {string=} toId when defined this parameter denotes head of the link\n * and first argument is treated as tail of the link (fromId)\n */\n getSpring: getSpring,\n\n /**\n * Returns length of cumulative force vector. The closer this to zero - the more stable the system is\n */\n getForceVectorLength: getForceVectorLength,\n\n /**\n * [Read only] Gets current physics simulator\n */\n simulator: physicsSimulator,\n\n /**\n * Gets the graph that was used for layout\n */\n graph: graph,\n\n /**\n * Gets amount of movement performed during last step operation\n */\n lastMove: 0\n };\n\n eventify(api);\n\n return api;\n\n function updateStableStatus(isStableNow) {\n if (wasStable !== isStableNow) {\n wasStable = isStableNow;\n onStableChanged(isStableNow);\n }\n }\n\n function forEachBody(cb) {\n nodeBodies.forEach(cb);\n }\n\n function getForceVectorLength() {\n var fx = 0, fy = 0;\n forEachBody(function(body) {\n fx += Math.abs(body.force.x);\n fy += Math.abs(body.force.y);\n });\n return Math.sqrt(fx * fx + fy * fy);\n }\n\n function getSpring(fromId, toId) {\n var linkId;\n if (toId === undefined) {\n if (typeof fromId !== 'object') {\n // assume fromId as a linkId:\n linkId = fromId;\n } else {\n // assume fromId to be a link object:\n linkId = fromId.id;\n }\n } else {\n // toId is defined, should grab link:\n var link = graph.hasLink(fromId, toId);\n if (!link) return;\n linkId = link.id;\n }\n\n return springs[linkId];\n }\n\n function getBody(nodeId) {\n return nodeBodies.get(nodeId);\n }\n\n function listenToEvents() {\n graph.on('changed', onGraphChanged);\n }\n\n function onStableChanged(isStable) {\n api.fire('stable', isStable);\n }\n\n function onGraphChanged(changes) {\n for (var i = 0; i < changes.length; ++i) {\n var change = changes[i];\n if (change.changeType === 'add') {\n if (change.node) {\n initBody(change.node.id);\n }\n if (change.link) {\n initLink(change.link);\n }\n } else if (change.changeType === 'remove') {\n if (change.node) {\n releaseNode(change.node);\n }\n if (change.link) {\n releaseLink(change.link);\n }\n }\n }\n bodiesCount = graph.getNodesCount();\n }\n\n function initPhysics() {\n bodiesCount = 0;\n\n graph.forEachNode(function (node) {\n initBody(node.id);\n bodiesCount += 1;\n });\n\n graph.forEachLink(initLink);\n }\n\n function initBody(nodeId) {\n var body = nodeBodies.get(nodeId);\n if (!body) {\n var node = graph.getNode(nodeId);\n if (!node) {\n throw new Error('initBody() was called with unknown node id');\n }\n\n var pos = node.position;\n if (!pos) {\n var neighbors = getNeighborBodies(node);\n pos = physicsSimulator.getBestNewBodyPosition(neighbors);\n }\n\n body = physicsSimulator.addBodyAt(pos);\n body.id = nodeId;\n\n nodeBodies.set(nodeId, body);\n updateBodyMass(nodeId);\n\n if (isNodeOriginallyPinned(node)) {\n body.isPinned = true;\n }\n }\n }\n\n function releaseNode(node) {\n var nodeId = node.id;\n var body = nodeBodies.get(nodeId);\n if (body) {\n nodeBodies.delete(nodeId);\n physicsSimulator.removeBody(body);\n }\n }\n\n function initLink(link) {\n updateBodyMass(link.fromId);\n updateBodyMass(link.toId);\n\n var fromBody = nodeBodies.get(link.fromId),\n toBody = nodeBodies.get(link.toId),\n spring = physicsSimulator.addSpring(fromBody, toBody, link.length);\n\n springTransform(link, spring);\n\n springs[link.id] = spring;\n }\n\n function releaseLink(link) {\n var spring = springs[link.id];\n if (spring) {\n var from = graph.getNode(link.fromId),\n to = graph.getNode(link.toId);\n\n if (from) updateBodyMass(from.id);\n if (to) updateBodyMass(to.id);\n\n delete springs[link.id];\n\n physicsSimulator.removeSpring(spring);\n }\n }\n\n function getNeighborBodies(node) {\n // TODO: Could probably be done better on memory\n var neighbors = [];\n if (!node.links) {\n return neighbors;\n }\n var maxNeighbors = Math.min(node.links.length, 2);\n for (var i = 0; i < maxNeighbors; ++i) {\n var link = node.links[i];\n var otherBody = link.fromId !== node.id ? nodeBodies.get(link.fromId) : nodeBodies.get(link.toId);\n if (otherBody && otherBody.pos) {\n neighbors.push(otherBody);\n }\n }\n\n return neighbors;\n }\n\n function updateBodyMass(nodeId) {\n var body = nodeBodies.get(nodeId);\n body.mass = nodeMass(nodeId);\n if (Number.isNaN(body.mass)) {\n throw new Error('Node mass should be a number');\n }\n }\n\n /**\n * Checks whether graph node has in its settings pinned attribute,\n * which means layout algorithm cannot move it. Node can be marked\n * as pinned, if it has \"isPinned\" attribute, or when node.data has it.\n *\n * @param {Object} node a graph node to check\n * @return {Boolean} true if node should be treated as pinned; false otherwise.\n */\n function isNodeOriginallyPinned(node) {\n return (node && (node.isPinned || (node.data && node.data.isPinned)));\n }\n\n function getInitializedBody(nodeId) {\n var body = nodeBodies.get(nodeId);\n if (!body) {\n initBody(nodeId);\n body = nodeBodies.get(nodeId);\n }\n return body;\n }\n\n /**\n * Calculates mass of a body, which corresponds to node with given id.\n *\n * @param {String|Number} nodeId identifier of a node, for which body mass needs to be calculated\n * @returns {Number} recommended mass of the body;\n */\n function defaultNodeMass(nodeId) {\n var links = graph.getLinks(nodeId);\n if (!links) return 1;\n return 1 + links.length / 3.0;\n }\n}\n\nfunction noop() { }\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","import { LinearFilter, Sprite, SpriteMaterial, Texture } from 'three';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar three = typeof window !== 'undefined' && window.THREE ? window.THREE // Prefer consumption from global THREE, if exists\n: {\n LinearFilter: LinearFilter,\n Sprite: Sprite,\n SpriteMaterial: SpriteMaterial,\n Texture: Texture\n};\n\nvar _default = /*#__PURE__*/function (_three$Sprite) {\n _inherits(_default, _three$Sprite);\n\n var _super = _createSuper(_default);\n\n function _default() {\n var _this;\n\n var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var textHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;\n var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'rgba(255, 255, 255, 1)';\n\n _classCallCheck(this, _default);\n\n _this = _super.call(this, new three.SpriteMaterial({\n map: new three.Texture()\n }));\n _this._text = \"\".concat(text);\n _this._textHeight = textHeight;\n _this._color = color;\n _this._backgroundColor = false; // no background color\n\n _this._padding = 0;\n _this._borderWidth = 0;\n _this._borderRadius = 0;\n _this._borderColor = 'white';\n _this._strokeWidth = 0;\n _this._strokeColor = 'white';\n _this._fontFace = 'Arial';\n _this._fontSize = 90; // defines text resolution\n\n _this._fontWeight = 'normal';\n _this._canvas = document.createElement('canvas');\n _this._texture = _this.material.map;\n _this._texture.minFilter = three.LinearFilter;\n\n _this._genCanvas();\n\n return _this;\n }\n\n _createClass(_default, [{\n key: \"text\",\n get: function get() {\n return this._text;\n },\n set: function set(text) {\n this._text = text;\n\n this._genCanvas();\n }\n }, {\n key: \"textHeight\",\n get: function get() {\n return this._textHeight;\n },\n set: function set(textHeight) {\n this._textHeight = textHeight;\n\n this._genCanvas();\n }\n }, {\n key: \"color\",\n get: function get() {\n return this._color;\n },\n set: function set(color) {\n this._color = color;\n\n this._genCanvas();\n }\n }, {\n key: \"backgroundColor\",\n get: function get() {\n return this._backgroundColor;\n },\n set: function set(color) {\n this._backgroundColor = color;\n\n this._genCanvas();\n }\n }, {\n key: \"padding\",\n get: function get() {\n return this._padding;\n },\n set: function set(padding) {\n this._padding = padding;\n\n this._genCanvas();\n }\n }, {\n key: \"borderWidth\",\n get: function get() {\n return this._borderWidth;\n },\n set: function set(borderWidth) {\n this._borderWidth = borderWidth;\n\n this._genCanvas();\n }\n }, {\n key: \"borderRadius\",\n get: function get() {\n return this._borderRadius;\n },\n set: function set(borderRadius) {\n this._borderRadius = borderRadius;\n\n this._genCanvas();\n }\n }, {\n key: \"borderColor\",\n get: function get() {\n return this._borderColor;\n },\n set: function set(borderColor) {\n this._borderColor = borderColor;\n\n this._genCanvas();\n }\n }, {\n key: \"fontFace\",\n get: function get() {\n return this._fontFace;\n },\n set: function set(fontFace) {\n this._fontFace = fontFace;\n\n this._genCanvas();\n }\n }, {\n key: \"fontSize\",\n get: function get() {\n return this._fontSize;\n },\n set: function set(fontSize) {\n this._fontSize = fontSize;\n\n this._genCanvas();\n }\n }, {\n key: \"fontWeight\",\n get: function get() {\n return this._fontWeight;\n },\n set: function set(fontWeight) {\n this._fontWeight = fontWeight;\n\n this._genCanvas();\n }\n }, {\n key: \"strokeWidth\",\n get: function get() {\n return this._strokeWidth;\n },\n set: function set(strokeWidth) {\n this._strokeWidth = strokeWidth;\n\n this._genCanvas();\n }\n }, {\n key: \"strokeColor\",\n get: function get() {\n return this._strokeColor;\n },\n set: function set(strokeColor) {\n this._strokeColor = strokeColor;\n\n this._genCanvas();\n }\n }, {\n key: \"_genCanvas\",\n value: function _genCanvas() {\n var _this2 = this;\n\n var canvas = this._canvas;\n var ctx = canvas.getContext('2d');\n var border = Array.isArray(this.borderWidth) ? this.borderWidth : [this.borderWidth, this.borderWidth]; // x,y border\n\n var relBorder = border.map(function (b) {\n return b * _this2.fontSize * 0.1;\n }); // border in canvas units\n\n var borderRadius = Array.isArray(this.borderRadius) ? this.borderRadius : [this.borderRadius, this.borderRadius, this.borderRadius, this.borderRadius]; // tl tr br bl corners\n\n var relBorderRadius = borderRadius.map(function (b) {\n return b * _this2.fontSize * 0.1;\n }); // border radius in canvas units\n\n var padding = Array.isArray(this.padding) ? this.padding : [this.padding, this.padding]; // x,y padding\n\n var relPadding = padding.map(function (p) {\n return p * _this2.fontSize * 0.1;\n }); // padding in canvas units\n\n var lines = this.text.split('\\n');\n var font = \"\".concat(this.fontWeight, \" \").concat(this.fontSize, \"px \").concat(this.fontFace);\n ctx.font = font; // measure canvas with appropriate font\n\n var innerWidth = Math.max.apply(Math, _toConsumableArray(lines.map(function (line) {\n return ctx.measureText(line).width;\n })));\n var innerHeight = this.fontSize * lines.length;\n canvas.width = innerWidth + relBorder[0] * 2 + relPadding[0] * 2;\n canvas.height = innerHeight + relBorder[1] * 2 + relPadding[1] * 2; // paint border\n\n if (this.borderWidth) {\n ctx.strokeStyle = this.borderColor;\n\n if (relBorder[0]) {\n // left + right borders\n var hb = relBorder[0] / 2;\n ctx.lineWidth = relBorder[0];\n ctx.beginPath();\n ctx.moveTo(hb, relBorderRadius[0]);\n ctx.lineTo(hb, canvas.height - relBorderRadius[3]);\n ctx.moveTo(canvas.width - hb, relBorderRadius[1]);\n ctx.lineTo(canvas.width - hb, canvas.height - relBorderRadius[2]);\n ctx.stroke();\n }\n\n if (relBorder[1]) {\n // top + bottom borders\n var _hb = relBorder[1] / 2;\n\n ctx.lineWidth = relBorder[1];\n ctx.beginPath();\n ctx.moveTo(Math.max(relBorder[0], relBorderRadius[0]), _hb);\n ctx.lineTo(canvas.width - Math.max(relBorder[0], relBorderRadius[1]), _hb);\n ctx.moveTo(Math.max(relBorder[0], relBorderRadius[3]), canvas.height - _hb);\n ctx.lineTo(canvas.width - Math.max(relBorder[0], relBorderRadius[2]), canvas.height - _hb);\n ctx.stroke();\n }\n\n if (this.borderRadius) {\n // strike rounded corners\n var cornerWidth = Math.max.apply(Math, _toConsumableArray(relBorder));\n\n var _hb2 = cornerWidth / 2;\n\n ctx.lineWidth = cornerWidth;\n ctx.beginPath();\n [!!relBorderRadius[0] && [relBorderRadius[0], _hb2, _hb2, relBorderRadius[0]], !!relBorderRadius[1] && [canvas.width - relBorderRadius[1], canvas.width - _hb2, _hb2, relBorderRadius[1]], !!relBorderRadius[2] && [canvas.width - relBorderRadius[2], canvas.width - _hb2, canvas.height - _hb2, canvas.height - relBorderRadius[2]], !!relBorderRadius[3] && [relBorderRadius[3], _hb2, canvas.height - _hb2, canvas.height - relBorderRadius[3]]].filter(function (d) {\n return d;\n }).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 4),\n x0 = _ref2[0],\n x1 = _ref2[1],\n y0 = _ref2[2],\n y1 = _ref2[3];\n\n ctx.moveTo(x0, y0);\n ctx.quadraticCurveTo(x1, y0, x1, y1);\n });\n ctx.stroke();\n }\n } // paint background\n\n\n if (this.backgroundColor) {\n ctx.fillStyle = this.backgroundColor;\n\n if (!this.borderRadius) {\n ctx.fillRect(relBorder[0], relBorder[1], canvas.width - relBorder[0] * 2, canvas.height - relBorder[1] * 2);\n } else {\n // fill with rounded corners\n ctx.beginPath();\n ctx.moveTo(relBorder[0], relBorderRadius[0]);\n [[relBorder[0], relBorderRadius[0], canvas.width - relBorderRadius[1], relBorder[1], relBorder[1], relBorder[1]], // t\n [canvas.width - relBorder[0], canvas.width - relBorder[0], canvas.width - relBorder[0], relBorder[1], relBorderRadius[1], canvas.height - relBorderRadius[2]], // r\n [canvas.width - relBorder[0], canvas.width - relBorderRadius[2], relBorderRadius[3], canvas.height - relBorder[1], canvas.height - relBorder[1], canvas.height - relBorder[1]], // b\n [relBorder[0], relBorder[0], relBorder[0], canvas.height - relBorder[1], canvas.height - relBorderRadius[3], relBorderRadius[0]] // t\n ].forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 6),\n x0 = _ref4[0],\n x1 = _ref4[1],\n x2 = _ref4[2],\n y0 = _ref4[3],\n y1 = _ref4[4],\n y2 = _ref4[5];\n\n ctx.quadraticCurveTo(x0, y0, x1, y1);\n ctx.lineTo(x2, y2);\n });\n ctx.closePath();\n ctx.fill();\n }\n }\n\n ctx.translate.apply(ctx, _toConsumableArray(relBorder));\n ctx.translate.apply(ctx, _toConsumableArray(relPadding)); // paint text\n\n ctx.font = font; // Set font again after canvas is resized, as context properties are reset\n\n ctx.fillStyle = this.color;\n ctx.textBaseline = 'bottom';\n var drawTextStroke = this.strokeWidth > 0;\n\n if (drawTextStroke) {\n ctx.lineWidth = this.strokeWidth * this.fontSize / 10;\n ctx.strokeStyle = this.strokeColor;\n }\n\n lines.forEach(function (line, index) {\n var lineX = (innerWidth - ctx.measureText(line).width) / 2;\n var lineY = (index + 1) * _this2.fontSize;\n drawTextStroke && ctx.strokeText(line, lineX, lineY);\n ctx.fillText(line, lineX, lineY);\n }); // Inject canvas into sprite\n\n this._texture.image = canvas;\n this._texture.needsUpdate = true;\n var yScale = this.textHeight * lines.length + border[1] * 2 + padding[1] * 2;\n this.scale.set(yScale * canvas.width / canvas.height, yScale, 0);\n }\n }, {\n key: \"clone\",\n value: function clone() {\n return new this.constructor(this.text, this.textHeight, this.color).copy(this);\n }\n }, {\n key: \"copy\",\n value: function copy(source) {\n three.Sprite.prototype.copy.call(this, source);\n this.color = source.color;\n this.backgroundColor = source.backgroundColor;\n this.padding = source.padding;\n this.borderWidth = source.borderWidth;\n this.borderColor = source.borderColor;\n this.fontFace = source.fontFace;\n this.fontSize = source.fontSize;\n this.fontWeight = source.fontWeight;\n this.strokeWidth = source.strokeWidth;\n this.strokeColor = source.strokeColor;\n return this;\n }\n }]);\n\n return _default;\n}(three.Sprite);\n\nexport default _default;\n","'use strict';\nmodule.exports = function (arr, predicate, ctx) {\n\tif (typeof Array.prototype.findIndex === 'function') {\n\t\treturn arr.findIndex(predicate, ctx);\n\t}\n\n\tif (typeof predicate !== 'function') {\n\t\tthrow new TypeError('predicate must be a function');\n\t}\n\n\tvar list = Object(arr);\n\tvar len = list.length;\n\n\tif (len === 0) {\n\t\treturn -1;\n\t}\n\n\tfor (var i = 0; i < len; i++) {\n\t\tif (predicate.call(ctx, list[i], i, list)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n};\n","/**\n * lodash 4.0.1 (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array ? array.length : 0;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\n/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n if (value !== value) {\n return baseFindIndex(array, baseIsNaN, fromIndex);\n }\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a cache value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeMax = Math.max;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, props) {\n object = Object(object);\n return basePickBy(object, props, function(value, key) {\n return key in object;\n });\n}\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick from.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, props, predicate) {\n var index = -1,\n length = props.length,\n result = {};\n\n while (++index < length) {\n var key = props[index],\n value = object[key];\n\n if (predicate(value, key)) {\n result[key] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Creates an array of the own and inherited enumerable symbol properties\n * of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable string keyed properties of `object` that are\n * not omitted.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [props] The property identifiers to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\nvar omit = baseRest(function(object, props) {\n if (object == null) {\n return {};\n }\n props = arrayMap(baseFlatten(props, 1), toKey);\n return basePick(object, baseDifference(getAllKeysIn(object), props));\n});\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = omit;\n","/**\n * A general error class that should be used for all errors in Expo modules.\n * Guarantees a `code` field that can be used to differentiate between different\n * types of errors without further subclassing Error.\n */\nexport class CodedError extends Error {\n code: string;\n info?: any;\n\n constructor(code: string, message: string) {\n super(message);\n this.code = code;\n }\n}\n","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nvar setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nvar isNativeFunction = require(\"./isNativeFunction.js\");\n\nvar construct = require(\"./construct.js\");\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _wrapNativeSuper(Class);\n}\n\nmodule.exports = _wrapNativeSuper;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/* Font Face Observer v2.1.0 - © Bram Stein. License: BSD-3-Clause */(function(){function l(a,b){document.addEventListener?a.addEventListener(\"scroll\",b,!1):a.attachEvent(\"scroll\",b)}function m(a){document.body?a():document.addEventListener?document.addEventListener(\"DOMContentLoaded\",function c(){document.removeEventListener(\"DOMContentLoaded\",c);a()}):document.attachEvent(\"onreadystatechange\",function k(){if(\"interactive\"==document.readyState||\"complete\"==document.readyState)document.detachEvent(\"onreadystatechange\",k),a()})};function t(a){this.a=document.createElement(\"div\");this.a.setAttribute(\"aria-hidden\",\"true\");this.a.appendChild(document.createTextNode(a));this.b=document.createElement(\"span\");this.c=document.createElement(\"span\");this.h=document.createElement(\"span\");this.f=document.createElement(\"span\");this.g=-1;this.b.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";this.c.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\nthis.f.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";this.h.style.cssText=\"display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;\";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}\nfunction u(a,b){a.a.style.cssText=\"max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:\"+b+\";\"}function z(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+\"px\";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function A(a,b){function c(){var a=k;z(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c);l(a.c,c);z(a)};function B(a,b){var c=b||{};this.family=a;this.style=c.style||\"normal\";this.weight=c.weight||\"normal\";this.stretch=c.stretch||\"normal\"}var C=null,D=null,E=null,F=null;function G(){if(null===D)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(window.navigator.userAgent);D=!!a&&603>parseInt(a[1],10)}else D=!1;return D}function J(){null===F&&(F=!!document.fonts);return F}\nfunction K(){if(null===E){var a=document.createElement(\"div\");try{a.style.font=\"condensed 100px sans-serif\"}catch(b){}E=\"\"!==a.style.font}return E}function L(a,b){return[a.style,a.weight,K()?a.stretch:\"\",\"100px\",b].join(\" \")}\nB.prototype.load=function(a,b){var c=this,k=a||\"BESbswy\",r=0,n=b||3E3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!G()){var M=new Promise(function(a,b){function e(){(new Date).getTime()-H>=n?b(Error(\"\"+n+\"ms timeout exceeded\")):document.fonts.load(L(c,'\"'+c.family+'\"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},b)}e()}),N=new Promise(function(a,c){r=setTimeout(function(){c(Error(\"\"+n+\"ms timeout exceeded\"))},n)});Promise.race([N,M]).then(function(){clearTimeout(r);a(c)},\nb)}else m(function(){function v(){var b;if(b=-1!=f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===C&&(b=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent),C=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=C&&(f==w&&g==w&&h==w||f==x&&g==x&&h==x||f==y&&g==y&&h==y)),b=!b;b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(r),a(c))}function I(){if((new Date).getTime()-H>=n)d.parentNode&&d.parentNode.removeChild(d),b(Error(\"\"+\nn+\"ms timeout exceeded\"));else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,g=p.a.offsetWidth,h=q.a.offsetWidth,v();r=setTimeout(I,50)}}var e=new t(k),p=new t(k),q=new t(k),f=-1,g=-1,h=-1,w=-1,x=-1,y=-1,d=document.createElement(\"div\");d.dir=\"ltr\";u(e,L(c,\"sans-serif\"));u(p,L(c,\"serif\"));u(q,L(c,\"monospace\"));d.appendChild(e.a);d.appendChild(p.a);d.appendChild(q.a);document.body.appendChild(d);w=e.a.offsetWidth;x=p.a.offsetWidth;y=q.a.offsetWidth;I();A(e,function(a){f=a;v()});u(e,\nL(c,'\"'+c.family+'\",sans-serif'));A(p,function(a){g=a;v()});u(p,L(c,'\"'+c.family+'\",serif'));A(q,function(a){h=a;v()});u(q,L(c,'\"'+c.family+'\",monospace'))})})};\"object\"===typeof module?module.exports=B:(window.FontFaceObserver=B,window.FontFaceObserver.prototype.load=B.prototype.load);}());\n","module.exports = __webpack_public_path__ + \"./fonts/MaterialCommunityIcons.ttf\";","import * as React from 'react';\n\nconst UNINTIALIZED_STATE = {};\n\n/**\n * This is definitely not compatible with concurrent mode, but we don't have a solution for sync state yet.\n */\nexport default function useSyncState<T>(initialState?: (() => T) | T) {\n const stateRef = React.useRef<T>(UNINTIALIZED_STATE as any);\n const isSchedulingRef = React.useRef(false);\n const isMountedRef = React.useRef(true);\n\n React.useEffect(() => {\n isMountedRef.current = true;\n\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n if (stateRef.current === UNINTIALIZED_STATE) {\n stateRef.current =\n // @ts-expect-error: initialState is a function, but TypeScript doesn't think so\n typeof initialState === 'function' ? initialState() : initialState;\n }\n\n const [trackingState, setTrackingState] = React.useState(stateRef.current);\n\n const getState = React.useCallback(() => stateRef.current, []);\n\n const setState = React.useCallback((state: T) => {\n if (state === stateRef.current || !isMountedRef.current) {\n return;\n }\n\n stateRef.current = state;\n\n if (!isSchedulingRef.current) {\n setTrackingState(state);\n }\n }, []);\n\n const scheduleUpdate = React.useCallback((callback: () => void) => {\n isSchedulingRef.current = true;\n\n try {\n callback();\n } finally {\n isSchedulingRef.current = false;\n }\n }, []);\n\n const flushUpdates = React.useCallback(() => {\n if (!isMountedRef.current) {\n return;\n }\n\n // Make sure that the tracking state is up-to-date.\n // We call it unconditionally, but React should skip the update if state is unchanged.\n setTrackingState(stateRef.current);\n }, []);\n\n // If we're rendering and the tracking state is out of date, update it immediately\n // This will make sure that our updates are applied as early as possible.\n if (trackingState !== stateRef.current) {\n setTrackingState(stateRef.current);\n }\n\n const state = stateRef.current;\n\n React.useDebugValue(state);\n\n return [state, getState, setState, scheduleUpdate, flushUpdates] as const;\n}\n","'use strict';\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a \\unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n};\n","\"use strict\";function _interopDefault(e){return e&&\"object\"==typeof e&&\"default\"in e?e.default:e}Object.defineProperty(exports,\"__esModule\",{value:!0});var _partial=_interopDefault(require(\"ramda/src/partial\")),_curry=_interopDefault(require(\"ramda/src/curry\")),_pipeP=_interopDefault(require(\"ramda/src/pipeP\")),_keys=_interopDefault(require(\"ramda/src/keys\")),_forEach=_interopDefault(require(\"ramda/src/forEach\")),_dissoc=_interopDefault(require(\"ramda/src/dissoc\")),_merge=_interopDefault(require(\"ramda/src/merge\")),_prop=_interopDefault(require(\"ramda/src/prop\")),_always=_interopDefault(require(\"ramda/src/always\")),_ifElse=_interopDefault(require(\"ramda/src/ifElse\")),_contains=_interopDefault(require(\"ramda/src/contains\")),_gte=_interopDefault(require(\"ramda/src/gte\")),_curryN=_interopDefault(require(\"ramda/src/curryN\")),_T=_interopDefault(require(\"ramda/src/T\")),_is=_interopDefault(require(\"ramda/src/is\")),_identity=_interopDefault(require(\"ramda/src/identity\")),_isNil=_interopDefault(require(\"ramda/src/isNil\")),_cond=_interopDefault(require(\"ramda/src/cond\")),axios=_interopDefault(require(\"axios\")),__assign=function(){return(__assign=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e}).apply(this,arguments)},__awaiter=function(e,r,t,n){return new(t||(t=Promise))(function(a,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function o(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?a(e.value):new t(function(r){r(e.value)}).then(s,o)}u((n=n.apply(e,r||[])).next())})},__generator=function(e,r){var t,n,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(i){return function(o){return function(i){if(t)throw new TypeError(\"Generator is already executing.\");for(;s;)try{if(t=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=r.call(e,s)}catch(e){i=[6,e],n=0}finally{t=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},_this=void 0,toNumber=_cond([[_isNil,_identity],[_is(Number),_identity],[_T,function(e){return Number(e)}]]),isWithin=_curryN(3,function(e,r,t){var n=_is(Number);return n(e)&&n(r)&&n(t)&&_gte(t,e)&&_gte(r,t)}),containsText=_curryN(2,function(e,r){return _contains(r,e)}),isPromise=function(e){return!!e&&(\"object\"==typeof e||\"function\"==typeof e)&&\"function\"==typeof e.then},DEFAULT_HEADERS={Accept:\"application/json\",\"Content-Type\":\"application/json\"},DEFAULT_CONFIG={timeout:0},NONE=null,CLIENT_ERROR=\"CLIENT_ERROR\",SERVER_ERROR=\"SERVER_ERROR\",TIMEOUT_ERROR=\"TIMEOUT_ERROR\",CONNECTION_ERROR=\"CONNECTION_ERROR\",NETWORK_ERROR=\"NETWORK_ERROR\",UNKNOWN_ERROR=\"UNKNOWN_ERROR\",CANCEL_ERROR=\"CANCEL_ERROR\",TIMEOUT_ERROR_CODES=[\"ECONNABORTED\"],NODEJS_CONNECTION_ERROR_CODES=[\"ENOTFOUND\",\"ECONNREFUSED\",\"ECONNRESET\"],in200s=isWithin(200,299),in400s=isWithin(400,499),in500s=isWithin(500,599),statusNil=_ifElse(_isNil,_always(void 0),_prop(\"status\")),getProblemFromError=function(e){return\"Network Error\"===e.message?NETWORK_ERROR:axios.isCancel(e)?CANCEL_ERROR:_cond([[_isNil,function(){return getProblemFromStatus(statusNil(e.response))}],[containsText(TIMEOUT_ERROR_CODES),_always(TIMEOUT_ERROR)],[containsText(NODEJS_CONNECTION_ERROR_CODES),_always(CONNECTION_ERROR)],[_T,_always(UNKNOWN_ERROR)]])(e.code)},getProblemFromStatus=function(e){return _cond([[_isNil,_always(UNKNOWN_ERROR)],[in200s,_always(NONE)],[in400s,_always(CLIENT_ERROR)],[in500s,_always(SERVER_ERROR)],[_T,_always(UNKNOWN_ERROR)]])(e)},create=function(e){var r,t=_merge(DEFAULT_HEADERS,e.headers||{});if(e.axiosInstance)r=e.axiosInstance;else{var n=_merge(DEFAULT_CONFIG,_dissoc(\"headers\",e));r=axios.create(n)}var a=[],i=[],s=[],o=[],u=[],R=function(e,n){return t[e]=n,r},c=function(e,r,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),l(_merge({url:r,params:t,method:e},n))},_=function(e,r,t,n){return void 0===t&&(t=null),void 0===n&&(n={}),l(_merge({url:r,method:e,data:t},n))},l=function(e){return __awaiter(_this,void 0,void 0,function(){var n,a,o;return __generator(this,function(u){switch(u.label){case 0:if(e.headers=__assign({},t,e.headers),i.length>0&&_forEach(function(r){return r(e)},i),!(s.length>0))return[3,6];n=0,u.label=1;case 1:return n<s.length?(a=s[n](e),isPromise(a)?[4,a]:[3,3]):[3,6];case 2:return u.sent(),[3,5];case 3:return[4,a(e)];case 4:u.sent(),u.label=5;case 5:return n++,[3,1];case 6:return o=_pipeP(O(toNumber(new Date)),E),[2,r.request(e).then(o).catch(o)]}})})},E=function(e){return a.forEach(function(r){try{r(e)}catch(e){}}),e},O=_curry(function(e,r){return __awaiter(_this,void 0,void 0,function(){var t,n,a,i,s,R,c,_,l,E,O,f,N,p,d,T;return __generator(this,function(m){switch(m.label){case 0:if(t=toNumber(new Date),n=t-e,a=r instanceof Error||axios.isCancel(r),i=r,s=r,R=a?s.response:i,c=R&&R.status||null,_=a?getProblemFromError(r):getProblemFromStatus(c),l=a?s:null,E=in200s(c),O=r.config||null,f=R&&R.headers||null,N=R&&R.data||null,p={duration:n,problem:_,originalError:l,ok:E,status:c,headers:f,config:O,data:N},o.length>0&&_forEach(function(e){return e(p)},o),!(u.length>0))return[3,6];d=0,m.label=1;case 1:return d<u.length?(T=u[d](p),isPromise(T)?[4,T]:[3,3]):[3,6];case 2:return m.sent(),[3,5];case 3:return[4,T(p)];case 4:m.sent(),m.label=5;case 5:return d++,[3,1];case 6:return[2,p]}})})});return{axiosInstance:r,monitors:a,addMonitor:function(e){a.push(e)},requestTransforms:i,asyncRequestTransforms:s,responseTransforms:o,asyncResponseTransforms:u,addRequestTransform:function(e){return i.push(e)},addAsyncRequestTransform:function(e){return s.push(e)},addResponseTransform:function(e){return o.push(e)},addAsyncResponseTransform:function(e){return u.push(e)},setHeader:R,setHeaders:function(e){return _forEach(function(r){return R(r,e[r])},_keys(e)),r},deleteHeader:function(e){return delete t[e],r},headers:t,setBaseURL:function(e){return r.defaults.baseURL=e,r},getBaseURL:function(){return r.defaults.baseURL},any:l,get:_partial(c,[\"get\"]),delete:_partial(c,[\"delete\"]),head:_partial(c,[\"head\"]),post:_partial(_,[\"post\"]),put:_partial(_,[\"put\"]),patch:_partial(_,[\"patch\"]),link:_partial(c,[\"link\"]),unlink:_partial(c,[\"unlink\"])}},isCancel=axios.isCancel,CancelToken=axios.CancelToken,apisauce={DEFAULT_HEADERS:DEFAULT_HEADERS,NONE:NONE,CLIENT_ERROR:CLIENT_ERROR,SERVER_ERROR:SERVER_ERROR,TIMEOUT_ERROR:TIMEOUT_ERROR,CONNECTION_ERROR:CONNECTION_ERROR,NETWORK_ERROR:NETWORK_ERROR,UNKNOWN_ERROR:UNKNOWN_ERROR,create:create,isCancel:isCancel,CancelToken:CancelToken};exports.DEFAULT_HEADERS=DEFAULT_HEADERS,exports.NONE=NONE,exports.CLIENT_ERROR=CLIENT_ERROR,exports.SERVER_ERROR=SERVER_ERROR,exports.TIMEOUT_ERROR=TIMEOUT_ERROR,exports.CONNECTION_ERROR=CONNECTION_ERROR,exports.NETWORK_ERROR=NETWORK_ERROR,exports.UNKNOWN_ERROR=UNKNOWN_ERROR,exports.CANCEL_ERROR=CANCEL_ERROR,exports.getProblemFromError=getProblemFromError,exports.getProblemFromStatus=getProblemFromStatus,exports.create=create,exports.isCancel=isCancel,exports.CancelToken=CancelToken,exports.default=apisauce;\n","'use strict';\n\nvar colorString = require('color-string');\nvar convert = require('color-convert');\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (obj == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n","import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nconst LOCAL_STORAGE_KEY = 'EXPO_ERROR_RECOVERY_STORAGE';\n\nfunction _consumeRecoveryProps(): string | null {\n if (!canUseDOM) return null;\n try {\n const props = localStorage.getItem(LOCAL_STORAGE_KEY);\n localStorage.removeItem(LOCAL_STORAGE_KEY);\n return props;\n } catch (e) {\n // Catches localStorage SecurityError https://github.com/expo/expo/issues/8355\n }\n return null;\n}\n\nexport default {\n get name(): string {\n return 'ExpoErrorRecovery';\n },\n\n saveRecoveryProps(props: string): void {\n if (!canUseDOM) return;\n try {\n localStorage.setItem(LOCAL_STORAGE_KEY, props);\n } catch (e) {\n // Catches localStorage SecurityError https://github.com/expo/expo/issues/8355\n }\n },\n\n recoveredProps: _consumeRecoveryProps(),\n};\n","import { setRecoveryPropsToSave } from './ErroRecoveryStore';\nimport ExpoErrorRecovery from './ExpoErrorRecovery';\nimport './ErrorRecovery.fx';\n\nexport const recoveredProps = _getRecoveredProps();\n\nexport type ErrorRecoveryProps = Record<string, any>;\n\nexport function setRecoveryProps(props: ErrorRecoveryProps): void {\n setRecoveryPropsToSave(props);\n}\n\nfunction _getRecoveredProps(): ErrorRecoveryProps | null {\n if (ExpoErrorRecovery.recoveredProps) {\n return JSON.parse(ExpoErrorRecovery.recoveredProps);\n }\n return null;\n}\n","import * as React from 'react';\nimport { AppRegistry } from 'react-native';\n\nimport withExpoRoot from './withExpoRoot';\nimport { InitialProps } from './withExpoRoot.types';\n\nexport default function registerRootComponent<P extends InitialProps>(\n component: React.ComponentType<P>\n): void {\n const App = withExpoRoot(component);\n const RootComponent: React.FC<P> = props => <App {...props} />;\n AppRegistry.registerComponent('main', () => RootComponent);\n const rootTag = document.getElementById('root') ?? document.getElementById('main');\n AppRegistry.runApplication('main', { rootTag });\n}\n","import * as ErrorRecovery from 'expo-error-recovery';\nimport * as React from 'react';\n\nimport { InitialProps } from './withExpoRoot.types';\n\nexport default function withExpoRoot<P extends InitialProps>(\n AppRootComponent: React.ComponentType<P>\n): React.ComponentClass<P> {\n return class ExpoRootComponent extends React.Component<P> {\n render() {\n const props = {\n ...this.props,\n exp: { ...this.props.exp, errorRecovery: ErrorRecovery.recoveredProps },\n };\n\n return <AppRootComponent {...props} />;\n }\n };\n}\n","/* eslint-env browser */\nimport { Platform } from '@unimodules/core';\nimport * as rtlDetect from 'rtl-detect';\n\nimport { Localization } from './Localization.types';\n\nexport default {\n get isRTL(): boolean {\n return rtlDetect.isRtlLang(this.locale) ?? false;\n },\n get locale(): string {\n if (!Platform.isDOMAvailable) {\n return '';\n }\n\n const locale =\n navigator.language ||\n navigator['systemLanguage'] ||\n navigator['browserLanguage'] ||\n navigator['userLanguage'] ||\n this.locales[0];\n return locale;\n },\n get locales(): string[] {\n if (!Platform.isDOMAvailable) {\n return [];\n }\n const { languages = [] } = navigator;\n return Array.from(languages);\n },\n get timezone(): string {\n const defaultTimeZone = 'Etc/UTC';\n if (typeof Intl === 'undefined') {\n return defaultTimeZone;\n }\n return Intl.DateTimeFormat().resolvedOptions().timeZone || defaultTimeZone;\n },\n get isoCurrencyCodes(): string[] {\n // TODO(Bacon): Add this - very low priority\n return [];\n },\n get region(): string | null {\n const { locale } = this;\n if (typeof locale === 'string') {\n const [, iso] = locale.split('-');\n return iso ? iso.toUpperCase() : null;\n }\n return null;\n },\n async getLocalizationAsync(): Promise<Localization> {\n const { region, isoCurrencyCodes, timezone, locales, locale, isRTL } = this;\n return {\n region,\n isoCurrencyCodes,\n timezone,\n locales,\n locale,\n isRTL,\n };\n },\n};\n","import ExpoLocalization from './ExpoLocalization';\nimport { Localization } from './Localization.types';\n\nexport { Localization };\n\n// Web, Android, and some iOS values use `-`. This will convert the iOS values that use `_`\n// https://github.com/expo/expo/blob/21ae94bae2e8369992050c433a00699d425b35bd/packages/expo/src/Localization.ts#L112-L114\nconst parseLocale = (locale: string): string => locale.replace('_', '-');\n\n/**\n * Native device language, returned in standard format.\n *\n * @example `en`, `en-US`, `es-US`\n */\nexport const locale = parseLocale(ExpoLocalization.locale);\n/**\n * List of all the native languages provided by the user settings.\n * These are returned in the order the user defines in their native settings.\n */\nexport const locales = ExpoLocalization.locales.map(parseLocale);\n/**\n * The current timezone in display format.\n * On Web timezone is calculated with Intl.DateTimeFormat().resolvedOptions().timeZone. For a better estimation you could use the moment-timezone package but it will add significant bloat to your website's bundle size.\n *\n * @example `America/Los_Angeles`\n */\nexport const timezone = ExpoLocalization.timezone;\n/**\n * A list of all the supported language ISO codes.\n */\nexport const isoCurrencyCodes = ExpoLocalization.isoCurrencyCodes;\n/**\n * **Available on iOS and web**: Region code for your device which came from Region setting in Language & Region.\n *\n * @example `US`, `NZ`\n */\nexport const region = ExpoLocalization.region;\n/**\n * Returns if the system's language is written from Right-to-Left.\n * This can be used to build features like [bidirectional icons](https://material.io/design/usability/bidirectionality.html).\n *\n * Returns `false` in Server Side Rendering (SSR) environments.\n */\nexport const isRTL = ExpoLocalization.isRTL;\n\n/**\n * Get the latest native values from the device.\n * Locale can be changed on some Android devices without resetting the app.\n * On iOS, changing the locale will cause the device to reset meaning the constants will always be correct.\n */\nexport async function getLocalizationAsync(): Promise<Localization> {\n const { locale, locales, ...localization } = await ExpoLocalization.getLocalizationAsync();\n return {\n locale: parseLocale(locale),\n locales: ExpoLocalization.locales.map(parseLocale),\n ...localization,\n };\n}\n","// Used for delegating node actions when browser APIs aren't available\n// like in SSR websites.\nexport const isDOMAvailable = typeof window !== 'undefined' && !!window.document?.createElement;\n","import { Platform as ReactNativePlatform, PlatformOSType } from 'react-native';\n\nimport { isDOMAvailable } from './environment/browser';\n\nexport type PlatformSelectOSType = PlatformOSType | 'native' | 'electron' | 'default';\n\nexport type PlatformSelect = <T>(specifics: { [platform in PlatformSelectOSType]?: T }) => T;\n\nconst Platform = {\n /**\n * Denotes the currently running platform.\n * Can be one of ios, android, web.\n */\n OS: ReactNativePlatform.OS,\n /**\n * Returns the value with the matching platform.\n * Object keys can be any of ios, android, native, web, default.\n *\n * @ios ios, native, default\n * @android android, native, default\n * @web web, default\n */\n select: ReactNativePlatform.select as PlatformSelect,\n /**\n * Denotes if the DOM API is available in the current environment.\n * The DOM is not available in native React runtimes and Node.js.\n */\n isDOMAvailable,\n};\n\nexport default Platform;\n","import React, { Component } from 'react';\nimport { Animated, Easing } from 'react-native';\n\nconst ANIMATED_EASING_PREFIXES = ['easeInOut', 'easeOut', 'easeIn'];\n\nexport default class Collapsible extends Component {\n static defaultProps = {\n align: 'top',\n collapsed: true,\n collapsedHeight: 0,\n enablePointerEvents: false,\n duration: 300,\n easing: 'easeOutCubic',\n onAnimationEnd: () => null,\n renderChildrenCollapsed: true,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n measuring: false,\n measured: false,\n height: new Animated.Value(props.collapsedHeight),\n contentHeight: 0,\n animating: false,\n };\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.collapsed !== this.props.collapsed) {\n this.setState({ measured: false }, () =>\n this._componentDidUpdate(prevProps)\n );\n } else {\n this._componentDidUpdate(prevProps);\n }\n }\n\n componentWillUnmount() {\n this.unmounted = true;\n }\n\n _componentDidUpdate(prevProps) {\n if (prevProps.collapsed !== this.props.collapsed) {\n this._toggleCollapsed(this.props.collapsed);\n } else if (\n this.props.collapsed &&\n prevProps.collapsedHeight !== this.props.collapsedHeight\n ) {\n this.state.height.setValue(this.props.collapsedHeight);\n }\n }\n\n contentHandle = null;\n\n _handleRef = (ref) => {\n this.contentHandle = ref;\n };\n\n _measureContent(callback) {\n this.setState(\n {\n measuring: true,\n },\n () => {\n requestAnimationFrame(() => {\n if (!this.contentHandle) {\n this.setState(\n {\n measuring: false,\n },\n () => callback(this.props.collapsedHeight)\n );\n } else {\n let ref;\n if (typeof this.contentHandle.measure === 'function') {\n ref = this.contentHandle;\n } else {\n ref = this.contentHandle.getNode();\n }\n ref.measure((x, y, width, height) => {\n this.setState(\n {\n measuring: false,\n measured: true,\n contentHeight: height,\n },\n () => callback(height)\n );\n });\n }\n });\n }\n );\n }\n\n _toggleCollapsed(collapsed) {\n if (collapsed) {\n this._transitionToHeight(this.props.collapsedHeight);\n } else if (!this.contentHandle) {\n if (this.state.measured) {\n this._transitionToHeight(this.state.contentHeight);\n }\n return;\n } else {\n this._measureContent((contentHeight) => {\n this._transitionToHeight(contentHeight);\n });\n }\n }\n\n _transitionToHeight(height) {\n const { duration } = this.props;\n let easing = this.props.easing;\n if (typeof easing === 'string') {\n let prefix;\n let found = false;\n for (let i = 0; i < ANIMATED_EASING_PREFIXES.length; i++) {\n prefix = ANIMATED_EASING_PREFIXES[i];\n if (easing.substr(0, prefix.length) === prefix) {\n easing =\n easing.substr(prefix.length, 1).toLowerCase() +\n easing.substr(prefix.length + 1);\n prefix = prefix.substr(4, 1).toLowerCase() + prefix.substr(5);\n easing = Easing[prefix](Easing[easing || 'ease']);\n found = true;\n break;\n }\n }\n if (!found) {\n easing = Easing[easing];\n }\n if (!easing) {\n throw new Error('Invalid easing type \"' + this.props.easing + '\"');\n }\n }\n\n if (this._animation) {\n this._animation.stop();\n }\n this.setState({ animating: true });\n this._animation = Animated.timing(this.state.height, {\n useNativeDriver: false,\n toValue: height ? height : 0,\n duration,\n easing,\n }).start(() => {\n if (this.unmounted) {\n return;\n }\n this.setState({ animating: false }, () => {\n if (this.unmounted) {\n return;\n }\n this.props.onAnimationEnd();\n });\n });\n }\n\n _handleLayoutChange = (event) => {\n const contentHeight = event.nativeEvent.layout.height;\n if (\n this.state.animating ||\n this.props.collapsed ||\n this.state.measuring ||\n this.state.contentHeight === contentHeight\n ) {\n return;\n }\n\n this.state.height.setValue(contentHeight);\n this.setState({ contentHeight });\n };\n\n render() {\n const {\n collapsed,\n enablePointerEvents,\n renderChildrenCollapsed,\n } = this.props;\n const {\n height,\n contentHeight,\n measuring,\n measured,\n animating,\n } = this.state;\n const hasKnownHeight = !measuring && (measured || collapsed);\n const style = hasKnownHeight && {\n overflow: 'hidden',\n height: height,\n };\n const contentStyle = {};\n if (measuring) {\n contentStyle.position = 'absolute';\n contentStyle.opacity = 0;\n } else if (this.props.align === 'center') {\n contentStyle.transform = [\n {\n translateY: height.interpolate({\n inputRange: [0, contentHeight],\n outputRange: [contentHeight / -2, 0],\n }),\n },\n ];\n } else if (this.props.align === 'bottom') {\n contentStyle.transform = [\n {\n translateY: height.interpolate({\n inputRange: [0, contentHeight],\n outputRange: [-contentHeight, 0],\n }),\n },\n ];\n }\n if (animating) {\n contentStyle.height = contentHeight;\n }\n const shouldRenderChildren =\n renderChildrenCollapsed ||\n ((!collapsed || (collapsed && animating)) &&\n (animating || measuring || measured));\n\n return (\n <Animated.View\n style={style}\n pointerEvents={!enablePointerEvents && collapsed ? 'none' : 'auto'}\n >\n <Animated.View\n ref={this._handleRef}\n style={[this.props.style, contentStyle]}\n onLayout={this.state.animating ? undefined : this._handleLayoutChange}\n >\n {shouldRenderChildren && this.props.children}\n </Animated.View>\n </Animated.View>\n );\n }\n}\n","import React, { Component } from 'react';\nimport { View, TouchableHighlight, FlatList } from 'react-native';\nimport Collapsible from './Collapsible';\n\nconst COLLAPSIBLE_PROPS = [\n 'align',\n 'collapsed',\n 'collapsedHeight',\n 'renderChildrenCollapsed',\n 'enablePointerEvents',\n 'duration',\n 'easing',\n 'style',\n 'onAnimationEnd',\n];\n\nexport default class Accordion extends Component {\n static defaultProps = {\n underlayColor: 'black',\n disabled: false,\n expandFromBottom: false,\n expandMultiple: false,\n touchableComponent: TouchableHighlight,\n keyExtractor: (item, index) => index,\n renderSectionTitle: () => null,\n onAnimationEnd: () => null,\n sectionContainerStyle: {},\n renderAsFlatList: false,\n };\n\n _toggleSection(section) {\n if (!this.props.disabled) {\n const { activeSections, expandMultiple, onChange } = this.props;\n\n let updatedSections = [];\n\n if (activeSections.includes(section)) {\n updatedSections = activeSections.filter((a) => a !== section);\n } else if (expandMultiple) {\n updatedSections = [...activeSections, section];\n } else {\n updatedSections = [section];\n }\n\n if (onChange) {\n onChange(updatedSections);\n }\n }\n }\n\n _renderContainer = (section, key, renderCollapsible) => {\n const {\n activeSections,\n sectionContainerStyle,\n expandFromBottom,\n sections,\n underlayColor,\n touchableProps,\n touchableComponent: Touchable,\n renderHeader,\n renderFooter,\n renderSectionTitle,\n } = this.props;\n return (\n <View key={key} style={sectionContainerStyle}>\n {renderSectionTitle(section, key, activeSections.includes(key))}\n\n {expandFromBottom && renderCollapsible(section, key)}\n\n <Touchable\n onPress={() => this._toggleSection(key)}\n underlayColor={underlayColor}\n {...touchableProps}\n accessibilityState={{\n expanded: activeSections.includes(key),\n }}\n >\n {renderHeader(section, key, activeSections.includes(key), sections)}\n </Touchable>\n\n {!expandFromBottom && renderCollapsible(section, key)}\n\n {renderFooter &&\n renderFooter(section, key, activeSections.includes(key), sections)}\n </View>\n );\n };\n\n render() {\n const {\n activeSections,\n expandMultiple,\n onChange,\n containerStyle,\n sectionContainerStyle,\n expandFromBottom,\n sections,\n underlayColor,\n touchableProps,\n touchableComponent: Touchable,\n onAnimationEnd,\n renderContent,\n renderHeader,\n renderFooter,\n renderSectionTitle,\n disabled,\n renderAsFlatList,\n keyExtractor,\n ...restProps\n } = this.props;\n\n const viewProps = {};\n const collapsibleProps = {};\n\n Object.keys(restProps).forEach((key) => {\n if (COLLAPSIBLE_PROPS.includes(key)) {\n collapsibleProps[key] = restProps[key];\n } else {\n viewProps[key] = restProps[key];\n }\n });\n\n const renderCollapsible = (section, key) => (\n <Collapsible\n collapsed={!activeSections.includes(key)}\n {...collapsibleProps}\n onAnimationEnd={() => onAnimationEnd(section, key)}\n >\n {renderContent(section, key, activeSections.includes(key), sections)}\n </Collapsible>\n );\n\n if (renderAsFlatList) {\n return (\n <FlatList\n style={containerStyle}\n data={sections}\n extraData={activeSections}\n nestedScrollEnabled={true}\n keyExtractor={keyExtractor}\n renderItem={({ item, index }) => {\n const section = item;\n const key = keyExtractor(item, index);\n return this._renderContainer(section, key, renderCollapsible);\n }}\n {...viewProps}\n />\n );\n }\n\n return (\n <View style={containerStyle} {...viewProps}>\n {sections.map((section, index) => {\n const key = keyExtractor(section, index);\n return this._renderContainer(section, key, renderCollapsible);\n })}\n </View>\n );\n }\n}\n","export default function(d) {\n var x = +this._x.call(null, d),\n y = +this._y.call(null, d),\n z = +this._z.call(null, d);\n return add(this.cover(x, y, z), x, y, z, d);\n}\n\nfunction add(tree, x, y, z, d) {\n if (isNaN(x) || isNaN(y) || isNaN(z)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n z0 = tree._z0,\n x1 = tree._x1,\n y1 = tree._y1,\n z1 = tree._z1,\n xm,\n ym,\n zm,\n xp,\n yp,\n zp,\n right,\n bottom,\n deep,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (deep = z >= (zm = (z0 + z1) / 2)) z0 = zm; else z1 = zm;\n if (parent = node, !(node = node[i = deep << 2 | bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n zp = +tree._z.call(null, node.data);\n if (x === xp && y === yp && z === zp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(8) : tree._root = new Array(8);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (deep = z >= (zm = (z0 + z1) / 2)) z0 = zm; else z1 = zm;\n } while ((i = deep << 2 | bottom << 1 | right) === (j = (zp >= zm) << 2 | (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n z,\n xz = new Array(n),\n yz = new Array(n),\n zz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n z0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity,\n z1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d)) || isNaN(z = +this._z.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n zz[i] = z;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n if (z < z0) z0 = z;\n if (z > z1) z1 = z;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1 || z0 > z1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0, z0).cover(x1, y1, z1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], zz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y, z) {\n if (isNaN(x = +x) || isNaN(y = +y) || isNaN(z = +z)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n z0 = this._z0,\n x1 = this._x1,\n y1 = this._y1,\n z1 = this._z1;\n\n // If the octree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing octant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n z1 = (z0 = Math.floor(z)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var t = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1 || z0 > z || z >= z1) {\n i = (z < z0) << 2 | (y < y0) << 1 | (x < x0);\n parent = new Array(8), parent[i] = node, node = parent, t *= 2;\n switch (i) {\n case 0: x1 = x0 + t, y1 = y0 + t, z1 = z0 + t; break;\n case 1: x0 = x1 - t, y1 = y0 + t, z1 = z0 + t; break;\n case 2: x1 = x0 + t, y0 = y1 - t, z1 = z0 + t; break;\n case 3: x0 = x1 - t, y0 = y1 - t, z1 = z0 + t; break;\n case 4: x1 = x0 + t, y1 = y0 + t, z0 = z1 - t; break;\n case 5: x0 = x1 - t, y1 = y0 + t, z0 = z1 - t; break;\n case 6: x1 = x0 + t, y0 = y1 - t, z0 = z1 - t; break;\n case 7: x0 = x1 - t, y0 = y1 - t, z0 = z1 - t; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._z0 = z0;\n this._x1 = x1;\n this._y1 = y1;\n this._z1 = z1;\n return this;\n}\n","export default function(node, x0, y0, z0, x1, y1, z1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.z0 = z0;\n this.x1 = x1;\n this.y1 = y1;\n this.z1 = z1;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","export function defaultZ(d) {\n return d[2];\n}\n\nexport default function(_) {\n return arguments.length ? (this._z = _, this) : this._z;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add\";\nimport tree_cover from \"./cover\";\nimport tree_data from \"./data\";\nimport tree_extent from \"./extent\";\nimport tree_find from \"./find\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove\";\nimport tree_root from \"./root\";\nimport tree_size from \"./size\";\nimport tree_visit from \"./visit\";\nimport tree_visitAfter from \"./visitAfter\";\nimport tree_x, {defaultX} from \"./x\";\nimport tree_y, {defaultY} from \"./y\";\nimport tree_z, {defaultZ} from \"./z\";\n\nexport default function octree(nodes, x, y, z) {\n var tree = new Octree(x == null ? defaultX : x, y == null ? defaultY : y, z == null ? defaultZ : z, NaN, NaN, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Octree(x, y, z, x0, y0, z0, x1, y1, z1) {\n this._x = x;\n this._y = y;\n this._z = z;\n this._x0 = x0;\n this._y0 = y0;\n this._z0 = z0;\n this._x1 = x1;\n this._y1 = y1;\n this._z1 = z1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = octree.prototype = Octree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Octree(this._x, this._y, this._z, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(8)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 8; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(8)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\ntreeProto.z = tree_z;\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1], +_[0][2]).cover(+_[1][0], +_[1][1], +_[1][2])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0, this._z0], [this._x1, this._y1, this._z1]];\n}\n","import Octant from \"./octant\";\n\nexport default function(x, y, z, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n z0 = this._z0,\n x1,\n y1,\n z1,\n x2,\n y2,\n z2,\n x3 = this._x1,\n y3 = this._y1,\n z3 = this._z1,\n octs = [],\n node = this._root,\n q,\n i;\n\n if (node) octs.push(new Octant(node, x0, y0, z0, x3, y3, z3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius, z0 = z - radius;\n x3 = x + radius, y3 = y + radius, z3 = z + radius;\n radius *= radius;\n }\n\n while (q = octs.pop()) {\n\n // Stop searching if this octant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (z1 = q.z0) > z3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0\n || (z2 = q.z1) < z0) continue;\n\n // Bisect the current octant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2,\n zm = (z1 + z2) / 2;\n\n octs.push(\n new Octant(node[7], xm, ym, zm, x2, y2, z2),\n new Octant(node[6], x1, ym, zm, xm, y2, z2),\n new Octant(node[5], xm, y1, zm, x2, ym, z2),\n new Octant(node[4], x1, y1, zm, xm, ym, z2),\n new Octant(node[3], xm, ym, z1, x2, y2, zm),\n new Octant(node[2], x1, ym, z1, xm, y2, zm),\n new Octant(node[1], xm, y1, z1, x2, ym, zm),\n new Octant(node[0], x1, y1, z1, xm, ym, zm)\n );\n\n // Visit the closest octant first.\n if (i = (z >= zm) << 2 | (y >= ym) << 1 | (x >= xm)) {\n q = octs[octs.length - 1];\n octs[octs.length - 1] = octs[octs.length - 1 - i];\n octs[octs.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n dz = z - +this._z.call(null, node.data),\n d2 = dx * dx + dy * dy + dz * dz;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d, z0 = z - d;\n x3 = x + d, y3 = y + d, z3 = z + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d)) || isNaN(z = +this._z.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n z0 = this._z0,\n x1 = this._x1,\n y1 = this._y1,\n z1 = this._z1,\n x,\n y,\n z,\n xm,\n ym,\n zm,\n right,\n bottom,\n deep,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (deep = z >= (zm = (z0 + z1) / 2)) z0 = zm; else z1 = zm;\n if (!(parent = node, node = node[i = deep << 2 | bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 7] || parent[(i + 2) & 7] || parent[(i + 3) & 7] || parent[(i + 4) & 7] || parent[(i + 5) & 7] || parent[(i + 6) & 7] || parent[(i + 7) & 7]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3] || parent[4] || parent[5] || parent[6] || parent[7])\n && node === (parent[7] || parent[6] || parent[5] || parent[4] || parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Octant from \"./octant\";\n\nexport default function(callback) {\n var octs = [], q, node = this._root, child, x0, y0, z0, x1, y1, z1;\n if (node) octs.push(new Octant(node, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1));\n while (q = octs.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, z0 = q.z0, x1 = q.x1, y1 = q.y1, z1 = q.z1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2, zm = (z0 + z1) / 2;\n if (child = node[7]) octs.push(new Octant(child, xm, ym, zm, x1, y1, z1));\n if (child = node[6]) octs.push(new Octant(child, x0, ym, zm, xm, y1, z1));\n if (child = node[5]) octs.push(new Octant(child, xm, y0, zm, x1, ym, z1));\n if (child = node[4]) octs.push(new Octant(child, x0, y0, zm, xm, ym, z1));\n if (child = node[3]) octs.push(new Octant(child, xm, ym, z0, x1, y1, zm));\n if (child = node[2]) octs.push(new Octant(child, x0, ym, z0, xm, y1, zm));\n if (child = node[1]) octs.push(new Octant(child, xm, y0, z0, x1, ym, zm));\n if (child = node[0]) octs.push(new Octant(child, x0, y0, z0, xm, ym, zm));\n }\n }\n return this;\n}\n","import Octant from \"./octant\";\n\nexport default function(callback) {\n var octs = [], next = [], q;\n if (this._root) octs.push(new Octant(this._root, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1));\n while (q = octs.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, z0 = q.z0, x1 = q.x1, y1 = q.y1, z1 = q.z1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2, zm = (z0 + z1) / 2;\n if (child = node[0]) octs.push(new Octant(child, x0, y0, z0, xm, ym, zm));\n if (child = node[1]) octs.push(new Octant(child, xm, y0, z0, x1, ym, zm));\n if (child = node[2]) octs.push(new Octant(child, x0, ym, z0, xm, y1, zm));\n if (child = node[3]) octs.push(new Octant(child, xm, ym, z0, x1, y1, zm));\n if (child = node[4]) octs.push(new Octant(child, x0, y0, zm, xm, ym, z1));\n if (child = node[5]) octs.push(new Octant(child, xm, y0, zm, x1, ym, z1));\n if (child = node[6]) octs.push(new Octant(child, x0, ym, zm, xm, y1, z1));\n if (child = node[7]) octs.push(new Octant(child, xm, ym, zm, x1, y1, z1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.z0, q.x1, q.y1, q.z1);\n }\n return this;\n}\n","export default function(d) {\n const x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n","export default function(d) {\n var x = +this._x.call(null, d);\n return add(this.cover(x), x, d);\n}\n\nfunction add(tree, x, d) {\n if (isNaN(x)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n x1 = tree._x1,\n xm,\n xp,\n right,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (parent = node, !(node = node[i = +right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n if (x === xp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(2) : tree._root = new Array(2);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n } while ((i = +right) === (j = +(xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var i, n = data.length,\n x,\n xz = new Array(n),\n x0 = Infinity,\n x1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, data[i]))) continue;\n xz[i] = x;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0).cover(x1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x) {\n if (isNaN(x = +x)) return this; // ignore invalid points\n\n var x0 = this._x0,\n x1 = this._x1;\n\n // If the binarytree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing half boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1) {\n i = +(x < x0);\n parent = new Array(2), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z; break;\n case 1: x0 = x1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._x1 = x1;\n return this;\n}\n","export default function(node, x0, x1) {\n this.node = node;\n this.x0 = x0;\n this.x1 = x1;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add\";\nimport tree_cover from \"./cover\";\nimport tree_data from \"./data\";\nimport tree_extent from \"./extent\";\nimport tree_find from \"./find\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove\";\nimport tree_root from \"./root\";\nimport tree_size from \"./size\";\nimport tree_visit from \"./visit\";\nimport tree_visitAfter from \"./visitAfter\";\nimport tree_x, {defaultX} from \"./x\";\n\nexport default function binarytree(nodes, x) {\n var tree = new Binarytree(x == null ? defaultX : x, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Binarytree(x, x0, x1) {\n this._x = x;\n this._x0 = x0;\n this._x1 = x1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = binarytree.prototype = Binarytree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Binarytree(this._x, this._x0, this._x1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(2)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 2; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(2)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0]).cover(+_[1][0])\n : isNaN(this._x0) ? undefined : [[this._x0], [this._x1]];\n}\n","import Half from \"./half\";\n\nexport default function(x, radius) {\n var data,\n x0 = this._x0,\n x1,\n x2,\n x3 = this._x1,\n halves = [],\n node = this._root,\n q,\n i;\n\n if (node) halves.push(new Half(node, x0, x3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius;\n x3 = x + radius;\n }\n\n while (q = halves.pop()) {\n\n // Stop searching if this half can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (x2 = q.x1) < x0) continue;\n\n // Bisect the current half.\n if (node.length) {\n var xm = (x1 + x2) / 2;\n\n halves.push(\n new Half(node[1], xm, x2),\n new Half(node[0], x1, xm)\n );\n\n // Visit the closest half first.\n if (i = +(x >= xm)) {\n q = halves[halves.length - 1];\n halves[halves.length - 1] = halves[halves.length - 1 - i];\n halves[halves.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var d = Math.abs(x - +this._x.call(null, node.data));\n if (d < radius) {\n radius = d;\n x0 = x - d;\n x3 = x + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n x1 = this._x1,\n x,\n xm,\n right,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (!(parent = node, node = node[i = +right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 1]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1])\n && node === (parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Half from \"./half\";\n\nexport default function(callback) {\n var halves = [], q, node = this._root, child, x0, x1;\n if (node) halves.push(new Half(node, this._x0, this._x1));\n while (q = halves.pop()) {\n if (!callback(node = q.node, x0 = q.x0, x1 = q.x1) && node.length) {\n var xm = (x0 + x1) / 2;\n if (child = node[1]) halves.push(new Half(child, xm, x1));\n if (child = node[0]) halves.push(new Half(child, x0, xm));\n }\n }\n return this;\n}\n","import Half from \"./half\";\n\nexport default function(callback) {\n var halves = [], next = [], q;\n if (this._root) halves.push(new Half(this._root, this._x0, this._x1));\n while (q = halves.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, x1 = q.x1, xm = (x0 + x1) / 2;\n if (child = node[0]) halves.push(new Half(child, x0, xm));\n if (child = node[1]) halves.push(new Half(child, xm, x1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.x1);\n }\n return this;\n}\n","(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n typeof define === 'function' && define.amd ? define(factory) :\r\n (global.ResizeObserver = factory());\r\n}(this, (function () { 'use strict';\r\n\r\n/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n return result;\r\n }\r\n\r\n return (function () {\r\n function anonymous() {\r\n this.__entries__ = [];\r\n }\r\n\r\n var prototypeAccessors = { size: { configurable: true } };\r\n\r\n /**\r\n * @returns {boolean}\r\n */\r\n prototypeAccessors.size.get = function () {\r\n return this.__entries__.length;\r\n };\r\n\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n anonymous.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n\r\n return entry && entry[1];\r\n };\r\n\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n anonymous.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n } else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n anonymous.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n anonymous.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n\r\n /**\r\n * @returns {void}\r\n */\r\n anonymous.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n anonymous.prototype.forEach = function (callback, ctx) {\r\n var this$1 = this;\r\n if ( ctx === void 0 ) ctx = null;\r\n\r\n for (var i = 0, list = this$1.__entries__; i < list.length; i += 1) {\r\n var entry = list[i];\r\n\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n\r\n Object.defineProperties( anonymous.prototype, prototypeAccessors );\r\n\r\n return anonymous;\r\n }());\r\n})();\r\n\r\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\r\n\r\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\r\n\r\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\r\n\r\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nvar throttle = function (callback, delay) {\r\n var leadingCall = false,\r\n trailingCall = false,\r\n lastCallTime = 0;\r\n\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n\r\n callback();\r\n }\r\n\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n } else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n\r\n lastCallTime = timeStamp;\r\n }\r\n\r\n return proxy;\r\n};\r\n\r\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = function() {\r\n this.connected_ = false;\r\n this.mutationEventsAdded_ = false;\r\n this.mutationsObserver_ = null;\r\n this.observers_ = [];\r\n\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n};\r\n\r\n/**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n\r\n\r\n/**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n\r\n\r\n/**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n\r\n/**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\nResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n};\r\n\r\n/**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n};\r\n\r\n/**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n};\r\n\r\n/**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\nResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n\r\n return activeObservers.length > 0;\r\n};\r\n\r\n/**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n\r\n window.addEventListener('resize', this.refresh);\r\n\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n } else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n\r\n this.mutationEventsAdded_ = true;\r\n }\r\n\r\n this.connected_ = true;\r\n};\r\n\r\n/**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n};\r\n\r\n/**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.onTransitionEnd_ = function (ref) {\r\n var propertyName = ref.propertyName; if ( propertyName === void 0 ) propertyName = '';\r\n\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n};\r\n\r\n/**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\nResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n\r\n return this.instance_;\r\n};\r\n\r\nResizeObserverController.instance_ = null;\r\n\r\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var i = 0, list = Object.keys(props); i < list.length; i += 1) {\r\n var key = list[i];\r\n\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n\r\n return target;\r\n});\r\n\r\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\r\n\r\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [], len = arguments.length - 1;\r\n while ( len-- > 0 ) positions[ len ] = arguments[ len + 1 ];\r\n\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n\r\n for (var i = 0, list = positions; i < list.length; i += 1) {\r\n var position = list[i];\r\n\r\n var value = styles['padding-' + position];\r\n\r\n paddings[position] = toFloat(value);\r\n }\r\n\r\n return paddings;\r\n}\r\n\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth;\r\n var clientHeight = target.clientHeight;\r\n\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width),\r\n height = toFloat(styles.height);\r\n\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'; };\r\n})();\r\n\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n\r\n return getHTMLElementContentRect(target);\r\n}\r\n\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(ref) {\r\n var x = ref.x;\r\n var y = ref.y;\r\n var width = ref.width;\r\n var height = ref.height;\r\n\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n\r\n return rect;\r\n}\r\n\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\r\n\r\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = function(target) {\r\n this.broadcastWidth = 0;\r\n this.broadcastHeight = 0;\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n\r\n this.target = target;\r\n};\r\n\r\n/**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n\r\n\r\n/**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n\r\n\r\n/**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\nResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n\r\n this.contentRect_ = rect;\r\n\r\n return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\r\n};\r\n\r\n/**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\nResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n\r\n return rect;\r\n};\r\n\r\nvar ResizeObserverEntry = function(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n};\r\n\r\nvar ResizeObserverSPI = function(callback, controller, callbackCtx) {\r\n this.activeObservations_ = [];\r\n this.observations_ = new MapShim();\r\n\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n};\r\n\r\n/**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n\r\n\r\n/**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n\r\n\r\n/**\r\n * Public ResizeObserver instance which will be passed to the callback\r\n * function and used as a value of it's \"this\" binding.\r\n *\r\n * @private {ResizeObserver}\r\n */\r\n\r\n/**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\nResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n\r\n var observations = this.observations_;\r\n\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n\r\n observations.set(target, new ResizeObservation(target));\r\n\r\n this.controller_.addObserver(this);\r\n\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n};\r\n\r\n/**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n\r\n var observations = this.observations_;\r\n\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n\r\n observations.delete(target);\r\n\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n};\r\n\r\n/**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n};\r\n\r\n/**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.gatherActive = function () {\r\n var this$1 = this;\r\n\r\n this.clearActive();\r\n\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n this$1.activeObservations_.push(observation);\r\n }\r\n });\r\n};\r\n\r\n/**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n\r\n var ctx = this.callbackCtx_;\r\n\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n};\r\n\r\n/**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n};\r\n\r\n/**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\nResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n};\r\n\r\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = function(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n\r\n observers.set(this, observer);\r\n};\r\n\r\n// Expose public methods of ResizeObserver.\r\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n return (ref = observers.get(this))[method].apply(ref, arguments);\r\n var ref;\r\n };\r\n});\r\n\r\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n\r\n global$1.ResizeObserver = ResizeObserver;\r\n\r\n return ResizeObserver;\r\n})();\r\n\r\nreturn index;\r\n\r\n})));\r\n","import registerRootComponent from 'expo/build/launch/registerRootComponent';\n\nimport App from '../../App';\n\nregisterRootComponent(App);\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\n\nvar self;\nvar RtlDetectLib = self = { // eslint-disable-line consistent-this\n // Private vars - star\n _regexEscape: /([\\.\\*\\+\\^\\$\\[\\]\\\\\\(\\)\\|\\{\\}\\,\\-\\:\\?])/g, // eslint-disable-line no-useless-escape\n _regexParseLocale: /^([a-zA-Z]*)([_\\-a-zA-Z]*)$/,\n // Private vars - end\n\n // Private functions - star\n _escapeRegExpPattern: function (str) {\n if (typeof str !== 'string') {\n return str;\n }\n return str.replace(self._regexEscape, '\\\\$1');\n },\n\n _toLowerCase: function (str, reserveReturnValue) {\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n return str.toLowerCase();\n },\n\n _toUpperCase: function (str, reserveReturnValue) {\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n return str.toUpperCase();\n },\n\n _trim: function (str, delimiter, reserveReturnValue) {\n var patterns = [];\n var regexp;\n var addPatterns = function (pattern) {\n // Build trim RegExp pattern and push it to patterns array\n patterns.push('^' + pattern + '+|' + pattern + '+$');\n };\n\n // fix reserveReturnValue value\n if (typeof delimiter === 'boolean') {\n reserveReturnValue = delimiter;\n delimiter = null;\n }\n\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n\n // Trim based on delimiter array values\n if (Array.isArray(delimiter)) {\n // Loop through delimiter array\n delimiter.map(function (item) {\n // Escape delimiter to be valid RegExp Pattern\n var pattern = self._escapeRegExpPattern(item);\n // Push pattern to patterns array\n addPatterns(pattern);\n });\n }\n\n // Trim based on delimiter string value\n if (typeof delimiter === 'string') {\n // Escape delimiter to be valid RegExp Pattern\n var patternDelimiter = self._escapeRegExpPattern(delimiter);\n // push pattern to patterns array\n addPatterns(patternDelimiter);\n }\n\n // If delimiter is not defined, Trim white spaces\n if (!delimiter) {\n // Push white space pattern to patterns array\n addPatterns('\\\\s');\n }\n\n // Build RegExp pattern\n var pattern = '(' + patterns.join('|') + ')';\n // Build RegExp object\n regexp = new RegExp(pattern, 'g');\n\n // trim string for all patterns\n while (str.match(regexp)) {\n str = str.replace(regexp, '');\n }\n\n // Return trim string\n return str;\n },\n\n _parseLocale : function (strLocale) {\n var matches = self._regexParseLocale.exec(strLocale); // exec regex\n var parsedLocale;\n var lang;\n var countryCode;\n\n if (!strLocale || !matches) {\n return;\n }\n\n // fix countryCode string by trimming '-' and '_'\n matches[2] = self._trim(matches[2], ['-', '_']);\n\n lang = self._toLowerCase(matches[1]);\n countryCode = self._toUpperCase(matches[2]) || countryCode;\n\n // object with lang, countryCode properties\n parsedLocale = {\n lang: lang,\n countryCode: countryCode\n };\n\n // return parsed locale object\n return parsedLocale;\n },\n // Private functions - End\n\n // Public functions - star\n isRtlLang: function (strLocale) {\n var objLocale = self._parseLocale(strLocale);\n if (!objLocale) {\n return;\n }\n // return true if the intel string lang exists in the BID RTL LANGS array else return false\n return (self._BIDI_RTL_LANGS.indexOf(objLocale.lang) >= 0);\n },\n\n getLangDir: function (strLocale) {\n // return 'rtl' if the intel string lang exists in the BID RTL LANGS array else return 'ltr'\n return self.isRtlLang(strLocale) ? 'rtl' : 'ltr';\n }\n\n // Public functions - End\n};\n\n// Const BIDI_RTL_LANGS Array\n// BIDI_RTL_LANGS ref: http://en.wikipedia.org/wiki/Right-to-left\n// Table of scripts in Unicode: https://en.wikipedia.org/wiki/Script_(Unicode)\nObject.defineProperty(self, '_BIDI_RTL_LANGS', {\n value: [\n 'ae',\t/* Avestan */\n 'ar', /* 'العربية', Arabic */\n 'arc', /* Aramaic */\n 'bcc', /* 'بلوچی مکرانی', Southern Balochi */\n 'bqi', /* 'بختياري', Bakthiari */\n 'ckb', /* 'Soranî / کوردی', Sorani */\n 'dv', /* Dhivehi */\n 'fa', /* 'فارسی', Persian */\n 'glk', /* 'گیلکی', Gilaki */\n 'ku', /* 'Kurdî / كوردی', Kurdish */\n 'mzn', /* 'مازِرونی', Mazanderani */\n 'nqo', /* N'Ko */\n 'pnb', /* 'پنجابی', Western Punjabi */\n 'ps', /* 'پښتو', Pashto, */\n 'sd', /* 'سنڌي', Sindhi */\n 'ug', /* 'Uyghurche / ئۇيغۇرچە', Uyghur */\n 'ur' /* 'اردو', Urdu */\n ],\n writable: false,\n enumerable: true,\n configurable: false\n});\n\n\nmodule.exports = RtlDetectLib;\n","/** @license React v16.13.1\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var l=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}\nvar D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,\"setState\")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};\nfunction G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}var I=H.prototype=new G;I.constructor=H;l(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=\"\"+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}}\nfunction N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}}\nfunction S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)}\nfunction T(a,b,c,e){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e)}else if(null===a||\"object\"!==typeof a?f=null:(f=B&&a[B]||a[\"@@iterator\"],f=\"function\"===typeof f?f:null),\"function\"===typeof f)for(a=f.call(a),k=\n0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if(\"object\"===d)throw c=\"\"+a,Error(C(31,\"[object Object]\"===c?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":c,\"\"));return g}function V(a,b,c){return null==a?0:T(a,\"\",b,c)}function U(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++)}\nfunction aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?\"\":(\"\"+a.key).replace(P,\"$&/\")+\"/\")+c)),e.push(a))}function X(a,b,c,e,d){var g=\"\";null!=c&&(g=(\"\"+c).replace(P,\"$&/\")+\"/\");b=R(b,g,e,d);V(a,aa,b);S(b)}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a}\nvar ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}};\nexports.Component=F;exports.Fragment=r;exports.Profiler=u;exports.PureComponent=H;exports.StrictMode=t;exports.Suspense=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba;\nexports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=l({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=\"\"+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type,\nkey:d,ref:g,props:e,_owner:k}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:x,render:a}};exports.isValidElement=O;\nexports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};\nexports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version=\"16.13.1\";\n","'use strict';\nmodule.exports = function (x) {\n\tvar type = typeof x;\n\treturn x !== null && (type === 'object' || type === 'function');\n};\n","/** @license React v17.0.2\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),m=require(\"object-assign\"),r=require(\"scheduler\");function y(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}if(!aa)throw Error(y(227));var ba=new Set,ca={};function da(a,b){ea(a,b);ea(a+\"Capture\",b)}\nfunction ea(a,b){ca[a]=b;for(a=0;a<b.length;a++)ba.add(b[a])}\nvar fa=!(\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement),ha=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,ia=Object.prototype.hasOwnProperty,\nja={},ka={};function la(a){if(ia.call(ka,a))return!0;if(ia.call(ja,a))return!1;if(ha.test(a))return ka[a]=!0;ja[a]=!0;return!1}function ma(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case \"function\":case \"symbol\":return!0;case \"boolean\":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return\"data-\"!==a&&\"aria-\"!==a;default:return!1}}\nfunction na(a,b,c,d){if(null===b||\"undefined\"===typeof b||ma(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||\"o\"!==b[0]&&\"O\"!==b[0]||\"n\"!==b[1]&&\"N\"!==b[1]?!1:!0;f||(na(b,c,e,d)&&(c=null),d||null===e?la(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,\"\"+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:\"\":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?\"\":\"\"+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}\nvar ra=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sa=60103,ta=60106,ua=60107,wa=60108,xa=60114,ya=60109,za=60110,Aa=60112,Ba=60113,Ca=60120,Da=60115,Ea=60116,Fa=60121,Ga=60128,Ha=60129,Ia=60130,Ja=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var E=Symbol.for;sa=E(\"react.element\");ta=E(\"react.portal\");ua=E(\"react.fragment\");wa=E(\"react.strict_mode\");xa=E(\"react.profiler\");ya=E(\"react.provider\");za=E(\"react.context\");Aa=E(\"react.forward_ref\");Ba=E(\"react.suspense\");Ca=E(\"react.suspense_list\");Da=E(\"react.memo\");Ea=E(\"react.lazy\");Fa=E(\"react.block\");E(\"react.scope\");Ga=E(\"react.opaque.id\");Ha=E(\"react.debug_trace_mode\");Ia=E(\"react.offscreen\");Ja=E(\"react.legacy_hidden\")}\nvar Ka=\"function\"===typeof Symbol&&Symbol.iterator;function La(a){if(null===a||\"object\"!==typeof a)return null;a=Ka&&a[Ka]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}var Ma;function Na(a){if(void 0===Ma)try{throw Error();}catch(c){var b=c.stack.trim().match(/\\n( *(at )?)/);Ma=b&&b[1]||\"\"}return\"\\n\"+Ma+a}var Oa=!1;\nfunction Pa(a,b){if(!a||Oa)return\"\";Oa=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,\"props\",{set:function(){throw Error();}}),\"object\"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();}catch(k){d=k}a()}}catch(k){if(k&&d&&\"string\"===typeof k.stack){for(var e=k.stack.split(\"\\n\"),\nf=d.stack.split(\"\\n\"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b[\"$\"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty(\"$\"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=\"\"+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}\nfunction gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(y(91));return m({},b,{value:void 0,defaultValue:void 0,children:\"\"+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(y(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"<svg>\"+b.valueOf().toString()+\"</svg>\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a])}}function Gb(a,b){return a(b)}function Hb(a,b,c,d,e){return a(b,c,d,e)}function Ib(){}var Jb=Gb,Kb=!1,Lb=!1;function Mb(){if(null!==zb||null!==Ab)Ib(),Fb()}\nfunction Nb(a,b,c){if(Lb)return a(b,c);Lb=!0;try{return Jb(a,b,c)}finally{Lb=!1,Mb()}}\nfunction Ob(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==\ntypeof c)throw Error(y(231,b,typeof c));return c}var Pb=!1;if(fa)try{var Qb={};Object.defineProperty(Qb,\"passive\",{get:function(){Pb=!0}});window.addEventListener(\"test\",Qb,Qb);window.removeEventListener(\"test\",Qb,Qb)}catch(a){Pb=!1}function Rb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(n){this.onError(n)}}var Sb=!1,Tb=null,Ub=!1,Vb=null,Wb={onError:function(a){Sb=!0;Tb=a}};function Xb(a,b,c,d,e,f,g,h,k){Sb=!1;Tb=null;Rb.apply(Wb,arguments)}\nfunction Yb(a,b,c,d,e,f,g,h,k){Xb.apply(this,arguments);if(Sb){if(Sb){var l=Tb;Sb=!1;Tb=null}else throw Error(y(198));Ub||(Ub=!0,Vb=l)}}function Zb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function $b(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function ac(a){if(Zb(a)!==a)throw Error(y(188));}\nfunction bc(a){var b=a.alternate;if(!b){b=Zb(a);if(null===b)throw Error(y(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return ac(e),a;if(f===d)return ac(e),b;f=f.sibling}throw Error(y(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===\nc){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(y(189));}}if(c.alternate!==d)throw Error(y(190));}if(3!==c.tag)throw Error(y(188));return c.stateNode.current===c?a:b}function cc(a){a=bc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}\nfunction dc(a,b){for(var c=a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}var ec,fc,gc,hc,ic=!1,jc=[],kc=null,lc=null,mc=null,nc=new Map,oc=new Map,pc=[],qc=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");\nfunction rc(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function sc(a,b){switch(a){case \"focusin\":case \"focusout\":kc=null;break;case \"dragenter\":case \"dragleave\":lc=null;break;case \"mouseover\":case \"mouseout\":mc=null;break;case \"pointerover\":case \"pointerout\":nc.delete(b.pointerId);break;case \"gotpointercapture\":case \"lostpointercapture\":oc.delete(b.pointerId)}}\nfunction tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=rc(b,c,d,e,f),null!==b&&(b=Cb(b),null!==b&&fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}\nfunction uc(a,b,c,d,e){switch(b){case \"focusin\":return kc=tc(kc,a,b,c,d,e),!0;case \"dragenter\":return lc=tc(lc,a,b,c,d,e),!0;case \"mouseover\":return mc=tc(mc,a,b,c,d,e),!0;case \"pointerover\":var f=e.pointerId;nc.set(f,tc(nc.get(f)||null,a,b,c,d,e));return!0;case \"gotpointercapture\":return f=e.pointerId,oc.set(f,tc(oc.get(f)||null,a,b,c,d,e)),!0}return!1}\nfunction vc(a){var b=wc(a.target);if(null!==b){var c=Zb(b);if(null!==c)if(b=c.tag,13===b){if(b=$b(c),null!==b){a.blockedOn=b;hc(a.lanePriority,function(){r.unstable_runWithPriority(a.priority,function(){gc(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}\nfunction xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c)return b=Cb(c),null!==b&&fc(b),a.blockedOn=c,!1;b.shift()}return!0}function zc(a,b,c){xc(a)&&c.delete(b)}\nfunction Ac(){for(ic=!1;0<jc.length;){var a=jc[0];if(null!==a.blockedOn){a=Cb(a.blockedOn);null!==a&&ec(a);break}for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&jc.shift()}null!==kc&&xc(kc)&&(kc=null);null!==lc&&xc(lc)&&(lc=null);null!==mc&&xc(mc)&&(mc=null);nc.forEach(zc);oc.forEach(zc)}\nfunction Bc(a,b){a.blockedOn===b&&(a.blockedOn=null,ic||(ic=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ac)))}\nfunction Cc(a){function b(b){return Bc(b,a)}if(0<jc.length){Bc(jc[0],a);for(var c=1;c<jc.length;c++){var d=jc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==kc&&Bc(kc,a);null!==lc&&Bc(lc,a);null!==mc&&Bc(mc,a);nc.forEach(b);oc.forEach(b);for(c=0;c<pc.length;c++)d=pc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<pc.length&&(c=pc[0],null===c.blockedOn);)vc(c),null===c.blockedOn&&pc.shift()}\nfunction Dc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;return c}var Ec={animationend:Dc(\"Animation\",\"AnimationEnd\"),animationiteration:Dc(\"Animation\",\"AnimationIteration\"),animationstart:Dc(\"Animation\",\"AnimationStart\"),transitionend:Dc(\"Transition\",\"TransitionEnd\")},Fc={},Gc={};\nfa&&(Gc=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),\"TransitionEvent\"in window||delete Ec.transitionend.transition);function Hc(a){if(Fc[a])return Fc[a];if(!Ec[a])return a;var b=Ec[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Gc)return Fc[a]=b[c];return a}\nvar Ic=Hc(\"animationend\"),Jc=Hc(\"animationiteration\"),Kc=Hc(\"animationstart\"),Lc=Hc(\"transitionend\"),Mc=new Map,Nc=new Map,Oc=[\"abort\",\"abort\",Ic,\"animationEnd\",Jc,\"animationIteration\",Kc,\"animationStart\",\"canplay\",\"canPlay\",\"canplaythrough\",\"canPlayThrough\",\"durationchange\",\"durationChange\",\"emptied\",\"emptied\",\"encrypted\",\"encrypted\",\"ended\",\"ended\",\"error\",\"error\",\"gotpointercapture\",\"gotPointerCapture\",\"load\",\"load\",\"loadeddata\",\"loadedData\",\"loadedmetadata\",\"loadedMetadata\",\"loadstart\",\"loadStart\",\n\"lostpointercapture\",\"lostPointerCapture\",\"playing\",\"playing\",\"progress\",\"progress\",\"seeking\",\"seeking\",\"stalled\",\"stalled\",\"suspend\",\"suspend\",\"timeupdate\",\"timeUpdate\",Lc,\"transitionEnd\",\"waiting\",\"waiting\"];function Pc(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e=\"on\"+(e[0].toUpperCase()+e.slice(1));Nc.set(d,b);Mc.set(d,e);da(e,[d])}}var Qc=r.unstable_now;Qc();var F=8;\nfunction Rc(a){if(0!==(1&a))return F=15,1;if(0!==(2&a))return F=14,2;if(0!==(4&a))return F=13,4;var b=24&a;if(0!==b)return F=12,b;if(0!==(a&32))return F=11,32;b=192&a;if(0!==b)return F=10,b;if(0!==(a&256))return F=9,256;b=3584&a;if(0!==b)return F=8,b;if(0!==(a&4096))return F=7,4096;b=4186112&a;if(0!==b)return F=6,b;b=62914560&a;if(0!==b)return F=5,b;if(a&67108864)return F=4,67108864;if(0!==(a&134217728))return F=3,134217728;b=805306368&a;if(0!==b)return F=2,b;if(0!==(1073741824&a))return F=1,1073741824;\nF=8;return a}function Sc(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Tc(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(y(358,a));}}\nfunction Uc(a,b){var c=a.pendingLanes;if(0===c)return F=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=F=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=Rc(k),e=F):(h&=f,0!==h&&(d=Rc(h),e=F))}else f=c&~g,0!==f?(d=Rc(f),e=F):0!==h&&(d=Rc(h),e=F);if(0===d)return 0;d=31-Vc(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){Rc(b);if(e<=F)return b;F=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Vc(b),e=1<<c,d|=a[c],b&=~e;return d}\nfunction Wc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Xc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=Yc(24&~b),0===a?Xc(10,b):a;case 10:return a=Yc(192&~b),0===a?Xc(8,b):a;case 8:return a=Yc(3584&~b),0===a&&(a=Yc(4186112&~b),0===a&&(a=512)),a;case 2:return b=Yc(805306368&~b),0===b&&(b=268435456),b}throw Error(y(358,a));}function Yc(a){return a&-a}function Zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0<jc.length&&-1<qc.indexOf(a))a=rc(null,a,b,c,d),jc.push(a);else{var f=yc(a,b,c,d);if(null===f)e&&sc(a,d);else{if(e){if(-1<qc.indexOf(a)){a=rc(f,a,b,c,d);jc.push(a);return}if(uc(f,a,b,c,d))return;sc(a,d)}jd(a,b,d,null,c)}}}}\nfunction yc(a,b,c,d){var e=xb(d);e=wc(e);if(null!==e){var f=Zb(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=$b(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==e&&(e=null)}}jd(a,b,d,e,c);return null}var kd=null,ld=null,md=null;\nfunction nd(){if(md)return md;var a,b=ld,c=b.length,d,e=\"value\"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)}function od(a){var b=a.keyCode;\"charCode\"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return!0}function qd(){return!1}\nfunction rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}m(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():\"unknown\"!==typeof a.returnValue&&\n(a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():\"unknown\"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd});return b}\nvar sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=m({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=m({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if(\"movementX\"in\na)return a.movementX;a!==yd&&(yd&&\"mousemove\"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return\"movementY\"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=m({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=m({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=m({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=m({},sd,{clipboardData:function(a){return\"clipboardData\"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=m({},sd,{data:0}),Ld=rd(Kd),Md={Esc:\"Escape\",\nSpacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Nd={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",\n119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},Od={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:!1}function zd(){return Pd}\nvar Qd=m({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if(\"Unidentified\"!==b)return b}return\"keypress\"===a.type?(a=od(a),13===a?\"Enter\":String.fromCharCode(a)):\"keydown\"===a.type||\"keyup\"===a.type?Nd[a.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return\"keypress\"===a.type?od(a):0},keyCode:function(a){return\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0},which:function(a){return\"keypress\"===\na.type?od(a):\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=m({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=m({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=m({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=m({},Ad,{deltaX:function(a){return\"deltaX\"in a?a.deltaX:\"wheelDeltaX\"in a?-a.wheelDeltaX:0},\ndeltaY:function(a){return\"deltaY\"in a?a.deltaY:\"wheelDeltaY\"in a?-a.wheelDeltaY:\"wheelDelta\"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=fa&&\"CompositionEvent\"in window,be=null;fa&&\"documentMode\"in document&&(be=document.documentMode);var ce=fa&&\"TextEvent\"in window&&!be,de=fa&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case \"compositionend\":return de&&\"ko\"!==b.locale?null:b.data;default:return null}}\nvar le={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return\"input\"===b?!!le[a.type]:\"textarea\"===b?!0:!1}function ne(a,b,c,d){Eb(d);b=oe(b,\"onChange\");0<b.length&&(c=new td(\"onChange\",\"change\",null,c,d),a.push({event:c,listeners:b}))}var pe=null,qe=null;function re(a){se(a,0)}function te(a){var b=ue(a);if(Wa(b))return a}\nfunction ve(a,b){if(\"change\"===a)return b}var we=!1;if(fa){var xe;if(fa){var ye=\"oninput\"in document;if(!ye){var ze=document.createElement(\"div\");ze.setAttribute(\"oninput\",\"return;\");ye=\"function\"===typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent(\"onpropertychange\",Be),qe=pe=null)}function Be(a){if(\"value\"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));a=re;if(Kb)a(b);else{Kb=!0;try{Gb(a,b)}finally{Kb=!1,Mb()}}}}\nfunction Ce(a,b,c){\"focusin\"===a?(Ae(),pe=b,qe=c,pe.attachEvent(\"onpropertychange\",Be)):\"focusout\"===a&&Ae()}function De(a){if(\"selectionchange\"===a||\"keyup\"===a||\"keydown\"===a)return te(qe)}function Ee(a,b){if(\"click\"===a)return te(b)}function Fe(a,b){if(\"input\"===a||\"change\"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He=\"function\"===typeof Object.is?Object.is:Ge,Ie=Object.prototype.hasOwnProperty;\nfunction Je(a,b){if(He(a,b))return!0;if(\"object\"!==typeof a||null===a||\"object\"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Ie.call(b,c[d])||!He(a[c[d]],b[c[d]]))return!1;return!0}function Ke(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Le(a,b){var c=Ke(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0<d.length&&(b=new td(\"onSelect\",\"select\",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)))}\nPc(\"cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange\".split(\" \"),\n0);Pc(\"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel\".split(\" \"),1);Pc(Oc,2);for(var Ve=\"change selectionchange textInput compositionstart compositionend compositionupdate\".split(\" \"),We=0;We<Ve.length;We++)Nc.set(Ve[We],0);ea(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]);\nea(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]);ea(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]);ea(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]);da(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \"));da(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \"));da(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]);da(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \"));\nda(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \"));da(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var Xe=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),Ye=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(Xe));\nfunction Ze(a,b,c){var d=a.type||\"unknown-event\";a.currentTarget=c;Yb(d,b,void 0,a);a.currentTarget=null}\nfunction se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}}}if(Ub)throw a=Vb,Ub=!1,Vb=null,a;}\nfunction G(a,b){var c=$e(b),d=a+\"__bubble\";c.has(d)||(af(b,a,2,!1),c.add(d))}var bf=\"_reactListening\"+Math.random().toString(36).slice(2);function cf(a){a[bf]||(a[bf]=!0,ba.forEach(function(b){Ye.has(b)||df(b,!1,a,null);df(b,!0,a,null)}))}\nfunction df(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;\"selectionchange\"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Ye.has(a)){if(\"scroll\"!==a)return;e|=2;f=d}var g=$e(f),h=a+\"__\"+(b?\"capture\":\"bubble\");g.has(h)||(b&&(e|=4),af(f,a,e,b),g.add(h))}\nfunction af(a,b,c,d){var e=Nc.get(b);switch(void 0===e?2:e){case 0:e=gd;break;case 1:e=id;break;default:e=hd}c=e.bind(null,b,c,a);e=void 0;!Pb||\"touchstart\"!==b&&\"touchmove\"!==b&&\"wheel\"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}\nfunction jd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Nb(function(){var d=f,e=xb(c),g=[];\na:{var h=Mc.get(a);if(void 0!==h){var k=td,x=a;switch(a){case \"keypress\":if(0===od(c))break a;case \"keydown\":case \"keyup\":k=Rd;break;case \"focusin\":x=\"focus\";k=Fd;break;case \"focusout\":x=\"blur\";k=Fd;break;case \"beforeblur\":case \"afterblur\":k=Fd;break;case \"click\":if(2===c.button)break a;case \"auxclick\":case \"dblclick\":case \"mousedown\":case \"mousemove\":case \"mouseup\":case \"mouseout\":case \"mouseover\":case \"contextmenu\":k=Bd;break;case \"drag\":case \"dragend\":case \"dragenter\":case \"dragexit\":case \"dragleave\":case \"dragover\":case \"dragstart\":case \"drop\":k=\nDd;break;case \"touchcancel\":case \"touchend\":case \"touchmove\":case \"touchstart\":k=Vd;break;case Ic:case Jc:case Kc:k=Hd;break;case Lc:k=Xd;break;case \"scroll\":k=vd;break;case \"wheel\":k=Zd;break;case \"copy\":case \"cut\":case \"paste\":k=Jd;break;case \"gotpointercapture\":case \"lostpointercapture\":case \"pointercancel\":case \"pointerdown\":case \"pointermove\":case \"pointerout\":case \"pointerover\":case \"pointerup\":k=Td}var w=0!==(b&4),z=!w&&\"scroll\"===a,u=w?null!==h?h+\"Capture\":null:h;w=[];for(var t=d,q;null!==\nt;){q=t;var v=q.stateNode;5===q.tag&&null!==v&&(q=v,null!==u&&(v=Ob(t,u),null!=v&&w.push(ef(t,v,q))));if(z)break;t=t.return}0<w.length&&(h=new k(h,x,null,c,e),g.push({event:h,listeners:w}))}}if(0===(b&7)){a:{h=\"mouseover\"===a||\"pointerover\"===a;k=\"mouseout\"===a||\"pointerout\"===a;if(h&&0===(b&16)&&(x=c.relatedTarget||c.fromElement)&&(wc(x)||x[ff]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(x=c.relatedTarget||c.toElement,k=d,x=x?wc(x):null,null!==\nx&&(z=Zb(x),x!==z||5!==x.tag&&6!==x.tag))x=null}else k=null,x=d;if(k!==x){w=Bd;v=\"onMouseLeave\";u=\"onMouseEnter\";t=\"mouse\";if(\"pointerout\"===a||\"pointerover\"===a)w=Td,v=\"onPointerLeave\",u=\"onPointerEnter\",t=\"pointer\";z=null==k?h:ue(k);q=null==x?h:ue(x);h=new w(v,t+\"leave\",k,c,e);h.target=z;h.relatedTarget=q;v=null;wc(e)===d&&(w=new w(u,t+\"enter\",x,c,e),w.target=q,w.relatedTarget=z,v=w);z=v;if(k&&x)b:{w=k;u=x;t=0;for(q=w;q;q=gf(q))t++;q=0;for(v=u;v;v=gf(v))q++;for(;0<t-q;)w=gf(w),t--;for(;0<q-t;)u=\ngf(u),q--;for(;t--;){if(w===u||null!==u&&w===u.alternate)break b;w=gf(w);u=gf(u)}w=null}else w=null;null!==k&&hf(g,h,k,w,!1);null!==x&&null!==z&&hf(g,z,x,w,!0)}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if(\"select\"===k||\"input\"===k&&\"file\"===h.type)var J=ve;else if(me(h))if(we)J=Fe;else{J=De;var K=Ce}else(k=h.nodeName)&&\"input\"===k.toLowerCase()&&(\"checkbox\"===h.type||\"radio\"===h.type)&&(J=Ee);if(J&&(J=J(a,d))){ne(g,J,c,e);break a}K&&K(a,h,d);\"focusout\"===a&&(K=h._wrapperState)&&\nK.controlled&&\"number\"===h.type&&bb(h,\"number\",h.value)}K=d?ue(d):window;switch(a){case \"focusin\":if(me(K)||\"true\"===K.contentEditable)Qe=K,Re=d,Se=null;break;case \"focusout\":Se=Re=Qe=null;break;case \"mousedown\":Te=!0;break;case \"contextmenu\":case \"mouseup\":case \"dragend\":Te=!1;Ue(g,c,e);break;case \"selectionchange\":if(Pe)break;case \"keydown\":case \"keyup\":Ue(g,c,e)}var Q;if(ae)b:{switch(a){case \"compositionstart\":var L=\"onCompositionStart\";break b;case \"compositionend\":L=\"onCompositionEnd\";break b;\ncase \"compositionupdate\":L=\"onCompositionUpdate\";break b}L=void 0}else ie?ge(a,c)&&(L=\"onCompositionEnd\"):\"keydown\"===a&&229===c.keyCode&&(L=\"onCompositionStart\");L&&(de&&\"ko\"!==c.locale&&(ie||\"onCompositionStart\"!==L?\"onCompositionEnd\"===L&&ie&&(Q=nd()):(kd=e,ld=\"value\"in kd?kd.value:kd.textContent,ie=!0)),K=oe(d,L),0<K.length&&(L=new Ld(L,a,null,c,e),g.push({event:L,listeners:K}),Q?L.data=Q:(Q=he(c),null!==Q&&(L.data=Q))));if(Q=ce?je(a,c):ke(a,c))d=oe(d,\"onBeforeInput\"),0<d.length&&(e=new Ld(\"onBeforeInput\",\n\"beforeinput\",null,c,e),g.push({event:e,listeners:d}),e.data=Q)}se(g,b)})}function ef(a,b,c){return{instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+\"Capture\",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Ob(a,c),null!=f&&d.unshift(ef(a,f,e)),f=Ob(a,b),null!=f&&d.push(ef(a,f,e)));a=a.return}return d}function gf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}\nfunction hf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Ob(c,f),null!=k&&g.unshift(ef(c,k,h))):e||(k=Ob(c,f),null!=k&&g.push(ef(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function jf(){}var kf=null,lf=null;function mf(a,b){switch(a){case \"button\":case \"input\":case \"select\":case \"textarea\":return!!b.autoFocus}return!1}\nfunction nf(a,b){return\"textarea\"===a||\"option\"===a||\"noscript\"===a||\"string\"===typeof b.children||\"number\"===typeof b.children||\"object\"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var of=\"function\"===typeof setTimeout?setTimeout:void 0,pf=\"function\"===typeof clearTimeout?clearTimeout:void 0;function qf(a){1===a.nodeType?a.textContent=\"\":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=\"\"))}\nfunction rf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function sf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(\"$\"===c||\"$!\"===c||\"$?\"===c){if(0===b)return a;b--}else\"/$\"===c&&b++}a=a.previousSibling}return null}var tf=0;function uf(a){return{$$typeof:Ga,toString:a,valueOf:a}}var vf=Math.random().toString(36).slice(2),wf=\"__reactFiber$\"+vf,xf=\"__reactProps$\"+vf,ff=\"__reactContainer$\"+vf,yf=\"__reactEvents$\"+vf;\nfunction wc(a){var b=a[wf];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ff]||c[wf]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=sf(a);null!==a;){if(c=a[wf])return c;a=sf(a)}return b}a=c;c=a.parentNode}return null}function Cb(a){a=a[wf]||a[ff];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(y(33));}function Db(a){return a[xf]||null}\nfunction $e(a){var b=a[yf];void 0===b&&(b=a[yf]=new Set);return b}var zf=[],Af=-1;function Bf(a){return{current:a}}function H(a){0>Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});ag=null}catch(c){throw null!==ag&&(ag=ag.slice(a+1)),Of(Uf,ig),c;}finally{cg=!1}}}var kg=ra.ReactCurrentBatchConfig;function lg(a,b){if(a&&a.defaultProps){b=m({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var mg=Bf(null),ng=null,og=null,pg=null;function qg(){pg=og=ng=null}\nfunction rg(a){var b=mg.current;H(mg);a.type._context._currentValue=b}function sg(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function tg(a,b){ng=a;pg=og=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ug=!0),a.firstContext=null)}\nfunction vg(a,b){if(pg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)pg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===og){if(null===ng)throw Error(y(308));og=b;ng.dependencies={lanes:0,firstContext:b,responders:null}}else og=og.next=b}return a._currentValue}var wg=!1;function xg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}\nfunction yg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function zg(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}function Ag(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}\nfunction Bg(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=\nb;c.lastBaseUpdate=b}\nfunction Cg(a,b,c,d){var e=a.updateQueue;wg=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var n=a.alternate;if(null!==n){n=n.updateQueue;var A=n.lastBaseUpdate;A!==g&&(null===A?n.firstBaseUpdate=l:A.next=l,n.lastBaseUpdate=k)}}if(null!==f){A=e.baseState;g=0;n=l=k=null;do{h=f.lane;var p=f.eventTime;if((d&h)===h){null!==n&&(n=n.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,\nnext:null});a:{var C=a,x=f;h=b;p=c;switch(x.tag){case 1:C=x.payload;if(\"function\"===typeof C){A=C.call(p,A,h);break a}A=C;break a;case 3:C.flags=C.flags&-4097|64;case 0:C=x.payload;h=\"function\"===typeof C?C.call(p,A,h):C;if(null===h||void 0===h)break a;A=m({},A,h);break a;case 2:wg=!0}}null!==f.callback&&(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else p={eventTime:p,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===n?(l=n=p,k=A):n=n.next=p,g|=h;f=f.next;if(null===\nf)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===n&&(k=A);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=n;Dg|=g;a.lanes=g;a.memoizedState=A}}function Eg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if(\"function\"!==typeof e)throw Error(y(191,e));e.call(d)}}}var Fg=(new aa.Component).refs;\nfunction Gg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:m({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}\nvar Kg={isMounted:function(a){return(a=a._reactInternals)?Zb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Hg(),d=Ig(a),e=zg(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=\nb);Ag(a,e);Jg(a,d,c)}};function Lg(a,b,c,d,e,f,g){a=a.stateNode;return\"function\"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Je(c,d)||!Je(e,f):!0}\nfunction Mg(a,b,c){var d=!1,e=Cf;var f=b.contextType;\"object\"===typeof f&&null!==f?f=vg(f):(e=Ff(b)?Df:M.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Ef(a,e):Cf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Kg;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}\nfunction Ng(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Kg.enqueueReplaceState(b,b.state,null)}\nfunction Og(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Fg;xg(a);var f=b.contextType;\"object\"===typeof f&&null!==f?e.context=vg(f):(f=Ff(b)?Df:M.current,e.context=Ef(a,f));Cg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;\"function\"===typeof f&&(Gg(a,b,f,c),e.state=a.memoizedState);\"function\"===typeof b.getDerivedStateFromProps||\"function\"===typeof e.getSnapshotBeforeUpdate||\"function\"!==typeof e.UNSAFE_componentWillMount&&\"function\"!==typeof e.componentWillMount||\n(b=e.state,\"function\"===typeof e.componentWillMount&&e.componentWillMount(),\"function\"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Kg.enqueueReplaceState(e,e.state,null),Cg(a,c,e,d),e.state=a.memoizedState);\"function\"===typeof e.componentDidMount&&(a.flags|=4)}var Pg=Array.isArray;\nfunction Qg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(y(309));var d=c.stateNode}if(!d)throw Error(y(147,a));var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Fg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if(\"string\"!==typeof a)throw Error(y(284));if(!c._owner)throw Error(y(290,a));}return a}\nfunction Rg(a,b){if(\"textarea\"!==a.type)throw Error(y(31,\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b));}\nfunction Sg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Tg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=2,\nc):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Ug(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Qg(a,b,c),d.return=a,d;d=Vg(c.type,c.key,c.props,null,a.mode,d);d.ref=Qg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=\nWg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function n(a,b,c,d,f){if(null===b||7!==b.tag)return b=Xg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function A(a,b,c){if(\"string\"===typeof b||\"number\"===typeof b)return b=Ug(\"\"+b,a.mode,c),b.return=a,b;if(\"object\"===typeof b&&null!==b){switch(b.$$typeof){case sa:return c=Vg(b.type,b.key,b.props,null,a.mode,c),c.ref=Qg(a,null,b),c.return=a,c;case ta:return b=Wg(b,a.mode,c),b.return=a,b}if(Pg(b)||La(b))return b=Xg(b,\na.mode,c,null),b.return=a,b;Rg(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if(\"string\"===typeof c||\"number\"===typeof c)return null!==e?null:h(a,b,\"\"+c,d);if(\"object\"===typeof c&&null!==c){switch(c.$$typeof){case sa:return c.key===e?c.type===ua?n(a,b,c.props.children,d,e):k(a,b,c,d):null;case ta:return c.key===e?l(a,b,c,d):null}if(Pg(c)||La(c))return null!==e?null:n(a,b,c,d,null);Rg(a,c)}return null}function C(a,b,c,d,e){if(\"string\"===typeof d||\"number\"===typeof d)return a=a.get(c)||\nnull,h(b,a,\"\"+d,e);if(\"object\"===typeof d&&null!==d){switch(d.$$typeof){case sa:return a=a.get(null===d.key?c:d.key)||null,d.type===ua?n(b,a,d.props.children,e,d.key):k(b,a,d,e);case ta:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Pg(d)||La(d))return a=a.get(c)||null,n(b,a,d,e,null);Rg(b,d)}return null}function x(e,g,h,k){for(var l=null,t=null,u=g,z=g=0,q=null;null!==u&&z<h.length;z++){u.index>z?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;z<h.length;z++)u=A(e,h[z],k),null!==u&&(g=f(u,g,z),null===t?l=u:t.sibling=u,t=u);return l}for(u=d(e,u);z<h.length;z++)q=C(u,e,z,h[z],k),null!==q&&(a&&null!==q.alternate&&u.delete(null===q.key?z:q.key),g=f(q,g,z),null===t?l=q:t.sibling=q,t=q);a&&u.forEach(function(a){return b(e,a)});return l}function w(e,g,h,k){var l=La(h);if(\"function\"!==typeof l)throw Error(y(150));h=l.call(h);if(null==\nh)throw Error(y(151));for(var t=l=null,u=g,z=g=0,q=null,n=h.next();null!==u&&!n.done;z++,n=h.next()){u.index>z?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;a<th.length;a++)th[a]._workInProgressVersionPrimary=null;th.length=0}var vh=ra.ReactCurrentDispatcher,wh=ra.ReactCurrentBatchConfig,xh=0,R=null,S=null,T=null,yh=!1,zh=!1;function Ah(){throw Error(y(321));}function Bh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return!1;return!0}\nfunction Ch(a,b,c,d,e,f){xh=f;R=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;vh.current=null===a||null===a.memoizedState?Dh:Eh;a=c(d,e);if(zh){f=0;do{zh=!1;if(!(25>f))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0<h;){var k=31-Vc(h),v=1<<k;d[k]|=a;h&=~v}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=p.getSnapshot,c=p.setSnapshot;try{c(a(b._source));var d=Ig(w);e.mutableReadLanes|=d&e.pendingLanes}catch(q){c(function(){throw q;})}})},[b,d]);He(C,c)&&He(x,b)&&He(A,d)||(a={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:n},a.dispatch=l=Oh.bind(null,R,a),k.queue=a,k.baseQueue=null,n=Mh(e,b,c),k.memoizedState=k.baseState=n);return n}\nfunction Ph(a,b,c){var d=Ih();return Nh(d,a,b,c)}function Qh(a){var b=Hh();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:a};a=a.dispatch=Oh.bind(null,R,a);return[b.memoizedState,a]}\nfunction Rh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=R.updateQueue;null===b?(b={lastEffect:null},R.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Sh(a){var b=Hh();a={current:a};return b.memoizedState=a}function Th(){return Ih().memoizedState}function Uh(a,b,c,d){var e=Hh();R.flags|=a;e.memoizedState=Rh(1|b,c,void 0,void 0===d?null:d)}\nfunction Vh(a,b,c,d){var e=Ih();d=void 0===d?null:d;var f=void 0;if(null!==S){var g=S.memoizedState;f=g.destroy;if(null!==d&&Bh(d,g.deps)){Rh(b,c,f,d);return}}R.flags|=a;e.memoizedState=Rh(1|b,c,f,d)}function Wh(a,b){return Uh(516,4,a,b)}function Xh(a,b){return Vh(516,4,a,b)}function Yh(a,b){return Vh(4,2,a,b)}function Zh(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}\nfunction $h(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Vh(4,2,Zh.bind(null,b,a),c)}function ai(){}function bi(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function ci(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}\nfunction di(a,b){var c=eg();gg(98>c?98:c,function(){a(!0)});gg(97<c?97:c,function(){var c=wh.transition;wh.transition=1;try{a(!1),b()}finally{wh.transition=c}})}\nfunction Oh(a,b,c){var d=Hg(),e=Ig(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);b.pending=f;g=a.alternate;if(a===R||null!==g&&g===R)zh=yh=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(He(k,h))return}catch(l){}finally{}Jg(a,e,d)}}\nvar Gh={readContext:vg,useCallback:Ah,useContext:Ah,useEffect:Ah,useImperativeHandle:Ah,useLayoutEffect:Ah,useMemo:Ah,useReducer:Ah,useRef:Ah,useState:Ah,useDebugValue:Ah,useDeferredValue:Ah,useTransition:Ah,useMutableSource:Ah,useOpaqueIdentifier:Ah,unstable_isNewReconciler:!1},Dh={readContext:vg,useCallback:function(a,b){Hh().memoizedState=[a,void 0===b?null:b];return a},useContext:vg,useEffect:Wh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Uh(4,2,Zh.bind(null,\nb,a),c)},useLayoutEffect:function(a,b){return Uh(4,2,a,b)},useMemo:function(a,b){var c=Hh();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Hh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Oh.bind(null,R,a);return[d.memoizedState,a]},useRef:Sh,useState:Qh,useDebugValue:ai,useDeferredValue:function(a){var b=Qh(a),c=b[0],d=b[1];Wh(function(){var b=wh.transition;\nwh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Qh(!1),b=a[0];a=di.bind(null,a[1]);Sh(a);return[a,b]},useMutableSource:function(a,b,c){var d=Hh();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Nh(d,a,b,c)},useOpaqueIdentifier:function(){if(lh){var a=!1,b=uf(function(){a||(a=!0,c(\"r:\"+(tf++).toString(36)));throw Error(y(355));}),c=Qh(b)[1];0===(R.mode&2)&&(R.flags|=516,Rh(5,function(){c(\"r:\"+(tf++).toString(36))},\nvoid 0,null));return b}b=\"r:\"+(tf++).toString(36);Qh(b);return b},unstable_isNewReconciler:!1},Eh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Kh,useRef:Th,useState:function(){return Kh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Kh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Kh(Jh)[0];return[Th().current,\na]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Kh(Jh)[0]},unstable_isNewReconciler:!1},Fh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Lh,useRef:Th,useState:function(){return Lh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Lh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Lh(Jh)[0];return[Th().current,\na]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Lh(Jh)[0]},unstable_isNewReconciler:!1},ei=ra.ReactCurrentOwner,ug=!1;function fi(a,b,c,d){b.child=null===a?Zg(b,null,c,d):Yg(b,a.child,c,d)}function gi(a,b,c,d,e){c=c.render;var f=b.ref;tg(b,e);d=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,d,e);return b.child}\nfunction ii(a,b,c,d,e,f){if(null===a){var g=c.type;if(\"function\"===typeof g&&!ji(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ki(a,b,g,d,e,f);a=Vg(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Je,c(e,d)&&a.ref===b.ref))return hi(a,b,f);b.flags|=1;a=Tg(g,d);a.ref=b.ref;a.return=b;return b.child=a}\nfunction ki(a,b,c,d,e,f){if(null!==a&&Je(a.memoizedProps,d)&&a.ref===b.ref)if(ug=!1,0!==(f&e))0!==(a.flags&16384)&&(ug=!0);else return b.lanes=a.lanes,hi(a,b,f);return li(a,b,c,d,f)}\nfunction mi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if(\"hidden\"===d.mode||\"unstable-defer-without-hiding\"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},ni(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},ni(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},ni(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,ni(b,d);fi(a,b,e,c);return b.child}\nfunction oi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function li(a,b,c,d,e){var f=Ff(c)?Df:M.current;f=Ef(b,f);tg(b,e);c=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,c,e);return b.child}\nfunction pi(a,b,c,d,e){if(Ff(c)){var f=!0;Jf(b)}else f=!1;tg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),Mg(b,c,d),Og(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;\"object\"===typeof l&&null!==l?l=vg(l):(l=Ff(c)?Df:M.current,l=Ef(b,l));var n=c.getDerivedStateFromProps,A=\"function\"===typeof n||\"function\"===typeof g.getSnapshotBeforeUpdate;A||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\n\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Ng(b,g,d,l);wg=!1;var p=b.memoizedState;g.state=p;Cg(b,d,g,e);k=b.memoizedState;h!==d||p!==k||N.current||wg?(\"function\"===typeof n&&(Gg(b,c,n,d),k=b.memoizedState),(h=wg||Lg(b,c,h,d,p,k,l))?(A||\"function\"!==typeof g.UNSAFE_componentWillMount&&\"function\"!==typeof g.componentWillMount||(\"function\"===typeof g.componentWillMount&&g.componentWillMount(),\"function\"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),\"function\"===\ntypeof g.componentDidMount&&(b.flags|=4)):(\"function\"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):(\"function\"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;yg(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:lg(b.type,h);g.props=l;A=b.pendingProps;p=g.context;k=c.contextType;\"object\"===typeof k&&null!==k?k=vg(k):(k=Ff(c)?Df:M.current,k=Ef(b,k));var C=c.getDerivedStateFromProps;(n=\"function\"===typeof C||\n\"function\"===typeof g.getSnapshotBeforeUpdate)||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof g.componentWillReceiveProps||(h!==A||p!==k)&&Ng(b,g,d,k);wg=!1;p=b.memoizedState;g.state=p;Cg(b,d,g,e);var x=b.memoizedState;h!==A||p!==x||N.current||wg?(\"function\"===typeof C&&(Gg(b,c,C,d),x=b.memoizedState),(l=wg||Lg(b,c,l,d,p,x,k))?(n||\"function\"!==typeof g.UNSAFE_componentWillUpdate&&\"function\"!==typeof g.componentWillUpdate||(\"function\"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,\nx,k),\"function\"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,k)),\"function\"===typeof g.componentDidUpdate&&(b.flags|=4),\"function\"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=k,d=l):(\"function\"!==typeof g.componentDidUpdate||\nh===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),d=!1)}return qi(a,b,c,d,f,e)}\nfunction qi(a,b,c,d,e,f){oi(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Kf(b,c,!1),hi(a,b,f);d=b.stateNode;ei.current=b;var h=g&&\"function\"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Yg(b,a.child,null,f),b.child=Yg(b,null,h,f)):fi(a,b,h,f);b.memoizedState=d.state;e&&Kf(b,c,!0);return b.child}function ri(a){var b=a.stateNode;b.pendingContext?Hf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Hf(a,b.context,!1);eh(a,b.containerInfo)}\nvar si={dehydrated:null,retryLane:0};\nfunction ti(a,b,c){var d=b.pendingProps,e=P.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);I(P,e&1);if(null===a){void 0!==d.fallback&&ph(b);a=d.children;e=d.fallback;if(f)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=si,a;if(\"number\"===typeof d.unstable_expectedLoadTime)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},\nb.memoizedState=si,b.lanes=33554432,a;c=vi({mode:\"visible\",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:\n{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}function ui(a,b,c,d){var e=a.mode,f=a.child;b={mode:\"hidden\",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b):f=vi(b,e,0,null);c=Xg(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}\nfunction xi(a,b,c,d){var e=a.child;a=e.sibling;c=Tg(e,{mode:\"visible\",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}\nfunction wi(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:\"hidden\",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Tg(g,h);null!==a?d=Tg(a,d):(d=Xg(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function yi(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);sg(a.return,b)}\nfunction zi(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}\nfunction Ai(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;fi(a,b,d.children,c);d=P.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&yi(a,c);else if(19===a.tag)yi(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(P,d);if(0===(b.mode&2))b.memoizedState=\nnull;else switch(e){case \"forwards\":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===ih(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);zi(b,!1,e,c,f,b.lastEffect);break;case \"backwards\":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===ih(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}zi(b,!0,c,null,f,b.lastEffect);break;case \"together\":zi(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}\nfunction hi(a,b,c){null!==a&&(b.dependencies=a.dependencies);Dg|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(y(153));if(null!==b.child){a=b.child;c=Tg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Tg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}var Bi,Ci,Di,Ei;\nBi=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Ci=function(){};\nDi=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;dh(ah.current);var f=null;switch(c){case \"input\":e=Ya(a,e);d=Ya(a,d);f=[];break;case \"option\":e=eb(a,e);d=eb(a,d);f=[];break;case \"select\":e=m({},e,{value:void 0});d=m({},d,{value:void 0});f=[];break;case \"textarea\":e=gb(a,e);d=gb(a,d);f=[];break;default:\"function\"!==typeof e.onClick&&\"function\"===typeof d.onClick&&(a.onclick=jf)}vb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if(\"style\"===\nl){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]=\"\")}else\"dangerouslySetInnerHTML\"!==l&&\"children\"!==l&&\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&\"autoFocus\"!==l&&(ca.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if(\"style\"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]=\"\");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||\n(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else\"dangerouslySetInnerHTML\"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):\"children\"===l?\"string\"!==typeof k&&\"number\"!==typeof k||(f=f||[]).push(l,\"\"+k):\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&(ca.hasOwnProperty(l)?(null!=k&&\"onScroll\"===l&&G(\"scroll\",a),f||h===k||(f=[])):\"object\"===typeof k&&null!==k&&k.$$typeof===Ga?k.toString():(f=f||[]).push(l,k))}c&&(f=f||[]).push(\"style\",\nc);var l=f;if(b.updateQueue=l)b.flags|=4}};Ei=function(a,b,c,d){c!==d&&(b.flags|=4)};function Fi(a,b){if(!lh)switch(a.tailMode){case \"hidden\":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case \"collapsed\":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}\nfunction Gi(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ff(b.type)&&Gf(),null;case 3:fh();H(N);H(M);uh();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)rh(b)?b.flags|=4:d.hydrate||(b.flags|=256);Ci(b);return null;case 5:hh(b);var e=dh(ch.current);c=b.type;if(null!==a&&null!=b.stateNode)Di(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===\nb.stateNode)throw Error(y(166));return null}a=dh(ah.current);if(rh(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[wf]=b;d[xf]=f;switch(c){case \"dialog\":G(\"cancel\",d);G(\"close\",d);break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",d);break;case \"video\":case \"audio\":for(a=0;a<Xe.length;a++)G(Xe[a],d);break;case \"source\":G(\"error\",d);break;case \"img\":case \"image\":case \"link\":G(\"error\",d);G(\"load\",d);break;case \"details\":G(\"toggle\",d);break;case \"input\":Za(d,f);G(\"invalid\",d);break;case \"select\":d._wrapperState=\n{wasMultiple:!!f.multiple};G(\"invalid\",d);break;case \"textarea\":hb(d,f),G(\"invalid\",d)}vb(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],\"children\"===g?\"string\"===typeof e?d.textContent!==e&&(a=[\"children\",e]):\"number\"===typeof e&&d.textContent!==\"\"+e&&(a=[\"children\",\"\"+e]):ca.hasOwnProperty(g)&&null!=e&&\"onScroll\"===g&&G(\"scroll\",d));switch(c){case \"input\":Va(d);cb(d,f,!0);break;case \"textarea\":Va(d);jb(d);break;case \"select\":case \"option\":break;default:\"function\"===typeof f.onClick&&(d.onclick=\njf)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;a===kb.html&&(a=lb(c));a===kb.html?\"script\"===c?(a=g.createElement(\"div\"),a.innerHTML=\"<script>\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;e<Xe.length;e++)G(Xe[e],a);e=d;break;case \"source\":G(\"error\",a);e=d;break;case \"img\":case \"image\":case \"link\":G(\"error\",a);G(\"load\",a);e=d;break;case \"details\":G(\"toggle\",a);e=d;break;case \"input\":Za(a,d);e=Ya(a,d);G(\"invalid\",a);break;case \"option\":e=eb(a,d);break;case \"select\":a._wrapperState={wasMultiple:!!d.multiple};e=m({},d,{value:void 0});G(\"invalid\",a);break;case \"textarea\":hb(a,d);e=\ngb(a,d);G(\"invalid\",a);break;default:e=d}vb(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];\"style\"===f?tb(a,k):\"dangerouslySetInnerHTML\"===f?(k=k?k.__html:void 0,null!=k&&ob(a,k)):\"children\"===f?\"string\"===typeof k?(\"textarea\"!==c||\"\"!==k)&&pb(a,k):\"number\"===typeof k&&pb(a,\"\"+k):\"suppressContentEditableWarning\"!==f&&\"suppressHydrationWarning\"!==f&&\"autoFocus\"!==f&&(ca.hasOwnProperty(f)?null!=k&&\"onScroll\"===f&&G(\"scroll\",a):null!=k&&qa(a,f,k,g))}switch(c){case \"input\":Va(a);cb(a,d,!1);\nbreak;case \"textarea\":Va(a);jb(a);break;case \"option\":null!=d.value&&a.setAttribute(\"value\",\"\"+Sa(d.value));break;case \"select\":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,!1):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue,!0);break;default:\"function\"===typeof e.onClick&&(a.onclick=jf)}mf(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Ei(a,b,a.memoizedProps,d);else{if(\"string\"!==typeof d&&null===b.stateNode)throw Error(y(166));\nc=dh(ch.current);dh(ah.current);rh(b)?(d=b.stateNode,c=b.memoizedProps,d[wf]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[wf]=b,b.stateNode=d)}return null;case 13:H(P);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&rh(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(P.current&1))0===V&&(V=3);else{if(0===V||3===V)V=\n4;null===U||0===(Dg&134217727)&&0===(Hi&134217727)||Ii(U,W)}if(d||c)b.flags|=4;return null;case 4:return fh(),Ci(b),null===a&&cf(b.stateNode.containerInfo),null;case 10:return rg(b),null;case 17:return Ff(b.type)&&Gf(),null;case 19:H(P);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)Fi(d,!1);else{if(0!==V||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=ih(a);if(null!==g){b.flags|=64;Fi(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);\nnull===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,\nf.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;I(P,P.current&1|2);return b.child}a=a.sibling}null!==d.tail&&O()>Ji&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;e<f.length;e+=\n2){var g=f[e],h=f[e+1];\"style\"===g?tb(c,h):\"dangerouslySetInnerHTML\"===g?ob(c,h):\"children\"===g?pb(c,h):qa(c,g,h,b)}switch(a){case \"input\":ab(c,d);break;case \"textarea\":ib(c,d);break;case \"select\":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?fb(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?fb(c,!!d.multiple,d.defaultValue,!0):fb(c,!!d.multiple,d.multiple?[]:\"\",!1))}}}return;case 6:if(null===b.stateNode)throw Error(y(162));b.stateNode.nodeValue=\nb.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,Cc(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(jj=O(),aj(b.child,!0));kj(b);return;case 19:kj(b);return;case 17:return;case 23:case 24:aj(b,null!==b.memoizedState);return}throw Error(y(163));}function kj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ui);b.forEach(function(b){var d=lj.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction mj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}var nj=Math.ceil,oj=ra.ReactCurrentDispatcher,pj=ra.ReactCurrentOwner,X=0,U=null,Y=null,W=0,qj=0,rj=Bf(0),V=0,sj=null,tj=0,Dg=0,Hi=0,uj=0,vj=null,jj=0,Ji=Infinity;function wj(){Ji=O()+500}var Z=null,Qi=!1,Ri=null,Ti=null,xj=!1,yj=null,zj=90,Aj=[],Bj=[],Cj=null,Dj=0,Ej=null,Fj=-1,Gj=0,Hj=0,Ij=null,Jj=!1;function Hg(){return 0!==(X&48)?O():-1!==Fj?Fj:Fj=O()}\nfunction Ig(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===eg()?1:2;0===Gj&&(Gj=tj);if(0!==kg.transition){0!==Hj&&(Hj=null!==vj?vj.pendingLanes:0);a=Gj;var b=4186112&~Hj;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=eg();0!==(X&4)&&98===a?a=Xc(12,Gj):(a=Sc(a),a=Xc(a,Gj));return a}\nfunction Jg(a,b,c){if(50<Dj)throw Dj=0,Ej=null,Error(y(185));a=Kj(a,b);if(null===a)return null;$c(a,b,c);a===U&&(Hi|=b,4===V&&Ii(a,W));var d=eg();1===b?0!==(X&8)&&0===(X&48)?Lj(a):(Mj(a,c),0===X&&(wj(),ig())):(0===(X&4)||98!==d&&99!==d||(null===Cj?Cj=new Set([a]):Cj.add(a)),Mj(a,c));vj=a}function Kj(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}\nfunction Mj(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Vc(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;Rc(k);var n=F;f[h]=10<=n?l+250:6<=n?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Uc(a,a===U?W:0);b=F;if(0===d)null!==c&&(c!==Zf&&Pf(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==Zf&&Pf(c)}15===b?(c=Lj.bind(null,a),null===ag?(ag=[c],bg=Of(Uf,jg)):ag.push(c),\nc=Zf):14===b?c=hg(99,Lj.bind(null,a)):(c=Tc(b),c=hg(c,Nj.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}\nfunction Nj(a){Fj=-1;Hj=Gj=0;if(0!==(X&48))throw Error(y(327));var b=a.callbackNode;if(Oj()&&a.callbackNode!==b)return null;var c=Uc(a,a===U?W:0);if(0===c)return null;var d=c;var e=X;X|=16;var f=Pj();if(U!==a||W!==d)wj(),Qj(a,d);do try{Rj();break}catch(h){Sj(a,h)}while(1);qg();oj.current=f;X=e;null!==Y?d=0:(U=null,W=0,d=V);if(0!==(tj&Hi))Qj(a,0);else if(0!==d){2===d&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),c=Wc(a),0!==c&&(d=Tj(a,c)));if(1===d)throw b=sj,Qj(a,0),Ii(a,c),Mj(a,O()),b;a.finishedWork=\na.current.alternate;a.finishedLanes=c;switch(d){case 0:case 1:throw Error(y(345));case 2:Uj(a);break;case 3:Ii(a,c);if((c&62914560)===c&&(d=jj+500-O(),10<d)){if(0!==Uc(a,0))break;e=a.suspendedLanes;if((e&c)!==c){Hg();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=of(Uj.bind(null,a),d);break}Uj(a);break;case 4:Ii(a,c);if((c&4186112)===c)break;d=a.eventTimes;for(e=-1;0<c;){var g=31-Vc(c);f=1<<g;g=d[g];g>e&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10<c){a.timeoutHandle=of(Uj.bind(null,a),c);break}Uj(a);break;case 5:Uj(a);break;default:throw Error(y(329));}}Mj(a,O());return a.callbackNode===b?Nj.bind(null,a):null}function Ii(a,b){b&=~uj;b&=~Hi;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Vc(b),d=1<<c;a[c]=-1;b&=~d}}\nfunction Lj(a){if(0!==(X&48))throw Error(y(327));Oj();if(a===U&&0!==(a.expiredLanes&W)){var b=W;var c=Tj(a,b);0!==(tj&Hi)&&(b=Uc(a,b),c=Tj(a,b))}else b=Uc(a,0),c=Tj(a,b);0!==a.tag&&2===c&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),b=Wc(a),0!==b&&(c=Tj(a,b)));if(1===c)throw c=sj,Qj(a,0),Ii(a,b),Mj(a,O()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;Uj(a);Mj(a,O());return null}\nfunction Vj(){if(null!==Cj){var a=Cj;Cj=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;Mj(a,O())})}ig()}function Wj(a,b){var c=X;X|=1;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function Xj(a,b){var c=X;X&=-2;X|=8;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function ni(a,b){I(rj,qj);qj|=b;tj|=b}function Ki(){qj=rj.current;H(rj)}\nfunction Qj(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,pf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Gf();break;case 3:fh();H(N);H(M);uh();break;case 5:hh(d);break;case 4:fh();break;case 13:H(P);break;case 19:H(P);break;case 10:rg(d);break;case 23:case 24:Ki()}c=c.return}U=a;Y=Tg(a.current,null);W=qj=tj=b;V=0;sj=null;uj=Hi=Dg=0}\nfunction Sj(a,b){do{var c=Y;try{qg();vh.current=Gh;if(yh){for(var d=R.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}yh=!1}xh=0;T=S=R=null;zh=!1;pj.current=null;if(null===c||null===c.return){V=1;sj=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=W;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&\"object\"===typeof k&&\"function\"===typeof k.then){var l=k;if(0===(h.mode&2)){var n=h.alternate;n?(h.updateQueue=n.updateQueue,h.memoizedState=n.memoizedState,h.lanes=n.lanes):\n(h.updateQueue=null,h.memoizedState=null)}var A=0!==(P.current&1),p=g;do{var C;if(C=13===p.tag){var x=p.memoizedState;if(null!==x)C=null!==x.dehydrated?!0:!1;else{var w=p.memoizedProps;C=void 0===w.fallback?!1:!0!==w.unstable_avoidThisFallback?!0:A?!1:!0}}if(C){var z=p.updateQueue;if(null===z){var u=new Set;u.add(l);p.updateQueue=u}else z.add(l);if(0===(p.mode&2)){p.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var t=zg(-1,1);t.tag=2;Ag(h,t)}h.lanes|=1;break a}k=\nvoid 0;h=b;var q=f.pingCache;null===q?(q=f.pingCache=new Oi,k=new Set,q.set(l,k)):(k=q.get(l),void 0===k&&(k=new Set,q.set(l,k)));if(!k.has(h)){k.add(h);var v=Yj.bind(null,f,l,h);l.then(v,v)}p.flags|=4096;p.lanes=b;break a}p=p.return}while(null!==p);k=Error((Ra(h.type)||\"A React component\")+\" suspended while rendering, but no fallback UI was specified.\\n\\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==\na.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=Li(b);if(null!==c){c.flags&=2047;Y=c;return}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===V&&(V=5)}function Uj(a){var b=eg();gg(99,dk.bind(null,a,b));return null}\nfunction dk(a,b){do Oj();while(null!==yj);if(0!==(X&48))throw Error(y(327));var c=a.finishedWork;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(y(177));a.callbackNode=null;var d=c.lanes|c.childLanes,e=d,f=a.pendingLanes&~e;a.pendingLanes=e;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=e;a.mutableReadLanes&=e;a.entangledLanes&=e;e=a.entanglements;for(var g=a.eventTimes,h=a.expirationTimes;0<f;){var k=31-Vc(f),l=1<<k;e[k]=0;g[k]=-1;h[k]=-1;f&=~l}null!==\nCj&&0===(d&24)&&Cj.has(a)&&Cj.delete(a);a===U&&(Y=U=null,W=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,d=c.firstEffect):d=c:d=c.firstEffect;if(null!==d){e=X;X|=32;pj.current=null;kf=fd;g=Ne();if(Oe(g)){if(\"selectionStart\"in g)h={start:g.selectionStart,end:g.selectionEnd};else a:if(h=(h=g.ownerDocument)&&h.defaultView||window,(l=h.getSelection&&h.getSelection())&&0!==l.rangeCount){h=l.anchorNode;f=l.anchorOffset;k=l.focusNode;l=l.focusOffset;try{h.nodeType,k.nodeType}catch(va){h=null;\nbreak a}var n=0,A=-1,p=-1,C=0,x=0,w=g,z=null;b:for(;;){for(var u;;){w!==h||0!==f&&3!==w.nodeType||(A=n+f);w!==k||0!==l&&3!==w.nodeType||(p=n+l);3===w.nodeType&&(n+=w.nodeValue.length);if(null===(u=w.firstChild))break;z=w;w=u}for(;;){if(w===g)break b;z===h&&++C===f&&(A=n);z===k&&++x===l&&(p=n);if(null!==(u=w.nextSibling))break;w=z;z=w.parentNode}w=u}h=-1===A||-1===p?null:{start:A,end:p}}else h=null;h=h||{start:0,end:0}}else h=null;lf={focusedElem:g,selectionRange:h};fd=!1;Ij=null;Jj=!1;Z=d;do try{ek()}catch(va){if(null===\nZ)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Ij=null;Z=d;do try{for(g=a;null!==Z;){var t=Z.flags;t&16&&pb(Z.stateNode,\"\");if(t&128){var q=Z.alternate;if(null!==q){var v=q.ref;null!==v&&(\"function\"===typeof v?v(null):v.current=null)}}switch(t&1038){case 2:fj(Z);Z.flags&=-3;break;case 6:fj(Z);Z.flags&=-3;ij(Z.alternate,Z);break;case 1024:Z.flags&=-1025;break;case 1028:Z.flags&=-1025;ij(Z.alternate,Z);break;case 4:ij(Z.alternate,Z);break;case 8:h=Z;cj(g,h);var J=h.alternate;dj(h);null!==\nJ&&dj(J)}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);v=lf;q=Ne();t=v.focusedElem;g=v.selectionRange;if(q!==t&&t&&t.ownerDocument&&Me(t.ownerDocument.documentElement,t)){null!==g&&Oe(t)&&(q=g.start,v=g.end,void 0===v&&(v=q),\"selectionStart\"in t?(t.selectionStart=q,t.selectionEnd=Math.min(v,t.value.length)):(v=(q=t.ownerDocument||document)&&q.defaultView||window,v.getSelection&&(v=v.getSelection(),h=t.textContent.length,J=Math.min(g.start,h),g=void 0===\ng.end?J:Math.min(g.end,h),!v.extend&&J>g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;t<q.length;t++)v=q[t],v.element.scrollLeft=v.left,v.element.scrollTop=v.top}fd=!!kf;lf=kf=null;a.current=c;Z=d;do try{for(t=a;null!==Z;){var K=Z.flags;K&36&&Yi(t,Z.alternate,Z);if(K&128){q=void 0;var Q=Z.ref;if(null!==Q){var L=Z.stateNode;switch(Z.tag){case 5:q=L;break;default:q=L}\"function\"===typeof Q?Q(q):Q.current=q}}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Z=null;$f();X=e}else a.current=c;if(xj)xj=!1,yj=a,zj=b;else for(Z=d;null!==Z;)b=\nZ.nextEffect,Z.nextEffect=null,Z.flags&8&&(K=Z,K.sibling=null,K.stateNode=null),Z=b;d=a.pendingLanes;0===d&&(Ti=null);1===d?a===Ej?Dj++:(Dj=0,Ej=a):Dj=0;c=c.stateNode;if(Mf&&\"function\"===typeof Mf.onCommitFiberRoot)try{Mf.onCommitFiberRoot(Lf,c,void 0,64===(c.current.flags&64))}catch(va){}Mj(a,O());if(Qi)throw Qi=!1,a=Ri,Ri=null,a;if(0!==(X&8))return null;ig();return null}\nfunction ek(){for(;null!==Z;){var a=Z.alternate;Jj||null===Ij||(0!==(Z.flags&8)?dc(Z,Ij)&&(Jj=!0):13===Z.tag&&mj(a,Z)&&dc(Z,Ij)&&(Jj=!0));var b=Z.flags;0!==(b&256)&&Xi(a,Z);0===(b&512)||xj||(xj=!0,hg(97,function(){Oj();return null}));Z=Z.nextEffect}}function Oj(){if(90!==zj){var a=97<zj?97:zj;zj=90;return gg(a,fk)}return!1}function $i(a,b){Aj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}function Zi(a,b){Bj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}\nfunction fk(){if(null===yj)return!1;var a=yj;yj=null;if(0!==(X&48))throw Error(y(331));var b=X;X|=32;var c=Bj;Bj=[];for(var d=0;d<c.length;d+=2){var e=c[d],f=c[d+1],g=e.destroy;e.destroy=void 0;if(\"function\"===typeof g)try{g()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}c=Aj;Aj=[];for(d=0;d<c.length;d+=2){e=c[d];f=c[d+1];try{var h=e.create;e.destroy=h()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}for(h=a.current.firstEffect;null!==h;)a=h.nextEffect,h.nextEffect=null,h.flags&8&&(h.sibling=\nnull,h.stateNode=null),h=a;X=b;ig();return!0}function gk(a,b,c){b=Mi(c,b);b=Pi(a,b,1);Ag(a,b);b=Hg();a=Kj(a,1);null!==a&&($c(a,1,b),Mj(a,b))}\nfunction Wi(a,b){if(3===a.tag)gk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){gk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if(\"function\"===typeof c.type.getDerivedStateFromError||\"function\"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d))){a=Mi(b,a);var e=Si(c,a,1);Ag(c,e);e=Hg();c=Kj(c,1);if(null!==c)$c(c,1,e),Mj(c,e);else if(\"function\"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}\nfunction Yj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Hg();a.pingedLanes|=a.suspendedLanes&c;U===a&&(W&c)===c&&(4===V||3===V&&(W&62914560)===W&&500>O()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],th.push(f);c=Zg(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else fi(a,b,d,c),sh();b=b.child}return b;case 5:return gh(b),null===a&&\nph(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,nf(d,e)?g=null:null!==f&&nf(d,f)&&(b.flags|=16),oi(a,b),fi(a,b,g,c),b.child;case 6:return null===a&&ph(b),null;case 13:return ti(a,b,c);case 4:return eh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Yg(b,null,d,c):fi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),gi(a,b,d,e,c);case 7:return fi(a,b,b.pendingProps,c),b.child;case 8:return fi(a,b,b.pendingProps.children,\nc),b.child;case 12:return fi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(mg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=He(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!N.current){b=hi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=\nk.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=zg(-1,c&-c),l.tag=2,Ag(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);sg(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}fi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,tg(b,c),e=vg(e,\nf.unstable_observedBits),d=d(e),b.flags|=1,fi(a,b,d,c),b.child;case 14:return e=b.type,f=lg(e,b.pendingProps),f=lg(e.type,f),ii(a,b,e,f,d,c);case 15:return ki(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),b.tag=1,Ff(d)?(a=!0,Jf(b)):a=!1,tg(b,c),Mg(b,d,e),Og(b,d,e,c),qi(null,b,d,!0,a,c);case 19:return Ai(a,b,c);case 23:return mi(a,b,c);case 24:return mi(a,b,c)}throw Error(y(156,b.tag));\n};function ik(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null}function nh(a,b,c,d){return new ik(a,b,c,d)}function ji(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction hk(a){if(\"function\"===typeof a)return ji(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Aa)return 11;if(a===Da)return 14}return 2}\nfunction Tg(a,b){var c=a.alternate;null===c?(c=nh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Vg(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)ji(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ua:return Xg(c.children,e,f,b);case Ha:g=8;e|=16;break;case wa:g=8;e|=1;break;case xa:return a=nh(12,c,b,e|8),a.elementType=xa,a.type=xa,a.lanes=f,a;case Ba:return a=nh(13,c,b,e),a.type=Ba,a.elementType=Ba,a.lanes=f,a;case Ca:return a=nh(19,c,b,e),a.elementType=Ca,a.lanes=f,a;case Ia:return vi(c,e,f,b);case Ja:return a=nh(24,c,b,e),a.elementType=Ja,a.lanes=f,a;default:if(\"object\"===\ntypeof a&&null!==a)switch(a.$$typeof){case ya:g=10;break a;case za:g=9;break a;case Aa:g=11;break a;case Da:g=14;break a;case Ea:g=16;d=null;break a;case Fa:g=22;break a}throw Error(y(130,null==a?a:typeof a,\"\"));}b=nh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Xg(a,b,c,d){a=nh(7,a,d,b);a.lanes=c;return a}function vi(a,b,c,d){a=nh(23,a,d,b);a.elementType=Ia;a.lanes=c;return a}function Ug(a,b,c){a=nh(6,a,null,b);a.lanes=c;return a}\nfunction Wg(a,b,c){b=nh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction jk(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=Zc(0);this.expirationTimes=Zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Zc(0);this.mutableSourceEagerHydrationData=null}\nfunction kk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ta,key:null==d?null:\"\"+d,children:a,containerInfo:b,implementation:c}}\nfunction lk(a,b,c,d){var e=b.current,f=Hg(),g=Ig(e);a:if(c){c=c._reactInternals;b:{if(Zb(c)!==c||1!==c.tag)throw Error(y(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(Ff(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(y(171));}if(1===c.tag){var k=c.type;if(Ff(k)){c=If(c,k,h);break a}}c=h}else c=Cf;null===b.context?b.context=c:b.pendingContext=c;b=zg(f,g);b.payload={element:a};d=void 0===d?null:d;null!==\nd&&(b.callback=d);Ag(e,b);Jg(e,g,f);return g}function mk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function nk(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function ok(a,b){nk(a,b);(a=a.alternate)&&nk(a,b)}function pk(){return null}\nfunction qk(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new jk(a,b,null!=c&&!0===c.hydrate);b=nh(3,null,null,2===b?7:1===b?3:0);c.current=b;b.stateNode=c;xg(b);a[ff]=c.current;cf(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}\nqk.prototype.render=function(a){lk(a,this._internalRoot,null,null)};qk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;lk(null,a,null,function(){b[ff]=null})};function rk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||\" react-mount-point-unstable \"!==a.nodeValue))}\nfunction sk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute(\"data-reactroot\")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new qk(a,0,b?{hydrate:!0}:void 0)}\nfunction tk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if(\"function\"===typeof e){var h=e;e=function(){var a=mk(g);h.call(a)}}lk(b,g,a,e)}else{f=c._reactRootContainer=sk(c,d);g=f._internalRoot;if(\"function\"===typeof e){var k=e;e=function(){var a=mk(g);k.call(a)}}Xj(function(){lk(b,g,a,e)})}return mk(g)}ec=function(a){if(13===a.tag){var b=Hg();Jg(a,4,b);ok(a,4)}};fc=function(a){if(13===a.tag){var b=Hg();Jg(a,67108864,b);ok(a,67108864)}};\ngc=function(a){if(13===a.tag){var b=Hg(),c=Ig(a);Jg(a,c,b);ok(a,c)}};hc=function(a,b){return b()};\nyb=function(a,b,c){switch(b){case \"input\":ab(a,c);b=c.name;if(\"radio\"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+b)+'][type=\"radio\"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(y(90));Wa(d);ab(d,e)}}}break;case \"textarea\":ib(a,c);break;case \"select\":b=c.value,null!=b&&fb(a,!!c.multiple,b,!1)}};Gb=Wj;\nHb=function(a,b,c,d,e){var f=X;X|=4;try{return gg(98,a.bind(null,b,c,d,e))}finally{X=f,0===X&&(wj(),ig())}};Ib=function(){0===(X&49)&&(Vj(),Oj())};Jb=function(a,b){var c=X;X|=2;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}};function uk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!rk(b))throw Error(y(200));return kk(a,b,null,c)}var vk={Events:[Cb,ue,Db,Eb,Fb,Oj,{current:!1}]},wk={findFiberByHostInstance:wc,bundleType:0,version:\"17.0.2\",rendererPackageName:\"react-dom\"};\nvar xk={bundleType:wk.bundleType,version:wk.version,rendererPackageName:wk.rendererPackageName,rendererConfig:wk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ra.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=cc(a);return null===a?null:a.stateNode},findFiberByHostInstance:wk.findFiberByHostInstance||\npk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(\"undefined\"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var yk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yk.isDisabled&&yk.supportsFiber)try{Lf=yk.inject(xk),Mf=yk}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;exports.createPortal=uk;\nexports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if(\"function\"===typeof a.render)throw Error(y(188));throw Error(y(268,Object.keys(a)));}a=cc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a,b){var c=X;if(0!==(c&48))return a(b);X|=1;try{if(a)return gg(99,a.bind(null,b))}finally{X=c,ig()}};exports.hydrate=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!0,c)};\nexports.render=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!rk(a))throw Error(y(40));return a._reactRootContainer?(Xj(function(){tk(null,null,a,!1,function(){a._reactRootContainer=null;a[ff]=null})}),!0):!1};exports.unstable_batchedUpdates=Wj;exports.unstable_createPortal=function(a,b){return uk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};\nexports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!rk(c))throw Error(y(200));if(null==a||void 0===a._reactInternals)throw Error(y(38));return tk(a,b,c,!1,d)};exports.version=\"17.0.2\";\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/** @license React v0.20.2\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f,g,h,k;if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}\nif(\"undefined\"===typeof window||\"function\"!==typeof MessageChannel){var t=null,u=null,w=function(){if(null!==t)try{var a=exports.unstable_now();t(!0,a);t=null}catch(b){throw setTimeout(w,0),b;}};f=function(a){null!==t?setTimeout(f,0,a):(t=a,setTimeout(w,0))};g=function(a,b){u=setTimeout(a,b)};h=function(){clearTimeout(u)};exports.unstable_shouldYield=function(){return!1};k=exports.unstable_forceFrameRate=function(){}}else{var x=window.setTimeout,y=window.clearTimeout;if(\"undefined\"!==typeof console){var z=\nwindow.cancelAnimationFrame;\"function\"!==typeof window.requestAnimationFrame&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\");\"function\"!==typeof z&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\")}var A=!1,B=null,C=-1,D=5,E=0;exports.unstable_shouldYield=function(){return exports.unstable_now()>=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):D=0<a?Math.floor(1E3/a):5};var F=new MessageChannel,G=F.port2;F.port1.onmessage=function(){if(null!==B){var a=exports.unstable_now();E=a+D;try{B(!0,a)?G.postMessage(null):(A=!1,B=null)}catch(b){throw G.postMessage(null),b;}}else A=!1};f=function(a){B=a;A||(A=!0,G.postMessage(null))};g=function(a,b){C=\nx(function(){a(exports.unstable_now())},b)};h=function(){y(C);C=-1}}function H(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<I(e,b))a[d]=b,a[c]=e,c=d;else break a}}function J(a){a=a[0];return void 0===a?null:a}\nfunction K(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:N++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixProperty;\n\nvar _capitalizeString = require('./capitalizeString');\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction prefixProperty(prefixProperties, property, style) {\n if (prefixProperties.hasOwnProperty(property)) {\n var newStyle = {};\n var requiredPrefixes = prefixProperties[property];\n var capitalizedProperty = (0, _capitalizeString2.default)(property);\n var keys = Object.keys(style);\n for (var i = 0; i < keys.length; i++) {\n var styleProperty = keys[i];\n if (styleProperty === property) {\n for (var j = 0; j < requiredPrefixes.length; j++) {\n newStyle[requiredPrefixes[j] + capitalizedProperty] = style[property];\n }\n }\n newStyle[styleProperty] = style[styleProperty];\n }\n return newStyle;\n }\n return style;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixValue;\nfunction prefixValue(plugins, property, value, style, metaData) {\n for (var i = 0, len = plugins.length; i < len; ++i) {\n var processedValue = plugins[i](property, value, style, metaData);\n\n // we can stop processing if a value is returned\n // as all plugin criteria are unique\n if (processedValue) {\n return processedValue;\n }\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addNewValuesOnly;\nfunction addIfNew(list, value) {\n if (list.indexOf(value) === -1) {\n list.push(value);\n }\n}\n\nfunction addNewValuesOnly(list, values) {\n if (Array.isArray(values)) {\n for (var i = 0, len = values.length; i < len; ++i) {\n addIfNew(list, values[i]);\n }\n } else {\n addIfNew(list, values);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isObject;\nfunction isObject(value) {\n return value instanceof Object && !Array.isArray(value);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = hyphenateProperty;\n\nvar _hyphenateStyleName = require('hyphenate-style-name');\n\nvar _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction hyphenateProperty(property) {\n return (0, _hyphenateStyleName2.default)(property);\n}\nmodule.exports = exports['default'];","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\n// -- Inlined from fbjs --\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction _invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nvar warning = function(){};\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\n// /-- Inlined from fbjs --\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return <div>Hello World</div>;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return <div>Hello, {name}!</div>;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillMount`.\n *\n * @optional\n */\n UNSAFE_componentWillMount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillReceiveProps`.\n *\n * @optional\n */\n UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillUpdate`.\n *\n * @optional\n */\n UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n\n /**\n * Similar to ReactClassInterface but for static methods.\n */\n var ReactClassStaticInterface = {\n /**\n * This method is invoked after a component is instantiated and when it\n * receives new props. Return an object to update state in response to\n * prop changes. Return null to indicate no change to state.\n *\n * If an object is returned, its keys will be merged into the existing state.\n *\n * @return {object || null}\n * @optional\n */\n getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n };\n\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n var RESERVED_SPEC_KEYS = {\n displayName: function(Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function(Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function(Constructor, childContextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign(\n {},\n Constructor.childContextTypes,\n childContextTypes\n );\n },\n contextTypes: function(Constructor, contextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign(\n {},\n Constructor.contextTypes,\n contextTypes\n );\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function(Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(\n Constructor.getDefaultProps,\n getDefaultProps\n );\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function(Constructor, propTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function(Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function() {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (process.env.NODE_ENV !== 'production') {\n warning(\n typeof typeDef[propName] === 'function',\n '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n 'React.PropTypes.',\n Constructor.displayName || 'ReactClass',\n ReactPropTypeLocationNames[location],\n propName\n );\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name)\n ? ReactClassInterface[name]\n : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(\n specPolicy === 'OVERRIDE_BASE',\n 'ReactClassInterface: You are attempting to override ' +\n '`%s` from your class specification. Ensure that your method names ' +\n 'do not overlap with React methods.',\n name\n );\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n _invariant(\n specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClassInterface: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be due ' +\n 'to a mixin.',\n name\n );\n }\n }\n\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (process.env.NODE_ENV !== 'production') {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n isMixinValid,\n \"%s: You're attempting to include a mixin that is either null \" +\n 'or not an object. Check the mixins included by the component, ' +\n 'as well as any mixins they include themselves. ' +\n 'Expected object but got %s.',\n Constructor.displayName || 'ReactClass',\n spec === null ? null : typeofSpec\n );\n }\n }\n\n return;\n }\n\n _invariant(\n typeof spec !== 'function',\n \"ReactClass: You're attempting to \" +\n 'use a component class or function as a mixin. Instead, just use a ' +\n 'regular object.'\n );\n _invariant(\n !isValidElement(spec),\n \"ReactClass: You're attempting to \" +\n 'use a component as a mixin. Instead, just use a regular object.'\n );\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isReactClassMethod &&\n !isAlreadyDefined &&\n spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n _invariant(\n isReactClassMethod &&\n (specPolicy === 'DEFINE_MANY_MERGED' ||\n specPolicy === 'DEFINE_MANY'),\n 'ReactClass: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n );\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (process.env.NODE_ENV !== 'production') {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n _invariant(\n !isReserved,\n 'ReactClass: You are attempting to define a reserved ' +\n 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n 'as an instance property instead; it will still be accessible on the ' +\n 'constructor.',\n name\n );\n\n var isAlreadyDefined = name in Constructor;\n if (isAlreadyDefined) {\n var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)\n ? ReactClassStaticInterface[name]\n : null;\n\n _invariant(\n specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClass: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be ' +\n 'due to a mixin.',\n name\n );\n\n Constructor[name] = createMergedResultFunction(Constructor[name], property);\n\n return;\n }\n\n Constructor[name] = property;\n }\n }\n\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(\n one && two && typeof one === 'object' && typeof two === 'object',\n 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'\n );\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(\n one[key] === undefined,\n 'mergeIntoWithNoDuplicateKeys(): ' +\n 'Tried to merge two objects with the same key: `%s`. This conflict ' +\n 'may be due to a mixin; in particular, this may be caused by two ' +\n 'getInitialState() or getDefaultProps() methods returning objects ' +\n 'with clashing keys.',\n key\n );\n one[key] = two[key];\n }\n }\n return one;\n }\n\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (process.env.NODE_ENV !== 'production') {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function(newThis) {\n for (\n var _len = arguments.length,\n args = Array(_len > 1 ? _len - 1 : 0),\n _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): React component methods may only be bound to the ' +\n 'component instance. See %s',\n componentName\n );\n }\n } else if (!args.length) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): You are binding a component method to the component. ' +\n 'React does this for you automatically in a high-performance ' +\n 'way, so you can safely remove this call. See %s',\n componentName\n );\n }\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function() {\n this.__isMounted = true;\n }\n };\n\n var IsMountedPostMixin = {\n componentWillUnmount: function() {\n this.__isMounted = false;\n }\n };\n\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function(newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function() {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n this.__didWarnIsMounted,\n '%s: isMounted is deprecated. Instead, make sure to clean up ' +\n 'subscriptions and pending requests in componentWillUnmount to ' +\n 'prevent memory leaks.',\n (this.constructor && this.constructor.displayName) ||\n this.name ||\n 'Component'\n );\n this.__didWarnIsMounted = true;\n }\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function() {};\n _assign(\n ReactClassComponent.prototype,\n ReactComponent.prototype,\n ReactClassMixin\n );\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function(props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n this instanceof Constructor,\n 'Something is calling a React component directly. Use a factory or ' +\n 'JSX instead. See: https://fb.me/react-legacyfactory'\n );\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (\n initialState === undefined &&\n this.getInitialState._isMockFunction\n ) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n _invariant(\n typeof initialState === 'object' && !Array.isArray(initialState),\n '%s.getInitialState(): must return an object or null',\n Constructor.displayName || 'ReactCompositeComponent'\n );\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(\n Constructor.prototype.render,\n 'createClass(...): Class specification must implement a `render` method.'\n );\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n !Constructor.prototype.componentShouldUpdate,\n '%s has a method called ' +\n 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n 'The name is phrased as a question because the function is ' +\n 'expected to return a value.',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.componentWillRecieveProps,\n '%s has a method called ' +\n 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.UNSAFE_componentWillRecieveProps,\n '%s has a method called UNSAFE_componentWillRecieveProps(). ' +\n 'Did you mean UNSAFE_componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;\n","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.AFRAME = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){\nvar str = Object.prototype.toString\n\nmodule.exports = anArray\n\nfunction anArray(arr) {\n return (\n arr.BYTES_PER_ELEMENT\n && str.call(arr.buffer) === '[object ArrayBuffer]'\n || Array.isArray(arr)\n )\n}\n\n},{}],2:[function(_dereq_,module,exports){\nmodule.exports = function numtype(num, def) {\n\treturn typeof num === 'number'\n\t\t? num \n\t\t: (typeof def === 'number' ? def : 0)\n}\n},{}],3:[function(_dereq_,module,exports){\n'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n},{}],4:[function(_dereq_,module,exports){\n'use strict';\n// For more information about browser field, check out the browser field at https://github.com/substack/browserify-handbook#browser-field.\n\nmodule.exports = {\n // Create a <link> tag with optional data attributes\n createLink: function(href, attributes) {\n var head = document.head || document.getElementsByTagName('head')[0];\n var link = document.createElement('link');\n\n link.href = href;\n link.rel = 'stylesheet';\n\n for (var key in attributes) {\n if ( ! attributes.hasOwnProperty(key)) {\n continue;\n }\n var value = attributes[key];\n link.setAttribute('data-' + key, value);\n }\n\n head.appendChild(link);\n },\n // Create a <style> tag with optional data attributes\n createStyle: function(cssText, attributes) {\n var head = document.head || document.getElementsByTagName('head')[0],\n style = document.createElement('style');\n\n style.type = 'text/css';\n\n for (var key in attributes) {\n if ( ! attributes.hasOwnProperty(key)) {\n continue;\n }\n var value = attributes[key];\n style.setAttribute('data-' + key, value);\n }\n \n if (style.sheet) { // for jsdom and IE9+\n style.innerHTML = cssText;\n style.sheet.cssText = cssText;\n head.appendChild(style);\n } else if (style.styleSheet) { // for IE8 and below\n head.appendChild(style);\n style.styleSheet.cssText = cssText;\n } else { // for Chrome, Firefox, and Safari\n style.appendChild(document.createTextNode(cssText));\n head.appendChild(style);\n }\n }\n};\n\n},{}],5:[function(_dereq_,module,exports){\nvar Buffer = _dereq_('buffer').Buffer; // for use with browserify\n\nmodule.exports = function (a, b) {\n if (!Buffer.isBuffer(a)) return undefined;\n if (!Buffer.isBuffer(b)) return undefined;\n if (typeof a.equals === 'function') return a.equals(b);\n if (a.length !== b.length) return false;\n \n for (var i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false;\n }\n \n return true;\n};\n\n},{\"buffer\":6}],6:[function(_dereq_,module,exports){\n(function (global,Buffer){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <[email protected]> <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = _dereq_('base64-js')\nvar ieee754 = _dereq_('ieee754')\nvar isArray = _dereq_('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {},_dereq_(\"buffer\").Buffer)\n\n},{\"base64-js\":3,\"buffer\":6,\"ieee754\":29,\"isarray\":35}],7:[function(_dereq_,module,exports){\n// Polyfill for creating CustomEvents on IE9/10/11\n\n// code pulled from:\n// https://github.com/d4tocchini/customevent-polyfill\n// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill\n\n(function() {\n if (typeof window === 'undefined') {\n return;\n }\n\n try {\n var ce = new window.CustomEvent('test', { cancelable: true });\n ce.preventDefault();\n if (ce.defaultPrevented !== true) {\n // IE has problems with .preventDefault() on custom events\n // http://stackoverflow.com/questions/23349191\n throw new Error('Could not prevent default');\n }\n } catch (e) {\n var CustomEvent = function(event, params) {\n var evt, origPrevent;\n params = params || {};\n params.bubbles = !!params.bubbles;\n params.cancelable = !!params.cancelable;\n\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(\n event,\n params.bubbles,\n params.cancelable,\n params.detail\n );\n origPrevent = evt.preventDefault;\n evt.preventDefault = function() {\n origPrevent.call(this);\n try {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function() {\n return true;\n }\n });\n } catch (e) {\n this.defaultPrevented = true;\n }\n };\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n window.CustomEvent = CustomEvent; // expose definition to window\n }\n})();\n\n},{}],8:[function(_dereq_,module,exports){\n\n/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = _dereq_('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n return JSON.stringify(v);\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ');\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage(){\n try {\n return window.localStorage;\n } catch (e) {}\n}\n\n},{\"./debug\":9}],9:[function(_dereq_,module,exports){\n\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = debug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lowercased letter, i.e. \"n\".\n */\n\nexports.formatters = {};\n\n/**\n * Previously assigned color.\n */\n\nvar prevColor = 0;\n\n/**\n * Select a color.\n *\n * @return {Number}\n * @api private\n */\n\nfunction selectColor() {\n return exports.colors[prevColor++ % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction debug(namespace) {\n\n // define the `disabled` version\n function disabled() {\n }\n disabled.enabled = false;\n\n // define the `enabled` version\n function enabled() {\n\n var self = enabled;\n\n // add the `color` if not set\n if (null == self.useColors) self.useColors = exports.useColors();\n if (null == self.color && self.useColors) self.color = selectColor();\n\n var args = Array.prototype.slice.call(arguments);\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %o\n args = ['%o'].concat(args);\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n if ('function' === typeof exports.formatArgs) {\n args = exports.formatArgs.apply(self, args);\n }\n var logFn = enabled.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n enabled.enabled = true;\n\n var fn = exports.enabled(namespace) ? enabled : disabled;\n\n fn.namespace = namespace;\n\n return fn;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n var split = (namespaces || '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n},{}],10:[function(_dereq_,module,exports){\n'use strict';\nvar isObj = _dereq_('is-obj');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Sources cannot be null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction assignKey(to, from, key) {\n\tvar val = from[key];\n\n\tif (val === undefined || val === null) {\n\t\treturn;\n\t}\n\n\tif (hasOwnProperty.call(to, key)) {\n\t\tif (to[key] === undefined || to[key] === null) {\n\t\t\tthrow new TypeError('Cannot convert undefined or null to object (' + key + ')');\n\t\t}\n\t}\n\n\tif (!hasOwnProperty.call(to, key) || !isObj(val)) {\n\t\tto[key] = val;\n\t} else {\n\t\tto[key] = assign(Object(to[key]), from[key]);\n\t}\n}\n\nfunction assign(to, from) {\n\tif (to === from) {\n\t\treturn to;\n\t}\n\n\tfrom = Object(from);\n\n\tfor (var key in from) {\n\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\tassignKey(to, from, key);\n\t\t}\n\t}\n\n\tif (Object.getOwnPropertySymbols) {\n\t\tvar symbols = Object.getOwnPropertySymbols(from);\n\n\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\tassignKey(to, from, symbols[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n}\n\nmodule.exports = function deepAssign(target) {\n\ttarget = toObject(target);\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tassign(target, arguments[s]);\n\t}\n\n\treturn target;\n};\n\n},{\"is-obj\":34}],11:[function(_dereq_,module,exports){\n'use strict';\n\nvar keys = _dereq_('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\torigDefineProperty(obj, 'x', { enumerable: false, value: obj });\n\t\t// eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\t\tfor (var _ in obj) { // jscs:ignore disallowUnusedVariables\n\t\t\treturn false;\n\t\t}\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n\n},{\"object-keys\":41}],12:[function(_dereq_,module,exports){\n/*! (C) WebReflection Mit Style License */\n(function(t,n,r,i){\"use strict\";function st(e,t){for(var n=0,r=e.length;n<r;n++)gt(e[n],t)}function ot(e){for(var t=0,n=e.length,r;t<n;t++)r=e[t],it(r,w[at(r)])}function ut(e){return function(t){F(t)&&(gt(t,e),st(t.querySelectorAll(E),e))}}function at(e){var t=R.call(e,\"is\"),n=e.nodeName.toUpperCase(),r=x.call(b,t?m+t.toUpperCase():v+n);return t&&-1<r&&!ft(n,t)?-1:r}function ft(e,t){return-1<E.indexOf(e+'[is=\"'+t+'\"]')}function lt(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;Y&&(!i||i===t)&&t.attributeChangedCallback&&r!==\"style\"&&e.prevValue!==e.newValue&&t.attributeChangedCallback(r,n===e[f]?null:e.prevValue,n===e[c]?null:e.newValue)}function ct(e){var t=ut(e);return function(e){$.push(t,e.target)}}function ht(e){G&&(G=!1,e.currentTarget.removeEventListener(p,ht)),st((e.target||n).querySelectorAll(E),e.detail===u?u:o),j&&vt()}function pt(e,t){var n=this;U.call(n,e,t),Z.call(n,{target:n})}function dt(e,t){P(e,t),nt?nt.observe(e,X):(Q&&(e.setAttribute=pt,e[s]=tt(e),e.addEventListener(d,Z)),e.addEventListener(h,lt)),e.createdCallback&&Y&&(e.created=!0,e.createdCallback(),e.created=!1)}function vt(){for(var e,t=0,n=I.length;t<n;t++)e=I[t],S.contains(e)||(n--,I.splice(t--,1),gt(e,u))}function mt(e){throw new Error(\"A \"+e+\" type is already registered\")}function gt(e,t){var n,r=at(e);-1<r&&(rt(e,w[r]),r=0,t===o&&!e[o]?(e[u]=!1,e[o]=!0,r=1,j&&x.call(I,e)<0&&I.push(e)):t===u&&!e[u]&&(e[o]=!1,e[u]=!0,r=1),r&&(n=e[t+\"Callback\"])&&n.call(e))}if(i in n)return;var s=\"__\"+i+(Math.random()*1e5>>0),o=\"attached\",u=\"detached\",a=\"extends\",f=\"ADDITION\",l=\"MODIFICATION\",c=\"REMOVAL\",h=\"DOMAttrModified\",p=\"DOMContentLoaded\",d=\"DOMSubtreeModified\",v=\"<\",m=\"=\",g=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,y=[\"ANNOTATION-XML\",\"COLOR-PROFILE\",\"FONT-FACE\",\"FONT-FACE-SRC\",\"FONT-FACE-URI\",\"FONT-FACE-FORMAT\",\"FONT-FACE-NAME\",\"MISSING-GLYPH\"],b=[],w=[],E=\"\",S=n.documentElement,x=b.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},T=r.prototype,N=T.hasOwnProperty,C=T.isPrototypeOf,k=r.defineProperty,L=r.getOwnPropertyDescriptor,A=r.getOwnPropertyNames,O=r.getPrototypeOf,M=r.setPrototypeOf,_=!!r.__proto__,D=r.create||function yt(e){return e?(yt.prototype=e,new yt):this},P=M||(_?function(e,t){return e.__proto__=t,e}:A&&L?function(){function e(e,t){for(var n,r=A(t),i=0,s=r.length;i<s;i++)n=r[i],N.call(e,n)||k(e,n,L(t,n))}return function(t,n){do e(t,n);while((n=O(n))&&!C.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),H=t.MutationObserver||t.WebKitMutationObserver,B=(t.HTMLElement||t.Element||t.Node).prototype,j=!C.call(B,S),F=j?function(e){return e.nodeType===1}:function(e){return C.call(B,e)},I=j&&[],q=B.cloneNode,R=B.getAttribute,U=B.setAttribute,z=B.removeAttribute,W=n.createElement,X=H&&{attributes:!0,characterData:!0,attributeOldValue:!0},V=H||function(e){Q=!1,S.removeEventListener(h,V)},$,J=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,10)},K=!1,Q=!0,G=!0,Y=!0,Z,et,tt,nt,rt,it;M||_?(rt=function(e,t){C.call(t,e)||dt(e,t)},it=dt):(rt=function(e,t){e[s]||(e[s]=r(!0),dt(e,t))},it=rt),j?(Q=!1,function(){var t=L(B,\"addEventListener\"),n=t.value,r=function(e){var t=new CustomEvent(h,{bubbles:!0});t.attrName=e,t.prevValue=R.call(this,e),t.newValue=null,t[c]=t.attrChange=2,z.call(this,e),this.dispatchEvent(t)},i=function(t,n){var r=this.hasAttribute(t),i=r&&R.call(this,t);e=new CustomEvent(h,{bubbles:!0}),U.call(this,t,n),e.attrName=t,e.prevValue=r?i:null,e.newValue=n,r?e[l]=e.attrChange=1:e[f]=e.attrChange=0,this.dispatchEvent(e)},o=function(e){var t=e.currentTarget,n=t[s],r=e.propertyName,i;n.hasOwnProperty(r)&&(n=n[r],i=new CustomEvent(h,{bubbles:!0}),i.attrName=n.name,i.prevValue=n.value||null,i.newValue=n.value=t[r]||null,i.prevValue==null?i[f]=i.attrChange=0:i[l]=i.attrChange=1,t.dispatchEvent(i))};t.value=function(e,t,u){e===h&&this.attributeChangedCallback&&this.setAttribute!==i&&(this[s]={className:{name:\"class\",value:this.className}},this.setAttribute=i,this.removeAttribute=r,n.call(this,\"propertychange\",o)),n.call(this,e,t,u)},k(B,\"addEventListener\",t)}()):H||(S.addEventListener(h,V),S.setAttribute(s,1),S.removeAttribute(s),Q&&(Z=function(e){var t=this,n,r,i;if(t===e.target){n=t[s],t[s]=r=tt(t);for(i in r){if(!(i in n))return et(0,t,i,n[i],r[i],f);if(r[i]!==n[i])return et(1,t,i,n[i],r[i],l)}for(i in n)if(!(i in r))return et(2,t,i,n[i],r[i],c)}},et=function(e,t,n,r,i,s){var o={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};o[s]=e,lt(o)},tt=function(e){for(var t,n,r={},i=e.attributes,s=0,o=i.length;s<o;s++)t=i[s],n=t.name,n!==\"setAttribute\"&&(r[n]=t.value);return r})),n[i]=function(t,r){c=t.toUpperCase(),K||(K=!0,H?(nt=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new H(function(r){for(var i,s,o,u=0,a=r.length;u<a;u++)i=r[u],i.type===\"childList\"?(n(i.addedNodes,e),n(i.removedNodes,t)):(s=i.target,Y&&s.attributeChangedCallback&&i.attributeName!==\"style\"&&(o=R.call(s,i.attributeName),o!==i.oldValue&&s.attributeChangedCallback(i.attributeName,i.oldValue,o)))})}(ut(o),ut(u)),nt.observe(n,{childList:!0,subtree:!0})):($=[],J(function d(){while($.length)$.shift().call(null,$.shift());J(d)}),n.addEventListener(\"DOMNodeInserted\",ct(o)),n.addEventListener(\"DOMNodeRemoved\",ct(u))),n.addEventListener(p,ht),n.addEventListener(\"readystatechange\",ht),n.createElement=function(e,t){var r=W.apply(n,arguments),i=\"\"+e,s=x.call(b,(t?m:v)+(t||i).toUpperCase()),o=-1<s;return t&&(r.setAttribute(\"is\",t=t.toLowerCase()),o&&(o=ft(i.toUpperCase(),t))),Y=!n.createElement.innerHTMLHelper,o&&it(r,w[s]),r},B.cloneNode=function(e){var t=q.call(this,!!e),n=at(t);return-1<n&&it(t,w[n]),e&&ot(t.querySelectorAll(E)),t}),-2<x.call(b,m+c)+x.call(b,v+c)&&mt(t);if(!g.test(c)||-1<x.call(y,c))throw new Error(\"The type \"+t+\" is invalid\");var i=function(){return f?n.createElement(l,c):n.createElement(l)},s=r||T,f=N.call(s,a),l=f?r[a].toUpperCase():c,c,h;return f&&-1<x.call(b,v+l)&&mt(l),h=b.push((f?m:v)+c)-1,E=E.concat(E.length?\",\":\"\",f?l+'[is=\"'+t.toLowerCase()+'\"]':l),i.prototype=w[h]=N.call(s,\"prototype\")?s.prototype:D(B),st(n.querySelectorAll(E),o),i}})(window,document,Object,\"registerElement\");\n},{}],13:[function(_dereq_,module,exports){\nmodule.exports = function(dtype) {\n switch (dtype) {\n case 'int8':\n return Int8Array\n case 'int16':\n return Int16Array\n case 'int32':\n return Int32Array\n case 'uint8':\n return Uint8Array\n case 'uint16':\n return Uint16Array\n case 'uint32':\n return Uint32Array\n case 'float32':\n return Float32Array\n case 'float64':\n return Float64Array\n case 'array':\n return Array\n case 'uint8_clamped':\n return Uint8ClampedArray\n }\n}\n\n},{}],14:[function(_dereq_,module,exports){\n'use strict';\n\n/* globals\n\tSet,\n\tMap,\n\tWeakSet,\n\tWeakMap,\n\n\tPromise,\n\n\tSymbol,\n\tProxy,\n\n\tAtomics,\n\tSharedArrayBuffer,\n\n\tArrayBuffer,\n\tDataView,\n\tUint8Array,\n\tFloat32Array,\n\tFloat64Array,\n\tInt8Array,\n\tInt16Array,\n\tInt32Array,\n\tUint8ClampedArray,\n\tUint16Array,\n\tUint32Array,\n*/\n\nvar undefined; // eslint-disable-line no-shadow-restricted-names\n\nvar ThrowTypeError = Object.getOwnPropertyDescriptor\n\t? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }())\n\t: function () { throw new TypeError(); };\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar generator; // = function * () {};\nvar generatorFunction = generator ? getProto(generator) : undefined;\nvar asyncFn; // async function() {};\nvar asyncFunction = asyncFn ? asyncFn.constructor : undefined;\nvar asyncGen; // async function * () {};\nvar asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;\nvar asyncGenIterator = asyncGen ? asyncGen() : undefined;\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'$ %Array%': Array,\n\t'$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,\n\t'$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'$ %ArrayPrototype%': Array.prototype,\n\t'$ %ArrayProto_entries%': Array.prototype.entries,\n\t'$ %ArrayProto_forEach%': Array.prototype.forEach,\n\t'$ %ArrayProto_keys%': Array.prototype.keys,\n\t'$ %ArrayProto_values%': Array.prototype.values,\n\t'$ %AsyncFromSyncIteratorPrototype%': undefined,\n\t'$ %AsyncFunction%': asyncFunction,\n\t'$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,\n\t'$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,\n\t'$ %AsyncGeneratorFunction%': asyncGenFunction,\n\t'$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,\n\t'$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,\n\t'$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'$ %Boolean%': Boolean,\n\t'$ %BooleanPrototype%': Boolean.prototype,\n\t'$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,\n\t'$ %Date%': Date,\n\t'$ %DatePrototype%': Date.prototype,\n\t'$ %decodeURI%': decodeURI,\n\t'$ %decodeURIComponent%': decodeURIComponent,\n\t'$ %encodeURI%': encodeURI,\n\t'$ %encodeURIComponent%': encodeURIComponent,\n\t'$ %Error%': Error,\n\t'$ %ErrorPrototype%': Error.prototype,\n\t'$ %eval%': eval, // eslint-disable-line no-eval\n\t'$ %EvalError%': EvalError,\n\t'$ %EvalErrorPrototype%': EvalError.prototype,\n\t'$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,\n\t'$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,\n\t'$ %Function%': Function,\n\t'$ %FunctionPrototype%': Function.prototype,\n\t'$ %Generator%': generator ? getProto(generator()) : undefined,\n\t'$ %GeneratorFunction%': generatorFunction,\n\t'$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,\n\t'$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,\n\t'$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,\n\t'$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,\n\t'$ %isFinite%': isFinite,\n\t'$ %isNaN%': isNaN,\n\t'$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'$ %JSON%': JSON,\n\t'$ %JSONParse%': JSON.parse,\n\t'$ %Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,\n\t'$ %Math%': Math,\n\t'$ %Number%': Number,\n\t'$ %NumberPrototype%': Number.prototype,\n\t'$ %Object%': Object,\n\t'$ %ObjectPrototype%': Object.prototype,\n\t'$ %ObjProto_toString%': Object.prototype.toString,\n\t'$ %ObjProto_valueOf%': Object.prototype.valueOf,\n\t'$ %parseFloat%': parseFloat,\n\t'$ %parseInt%': parseInt,\n\t'$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,\n\t'$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,\n\t'$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,\n\t'$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,\n\t'$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,\n\t'$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'$ %RangeError%': RangeError,\n\t'$ %RangeErrorPrototype%': RangeError.prototype,\n\t'$ %ReferenceError%': ReferenceError,\n\t'$ %ReferenceErrorPrototype%': ReferenceError.prototype,\n\t'$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'$ %RegExp%': RegExp,\n\t'$ %RegExpPrototype%': RegExp.prototype,\n\t'$ %Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,\n\t'$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,\n\t'$ %String%': String,\n\t'$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'$ %StringPrototype%': String.prototype,\n\t'$ %Symbol%': hasSymbols ? Symbol : undefined,\n\t'$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,\n\t'$ %SyntaxError%': SyntaxError,\n\t'$ %SyntaxErrorPrototype%': SyntaxError.prototype,\n\t'$ %ThrowTypeError%': ThrowTypeError,\n\t'$ %TypedArray%': TypedArray,\n\t'$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,\n\t'$ %TypeError%': TypeError,\n\t'$ %TypeErrorPrototype%': TypeError.prototype,\n\t'$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,\n\t'$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,\n\t'$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,\n\t'$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,\n\t'$ %URIError%': URIError,\n\t'$ %URIErrorPrototype%': URIError.prototype,\n\t'$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,\n\t'$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\t'$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar key = '$ ' + name;\n\tif (!(key in INTRINSICS)) {\n\t\tthrow new SyntaxError('intrinsic ' + name + ' does not exist!');\n\t}\n\n\t// istanbul ignore if // hopefully this is impossible to test :-)\n\tif (typeof INTRINSICS[key] === 'undefined' && !allowMissing) {\n\t\tthrow new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t}\n\treturn INTRINSICS[key];\n};\n\n},{}],15:[function(_dereq_,module,exports){\n'use strict';\n\nvar GetIntrinsic = _dereq_('./GetIntrinsic');\n\nvar $Object = GetIntrinsic('%Object%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $String = GetIntrinsic('%String%');\n\nvar assertRecord = _dereq_('./helpers/assertRecord');\nvar $isNaN = _dereq_('./helpers/isNaN');\nvar $isFinite = _dereq_('./helpers/isFinite');\n\nvar sign = _dereq_('./helpers/sign');\nvar mod = _dereq_('./helpers/mod');\n\nvar IsCallable = _dereq_('is-callable');\nvar toPrimitive = _dereq_('es-to-primitive/es5');\n\nvar has = _dereq_('has');\n\n// https://es5.github.io/#x9\nvar ES5 = {\n\tToPrimitive: toPrimitive,\n\n\tToBoolean: function ToBoolean(value) {\n\t\treturn !!value;\n\t},\n\tToNumber: function ToNumber(value) {\n\t\treturn +value; // eslint-disable-line no-implicit-coercion\n\t},\n\tToInteger: function ToInteger(value) {\n\t\tvar number = this.ToNumber(value);\n\t\tif ($isNaN(number)) { return 0; }\n\t\tif (number === 0 || !$isFinite(number)) { return number; }\n\t\treturn sign(number) * Math.floor(Math.abs(number));\n\t},\n\tToInt32: function ToInt32(x) {\n\t\treturn this.ToNumber(x) >> 0;\n\t},\n\tToUint32: function ToUint32(x) {\n\t\treturn this.ToNumber(x) >>> 0;\n\t},\n\tToUint16: function ToUint16(value) {\n\t\tvar number = this.ToNumber(value);\n\t\tif ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }\n\t\tvar posInt = sign(number) * Math.floor(Math.abs(number));\n\t\treturn mod(posInt, 0x10000);\n\t},\n\tToString: function ToString(value) {\n\t\treturn $String(value);\n\t},\n\tToObject: function ToObject(value) {\n\t\tthis.CheckObjectCoercible(value);\n\t\treturn $Object(value);\n\t},\n\tCheckObjectCoercible: function CheckObjectCoercible(value, optMessage) {\n\t\t/* jshint eqnull:true */\n\t\tif (value == null) {\n\t\t\tthrow new $TypeError(optMessage || 'Cannot call method on ' + value);\n\t\t}\n\t\treturn value;\n\t},\n\tIsCallable: IsCallable,\n\tSameValue: function SameValue(x, y) {\n\t\tif (x === y) { // 0 === -0, but they are not identical.\n\t\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\t\treturn true;\n\t\t}\n\t\treturn $isNaN(x) && $isNaN(y);\n\t},\n\n\t// https://www.ecma-international.org/ecma-262/5.1/#sec-8\n\tType: function Type(x) {\n\t\tif (x === null) {\n\t\t\treturn 'Null';\n\t\t}\n\t\tif (typeof x === 'undefined') {\n\t\t\treturn 'Undefined';\n\t\t}\n\t\tif (typeof x === 'function' || typeof x === 'object') {\n\t\t\treturn 'Object';\n\t\t}\n\t\tif (typeof x === 'number') {\n\t\t\treturn 'Number';\n\t\t}\n\t\tif (typeof x === 'boolean') {\n\t\t\treturn 'Boolean';\n\t\t}\n\t\tif (typeof x === 'string') {\n\t\t\treturn 'String';\n\t\t}\n\t},\n\n\t// https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type\n\tIsPropertyDescriptor: function IsPropertyDescriptor(Desc) {\n\t\tif (this.Type(Desc) !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.1\n\tIsAccessorDescriptor: function IsAccessorDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tassertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n\t\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.2\n\tIsDataDescriptor: function IsDataDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tassertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n\t\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.3\n\tIsGenericDescriptor: function IsGenericDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tassertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n\t\tif (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.4\n\tFromPropertyDescriptor: function FromPropertyDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn Desc;\n\t\t}\n\n\t\tassertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n\t\tif (this.IsDataDescriptor(Desc)) {\n\t\t\treturn {\n\t\t\t\tvalue: Desc['[[Value]]'],\n\t\t\t\twritable: !!Desc['[[Writable]]'],\n\t\t\t\tenumerable: !!Desc['[[Enumerable]]'],\n\t\t\t\tconfigurable: !!Desc['[[Configurable]]']\n\t\t\t};\n\t\t} else if (this.IsAccessorDescriptor(Desc)) {\n\t\t\treturn {\n\t\t\t\tget: Desc['[[Get]]'],\n\t\t\t\tset: Desc['[[Set]]'],\n\t\t\t\tenumerable: !!Desc['[[Enumerable]]'],\n\t\t\t\tconfigurable: !!Desc['[[Configurable]]']\n\t\t\t};\n\t\t} else {\n\t\t\tthrow new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor');\n\t\t}\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.5\n\tToPropertyDescriptor: function ToPropertyDescriptor(Obj) {\n\t\tif (this.Type(Obj) !== 'Object') {\n\t\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t\t}\n\n\t\tvar desc = {};\n\t\tif (has(Obj, 'enumerable')) {\n\t\t\tdesc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable);\n\t\t}\n\t\tif (has(Obj, 'configurable')) {\n\t\t\tdesc['[[Configurable]]'] = this.ToBoolean(Obj.configurable);\n\t\t}\n\t\tif (has(Obj, 'value')) {\n\t\t\tdesc['[[Value]]'] = Obj.value;\n\t\t}\n\t\tif (has(Obj, 'writable')) {\n\t\t\tdesc['[[Writable]]'] = this.ToBoolean(Obj.writable);\n\t\t}\n\t\tif (has(Obj, 'get')) {\n\t\t\tvar getter = Obj.get;\n\t\t\tif (typeof getter !== 'undefined' && !this.IsCallable(getter)) {\n\t\t\t\tthrow new TypeError('getter must be a function');\n\t\t\t}\n\t\t\tdesc['[[Get]]'] = getter;\n\t\t}\n\t\tif (has(Obj, 'set')) {\n\t\t\tvar setter = Obj.set;\n\t\t\tif (typeof setter !== 'undefined' && !this.IsCallable(setter)) {\n\t\t\t\tthrow new $TypeError('setter must be a function');\n\t\t\t}\n\t\t\tdesc['[[Set]]'] = setter;\n\t\t}\n\n\t\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t\t}\n\t\treturn desc;\n\t}\n};\n\nmodule.exports = ES5;\n\n},{\"./GetIntrinsic\":14,\"./helpers/assertRecord\":16,\"./helpers/isFinite\":17,\"./helpers/isNaN\":18,\"./helpers/mod\":19,\"./helpers/sign\":20,\"es-to-primitive/es5\":21,\"has\":28,\"is-callable\":32}],16:[function(_dereq_,module,exports){\n'use strict';\n\nvar GetIntrinsic = _dereq_('../GetIntrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = _dereq_('has');\n\nvar predicates = {\n // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type\n 'Property Descriptor': function isPropertyDescriptor(ES, Desc) {\n if (ES.Type(Desc) !== 'Object') {\n return false;\n }\n var allowed = {\n '[[Configurable]]': true,\n '[[Enumerable]]': true,\n '[[Get]]': true,\n '[[Set]]': true,\n '[[Value]]': true,\n '[[Writable]]': true\n };\n\n for (var key in Desc) { // eslint-disable-line\n if (has(Desc, key) && !allowed[key]) {\n return false;\n }\n }\n\n var isData = has(Desc, '[[Value]]');\n var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n if (isData && IsAccessor) {\n throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n }\n return true;\n }\n};\n\nmodule.exports = function assertRecord(ES, recordType, argumentName, value) {\n var predicate = predicates[recordType];\n if (typeof predicate !== 'function') {\n throw new $SyntaxError('unknown record type: ' + recordType);\n }\n if (!predicate(ES, value)) {\n throw new $TypeError(argumentName + ' must be a ' + recordType);\n }\n console.log(predicate(ES, value), value);\n};\n\n},{\"../GetIntrinsic\":14,\"has\":28}],17:[function(_dereq_,module,exports){\nvar $isNaN = Number.isNaN || function (a) { return a !== a; };\n\nmodule.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n\n},{}],18:[function(_dereq_,module,exports){\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n\n},{}],19:[function(_dereq_,module,exports){\nmodule.exports = function mod(number, modulo) {\n\tvar remain = number % modulo;\n\treturn Math.floor(remain >= 0 ? remain : remain + modulo);\n};\n\n},{}],20:[function(_dereq_,module,exports){\nmodule.exports = function sign(number) {\n\treturn number >= 0 ? 1 : -1;\n};\n\n},{}],21:[function(_dereq_,module,exports){\n'use strict';\n\nvar toStr = Object.prototype.toString;\n\nvar isPrimitive = _dereq_('./helpers/isPrimitive');\n\nvar isCallable = _dereq_('is-callable');\n\n// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8\nvar ES5internalSlots = {\n\t'[[DefaultValue]]': function (O) {\n\t\tvar actualHint;\n\t\tif (arguments.length > 1) {\n\t\t\tactualHint = arguments[1];\n\t\t} else {\n\t\t\tactualHint = toStr.call(O) === '[object Date]' ? String : Number;\n\t\t}\n\n\t\tif (actualHint === String || actualHint === Number) {\n\t\t\tvar methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\t\t\tvar value, i;\n\t\t\tfor (i = 0; i < methods.length; ++i) {\n\t\t\t\tif (isCallable(O[methods[i]])) {\n\t\t\t\t\tvalue = O[methods[i]]();\n\t\t\t\t\tif (isPrimitive(value)) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new TypeError('No default value');\n\t\t}\n\t\tthrow new TypeError('invalid [[DefaultValue]] hint supplied');\n\t}\n};\n\n// http://ecma-international.org/ecma-262/5.1/#sec-9.1\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tif (arguments.length > 1) {\n\t\treturn ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);\n\t}\n\treturn ES5internalSlots['[[DefaultValue]]'](input);\n};\n\n},{\"./helpers/isPrimitive\":22,\"is-callable\":32}],22:[function(_dereq_,module,exports){\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n\n},{}],23:[function(_dereq_,module,exports){\n/*eslint new-cap:0*/\nvar dtype = _dereq_('dtype')\n\nmodule.exports = flattenVertexData\n\nfunction flattenVertexData (data, output, offset) {\n if (!data) throw new TypeError('must specify data as first parameter')\n offset = +(offset || 0) | 0\n\n if (Array.isArray(data) && (data[0] && typeof data[0][0] === 'number')) {\n var dim = data[0].length\n var length = data.length * dim\n var i, j, k, l\n\n // no output specified, create a new typed array\n if (!output || typeof output === 'string') {\n output = new (dtype(output || 'float32'))(length + offset)\n }\n\n var dstLength = output.length - offset\n if (length !== dstLength) {\n throw new Error('source length ' + length + ' (' + dim + 'x' + data.length + ')' +\n ' does not match destination length ' + dstLength)\n }\n\n for (i = 0, k = offset; i < data.length; i++) {\n for (j = 0; j < dim; j++) {\n output[k++] = data[i][j] === null ? NaN : data[i][j]\n }\n }\n } else {\n if (!output || typeof output === 'string') {\n // no output, create a new one\n var Ctor = dtype(output || 'float32')\n\n // handle arrays separately due to possible nulls\n if (Array.isArray(data) || output === 'array') {\n output = new Ctor(data.length + offset)\n for (i = 0, k = offset, l = output.length; k < l; k++, i++) {\n output[k] = data[i] === null ? NaN : data[i]\n }\n } else {\n if (offset === 0) {\n output = new Ctor(data)\n } else {\n output = new Ctor(data.length + offset)\n\n output.set(data, offset)\n }\n }\n } else {\n // store output in existing array\n output.set(data, offset)\n }\n }\n\n return output\n}\n\n},{\"dtype\":13}],24:[function(_dereq_,module,exports){\n'use strict';\n\nvar isCallable = _dereq_('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n\n},{\"is-callable\":32}],25:[function(_dereq_,module,exports){\n'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n\n},{}],26:[function(_dereq_,module,exports){\n'use strict';\n\nvar implementation = _dereq_('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n\n},{\"./implementation\":25}],27:[function(_dereq_,module,exports){\n(function (global){\nvar win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\"){\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],28:[function(_dereq_,module,exports){\n'use strict';\n\nvar bind = _dereq_('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n\n},{\"function-bind\":26}],29:[function(_dereq_,module,exports){\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n},{}],30:[function(_dereq_,module,exports){\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n\n},{}],31:[function(_dereq_,module,exports){\n/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n},{}],32:[function(_dereq_,module,exports){\n'use strict';\n\nvar fnToStr = Function.prototype.toString;\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nmodule.exports = function isCallable(value) {\n\tif (!value) { return false; }\n\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\tif (typeof value === 'function' && !value.prototype) { return true; }\n\tif (hasToStringTag) { return tryFunctionObject(value); }\n\tif (isES6ClassFn(value)) { return false; }\n\tvar strClass = toStr.call(value);\n\treturn strClass === fnClass || strClass === genClass;\n};\n\n},{}],33:[function(_dereq_,module,exports){\nmodule.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n\n},{}],34:[function(_dereq_,module,exports){\n'use strict';\nmodule.exports = function (x) {\n\tvar type = typeof x;\n\treturn x !== null && (type === 'object' || type === 'function');\n};\n\n},{}],35:[function(_dereq_,module,exports){\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n},{}],36:[function(_dereq_,module,exports){\nvar wordWrap = _dereq_('word-wrapper')\nvar xtend = _dereq_('xtend')\nvar number = _dereq_('as-number')\n\nvar X_HEIGHTS = ['x', 'e', 'a', 'o', 'n', 's', 'r', 'c', 'u', 'm', 'v', 'w', 'z']\nvar M_WIDTHS = ['m', 'w']\nvar CAP_HEIGHTS = ['H', 'I', 'N', 'E', 'F', 'K', 'L', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']\n\n\nvar TAB_ID = '\\t'.charCodeAt(0)\nvar SPACE_ID = ' '.charCodeAt(0)\nvar ALIGN_LEFT = 0, \n ALIGN_CENTER = 1, \n ALIGN_RIGHT = 2\n\nmodule.exports = function createLayout(opt) {\n return new TextLayout(opt)\n}\n\nfunction TextLayout(opt) {\n this.glyphs = []\n this._measure = this.computeMetrics.bind(this)\n this.update(opt)\n}\n\nTextLayout.prototype.update = function(opt) {\n opt = xtend({\n measure: this._measure\n }, opt)\n this._opt = opt\n this._opt.tabSize = number(this._opt.tabSize, 4)\n\n if (!opt.font)\n throw new Error('must provide a valid bitmap font')\n\n var glyphs = this.glyphs\n var text = opt.text||'' \n var font = opt.font\n this._setupSpaceGlyphs(font)\n \n var lines = wordWrap.lines(text, opt)\n var minWidth = opt.width || 0\n\n //clear glyphs\n glyphs.length = 0\n\n //get max line width\n var maxLineWidth = lines.reduce(function(prev, line) {\n return Math.max(prev, line.width, minWidth)\n }, 0)\n\n //the pen position\n var x = 0\n var y = 0\n var lineHeight = number(opt.lineHeight, font.common.lineHeight)\n var baseline = font.common.base\n var descender = lineHeight-baseline\n var letterSpacing = opt.letterSpacing || 0\n var height = lineHeight * lines.length - descender\n var align = getAlignType(this._opt.align)\n\n //draw text along baseline\n y -= height\n \n //the metrics for this text layout\n this._width = maxLineWidth\n this._height = height\n this._descender = lineHeight - baseline\n this._baseline = baseline\n this._xHeight = getXHeight(font)\n this._capHeight = getCapHeight(font)\n this._lineHeight = lineHeight\n this._ascender = lineHeight - descender - this._xHeight\n \n //layout each glyph\n var self = this\n lines.forEach(function(line, lineIndex) {\n var start = line.start\n var end = line.end\n var lineWidth = line.width\n var lastGlyph\n \n //for each glyph in that line...\n for (var i=start; i<end; i++) {\n var id = text.charCodeAt(i)\n var glyph = self.getGlyph(font, id)\n if (glyph) {\n if (lastGlyph) \n x += getKerning(font, lastGlyph.id, glyph.id)\n\n var tx = x\n if (align === ALIGN_CENTER) \n tx += (maxLineWidth-lineWidth)/2\n else if (align === ALIGN_RIGHT)\n tx += (maxLineWidth-lineWidth)\n\n glyphs.push({\n position: [tx, y],\n data: glyph,\n index: i,\n line: lineIndex\n }) \n\n //move pen forward\n x += glyph.xadvance + letterSpacing\n lastGlyph = glyph\n }\n }\n\n //next line down\n y += lineHeight\n x = 0\n })\n this._linesTotal = lines.length;\n}\n\nTextLayout.prototype._setupSpaceGlyphs = function(font) {\n //These are fallbacks, when the font doesn't include\n //' ' or '\\t' glyphs\n this._fallbackSpaceGlyph = null\n this._fallbackTabGlyph = null\n\n if (!font.chars || font.chars.length === 0)\n return\n\n //try to get space glyph\n //then fall back to the 'm' or 'w' glyphs\n //then fall back to the first glyph available\n var space = getGlyphById(font, SPACE_ID) \n || getMGlyph(font) \n || font.chars[0]\n\n //and create a fallback for tab\n var tabWidth = this._opt.tabSize * space.xadvance\n this._fallbackSpaceGlyph = space\n this._fallbackTabGlyph = xtend(space, {\n x: 0, y: 0, xadvance: tabWidth, id: TAB_ID, \n xoffset: 0, yoffset: 0, width: 0, height: 0\n })\n}\n\nTextLayout.prototype.getGlyph = function(font, id) {\n var glyph = getGlyphById(font, id)\n if (glyph)\n return glyph\n else if (id === TAB_ID) \n return this._fallbackTabGlyph\n else if (id === SPACE_ID) \n return this._fallbackSpaceGlyph\n return null\n}\n\nTextLayout.prototype.computeMetrics = function(text, start, end, width) {\n var letterSpacing = this._opt.letterSpacing || 0\n var font = this._opt.font\n var curPen = 0\n var curWidth = 0\n var count = 0\n var glyph\n var lastGlyph\n\n if (!font.chars || font.chars.length === 0) {\n return {\n start: start,\n end: start,\n width: 0\n }\n }\n\n end = Math.min(text.length, end)\n for (var i=start; i < end; i++) {\n var id = text.charCodeAt(i)\n var glyph = this.getGlyph(font, id)\n\n if (glyph) {\n //move pen forward\n var xoff = glyph.xoffset\n var kern = lastGlyph ? getKerning(font, lastGlyph.id, glyph.id) : 0\n curPen += kern\n\n var nextPen = curPen + glyph.xadvance + letterSpacing\n var nextWidth = curPen + glyph.width\n\n //we've hit our limit; we can't move onto the next glyph\n if (nextWidth >= width || nextPen >= width)\n break\n\n //otherwise continue along our line\n curPen = nextPen\n curWidth = nextWidth\n lastGlyph = glyph\n }\n count++\n }\n \n //make sure rightmost edge lines up with rendered glyphs\n if (lastGlyph)\n curWidth += lastGlyph.xoffset\n\n return {\n start: start,\n end: start + count,\n width: curWidth\n }\n}\n\n//getters for the private vars\n;['width', 'height', \n 'descender', 'ascender',\n 'xHeight', 'baseline',\n 'capHeight',\n 'lineHeight' ].forEach(addGetter)\n\nfunction addGetter(name) {\n Object.defineProperty(TextLayout.prototype, name, {\n get: wrapper(name),\n configurable: true\n })\n}\n\n//create lookups for private vars\nfunction wrapper(name) {\n return (new Function([\n 'return function '+name+'() {',\n ' return this._'+name,\n '}'\n ].join('\\n')))()\n}\n\nfunction getGlyphById(font, id) {\n if (!font.chars || font.chars.length === 0)\n return null\n\n var glyphIdx = findChar(font.chars, id)\n if (glyphIdx >= 0)\n return font.chars[glyphIdx]\n return null\n}\n\nfunction getXHeight(font) {\n for (var i=0; i<X_HEIGHTS.length; i++) {\n var id = X_HEIGHTS[i].charCodeAt(0)\n var idx = findChar(font.chars, id)\n if (idx >= 0) \n return font.chars[idx].height\n }\n return 0\n}\n\nfunction getMGlyph(font) {\n for (var i=0; i<M_WIDTHS.length; i++) {\n var id = M_WIDTHS[i].charCodeAt(0)\n var idx = findChar(font.chars, id)\n if (idx >= 0) \n return font.chars[idx]\n }\n return 0\n}\n\nfunction getCapHeight(font) {\n for (var i=0; i<CAP_HEIGHTS.length; i++) {\n var id = CAP_HEIGHTS[i].charCodeAt(0)\n var idx = findChar(font.chars, id)\n if (idx >= 0) \n return font.chars[idx].height\n }\n return 0\n}\n\nfunction getKerning(font, left, right) {\n if (!font.kernings || font.kernings.length === 0)\n return 0\n\n var table = font.kernings\n for (var i=0; i<table.length; i++) {\n var kern = table[i]\n if (kern.first === left && kern.second === right)\n return kern.amount\n }\n return 0\n}\n\nfunction getAlignType(align) {\n if (align === 'center')\n return ALIGN_CENTER\n else if (align === 'right')\n return ALIGN_RIGHT\n return ALIGN_LEFT\n}\n\nfunction findChar (array, value, start) {\n start = start || 0\n for (var i = start; i < array.length; i++) {\n if (array[i].id === value) {\n return i\n }\n }\n return -1\n}\n},{\"as-number\":2,\"word-wrapper\":69,\"xtend\":72}],37:[function(_dereq_,module,exports){\n(function (Buffer){\nvar xhr = _dereq_('xhr')\nvar noop = function(){}\nvar parseASCII = _dereq_('parse-bmfont-ascii')\nvar parseXML = _dereq_('parse-bmfont-xml')\nvar readBinary = _dereq_('parse-bmfont-binary')\nvar isBinaryFormat = _dereq_('./lib/is-binary')\nvar xtend = _dereq_('xtend')\n\nvar xml2 = (function hasXML2() {\n return self.XMLHttpRequest && \"withCredentials\" in new XMLHttpRequest\n})()\n\nmodule.exports = function(opt, cb) {\n cb = typeof cb === 'function' ? cb : noop\n\n if (typeof opt === 'string')\n opt = { uri: opt }\n else if (!opt)\n opt = {}\n\n var expectBinary = opt.binary\n if (expectBinary)\n opt = getBinaryOpts(opt)\n\n xhr(opt, function(err, res, body) {\n if (err)\n return cb(err)\n if (!/^2/.test(res.statusCode))\n return cb(new Error('http status code: '+res.statusCode))\n if (!body)\n return cb(new Error('no body result'))\n\n var binary = false \n\n //if the response type is an array buffer,\n //we need to convert it into a regular Buffer object\n if (isArrayBuffer(body)) {\n var array = new Uint8Array(body)\n body = new Buffer(array, 'binary')\n }\n\n //now check the string/Buffer response\n //and see if it has a binary BMF header\n if (isBinaryFormat(body)) {\n binary = true\n //if we have a string, turn it into a Buffer\n if (typeof body === 'string') \n body = new Buffer(body, 'binary')\n } \n\n //we are not parsing a binary format, just ASCII/XML/etc\n if (!binary) {\n //might still be a buffer if responseType is 'arraybuffer'\n if (Buffer.isBuffer(body))\n body = body.toString(opt.encoding)\n body = body.trim()\n }\n\n var result\n try {\n var type = res.headers['content-type']\n if (binary)\n result = readBinary(body)\n else if (/json/.test(type) || body.charAt(0) === '{')\n result = JSON.parse(body)\n else if (/xml/.test(type) || body.charAt(0) === '<')\n result = parseXML(body)\n else\n result = parseASCII(body)\n } catch (e) {\n cb(new Error('error parsing font '+e.message))\n cb = noop\n }\n cb(null, result)\n })\n}\n\nfunction isArrayBuffer(arr) {\n var str = Object.prototype.toString\n return str.call(arr) === '[object ArrayBuffer]'\n}\n\nfunction getBinaryOpts(opt) {\n //IE10+ and other modern browsers support array buffers\n if (xml2)\n return xtend(opt, { responseType: 'arraybuffer' })\n \n if (typeof self.XMLHttpRequest === 'undefined')\n throw new Error('your browser does not support XHR loading')\n\n //IE9 and XML1 browsers could still use an override\n var req = new self.XMLHttpRequest()\n req.overrideMimeType('text/plain; charset=x-user-defined')\n return xtend({\n xhr: req\n }, opt)\n}\n\n}).call(this,_dereq_(\"buffer\").Buffer)\n\n},{\"./lib/is-binary\":38,\"buffer\":6,\"parse-bmfont-ascii\":43,\"parse-bmfont-binary\":44,\"parse-bmfont-xml\":45,\"xhr\":70,\"xtend\":72}],38:[function(_dereq_,module,exports){\n(function (Buffer){\nvar equal = _dereq_('buffer-equal')\nvar HEADER = new Buffer([66, 77, 70, 3])\n\nmodule.exports = function(buf) {\n if (typeof buf === 'string')\n return buf.substring(0, 3) === 'BMF'\n return buf.length > 4 && equal(buf.slice(0, 4), HEADER)\n}\n}).call(this,_dereq_(\"buffer\").Buffer)\n\n},{\"buffer\":6,\"buffer-equal\":5}],39:[function(_dereq_,module,exports){\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n},{}],40:[function(_dereq_,module,exports){\n'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = _dereq_('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n\n},{\"./isArguments\":42}],41:[function(_dereq_,module,exports){\n'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = _dereq_('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : _dereq_('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n},{\"./implementation\":40,\"./isArguments\":42}],42:[function(_dereq_,module,exports){\n'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n},{}],43:[function(_dereq_,module,exports){\nmodule.exports = function parseBMFontAscii(data) {\n if (!data)\n throw new Error('no data provided')\n data = data.toString().trim()\n\n var output = {\n pages: [],\n chars: [],\n kernings: []\n }\n\n var lines = data.split(/\\r\\n?|\\n/g)\n\n if (lines.length === 0)\n throw new Error('no data in BMFont file')\n\n for (var i = 0; i < lines.length; i++) {\n var lineData = splitLine(lines[i], i)\n if (!lineData) //skip empty lines\n continue\n\n if (lineData.key === 'page') {\n if (typeof lineData.data.id !== 'number')\n throw new Error('malformed file at line ' + i + ' -- needs page id=N')\n if (typeof lineData.data.file !== 'string')\n throw new Error('malformed file at line ' + i + ' -- needs page file=\"path\"')\n output.pages[lineData.data.id] = lineData.data.file\n } else if (lineData.key === 'chars' || lineData.key === 'kernings') {\n //... do nothing for these two ...\n } else if (lineData.key === 'char') {\n output.chars.push(lineData.data)\n } else if (lineData.key === 'kerning') {\n output.kernings.push(lineData.data)\n } else {\n output[lineData.key] = lineData.data\n }\n }\n\n return output\n}\n\nfunction splitLine(line, idx) {\n line = line.replace(/\\t+/g, ' ').trim()\n if (!line)\n return null\n\n var space = line.indexOf(' ')\n if (space === -1) \n throw new Error(\"no named row at line \" + idx)\n\n var key = line.substring(0, space)\n\n line = line.substring(space + 1)\n //clear \"letter\" field as it is non-standard and\n //requires additional complexity to parse \" / = symbols\n line = line.replace(/letter=[\\'\\\"]\\S+[\\'\\\"]/gi, '') \n line = line.split(\"=\")\n line = line.map(function(str) {\n return str.trim().match((/(\".*?\"|[^\"\\s]+)+(?=\\s*|\\s*$)/g))\n })\n\n var data = []\n for (var i = 0; i < line.length; i++) {\n var dt = line[i]\n if (i === 0) {\n data.push({\n key: dt[0],\n data: \"\"\n })\n } else if (i === line.length - 1) {\n data[data.length - 1].data = parseData(dt[0])\n } else {\n data[data.length - 1].data = parseData(dt[0])\n data.push({\n key: dt[1],\n data: \"\"\n })\n }\n }\n\n var out = {\n key: key,\n data: {}\n }\n\n data.forEach(function(v) {\n out.data[v.key] = v.data;\n })\n\n return out\n}\n\nfunction parseData(data) {\n if (!data || data.length === 0)\n return \"\"\n\n if (data.indexOf('\"') === 0 || data.indexOf(\"'\") === 0)\n return data.substring(1, data.length - 1)\n if (data.indexOf(',') !== -1)\n return parseIntList(data)\n return parseInt(data, 10)\n}\n\nfunction parseIntList(data) {\n return data.split(',').map(function(val) {\n return parseInt(val, 10)\n })\n}\n},{}],44:[function(_dereq_,module,exports){\nvar HEADER = [66, 77, 70]\n\nmodule.exports = function readBMFontBinary(buf) {\n if (buf.length < 6)\n throw new Error('invalid buffer length for BMFont')\n\n var header = HEADER.every(function(byte, i) {\n return buf.readUInt8(i) === byte\n })\n\n if (!header)\n throw new Error('BMFont missing BMF byte header')\n\n var i = 3\n var vers = buf.readUInt8(i++)\n if (vers > 3)\n throw new Error('Only supports BMFont Binary v3 (BMFont App v1.10)')\n \n var target = { kernings: [], chars: [] }\n for (var b=0; b<5; b++)\n i += readBlock(target, buf, i)\n return target\n}\n\nfunction readBlock(target, buf, i) {\n if (i > buf.length-1)\n return 0\n\n var blockID = buf.readUInt8(i++)\n var blockSize = buf.readInt32LE(i)\n i += 4\n\n switch(blockID) {\n case 1: \n target.info = readInfo(buf, i)\n break\n case 2:\n target.common = readCommon(buf, i)\n break\n case 3:\n target.pages = readPages(buf, i, blockSize)\n break\n case 4:\n target.chars = readChars(buf, i, blockSize)\n break\n case 5:\n target.kernings = readKernings(buf, i, blockSize)\n break\n }\n return 5 + blockSize\n}\n\nfunction readInfo(buf, i) {\n var info = {}\n info.size = buf.readInt16LE(i)\n\n var bitField = buf.readUInt8(i+2)\n info.smooth = (bitField >> 7) & 1\n info.unicode = (bitField >> 6) & 1\n info.italic = (bitField >> 5) & 1\n info.bold = (bitField >> 4) & 1\n \n //fixedHeight is only mentioned in binary spec \n if ((bitField >> 3) & 1)\n info.fixedHeight = 1\n \n info.charset = buf.readUInt8(i+3) || ''\n info.stretchH = buf.readUInt16LE(i+4)\n info.aa = buf.readUInt8(i+6)\n info.padding = [\n buf.readInt8(i+7),\n buf.readInt8(i+8),\n buf.readInt8(i+9),\n buf.readInt8(i+10)\n ]\n info.spacing = [\n buf.readInt8(i+11),\n buf.readInt8(i+12)\n ]\n info.outline = buf.readUInt8(i+13)\n info.face = readStringNT(buf, i+14)\n return info\n}\n\nfunction readCommon(buf, i) {\n var common = {}\n common.lineHeight = buf.readUInt16LE(i)\n common.base = buf.readUInt16LE(i+2)\n common.scaleW = buf.readUInt16LE(i+4)\n common.scaleH = buf.readUInt16LE(i+6)\n common.pages = buf.readUInt16LE(i+8)\n var bitField = buf.readUInt8(i+10)\n common.packed = 0\n common.alphaChnl = buf.readUInt8(i+11)\n common.redChnl = buf.readUInt8(i+12)\n common.greenChnl = buf.readUInt8(i+13)\n common.blueChnl = buf.readUInt8(i+14)\n return common\n}\n\nfunction readPages(buf, i, size) {\n var pages = []\n var text = readNameNT(buf, i)\n var len = text.length+1\n var count = size / len\n for (var c=0; c<count; c++) {\n pages[c] = buf.slice(i, i+text.length).toString('utf8')\n i += len\n }\n return pages\n}\n\nfunction readChars(buf, i, blockSize) {\n var chars = []\n\n var count = blockSize / 20\n for (var c=0; c<count; c++) {\n var char = {}\n var off = c*20\n char.id = buf.readUInt32LE(i + 0 + off)\n char.x = buf.readUInt16LE(i + 4 + off)\n char.y = buf.readUInt16LE(i + 6 + off)\n char.width = buf.readUInt16LE(i + 8 + off)\n char.height = buf.readUInt16LE(i + 10 + off)\n char.xoffset = buf.readInt16LE(i + 12 + off)\n char.yoffset = buf.readInt16LE(i + 14 + off)\n char.xadvance = buf.readInt16LE(i + 16 + off)\n char.page = buf.readUInt8(i + 18 + off)\n char.chnl = buf.readUInt8(i + 19 + off)\n chars[c] = char\n }\n return chars\n}\n\nfunction readKernings(buf, i, blockSize) {\n var kernings = []\n var count = blockSize / 10\n for (var c=0; c<count; c++) {\n var kern = {}\n var off = c*10\n kern.first = buf.readUInt32LE(i + 0 + off)\n kern.second = buf.readUInt32LE(i + 4 + off)\n kern.amount = buf.readInt16LE(i + 8 + off)\n kernings[c] = kern\n }\n return kernings\n}\n\nfunction readNameNT(buf, offset) {\n var pos=offset\n for (; pos<buf.length; pos++) {\n if (buf[pos] === 0x00) \n break\n }\n return buf.slice(offset, pos)\n}\n\nfunction readStringNT(buf, offset) {\n return readNameNT(buf, offset).toString('utf8')\n}\n},{}],45:[function(_dereq_,module,exports){\nvar parseAttributes = _dereq_('./parse-attribs')\nvar parseFromString = _dereq_('xml-parse-from-string')\n\n//In some cases element.attribute.nodeName can return\n//all lowercase values.. so we need to map them to the correct \n//case\nvar NAME_MAP = {\n scaleh: 'scaleH',\n scalew: 'scaleW',\n stretchh: 'stretchH',\n lineheight: 'lineHeight',\n alphachnl: 'alphaChnl',\n redchnl: 'redChnl',\n greenchnl: 'greenChnl',\n bluechnl: 'blueChnl'\n}\n\nmodule.exports = function parse(data) {\n data = data.toString()\n \n var xmlRoot = parseFromString(data)\n var output = {\n pages: [],\n chars: [],\n kernings: []\n }\n\n //get config settings\n ;['info', 'common'].forEach(function(key) {\n var element = xmlRoot.getElementsByTagName(key)[0]\n if (element)\n output[key] = parseAttributes(getAttribs(element))\n })\n\n //get page info\n var pageRoot = xmlRoot.getElementsByTagName('pages')[0]\n if (!pageRoot)\n throw new Error('malformed file -- no <pages> element')\n var pages = pageRoot.getElementsByTagName('page')\n for (var i=0; i<pages.length; i++) {\n var p = pages[i]\n var id = parseInt(p.getAttribute('id'), 10)\n var file = p.getAttribute('file')\n if (isNaN(id))\n throw new Error('malformed file -- page \"id\" attribute is NaN')\n if (!file)\n throw new Error('malformed file -- needs page \"file\" attribute')\n output.pages[parseInt(id, 10)] = file\n }\n\n //get kernings / chars\n ;['chars', 'kernings'].forEach(function(key) {\n var element = xmlRoot.getElementsByTagName(key)[0]\n if (!element)\n return\n var childTag = key.substring(0, key.length-1)\n var children = element.getElementsByTagName(childTag)\n for (var i=0; i<children.length; i++) { \n var child = children[i]\n output[key].push(parseAttributes(getAttribs(child)))\n }\n })\n return output\n}\n\nfunction getAttribs(element) {\n var attribs = getAttribList(element)\n return attribs.reduce(function(dict, attrib) {\n var key = mapName(attrib.nodeName)\n dict[key] = attrib.nodeValue\n return dict\n }, {})\n}\n\nfunction getAttribList(element) {\n //IE8+ and modern browsers\n var attribs = []\n for (var i=0; i<element.attributes.length; i++)\n attribs.push(element.attributes[i])\n return attribs\n}\n\nfunction mapName(nodeName) {\n return NAME_MAP[nodeName.toLowerCase()] || nodeName\n}\n},{\"./parse-attribs\":46,\"xml-parse-from-string\":71}],46:[function(_dereq_,module,exports){\n//Some versions of GlyphDesigner have a typo\n//that causes some bugs with parsing. \n//Need to confirm with recent version of the software\n//to see whether this is still an issue or not.\nvar GLYPH_DESIGNER_ERROR = 'chasrset'\n\nmodule.exports = function parseAttributes(obj) {\n if (GLYPH_DESIGNER_ERROR in obj) {\n obj['charset'] = obj[GLYPH_DESIGNER_ERROR]\n delete obj[GLYPH_DESIGNER_ERROR]\n }\n\n for (var k in obj) {\n if (k === 'face' || k === 'charset') \n continue\n else if (k === 'padding' || k === 'spacing')\n obj[k] = parseIntList(obj[k])\n else\n obj[k] = parseInt(obj[k], 10) \n }\n return obj\n}\n\nfunction parseIntList(data) {\n return data.split(',').map(function(val) {\n return parseInt(val, 10)\n })\n}\n},{}],47:[function(_dereq_,module,exports){\nvar trim = _dereq_('string.prototype.trim')\n , forEach = _dereq_('for-each')\n , isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n }\n\nmodule.exports = function (headers) {\n if (!headers)\n return {}\n\n var result = {}\n\n forEach(\n trim(headers).split('\\n')\n , function (row) {\n var index = row.indexOf(':')\n , key = trim(row.slice(0, index)).toLowerCase()\n , value = trim(row.slice(index + 1))\n\n if (typeof(result[key]) === 'undefined') {\n result[key] = value\n } else if (isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [ result[key], value ]\n }\n }\n )\n\n return result\n}\n\n},{\"for-each\":24,\"string.prototype.trim\":53}],48:[function(_dereq_,module,exports){\n(function (global){\nvar performance = global.performance || {};\n\nvar present = (function () {\n var names = ['now', 'webkitNow', 'msNow', 'mozNow', 'oNow'];\n while (names.length) {\n var name = names.shift();\n if (name in performance) {\n return performance[name].bind(performance);\n }\n }\n\n var dateNow = Date.now || function () { return new Date().getTime(); };\n var navigationStart = (performance.timing || {}).navigationStart || dateNow();\n return function () {\n return dateNow() - navigationStart;\n };\n}());\n\npresent.performanceNow = performance.now;\npresent.noConflict = function () {\n performance.now = present.performanceNow;\n};\npresent.conflict = function () {\n performance.now = present;\n};\npresent.conflict();\n\nmodule.exports = present;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],49:[function(_dereq_,module,exports){\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],50:[function(_dereq_,module,exports){\n(function (setImmediate){\n(function(root) {\n\n\t// Store setTimeout reference so promise-polyfill will be unaffected by\n\t// other code modifying setTimeout (like sinon.useFakeTimers())\n\tvar setTimeoutFunc = setTimeout;\n\n\t// Use polyfill for setImmediate for performance gains\n\tvar asap = (typeof setImmediate === 'function' && setImmediate) ||\n\t\tfunction(fn) { setTimeoutFunc(fn, 1); };\n\n\t// Polyfill for Function.prototype.bind\n\tfunction bind(fn, thisArg) {\n\t\treturn function() {\n\t\t\tfn.apply(thisArg, arguments);\n\t\t}\n\t}\n\n\tvar isArray = Array.isArray || function(value) { return Object.prototype.toString.call(value) === \"[object Array]\" };\n\n\tfunction Promise(fn) {\n\t\tif (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n\t\tif (typeof fn !== 'function') throw new TypeError('not a function');\n\t\tthis._state = null;\n\t\tthis._value = null;\n\t\tthis._deferreds = []\n\n\t\tdoResolve(fn, bind(resolve, this), bind(reject, this))\n\t}\n\n\tfunction handle(deferred) {\n\t\tvar me = this;\n\t\tif (this._state === null) {\n\t\t\tthis._deferreds.push(deferred);\n\t\t\treturn\n\t\t}\n\t\tasap(function() {\n\t\t\tvar cb = me._state ? deferred.onFulfilled : deferred.onRejected\n\t\t\tif (cb === null) {\n\t\t\t\t(me._state ? deferred.resolve : deferred.reject)(me._value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar ret;\n\t\t\ttry {\n\t\t\t\tret = cb(me._value);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdeferred.resolve(ret);\n\t\t})\n\t}\n\n\tfunction resolve(newValue) {\n\t\ttry { //Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n\t\t\tif (newValue === this) throw new TypeError('A promise cannot be resolved with itself.');\n\t\t\tif (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n\t\t\t\tvar then = newValue.then;\n\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\tdoResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._state = true;\n\t\t\tthis._value = newValue;\n\t\t\tfinale.call(this);\n\t\t} catch (e) { reject.call(this, e); }\n\t}\n\n\tfunction reject(newValue) {\n\t\tthis._state = false;\n\t\tthis._value = newValue;\n\t\tfinale.call(this);\n\t}\n\n\tfunction finale() {\n\t\tfor (var i = 0, len = this._deferreds.length; i < len; i++) {\n\t\t\thandle.call(this, this._deferreds[i]);\n\t\t}\n\t\tthis._deferreds = null;\n\t}\n\n\tfunction Handler(onFulfilled, onRejected, resolve, reject){\n\t\tthis.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n\t\tthis.onRejected = typeof onRejected === 'function' ? onRejected : null;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t}\n\n\t/**\n\t * Take a potentially misbehaving resolver function and make sure\n\t * onFulfilled and onRejected are only called once.\n\t *\n\t * Makes no guarantees about asynchrony.\n\t */\n\tfunction doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}\n\n\tPromise.prototype['catch'] = function (onRejected) {\n\t\treturn this.then(null, onRejected);\n\t};\n\n\tPromise.prototype.then = function(onFulfilled, onRejected) {\n\t\tvar me = this;\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\thandle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));\n\t\t})\n\t};\n\n\tPromise.all = function () {\n\t\tvar args = Array.prototype.slice.call(arguments.length === 1 && isArray(arguments[0]) ? arguments[0] : arguments);\n\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tif (args.length === 0) return resolve([]);\n\t\t\tvar remaining = args.length;\n\t\t\tfunction res(i, val) {\n\t\t\t\ttry {\n\t\t\t\t\tif (val && (typeof val === 'object' || typeof val === 'function')) {\n\t\t\t\t\t\tvar then = val.then;\n\t\t\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\t\t\tthen.call(val, function (val) { res(i, val) }, reject);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\targs[i] = val;\n\t\t\t\t\tif (--remaining === 0) {\n\t\t\t\t\t\tresolve(args);\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\treject(ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t\tres(i, args[i]);\n\t\t\t}\n\t\t});\n\t};\n\n\tPromise.resolve = function (value) {\n\t\tif (value && typeof value === 'object' && value.constructor === Promise) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Promise(function (resolve) {\n\t\t\tresolve(value);\n\t\t});\n\t};\n\n\tPromise.reject = function (value) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\treject(value);\n\t\t});\n\t};\n\n\tPromise.race = function (values) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tfor(var i = 0, len = values.length; i < len; i++) {\n\t\t\t\tvalues[i].then(resolve, reject);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Set the immediate function to execute callbacks\n\t * @param fn {function} Function to execute\n\t * @private\n\t */\n\tPromise._setImmediateFn = function _setImmediateFn(fn) {\n\t\tasap = fn;\n\t};\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = Promise;\n\t} else if (!root.Promise) {\n\t\troot.Promise = Promise;\n\t}\n\n})(this);\n\n}).call(this,_dereq_(\"timers\").setImmediate)\n\n},{\"timers\":67}],51:[function(_dereq_,module,exports){\nvar dtype = _dereq_('dtype')\nvar anArray = _dereq_('an-array')\nvar isBuffer = _dereq_('is-buffer')\n\nvar CW = [0, 2, 3]\nvar CCW = [2, 1, 3]\n\nmodule.exports = function createQuadElements(array, opt) {\n //if user didn't specify an output array\n if (!array || !(anArray(array) || isBuffer(array))) {\n opt = array || {}\n array = null\n }\n\n if (typeof opt === 'number') //backwards-compatible\n opt = { count: opt }\n else\n opt = opt || {}\n\n var type = typeof opt.type === 'string' ? opt.type : 'uint16'\n var count = typeof opt.count === 'number' ? opt.count : 1\n var start = (opt.start || 0) \n\n var dir = opt.clockwise !== false ? CW : CCW,\n a = dir[0], \n b = dir[1],\n c = dir[2]\n\n var numIndices = count * 6\n\n var indices = array || new (dtype(type))(numIndices)\n for (var i = 0, j = 0; i < numIndices; i += 6, j += 4) {\n var x = i + start\n indices[x + 0] = j + 0\n indices[x + 1] = j + 1\n indices[x + 2] = j + 2\n indices[x + 3] = j + a\n indices[x + 4] = j + b\n indices[x + 5] = j + c\n }\n return indices\n}\n},{\"an-array\":1,\"dtype\":13,\"is-buffer\":31}],52:[function(_dereq_,module,exports){\n'use strict';\n\nvar bind = _dereq_('function-bind');\nvar ES = _dereq_('es-abstract/es5');\nvar replace = bind.call(Function.call, String.prototype.replace);\n\n/* eslint-disable no-control-regex */\nvar leftWhitespace = /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ES.ToString(ES.CheckObjectCoercible(this));\n\treturn replace(replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n\n},{\"es-abstract/es5\":15,\"function-bind\":26}],53:[function(_dereq_,module,exports){\n'use strict';\n\nvar bind = _dereq_('function-bind');\nvar define = _dereq_('define-properties');\n\nvar implementation = _dereq_('./implementation');\nvar getPolyfill = _dereq_('./polyfill');\nvar shim = _dereq_('./shim');\n\nvar boundTrim = bind.call(Function.call, getPolyfill());\n\ndefine(boundTrim, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundTrim;\n\n},{\"./implementation\":52,\"./polyfill\":54,\"./shim\":55,\"define-properties\":11,\"function-bind\":26}],54:[function(_dereq_,module,exports){\n'use strict';\n\nvar implementation = _dereq_('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n\n},{\"./implementation\":52}],55:[function(_dereq_,module,exports){\n'use strict';\n\nvar define = _dereq_('define-properties');\nvar getPolyfill = _dereq_('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n\n},{\"./polyfill\":54,\"define-properties\":11}],56:[function(_dereq_,module,exports){\n/*\n * anime.js v3.0.0\n * (c) 2019 Julian Garnier\n * Released under the MIT license\n * animejs.com\n */\n\n'use strict';\n\n// Defaults\n\nvar defaultInstanceSettings = {\n update: null,\n begin: null,\n loopBegin: null,\n changeBegin: null,\n change: null,\n changeComplete: null,\n loopComplete: null,\n complete: null,\n loop: 1,\n direction: 'normal',\n autoplay: true,\n timelineOffset: 0\n};\n\nvar defaultTweenSettings = {\n duration: 1000,\n delay: 0,\n endDelay: 0,\n easing: 'easeOutElastic(1, .5)',\n round: 0\n};\n\nvar validTransforms = ['translateX', 'translateY', 'translateZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'perspective'];\n\n// Caching\n\nvar cache = {\n CSS: {},\n springs: {}\n};\n\n// Utils\n\nfunction minMax(val, min, max) {\n return Math.min(Math.max(val, min), max);\n}\n\nfunction stringContains(str, text) {\n return str.indexOf(text) > -1;\n}\n\nfunction applyArguments(func, args) {\n return func.apply(null, args);\n}\n\nvar hexRegex = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i;\nvar rgbPrefixRegex = /^rgb/;\nvar hslRegex = /^hsl/;\n\nvar is = {\n arr: function (a) { return Array.isArray(a); },\n obj: function (a) { return stringContains(Object.prototype.toString.call(a), 'Object'); },\n pth: function (a) { return is.obj(a) && a.hasOwnProperty('totalLength'); },\n svg: function (a) { return a instanceof SVGElement; },\n inp: function (a) { return a instanceof HTMLInputElement; },\n dom: function (a) { return a.nodeType || is.svg(a); },\n str: function (a) { return typeof a === 'string'; },\n fnc: function (a) { return typeof a === 'function'; },\n und: function (a) { return typeof a === 'undefined'; },\n hex: function (a) { return hexRegex.test(a); },\n rgb: function (a) { return rgbPrefixRegex.test(a); },\n hsl: function (a) { return hslRegex.test(a); },\n col: function (a) { return (is.hex(a) || is.rgb(a) || is.hsl(a)); },\n key: function (a) { return !defaultInstanceSettings.hasOwnProperty(a) && !defaultTweenSettings.hasOwnProperty(a) && a !== 'targets' && a !== 'keyframes'; }\n};\n\n// Easings\n\nvar easingFunctionRegex = /\\(([^)]+)\\)/;\n\nfunction parseEasingParameters(string) {\n var match = easingFunctionRegex.exec(string);\n return match ? match[1].split(',').map(function (p) { return parseFloat(p); }) : [];\n}\n\n// Spring solver inspired by Webkit Copyright © 2016 Apple Inc. All rights reserved. https://webkit.org/demos/spring/spring.js\n\nfunction spring(string, duration) {\n\n var params = parseEasingParameters(string);\n var mass = minMax(is.und(params[0]) ? 1 : params[0], .1, 100);\n var stiffness = minMax(is.und(params[1]) ? 100 : params[1], .1, 100);\n var damping = minMax(is.und(params[2]) ? 10 : params[2], .1, 100);\n var velocity = minMax(is.und(params[3]) ? 0 : params[3], .1, 100);\n var w0 = Math.sqrt(stiffness / mass);\n var zeta = damping / (2 * Math.sqrt(stiffness * mass));\n var wd = zeta < 1 ? w0 * Math.sqrt(1 - zeta * zeta) : 0;\n var a = 1;\n var b = zeta < 1 ? (zeta * w0 + -velocity) / wd : -velocity + w0;\n\n function solver(t) {\n var progress = duration ? (duration * t) / 1000 : t;\n if (zeta < 1) {\n progress = Math.exp(-progress * zeta * w0) * (a * Math.cos(wd * progress) + b * Math.sin(wd * progress));\n } else {\n progress = (a + b * progress) * Math.exp(-progress * w0);\n }\n if (t === 0 || t === 1) { return t; }\n return 1 - progress;\n }\n\n function getDuration() {\n var cached = cache.springs[string];\n if (cached) { return cached; }\n var frame = 1/6;\n var elapsed = 0;\n var rest = 0;\n while(true) {\n elapsed += frame;\n if (solver(elapsed) === 1) {\n rest++;\n if (rest >= 16) { break; }\n } else {\n rest = 0;\n }\n }\n var duration = elapsed * frame * 1000;\n cache.springs[string] = duration;\n return duration;\n }\n\n return duration ? solver : getDuration;\n\n}\n\n// Elastic easing adapted from jQueryUI http://api.jqueryui.com/easings/\n\nfunction elastic(amplitude, period) {\n if ( amplitude === void 0 ) amplitude = 1;\n if ( period === void 0 ) period = .5;\n\n var a = minMax(amplitude, 1, 10);\n var p = minMax(period, .1, 2);\n return function (t) {\n return (t === 0 || t === 1) ? t :\n -a * Math.pow(2, 10 * (t - 1)) * Math.sin((((t - 1) - (p / (Math.PI * 2) * Math.asin(1 / a))) * (Math.PI * 2)) / p);\n }\n}\n\n// Basic steps easing implementation https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function\n\nfunction steps(steps) {\n if ( steps === void 0 ) steps = 10;\n\n return function (t) { return Math.round(t * steps) * (1 / steps); };\n}\n\n// BezierEasing https://github.com/gre/bezier-easing\n\nvar bezier = (function () {\n\n var kSplineTableSize = 11;\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\n function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1 }\n function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1 }\n function C(aA1) { return 3.0 * aA1 }\n\n function calcBezier(aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT }\n function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1) }\n\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\n var currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) { aB = currentT; } else { aA = currentT; }\n } while (Math.abs(currentX) > 0.0000001 && ++i < 10);\n return currentT;\n }\n\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < 4; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) { return aGuessT; }\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n }\n\n function bezier(mX1, mY1, mX2, mY2) {\n\n if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { return; }\n var sampleValues = new Float32Array(kSplineTableSize);\n\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n\n function getTForX(aX) {\n\n var intervalStart = 0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample;\n\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= 0.001) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n\n }\n\n return function (x) {\n if (mX1 === mY1 && mX2 === mY2) { return x; }\n if (x === 0 || x === 1) { return x; }\n return calcBezier(getTForX(x), mY1, mY2);\n }\n\n }\n\n return bezier;\n\n})();\n\nvar penner = (function () {\n\n var names = ['Quad', 'Cubic', 'Quart', 'Quint', 'Sine', 'Expo', 'Circ', 'Back', 'Elastic'];\n\n // Approximated Penner equations http://matthewlein.com/ceaser/\n\n var curves = {\n In: [\n [0.550, 0.085, 0.680, 0.530], /* inQuad */\n [0.550, 0.055, 0.675, 0.190], /* inCubic */\n [0.895, 0.030, 0.685, 0.220], /* inQuart */\n [0.755, 0.050, 0.855, 0.060], /* inQuint */\n [0.470, 0.000, 0.745, 0.715], /* inSine */\n [0.950, 0.050, 0.795, 0.035], /* inExpo */\n [0.600, 0.040, 0.980, 0.335], /* inCirc */\n [0.600,-0.280, 0.735, 0.045], /* inBack */\n elastic /* inElastic */\n ],\n Out: [\n [0.250, 0.460, 0.450, 0.940], /* outQuad */\n [0.215, 0.610, 0.355, 1.000], /* outCubic */\n [0.165, 0.840, 0.440, 1.000], /* outQuart */\n [0.230, 1.000, 0.320, 1.000], /* outQuint */\n [0.390, 0.575, 0.565, 1.000], /* outSine */\n [0.190, 1.000, 0.220, 1.000], /* outExpo */\n [0.075, 0.820, 0.165, 1.000], /* outCirc */\n [0.175, 0.885, 0.320, 1.275], /* outBack */\n function (a, p) { return function (t) { return 1 - elastic(a, p)(1 - t); }; } /* outElastic */\n ],\n InOut: [\n [0.455, 0.030, 0.515, 0.955], /* inOutQuad */\n [0.645, 0.045, 0.355, 1.000], /* inOutCubic */\n [0.770, 0.000, 0.175, 1.000], /* inOutQuart */\n [0.860, 0.000, 0.070, 1.000], /* inOutQuint */\n [0.445, 0.050, 0.550, 0.950], /* inOutSine */\n [1.000, 0.000, 0.000, 1.000], /* inOutExpo */\n [0.785, 0.135, 0.150, 0.860], /* inOutCirc */\n [0.680,-0.550, 0.265, 1.550], /* inOutBack */\n function (a, p) { return function (t) { return t < .5 ? elastic(a, p)(t * 2) / 2 : 1 - elastic(a, p)(t * -2 + 2) / 2; }; } /* inOutElastic */\n ]\n };\n\n var eases = {\n linear: [0.250, 0.250, 0.750, 0.750]\n };\n\n for (var coords in curves) {\n for (var i = 0, len = curves[coords].length; i < len; i++) {\n eases['ease'+coords+names[i]] = curves[coords][i];\n }\n }\n\n return eases;\n\n})();\n\nfunction parseEasings(easing, duration) {\n if (is.fnc(easing)) { return easing; }\n var name = easing.split('(')[0];\n var ease = penner[name];\n var args = parseEasingParameters(easing);\n switch (name) {\n case 'spring' : return spring(easing, duration);\n case 'cubicBezier' : return applyArguments(bezier, args);\n case 'steps' : return applyArguments(steps, args);\n default : return is.fnc(ease) ? applyArguments(ease, args) : applyArguments(bezier, ease);\n }\n}\n\n// Strings\n\nfunction selectString(str) {\n try {\n var nodes = document.querySelectorAll(str);\n return nodes;\n } catch(e) {\n return;\n }\n}\n\n// Arrays\n\nvar auxArrayFilter = [];\n\nfunction filterArray(arr, callback) {\n var result = auxArrayFilter;\n\n var len = arr.length;\n var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in arr) {\n var val = arr[i];\n if (callback.call(thisArg, val, i, arr)) {\n result.push(val);\n }\n }\n }\n\n // arr turns into the auxArray and we return the previously aux array.\n auxArrayFilter = arr;\n auxArrayFilter.length = 0;\n return result;\n}\n\nfunction flattenArray (arr, result) {\n if (!result) { result = []; }\n for (var i = 0, length = arr.length; i < length; i++) {\n var value = arr[i];\n if (Array.isArray(value)) {\n flattenArray(value, result);\n } else {\n result.push(value);\n }\n }\n return result;\n}\n\nfunction toArray(o) {\n if (is.arr(o)) { return o; }\n if (is.str(o)) { o = selectString(o) || o; }\n if (o instanceof NodeList || o instanceof HTMLCollection) { return [].slice.call(o); }\n return [o];\n}\n\nfunction arrayContains(arr, val) {\n return arr.some(function (a) { return a === val; });\n}\n\n// Objects\n\nfunction cloneObject(o) {\n var clone = {};\n for (var p in o) { clone[p] = o[p]; }\n return clone;\n}\n\nfunction replaceObjectProps(o1, o2) {\n var o = cloneObject(o1);\n for (var p in o1) { o[p] = o2.hasOwnProperty(p) ? o2[p] : o1[p]; }\n return o;\n}\n\nfunction mergeObjects(o1, o2) {\n var o = cloneObject(o1);\n for (var p in o2) { o[p] = is.und(o1[p]) ? o2[p] : o1[p]; }\n return o;\n}\n\n// Colors\n\nvar rgbRegex = /rgb\\((\\d+,\\s*[\\d]+,\\s*[\\d]+)\\)/g;\n\nfunction rgbToRgba(rgbValue) {\n var rgb = rgbRegex.exec(rgbValue);\n return rgb ? (\"rgba(\" + (rgb[1]) + \",1)\") : rgbValue;\n}\n\nvar hexToRgbaHexRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nvar hexToRgbaRgbRegex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n\nfunction hexToRgba(hexValue) {\n var hex = hexValue.replace(hexToRgbaHexRegex, function (m, r, g, b) { return r + r + g + g + b + b; } );\n var rgb = hexToRgbaRgbRegex.exec(hex);\n var r = parseInt(rgb[1], 16);\n var g = parseInt(rgb[2], 16);\n var b = parseInt(rgb[3], 16);\n return (\"rgba(\" + r + \",\" + g + \",\" + b + \",1)\");\n}\n\nvar hslToRgbaHsl1Regex = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g;\nvar hslToRgbaHsl2Regex = /hsla\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%,\\s*([\\d.]+)\\)/g;\n\nfunction hslToRgba(hslValue) {\n var hsl = hslToRgbaHsl1Regex.exec(hslValue) || hslToRgbaHsl2Regex.exec(hslValue);\n var h = parseInt(hsl[1], 10) / 360;\n var s = parseInt(hsl[2], 10) / 100;\n var l = parseInt(hsl[3], 10) / 100;\n var a = hsl[4] || 1;\n function hue2rgb(p, q, t) {\n if (t < 0) { t += 1; }\n if (t > 1) { t -= 1; }\n if (t < 1/6) { return p + (q - p) * 6 * t; }\n if (t < 1/2) { return q; }\n if (t < 2/3) { return p + (q - p) * (2/3 - t) * 6; }\n return p;\n }\n var r, g, b;\n if (s == 0) {\n r = g = b = l;\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n return (\"rgba(\" + (r * 255) + \",\" + (g * 255) + \",\" + (b * 255) + \",\" + a + \")\");\n}\n\nfunction colorToRgb(val) {\n if (is.rgb(val)) { return rgbToRgba(val); }\n if (is.hex(val)) { return hexToRgba(val); }\n if (is.hsl(val)) { return hslToRgba(val); }\n}\n\n// Units\n\nvar unitRegex = /([\\+\\-]?[0-9#\\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/;\n\nfunction getUnit(val) {\n var split = unitRegex.exec(val);\n if (split) { return split[2]; }\n}\n\nfunction getTransformUnit(propName) {\n if (stringContains(propName, 'translate') || propName === 'perspective') { return 'px'; }\n if (stringContains(propName, 'rotate') || stringContains(propName, 'skew')) { return 'deg'; }\n}\n\n// Values\n\nfunction getFunctionValue(val, animatable) {\n if (!is.fnc(val)) { return val; }\n return val(animatable.target, animatable.id, animatable.total);\n}\n\nfunction getAttribute(el, prop) {\n return el.getAttribute(prop);\n}\n\nfunction convertPxToUnit(el, value, unit) {\n var valueUnit = getUnit(value);\n if (arrayContains([unit, 'deg', 'rad', 'turn'], valueUnit)) { return value; }\n var cached = cache.CSS[value + unit];\n if (!is.und(cached)) { return cached; }\n var baseline = 100;\n var tempEl = document.createElement(el.tagName);\n var parentEl = (el.parentNode && (el.parentNode !== document)) ? el.parentNode : document.body;\n parentEl.appendChild(tempEl);\n tempEl.style.position = 'absolute';\n tempEl.style.width = baseline + unit;\n var factor = baseline / tempEl.offsetWidth;\n parentEl.removeChild(tempEl);\n var convertedUnit = factor * parseFloat(value);\n cache.CSS[value + unit] = convertedUnit;\n return convertedUnit;\n}\n\nfunction getCSSValue(el, prop, unit) {\n if (prop in el.style) {\n var uppercasePropName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n var value = el.style[prop] || getComputedStyle(el).getPropertyValue(uppercasePropName) || '0';\n return unit ? convertPxToUnit(el, value, unit) : value;\n }\n}\n\nfunction getAnimationType(el, prop) {\n if (is.dom(el) && !is.inp(el) && (getAttribute(el, prop) || (is.svg(el) && el[prop]))) { return 'attribute'; }\n if (is.dom(el) && arrayContains(validTransforms, prop)) { return 'transform'; }\n if (is.dom(el) && (prop !== 'transform' && getCSSValue(el, prop))) { return 'css'; }\n if (el[prop] != null) { return 'object'; }\n}\n\nvar transformRegex = /(\\w+)\\(([^)]*)\\)/g;\n\nfunction getElementTransforms(el) {\n if (!is.dom(el)) { return; }\n var str = el.style.transform || '';\n var transforms = new Map();\n var m; while (m = transformRegex.exec(str)) { transforms.set(m[1], m[2]); }\n return transforms;\n}\n\nfunction getTransformValue(el, propName, animatable, unit) {\n var defaultVal = stringContains(propName, 'scale') ? 1 : 0 + getTransformUnit(propName);\n var value = getElementTransforms(el).get(propName) || defaultVal;\n if (animatable) {\n animatable.transforms.list.set(propName, value);\n animatable.transforms['last'] = propName;\n }\n return unit ? convertPxToUnit(el, value, unit) : value;\n}\n\nfunction getOriginalTargetValue(target, propName, unit, animatable) {\n switch (getAnimationType(target, propName)) {\n case 'transform': return getTransformValue(target, propName, animatable, unit);\n case 'css': return getCSSValue(target, propName, unit);\n case 'attribute': return getAttribute(target, propName);\n default: return target[propName] || 0;\n }\n}\n\nvar operatorRegex = /^(\\*=|\\+=|-=)/;\n\nfunction getRelativeValue(to, from) {\n var operator = operatorRegex.exec(to);\n if (!operator) { return to; }\n var u = getUnit(to) || 0;\n var x = parseFloat(from);\n var y = parseFloat(to.replace(operator[0], ''));\n switch (operator[0][0]) {\n case '+': return x + y + u;\n case '-': return x - y + u;\n case '*': return x * y + u;\n }\n}\n\nvar whitespaceRegex = /\\s/g;\n\nfunction validateValue(val, unit) {\n if (is.col(val)) { return colorToRgb(val); }\n var originalUnit = getUnit(val);\n var unitLess = originalUnit ? val.substr(0, val.length - originalUnit.length) : val;\n return unit && !whitespaceRegex.test(val) ? unitLess + unit : unitLess;\n}\n\n// getTotalLength() equivalent for circle, rect, polyline, polygon and line shapes\n// adapted from https://gist.github.com/SebLambla/3e0550c496c236709744\n\nfunction getDistance(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n\nfunction getCircleLength(el) {\n return Math.PI * 2 * getAttribute(el, 'r');\n}\n\nfunction getRectLength(el) {\n return (getAttribute(el, 'width') * 2) + (getAttribute(el, 'height') * 2);\n}\n\nfunction getLineLength(el) {\n return getDistance(\n {x: getAttribute(el, 'x1'), y: getAttribute(el, 'y1')},\n {x: getAttribute(el, 'x2'), y: getAttribute(el, 'y2')}\n );\n}\n\nfunction getPolylineLength(el) {\n var points = el.points;\n var totalLength = 0;\n var previousPos;\n for (var i = 0 ; i < points.numberOfItems; i++) {\n var currentPos = points.getItem(i);\n if (i > 0) { totalLength += getDistance(previousPos, currentPos); }\n previousPos = currentPos;\n }\n return totalLength;\n}\n\nfunction getPolygonLength(el) {\n var points = el.points;\n return getPolylineLength(el) + getDistance(points.getItem(points.numberOfItems - 1), points.getItem(0));\n}\n\n// Path animation\n\nfunction getTotalLength(el) {\n if (el.getTotalLength) { return el.getTotalLength(); }\n switch(el.tagName.toLowerCase()) {\n case 'circle': return getCircleLength(el);\n case 'rect': return getRectLength(el);\n case 'line': return getLineLength(el);\n case 'polyline': return getPolylineLength(el);\n case 'polygon': return getPolygonLength(el);\n }\n}\n\nfunction setDashoffset(el) {\n var pathLength = getTotalLength(el);\n el.setAttribute('stroke-dasharray', pathLength);\n return pathLength;\n}\n\n// Motion path\n\nfunction getParentSvgEl(el) {\n var parentEl = el.parentNode;\n while (is.svg(parentEl)) {\n parentEl = parentEl.parentNode;\n if (!is.svg(parentEl.parentNode)) { break; }\n }\n return parentEl;\n}\n\nfunction getParentSvg(pathEl, svgData) {\n var svg = svgData || {};\n var parentSvgEl = svg.el || getParentSvgEl(pathEl);\n var rect = parentSvgEl.getBoundingClientRect();\n var viewBoxAttr = getAttribute(parentSvgEl, 'viewBox');\n var width = rect.width;\n var height = rect.height;\n var viewBox = svg.viewBox || (viewBoxAttr ? viewBoxAttr.split(' ') : [0, 0, width, height]);\n return {\n el: parentSvgEl,\n viewBox: viewBox,\n x: viewBox[0] / 1,\n y: viewBox[1] / 1,\n w: width / viewBox[2],\n h: height / viewBox[3]\n }\n}\n\nfunction getPath(path, percent) {\n var pathEl = is.str(path) ? selectString(path)[0] : path;\n var p = percent || 100;\n return function(property) {\n return {\n property: property,\n el: pathEl,\n svg: getParentSvg(pathEl),\n totalLength: getTotalLength(pathEl) * (p / 100)\n }\n }\n}\n\nfunction getPathProgress(path, progress) {\n function point(offset) {\n if ( offset === void 0 ) offset = 0;\n\n var l = progress + offset >= 1 ? progress + offset : 0;\n return path.el.getPointAtLength(l);\n }\n var svg = getParentSvg(path.el, path.svg);\n var p = point();\n var p0 = point(-1);\n var p1 = point(+1);\n switch (path.property) {\n case 'x': return (p.x - svg.x) * svg.w;\n case 'y': return (p.y - svg.y) * svg.h;\n case 'angle': return Math.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / Math.PI;\n }\n}\n\n// Decompose value\n\nvar valueRegex = /-?\\d*\\.?\\d+/g;\n\nfunction decomposeValue(val, unit) {\n var value = validateValue((is.pth(val) ? val.totalLength : val), unit) + '';\n return {\n original: value,\n numbers: value.match(valueRegex) ? value.match(valueRegex).map(Number) : [0],\n strings: (is.str(val) || unit) ? value.split(valueRegex) : []\n }\n}\n\n// Animatables\n\nfunction parseTargets(targets) {\n var targetsArray = targets ? (flattenArray(is.arr(targets) ? targets.map(toArray) : toArray(targets))) : [];\n return filterArray(targetsArray, function (item, pos, self) { return self.indexOf(item) === pos; });\n}\n\nfunction getAnimatables(targets) {\n var parsed = parseTargets(targets);\n return parsed.map(function (t, i) {\n return {target: t, id: i, total: parsed.length, transforms: { list: getElementTransforms(t) } };\n });\n}\n\n// Properties\n\nvar springRegex = /^spring/;\n\nfunction normalizePropertyTweens(prop, tweenSettings) {\n var settings = cloneObject(tweenSettings);\n // Override duration if easing is a spring\n if (springRegex.test(settings.easing)) { settings.duration = spring(settings.easing); }\n if (is.arr(prop)) {\n var l = prop.length;\n var isFromTo = (l === 2 && !is.obj(prop[0]));\n if (!isFromTo) {\n // Duration divided by the number of tweens\n if (!is.fnc(tweenSettings.duration)) { settings.duration = tweenSettings.duration / l; }\n } else {\n // Transform [from, to] values shorthand to a valid tween value\n prop = {value: prop};\n }\n }\n var propArray = is.arr(prop) ? prop : [prop];\n return propArray.map(function (v, i) {\n var obj = (is.obj(v) && !is.pth(v)) ? v : {value: v};\n // Default delay value should only be applied to the first tween\n if (is.und(obj.delay)) { obj.delay = !i ? tweenSettings.delay : 0; }\n // Default endDelay value should only be applied to the last tween\n if (is.und(obj.endDelay)) { obj.endDelay = i === propArray.length - 1 ? tweenSettings.endDelay : 0; }\n return obj;\n }).map(function (k) { return mergeObjects(k, settings); });\n}\n\n\nfunction flattenKeyframes(keyframes) {\n var propertyNames = filterArray(flattenArray(keyframes.map(function (key) { return Object.keys(key); })), function (p) { return is.key(p); })\n .reduce(function (a,b) { if (a.indexOf(b) < 0) { a.push(b); } return a; }, []);\n var properties = {};\n var loop = function ( i ) {\n var propName = propertyNames[i];\n properties[propName] = keyframes.map(function (key) {\n var newKey = {};\n for (var p in key) {\n if (is.key(p)) {\n if (p == propName) { newKey.value = key[p]; }\n } else {\n newKey[p] = key[p];\n }\n }\n return newKey;\n });\n };\n\n for (var i = 0; i < propertyNames.length; i++) loop( i );\n return properties;\n}\n\nfunction getProperties(tweenSettings, params) {\n var properties = [];\n var keyframes = params.keyframes;\n if (keyframes) { params = mergeObjects(flattenKeyframes(keyframes), params); }\n for (var p in params) {\n if (is.key(p)) {\n properties.push({\n name: p,\n tweens: normalizePropertyTweens(params[p], tweenSettings)\n });\n }\n }\n return properties;\n}\n\n// Tweens\n\nfunction normalizeTweenValues(tween, animatable) {\n var t = {};\n for (var p in tween) {\n var value = getFunctionValue(tween[p], animatable);\n if (is.arr(value)) {\n value = value.map(function (v) { return getFunctionValue(v, animatable); });\n if (value.length === 1) { value = value[0]; }\n }\n t[p] = value;\n }\n t.duration = parseFloat(t.duration);\n t.delay = parseFloat(t.delay);\n return t;\n}\n\nfunction normalizeTweens(prop, animatable) {\n var previousTween;\n return prop.tweens.map(function (t) {\n var tween = normalizeTweenValues(t, animatable);\n var tweenValue = tween.value;\n var to = is.arr(tweenValue) ? tweenValue[1] : tweenValue;\n var toUnit = getUnit(to);\n var originalValue = getOriginalTargetValue(animatable.target, prop.name, toUnit, animatable);\n var previousValue = previousTween ? previousTween.to.original : originalValue;\n var from = is.arr(tweenValue) ? tweenValue[0] : previousValue;\n var fromUnit = getUnit(from) || getUnit(originalValue);\n var unit = toUnit || fromUnit;\n if (is.und(to)) { to = previousValue; }\n tween.from = decomposeValue(from, unit);\n tween.to = decomposeValue(getRelativeValue(to, from), unit);\n tween.start = previousTween ? previousTween.end : 0;\n tween.end = tween.start + tween.delay + tween.duration + tween.endDelay;\n tween.easing = parseEasings(tween.easing, tween.duration);\n tween.isPath = is.pth(tweenValue);\n tween.isColor = is.col(tween.from.original);\n if (tween.isColor) { tween.round = 1; }\n previousTween = tween;\n return tween;\n });\n}\n\n// Tween progress\n\nvar setProgressValue = {\n css: function (t, p, v) { return t.style[p] = v; },\n attribute: function (t, p, v) { return t.setAttribute(p, v); },\n object: function (t, p, v) { return t[p] = v; },\n transform: function (t, p, v, transforms, manual) {\n transforms.list.set(p, v);\n if (p === transforms.last || manual) {\n var str = '';\n transforms.list.forEach(function (value, prop) { str += prop + \"(\" + value + \") \"; });\n t.style.transform = str;\n }\n }\n};\n\n// Set Value helper\n\nfunction setTargetsValue(targets, properties) {\n var animatables = getAnimatables(targets);\n\n for (var i = 0, len = animatables.length; i < len; i++) {\n var animatable = animatables[i];\n\n for (var property in properties) {\n var value = getFunctionValue(properties[property], animatable);\n var target = animatable.target;\n var valueUnit = getUnit(value);\n var originalValue = getOriginalTargetValue(target, property, valueUnit, animatable);\n var unit = valueUnit || getUnit(originalValue);\n var to = getRelativeValue(validateValue(value, unit), originalValue);\n var animType = getAnimationType(target, property);\n setProgressValue[animType](target, property, to, animatable.transforms, true);\n }\n }\n}\n\n// Animations\n\nfunction createAnimation(animatable, prop) {\n var animType = getAnimationType(animatable.target, prop.name);\n if (animType) {\n var tweens = normalizeTweens(prop, animatable);\n var lastTween = tweens[tweens.length - 1];\n return {\n type: animType,\n property: prop.name,\n animatable: animatable,\n tweens: tweens,\n duration: lastTween.end,\n delay: tweens[0].delay,\n endDelay: lastTween.endDelay\n }\n }\n}\n\nfunction getAnimations(animatables, properties) {\n return filterArray(flattenArray(animatables.map(function (animatable) {\n return properties.map(function (prop) {\n return createAnimation(animatable, prop);\n });\n })), function (a) { return !is.und(a); });\n}\n\n// Create Instance\n\nfunction getInstanceTimings(animations, tweenSettings) {\n var animLength = animations.length;\n var getTlOffset = function (anim) { return anim.timelineOffset ? anim.timelineOffset : 0; };\n var timings = {};\n timings.duration = animLength ? Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration; })) : tweenSettings.duration;\n timings.delay = animLength ? Math.min.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.delay; })) : tweenSettings.delay;\n timings.endDelay = animLength ? timings.duration - Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration - anim.endDelay; })) : tweenSettings.endDelay;\n return timings;\n}\n\nvar instanceID = 0;\n\nfunction createNewInstance(params) {\n var instanceSettings = replaceObjectProps(defaultInstanceSettings, params);\n var tweenSettings = replaceObjectProps(defaultTweenSettings, params);\n var properties = getProperties(tweenSettings, params);\n var animatables = getAnimatables(params.targets);\n var animations = getAnimations(animatables, properties);\n var timings = getInstanceTimings(animations, tweenSettings);\n var id = instanceID;\n instanceID++;\n return mergeObjects(instanceSettings, {\n id: id,\n children: [],\n animatables: animatables,\n animations: animations,\n duration: timings.duration,\n delay: timings.delay,\n endDelay: timings.endDelay\n });\n}\n\n// Core\n\nvar activeInstances = [];\nvar pausedInstances = [];\nvar raf;\n\nvar engine = (function () {\n function play() {\n raf = requestAnimationFrame(step);\n }\n function step(t) {\n var activeInstancesLength = activeInstances.length;\n if (activeInstancesLength) {\n var i = 0;\n while (i < activeInstancesLength) {\n var activeInstance = activeInstances[i];\n if (!activeInstance.paused) {\n activeInstance.tick(t);\n } else {\n var instanceIndex = activeInstances.indexOf(activeInstance);\n if (instanceIndex > -1) {\n activeInstances.splice(instanceIndex, 1);\n activeInstancesLength = activeInstances.length;\n }\n }\n i++;\n }\n play();\n } else {\n raf = cancelAnimationFrame(raf);\n }\n }\n return play;\n})();\n\nfunction handleVisibilityChange() {\n if (document.hidden) {\n for (var i = 0, len = activeInstances.length; i < len; i++) {\n activeInstance[i].pause();\n }\n pausedInstances = activeInstances.slice(0);\n activeInstances = [];\n } else {\n for (var i$1 = 0, len$1 = pausedInstances.length; i$1 < len$1; i$1++) {\n pausedInstances[i$1].play();\n }\n }\n}\n\ndocument.addEventListener('visibilitychange', handleVisibilityChange);\n\n// Public Instance\n\nfunction anime(params) {\n if ( params === void 0 ) params = {};\n\n\n var startTime = 0, lastTime = 0, now = 0;\n var children, childrenLength = 0;\n var resolve = null;\n\n function makePromise() {\n return window.Promise && new Promise(function (_resolve) { return resolve = _resolve; });\n }\n\n var promise = makePromise();\n\n var instance = createNewInstance(params);\n\n function toggleInstanceDirection() {\n instance.reversed = !instance.reversed;\n for (var i = 0, len = children.length; i < len; i++) {\n children[i].reversed = instance.reversed;\n }\n }\n\n function adjustTime(time) {\n return instance.reversed ? instance.duration - time : time;\n }\n\n function resetTime() {\n startTime = 0;\n lastTime = adjustTime(instance.currentTime) * (1 / anime.speed);\n }\n\n function seekCild(time, child) {\n if (child) { child.seek(time - child.timelineOffset); }\n }\n\n function syncInstanceChildren(time) {\n if (!instance.reversePlayback) {\n for (var i = 0; i < childrenLength; i++) { seekCild(time, children[i]); }\n } else {\n for (var i$1 = childrenLength; i$1--;) { seekCild(time, children[i$1]); }\n }\n }\n\n function setAnimationsProgress(insTime) {\n var i = 0;\n var animations = instance.animations;\n var animationsLength = animations.length;\n while (i < animationsLength) {\n var anim = animations[i];\n var animatable = anim.animatable;\n var tweens = anim.tweens;\n var tweenLength = tweens.length - 1;\n var tween = tweens[tweenLength];\n // Only check for keyframes if there is more than one tween\n if (tweenLength) { tween = filterArray(tweens, function (t) { return (insTime < t.end); })[0] || tween; }\n var elapsed = minMax(insTime - tween.start - tween.delay, 0, tween.duration) / tween.duration;\n var eased = isNaN(elapsed) ? 1 : tween.easing(elapsed);\n var strings = tween.to.strings;\n var round = tween.round;\n var numbers = [];\n var toNumbersLength = tween.to.numbers.length;\n var progress = (void 0);\n for (var n = 0; n < toNumbersLength; n++) {\n var value = (void 0);\n var toNumber = tween.to.numbers[n];\n var fromNumber = tween.from.numbers[n] || 0;\n if (!tween.isPath) {\n value = fromNumber + (eased * (toNumber - fromNumber));\n } else {\n value = getPathProgress(tween.value, eased * toNumber);\n }\n if (round) {\n if (!(tween.isColor && n > 2)) {\n value = Math.round(value * round) / round;\n }\n }\n numbers.push(value);\n }\n // Manual Array.reduce for better performances\n var stringsLength = strings.length;\n if (!stringsLength) {\n progress = numbers[0];\n } else {\n progress = strings[0];\n for (var s = 0; s < stringsLength; s++) {\n var a = strings[s];\n var b = strings[s + 1];\n var n$1 = numbers[s];\n if (!isNaN(n$1)) {\n if (!b) {\n progress += n$1 + ' ';\n } else {\n progress += n$1 + b;\n }\n }\n }\n }\n setProgressValue[anim.type](animatable.target, anim.property, progress, animatable.transforms);\n anim.currentValue = progress;\n i++;\n }\n }\n\n function setCallback(cb) {\n if (instance[cb] && !instance.passThrough) { instance[cb](instance); }\n }\n\n function countIteration() {\n if (instance.remaining && instance.remaining !== true) {\n instance.remaining--;\n }\n }\n\n function setInstanceProgress(engineTime) {\n var insDuration = instance.duration;\n var insDelay = instance.delay;\n var insEndDelay = insDuration - instance.endDelay;\n var insTime = adjustTime(engineTime);\n instance.progress = minMax((insTime / insDuration) * 100, 0, 100);\n instance.reversePlayback = insTime < instance.currentTime;\n if (children) { syncInstanceChildren(insTime); }\n if (!instance.began && instance.currentTime > 0) {\n instance.began = true;\n setCallback('begin');\n setCallback('loopBegin');\n }\n if (insTime <= insDelay && instance.currentTime !== 0) {\n setAnimationsProgress(0);\n }\n if ((insTime >= insEndDelay && instance.currentTime !== insDuration) || !insDuration) {\n setAnimationsProgress(insDuration);\n }\n if (insTime > insDelay && insTime < insEndDelay) {\n if (!instance.changeBegan) {\n instance.changeBegan = true;\n instance.changeCompleted = false;\n setCallback('changeBegin');\n }\n setCallback('change');\n setAnimationsProgress(insTime);\n } else {\n if (instance.changeBegan) {\n instance.changeCompleted = true;\n instance.changeBegan = false;\n setCallback('changeComplete');\n }\n }\n instance.currentTime = minMax(insTime, 0, insDuration);\n if (instance.began) { setCallback('update'); }\n if (engineTime >= insDuration) {\n lastTime = 0;\n countIteration();\n if (instance.remaining) {\n startTime = now;\n setCallback('loopComplete');\n setCallback('loopBegin');\n if (instance.direction === 'alternate') { toggleInstanceDirection(); }\n } else {\n instance.paused = true;\n if (!instance.completed) {\n instance.completed = true;\n setCallback('loopComplete');\n setCallback('complete');\n if ('Promise' in window) {\n resolve();\n promise = makePromise();\n }\n }\n }\n }\n }\n\n instance.reset = function() {\n var direction = instance.direction;\n instance.passThrough = false;\n instance.currentTime = 0;\n instance.progress = 0;\n instance.paused = true;\n instance.began = false;\n instance.changeBegan = false;\n instance.completed = false;\n instance.changeCompleted = false;\n instance.reversePlayback = false;\n instance.reversed = direction === 'reverse';\n instance.remaining = instance.loop;\n children = instance.children;\n childrenLength = children.length;\n for (var i = childrenLength; i--;) { instance.children[i].reset(); }\n if (instance.reversed && instance.loop !== true || (direction === 'alternate' && instance.loop === 1)) { instance.remaining++; }\n setAnimationsProgress(0);\n };\n\n // Set Value helper\n\n instance.set = function(targets, properties) {\n setTargetsValue(targets, properties);\n return instance;\n };\n\n instance.tick = function(t) {\n now = t;\n if (!startTime) { startTime = now; }\n setInstanceProgress((now + (lastTime - startTime)) * anime.speed);\n };\n\n instance.seek = function(time) {\n setInstanceProgress(adjustTime(time));\n };\n\n instance.pause = function() {\n instance.paused = true;\n resetTime();\n };\n\n instance.play = function() {\n if (!instance.paused) { return; }\n instance.paused = false;\n activeInstances.push(instance);\n resetTime();\n if (!raf) { engine(); }\n };\n\n instance.reverse = function() {\n toggleInstanceDirection();\n resetTime();\n };\n\n instance.restart = function() {\n instance.reset();\n instance.play();\n };\n\n instance.finished = promise;\n instance.reset();\n\n if (instance.autoplay) { instance.play(); }\n\n return instance;\n\n}\n\n// Remove targets from animation\n\nfunction removeTargetsFromAnimations(targetsArray, animations) {\n for (var a = animations.length; a--;) {\n if (arrayContains(targetsArray, animations[a].animatable.target)) {\n animations.splice(a, 1);\n }\n }\n}\n\nfunction removeTargets(targets) {\n var targetsArray = parseTargets(targets);\n for (var i = activeInstances.length; i--;) {\n var instance = activeInstances[i];\n var animations = instance.animations;\n var children = instance.children;\n removeTargetsFromAnimations(targetsArray, animations);\n for (var c = children.length; c--;) {\n var child = children[c];\n var childAnimations = child.animations;\n removeTargetsFromAnimations(targetsArray, childAnimations);\n if (!childAnimations.length && !child.children.length) { children.splice(c, 1); }\n }\n if (!animations.length && !children.length) { instance.pause(); }\n }\n}\n\n// Stagger helpers\n\nfunction stagger(val, params) {\n if ( params === void 0 ) params = {};\n\n var direction = params.direction || 'normal';\n var easing = params.easing ? parseEasings(params.easing) : null;\n var grid = params.grid;\n var axis = params.axis;\n var fromIndex = params.from || 0;\n var fromFirst = fromIndex === 'first';\n var fromCenter = fromIndex === 'center';\n var fromLast = fromIndex === 'last';\n var isRange = is.arr(val);\n var val1 = isRange ? parseFloat(val[0]) : parseFloat(val);\n var val2 = isRange ? parseFloat(val[1]) : 0;\n var unit = getUnit(isRange ? val[1] : val) || 0;\n var start = params.start || 0 + (isRange ? val1 : 0);\n var values = [];\n var maxValue = 0;\n return function (el, i, t) {\n if (fromFirst) { fromIndex = 0; }\n if (fromCenter) { fromIndex = (t - 1) / 2; }\n if (fromLast) { fromIndex = t - 1; }\n if (!values.length) {\n for (var index = 0; index < t; index++) {\n if (!grid) {\n values.push(Math.abs(fromIndex - index));\n } else {\n var fromX = !fromCenter ? fromIndex%grid[0] : (grid[0]-1)/2;\n var fromY = !fromCenter ? Math.floor(fromIndex/grid[0]) : (grid[1]-1)/2;\n var toX = index%grid[0];\n var toY = Math.floor(index/grid[0]);\n var distanceX = fromX - toX;\n var distanceY = fromY - toY;\n var value = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n if (axis === 'x') { value = -distanceX; }\n if (axis === 'y') { value = -distanceY; }\n values.push(value);\n }\n maxValue = Math.max.apply(Math, values);\n }\n if (easing) { values = values.map(function (val) { return easing(val / maxValue) * maxValue; }); }\n if (direction === 'reverse') { values = values.map(function (val) { return axis ? (val < 0) ? val * -1 : -val : Math.abs(maxValue - val); }); }\n }\n var spacing = isRange ? (val2 - val1) / maxValue : val1;\n return start + (spacing * (Math.round(values[i] * 100) / 100)) + unit;\n }\n}\n\n// Timeline\n\nfunction timeline(params) {\n if ( params === void 0 ) params = {};\n\n var tl = anime(params);\n tl.duration = 0;\n tl.add = function(instanceParams, timelineOffset) {\n var tlIndex = activeInstances.indexOf(tl);\n var children = tl.children;\n if (tlIndex > -1) { activeInstances.splice(tlIndex, 1); }\n function passThrough(ins) { ins.passThrough = true; }\n for (var i = 0; i < children.length; i++) { passThrough(children[i]); }\n var insParams = mergeObjects(instanceParams, replaceObjectProps(defaultTweenSettings, params));\n insParams.targets = insParams.targets || params.targets;\n var tlDuration = tl.duration;\n insParams.autoplay = false;\n insParams.direction = tl.direction;\n insParams.timelineOffset = is.und(timelineOffset) ? tlDuration : getRelativeValue(timelineOffset, tlDuration);\n passThrough(tl);\n tl.seek(insParams.timelineOffset);\n var ins = anime(insParams);\n passThrough(ins);\n children.push(ins);\n var timings = getInstanceTimings(children, params);\n tl.delay = timings.delay;\n tl.endDelay = timings.endDelay;\n tl.duration = timings.duration;\n tl.seek(0);\n tl.reset();\n if (tl.autoplay) { tl.play(); }\n return tl;\n };\n return tl;\n}\n\nanime.version = '3.0.0';\nanime.speed = 1;\nanime.running = activeInstances;\nanime.remove = removeTargets;\nanime.get = getOriginalTargetValue;\nanime.set = setTargetsValue;\nanime.convertPx = convertPxToUnit;\nanime.path = getPath;\nanime.setDashoffset = setDashoffset;\nanime.stagger = stagger;\nanime.timeline = timeline;\nanime.easing = parseEasings;\nanime.penner = penner;\nanime.random = function (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; };\n\nmodule.exports = anime;\n\n},{}],57:[function(_dereq_,module,exports){\n// threejs.org/license\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));\n}(this, (function (exports) { 'use strict';\n\n\t// Polyfills\n\tif (Number.EPSILON === undefined) {\n\t\tNumber.EPSILON = Math.pow(2, -52);\n\t}\n\n\tif (Number.isInteger === undefined) {\n\t\t// Missing in IE\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\n\t\tNumber.isInteger = function (value) {\n\t\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n\t\t};\n\t} //\n\n\n\tif (Math.sign === undefined) {\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign\n\t\tMath.sign = function (x) {\n\t\t\treturn x < 0 ? -1 : x > 0 ? 1 : +x;\n\t\t};\n\t}\n\n\tif ('name' in Function.prototype === false) {\n\t\t// Missing in IE\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name\n\t\tObject.defineProperty(Function.prototype, 'name', {\n\t\t\tget: function get() {\n\t\t\t\treturn this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1];\n\t\t\t}\n\t\t});\n\t}\n\n\tif (Object.assign === undefined) {\n\t\t// Missing in IE\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\t\tObject.assign = function (target) {\n\n\t\t\tif (target === undefined || target === null) {\n\t\t\t\tthrow new TypeError('Cannot convert undefined or null to object');\n\t\t\t}\n\n\t\t\tvar output = Object(target);\n\n\t\t\tfor (var index = 1; index < arguments.length; index++) {\n\t\t\t\tvar source = arguments[index];\n\n\t\t\t\tif (source !== undefined && source !== null) {\n\t\t\t\t\tfor (var nextKey in source) {\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(source, nextKey)) {\n\t\t\t\t\t\t\toutput[nextKey] = source[nextKey];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn output;\n\t\t};\n\t}\n\n\t/**\n\t * Copyright (c) 2014-present, Facebook, Inc.\n\t *\n\t * This source code is licensed under the MIT license found in the\n\t * LICENSE file in the root directory of this source tree.\n\t */\n\tvar runtime = function (exports) {\n\n\t\tvar Op = Object.prototype;\n\t\tvar hasOwn = Op.hasOwnProperty;\n\t\tvar undefined$1; // More compressible than void 0.\n\n\t\tvar $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n\t\tvar iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n\t\tvar asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n\t\tvar toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n\t\tfunction define(obj, key, value) {\n\t\t\tObject.defineProperty(obj, key, {\n\t\t\t\tvalue: value,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true\n\t\t\t});\n\t\t\treturn obj[key];\n\t\t}\n\n\t\ttry {\n\t\t\t// IE 8 has a broken Object.defineProperty that only works on DOM objects.\n\t\t\tdefine({}, \"\");\n\t\t} catch (err) {\n\t\t\tdefine = function define(obj, key, value) {\n\t\t\t\treturn obj[key] = value;\n\t\t\t};\n\t\t}\n\n\t\tfunction wrap(innerFn, outerFn, self, tryLocsList) {\n\t\t\t// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n\t\t\tvar protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n\t\t\tvar generator = Object.create(protoGenerator.prototype);\n\t\t\tvar context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,\n\t\t\t// .throw, and .return methods.\n\n\t\t\tgenerator._invoke = makeInvokeMethod(innerFn, self, context);\n\t\t\treturn generator;\n\t\t}\n\n\t\texports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion\n\t\t// record like context.tryEntries[i].completion. This interface could\n\t\t// have been (and was previously) designed to take a closure to be\n\t\t// invoked without arguments, but in all the cases we care about we\n\t\t// already have an existing method we want to call, so there's no need\n\t\t// to create a new function object. We can even get away with assuming\n\t\t// the method takes exactly one argument, since that happens to be true\n\t\t// in every case, so we don't have to touch the arguments object. The\n\t\t// only additional allocation required is the completion record, which\n\t\t// has a stable shape and so hopefully should be cheap to allocate.\n\n\t\tfunction tryCatch(fn, obj, arg) {\n\t\t\ttry {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"normal\",\n\t\t\t\t\targ: fn.call(obj, arg)\n\t\t\t\t};\n\t\t\t} catch (err) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"throw\",\n\t\t\t\t\targ: err\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tvar GenStateSuspendedStart = \"suspendedStart\";\n\t\tvar GenStateSuspendedYield = \"suspendedYield\";\n\t\tvar GenStateExecuting = \"executing\";\n\t\tvar GenStateCompleted = \"completed\"; // Returning this object from the innerFn has the same effect as\n\t\t// breaking out of the dispatch switch statement.\n\n\t\tvar ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and\n\t\t// .constructor.prototype properties for functions that return Generator\n\t\t// objects. For full spec compliance, you may wish to configure your\n\t\t// minifier not to mangle the names of these two functions.\n\n\t\tfunction Generator() {}\n\n\t\tfunction GeneratorFunction() {}\n\n\t\tfunction GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that\n\t\t// don't natively support it.\n\n\n\t\tvar IteratorPrototype = {};\n\n\t\tIteratorPrototype[iteratorSymbol] = function () {\n\t\t\treturn this;\n\t\t};\n\n\t\tvar getProto = Object.getPrototypeOf;\n\t\tvar NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n\n\t\tif (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n\t\t\t// This environment has a native %IteratorPrototype%; use it instead\n\t\t\t// of the polyfill.\n\t\t\tIteratorPrototype = NativeIteratorPrototype;\n\t\t}\n\n\t\tvar Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n\t\tGeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n\t\tGeneratorFunctionPrototype.constructor = GeneratorFunction;\n\t\tGeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"); // Helper for defining the .next, .throw, and .return methods of the\n\t\t// Iterator interface in terms of a single ._invoke method.\n\n\t\tfunction defineIteratorMethods(prototype) {\n\t\t\t[\"next\", \"throw\", \"return\"].forEach(function (method) {\n\t\t\t\tdefine(prototype, method, function (arg) {\n\t\t\t\t\treturn this._invoke(method, arg);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\texports.isGeneratorFunction = function (genFun) {\n\t\t\tvar ctor = typeof genFun === \"function\" && genFun.constructor;\n\t\t\treturn ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can\n\t\t\t// do is to check its .name property.\n\t\t\t(ctor.displayName || ctor.name) === \"GeneratorFunction\" : false;\n\t\t};\n\n\t\texports.mark = function (genFun) {\n\t\t\tif (Object.setPrototypeOf) {\n\t\t\t\tObject.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n\t\t\t} else {\n\t\t\t\tgenFun.__proto__ = GeneratorFunctionPrototype;\n\t\t\t\tdefine(genFun, toStringTagSymbol, \"GeneratorFunction\");\n\t\t\t}\n\n\t\t\tgenFun.prototype = Object.create(Gp);\n\t\t\treturn genFun;\n\t\t}; // Within the body of any async function, `await x` is transformed to\n\t\t// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n\t\t// `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n\t\t// meant to be awaited.\n\n\n\t\texports.awrap = function (arg) {\n\t\t\treturn {\n\t\t\t\t__await: arg\n\t\t\t};\n\t\t};\n\n\t\tfunction AsyncIterator(generator, PromiseImpl) {\n\t\t\tfunction invoke(method, arg, resolve, reject) {\n\t\t\t\tvar record = tryCatch(generator[method], generator, arg);\n\n\t\t\t\tif (record.type === \"throw\") {\n\t\t\t\t\treject(record.arg);\n\t\t\t\t} else {\n\t\t\t\t\tvar result = record.arg;\n\t\t\t\t\tvar value = result.value;\n\n\t\t\t\t\tif (value && typeof value === \"object\" && hasOwn.call(value, \"__await\")) {\n\t\t\t\t\t\treturn PromiseImpl.resolve(value.__await).then(function (value) {\n\t\t\t\t\t\t\tinvoke(\"next\", value, resolve, reject);\n\t\t\t\t\t\t}, function (err) {\n\t\t\t\t\t\t\tinvoke(\"throw\", err, resolve, reject);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\treturn PromiseImpl.resolve(value).then(function (unwrapped) {\n\t\t\t\t\t\t// When a yielded Promise is resolved, its final value becomes\n\t\t\t\t\t\t// the .value of the Promise<{value,done}> result for the\n\t\t\t\t\t\t// current iteration.\n\t\t\t\t\t\tresult.value = unwrapped;\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}, function (error) {\n\t\t\t\t\t\t// If a rejected Promise was yielded, throw the rejection back\n\t\t\t\t\t\t// into the async generator function so it can be handled there.\n\t\t\t\t\t\treturn invoke(\"throw\", error, resolve, reject);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar previousPromise;\n\n\t\t\tfunction enqueue(method, arg) {\n\t\t\t\tfunction callInvokeWithMethodAndArg() {\n\t\t\t\t\treturn new PromiseImpl(function (resolve, reject) {\n\t\t\t\t\t\tinvoke(method, arg, resolve, reject);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn previousPromise = // If enqueue has been called before, then we want to wait until\n\t\t\t\t// all previous Promises have been resolved before calling invoke,\n\t\t\t\t// so that results are always delivered in the correct order. If\n\t\t\t\t// enqueue has not been called before, then it is important to\n\t\t\t\t// call invoke immediately, without waiting on a callback to fire,\n\t\t\t\t// so that the async generator function has the opportunity to do\n\t\t\t\t// any necessary setup in a predictable way. This predictability\n\t\t\t\t// is why the Promise constructor synchronously invokes its\n\t\t\t\t// executor callback, and why async functions synchronously\n\t\t\t\t// execute code before the first await. Since we implement simple\n\t\t\t\t// async functions in terms of async generators, it is especially\n\t\t\t\t// important to get this right, even though it requires care.\n\t\t\t\tpreviousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later\n\t\t\t\t// invocations of the iterator.\n\t\t\t\tcallInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n\t\t\t} // Define the unified helper method that is used to implement .next,\n\t\t\t// .throw, and .return (see defineIteratorMethods).\n\n\n\t\t\tthis._invoke = enqueue;\n\t\t}\n\n\t\tdefineIteratorMethods(AsyncIterator.prototype);\n\n\t\tAsyncIterator.prototype[asyncIteratorSymbol] = function () {\n\t\t\treturn this;\n\t\t};\n\n\t\texports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of\n\t\t// AsyncIterator objects; they just return a Promise for the value of\n\t\t// the final result produced by the iterator.\n\n\t\texports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n\t\t\tif (PromiseImpl === void 0) PromiseImpl = Promise;\n\t\t\tvar iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n\t\t\treturn exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.\n\t\t\t: iter.next().then(function (result) {\n\t\t\t\treturn result.done ? result.value : iter.next();\n\t\t\t});\n\t\t};\n\n\t\tfunction makeInvokeMethod(innerFn, self, context) {\n\t\t\tvar state = GenStateSuspendedStart;\n\t\t\treturn function invoke(method, arg) {\n\t\t\t\tif (state === GenStateExecuting) {\n\t\t\t\t\tthrow new Error(\"Generator is already running\");\n\t\t\t\t}\n\n\t\t\t\tif (state === GenStateCompleted) {\n\t\t\t\t\tif (method === \"throw\") {\n\t\t\t\t\t\tthrow arg;\n\t\t\t\t\t} // Be forgiving, per 25.3.3.3.3 of the spec:\n\t\t\t\t\t// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n\n\n\t\t\t\t\treturn doneResult();\n\t\t\t\t}\n\n\t\t\t\tcontext.method = method;\n\t\t\t\tcontext.arg = arg;\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tvar delegate = context.delegate;\n\n\t\t\t\t\tif (delegate) {\n\t\t\t\t\t\tvar delegateResult = maybeInvokeDelegate(delegate, context);\n\n\t\t\t\t\t\tif (delegateResult) {\n\t\t\t\t\t\t\tif (delegateResult === ContinueSentinel) continue;\n\t\t\t\t\t\t\treturn delegateResult;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (context.method === \"next\") {\n\t\t\t\t\t\t// Setting context._sent for legacy support of Babel's\n\t\t\t\t\t\t// function.sent implementation.\n\t\t\t\t\t\tcontext.sent = context._sent = context.arg;\n\t\t\t\t\t} else if (context.method === \"throw\") {\n\t\t\t\t\t\tif (state === GenStateSuspendedStart) {\n\t\t\t\t\t\t\tstate = GenStateCompleted;\n\t\t\t\t\t\t\tthrow context.arg;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontext.dispatchException(context.arg);\n\t\t\t\t\t} else if (context.method === \"return\") {\n\t\t\t\t\t\tcontext.abrupt(\"return\", context.arg);\n\t\t\t\t\t}\n\n\t\t\t\t\tstate = GenStateExecuting;\n\t\t\t\t\tvar record = tryCatch(innerFn, self, context);\n\n\t\t\t\t\tif (record.type === \"normal\") {\n\t\t\t\t\t\t// If an exception is thrown from innerFn, we leave state ===\n\t\t\t\t\t\t// GenStateExecuting and loop back for another invocation.\n\t\t\t\t\t\tstate = context.done ? GenStateCompleted : GenStateSuspendedYield;\n\n\t\t\t\t\t\tif (record.arg === ContinueSentinel) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tvalue: record.arg,\n\t\t\t\t\t\t\tdone: context.done\n\t\t\t\t\t\t};\n\t\t\t\t\t} else if (record.type === \"throw\") {\n\t\t\t\t\t\tstate = GenStateCompleted; // Dispatch the exception by looping back around to the\n\t\t\t\t\t\t// context.dispatchException(context.arg) call above.\n\n\t\t\t\t\t\tcontext.method = \"throw\";\n\t\t\t\t\t\tcontext.arg = record.arg;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t} // Call delegate.iterator[context.method](context.arg) and handle the\n\t\t// result, either by returning a { value, done } result from the\n\t\t// delegate iterator, or by modifying context.method and context.arg,\n\t\t// setting context.delegate to null, and returning the ContinueSentinel.\n\n\n\t\tfunction maybeInvokeDelegate(delegate, context) {\n\t\t\tvar method = delegate.iterator[context.method];\n\n\t\t\tif (method === undefined$1) {\n\t\t\t\t// A .throw or .return when the delegate iterator has no .throw\n\t\t\t\t// method always terminates the yield* loop.\n\t\t\t\tcontext.delegate = null;\n\n\t\t\t\tif (context.method === \"throw\") {\n\t\t\t\t\t// Note: [\"return\"] must be used for ES3 parsing compatibility.\n\t\t\t\t\tif (delegate.iterator[\"return\"]) {\n\t\t\t\t\t\t// If the delegate iterator has a return method, give it a\n\t\t\t\t\t\t// chance to clean up.\n\t\t\t\t\t\tcontext.method = \"return\";\n\t\t\t\t\t\tcontext.arg = undefined$1;\n\t\t\t\t\t\tmaybeInvokeDelegate(delegate, context);\n\n\t\t\t\t\t\tif (context.method === \"throw\") {\n\t\t\t\t\t\t\t// If maybeInvokeDelegate(context) changed context.method from\n\t\t\t\t\t\t\t// \"return\" to \"throw\", let that override the TypeError below.\n\t\t\t\t\t\t\treturn ContinueSentinel;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcontext.method = \"throw\";\n\t\t\t\t\tcontext.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n\t\t\t\t}\n\n\t\t\t\treturn ContinueSentinel;\n\t\t\t}\n\n\t\t\tvar record = tryCatch(method, delegate.iterator, context.arg);\n\n\t\t\tif (record.type === \"throw\") {\n\t\t\t\tcontext.method = \"throw\";\n\t\t\t\tcontext.arg = record.arg;\n\t\t\t\tcontext.delegate = null;\n\t\t\t\treturn ContinueSentinel;\n\t\t\t}\n\n\t\t\tvar info = record.arg;\n\n\t\t\tif (!info) {\n\t\t\t\tcontext.method = \"throw\";\n\t\t\t\tcontext.arg = new TypeError(\"iterator result is not an object\");\n\t\t\t\tcontext.delegate = null;\n\t\t\t\treturn ContinueSentinel;\n\t\t\t}\n\n\t\t\tif (info.done) {\n\t\t\t\t// Assign the result of the finished delegate to the temporary\n\t\t\t\t// variable specified by delegate.resultName (see delegateYield).\n\t\t\t\tcontext[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).\n\n\t\t\t\tcontext.next = delegate.nextLoc; // If context.method was \"throw\" but the delegate handled the\n\t\t\t\t// exception, let the outer generator proceed normally. If\n\t\t\t\t// context.method was \"next\", forget context.arg since it has been\n\t\t\t\t// \"consumed\" by the delegate iterator. If context.method was\n\t\t\t\t// \"return\", allow the original .return call to continue in the\n\t\t\t\t// outer generator.\n\n\t\t\t\tif (context.method !== \"return\") {\n\t\t\t\t\tcontext.method = \"next\";\n\t\t\t\t\tcontext.arg = undefined$1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Re-yield the result returned by the delegate method.\n\t\t\t\treturn info;\n\t\t\t} // The delegate iterator is finished, so forget it and continue with\n\t\t\t// the outer generator.\n\n\n\t\t\tcontext.delegate = null;\n\t\t\treturn ContinueSentinel;\n\t\t} // Define Generator.prototype.{next,throw,return} in terms of the\n\t\t// unified ._invoke helper method.\n\n\n\t\tdefineIteratorMethods(Gp);\n\t\tdefine(Gp, toStringTagSymbol, \"Generator\"); // A Generator should always return itself as the iterator object when the\n\t\t// @@iterator function is called on it. Some browsers' implementations of the\n\t\t// iterator prototype chain incorrectly implement this, causing the Generator\n\t\t// object to not be returned from this call. This ensures that doesn't happen.\n\t\t// See https://github.com/facebook/regenerator/issues/274 for more details.\n\n\t\tGp[iteratorSymbol] = function () {\n\t\t\treturn this;\n\t\t};\n\n\t\tGp.toString = function () {\n\t\t\treturn \"[object Generator]\";\n\t\t};\n\n\t\tfunction pushTryEntry(locs) {\n\t\t\tvar entry = {\n\t\t\t\ttryLoc: locs[0]\n\t\t\t};\n\n\t\t\tif (1 in locs) {\n\t\t\t\tentry.catchLoc = locs[1];\n\t\t\t}\n\n\t\t\tif (2 in locs) {\n\t\t\t\tentry.finallyLoc = locs[2];\n\t\t\t\tentry.afterLoc = locs[3];\n\t\t\t}\n\n\t\t\tthis.tryEntries.push(entry);\n\t\t}\n\n\t\tfunction resetTryEntry(entry) {\n\t\t\tvar record = entry.completion || {};\n\t\t\trecord.type = \"normal\";\n\t\t\tdelete record.arg;\n\t\t\tentry.completion = record;\n\t\t}\n\n\t\tfunction Context(tryLocsList) {\n\t\t\t// The root entry object (effectively a try statement without a catch\n\t\t\t// or a finally block) gives us a place to store values thrown from\n\t\t\t// locations where there is no enclosing try statement.\n\t\t\tthis.tryEntries = [{\n\t\t\t\ttryLoc: \"root\"\n\t\t\t}];\n\t\t\ttryLocsList.forEach(pushTryEntry, this);\n\t\t\tthis.reset(true);\n\t\t}\n\n\t\texports.keys = function (object) {\n\t\t\tvar keys = [];\n\n\t\t\tfor (var key in object) {\n\t\t\t\tkeys.push(key);\n\t\t\t}\n\n\t\t\tkeys.reverse(); // Rather than returning an object with a next method, we keep\n\t\t\t// things simple and return the next function itself.\n\n\t\t\treturn function next() {\n\t\t\t\twhile (keys.length) {\n\t\t\t\t\tvar key = keys.pop();\n\n\t\t\t\t\tif (key in object) {\n\t\t\t\t\t\tnext.value = key;\n\t\t\t\t\t\tnext.done = false;\n\t\t\t\t\t\treturn next;\n\t\t\t\t\t}\n\t\t\t\t} // To avoid creating an additional object, we just hang the .value\n\t\t\t\t// and .done properties off the next function object itself. This\n\t\t\t\t// also ensures that the minifier will not anonymize the function.\n\n\n\t\t\t\tnext.done = true;\n\t\t\t\treturn next;\n\t\t\t};\n\t\t};\n\n\t\tfunction values(iterable) {\n\t\t\tif (iterable) {\n\t\t\t\tvar iteratorMethod = iterable[iteratorSymbol];\n\n\t\t\t\tif (iteratorMethod) {\n\t\t\t\t\treturn iteratorMethod.call(iterable);\n\t\t\t\t}\n\n\t\t\t\tif (typeof iterable.next === \"function\") {\n\t\t\t\t\treturn iterable;\n\t\t\t\t}\n\n\t\t\t\tif (!isNaN(iterable.length)) {\n\t\t\t\t\tvar i = -1,\n\t\t\t\t\t\t\tnext = function next() {\n\t\t\t\t\t\twhile (++i < iterable.length) {\n\t\t\t\t\t\t\tif (hasOwn.call(iterable, i)) {\n\t\t\t\t\t\t\t\tnext.value = iterable[i];\n\t\t\t\t\t\t\t\tnext.done = false;\n\t\t\t\t\t\t\t\treturn next;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnext.value = undefined$1;\n\t\t\t\t\t\tnext.done = true;\n\t\t\t\t\t\treturn next;\n\t\t\t\t\t};\n\n\t\t\t\t\treturn next.next = next;\n\t\t\t\t}\n\t\t\t} // Return an iterator with no values.\n\n\n\t\t\treturn {\n\t\t\t\tnext: doneResult\n\t\t\t};\n\t\t}\n\n\t\texports.values = values;\n\n\t\tfunction doneResult() {\n\t\t\treturn {\n\t\t\t\tvalue: undefined$1,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tContext.prototype = {\n\t\t\tconstructor: Context,\n\t\t\treset: function reset(skipTempReset) {\n\t\t\t\tthis.prev = 0;\n\t\t\t\tthis.next = 0; // Resetting context._sent for legacy support of Babel's\n\t\t\t\t// function.sent implementation.\n\n\t\t\t\tthis.sent = this._sent = undefined$1;\n\t\t\t\tthis.done = false;\n\t\t\t\tthis.delegate = null;\n\t\t\t\tthis.method = \"next\";\n\t\t\t\tthis.arg = undefined$1;\n\t\t\t\tthis.tryEntries.forEach(resetTryEntry);\n\n\t\t\t\tif (!skipTempReset) {\n\t\t\t\t\tfor (var name in this) {\n\t\t\t\t\t\t// Not sure about the optimal order of these conditions:\n\t\t\t\t\t\tif (name.charAt(0) === \"t\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {\n\t\t\t\t\t\t\tthis[name] = undefined$1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: function stop() {\n\t\t\t\tthis.done = true;\n\t\t\t\tvar rootEntry = this.tryEntries[0];\n\t\t\t\tvar rootRecord = rootEntry.completion;\n\n\t\t\t\tif (rootRecord.type === \"throw\") {\n\t\t\t\t\tthrow rootRecord.arg;\n\t\t\t\t}\n\n\t\t\t\treturn this.rval;\n\t\t\t},\n\t\t\tdispatchException: function dispatchException(exception) {\n\t\t\t\tif (this.done) {\n\t\t\t\t\tthrow exception;\n\t\t\t\t}\n\n\t\t\t\tvar context = this;\n\n\t\t\t\tfunction handle(loc, caught) {\n\t\t\t\t\trecord.type = \"throw\";\n\t\t\t\t\trecord.arg = exception;\n\t\t\t\t\tcontext.next = loc;\n\n\t\t\t\t\tif (caught) {\n\t\t\t\t\t\t// If the dispatched exception was caught by a catch block,\n\t\t\t\t\t\t// then let that catch block handle the exception normally.\n\t\t\t\t\t\tcontext.method = \"next\";\n\t\t\t\t\t\tcontext.arg = undefined$1;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn !!caught;\n\t\t\t\t}\n\n\t\t\t\tfor (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t\t\t\t\tvar entry = this.tryEntries[i];\n\t\t\t\t\tvar record = entry.completion;\n\n\t\t\t\t\tif (entry.tryLoc === \"root\") {\n\t\t\t\t\t\t// Exception thrown outside of any try block that could handle\n\t\t\t\t\t\t// it, so set the completion value of the entire function to\n\t\t\t\t\t\t// throw the exception.\n\t\t\t\t\t\treturn handle(\"end\");\n\t\t\t\t\t}\n\n\t\t\t\t\tif (entry.tryLoc <= this.prev) {\n\t\t\t\t\t\tvar hasCatch = hasOwn.call(entry, \"catchLoc\");\n\t\t\t\t\t\tvar hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n\t\t\t\t\t\tif (hasCatch && hasFinally) {\n\t\t\t\t\t\t\tif (this.prev < entry.catchLoc) {\n\t\t\t\t\t\t\t\treturn handle(entry.catchLoc, true);\n\t\t\t\t\t\t\t} else if (this.prev < entry.finallyLoc) {\n\t\t\t\t\t\t\t\treturn handle(entry.finallyLoc);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (hasCatch) {\n\t\t\t\t\t\t\tif (this.prev < entry.catchLoc) {\n\t\t\t\t\t\t\t\treturn handle(entry.catchLoc, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (hasFinally) {\n\t\t\t\t\t\t\tif (this.prev < entry.finallyLoc) {\n\t\t\t\t\t\t\t\treturn handle(entry.finallyLoc);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new Error(\"try statement without catch or finally\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tabrupt: function abrupt(type, arg) {\n\t\t\t\tfor (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t\t\t\t\tvar entry = this.tryEntries[i];\n\n\t\t\t\t\tif (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n\t\t\t\t\t\tvar finallyEntry = entry;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (finallyEntry && (type === \"break\" || type === \"continue\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {\n\t\t\t\t\t// Ignore the finally entry if control is not jumping to a\n\t\t\t\t\t// location outside the try/catch block.\n\t\t\t\t\tfinallyEntry = null;\n\t\t\t\t}\n\n\t\t\t\tvar record = finallyEntry ? finallyEntry.completion : {};\n\t\t\t\trecord.type = type;\n\t\t\t\trecord.arg = arg;\n\n\t\t\t\tif (finallyEntry) {\n\t\t\t\t\tthis.method = \"next\";\n\t\t\t\t\tthis.next = finallyEntry.finallyLoc;\n\t\t\t\t\treturn ContinueSentinel;\n\t\t\t\t}\n\n\t\t\t\treturn this.complete(record);\n\t\t\t},\n\t\t\tcomplete: function complete(record, afterLoc) {\n\t\t\t\tif (record.type === \"throw\") {\n\t\t\t\t\tthrow record.arg;\n\t\t\t\t}\n\n\t\t\t\tif (record.type === \"break\" || record.type === \"continue\") {\n\t\t\t\t\tthis.next = record.arg;\n\t\t\t\t} else if (record.type === \"return\") {\n\t\t\t\t\tthis.rval = this.arg = record.arg;\n\t\t\t\t\tthis.method = \"return\";\n\t\t\t\t\tthis.next = \"end\";\n\t\t\t\t} else if (record.type === \"normal\" && afterLoc) {\n\t\t\t\t\tthis.next = afterLoc;\n\t\t\t\t}\n\n\t\t\t\treturn ContinueSentinel;\n\t\t\t},\n\t\t\tfinish: function finish(finallyLoc) {\n\t\t\t\tfor (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t\t\t\t\tvar entry = this.tryEntries[i];\n\n\t\t\t\t\tif (entry.finallyLoc === finallyLoc) {\n\t\t\t\t\t\tthis.complete(entry.completion, entry.afterLoc);\n\t\t\t\t\t\tresetTryEntry(entry);\n\t\t\t\t\t\treturn ContinueSentinel;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"catch\": function _catch(tryLoc) {\n\t\t\t\tfor (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t\t\t\t\tvar entry = this.tryEntries[i];\n\n\t\t\t\t\tif (entry.tryLoc === tryLoc) {\n\t\t\t\t\t\tvar record = entry.completion;\n\n\t\t\t\t\t\tif (record.type === \"throw\") {\n\t\t\t\t\t\t\tvar thrown = record.arg;\n\t\t\t\t\t\t\tresetTryEntry(entry);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn thrown;\n\t\t\t\t\t}\n\t\t\t\t} // The context.catch method must only be called with a location\n\t\t\t\t// argument that corresponds to a known catch block.\n\n\n\t\t\t\tthrow new Error(\"illegal catch attempt\");\n\t\t\t},\n\t\t\tdelegateYield: function delegateYield(iterable, resultName, nextLoc) {\n\t\t\t\tthis.delegate = {\n\t\t\t\t\titerator: values(iterable),\n\t\t\t\t\tresultName: resultName,\n\t\t\t\t\tnextLoc: nextLoc\n\t\t\t\t};\n\n\t\t\t\tif (this.method === \"next\") {\n\t\t\t\t\t// Deliberately forget the last sent value so that we don't\n\t\t\t\t\t// accidentally pass it on to the delegate.\n\t\t\t\t\tthis.arg = undefined$1;\n\t\t\t\t}\n\n\t\t\t\treturn ContinueSentinel;\n\t\t\t}\n\t\t}; // Regardless of whether this script is executing as a CommonJS module\n\t\t// or not, return the runtime object so that we can declare the variable\n\t\t// regeneratorRuntime in the outer scope, which allows this module to be\n\t\t// injected easily by `bin/regenerator --include-runtime script.js`.\n\n\t\treturn exports;\n\t}( // If this script is executing as a CommonJS module, use module.exports\n\t// as the regeneratorRuntime namespace. Otherwise create a new empty\n\t// object. Either way, the resulting object will be used to initialize\n\t// the regeneratorRuntime variable at the top of this file.\n\ttypeof module === \"object\" ? module.exports : {});\n\n\ttry {\n\t\tregeneratorRuntime = runtime;\n\t} catch (accidentalStrictMode) {\n\t\t// This module should not be running in strict mode, so the above\n\t\t// assignment should always work unless something is misconfigured. Just\n\t\t// in case runtime.js accidentally runs in strict mode, we can escape\n\t\t// strict mode using a global Function call. This could conceivably fail\n\t\t// if a Content Security Policy forbids using Function, but in that case\n\t\t// the proper solution is to fix the accidental strict mode problem. If\n\t\t// you've misconfigured your bundler to force strict mode and applied a\n\t\t// CSP to forbid Function, and you're not willing to fix either of those\n\t\t// problems, please detail your unique predicament in a GitHub issue.\n\t\tFunction(\"r\", \"regeneratorRuntime = r\")(runtime);\n\t}\n\n\tvar REVISION = '125';\n\tvar MOUSE = {\n\t\tLEFT: 0,\n\t\tMIDDLE: 1,\n\t\tRIGHT: 2,\n\t\tROTATE: 0,\n\t\tDOLLY: 1,\n\t\tPAN: 2\n\t};\n\tvar TOUCH = {\n\t\tROTATE: 0,\n\t\tPAN: 1,\n\t\tDOLLY_PAN: 2,\n\t\tDOLLY_ROTATE: 3\n\t};\n\tvar CullFaceNone = 0;\n\tvar CullFaceBack = 1;\n\tvar CullFaceFront = 2;\n\tvar CullFaceFrontBack = 3;\n\tvar BasicShadowMap = 0;\n\tvar PCFShadowMap = 1;\n\tvar PCFSoftShadowMap = 2;\n\tvar VSMShadowMap = 3;\n\tvar FrontSide = 0;\n\tvar BackSide = 1;\n\tvar DoubleSide = 2;\n\tvar FlatShading = 1;\n\tvar SmoothShading = 2;\n\tvar NoBlending = 0;\n\tvar NormalBlending = 1;\n\tvar AdditiveBlending = 2;\n\tvar SubtractiveBlending = 3;\n\tvar MultiplyBlending = 4;\n\tvar CustomBlending = 5;\n\tvar AddEquation = 100;\n\tvar SubtractEquation = 101;\n\tvar ReverseSubtractEquation = 102;\n\tvar MinEquation = 103;\n\tvar MaxEquation = 104;\n\tvar ZeroFactor = 200;\n\tvar OneFactor = 201;\n\tvar SrcColorFactor = 202;\n\tvar OneMinusSrcColorFactor = 203;\n\tvar SrcAlphaFactor = 204;\n\tvar OneMinusSrcAlphaFactor = 205;\n\tvar DstAlphaFactor = 206;\n\tvar OneMinusDstAlphaFactor = 207;\n\tvar DstColorFactor = 208;\n\tvar OneMinusDstColorFactor = 209;\n\tvar SrcAlphaSaturateFactor = 210;\n\tvar NeverDepth = 0;\n\tvar AlwaysDepth = 1;\n\tvar LessDepth = 2;\n\tvar LessEqualDepth = 3;\n\tvar EqualDepth = 4;\n\tvar GreaterEqualDepth = 5;\n\tvar GreaterDepth = 6;\n\tvar NotEqualDepth = 7;\n\tvar MultiplyOperation = 0;\n\tvar MixOperation = 1;\n\tvar AddOperation = 2;\n\tvar NoToneMapping = 0;\n\tvar LinearToneMapping = 1;\n\tvar ReinhardToneMapping = 2;\n\tvar CineonToneMapping = 3;\n\tvar ACESFilmicToneMapping = 4;\n\tvar CustomToneMapping = 5;\n\tvar UVMapping = 300;\n\tvar CubeReflectionMapping = 301;\n\tvar CubeRefractionMapping = 302;\n\tvar EquirectangularReflectionMapping = 303;\n\tvar EquirectangularRefractionMapping = 304;\n\tvar CubeUVReflectionMapping = 306;\n\tvar CubeUVRefractionMapping = 307;\n\tvar RepeatWrapping = 1000;\n\tvar ClampToEdgeWrapping = 1001;\n\tvar MirroredRepeatWrapping = 1002;\n\tvar NearestFilter = 1003;\n\tvar NearestMipmapNearestFilter = 1004;\n\tvar NearestMipMapNearestFilter = 1004;\n\tvar NearestMipmapLinearFilter = 1005;\n\tvar NearestMipMapLinearFilter = 1005;\n\tvar LinearFilter = 1006;\n\tvar LinearMipmapNearestFilter = 1007;\n\tvar LinearMipMapNearestFilter = 1007;\n\tvar LinearMipmapLinearFilter = 1008;\n\tvar LinearMipMapLinearFilter = 1008;\n\tvar UnsignedByteType = 1009;\n\tvar ByteType = 1010;\n\tvar ShortType = 1011;\n\tvar UnsignedShortType = 1012;\n\tvar IntType = 1013;\n\tvar UnsignedIntType = 1014;\n\tvar FloatType = 1015;\n\tvar HalfFloatType = 1016;\n\tvar UnsignedShort4444Type = 1017;\n\tvar UnsignedShort5551Type = 1018;\n\tvar UnsignedShort565Type = 1019;\n\tvar UnsignedInt248Type = 1020;\n\tvar AlphaFormat = 1021;\n\tvar RGBFormat = 1022;\n\tvar RGBAFormat = 1023;\n\tvar LuminanceFormat = 1024;\n\tvar LuminanceAlphaFormat = 1025;\n\tvar RGBEFormat = RGBAFormat;\n\tvar DepthFormat = 1026;\n\tvar DepthStencilFormat = 1027;\n\tvar RedFormat = 1028;\n\tvar RedIntegerFormat = 1029;\n\tvar RGFormat = 1030;\n\tvar RGIntegerFormat = 1031;\n\tvar RGBIntegerFormat = 1032;\n\tvar RGBAIntegerFormat = 1033;\n\tvar RGB_S3TC_DXT1_Format = 33776;\n\tvar RGBA_S3TC_DXT1_Format = 33777;\n\tvar RGBA_S3TC_DXT3_Format = 33778;\n\tvar RGBA_S3TC_DXT5_Format = 33779;\n\tvar RGB_PVRTC_4BPPV1_Format = 35840;\n\tvar RGB_PVRTC_2BPPV1_Format = 35841;\n\tvar RGBA_PVRTC_4BPPV1_Format = 35842;\n\tvar RGBA_PVRTC_2BPPV1_Format = 35843;\n\tvar RGB_ETC1_Format = 36196;\n\tvar RGB_ETC2_Format = 37492;\n\tvar RGBA_ETC2_EAC_Format = 37496;\n\tvar RGBA_ASTC_4x4_Format = 37808;\n\tvar RGBA_ASTC_5x4_Format = 37809;\n\tvar RGBA_ASTC_5x5_Format = 37810;\n\tvar RGBA_ASTC_6x5_Format = 37811;\n\tvar RGBA_ASTC_6x6_Format = 37812;\n\tvar RGBA_ASTC_8x5_Format = 37813;\n\tvar RGBA_ASTC_8x6_Format = 37814;\n\tvar RGBA_ASTC_8x8_Format = 37815;\n\tvar RGBA_ASTC_10x5_Format = 37816;\n\tvar RGBA_ASTC_10x6_Format = 37817;\n\tvar RGBA_ASTC_10x8_Format = 37818;\n\tvar RGBA_ASTC_10x10_Format = 37819;\n\tvar RGBA_ASTC_12x10_Format = 37820;\n\tvar RGBA_ASTC_12x12_Format = 37821;\n\tvar RGBA_BPTC_Format = 36492;\n\tvar SRGB8_ALPHA8_ASTC_4x4_Format = 37840;\n\tvar SRGB8_ALPHA8_ASTC_5x4_Format = 37841;\n\tvar SRGB8_ALPHA8_ASTC_5x5_Format = 37842;\n\tvar SRGB8_ALPHA8_ASTC_6x5_Format = 37843;\n\tvar SRGB8_ALPHA8_ASTC_6x6_Format = 37844;\n\tvar SRGB8_ALPHA8_ASTC_8x5_Format = 37845;\n\tvar SRGB8_ALPHA8_ASTC_8x6_Format = 37846;\n\tvar SRGB8_ALPHA8_ASTC_8x8_Format = 37847;\n\tvar SRGB8_ALPHA8_ASTC_10x5_Format = 37848;\n\tvar SRGB8_ALPHA8_ASTC_10x6_Format = 37849;\n\tvar SRGB8_ALPHA8_ASTC_10x8_Format = 37850;\n\tvar SRGB8_ALPHA8_ASTC_10x10_Format = 37851;\n\tvar SRGB8_ALPHA8_ASTC_12x10_Format = 37852;\n\tvar SRGB8_ALPHA8_ASTC_12x12_Format = 37853;\n\tvar LoopOnce = 2200;\n\tvar LoopRepeat = 2201;\n\tvar LoopPingPong = 2202;\n\tvar InterpolateDiscrete = 2300;\n\tvar InterpolateLinear = 2301;\n\tvar InterpolateSmooth = 2302;\n\tvar ZeroCurvatureEnding = 2400;\n\tvar ZeroSlopeEnding = 2401;\n\tvar WrapAroundEnding = 2402;\n\tvar NormalAnimationBlendMode = 2500;\n\tvar AdditiveAnimationBlendMode = 2501;\n\tvar TrianglesDrawMode = 0;\n\tvar TriangleStripDrawMode = 1;\n\tvar TriangleFanDrawMode = 2;\n\tvar LinearEncoding = 3000;\n\tvar sRGBEncoding = 3001;\n\tvar GammaEncoding = 3007;\n\tvar RGBEEncoding = 3002;\n\tvar LogLuvEncoding = 3003;\n\tvar RGBM7Encoding = 3004;\n\tvar RGBM16Encoding = 3005;\n\tvar RGBDEncoding = 3006;\n\tvar BasicDepthPacking = 3200;\n\tvar RGBADepthPacking = 3201;\n\tvar TangentSpaceNormalMap = 0;\n\tvar ObjectSpaceNormalMap = 1;\n\tvar ZeroStencilOp = 0;\n\tvar KeepStencilOp = 7680;\n\tvar ReplaceStencilOp = 7681;\n\tvar IncrementStencilOp = 7682;\n\tvar DecrementStencilOp = 7683;\n\tvar IncrementWrapStencilOp = 34055;\n\tvar DecrementWrapStencilOp = 34056;\n\tvar InvertStencilOp = 5386;\n\tvar NeverStencilFunc = 512;\n\tvar LessStencilFunc = 513;\n\tvar EqualStencilFunc = 514;\n\tvar LessEqualStencilFunc = 515;\n\tvar GreaterStencilFunc = 516;\n\tvar NotEqualStencilFunc = 517;\n\tvar GreaterEqualStencilFunc = 518;\n\tvar AlwaysStencilFunc = 519;\n\tvar StaticDrawUsage = 35044;\n\tvar DynamicDrawUsage = 35048;\n\tvar StreamDrawUsage = 35040;\n\tvar StaticReadUsage = 35045;\n\tvar DynamicReadUsage = 35049;\n\tvar StreamReadUsage = 35041;\n\tvar StaticCopyUsage = 35046;\n\tvar DynamicCopyUsage = 35050;\n\tvar StreamCopyUsage = 35042;\n\tvar GLSL1 = '100';\n\tvar GLSL3 = '300 es';\n\n\tfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n\t\ttry {\n\t\t\tvar info = gen[key](arg);\n\t\t\tvar value = info.value;\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t\treturn;\n\t\t}\n\n\t\tif (info.done) {\n\t\t\tresolve(value);\n\t\t} else {\n\t\t\tPromise.resolve(value).then(_next, _throw);\n\t\t}\n\t}\n\n\tfunction _asyncToGenerator(fn) {\n\t\treturn function () {\n\t\t\tvar self = this,\n\t\t\t\t\targs = arguments;\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tvar gen = fn.apply(self, args);\n\n\t\t\t\tfunction _next(value) {\n\t\t\t\t\tasyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n\t\t\t\t}\n\n\t\t\t\tfunction _throw(err) {\n\t\t\t\t\tasyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n\t\t\t\t}\n\n\t\t\t\t_next(undefined);\n\t\t\t});\n\t\t};\n\t}\n\n\tfunction _defineProperties(target, props) {\n\t\tfor (var i = 0; i < props.length; i++) {\n\t\t\tvar descriptor = props[i];\n\t\t\tdescriptor.enumerable = descriptor.enumerable || false;\n\t\t\tdescriptor.configurable = true;\n\t\t\tif (\"value\" in descriptor) descriptor.writable = true;\n\t\t\tObject.defineProperty(target, descriptor.key, descriptor);\n\t\t}\n\t}\n\n\tfunction _createClass(Constructor, protoProps, staticProps) {\n\t\tif (protoProps) _defineProperties(Constructor.prototype, protoProps);\n\t\tif (staticProps) _defineProperties(Constructor, staticProps);\n\t\treturn Constructor;\n\t}\n\n\tfunction _inheritsLoose(subClass, superClass) {\n\t\tsubClass.prototype = Object.create(superClass.prototype);\n\t\tsubClass.prototype.constructor = subClass;\n\t\tsubClass.__proto__ = superClass;\n\t}\n\n\tfunction _assertThisInitialized(self) {\n\t\tif (self === void 0) {\n\t\t\tthrow new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t\t}\n\n\t\treturn self;\n\t}\n\n\tfunction _unsupportedIterableToArray(o, minLen) {\n\t\tif (!o) return;\n\t\tif (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n\t\tvar n = Object.prototype.toString.call(o).slice(8, -1);\n\t\tif (n === \"Object\" && o.constructor) n = o.constructor.name;\n\t\tif (n === \"Map\" || n === \"Set\") return Array.from(o);\n\t\tif (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n\t}\n\n\tfunction _arrayLikeToArray(arr, len) {\n\t\tif (len == null || len > arr.length) len = arr.length;\n\n\t\tfor (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n\t\treturn arr2;\n\t}\n\n\tfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n\t\tvar it;\n\n\t\tif (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n\t\t\tif (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n\t\t\t\tif (it) o = it;\n\t\t\t\tvar i = 0;\n\t\t\t\treturn function () {\n\t\t\t\t\tif (i >= o.length) return {\n\t\t\t\t\t\tdone: true\n\t\t\t\t\t};\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdone: false,\n\t\t\t\t\t\tvalue: o[i++]\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthrow new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t\t}\n\n\t\tit = o[Symbol.iterator]();\n\t\treturn it.next.bind(it);\n\t}\n\n\t/**\n\t * https://github.com/mrdoob/eventdispatcher.js/\n\t */\n\tfunction EventDispatcher() {}\n\n\tObject.assign(EventDispatcher.prototype, {\n\t\taddEventListener: function addEventListener(type, listener) {\n\t\t\tif (this._listeners === undefined) this._listeners = {};\n\t\t\tvar listeners = this._listeners;\n\n\t\t\tif (listeners[type] === undefined) {\n\t\t\t\tlisteners[type] = [];\n\t\t\t}\n\n\t\t\tif (listeners[type].indexOf(listener) === -1) {\n\t\t\t\tlisteners[type].push(listener);\n\t\t\t}\n\t\t},\n\t\thasEventListener: function hasEventListener(type, listener) {\n\t\t\tif (this._listeners === undefined) return false;\n\t\t\tvar listeners = this._listeners;\n\t\t\treturn listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1;\n\t\t},\n\t\tremoveEventListener: function removeEventListener(type, listener) {\n\t\t\tif (this._listeners === undefined) return;\n\t\t\tvar listeners = this._listeners;\n\t\t\tvar listenerArray = listeners[type];\n\n\t\t\tif (listenerArray !== undefined) {\n\t\t\t\tvar index = listenerArray.indexOf(listener);\n\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\tlistenerArray.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdispatchEvent: function dispatchEvent(event) {\n\t\t\tif (this._listeners === undefined) return;\n\t\t\tvar listeners = this._listeners;\n\t\t\tvar listenerArray = listeners[event.type];\n\n\t\t\tif (listenerArray !== undefined) {\n\t\t\t\tevent.target = this; // Make a copy, in case listeners are removed while iterating.\n\n\t\t\t\tvar array = listenerArray.slice(0);\n\n\t\t\t\tfor (var i = 0, l = array.length; i < l; i++) {\n\t\t\t\t\tarray[i].call(this, event);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tvar _lut = [];\n\n\tfor (var i = 0; i < 256; i++) {\n\t\t_lut[i] = (i < 16 ? '0' : '') + i.toString(16);\n\t}\n\n\tvar _seed = 1234567;\n\tvar MathUtils = {\n\t\tDEG2RAD: Math.PI / 180,\n\t\tRAD2DEG: 180 / Math.PI,\n\t\tgenerateUUID: function generateUUID() {\n\t\t\t// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\n\t\t\tvar d0 = Math.random() * 0xffffffff | 0;\n\t\t\tvar d1 = Math.random() * 0xffffffff | 0;\n\t\t\tvar d2 = Math.random() * 0xffffffff | 0;\n\t\t\tvar d3 = Math.random() * 0xffffffff | 0;\n\t\t\tvar uuid = _lut[d0 & 0xff] + _lut[d0 >> 8 & 0xff] + _lut[d0 >> 16 & 0xff] + _lut[d0 >> 24 & 0xff] + '-' + _lut[d1 & 0xff] + _lut[d1 >> 8 & 0xff] + '-' + _lut[d1 >> 16 & 0x0f | 0x40] + _lut[d1 >> 24 & 0xff] + '-' + _lut[d2 & 0x3f | 0x80] + _lut[d2 >> 8 & 0xff] + '-' + _lut[d2 >> 16 & 0xff] + _lut[d2 >> 24 & 0xff] + _lut[d3 & 0xff] + _lut[d3 >> 8 & 0xff] + _lut[d3 >> 16 & 0xff] + _lut[d3 >> 24 & 0xff]; // .toUpperCase() here flattens concatenated strings to save heap memory space.\n\n\t\t\treturn uuid.toUpperCase();\n\t\t},\n\t\tclamp: function clamp(value, min, max) {\n\t\t\treturn Math.max(min, Math.min(max, value));\n\t\t},\n\t\t// compute euclidian modulo of m % n\n\t\t// https://en.wikipedia.org/wiki/Modulo_operation\n\t\teuclideanModulo: function euclideanModulo(n, m) {\n\t\t\treturn (n % m + m) % m;\n\t\t},\n\t\t// Linear mapping from range <a1, a2> to range <b1, b2>\n\t\tmapLinear: function mapLinear(x, a1, a2, b1, b2) {\n\t\t\treturn b1 + (x - a1) * (b2 - b1) / (a2 - a1);\n\t\t},\n\t\t// https://en.wikipedia.org/wiki/Linear_interpolation\n\t\tlerp: function lerp(x, y, t) {\n\t\t\treturn (1 - t) * x + t * y;\n\t\t},\n\t\t// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/\n\t\tdamp: function damp(x, y, lambda, dt) {\n\t\t\treturn MathUtils.lerp(x, y, 1 - Math.exp(-lambda * dt));\n\t\t},\n\t\t// https://www.desmos.com/calculator/vcsjnyz7x4\n\t\tpingpong: function pingpong(x, length) {\n\t\t\tif (length === void 0) {\n\t\t\t\tlength = 1;\n\t\t\t}\n\n\t\t\treturn length - Math.abs(MathUtils.euclideanModulo(x, length * 2) - length);\n\t\t},\n\t\t// http://en.wikipedia.org/wiki/Smoothstep\n\t\tsmoothstep: function smoothstep(x, min, max) {\n\t\t\tif (x <= min) return 0;\n\t\t\tif (x >= max) return 1;\n\t\t\tx = (x - min) / (max - min);\n\t\t\treturn x * x * (3 - 2 * x);\n\t\t},\n\t\tsmootherstep: function smootherstep(x, min, max) {\n\t\t\tif (x <= min) return 0;\n\t\t\tif (x >= max) return 1;\n\t\t\tx = (x - min) / (max - min);\n\t\t\treturn x * x * x * (x * (x * 6 - 15) + 10);\n\t\t},\n\t\t// Random integer from <low, high> interval\n\t\trandInt: function randInt(low, high) {\n\t\t\treturn low + Math.floor(Math.random() * (high - low + 1));\n\t\t},\n\t\t// Random float from <low, high> interval\n\t\trandFloat: function randFloat(low, high) {\n\t\t\treturn low + Math.random() * (high - low);\n\t\t},\n\t\t// Random float from <-range/2, range/2> interval\n\t\trandFloatSpread: function randFloatSpread(range) {\n\t\t\treturn range * (0.5 - Math.random());\n\t\t},\n\t\t// Deterministic pseudo-random float in the interval [ 0, 1 ]\n\t\tseededRandom: function seededRandom(s) {\n\t\t\tif (s !== undefined) _seed = s % 2147483647; // Park-Miller algorithm\n\n\t\t\t_seed = _seed * 16807 % 2147483647;\n\t\t\treturn (_seed - 1) / 2147483646;\n\t\t},\n\t\tdegToRad: function degToRad(degrees) {\n\t\t\treturn degrees * MathUtils.DEG2RAD;\n\t\t},\n\t\tradToDeg: function radToDeg(radians) {\n\t\t\treturn radians * MathUtils.RAD2DEG;\n\t\t},\n\t\tisPowerOfTwo: function isPowerOfTwo(value) {\n\t\t\treturn (value & value - 1) === 0 && value !== 0;\n\t\t},\n\t\tceilPowerOfTwo: function ceilPowerOfTwo(value) {\n\t\t\treturn Math.pow(2, Math.ceil(Math.log(value) / Math.LN2));\n\t\t},\n\t\tfloorPowerOfTwo: function floorPowerOfTwo(value) {\n\t\t\treturn Math.pow(2, Math.floor(Math.log(value) / Math.LN2));\n\t\t},\n\t\tsetQuaternionFromProperEuler: function setQuaternionFromProperEuler(q, a, b, c, order) {\n\t\t\t// Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles\n\t\t\t// rotations are applied to the axes in the order specified by 'order'\n\t\t\t// rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c'\n\t\t\t// angles are in radians\n\t\t\tvar cos = Math.cos;\n\t\t\tvar sin = Math.sin;\n\t\t\tvar c2 = cos(b / 2);\n\t\t\tvar s2 = sin(b / 2);\n\t\t\tvar c13 = cos((a + c) / 2);\n\t\t\tvar s13 = sin((a + c) / 2);\n\t\t\tvar c1_3 = cos((a - c) / 2);\n\t\t\tvar s1_3 = sin((a - c) / 2);\n\t\t\tvar c3_1 = cos((c - a) / 2);\n\t\t\tvar s3_1 = sin((c - a) / 2);\n\n\t\t\tswitch (order) {\n\t\t\t\tcase 'XYX':\n\t\t\t\t\tq.set(c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YZY':\n\t\t\t\t\tq.set(s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZXZ':\n\t\t\t\t\tq.set(s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'XZX':\n\t\t\t\t\tq.set(c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YXY':\n\t\t\t\t\tq.set(s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZYZ':\n\t\t\t\t\tq.set(s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.warn('THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order);\n\t\t\t}\n\t\t}\n\t};\n\n\tvar Vector2 = /*#__PURE__*/function () {\n\t\tfunction Vector2(x, y) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isVector2', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}\n\n\t\tvar _proto = Vector2.prototype;\n\n\t\t_proto.set = function set(x, y) {\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setScalar = function setScalar(scalar) {\n\t\t\tthis.x = scalar;\n\t\t\tthis.y = scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setX = function setX(x) {\n\t\t\tthis.x = x;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setY = function setY(y) {\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setComponent = function setComponent(index, value) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.x = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.y = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getComponent = function getComponent(index) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\treturn this.x;\n\n\t\t\t\tcase 1:\n\t\t\t\t\treturn this.y;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this.x, this.y);\n\t\t};\n\n\t\t_proto.copy = function copy(v) {\n\t\t\tthis.x = v.x;\n\t\t\tthis.y = v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.add = function add(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');\n\t\t\t\treturn this.addVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x += v.x;\n\t\t\tthis.y += v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScalar = function addScalar(s) {\n\t\t\tthis.x += s;\n\t\t\tthis.y += s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addVectors = function addVectors(a, b) {\n\t\t\tthis.x = a.x + b.x;\n\t\t\tthis.y = a.y + b.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScaledVector = function addScaledVector(v, s) {\n\t\t\tthis.x += v.x * s;\n\t\t\tthis.y += v.y * s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.sub = function sub(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');\n\t\t\t\treturn this.subVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x -= v.x;\n\t\t\tthis.y -= v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subScalar = function subScalar(s) {\n\t\t\tthis.x -= s;\n\t\t\tthis.y -= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subVectors = function subVectors(a, b) {\n\t\t\tthis.x = a.x - b.x;\n\t\t\tthis.y = a.y - b.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(v) {\n\t\t\tthis.x *= v.x;\n\t\t\tthis.y *= v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(scalar) {\n\t\t\tthis.x *= scalar;\n\t\t\tthis.y *= scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.divide = function divide(v) {\n\t\t\tthis.x /= v.x;\n\t\t\tthis.y /= v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.divideScalar = function divideScalar(scalar) {\n\t\t\treturn this.multiplyScalar(1 / scalar);\n\t\t};\n\n\t\t_proto.applyMatrix3 = function applyMatrix3(m) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y;\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[0] * x + e[3] * y + e[6];\n\t\t\tthis.y = e[1] * x + e[4] * y + e[7];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.min = function min(v) {\n\t\t\tthis.x = Math.min(this.x, v.x);\n\t\t\tthis.y = Math.min(this.y, v.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.max = function max(v) {\n\t\t\tthis.x = Math.max(this.x, v.x);\n\t\t\tthis.y = Math.max(this.y, v.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clamp = function clamp(min, max) {\n\t\t\t// assumes min < max, componentwise\n\t\t\tthis.x = Math.max(min.x, Math.min(max.x, this.x));\n\t\t\tthis.y = Math.max(min.y, Math.min(max.y, this.y));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampScalar = function clampScalar(minVal, maxVal) {\n\t\t\tthis.x = Math.max(minVal, Math.min(maxVal, this.x));\n\t\t\tthis.y = Math.max(minVal, Math.min(maxVal, this.y));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampLength = function clampLength(min, max) {\n\t\t\tvar length = this.length();\n\t\t\treturn this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n\t\t};\n\n\t\t_proto.floor = function floor() {\n\t\t\tthis.x = Math.floor(this.x);\n\t\t\tthis.y = Math.floor(this.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.ceil = function ceil() {\n\t\t\tthis.x = Math.ceil(this.x);\n\t\t\tthis.y = Math.ceil(this.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.round = function round() {\n\t\t\tthis.x = Math.round(this.x);\n\t\t\tthis.y = Math.round(this.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.roundToZero = function roundToZero() {\n\t\t\tthis.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n\t\t\tthis.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.negate = function negate() {\n\t\t\tthis.x = -this.x;\n\t\t\tthis.y = -this.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dot = function dot(v) {\n\t\t\treturn this.x * v.x + this.y * v.y;\n\t\t};\n\n\t\t_proto.cross = function cross(v) {\n\t\t\treturn this.x * v.y - this.y * v.x;\n\t\t};\n\n\t\t_proto.lengthSq = function lengthSq() {\n\t\t\treturn this.x * this.x + this.y * this.y;\n\t\t};\n\n\t\t_proto.length = function length() {\n\t\t\treturn Math.sqrt(this.x * this.x + this.y * this.y);\n\t\t};\n\n\t\t_proto.manhattanLength = function manhattanLength() {\n\t\t\treturn Math.abs(this.x) + Math.abs(this.y);\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\treturn this.divideScalar(this.length() || 1);\n\t\t};\n\n\t\t_proto.angle = function angle() {\n\t\t\t// computes the angle in radians with respect to the positive x-axis\n\t\t\tvar angle = Math.atan2(-this.y, -this.x) + Math.PI;\n\t\t\treturn angle;\n\t\t};\n\n\t\t_proto.distanceTo = function distanceTo(v) {\n\t\t\treturn Math.sqrt(this.distanceToSquared(v));\n\t\t};\n\n\t\t_proto.distanceToSquared = function distanceToSquared(v) {\n\t\t\tvar dx = this.x - v.x,\n\t\t\t\t\tdy = this.y - v.y;\n\t\t\treturn dx * dx + dy * dy;\n\t\t};\n\n\t\t_proto.manhattanDistanceTo = function manhattanDistanceTo(v) {\n\t\t\treturn Math.abs(this.x - v.x) + Math.abs(this.y - v.y);\n\t\t};\n\n\t\t_proto.setLength = function setLength(length) {\n\t\t\treturn this.normalize().multiplyScalar(length);\n\t\t};\n\n\t\t_proto.lerp = function lerp(v, alpha) {\n\t\t\tthis.x += (v.x - this.x) * alpha;\n\t\t\tthis.y += (v.y - this.y) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpVectors = function lerpVectors(v1, v2, alpha) {\n\t\t\tthis.x = v1.x + (v2.x - v1.x) * alpha;\n\t\t\tthis.y = v1.y + (v2.y - v1.y) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(v) {\n\t\t\treturn v.x === this.x && v.y === this.y;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.x = array[offset];\n\t\t\tthis.y = array[offset + 1];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this.x;\n\t\t\tarray[offset + 1] = this.y;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index, offset) {\n\t\t\tif (offset !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector2: offset has been removed from .fromBufferAttribute().');\n\t\t\t}\n\n\t\t\tthis.x = attribute.getX(index);\n\t\t\tthis.y = attribute.getY(index);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.rotateAround = function rotateAround(center, angle) {\n\t\t\tvar c = Math.cos(angle),\n\t\t\t\t\ts = Math.sin(angle);\n\t\t\tvar x = this.x - center.x;\n\t\t\tvar y = this.y - center.y;\n\t\t\tthis.x = x * c - y * s + center.x;\n\t\t\tthis.y = x * s + y * c + center.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.random = function random() {\n\t\t\tthis.x = Math.random();\n\t\t\tthis.y = Math.random();\n\t\t\treturn this;\n\t\t};\n\n\t\t_createClass(Vector2, [{\n\t\t\tkey: \"width\",\n\t\t\tget: function get() {\n\t\t\t\treturn this.x;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis.x = value;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"height\",\n\t\t\tget: function get() {\n\t\t\t\treturn this.y;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis.y = value;\n\t\t\t}\n\t\t}]);\n\n\t\treturn Vector2;\n\t}();\n\n\tvar Matrix3 = /*#__PURE__*/function () {\n\t\tfunction Matrix3() {\n\t\t\tObject.defineProperty(this, 'isMatrix3', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tconsole.error('THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.');\n\t\t\t}\n\t\t}\n\n\t\tvar _proto = Matrix3.prototype;\n\n\t\t_proto.set = function set(n11, n12, n13, n21, n22, n23, n31, n32, n33) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] = n11;\n\t\t\tte[1] = n21;\n\t\t\tte[2] = n31;\n\t\t\tte[3] = n12;\n\t\t\tte[4] = n22;\n\t\t\tte[5] = n32;\n\t\t\tte[6] = n13;\n\t\t\tte[7] = n23;\n\t\t\tte[8] = n33;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.identity = function identity() {\n\t\t\tthis.set(1, 0, 0, 0, 1, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().fromArray(this.elements);\n\t\t};\n\n\t\t_proto.copy = function copy(m) {\n\t\t\tvar te = this.elements;\n\t\t\tvar me = m.elements;\n\t\t\tte[0] = me[0];\n\t\t\tte[1] = me[1];\n\t\t\tte[2] = me[2];\n\t\t\tte[3] = me[3];\n\t\t\tte[4] = me[4];\n\t\t\tte[5] = me[5];\n\t\t\tte[6] = me[6];\n\t\t\tte[7] = me[7];\n\t\t\tte[8] = me[8];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.extractBasis = function extractBasis(xAxis, yAxis, zAxis) {\n\t\t\txAxis.setFromMatrix3Column(this, 0);\n\t\t\tyAxis.setFromMatrix3Column(this, 1);\n\t\t\tzAxis.setFromMatrix3Column(this, 2);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrix4 = function setFromMatrix4(m) {\n\t\t\tvar me = m.elements;\n\t\t\tthis.set(me[0], me[4], me[8], me[1], me[5], me[9], me[2], me[6], me[10]);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(m) {\n\t\t\treturn this.multiplyMatrices(this, m);\n\t\t};\n\n\t\t_proto.premultiply = function premultiply(m) {\n\t\t\treturn this.multiplyMatrices(m, this);\n\t\t};\n\n\t\t_proto.multiplyMatrices = function multiplyMatrices(a, b) {\n\t\t\tvar ae = a.elements;\n\t\t\tvar be = b.elements;\n\t\t\tvar te = this.elements;\n\t\t\tvar a11 = ae[0],\n\t\t\t\t\ta12 = ae[3],\n\t\t\t\t\ta13 = ae[6];\n\t\t\tvar a21 = ae[1],\n\t\t\t\t\ta22 = ae[4],\n\t\t\t\t\ta23 = ae[7];\n\t\t\tvar a31 = ae[2],\n\t\t\t\t\ta32 = ae[5],\n\t\t\t\t\ta33 = ae[8];\n\t\t\tvar b11 = be[0],\n\t\t\t\t\tb12 = be[3],\n\t\t\t\t\tb13 = be[6];\n\t\t\tvar b21 = be[1],\n\t\t\t\t\tb22 = be[4],\n\t\t\t\t\tb23 = be[7];\n\t\t\tvar b31 = be[2],\n\t\t\t\t\tb32 = be[5],\n\t\t\t\t\tb33 = be[8];\n\t\t\tte[0] = a11 * b11 + a12 * b21 + a13 * b31;\n\t\t\tte[3] = a11 * b12 + a12 * b22 + a13 * b32;\n\t\t\tte[6] = a11 * b13 + a12 * b23 + a13 * b33;\n\t\t\tte[1] = a21 * b11 + a22 * b21 + a23 * b31;\n\t\t\tte[4] = a21 * b12 + a22 * b22 + a23 * b32;\n\t\t\tte[7] = a21 * b13 + a22 * b23 + a23 * b33;\n\t\t\tte[2] = a31 * b11 + a32 * b21 + a33 * b31;\n\t\t\tte[5] = a31 * b12 + a32 * b22 + a33 * b32;\n\t\t\tte[8] = a31 * b13 + a32 * b23 + a33 * b33;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(s) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] *= s;\n\t\t\tte[3] *= s;\n\t\t\tte[6] *= s;\n\t\t\tte[1] *= s;\n\t\t\tte[4] *= s;\n\t\t\tte[7] *= s;\n\t\t\tte[2] *= s;\n\t\t\tte[5] *= s;\n\t\t\tte[8] *= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.determinant = function determinant() {\n\t\t\tvar te = this.elements;\n\t\t\tvar a = te[0],\n\t\t\t\t\tb = te[1],\n\t\t\t\t\tc = te[2],\n\t\t\t\t\td = te[3],\n\t\t\t\t\te = te[4],\n\t\t\t\t\tf = te[5],\n\t\t\t\t\tg = te[6],\n\t\t\t\t\th = te[7],\n\t\t\t\t\ti = te[8];\n\t\t\treturn a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;\n\t\t};\n\n\t\t_proto.invert = function invert() {\n\t\t\tvar te = this.elements,\n\t\t\t\t\tn11 = te[0],\n\t\t\t\t\tn21 = te[1],\n\t\t\t\t\tn31 = te[2],\n\t\t\t\t\tn12 = te[3],\n\t\t\t\t\tn22 = te[4],\n\t\t\t\t\tn32 = te[5],\n\t\t\t\t\tn13 = te[6],\n\t\t\t\t\tn23 = te[7],\n\t\t\t\t\tn33 = te[8],\n\t\t\t\t\tt11 = n33 * n22 - n32 * n23,\n\t\t\t\t\tt12 = n32 * n13 - n33 * n12,\n\t\t\t\t\tt13 = n23 * n12 - n22 * n13,\n\t\t\t\t\tdet = n11 * t11 + n21 * t12 + n31 * t13;\n\t\t\tif (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);\n\t\t\tvar detInv = 1 / det;\n\t\t\tte[0] = t11 * detInv;\n\t\t\tte[1] = (n31 * n23 - n33 * n21) * detInv;\n\t\t\tte[2] = (n32 * n21 - n31 * n22) * detInv;\n\t\t\tte[3] = t12 * detInv;\n\t\t\tte[4] = (n33 * n11 - n31 * n13) * detInv;\n\t\t\tte[5] = (n31 * n12 - n32 * n11) * detInv;\n\t\t\tte[6] = t13 * detInv;\n\t\t\tte[7] = (n21 * n13 - n23 * n11) * detInv;\n\t\t\tte[8] = (n22 * n11 - n21 * n12) * detInv;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.transpose = function transpose() {\n\t\t\tvar tmp;\n\t\t\tvar m = this.elements;\n\t\t\ttmp = m[1];\n\t\t\tm[1] = m[3];\n\t\t\tm[3] = tmp;\n\t\t\ttmp = m[2];\n\t\t\tm[2] = m[6];\n\t\t\tm[6] = tmp;\n\t\t\ttmp = m[5];\n\t\t\tm[5] = m[7];\n\t\t\tm[7] = tmp;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getNormalMatrix = function getNormalMatrix(matrix4) {\n\t\t\treturn this.setFromMatrix4(matrix4).copy(this).invert().transpose();\n\t\t};\n\n\t\t_proto.transposeIntoArray = function transposeIntoArray(r) {\n\t\t\tvar m = this.elements;\n\t\t\tr[0] = m[0];\n\t\t\tr[1] = m[3];\n\t\t\tr[2] = m[6];\n\t\t\tr[3] = m[1];\n\t\t\tr[4] = m[4];\n\t\t\tr[5] = m[7];\n\t\t\tr[6] = m[2];\n\t\t\tr[7] = m[5];\n\t\t\tr[8] = m[8];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setUvTransform = function setUvTransform(tx, ty, sx, sy, rotation, cx, cy) {\n\t\t\tvar c = Math.cos(rotation);\n\t\t\tvar s = Math.sin(rotation);\n\t\t\tthis.set(sx * c, sx * s, -sx * (c * cx + s * cy) + cx + tx, -sy * s, sy * c, -sy * (-s * cx + c * cy) + cy + ty, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.scale = function scale(sx, sy) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] *= sx;\n\t\t\tte[3] *= sx;\n\t\t\tte[6] *= sx;\n\t\t\tte[1] *= sy;\n\t\t\tte[4] *= sy;\n\t\t\tte[7] *= sy;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.rotate = function rotate(theta) {\n\t\t\tvar c = Math.cos(theta);\n\t\t\tvar s = Math.sin(theta);\n\t\t\tvar te = this.elements;\n\t\t\tvar a11 = te[0],\n\t\t\t\t\ta12 = te[3],\n\t\t\t\t\ta13 = te[6];\n\t\t\tvar a21 = te[1],\n\t\t\t\t\ta22 = te[4],\n\t\t\t\t\ta23 = te[7];\n\t\t\tte[0] = c * a11 + s * a21;\n\t\t\tte[3] = c * a12 + s * a22;\n\t\t\tte[6] = c * a13 + s * a23;\n\t\t\tte[1] = -s * a11 + c * a21;\n\t\t\tte[4] = -s * a12 + c * a22;\n\t\t\tte[7] = -s * a13 + c * a23;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(tx, ty) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] += tx * te[2];\n\t\t\tte[3] += tx * te[5];\n\t\t\tte[6] += tx * te[8];\n\t\t\tte[1] += ty * te[2];\n\t\t\tte[4] += ty * te[5];\n\t\t\tte[7] += ty * te[8];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(matrix) {\n\t\t\tvar te = this.elements;\n\t\t\tvar me = matrix.elements;\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tif (te[i] !== me[i]) return false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.elements[i] = array[i + offset];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tvar te = this.elements;\n\t\t\tarray[offset] = te[0];\n\t\t\tarray[offset + 1] = te[1];\n\t\t\tarray[offset + 2] = te[2];\n\t\t\tarray[offset + 3] = te[3];\n\t\t\tarray[offset + 4] = te[4];\n\t\t\tarray[offset + 5] = te[5];\n\t\t\tarray[offset + 6] = te[6];\n\t\t\tarray[offset + 7] = te[7];\n\t\t\tarray[offset + 8] = te[8];\n\t\t\treturn array;\n\t\t};\n\n\t\treturn Matrix3;\n\t}();\n\n\tvar _canvas;\n\n\tvar ImageUtils = {\n\t\tgetDataURL: function getDataURL(image) {\n\t\t\tif (/^data:/i.test(image.src)) {\n\t\t\t\treturn image.src;\n\t\t\t}\n\n\t\t\tif (typeof HTMLCanvasElement == 'undefined') {\n\t\t\t\treturn image.src;\n\t\t\t}\n\n\t\t\tvar canvas;\n\n\t\t\tif (image instanceof HTMLCanvasElement) {\n\t\t\t\tcanvas = image;\n\t\t\t} else {\n\t\t\t\tif (_canvas === undefined) _canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');\n\t\t\t\t_canvas.width = image.width;\n\t\t\t\t_canvas.height = image.height;\n\n\t\t\t\tvar context = _canvas.getContext('2d');\n\n\t\t\t\tif (image instanceof ImageData) {\n\t\t\t\t\tcontext.putImageData(image, 0, 0);\n\t\t\t\t} else {\n\t\t\t\t\tcontext.drawImage(image, 0, 0, image.width, image.height);\n\t\t\t\t}\n\n\t\t\t\tcanvas = _canvas;\n\t\t\t}\n\n\t\t\tif (canvas.width > 2048 || canvas.height > 2048) {\n\t\t\t\treturn canvas.toDataURL('image/jpeg', 0.6);\n\t\t\t} else {\n\t\t\t\treturn canvas.toDataURL('image/png');\n\t\t\t}\n\t\t}\n\t};\n\n\tvar textureId = 0;\n\n\tfunction Texture(image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding) {\n\t\tif (image === void 0) {\n\t\t\timage = Texture.DEFAULT_IMAGE;\n\t\t}\n\n\t\tif (mapping === void 0) {\n\t\t\tmapping = Texture.DEFAULT_MAPPING;\n\t\t}\n\n\t\tif (wrapS === void 0) {\n\t\t\twrapS = ClampToEdgeWrapping;\n\t\t}\n\n\t\tif (wrapT === void 0) {\n\t\t\twrapT = ClampToEdgeWrapping;\n\t\t}\n\n\t\tif (magFilter === void 0) {\n\t\t\tmagFilter = LinearFilter;\n\t\t}\n\n\t\tif (minFilter === void 0) {\n\t\t\tminFilter = LinearMipmapLinearFilter;\n\t\t}\n\n\t\tif (format === void 0) {\n\t\t\tformat = RGBAFormat;\n\t\t}\n\n\t\tif (type === void 0) {\n\t\t\ttype = UnsignedByteType;\n\t\t}\n\n\t\tif (anisotropy === void 0) {\n\t\t\tanisotropy = 1;\n\t\t}\n\n\t\tif (encoding === void 0) {\n\t\t\tencoding = LinearEncoding;\n\t\t}\n\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tvalue: textureId++\n\t\t});\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.name = '';\n\t\tthis.image = image;\n\t\tthis.mipmaps = [];\n\t\tthis.mapping = mapping;\n\t\tthis.wrapS = wrapS;\n\t\tthis.wrapT = wrapT;\n\t\tthis.magFilter = magFilter;\n\t\tthis.minFilter = minFilter;\n\t\tthis.anisotropy = anisotropy;\n\t\tthis.format = format;\n\t\tthis.internalFormat = null;\n\t\tthis.type = type;\n\t\tthis.offset = new Vector2(0, 0);\n\t\tthis.repeat = new Vector2(1, 1);\n\t\tthis.center = new Vector2(0, 0);\n\t\tthis.rotation = 0;\n\t\tthis.matrixAutoUpdate = true;\n\t\tthis.matrix = new Matrix3();\n\t\tthis.generateMipmaps = true;\n\t\tthis.premultiplyAlpha = false;\n\t\tthis.flipY = true;\n\t\tthis.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)\n\t\t// Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap.\n\t\t//\n\t\t// Also changing the encoding after already used by a Material will not automatically make the Material\n\t\t// update. You need to explicitly call Material.needsUpdate to trigger it to recompile.\n\n\t\tthis.encoding = encoding;\n\t\tthis.version = 0;\n\t\tthis.onUpdate = null;\n\t}\n\n\tTexture.DEFAULT_IMAGE = undefined;\n\tTexture.DEFAULT_MAPPING = UVMapping;\n\tTexture.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: Texture,\n\t\tisTexture: true,\n\t\tupdateMatrix: function updateMatrix() {\n\t\t\tthis.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y);\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.name = source.name;\n\t\t\tthis.image = source.image;\n\t\t\tthis.mipmaps = source.mipmaps.slice(0);\n\t\t\tthis.mapping = source.mapping;\n\t\t\tthis.wrapS = source.wrapS;\n\t\t\tthis.wrapT = source.wrapT;\n\t\t\tthis.magFilter = source.magFilter;\n\t\t\tthis.minFilter = source.minFilter;\n\t\t\tthis.anisotropy = source.anisotropy;\n\t\t\tthis.format = source.format;\n\t\t\tthis.internalFormat = source.internalFormat;\n\t\t\tthis.type = source.type;\n\t\t\tthis.offset.copy(source.offset);\n\t\t\tthis.repeat.copy(source.repeat);\n\t\t\tthis.center.copy(source.center);\n\t\t\tthis.rotation = source.rotation;\n\t\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\t\tthis.matrix.copy(source.matrix);\n\t\t\tthis.generateMipmaps = source.generateMipmaps;\n\t\t\tthis.premultiplyAlpha = source.premultiplyAlpha;\n\t\t\tthis.flipY = source.flipY;\n\t\t\tthis.unpackAlignment = source.unpackAlignment;\n\t\t\tthis.encoding = source.encoding;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar isRootObject = meta === undefined || typeof meta === 'string';\n\n\t\t\tif (!isRootObject && meta.textures[this.uuid] !== undefined) {\n\t\t\t\treturn meta.textures[this.uuid];\n\t\t\t}\n\n\t\t\tvar output = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Texture',\n\t\t\t\t\tgenerator: 'Texture.toJSON'\n\t\t\t\t},\n\t\t\t\tuuid: this.uuid,\n\t\t\t\tname: this.name,\n\t\t\t\tmapping: this.mapping,\n\t\t\t\trepeat: [this.repeat.x, this.repeat.y],\n\t\t\t\toffset: [this.offset.x, this.offset.y],\n\t\t\t\tcenter: [this.center.x, this.center.y],\n\t\t\t\trotation: this.rotation,\n\t\t\t\twrap: [this.wrapS, this.wrapT],\n\t\t\t\tformat: this.format,\n\t\t\t\ttype: this.type,\n\t\t\t\tencoding: this.encoding,\n\t\t\t\tminFilter: this.minFilter,\n\t\t\t\tmagFilter: this.magFilter,\n\t\t\t\tanisotropy: this.anisotropy,\n\t\t\t\tflipY: this.flipY,\n\t\t\t\tpremultiplyAlpha: this.premultiplyAlpha,\n\t\t\t\tunpackAlignment: this.unpackAlignment\n\t\t\t};\n\n\t\t\tif (this.image !== undefined) {\n\t\t\t\t// TODO: Move to THREE.Image\n\t\t\t\tvar image = this.image;\n\n\t\t\t\tif (image.uuid === undefined) {\n\t\t\t\t\timage.uuid = MathUtils.generateUUID(); // UGH\n\t\t\t\t}\n\n\t\t\t\tif (!isRootObject && meta.images[image.uuid] === undefined) {\n\t\t\t\t\tvar url;\n\n\t\t\t\t\tif (Array.isArray(image)) {\n\t\t\t\t\t\t// process array of images e.g. CubeTexture\n\t\t\t\t\t\turl = [];\n\n\t\t\t\t\t\tfor (var i = 0, l = image.length; i < l; i++) {\n\t\t\t\t\t\t\t// check cube texture with data textures\n\t\t\t\t\t\t\tif (image[i].isDataTexture) {\n\t\t\t\t\t\t\t\turl.push(serializeImage(image[i].image));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\turl.push(serializeImage(image[i]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// process single image\n\t\t\t\t\t\turl = serializeImage(image);\n\t\t\t\t\t}\n\n\t\t\t\t\tmeta.images[image.uuid] = {\n\t\t\t\t\t\tuuid: image.uuid,\n\t\t\t\t\t\turl: url\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\toutput.image = image.uuid;\n\t\t\t}\n\n\t\t\tif (!isRootObject) {\n\t\t\t\tmeta.textures[this.uuid] = output;\n\t\t\t}\n\n\t\t\treturn output;\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t},\n\t\ttransformUv: function transformUv(uv) {\n\t\t\tif (this.mapping !== UVMapping) return uv;\n\t\t\tuv.applyMatrix3(this.matrix);\n\n\t\t\tif (uv.x < 0 || uv.x > 1) {\n\t\t\t\tswitch (this.wrapS) {\n\t\t\t\t\tcase RepeatWrapping:\n\t\t\t\t\t\tuv.x = uv.x - Math.floor(uv.x);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ClampToEdgeWrapping:\n\t\t\t\t\t\tuv.x = uv.x < 0 ? 0 : 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase MirroredRepeatWrapping:\n\t\t\t\t\t\tif (Math.abs(Math.floor(uv.x) % 2) === 1) {\n\t\t\t\t\t\t\tuv.x = Math.ceil(uv.x) - uv.x;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tuv.x = uv.x - Math.floor(uv.x);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (uv.y < 0 || uv.y > 1) {\n\t\t\t\tswitch (this.wrapT) {\n\t\t\t\t\tcase RepeatWrapping:\n\t\t\t\t\t\tuv.y = uv.y - Math.floor(uv.y);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ClampToEdgeWrapping:\n\t\t\t\t\t\tuv.y = uv.y < 0 ? 0 : 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase MirroredRepeatWrapping:\n\t\t\t\t\t\tif (Math.abs(Math.floor(uv.y) % 2) === 1) {\n\t\t\t\t\t\t\tuv.y = Math.ceil(uv.y) - uv.y;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tuv.y = uv.y - Math.floor(uv.y);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.flipY) {\n\t\t\t\tuv.y = 1 - uv.y;\n\t\t\t}\n\n\t\t\treturn uv;\n\t\t}\n\t});\n\tObject.defineProperty(Texture.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\n\tfunction serializeImage(image) {\n\t\tif (typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement || typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap) {\n\t\t\t// default images\n\t\t\treturn ImageUtils.getDataURL(image);\n\t\t} else {\n\t\t\tif (image.data) {\n\t\t\t\t// images of DataTexture\n\t\t\t\treturn {\n\t\t\t\t\tdata: Array.prototype.slice.call(image.data),\n\t\t\t\t\twidth: image.width,\n\t\t\t\t\theight: image.height,\n\t\t\t\t\ttype: image.data.constructor.name\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconsole.warn('THREE.Texture: Unable to serialize Texture.');\n\t\t\t\treturn {};\n\t\t\t}\n\t\t}\n\t}\n\n\tvar Vector4 = /*#__PURE__*/function () {\n\t\tfunction Vector4(x, y, z, w) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tif (z === void 0) {\n\t\t\t\tz = 0;\n\t\t\t}\n\n\t\t\tif (w === void 0) {\n\t\t\t\tw = 1;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isVector4', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.z = z;\n\t\t\tthis.w = w;\n\t\t}\n\n\t\tvar _proto = Vector4.prototype;\n\n\t\t_proto.set = function set(x, y, z, w) {\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.z = z;\n\t\t\tthis.w = w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setScalar = function setScalar(scalar) {\n\t\t\tthis.x = scalar;\n\t\t\tthis.y = scalar;\n\t\t\tthis.z = scalar;\n\t\t\tthis.w = scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setX = function setX(x) {\n\t\t\tthis.x = x;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setY = function setY(y) {\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setZ = function setZ(z) {\n\t\t\tthis.z = z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setW = function setW(w) {\n\t\t\tthis.w = w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setComponent = function setComponent(index, value) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.x = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.y = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.z = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.w = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getComponent = function getComponent(index) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\treturn this.x;\n\n\t\t\t\tcase 1:\n\t\t\t\t\treturn this.y;\n\n\t\t\t\tcase 2:\n\t\t\t\t\treturn this.z;\n\n\t\t\t\tcase 3:\n\t\t\t\t\treturn this.w;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this.x, this.y, this.z, this.w);\n\t\t};\n\n\t\t_proto.copy = function copy(v) {\n\t\t\tthis.x = v.x;\n\t\t\tthis.y = v.y;\n\t\t\tthis.z = v.z;\n\t\t\tthis.w = v.w !== undefined ? v.w : 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.add = function add(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');\n\t\t\t\treturn this.addVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x += v.x;\n\t\t\tthis.y += v.y;\n\t\t\tthis.z += v.z;\n\t\t\tthis.w += v.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScalar = function addScalar(s) {\n\t\t\tthis.x += s;\n\t\t\tthis.y += s;\n\t\t\tthis.z += s;\n\t\t\tthis.w += s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addVectors = function addVectors(a, b) {\n\t\t\tthis.x = a.x + b.x;\n\t\t\tthis.y = a.y + b.y;\n\t\t\tthis.z = a.z + b.z;\n\t\t\tthis.w = a.w + b.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScaledVector = function addScaledVector(v, s) {\n\t\t\tthis.x += v.x * s;\n\t\t\tthis.y += v.y * s;\n\t\t\tthis.z += v.z * s;\n\t\t\tthis.w += v.w * s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.sub = function sub(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');\n\t\t\t\treturn this.subVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x -= v.x;\n\t\t\tthis.y -= v.y;\n\t\t\tthis.z -= v.z;\n\t\t\tthis.w -= v.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subScalar = function subScalar(s) {\n\t\t\tthis.x -= s;\n\t\t\tthis.y -= s;\n\t\t\tthis.z -= s;\n\t\t\tthis.w -= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subVectors = function subVectors(a, b) {\n\t\t\tthis.x = a.x - b.x;\n\t\t\tthis.y = a.y - b.y;\n\t\t\tthis.z = a.z - b.z;\n\t\t\tthis.w = a.w - b.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(v) {\n\t\t\tthis.x *= v.x;\n\t\t\tthis.y *= v.y;\n\t\t\tthis.z *= v.z;\n\t\t\tthis.w *= v.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(scalar) {\n\t\t\tthis.x *= scalar;\n\t\t\tthis.y *= scalar;\n\t\t\tthis.z *= scalar;\n\t\t\tthis.w *= scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(m) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z,\n\t\t\t\t\tw = this.w;\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[0] * x + e[4] * y + e[8] * z + e[12] * w;\n\t\t\tthis.y = e[1] * x + e[5] * y + e[9] * z + e[13] * w;\n\t\t\tthis.z = e[2] * x + e[6] * y + e[10] * z + e[14] * w;\n\t\t\tthis.w = e[3] * x + e[7] * y + e[11] * z + e[15] * w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.divideScalar = function divideScalar(scalar) {\n\t\t\treturn this.multiplyScalar(1 / scalar);\n\t\t};\n\n\t\t_proto.setAxisAngleFromQuaternion = function setAxisAngleFromQuaternion(q) {\n\t\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm\n\t\t\t// q is assumed to be normalized\n\t\t\tthis.w = 2 * Math.acos(q.w);\n\t\t\tvar s = Math.sqrt(1 - q.w * q.w);\n\n\t\t\tif (s < 0.0001) {\n\t\t\t\tthis.x = 1;\n\t\t\t\tthis.y = 0;\n\t\t\t\tthis.z = 0;\n\t\t\t} else {\n\t\t\t\tthis.x = q.x / s;\n\t\t\t\tthis.y = q.y / s;\n\t\t\t\tthis.z = q.z / s;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setAxisAngleFromRotationMatrix = function setAxisAngleFromRotationMatrix(m) {\n\t\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm\n\t\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\t\t\tvar angle, x, y, z; // variables for result\n\n\t\t\tvar epsilon = 0.01,\n\t\t\t\t\t// margin to allow for rounding errors\n\t\t\tepsilon2 = 0.1,\n\t\t\t\t\t// margin to distinguish between 0 and 180 degrees\n\t\t\tte = m.elements,\n\t\t\t\t\tm11 = te[0],\n\t\t\t\t\tm12 = te[4],\n\t\t\t\t\tm13 = te[8],\n\t\t\t\t\tm21 = te[1],\n\t\t\t\t\tm22 = te[5],\n\t\t\t\t\tm23 = te[9],\n\t\t\t\t\tm31 = te[2],\n\t\t\t\t\tm32 = te[6],\n\t\t\t\t\tm33 = te[10];\n\n\t\t\tif (Math.abs(m12 - m21) < epsilon && Math.abs(m13 - m31) < epsilon && Math.abs(m23 - m32) < epsilon) {\n\t\t\t\t// singularity found\n\t\t\t\t// first check for identity matrix which must have +1 for all terms\n\t\t\t\t// in leading diagonal and zero in other terms\n\t\t\t\tif (Math.abs(m12 + m21) < epsilon2 && Math.abs(m13 + m31) < epsilon2 && Math.abs(m23 + m32) < epsilon2 && Math.abs(m11 + m22 + m33 - 3) < epsilon2) {\n\t\t\t\t\t// this singularity is identity matrix so angle = 0\n\t\t\t\t\tthis.set(1, 0, 0, 0);\n\t\t\t\t\treturn this; // zero angle, arbitrary axis\n\t\t\t\t} // otherwise this singularity is angle = 180\n\n\n\t\t\t\tangle = Math.PI;\n\t\t\t\tvar xx = (m11 + 1) / 2;\n\t\t\t\tvar yy = (m22 + 1) / 2;\n\t\t\t\tvar zz = (m33 + 1) / 2;\n\t\t\t\tvar xy = (m12 + m21) / 4;\n\t\t\t\tvar xz = (m13 + m31) / 4;\n\t\t\t\tvar yz = (m23 + m32) / 4;\n\n\t\t\t\tif (xx > yy && xx > zz) {\n\t\t\t\t\t// m11 is the largest diagonal term\n\t\t\t\t\tif (xx < epsilon) {\n\t\t\t\t\t\tx = 0;\n\t\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\t\tz = 0.707106781;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tx = Math.sqrt(xx);\n\t\t\t\t\t\ty = xy / x;\n\t\t\t\t\t\tz = xz / x;\n\t\t\t\t\t}\n\t\t\t\t} else if (yy > zz) {\n\t\t\t\t\t// m22 is the largest diagonal term\n\t\t\t\t\tif (yy < epsilon) {\n\t\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\t\ty = 0;\n\t\t\t\t\t\tz = 0.707106781;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ty = Math.sqrt(yy);\n\t\t\t\t\t\tx = xy / y;\n\t\t\t\t\t\tz = yz / y;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// m33 is the largest diagonal term so base result on this\n\t\t\t\t\tif (zz < epsilon) {\n\t\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\t\tz = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tz = Math.sqrt(zz);\n\t\t\t\t\t\tx = xz / z;\n\t\t\t\t\t\ty = yz / z;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.set(x, y, z, angle);\n\t\t\t\treturn this; // return 180 deg rotation\n\t\t\t} // as we have reached here there are no singularities so we can handle normally\n\n\n\t\t\tvar s = Math.sqrt((m32 - m23) * (m32 - m23) + (m13 - m31) * (m13 - m31) + (m21 - m12) * (m21 - m12)); // used to normalize\n\n\t\t\tif (Math.abs(s) < 0.001) s = 1; // prevent divide by zero, should not happen if matrix is orthogonal and should be\n\t\t\t// caught by singularity test above, but I've left it in just in case\n\n\t\t\tthis.x = (m32 - m23) / s;\n\t\t\tthis.y = (m13 - m31) / s;\n\t\t\tthis.z = (m21 - m12) / s;\n\t\t\tthis.w = Math.acos((m11 + m22 + m33 - 1) / 2);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.min = function min(v) {\n\t\t\tthis.x = Math.min(this.x, v.x);\n\t\t\tthis.y = Math.min(this.y, v.y);\n\t\t\tthis.z = Math.min(this.z, v.z);\n\t\t\tthis.w = Math.min(this.w, v.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.max = function max(v) {\n\t\t\tthis.x = Math.max(this.x, v.x);\n\t\t\tthis.y = Math.max(this.y, v.y);\n\t\t\tthis.z = Math.max(this.z, v.z);\n\t\t\tthis.w = Math.max(this.w, v.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clamp = function clamp(min, max) {\n\t\t\t// assumes min < max, componentwise\n\t\t\tthis.x = Math.max(min.x, Math.min(max.x, this.x));\n\t\t\tthis.y = Math.max(min.y, Math.min(max.y, this.y));\n\t\t\tthis.z = Math.max(min.z, Math.min(max.z, this.z));\n\t\t\tthis.w = Math.max(min.w, Math.min(max.w, this.w));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampScalar = function clampScalar(minVal, maxVal) {\n\t\t\tthis.x = Math.max(minVal, Math.min(maxVal, this.x));\n\t\t\tthis.y = Math.max(minVal, Math.min(maxVal, this.y));\n\t\t\tthis.z = Math.max(minVal, Math.min(maxVal, this.z));\n\t\t\tthis.w = Math.max(minVal, Math.min(maxVal, this.w));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampLength = function clampLength(min, max) {\n\t\t\tvar length = this.length();\n\t\t\treturn this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n\t\t};\n\n\t\t_proto.floor = function floor() {\n\t\t\tthis.x = Math.floor(this.x);\n\t\t\tthis.y = Math.floor(this.y);\n\t\t\tthis.z = Math.floor(this.z);\n\t\t\tthis.w = Math.floor(this.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.ceil = function ceil() {\n\t\t\tthis.x = Math.ceil(this.x);\n\t\t\tthis.y = Math.ceil(this.y);\n\t\t\tthis.z = Math.ceil(this.z);\n\t\t\tthis.w = Math.ceil(this.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.round = function round() {\n\t\t\tthis.x = Math.round(this.x);\n\t\t\tthis.y = Math.round(this.y);\n\t\t\tthis.z = Math.round(this.z);\n\t\t\tthis.w = Math.round(this.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.roundToZero = function roundToZero() {\n\t\t\tthis.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n\t\t\tthis.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n\t\t\tthis.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z);\n\t\t\tthis.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.negate = function negate() {\n\t\t\tthis.x = -this.x;\n\t\t\tthis.y = -this.y;\n\t\t\tthis.z = -this.z;\n\t\t\tthis.w = -this.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dot = function dot(v) {\n\t\t\treturn this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n\t\t};\n\n\t\t_proto.lengthSq = function lengthSq() {\n\t\t\treturn this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n\t\t};\n\n\t\t_proto.length = function length() {\n\t\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n\t\t};\n\n\t\t_proto.manhattanLength = function manhattanLength() {\n\t\t\treturn Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w);\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\treturn this.divideScalar(this.length() || 1);\n\t\t};\n\n\t\t_proto.setLength = function setLength(length) {\n\t\t\treturn this.normalize().multiplyScalar(length);\n\t\t};\n\n\t\t_proto.lerp = function lerp(v, alpha) {\n\t\t\tthis.x += (v.x - this.x) * alpha;\n\t\t\tthis.y += (v.y - this.y) * alpha;\n\t\t\tthis.z += (v.z - this.z) * alpha;\n\t\t\tthis.w += (v.w - this.w) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpVectors = function lerpVectors(v1, v2, alpha) {\n\t\t\tthis.x = v1.x + (v2.x - v1.x) * alpha;\n\t\t\tthis.y = v1.y + (v2.y - v1.y) * alpha;\n\t\t\tthis.z = v1.z + (v2.z - v1.z) * alpha;\n\t\t\tthis.w = v1.w + (v2.w - v1.w) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(v) {\n\t\t\treturn v.x === this.x && v.y === this.y && v.z === this.z && v.w === this.w;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.x = array[offset];\n\t\t\tthis.y = array[offset + 1];\n\t\t\tthis.z = array[offset + 2];\n\t\t\tthis.w = array[offset + 3];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this.x;\n\t\t\tarray[offset + 1] = this.y;\n\t\t\tarray[offset + 2] = this.z;\n\t\t\tarray[offset + 3] = this.w;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index, offset) {\n\t\t\tif (offset !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector4: offset has been removed from .fromBufferAttribute().');\n\t\t\t}\n\n\t\t\tthis.x = attribute.getX(index);\n\t\t\tthis.y = attribute.getY(index);\n\t\t\tthis.z = attribute.getZ(index);\n\t\t\tthis.w = attribute.getW(index);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.random = function random() {\n\t\t\tthis.x = Math.random();\n\t\t\tthis.y = Math.random();\n\t\t\tthis.z = Math.random();\n\t\t\tthis.w = Math.random();\n\t\t\treturn this;\n\t\t};\n\n\t\t_createClass(Vector4, [{\n\t\t\tkey: \"width\",\n\t\t\tget: function get() {\n\t\t\t\treturn this.z;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis.z = value;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"height\",\n\t\t\tget: function get() {\n\t\t\t\treturn this.w;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis.w = value;\n\t\t\t}\n\t\t}]);\n\n\t\treturn Vector4;\n\t}();\n\n\t/*\n\t In options, we can specify:\n\t * Texture parameters for an auto-generated target texture\n\t * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers\n\t*/\n\n\tvar WebGLRenderTarget = /*#__PURE__*/function (_EventDispatcher) {\n\t\t_inheritsLoose(WebGLRenderTarget, _EventDispatcher);\n\n\t\tfunction WebGLRenderTarget(width, height, options) {\n\t\t\tvar _this;\n\n\t\t\t_this = _EventDispatcher.call(this) || this;\n\t\t\tObject.defineProperty(_assertThisInitialized(_this), 'isWebGLRenderTarget', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\t_this.width = width;\n\t\t\t_this.height = height;\n\t\t\t_this.scissor = new Vector4(0, 0, width, height);\n\t\t\t_this.scissorTest = false;\n\t\t\t_this.viewport = new Vector4(0, 0, width, height);\n\t\t\toptions = options || {};\n\t\t\t_this.texture = new Texture(undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding);\n\t\t\t_this.texture.image = {};\n\t\t\t_this.texture.image.width = width;\n\t\t\t_this.texture.image.height = height;\n\t\t\t_this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\t\t_this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\t\t\t_this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;\n\t\t\t_this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false;\n\t\t\t_this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = WebGLRenderTarget.prototype;\n\n\t\t_proto.setSize = function setSize(width, height) {\n\t\t\tif (this.width !== width || this.height !== height) {\n\t\t\t\tthis.width = width;\n\t\t\t\tthis.height = height;\n\t\t\t\tthis.texture.image.width = width;\n\t\t\t\tthis.texture.image.height = height;\n\t\t\t\tthis.dispose();\n\t\t\t}\n\n\t\t\tthis.viewport.set(0, 0, width, height);\n\t\t\tthis.scissor.set(0, 0, width, height);\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(source) {\n\t\t\tthis.width = source.width;\n\t\t\tthis.height = source.height;\n\t\t\tthis.viewport.copy(source.viewport);\n\t\t\tthis.texture = source.texture.clone();\n\t\t\tthis.depthBuffer = source.depthBuffer;\n\t\t\tthis.stencilBuffer = source.stencilBuffer;\n\t\t\tthis.depthTexture = source.depthTexture;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t};\n\n\t\treturn WebGLRenderTarget;\n\t}(EventDispatcher);\n\n\tvar WebGLMultisampleRenderTarget = /*#__PURE__*/function (_WebGLRenderTarget) {\n\t\t_inheritsLoose(WebGLMultisampleRenderTarget, _WebGLRenderTarget);\n\n\t\tfunction WebGLMultisampleRenderTarget(width, height, options) {\n\t\t\tvar _this;\n\n\t\t\t_this = _WebGLRenderTarget.call(this, width, height, options) || this;\n\t\t\tObject.defineProperty(_assertThisInitialized(_this), 'isWebGLMultisampleRenderTarget', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\t_this.samples = 4;\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = WebGLMultisampleRenderTarget.prototype;\n\n\t\t_proto.copy = function copy(source) {\n\t\t\t_WebGLRenderTarget.prototype.copy.call(this, source);\n\n\t\t\tthis.samples = source.samples;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn WebGLMultisampleRenderTarget;\n\t}(WebGLRenderTarget);\n\n\tvar Quaternion = /*#__PURE__*/function () {\n\t\tfunction Quaternion(x, y, z, w) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tif (z === void 0) {\n\t\t\t\tz = 0;\n\t\t\t}\n\n\t\t\tif (w === void 0) {\n\t\t\t\tw = 1;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isQuaternion', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\t\t\tthis._w = w;\n\t\t}\n\n\t\tQuaternion.slerp = function slerp(qa, qb, qm, t) {\n\t\t\treturn qm.copy(qa).slerp(qb, t);\n\t\t};\n\n\t\tQuaternion.slerpFlat = function slerpFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) {\n\t\t\t// fuzz-free, array-based Quaternion SLERP operation\n\t\t\tvar x0 = src0[srcOffset0 + 0],\n\t\t\t\t\ty0 = src0[srcOffset0 + 1],\n\t\t\t\t\tz0 = src0[srcOffset0 + 2],\n\t\t\t\t\tw0 = src0[srcOffset0 + 3];\n\t\t\tvar x1 = src1[srcOffset1 + 0],\n\t\t\t\t\ty1 = src1[srcOffset1 + 1],\n\t\t\t\t\tz1 = src1[srcOffset1 + 2],\n\t\t\t\t\tw1 = src1[srcOffset1 + 3];\n\n\t\t\tif (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) {\n\t\t\t\tvar s = 1 - t;\n\t\t\t\tvar cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,\n\t\t\t\t\t\tdir = cos >= 0 ? 1 : -1,\n\t\t\t\t\t\tsqrSin = 1 - cos * cos; // Skip the Slerp for tiny steps to avoid numeric problems:\n\n\t\t\t\tif (sqrSin > Number.EPSILON) {\n\t\t\t\t\tvar sin = Math.sqrt(sqrSin),\n\t\t\t\t\t\t\tlen = Math.atan2(sin, cos * dir);\n\t\t\t\t\ts = Math.sin(s * len) / sin;\n\t\t\t\t\tt = Math.sin(t * len) / sin;\n\t\t\t\t}\n\n\t\t\t\tvar tDir = t * dir;\n\t\t\t\tx0 = x0 * s + x1 * tDir;\n\t\t\t\ty0 = y0 * s + y1 * tDir;\n\t\t\t\tz0 = z0 * s + z1 * tDir;\n\t\t\t\tw0 = w0 * s + w1 * tDir; // Normalize in case we just did a lerp:\n\n\t\t\t\tif (s === 1 - t) {\n\t\t\t\t\tvar f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0);\n\t\t\t\t\tx0 *= f;\n\t\t\t\t\ty0 *= f;\n\t\t\t\t\tz0 *= f;\n\t\t\t\t\tw0 *= f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdst[dstOffset] = x0;\n\t\t\tdst[dstOffset + 1] = y0;\n\t\t\tdst[dstOffset + 2] = z0;\n\t\t\tdst[dstOffset + 3] = w0;\n\t\t};\n\n\t\tQuaternion.multiplyQuaternionsFlat = function multiplyQuaternionsFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1) {\n\t\t\tvar x0 = src0[srcOffset0];\n\t\t\tvar y0 = src0[srcOffset0 + 1];\n\t\t\tvar z0 = src0[srcOffset0 + 2];\n\t\t\tvar w0 = src0[srcOffset0 + 3];\n\t\t\tvar x1 = src1[srcOffset1];\n\t\t\tvar y1 = src1[srcOffset1 + 1];\n\t\t\tvar z1 = src1[srcOffset1 + 2];\n\t\t\tvar w1 = src1[srcOffset1 + 3];\n\t\t\tdst[dstOffset] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1;\n\t\t\tdst[dstOffset + 1] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1;\n\t\t\tdst[dstOffset + 2] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1;\n\t\t\tdst[dstOffset + 3] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1;\n\t\t\treturn dst;\n\t\t};\n\n\t\tvar _proto = Quaternion.prototype;\n\n\t\t_proto.set = function set(x, y, z, w) {\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\t\t\tthis._w = w;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this._x, this._y, this._z, this._w);\n\t\t};\n\n\t\t_proto.copy = function copy(quaternion) {\n\t\t\tthis._x = quaternion.x;\n\t\t\tthis._y = quaternion.y;\n\t\t\tthis._z = quaternion.z;\n\t\t\tthis._w = quaternion.w;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromEuler = function setFromEuler(euler, update) {\n\t\t\tif (!(euler && euler.isEuler)) {\n\t\t\t\tthrow new Error('THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.');\n\t\t\t}\n\n\t\t\tvar x = euler._x,\n\t\t\t\t\ty = euler._y,\n\t\t\t\t\tz = euler._z,\n\t\t\t\t\torder = euler._order; // http://www.mathworks.com/matlabcentral/fileexchange/\n\t\t\t// \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n\t\t\t//\tcontent/SpinCalc.m\n\n\t\t\tvar cos = Math.cos;\n\t\t\tvar sin = Math.sin;\n\t\t\tvar c1 = cos(x / 2);\n\t\t\tvar c2 = cos(y / 2);\n\t\t\tvar c3 = cos(z / 2);\n\t\t\tvar s1 = sin(x / 2);\n\t\t\tvar s2 = sin(y / 2);\n\t\t\tvar s3 = sin(z / 2);\n\n\t\t\tswitch (order) {\n\t\t\t\tcase 'XYZ':\n\t\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YXZ':\n\t\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZXY':\n\t\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZYX':\n\t\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YZX':\n\t\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'XZY':\n\t\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.warn('THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order);\n\t\t\t}\n\n\t\t\tif (update !== false) this._onChangeCallback();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromAxisAngle = function setFromAxisAngle(axis, angle) {\n\t\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm\n\t\t\t// assumes axis is normalized\n\t\t\tvar halfAngle = angle / 2,\n\t\t\t\t\ts = Math.sin(halfAngle);\n\t\t\tthis._x = axis.x * s;\n\t\t\tthis._y = axis.y * s;\n\t\t\tthis._z = axis.z * s;\n\t\t\tthis._w = Math.cos(halfAngle);\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromRotationMatrix = function setFromRotationMatrix(m) {\n\t\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n\t\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\t\t\tvar te = m.elements,\n\t\t\t\t\tm11 = te[0],\n\t\t\t\t\tm12 = te[4],\n\t\t\t\t\tm13 = te[8],\n\t\t\t\t\tm21 = te[1],\n\t\t\t\t\tm22 = te[5],\n\t\t\t\t\tm23 = te[9],\n\t\t\t\t\tm31 = te[2],\n\t\t\t\t\tm32 = te[6],\n\t\t\t\t\tm33 = te[10],\n\t\t\t\t\ttrace = m11 + m22 + m33;\n\n\t\t\tif (trace > 0) {\n\t\t\t\tvar s = 0.5 / Math.sqrt(trace + 1.0);\n\t\t\t\tthis._w = 0.25 / s;\n\t\t\t\tthis._x = (m32 - m23) * s;\n\t\t\t\tthis._y = (m13 - m31) * s;\n\t\t\t\tthis._z = (m21 - m12) * s;\n\t\t\t} else if (m11 > m22 && m11 > m33) {\n\t\t\t\tvar _s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n\t\t\t\tthis._w = (m32 - m23) / _s;\n\t\t\t\tthis._x = 0.25 * _s;\n\t\t\t\tthis._y = (m12 + m21) / _s;\n\t\t\t\tthis._z = (m13 + m31) / _s;\n\t\t\t} else if (m22 > m33) {\n\t\t\t\tvar _s2 = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n\t\t\t\tthis._w = (m13 - m31) / _s2;\n\t\t\t\tthis._x = (m12 + m21) / _s2;\n\t\t\t\tthis._y = 0.25 * _s2;\n\t\t\t\tthis._z = (m23 + m32) / _s2;\n\t\t\t} else {\n\t\t\t\tvar _s3 = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n\t\t\t\tthis._w = (m21 - m12) / _s3;\n\t\t\t\tthis._x = (m13 + m31) / _s3;\n\t\t\t\tthis._y = (m23 + m32) / _s3;\n\t\t\t\tthis._z = 0.25 * _s3;\n\t\t\t}\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromUnitVectors = function setFromUnitVectors(vFrom, vTo) {\n\t\t\t// assumes direction vectors vFrom and vTo are normalized\n\t\t\tvar EPS = 0.000001;\n\t\t\tvar r = vFrom.dot(vTo) + 1;\n\n\t\t\tif (r < EPS) {\n\t\t\t\tr = 0;\n\n\t\t\t\tif (Math.abs(vFrom.x) > Math.abs(vFrom.z)) {\n\t\t\t\t\tthis._x = -vFrom.y;\n\t\t\t\t\tthis._y = vFrom.x;\n\t\t\t\t\tthis._z = 0;\n\t\t\t\t\tthis._w = r;\n\t\t\t\t} else {\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._y = -vFrom.z;\n\t\t\t\t\tthis._z = vFrom.y;\n\t\t\t\t\tthis._w = r;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3\n\t\t\t\tthis._x = vFrom.y * vTo.z - vFrom.z * vTo.y;\n\t\t\t\tthis._y = vFrom.z * vTo.x - vFrom.x * vTo.z;\n\t\t\t\tthis._z = vFrom.x * vTo.y - vFrom.y * vTo.x;\n\t\t\t\tthis._w = r;\n\t\t\t}\n\n\t\t\treturn this.normalize();\n\t\t};\n\n\t\t_proto.angleTo = function angleTo(q) {\n\t\t\treturn 2 * Math.acos(Math.abs(MathUtils.clamp(this.dot(q), -1, 1)));\n\t\t};\n\n\t\t_proto.rotateTowards = function rotateTowards(q, step) {\n\t\t\tvar angle = this.angleTo(q);\n\t\t\tif (angle === 0) return this;\n\t\t\tvar t = Math.min(1, step / angle);\n\t\t\tthis.slerp(q, t);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.identity = function identity() {\n\t\t\treturn this.set(0, 0, 0, 1);\n\t\t};\n\n\t\t_proto.invert = function invert() {\n\t\t\t// quaternion is assumed to have unit length\n\t\t\treturn this.conjugate();\n\t\t};\n\n\t\t_proto.conjugate = function conjugate() {\n\t\t\tthis._x *= -1;\n\t\t\tthis._y *= -1;\n\t\t\tthis._z *= -1;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dot = function dot(v) {\n\t\t\treturn this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;\n\t\t};\n\n\t\t_proto.lengthSq = function lengthSq() {\n\t\t\treturn this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n\t\t};\n\n\t\t_proto.length = function length() {\n\t\t\treturn Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\tvar l = this.length();\n\n\t\t\tif (l === 0) {\n\t\t\t\tthis._x = 0;\n\t\t\t\tthis._y = 0;\n\t\t\t\tthis._z = 0;\n\t\t\t\tthis._w = 1;\n\t\t\t} else {\n\t\t\t\tl = 1 / l;\n\t\t\t\tthis._x = this._x * l;\n\t\t\t\tthis._y = this._y * l;\n\t\t\t\tthis._z = this._z * l;\n\t\t\t\tthis._w = this._w * l;\n\t\t\t}\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(q, p) {\n\t\t\tif (p !== undefined) {\n\t\t\t\tconsole.warn('THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.');\n\t\t\t\treturn this.multiplyQuaternions(q, p);\n\t\t\t}\n\n\t\t\treturn this.multiplyQuaternions(this, q);\n\t\t};\n\n\t\t_proto.premultiply = function premultiply(q) {\n\t\t\treturn this.multiplyQuaternions(q, this);\n\t\t};\n\n\t\t_proto.multiplyQuaternions = function multiplyQuaternions(a, b) {\n\t\t\t// from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n\t\t\tvar qax = a._x,\n\t\t\t\t\tqay = a._y,\n\t\t\t\t\tqaz = a._z,\n\t\t\t\t\tqaw = a._w;\n\t\t\tvar qbx = b._x,\n\t\t\t\t\tqby = b._y,\n\t\t\t\t\tqbz = b._z,\n\t\t\t\t\tqbw = b._w;\n\t\t\tthis._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n\t\t\tthis._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n\t\t\tthis._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n\t\t\tthis._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.slerp = function slerp(qb, t) {\n\t\t\tif (t === 0) return this;\n\t\t\tif (t === 1) return this.copy(qb);\n\t\t\tvar x = this._x,\n\t\t\t\t\ty = this._y,\n\t\t\t\t\tz = this._z,\n\t\t\t\t\tw = this._w; // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/\n\n\t\t\tvar cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;\n\n\t\t\tif (cosHalfTheta < 0) {\n\t\t\t\tthis._w = -qb._w;\n\t\t\t\tthis._x = -qb._x;\n\t\t\t\tthis._y = -qb._y;\n\t\t\t\tthis._z = -qb._z;\n\t\t\t\tcosHalfTheta = -cosHalfTheta;\n\t\t\t} else {\n\t\t\t\tthis.copy(qb);\n\t\t\t}\n\n\t\t\tif (cosHalfTheta >= 1.0) {\n\t\t\t\tthis._w = w;\n\t\t\t\tthis._x = x;\n\t\t\t\tthis._y = y;\n\t\t\t\tthis._z = z;\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;\n\n\t\t\tif (sqrSinHalfTheta <= Number.EPSILON) {\n\t\t\t\tvar s = 1 - t;\n\t\t\t\tthis._w = s * w + t * this._w;\n\t\t\t\tthis._x = s * x + t * this._x;\n\t\t\t\tthis._y = s * y + t * this._y;\n\t\t\t\tthis._z = s * z + t * this._z;\n\t\t\t\tthis.normalize();\n\n\t\t\t\tthis._onChangeCallback();\n\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar sinHalfTheta = Math.sqrt(sqrSinHalfTheta);\n\t\t\tvar halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta);\n\t\t\tvar ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta,\n\t\t\t\t\tratioB = Math.sin(t * halfTheta) / sinHalfTheta;\n\t\t\tthis._w = w * ratioA + this._w * ratioB;\n\t\t\tthis._x = x * ratioA + this._x * ratioB;\n\t\t\tthis._y = y * ratioA + this._y * ratioB;\n\t\t\tthis._z = z * ratioA + this._z * ratioB;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(quaternion) {\n\t\t\treturn quaternion._x === this._x && quaternion._y === this._y && quaternion._z === this._z && quaternion._w === this._w;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis._x = array[offset];\n\t\t\tthis._y = array[offset + 1];\n\t\t\tthis._z = array[offset + 2];\n\t\t\tthis._w = array[offset + 3];\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this._x;\n\t\t\tarray[offset + 1] = this._y;\n\t\t\tarray[offset + 2] = this._z;\n\t\t\tarray[offset + 3] = this._w;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index) {\n\t\t\tthis._x = attribute.getX(index);\n\t\t\tthis._y = attribute.getY(index);\n\t\t\tthis._z = attribute.getZ(index);\n\t\t\tthis._w = attribute.getW(index);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto._onChange = function _onChange(callback) {\n\t\t\tthis._onChangeCallback = callback;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto._onChangeCallback = function _onChangeCallback() {};\n\n\t\t_createClass(Quaternion, [{\n\t\t\tkey: \"x\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._x;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._x = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"y\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._y;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._y = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"z\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._z;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._z = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"w\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._w;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._w = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}]);\n\n\t\treturn Quaternion;\n\t}();\n\n\tvar Vector3 = /*#__PURE__*/function () {\n\t\tfunction Vector3(x, y, z) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tif (z === void 0) {\n\t\t\t\tz = 0;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isVector3', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.z = z;\n\t\t}\n\n\t\tvar _proto = Vector3.prototype;\n\n\t\t_proto.set = function set(x, y, z) {\n\t\t\tif (z === undefined) z = this.z; // sprite.scale.set(x,y)\n\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.z = z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setScalar = function setScalar(scalar) {\n\t\t\tthis.x = scalar;\n\t\t\tthis.y = scalar;\n\t\t\tthis.z = scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setX = function setX(x) {\n\t\t\tthis.x = x;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setY = function setY(y) {\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setZ = function setZ(z) {\n\t\t\tthis.z = z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setComponent = function setComponent(index, value) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.x = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.y = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.z = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getComponent = function getComponent(index) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\treturn this.x;\n\n\t\t\t\tcase 1:\n\t\t\t\t\treturn this.y;\n\n\t\t\t\tcase 2:\n\t\t\t\t\treturn this.z;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this.x, this.y, this.z);\n\t\t};\n\n\t\t_proto.copy = function copy(v) {\n\t\t\tthis.x = v.x;\n\t\t\tthis.y = v.y;\n\t\t\tthis.z = v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.add = function add(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');\n\t\t\t\treturn this.addVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x += v.x;\n\t\t\tthis.y += v.y;\n\t\t\tthis.z += v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScalar = function addScalar(s) {\n\t\t\tthis.x += s;\n\t\t\tthis.y += s;\n\t\t\tthis.z += s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addVectors = function addVectors(a, b) {\n\t\t\tthis.x = a.x + b.x;\n\t\t\tthis.y = a.y + b.y;\n\t\t\tthis.z = a.z + b.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScaledVector = function addScaledVector(v, s) {\n\t\t\tthis.x += v.x * s;\n\t\t\tthis.y += v.y * s;\n\t\t\tthis.z += v.z * s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.sub = function sub(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');\n\t\t\t\treturn this.subVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x -= v.x;\n\t\t\tthis.y -= v.y;\n\t\t\tthis.z -= v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subScalar = function subScalar(s) {\n\t\t\tthis.x -= s;\n\t\t\tthis.y -= s;\n\t\t\tthis.z -= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subVectors = function subVectors(a, b) {\n\t\t\tthis.x = a.x - b.x;\n\t\t\tthis.y = a.y - b.y;\n\t\t\tthis.z = a.z - b.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.');\n\t\t\t\treturn this.multiplyVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x *= v.x;\n\t\t\tthis.y *= v.y;\n\t\t\tthis.z *= v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(scalar) {\n\t\t\tthis.x *= scalar;\n\t\t\tthis.y *= scalar;\n\t\t\tthis.z *= scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyVectors = function multiplyVectors(a, b) {\n\t\t\tthis.x = a.x * b.x;\n\t\t\tthis.y = a.y * b.y;\n\t\t\tthis.z = a.z * b.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyEuler = function applyEuler(euler) {\n\t\t\tif (!(euler && euler.isEuler)) {\n\t\t\t\tconsole.error('THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.');\n\t\t\t}\n\n\t\t\treturn this.applyQuaternion(_quaternion.setFromEuler(euler));\n\t\t};\n\n\t\t_proto.applyAxisAngle = function applyAxisAngle(axis, angle) {\n\t\t\treturn this.applyQuaternion(_quaternion.setFromAxisAngle(axis, angle));\n\t\t};\n\n\t\t_proto.applyMatrix3 = function applyMatrix3(m) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z;\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[0] * x + e[3] * y + e[6] * z;\n\t\t\tthis.y = e[1] * x + e[4] * y + e[7] * z;\n\t\t\tthis.z = e[2] * x + e[5] * y + e[8] * z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyNormalMatrix = function applyNormalMatrix(m) {\n\t\t\treturn this.applyMatrix3(m).normalize();\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(m) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z;\n\t\t\tvar e = m.elements;\n\t\t\tvar w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]);\n\t\t\tthis.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w;\n\t\t\tthis.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w;\n\t\t\tthis.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyQuaternion = function applyQuaternion(q) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z;\n\t\t\tvar qx = q.x,\n\t\t\t\t\tqy = q.y,\n\t\t\t\t\tqz = q.z,\n\t\t\t\t\tqw = q.w; // calculate quat * vector\n\n\t\t\tvar ix = qw * x + qy * z - qz * y;\n\t\t\tvar iy = qw * y + qz * x - qx * z;\n\t\t\tvar iz = qw * z + qx * y - qy * x;\n\t\t\tvar iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n\t\t\tthis.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n\t\t\tthis.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n\t\t\tthis.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.project = function project(camera) {\n\t\t\treturn this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix);\n\t\t};\n\n\t\t_proto.unproject = function unproject(camera) {\n\t\t\treturn this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld);\n\t\t};\n\n\t\t_proto.transformDirection = function transformDirection(m) {\n\t\t\t// input: THREE.Matrix4 affine matrix\n\t\t\t// vector interpreted as a direction\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z;\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[0] * x + e[4] * y + e[8] * z;\n\t\t\tthis.y = e[1] * x + e[5] * y + e[9] * z;\n\t\t\tthis.z = e[2] * x + e[6] * y + e[10] * z;\n\t\t\treturn this.normalize();\n\t\t};\n\n\t\t_proto.divide = function divide(v) {\n\t\t\tthis.x /= v.x;\n\t\t\tthis.y /= v.y;\n\t\t\tthis.z /= v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.divideScalar = function divideScalar(scalar) {\n\t\t\treturn this.multiplyScalar(1 / scalar);\n\t\t};\n\n\t\t_proto.min = function min(v) {\n\t\t\tthis.x = Math.min(this.x, v.x);\n\t\t\tthis.y = Math.min(this.y, v.y);\n\t\t\tthis.z = Math.min(this.z, v.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.max = function max(v) {\n\t\t\tthis.x = Math.max(this.x, v.x);\n\t\t\tthis.y = Math.max(this.y, v.y);\n\t\t\tthis.z = Math.max(this.z, v.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clamp = function clamp(min, max) {\n\t\t\t// assumes min < max, componentwise\n\t\t\tthis.x = Math.max(min.x, Math.min(max.x, this.x));\n\t\t\tthis.y = Math.max(min.y, Math.min(max.y, this.y));\n\t\t\tthis.z = Math.max(min.z, Math.min(max.z, this.z));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampScalar = function clampScalar(minVal, maxVal) {\n\t\t\tthis.x = Math.max(minVal, Math.min(maxVal, this.x));\n\t\t\tthis.y = Math.max(minVal, Math.min(maxVal, this.y));\n\t\t\tthis.z = Math.max(minVal, Math.min(maxVal, this.z));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampLength = function clampLength(min, max) {\n\t\t\tvar length = this.length();\n\t\t\treturn this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n\t\t};\n\n\t\t_proto.floor = function floor() {\n\t\t\tthis.x = Math.floor(this.x);\n\t\t\tthis.y = Math.floor(this.y);\n\t\t\tthis.z = Math.floor(this.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.ceil = function ceil() {\n\t\t\tthis.x = Math.ceil(this.x);\n\t\t\tthis.y = Math.ceil(this.y);\n\t\t\tthis.z = Math.ceil(this.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.round = function round() {\n\t\t\tthis.x = Math.round(this.x);\n\t\t\tthis.y = Math.round(this.y);\n\t\t\tthis.z = Math.round(this.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.roundToZero = function roundToZero() {\n\t\t\tthis.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n\t\t\tthis.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n\t\t\tthis.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.negate = function negate() {\n\t\t\tthis.x = -this.x;\n\t\t\tthis.y = -this.y;\n\t\t\tthis.z = -this.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dot = function dot(v) {\n\t\t\treturn this.x * v.x + this.y * v.y + this.z * v.z;\n\t\t} // TODO lengthSquared?\n\t\t;\n\n\t\t_proto.lengthSq = function lengthSq() {\n\t\t\treturn this.x * this.x + this.y * this.y + this.z * this.z;\n\t\t};\n\n\t\t_proto.length = function length() {\n\t\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n\t\t};\n\n\t\t_proto.manhattanLength = function manhattanLength() {\n\t\t\treturn Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\treturn this.divideScalar(this.length() || 1);\n\t\t};\n\n\t\t_proto.setLength = function setLength(length) {\n\t\t\treturn this.normalize().multiplyScalar(length);\n\t\t};\n\n\t\t_proto.lerp = function lerp(v, alpha) {\n\t\t\tthis.x += (v.x - this.x) * alpha;\n\t\t\tthis.y += (v.y - this.y) * alpha;\n\t\t\tthis.z += (v.z - this.z) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpVectors = function lerpVectors(v1, v2, alpha) {\n\t\t\tthis.x = v1.x + (v2.x - v1.x) * alpha;\n\t\t\tthis.y = v1.y + (v2.y - v1.y) * alpha;\n\t\t\tthis.z = v1.z + (v2.z - v1.z) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.cross = function cross(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.');\n\t\t\t\treturn this.crossVectors(v, w);\n\t\t\t}\n\n\t\t\treturn this.crossVectors(this, v);\n\t\t};\n\n\t\t_proto.crossVectors = function crossVectors(a, b) {\n\t\t\tvar ax = a.x,\n\t\t\t\t\tay = a.y,\n\t\t\t\t\taz = a.z;\n\t\t\tvar bx = b.x,\n\t\t\t\t\tby = b.y,\n\t\t\t\t\tbz = b.z;\n\t\t\tthis.x = ay * bz - az * by;\n\t\t\tthis.y = az * bx - ax * bz;\n\t\t\tthis.z = ax * by - ay * bx;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.projectOnVector = function projectOnVector(v) {\n\t\t\tvar denominator = v.lengthSq();\n\t\t\tif (denominator === 0) return this.set(0, 0, 0);\n\t\t\tvar scalar = v.dot(this) / denominator;\n\t\t\treturn this.copy(v).multiplyScalar(scalar);\n\t\t};\n\n\t\t_proto.projectOnPlane = function projectOnPlane(planeNormal) {\n\t\t\t_vector.copy(this).projectOnVector(planeNormal);\n\n\t\t\treturn this.sub(_vector);\n\t\t};\n\n\t\t_proto.reflect = function reflect(normal) {\n\t\t\t// reflect incident vector off plane orthogonal to normal\n\t\t\t// normal is assumed to have unit length\n\t\t\treturn this.sub(_vector.copy(normal).multiplyScalar(2 * this.dot(normal)));\n\t\t};\n\n\t\t_proto.angleTo = function angleTo(v) {\n\t\t\tvar denominator = Math.sqrt(this.lengthSq() * v.lengthSq());\n\t\t\tif (denominator === 0) return Math.PI / 2;\n\t\t\tvar theta = this.dot(v) / denominator; // clamp, to handle numerical problems\n\n\t\t\treturn Math.acos(MathUtils.clamp(theta, -1, 1));\n\t\t};\n\n\t\t_proto.distanceTo = function distanceTo(v) {\n\t\t\treturn Math.sqrt(this.distanceToSquared(v));\n\t\t};\n\n\t\t_proto.distanceToSquared = function distanceToSquared(v) {\n\t\t\tvar dx = this.x - v.x,\n\t\t\t\t\tdy = this.y - v.y,\n\t\t\t\t\tdz = this.z - v.z;\n\t\t\treturn dx * dx + dy * dy + dz * dz;\n\t\t};\n\n\t\t_proto.manhattanDistanceTo = function manhattanDistanceTo(v) {\n\t\t\treturn Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z);\n\t\t};\n\n\t\t_proto.setFromSpherical = function setFromSpherical(s) {\n\t\t\treturn this.setFromSphericalCoords(s.radius, s.phi, s.theta);\n\t\t};\n\n\t\t_proto.setFromSphericalCoords = function setFromSphericalCoords(radius, phi, theta) {\n\t\t\tvar sinPhiRadius = Math.sin(phi) * radius;\n\t\t\tthis.x = sinPhiRadius * Math.sin(theta);\n\t\t\tthis.y = Math.cos(phi) * radius;\n\t\t\tthis.z = sinPhiRadius * Math.cos(theta);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromCylindrical = function setFromCylindrical(c) {\n\t\t\treturn this.setFromCylindricalCoords(c.radius, c.theta, c.y);\n\t\t};\n\n\t\t_proto.setFromCylindricalCoords = function setFromCylindricalCoords(radius, theta, y) {\n\t\t\tthis.x = radius * Math.sin(theta);\n\t\t\tthis.y = y;\n\t\t\tthis.z = radius * Math.cos(theta);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrixPosition = function setFromMatrixPosition(m) {\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[12];\n\t\t\tthis.y = e[13];\n\t\t\tthis.z = e[14];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrixScale = function setFromMatrixScale(m) {\n\t\t\tvar sx = this.setFromMatrixColumn(m, 0).length();\n\t\t\tvar sy = this.setFromMatrixColumn(m, 1).length();\n\t\t\tvar sz = this.setFromMatrixColumn(m, 2).length();\n\t\t\tthis.x = sx;\n\t\t\tthis.y = sy;\n\t\t\tthis.z = sz;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrixColumn = function setFromMatrixColumn(m, index) {\n\t\t\treturn this.fromArray(m.elements, index * 4);\n\t\t};\n\n\t\t_proto.setFromMatrix3Column = function setFromMatrix3Column(m, index) {\n\t\t\treturn this.fromArray(m.elements, index * 3);\n\t\t};\n\n\t\t_proto.equals = function equals(v) {\n\t\t\treturn v.x === this.x && v.y === this.y && v.z === this.z;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.x = array[offset];\n\t\t\tthis.y = array[offset + 1];\n\t\t\tthis.z = array[offset + 2];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this.x;\n\t\t\tarray[offset + 1] = this.y;\n\t\t\tarray[offset + 2] = this.z;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index, offset) {\n\t\t\tif (offset !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: offset has been removed from .fromBufferAttribute().');\n\t\t\t}\n\n\t\t\tthis.x = attribute.getX(index);\n\t\t\tthis.y = attribute.getY(index);\n\t\t\tthis.z = attribute.getZ(index);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.random = function random() {\n\t\t\tthis.x = Math.random();\n\t\t\tthis.y = Math.random();\n\t\t\tthis.z = Math.random();\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Vector3;\n\t}();\n\n\tvar _vector = /*@__PURE__*/new Vector3();\n\n\tvar _quaternion = /*@__PURE__*/new Quaternion();\n\n\tvar Box3 = /*#__PURE__*/function () {\n\t\tfunction Box3(min, max) {\n\t\t\tObject.defineProperty(this, 'isBox3', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.min = min !== undefined ? min : new Vector3(+Infinity, +Infinity, +Infinity);\n\t\t\tthis.max = max !== undefined ? max : new Vector3(-Infinity, -Infinity, -Infinity);\n\t\t}\n\n\t\tvar _proto = Box3.prototype;\n\n\t\t_proto.set = function set(min, max) {\n\t\t\tthis.min.copy(min);\n\t\t\tthis.max.copy(max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromArray = function setFromArray(array) {\n\t\t\tvar minX = +Infinity;\n\t\t\tvar minY = +Infinity;\n\t\t\tvar minZ = +Infinity;\n\t\t\tvar maxX = -Infinity;\n\t\t\tvar maxY = -Infinity;\n\t\t\tvar maxZ = -Infinity;\n\n\t\t\tfor (var i = 0, l = array.length; i < l; i += 3) {\n\t\t\t\tvar x = array[i];\n\t\t\t\tvar y = array[i + 1];\n\t\t\t\tvar z = array[i + 2];\n\t\t\t\tif (x < minX) minX = x;\n\t\t\t\tif (y < minY) minY = y;\n\t\t\t\tif (z < minZ) minZ = z;\n\t\t\t\tif (x > maxX) maxX = x;\n\t\t\t\tif (y > maxY) maxY = y;\n\t\t\t\tif (z > maxZ) maxZ = z;\n\t\t\t}\n\n\t\t\tthis.min.set(minX, minY, minZ);\n\t\t\tthis.max.set(maxX, maxY, maxZ);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromBufferAttribute = function setFromBufferAttribute(attribute) {\n\t\t\tvar minX = +Infinity;\n\t\t\tvar minY = +Infinity;\n\t\t\tvar minZ = +Infinity;\n\t\t\tvar maxX = -Infinity;\n\t\t\tvar maxY = -Infinity;\n\t\t\tvar maxZ = -Infinity;\n\n\t\t\tfor (var i = 0, l = attribute.count; i < l; i++) {\n\t\t\t\tvar x = attribute.getX(i);\n\t\t\t\tvar y = attribute.getY(i);\n\t\t\t\tvar z = attribute.getZ(i);\n\t\t\t\tif (x < minX) minX = x;\n\t\t\t\tif (y < minY) minY = y;\n\t\t\t\tif (z < minZ) minZ = z;\n\t\t\t\tif (x > maxX) maxX = x;\n\t\t\t\tif (y > maxY) maxY = y;\n\t\t\t\tif (z > maxZ) maxZ = z;\n\t\t\t}\n\n\t\t\tthis.min.set(minX, minY, minZ);\n\t\t\tthis.max.set(maxX, maxY, maxZ);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromPoints = function setFromPoints(points) {\n\t\t\tthis.makeEmpty();\n\n\t\t\tfor (var i = 0, il = points.length; i < il; i++) {\n\t\t\t\tthis.expandByPoint(points[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromCenterAndSize = function setFromCenterAndSize(center, size) {\n\t\t\tvar halfSize = _vector$1.copy(size).multiplyScalar(0.5);\n\n\t\t\tthis.min.copy(center).sub(halfSize);\n\t\t\tthis.max.copy(center).add(halfSize);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromObject = function setFromObject(object) {\n\t\t\tthis.makeEmpty();\n\t\t\treturn this.expandByObject(object);\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(box) {\n\t\t\tthis.min.copy(box.min);\n\t\t\tthis.max.copy(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeEmpty = function makeEmpty() {\n\t\t\tthis.min.x = this.min.y = this.min.z = +Infinity;\n\t\t\tthis.max.x = this.max.y = this.max.z = -Infinity;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.isEmpty = function isEmpty() {\n\t\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\t\t\treturn this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z;\n\t\t};\n\n\t\t_proto.getCenter = function getCenter(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box3: .getCenter() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn this.isEmpty() ? target.set(0, 0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);\n\t\t};\n\n\t\t_proto.getSize = function getSize(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box3: .getSize() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn this.isEmpty() ? target.set(0, 0, 0) : target.subVectors(this.max, this.min);\n\t\t};\n\n\t\t_proto.expandByPoint = function expandByPoint(point) {\n\t\t\tthis.min.min(point);\n\t\t\tthis.max.max(point);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByVector = function expandByVector(vector) {\n\t\t\tthis.min.sub(vector);\n\t\t\tthis.max.add(vector);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByScalar = function expandByScalar(scalar) {\n\t\t\tthis.min.addScalar(-scalar);\n\t\t\tthis.max.addScalar(scalar);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByObject = function expandByObject(object) {\n\t\t\t// Computes the world-axis-aligned bounding box of an object (including its children),\n\t\t\t// accounting for both the object's, and children's, world transforms\n\t\t\tobject.updateWorldMatrix(false, false);\n\t\t\tvar geometry = object.geometry;\n\n\t\t\tif (geometry !== undefined) {\n\t\t\t\tif (geometry.boundingBox === null) {\n\t\t\t\t\tgeometry.computeBoundingBox();\n\t\t\t\t}\n\n\t\t\t\t_box.copy(geometry.boundingBox);\n\n\t\t\t\t_box.applyMatrix4(object.matrixWorld);\n\n\t\t\t\tthis.union(_box);\n\t\t\t}\n\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tthis.expandByObject(children[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\treturn point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y || point.z < this.min.z || point.z > this.max.z ? false : true;\n\t\t};\n\n\t\t_proto.containsBox = function containsBox(box) {\n\t\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y && this.min.z <= box.min.z && box.max.z <= this.max.z;\n\t\t};\n\n\t\t_proto.getParameter = function getParameter(point, target) {\n\t\t\t// This can potentially have a divide by zero if the box\n\t\t\t// has a size dimension of 0.\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box3: .getParameter() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y), (point.z - this.min.z) / (this.max.z - this.min.z));\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\t// using 6 splitting planes to rule out intersections.\n\t\t\treturn box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y || box.max.z < this.min.z || box.min.z > this.max.z ? false : true;\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\t// Find the point on the AABB closest to the sphere center.\n\t\t\tthis.clampPoint(sphere.center, _vector$1); // If that point is inside the sphere, the AABB and sphere intersect.\n\n\t\t\treturn _vector$1.distanceToSquared(sphere.center) <= sphere.radius * sphere.radius;\n\t\t};\n\n\t\t_proto.intersectsPlane = function intersectsPlane(plane) {\n\t\t\t// We compute the minimum and maximum dot product values. If those values\n\t\t\t// are on the same side (back or front) of the plane, then there is no intersection.\n\t\t\tvar min, max;\n\n\t\t\tif (plane.normal.x > 0) {\n\t\t\t\tmin = plane.normal.x * this.min.x;\n\t\t\t\tmax = plane.normal.x * this.max.x;\n\t\t\t} else {\n\t\t\t\tmin = plane.normal.x * this.max.x;\n\t\t\t\tmax = plane.normal.x * this.min.x;\n\t\t\t}\n\n\t\t\tif (plane.normal.y > 0) {\n\t\t\t\tmin += plane.normal.y * this.min.y;\n\t\t\t\tmax += plane.normal.y * this.max.y;\n\t\t\t} else {\n\t\t\t\tmin += plane.normal.y * this.max.y;\n\t\t\t\tmax += plane.normal.y * this.min.y;\n\t\t\t}\n\n\t\t\tif (plane.normal.z > 0) {\n\t\t\t\tmin += plane.normal.z * this.min.z;\n\t\t\t\tmax += plane.normal.z * this.max.z;\n\t\t\t} else {\n\t\t\t\tmin += plane.normal.z * this.max.z;\n\t\t\t\tmax += plane.normal.z * this.min.z;\n\t\t\t}\n\n\t\t\treturn min <= -plane.constant && max >= -plane.constant;\n\t\t};\n\n\t\t_proto.intersectsTriangle = function intersectsTriangle(triangle) {\n\t\t\tif (this.isEmpty()) {\n\t\t\t\treturn false;\n\t\t\t} // compute box center and extents\n\n\n\t\t\tthis.getCenter(_center);\n\n\t\t\t_extents.subVectors(this.max, _center); // translate triangle to aabb origin\n\n\n\t\t\t_v0.subVectors(triangle.a, _center);\n\n\t\t\t_v1.subVectors(triangle.b, _center);\n\n\t\t\t_v2.subVectors(triangle.c, _center); // compute edge vectors for triangle\n\n\n\t\t\t_f0.subVectors(_v1, _v0);\n\n\t\t\t_f1.subVectors(_v2, _v1);\n\n\t\t\t_f2.subVectors(_v0, _v2); // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb\n\t\t\t// make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation\n\t\t\t// axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)\n\n\n\t\t\tvar axes = [0, -_f0.z, _f0.y, 0, -_f1.z, _f1.y, 0, -_f2.z, _f2.y, _f0.z, 0, -_f0.x, _f1.z, 0, -_f1.x, _f2.z, 0, -_f2.x, -_f0.y, _f0.x, 0, -_f1.y, _f1.x, 0, -_f2.y, _f2.x, 0];\n\n\t\t\tif (!satForAxes(axes, _v0, _v1, _v2, _extents)) {\n\t\t\t\treturn false;\n\t\t\t} // test 3 face normals from the aabb\n\n\n\t\t\taxes = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n\n\t\t\tif (!satForAxes(axes, _v0, _v1, _v2, _extents)) {\n\t\t\t\treturn false;\n\t\t\t} // finally testing the face normal of the triangle\n\t\t\t// use already existing triangle edge vectors here\n\n\n\t\t\t_triangleNormal.crossVectors(_f0, _f1);\n\n\t\t\taxes = [_triangleNormal.x, _triangleNormal.y, _triangleNormal.z];\n\t\t\treturn satForAxes(axes, _v0, _v1, _v2, _extents);\n\t\t};\n\n\t\t_proto.clampPoint = function clampPoint(point, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box3: .clampPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.copy(point).clamp(this.min, this.max);\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\tvar clampedPoint = _vector$1.copy(point).clamp(this.min, this.max);\n\n\t\t\treturn clampedPoint.sub(point).length();\n\t\t};\n\n\t\t_proto.getBoundingSphere = function getBoundingSphere(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.error('THREE.Box3: .getBoundingSphere() target is now required'); //target = new Sphere(); // removed to avoid cyclic dependency\n\t\t\t}\n\n\t\t\tthis.getCenter(target.center);\n\t\t\ttarget.radius = this.getSize(_vector$1).length() * 0.5;\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.intersect = function intersect(box) {\n\t\t\tthis.min.max(box.min);\n\t\t\tthis.max.min(box.max); // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.\n\n\t\t\tif (this.isEmpty()) this.makeEmpty();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.union = function union(box) {\n\t\t\tthis.min.min(box.min);\n\t\t\tthis.max.max(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix) {\n\t\t\t// transform of empty box is an empty box.\n\t\t\tif (this.isEmpty()) return this; // NOTE: I am using a binary pattern to specify all 2^3 combinations below\n\n\t\t\t_points[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(matrix); // 000\n\n\n\t\t\t_points[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(matrix); // 001\n\n\n\t\t\t_points[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(matrix); // 010\n\n\n\t\t\t_points[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(matrix); // 011\n\n\n\t\t\t_points[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(matrix); // 100\n\n\n\t\t\t_points[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(matrix); // 101\n\n\n\t\t\t_points[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(matrix); // 110\n\n\n\t\t\t_points[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(matrix); // 111\n\n\n\t\t\tthis.setFromPoints(_points);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(offset) {\n\t\t\tthis.min.add(offset);\n\t\t\tthis.max.add(offset);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(box) {\n\t\t\treturn box.min.equals(this.min) && box.max.equals(this.max);\n\t\t};\n\n\t\treturn Box3;\n\t}();\n\n\tfunction satForAxes(axes, v0, v1, v2, extents) {\n\t\tfor (var i = 0, j = axes.length - 3; i <= j; i += 3) {\n\t\t\t_testAxis.fromArray(axes, i); // project the aabb onto the seperating axis\n\n\n\t\t\tvar r = extents.x * Math.abs(_testAxis.x) + extents.y * Math.abs(_testAxis.y) + extents.z * Math.abs(_testAxis.z); // project all 3 vertices of the triangle onto the seperating axis\n\n\t\t\tvar p0 = v0.dot(_testAxis);\n\t\t\tvar p1 = v1.dot(_testAxis);\n\t\t\tvar p2 = v2.dot(_testAxis); // actual test, basically see if either of the most extreme of the triangle points intersects r\n\n\t\t\tif (Math.max(-Math.max(p0, p1, p2), Math.min(p0, p1, p2)) > r) {\n\t\t\t\t// points of the projected triangle are outside the projected half-length of the aabb\n\t\t\t\t// the axis is seperating and we can exit\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tvar _points = [/*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3()];\n\n\tvar _vector$1 = /*@__PURE__*/new Vector3();\n\n\tvar _box = /*@__PURE__*/new Box3(); // triangle centered vertices\n\n\n\tvar _v0 = /*@__PURE__*/new Vector3();\n\n\tvar _v1 = /*@__PURE__*/new Vector3();\n\n\tvar _v2 = /*@__PURE__*/new Vector3(); // triangle edge vectors\n\n\n\tvar _f0 = /*@__PURE__*/new Vector3();\n\n\tvar _f1 = /*@__PURE__*/new Vector3();\n\n\tvar _f2 = /*@__PURE__*/new Vector3();\n\n\tvar _center = /*@__PURE__*/new Vector3();\n\n\tvar _extents = /*@__PURE__*/new Vector3();\n\n\tvar _triangleNormal = /*@__PURE__*/new Vector3();\n\n\tvar _testAxis = /*@__PURE__*/new Vector3();\n\n\tvar _box$1 = /*@__PURE__*/new Box3();\n\n\tvar Sphere = /*#__PURE__*/function () {\n\t\tfunction Sphere(center, radius) {\n\t\t\tthis.center = center !== undefined ? center : new Vector3();\n\t\t\tthis.radius = radius !== undefined ? radius : -1;\n\t\t}\n\n\t\tvar _proto = Sphere.prototype;\n\n\t\t_proto.set = function set(center, radius) {\n\t\t\tthis.center.copy(center);\n\t\t\tthis.radius = radius;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromPoints = function setFromPoints(points, optionalCenter) {\n\t\t\tvar center = this.center;\n\n\t\t\tif (optionalCenter !== undefined) {\n\t\t\t\tcenter.copy(optionalCenter);\n\t\t\t} else {\n\t\t\t\t_box$1.setFromPoints(points).getCenter(center);\n\t\t\t}\n\n\t\t\tvar maxRadiusSq = 0;\n\n\t\t\tfor (var i = 0, il = points.length; i < il; i++) {\n\t\t\t\tmaxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(points[i]));\n\t\t\t}\n\n\t\t\tthis.radius = Math.sqrt(maxRadiusSq);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(sphere) {\n\t\t\tthis.center.copy(sphere.center);\n\t\t\tthis.radius = sphere.radius;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.isEmpty = function isEmpty() {\n\t\t\treturn this.radius < 0;\n\t\t};\n\n\t\t_proto.makeEmpty = function makeEmpty() {\n\t\t\tthis.center.set(0, 0, 0);\n\t\t\tthis.radius = -1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\treturn point.distanceToSquared(this.center) <= this.radius * this.radius;\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\treturn point.distanceTo(this.center) - this.radius;\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\tvar radiusSum = this.radius + sphere.radius;\n\t\t\treturn sphere.center.distanceToSquared(this.center) <= radiusSum * radiusSum;\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\treturn box.intersectsSphere(this);\n\t\t};\n\n\t\t_proto.intersectsPlane = function intersectsPlane(plane) {\n\t\t\treturn Math.abs(plane.distanceToPoint(this.center)) <= this.radius;\n\t\t};\n\n\t\t_proto.clampPoint = function clampPoint(point, target) {\n\t\t\tvar deltaLengthSq = this.center.distanceToSquared(point);\n\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Sphere: .clampPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\ttarget.copy(point);\n\n\t\t\tif (deltaLengthSq > this.radius * this.radius) {\n\t\t\t\ttarget.sub(this.center).normalize();\n\t\t\t\ttarget.multiplyScalar(this.radius).add(this.center);\n\t\t\t}\n\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.getBoundingBox = function getBoundingBox(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Sphere: .getBoundingBox() target is now required');\n\t\t\t\ttarget = new Box3();\n\t\t\t}\n\n\t\t\tif (this.isEmpty()) {\n\t\t\t\t// Empty sphere produces empty bounding box\n\t\t\t\ttarget.makeEmpty();\n\t\t\t\treturn target;\n\t\t\t}\n\n\t\t\ttarget.set(this.center, this.center);\n\t\t\ttarget.expandByScalar(this.radius);\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix) {\n\t\t\tthis.center.applyMatrix4(matrix);\n\t\t\tthis.radius = this.radius * matrix.getMaxScaleOnAxis();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(offset) {\n\t\t\tthis.center.add(offset);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(sphere) {\n\t\t\treturn sphere.center.equals(this.center) && sphere.radius === this.radius;\n\t\t};\n\n\t\treturn Sphere;\n\t}();\n\n\tvar _vector$2 = /*@__PURE__*/new Vector3();\n\n\tvar _segCenter = /*@__PURE__*/new Vector3();\n\n\tvar _segDir = /*@__PURE__*/new Vector3();\n\n\tvar _diff = /*@__PURE__*/new Vector3();\n\n\tvar _edge1 = /*@__PURE__*/new Vector3();\n\n\tvar _edge2 = /*@__PURE__*/new Vector3();\n\n\tvar _normal = /*@__PURE__*/new Vector3();\n\n\tvar Ray = /*#__PURE__*/function () {\n\t\tfunction Ray(origin, direction) {\n\t\t\tthis.origin = origin !== undefined ? origin : new Vector3();\n\t\t\tthis.direction = direction !== undefined ? direction : new Vector3(0, 0, -1);\n\t\t}\n\n\t\tvar _proto = Ray.prototype;\n\n\t\t_proto.set = function set(origin, direction) {\n\t\t\tthis.origin.copy(origin);\n\t\t\tthis.direction.copy(direction);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(ray) {\n\t\t\tthis.origin.copy(ray.origin);\n\t\t\tthis.direction.copy(ray.direction);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.at = function at(t, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Ray: .at() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.copy(this.direction).multiplyScalar(t).add(this.origin);\n\t\t};\n\n\t\t_proto.lookAt = function lookAt(v) {\n\t\t\tthis.direction.copy(v).sub(this.origin).normalize();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.recast = function recast(t) {\n\t\t\tthis.origin.copy(this.at(t, _vector$2));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.closestPointToPoint = function closestPointToPoint(point, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Ray: .closestPointToPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\ttarget.subVectors(point, this.origin);\n\t\t\tvar directionDistance = target.dot(this.direction);\n\n\t\t\tif (directionDistance < 0) {\n\t\t\t\treturn target.copy(this.origin);\n\t\t\t}\n\n\t\t\treturn target.copy(this.direction).multiplyScalar(directionDistance).add(this.origin);\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\treturn Math.sqrt(this.distanceSqToPoint(point));\n\t\t};\n\n\t\t_proto.distanceSqToPoint = function distanceSqToPoint(point) {\n\t\t\tvar directionDistance = _vector$2.subVectors(point, this.origin).dot(this.direction); // point behind the ray\n\n\n\t\t\tif (directionDistance < 0) {\n\t\t\t\treturn this.origin.distanceToSquared(point);\n\t\t\t}\n\n\t\t\t_vector$2.copy(this.direction).multiplyScalar(directionDistance).add(this.origin);\n\n\t\t\treturn _vector$2.distanceToSquared(point);\n\t\t};\n\n\t\t_proto.distanceSqToSegment = function distanceSqToSegment(v0, v1, optionalPointOnRay, optionalPointOnSegment) {\n\t\t\t// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteDistRaySegment.h\n\t\t\t// It returns the min distance between the ray and the segment\n\t\t\t// defined by v0 and v1\n\t\t\t// It can also set two optional targets :\n\t\t\t// - The closest point on the ray\n\t\t\t// - The closest point on the segment\n\t\t\t_segCenter.copy(v0).add(v1).multiplyScalar(0.5);\n\n\t\t\t_segDir.copy(v1).sub(v0).normalize();\n\n\t\t\t_diff.copy(this.origin).sub(_segCenter);\n\n\t\t\tvar segExtent = v0.distanceTo(v1) * 0.5;\n\t\t\tvar a01 = -this.direction.dot(_segDir);\n\n\t\t\tvar b0 = _diff.dot(this.direction);\n\n\t\t\tvar b1 = -_diff.dot(_segDir);\n\n\t\t\tvar c = _diff.lengthSq();\n\n\t\t\tvar det = Math.abs(1 - a01 * a01);\n\t\t\tvar s0, s1, sqrDist, extDet;\n\n\t\t\tif (det > 0) {\n\t\t\t\t// The ray and segment are not parallel.\n\t\t\t\ts0 = a01 * b1 - b0;\n\t\t\t\ts1 = a01 * b0 - b1;\n\t\t\t\textDet = segExtent * det;\n\n\t\t\t\tif (s0 >= 0) {\n\t\t\t\t\tif (s1 >= -extDet) {\n\t\t\t\t\t\tif (s1 <= extDet) {\n\t\t\t\t\t\t\t// region 0\n\t\t\t\t\t\t\t// Minimum at interior points of ray and segment.\n\t\t\t\t\t\t\tvar invDet = 1 / det;\n\t\t\t\t\t\t\ts0 *= invDet;\n\t\t\t\t\t\t\ts1 *= invDet;\n\t\t\t\t\t\t\tsqrDist = s0 * (s0 + a01 * s1 + 2 * b0) + s1 * (a01 * s0 + s1 + 2 * b1) + c;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// region 1\n\t\t\t\t\t\t\ts1 = segExtent;\n\t\t\t\t\t\t\ts0 = Math.max(0, -(a01 * s1 + b0));\n\t\t\t\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// region 5\n\t\t\t\t\t\ts1 = -segExtent;\n\t\t\t\t\t\ts0 = Math.max(0, -(a01 * s1 + b0));\n\t\t\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (s1 <= -extDet) {\n\t\t\t\t\t\t// region 4\n\t\t\t\t\t\ts0 = Math.max(0, -(-a01 * segExtent + b0));\n\t\t\t\t\t\ts1 = s0 > 0 ? -segExtent : Math.min(Math.max(-segExtent, -b1), segExtent);\n\t\t\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t} else if (s1 <= extDet) {\n\t\t\t\t\t\t// region 3\n\t\t\t\t\t\ts0 = 0;\n\t\t\t\t\t\ts1 = Math.min(Math.max(-segExtent, -b1), segExtent);\n\t\t\t\t\t\tsqrDist = s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// region 2\n\t\t\t\t\t\ts0 = Math.max(0, -(a01 * segExtent + b0));\n\t\t\t\t\t\ts1 = s0 > 0 ? segExtent : Math.min(Math.max(-segExtent, -b1), segExtent);\n\t\t\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Ray and segment are parallel.\n\t\t\t\ts1 = a01 > 0 ? -segExtent : segExtent;\n\t\t\t\ts0 = Math.max(0, -(a01 * s1 + b0));\n\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t}\n\n\t\t\tif (optionalPointOnRay) {\n\t\t\t\toptionalPointOnRay.copy(this.direction).multiplyScalar(s0).add(this.origin);\n\t\t\t}\n\n\t\t\tif (optionalPointOnSegment) {\n\t\t\t\toptionalPointOnSegment.copy(_segDir).multiplyScalar(s1).add(_segCenter);\n\t\t\t}\n\n\t\t\treturn sqrDist;\n\t\t};\n\n\t\t_proto.intersectSphere = function intersectSphere(sphere, target) {\n\t\t\t_vector$2.subVectors(sphere.center, this.origin);\n\n\t\t\tvar tca = _vector$2.dot(this.direction);\n\n\t\t\tvar d2 = _vector$2.dot(_vector$2) - tca * tca;\n\t\t\tvar radius2 = sphere.radius * sphere.radius;\n\t\t\tif (d2 > radius2) return null;\n\t\t\tvar thc = Math.sqrt(radius2 - d2); // t0 = first intersect point - entrance on front of sphere\n\n\t\t\tvar t0 = tca - thc; // t1 = second intersect point - exit point on back of sphere\n\n\t\t\tvar t1 = tca + thc; // test to see if both t0 and t1 are behind the ray - if so, return null\n\n\t\t\tif (t0 < 0 && t1 < 0) return null; // test to see if t0 is behind the ray:\n\t\t\t// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,\n\t\t\t// in order to always return an intersect point that is in front of the ray.\n\n\t\t\tif (t0 < 0) return this.at(t1, target); // else t0 is in front of the ray, so return the first collision point scaled by t0\n\n\t\t\treturn this.at(t0, target);\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\treturn this.distanceSqToPoint(sphere.center) <= sphere.radius * sphere.radius;\n\t\t};\n\n\t\t_proto.distanceToPlane = function distanceToPlane(plane) {\n\t\t\tvar denominator = plane.normal.dot(this.direction);\n\n\t\t\tif (denominator === 0) {\n\t\t\t\t// line is coplanar, return origin\n\t\t\t\tif (plane.distanceToPoint(this.origin) === 0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t} // Null is preferable to undefined since undefined means.... it is undefined\n\n\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar t = -(this.origin.dot(plane.normal) + plane.constant) / denominator; // Return if the ray never intersects the plane\n\n\t\t\treturn t >= 0 ? t : null;\n\t\t};\n\n\t\t_proto.intersectPlane = function intersectPlane(plane, target) {\n\t\t\tvar t = this.distanceToPlane(plane);\n\n\t\t\tif (t === null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn this.at(t, target);\n\t\t};\n\n\t\t_proto.intersectsPlane = function intersectsPlane(plane) {\n\t\t\t// check if the ray lies on the plane first\n\t\t\tvar distToPoint = plane.distanceToPoint(this.origin);\n\n\t\t\tif (distToPoint === 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tvar denominator = plane.normal.dot(this.direction);\n\n\t\t\tif (denominator * distToPoint < 0) {\n\t\t\t\treturn true;\n\t\t\t} // ray origin is behind the plane (and is pointing behind it)\n\n\n\t\t\treturn false;\n\t\t};\n\n\t\t_proto.intersectBox = function intersectBox(box, target) {\n\t\t\tvar tmin, tmax, tymin, tymax, tzmin, tzmax;\n\t\t\tvar invdirx = 1 / this.direction.x,\n\t\t\t\t\tinvdiry = 1 / this.direction.y,\n\t\t\t\t\tinvdirz = 1 / this.direction.z;\n\t\t\tvar origin = this.origin;\n\n\t\t\tif (invdirx >= 0) {\n\t\t\t\ttmin = (box.min.x - origin.x) * invdirx;\n\t\t\t\ttmax = (box.max.x - origin.x) * invdirx;\n\t\t\t} else {\n\t\t\t\ttmin = (box.max.x - origin.x) * invdirx;\n\t\t\t\ttmax = (box.min.x - origin.x) * invdirx;\n\t\t\t}\n\n\t\t\tif (invdiry >= 0) {\n\t\t\t\ttymin = (box.min.y - origin.y) * invdiry;\n\t\t\t\ttymax = (box.max.y - origin.y) * invdiry;\n\t\t\t} else {\n\t\t\t\ttymin = (box.max.y - origin.y) * invdiry;\n\t\t\t\ttymax = (box.min.y - origin.y) * invdiry;\n\t\t\t}\n\n\t\t\tif (tmin > tymax || tymin > tmax) return null; // These lines also handle the case where tmin or tmax is NaN\n\t\t\t// (result of 0 * Infinity). x !== x returns true if x is NaN\n\n\t\t\tif (tymin > tmin || tmin !== tmin) tmin = tymin;\n\t\t\tif (tymax < tmax || tmax !== tmax) tmax = tymax;\n\n\t\t\tif (invdirz >= 0) {\n\t\t\t\ttzmin = (box.min.z - origin.z) * invdirz;\n\t\t\t\ttzmax = (box.max.z - origin.z) * invdirz;\n\t\t\t} else {\n\t\t\t\ttzmin = (box.max.z - origin.z) * invdirz;\n\t\t\t\ttzmax = (box.min.z - origin.z) * invdirz;\n\t\t\t}\n\n\t\t\tif (tmin > tzmax || tzmin > tmax) return null;\n\t\t\tif (tzmin > tmin || tmin !== tmin) tmin = tzmin;\n\t\t\tif (tzmax < tmax || tmax !== tmax) tmax = tzmax; //return point closest to the ray (positive side)\n\n\t\t\tif (tmax < 0) return null;\n\t\t\treturn this.at(tmin >= 0 ? tmin : tmax, target);\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\treturn this.intersectBox(box, _vector$2) !== null;\n\t\t};\n\n\t\t_proto.intersectTriangle = function intersectTriangle(a, b, c, backfaceCulling, target) {\n\t\t\t// Compute the offset origin, edges, and normal.\n\t\t\t// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h\n\t\t\t_edge1.subVectors(b, a);\n\n\t\t\t_edge2.subVectors(c, a);\n\n\t\t\t_normal.crossVectors(_edge1, _edge2); // Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction,\n\t\t\t// E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by\n\t\t\t//\t |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))\n\t\t\t//\t |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))\n\t\t\t//\t |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)\n\n\n\t\t\tvar DdN = this.direction.dot(_normal);\n\t\t\tvar sign;\n\n\t\t\tif (DdN > 0) {\n\t\t\t\tif (backfaceCulling) return null;\n\t\t\t\tsign = 1;\n\t\t\t} else if (DdN < 0) {\n\t\t\t\tsign = -1;\n\t\t\t\tDdN = -DdN;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t_diff.subVectors(this.origin, a);\n\n\t\t\tvar DdQxE2 = sign * this.direction.dot(_edge2.crossVectors(_diff, _edge2)); // b1 < 0, no intersection\n\n\t\t\tif (DdQxE2 < 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar DdE1xQ = sign * this.direction.dot(_edge1.cross(_diff)); // b2 < 0, no intersection\n\n\t\t\tif (DdE1xQ < 0) {\n\t\t\t\treturn null;\n\t\t\t} // b1+b2 > 1, no intersection\n\n\n\t\t\tif (DdQxE2 + DdE1xQ > DdN) {\n\t\t\t\treturn null;\n\t\t\t} // Line intersects triangle, check if ray does.\n\n\n\t\t\tvar QdN = -sign * _diff.dot(_normal); // t < 0, no intersection\n\n\n\t\t\tif (QdN < 0) {\n\t\t\t\treturn null;\n\t\t\t} // Ray intersects triangle.\n\n\n\t\t\treturn this.at(QdN / DdN, target);\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix4) {\n\t\t\tthis.origin.applyMatrix4(matrix4);\n\t\t\tthis.direction.transformDirection(matrix4);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(ray) {\n\t\t\treturn ray.origin.equals(this.origin) && ray.direction.equals(this.direction);\n\t\t};\n\n\t\treturn Ray;\n\t}();\n\n\tvar Matrix4 = /*#__PURE__*/function () {\n\t\tfunction Matrix4() {\n\t\t\tObject.defineProperty(this, 'isMatrix4', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tconsole.error('THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.');\n\t\t\t}\n\t\t}\n\n\t\tvar _proto = Matrix4.prototype;\n\n\t\t_proto.set = function set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] = n11;\n\t\t\tte[4] = n12;\n\t\t\tte[8] = n13;\n\t\t\tte[12] = n14;\n\t\t\tte[1] = n21;\n\t\t\tte[5] = n22;\n\t\t\tte[9] = n23;\n\t\t\tte[13] = n24;\n\t\t\tte[2] = n31;\n\t\t\tte[6] = n32;\n\t\t\tte[10] = n33;\n\t\t\tte[14] = n34;\n\t\t\tte[3] = n41;\n\t\t\tte[7] = n42;\n\t\t\tte[11] = n43;\n\t\t\tte[15] = n44;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.identity = function identity() {\n\t\t\tthis.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new Matrix4().fromArray(this.elements);\n\t\t};\n\n\t\t_proto.copy = function copy(m) {\n\t\t\tvar te = this.elements;\n\t\t\tvar me = m.elements;\n\t\t\tte[0] = me[0];\n\t\t\tte[1] = me[1];\n\t\t\tte[2] = me[2];\n\t\t\tte[3] = me[3];\n\t\t\tte[4] = me[4];\n\t\t\tte[5] = me[5];\n\t\t\tte[6] = me[6];\n\t\t\tte[7] = me[7];\n\t\t\tte[8] = me[8];\n\t\t\tte[9] = me[9];\n\t\t\tte[10] = me[10];\n\t\t\tte[11] = me[11];\n\t\t\tte[12] = me[12];\n\t\t\tte[13] = me[13];\n\t\t\tte[14] = me[14];\n\t\t\tte[15] = me[15];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copyPosition = function copyPosition(m) {\n\t\t\tvar te = this.elements,\n\t\t\t\t\tme = m.elements;\n\t\t\tte[12] = me[12];\n\t\t\tte[13] = me[13];\n\t\t\tte[14] = me[14];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrix3 = function setFromMatrix3(m) {\n\t\t\tvar me = m.elements;\n\t\t\tthis.set(me[0], me[3], me[6], 0, me[1], me[4], me[7], 0, me[2], me[5], me[8], 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.extractBasis = function extractBasis(xAxis, yAxis, zAxis) {\n\t\t\txAxis.setFromMatrixColumn(this, 0);\n\t\t\tyAxis.setFromMatrixColumn(this, 1);\n\t\t\tzAxis.setFromMatrixColumn(this, 2);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeBasis = function makeBasis(xAxis, yAxis, zAxis) {\n\t\t\tthis.set(xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.extractRotation = function extractRotation(m) {\n\t\t\t// this method does not support reflection matrices\n\t\t\tvar te = this.elements;\n\t\t\tvar me = m.elements;\n\n\t\t\tvar scaleX = 1 / _v1$1.setFromMatrixColumn(m, 0).length();\n\n\t\t\tvar scaleY = 1 / _v1$1.setFromMatrixColumn(m, 1).length();\n\n\t\t\tvar scaleZ = 1 / _v1$1.setFromMatrixColumn(m, 2).length();\n\n\t\t\tte[0] = me[0] * scaleX;\n\t\t\tte[1] = me[1] * scaleX;\n\t\t\tte[2] = me[2] * scaleX;\n\t\t\tte[3] = 0;\n\t\t\tte[4] = me[4] * scaleY;\n\t\t\tte[5] = me[5] * scaleY;\n\t\t\tte[6] = me[6] * scaleY;\n\t\t\tte[7] = 0;\n\t\t\tte[8] = me[8] * scaleZ;\n\t\t\tte[9] = me[9] * scaleZ;\n\t\t\tte[10] = me[10] * scaleZ;\n\t\t\tte[11] = 0;\n\t\t\tte[12] = 0;\n\t\t\tte[13] = 0;\n\t\t\tte[14] = 0;\n\t\t\tte[15] = 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationFromEuler = function makeRotationFromEuler(euler) {\n\t\t\tif (!(euler && euler.isEuler)) {\n\t\t\t\tconsole.error('THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.');\n\t\t\t}\n\n\t\t\tvar te = this.elements;\n\t\t\tvar x = euler.x,\n\t\t\t\t\ty = euler.y,\n\t\t\t\t\tz = euler.z;\n\t\t\tvar a = Math.cos(x),\n\t\t\t\t\tb = Math.sin(x);\n\t\t\tvar c = Math.cos(y),\n\t\t\t\t\td = Math.sin(y);\n\t\t\tvar e = Math.cos(z),\n\t\t\t\t\tf = Math.sin(z);\n\n\t\t\tif (euler.order === 'XYZ') {\n\t\t\t\tvar ae = a * e,\n\t\t\t\t\t\taf = a * f,\n\t\t\t\t\t\tbe = b * e,\n\t\t\t\t\t\tbf = b * f;\n\t\t\t\tte[0] = c * e;\n\t\t\t\tte[4] = -c * f;\n\t\t\t\tte[8] = d;\n\t\t\t\tte[1] = af + be * d;\n\t\t\t\tte[5] = ae - bf * d;\n\t\t\t\tte[9] = -b * c;\n\t\t\t\tte[2] = bf - ae * d;\n\t\t\t\tte[6] = be + af * d;\n\t\t\t\tte[10] = a * c;\n\t\t\t} else if (euler.order === 'YXZ') {\n\t\t\t\tvar ce = c * e,\n\t\t\t\t\t\tcf = c * f,\n\t\t\t\t\t\tde = d * e,\n\t\t\t\t\t\tdf = d * f;\n\t\t\t\tte[0] = ce + df * b;\n\t\t\t\tte[4] = de * b - cf;\n\t\t\t\tte[8] = a * d;\n\t\t\t\tte[1] = a * f;\n\t\t\t\tte[5] = a * e;\n\t\t\t\tte[9] = -b;\n\t\t\t\tte[2] = cf * b - de;\n\t\t\t\tte[6] = df + ce * b;\n\t\t\t\tte[10] = a * c;\n\t\t\t} else if (euler.order === 'ZXY') {\n\t\t\t\tvar _ce = c * e,\n\t\t\t\t\t\t_cf = c * f,\n\t\t\t\t\t\t_de = d * e,\n\t\t\t\t\t\t_df = d * f;\n\n\t\t\t\tte[0] = _ce - _df * b;\n\t\t\t\tte[4] = -a * f;\n\t\t\t\tte[8] = _de + _cf * b;\n\t\t\t\tte[1] = _cf + _de * b;\n\t\t\t\tte[5] = a * e;\n\t\t\t\tte[9] = _df - _ce * b;\n\t\t\t\tte[2] = -a * d;\n\t\t\t\tte[6] = b;\n\t\t\t\tte[10] = a * c;\n\t\t\t} else if (euler.order === 'ZYX') {\n\t\t\t\tvar _ae = a * e,\n\t\t\t\t\t\t_af = a * f,\n\t\t\t\t\t\t_be = b * e,\n\t\t\t\t\t\t_bf = b * f;\n\n\t\t\t\tte[0] = c * e;\n\t\t\t\tte[4] = _be * d - _af;\n\t\t\t\tte[8] = _ae * d + _bf;\n\t\t\t\tte[1] = c * f;\n\t\t\t\tte[5] = _bf * d + _ae;\n\t\t\t\tte[9] = _af * d - _be;\n\t\t\t\tte[2] = -d;\n\t\t\t\tte[6] = b * c;\n\t\t\t\tte[10] = a * c;\n\t\t\t} else if (euler.order === 'YZX') {\n\t\t\t\tvar ac = a * c,\n\t\t\t\t\t\tad = a * d,\n\t\t\t\t\t\tbc = b * c,\n\t\t\t\t\t\tbd = b * d;\n\t\t\t\tte[0] = c * e;\n\t\t\t\tte[4] = bd - ac * f;\n\t\t\t\tte[8] = bc * f + ad;\n\t\t\t\tte[1] = f;\n\t\t\t\tte[5] = a * e;\n\t\t\t\tte[9] = -b * e;\n\t\t\t\tte[2] = -d * e;\n\t\t\t\tte[6] = ad * f + bc;\n\t\t\t\tte[10] = ac - bd * f;\n\t\t\t} else if (euler.order === 'XZY') {\n\t\t\t\tvar _ac = a * c,\n\t\t\t\t\t\t_ad = a * d,\n\t\t\t\t\t\t_bc = b * c,\n\t\t\t\t\t\t_bd = b * d;\n\n\t\t\t\tte[0] = c * e;\n\t\t\t\tte[4] = -f;\n\t\t\t\tte[8] = d * e;\n\t\t\t\tte[1] = _ac * f + _bd;\n\t\t\t\tte[5] = a * e;\n\t\t\t\tte[9] = _ad * f - _bc;\n\t\t\t\tte[2] = _bc * f - _ad;\n\t\t\t\tte[6] = b * e;\n\t\t\t\tte[10] = _bd * f + _ac;\n\t\t\t} // bottom row\n\n\n\t\t\tte[3] = 0;\n\t\t\tte[7] = 0;\n\t\t\tte[11] = 0; // last column\n\n\t\t\tte[12] = 0;\n\t\t\tte[13] = 0;\n\t\t\tte[14] = 0;\n\t\t\tte[15] = 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationFromQuaternion = function makeRotationFromQuaternion(q) {\n\t\t\treturn this.compose(_zero, q, _one);\n\t\t};\n\n\t\t_proto.lookAt = function lookAt(eye, target, up) {\n\t\t\tvar te = this.elements;\n\n\t\t\t_z.subVectors(eye, target);\n\n\t\t\tif (_z.lengthSq() === 0) {\n\t\t\t\t// eye and target are in the same position\n\t\t\t\t_z.z = 1;\n\t\t\t}\n\n\t\t\t_z.normalize();\n\n\t\t\t_x.crossVectors(up, _z);\n\n\t\t\tif (_x.lengthSq() === 0) {\n\t\t\t\t// up and z are parallel\n\t\t\t\tif (Math.abs(up.z) === 1) {\n\t\t\t\t\t_z.x += 0.0001;\n\t\t\t\t} else {\n\t\t\t\t\t_z.z += 0.0001;\n\t\t\t\t}\n\n\t\t\t\t_z.normalize();\n\n\t\t\t\t_x.crossVectors(up, _z);\n\t\t\t}\n\n\t\t\t_x.normalize();\n\n\t\t\t_y.crossVectors(_z, _x);\n\n\t\t\tte[0] = _x.x;\n\t\t\tte[4] = _y.x;\n\t\t\tte[8] = _z.x;\n\t\t\tte[1] = _x.y;\n\t\t\tte[5] = _y.y;\n\t\t\tte[9] = _z.y;\n\t\t\tte[2] = _x.z;\n\t\t\tte[6] = _y.z;\n\t\t\tte[10] = _z.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(m, n) {\n\t\t\tif (n !== undefined) {\n\t\t\t\tconsole.warn('THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.');\n\t\t\t\treturn this.multiplyMatrices(m, n);\n\t\t\t}\n\n\t\t\treturn this.multiplyMatrices(this, m);\n\t\t};\n\n\t\t_proto.premultiply = function premultiply(m) {\n\t\t\treturn this.multiplyMatrices(m, this);\n\t\t};\n\n\t\t_proto.multiplyMatrices = function multiplyMatrices(a, b) {\n\t\t\tvar ae = a.elements;\n\t\t\tvar be = b.elements;\n\t\t\tvar te = this.elements;\n\t\t\tvar a11 = ae[0],\n\t\t\t\t\ta12 = ae[4],\n\t\t\t\t\ta13 = ae[8],\n\t\t\t\t\ta14 = ae[12];\n\t\t\tvar a21 = ae[1],\n\t\t\t\t\ta22 = ae[5],\n\t\t\t\t\ta23 = ae[9],\n\t\t\t\t\ta24 = ae[13];\n\t\t\tvar a31 = ae[2],\n\t\t\t\t\ta32 = ae[6],\n\t\t\t\t\ta33 = ae[10],\n\t\t\t\t\ta34 = ae[14];\n\t\t\tvar a41 = ae[3],\n\t\t\t\t\ta42 = ae[7],\n\t\t\t\t\ta43 = ae[11],\n\t\t\t\t\ta44 = ae[15];\n\t\t\tvar b11 = be[0],\n\t\t\t\t\tb12 = be[4],\n\t\t\t\t\tb13 = be[8],\n\t\t\t\t\tb14 = be[12];\n\t\t\tvar b21 = be[1],\n\t\t\t\t\tb22 = be[5],\n\t\t\t\t\tb23 = be[9],\n\t\t\t\t\tb24 = be[13];\n\t\t\tvar b31 = be[2],\n\t\t\t\t\tb32 = be[6],\n\t\t\t\t\tb33 = be[10],\n\t\t\t\t\tb34 = be[14];\n\t\t\tvar b41 = be[3],\n\t\t\t\t\tb42 = be[7],\n\t\t\t\t\tb43 = be[11],\n\t\t\t\t\tb44 = be[15];\n\t\t\tte[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n\t\t\tte[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n\t\t\tte[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n\t\t\tte[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n\t\t\tte[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n\t\t\tte[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n\t\t\tte[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n\t\t\tte[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n\t\t\tte[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n\t\t\tte[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n\t\t\tte[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n\t\t\tte[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n\t\t\tte[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n\t\t\tte[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n\t\t\tte[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n\t\t\tte[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(s) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] *= s;\n\t\t\tte[4] *= s;\n\t\t\tte[8] *= s;\n\t\t\tte[12] *= s;\n\t\t\tte[1] *= s;\n\t\t\tte[5] *= s;\n\t\t\tte[9] *= s;\n\t\t\tte[13] *= s;\n\t\t\tte[2] *= s;\n\t\t\tte[6] *= s;\n\t\t\tte[10] *= s;\n\t\t\tte[14] *= s;\n\t\t\tte[3] *= s;\n\t\t\tte[7] *= s;\n\t\t\tte[11] *= s;\n\t\t\tte[15] *= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.determinant = function determinant() {\n\t\t\tvar te = this.elements;\n\t\t\tvar n11 = te[0],\n\t\t\t\t\tn12 = te[4],\n\t\t\t\t\tn13 = te[8],\n\t\t\t\t\tn14 = te[12];\n\t\t\tvar n21 = te[1],\n\t\t\t\t\tn22 = te[5],\n\t\t\t\t\tn23 = te[9],\n\t\t\t\t\tn24 = te[13];\n\t\t\tvar n31 = te[2],\n\t\t\t\t\tn32 = te[6],\n\t\t\t\t\tn33 = te[10],\n\t\t\t\t\tn34 = te[14];\n\t\t\tvar n41 = te[3],\n\t\t\t\t\tn42 = te[7],\n\t\t\t\t\tn43 = te[11],\n\t\t\t\t\tn44 = te[15]; //TODO: make this more efficient\n\t\t\t//( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )\n\n\t\t\treturn n41 * (+n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34) + n42 * (+n11 * n23 * n34 - n11 * n24 * n33 + n14 * n21 * n33 - n13 * n21 * n34 + n13 * n24 * n31 - n14 * n23 * n31) + n43 * (+n11 * n24 * n32 - n11 * n22 * n34 - n14 * n21 * n32 + n12 * n21 * n34 + n14 * n22 * n31 - n12 * n24 * n31) + n44 * (-n13 * n22 * n31 - n11 * n23 * n32 + n11 * n22 * n33 + n13 * n21 * n32 - n12 * n21 * n33 + n12 * n23 * n31);\n\t\t};\n\n\t\t_proto.transpose = function transpose() {\n\t\t\tvar te = this.elements;\n\t\t\tvar tmp;\n\t\t\ttmp = te[1];\n\t\t\tte[1] = te[4];\n\t\t\tte[4] = tmp;\n\t\t\ttmp = te[2];\n\t\t\tte[2] = te[8];\n\t\t\tte[8] = tmp;\n\t\t\ttmp = te[6];\n\t\t\tte[6] = te[9];\n\t\t\tte[9] = tmp;\n\t\t\ttmp = te[3];\n\t\t\tte[3] = te[12];\n\t\t\tte[12] = tmp;\n\t\t\ttmp = te[7];\n\t\t\tte[7] = te[13];\n\t\t\tte[13] = tmp;\n\t\t\ttmp = te[11];\n\t\t\tte[11] = te[14];\n\t\t\tte[14] = tmp;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setPosition = function setPosition(x, y, z) {\n\t\t\tvar te = this.elements;\n\n\t\t\tif (x.isVector3) {\n\t\t\t\tte[12] = x.x;\n\t\t\t\tte[13] = x.y;\n\t\t\t\tte[14] = x.z;\n\t\t\t} else {\n\t\t\t\tte[12] = x;\n\t\t\t\tte[13] = y;\n\t\t\t\tte[14] = z;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.invert = function invert() {\n\t\t\t// based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n\t\t\tvar te = this.elements,\n\t\t\t\t\tn11 = te[0],\n\t\t\t\t\tn21 = te[1],\n\t\t\t\t\tn31 = te[2],\n\t\t\t\t\tn41 = te[3],\n\t\t\t\t\tn12 = te[4],\n\t\t\t\t\tn22 = te[5],\n\t\t\t\t\tn32 = te[6],\n\t\t\t\t\tn42 = te[7],\n\t\t\t\t\tn13 = te[8],\n\t\t\t\t\tn23 = te[9],\n\t\t\t\t\tn33 = te[10],\n\t\t\t\t\tn43 = te[11],\n\t\t\t\t\tn14 = te[12],\n\t\t\t\t\tn24 = te[13],\n\t\t\t\t\tn34 = te[14],\n\t\t\t\t\tn44 = te[15],\n\t\t\t\t\tt11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44,\n\t\t\t\t\tt12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44,\n\t\t\t\t\tt13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44,\n\t\t\t\t\tt14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n\t\t\tvar det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\n\t\t\tif (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n\t\t\tvar detInv = 1 / det;\n\t\t\tte[0] = t11 * detInv;\n\t\t\tte[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv;\n\t\t\tte[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv;\n\t\t\tte[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv;\n\t\t\tte[4] = t12 * detInv;\n\t\t\tte[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv;\n\t\t\tte[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv;\n\t\t\tte[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv;\n\t\t\tte[8] = t13 * detInv;\n\t\t\tte[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv;\n\t\t\tte[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv;\n\t\t\tte[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv;\n\t\t\tte[12] = t14 * detInv;\n\t\t\tte[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv;\n\t\t\tte[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv;\n\t\t\tte[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.scale = function scale(v) {\n\t\t\tvar te = this.elements;\n\t\t\tvar x = v.x,\n\t\t\t\t\ty = v.y,\n\t\t\t\t\tz = v.z;\n\t\t\tte[0] *= x;\n\t\t\tte[4] *= y;\n\t\t\tte[8] *= z;\n\t\t\tte[1] *= x;\n\t\t\tte[5] *= y;\n\t\t\tte[9] *= z;\n\t\t\tte[2] *= x;\n\t\t\tte[6] *= y;\n\t\t\tte[10] *= z;\n\t\t\tte[3] *= x;\n\t\t\tte[7] *= y;\n\t\t\tte[11] *= z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getMaxScaleOnAxis = function getMaxScaleOnAxis() {\n\t\t\tvar te = this.elements;\n\t\t\tvar scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2];\n\t\t\tvar scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6];\n\t\t\tvar scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10];\n\t\t\treturn Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n\t\t};\n\n\t\t_proto.makeTranslation = function makeTranslation(x, y, z) {\n\t\t\tthis.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationX = function makeRotationX(theta) {\n\t\t\tvar c = Math.cos(theta),\n\t\t\t\t\ts = Math.sin(theta);\n\t\t\tthis.set(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationY = function makeRotationY(theta) {\n\t\t\tvar c = Math.cos(theta),\n\t\t\t\t\ts = Math.sin(theta);\n\t\t\tthis.set(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationZ = function makeRotationZ(theta) {\n\t\t\tvar c = Math.cos(theta),\n\t\t\t\t\ts = Math.sin(theta);\n\t\t\tthis.set(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationAxis = function makeRotationAxis(axis, angle) {\n\t\t\t// Based on http://www.gamedev.net/reference/articles/article1199.asp\n\t\t\tvar c = Math.cos(angle);\n\t\t\tvar s = Math.sin(angle);\n\t\t\tvar t = 1 - c;\n\t\t\tvar x = axis.x,\n\t\t\t\t\ty = axis.y,\n\t\t\t\t\tz = axis.z;\n\t\t\tvar tx = t * x,\n\t\t\t\t\tty = t * y;\n\t\t\tthis.set(tx * x + c, tx * y - s * z, tx * z + s * y, 0, tx * y + s * z, ty * y + c, ty * z - s * x, 0, tx * z - s * y, ty * z + s * x, t * z * z + c, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeScale = function makeScale(x, y, z) {\n\t\t\tthis.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeShear = function makeShear(x, y, z) {\n\t\t\tthis.set(1, y, z, 0, x, 1, z, 0, x, y, 1, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.compose = function compose(position, quaternion, scale) {\n\t\t\tvar te = this.elements;\n\t\t\tvar x = quaternion._x,\n\t\t\t\t\ty = quaternion._y,\n\t\t\t\t\tz = quaternion._z,\n\t\t\t\t\tw = quaternion._w;\n\t\t\tvar x2 = x + x,\n\t\t\t\t\ty2 = y + y,\n\t\t\t\t\tz2 = z + z;\n\t\t\tvar xx = x * x2,\n\t\t\t\t\txy = x * y2,\n\t\t\t\t\txz = x * z2;\n\t\t\tvar yy = y * y2,\n\t\t\t\t\tyz = y * z2,\n\t\t\t\t\tzz = z * z2;\n\t\t\tvar wx = w * x2,\n\t\t\t\t\twy = w * y2,\n\t\t\t\t\twz = w * z2;\n\t\t\tvar sx = scale.x,\n\t\t\t\t\tsy = scale.y,\n\t\t\t\t\tsz = scale.z;\n\t\t\tte[0] = (1 - (yy + zz)) * sx;\n\t\t\tte[1] = (xy + wz) * sx;\n\t\t\tte[2] = (xz - wy) * sx;\n\t\t\tte[3] = 0;\n\t\t\tte[4] = (xy - wz) * sy;\n\t\t\tte[5] = (1 - (xx + zz)) * sy;\n\t\t\tte[6] = (yz + wx) * sy;\n\t\t\tte[7] = 0;\n\t\t\tte[8] = (xz + wy) * sz;\n\t\t\tte[9] = (yz - wx) * sz;\n\t\t\tte[10] = (1 - (xx + yy)) * sz;\n\t\t\tte[11] = 0;\n\t\t\tte[12] = position.x;\n\t\t\tte[13] = position.y;\n\t\t\tte[14] = position.z;\n\t\t\tte[15] = 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.decompose = function decompose(position, quaternion, scale) {\n\t\t\tvar te = this.elements;\n\n\t\t\tvar sx = _v1$1.set(te[0], te[1], te[2]).length();\n\n\t\t\tvar sy = _v1$1.set(te[4], te[5], te[6]).length();\n\n\t\t\tvar sz = _v1$1.set(te[8], te[9], te[10]).length(); // if determine is negative, we need to invert one scale\n\n\n\t\t\tvar det = this.determinant();\n\t\t\tif (det < 0) sx = -sx;\n\t\t\tposition.x = te[12];\n\t\t\tposition.y = te[13];\n\t\t\tposition.z = te[14]; // scale the rotation part\n\n\t\t\t_m1.copy(this);\n\n\t\t\tvar invSX = 1 / sx;\n\t\t\tvar invSY = 1 / sy;\n\t\t\tvar invSZ = 1 / sz;\n\t\t\t_m1.elements[0] *= invSX;\n\t\t\t_m1.elements[1] *= invSX;\n\t\t\t_m1.elements[2] *= invSX;\n\t\t\t_m1.elements[4] *= invSY;\n\t\t\t_m1.elements[5] *= invSY;\n\t\t\t_m1.elements[6] *= invSY;\n\t\t\t_m1.elements[8] *= invSZ;\n\t\t\t_m1.elements[9] *= invSZ;\n\t\t\t_m1.elements[10] *= invSZ;\n\t\t\tquaternion.setFromRotationMatrix(_m1);\n\t\t\tscale.x = sx;\n\t\t\tscale.y = sy;\n\t\t\tscale.z = sz;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makePerspective = function makePerspective(left, right, top, bottom, near, far) {\n\t\t\tif (far === undefined) {\n\t\t\t\tconsole.warn('THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.');\n\t\t\t}\n\n\t\t\tvar te = this.elements;\n\t\t\tvar x = 2 * near / (right - left);\n\t\t\tvar y = 2 * near / (top - bottom);\n\t\t\tvar a = (right + left) / (right - left);\n\t\t\tvar b = (top + bottom) / (top - bottom);\n\t\t\tvar c = -(far + near) / (far - near);\n\t\t\tvar d = -2 * far * near / (far - near);\n\t\t\tte[0] = x;\n\t\t\tte[4] = 0;\n\t\t\tte[8] = a;\n\t\t\tte[12] = 0;\n\t\t\tte[1] = 0;\n\t\t\tte[5] = y;\n\t\t\tte[9] = b;\n\t\t\tte[13] = 0;\n\t\t\tte[2] = 0;\n\t\t\tte[6] = 0;\n\t\t\tte[10] = c;\n\t\t\tte[14] = d;\n\t\t\tte[3] = 0;\n\t\t\tte[7] = 0;\n\t\t\tte[11] = -1;\n\t\t\tte[15] = 0;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeOrthographic = function makeOrthographic(left, right, top, bottom, near, far) {\n\t\t\tvar te = this.elements;\n\t\t\tvar w = 1.0 / (right - left);\n\t\t\tvar h = 1.0 / (top - bottom);\n\t\t\tvar p = 1.0 / (far - near);\n\t\t\tvar x = (right + left) * w;\n\t\t\tvar y = (top + bottom) * h;\n\t\t\tvar z = (far + near) * p;\n\t\t\tte[0] = 2 * w;\n\t\t\tte[4] = 0;\n\t\t\tte[8] = 0;\n\t\t\tte[12] = -x;\n\t\t\tte[1] = 0;\n\t\t\tte[5] = 2 * h;\n\t\t\tte[9] = 0;\n\t\t\tte[13] = -y;\n\t\t\tte[2] = 0;\n\t\t\tte[6] = 0;\n\t\t\tte[10] = -2 * p;\n\t\t\tte[14] = -z;\n\t\t\tte[3] = 0;\n\t\t\tte[7] = 0;\n\t\t\tte[11] = 0;\n\t\t\tte[15] = 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(matrix) {\n\t\t\tvar te = this.elements;\n\t\t\tvar me = matrix.elements;\n\n\t\t\tfor (var i = 0; i < 16; i++) {\n\t\t\t\tif (te[i] !== me[i]) return false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < 16; i++) {\n\t\t\t\tthis.elements[i] = array[i + offset];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tvar te = this.elements;\n\t\t\tarray[offset] = te[0];\n\t\t\tarray[offset + 1] = te[1];\n\t\t\tarray[offset + 2] = te[2];\n\t\t\tarray[offset + 3] = te[3];\n\t\t\tarray[offset + 4] = te[4];\n\t\t\tarray[offset + 5] = te[5];\n\t\t\tarray[offset + 6] = te[6];\n\t\t\tarray[offset + 7] = te[7];\n\t\t\tarray[offset + 8] = te[8];\n\t\t\tarray[offset + 9] = te[9];\n\t\t\tarray[offset + 10] = te[10];\n\t\t\tarray[offset + 11] = te[11];\n\t\t\tarray[offset + 12] = te[12];\n\t\t\tarray[offset + 13] = te[13];\n\t\t\tarray[offset + 14] = te[14];\n\t\t\tarray[offset + 15] = te[15];\n\t\t\treturn array;\n\t\t};\n\n\t\treturn Matrix4;\n\t}();\n\n\tvar _v1$1 = /*@__PURE__*/new Vector3();\n\n\tvar _m1 = /*@__PURE__*/new Matrix4();\n\n\tvar _zero = /*@__PURE__*/new Vector3(0, 0, 0);\n\n\tvar _one = /*@__PURE__*/new Vector3(1, 1, 1);\n\n\tvar _x = /*@__PURE__*/new Vector3();\n\n\tvar _y = /*@__PURE__*/new Vector3();\n\n\tvar _z = /*@__PURE__*/new Vector3();\n\n\tvar Euler = /*#__PURE__*/function () {\n\t\tfunction Euler(x, y, z, order) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tif (z === void 0) {\n\t\t\t\tz = 0;\n\t\t\t}\n\n\t\t\tif (order === void 0) {\n\t\t\t\torder = Euler.DefaultOrder;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isEuler', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\t\t\tthis._order = order;\n\t\t}\n\n\t\tvar _proto = Euler.prototype;\n\n\t\t_proto.set = function set(x, y, z, order) {\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\t\t\tthis._order = order || this._order;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this._x, this._y, this._z, this._order);\n\t\t};\n\n\t\t_proto.copy = function copy(euler) {\n\t\t\tthis._x = euler._x;\n\t\t\tthis._y = euler._y;\n\t\t\tthis._z = euler._z;\n\t\t\tthis._order = euler._order;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromRotationMatrix = function setFromRotationMatrix(m, order, update) {\n\t\t\tvar clamp = MathUtils.clamp; // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\t\tvar te = m.elements;\n\t\t\tvar m11 = te[0],\n\t\t\t\t\tm12 = te[4],\n\t\t\t\t\tm13 = te[8];\n\t\t\tvar m21 = te[1],\n\t\t\t\t\tm22 = te[5],\n\t\t\t\t\tm23 = te[9];\n\t\t\tvar m31 = te[2],\n\t\t\t\t\tm32 = te[6],\n\t\t\t\t\tm33 = te[10];\n\t\t\torder = order || this._order;\n\n\t\t\tswitch (order) {\n\t\t\t\tcase 'XYZ':\n\t\t\t\t\tthis._y = Math.asin(clamp(m13, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m13) < 0.9999999) {\n\t\t\t\t\t\tthis._x = Math.atan2(-m23, m33);\n\t\t\t\t\t\tthis._z = Math.atan2(-m12, m11);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._x = Math.atan2(m32, m22);\n\t\t\t\t\t\tthis._z = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YXZ':\n\t\t\t\t\tthis._x = Math.asin(-clamp(m23, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m23) < 0.9999999) {\n\t\t\t\t\t\tthis._y = Math.atan2(m13, m33);\n\t\t\t\t\t\tthis._z = Math.atan2(m21, m22);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._y = Math.atan2(-m31, m11);\n\t\t\t\t\t\tthis._z = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZXY':\n\t\t\t\t\tthis._x = Math.asin(clamp(m32, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m32) < 0.9999999) {\n\t\t\t\t\t\tthis._y = Math.atan2(-m31, m33);\n\t\t\t\t\t\tthis._z = Math.atan2(-m12, m22);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._y = 0;\n\t\t\t\t\t\tthis._z = Math.atan2(m21, m11);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZYX':\n\t\t\t\t\tthis._y = Math.asin(-clamp(m31, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m31) < 0.9999999) {\n\t\t\t\t\t\tthis._x = Math.atan2(m32, m33);\n\t\t\t\t\t\tthis._z = Math.atan2(m21, m11);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._x = 0;\n\t\t\t\t\t\tthis._z = Math.atan2(-m12, m22);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YZX':\n\t\t\t\t\tthis._z = Math.asin(clamp(m21, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m21) < 0.9999999) {\n\t\t\t\t\t\tthis._x = Math.atan2(-m23, m22);\n\t\t\t\t\t\tthis._y = Math.atan2(-m31, m11);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._x = 0;\n\t\t\t\t\t\tthis._y = Math.atan2(m13, m33);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'XZY':\n\t\t\t\t\tthis._z = Math.asin(-clamp(m12, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m12) < 0.9999999) {\n\t\t\t\t\t\tthis._x = Math.atan2(m32, m22);\n\t\t\t\t\t\tthis._y = Math.atan2(m13, m11);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._x = Math.atan2(-m23, m33);\n\t\t\t\t\t\tthis._y = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.warn('THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order);\n\t\t\t}\n\n\t\t\tthis._order = order;\n\t\t\tif (update !== false) this._onChangeCallback();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromQuaternion = function setFromQuaternion(q, order, update) {\n\t\t\t_matrix.makeRotationFromQuaternion(q);\n\n\t\t\treturn this.setFromRotationMatrix(_matrix, order, update);\n\t\t};\n\n\t\t_proto.setFromVector3 = function setFromVector3(v, order) {\n\t\t\treturn this.set(v.x, v.y, v.z, order || this._order);\n\t\t};\n\n\t\t_proto.reorder = function reorder(newOrder) {\n\t\t\t// WARNING: this discards revolution information -bhouston\n\t\t\t_quaternion$1.setFromEuler(this);\n\n\t\t\treturn this.setFromQuaternion(_quaternion$1, newOrder);\n\t\t};\n\n\t\t_proto.equals = function equals(euler) {\n\t\t\treturn euler._x === this._x && euler._y === this._y && euler._z === this._z && euler._order === this._order;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array) {\n\t\t\tthis._x = array[0];\n\t\t\tthis._y = array[1];\n\t\t\tthis._z = array[2];\n\t\t\tif (array[3] !== undefined) this._order = array[3];\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this._x;\n\t\t\tarray[offset + 1] = this._y;\n\t\t\tarray[offset + 2] = this._z;\n\t\t\tarray[offset + 3] = this._order;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.toVector3 = function toVector3(optionalResult) {\n\t\t\tif (optionalResult) {\n\t\t\t\treturn optionalResult.set(this._x, this._y, this._z);\n\t\t\t} else {\n\t\t\t\treturn new Vector3(this._x, this._y, this._z);\n\t\t\t}\n\t\t};\n\n\t\t_proto._onChange = function _onChange(callback) {\n\t\t\tthis._onChangeCallback = callback;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto._onChangeCallback = function _onChangeCallback() {};\n\n\t\t_createClass(Euler, [{\n\t\t\tkey: \"x\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._x;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._x = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"y\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._y;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._y = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"z\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._z;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._z = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"order\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._order;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._order = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}]);\n\n\t\treturn Euler;\n\t}();\n\n\tEuler.DefaultOrder = 'XYZ';\n\tEuler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX'];\n\n\tvar _matrix = /*@__PURE__*/new Matrix4();\n\n\tvar _quaternion$1 = /*@__PURE__*/new Quaternion();\n\n\tvar Layers = /*#__PURE__*/function () {\n\t\tfunction Layers() {\n\t\t\tthis.mask = 1 | 0;\n\t\t}\n\n\t\tvar _proto = Layers.prototype;\n\n\t\t_proto.set = function set(channel) {\n\t\t\tthis.mask = 1 << channel | 0;\n\t\t};\n\n\t\t_proto.enable = function enable(channel) {\n\t\t\tthis.mask |= 1 << channel | 0;\n\t\t};\n\n\t\t_proto.enableAll = function enableAll() {\n\t\t\tthis.mask = 0xffffffff | 0;\n\t\t};\n\n\t\t_proto.toggle = function toggle(channel) {\n\t\t\tthis.mask ^= 1 << channel | 0;\n\t\t};\n\n\t\t_proto.disable = function disable(channel) {\n\t\t\tthis.mask &= ~(1 << channel | 0);\n\t\t};\n\n\t\t_proto.disableAll = function disableAll() {\n\t\t\tthis.mask = 0;\n\t\t};\n\n\t\t_proto.test = function test(layers) {\n\t\t\treturn (this.mask & layers.mask) !== 0;\n\t\t};\n\n\t\treturn Layers;\n\t}();\n\n\tvar _object3DId = 0;\n\n\tvar _v1$2 = new Vector3();\n\n\tvar _q1 = new Quaternion();\n\n\tvar _m1$1 = new Matrix4();\n\n\tvar _target = new Vector3();\n\n\tvar _position = new Vector3();\n\n\tvar _scale = new Vector3();\n\n\tvar _quaternion$2 = new Quaternion();\n\n\tvar _xAxis = new Vector3(1, 0, 0);\n\n\tvar _yAxis = new Vector3(0, 1, 0);\n\n\tvar _zAxis = new Vector3(0, 0, 1);\n\n\tvar _addedEvent = {\n\t\ttype: 'added'\n\t};\n\tvar _removedEvent = {\n\t\ttype: 'removed'\n\t};\n\n\tfunction Object3D() {\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tvalue: _object3DId++\n\t\t});\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.name = '';\n\t\tthis.type = 'Object3D';\n\t\tthis.parent = null;\n\t\tthis.children = [];\n\t\tthis.up = Object3D.DefaultUp.clone();\n\t\tvar position = new Vector3();\n\t\tvar rotation = new Euler();\n\t\tvar quaternion = new Quaternion();\n\t\tvar scale = new Vector3(1, 1, 1);\n\n\t\tfunction onRotationChange() {\n\t\t\tquaternion.setFromEuler(rotation, false);\n\t\t}\n\n\t\tfunction onQuaternionChange() {\n\t\t\trotation.setFromQuaternion(quaternion, undefined, false);\n\t\t}\n\n\t\trotation._onChange(onRotationChange);\n\n\t\tquaternion._onChange(onQuaternionChange);\n\n\t\tObject.defineProperties(this, {\n\t\t\tposition: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: position\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: rotation\n\t\t\t},\n\t\t\tquaternion: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: quaternion\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: scale\n\t\t\t},\n\t\t\tmodelViewMatrix: {\n\t\t\t\tvalue: new Matrix4()\n\t\t\t},\n\t\t\tnormalMatrix: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t});\n\t\tthis.matrix = new Matrix4();\n\t\tthis.matrixWorld = new Matrix4();\n\t\tthis.matrixAutoUpdate = Object3D.DefaultMatrixAutoUpdate;\n\t\tthis.matrixWorldNeedsUpdate = false;\n\t\tthis.layers = new Layers();\n\t\tthis.visible = true;\n\t\tthis.castShadow = false;\n\t\tthis.receiveShadow = false;\n\t\tthis.frustumCulled = true;\n\t\tthis.renderOrder = 0;\n\t\tthis.animations = [];\n\t\tthis.userData = {};\n\t}\n\n\tObject3D.DefaultUp = new Vector3(0, 1, 0);\n\tObject3D.DefaultMatrixAutoUpdate = true;\n\tObject3D.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: Object3D,\n\t\tisObject3D: true,\n\t\tonBeforeRender: function onBeforeRender() {},\n\t\tonAfterRender: function onAfterRender() {},\n\t\tapplyMatrix4: function applyMatrix4(matrix) {\n\t\t\tif (this.matrixAutoUpdate) this.updateMatrix();\n\t\t\tthis.matrix.premultiply(matrix);\n\t\t\tthis.matrix.decompose(this.position, this.quaternion, this.scale);\n\t\t},\n\t\tapplyQuaternion: function applyQuaternion(q) {\n\t\t\tthis.quaternion.premultiply(q);\n\t\t\treturn this;\n\t\t},\n\t\tsetRotationFromAxisAngle: function setRotationFromAxisAngle(axis, angle) {\n\t\t\t// assumes axis is normalized\n\t\t\tthis.quaternion.setFromAxisAngle(axis, angle);\n\t\t},\n\t\tsetRotationFromEuler: function setRotationFromEuler(euler) {\n\t\t\tthis.quaternion.setFromEuler(euler, true);\n\t\t},\n\t\tsetRotationFromMatrix: function setRotationFromMatrix(m) {\n\t\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\t\t\tthis.quaternion.setFromRotationMatrix(m);\n\t\t},\n\t\tsetRotationFromQuaternion: function setRotationFromQuaternion(q) {\n\t\t\t// assumes q is normalized\n\t\t\tthis.quaternion.copy(q);\n\t\t},\n\t\trotateOnAxis: function rotateOnAxis(axis, angle) {\n\t\t\t// rotate object on axis in object space\n\t\t\t// axis is assumed to be normalized\n\t\t\t_q1.setFromAxisAngle(axis, angle);\n\n\t\t\tthis.quaternion.multiply(_q1);\n\t\t\treturn this;\n\t\t},\n\t\trotateOnWorldAxis: function rotateOnWorldAxis(axis, angle) {\n\t\t\t// rotate object on axis in world space\n\t\t\t// axis is assumed to be normalized\n\t\t\t// method assumes no rotated parent\n\t\t\t_q1.setFromAxisAngle(axis, angle);\n\n\t\t\tthis.quaternion.premultiply(_q1);\n\t\t\treturn this;\n\t\t},\n\t\trotateX: function rotateX(angle) {\n\t\t\treturn this.rotateOnAxis(_xAxis, angle);\n\t\t},\n\t\trotateY: function rotateY(angle) {\n\t\t\treturn this.rotateOnAxis(_yAxis, angle);\n\t\t},\n\t\trotateZ: function rotateZ(angle) {\n\t\t\treturn this.rotateOnAxis(_zAxis, angle);\n\t\t},\n\t\ttranslateOnAxis: function translateOnAxis(axis, distance) {\n\t\t\t// translate object by distance along axis in object space\n\t\t\t// axis is assumed to be normalized\n\t\t\t_v1$2.copy(axis).applyQuaternion(this.quaternion);\n\n\t\t\tthis.position.add(_v1$2.multiplyScalar(distance));\n\t\t\treturn this;\n\t\t},\n\t\ttranslateX: function translateX(distance) {\n\t\t\treturn this.translateOnAxis(_xAxis, distance);\n\t\t},\n\t\ttranslateY: function translateY(distance) {\n\t\t\treturn this.translateOnAxis(_yAxis, distance);\n\t\t},\n\t\ttranslateZ: function translateZ(distance) {\n\t\t\treturn this.translateOnAxis(_zAxis, distance);\n\t\t},\n\t\tlocalToWorld: function localToWorld(vector) {\n\t\t\treturn vector.applyMatrix4(this.matrixWorld);\n\t\t},\n\t\tworldToLocal: function worldToLocal(vector) {\n\t\t\treturn vector.applyMatrix4(_m1$1.copy(this.matrixWorld).invert());\n\t\t},\n\t\tlookAt: function lookAt(x, y, z) {\n\t\t\t// This method does not support objects having non-uniformly-scaled parent(s)\n\t\t\tif (x.isVector3) {\n\t\t\t\t_target.copy(x);\n\t\t\t} else {\n\t\t\t\t_target.set(x, y, z);\n\t\t\t}\n\n\t\t\tvar parent = this.parent;\n\t\t\tthis.updateWorldMatrix(true, false);\n\n\t\t\t_position.setFromMatrixPosition(this.matrixWorld);\n\n\t\t\tif (this.isCamera || this.isLight) {\n\t\t\t\t_m1$1.lookAt(_position, _target, this.up);\n\t\t\t} else {\n\t\t\t\t_m1$1.lookAt(_target, _position, this.up);\n\t\t\t}\n\n\t\t\tthis.quaternion.setFromRotationMatrix(_m1$1);\n\n\t\t\tif (parent) {\n\t\t\t\t_m1$1.extractRotation(parent.matrixWorld);\n\n\t\t\t\t_q1.setFromRotationMatrix(_m1$1);\n\n\t\t\t\tthis.quaternion.premultiply(_q1.invert());\n\t\t\t}\n\t\t},\n\t\tadd: function add(object) {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\t\t\tthis.add(arguments[i]);\n\t\t\t\t}\n\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (object === this) {\n\t\t\t\tconsole.error('THREE.Object3D.add: object can\\'t be added as a child of itself.', object);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (object && object.isObject3D) {\n\t\t\t\tif (object.parent !== null) {\n\t\t\t\t\tobject.parent.remove(object);\n\t\t\t\t}\n\n\t\t\t\tobject.parent = this;\n\t\t\t\tthis.children.push(object);\n\t\t\t\tobject.dispatchEvent(_addedEvent);\n\t\t\t} else {\n\t\t\t\tconsole.error('THREE.Object3D.add: object not an instance of THREE.Object3D.', object);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tremove: function remove(object) {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\t\t\tthis.remove(arguments[i]);\n\t\t\t\t}\n\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar index = this.children.indexOf(object);\n\n\t\t\tif (index !== -1) {\n\t\t\t\tobject.parent = null;\n\t\t\t\tthis.children.splice(index, 1);\n\t\t\t\tobject.dispatchEvent(_removedEvent);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tclear: function clear() {\n\t\t\tfor (var i = 0; i < this.children.length; i++) {\n\t\t\t\tvar object = this.children[i];\n\t\t\t\tobject.parent = null;\n\t\t\t\tobject.dispatchEvent(_removedEvent);\n\t\t\t}\n\n\t\t\tthis.children.length = 0;\n\t\t\treturn this;\n\t\t},\n\t\tattach: function attach(object) {\n\t\t\t// adds object as a child of this, while maintaining the object's world transform\n\t\t\tthis.updateWorldMatrix(true, false);\n\n\t\t\t_m1$1.copy(this.matrixWorld).invert();\n\n\t\t\tif (object.parent !== null) {\n\t\t\t\tobject.parent.updateWorldMatrix(true, false);\n\n\t\t\t\t_m1$1.multiply(object.parent.matrixWorld);\n\t\t\t}\n\n\t\t\tobject.applyMatrix4(_m1$1);\n\t\t\tobject.updateWorldMatrix(false, false);\n\t\t\tthis.add(object);\n\t\t\treturn this;\n\t\t},\n\t\tgetObjectById: function getObjectById(id) {\n\t\t\treturn this.getObjectByProperty('id', id);\n\t\t},\n\t\tgetObjectByName: function getObjectByName(name) {\n\t\t\treturn this.getObjectByProperty('name', name);\n\t\t},\n\t\tgetObjectByProperty: function getObjectByProperty(name, value) {\n\t\t\tif (this[name] === value) return this;\n\n\t\t\tfor (var i = 0, l = this.children.length; i < l; i++) {\n\t\t\t\tvar child = this.children[i];\n\t\t\t\tvar object = child.getObjectByProperty(name, value);\n\n\t\t\t\tif (object !== undefined) {\n\t\t\t\t\treturn object;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t},\n\t\tgetWorldPosition: function getWorldPosition(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Object3D: .getWorldPosition() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\treturn target.setFromMatrixPosition(this.matrixWorld);\n\t\t},\n\t\tgetWorldQuaternion: function getWorldQuaternion(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Object3D: .getWorldQuaternion() target is now required');\n\t\t\t\ttarget = new Quaternion();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\tthis.matrixWorld.decompose(_position, target, _scale);\n\t\t\treturn target;\n\t\t},\n\t\tgetWorldScale: function getWorldScale(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Object3D: .getWorldScale() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\tthis.matrixWorld.decompose(_position, _quaternion$2, target);\n\t\t\treturn target;\n\t\t},\n\t\tgetWorldDirection: function getWorldDirection(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Object3D: .getWorldDirection() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\tvar e = this.matrixWorld.elements;\n\t\t\treturn target.set(e[8], e[9], e[10]).normalize();\n\t\t},\n\t\traycast: function raycast() {},\n\t\ttraverse: function traverse(callback) {\n\t\t\tcallback(this);\n\t\t\tvar children = this.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tchildren[i].traverse(callback);\n\t\t\t}\n\t\t},\n\t\ttraverseVisible: function traverseVisible(callback) {\n\t\t\tif (this.visible === false) return;\n\t\t\tcallback(this);\n\t\t\tvar children = this.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tchildren[i].traverseVisible(callback);\n\t\t\t}\n\t\t},\n\t\ttraverseAncestors: function traverseAncestors(callback) {\n\t\t\tvar parent = this.parent;\n\n\t\t\tif (parent !== null) {\n\t\t\t\tcallback(parent);\n\t\t\t\tparent.traverseAncestors(callback);\n\t\t\t}\n\t\t},\n\t\tupdateMatrix: function updateMatrix() {\n\t\t\tthis.matrix.compose(this.position, this.quaternion, this.scale);\n\t\t\tthis.matrixWorldNeedsUpdate = true;\n\t\t},\n\t\tupdateMatrixWorld: function updateMatrixWorld(force) {\n\t\t\tif (this.matrixAutoUpdate) this.updateMatrix();\n\n\t\t\tif (this.matrixWorldNeedsUpdate || force) {\n\t\t\t\tif (this.parent === null) {\n\t\t\t\t\tthis.matrixWorld.copy(this.matrix);\n\t\t\t\t} else {\n\t\t\t\t\tthis.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix);\n\t\t\t\t}\n\n\t\t\t\tthis.matrixWorldNeedsUpdate = false;\n\t\t\t\tforce = true;\n\t\t\t} // update children\n\n\n\t\t\tvar children = this.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tchildren[i].updateMatrixWorld(force);\n\t\t\t}\n\t\t},\n\t\tupdateWorldMatrix: function updateWorldMatrix(updateParents, updateChildren) {\n\t\t\tvar parent = this.parent;\n\n\t\t\tif (updateParents === true && parent !== null) {\n\t\t\t\tparent.updateWorldMatrix(true, false);\n\t\t\t}\n\n\t\t\tif (this.matrixAutoUpdate) this.updateMatrix();\n\n\t\t\tif (this.parent === null) {\n\t\t\t\tthis.matrixWorld.copy(this.matrix);\n\t\t\t} else {\n\t\t\t\tthis.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix);\n\t\t\t} // update children\n\n\n\t\t\tif (updateChildren === true) {\n\t\t\t\tvar children = this.children;\n\n\t\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\tchildren[i].updateWorldMatrix(false, true);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\t// meta is a string when called from JSON.stringify\n\t\t\tvar isRootObject = meta === undefined || typeof meta === 'string';\n\t\t\tvar output = {}; // meta is a hash used to collect geometries, materials.\n\t\t\t// not providing it implies that this is the root object\n\t\t\t// being serialized.\n\n\t\t\tif (isRootObject) {\n\t\t\t\t// initialize meta obj\n\t\t\t\tmeta = {\n\t\t\t\t\tgeometries: {},\n\t\t\t\t\tmaterials: {},\n\t\t\t\t\ttextures: {},\n\t\t\t\t\timages: {},\n\t\t\t\t\tshapes: {},\n\t\t\t\t\tskeletons: {},\n\t\t\t\t\tanimations: {}\n\t\t\t\t};\n\t\t\t\toutput.metadata = {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Object',\n\t\t\t\t\tgenerator: 'Object3D.toJSON'\n\t\t\t\t};\n\t\t\t} // standard Object3D serialization\n\n\n\t\t\tvar object = {};\n\t\t\tobject.uuid = this.uuid;\n\t\t\tobject.type = this.type;\n\t\t\tif (this.name !== '') object.name = this.name;\n\t\t\tif (this.castShadow === true) object.castShadow = true;\n\t\t\tif (this.receiveShadow === true) object.receiveShadow = true;\n\t\t\tif (this.visible === false) object.visible = false;\n\t\t\tif (this.frustumCulled === false) object.frustumCulled = false;\n\t\t\tif (this.renderOrder !== 0) object.renderOrder = this.renderOrder;\n\t\t\tif (JSON.stringify(this.userData) !== '{}') object.userData = this.userData;\n\t\t\tobject.layers = this.layers.mask;\n\t\t\tobject.matrix = this.matrix.toArray();\n\t\t\tif (this.matrixAutoUpdate === false) object.matrixAutoUpdate = false; // object specific properties\n\n\t\t\tif (this.isInstancedMesh) {\n\t\t\t\tobject.type = 'InstancedMesh';\n\t\t\t\tobject.count = this.count;\n\t\t\t\tobject.instanceMatrix = this.instanceMatrix.toJSON();\n\t\t\t} //\n\n\n\t\t\tfunction serialize(library, element) {\n\t\t\t\tif (library[element.uuid] === undefined) {\n\t\t\t\t\tlibrary[element.uuid] = element.toJSON(meta);\n\t\t\t\t}\n\n\t\t\t\treturn element.uuid;\n\t\t\t}\n\n\t\t\tif (this.isMesh || this.isLine || this.isPoints) {\n\t\t\t\tobject.geometry = serialize(meta.geometries, this.geometry);\n\t\t\t\tvar parameters = this.geometry.parameters;\n\n\t\t\t\tif (parameters !== undefined && parameters.shapes !== undefined) {\n\t\t\t\t\tvar shapes = parameters.shapes;\n\n\t\t\t\t\tif (Array.isArray(shapes)) {\n\t\t\t\t\t\tfor (var i = 0, l = shapes.length; i < l; i++) {\n\t\t\t\t\t\t\tvar shape = shapes[i];\n\t\t\t\t\t\t\tserialize(meta.shapes, shape);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tserialize(meta.shapes, shapes);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.isSkinnedMesh) {\n\t\t\t\tobject.bindMode = this.bindMode;\n\t\t\t\tobject.bindMatrix = this.bindMatrix.toArray();\n\n\t\t\t\tif (this.skeleton !== undefined) {\n\t\t\t\t\tserialize(meta.skeletons, this.skeleton);\n\t\t\t\t\tobject.skeleton = this.skeleton.uuid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.material !== undefined) {\n\t\t\t\tif (Array.isArray(this.material)) {\n\t\t\t\t\tvar uuids = [];\n\n\t\t\t\t\tfor (var _i = 0, _l = this.material.length; _i < _l; _i++) {\n\t\t\t\t\t\tuuids.push(serialize(meta.materials, this.material[_i]));\n\t\t\t\t\t}\n\n\t\t\t\t\tobject.material = uuids;\n\t\t\t\t} else {\n\t\t\t\t\tobject.material = serialize(meta.materials, this.material);\n\t\t\t\t}\n\t\t\t} //\n\n\n\t\t\tif (this.children.length > 0) {\n\t\t\t\tobject.children = [];\n\n\t\t\t\tfor (var _i2 = 0; _i2 < this.children.length; _i2++) {\n\t\t\t\t\tobject.children.push(this.children[_i2].toJSON(meta).object);\n\t\t\t\t}\n\t\t\t} //\n\n\n\t\t\tif (this.animations.length > 0) {\n\t\t\t\tobject.animations = [];\n\n\t\t\t\tfor (var _i3 = 0; _i3 < this.animations.length; _i3++) {\n\t\t\t\t\tvar animation = this.animations[_i3];\n\t\t\t\t\tobject.animations.push(serialize(meta.animations, animation));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isRootObject) {\n\t\t\t\tvar geometries = extractFromCache(meta.geometries);\n\t\t\t\tvar materials = extractFromCache(meta.materials);\n\t\t\t\tvar textures = extractFromCache(meta.textures);\n\t\t\t\tvar images = extractFromCache(meta.images);\n\n\t\t\t\tvar _shapes = extractFromCache(meta.shapes);\n\n\t\t\t\tvar skeletons = extractFromCache(meta.skeletons);\n\t\t\t\tvar animations = extractFromCache(meta.animations);\n\t\t\t\tif (geometries.length > 0) output.geometries = geometries;\n\t\t\t\tif (materials.length > 0) output.materials = materials;\n\t\t\t\tif (textures.length > 0) output.textures = textures;\n\t\t\t\tif (images.length > 0) output.images = images;\n\t\t\t\tif (_shapes.length > 0) output.shapes = _shapes;\n\t\t\t\tif (skeletons.length > 0) output.skeletons = skeletons;\n\t\t\t\tif (animations.length > 0) output.animations = animations;\n\t\t\t}\n\n\t\t\toutput.object = object;\n\t\t\treturn output; // extract data from the cache hash\n\t\t\t// remove metadata on each item\n\t\t\t// and return as array\n\n\t\t\tfunction extractFromCache(cache) {\n\t\t\t\tvar values = [];\n\n\t\t\t\tfor (var key in cache) {\n\t\t\t\t\tvar data = cache[key];\n\t\t\t\t\tdelete data.metadata;\n\t\t\t\t\tvalues.push(data);\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t}\n\t\t},\n\t\tclone: function clone(recursive) {\n\t\t\treturn new this.constructor().copy(this, recursive);\n\t\t},\n\t\tcopy: function copy(source, recursive) {\n\t\t\tif (recursive === void 0) {\n\t\t\t\trecursive = true;\n\t\t\t}\n\n\t\t\tthis.name = source.name;\n\t\t\tthis.up.copy(source.up);\n\t\t\tthis.position.copy(source.position);\n\t\t\tthis.rotation.order = source.rotation.order;\n\t\t\tthis.quaternion.copy(source.quaternion);\n\t\t\tthis.scale.copy(source.scale);\n\t\t\tthis.matrix.copy(source.matrix);\n\t\t\tthis.matrixWorld.copy(source.matrixWorld);\n\t\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\t\tthis.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;\n\t\t\tthis.layers.mask = source.layers.mask;\n\t\t\tthis.visible = source.visible;\n\t\t\tthis.castShadow = source.castShadow;\n\t\t\tthis.receiveShadow = source.receiveShadow;\n\t\t\tthis.frustumCulled = source.frustumCulled;\n\t\t\tthis.renderOrder = source.renderOrder;\n\t\t\tthis.userData = JSON.parse(JSON.stringify(source.userData));\n\n\t\t\tif (recursive === true) {\n\t\t\t\tfor (var i = 0; i < source.children.length; i++) {\n\t\t\t\t\tvar child = source.children[i];\n\t\t\t\t\tthis.add(child.clone());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tvar _vector1 = /*@__PURE__*/new Vector3();\n\n\tvar _vector2 = /*@__PURE__*/new Vector3();\n\n\tvar _normalMatrix = /*@__PURE__*/new Matrix3();\n\n\tvar Plane = /*#__PURE__*/function () {\n\t\tfunction Plane(normal, constant) {\n\t\t\tObject.defineProperty(this, 'isPlane', {\n\t\t\t\tvalue: true\n\t\t\t}); // normal is assumed to be normalized\n\n\t\t\tthis.normal = normal !== undefined ? normal : new Vector3(1, 0, 0);\n\t\t\tthis.constant = constant !== undefined ? constant : 0;\n\t\t}\n\n\t\tvar _proto = Plane.prototype;\n\n\t\t_proto.set = function set(normal, constant) {\n\t\t\tthis.normal.copy(normal);\n\t\t\tthis.constant = constant;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setComponents = function setComponents(x, y, z, w) {\n\t\t\tthis.normal.set(x, y, z);\n\t\t\tthis.constant = w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromNormalAndCoplanarPoint = function setFromNormalAndCoplanarPoint(normal, point) {\n\t\t\tthis.normal.copy(normal);\n\t\t\tthis.constant = -point.dot(this.normal);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromCoplanarPoints = function setFromCoplanarPoints(a, b, c) {\n\t\t\tvar normal = _vector1.subVectors(c, b).cross(_vector2.subVectors(a, b)).normalize(); // Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n\n\n\t\t\tthis.setFromNormalAndCoplanarPoint(normal, a);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(plane) {\n\t\t\tthis.normal.copy(plane.normal);\n\t\t\tthis.constant = plane.constant;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\t// Note: will lead to a divide by zero if the plane is invalid.\n\t\t\tvar inverseNormalLength = 1.0 / this.normal.length();\n\t\t\tthis.normal.multiplyScalar(inverseNormalLength);\n\t\t\tthis.constant *= inverseNormalLength;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.negate = function negate() {\n\t\t\tthis.constant *= -1;\n\t\t\tthis.normal.negate();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\treturn this.normal.dot(point) + this.constant;\n\t\t};\n\n\t\t_proto.distanceToSphere = function distanceToSphere(sphere) {\n\t\t\treturn this.distanceToPoint(sphere.center) - sphere.radius;\n\t\t};\n\n\t\t_proto.projectPoint = function projectPoint(point, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Plane: .projectPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.copy(this.normal).multiplyScalar(-this.distanceToPoint(point)).add(point);\n\t\t};\n\n\t\t_proto.intersectLine = function intersectLine(line, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Plane: .intersectLine() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tvar direction = line.delta(_vector1);\n\t\t\tvar denominator = this.normal.dot(direction);\n\n\t\t\tif (denominator === 0) {\n\t\t\t\t// line is coplanar, return origin\n\t\t\t\tif (this.distanceToPoint(line.start) === 0) {\n\t\t\t\t\treturn target.copy(line.start);\n\t\t\t\t} // Unsure if this is the correct method to handle this case.\n\n\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tvar t = -(line.start.dot(this.normal) + this.constant) / denominator;\n\n\t\t\tif (t < 0 || t > 1) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn target.copy(direction).multiplyScalar(t).add(line.start);\n\t\t};\n\n\t\t_proto.intersectsLine = function intersectsLine(line) {\n\t\t\t// Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n\t\t\tvar startSign = this.distanceToPoint(line.start);\n\t\t\tvar endSign = this.distanceToPoint(line.end);\n\t\t\treturn startSign < 0 && endSign > 0 || endSign < 0 && startSign > 0;\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\treturn box.intersectsPlane(this);\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\treturn sphere.intersectsPlane(this);\n\t\t};\n\n\t\t_proto.coplanarPoint = function coplanarPoint(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Plane: .coplanarPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.copy(this.normal).multiplyScalar(-this.constant);\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix, optionalNormalMatrix) {\n\t\t\tvar normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix(matrix);\n\n\t\t\tvar referencePoint = this.coplanarPoint(_vector1).applyMatrix4(matrix);\n\t\t\tvar normal = this.normal.applyMatrix3(normalMatrix).normalize();\n\t\t\tthis.constant = -referencePoint.dot(normal);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(offset) {\n\t\t\tthis.constant -= offset.dot(this.normal);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(plane) {\n\t\t\treturn plane.normal.equals(this.normal) && plane.constant === this.constant;\n\t\t};\n\n\t\treturn Plane;\n\t}();\n\n\tvar _v0$1 = /*@__PURE__*/new Vector3();\n\n\tvar _v1$3 = /*@__PURE__*/new Vector3();\n\n\tvar _v2$1 = /*@__PURE__*/new Vector3();\n\n\tvar _v3 = /*@__PURE__*/new Vector3();\n\n\tvar _vab = /*@__PURE__*/new Vector3();\n\n\tvar _vac = /*@__PURE__*/new Vector3();\n\n\tvar _vbc = /*@__PURE__*/new Vector3();\n\n\tvar _vap = /*@__PURE__*/new Vector3();\n\n\tvar _vbp = /*@__PURE__*/new Vector3();\n\n\tvar _vcp = /*@__PURE__*/new Vector3();\n\n\tvar Triangle = /*#__PURE__*/function () {\n\t\tfunction Triangle(a, b, c) {\n\t\t\tthis.a = a !== undefined ? a : new Vector3();\n\t\t\tthis.b = b !== undefined ? b : new Vector3();\n\t\t\tthis.c = c !== undefined ? c : new Vector3();\n\t\t}\n\n\t\tTriangle.getNormal = function getNormal(a, b, c, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .getNormal() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\ttarget.subVectors(c, b);\n\n\t\t\t_v0$1.subVectors(a, b);\n\n\t\t\ttarget.cross(_v0$1);\n\t\t\tvar targetLengthSq = target.lengthSq();\n\n\t\t\tif (targetLengthSq > 0) {\n\t\t\t\treturn target.multiplyScalar(1 / Math.sqrt(targetLengthSq));\n\t\t\t}\n\n\t\t\treturn target.set(0, 0, 0);\n\t\t} // static/instance method to calculate barycentric coordinates\n\t\t// based on: http://www.blackpawn.com/texts/pointinpoly/default.html\n\t\t;\n\n\t\tTriangle.getBarycoord = function getBarycoord(point, a, b, c, target) {\n\t\t\t_v0$1.subVectors(c, a);\n\n\t\t\t_v1$3.subVectors(b, a);\n\n\t\t\t_v2$1.subVectors(point, a);\n\n\t\t\tvar dot00 = _v0$1.dot(_v0$1);\n\n\t\t\tvar dot01 = _v0$1.dot(_v1$3);\n\n\t\t\tvar dot02 = _v0$1.dot(_v2$1);\n\n\t\t\tvar dot11 = _v1$3.dot(_v1$3);\n\n\t\t\tvar dot12 = _v1$3.dot(_v2$1);\n\n\t\t\tvar denom = dot00 * dot11 - dot01 * dot01;\n\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .getBarycoord() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t} // collinear or singular triangle\n\n\n\t\t\tif (denom === 0) {\n\t\t\t\t// arbitrary location outside of triangle?\n\t\t\t\t// not sure if this is the best idea, maybe should be returning undefined\n\t\t\t\treturn target.set(-2, -1, -1);\n\t\t\t}\n\n\t\t\tvar invDenom = 1 / denom;\n\t\t\tvar u = (dot11 * dot02 - dot01 * dot12) * invDenom;\n\t\t\tvar v = (dot00 * dot12 - dot01 * dot02) * invDenom; // barycentric coordinates must always sum to 1\n\n\t\t\treturn target.set(1 - u - v, v, u);\n\t\t};\n\n\t\tTriangle.containsPoint = function containsPoint(point, a, b, c) {\n\t\t\tthis.getBarycoord(point, a, b, c, _v3);\n\t\t\treturn _v3.x >= 0 && _v3.y >= 0 && _v3.x + _v3.y <= 1;\n\t\t};\n\n\t\tTriangle.getUV = function getUV(point, p1, p2, p3, uv1, uv2, uv3, target) {\n\t\t\tthis.getBarycoord(point, p1, p2, p3, _v3);\n\t\t\ttarget.set(0, 0);\n\t\t\ttarget.addScaledVector(uv1, _v3.x);\n\t\t\ttarget.addScaledVector(uv2, _v3.y);\n\t\t\ttarget.addScaledVector(uv3, _v3.z);\n\t\t\treturn target;\n\t\t};\n\n\t\tTriangle.isFrontFacing = function isFrontFacing(a, b, c, direction) {\n\t\t\t_v0$1.subVectors(c, b);\n\n\t\t\t_v1$3.subVectors(a, b); // strictly front facing\n\n\n\t\t\treturn _v0$1.cross(_v1$3).dot(direction) < 0 ? true : false;\n\t\t};\n\n\t\tvar _proto = Triangle.prototype;\n\n\t\t_proto.set = function set(a, b, c) {\n\t\t\tthis.a.copy(a);\n\t\t\tthis.b.copy(b);\n\t\t\tthis.c.copy(c);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromPointsAndIndices = function setFromPointsAndIndices(points, i0, i1, i2) {\n\t\t\tthis.a.copy(points[i0]);\n\t\t\tthis.b.copy(points[i1]);\n\t\t\tthis.c.copy(points[i2]);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(triangle) {\n\t\t\tthis.a.copy(triangle.a);\n\t\t\tthis.b.copy(triangle.b);\n\t\t\tthis.c.copy(triangle.c);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getArea = function getArea() {\n\t\t\t_v0$1.subVectors(this.c, this.b);\n\n\t\t\t_v1$3.subVectors(this.a, this.b);\n\n\t\t\treturn _v0$1.cross(_v1$3).length() * 0.5;\n\t\t};\n\n\t\t_proto.getMidpoint = function getMidpoint(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .getMidpoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);\n\t\t};\n\n\t\t_proto.getNormal = function getNormal(target) {\n\t\t\treturn Triangle.getNormal(this.a, this.b, this.c, target);\n\t\t};\n\n\t\t_proto.getPlane = function getPlane(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .getPlane() target is now required');\n\t\t\t\ttarget = new Plane();\n\t\t\t}\n\n\t\t\treturn target.setFromCoplanarPoints(this.a, this.b, this.c);\n\t\t};\n\n\t\t_proto.getBarycoord = function getBarycoord(point, target) {\n\t\t\treturn Triangle.getBarycoord(point, this.a, this.b, this.c, target);\n\t\t};\n\n\t\t_proto.getUV = function getUV(point, uv1, uv2, uv3, target) {\n\t\t\treturn Triangle.getUV(point, this.a, this.b, this.c, uv1, uv2, uv3, target);\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\treturn Triangle.containsPoint(point, this.a, this.b, this.c);\n\t\t};\n\n\t\t_proto.isFrontFacing = function isFrontFacing(direction) {\n\t\t\treturn Triangle.isFrontFacing(this.a, this.b, this.c, direction);\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\treturn box.intersectsTriangle(this);\n\t\t};\n\n\t\t_proto.closestPointToPoint = function closestPointToPoint(p, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .closestPointToPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tvar a = this.a,\n\t\t\t\t\tb = this.b,\n\t\t\t\t\tc = this.c;\n\t\t\tvar v, w; // algorithm thanks to Real-Time Collision Detection by Christer Ericson,\n\t\t\t// published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc.,\n\t\t\t// under the accompanying license; see chapter 5.1.5 for detailed explanation.\n\t\t\t// basically, we're distinguishing which of the voronoi regions of the triangle\n\t\t\t// the point lies in with the minimum amount of redundant computation.\n\n\t\t\t_vab.subVectors(b, a);\n\n\t\t\t_vac.subVectors(c, a);\n\n\t\t\t_vap.subVectors(p, a);\n\n\t\t\tvar d1 = _vab.dot(_vap);\n\n\t\t\tvar d2 = _vac.dot(_vap);\n\n\t\t\tif (d1 <= 0 && d2 <= 0) {\n\t\t\t\t// vertex region of A; barycentric coords (1, 0, 0)\n\t\t\t\treturn target.copy(a);\n\t\t\t}\n\n\t\t\t_vbp.subVectors(p, b);\n\n\t\t\tvar d3 = _vab.dot(_vbp);\n\n\t\t\tvar d4 = _vac.dot(_vbp);\n\n\t\t\tif (d3 >= 0 && d4 <= d3) {\n\t\t\t\t// vertex region of B; barycentric coords (0, 1, 0)\n\t\t\t\treturn target.copy(b);\n\t\t\t}\n\n\t\t\tvar vc = d1 * d4 - d3 * d2;\n\n\t\t\tif (vc <= 0 && d1 >= 0 && d3 <= 0) {\n\t\t\t\tv = d1 / (d1 - d3); // edge region of AB; barycentric coords (1-v, v, 0)\n\n\t\t\t\treturn target.copy(a).addScaledVector(_vab, v);\n\t\t\t}\n\n\t\t\t_vcp.subVectors(p, c);\n\n\t\t\tvar d5 = _vab.dot(_vcp);\n\n\t\t\tvar d6 = _vac.dot(_vcp);\n\n\t\t\tif (d6 >= 0 && d5 <= d6) {\n\t\t\t\t// vertex region of C; barycentric coords (0, 0, 1)\n\t\t\t\treturn target.copy(c);\n\t\t\t}\n\n\t\t\tvar vb = d5 * d2 - d1 * d6;\n\n\t\t\tif (vb <= 0 && d2 >= 0 && d6 <= 0) {\n\t\t\t\tw = d2 / (d2 - d6); // edge region of AC; barycentric coords (1-w, 0, w)\n\n\t\t\t\treturn target.copy(a).addScaledVector(_vac, w);\n\t\t\t}\n\n\t\t\tvar va = d3 * d6 - d5 * d4;\n\n\t\t\tif (va <= 0 && d4 - d3 >= 0 && d5 - d6 >= 0) {\n\t\t\t\t_vbc.subVectors(c, b);\n\n\t\t\t\tw = (d4 - d3) / (d4 - d3 + (d5 - d6)); // edge region of BC; barycentric coords (0, 1-w, w)\n\n\t\t\t\treturn target.copy(b).addScaledVector(_vbc, w); // edge region of BC\n\t\t\t} // face region\n\n\n\t\t\tvar denom = 1 / (va + vb + vc); // u = va * denom\n\n\t\t\tv = vb * denom;\n\t\t\tw = vc * denom;\n\t\t\treturn target.copy(a).addScaledVector(_vab, v).addScaledVector(_vac, w);\n\t\t};\n\n\t\t_proto.equals = function equals(triangle) {\n\t\t\treturn triangle.a.equals(this.a) && triangle.b.equals(this.b) && triangle.c.equals(this.c);\n\t\t};\n\n\t\treturn Triangle;\n\t}();\n\n\tvar _colorKeywords = {\n\t\t'aliceblue': 0xF0F8FF,\n\t\t'antiquewhite': 0xFAEBD7,\n\t\t'aqua': 0x00FFFF,\n\t\t'aquamarine': 0x7FFFD4,\n\t\t'azure': 0xF0FFFF,\n\t\t'beige': 0xF5F5DC,\n\t\t'bisque': 0xFFE4C4,\n\t\t'black': 0x000000,\n\t\t'blanchedalmond': 0xFFEBCD,\n\t\t'blue': 0x0000FF,\n\t\t'blueviolet': 0x8A2BE2,\n\t\t'brown': 0xA52A2A,\n\t\t'burlywood': 0xDEB887,\n\t\t'cadetblue': 0x5F9EA0,\n\t\t'chartreuse': 0x7FFF00,\n\t\t'chocolate': 0xD2691E,\n\t\t'coral': 0xFF7F50,\n\t\t'cornflowerblue': 0x6495ED,\n\t\t'cornsilk': 0xFFF8DC,\n\t\t'crimson': 0xDC143C,\n\t\t'cyan': 0x00FFFF,\n\t\t'darkblue': 0x00008B,\n\t\t'darkcyan': 0x008B8B,\n\t\t'darkgoldenrod': 0xB8860B,\n\t\t'darkgray': 0xA9A9A9,\n\t\t'darkgreen': 0x006400,\n\t\t'darkgrey': 0xA9A9A9,\n\t\t'darkkhaki': 0xBDB76B,\n\t\t'darkmagenta': 0x8B008B,\n\t\t'darkolivegreen': 0x556B2F,\n\t\t'darkorange': 0xFF8C00,\n\t\t'darkorchid': 0x9932CC,\n\t\t'darkred': 0x8B0000,\n\t\t'darksalmon': 0xE9967A,\n\t\t'darkseagreen': 0x8FBC8F,\n\t\t'darkslateblue': 0x483D8B,\n\t\t'darkslategray': 0x2F4F4F,\n\t\t'darkslategrey': 0x2F4F4F,\n\t\t'darkturquoise': 0x00CED1,\n\t\t'darkviolet': 0x9400D3,\n\t\t'deeppink': 0xFF1493,\n\t\t'deepskyblue': 0x00BFFF,\n\t\t'dimgray': 0x696969,\n\t\t'dimgrey': 0x696969,\n\t\t'dodgerblue': 0x1E90FF,\n\t\t'firebrick': 0xB22222,\n\t\t'floralwhite': 0xFFFAF0,\n\t\t'forestgreen': 0x228B22,\n\t\t'fuchsia': 0xFF00FF,\n\t\t'gainsboro': 0xDCDCDC,\n\t\t'ghostwhite': 0xF8F8FF,\n\t\t'gold': 0xFFD700,\n\t\t'goldenrod': 0xDAA520,\n\t\t'gray': 0x808080,\n\t\t'green': 0x008000,\n\t\t'greenyellow': 0xADFF2F,\n\t\t'grey': 0x808080,\n\t\t'honeydew': 0xF0FFF0,\n\t\t'hotpink': 0xFF69B4,\n\t\t'indianred': 0xCD5C5C,\n\t\t'indigo': 0x4B0082,\n\t\t'ivory': 0xFFFFF0,\n\t\t'khaki': 0xF0E68C,\n\t\t'lavender': 0xE6E6FA,\n\t\t'lavenderblush': 0xFFF0F5,\n\t\t'lawngreen': 0x7CFC00,\n\t\t'lemonchiffon': 0xFFFACD,\n\t\t'lightblue': 0xADD8E6,\n\t\t'lightcoral': 0xF08080,\n\t\t'lightcyan': 0xE0FFFF,\n\t\t'lightgoldenrodyellow': 0xFAFAD2,\n\t\t'lightgray': 0xD3D3D3,\n\t\t'lightgreen': 0x90EE90,\n\t\t'lightgrey': 0xD3D3D3,\n\t\t'lightpink': 0xFFB6C1,\n\t\t'lightsalmon': 0xFFA07A,\n\t\t'lightseagreen': 0x20B2AA,\n\t\t'lightskyblue': 0x87CEFA,\n\t\t'lightslategray': 0x778899,\n\t\t'lightslategrey': 0x778899,\n\t\t'lightsteelblue': 0xB0C4DE,\n\t\t'lightyellow': 0xFFFFE0,\n\t\t'lime': 0x00FF00,\n\t\t'limegreen': 0x32CD32,\n\t\t'linen': 0xFAF0E6,\n\t\t'magenta': 0xFF00FF,\n\t\t'maroon': 0x800000,\n\t\t'mediumaquamarine': 0x66CDAA,\n\t\t'mediumblue': 0x0000CD,\n\t\t'mediumorchid': 0xBA55D3,\n\t\t'mediumpurple': 0x9370DB,\n\t\t'mediumseagreen': 0x3CB371,\n\t\t'mediumslateblue': 0x7B68EE,\n\t\t'mediumspringgreen': 0x00FA9A,\n\t\t'mediumturquoise': 0x48D1CC,\n\t\t'mediumvioletred': 0xC71585,\n\t\t'midnightblue': 0x191970,\n\t\t'mintcream': 0xF5FFFA,\n\t\t'mistyrose': 0xFFE4E1,\n\t\t'moccasin': 0xFFE4B5,\n\t\t'navajowhite': 0xFFDEAD,\n\t\t'navy': 0x000080,\n\t\t'oldlace': 0xFDF5E6,\n\t\t'olive': 0x808000,\n\t\t'olivedrab': 0x6B8E23,\n\t\t'orange': 0xFFA500,\n\t\t'orangered': 0xFF4500,\n\t\t'orchid': 0xDA70D6,\n\t\t'palegoldenrod': 0xEEE8AA,\n\t\t'palegreen': 0x98FB98,\n\t\t'paleturquoise': 0xAFEEEE,\n\t\t'palevioletred': 0xDB7093,\n\t\t'papayawhip': 0xFFEFD5,\n\t\t'peachpuff': 0xFFDAB9,\n\t\t'peru': 0xCD853F,\n\t\t'pink': 0xFFC0CB,\n\t\t'plum': 0xDDA0DD,\n\t\t'powderblue': 0xB0E0E6,\n\t\t'purple': 0x800080,\n\t\t'rebeccapurple': 0x663399,\n\t\t'red': 0xFF0000,\n\t\t'rosybrown': 0xBC8F8F,\n\t\t'royalblue': 0x4169E1,\n\t\t'saddlebrown': 0x8B4513,\n\t\t'salmon': 0xFA8072,\n\t\t'sandybrown': 0xF4A460,\n\t\t'seagreen': 0x2E8B57,\n\t\t'seashell': 0xFFF5EE,\n\t\t'sienna': 0xA0522D,\n\t\t'silver': 0xC0C0C0,\n\t\t'skyblue': 0x87CEEB,\n\t\t'slateblue': 0x6A5ACD,\n\t\t'slategray': 0x708090,\n\t\t'slategrey': 0x708090,\n\t\t'snow': 0xFFFAFA,\n\t\t'springgreen': 0x00FF7F,\n\t\t'steelblue': 0x4682B4,\n\t\t'tan': 0xD2B48C,\n\t\t'teal': 0x008080,\n\t\t'thistle': 0xD8BFD8,\n\t\t'tomato': 0xFF6347,\n\t\t'turquoise': 0x40E0D0,\n\t\t'violet': 0xEE82EE,\n\t\t'wheat': 0xF5DEB3,\n\t\t'white': 0xFFFFFF,\n\t\t'whitesmoke': 0xF5F5F5,\n\t\t'yellow': 0xFFFF00,\n\t\t'yellowgreen': 0x9ACD32\n\t};\n\tvar _hslA = {\n\t\th: 0,\n\t\ts: 0,\n\t\tl: 0\n\t};\n\tvar _hslB = {\n\t\th: 0,\n\t\ts: 0,\n\t\tl: 0\n\t};\n\n\tfunction hue2rgb(p, q, t) {\n\t\tif (t < 0) t += 1;\n\t\tif (t > 1) t -= 1;\n\t\tif (t < 1 / 6) return p + (q - p) * 6 * t;\n\t\tif (t < 1 / 2) return q;\n\t\tif (t < 2 / 3) return p + (q - p) * 6 * (2 / 3 - t);\n\t\treturn p;\n\t}\n\n\tfunction SRGBToLinear(c) {\n\t\treturn c < 0.04045 ? c * 0.0773993808 : Math.pow(c * 0.9478672986 + 0.0521327014, 2.4);\n\t}\n\n\tfunction LinearToSRGB(c) {\n\t\treturn c < 0.0031308 ? c * 12.92 : 1.055 * Math.pow(c, 0.41666) - 0.055;\n\t}\n\n\tvar Color = /*#__PURE__*/function () {\n\t\tfunction Color(r, g, b) {\n\t\t\tObject.defineProperty(this, 'isColor', {\n\t\t\t\tvalue: true\n\t\t\t});\n\n\t\t\tif (g === undefined && b === undefined) {\n\t\t\t\t// r is THREE.Color, hex or string\n\t\t\t\treturn this.set(r);\n\t\t\t}\n\n\t\t\treturn this.setRGB(r, g, b);\n\t\t}\n\n\t\tvar _proto = Color.prototype;\n\n\t\t_proto.set = function set(value) {\n\t\t\tif (value && value.isColor) {\n\t\t\t\tthis.copy(value);\n\t\t\t} else if (typeof value === 'number') {\n\t\t\t\tthis.setHex(value);\n\t\t\t} else if (typeof value === 'string') {\n\t\t\t\tthis.setStyle(value);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setScalar = function setScalar(scalar) {\n\t\t\tthis.r = scalar;\n\t\t\tthis.g = scalar;\n\t\t\tthis.b = scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setHex = function setHex(hex) {\n\t\t\thex = Math.floor(hex);\n\t\t\tthis.r = (hex >> 16 & 255) / 255;\n\t\t\tthis.g = (hex >> 8 & 255) / 255;\n\t\t\tthis.b = (hex & 255) / 255;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setRGB = function setRGB(r, g, b) {\n\t\t\tthis.r = r;\n\t\t\tthis.g = g;\n\t\t\tthis.b = b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setHSL = function setHSL(h, s, l) {\n\t\t\t// h,s,l ranges are in 0.0 - 1.0\n\t\t\th = MathUtils.euclideanModulo(h, 1);\n\t\t\ts = MathUtils.clamp(s, 0, 1);\n\t\t\tl = MathUtils.clamp(l, 0, 1);\n\n\t\t\tif (s === 0) {\n\t\t\t\tthis.r = this.g = this.b = l;\n\t\t\t} else {\n\t\t\t\tvar p = l <= 0.5 ? l * (1 + s) : l + s - l * s;\n\t\t\t\tvar q = 2 * l - p;\n\t\t\t\tthis.r = hue2rgb(q, p, h + 1 / 3);\n\t\t\t\tthis.g = hue2rgb(q, p, h);\n\t\t\t\tthis.b = hue2rgb(q, p, h - 1 / 3);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setStyle = function setStyle(style) {\n\t\t\tfunction handleAlpha(string) {\n\t\t\t\tif (string === undefined) return;\n\n\t\t\t\tif (parseFloat(string) < 1) {\n\t\t\t\t\tconsole.warn('THREE.Color: Alpha component of ' + style + ' will be ignored.');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar m;\n\n\t\t\tif (m = /^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec(style)) {\n\t\t\t\t// rgb / hsl\n\t\t\t\tvar color;\n\t\t\t\tvar name = m[1];\n\t\t\t\tvar components = m[2];\n\n\t\t\t\tswitch (name) {\n\t\t\t\t\tcase 'rgb':\n\t\t\t\t\tcase 'rgba':\n\t\t\t\t\t\tif (color = /^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n\t\t\t\t\t\t\t// rgb(255,0,0) rgba(255,0,0,0.5)\n\t\t\t\t\t\t\tthis.r = Math.min(255, parseInt(color[1], 10)) / 255;\n\t\t\t\t\t\t\tthis.g = Math.min(255, parseInt(color[2], 10)) / 255;\n\t\t\t\t\t\t\tthis.b = Math.min(255, parseInt(color[3], 10)) / 255;\n\t\t\t\t\t\t\thandleAlpha(color[4]);\n\t\t\t\t\t\t\treturn this;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (color = /^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n\t\t\t\t\t\t\t// rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)\n\t\t\t\t\t\t\tthis.r = Math.min(100, parseInt(color[1], 10)) / 100;\n\t\t\t\t\t\t\tthis.g = Math.min(100, parseInt(color[2], 10)) / 100;\n\t\t\t\t\t\t\tthis.b = Math.min(100, parseInt(color[3], 10)) / 100;\n\t\t\t\t\t\t\thandleAlpha(color[4]);\n\t\t\t\t\t\t\treturn this;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'hsl':\n\t\t\t\t\tcase 'hsla':\n\t\t\t\t\t\tif (color = /^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n\t\t\t\t\t\t\t// hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n\t\t\t\t\t\t\tvar h = parseFloat(color[1]) / 360;\n\t\t\t\t\t\t\tvar s = parseInt(color[2], 10) / 100;\n\t\t\t\t\t\t\tvar l = parseInt(color[3], 10) / 100;\n\t\t\t\t\t\t\thandleAlpha(color[4]);\n\t\t\t\t\t\t\treturn this.setHSL(h, s, l);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (m = /^\\#([A-Fa-f\\d]+)$/.exec(style)) {\n\t\t\t\t// hex color\n\t\t\t\tvar hex = m[1];\n\t\t\t\tvar size = hex.length;\n\n\t\t\t\tif (size === 3) {\n\t\t\t\t\t// #ff0\n\t\t\t\t\tthis.r = parseInt(hex.charAt(0) + hex.charAt(0), 16) / 255;\n\t\t\t\t\tthis.g = parseInt(hex.charAt(1) + hex.charAt(1), 16) / 255;\n\t\t\t\t\tthis.b = parseInt(hex.charAt(2) + hex.charAt(2), 16) / 255;\n\t\t\t\t\treturn this;\n\t\t\t\t} else if (size === 6) {\n\t\t\t\t\t// #ff0000\n\t\t\t\t\tthis.r = parseInt(hex.charAt(0) + hex.charAt(1), 16) / 255;\n\t\t\t\t\tthis.g = parseInt(hex.charAt(2) + hex.charAt(3), 16) / 255;\n\t\t\t\t\tthis.b = parseInt(hex.charAt(4) + hex.charAt(5), 16) / 255;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (style && style.length > 0) {\n\t\t\t\treturn this.setColorName(style);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setColorName = function setColorName(style) {\n\t\t\t// color keywords\n\t\t\tvar hex = _colorKeywords[style];\n\n\t\t\tif (hex !== undefined) {\n\t\t\t\t// red\n\t\t\t\tthis.setHex(hex);\n\t\t\t} else {\n\t\t\t\t// unknown color\n\t\t\t\tconsole.warn('THREE.Color: Unknown color ' + style);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this.r, this.g, this.b);\n\t\t};\n\n\t\t_proto.copy = function copy(color) {\n\t\t\tthis.r = color.r;\n\t\t\tthis.g = color.g;\n\t\t\tthis.b = color.b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copyGammaToLinear = function copyGammaToLinear(color, gammaFactor) {\n\t\t\tif (gammaFactor === void 0) {\n\t\t\t\tgammaFactor = 2.0;\n\t\t\t}\n\n\t\t\tthis.r = Math.pow(color.r, gammaFactor);\n\t\t\tthis.g = Math.pow(color.g, gammaFactor);\n\t\t\tthis.b = Math.pow(color.b, gammaFactor);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copyLinearToGamma = function copyLinearToGamma(color, gammaFactor) {\n\t\t\tif (gammaFactor === void 0) {\n\t\t\t\tgammaFactor = 2.0;\n\t\t\t}\n\n\t\t\tvar safeInverse = gammaFactor > 0 ? 1.0 / gammaFactor : 1.0;\n\t\t\tthis.r = Math.pow(color.r, safeInverse);\n\t\t\tthis.g = Math.pow(color.g, safeInverse);\n\t\t\tthis.b = Math.pow(color.b, safeInverse);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.convertGammaToLinear = function convertGammaToLinear(gammaFactor) {\n\t\t\tthis.copyGammaToLinear(this, gammaFactor);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.convertLinearToGamma = function convertLinearToGamma(gammaFactor) {\n\t\t\tthis.copyLinearToGamma(this, gammaFactor);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copySRGBToLinear = function copySRGBToLinear(color) {\n\t\t\tthis.r = SRGBToLinear(color.r);\n\t\t\tthis.g = SRGBToLinear(color.g);\n\t\t\tthis.b = SRGBToLinear(color.b);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copyLinearToSRGB = function copyLinearToSRGB(color) {\n\t\t\tthis.r = LinearToSRGB(color.r);\n\t\t\tthis.g = LinearToSRGB(color.g);\n\t\t\tthis.b = LinearToSRGB(color.b);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.convertSRGBToLinear = function convertSRGBToLinear() {\n\t\t\tthis.copySRGBToLinear(this);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.convertLinearToSRGB = function convertLinearToSRGB() {\n\t\t\tthis.copyLinearToSRGB(this);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getHex = function getHex() {\n\t\t\treturn this.r * 255 << 16 ^ this.g * 255 << 8 ^ this.b * 255 << 0;\n\t\t};\n\n\t\t_proto.getHexString = function getHexString() {\n\t\t\treturn ('000000' + this.getHex().toString(16)).slice(-6);\n\t\t};\n\n\t\t_proto.getHSL = function getHSL(target) {\n\t\t\t// h,s,l ranges are in 0.0 - 1.0\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Color: .getHSL() target is now required');\n\t\t\t\ttarget = {\n\t\t\t\t\th: 0,\n\t\t\t\t\ts: 0,\n\t\t\t\t\tl: 0\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar r = this.r,\n\t\t\t\t\tg = this.g,\n\t\t\t\t\tb = this.b;\n\t\t\tvar max = Math.max(r, g, b);\n\t\t\tvar min = Math.min(r, g, b);\n\t\t\tvar hue, saturation;\n\t\t\tvar lightness = (min + max) / 2.0;\n\n\t\t\tif (min === max) {\n\t\t\t\thue = 0;\n\t\t\t\tsaturation = 0;\n\t\t\t} else {\n\t\t\t\tvar delta = max - min;\n\t\t\t\tsaturation = lightness <= 0.5 ? delta / (max + min) : delta / (2 - max - min);\n\n\t\t\t\tswitch (max) {\n\t\t\t\t\tcase r:\n\t\t\t\t\t\thue = (g - b) / delta + (g < b ? 6 : 0);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase g:\n\t\t\t\t\t\thue = (b - r) / delta + 2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase b:\n\t\t\t\t\t\thue = (r - g) / delta + 4;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\thue /= 6;\n\t\t\t}\n\n\t\t\ttarget.h = hue;\n\t\t\ttarget.s = saturation;\n\t\t\ttarget.l = lightness;\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.getStyle = function getStyle() {\n\t\t\treturn 'rgb(' + (this.r * 255 | 0) + ',' + (this.g * 255 | 0) + ',' + (this.b * 255 | 0) + ')';\n\t\t};\n\n\t\t_proto.offsetHSL = function offsetHSL(h, s, l) {\n\t\t\tthis.getHSL(_hslA);\n\t\t\t_hslA.h += h;\n\t\t\t_hslA.s += s;\n\t\t\t_hslA.l += l;\n\t\t\tthis.setHSL(_hslA.h, _hslA.s, _hslA.l);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.add = function add(color) {\n\t\t\tthis.r += color.r;\n\t\t\tthis.g += color.g;\n\t\t\tthis.b += color.b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addColors = function addColors(color1, color2) {\n\t\t\tthis.r = color1.r + color2.r;\n\t\t\tthis.g = color1.g + color2.g;\n\t\t\tthis.b = color1.b + color2.b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScalar = function addScalar(s) {\n\t\t\tthis.r += s;\n\t\t\tthis.g += s;\n\t\t\tthis.b += s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.sub = function sub(color) {\n\t\t\tthis.r = Math.max(0, this.r - color.r);\n\t\t\tthis.g = Math.max(0, this.g - color.g);\n\t\t\tthis.b = Math.max(0, this.b - color.b);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(color) {\n\t\t\tthis.r *= color.r;\n\t\t\tthis.g *= color.g;\n\t\t\tthis.b *= color.b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(s) {\n\t\t\tthis.r *= s;\n\t\t\tthis.g *= s;\n\t\t\tthis.b *= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerp = function lerp(color, alpha) {\n\t\t\tthis.r += (color.r - this.r) * alpha;\n\t\t\tthis.g += (color.g - this.g) * alpha;\n\t\t\tthis.b += (color.b - this.b) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpColors = function lerpColors(color1, color2, alpha) {\n\t\t\tthis.r = color1.r + (color2.r - color1.r) * alpha;\n\t\t\tthis.g = color1.g + (color2.g - color1.g) * alpha;\n\t\t\tthis.b = color1.b + (color2.b - color1.b) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpHSL = function lerpHSL(color, alpha) {\n\t\t\tthis.getHSL(_hslA);\n\t\t\tcolor.getHSL(_hslB);\n\t\t\tvar h = MathUtils.lerp(_hslA.h, _hslB.h, alpha);\n\t\t\tvar s = MathUtils.lerp(_hslA.s, _hslB.s, alpha);\n\t\t\tvar l = MathUtils.lerp(_hslA.l, _hslB.l, alpha);\n\t\t\tthis.setHSL(h, s, l);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(c) {\n\t\t\treturn c.r === this.r && c.g === this.g && c.b === this.b;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.r = array[offset];\n\t\t\tthis.g = array[offset + 1];\n\t\t\tthis.b = array[offset + 2];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this.r;\n\t\t\tarray[offset + 1] = this.g;\n\t\t\tarray[offset + 2] = this.b;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index) {\n\t\t\tthis.r = attribute.getX(index);\n\t\t\tthis.g = attribute.getY(index);\n\t\t\tthis.b = attribute.getZ(index);\n\n\t\t\tif (attribute.normalized === true) {\n\t\t\t\t// assuming Uint8Array\n\t\t\t\tthis.r /= 255;\n\t\t\t\tthis.g /= 255;\n\t\t\t\tthis.b /= 255;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toJSON = function toJSON() {\n\t\t\treturn this.getHex();\n\t\t};\n\n\t\treturn Color;\n\t}();\n\n\tColor.NAMES = _colorKeywords;\n\tColor.prototype.r = 1;\n\tColor.prototype.g = 1;\n\tColor.prototype.b = 1;\n\n\tvar Face3 = /*#__PURE__*/function () {\n\t\tfunction Face3(a, b, c, normal, color, materialIndex) {\n\t\t\tif (materialIndex === void 0) {\n\t\t\t\tmaterialIndex = 0;\n\t\t\t}\n\n\t\t\tthis.a = a;\n\t\t\tthis.b = b;\n\t\t\tthis.c = c;\n\t\t\tthis.normal = normal && normal.isVector3 ? normal : new Vector3();\n\t\t\tthis.vertexNormals = Array.isArray(normal) ? normal : [];\n\t\t\tthis.color = color && color.isColor ? color : new Color();\n\t\t\tthis.vertexColors = Array.isArray(color) ? color : [];\n\t\t\tthis.materialIndex = materialIndex;\n\t\t}\n\n\t\tvar _proto = Face3.prototype;\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(source) {\n\t\t\tthis.a = source.a;\n\t\t\tthis.b = source.b;\n\t\t\tthis.c = source.c;\n\t\t\tthis.normal.copy(source.normal);\n\t\t\tthis.color.copy(source.color);\n\t\t\tthis.materialIndex = source.materialIndex;\n\n\t\t\tfor (var i = 0, il = source.vertexNormals.length; i < il; i++) {\n\t\t\t\tthis.vertexNormals[i] = source.vertexNormals[i].clone();\n\t\t\t}\n\n\t\t\tfor (var _i = 0, _il = source.vertexColors.length; _i < _il; _i++) {\n\t\t\t\tthis.vertexColors[_i] = source.vertexColors[_i].clone();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Face3;\n\t}();\n\n\tvar materialId = 0;\n\n\tfunction Material() {\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tvalue: materialId++\n\t\t});\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.name = '';\n\t\tthis.type = 'Material';\n\t\tthis.fog = true;\n\t\tthis.blending = NormalBlending;\n\t\tthis.side = FrontSide;\n\t\tthis.flatShading = false;\n\t\tthis.vertexColors = false;\n\t\tthis.opacity = 1;\n\t\tthis.transparent = false;\n\t\tthis.blendSrc = SrcAlphaFactor;\n\t\tthis.blendDst = OneMinusSrcAlphaFactor;\n\t\tthis.blendEquation = AddEquation;\n\t\tthis.blendSrcAlpha = null;\n\t\tthis.blendDstAlpha = null;\n\t\tthis.blendEquationAlpha = null;\n\t\tthis.depthFunc = LessEqualDepth;\n\t\tthis.depthTest = true;\n\t\tthis.depthWrite = true;\n\t\tthis.stencilWriteMask = 0xff;\n\t\tthis.stencilFunc = AlwaysStencilFunc;\n\t\tthis.stencilRef = 0;\n\t\tthis.stencilFuncMask = 0xff;\n\t\tthis.stencilFail = KeepStencilOp;\n\t\tthis.stencilZFail = KeepStencilOp;\n\t\tthis.stencilZPass = KeepStencilOp;\n\t\tthis.stencilWrite = false;\n\t\tthis.clippingPlanes = null;\n\t\tthis.clipIntersection = false;\n\t\tthis.clipShadows = false;\n\t\tthis.shadowSide = null;\n\t\tthis.colorWrite = true;\n\t\tthis.precision = null; // override the renderer's default precision for this material\n\n\t\tthis.polygonOffset = false;\n\t\tthis.polygonOffsetFactor = 0;\n\t\tthis.polygonOffsetUnits = 0;\n\t\tthis.dithering = false;\n\t\tthis.alphaTest = 0;\n\t\tthis.premultipliedAlpha = false;\n\t\tthis.visible = true;\n\t\tthis.toneMapped = true;\n\t\tthis.userData = {};\n\t\tthis.version = 0;\n\t}\n\n\tMaterial.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: Material,\n\t\tisMaterial: true,\n\t\tonBeforeCompile: function onBeforeCompile()\n\t\t/* shaderobject, renderer */\n\t\t{},\n\t\tcustomProgramCacheKey: function customProgramCacheKey() {\n\t\t\treturn this.onBeforeCompile.toString();\n\t\t},\n\t\tsetValues: function setValues(values) {\n\t\t\tif (values === undefined) return;\n\n\t\t\tfor (var key in values) {\n\t\t\t\tvar newValue = values[key];\n\n\t\t\t\tif (newValue === undefined) {\n\t\t\t\t\tconsole.warn('THREE.Material: \\'' + key + '\\' parameter is undefined.');\n\t\t\t\t\tcontinue;\n\t\t\t\t} // for backward compatability if shading is set in the constructor\n\n\n\t\t\t\tif (key === 'shading') {\n\t\t\t\t\tconsole.warn('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.');\n\t\t\t\t\tthis.flatShading = newValue === FlatShading ? true : false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar currentValue = this[key];\n\n\t\t\t\tif (currentValue === undefined) {\n\t\t\t\t\tconsole.warn('THREE.' + this.type + ': \\'' + key + '\\' is not a property of this material.');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentValue && currentValue.isColor) {\n\t\t\t\t\tcurrentValue.set(newValue);\n\t\t\t\t} else if (currentValue && currentValue.isVector3 && newValue && newValue.isVector3) {\n\t\t\t\t\tcurrentValue.copy(newValue);\n\t\t\t\t} else {\n\t\t\t\t\tthis[key] = newValue;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar isRoot = meta === undefined || typeof meta === 'string';\n\n\t\t\tif (isRoot) {\n\t\t\t\tmeta = {\n\t\t\t\t\ttextures: {},\n\t\t\t\t\timages: {}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar data = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Material',\n\t\t\t\t\tgenerator: 'Material.toJSON'\n\t\t\t\t}\n\t\t\t}; // standard Material serialization\n\n\t\t\tdata.uuid = this.uuid;\n\t\t\tdata.type = this.type;\n\t\t\tif (this.name !== '') data.name = this.name;\n\t\t\tif (this.color && this.color.isColor) data.color = this.color.getHex();\n\t\t\tif (this.roughness !== undefined) data.roughness = this.roughness;\n\t\t\tif (this.metalness !== undefined) data.metalness = this.metalness;\n\t\t\tif (this.sheen && this.sheen.isColor) data.sheen = this.sheen.getHex();\n\t\t\tif (this.emissive && this.emissive.isColor) data.emissive = this.emissive.getHex();\n\t\t\tif (this.emissiveIntensity && this.emissiveIntensity !== 1) data.emissiveIntensity = this.emissiveIntensity;\n\t\t\tif (this.specular && this.specular.isColor) data.specular = this.specular.getHex();\n\t\t\tif (this.shininess !== undefined) data.shininess = this.shininess;\n\t\t\tif (this.clearcoat !== undefined) data.clearcoat = this.clearcoat;\n\t\t\tif (this.clearcoatRoughness !== undefined) data.clearcoatRoughness = this.clearcoatRoughness;\n\n\t\t\tif (this.clearcoatMap && this.clearcoatMap.isTexture) {\n\t\t\t\tdata.clearcoatMap = this.clearcoatMap.toJSON(meta).uuid;\n\t\t\t}\n\n\t\t\tif (this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture) {\n\t\t\t\tdata.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(meta).uuid;\n\t\t\t}\n\n\t\t\tif (this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture) {\n\t\t\t\tdata.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(meta).uuid;\n\t\t\t\tdata.clearcoatNormalScale = this.clearcoatNormalScale.toArray();\n\t\t\t}\n\n\t\t\tif (this.map && this.map.isTexture) data.map = this.map.toJSON(meta).uuid;\n\t\t\tif (this.matcap && this.matcap.isTexture) data.matcap = this.matcap.toJSON(meta).uuid;\n\t\t\tif (this.alphaMap && this.alphaMap.isTexture) data.alphaMap = this.alphaMap.toJSON(meta).uuid;\n\t\t\tif (this.lightMap && this.lightMap.isTexture) data.lightMap = this.lightMap.toJSON(meta).uuid;\n\n\t\t\tif (this.aoMap && this.aoMap.isTexture) {\n\t\t\t\tdata.aoMap = this.aoMap.toJSON(meta).uuid;\n\t\t\t\tdata.aoMapIntensity = this.aoMapIntensity;\n\t\t\t}\n\n\t\t\tif (this.bumpMap && this.bumpMap.isTexture) {\n\t\t\t\tdata.bumpMap = this.bumpMap.toJSON(meta).uuid;\n\t\t\t\tdata.bumpScale = this.bumpScale;\n\t\t\t}\n\n\t\t\tif (this.normalMap && this.normalMap.isTexture) {\n\t\t\t\tdata.normalMap = this.normalMap.toJSON(meta).uuid;\n\t\t\t\tdata.normalMapType = this.normalMapType;\n\t\t\t\tdata.normalScale = this.normalScale.toArray();\n\t\t\t}\n\n\t\t\tif (this.displacementMap && this.displacementMap.isTexture) {\n\t\t\t\tdata.displacementMap = this.displacementMap.toJSON(meta).uuid;\n\t\t\t\tdata.displacementScale = this.displacementScale;\n\t\t\t\tdata.displacementBias = this.displacementBias;\n\t\t\t}\n\n\t\t\tif (this.roughnessMap && this.roughnessMap.isTexture) data.roughnessMap = this.roughnessMap.toJSON(meta).uuid;\n\t\t\tif (this.metalnessMap && this.metalnessMap.isTexture) data.metalnessMap = this.metalnessMap.toJSON(meta).uuid;\n\t\t\tif (this.emissiveMap && this.emissiveMap.isTexture) data.emissiveMap = this.emissiveMap.toJSON(meta).uuid;\n\t\t\tif (this.specularMap && this.specularMap.isTexture) data.specularMap = this.specularMap.toJSON(meta).uuid;\n\n\t\t\tif (this.envMap && this.envMap.isTexture) {\n\t\t\t\tdata.envMap = this.envMap.toJSON(meta).uuid;\n\t\t\t\tdata.reflectivity = this.reflectivity; // Scale behind envMap\n\n\t\t\t\tdata.refractionRatio = this.refractionRatio;\n\t\t\t\tif (this.combine !== undefined) data.combine = this.combine;\n\t\t\t\tif (this.envMapIntensity !== undefined) data.envMapIntensity = this.envMapIntensity;\n\t\t\t}\n\n\t\t\tif (this.gradientMap && this.gradientMap.isTexture) {\n\t\t\t\tdata.gradientMap = this.gradientMap.toJSON(meta).uuid;\n\t\t\t}\n\n\t\t\tif (this.size !== undefined) data.size = this.size;\n\t\t\tif (this.sizeAttenuation !== undefined) data.sizeAttenuation = this.sizeAttenuation;\n\t\t\tif (this.blending !== NormalBlending) data.blending = this.blending;\n\t\t\tif (this.flatShading === true) data.flatShading = this.flatShading;\n\t\t\tif (this.side !== FrontSide) data.side = this.side;\n\t\t\tif (this.vertexColors) data.vertexColors = true;\n\t\t\tif (this.opacity < 1) data.opacity = this.opacity;\n\t\t\tif (this.transparent === true) data.transparent = this.transparent;\n\t\t\tdata.depthFunc = this.depthFunc;\n\t\t\tdata.depthTest = this.depthTest;\n\t\t\tdata.depthWrite = this.depthWrite;\n\t\t\tdata.stencilWrite = this.stencilWrite;\n\t\t\tdata.stencilWriteMask = this.stencilWriteMask;\n\t\t\tdata.stencilFunc = this.stencilFunc;\n\t\t\tdata.stencilRef = this.stencilRef;\n\t\t\tdata.stencilFuncMask = this.stencilFuncMask;\n\t\t\tdata.stencilFail = this.stencilFail;\n\t\t\tdata.stencilZFail = this.stencilZFail;\n\t\t\tdata.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial)\n\n\t\t\tif (this.rotation && this.rotation !== 0) data.rotation = this.rotation;\n\t\t\tif (this.polygonOffset === true) data.polygonOffset = true;\n\t\t\tif (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;\n\t\t\tif (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;\n\t\t\tif (this.linewidth && this.linewidth !== 1) data.linewidth = this.linewidth;\n\t\t\tif (this.dashSize !== undefined) data.dashSize = this.dashSize;\n\t\t\tif (this.gapSize !== undefined) data.gapSize = this.gapSize;\n\t\t\tif (this.scale !== undefined) data.scale = this.scale;\n\t\t\tif (this.dithering === true) data.dithering = true;\n\t\t\tif (this.alphaTest > 0) data.alphaTest = this.alphaTest;\n\t\t\tif (this.premultipliedAlpha === true) data.premultipliedAlpha = this.premultipliedAlpha;\n\t\t\tif (this.wireframe === true) data.wireframe = this.wireframe;\n\t\t\tif (this.wireframeLinewidth > 1) data.wireframeLinewidth = this.wireframeLinewidth;\n\t\t\tif (this.wireframeLinecap !== 'round') data.wireframeLinecap = this.wireframeLinecap;\n\t\t\tif (this.wireframeLinejoin !== 'round') data.wireframeLinejoin = this.wireframeLinejoin;\n\t\t\tif (this.morphTargets === true) data.morphTargets = true;\n\t\t\tif (this.morphNormals === true) data.morphNormals = true;\n\t\t\tif (this.skinning === true) data.skinning = true;\n\t\t\tif (this.visible === false) data.visible = false;\n\t\t\tif (this.toneMapped === false) data.toneMapped = false;\n\t\t\tif (JSON.stringify(this.userData) !== '{}') data.userData = this.userData; // TODO: Copied from Object3D.toJSON\n\n\t\t\tfunction extractFromCache(cache) {\n\t\t\t\tvar values = [];\n\n\t\t\t\tfor (var key in cache) {\n\t\t\t\t\tvar _data = cache[key];\n\t\t\t\t\tdelete _data.metadata;\n\t\t\t\t\tvalues.push(_data);\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t}\n\n\t\t\tif (isRoot) {\n\t\t\t\tvar textures = extractFromCache(meta.textures);\n\t\t\t\tvar images = extractFromCache(meta.images);\n\t\t\t\tif (textures.length > 0) data.textures = textures;\n\t\t\t\tif (images.length > 0) data.images = images;\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.name = source.name;\n\t\t\tthis.fog = source.fog;\n\t\t\tthis.blending = source.blending;\n\t\t\tthis.side = source.side;\n\t\t\tthis.flatShading = source.flatShading;\n\t\t\tthis.vertexColors = source.vertexColors;\n\t\t\tthis.opacity = source.opacity;\n\t\t\tthis.transparent = source.transparent;\n\t\t\tthis.blendSrc = source.blendSrc;\n\t\t\tthis.blendDst = source.blendDst;\n\t\t\tthis.blendEquation = source.blendEquation;\n\t\t\tthis.blendSrcAlpha = source.blendSrcAlpha;\n\t\t\tthis.blendDstAlpha = source.blendDstAlpha;\n\t\t\tthis.blendEquationAlpha = source.blendEquationAlpha;\n\t\t\tthis.depthFunc = source.depthFunc;\n\t\t\tthis.depthTest = source.depthTest;\n\t\t\tthis.depthWrite = source.depthWrite;\n\t\t\tthis.stencilWriteMask = source.stencilWriteMask;\n\t\t\tthis.stencilFunc = source.stencilFunc;\n\t\t\tthis.stencilRef = source.stencilRef;\n\t\t\tthis.stencilFuncMask = source.stencilFuncMask;\n\t\t\tthis.stencilFail = source.stencilFail;\n\t\t\tthis.stencilZFail = source.stencilZFail;\n\t\t\tthis.stencilZPass = source.stencilZPass;\n\t\t\tthis.stencilWrite = source.stencilWrite;\n\t\t\tvar srcPlanes = source.clippingPlanes;\n\t\t\tvar dstPlanes = null;\n\n\t\t\tif (srcPlanes !== null) {\n\t\t\t\tvar n = srcPlanes.length;\n\t\t\t\tdstPlanes = new Array(n);\n\n\t\t\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\t\t\tdstPlanes[i] = srcPlanes[i].clone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.clippingPlanes = dstPlanes;\n\t\t\tthis.clipIntersection = source.clipIntersection;\n\t\t\tthis.clipShadows = source.clipShadows;\n\t\t\tthis.shadowSide = source.shadowSide;\n\t\t\tthis.colorWrite = source.colorWrite;\n\t\t\tthis.precision = source.precision;\n\t\t\tthis.polygonOffset = source.polygonOffset;\n\t\t\tthis.polygonOffsetFactor = source.polygonOffsetFactor;\n\t\t\tthis.polygonOffsetUnits = source.polygonOffsetUnits;\n\t\t\tthis.dithering = source.dithering;\n\t\t\tthis.alphaTest = source.alphaTest;\n\t\t\tthis.premultipliedAlpha = source.premultipliedAlpha;\n\t\t\tthis.visible = source.visible;\n\t\t\tthis.toneMapped = source.toneMapped;\n\t\t\tthis.userData = JSON.parse(JSON.stringify(source.userData));\n\t\t\treturn this;\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t}\n\t});\n\tObject.defineProperty(Material.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\tspecularMap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tenvMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n\t *\tcombine: THREE.Multiply,\n\t *\treflectivity: <float>,\n\t *\trefractionRatio: <float>,\n\t *\n\t *\tdepthTest: <bool>,\n\t *\tdepthWrite: <bool>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>\n\t * }\n\t */\n\n\tfunction MeshBasicMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshBasicMaterial';\n\t\tthis.color = new Color(0xffffff); // emissive\n\n\t\tthis.map = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.specularMap = null;\n\t\tthis.alphaMap = null;\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshBasicMaterial.prototype = Object.create(Material.prototype);\n\tMeshBasicMaterial.prototype.constructor = MeshBasicMaterial;\n\tMeshBasicMaterial.prototype.isMeshBasicMaterial = true;\n\n\tMeshBasicMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.specularMap = source.specularMap;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\treturn this;\n\t};\n\n\tvar _vector$3 = new Vector3();\n\n\tvar _vector2$1 = new Vector2();\n\n\tfunction BufferAttribute(array, itemSize, normalized) {\n\t\tif (Array.isArray(array)) {\n\t\t\tthrow new TypeError('THREE.BufferAttribute: array should be a Typed Array.');\n\t\t}\n\n\t\tthis.name = '';\n\t\tthis.array = array;\n\t\tthis.itemSize = itemSize;\n\t\tthis.count = array !== undefined ? array.length / itemSize : 0;\n\t\tthis.normalized = normalized === true;\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = {\n\t\t\toffset: 0,\n\t\t\tcount: -1\n\t\t};\n\t\tthis.version = 0;\n\t}\n\n\tObject.defineProperty(BufferAttribute.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\tObject.assign(BufferAttribute.prototype, {\n\t\tisBufferAttribute: true,\n\t\tonUploadCallback: function onUploadCallback() {},\n\t\tsetUsage: function setUsage(value) {\n\t\t\tthis.usage = value;\n\t\t\treturn this;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.name = source.name;\n\t\t\tthis.array = new source.array.constructor(source.array);\n\t\t\tthis.itemSize = source.itemSize;\n\t\t\tthis.count = source.count;\n\t\t\tthis.normalized = source.normalized;\n\t\t\tthis.usage = source.usage;\n\t\t\treturn this;\n\t\t},\n\t\tcopyAt: function copyAt(index1, attribute, index2) {\n\t\t\tindex1 *= this.itemSize;\n\t\t\tindex2 *= attribute.itemSize;\n\n\t\t\tfor (var i = 0, l = this.itemSize; i < l; i++) {\n\t\t\t\tthis.array[index1 + i] = attribute.array[index2 + i];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tcopyArray: function copyArray(array) {\n\t\t\tthis.array.set(array);\n\t\t\treturn this;\n\t\t},\n\t\tcopyColorsArray: function copyColorsArray(colors) {\n\t\t\tvar array = this.array;\n\t\t\tvar offset = 0;\n\n\t\t\tfor (var i = 0, l = colors.length; i < l; i++) {\n\t\t\t\tvar color = colors[i];\n\n\t\t\t\tif (color === undefined) {\n\t\t\t\t\tconsole.warn('THREE.BufferAttribute.copyColorsArray(): color is undefined', i);\n\t\t\t\t\tcolor = new Color();\n\t\t\t\t}\n\n\t\t\t\tarray[offset++] = color.r;\n\t\t\t\tarray[offset++] = color.g;\n\t\t\t\tarray[offset++] = color.b;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tcopyVector2sArray: function copyVector2sArray(vectors) {\n\t\t\tvar array = this.array;\n\t\t\tvar offset = 0;\n\n\t\t\tfor (var i = 0, l = vectors.length; i < l; i++) {\n\t\t\t\tvar vector = vectors[i];\n\n\t\t\t\tif (vector === undefined) {\n\t\t\t\t\tconsole.warn('THREE.BufferAttribute.copyVector2sArray(): vector is undefined', i);\n\t\t\t\t\tvector = new Vector2();\n\t\t\t\t}\n\n\t\t\t\tarray[offset++] = vector.x;\n\t\t\t\tarray[offset++] = vector.y;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tcopyVector3sArray: function copyVector3sArray(vectors) {\n\t\t\tvar array = this.array;\n\t\t\tvar offset = 0;\n\n\t\t\tfor (var i = 0, l = vectors.length; i < l; i++) {\n\t\t\t\tvar vector = vectors[i];\n\n\t\t\t\tif (vector === undefined) {\n\t\t\t\t\tconsole.warn('THREE.BufferAttribute.copyVector3sArray(): vector is undefined', i);\n\t\t\t\t\tvector = new Vector3();\n\t\t\t\t}\n\n\t\t\t\tarray[offset++] = vector.x;\n\t\t\t\tarray[offset++] = vector.y;\n\t\t\t\tarray[offset++] = vector.z;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tcopyVector4sArray: function copyVector4sArray(vectors) {\n\t\t\tvar array = this.array;\n\t\t\tvar offset = 0;\n\n\t\t\tfor (var i = 0, l = vectors.length; i < l; i++) {\n\t\t\t\tvar vector = vectors[i];\n\n\t\t\t\tif (vector === undefined) {\n\t\t\t\t\tconsole.warn('THREE.BufferAttribute.copyVector4sArray(): vector is undefined', i);\n\t\t\t\t\tvector = new Vector4();\n\t\t\t\t}\n\n\t\t\t\tarray[offset++] = vector.x;\n\t\t\t\tarray[offset++] = vector.y;\n\t\t\t\tarray[offset++] = vector.z;\n\t\t\t\tarray[offset++] = vector.w;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tapplyMatrix3: function applyMatrix3(m) {\n\t\t\tif (this.itemSize === 2) {\n\t\t\t\tfor (var i = 0, l = this.count; i < l; i++) {\n\t\t\t\t\t_vector2$1.fromBufferAttribute(this, i);\n\n\t\t\t\t\t_vector2$1.applyMatrix3(m);\n\n\t\t\t\t\tthis.setXY(i, _vector2$1.x, _vector2$1.y);\n\t\t\t\t}\n\t\t\t} else if (this.itemSize === 3) {\n\t\t\t\tfor (var _i = 0, _l = this.count; _i < _l; _i++) {\n\t\t\t\t\t_vector$3.fromBufferAttribute(this, _i);\n\n\t\t\t\t\t_vector$3.applyMatrix3(m);\n\n\t\t\t\t\tthis.setXYZ(_i, _vector$3.x, _vector$3.y, _vector$3.z);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tapplyMatrix4: function applyMatrix4(m) {\n\t\t\tfor (var i = 0, l = this.count; i < l; i++) {\n\t\t\t\t_vector$3.x = this.getX(i);\n\t\t\t\t_vector$3.y = this.getY(i);\n\t\t\t\t_vector$3.z = this.getZ(i);\n\n\t\t\t\t_vector$3.applyMatrix4(m);\n\n\t\t\t\tthis.setXYZ(i, _vector$3.x, _vector$3.y, _vector$3.z);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tapplyNormalMatrix: function applyNormalMatrix(m) {\n\t\t\tfor (var i = 0, l = this.count; i < l; i++) {\n\t\t\t\t_vector$3.x = this.getX(i);\n\t\t\t\t_vector$3.y = this.getY(i);\n\t\t\t\t_vector$3.z = this.getZ(i);\n\n\t\t\t\t_vector$3.applyNormalMatrix(m);\n\n\t\t\t\tthis.setXYZ(i, _vector$3.x, _vector$3.y, _vector$3.z);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\ttransformDirection: function transformDirection(m) {\n\t\t\tfor (var i = 0, l = this.count; i < l; i++) {\n\t\t\t\t_vector$3.x = this.getX(i);\n\t\t\t\t_vector$3.y = this.getY(i);\n\t\t\t\t_vector$3.z = this.getZ(i);\n\n\t\t\t\t_vector$3.transformDirection(m);\n\n\t\t\t\tthis.setXYZ(i, _vector$3.x, _vector$3.y, _vector$3.z);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tset: function set(value, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.array.set(value, offset);\n\t\t\treturn this;\n\t\t},\n\t\tgetX: function getX(index) {\n\t\t\treturn this.array[index * this.itemSize];\n\t\t},\n\t\tsetX: function setX(index, x) {\n\t\t\tthis.array[index * this.itemSize] = x;\n\t\t\treturn this;\n\t\t},\n\t\tgetY: function getY(index) {\n\t\t\treturn this.array[index * this.itemSize + 1];\n\t\t},\n\t\tsetY: function setY(index, y) {\n\t\t\tthis.array[index * this.itemSize + 1] = y;\n\t\t\treturn this;\n\t\t},\n\t\tgetZ: function getZ(index) {\n\t\t\treturn this.array[index * this.itemSize + 2];\n\t\t},\n\t\tsetZ: function setZ(index, z) {\n\t\t\tthis.array[index * this.itemSize + 2] = z;\n\t\t\treturn this;\n\t\t},\n\t\tgetW: function getW(index) {\n\t\t\treturn this.array[index * this.itemSize + 3];\n\t\t},\n\t\tsetW: function setW(index, w) {\n\t\t\tthis.array[index * this.itemSize + 3] = w;\n\t\t\treturn this;\n\t\t},\n\t\tsetXY: function setXY(index, x, y) {\n\t\t\tindex *= this.itemSize;\n\t\t\tthis.array[index + 0] = x;\n\t\t\tthis.array[index + 1] = y;\n\t\t\treturn this;\n\t\t},\n\t\tsetXYZ: function setXYZ(index, x, y, z) {\n\t\t\tindex *= this.itemSize;\n\t\t\tthis.array[index + 0] = x;\n\t\t\tthis.array[index + 1] = y;\n\t\t\tthis.array[index + 2] = z;\n\t\t\treturn this;\n\t\t},\n\t\tsetXYZW: function setXYZW(index, x, y, z, w) {\n\t\t\tindex *= this.itemSize;\n\t\t\tthis.array[index + 0] = x;\n\t\t\tthis.array[index + 1] = y;\n\t\t\tthis.array[index + 2] = z;\n\t\t\tthis.array[index + 3] = w;\n\t\t\treturn this;\n\t\t},\n\t\tonUpload: function onUpload(callback) {\n\t\t\tthis.onUploadCallback = callback;\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor(this.array, this.itemSize).copy(this);\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\treturn {\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\tarray: Array.prototype.slice.call(this.array),\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\t\t}\n\t}); //\n\n\tfunction Int8BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Int8Array(array), itemSize, normalized);\n\t}\n\n\tInt8BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tInt8BufferAttribute.prototype.constructor = Int8BufferAttribute;\n\n\tfunction Uint8BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint8Array(array), itemSize, normalized);\n\t}\n\n\tUint8BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tUint8BufferAttribute.prototype.constructor = Uint8BufferAttribute;\n\n\tfunction Uint8ClampedBufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint8ClampedArray(array), itemSize, normalized);\n\t}\n\n\tUint8ClampedBufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tUint8ClampedBufferAttribute.prototype.constructor = Uint8ClampedBufferAttribute;\n\n\tfunction Int16BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Int16Array(array), itemSize, normalized);\n\t}\n\n\tInt16BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tInt16BufferAttribute.prototype.constructor = Int16BufferAttribute;\n\n\tfunction Uint16BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint16Array(array), itemSize, normalized);\n\t}\n\n\tUint16BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tUint16BufferAttribute.prototype.constructor = Uint16BufferAttribute;\n\n\tfunction Int32BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Int32Array(array), itemSize, normalized);\n\t}\n\n\tInt32BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tInt32BufferAttribute.prototype.constructor = Int32BufferAttribute;\n\n\tfunction Uint32BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint32Array(array), itemSize, normalized);\n\t}\n\n\tUint32BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tUint32BufferAttribute.prototype.constructor = Uint32BufferAttribute;\n\n\tfunction Float16BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint16Array(array), itemSize, normalized);\n\t}\n\n\tFloat16BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tFloat16BufferAttribute.prototype.constructor = Float16BufferAttribute;\n\tFloat16BufferAttribute.prototype.isFloat16BufferAttribute = true;\n\n\tfunction Float32BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Float32Array(array), itemSize, normalized);\n\t}\n\n\tFloat32BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tFloat32BufferAttribute.prototype.constructor = Float32BufferAttribute;\n\n\tfunction Float64BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Float64Array(array), itemSize, normalized);\n\t}\n\n\tFloat64BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tFloat64BufferAttribute.prototype.constructor = Float64BufferAttribute; //\n\n\tfunction arrayMax(array) {\n\t\tif (array.length === 0) return -Infinity;\n\t\tvar max = array[0];\n\n\t\tfor (var i = 1, l = array.length; i < l; ++i) {\n\t\t\tif (array[i] > max) max = array[i];\n\t\t}\n\n\t\treturn max;\n\t}\n\n\tvar TYPED_ARRAYS = {\n\t\tInt8Array: Int8Array,\n\t\tUint8Array: Uint8Array,\n\t\t// Workaround for IE11 pre KB2929437. See #11440\n\t\tUint8ClampedArray: typeof Uint8ClampedArray !== 'undefined' ? Uint8ClampedArray : Uint8Array,\n\t\tInt16Array: Int16Array,\n\t\tUint16Array: Uint16Array,\n\t\tInt32Array: Int32Array,\n\t\tUint32Array: Uint32Array,\n\t\tFloat32Array: Float32Array,\n\t\tFloat64Array: Float64Array\n\t};\n\n\tfunction getTypedArray(type, buffer) {\n\t\treturn new TYPED_ARRAYS[type](buffer);\n\t}\n\n\tvar _id = 0;\n\n\tvar _m1$2 = new Matrix4();\n\n\tvar _obj = new Object3D();\n\n\tvar _offset = new Vector3();\n\n\tvar _box$2 = new Box3();\n\n\tvar _boxMorphTargets = new Box3();\n\n\tvar _vector$4 = new Vector3();\n\n\tfunction BufferGeometry() {\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tvalue: _id++\n\t\t});\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.name = '';\n\t\tthis.type = 'BufferGeometry';\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\t\tthis.morphAttributes = {};\n\t\tthis.morphTargetsRelative = false;\n\t\tthis.groups = [];\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\t\tthis.drawRange = {\n\t\t\tstart: 0,\n\t\t\tcount: Infinity\n\t\t};\n\t\tthis.userData = {};\n\t}\n\n\tBufferGeometry.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: BufferGeometry,\n\t\tisBufferGeometry: true,\n\t\tgetIndex: function getIndex() {\n\t\t\treturn this.index;\n\t\t},\n\t\tsetIndex: function setIndex(index) {\n\t\t\tif (Array.isArray(index)) {\n\t\t\t\tthis.index = new (arrayMax(index) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute)(index, 1);\n\t\t\t} else {\n\t\t\t\tthis.index = index;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tgetAttribute: function getAttribute(name) {\n\t\t\treturn this.attributes[name];\n\t\t},\n\t\tsetAttribute: function setAttribute(name, attribute) {\n\t\t\tthis.attributes[name] = attribute;\n\t\t\treturn this;\n\t\t},\n\t\tdeleteAttribute: function deleteAttribute(name) {\n\t\t\tdelete this.attributes[name];\n\t\t\treturn this;\n\t\t},\n\t\thasAttribute: function hasAttribute(name) {\n\t\t\treturn this.attributes[name] !== undefined;\n\t\t},\n\t\taddGroup: function addGroup(start, count, materialIndex) {\n\t\t\tif (materialIndex === void 0) {\n\t\t\t\tmaterialIndex = 0;\n\t\t\t}\n\n\t\t\tthis.groups.push({\n\t\t\t\tstart: start,\n\t\t\t\tcount: count,\n\t\t\t\tmaterialIndex: materialIndex\n\t\t\t});\n\t\t},\n\t\tclearGroups: function clearGroups() {\n\t\t\tthis.groups = [];\n\t\t},\n\t\tsetDrawRange: function setDrawRange(start, count) {\n\t\t\tthis.drawRange.start = start;\n\t\t\tthis.drawRange.count = count;\n\t\t},\n\t\tapplyMatrix4: function applyMatrix4(matrix) {\n\t\t\tvar position = this.attributes.position;\n\n\t\t\tif (position !== undefined) {\n\t\t\t\tposition.applyMatrix4(matrix);\n\t\t\t\tposition.needsUpdate = true;\n\t\t\t}\n\n\t\t\tvar normal = this.attributes.normal;\n\n\t\t\tif (normal !== undefined) {\n\t\t\t\tvar normalMatrix = new Matrix3().getNormalMatrix(matrix);\n\t\t\t\tnormal.applyNormalMatrix(normalMatrix);\n\t\t\t\tnormal.needsUpdate = true;\n\t\t\t}\n\n\t\t\tvar tangent = this.attributes.tangent;\n\n\t\t\tif (tangent !== undefined) {\n\t\t\t\ttangent.transformDirection(matrix);\n\t\t\t\ttangent.needsUpdate = true;\n\t\t\t}\n\n\t\t\tif (this.boundingBox !== null) {\n\t\t\t\tthis.computeBoundingBox();\n\t\t\t}\n\n\t\t\tif (this.boundingSphere !== null) {\n\t\t\t\tthis.computeBoundingSphere();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\trotateX: function rotateX(angle) {\n\t\t\t// rotate geometry around world x-axis\n\t\t\t_m1$2.makeRotationX(angle);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\trotateY: function rotateY(angle) {\n\t\t\t// rotate geometry around world y-axis\n\t\t\t_m1$2.makeRotationY(angle);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\trotateZ: function rotateZ(angle) {\n\t\t\t// rotate geometry around world z-axis\n\t\t\t_m1$2.makeRotationZ(angle);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\ttranslate: function translate(x, y, z) {\n\t\t\t// translate geometry\n\t\t\t_m1$2.makeTranslation(x, y, z);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\tscale: function scale(x, y, z) {\n\t\t\t// scale geometry\n\t\t\t_m1$2.makeScale(x, y, z);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\tlookAt: function lookAt(vector) {\n\t\t\t_obj.lookAt(vector);\n\n\t\t\t_obj.updateMatrix();\n\n\t\t\tthis.applyMatrix4(_obj.matrix);\n\t\t\treturn this;\n\t\t},\n\t\tcenter: function center() {\n\t\t\tthis.computeBoundingBox();\n\t\t\tthis.boundingBox.getCenter(_offset).negate();\n\t\t\tthis.translate(_offset.x, _offset.y, _offset.z);\n\t\t\treturn this;\n\t\t},\n\t\tsetFromPoints: function setFromPoints(points) {\n\t\t\tvar position = [];\n\n\t\t\tfor (var i = 0, l = points.length; i < l; i++) {\n\t\t\t\tvar point = points[i];\n\t\t\t\tposition.push(point.x, point.y, point.z || 0);\n\t\t\t}\n\n\t\t\tthis.setAttribute('position', new Float32BufferAttribute(position, 3));\n\t\t\treturn this;\n\t\t},\n\t\tcomputeBoundingBox: function computeBoundingBox() {\n\t\t\tif (this.boundingBox === null) {\n\t\t\t\tthis.boundingBox = new Box3();\n\t\t\t}\n\n\t\t\tvar position = this.attributes.position;\n\t\t\tvar morphAttributesPosition = this.morphAttributes.position;\n\n\t\t\tif (position && position.isGLBufferAttribute) {\n\t\t\t\tconsole.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".', this);\n\t\t\t\tthis.boundingBox.set(new Vector3(-Infinity, -Infinity, -Infinity), new Vector3(+Infinity, +Infinity, +Infinity));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (position !== undefined) {\n\t\t\t\tthis.boundingBox.setFromBufferAttribute(position); // process morph attributes if present\n\n\t\t\t\tif (morphAttributesPosition) {\n\t\t\t\t\tfor (var i = 0, il = morphAttributesPosition.length; i < il; i++) {\n\t\t\t\t\t\tvar morphAttribute = morphAttributesPosition[i];\n\n\t\t\t\t\t\t_box$2.setFromBufferAttribute(morphAttribute);\n\n\t\t\t\t\t\tif (this.morphTargetsRelative) {\n\t\t\t\t\t\t\t_vector$4.addVectors(this.boundingBox.min, _box$2.min);\n\n\t\t\t\t\t\t\tthis.boundingBox.expandByPoint(_vector$4);\n\n\t\t\t\t\t\t\t_vector$4.addVectors(this.boundingBox.max, _box$2.max);\n\n\t\t\t\t\t\t\tthis.boundingBox.expandByPoint(_vector$4);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.boundingBox.expandByPoint(_box$2.min);\n\t\t\t\t\t\t\tthis.boundingBox.expandByPoint(_box$2.max);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.boundingBox.makeEmpty();\n\t\t\t}\n\n\t\t\tif (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) {\n\t\t\t\tconsole.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.', this);\n\t\t\t}\n\t\t},\n\t\tcomputeBoundingSphere: function computeBoundingSphere() {\n\t\t\tif (this.boundingSphere === null) {\n\t\t\t\tthis.boundingSphere = new Sphere();\n\t\t\t}\n\n\t\t\tvar position = this.attributes.position;\n\t\t\tvar morphAttributesPosition = this.morphAttributes.position;\n\n\t\t\tif (position && position.isGLBufferAttribute) {\n\t\t\t\tconsole.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".', this);\n\t\t\t\tthis.boundingSphere.set(new Vector3(), Infinity);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (position) {\n\t\t\t\t// first, find the center of the bounding sphere\n\t\t\t\tvar center = this.boundingSphere.center;\n\n\t\t\t\t_box$2.setFromBufferAttribute(position); // process morph attributes if present\n\n\n\t\t\t\tif (morphAttributesPosition) {\n\t\t\t\t\tfor (var i = 0, il = morphAttributesPosition.length; i < il; i++) {\n\t\t\t\t\t\tvar morphAttribute = morphAttributesPosition[i];\n\n\t\t\t\t\t\t_boxMorphTargets.setFromBufferAttribute(morphAttribute);\n\n\t\t\t\t\t\tif (this.morphTargetsRelative) {\n\t\t\t\t\t\t\t_vector$4.addVectors(_box$2.min, _boxMorphTargets.min);\n\n\t\t\t\t\t\t\t_box$2.expandByPoint(_vector$4);\n\n\t\t\t\t\t\t\t_vector$4.addVectors(_box$2.max, _boxMorphTargets.max);\n\n\t\t\t\t\t\t\t_box$2.expandByPoint(_vector$4);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t_box$2.expandByPoint(_boxMorphTargets.min);\n\n\t\t\t\t\t\t\t_box$2.expandByPoint(_boxMorphTargets.max);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t_box$2.getCenter(center); // second, try to find a boundingSphere with a radius smaller than the\n\t\t\t\t// boundingSphere of the boundingBox: sqrt(3) smaller in the best case\n\n\n\t\t\t\tvar maxRadiusSq = 0;\n\n\t\t\t\tfor (var _i = 0, _il = position.count; _i < _il; _i++) {\n\t\t\t\t\t_vector$4.fromBufferAttribute(position, _i);\n\n\t\t\t\t\tmaxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector$4));\n\t\t\t\t} // process morph attributes if present\n\n\n\t\t\t\tif (morphAttributesPosition) {\n\t\t\t\t\tfor (var _i2 = 0, _il2 = morphAttributesPosition.length; _i2 < _il2; _i2++) {\n\t\t\t\t\t\tvar _morphAttribute = morphAttributesPosition[_i2];\n\t\t\t\t\t\tvar morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t\t\t\t\tfor (var j = 0, jl = _morphAttribute.count; j < jl; j++) {\n\t\t\t\t\t\t\t_vector$4.fromBufferAttribute(_morphAttribute, j);\n\n\t\t\t\t\t\t\tif (morphTargetsRelative) {\n\t\t\t\t\t\t\t\t_offset.fromBufferAttribute(position, j);\n\n\t\t\t\t\t\t\t\t_vector$4.add(_offset);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmaxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector$4));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.boundingSphere.radius = Math.sqrt(maxRadiusSq);\n\n\t\t\t\tif (isNaN(this.boundingSphere.radius)) {\n\t\t\t\t\tconsole.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.', this);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcomputeFaceNormals: function computeFaceNormals() {// backwards compatibility\n\t\t},\n\t\tcomputeTangents: function computeTangents() {\n\t\t\tvar index = this.index;\n\t\t\tvar attributes = this.attributes; // based on http://www.terathon.com/code/tangent.html\n\t\t\t// (per vertex tangents)\n\n\t\t\tif (index === null || attributes.position === undefined || attributes.normal === undefined || attributes.uv === undefined) {\n\t\t\t\tconsole.error('THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar indices = index.array;\n\t\t\tvar positions = attributes.position.array;\n\t\t\tvar normals = attributes.normal.array;\n\t\t\tvar uvs = attributes.uv.array;\n\t\t\tvar nVertices = positions.length / 3;\n\n\t\t\tif (attributes.tangent === undefined) {\n\t\t\t\tthis.setAttribute('tangent', new BufferAttribute(new Float32Array(4 * nVertices), 4));\n\t\t\t}\n\n\t\t\tvar tangents = attributes.tangent.array;\n\t\t\tvar tan1 = [],\n\t\t\t\t\ttan2 = [];\n\n\t\t\tfor (var i = 0; i < nVertices; i++) {\n\t\t\t\ttan1[i] = new Vector3();\n\t\t\t\ttan2[i] = new Vector3();\n\t\t\t}\n\n\t\t\tvar vA = new Vector3(),\n\t\t\t\t\tvB = new Vector3(),\n\t\t\t\t\tvC = new Vector3(),\n\t\t\t\t\tuvA = new Vector2(),\n\t\t\t\t\tuvB = new Vector2(),\n\t\t\t\t\tuvC = new Vector2(),\n\t\t\t\t\tsdir = new Vector3(),\n\t\t\t\t\ttdir = new Vector3();\n\n\t\t\tfunction handleTriangle(a, b, c) {\n\t\t\t\tvA.fromArray(positions, a * 3);\n\t\t\t\tvB.fromArray(positions, b * 3);\n\t\t\t\tvC.fromArray(positions, c * 3);\n\t\t\t\tuvA.fromArray(uvs, a * 2);\n\t\t\t\tuvB.fromArray(uvs, b * 2);\n\t\t\t\tuvC.fromArray(uvs, c * 2);\n\t\t\t\tvB.sub(vA);\n\t\t\t\tvC.sub(vA);\n\t\t\t\tuvB.sub(uvA);\n\t\t\t\tuvC.sub(uvA);\n\t\t\t\tvar r = 1.0 / (uvB.x * uvC.y - uvC.x * uvB.y); // silently ignore degenerate uv triangles having coincident or colinear vertices\n\n\t\t\t\tif (!isFinite(r)) return;\n\t\t\t\tsdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC, -uvB.y).multiplyScalar(r);\n\t\t\t\ttdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB, -uvC.x).multiplyScalar(r);\n\t\t\t\ttan1[a].add(sdir);\n\t\t\t\ttan1[b].add(sdir);\n\t\t\t\ttan1[c].add(sdir);\n\t\t\t\ttan2[a].add(tdir);\n\t\t\t\ttan2[b].add(tdir);\n\t\t\t\ttan2[c].add(tdir);\n\t\t\t}\n\n\t\t\tvar groups = this.groups;\n\n\t\t\tif (groups.length === 0) {\n\t\t\t\tgroups = [{\n\t\t\t\t\tstart: 0,\n\t\t\t\t\tcount: indices.length\n\t\t\t\t}];\n\t\t\t}\n\n\t\t\tfor (var _i3 = 0, il = groups.length; _i3 < il; ++_i3) {\n\t\t\t\tvar group = groups[_i3];\n\t\t\t\tvar start = group.start;\n\t\t\t\tvar count = group.count;\n\n\t\t\t\tfor (var j = start, jl = start + count; j < jl; j += 3) {\n\t\t\t\t\thandleTriangle(indices[j + 0], indices[j + 1], indices[j + 2]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar tmp = new Vector3(),\n\t\t\t\t\ttmp2 = new Vector3();\n\t\t\tvar n = new Vector3(),\n\t\t\t\t\tn2 = new Vector3();\n\n\t\t\tfunction handleVertex(v) {\n\t\t\t\tn.fromArray(normals, v * 3);\n\t\t\t\tn2.copy(n);\n\t\t\t\tvar t = tan1[v]; // Gram-Schmidt orthogonalize\n\n\t\t\t\ttmp.copy(t);\n\t\t\t\ttmp.sub(n.multiplyScalar(n.dot(t))).normalize(); // Calculate handedness\n\n\t\t\t\ttmp2.crossVectors(n2, t);\n\t\t\t\tvar test = tmp2.dot(tan2[v]);\n\t\t\t\tvar w = test < 0.0 ? -1.0 : 1.0;\n\t\t\t\ttangents[v * 4] = tmp.x;\n\t\t\t\ttangents[v * 4 + 1] = tmp.y;\n\t\t\t\ttangents[v * 4 + 2] = tmp.z;\n\t\t\t\ttangents[v * 4 + 3] = w;\n\t\t\t}\n\n\t\t\tfor (var _i4 = 0, _il3 = groups.length; _i4 < _il3; ++_i4) {\n\t\t\t\tvar _group = groups[_i4];\n\t\t\t\tvar _start = _group.start;\n\t\t\t\tvar _count = _group.count;\n\n\t\t\t\tfor (var _j = _start, _jl = _start + _count; _j < _jl; _j += 3) {\n\t\t\t\t\thandleVertex(indices[_j + 0]);\n\t\t\t\t\thandleVertex(indices[_j + 1]);\n\t\t\t\t\thandleVertex(indices[_j + 2]);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcomputeVertexNormals: function computeVertexNormals() {\n\t\t\tvar index = this.index;\n\t\t\tvar positionAttribute = this.getAttribute('position');\n\n\t\t\tif (positionAttribute !== undefined) {\n\t\t\t\tvar normalAttribute = this.getAttribute('normal');\n\n\t\t\t\tif (normalAttribute === undefined) {\n\t\t\t\t\tnormalAttribute = new BufferAttribute(new Float32Array(positionAttribute.count * 3), 3);\n\t\t\t\t\tthis.setAttribute('normal', normalAttribute);\n\t\t\t\t} else {\n\t\t\t\t\t// reset existing normals to zero\n\t\t\t\t\tfor (var i = 0, il = normalAttribute.count; i < il; i++) {\n\t\t\t\t\t\tnormalAttribute.setXYZ(i, 0, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar pA = new Vector3(),\n\t\t\t\t\t\tpB = new Vector3(),\n\t\t\t\t\t\tpC = new Vector3();\n\t\t\t\tvar nA = new Vector3(),\n\t\t\t\t\t\tnB = new Vector3(),\n\t\t\t\t\t\tnC = new Vector3();\n\t\t\t\tvar cb = new Vector3(),\n\t\t\t\t\t\tab = new Vector3(); // indexed elements\n\n\t\t\t\tif (index) {\n\t\t\t\t\tfor (var _i5 = 0, _il4 = index.count; _i5 < _il4; _i5 += 3) {\n\t\t\t\t\t\tvar vA = index.getX(_i5 + 0);\n\t\t\t\t\t\tvar vB = index.getX(_i5 + 1);\n\t\t\t\t\t\tvar vC = index.getX(_i5 + 2);\n\t\t\t\t\t\tpA.fromBufferAttribute(positionAttribute, vA);\n\t\t\t\t\t\tpB.fromBufferAttribute(positionAttribute, vB);\n\t\t\t\t\t\tpC.fromBufferAttribute(positionAttribute, vC);\n\t\t\t\t\t\tcb.subVectors(pC, pB);\n\t\t\t\t\t\tab.subVectors(pA, pB);\n\t\t\t\t\t\tcb.cross(ab);\n\t\t\t\t\t\tnA.fromBufferAttribute(normalAttribute, vA);\n\t\t\t\t\t\tnB.fromBufferAttribute(normalAttribute, vB);\n\t\t\t\t\t\tnC.fromBufferAttribute(normalAttribute, vC);\n\t\t\t\t\t\tnA.add(cb);\n\t\t\t\t\t\tnB.add(cb);\n\t\t\t\t\t\tnC.add(cb);\n\t\t\t\t\t\tnormalAttribute.setXYZ(vA, nA.x, nA.y, nA.z);\n\t\t\t\t\t\tnormalAttribute.setXYZ(vB, nB.x, nB.y, nB.z);\n\t\t\t\t\t\tnormalAttribute.setXYZ(vC, nC.x, nC.y, nC.z);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// non-indexed elements (unconnected triangle soup)\n\t\t\t\t\tfor (var _i6 = 0, _il5 = positionAttribute.count; _i6 < _il5; _i6 += 3) {\n\t\t\t\t\t\tpA.fromBufferAttribute(positionAttribute, _i6 + 0);\n\t\t\t\t\t\tpB.fromBufferAttribute(positionAttribute, _i6 + 1);\n\t\t\t\t\t\tpC.fromBufferAttribute(positionAttribute, _i6 + 2);\n\t\t\t\t\t\tcb.subVectors(pC, pB);\n\t\t\t\t\t\tab.subVectors(pA, pB);\n\t\t\t\t\t\tcb.cross(ab);\n\t\t\t\t\t\tnormalAttribute.setXYZ(_i6 + 0, cb.x, cb.y, cb.z);\n\t\t\t\t\t\tnormalAttribute.setXYZ(_i6 + 1, cb.x, cb.y, cb.z);\n\t\t\t\t\t\tnormalAttribute.setXYZ(_i6 + 2, cb.x, cb.y, cb.z);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.normalizeNormals();\n\t\t\t\tnormalAttribute.needsUpdate = true;\n\t\t\t}\n\t\t},\n\t\tmerge: function merge(geometry, offset) {\n\t\t\tif (!(geometry && geometry.isBufferGeometry)) {\n\t\t\t\tconsole.error('THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', geometry);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (offset === undefined) {\n\t\t\t\toffset = 0;\n\t\t\t\tconsole.warn('THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. ' + 'Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge.');\n\t\t\t}\n\n\t\t\tvar attributes = this.attributes;\n\n\t\t\tfor (var key in attributes) {\n\t\t\t\tif (geometry.attributes[key] === undefined) continue;\n\t\t\t\tvar attribute1 = attributes[key];\n\t\t\t\tvar attributeArray1 = attribute1.array;\n\t\t\t\tvar attribute2 = geometry.attributes[key];\n\t\t\t\tvar attributeArray2 = attribute2.array;\n\t\t\t\tvar attributeOffset = attribute2.itemSize * offset;\n\t\t\t\tvar length = Math.min(attributeArray2.length, attributeArray1.length - attributeOffset);\n\n\t\t\t\tfor (var i = 0, j = attributeOffset; i < length; i++, j++) {\n\t\t\t\t\tattributeArray1[j] = attributeArray2[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tnormalizeNormals: function normalizeNormals() {\n\t\t\tvar normals = this.attributes.normal;\n\n\t\t\tfor (var i = 0, il = normals.count; i < il; i++) {\n\t\t\t\t_vector$4.fromBufferAttribute(normals, i);\n\n\t\t\t\t_vector$4.normalize();\n\n\t\t\t\tnormals.setXYZ(i, _vector$4.x, _vector$4.y, _vector$4.z);\n\t\t\t}\n\t\t},\n\t\ttoNonIndexed: function toNonIndexed() {\n\t\t\tfunction convertBufferAttribute(attribute, indices) {\n\t\t\t\tvar array = attribute.array;\n\t\t\t\tvar itemSize = attribute.itemSize;\n\t\t\t\tvar normalized = attribute.normalized;\n\t\t\t\tvar array2 = new array.constructor(indices.length * itemSize);\n\t\t\t\tvar index = 0,\n\t\t\t\t\t\tindex2 = 0;\n\n\t\t\t\tfor (var i = 0, l = indices.length; i < l; i++) {\n\t\t\t\t\tindex = indices[i] * itemSize;\n\n\t\t\t\t\tfor (var j = 0; j < itemSize; j++) {\n\t\t\t\t\t\tarray2[index2++] = array[index++];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new BufferAttribute(array2, itemSize, normalized);\n\t\t\t} //\n\n\n\t\t\tif (this.index === null) {\n\t\t\t\tconsole.warn('THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.');\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar geometry2 = new BufferGeometry();\n\t\t\tvar indices = this.index.array;\n\t\t\tvar attributes = this.attributes; // attributes\n\n\t\t\tfor (var name in attributes) {\n\t\t\t\tvar attribute = attributes[name];\n\t\t\t\tvar newAttribute = convertBufferAttribute(attribute, indices);\n\t\t\t\tgeometry2.setAttribute(name, newAttribute);\n\t\t\t} // morph attributes\n\n\n\t\t\tvar morphAttributes = this.morphAttributes;\n\n\t\t\tfor (var _name in morphAttributes) {\n\t\t\t\tvar morphArray = [];\n\t\t\t\tvar morphAttribute = morphAttributes[_name]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\t\tfor (var i = 0, il = morphAttribute.length; i < il; i++) {\n\t\t\t\t\tvar _attribute = morphAttribute[i];\n\n\t\t\t\t\tvar _newAttribute = convertBufferAttribute(_attribute, indices);\n\n\t\t\t\t\tmorphArray.push(_newAttribute);\n\t\t\t\t}\n\n\t\t\t\tgeometry2.morphAttributes[_name] = morphArray;\n\t\t\t}\n\n\t\t\tgeometry2.morphTargetsRelative = this.morphTargetsRelative; // groups\n\n\t\t\tvar groups = this.groups;\n\n\t\t\tfor (var _i7 = 0, l = groups.length; _i7 < l; _i7++) {\n\t\t\t\tvar group = groups[_i7];\n\t\t\t\tgeometry2.addGroup(group.start, group.count, group.materialIndex);\n\t\t\t}\n\n\t\t\treturn geometry2;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'BufferGeometry',\n\t\t\t\t\tgenerator: 'BufferGeometry.toJSON'\n\t\t\t\t}\n\t\t\t}; // standard BufferGeometry serialization\n\n\t\t\tdata.uuid = this.uuid;\n\t\t\tdata.type = this.type;\n\t\t\tif (this.name !== '') data.name = this.name;\n\t\t\tif (Object.keys(this.userData).length > 0) data.userData = this.userData;\n\n\t\t\tif (this.parameters !== undefined) {\n\t\t\t\tvar parameters = this.parameters;\n\n\t\t\t\tfor (var key in parameters) {\n\t\t\t\t\tif (parameters[key] !== undefined) data[key] = parameters[key];\n\t\t\t\t}\n\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tdata.data = {\n\t\t\t\tattributes: {}\n\t\t\t};\n\t\t\tvar index = this.index;\n\n\t\t\tif (index !== null) {\n\t\t\t\tdata.data.index = {\n\t\t\t\t\ttype: index.array.constructor.name,\n\t\t\t\t\tarray: Array.prototype.slice.call(index.array)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar attributes = this.attributes;\n\n\t\t\tfor (var _key in attributes) {\n\t\t\t\tvar attribute = attributes[_key];\n\t\t\t\tvar attributeData = attribute.toJSON(data.data);\n\t\t\t\tif (attribute.name !== '') attributeData.name = attribute.name;\n\t\t\t\tdata.data.attributes[_key] = attributeData;\n\t\t\t}\n\n\t\t\tvar morphAttributes = {};\n\t\t\tvar hasMorphAttributes = false;\n\n\t\t\tfor (var _key2 in this.morphAttributes) {\n\t\t\t\tvar attributeArray = this.morphAttributes[_key2];\n\t\t\t\tvar array = [];\n\n\t\t\t\tfor (var i = 0, il = attributeArray.length; i < il; i++) {\n\t\t\t\t\tvar _attribute2 = attributeArray[i];\n\n\t\t\t\t\tvar _attributeData = _attribute2.toJSON(data.data);\n\n\t\t\t\t\tif (_attribute2.name !== '') _attributeData.name = _attribute2.name;\n\t\t\t\t\tarray.push(_attributeData);\n\t\t\t\t}\n\n\t\t\t\tif (array.length > 0) {\n\t\t\t\t\tmorphAttributes[_key2] = array;\n\t\t\t\t\thasMorphAttributes = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (hasMorphAttributes) {\n\t\t\t\tdata.data.morphAttributes = morphAttributes;\n\t\t\t\tdata.data.morphTargetsRelative = this.morphTargetsRelative;\n\t\t\t}\n\n\t\t\tvar groups = this.groups;\n\n\t\t\tif (groups.length > 0) {\n\t\t\t\tdata.data.groups = JSON.parse(JSON.stringify(groups));\n\t\t\t}\n\n\t\t\tvar boundingSphere = this.boundingSphere;\n\n\t\t\tif (boundingSphere !== null) {\n\t\t\t\tdata.data.boundingSphere = {\n\t\t\t\t\tcenter: boundingSphere.center.toArray(),\n\t\t\t\t\tradius: boundingSphere.radius\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t\tclone: function clone() {\n\t\t\t/*\n\t\t\t // Handle primitives\n\t\t\t\t\t const parameters = this.parameters;\n\t\t\t\t\t if ( parameters !== undefined ) {\n\t\t\t\t\t const values = [];\n\t\t\t\t\t for ( const key in parameters ) {\n\t\t\t\t\t values.push( parameters[ key ] );\n\t\t\t\t\t }\n\t\t\t\t\t const geometry = Object.create( this.constructor.prototype );\n\t\t\t this.constructor.apply( geometry, values );\n\t\t\t return geometry;\n\t\t\t\t\t }\n\t\t\t\t\t return new this.constructor().copy( this );\n\t\t\t */\n\t\t\treturn new BufferGeometry().copy(this);\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\t// reset\n\t\t\tthis.index = null;\n\t\t\tthis.attributes = {};\n\t\t\tthis.morphAttributes = {};\n\t\t\tthis.groups = [];\n\t\t\tthis.boundingBox = null;\n\t\t\tthis.boundingSphere = null; // used for storing cloned, shared data\n\n\t\t\tvar data = {}; // name\n\n\t\t\tthis.name = source.name; // index\n\n\t\t\tvar index = source.index;\n\n\t\t\tif (index !== null) {\n\t\t\t\tthis.setIndex(index.clone(data));\n\t\t\t} // attributes\n\n\n\t\t\tvar attributes = source.attributes;\n\n\t\t\tfor (var name in attributes) {\n\t\t\t\tvar attribute = attributes[name];\n\t\t\t\tthis.setAttribute(name, attribute.clone(data));\n\t\t\t} // morph attributes\n\n\n\t\t\tvar morphAttributes = source.morphAttributes;\n\n\t\t\tfor (var _name2 in morphAttributes) {\n\t\t\t\tvar array = [];\n\t\t\t\tvar morphAttribute = morphAttributes[_name2]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\t\tfor (var i = 0, l = morphAttribute.length; i < l; i++) {\n\t\t\t\t\tarray.push(morphAttribute[i].clone(data));\n\t\t\t\t}\n\n\t\t\t\tthis.morphAttributes[_name2] = array;\n\t\t\t}\n\n\t\t\tthis.morphTargetsRelative = source.morphTargetsRelative; // groups\n\n\t\t\tvar groups = source.groups;\n\n\t\t\tfor (var _i8 = 0, _l = groups.length; _i8 < _l; _i8++) {\n\t\t\t\tvar group = groups[_i8];\n\t\t\t\tthis.addGroup(group.start, group.count, group.materialIndex);\n\t\t\t} // bounding box\n\n\n\t\t\tvar boundingBox = source.boundingBox;\n\n\t\t\tif (boundingBox !== null) {\n\t\t\t\tthis.boundingBox = boundingBox.clone();\n\t\t\t} // bounding sphere\n\n\n\t\t\tvar boundingSphere = source.boundingSphere;\n\n\t\t\tif (boundingSphere !== null) {\n\t\t\t\tthis.boundingSphere = boundingSphere.clone();\n\t\t\t} // draw range\n\n\n\t\t\tthis.drawRange.start = source.drawRange.start;\n\t\t\tthis.drawRange.count = source.drawRange.count; // user data\n\n\t\t\tthis.userData = source.userData;\n\t\t\treturn this;\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t}\n\t});\n\n\tvar _inverseMatrix = new Matrix4();\n\n\tvar _ray = new Ray();\n\n\tvar _sphere = new Sphere();\n\n\tvar _vA = new Vector3();\n\n\tvar _vB = new Vector3();\n\n\tvar _vC = new Vector3();\n\n\tvar _tempA = new Vector3();\n\n\tvar _tempB = new Vector3();\n\n\tvar _tempC = new Vector3();\n\n\tvar _morphA = new Vector3();\n\n\tvar _morphB = new Vector3();\n\n\tvar _morphC = new Vector3();\n\n\tvar _uvA = new Vector2();\n\n\tvar _uvB = new Vector2();\n\n\tvar _uvC = new Vector2();\n\n\tvar _intersectionPoint = new Vector3();\n\n\tvar _intersectionPointWorld = new Vector3();\n\n\tfunction Mesh(geometry, material) {\n\t\tif (geometry === void 0) {\n\t\t\tgeometry = new BufferGeometry();\n\t\t}\n\n\t\tif (material === void 0) {\n\t\t\tmaterial = new MeshBasicMaterial();\n\t\t}\n\n\t\tObject3D.call(this);\n\t\tthis.type = 'Mesh';\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\t\tthis.updateMorphTargets();\n\t}\n\n\tMesh.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Mesh,\n\t\tisMesh: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\n\t\t\tif (source.morphTargetInfluences !== undefined) {\n\t\t\t\tthis.morphTargetInfluences = source.morphTargetInfluences.slice();\n\t\t\t}\n\n\t\t\tif (source.morphTargetDictionary !== undefined) {\n\t\t\t\tthis.morphTargetDictionary = Object.assign({}, source.morphTargetDictionary);\n\t\t\t}\n\n\t\t\tthis.material = source.material;\n\t\t\tthis.geometry = source.geometry;\n\t\t\treturn this;\n\t\t},\n\t\tupdateMorphTargets: function updateMorphTargets() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar morphAttributes = geometry.morphAttributes;\n\t\t\t\tvar keys = Object.keys(morphAttributes);\n\n\t\t\t\tif (keys.length > 0) {\n\t\t\t\t\tvar morphAttribute = morphAttributes[keys[0]];\n\n\t\t\t\t\tif (morphAttribute !== undefined) {\n\t\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\t\tfor (var m = 0, ml = morphAttribute.length; m < ml; m++) {\n\t\t\t\t\t\t\tvar name = morphAttribute[m].name || String(m);\n\t\t\t\t\t\t\tthis.morphTargetInfluences.push(0);\n\t\t\t\t\t\t\tthis.morphTargetDictionary[name] = m;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar morphTargets = geometry.morphTargets;\n\n\t\t\t\tif (morphTargets !== undefined && morphTargets.length > 0) {\n\t\t\t\t\tconsole.error('THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar material = this.material;\n\t\t\tvar matrixWorld = this.matrixWorld;\n\t\t\tif (material === undefined) return; // Checking boundingSphere distance to ray\n\n\t\t\tif (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n\n\t\t\t_sphere.copy(geometry.boundingSphere);\n\n\t\t\t_sphere.applyMatrix4(matrixWorld);\n\n\t\t\tif (raycaster.ray.intersectsSphere(_sphere) === false) return; //\n\n\t\t\t_inverseMatrix.copy(matrixWorld).invert();\n\n\t\t\t_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix); // Check boundingBox before continuing\n\n\n\t\t\tif (geometry.boundingBox !== null) {\n\t\t\t\tif (_ray.intersectsBox(geometry.boundingBox) === false) return;\n\t\t\t}\n\n\t\t\tvar intersection;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar index = geometry.index;\n\t\t\t\tvar position = geometry.attributes.position;\n\t\t\t\tvar morphPosition = geometry.morphAttributes.position;\n\t\t\t\tvar morphTargetsRelative = geometry.morphTargetsRelative;\n\t\t\t\tvar uv = geometry.attributes.uv;\n\t\t\t\tvar uv2 = geometry.attributes.uv2;\n\t\t\t\tvar groups = geometry.groups;\n\t\t\t\tvar drawRange = geometry.drawRange;\n\n\t\t\t\tif (index !== null) {\n\t\t\t\t\t// indexed buffer geometry\n\t\t\t\t\tif (Array.isArray(material)) {\n\t\t\t\t\t\tfor (var i = 0, il = groups.length; i < il; i++) {\n\t\t\t\t\t\t\tvar group = groups[i];\n\t\t\t\t\t\t\tvar groupMaterial = material[group.materialIndex];\n\t\t\t\t\t\t\tvar start = Math.max(group.start, drawRange.start);\n\t\t\t\t\t\t\tvar end = Math.min(group.start + group.count, drawRange.start + drawRange.count);\n\n\t\t\t\t\t\t\tfor (var j = start, jl = end; j < jl; j += 3) {\n\t\t\t\t\t\t\t\tvar a = index.getX(j);\n\t\t\t\t\t\t\t\tvar b = index.getX(j + 1);\n\t\t\t\t\t\t\t\tvar c = index.getX(j + 2);\n\t\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection(this, groupMaterial, raycaster, _ray, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c);\n\n\t\t\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor(j / 3); // triangle number in indexed buffer semantics\n\n\t\t\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\t\t\tintersects.push(intersection);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar _start = Math.max(0, drawRange.start);\n\n\t\t\t\t\t\tvar _end = Math.min(index.count, drawRange.start + drawRange.count);\n\n\t\t\t\t\t\tfor (var _i = _start, _il = _end; _i < _il; _i += 3) {\n\t\t\t\t\t\t\tvar _a = index.getX(_i);\n\n\t\t\t\t\t\t\tvar _b = index.getX(_i + 1);\n\n\t\t\t\t\t\t\tvar _c = index.getX(_i + 2);\n\n\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection(this, material, raycaster, _ray, position, morphPosition, morphTargetsRelative, uv, uv2, _a, _b, _c);\n\n\t\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor(_i / 3); // triangle number in indexed buffer semantics\n\n\t\t\t\t\t\t\t\tintersects.push(intersection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (position !== undefined) {\n\t\t\t\t\t// non-indexed buffer geometry\n\t\t\t\t\tif (Array.isArray(material)) {\n\t\t\t\t\t\tfor (var _i2 = 0, _il2 = groups.length; _i2 < _il2; _i2++) {\n\t\t\t\t\t\t\tvar _group = groups[_i2];\n\t\t\t\t\t\t\tvar _groupMaterial = material[_group.materialIndex];\n\n\t\t\t\t\t\t\tvar _start2 = Math.max(_group.start, drawRange.start);\n\n\t\t\t\t\t\t\tvar _end2 = Math.min(_group.start + _group.count, drawRange.start + drawRange.count);\n\n\t\t\t\t\t\t\tfor (var _j = _start2, _jl = _end2; _j < _jl; _j += 3) {\n\t\t\t\t\t\t\t\tvar _a2 = _j;\n\n\t\t\t\t\t\t\t\tvar _b2 = _j + 1;\n\n\t\t\t\t\t\t\t\tvar _c2 = _j + 2;\n\n\t\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection(this, _groupMaterial, raycaster, _ray, position, morphPosition, morphTargetsRelative, uv, uv2, _a2, _b2, _c2);\n\n\t\t\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor(_j / 3); // triangle number in non-indexed buffer semantics\n\n\t\t\t\t\t\t\t\t\tintersection.face.materialIndex = _group.materialIndex;\n\t\t\t\t\t\t\t\t\tintersects.push(intersection);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar _start3 = Math.max(0, drawRange.start);\n\n\t\t\t\t\t\tvar _end3 = Math.min(position.count, drawRange.start + drawRange.count);\n\n\t\t\t\t\t\tfor (var _i3 = _start3, _il3 = _end3; _i3 < _il3; _i3 += 3) {\n\t\t\t\t\t\t\tvar _a3 = _i3;\n\n\t\t\t\t\t\t\tvar _b3 = _i3 + 1;\n\n\t\t\t\t\t\t\tvar _c3 = _i3 + 2;\n\n\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection(this, material, raycaster, _ray, position, morphPosition, morphTargetsRelative, uv, uv2, _a3, _b3, _c3);\n\n\t\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor(_i3 / 3); // triangle number in non-indexed buffer semantics\n\n\t\t\t\t\t\t\t\tintersects.push(intersection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (geometry.isGeometry) {\n\t\t\t\tconsole.error('THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction checkIntersection(object, material, raycaster, ray, pA, pB, pC, point) {\n\t\tvar intersect;\n\n\t\tif (material.side === BackSide) {\n\t\t\tintersect = ray.intersectTriangle(pC, pB, pA, true, point);\n\t\t} else {\n\t\t\tintersect = ray.intersectTriangle(pA, pB, pC, material.side !== DoubleSide, point);\n\t\t}\n\n\t\tif (intersect === null) return null;\n\n\t\t_intersectionPointWorld.copy(point);\n\n\t\t_intersectionPointWorld.applyMatrix4(object.matrixWorld);\n\n\t\tvar distance = raycaster.ray.origin.distanceTo(_intersectionPointWorld);\n\t\tif (distance < raycaster.near || distance > raycaster.far) return null;\n\t\treturn {\n\t\t\tdistance: distance,\n\t\t\tpoint: _intersectionPointWorld.clone(),\n\t\t\tobject: object\n\t\t};\n\t}\n\n\tfunction checkBufferGeometryIntersection(object, material, raycaster, ray, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c) {\n\t\t_vA.fromBufferAttribute(position, a);\n\n\t\t_vB.fromBufferAttribute(position, b);\n\n\t\t_vC.fromBufferAttribute(position, c);\n\n\t\tvar morphInfluences = object.morphTargetInfluences;\n\n\t\tif (material.morphTargets && morphPosition && morphInfluences) {\n\t\t\t_morphA.set(0, 0, 0);\n\n\t\t\t_morphB.set(0, 0, 0);\n\n\t\t\t_morphC.set(0, 0, 0);\n\n\t\t\tfor (var i = 0, il = morphPosition.length; i < il; i++) {\n\t\t\t\tvar influence = morphInfluences[i];\n\t\t\t\tvar morphAttribute = morphPosition[i];\n\t\t\t\tif (influence === 0) continue;\n\n\t\t\t\t_tempA.fromBufferAttribute(morphAttribute, a);\n\n\t\t\t\t_tempB.fromBufferAttribute(morphAttribute, b);\n\n\t\t\t\t_tempC.fromBufferAttribute(morphAttribute, c);\n\n\t\t\t\tif (morphTargetsRelative) {\n\t\t\t\t\t_morphA.addScaledVector(_tempA, influence);\n\n\t\t\t\t\t_morphB.addScaledVector(_tempB, influence);\n\n\t\t\t\t\t_morphC.addScaledVector(_tempC, influence);\n\t\t\t\t} else {\n\t\t\t\t\t_morphA.addScaledVector(_tempA.sub(_vA), influence);\n\n\t\t\t\t\t_morphB.addScaledVector(_tempB.sub(_vB), influence);\n\n\t\t\t\t\t_morphC.addScaledVector(_tempC.sub(_vC), influence);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_vA.add(_morphA);\n\n\t\t\t_vB.add(_morphB);\n\n\t\t\t_vC.add(_morphC);\n\t\t}\n\n\t\tif (object.isSkinnedMesh) {\n\t\t\tobject.boneTransform(a, _vA);\n\t\t\tobject.boneTransform(b, _vB);\n\t\t\tobject.boneTransform(c, _vC);\n\t\t}\n\n\t\tvar intersection = checkIntersection(object, material, raycaster, ray, _vA, _vB, _vC, _intersectionPoint);\n\n\t\tif (intersection) {\n\t\t\tif (uv) {\n\t\t\t\t_uvA.fromBufferAttribute(uv, a);\n\n\t\t\t\t_uvB.fromBufferAttribute(uv, b);\n\n\t\t\t\t_uvC.fromBufferAttribute(uv, c);\n\n\t\t\t\tintersection.uv = Triangle.getUV(_intersectionPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2());\n\t\t\t}\n\n\t\t\tif (uv2) {\n\t\t\t\t_uvA.fromBufferAttribute(uv2, a);\n\n\t\t\t\t_uvB.fromBufferAttribute(uv2, b);\n\n\t\t\t\t_uvC.fromBufferAttribute(uv2, c);\n\n\t\t\t\tintersection.uv2 = Triangle.getUV(_intersectionPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2());\n\t\t\t}\n\n\t\t\tvar face = new Face3(a, b, c);\n\t\t\tTriangle.getNormal(_vA, _vB, _vC, face.normal);\n\t\t\tintersection.face = face;\n\t\t}\n\n\t\treturn intersection;\n\t}\n\n\tvar BoxGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(BoxGeometry, _BufferGeometry);\n\n\t\tfunction BoxGeometry(width, height, depth, widthSegments, heightSegments, depthSegments) {\n\t\t\tvar _this;\n\n\t\t\tif (width === void 0) {\n\t\t\t\twidth = 1;\n\t\t\t}\n\n\t\t\tif (height === void 0) {\n\t\t\t\theight = 1;\n\t\t\t}\n\n\t\t\tif (depth === void 0) {\n\t\t\t\tdepth = 1;\n\t\t\t}\n\n\t\t\tif (widthSegments === void 0) {\n\t\t\t\twidthSegments = 1;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 1;\n\t\t\t}\n\n\t\t\tif (depthSegments === void 0) {\n\t\t\t\tdepthSegments = 1;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'BoxGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\twidth: width,\n\t\t\t\theight: height,\n\t\t\t\tdepth: depth,\n\t\t\t\twidthSegments: widthSegments,\n\t\t\t\theightSegments: heightSegments,\n\t\t\t\tdepthSegments: depthSegments\n\t\t\t};\n\n\t\t\tvar scope = _assertThisInitialized(_this); // segments\n\n\n\t\t\twidthSegments = Math.floor(widthSegments);\n\t\t\theightSegments = Math.floor(heightSegments);\n\t\t\tdepthSegments = Math.floor(depthSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar numberOfVertices = 0;\n\t\t\tvar groupStart = 0; // build each side of the box geometry\n\n\t\t\tbuildPlane('z', 'y', 'x', -1, -1, depth, height, width, depthSegments, heightSegments, 0); // px\n\n\t\t\tbuildPlane('z', 'y', 'x', 1, -1, depth, height, -width, depthSegments, heightSegments, 1); // nx\n\n\t\t\tbuildPlane('x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2); // py\n\n\t\t\tbuildPlane('x', 'z', 'y', 1, -1, width, depth, -height, widthSegments, depthSegments, 3); // ny\n\n\t\t\tbuildPlane('x', 'y', 'z', 1, -1, width, height, depth, widthSegments, heightSegments, 4); // pz\n\n\t\t\tbuildPlane('x', 'y', 'z', -1, -1, width, height, -depth, widthSegments, heightSegments, 5); // nz\n\t\t\t// build geometry\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\tfunction buildPlane(u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex) {\n\t\t\t\tvar segmentWidth = width / gridX;\n\t\t\t\tvar segmentHeight = height / gridY;\n\t\t\t\tvar widthHalf = width / 2;\n\t\t\t\tvar heightHalf = height / 2;\n\t\t\t\tvar depthHalf = depth / 2;\n\t\t\t\tvar gridX1 = gridX + 1;\n\t\t\t\tvar gridY1 = gridY + 1;\n\t\t\t\tvar vertexCounter = 0;\n\t\t\t\tvar groupCount = 0;\n\t\t\t\tvar vector = new Vector3(); // generate vertices, normals and uvs\n\n\t\t\t\tfor (var iy = 0; iy < gridY1; iy++) {\n\t\t\t\t\tvar y = iy * segmentHeight - heightHalf;\n\n\t\t\t\t\tfor (var ix = 0; ix < gridX1; ix++) {\n\t\t\t\t\t\tvar x = ix * segmentWidth - widthHalf; // set values to correct vector component\n\n\t\t\t\t\t\tvector[u] = x * udir;\n\t\t\t\t\t\tvector[v] = y * vdir;\n\t\t\t\t\t\tvector[w] = depthHalf; // now apply vector to vertex buffer\n\n\t\t\t\t\t\tvertices.push(vector.x, vector.y, vector.z); // set values to correct vector component\n\n\t\t\t\t\t\tvector[u] = 0;\n\t\t\t\t\t\tvector[v] = 0;\n\t\t\t\t\t\tvector[w] = depth > 0 ? 1 : -1; // now apply vector to normal buffer\n\n\t\t\t\t\t\tnormals.push(vector.x, vector.y, vector.z); // uvs\n\n\t\t\t\t\t\tuvs.push(ix / gridX);\n\t\t\t\t\t\tuvs.push(1 - iy / gridY); // counters\n\n\t\t\t\t\t\tvertexCounter += 1;\n\t\t\t\t\t}\n\t\t\t\t} // indices\n\t\t\t\t// 1. you need three indices to draw a single face\n\t\t\t\t// 2. a single segment consists of two faces\n\t\t\t\t// 3. so we need to generate six (2*3) indices per segment\n\n\n\t\t\t\tfor (var _iy = 0; _iy < gridY; _iy++) {\n\t\t\t\t\tfor (var _ix = 0; _ix < gridX; _ix++) {\n\t\t\t\t\t\tvar a = numberOfVertices + _ix + gridX1 * _iy;\n\t\t\t\t\t\tvar b = numberOfVertices + _ix + gridX1 * (_iy + 1);\n\t\t\t\t\t\tvar c = numberOfVertices + (_ix + 1) + gridX1 * (_iy + 1);\n\t\t\t\t\t\tvar d = numberOfVertices + (_ix + 1) + gridX1 * _iy; // faces\n\n\t\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\t\tindices.push(b, c, d); // increase counter\n\n\t\t\t\t\t\tgroupCount += 6;\n\t\t\t\t\t}\n\t\t\t\t} // add a group to the geometry. this will ensure multi material support\n\n\n\t\t\t\tscope.addGroup(groupStart, groupCount, materialIndex); // calculate new start value for groups\n\n\t\t\t\tgroupStart += groupCount; // update total number of vertices\n\n\t\t\t\tnumberOfVertices += vertexCounter;\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn BoxGeometry;\n\t}(BufferGeometry);\n\n\t/**\n\t * Uniform Utilities\n\t */\n\tfunction cloneUniforms(src) {\n\t\tvar dst = {};\n\n\t\tfor (var u in src) {\n\t\t\tdst[u] = {};\n\n\t\t\tfor (var p in src[u]) {\n\t\t\t\tvar property = src[u][p];\n\n\t\t\t\tif (property && (property.isColor || property.isMatrix3 || property.isMatrix4 || property.isVector2 || property.isVector3 || property.isVector4 || property.isTexture)) {\n\t\t\t\t\tdst[u][p] = property.clone();\n\t\t\t\t} else if (Array.isArray(property)) {\n\t\t\t\t\tdst[u][p] = property.slice();\n\t\t\t\t} else {\n\t\t\t\t\tdst[u][p] = property;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dst;\n\t}\n\tfunction mergeUniforms(uniforms) {\n\t\tvar merged = {};\n\n\t\tfor (var u = 0; u < uniforms.length; u++) {\n\t\t\tvar tmp = cloneUniforms(uniforms[u]);\n\n\t\t\tfor (var p in tmp) {\n\t\t\t\tmerged[p] = tmp[p];\n\t\t\t}\n\t\t}\n\n\t\treturn merged;\n\t} // Legacy\n\n\tvar UniformsUtils = {\n\t\tclone: cloneUniforms,\n\t\tmerge: mergeUniforms\n\t};\n\n\tvar default_vertex = \"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\n\n\tvar default_fragment = \"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";\n\n\t/**\n\t * parameters = {\n\t *\tdefines: { \"label\" : \"value\" },\n\t *\tuniforms: { \"parameter1\": { value: 1.0 }, \"parameter2\": { value2: 2 } },\n\t *\n\t *\tfragmentShader: <string>,\n\t *\tvertexShader: <string>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tlights: <bool>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction ShaderMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'ShaderMaterial';\n\t\tthis.defines = {};\n\t\tthis.uniforms = {};\n\t\tthis.vertexShader = default_vertex;\n\t\tthis.fragmentShader = default_fragment;\n\t\tthis.linewidth = 1;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.fog = false; // set to use scene fog\n\n\t\tthis.lights = false; // set to use scene lights\n\n\t\tthis.clipping = false; // set to use user-defined clipping planes\n\n\t\tthis.skinning = false; // set to use skinning attribute streams\n\n\t\tthis.morphTargets = false; // set to use morph targets\n\n\t\tthis.morphNormals = false; // set to use morph normals\n\n\t\tthis.extensions = {\n\t\t\tderivatives: false,\n\t\t\t// set to use derivatives\n\t\t\tfragDepth: false,\n\t\t\t// set to use fragment depth values\n\t\t\tdrawBuffers: false,\n\t\t\t// set to use draw buffers\n\t\t\tshaderTextureLOD: false // set to use shader texture LOD\n\n\t\t}; // When rendered geometry doesn't include these attributes but the material does,\n\t\t// use these default values in WebGL. This avoids errors when buffer data is missing.\n\n\t\tthis.defaultAttributeValues = {\n\t\t\t'color': [1, 1, 1],\n\t\t\t'uv': [0, 0],\n\t\t\t'uv2': [0, 0]\n\t\t};\n\t\tthis.index0AttributeName = undefined;\n\t\tthis.uniformsNeedUpdate = false;\n\t\tthis.glslVersion = null;\n\n\t\tif (parameters !== undefined) {\n\t\t\tif (parameters.attributes !== undefined) {\n\t\t\t\tconsole.error('THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.');\n\t\t\t}\n\n\t\t\tthis.setValues(parameters);\n\t\t}\n\t}\n\n\tShaderMaterial.prototype = Object.create(Material.prototype);\n\tShaderMaterial.prototype.constructor = ShaderMaterial;\n\tShaderMaterial.prototype.isShaderMaterial = true;\n\n\tShaderMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.fragmentShader = source.fragmentShader;\n\t\tthis.vertexShader = source.vertexShader;\n\t\tthis.uniforms = cloneUniforms(source.uniforms);\n\t\tthis.defines = Object.assign({}, source.defines);\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.lights = source.lights;\n\t\tthis.clipping = source.clipping;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\tthis.extensions = Object.assign({}, source.extensions);\n\t\tthis.glslVersion = source.glslVersion;\n\t\treturn this;\n\t};\n\n\tShaderMaterial.prototype.toJSON = function (meta) {\n\t\tvar data = Material.prototype.toJSON.call(this, meta);\n\t\tdata.glslVersion = this.glslVersion;\n\t\tdata.uniforms = {};\n\n\t\tfor (var name in this.uniforms) {\n\t\t\tvar uniform = this.uniforms[name];\n\t\t\tvar value = uniform.value;\n\n\t\t\tif (value && value.isTexture) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 't',\n\t\t\t\t\tvalue: value.toJSON(meta).uuid\n\t\t\t\t};\n\t\t\t} else if (value && value.isColor) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'c',\n\t\t\t\t\tvalue: value.getHex()\n\t\t\t\t};\n\t\t\t} else if (value && value.isVector2) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'v2',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else if (value && value.isVector3) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'v3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else if (value && value.isVector4) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'v4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else if (value && value.isMatrix3) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'm3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else if (value && value.isMatrix4) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'm4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\tvalue: value\n\t\t\t\t}; // note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far\n\t\t\t}\n\t\t}\n\n\t\tif (Object.keys(this.defines).length > 0) data.defines = this.defines;\n\t\tdata.vertexShader = this.vertexShader;\n\t\tdata.fragmentShader = this.fragmentShader;\n\t\tvar extensions = {};\n\n\t\tfor (var key in this.extensions) {\n\t\t\tif (this.extensions[key] === true) extensions[key] = true;\n\t\t}\n\n\t\tif (Object.keys(extensions).length > 0) data.extensions = extensions;\n\t\treturn data;\n\t};\n\n\tfunction Camera() {\n\t\tObject3D.call(this);\n\t\tthis.type = 'Camera';\n\t\tthis.matrixWorldInverse = new Matrix4();\n\t\tthis.projectionMatrix = new Matrix4();\n\t\tthis.projectionMatrixInverse = new Matrix4();\n\t}\n\n\tCamera.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Camera,\n\t\tisCamera: true,\n\t\tcopy: function copy(source, recursive) {\n\t\t\tObject3D.prototype.copy.call(this, source, recursive);\n\t\t\tthis.matrixWorldInverse.copy(source.matrixWorldInverse);\n\t\t\tthis.projectionMatrix.copy(source.projectionMatrix);\n\t\t\tthis.projectionMatrixInverse.copy(source.projectionMatrixInverse);\n\t\t\treturn this;\n\t\t},\n\t\tgetWorldDirection: function getWorldDirection(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Camera: .getWorldDirection() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\tvar e = this.matrixWorld.elements;\n\t\t\treturn target.set(-e[8], -e[9], -e[10]).normalize();\n\t\t},\n\t\tupdateMatrixWorld: function updateMatrixWorld(force) {\n\t\t\tObject3D.prototype.updateMatrixWorld.call(this, force);\n\t\t\tthis.matrixWorldInverse.copy(this.matrixWorld).invert();\n\t\t},\n\t\tupdateWorldMatrix: function updateWorldMatrix(updateParents, updateChildren) {\n\t\t\tObject3D.prototype.updateWorldMatrix.call(this, updateParents, updateChildren);\n\t\t\tthis.matrixWorldInverse.copy(this.matrixWorld).invert();\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t}\n\t});\n\n\tfunction PerspectiveCamera(fov, aspect, near, far) {\n\t\tif (fov === void 0) {\n\t\t\tfov = 50;\n\t\t}\n\n\t\tif (aspect === void 0) {\n\t\t\taspect = 1;\n\t\t}\n\n\t\tif (near === void 0) {\n\t\t\tnear = 0.1;\n\t\t}\n\n\t\tif (far === void 0) {\n\t\t\tfar = 2000;\n\t\t}\n\n\t\tCamera.call(this);\n\t\tthis.type = 'PerspectiveCamera';\n\t\tthis.fov = fov;\n\t\tthis.zoom = 1;\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.focus = 10;\n\t\tthis.aspect = aspect;\n\t\tthis.view = null;\n\t\tthis.filmGauge = 35; // width of the film (default in millimeters)\n\n\t\tthis.filmOffset = 0; // horizontal film offset (same unit as gauge)\n\n\t\tthis.updateProjectionMatrix();\n\t}\n\n\tPerspectiveCamera.prototype = Object.assign(Object.create(Camera.prototype), {\n\t\tconstructor: PerspectiveCamera,\n\t\tisPerspectiveCamera: true,\n\t\tcopy: function copy(source, recursive) {\n\t\t\tCamera.prototype.copy.call(this, source, recursive);\n\t\t\tthis.fov = source.fov;\n\t\t\tthis.zoom = source.zoom;\n\t\t\tthis.near = source.near;\n\t\t\tthis.far = source.far;\n\t\t\tthis.focus = source.focus;\n\t\t\tthis.aspect = source.aspect;\n\t\t\tthis.view = source.view === null ? null : Object.assign({}, source.view);\n\t\t\tthis.filmGauge = source.filmGauge;\n\t\t\tthis.filmOffset = source.filmOffset;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the FOV by focal length in respect to the current .filmGauge.\n\t\t *\n\t\t * The default film gauge is 35, so that the focal length can be specified for\n\t\t * a 35mm (full frame) camera.\n\t\t *\n\t\t * Values for focal length and film gauge must have the same unit.\n\t\t */\n\t\tsetFocalLength: function setFocalLength(focalLength) {\n\t\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\t\tvar vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\t\t\tthis.fov = MathUtils.RAD2DEG * 2 * Math.atan(vExtentSlope);\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\n\t\t/**\n\t\t * Calculates the focal length from the current .fov and .filmGauge.\n\t\t */\n\t\tgetFocalLength: function getFocalLength() {\n\t\t\tvar vExtentSlope = Math.tan(MathUtils.DEG2RAD * 0.5 * this.fov);\n\t\t\treturn 0.5 * this.getFilmHeight() / vExtentSlope;\n\t\t},\n\t\tgetEffectiveFOV: function getEffectiveFOV() {\n\t\t\treturn MathUtils.RAD2DEG * 2 * Math.atan(Math.tan(MathUtils.DEG2RAD * 0.5 * this.fov) / this.zoom);\n\t\t},\n\t\tgetFilmWidth: function getFilmWidth() {\n\t\t\t// film not completely covered in portrait format (aspect < 1)\n\t\t\treturn this.filmGauge * Math.min(this.aspect, 1);\n\t\t},\n\t\tgetFilmHeight: function getFilmHeight() {\n\t\t\t// film not completely covered in landscape format (aspect > 1)\n\t\t\treturn this.filmGauge / Math.max(this.aspect, 1);\n\t\t},\n\n\t\t/**\n\t\t * Sets an offset in a larger frustum. This is useful for multi-window or\n\t\t * multi-monitor/multi-machine setups.\n\t\t *\n\t\t * For example, if you have 3x2 monitors and each monitor is 1920x1080 and\n\t\t * the monitors are in grid like this\n\t\t *\n\t\t *\t +---+---+---+\n\t\t *\t | A | B | C |\n\t\t *\t +---+---+---+\n\t\t *\t | D | E | F |\n\t\t *\t +---+---+---+\n\t\t *\n\t\t * then for each monitor you would call it like this\n\t\t *\n\t\t *\t const w = 1920;\n\t\t *\t const h = 1080;\n\t\t *\t const fullWidth = w * 3;\n\t\t *\t const fullHeight = h * 2;\n\t\t *\n\t\t *\t --A--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );\n\t\t *\t --B--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );\n\t\t *\t --C--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );\n\t\t *\t --D--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );\n\t\t *\t --E--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );\n\t\t *\t --F--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );\n\t\t *\n\t\t *\t Note there is no reason monitors have to be the same size or in a grid.\n\t\t */\n\t\tsetViewOffset: function setViewOffset(fullWidth, fullHeight, x, y, width, height) {\n\t\t\tthis.aspect = fullWidth / fullHeight;\n\n\t\t\tif (this.view === null) {\n\t\t\t\tthis.view = {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tfullWidth: 1,\n\t\t\t\t\tfullHeight: 1,\n\t\t\t\t\toffsetX: 0,\n\t\t\t\t\toffsetY: 0,\n\t\t\t\t\twidth: 1,\n\t\t\t\t\theight: 1\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.view.enabled = true;\n\t\t\tthis.view.fullWidth = fullWidth;\n\t\t\tthis.view.fullHeight = fullHeight;\n\t\t\tthis.view.offsetX = x;\n\t\t\tthis.view.offsetY = y;\n\t\t\tthis.view.width = width;\n\t\t\tthis.view.height = height;\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\t\tclearViewOffset: function clearViewOffset() {\n\t\t\tif (this.view !== null) {\n\t\t\t\tthis.view.enabled = false;\n\t\t\t}\n\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\t\tupdateProjectionMatrix: function updateProjectionMatrix() {\n\t\t\tvar near = this.near;\n\t\t\tvar top = near * Math.tan(MathUtils.DEG2RAD * 0.5 * this.fov) / this.zoom;\n\t\t\tvar height = 2 * top;\n\t\t\tvar width = this.aspect * height;\n\t\t\tvar left = -0.5 * width;\n\t\t\tvar view = this.view;\n\n\t\t\tif (this.view !== null && this.view.enabled) {\n\t\t\t\tvar fullWidth = view.fullWidth,\n\t\t\t\t\t\tfullHeight = view.fullHeight;\n\t\t\t\tleft += view.offsetX * width / fullWidth;\n\t\t\t\ttop -= view.offsetY * height / fullHeight;\n\t\t\t\twidth *= view.width / fullWidth;\n\t\t\t\theight *= view.height / fullHeight;\n\t\t\t}\n\n\t\t\tvar skew = this.filmOffset;\n\t\t\tif (skew !== 0) left += near * skew / this.getFilmWidth();\n\t\t\tthis.projectionMatrix.makePerspective(left, left + width, top, top - height, near, this.far);\n\t\t\tthis.projectionMatrixInverse.copy(this.projectionMatrix).invert();\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Object3D.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.fov = this.fov;\n\t\t\tdata.object.zoom = this.zoom;\n\t\t\tdata.object.near = this.near;\n\t\t\tdata.object.far = this.far;\n\t\t\tdata.object.focus = this.focus;\n\t\t\tdata.object.aspect = this.aspect;\n\t\t\tif (this.view !== null) data.object.view = Object.assign({}, this.view);\n\t\t\tdata.object.filmGauge = this.filmGauge;\n\t\t\tdata.object.filmOffset = this.filmOffset;\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tvar fov = 90,\n\t\t\taspect = 1;\n\n\tfunction CubeCamera(near, far, renderTarget) {\n\t\tObject3D.call(this);\n\t\tthis.type = 'CubeCamera';\n\n\t\tif (renderTarget.isWebGLCubeRenderTarget !== true) {\n\t\t\tconsole.error('THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.renderTarget = renderTarget;\n\t\tvar cameraPX = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraPX.layers = this.layers;\n\t\tcameraPX.up.set(0, -1, 0);\n\t\tcameraPX.lookAt(new Vector3(1, 0, 0));\n\t\tthis.add(cameraPX);\n\t\tvar cameraNX = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraNX.layers = this.layers;\n\t\tcameraNX.up.set(0, -1, 0);\n\t\tcameraNX.lookAt(new Vector3(-1, 0, 0));\n\t\tthis.add(cameraNX);\n\t\tvar cameraPY = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraPY.layers = this.layers;\n\t\tcameraPY.up.set(0, 0, 1);\n\t\tcameraPY.lookAt(new Vector3(0, 1, 0));\n\t\tthis.add(cameraPY);\n\t\tvar cameraNY = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraNY.layers = this.layers;\n\t\tcameraNY.up.set(0, 0, -1);\n\t\tcameraNY.lookAt(new Vector3(0, -1, 0));\n\t\tthis.add(cameraNY);\n\t\tvar cameraPZ = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraPZ.layers = this.layers;\n\t\tcameraPZ.up.set(0, -1, 0);\n\t\tcameraPZ.lookAt(new Vector3(0, 0, 1));\n\t\tthis.add(cameraPZ);\n\t\tvar cameraNZ = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraNZ.layers = this.layers;\n\t\tcameraNZ.up.set(0, -1, 0);\n\t\tcameraNZ.lookAt(new Vector3(0, 0, -1));\n\t\tthis.add(cameraNZ);\n\n\t\tthis.update = function (renderer, scene) {\n\t\t\tif (this.parent === null) this.updateMatrixWorld();\n\t\t\tvar currentXrEnabled = renderer.xr.enabled;\n\t\t\tvar currentRenderTarget = renderer.getRenderTarget();\n\t\t\trenderer.xr.enabled = false;\n\t\t\tvar generateMipmaps = renderTarget.texture.generateMipmaps;\n\t\t\trenderTarget.texture.generateMipmaps = false;\n\t\t\trenderer.setRenderTarget(renderTarget, 0);\n\t\t\trenderer.render(scene, cameraPX);\n\t\t\trenderer.setRenderTarget(renderTarget, 1);\n\t\t\trenderer.render(scene, cameraNX);\n\t\t\trenderer.setRenderTarget(renderTarget, 2);\n\t\t\trenderer.render(scene, cameraPY);\n\t\t\trenderer.setRenderTarget(renderTarget, 3);\n\t\t\trenderer.render(scene, cameraNY);\n\t\t\trenderer.setRenderTarget(renderTarget, 4);\n\t\t\trenderer.render(scene, cameraPZ);\n\t\t\trenderTarget.texture.generateMipmaps = generateMipmaps;\n\t\t\trenderer.setRenderTarget(renderTarget, 5);\n\t\t\trenderer.render(scene, cameraNZ);\n\t\t\trenderer.setRenderTarget(currentRenderTarget);\n\t\t\trenderer.xr.enabled = currentXrEnabled;\n\t\t};\n\t}\n\n\tCubeCamera.prototype = Object.create(Object3D.prototype);\n\tCubeCamera.prototype.constructor = CubeCamera;\n\n\tfunction CubeTexture(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding) {\n\t\timages = images !== undefined ? images : [];\n\t\tmapping = mapping !== undefined ? mapping : CubeReflectionMapping;\n\t\tformat = format !== undefined ? format : RGBFormat;\n\t\tTexture.call(this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);\n\t\tthis.flipY = false; // Why CubeTexture._needsFlipEnvMap is necessary:\n\t\t//\n\t\t// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)\n\t\t// in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,\n\t\t// in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.\n\t\t// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped\n\t\t// and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false)\n\t\t// when using WebGLCubeRenderTarget.texture as a cube texture.\n\n\t\tthis._needsFlipEnvMap = true;\n\t}\n\n\tCubeTexture.prototype = Object.create(Texture.prototype);\n\tCubeTexture.prototype.constructor = CubeTexture;\n\tCubeTexture.prototype.isCubeTexture = true;\n\tObject.defineProperty(CubeTexture.prototype, 'images', {\n\t\tget: function get() {\n\t\t\treturn this.image;\n\t\t},\n\t\tset: function set(value) {\n\t\t\tthis.image = value;\n\t\t}\n\t});\n\n\tvar WebGLCubeRenderTarget = /*#__PURE__*/function (_WebGLRenderTarget) {\n\t\t_inheritsLoose(WebGLCubeRenderTarget, _WebGLRenderTarget);\n\n\t\tfunction WebGLCubeRenderTarget(size, options, dummy) {\n\t\t\tvar _this;\n\n\t\t\tif (Number.isInteger(options)) {\n\t\t\t\tconsole.warn('THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )');\n\t\t\t\toptions = dummy;\n\t\t\t}\n\n\t\t\t_this = _WebGLRenderTarget.call(this, size, size, options) || this;\n\t\t\tObject.defineProperty(_assertThisInitialized(_this), 'isWebGLCubeRenderTarget', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\toptions = options || {};\n\t\t\t_this.texture = new CubeTexture(undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding);\n\t\t\t_this.texture._needsFlipEnvMap = false;\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = WebGLCubeRenderTarget.prototype;\n\n\t\t_proto.fromEquirectangularTexture = function fromEquirectangularTexture(renderer, texture) {\n\t\t\tthis.texture.type = texture.type;\n\t\t\tthis.texture.format = RGBAFormat; // see #18859\n\n\t\t\tthis.texture.encoding = texture.encoding;\n\t\t\tthis.texture.generateMipmaps = texture.generateMipmaps;\n\t\t\tthis.texture.minFilter = texture.minFilter;\n\t\t\tthis.texture.magFilter = texture.magFilter;\n\t\t\tvar shader = {\n\t\t\t\tuniforms: {\n\t\t\t\t\ttEquirect: {\n\t\t\t\t\t\tvalue: null\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tvertexShader:\n\t\t\t\t/* glsl */\n\t\t\t\t\"\\n\\n\\t\\t\\t\\tvarying vec3 vWorldDirection;\\n\\n\\t\\t\\t\\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\n\\t\\t\\t\\t\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\t\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\n\\t\\t\\t\\t\\t#include <begin_vertex>\\n\\t\\t\\t\\t\\t#include <project_vertex>\\n\\n\\t\\t\\t\\t}\\n\\t\\t\\t\",\n\t\t\t\tfragmentShader:\n\t\t\t\t/* glsl */\n\t\t\t\t\"\\n\\n\\t\\t\\t\\tuniform sampler2D tEquirect;\\n\\n\\t\\t\\t\\tvarying vec3 vWorldDirection;\\n\\n\\t\\t\\t\\t#include <common>\\n\\n\\t\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\t\\tvec3 direction = normalize( vWorldDirection );\\n\\n\\t\\t\\t\\t\\tvec2 sampleUV = equirectUv( direction );\\n\\n\\t\\t\\t\\t\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n\\n\\t\\t\\t\\t}\\n\\t\\t\\t\"\n\t\t\t};\n\t\t\tvar geometry = new BoxGeometry(5, 5, 5);\n\t\t\tvar material = new ShaderMaterial({\n\t\t\t\tname: 'CubemapFromEquirect',\n\t\t\t\tuniforms: cloneUniforms(shader.uniforms),\n\t\t\t\tvertexShader: shader.vertexShader,\n\t\t\t\tfragmentShader: shader.fragmentShader,\n\t\t\t\tside: BackSide,\n\t\t\t\tblending: NoBlending\n\t\t\t});\n\t\t\tmaterial.uniforms.tEquirect.value = texture;\n\t\t\tvar mesh = new Mesh(geometry, material);\n\t\t\tvar currentMinFilter = texture.minFilter; // Avoid blurred poles\n\n\t\t\tif (texture.minFilter === LinearMipmapLinearFilter) texture.minFilter = LinearFilter;\n\t\t\tvar camera = new CubeCamera(1, 10, this);\n\t\t\tcamera.update(renderer, mesh);\n\t\t\ttexture.minFilter = currentMinFilter;\n\t\t\tmesh.geometry.dispose();\n\t\t\tmesh.material.dispose();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clear = function clear(renderer, color, depth, stencil) {\n\t\t\tvar currentRenderTarget = renderer.getRenderTarget();\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\trenderer.setRenderTarget(this, i);\n\t\t\t\trenderer.clear(color, depth, stencil);\n\t\t\t}\n\n\t\t\trenderer.setRenderTarget(currentRenderTarget);\n\t\t};\n\n\t\treturn WebGLCubeRenderTarget;\n\t}(WebGLRenderTarget);\n\n\tfunction DataTexture(data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding) {\n\t\tTexture.call(this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);\n\t\tthis.image = {\n\t\t\tdata: data || null,\n\t\t\twidth: width || 1,\n\t\t\theight: height || 1\n\t\t};\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : NearestFilter;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : NearestFilter;\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\t\tthis.needsUpdate = true;\n\t}\n\n\tDataTexture.prototype = Object.create(Texture.prototype);\n\tDataTexture.prototype.constructor = DataTexture;\n\tDataTexture.prototype.isDataTexture = true;\n\n\tvar _sphere$1 = /*@__PURE__*/new Sphere();\n\n\tvar _vector$5 = /*@__PURE__*/new Vector3();\n\n\tvar Frustum = /*#__PURE__*/function () {\n\t\tfunction Frustum(p0, p1, p2, p3, p4, p5) {\n\t\t\tthis.planes = [p0 !== undefined ? p0 : new Plane(), p1 !== undefined ? p1 : new Plane(), p2 !== undefined ? p2 : new Plane(), p3 !== undefined ? p3 : new Plane(), p4 !== undefined ? p4 : new Plane(), p5 !== undefined ? p5 : new Plane()];\n\t\t}\n\n\t\tvar _proto = Frustum.prototype;\n\n\t\t_proto.set = function set(p0, p1, p2, p3, p4, p5) {\n\t\t\tvar planes = this.planes;\n\t\t\tplanes[0].copy(p0);\n\t\t\tplanes[1].copy(p1);\n\t\t\tplanes[2].copy(p2);\n\t\t\tplanes[3].copy(p3);\n\t\t\tplanes[4].copy(p4);\n\t\t\tplanes[5].copy(p5);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(frustum) {\n\t\t\tvar planes = this.planes;\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tplanes[i].copy(frustum.planes[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromProjectionMatrix = function setFromProjectionMatrix(m) {\n\t\t\tvar planes = this.planes;\n\t\t\tvar me = m.elements;\n\t\t\tvar me0 = me[0],\n\t\t\t\t\tme1 = me[1],\n\t\t\t\t\tme2 = me[2],\n\t\t\t\t\tme3 = me[3];\n\t\t\tvar me4 = me[4],\n\t\t\t\t\tme5 = me[5],\n\t\t\t\t\tme6 = me[6],\n\t\t\t\t\tme7 = me[7];\n\t\t\tvar me8 = me[8],\n\t\t\t\t\tme9 = me[9],\n\t\t\t\t\tme10 = me[10],\n\t\t\t\t\tme11 = me[11];\n\t\t\tvar me12 = me[12],\n\t\t\t\t\tme13 = me[13],\n\t\t\t\t\tme14 = me[14],\n\t\t\t\t\tme15 = me[15];\n\t\t\tplanes[0].setComponents(me3 - me0, me7 - me4, me11 - me8, me15 - me12).normalize();\n\t\t\tplanes[1].setComponents(me3 + me0, me7 + me4, me11 + me8, me15 + me12).normalize();\n\t\t\tplanes[2].setComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13).normalize();\n\t\t\tplanes[3].setComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13).normalize();\n\t\t\tplanes[4].setComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14).normalize();\n\t\t\tplanes[5].setComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14).normalize();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.intersectsObject = function intersectsObject(object) {\n\t\t\tvar geometry = object.geometry;\n\t\t\tif (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n\n\t\t\t_sphere$1.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld);\n\n\t\t\treturn this.intersectsSphere(_sphere$1);\n\t\t};\n\n\t\t_proto.intersectsSprite = function intersectsSprite(sprite) {\n\t\t\t_sphere$1.center.set(0, 0, 0);\n\n\t\t\t_sphere$1.radius = 0.7071067811865476;\n\n\t\t\t_sphere$1.applyMatrix4(sprite.matrixWorld);\n\n\t\t\treturn this.intersectsSphere(_sphere$1);\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\tvar planes = this.planes;\n\t\t\tvar center = sphere.center;\n\t\t\tvar negRadius = -sphere.radius;\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tvar distance = planes[i].distanceToPoint(center);\n\n\t\t\t\tif (distance < negRadius) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\tvar planes = this.planes;\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tvar plane = planes[i]; // corner at max distance\n\n\t\t\t\t_vector$5.x = plane.normal.x > 0 ? box.max.x : box.min.x;\n\t\t\t\t_vector$5.y = plane.normal.y > 0 ? box.max.y : box.min.y;\n\t\t\t\t_vector$5.z = plane.normal.z > 0 ? box.max.z : box.min.z;\n\n\t\t\t\tif (plane.distanceToPoint(_vector$5) < 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\tvar planes = this.planes;\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tif (planes[i].distanceToPoint(point) < 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\treturn Frustum;\n\t}();\n\n\tfunction WebGLAnimation() {\n\t\tvar context = null;\n\t\tvar isAnimating = false;\n\t\tvar animationLoop = null;\n\t\tvar requestId = null;\n\n\t\tfunction onAnimationFrame(time, frame) {\n\t\t\tanimationLoop(time, frame);\n\t\t\trequestId = context.requestAnimationFrame(onAnimationFrame);\n\t\t}\n\n\t\treturn {\n\t\t\tstart: function start() {\n\t\t\t\tif (isAnimating === true) return;\n\t\t\t\tif (animationLoop === null) return;\n\t\t\t\trequestId = context.requestAnimationFrame(onAnimationFrame);\n\t\t\t\tisAnimating = true;\n\t\t\t},\n\t\t\tstop: function stop() {\n\t\t\t\tcontext.cancelAnimationFrame(requestId);\n\t\t\t\tisAnimating = false;\n\t\t\t},\n\t\t\tsetAnimationLoop: function setAnimationLoop(callback) {\n\t\t\t\tanimationLoop = callback;\n\t\t\t},\n\t\t\tsetContext: function setContext(value) {\n\t\t\t\tcontext = value;\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction WebGLAttributes(gl, capabilities) {\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar buffers = new WeakMap();\n\n\t\tfunction createBuffer(attribute, bufferType) {\n\t\t\tvar array = attribute.array;\n\t\t\tvar usage = attribute.usage;\n\t\t\tvar buffer = gl.createBuffer();\n\t\t\tgl.bindBuffer(bufferType, buffer);\n\t\t\tgl.bufferData(bufferType, array, usage);\n\t\t\tattribute.onUploadCallback();\n\t\t\tvar type = 5126;\n\n\t\t\tif (array instanceof Float32Array) {\n\t\t\t\ttype = 5126;\n\t\t\t} else if (array instanceof Float64Array) {\n\t\t\t\tconsole.warn('THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.');\n\t\t\t} else if (array instanceof Uint16Array) {\n\t\t\t\tif (attribute.isFloat16BufferAttribute) {\n\t\t\t\t\tif (isWebGL2) {\n\t\t\t\t\t\ttype = 5131;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttype = 5123;\n\t\t\t\t}\n\t\t\t} else if (array instanceof Int16Array) {\n\t\t\t\ttype = 5122;\n\t\t\t} else if (array instanceof Uint32Array) {\n\t\t\t\ttype = 5125;\n\t\t\t} else if (array instanceof Int32Array) {\n\t\t\t\ttype = 5124;\n\t\t\t} else if (array instanceof Int8Array) {\n\t\t\t\ttype = 5120;\n\t\t\t} else if (array instanceof Uint8Array) {\n\t\t\t\ttype = 5121;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tbuffer: buffer,\n\t\t\t\ttype: type,\n\t\t\t\tbytesPerElement: array.BYTES_PER_ELEMENT,\n\t\t\t\tversion: attribute.version\n\t\t\t};\n\t\t}\n\n\t\tfunction updateBuffer(buffer, attribute, bufferType) {\n\t\t\tvar array = attribute.array;\n\t\t\tvar updateRange = attribute.updateRange;\n\t\t\tgl.bindBuffer(bufferType, buffer);\n\n\t\t\tif (updateRange.count === -1) {\n\t\t\t\t// Not using update ranges\n\t\t\t\tgl.bufferSubData(bufferType, 0, array);\n\t\t\t} else {\n\t\t\t\tif (isWebGL2) {\n\t\t\t\t\tgl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array, updateRange.offset, updateRange.count);\n\t\t\t\t} else {\n\t\t\t\t\tgl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array.subarray(updateRange.offset, updateRange.offset + updateRange.count));\n\t\t\t\t}\n\n\t\t\t\tupdateRange.count = -1; // reset range\n\t\t\t}\n\t\t} //\n\n\n\t\tfunction get(attribute) {\n\t\t\tif (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n\t\t\treturn buffers.get(attribute);\n\t\t}\n\n\t\tfunction remove(attribute) {\n\t\t\tif (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n\t\t\tvar data = buffers.get(attribute);\n\n\t\t\tif (data) {\n\t\t\t\tgl.deleteBuffer(data.buffer);\n\t\t\t\tbuffers.delete(attribute);\n\t\t\t}\n\t\t}\n\n\t\tfunction update(attribute, bufferType) {\n\t\t\tif (attribute.isGLBufferAttribute) {\n\t\t\t\tvar cached = buffers.get(attribute);\n\n\t\t\t\tif (!cached || cached.version < attribute.version) {\n\t\t\t\t\tbuffers.set(attribute, {\n\t\t\t\t\t\tbuffer: attribute.buffer,\n\t\t\t\t\t\ttype: attribute.type,\n\t\t\t\t\t\tbytesPerElement: attribute.elementSize,\n\t\t\t\t\t\tversion: attribute.version\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n\t\t\tvar data = buffers.get(attribute);\n\n\t\t\tif (data === undefined) {\n\t\t\t\tbuffers.set(attribute, createBuffer(attribute, bufferType));\n\t\t\t} else if (data.version < attribute.version) {\n\t\t\t\tupdateBuffer(data.buffer, attribute, bufferType);\n\t\t\t\tdata.version = attribute.version;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tremove: remove,\n\t\t\tupdate: update\n\t\t};\n\t}\n\n\tvar PlaneGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(PlaneGeometry, _BufferGeometry);\n\n\t\tfunction PlaneGeometry(width, height, widthSegments, heightSegments) {\n\t\t\tvar _this;\n\n\t\t\tif (width === void 0) {\n\t\t\t\twidth = 1;\n\t\t\t}\n\n\t\t\tif (height === void 0) {\n\t\t\t\theight = 1;\n\t\t\t}\n\n\t\t\tif (widthSegments === void 0) {\n\t\t\t\twidthSegments = 1;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 1;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'PlaneGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\twidth: width,\n\t\t\t\theight: height,\n\t\t\t\twidthSegments: widthSegments,\n\t\t\t\theightSegments: heightSegments\n\t\t\t};\n\t\t\tvar width_half = width / 2;\n\t\t\tvar height_half = height / 2;\n\t\t\tvar gridX = Math.floor(widthSegments);\n\t\t\tvar gridY = Math.floor(heightSegments);\n\t\t\tvar gridX1 = gridX + 1;\n\t\t\tvar gridY1 = gridY + 1;\n\t\t\tvar segment_width = width / gridX;\n\t\t\tvar segment_height = height / gridY; //\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = [];\n\n\t\t\tfor (var iy = 0; iy < gridY1; iy++) {\n\t\t\t\tvar y = iy * segment_height - height_half;\n\n\t\t\t\tfor (var ix = 0; ix < gridX1; ix++) {\n\t\t\t\t\tvar x = ix * segment_width - width_half;\n\t\t\t\t\tvertices.push(x, -y, 0);\n\t\t\t\t\tnormals.push(0, 0, 1);\n\t\t\t\t\tuvs.push(ix / gridX);\n\t\t\t\t\tuvs.push(1 - iy / gridY);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var _iy = 0; _iy < gridY; _iy++) {\n\t\t\t\tfor (var _ix = 0; _ix < gridX; _ix++) {\n\t\t\t\t\tvar a = _ix + gridX1 * _iy;\n\t\t\t\t\tvar b = _ix + gridX1 * (_iy + 1);\n\t\t\t\t\tvar c = _ix + 1 + gridX1 * (_iy + 1);\n\t\t\t\t\tvar d = _ix + 1 + gridX1 * _iy;\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn PlaneGeometry;\n\t}(BufferGeometry);\n\n\tvar alphamap_fragment = \"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\";\n\n\tvar alphamap_pars_fragment = \"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\n\tvar alphatest_fragment = \"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\";\n\n\tvar aomap_fragment = \"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\";\n\n\tvar aomap_pars_fragment = \"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\";\n\n\tvar begin_vertex = \"vec3 transformed = vec3( position );\";\n\n\tvar beginnormal_vertex = \"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\";\n\n\tvar bsdfs = \"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\\n}\\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\tif( cutoffDistance > 0.0 ) {\\n\\t\\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t}\\n\\treturn distanceFalloff;\\n#else\\n\\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\\t}\\n\\treturn 1.0;\\n#endif\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\\n\\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\\n\\treturn Fr * fresnel + F0;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\\n\\treturn specularColor * brdf.x + brdf.y;\\n}\\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\\n\\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\\n\\tvec3 FssEss = F * brdf.x + brdf.y;\\n\\tfloat Ess = brdf.x + brdf.y;\\n\\tfloat Ems = 1.0 - Ess;\\n\\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\\tsingleScatter += FssEss;\\n\\tmultiScatter += Fms * Ems;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie(float roughness, float NoH) {\\n\\tfloat invAlpha = 1.0 / roughness;\\n\\tfloat cos2h = NoH * NoH;\\n\\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\\n}\\nfloat V_Neubelt(float NoV, float NoL) {\\n\\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\\n}\\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\\n\\tvec3 N = geometry.normal;\\n\\tvec3 V = geometry.viewDir;\\n\\tvec3 H = normalize( V + L );\\n\\tfloat dotNH = saturate( dot( N, H ) );\\n\\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\\n}\\n#endif\";\n\n\tvar bumpmap_pars_fragment = \"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\";\n\n\tvar clipping_planes_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\";\n\n\tvar clipping_planes_pars_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\";\n\n\tvar clipping_planes_pars_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n#endif\";\n\n\tvar clipping_planes_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvClipPosition = - mvPosition.xyz;\\n#endif\";\n\n\tvar color_fragment = \"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\";\n\n\tvar color_pars_fragment = \"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\";\n\n\tvar color_pars_vertex = \"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\n\tvar color_vertex = \"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\\tvColor.xyz *= color.xyz;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\\tvColor.xyz *= instanceColor.xyz;\\n#endif\";\n\n\tvar common = \"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\n#ifdef HIGH_PRECISION\\n\\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\n\\tfloat precisionSafeLength( vec3 v ) {\\n\\t\\tfloat maxComponent = max3( abs( v ) );\\n\\t\\treturn length( v / maxComponent ) * maxComponent;\\n\\t}\\n#endif\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n#ifdef CLEARCOAT\\n\\tvec3 clearcoatNormal;\\n#endif\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\treturn vec2( u, v );\\n}\";\n\n\tvar cube_uv_reflection_fragment = \"#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t#define cubeUV_maxMipLevel 8.0\\n\\t#define cubeUV_minMipLevel 4.0\\n\\t#define cubeUV_maxTileSize 256.0\\n\\t#define cubeUV_minTileSize 16.0\\n\\tfloat getFace( vec3 direction ) {\\n\\t\\tvec3 absDirection = abs( direction );\\n\\t\\tfloat face = - 1.0;\\n\\t\\tif ( absDirection.x > absDirection.z ) {\\n\\t\\t\\tif ( absDirection.x > absDirection.y )\\n\\t\\t\\t\\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t} else {\\n\\t\\t\\tif ( absDirection.z > absDirection.y )\\n\\t\\t\\t\\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t}\\n\\t\\treturn face;\\n\\t}\\n\\tvec2 getUV( vec3 direction, float face ) {\\n\\t\\tvec2 uv;\\n\\t\\tif ( face == 0.0 ) {\\n\\t\\t\\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 1.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\\t\\t} else if ( face == 2.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\\t\\t} else if ( face == 3.0 ) {\\n\\t\\t\\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 4.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\\t\\t} else {\\n\\t\\t\\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\\t\\t}\\n\\t\\treturn 0.5 * ( uv + 1.0 );\\n\\t}\\n\\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\\t\\tfloat face = getFace( direction );\\n\\t\\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\\t\\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\\t\\tfloat faceSize = exp2( mipInt );\\n\\t\\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\\n\\t\\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\\n\\t\\tvec2 f = fract( uv );\\n\\t\\tuv += 0.5 - f;\\n\\t\\tif ( face > 2.0 ) {\\n\\t\\t\\tuv.y += faceSize;\\n\\t\\t\\tface -= 3.0;\\n\\t\\t}\\n\\t\\tuv.x += face * faceSize;\\n\\t\\tif ( mipInt < cubeUV_maxMipLevel ) {\\n\\t\\t\\tuv.y += 2.0 * cubeUV_maxTileSize;\\n\\t\\t}\\n\\t\\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\\n\\t\\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\\n\\t\\tuv *= texelSize;\\n\\t\\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.x += texelSize;\\n\\t\\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.y += texelSize;\\n\\t\\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.x -= texelSize;\\n\\t\\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tvec3 tm = mix( tl, tr, f.x );\\n\\t\\tvec3 bm = mix( bl, br, f.x );\\n\\t\\treturn mix( tm, bm, f.y );\\n\\t}\\n\\t#define r0 1.0\\n\\t#define v0 0.339\\n\\t#define m0 - 2.0\\n\\t#define r1 0.8\\n\\t#define v1 0.276\\n\\t#define m1 - 1.0\\n\\t#define r4 0.4\\n\\t#define v4 0.046\\n\\t#define m4 2.0\\n\\t#define r5 0.305\\n\\t#define v5 0.016\\n\\t#define m5 3.0\\n\\t#define r6 0.21\\n\\t#define v6 0.0038\\n\\t#define m6 4.0\\n\\tfloat roughnessToMip( float roughness ) {\\n\\t\\tfloat mip = 0.0;\\n\\t\\tif ( roughness >= r1 ) {\\n\\t\\t\\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\\n\\t\\t} else if ( roughness >= r4 ) {\\n\\t\\t\\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\\n\\t\\t} else if ( roughness >= r5 ) {\\n\\t\\t\\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\\n\\t\\t} else if ( roughness >= r6 ) {\\n\\t\\t\\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\\n\\t\\t} else {\\n\\t\\t\\tmip = - 2.0 * log2( 1.16 * roughness );\\t\\t}\\n\\t\\treturn mip;\\n\\t}\\n\\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\\t\\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\\n\\t\\tfloat mipF = fract( mip );\\n\\t\\tfloat mipInt = floor( mip );\\n\\t\\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\\t\\tif ( mipF == 0.0 ) {\\n\\t\\t\\treturn vec4( color0, 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\\t\\t\\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\\t\\t}\\n\\t}\\n#endif\";\n\n\tvar defaultnormal_vertex = \"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\\tmat3 m = mat3( instanceMatrix );\\n\\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#ifdef FLIP_SIDED\\n\\t\\ttransformedTangent = - transformedTangent;\\n\\t#endif\\n#endif\";\n\n\tvar displacementmap_pars_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\";\n\n\tvar displacementmap_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\\n#endif\";\n\n\tvar emissivemap_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\";\n\n\tvar emissivemap_pars_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\";\n\n\tvar encodings_fragment = \"gl_FragColor = linearToOutputTexel( gl_FragColor );\";\n\n\tvar encodings_pars_fragment = \"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\\n\\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\\n\\tfloat D = max( maxRange / maxRGB, 1.0 );\\n\\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value ) {\\n\\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\\n\\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract( Le );\\n\\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\\n\\treturn vec4( max( vRGB, 0.0 ), 1.0 );\\n}\";\n\n\tvar envmap_fragment = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvec3 cameraToFrag;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\t#ifndef ENVMAP_TYPE_CUBE_UV\\n\\t\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#endif\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\";\n\n\tvar envmap_common_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float envMapIntensity;\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\t\\n#endif\";\n\n\tvar envmap_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float reflectivity;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\";\n\n\tvar envmap_pars_vertex = \"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\t\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\";\n\n\tvar envmap_vertex = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\n\tvar fog_vertex = \"#ifdef USE_FOG\\n\\tfogDepth = - mvPosition.z;\\n#endif\";\n\n\tvar fog_pars_vertex = \"#ifdef USE_FOG\\n\\tvarying float fogDepth;\\n#endif\";\n\n\tvar fog_fragment = \"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\";\n\n\tvar 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\n\tvar gradientmap_pars_fragment = \"#ifdef USE_GRADIENTMAP\\n\\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\tfloat dotNL = dot( normal, lightDirection );\\n\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t#ifdef USE_GRADIENTMAP\\n\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t#else\\n\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t#endif\\n}\";\n\n\tvar lightmap_fragment = \"#ifdef USE_LIGHTMAP\\n\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n#endif\";\n\n\tvar lightmap_pars_fragment = \"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\";\n\n\tvar lights_lambert_vertex = \"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\nvIndirectFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n\\tvIndirectBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\\n#ifdef DOUBLE_SIDED\\n\\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\\n\\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\";\n\n\tvar lights_pars_begin = \"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\nuniform vec3 lightProbe[ 9 ];\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\\n\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\";\n\n\tvar envmap_physical_pars_fragment = \"#if defined( USE_ENVMAP )\\n\\t#ifdef ENVMAP_MODE_REFRACTION\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -viewDir, normal );\\n\\t\\t\\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\";\n\n\tvar lights_toon_fragment = \"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\";\n\n\tvar lights_toon_pars_fragment = \"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct ToonMaterial {\\n\\tvec3 diffuseColor;\\n};\\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Toon\\n#define Material_LightProbeLOD( material )\\t(0)\";\n\n\tvar lights_phong_fragment = \"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\";\n\n\tvar lights_phong_pars_fragment = \"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3 diffuseColor;\\n\\tvec3 specularColor;\\n\\tfloat specularShininess;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\";\n\n\tvar lights_physical_fragment = \"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\\n#ifdef REFLECTIVITY\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#endif\\n#ifdef CLEARCOAT\\n\\tmaterial.clearcoat = clearcoat;\\n\\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\\t#ifdef USE_CLEARCOATMAP\\n\\t\\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\t\\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\\n\\t#endif\\n\\tmaterial.clearcoat = saturate( material.clearcoat );\\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\\tmaterial.clearcoatRoughness += geometryRoughness;\\n\\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_SHEEN\\n\\tmaterial.sheenColor = sheen;\\n#endif\";\n\n\tvar lights_physical_pars_fragment = \"struct PhysicalMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat specularRoughness;\\n\\tvec3 specularColor;\\n#ifdef CLEARCOAT\\n\\tfloat clearcoat;\\n\\tfloat clearcoatRoughness;\\n#endif\\n#ifdef USE_SHEEN\\n\\tvec3 sheenColor;\\n#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(\t\t0, 1,\t\t0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifdef CLEARCOAT\\n\\t\\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\\n\\t\\tvec3 ccIrradiance = ccDotNL * directLight.color;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tccIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\\n\\t\\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\\n\\t#else\\n\\t\\tfloat clearcoatDHR = 0.0;\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\\n\\t\\t\\tmaterial.specularRoughness,\\n\\t\\t\\tdirectLight.direction,\\n\\t\\t\\tgeometry,\\n\\t\\t\\tmaterial.sheenColor\\n\\t\\t);\\n\\t#else\\n\\t\\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\\n\\t#endif\\n\\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\\t#ifdef CLEARCOAT\\n\\t\\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\\n\\t\\tfloat ccDotNL = ccDotNV;\\n\\t\\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\\n\\t#else\\n\\t\\tfloat clearcoatDHR = 0.0;\\n\\t#endif\\n\\tfloat clearcoatInv = 1.0 - clearcoatDHR;\\n\\tvec3 singleScattering = vec3( 0.0 );\\n\\tvec3 multiScattering = vec3( 0.0 );\\n\\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\\n\\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\\n\\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\\n\\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\";\n\n\tvar lights_fragment_begin = \"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\n#ifdef CLEARCOAT\\n\\tgeometry.clearcoatNormal = clearcoatNormal;\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\\n\\t\\tpointLightShadow = pointLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\tspotLightShadow = spotLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\\n\\t\\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 iblIrradiance = vec3( 0.0 );\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\";\n\n\tvar lights_fragment_maps = \"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\t\\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\\n\\t#ifdef CLEARCOAT\\n\\t\\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\\n\\t#endif\\n#endif\";\n\n\tvar lights_fragment_end = \"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\\n#endif\";\n\n\tvar logdepthbuf_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\";\n\n\tvar logdepthbuf_pars_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tuniform float logDepthBufFC;\\n\\tvarying float vFragDepth;\\n\\tvarying float vIsPerspective;\\n#endif\";\n\n\tvar logdepthbuf_pars_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t\\tvarying float vIsPerspective;\\n\\t#else\\n\\t\\tuniform float logDepthBufFC;\\n\\t#endif\\n#endif\";\n\n\tvar logdepthbuf_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t\\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\\t#else\\n\\t\\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\\t\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\t\\tgl_Position.z *= gl_Position.w;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\n\tvar map_fragment = \"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\";\n\n\tvar map_pars_fragment = \"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\";\n\n\tvar map_particle_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n#endif\\n#ifdef USE_MAP\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\";\n\n\tvar map_particle_pars_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tuniform mat3 uvTransform;\\n#endif\\n#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\n\tvar metalnessmap_fragment = \"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\";\n\n\tvar metalnessmap_pars_fragment = \"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\";\n\n\tvar morphnormal_vertex = \"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal *= morphTargetBaseInfluence;\\n\\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n#endif\";\n\n\tvar morphtarget_pars_vertex = \"#ifdef USE_MORPHTARGETS\\n\\tuniform float morphTargetBaseInfluence;\\n\\t#ifndef USE_MORPHNORMALS\\n\\t\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\t\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif\";\n\n\tvar morphtarget_vertex = \"#ifdef USE_MORPHTARGETS\\n\\ttransformed *= morphTargetBaseInfluence;\\n\\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\t\\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\\t\\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\\t\\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\\t\\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\";\n\n\tvar normal_fragment_begin = \"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n\\t#ifdef USE_TANGENT\\n\\t\\tvec3 tangent = normalize( vTangent );\\n\\t\\tvec3 bitangent = normalize( vBitangent );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\t\\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\t#endif\\n\\t\\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\\n\\t\\t\\tmat3 vTBN = mat3( tangent, bitangent, normal );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\nvec3 geometryNormal = normal;\";\n\n\tvar normal_fragment_maps = \"#ifdef OBJECTSPACE_NORMALMAP\\n\\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t#ifdef FLIP_SIDED\\n\\t\\tnormal = - normal;\\n\\t#endif\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n\\tnormal = normalize( normalMatrix * normal );\\n#elif defined( TANGENTSPACE_NORMALMAP )\\n\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tmapN.xy *= normalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tnormal = normalize( vTBN * mapN );\\n\\t#else\\n\\t\\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\\n\\t#endif\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\";\n\n\tvar normalmap_pars_fragment = \"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n#endif\\n#ifdef OBJECTSPACE_NORMALMAP\\n\\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\";\n\n\tvar clearcoat_normal_fragment_begin = \"#ifdef CLEARCOAT\\n\\tvec3 clearcoatNormal = geometryNormal;\\n#endif\";\n\n\tvar clearcoat_normal_fragment_maps = \"#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\\n\\t#else\\n\\t\\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\\n\\t#endif\\n#endif\";\n\n\tvar clearcoat_pars_fragment = \"#ifdef USE_CLEARCOATMAP\\n\\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform sampler2D clearcoatNormalMap;\\n\\tuniform vec2 clearcoatNormalScale;\\n#endif\";\n\n\tvar packing = \"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\\n\\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\";\n\n\tvar premultiplied_alpha_fragment = \"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\";\n\n\tvar project_vertex = \"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\";\n\n\tvar dithering_fragment = \"#ifdef DITHERING\\n\\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\";\n\n\tvar dithering_pars_fragment = \"#ifdef DITHERING\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\";\n\n\tvar roughnessmap_fragment = \"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\";\n\n\tvar roughnessmap_pars_fragment = \"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\";\n\n\tvar shadowmap_pars_fragment = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\\t\\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\\t}\\n\\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\\t\\tfloat occlusion = 1.0;\\n\\t\\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\\t\\tfloat hard_shadow = step( compare , distribution.x );\\n\\t\\tif (hard_shadow != 1.0 ) {\\n\\t\\t\\tfloat distance = compare - distribution.x ;\\n\\t\\t\\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\\t\\t\\tfloat softness_probability = variance / (variance + distance * distance );\\t\\t\\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\\t\\t\\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\\t\\t}\\n\\t\\treturn occlusion;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx2 = dx0 / 2.0;\\n\\t\\t\\tfloat dy2 = dy0 / 2.0;\\n\\t\\t\\tfloat dx3 = dx1 / 2.0;\\n\\t\\t\\tfloat dy3 = dy1 / 2.0;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 17.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx = texelSize.x;\\n\\t\\t\\tfloat dy = texelSize.y;\\n\\t\\t\\tvec2 uv = shadowCoord.xy;\\n\\t\\t\\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t\\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t\tf.x ),\\n\\t\\t\\t\\t\\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t\\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t\tf.x ),\\n\\t\\t\\t\\t\\t f.y )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\";\n\n\tvar shadowmap_pars_vertex = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n#endif\";\n\n\tvar shadowmap_vertex = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\tvec4 shadowWorldPosition;\\n\\t#endif\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\";\n\n\tvar shadowmask_pars_fragment = \"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tspotLight = spotLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tpointLight = pointLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\";\n\n\tvar skinbase_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\";\n\n\tvar skinning_pars_vertex = \"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform highp sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\n\tvar skinning_vertex = \"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\";\n\n\tvar skinnormal_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\\t#ifdef USE_TANGENT\\n\\t\\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#endif\\n#endif\";\n\n\tvar specularmap_fragment = \"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\";\n\n\tvar specularmap_pars_fragment = \"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\";\n\n\tvar tonemapping_fragment = \"#if defined( TONE_MAPPING )\\n\\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\";\n\n\tvar tonemapping_pars_fragment = \"#ifndef saturate\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\\tconst mat3 ACESInputMat = mat3(\\n\\t\\tvec3( 0.59719, 0.07600, 0.02840 ),\\t\\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\\t\\tvec3( 0.04823, 0.01566, 0.83777 )\\n\\t);\\n\\tconst mat3 ACESOutputMat = mat3(\\n\\t\\tvec3(\t1.60475, -0.10208, -0.00327 ),\\t\\tvec3( -0.53108,\t1.10813, -0.07276 ),\\n\\t\\tvec3( -0.07367, -0.00605,\t1.07602 )\\n\\t);\\n\\tcolor *= toneMappingExposure / 0.6;\\n\\tcolor = ACESInputMat * color;\\n\\tcolor = RRTAndODTFit( color );\\n\\tcolor = ACESOutputMat * color;\\n\\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\";\n\n\tvar transmissionmap_fragment = \"#ifdef USE_TRANSMISSIONMAP\\n\\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\\n#endif\";\n\n\tvar transmissionmap_pars_fragment = \"#ifdef USE_TRANSMISSIONMAP\\n\\tuniform sampler2D transmissionMap;\\n#endif\";\n\n\tvar uv_pars_fragment = \"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\\n\\tvarying vec2 vUv;\\n#endif\";\n\n\tvar uv_pars_vertex = \"#ifdef USE_UV\\n\\t#ifdef UVS_VERTEX_ONLY\\n\\t\\tvec2 vUv;\\n\\t#else\\n\\t\\tvarying vec2 vUv;\\n\\t#endif\\n\\tuniform mat3 uvTransform;\\n#endif\";\n\n\tvar uv_vertex = \"#ifdef USE_UV\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif\";\n\n\tvar uv2_pars_fragment = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif\";\n\n\tvar uv2_pars_vertex = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n\\tuniform mat3 uv2Transform;\\n#endif\";\n\n\tvar uv2_vertex = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\\n#endif\";\n\n\tvar worldpos_vertex = \"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\\t#ifdef USE_INSTANCING\\n\\t\\tworldPosition = instanceMatrix * worldPosition;\\n\\t#endif\\n\\tworldPosition = modelMatrix * worldPosition;\\n#endif\";\n\n\tvar background_frag = \"uniform sampler2D t2D;\\nvarying vec2 vUv;\\nvoid main() {\\n\\tvec4 texColor = texture2D( t2D, vUv );\\n\\tgl_FragColor = mapTexelToLinear( texColor );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\n\tvar background_vert = \"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\";\n\n\tvar cube_frag = \"#include <envmap_common_pars_fragment>\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\n#include <cube_uv_reflection_fragment>\\nvoid main() {\\n\\tvec3 vReflect = vWorldDirection;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = envColor;\\n\\tgl_FragColor.a *= opacity;\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\n\tvar cube_vert = \"varying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\";\n\n\tvar depth_frag = \"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\\t#endif\\n}\";\n\n\tvar depth_vert = \"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvHighPrecisionZW = gl_Position.zw;\\n}\";\n\n\tvar distanceRGBA_frag = \"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\";\n\n\tvar distanceRGBA_vert = \"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\";\n\n\tvar equirect_frag = \"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldDirection );\\n\\tvec2 sampleUV = equirectUv( direction );\\n\\tvec4 texColor = texture2D( tEquirect, sampleUV );\\n\\tgl_FragColor = mapTexelToLinear( texColor );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\n\tvar equirect_vert = \"varying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\";\n\n\tvar linedashed_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n}\";\n\n\tvar linedashed_vert = \"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\tvLineDistance = scale * lineDistance;\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshbasic_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\n\\t\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\t\\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshbasic_vert = \"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshlambert_frag = \"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\nvarying vec3 vIndirectFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n\\tvarying vec3 vIndirectBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vIndirectFront;\\n\\t#endif\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshlambert_vert = \"#define LAMBERT\\nvarying vec3 vLightFront;\\nvarying vec3 vIndirectFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n\\tvarying vec3 vIndirectBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshmatcap_frag = \"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tvec3 viewDir = normalize( vViewPosition );\\n\\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\\tvec3 y = cross( viewDir, x );\\n\\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\\t#ifdef USE_MATCAP\\n\\t\\tvec4 matcapColor = texture2D( matcap, uv );\\n\\t\\tmatcapColor = matcapTexelToLinear( matcapColor );\\n\\t#else\\n\\t\\tvec4 matcapColor = vec4( 1.0 );\\n\\t#endif\\n\\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshmatcap_vert = \"#define MATCAP\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <color_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#ifndef FLAT_SHADED\\n\\t\\tvNormal = normalize( transformedNormal );\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n}\";\n\n\tvar meshtoon_frag = \"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_toon_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_toon_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshtoon_vert = \"#define TOON\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshphong_frag = \"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshphong_vert = \"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshphysical_frag = \"#define STANDARD\\n#ifdef PHYSICAL\\n\\t#define REFLECTIVITY\\n\\t#define CLEARCOAT\\n\\t#define TRANSMISSION\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef TRANSMISSION\\n\\tuniform float transmission;\\n#endif\\n#ifdef REFLECTIVITY\\n\\tuniform float reflectivity;\\n#endif\\n#ifdef CLEARCOAT\\n\\tuniform float clearcoat;\\n\\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_SHEEN\\n\\tuniform vec3 sheen;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <transmissionmap_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_physical_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <lights_pars_begin>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <clearcoat_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#ifdef TRANSMISSION\\n\\t\\tfloat totalTransmission = transmission;\\n\\t#endif\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <clearcoat_normal_fragment_begin>\\n\\t#include <clearcoat_normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <transmissionmap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#ifdef TRANSMISSION\\n\\t\\tdiffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness );\\n\\t#endif\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshphysical_vert = \"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar normal_frag = \"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\";\n\n\tvar normal_vert = \"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\";\n\n\tvar points_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n}\";\n\n\tvar points_vert = \"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\tgl_PointSize = size;\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar shadow_frag = \"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\";\n\n\tvar shadow_vert = \"#include <common>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar sprite_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\";\n\n\tvar sprite_vert = \"uniform float rotation;\\nuniform vec2 center;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\tvec2 scale;\\n\\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\\t#ifndef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) scale *= - mvPosition.z;\\n\\t#endif\\n\\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\\tvec2 rotatedPosition;\\n\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\\tmvPosition.xy += rotatedPosition;\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar ShaderChunk = {\n\t\talphamap_fragment: alphamap_fragment,\n\t\talphamap_pars_fragment: alphamap_pars_fragment,\n\t\talphatest_fragment: alphatest_fragment,\n\t\taomap_fragment: aomap_fragment,\n\t\taomap_pars_fragment: aomap_pars_fragment,\n\t\tbegin_vertex: begin_vertex,\n\t\tbeginnormal_vertex: beginnormal_vertex,\n\t\tbsdfs: bsdfs,\n\t\tbumpmap_pars_fragment: bumpmap_pars_fragment,\n\t\tclipping_planes_fragment: clipping_planes_fragment,\n\t\tclipping_planes_pars_fragment: clipping_planes_pars_fragment,\n\t\tclipping_planes_pars_vertex: clipping_planes_pars_vertex,\n\t\tclipping_planes_vertex: clipping_planes_vertex,\n\t\tcolor_fragment: color_fragment,\n\t\tcolor_pars_fragment: color_pars_fragment,\n\t\tcolor_pars_vertex: color_pars_vertex,\n\t\tcolor_vertex: color_vertex,\n\t\tcommon: common,\n\t\tcube_uv_reflection_fragment: cube_uv_reflection_fragment,\n\t\tdefaultnormal_vertex: defaultnormal_vertex,\n\t\tdisplacementmap_pars_vertex: displacementmap_pars_vertex,\n\t\tdisplacementmap_vertex: displacementmap_vertex,\n\t\temissivemap_fragment: emissivemap_fragment,\n\t\temissivemap_pars_fragment: emissivemap_pars_fragment,\n\t\tencodings_fragment: encodings_fragment,\n\t\tencodings_pars_fragment: encodings_pars_fragment,\n\t\tenvmap_fragment: envmap_fragment,\n\t\tenvmap_common_pars_fragment: envmap_common_pars_fragment,\n\t\tenvmap_pars_fragment: envmap_pars_fragment,\n\t\tenvmap_pars_vertex: envmap_pars_vertex,\n\t\tenvmap_physical_pars_fragment: envmap_physical_pars_fragment,\n\t\tenvmap_vertex: envmap_vertex,\n\t\tfog_vertex: fog_vertex,\n\t\tfog_pars_vertex: fog_pars_vertex,\n\t\tfog_fragment: fog_fragment,\n\t\tfog_pars_fragment: fog_pars_fragment,\n\t\tgradientmap_pars_fragment: gradientmap_pars_fragment,\n\t\tlightmap_fragment: lightmap_fragment,\n\t\tlightmap_pars_fragment: lightmap_pars_fragment,\n\t\tlights_lambert_vertex: lights_lambert_vertex,\n\t\tlights_pars_begin: lights_pars_begin,\n\t\tlights_toon_fragment: lights_toon_fragment,\n\t\tlights_toon_pars_fragment: lights_toon_pars_fragment,\n\t\tlights_phong_fragment: lights_phong_fragment,\n\t\tlights_phong_pars_fragment: lights_phong_pars_fragment,\n\t\tlights_physical_fragment: lights_physical_fragment,\n\t\tlights_physical_pars_fragment: lights_physical_pars_fragment,\n\t\tlights_fragment_begin: lights_fragment_begin,\n\t\tlights_fragment_maps: lights_fragment_maps,\n\t\tlights_fragment_end: lights_fragment_end,\n\t\tlogdepthbuf_fragment: logdepthbuf_fragment,\n\t\tlogdepthbuf_pars_fragment: logdepthbuf_pars_fragment,\n\t\tlogdepthbuf_pars_vertex: logdepthbuf_pars_vertex,\n\t\tlogdepthbuf_vertex: logdepthbuf_vertex,\n\t\tmap_fragment: map_fragment,\n\t\tmap_pars_fragment: map_pars_fragment,\n\t\tmap_particle_fragment: map_particle_fragment,\n\t\tmap_particle_pars_fragment: map_particle_pars_fragment,\n\t\tmetalnessmap_fragment: metalnessmap_fragment,\n\t\tmetalnessmap_pars_fragment: metalnessmap_pars_fragment,\n\t\tmorphnormal_vertex: morphnormal_vertex,\n\t\tmorphtarget_pars_vertex: morphtarget_pars_vertex,\n\t\tmorphtarget_vertex: morphtarget_vertex,\n\t\tnormal_fragment_begin: normal_fragment_begin,\n\t\tnormal_fragment_maps: normal_fragment_maps,\n\t\tnormalmap_pars_fragment: normalmap_pars_fragment,\n\t\tclearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin,\n\t\tclearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps,\n\t\tclearcoat_pars_fragment: clearcoat_pars_fragment,\n\t\tpacking: packing,\n\t\tpremultiplied_alpha_fragment: premultiplied_alpha_fragment,\n\t\tproject_vertex: project_vertex,\n\t\tdithering_fragment: dithering_fragment,\n\t\tdithering_pars_fragment: dithering_pars_fragment,\n\t\troughnessmap_fragment: roughnessmap_fragment,\n\t\troughnessmap_pars_fragment: roughnessmap_pars_fragment,\n\t\tshadowmap_pars_fragment: shadowmap_pars_fragment,\n\t\tshadowmap_pars_vertex: shadowmap_pars_vertex,\n\t\tshadowmap_vertex: shadowmap_vertex,\n\t\tshadowmask_pars_fragment: shadowmask_pars_fragment,\n\t\tskinbase_vertex: skinbase_vertex,\n\t\tskinning_pars_vertex: skinning_pars_vertex,\n\t\tskinning_vertex: skinning_vertex,\n\t\tskinnormal_vertex: skinnormal_vertex,\n\t\tspecularmap_fragment: specularmap_fragment,\n\t\tspecularmap_pars_fragment: specularmap_pars_fragment,\n\t\ttonemapping_fragment: tonemapping_fragment,\n\t\ttonemapping_pars_fragment: tonemapping_pars_fragment,\n\t\ttransmissionmap_fragment: transmissionmap_fragment,\n\t\ttransmissionmap_pars_fragment: transmissionmap_pars_fragment,\n\t\tuv_pars_fragment: uv_pars_fragment,\n\t\tuv_pars_vertex: uv_pars_vertex,\n\t\tuv_vertex: uv_vertex,\n\t\tuv2_pars_fragment: uv2_pars_fragment,\n\t\tuv2_pars_vertex: uv2_pars_vertex,\n\t\tuv2_vertex: uv2_vertex,\n\t\tworldpos_vertex: worldpos_vertex,\n\t\tbackground_frag: background_frag,\n\t\tbackground_vert: background_vert,\n\t\tcube_frag: cube_frag,\n\t\tcube_vert: cube_vert,\n\t\tdepth_frag: depth_frag,\n\t\tdepth_vert: depth_vert,\n\t\tdistanceRGBA_frag: distanceRGBA_frag,\n\t\tdistanceRGBA_vert: distanceRGBA_vert,\n\t\tequirect_frag: equirect_frag,\n\t\tequirect_vert: equirect_vert,\n\t\tlinedashed_frag: linedashed_frag,\n\t\tlinedashed_vert: linedashed_vert,\n\t\tmeshbasic_frag: meshbasic_frag,\n\t\tmeshbasic_vert: meshbasic_vert,\n\t\tmeshlambert_frag: meshlambert_frag,\n\t\tmeshlambert_vert: meshlambert_vert,\n\t\tmeshmatcap_frag: meshmatcap_frag,\n\t\tmeshmatcap_vert: meshmatcap_vert,\n\t\tmeshtoon_frag: meshtoon_frag,\n\t\tmeshtoon_vert: meshtoon_vert,\n\t\tmeshphong_frag: meshphong_frag,\n\t\tmeshphong_vert: meshphong_vert,\n\t\tmeshphysical_frag: meshphysical_frag,\n\t\tmeshphysical_vert: meshphysical_vert,\n\t\tnormal_frag: normal_frag,\n\t\tnormal_vert: normal_vert,\n\t\tpoints_frag: points_frag,\n\t\tpoints_vert: points_vert,\n\t\tshadow_frag: shadow_frag,\n\t\tshadow_vert: shadow_vert,\n\t\tsprite_frag: sprite_frag,\n\t\tsprite_vert: sprite_vert\n\t};\n\n\t/**\n\t * Uniforms library for shared webgl shaders\n\t */\n\n\tvar UniformsLib = {\n\t\tcommon: {\n\t\t\tdiffuse: {\n\t\t\t\tvalue: new Color(0xeeeeee)\n\t\t\t},\n\t\t\topacity: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tuvTransform: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t},\n\t\t\tuv2Transform: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t},\n\t\t\talphaMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tspecularmap: {\n\t\t\tspecularMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tenvmap: {\n\t\t\tenvMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tflipEnvMap: {\n\t\t\t\tvalue: -1\n\t\t\t},\n\t\t\treflectivity: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\trefractionRatio: {\n\t\t\t\tvalue: 0.98\n\t\t\t},\n\t\t\tmaxMipLevel: {\n\t\t\t\tvalue: 0\n\t\t\t}\n\t\t},\n\t\taomap: {\n\t\t\taoMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\taoMapIntensity: {\n\t\t\t\tvalue: 1\n\t\t\t}\n\t\t},\n\t\tlightmap: {\n\t\t\tlightMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tlightMapIntensity: {\n\t\t\t\tvalue: 1\n\t\t\t}\n\t\t},\n\t\temissivemap: {\n\t\t\temissiveMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tbumpmap: {\n\t\t\tbumpMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tbumpScale: {\n\t\t\t\tvalue: 1\n\t\t\t}\n\t\t},\n\t\tnormalmap: {\n\t\t\tnormalMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tnormalScale: {\n\t\t\t\tvalue: new Vector2(1, 1)\n\t\t\t}\n\t\t},\n\t\tdisplacementmap: {\n\t\t\tdisplacementMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tdisplacementScale: {\n\t\t\t\tvalue: 1\n\t\t\t},\n\t\t\tdisplacementBias: {\n\t\t\t\tvalue: 0\n\t\t\t}\n\t\t},\n\t\troughnessmap: {\n\t\t\troughnessMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tmetalnessmap: {\n\t\t\tmetalnessMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tgradientmap: {\n\t\t\tgradientMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tfog: {\n\t\t\tfogDensity: {\n\t\t\t\tvalue: 0.00025\n\t\t\t},\n\t\t\tfogNear: {\n\t\t\t\tvalue: 1\n\t\t\t},\n\t\t\tfogFar: {\n\t\t\t\tvalue: 2000\n\t\t\t},\n\t\t\tfogColor: {\n\t\t\t\tvalue: new Color(0xffffff)\n\t\t\t}\n\t\t},\n\t\tlights: {\n\t\t\tambientLightColor: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tlightProbe: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tdirectionalLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tdirection: {},\n\t\t\t\t\tcolor: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdirectionalLightShadows: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tshadowBias: {},\n\t\t\t\t\tshadowNormalBias: {},\n\t\t\t\t\tshadowRadius: {},\n\t\t\t\t\tshadowMapSize: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdirectionalShadowMap: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tdirectionalShadowMatrix: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tspotLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tcolor: {},\n\t\t\t\t\tposition: {},\n\t\t\t\t\tdirection: {},\n\t\t\t\t\tdistance: {},\n\t\t\t\t\tconeCos: {},\n\t\t\t\t\tpenumbraCos: {},\n\t\t\t\t\tdecay: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tspotLightShadows: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tshadowBias: {},\n\t\t\t\t\tshadowNormalBias: {},\n\t\t\t\t\tshadowRadius: {},\n\t\t\t\t\tshadowMapSize: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tspotShadowMap: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tspotShadowMatrix: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tpointLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tcolor: {},\n\t\t\t\t\tposition: {},\n\t\t\t\t\tdecay: {},\n\t\t\t\t\tdistance: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tpointLightShadows: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tshadowBias: {},\n\t\t\t\t\tshadowNormalBias: {},\n\t\t\t\t\tshadowRadius: {},\n\t\t\t\t\tshadowMapSize: {},\n\t\t\t\t\tshadowCameraNear: {},\n\t\t\t\t\tshadowCameraFar: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tpointShadowMap: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tpointShadowMatrix: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\themisphereLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tdirection: {},\n\t\t\t\t\tskyColor: {},\n\t\t\t\t\tgroundColor: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\t// TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src\n\t\t\trectAreaLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tcolor: {},\n\t\t\t\t\tposition: {},\n\t\t\t\t\twidth: {},\n\t\t\t\t\theight: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tltc_1: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tltc_2: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tpoints: {\n\t\t\tdiffuse: {\n\t\t\t\tvalue: new Color(0xeeeeee)\n\t\t\t},\n\t\t\topacity: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\talphaMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tuvTransform: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t},\n\t\tsprite: {\n\t\t\tdiffuse: {\n\t\t\t\tvalue: new Color(0xeeeeee)\n\t\t\t},\n\t\t\topacity: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\tvalue: new Vector2(0.5, 0.5)\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tvalue: 0.0\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\talphaMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tuvTransform: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t}\n\t};\n\n\tvar ShaderLib = {\n\t\tbasic: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.fog]),\n\t\t\tvertexShader: ShaderChunk.meshbasic_vert,\n\t\t\tfragmentShader: ShaderChunk.meshbasic_frag\n\t\t},\n\t\tlambert: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.fog, UniformsLib.lights, {\n\t\t\t\temissive: {\n\t\t\t\t\tvalue: new Color(0x000000)\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshlambert_vert,\n\t\t\tfragmentShader: ShaderChunk.meshlambert_frag\n\t\t},\n\t\tphong: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.fog, UniformsLib.lights, {\n\t\t\t\temissive: {\n\t\t\t\t\tvalue: new Color(0x000000)\n\t\t\t\t},\n\t\t\t\tspecular: {\n\t\t\t\t\tvalue: new Color(0x111111)\n\t\t\t\t},\n\t\t\t\tshininess: {\n\t\t\t\t\tvalue: 30\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshphong_vert,\n\t\t\tfragmentShader: ShaderChunk.meshphong_frag\n\t\t},\n\t\tstandard: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.roughnessmap, UniformsLib.metalnessmap, UniformsLib.fog, UniformsLib.lights, {\n\t\t\t\temissive: {\n\t\t\t\t\tvalue: new Color(0x000000)\n\t\t\t\t},\n\t\t\t\troughness: {\n\t\t\t\t\tvalue: 1.0\n\t\t\t\t},\n\t\t\t\tmetalness: {\n\t\t\t\t\tvalue: 0.0\n\t\t\t\t},\n\t\t\t\tenvMapIntensity: {\n\t\t\t\t\tvalue: 1\n\t\t\t\t} // temporary\n\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshphysical_vert,\n\t\t\tfragmentShader: ShaderChunk.meshphysical_frag\n\t\t},\n\t\ttoon: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.gradientmap, UniformsLib.fog, UniformsLib.lights, {\n\t\t\t\temissive: {\n\t\t\t\t\tvalue: new Color(0x000000)\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshtoon_vert,\n\t\t\tfragmentShader: ShaderChunk.meshtoon_frag\n\t\t},\n\t\tmatcap: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.fog, {\n\t\t\t\tmatcap: {\n\t\t\t\t\tvalue: null\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshmatcap_vert,\n\t\t\tfragmentShader: ShaderChunk.meshmatcap_frag\n\t\t},\n\t\tpoints: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.points, UniformsLib.fog]),\n\t\t\tvertexShader: ShaderChunk.points_vert,\n\t\t\tfragmentShader: ShaderChunk.points_frag\n\t\t},\n\t\tdashed: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.fog, {\n\t\t\t\tscale: {\n\t\t\t\t\tvalue: 1\n\t\t\t\t},\n\t\t\t\tdashSize: {\n\t\t\t\t\tvalue: 1\n\t\t\t\t},\n\t\t\t\ttotalSize: {\n\t\t\t\t\tvalue: 2\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.linedashed_vert,\n\t\t\tfragmentShader: ShaderChunk.linedashed_frag\n\t\t},\n\t\tdepth: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.displacementmap]),\n\t\t\tvertexShader: ShaderChunk.depth_vert,\n\t\t\tfragmentShader: ShaderChunk.depth_frag\n\t\t},\n\t\tnormal: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, {\n\t\t\t\topacity: {\n\t\t\t\t\tvalue: 1.0\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.normal_vert,\n\t\t\tfragmentShader: ShaderChunk.normal_frag\n\t\t},\n\t\tsprite: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.sprite, UniformsLib.fog]),\n\t\t\tvertexShader: ShaderChunk.sprite_vert,\n\t\t\tfragmentShader: ShaderChunk.sprite_frag\n\t\t},\n\t\tbackground: {\n\t\t\tuniforms: {\n\t\t\t\tuvTransform: {\n\t\t\t\t\tvalue: new Matrix3()\n\t\t\t\t},\n\t\t\t\tt2D: {\n\t\t\t\t\tvalue: null\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: ShaderChunk.background_vert,\n\t\t\tfragmentShader: ShaderChunk.background_frag\n\t\t},\n\n\t\t/* -------------------------------------------------------------------------\n\t\t//\tCube map shader\n\t\t ------------------------------------------------------------------------- */\n\t\tcube: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.envmap, {\n\t\t\t\topacity: {\n\t\t\t\t\tvalue: 1.0\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.cube_vert,\n\t\t\tfragmentShader: ShaderChunk.cube_frag\n\t\t},\n\t\tequirect: {\n\t\t\tuniforms: {\n\t\t\t\ttEquirect: {\n\t\t\t\t\tvalue: null\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: ShaderChunk.equirect_vert,\n\t\t\tfragmentShader: ShaderChunk.equirect_frag\n\t\t},\n\t\tdistanceRGBA: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.displacementmap, {\n\t\t\t\treferencePosition: {\n\t\t\t\t\tvalue: new Vector3()\n\t\t\t\t},\n\t\t\t\tnearDistance: {\n\t\t\t\t\tvalue: 1\n\t\t\t\t},\n\t\t\t\tfarDistance: {\n\t\t\t\t\tvalue: 1000\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.distanceRGBA_vert,\n\t\t\tfragmentShader: ShaderChunk.distanceRGBA_frag\n\t\t},\n\t\tshadow: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.lights, UniformsLib.fog, {\n\t\t\t\tcolor: {\n\t\t\t\t\tvalue: new Color(0x00000)\n\t\t\t\t},\n\t\t\t\topacity: {\n\t\t\t\t\tvalue: 1.0\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.shadow_vert,\n\t\t\tfragmentShader: ShaderChunk.shadow_frag\n\t\t}\n\t};\n\tShaderLib.physical = {\n\t\tuniforms: mergeUniforms([ShaderLib.standard.uniforms, {\n\t\t\tclearcoat: {\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\tclearcoatMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tclearcoatRoughness: {\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\tclearcoatRoughnessMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tclearcoatNormalScale: {\n\t\t\t\tvalue: new Vector2(1, 1)\n\t\t\t},\n\t\t\tclearcoatNormalMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tsheen: {\n\t\t\t\tvalue: new Color(0x000000)\n\t\t\t},\n\t\t\ttransmission: {\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\ttransmissionMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t}]),\n\t\tvertexShader: ShaderChunk.meshphysical_vert,\n\t\tfragmentShader: ShaderChunk.meshphysical_frag\n\t};\n\n\tfunction WebGLBackground(renderer, cubemaps, state, objects, premultipliedAlpha) {\n\t\tvar clearColor = new Color(0x000000);\n\t\tvar clearAlpha = 0;\n\t\tvar planeMesh;\n\t\tvar boxMesh;\n\t\tvar currentBackground = null;\n\t\tvar currentBackgroundVersion = 0;\n\t\tvar currentTonemapping = null;\n\n\t\tfunction render(renderList, scene, camera, forceClear) {\n\t\t\tvar background = scene.isScene === true ? scene.background : null;\n\n\t\t\tif (background && background.isTexture) {\n\t\t\t\tbackground = cubemaps.get(background);\n\t\t\t} // Ignore background in AR\n\t\t\t// TODO: Reconsider this.\n\n\n\t\t\tvar xr = renderer.xr;\n\t\t\tvar session = xr.getSession && xr.getSession();\n\n\t\t\tif (session && session.environmentBlendMode === 'additive') {\n\t\t\t\tbackground = null;\n\t\t\t}\n\n\t\t\tif (background === null) {\n\t\t\t\tsetClear(clearColor, clearAlpha);\n\t\t\t} else if (background && background.isColor) {\n\t\t\t\tsetClear(background, 1);\n\t\t\t\tforceClear = true;\n\t\t\t}\n\n\t\t\tif (renderer.autoClear || forceClear) {\n\t\t\t\trenderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);\n\t\t\t}\n\n\t\t\tif (background && (background.isCubeTexture || background.isWebGLCubeRenderTarget || background.mapping === CubeUVReflectionMapping)) {\n\t\t\t\tif (boxMesh === undefined) {\n\t\t\t\t\tboxMesh = new Mesh(new BoxGeometry(1, 1, 1), new ShaderMaterial({\n\t\t\t\t\t\tname: 'BackgroundCubeMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms(ShaderLib.cube.uniforms),\n\t\t\t\t\t\tvertexShader: ShaderLib.cube.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.cube.fragmentShader,\n\t\t\t\t\t\tside: BackSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t}));\n\t\t\t\t\tboxMesh.geometry.deleteAttribute('normal');\n\t\t\t\t\tboxMesh.geometry.deleteAttribute('uv');\n\n\t\t\t\t\tboxMesh.onBeforeRender = function (renderer, scene, camera) {\n\t\t\t\t\t\tthis.matrixWorld.copyPosition(camera.matrixWorld);\n\t\t\t\t\t}; // enable code injection for non-built-in material\n\n\n\t\t\t\t\tObject.defineProperty(boxMesh.material, 'envMap', {\n\t\t\t\t\t\tget: function get() {\n\t\t\t\t\t\t\treturn this.uniforms.envMap.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tobjects.update(boxMesh);\n\t\t\t\t}\n\n\t\t\t\tif (background.isWebGLCubeRenderTarget) {\n\t\t\t\t\t// TODO Deprecate\n\t\t\t\t\tbackground = background.texture;\n\t\t\t\t}\n\n\t\t\t\tboxMesh.material.uniforms.envMap.value = background;\n\t\t\t\tboxMesh.material.uniforms.flipEnvMap.value = background.isCubeTexture && background._needsFlipEnvMap ? -1 : 1;\n\n\t\t\t\tif (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) {\n\t\t\t\t\tboxMesh.material.needsUpdate = true;\n\t\t\t\t\tcurrentBackground = background;\n\t\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\t\t\t\t} // push to the pre-sorted opaque render list\n\n\n\t\t\t\trenderList.unshift(boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null);\n\t\t\t} else if (background && background.isTexture) {\n\t\t\t\tif (planeMesh === undefined) {\n\t\t\t\t\tplaneMesh = new Mesh(new PlaneGeometry(2, 2), new ShaderMaterial({\n\t\t\t\t\t\tname: 'BackgroundMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms(ShaderLib.background.uniforms),\n\t\t\t\t\t\tvertexShader: ShaderLib.background.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.background.fragmentShader,\n\t\t\t\t\t\tside: FrontSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t}));\n\t\t\t\t\tplaneMesh.geometry.deleteAttribute('normal'); // enable code injection for non-built-in material\n\n\t\t\t\t\tObject.defineProperty(planeMesh.material, 'map', {\n\t\t\t\t\t\tget: function get() {\n\t\t\t\t\t\t\treturn this.uniforms.t2D.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tobjects.update(planeMesh);\n\t\t\t\t}\n\n\t\t\t\tplaneMesh.material.uniforms.t2D.value = background;\n\n\t\t\t\tif (background.matrixAutoUpdate === true) {\n\t\t\t\t\tbackground.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tplaneMesh.material.uniforms.uvTransform.value.copy(background.matrix);\n\n\t\t\t\tif (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) {\n\t\t\t\t\tplaneMesh.material.needsUpdate = true;\n\t\t\t\t\tcurrentBackground = background;\n\t\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\t\t\t\t} // push to the pre-sorted opaque render list\n\n\n\t\t\t\trenderList.unshift(planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null);\n\t\t\t}\n\t\t}\n\n\t\tfunction setClear(color, alpha) {\n\t\t\tstate.buffers.color.setClear(color.r, color.g, color.b, alpha, premultipliedAlpha);\n\t\t}\n\n\t\treturn {\n\t\t\tgetClearColor: function getClearColor() {\n\t\t\t\treturn clearColor;\n\t\t\t},\n\t\t\tsetClearColor: function setClearColor(color, alpha) {\n\t\t\t\tif (alpha === void 0) {\n\t\t\t\t\talpha = 1;\n\t\t\t\t}\n\n\t\t\t\tclearColor.set(color);\n\t\t\t\tclearAlpha = alpha;\n\t\t\t\tsetClear(clearColor, clearAlpha);\n\t\t\t},\n\t\t\tgetClearAlpha: function getClearAlpha() {\n\t\t\t\treturn clearAlpha;\n\t\t\t},\n\t\t\tsetClearAlpha: function setClearAlpha(alpha) {\n\t\t\t\tclearAlpha = alpha;\n\t\t\t\tsetClear(clearColor, clearAlpha);\n\t\t\t},\n\t\t\trender: render\n\t\t};\n\t}\n\n\tfunction WebGLBindingStates(gl, extensions, attributes, capabilities) {\n\t\tvar maxVertexAttributes = gl.getParameter(34921);\n\t\tvar extension = capabilities.isWebGL2 ? null : extensions.get('OES_vertex_array_object');\n\t\tvar vaoAvailable = capabilities.isWebGL2 || extension !== null;\n\t\tvar bindingStates = {};\n\t\tvar defaultState = createBindingState(null);\n\t\tvar currentState = defaultState;\n\n\t\tfunction setup(object, material, program, geometry, index) {\n\t\t\tvar updateBuffers = false;\n\n\t\t\tif (vaoAvailable) {\n\t\t\t\tvar state = getBindingState(geometry, program, material);\n\n\t\t\t\tif (currentState !== state) {\n\t\t\t\t\tcurrentState = state;\n\t\t\t\t\tbindVertexArrayObject(currentState.object);\n\t\t\t\t}\n\n\t\t\t\tupdateBuffers = needsUpdate(geometry, index);\n\t\t\t\tif (updateBuffers) saveCache(geometry, index);\n\t\t\t} else {\n\t\t\t\tvar wireframe = material.wireframe === true;\n\n\t\t\t\tif (currentState.geometry !== geometry.id || currentState.program !== program.id || currentState.wireframe !== wireframe) {\n\t\t\t\t\tcurrentState.geometry = geometry.id;\n\t\t\t\t\tcurrentState.program = program.id;\n\t\t\t\t\tcurrentState.wireframe = wireframe;\n\t\t\t\t\tupdateBuffers = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (object.isInstancedMesh === true) {\n\t\t\t\tupdateBuffers = true;\n\t\t\t}\n\n\t\t\tif (index !== null) {\n\t\t\t\tattributes.update(index, 34963);\n\t\t\t}\n\n\t\t\tif (updateBuffers) {\n\t\t\t\tsetupVertexAttributes(object, material, program, geometry);\n\n\t\t\t\tif (index !== null) {\n\t\t\t\t\tgl.bindBuffer(34963, attributes.get(index).buffer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction createVertexArrayObject() {\n\t\t\tif (capabilities.isWebGL2) return gl.createVertexArray();\n\t\t\treturn extension.createVertexArrayOES();\n\t\t}\n\n\t\tfunction bindVertexArrayObject(vao) {\n\t\t\tif (capabilities.isWebGL2) return gl.bindVertexArray(vao);\n\t\t\treturn extension.bindVertexArrayOES(vao);\n\t\t}\n\n\t\tfunction deleteVertexArrayObject(vao) {\n\t\t\tif (capabilities.isWebGL2) return gl.deleteVertexArray(vao);\n\t\t\treturn extension.deleteVertexArrayOES(vao);\n\t\t}\n\n\t\tfunction getBindingState(geometry, program, material) {\n\t\t\tvar wireframe = material.wireframe === true;\n\t\t\tvar programMap = bindingStates[geometry.id];\n\n\t\t\tif (programMap === undefined) {\n\t\t\t\tprogramMap = {};\n\t\t\t\tbindingStates[geometry.id] = programMap;\n\t\t\t}\n\n\t\t\tvar stateMap = programMap[program.id];\n\n\t\t\tif (stateMap === undefined) {\n\t\t\t\tstateMap = {};\n\t\t\t\tprogramMap[program.id] = stateMap;\n\t\t\t}\n\n\t\t\tvar state = stateMap[wireframe];\n\n\t\t\tif (state === undefined) {\n\t\t\t\tstate = createBindingState(createVertexArrayObject());\n\t\t\t\tstateMap[wireframe] = state;\n\t\t\t}\n\n\t\t\treturn state;\n\t\t}\n\n\t\tfunction createBindingState(vao) {\n\t\t\tvar newAttributes = [];\n\t\t\tvar enabledAttributes = [];\n\t\t\tvar attributeDivisors = [];\n\n\t\t\tfor (var i = 0; i < maxVertexAttributes; i++) {\n\t\t\t\tnewAttributes[i] = 0;\n\t\t\t\tenabledAttributes[i] = 0;\n\t\t\t\tattributeDivisors[i] = 0;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t// for backward compatibility on non-VAO support browser\n\t\t\t\tgeometry: null,\n\t\t\t\tprogram: null,\n\t\t\t\twireframe: false,\n\t\t\t\tnewAttributes: newAttributes,\n\t\t\t\tenabledAttributes: enabledAttributes,\n\t\t\t\tattributeDivisors: attributeDivisors,\n\t\t\t\tobject: vao,\n\t\t\t\tattributes: {},\n\t\t\t\tindex: null\n\t\t\t};\n\t\t}\n\n\t\tfunction needsUpdate(geometry, index) {\n\t\t\tvar cachedAttributes = currentState.attributes;\n\t\t\tvar geometryAttributes = geometry.attributes;\n\t\t\tvar attributesNum = 0;\n\n\t\t\tfor (var key in geometryAttributes) {\n\t\t\t\tvar cachedAttribute = cachedAttributes[key];\n\t\t\t\tvar geometryAttribute = geometryAttributes[key];\n\t\t\t\tif (cachedAttribute === undefined) return true;\n\t\t\t\tif (cachedAttribute.attribute !== geometryAttribute) return true;\n\t\t\t\tif (cachedAttribute.data !== geometryAttribute.data) return true;\n\t\t\t\tattributesNum++;\n\t\t\t}\n\n\t\t\tif (currentState.attributesNum !== attributesNum) return true;\n\t\t\tif (currentState.index !== index) return true;\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction saveCache(geometry, index) {\n\t\t\tvar cache = {};\n\t\t\tvar attributes = geometry.attributes;\n\t\t\tvar attributesNum = 0;\n\n\t\t\tfor (var key in attributes) {\n\t\t\t\tvar attribute = attributes[key];\n\t\t\t\tvar data = {};\n\t\t\t\tdata.attribute = attribute;\n\n\t\t\t\tif (attribute.data) {\n\t\t\t\t\tdata.data = attribute.data;\n\t\t\t\t}\n\n\t\t\t\tcache[key] = data;\n\t\t\t\tattributesNum++;\n\t\t\t}\n\n\t\t\tcurrentState.attributes = cache;\n\t\t\tcurrentState.attributesNum = attributesNum;\n\t\t\tcurrentState.index = index;\n\t\t}\n\n\t\tfunction initAttributes() {\n\t\t\tvar newAttributes = currentState.newAttributes;\n\n\t\t\tfor (var i = 0, il = newAttributes.length; i < il; i++) {\n\t\t\t\tnewAttributes[i] = 0;\n\t\t\t}\n\t\t}\n\n\t\tfunction enableAttribute(attribute) {\n\t\t\tenableAttributeAndDivisor(attribute, 0);\n\t\t}\n\n\t\tfunction enableAttributeAndDivisor(attribute, meshPerAttribute) {\n\t\t\tvar newAttributes = currentState.newAttributes;\n\t\t\tvar enabledAttributes = currentState.enabledAttributes;\n\t\t\tvar attributeDivisors = currentState.attributeDivisors;\n\t\t\tnewAttributes[attribute] = 1;\n\n\t\t\tif (enabledAttributes[attribute] === 0) {\n\t\t\t\tgl.enableVertexAttribArray(attribute);\n\t\t\t\tenabledAttributes[attribute] = 1;\n\t\t\t}\n\n\t\t\tif (attributeDivisors[attribute] !== meshPerAttribute) {\n\t\t\t\tvar _extension = capabilities.isWebGL2 ? gl : extensions.get('ANGLE_instanced_arrays');\n\n\t\t\t\t_extension[capabilities.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE'](attribute, meshPerAttribute);\n\n\t\t\t\tattributeDivisors[attribute] = meshPerAttribute;\n\t\t\t}\n\t\t}\n\n\t\tfunction disableUnusedAttributes() {\n\t\t\tvar newAttributes = currentState.newAttributes;\n\t\t\tvar enabledAttributes = currentState.enabledAttributes;\n\n\t\t\tfor (var i = 0, il = enabledAttributes.length; i < il; i++) {\n\t\t\t\tif (enabledAttributes[i] !== newAttributes[i]) {\n\t\t\t\t\tgl.disableVertexAttribArray(i);\n\t\t\t\t\tenabledAttributes[i] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction vertexAttribPointer(index, size, type, normalized, stride, offset) {\n\t\t\tif (capabilities.isWebGL2 === true && (type === 5124 || type === 5125)) {\n\t\t\t\tgl.vertexAttribIPointer(index, size, type, stride, offset);\n\t\t\t} else {\n\t\t\t\tgl.vertexAttribPointer(index, size, type, normalized, stride, offset);\n\t\t\t}\n\t\t}\n\n\t\tfunction setupVertexAttributes(object, material, program, geometry) {\n\t\t\tif (capabilities.isWebGL2 === false && (object.isInstancedMesh || geometry.isInstancedBufferGeometry)) {\n\t\t\t\tif (extensions.get('ANGLE_instanced_arrays') === null) return;\n\t\t\t}\n\n\t\t\tinitAttributes();\n\t\t\tvar geometryAttributes = geometry.attributes;\n\t\t\tvar programAttributes = program.getAttributes();\n\t\t\tvar materialDefaultAttributeValues = material.defaultAttributeValues;\n\n\t\t\tfor (var name in programAttributes) {\n\t\t\t\tvar programAttribute = programAttributes[name];\n\n\t\t\t\tif (programAttribute >= 0) {\n\t\t\t\t\tvar geometryAttribute = geometryAttributes[name];\n\n\t\t\t\t\tif (geometryAttribute !== undefined) {\n\t\t\t\t\t\tvar normalized = geometryAttribute.normalized;\n\t\t\t\t\t\tvar size = geometryAttribute.itemSize;\n\t\t\t\t\t\tvar attribute = attributes.get(geometryAttribute); // TODO Attribute may not be available on context restore\n\n\t\t\t\t\t\tif (attribute === undefined) continue;\n\t\t\t\t\t\tvar buffer = attribute.buffer;\n\t\t\t\t\t\tvar type = attribute.type;\n\t\t\t\t\t\tvar bytesPerElement = attribute.bytesPerElement;\n\n\t\t\t\t\t\tif (geometryAttribute.isInterleavedBufferAttribute) {\n\t\t\t\t\t\t\tvar data = geometryAttribute.data;\n\t\t\t\t\t\t\tvar stride = data.stride;\n\t\t\t\t\t\t\tvar offset = geometryAttribute.offset;\n\n\t\t\t\t\t\t\tif (data && data.isInstancedInterleavedBuffer) {\n\t\t\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute, data.meshPerAttribute);\n\n\t\t\t\t\t\t\t\tif (geometry._maxInstanceCount === undefined) {\n\t\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = data.meshPerAttribute * data.count;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tenableAttribute(programAttribute);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgl.bindBuffer(34962, buffer);\n\t\t\t\t\t\t\tvertexAttribPointer(programAttribute, size, type, normalized, stride * bytesPerElement, offset * bytesPerElement);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (geometryAttribute.isInstancedBufferAttribute) {\n\t\t\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute, geometryAttribute.meshPerAttribute);\n\n\t\t\t\t\t\t\t\tif (geometry._maxInstanceCount === undefined) {\n\t\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tenableAttribute(programAttribute);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgl.bindBuffer(34962, buffer);\n\t\t\t\t\t\t\tvertexAttribPointer(programAttribute, size, type, normalized, 0, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (name === 'instanceMatrix') {\n\t\t\t\t\t\tvar _attribute = attributes.get(object.instanceMatrix); // TODO Attribute may not be available on context restore\n\n\n\t\t\t\t\t\tif (_attribute === undefined) continue;\n\t\t\t\t\t\tvar _buffer = _attribute.buffer;\n\t\t\t\t\t\tvar _type = _attribute.type;\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute + 0, 1);\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute + 1, 1);\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute + 2, 1);\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute + 3, 1);\n\t\t\t\t\t\tgl.bindBuffer(34962, _buffer);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute + 0, 4, _type, false, 64, 0);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute + 1, 4, _type, false, 64, 16);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute + 2, 4, _type, false, 64, 32);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute + 3, 4, _type, false, 64, 48);\n\t\t\t\t\t} else if (name === 'instanceColor') {\n\t\t\t\t\t\tvar _attribute2 = attributes.get(object.instanceColor); // TODO Attribute may not be available on context restore\n\n\n\t\t\t\t\t\tif (_attribute2 === undefined) continue;\n\t\t\t\t\t\tvar _buffer2 = _attribute2.buffer;\n\t\t\t\t\t\tvar _type2 = _attribute2.type;\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute, 1);\n\t\t\t\t\t\tgl.bindBuffer(34962, _buffer2);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute, 3, _type2, false, 12, 0);\n\t\t\t\t\t} else if (materialDefaultAttributeValues !== undefined) {\n\t\t\t\t\t\tvar value = materialDefaultAttributeValues[name];\n\n\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\tswitch (value.length) {\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tgl.vertexAttrib2fv(programAttribute, value);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\tgl.vertexAttrib3fv(programAttribute, value);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\tgl.vertexAttrib4fv(programAttribute, value);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tgl.vertexAttrib1fv(programAttribute, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdisableUnusedAttributes();\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\treset();\n\n\t\t\tfor (var geometryId in bindingStates) {\n\t\t\t\tvar programMap = bindingStates[geometryId];\n\n\t\t\t\tfor (var programId in programMap) {\n\t\t\t\t\tvar stateMap = programMap[programId];\n\n\t\t\t\t\tfor (var wireframe in stateMap) {\n\t\t\t\t\t\tdeleteVertexArrayObject(stateMap[wireframe].object);\n\t\t\t\t\t\tdelete stateMap[wireframe];\n\t\t\t\t\t}\n\n\t\t\t\t\tdelete programMap[programId];\n\t\t\t\t}\n\n\t\t\t\tdelete bindingStates[geometryId];\n\t\t\t}\n\t\t}\n\n\t\tfunction releaseStatesOfGeometry(geometry) {\n\t\t\tif (bindingStates[geometry.id] === undefined) return;\n\t\t\tvar programMap = bindingStates[geometry.id];\n\n\t\t\tfor (var programId in programMap) {\n\t\t\t\tvar stateMap = programMap[programId];\n\n\t\t\t\tfor (var wireframe in stateMap) {\n\t\t\t\t\tdeleteVertexArrayObject(stateMap[wireframe].object);\n\t\t\t\t\tdelete stateMap[wireframe];\n\t\t\t\t}\n\n\t\t\t\tdelete programMap[programId];\n\t\t\t}\n\n\t\t\tdelete bindingStates[geometry.id];\n\t\t}\n\n\t\tfunction releaseStatesOfProgram(program) {\n\t\t\tfor (var geometryId in bindingStates) {\n\t\t\t\tvar programMap = bindingStates[geometryId];\n\t\t\t\tif (programMap[program.id] === undefined) continue;\n\t\t\t\tvar stateMap = programMap[program.id];\n\n\t\t\t\tfor (var wireframe in stateMap) {\n\t\t\t\t\tdeleteVertexArrayObject(stateMap[wireframe].object);\n\t\t\t\t\tdelete stateMap[wireframe];\n\t\t\t\t}\n\n\t\t\t\tdelete programMap[program.id];\n\t\t\t}\n\t\t}\n\n\t\tfunction reset() {\n\t\t\tresetDefaultState();\n\t\t\tif (currentState === defaultState) return;\n\t\t\tcurrentState = defaultState;\n\t\t\tbindVertexArrayObject(currentState.object);\n\t\t} // for backward-compatilibity\n\n\n\t\tfunction resetDefaultState() {\n\t\t\tdefaultState.geometry = null;\n\t\t\tdefaultState.program = null;\n\t\t\tdefaultState.wireframe = false;\n\t\t}\n\n\t\treturn {\n\t\t\tsetup: setup,\n\t\t\treset: reset,\n\t\t\tresetDefaultState: resetDefaultState,\n\t\t\tdispose: dispose,\n\t\t\treleaseStatesOfGeometry: releaseStatesOfGeometry,\n\t\t\treleaseStatesOfProgram: releaseStatesOfProgram,\n\t\t\tinitAttributes: initAttributes,\n\t\t\tenableAttribute: enableAttribute,\n\t\t\tdisableUnusedAttributes: disableUnusedAttributes\n\t\t};\n\t}\n\n\tfunction WebGLBufferRenderer(gl, extensions, info, capabilities) {\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar mode;\n\n\t\tfunction setMode(value) {\n\t\t\tmode = value;\n\t\t}\n\n\t\tfunction render(start, count) {\n\t\t\tgl.drawArrays(mode, start, count);\n\t\t\tinfo.update(count, mode, 1);\n\t\t}\n\n\t\tfunction renderInstances(start, count, primcount) {\n\t\t\tif (primcount === 0) return;\n\t\t\tvar extension, methodName;\n\n\t\t\tif (isWebGL2) {\n\t\t\t\textension = gl;\n\t\t\t\tmethodName = 'drawArraysInstanced';\n\t\t\t} else {\n\t\t\t\textension = extensions.get('ANGLE_instanced_arrays');\n\t\t\t\tmethodName = 'drawArraysInstancedANGLE';\n\n\t\t\t\tif (extension === null) {\n\t\t\t\t\tconsole.error('THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\textension[methodName](mode, start, count, primcount);\n\t\t\tinfo.update(count, mode, primcount);\n\t\t} //\n\n\n\t\tthis.setMode = setMode;\n\t\tthis.render = render;\n\t\tthis.renderInstances = renderInstances;\n\t}\n\n\tfunction WebGLCapabilities(gl, extensions, parameters) {\n\t\tvar maxAnisotropy;\n\n\t\tfunction getMaxAnisotropy() {\n\t\t\tif (maxAnisotropy !== undefined) return maxAnisotropy;\n\t\t\tvar extension = extensions.get('EXT_texture_filter_anisotropic');\n\n\t\t\tif (extension !== null) {\n\t\t\t\tmaxAnisotropy = gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT);\n\t\t\t} else {\n\t\t\t\tmaxAnisotropy = 0;\n\t\t\t}\n\n\t\t\treturn maxAnisotropy;\n\t\t}\n\n\t\tfunction getMaxPrecision(precision) {\n\t\t\tif (precision === 'highp') {\n\t\t\t\tif (gl.getShaderPrecisionFormat(35633, 36338).precision > 0 && gl.getShaderPrecisionFormat(35632, 36338).precision > 0) {\n\t\t\t\t\treturn 'highp';\n\t\t\t\t}\n\n\t\t\t\tprecision = 'mediump';\n\t\t\t}\n\n\t\t\tif (precision === 'mediump') {\n\t\t\t\tif (gl.getShaderPrecisionFormat(35633, 36337).precision > 0 && gl.getShaderPrecisionFormat(35632, 36337).precision > 0) {\n\t\t\t\t\treturn 'mediump';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn 'lowp';\n\t\t}\n\t\t/* eslint-disable no-undef */\n\n\n\t\tvar isWebGL2 = typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext || typeof WebGL2ComputeRenderingContext !== 'undefined' && gl instanceof WebGL2ComputeRenderingContext;\n\t\t/* eslint-enable no-undef */\n\n\t\tvar precision = parameters.precision !== undefined ? parameters.precision : 'highp';\n\t\tvar maxPrecision = getMaxPrecision(precision);\n\n\t\tif (maxPrecision !== precision) {\n\t\t\tconsole.warn('THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.');\n\t\t\tprecision = maxPrecision;\n\t\t}\n\n\t\tvar logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true;\n\t\tvar maxTextures = gl.getParameter(34930);\n\t\tvar maxVertexTextures = gl.getParameter(35660);\n\t\tvar maxTextureSize = gl.getParameter(3379);\n\t\tvar maxCubemapSize = gl.getParameter(34076);\n\t\tvar maxAttributes = gl.getParameter(34921);\n\t\tvar maxVertexUniforms = gl.getParameter(36347);\n\t\tvar maxVaryings = gl.getParameter(36348);\n\t\tvar maxFragmentUniforms = gl.getParameter(36349);\n\t\tvar vertexTextures = maxVertexTextures > 0;\n\t\tvar floatFragmentTextures = isWebGL2 || !!extensions.get('OES_texture_float');\n\t\tvar floatVertexTextures = vertexTextures && floatFragmentTextures;\n\t\tvar maxSamples = isWebGL2 ? gl.getParameter(36183) : 0;\n\t\treturn {\n\t\t\tisWebGL2: isWebGL2,\n\t\t\tgetMaxAnisotropy: getMaxAnisotropy,\n\t\t\tgetMaxPrecision: getMaxPrecision,\n\t\t\tprecision: precision,\n\t\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\t\t\tmaxTextures: maxTextures,\n\t\t\tmaxVertexTextures: maxVertexTextures,\n\t\t\tmaxTextureSize: maxTextureSize,\n\t\t\tmaxCubemapSize: maxCubemapSize,\n\t\t\tmaxAttributes: maxAttributes,\n\t\t\tmaxVertexUniforms: maxVertexUniforms,\n\t\t\tmaxVaryings: maxVaryings,\n\t\t\tmaxFragmentUniforms: maxFragmentUniforms,\n\t\t\tvertexTextures: vertexTextures,\n\t\t\tfloatFragmentTextures: floatFragmentTextures,\n\t\t\tfloatVertexTextures: floatVertexTextures,\n\t\t\tmaxSamples: maxSamples\n\t\t};\n\t}\n\n\tfunction WebGLClipping(properties) {\n\t\tvar scope = this;\n\t\tvar globalState = null,\n\t\t\t\tnumGlobalPlanes = 0,\n\t\t\t\tlocalClippingEnabled = false,\n\t\t\t\trenderingShadows = false;\n\t\tvar plane = new Plane(),\n\t\t\t\tviewNormalMatrix = new Matrix3(),\n\t\t\t\tuniform = {\n\t\t\tvalue: null,\n\t\t\tneedsUpdate: false\n\t\t};\n\t\tthis.uniform = uniform;\n\t\tthis.numPlanes = 0;\n\t\tthis.numIntersection = 0;\n\n\t\tthis.init = function (planes, enableLocalClipping, camera) {\n\t\t\tvar enabled = planes.length !== 0 || enableLocalClipping || // enable state of previous frame - the clipping code has to\n\t\t\t// run another frame in order to reset the state:\n\t\t\tnumGlobalPlanes !== 0 || localClippingEnabled;\n\t\t\tlocalClippingEnabled = enableLocalClipping;\n\t\t\tglobalState = projectPlanes(planes, camera, 0);\n\t\t\tnumGlobalPlanes = planes.length;\n\t\t\treturn enabled;\n\t\t};\n\n\t\tthis.beginShadows = function () {\n\t\t\trenderingShadows = true;\n\t\t\tprojectPlanes(null);\n\t\t};\n\n\t\tthis.endShadows = function () {\n\t\t\trenderingShadows = false;\n\t\t\tresetGlobalState();\n\t\t};\n\n\t\tthis.setState = function (material, camera, useCache) {\n\t\t\tvar planes = material.clippingPlanes,\n\t\t\t\t\tclipIntersection = material.clipIntersection,\n\t\t\t\t\tclipShadows = material.clipShadows;\n\t\t\tvar materialProperties = properties.get(material);\n\n\t\t\tif (!localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && !clipShadows) {\n\t\t\t\t// there's no local clipping\n\t\t\t\tif (renderingShadows) {\n\t\t\t\t\t// there's no global clipping\n\t\t\t\t\tprojectPlanes(null);\n\t\t\t\t} else {\n\t\t\t\t\tresetGlobalState();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar nGlobal = renderingShadows ? 0 : numGlobalPlanes,\n\t\t\t\t\t\tlGlobal = nGlobal * 4;\n\t\t\t\tvar dstArray = materialProperties.clippingState || null;\n\t\t\t\tuniform.value = dstArray; // ensure unique state\n\n\t\t\t\tdstArray = projectPlanes(planes, camera, lGlobal, useCache);\n\n\t\t\t\tfor (var i = 0; i !== lGlobal; ++i) {\n\t\t\t\t\tdstArray[i] = globalState[i];\n\t\t\t\t}\n\n\t\t\t\tmaterialProperties.clippingState = dstArray;\n\t\t\t\tthis.numIntersection = clipIntersection ? this.numPlanes : 0;\n\t\t\t\tthis.numPlanes += nGlobal;\n\t\t\t}\n\t\t};\n\n\t\tfunction resetGlobalState() {\n\t\t\tif (uniform.value !== globalState) {\n\t\t\t\tuniform.value = globalState;\n\t\t\t\tuniform.needsUpdate = numGlobalPlanes > 0;\n\t\t\t}\n\n\t\t\tscope.numPlanes = numGlobalPlanes;\n\t\t\tscope.numIntersection = 0;\n\t\t}\n\n\t\tfunction projectPlanes(planes, camera, dstOffset, skipTransform) {\n\t\t\tvar nPlanes = planes !== null ? planes.length : 0;\n\t\t\tvar dstArray = null;\n\n\t\t\tif (nPlanes !== 0) {\n\t\t\t\tdstArray = uniform.value;\n\n\t\t\t\tif (skipTransform !== true || dstArray === null) {\n\t\t\t\t\tvar flatSize = dstOffset + nPlanes * 4,\n\t\t\t\t\t\t\tviewMatrix = camera.matrixWorldInverse;\n\t\t\t\t\tviewNormalMatrix.getNormalMatrix(viewMatrix);\n\n\t\t\t\t\tif (dstArray === null || dstArray.length < flatSize) {\n\t\t\t\t\t\tdstArray = new Float32Array(flatSize);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (var i = 0, i4 = dstOffset; i !== nPlanes; ++i, i4 += 4) {\n\t\t\t\t\t\tplane.copy(planes[i]).applyMatrix4(viewMatrix, viewNormalMatrix);\n\t\t\t\t\t\tplane.normal.toArray(dstArray, i4);\n\t\t\t\t\t\tdstArray[i4 + 3] = plane.constant;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tuniform.value = dstArray;\n\t\t\t\tuniform.needsUpdate = true;\n\t\t\t}\n\n\t\t\tscope.numPlanes = nPlanes;\n\t\t\tscope.numIntersection = 0;\n\t\t\treturn dstArray;\n\t\t}\n\t}\n\n\tfunction WebGLCubeMaps(renderer) {\n\t\tvar cubemaps = new WeakMap();\n\n\t\tfunction mapTextureMapping(texture, mapping) {\n\t\t\tif (mapping === EquirectangularReflectionMapping) {\n\t\t\t\ttexture.mapping = CubeReflectionMapping;\n\t\t\t} else if (mapping === EquirectangularRefractionMapping) {\n\t\t\t\ttexture.mapping = CubeRefractionMapping;\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\n\t\tfunction get(texture) {\n\t\t\tif (texture && texture.isTexture) {\n\t\t\t\tvar mapping = texture.mapping;\n\n\t\t\t\tif (mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping) {\n\t\t\t\t\tif (cubemaps.has(texture)) {\n\t\t\t\t\t\tvar cubemap = cubemaps.get(texture).texture;\n\t\t\t\t\t\treturn mapTextureMapping(cubemap, texture.mapping);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar image = texture.image;\n\n\t\t\t\t\t\tif (image && image.height > 0) {\n\t\t\t\t\t\t\tvar currentRenderList = renderer.getRenderList();\n\t\t\t\t\t\t\tvar currentRenderTarget = renderer.getRenderTarget();\n\t\t\t\t\t\t\tvar renderTarget = new WebGLCubeRenderTarget(image.height / 2);\n\t\t\t\t\t\t\trenderTarget.fromEquirectangularTexture(renderer, texture);\n\t\t\t\t\t\t\tcubemaps.set(texture, renderTarget);\n\t\t\t\t\t\t\trenderer.setRenderTarget(currentRenderTarget);\n\t\t\t\t\t\t\trenderer.setRenderList(currentRenderList);\n\t\t\t\t\t\t\ttexture.addEventListener('dispose', onTextureDispose);\n\t\t\t\t\t\t\treturn mapTextureMapping(renderTarget.texture, texture.mapping);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// image not yet ready. try the conversion next frame\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\n\t\tfunction onTextureDispose(event) {\n\t\t\tvar texture = event.target;\n\t\t\ttexture.removeEventListener('dispose', onTextureDispose);\n\t\t\tvar cubemap = cubemaps.get(texture);\n\n\t\t\tif (cubemap !== undefined) {\n\t\t\t\tcubemaps.delete(texture);\n\t\t\t\tcubemap.dispose();\n\t\t\t}\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\tcubemaps = new WeakMap();\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\tfunction WebGLExtensions(gl) {\n\t\tvar extensions = {};\n\n\t\tfunction getExtension(name) {\n\t\t\tif (extensions[name] !== undefined) {\n\t\t\t\treturn extensions[name];\n\t\t\t}\n\n\t\t\tvar extension;\n\n\t\t\tswitch (name) {\n\t\t\t\tcase 'WEBGL_depth_texture':\n\t\t\t\t\textension = gl.getExtension('WEBGL_depth_texture') || gl.getExtension('MOZ_WEBGL_depth_texture') || gl.getExtension('WEBKIT_WEBGL_depth_texture');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'EXT_texture_filter_anisotropic':\n\t\t\t\t\textension = gl.getExtension('EXT_texture_filter_anisotropic') || gl.getExtension('MOZ_EXT_texture_filter_anisotropic') || gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'WEBGL_compressed_texture_s3tc':\n\t\t\t\t\textension = gl.getExtension('WEBGL_compressed_texture_s3tc') || gl.getExtension('MOZ_WEBGL_compressed_texture_s3tc') || gl.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'WEBGL_compressed_texture_pvrtc':\n\t\t\t\t\textension = gl.getExtension('WEBGL_compressed_texture_pvrtc') || gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc');\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\textension = gl.getExtension(name);\n\t\t\t}\n\n\t\t\textensions[name] = extension;\n\t\t\treturn extension;\n\t\t}\n\n\t\treturn {\n\t\t\thas: function has(name) {\n\t\t\t\treturn getExtension(name) !== null;\n\t\t\t},\n\t\t\tinit: function init(capabilities) {\n\t\t\t\tif (capabilities.isWebGL2) {\n\t\t\t\t\tgetExtension('EXT_color_buffer_float');\n\t\t\t\t} else {\n\t\t\t\t\tgetExtension('WEBGL_depth_texture');\n\t\t\t\t\tgetExtension('OES_texture_float');\n\t\t\t\t\tgetExtension('OES_texture_half_float');\n\t\t\t\t\tgetExtension('OES_texture_half_float_linear');\n\t\t\t\t\tgetExtension('OES_standard_derivatives');\n\t\t\t\t\tgetExtension('OES_element_index_uint');\n\t\t\t\t\tgetExtension('OES_vertex_array_object');\n\t\t\t\t\tgetExtension('ANGLE_instanced_arrays');\n\t\t\t\t}\n\n\t\t\t\tgetExtension('OES_texture_float_linear');\n\t\t\t\tgetExtension('EXT_color_buffer_half_float');\n\t\t\t},\n\t\t\tget: function get(name) {\n\t\t\t\tvar extension = getExtension(name);\n\n\t\t\t\tif (extension === null) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: ' + name + ' extension not supported.');\n\t\t\t\t}\n\n\t\t\t\treturn extension;\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction WebGLGeometries(gl, attributes, info, bindingStates) {\n\t\tvar geometries = {};\n\t\tvar wireframeAttributes = new WeakMap();\n\n\t\tfunction onGeometryDispose(event) {\n\t\t\tvar geometry = event.target;\n\n\t\t\tif (geometry.index !== null) {\n\t\t\t\tattributes.remove(geometry.index);\n\t\t\t}\n\n\t\t\tfor (var name in geometry.attributes) {\n\t\t\t\tattributes.remove(geometry.attributes[name]);\n\t\t\t}\n\n\t\t\tgeometry.removeEventListener('dispose', onGeometryDispose);\n\t\t\tdelete geometries[geometry.id];\n\t\t\tvar attribute = wireframeAttributes.get(geometry);\n\n\t\t\tif (attribute) {\n\t\t\t\tattributes.remove(attribute);\n\t\t\t\twireframeAttributes.delete(geometry);\n\t\t\t}\n\n\t\t\tbindingStates.releaseStatesOfGeometry(geometry);\n\n\t\t\tif (geometry.isInstancedBufferGeometry === true) {\n\t\t\t\tdelete geometry._maxInstanceCount;\n\t\t\t} //\n\n\n\t\t\tinfo.memory.geometries--;\n\t\t}\n\n\t\tfunction get(object, geometry) {\n\t\t\tif (geometries[geometry.id] === true) return geometry;\n\t\t\tgeometry.addEventListener('dispose', onGeometryDispose);\n\t\t\tgeometries[geometry.id] = true;\n\t\t\tinfo.memory.geometries++;\n\t\t\treturn geometry;\n\t\t}\n\n\t\tfunction update(geometry) {\n\t\t\tvar geometryAttributes = geometry.attributes; // Updating index buffer in VAO now. See WebGLBindingStates.\n\n\t\t\tfor (var name in geometryAttributes) {\n\t\t\t\tattributes.update(geometryAttributes[name], 34962);\n\t\t\t} // morph targets\n\n\n\t\t\tvar morphAttributes = geometry.morphAttributes;\n\n\t\t\tfor (var _name in morphAttributes) {\n\t\t\t\tvar array = morphAttributes[_name];\n\n\t\t\t\tfor (var i = 0, l = array.length; i < l; i++) {\n\t\t\t\t\tattributes.update(array[i], 34962);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction updateWireframeAttribute(geometry) {\n\t\t\tvar indices = [];\n\t\t\tvar geometryIndex = geometry.index;\n\t\t\tvar geometryPosition = geometry.attributes.position;\n\t\t\tvar version = 0;\n\n\t\t\tif (geometryIndex !== null) {\n\t\t\t\tvar array = geometryIndex.array;\n\t\t\t\tversion = geometryIndex.version;\n\n\t\t\t\tfor (var i = 0, l = array.length; i < l; i += 3) {\n\t\t\t\t\tvar a = array[i + 0];\n\t\t\t\t\tvar b = array[i + 1];\n\t\t\t\t\tvar c = array[i + 2];\n\t\t\t\t\tindices.push(a, b, b, c, c, a);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar _array = geometryPosition.array;\n\t\t\t\tversion = geometryPosition.version;\n\n\t\t\t\tfor (var _i = 0, _l = _array.length / 3 - 1; _i < _l; _i += 3) {\n\t\t\t\t\tvar _a = _i + 0;\n\n\t\t\t\t\tvar _b = _i + 1;\n\n\t\t\t\t\tvar _c = _i + 2;\n\n\t\t\t\t\tindices.push(_a, _b, _b, _c, _c, _a);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar attribute = new (arrayMax(indices) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute)(indices, 1);\n\t\t\tattribute.version = version; // Updating index buffer in VAO now. See WebGLBindingStates\n\t\t\t//\n\n\t\t\tvar previousAttribute = wireframeAttributes.get(geometry);\n\t\t\tif (previousAttribute) attributes.remove(previousAttribute); //\n\n\t\t\twireframeAttributes.set(geometry, attribute);\n\t\t}\n\n\t\tfunction getWireframeAttribute(geometry) {\n\t\t\tvar currentAttribute = wireframeAttributes.get(geometry);\n\n\t\t\tif (currentAttribute) {\n\t\t\t\tvar geometryIndex = geometry.index;\n\n\t\t\t\tif (geometryIndex !== null) {\n\t\t\t\t\t// if the attribute is obsolete, create a new one\n\t\t\t\t\tif (currentAttribute.version < geometryIndex.version) {\n\t\t\t\t\t\tupdateWireframeAttribute(geometry);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tupdateWireframeAttribute(geometry);\n\t\t\t}\n\n\t\t\treturn wireframeAttributes.get(geometry);\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tupdate: update,\n\t\t\tgetWireframeAttribute: getWireframeAttribute\n\t\t};\n\t}\n\n\tfunction WebGLIndexedBufferRenderer(gl, extensions, info, capabilities) {\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar mode;\n\n\t\tfunction setMode(value) {\n\t\t\tmode = value;\n\t\t}\n\n\t\tvar type, bytesPerElement;\n\n\t\tfunction setIndex(value) {\n\t\t\ttype = value.type;\n\t\t\tbytesPerElement = value.bytesPerElement;\n\t\t}\n\n\t\tfunction render(start, count) {\n\t\t\tgl.drawElements(mode, count, type, start * bytesPerElement);\n\t\t\tinfo.update(count, mode, 1);\n\t\t}\n\n\t\tfunction renderInstances(start, count, primcount) {\n\t\t\tif (primcount === 0) return;\n\t\t\tvar extension, methodName;\n\n\t\t\tif (isWebGL2) {\n\t\t\t\textension = gl;\n\t\t\t\tmethodName = 'drawElementsInstanced';\n\t\t\t} else {\n\t\t\t\textension = extensions.get('ANGLE_instanced_arrays');\n\t\t\t\tmethodName = 'drawElementsInstancedANGLE';\n\n\t\t\t\tif (extension === null) {\n\t\t\t\t\tconsole.error('THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\textension[methodName](mode, count, type, start * bytesPerElement, primcount);\n\t\t\tinfo.update(count, mode, primcount);\n\t\t} //\n\n\n\t\tthis.setMode = setMode;\n\t\tthis.setIndex = setIndex;\n\t\tthis.render = render;\n\t\tthis.renderInstances = renderInstances;\n\t}\n\n\tfunction WebGLInfo(gl) {\n\t\tvar memory = {\n\t\t\tgeometries: 0,\n\t\t\ttextures: 0\n\t\t};\n\t\tvar render = {\n\t\t\tframe: 0,\n\t\t\tcalls: 0,\n\t\t\ttriangles: 0,\n\t\t\tpoints: 0,\n\t\t\tlines: 0\n\t\t};\n\n\t\tfunction update(count, mode, instanceCount) {\n\t\t\trender.calls++;\n\n\t\t\tswitch (mode) {\n\t\t\t\tcase 4:\n\t\t\t\t\trender.triangles += instanceCount * (count / 3);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\trender.lines += instanceCount * (count / 2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\trender.lines += instanceCount * (count - 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\trender.lines += instanceCount * count;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 0:\n\t\t\t\t\trender.points += instanceCount * count;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.error('THREE.WebGLInfo: Unknown draw mode:', mode);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tfunction reset() {\n\t\t\trender.frame++;\n\t\t\trender.calls = 0;\n\t\t\trender.triangles = 0;\n\t\t\trender.points = 0;\n\t\t\trender.lines = 0;\n\t\t}\n\n\t\treturn {\n\t\t\tmemory: memory,\n\t\t\trender: render,\n\t\t\tprograms: null,\n\t\t\tautoReset: true,\n\t\t\treset: reset,\n\t\t\tupdate: update\n\t\t};\n\t}\n\n\tfunction numericalSort(a, b) {\n\t\treturn a[0] - b[0];\n\t}\n\n\tfunction absNumericalSort(a, b) {\n\t\treturn Math.abs(b[1]) - Math.abs(a[1]);\n\t}\n\n\tfunction WebGLMorphtargets(gl) {\n\t\tvar influencesList = {};\n\t\tvar morphInfluences = new Float32Array(8);\n\t\tvar workInfluences = [];\n\n\t\tfor (var i = 0; i < 8; i++) {\n\t\t\tworkInfluences[i] = [i, 0];\n\t\t}\n\n\t\tfunction update(object, geometry, material, program) {\n\t\t\tvar objectInfluences = object.morphTargetInfluences; // When object doesn't have morph target influences defined, we treat it as a 0-length array\n\t\t\t// This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences\n\n\t\t\tvar length = objectInfluences === undefined ? 0 : objectInfluences.length;\n\t\t\tvar influences = influencesList[geometry.id];\n\n\t\t\tif (influences === undefined) {\n\t\t\t\t// initialise list\n\t\t\t\tinfluences = [];\n\n\t\t\t\tfor (var _i = 0; _i < length; _i++) {\n\t\t\t\t\tinfluences[_i] = [_i, 0];\n\t\t\t\t}\n\n\t\t\t\tinfluencesList[geometry.id] = influences;\n\t\t\t} // Collect influences\n\n\n\t\t\tfor (var _i2 = 0; _i2 < length; _i2++) {\n\t\t\t\tvar influence = influences[_i2];\n\t\t\t\tinfluence[0] = _i2;\n\t\t\t\tinfluence[1] = objectInfluences[_i2];\n\t\t\t}\n\n\t\t\tinfluences.sort(absNumericalSort);\n\n\t\t\tfor (var _i3 = 0; _i3 < 8; _i3++) {\n\t\t\t\tif (_i3 < length && influences[_i3][1]) {\n\t\t\t\t\tworkInfluences[_i3][0] = influences[_i3][0];\n\t\t\t\t\tworkInfluences[_i3][1] = influences[_i3][1];\n\t\t\t\t} else {\n\t\t\t\t\tworkInfluences[_i3][0] = Number.MAX_SAFE_INTEGER;\n\t\t\t\t\tworkInfluences[_i3][1] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tworkInfluences.sort(numericalSort);\n\t\t\tvar morphTargets = material.morphTargets && geometry.morphAttributes.position;\n\t\t\tvar morphNormals = material.morphNormals && geometry.morphAttributes.normal;\n\t\t\tvar morphInfluencesSum = 0;\n\n\t\t\tfor (var _i4 = 0; _i4 < 8; _i4++) {\n\t\t\t\tvar _influence = workInfluences[_i4];\n\t\t\t\tvar index = _influence[0];\n\t\t\t\tvar value = _influence[1];\n\n\t\t\t\tif (index !== Number.MAX_SAFE_INTEGER && value) {\n\t\t\t\t\tif (morphTargets && geometry.getAttribute('morphTarget' + _i4) !== morphTargets[index]) {\n\t\t\t\t\t\tgeometry.setAttribute('morphTarget' + _i4, morphTargets[index]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (morphNormals && geometry.getAttribute('morphNormal' + _i4) !== morphNormals[index]) {\n\t\t\t\t\t\tgeometry.setAttribute('morphNormal' + _i4, morphNormals[index]);\n\t\t\t\t\t}\n\n\t\t\t\t\tmorphInfluences[_i4] = value;\n\t\t\t\t\tmorphInfluencesSum += value;\n\t\t\t\t} else {\n\t\t\t\t\tif (morphTargets && geometry.hasAttribute('morphTarget' + _i4) === true) {\n\t\t\t\t\t\tgeometry.deleteAttribute('morphTarget' + _i4);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (morphNormals && geometry.hasAttribute('morphNormal' + _i4) === true) {\n\t\t\t\t\t\tgeometry.deleteAttribute('morphNormal' + _i4);\n\t\t\t\t\t}\n\n\t\t\t\t\tmorphInfluences[_i4] = 0;\n\t\t\t\t}\n\t\t\t} // GLSL shader uses formula baseinfluence * base + sum(target * influence)\n\t\t\t// This allows us to switch between absolute morphs and relative morphs without changing shader code\n\t\t\t// When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence)\n\n\n\t\t\tvar morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n\t\t\tprogram.getUniforms().setValue(gl, 'morphTargetBaseInfluence', morphBaseInfluence);\n\t\t\tprogram.getUniforms().setValue(gl, 'morphTargetInfluences', morphInfluences);\n\t\t}\n\n\t\treturn {\n\t\t\tupdate: update\n\t\t};\n\t}\n\n\tfunction WebGLObjects(gl, geometries, attributes, info) {\n\t\tvar updateMap = new WeakMap();\n\n\t\tfunction update(object) {\n\t\t\tvar frame = info.render.frame;\n\t\t\tvar geometry = object.geometry;\n\t\t\tvar buffergeometry = geometries.get(object, geometry); // Update once per frame\n\n\t\t\tif (updateMap.get(buffergeometry) !== frame) {\n\t\t\t\tgeometries.update(buffergeometry);\n\t\t\t\tupdateMap.set(buffergeometry, frame);\n\t\t\t}\n\n\t\t\tif (object.isInstancedMesh) {\n\t\t\t\tif (object.hasEventListener('dispose', onInstancedMeshDispose) === false) {\n\t\t\t\t\tobject.addEventListener('dispose', onInstancedMeshDispose);\n\t\t\t\t}\n\n\t\t\t\tattributes.update(object.instanceMatrix, 34962);\n\n\t\t\t\tif (object.instanceColor !== null) {\n\t\t\t\t\tattributes.update(object.instanceColor, 34962);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn buffergeometry;\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\tupdateMap = new WeakMap();\n\t\t}\n\n\t\tfunction onInstancedMeshDispose(event) {\n\t\t\tvar instancedMesh = event.target;\n\t\t\tinstancedMesh.removeEventListener('dispose', onInstancedMeshDispose);\n\t\t\tattributes.remove(instancedMesh.instanceMatrix);\n\t\t\tif (instancedMesh.instanceColor !== null) attributes.remove(instancedMesh.instanceColor);\n\t\t}\n\n\t\treturn {\n\t\t\tupdate: update,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\tfunction DataTexture2DArray(data, width, height, depth) {\n\t\tif (data === void 0) {\n\t\t\tdata = null;\n\t\t}\n\n\t\tif (width === void 0) {\n\t\t\twidth = 1;\n\t\t}\n\n\t\tif (height === void 0) {\n\t\t\theight = 1;\n\t\t}\n\n\t\tif (depth === void 0) {\n\t\t\tdepth = 1;\n\t\t}\n\n\t\tTexture.call(this, null);\n\t\tthis.image = {\n\t\t\tdata: data,\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tdepth: depth\n\t\t};\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.needsUpdate = true;\n\t}\n\n\tDataTexture2DArray.prototype = Object.create(Texture.prototype);\n\tDataTexture2DArray.prototype.constructor = DataTexture2DArray;\n\tDataTexture2DArray.prototype.isDataTexture2DArray = true;\n\n\tfunction DataTexture3D(data, width, height, depth) {\n\t\tif (data === void 0) {\n\t\t\tdata = null;\n\t\t}\n\n\t\tif (width === void 0) {\n\t\t\twidth = 1;\n\t\t}\n\n\t\tif (height === void 0) {\n\t\t\theight = 1;\n\t\t}\n\n\t\tif (depth === void 0) {\n\t\t\tdepth = 1;\n\t\t}\n\n\t\t// We're going to add .setXXX() methods for setting properties later.\n\t\t// Users can still set in DataTexture3D directly.\n\t\t//\n\t\t//\tconst texture = new THREE.DataTexture3D( data, width, height, depth );\n\t\t// \ttexture.anisotropy = 16;\n\t\t//\n\t\t// See #14839\n\t\tTexture.call(this, null);\n\t\tthis.image = {\n\t\t\tdata: data,\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tdepth: depth\n\t\t};\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.needsUpdate = true;\n\t}\n\n\tDataTexture3D.prototype = Object.create(Texture.prototype);\n\tDataTexture3D.prototype.constructor = DataTexture3D;\n\tDataTexture3D.prototype.isDataTexture3D = true;\n\n\t/**\n\t * Uniforms of a program.\n\t * Those form a tree structure with a special top-level container for the root,\n\t * which you get by calling 'new WebGLUniforms( gl, program )'.\n\t *\n\t *\n\t * Properties of inner nodes including the top-level container:\n\t *\n\t * .seq - array of nested uniforms\n\t * .map - nested uniforms by name\n\t *\n\t *\n\t * Methods of all nodes except the top-level container:\n\t *\n\t * .setValue( gl, value, [textures] )\n\t *\n\t * \t\tuploads a uniform value(s)\n\t *\t\tthe 'textures' parameter is needed for sampler uniforms\n\t *\n\t *\n\t * Static methods of the top-level container (textures factorizations):\n\t *\n\t * .upload( gl, seq, values, textures )\n\t *\n\t * \t\tsets uniforms in 'seq' to 'values[id].value'\n\t *\n\t * .seqWithValue( seq, values ) : filteredSeq\n\t *\n\t * \t\tfilters 'seq' entries with corresponding entry in values\n\t *\n\t *\n\t * Methods of the top-level container (textures factorizations):\n\t *\n\t * .setValue( gl, name, value, textures )\n\t *\n\t * \t\tsets uniform with\tname 'name' to 'value'\n\t *\n\t * .setOptional( gl, obj, prop )\n\t *\n\t * \t\tlike .set for an optional property of the object\n\t *\n\t */\n\tvar emptyTexture = new Texture();\n\tvar emptyTexture2dArray = new DataTexture2DArray();\n\tvar emptyTexture3d = new DataTexture3D();\n\tvar emptyCubeTexture = new CubeTexture(); // --- Utilities ---\n\t// Array Caches (provide typed arrays for temporary by size)\n\n\tvar arrayCacheF32 = [];\n\tvar arrayCacheI32 = []; // Float32Array caches used for uploading Matrix uniforms\n\n\tvar mat4array = new Float32Array(16);\n\tvar mat3array = new Float32Array(9);\n\tvar mat2array = new Float32Array(4); // Flattening for arrays of vectors and matrices\n\n\tfunction flatten(array, nBlocks, blockSize) {\n\t\tvar firstElem = array[0];\n\t\tif (firstElem <= 0 || firstElem > 0) return array; // unoptimized: ! isNaN( firstElem )\n\t\t// see http://jacksondunstan.com/articles/983\n\n\t\tvar n = nBlocks * blockSize;\n\t\tvar r = arrayCacheF32[n];\n\n\t\tif (r === undefined) {\n\t\t\tr = new Float32Array(n);\n\t\t\tarrayCacheF32[n] = r;\n\t\t}\n\n\t\tif (nBlocks !== 0) {\n\t\t\tfirstElem.toArray(r, 0);\n\n\t\t\tfor (var i = 1, offset = 0; i !== nBlocks; ++i) {\n\t\t\t\toffset += blockSize;\n\t\t\t\tarray[i].toArray(r, offset);\n\t\t\t}\n\t\t}\n\n\t\treturn r;\n\t}\n\n\tfunction arraysEqual(a, b) {\n\t\tif (a.length !== b.length) return false;\n\n\t\tfor (var i = 0, l = a.length; i < l; i++) {\n\t\t\tif (a[i] !== b[i]) return false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction copyArray(a, b) {\n\t\tfor (var i = 0, l = b.length; i < l; i++) {\n\t\t\ta[i] = b[i];\n\t\t}\n\t} // Texture unit allocation\n\n\n\tfunction allocTexUnits(textures, n) {\n\t\tvar r = arrayCacheI32[n];\n\n\t\tif (r === undefined) {\n\t\t\tr = new Int32Array(n);\n\t\t\tarrayCacheI32[n] = r;\n\t\t}\n\n\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\tr[i] = textures.allocateTextureUnit();\n\t\t}\n\n\t\treturn r;\n\t} // --- Setters ---\n\t// Note: Defining these methods externally, because they come in a bunch\n\t// and this way their names minify.\n\t// Single scalar\n\n\n\tfunction setValueV1f(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (cache[0] === v) return;\n\t\tgl.uniform1f(this.addr, v);\n\t\tcache[0] = v;\n\t} // Single float vector (from flat array or THREE.VectorN)\n\n\n\tfunction setValueV2f(gl, v) {\n\t\tvar cache = this.cache;\n\n\t\tif (v.x !== undefined) {\n\t\t\tif (cache[0] !== v.x || cache[1] !== v.y) {\n\t\t\t\tgl.uniform2f(this.addr, v.x, v.y);\n\t\t\t\tcache[0] = v.x;\n\t\t\t\tcache[1] = v.y;\n\t\t\t}\n\t\t} else {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniform2fv(this.addr, v);\n\t\t\tcopyArray(cache, v);\n\t\t}\n\t}\n\n\tfunction setValueV3f(gl, v) {\n\t\tvar cache = this.cache;\n\n\t\tif (v.x !== undefined) {\n\t\t\tif (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) {\n\t\t\t\tgl.uniform3f(this.addr, v.x, v.y, v.z);\n\t\t\t\tcache[0] = v.x;\n\t\t\t\tcache[1] = v.y;\n\t\t\t\tcache[2] = v.z;\n\t\t\t}\n\t\t} else if (v.r !== undefined) {\n\t\t\tif (cache[0] !== v.r || cache[1] !== v.g || cache[2] !== v.b) {\n\t\t\t\tgl.uniform3f(this.addr, v.r, v.g, v.b);\n\t\t\t\tcache[0] = v.r;\n\t\t\t\tcache[1] = v.g;\n\t\t\t\tcache[2] = v.b;\n\t\t\t}\n\t\t} else {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniform3fv(this.addr, v);\n\t\t\tcopyArray(cache, v);\n\t\t}\n\t}\n\n\tfunction setValueV4f(gl, v) {\n\t\tvar cache = this.cache;\n\n\t\tif (v.x !== undefined) {\n\t\t\tif (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) {\n\t\t\t\tgl.uniform4f(this.addr, v.x, v.y, v.z, v.w);\n\t\t\t\tcache[0] = v.x;\n\t\t\t\tcache[1] = v.y;\n\t\t\t\tcache[2] = v.z;\n\t\t\t\tcache[3] = v.w;\n\t\t\t}\n\t\t} else {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniform4fv(this.addr, v);\n\t\t\tcopyArray(cache, v);\n\t\t}\n\t} // Single matrix (from flat array or MatrixN)\n\n\n\tfunction setValueM2(gl, v) {\n\t\tvar cache = this.cache;\n\t\tvar elements = v.elements;\n\n\t\tif (elements === undefined) {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniformMatrix2fv(this.addr, false, v);\n\t\t\tcopyArray(cache, v);\n\t\t} else {\n\t\t\tif (arraysEqual(cache, elements)) return;\n\t\t\tmat2array.set(elements);\n\t\t\tgl.uniformMatrix2fv(this.addr, false, mat2array);\n\t\t\tcopyArray(cache, elements);\n\t\t}\n\t}\n\n\tfunction setValueM3(gl, v) {\n\t\tvar cache = this.cache;\n\t\tvar elements = v.elements;\n\n\t\tif (elements === undefined) {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniformMatrix3fv(this.addr, false, v);\n\t\t\tcopyArray(cache, v);\n\t\t} else {\n\t\t\tif (arraysEqual(cache, elements)) return;\n\t\t\tmat3array.set(elements);\n\t\t\tgl.uniformMatrix3fv(this.addr, false, mat3array);\n\t\t\tcopyArray(cache, elements);\n\t\t}\n\t}\n\n\tfunction setValueM4(gl, v) {\n\t\tvar cache = this.cache;\n\t\tvar elements = v.elements;\n\n\t\tif (elements === undefined) {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniformMatrix4fv(this.addr, false, v);\n\t\t\tcopyArray(cache, v);\n\t\t} else {\n\t\t\tif (arraysEqual(cache, elements)) return;\n\t\t\tmat4array.set(elements);\n\t\t\tgl.uniformMatrix4fv(this.addr, false, mat4array);\n\t\t\tcopyArray(cache, elements);\n\t\t}\n\t} // Single texture (2D / Cube)\n\n\n\tfunction setValueT1(gl, v, textures) {\n\t\tvar cache = this.cache;\n\t\tvar unit = textures.allocateTextureUnit();\n\n\t\tif (cache[0] !== unit) {\n\t\t\tgl.uniform1i(this.addr, unit);\n\t\t\tcache[0] = unit;\n\t\t}\n\n\t\ttextures.safeSetTexture2D(v || emptyTexture, unit);\n\t}\n\n\tfunction setValueT2DArray1(gl, v, textures) {\n\t\tvar cache = this.cache;\n\t\tvar unit = textures.allocateTextureUnit();\n\n\t\tif (cache[0] !== unit) {\n\t\t\tgl.uniform1i(this.addr, unit);\n\t\t\tcache[0] = unit;\n\t\t}\n\n\t\ttextures.setTexture2DArray(v || emptyTexture2dArray, unit);\n\t}\n\n\tfunction setValueT3D1(gl, v, textures) {\n\t\tvar cache = this.cache;\n\t\tvar unit = textures.allocateTextureUnit();\n\n\t\tif (cache[0] !== unit) {\n\t\t\tgl.uniform1i(this.addr, unit);\n\t\t\tcache[0] = unit;\n\t\t}\n\n\t\ttextures.setTexture3D(v || emptyTexture3d, unit);\n\t}\n\n\tfunction setValueT6(gl, v, textures) {\n\t\tvar cache = this.cache;\n\t\tvar unit = textures.allocateTextureUnit();\n\n\t\tif (cache[0] !== unit) {\n\t\t\tgl.uniform1i(this.addr, unit);\n\t\t\tcache[0] = unit;\n\t\t}\n\n\t\ttextures.safeSetTextureCube(v || emptyCubeTexture, unit);\n\t} // Integer / Boolean vectors or arrays thereof (always flat arrays)\n\n\n\tfunction setValueV1i(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (cache[0] === v) return;\n\t\tgl.uniform1i(this.addr, v);\n\t\tcache[0] = v;\n\t}\n\n\tfunction setValueV2i(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (arraysEqual(cache, v)) return;\n\t\tgl.uniform2iv(this.addr, v);\n\t\tcopyArray(cache, v);\n\t}\n\n\tfunction setValueV3i(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (arraysEqual(cache, v)) return;\n\t\tgl.uniform3iv(this.addr, v);\n\t\tcopyArray(cache, v);\n\t}\n\n\tfunction setValueV4i(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (arraysEqual(cache, v)) return;\n\t\tgl.uniform4iv(this.addr, v);\n\t\tcopyArray(cache, v);\n\t} // uint\n\n\n\tfunction setValueV1ui(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (cache[0] === v) return;\n\t\tgl.uniform1ui(this.addr, v);\n\t\tcache[0] = v;\n\t} // Helper to pick the right setter for the singular case\n\n\n\tfunction getSingularSetter(type) {\n\t\tswitch (type) {\n\t\t\tcase 0x1406:\n\t\t\t\treturn setValueV1f;\n\t\t\t// FLOAT\n\n\t\t\tcase 0x8b50:\n\t\t\t\treturn setValueV2f;\n\t\t\t// _VEC2\n\n\t\t\tcase 0x8b51:\n\t\t\t\treturn setValueV3f;\n\t\t\t// _VEC3\n\n\t\t\tcase 0x8b52:\n\t\t\t\treturn setValueV4f;\n\t\t\t// _VEC4\n\n\t\t\tcase 0x8b5a:\n\t\t\t\treturn setValueM2;\n\t\t\t// _MAT2\n\n\t\t\tcase 0x8b5b:\n\t\t\t\treturn setValueM3;\n\t\t\t// _MAT3\n\n\t\t\tcase 0x8b5c:\n\t\t\t\treturn setValueM4;\n\t\t\t// _MAT4\n\n\t\t\tcase 0x1404:\n\t\t\tcase 0x8b56:\n\t\t\t\treturn setValueV1i;\n\t\t\t// INT, BOOL\n\n\t\t\tcase 0x8b53:\n\t\t\tcase 0x8b57:\n\t\t\t\treturn setValueV2i;\n\t\t\t// _VEC2\n\n\t\t\tcase 0x8b54:\n\t\t\tcase 0x8b58:\n\t\t\t\treturn setValueV3i;\n\t\t\t// _VEC3\n\n\t\t\tcase 0x8b55:\n\t\t\tcase 0x8b59:\n\t\t\t\treturn setValueV4i;\n\t\t\t// _VEC4\n\n\t\t\tcase 0x1405:\n\t\t\t\treturn setValueV1ui;\n\t\t\t// UINT\n\n\t\t\tcase 0x8b5e: // SAMPLER_2D\n\n\t\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\n\t\t\tcase 0x8dca: // INT_SAMPLER_2D\n\n\t\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\n\t\t\tcase 0x8b62:\n\t\t\t\t// SAMPLER_2D_SHADOW\n\t\t\t\treturn setValueT1;\n\n\t\t\tcase 0x8b5f: // SAMPLER_3D\n\n\t\t\tcase 0x8dcb: // INT_SAMPLER_3D\n\n\t\t\tcase 0x8dd3:\n\t\t\t\t// UNSIGNED_INT_SAMPLER_3D\n\t\t\t\treturn setValueT3D1;\n\n\t\t\tcase 0x8b60: // SAMPLER_CUBE\n\n\t\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\n\t\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\n\t\t\tcase 0x8dc5:\n\t\t\t\t// SAMPLER_CUBE_SHADOW\n\t\t\t\treturn setValueT6;\n\n\t\t\tcase 0x8dc1: // SAMPLER_2D_ARRAY\n\n\t\t\tcase 0x8dcf: // INT_SAMPLER_2D_ARRAY\n\n\t\t\tcase 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY\n\n\t\t\tcase 0x8dc4:\n\t\t\t\t// SAMPLER_2D_ARRAY_SHADOW\n\t\t\t\treturn setValueT2DArray1;\n\t\t}\n\t} // Array of scalars\n\n\n\tfunction setValueV1fArray(gl, v) {\n\t\tgl.uniform1fv(this.addr, v);\n\t} // Integer / Boolean vectors or arrays thereof (always flat arrays)\n\n\n\tfunction setValueV1iArray(gl, v) {\n\t\tgl.uniform1iv(this.addr, v);\n\t}\n\n\tfunction setValueV2iArray(gl, v) {\n\t\tgl.uniform2iv(this.addr, v);\n\t}\n\n\tfunction setValueV3iArray(gl, v) {\n\t\tgl.uniform3iv(this.addr, v);\n\t}\n\n\tfunction setValueV4iArray(gl, v) {\n\t\tgl.uniform4iv(this.addr, v);\n\t} // Array of vectors (flat or from THREE classes)\n\n\n\tfunction setValueV2fArray(gl, v) {\n\t\tvar data = flatten(v, this.size, 2);\n\t\tgl.uniform2fv(this.addr, data);\n\t}\n\n\tfunction setValueV3fArray(gl, v) {\n\t\tvar data = flatten(v, this.size, 3);\n\t\tgl.uniform3fv(this.addr, data);\n\t}\n\n\tfunction setValueV4fArray(gl, v) {\n\t\tvar data = flatten(v, this.size, 4);\n\t\tgl.uniform4fv(this.addr, data);\n\t} // Array of matrices (flat or from THREE clases)\n\n\n\tfunction setValueM2Array(gl, v) {\n\t\tvar data = flatten(v, this.size, 4);\n\t\tgl.uniformMatrix2fv(this.addr, false, data);\n\t}\n\n\tfunction setValueM3Array(gl, v) {\n\t\tvar data = flatten(v, this.size, 9);\n\t\tgl.uniformMatrix3fv(this.addr, false, data);\n\t}\n\n\tfunction setValueM4Array(gl, v) {\n\t\tvar data = flatten(v, this.size, 16);\n\t\tgl.uniformMatrix4fv(this.addr, false, data);\n\t} // Array of textures (2D / Cube)\n\n\n\tfunction setValueT1Array(gl, v, textures) {\n\t\tvar n = v.length;\n\t\tvar units = allocTexUnits(textures, n);\n\t\tgl.uniform1iv(this.addr, units);\n\n\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\ttextures.safeSetTexture2D(v[i] || emptyTexture, units[i]);\n\t\t}\n\t}\n\n\tfunction setValueT6Array(gl, v, textures) {\n\t\tvar n = v.length;\n\t\tvar units = allocTexUnits(textures, n);\n\t\tgl.uniform1iv(this.addr, units);\n\n\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\ttextures.safeSetTextureCube(v[i] || emptyCubeTexture, units[i]);\n\t\t}\n\t} // Helper to pick the right setter for a pure (bottom-level) array\n\n\n\tfunction getPureArraySetter(type) {\n\t\tswitch (type) {\n\t\t\tcase 0x1406:\n\t\t\t\treturn setValueV1fArray;\n\t\t\t// FLOAT\n\n\t\t\tcase 0x8b50:\n\t\t\t\treturn setValueV2fArray;\n\t\t\t// _VEC2\n\n\t\t\tcase 0x8b51:\n\t\t\t\treturn setValueV3fArray;\n\t\t\t// _VEC3\n\n\t\t\tcase 0x8b52:\n\t\t\t\treturn setValueV4fArray;\n\t\t\t// _VEC4\n\n\t\t\tcase 0x8b5a:\n\t\t\t\treturn setValueM2Array;\n\t\t\t// _MAT2\n\n\t\t\tcase 0x8b5b:\n\t\t\t\treturn setValueM3Array;\n\t\t\t// _MAT3\n\n\t\t\tcase 0x8b5c:\n\t\t\t\treturn setValueM4Array;\n\t\t\t// _MAT4\n\n\t\t\tcase 0x1404:\n\t\t\tcase 0x8b56:\n\t\t\t\treturn setValueV1iArray;\n\t\t\t// INT, BOOL\n\n\t\t\tcase 0x8b53:\n\t\t\tcase 0x8b57:\n\t\t\t\treturn setValueV2iArray;\n\t\t\t// _VEC2\n\n\t\t\tcase 0x8b54:\n\t\t\tcase 0x8b58:\n\t\t\t\treturn setValueV3iArray;\n\t\t\t// _VEC3\n\n\t\t\tcase 0x8b55:\n\t\t\tcase 0x8b59:\n\t\t\t\treturn setValueV4iArray;\n\t\t\t// _VEC4\n\n\t\t\tcase 0x8b5e: // SAMPLER_2D\n\n\t\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\n\t\t\tcase 0x8dca: // INT_SAMPLER_2D\n\n\t\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\n\t\t\tcase 0x8b62:\n\t\t\t\t// SAMPLER_2D_SHADOW\n\t\t\t\treturn setValueT1Array;\n\n\t\t\tcase 0x8b60: // SAMPLER_CUBE\n\n\t\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\n\t\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\n\t\t\tcase 0x8dc5:\n\t\t\t\t// SAMPLER_CUBE_SHADOW\n\t\t\t\treturn setValueT6Array;\n\t\t}\n\t} // --- Uniform Classes ---\n\n\n\tfunction SingleUniform(id, activeInfo, addr) {\n\t\tthis.id = id;\n\t\tthis.addr = addr;\n\t\tthis.cache = [];\n\t\tthis.setValue = getSingularSetter(activeInfo.type); // this.path = activeInfo.name; // DEBUG\n\t}\n\n\tfunction PureArrayUniform(id, activeInfo, addr) {\n\t\tthis.id = id;\n\t\tthis.addr = addr;\n\t\tthis.cache = [];\n\t\tthis.size = activeInfo.size;\n\t\tthis.setValue = getPureArraySetter(activeInfo.type); // this.path = activeInfo.name; // DEBUG\n\t}\n\n\tPureArrayUniform.prototype.updateCache = function (data) {\n\t\tvar cache = this.cache;\n\n\t\tif (data instanceof Float32Array && cache.length !== data.length) {\n\t\t\tthis.cache = new Float32Array(data.length);\n\t\t}\n\n\t\tcopyArray(cache, data);\n\t};\n\n\tfunction StructuredUniform(id) {\n\t\tthis.id = id;\n\t\tthis.seq = [];\n\t\tthis.map = {};\n\t}\n\n\tStructuredUniform.prototype.setValue = function (gl, value, textures) {\n\t\tvar seq = this.seq;\n\n\t\tfor (var i = 0, n = seq.length; i !== n; ++i) {\n\t\t\tvar u = seq[i];\n\t\t\tu.setValue(gl, value[u.id], textures);\n\t\t}\n\t}; // --- Top-level ---\n\t// Parser - builds up the property tree from the path strings\n\n\n\tvar RePathPart = /(\\w+)(\\])?(\\[|\\.)?/g; // extracts\n\t// \t- the identifier (member name or array index)\n\t//\t- followed by an optional right bracket (found when array index)\n\t//\t- followed by an optional left bracket or dot (type of subscript)\n\t//\n\t// Note: These portions can be read in a non-overlapping fashion and\n\t// allow straightforward parsing of the hierarchy that WebGL encodes\n\t// in the uniform names.\n\n\tfunction addUniform(container, uniformObject) {\n\t\tcontainer.seq.push(uniformObject);\n\t\tcontainer.map[uniformObject.id] = uniformObject;\n\t}\n\n\tfunction parseUniform(activeInfo, addr, container) {\n\t\tvar path = activeInfo.name,\n\t\t\t\tpathLength = path.length; // reset RegExp object, because of the early exit of a previous run\n\n\t\tRePathPart.lastIndex = 0;\n\n\t\twhile (true) {\n\t\t\tvar match = RePathPart.exec(path),\n\t\t\t\t\tmatchEnd = RePathPart.lastIndex;\n\t\t\tvar id = match[1];\n\t\t\tvar idIsIndex = match[2] === ']',\n\t\t\t\t\tsubscript = match[3];\n\t\t\tif (idIsIndex) id = id | 0; // convert to integer\n\n\t\t\tif (subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength) {\n\t\t\t\t// bare name or \"pure\" bottom-level array \"[0]\" suffix\n\t\t\t\taddUniform(container, subscript === undefined ? new SingleUniform(id, activeInfo, addr) : new PureArrayUniform(id, activeInfo, addr));\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// step into inner node / create it in case it doesn't exist\n\t\t\t\tvar map = container.map;\n\t\t\t\tvar next = map[id];\n\n\t\t\t\tif (next === undefined) {\n\t\t\t\t\tnext = new StructuredUniform(id);\n\t\t\t\t\taddUniform(container, next);\n\t\t\t\t}\n\n\t\t\t\tcontainer = next;\n\t\t\t}\n\t\t}\n\t} // Root Container\n\n\n\tfunction WebGLUniforms(gl, program) {\n\t\tthis.seq = [];\n\t\tthis.map = {};\n\t\tvar n = gl.getProgramParameter(program, 35718);\n\n\t\tfor (var i = 0; i < n; ++i) {\n\t\t\tvar info = gl.getActiveUniform(program, i),\n\t\t\t\t\taddr = gl.getUniformLocation(program, info.name);\n\t\t\tparseUniform(info, addr, this);\n\t\t}\n\t}\n\n\tWebGLUniforms.prototype.setValue = function (gl, name, value, textures) {\n\t\tvar u = this.map[name];\n\t\tif (u !== undefined) u.setValue(gl, value, textures);\n\t};\n\n\tWebGLUniforms.prototype.setOptional = function (gl, object, name) {\n\t\tvar v = object[name];\n\t\tif (v !== undefined) this.setValue(gl, name, v);\n\t}; // Static interface\n\n\n\tWebGLUniforms.upload = function (gl, seq, values, textures) {\n\t\tfor (var i = 0, n = seq.length; i !== n; ++i) {\n\t\t\tvar u = seq[i],\n\t\t\t\t\tv = values[u.id];\n\n\t\t\tif (v.needsUpdate !== false) {\n\t\t\t\t// note: always updating when .needsUpdate is undefined\n\t\t\t\tu.setValue(gl, v.value, textures);\n\t\t\t}\n\t\t}\n\t};\n\n\tWebGLUniforms.seqWithValue = function (seq, values) {\n\t\tvar r = [];\n\n\t\tfor (var i = 0, n = seq.length; i !== n; ++i) {\n\t\t\tvar u = seq[i];\n\t\t\tif (u.id in values) r.push(u);\n\t\t}\n\n\t\treturn r;\n\t};\n\n\tfunction WebGLShader(gl, type, string) {\n\t\tvar shader = gl.createShader(type);\n\t\tgl.shaderSource(shader, string);\n\t\tgl.compileShader(shader);\n\t\treturn shader;\n\t}\n\n\tvar programIdCount = 0;\n\n\tfunction addLineNumbers(string) {\n\t\tvar lines = string.split('\\n');\n\n\t\tfor (var i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = i + 1 + ': ' + lines[i];\n\t\t}\n\n\t\treturn lines.join('\\n');\n\t}\n\n\tfunction getEncodingComponents(encoding) {\n\t\tswitch (encoding) {\n\t\t\tcase LinearEncoding:\n\t\t\t\treturn ['Linear', '( value )'];\n\n\t\t\tcase sRGBEncoding:\n\t\t\t\treturn ['sRGB', '( value )'];\n\n\t\t\tcase RGBEEncoding:\n\t\t\t\treturn ['RGBE', '( value )'];\n\n\t\t\tcase RGBM7Encoding:\n\t\t\t\treturn ['RGBM', '( value, 7.0 )'];\n\n\t\t\tcase RGBM16Encoding:\n\t\t\t\treturn ['RGBM', '( value, 16.0 )'];\n\n\t\t\tcase RGBDEncoding:\n\t\t\t\treturn ['RGBD', '( value, 256.0 )'];\n\n\t\t\tcase GammaEncoding:\n\t\t\t\treturn ['Gamma', '( value, float( GAMMA_FACTOR ) )'];\n\n\t\t\tcase LogLuvEncoding:\n\t\t\t\treturn ['LogLuv', '( value )'];\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn('THREE.WebGLProgram: Unsupported encoding:', encoding);\n\t\t\t\treturn ['Linear', '( value )'];\n\t\t}\n\t}\n\n\tfunction getShaderErrors(gl, shader, type) {\n\t\tvar status = gl.getShaderParameter(shader, 35713);\n\t\tvar log = gl.getShaderInfoLog(shader).trim();\n\t\tif (status && log === '') return ''; // --enable-privileged-webgl-extension\n\t\t// console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );\n\n\t\tvar source = gl.getShaderSource(shader);\n\t\treturn 'THREE.WebGLShader: gl.getShaderInfoLog() ' + type + '\\n' + log + addLineNumbers(source);\n\t}\n\n\tfunction getTexelDecodingFunction(functionName, encoding) {\n\t\tvar components = getEncodingComponents(encoding);\n\t\treturn 'vec4 ' + functionName + '( vec4 value ) { return ' + components[0] + 'ToLinear' + components[1] + '; }';\n\t}\n\n\tfunction getTexelEncodingFunction(functionName, encoding) {\n\t\tvar components = getEncodingComponents(encoding);\n\t\treturn 'vec4 ' + functionName + '( vec4 value ) { return LinearTo' + components[0] + components[1] + '; }';\n\t}\n\n\tfunction getToneMappingFunction(functionName, toneMapping) {\n\t\tvar toneMappingName;\n\n\t\tswitch (toneMapping) {\n\t\t\tcase LinearToneMapping:\n\t\t\t\ttoneMappingName = 'Linear';\n\t\t\t\tbreak;\n\n\t\t\tcase ReinhardToneMapping:\n\t\t\t\ttoneMappingName = 'Reinhard';\n\t\t\t\tbreak;\n\n\t\t\tcase CineonToneMapping:\n\t\t\t\ttoneMappingName = 'OptimizedCineon';\n\t\t\t\tbreak;\n\n\t\t\tcase ACESFilmicToneMapping:\n\t\t\t\ttoneMappingName = 'ACESFilmic';\n\t\t\t\tbreak;\n\n\t\t\tcase CustomToneMapping:\n\t\t\t\ttoneMappingName = 'Custom';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn('THREE.WebGLProgram: Unsupported toneMapping:', toneMapping);\n\t\t\t\ttoneMappingName = 'Linear';\n\t\t}\n\n\t\treturn 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }';\n\t}\n\n\tfunction generateExtensions(parameters) {\n\t\tvar chunks = [parameters.extensionDerivatives || parameters.envMapCubeUV || parameters.bumpMap || parameters.tangentSpaceNormalMap || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ? '#extension GL_OES_standard_derivatives : enable' : '', (parameters.extensionFragDepth || parameters.logarithmicDepthBuffer) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '', parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ? '#extension GL_EXT_draw_buffers : require' : '', (parameters.extensionShaderTextureLOD || parameters.envMap) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : ''];\n\t\treturn chunks.filter(filterEmptyLine).join('\\n');\n\t}\n\n\tfunction generateDefines(defines) {\n\t\tvar chunks = [];\n\n\t\tfor (var name in defines) {\n\t\t\tvar value = defines[name];\n\t\t\tif (value === false) continue;\n\t\t\tchunks.push('#define ' + name + ' ' + value);\n\t\t}\n\n\t\treturn chunks.join('\\n');\n\t}\n\n\tfunction fetchAttributeLocations(gl, program) {\n\t\tvar attributes = {};\n\t\tvar n = gl.getProgramParameter(program, 35721);\n\n\t\tfor (var i = 0; i < n; i++) {\n\t\t\tvar info = gl.getActiveAttrib(program, i);\n\t\t\tvar name = info.name; // console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i );\n\n\t\t\tattributes[name] = gl.getAttribLocation(program, name);\n\t\t}\n\n\t\treturn attributes;\n\t}\n\n\tfunction filterEmptyLine(string) {\n\t\treturn string !== '';\n\t}\n\n\tfunction replaceLightNums(string, parameters) {\n\t\treturn string.replace(/NUM_DIR_LIGHTS/g, parameters.numDirLights).replace(/NUM_SPOT_LIGHTS/g, parameters.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, parameters.numPointLights).replace(/NUM_HEMI_LIGHTS/g, parameters.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows);\n\t}\n\n\tfunction replaceClippingPlaneNums(string, parameters) {\n\t\treturn string.replace(/NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, parameters.numClippingPlanes - parameters.numClipIntersection);\n\t} // Resolve Includes\n\n\n\tvar includePattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\n\n\tfunction resolveIncludes(string) {\n\t\treturn string.replace(includePattern, includeReplacer);\n\t}\n\n\tfunction includeReplacer(match, include) {\n\t\tvar string = ShaderChunk[include];\n\n\t\tif (string === undefined) {\n\t\t\tthrow new Error('Can not resolve #include <' + include + '>');\n\t\t}\n\n\t\treturn resolveIncludes(string);\n\t} // Unroll Loops\n\n\n\tvar deprecatedUnrollLoopPattern = /#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g;\n\tvar unrollLoopPattern = /#pragma unroll_loop_start\\s+for\\s*\\(\\s*int\\s+i\\s*=\\s*(\\d+)\\s*;\\s*i\\s*<\\s*(\\d+)\\s*;\\s*i\\s*\\+\\+\\s*\\)\\s*{([\\s\\S]+?)}\\s+#pragma unroll_loop_end/g;\n\n\tfunction unrollLoops(string) {\n\t\treturn string.replace(unrollLoopPattern, loopReplacer).replace(deprecatedUnrollLoopPattern, deprecatedLoopReplacer);\n\t}\n\n\tfunction deprecatedLoopReplacer(match, start, end, snippet) {\n\t\tconsole.warn('WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.');\n\t\treturn loopReplacer(match, start, end, snippet);\n\t}\n\n\tfunction loopReplacer(match, start, end, snippet) {\n\t\tvar string = '';\n\n\t\tfor (var i = parseInt(start); i < parseInt(end); i++) {\n\t\t\tstring += snippet.replace(/\\[\\s*i\\s*\\]/g, '[ ' + i + ' ]').replace(/UNROLLED_LOOP_INDEX/g, i);\n\t\t}\n\n\t\treturn string;\n\t} //\n\n\n\tfunction generatePrecision(parameters) {\n\t\tvar precisionstring = 'precision ' + parameters.precision + ' float;\\nprecision ' + parameters.precision + ' int;';\n\n\t\tif (parameters.precision === 'highp') {\n\t\t\tprecisionstring += '\\n#define HIGH_PRECISION';\n\t\t} else if (parameters.precision === 'mediump') {\n\t\t\tprecisionstring += '\\n#define MEDIUM_PRECISION';\n\t\t} else if (parameters.precision === 'lowp') {\n\t\t\tprecisionstring += '\\n#define LOW_PRECISION';\n\t\t}\n\n\t\treturn precisionstring;\n\t}\n\n\tfunction generateShadowMapTypeDefine(parameters) {\n\t\tvar shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC';\n\n\t\tif (parameters.shadowMapType === PCFShadowMap) {\n\t\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF';\n\t\t} else if (parameters.shadowMapType === PCFSoftShadowMap) {\n\t\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT';\n\t\t} else if (parameters.shadowMapType === VSMShadowMap) {\n\t\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM';\n\t\t}\n\n\t\treturn shadowMapTypeDefine;\n\t}\n\n\tfunction generateEnvMapTypeDefine(parameters) {\n\t\tvar envMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\n\t\tif (parameters.envMap) {\n\t\t\tswitch (parameters.envMapMode) {\n\t\t\t\tcase CubeReflectionMapping:\n\t\t\t\tcase CubeRefractionMapping:\n\t\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase CubeUVReflectionMapping:\n\t\t\t\tcase CubeUVRefractionMapping:\n\t\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn envMapTypeDefine;\n\t}\n\n\tfunction generateEnvMapModeDefine(parameters) {\n\t\tvar envMapModeDefine = 'ENVMAP_MODE_REFLECTION';\n\n\t\tif (parameters.envMap) {\n\t\t\tswitch (parameters.envMapMode) {\n\t\t\t\tcase CubeRefractionMapping:\n\t\t\t\tcase CubeUVRefractionMapping:\n\t\t\t\t\tenvMapModeDefine = 'ENVMAP_MODE_REFRACTION';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn envMapModeDefine;\n\t}\n\n\tfunction generateEnvMapBlendingDefine(parameters) {\n\t\tvar envMapBlendingDefine = 'ENVMAP_BLENDING_NONE';\n\n\t\tif (parameters.envMap) {\n\t\t\tswitch (parameters.combine) {\n\t\t\t\tcase MultiplyOperation:\n\t\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MixOperation:\n\t\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MIX';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase AddOperation:\n\t\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_ADD';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn envMapBlendingDefine;\n\t}\n\n\tfunction WebGLProgram(renderer, cacheKey, parameters, bindingStates) {\n\t\tvar gl = renderer.getContext();\n\t\tvar defines = parameters.defines;\n\t\tvar vertexShader = parameters.vertexShader;\n\t\tvar fragmentShader = parameters.fragmentShader;\n\t\tvar shadowMapTypeDefine = generateShadowMapTypeDefine(parameters);\n\t\tvar envMapTypeDefine = generateEnvMapTypeDefine(parameters);\n\t\tvar envMapModeDefine = generateEnvMapModeDefine(parameters);\n\t\tvar envMapBlendingDefine = generateEnvMapBlendingDefine(parameters);\n\t\tvar gammaFactorDefine = renderer.gammaFactor > 0 ? renderer.gammaFactor : 1.0;\n\t\tvar customExtensions = parameters.isWebGL2 ? '' : generateExtensions(parameters);\n\t\tvar customDefines = generateDefines(defines);\n\t\tvar program = gl.createProgram();\n\t\tvar prefixVertex, prefixFragment;\n\t\tvar versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\\n' : '';\n\n\t\tif (parameters.isRawShaderMaterial) {\n\t\t\tprefixVertex = [customDefines].filter(filterEmptyLine).join('\\n');\n\n\t\t\tif (prefixVertex.length > 0) {\n\t\t\t\tprefixVertex += '\\n';\n\t\t\t}\n\n\t\t\tprefixFragment = [customExtensions, customDefines].filter(filterEmptyLine).join('\\n');\n\n\t\t\tif (prefixFragment.length > 0) {\n\t\t\t\tprefixFragment += '\\n';\n\t\t\t}\n\t\t} else {\n\t\t\tprefixVertex = [generatePrecision(parameters), '#define SHADER_NAME ' + parameters.shaderName, customDefines, parameters.instancing ? '#define USE_INSTANCING' : '', parameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '', parameters.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '', '#define GAMMA_FACTOR ' + gammaFactorDefine, '#define MAX_BONES ' + parameters.maxBones, parameters.useFog && parameters.fog ? '#define USE_FOG' : '', parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', parameters.map ? '#define USE_MAP' : '', parameters.envMap ? '#define USE_ENVMAP' : '', parameters.envMap ? '#define ' + envMapModeDefine : '', parameters.lightMap ? '#define USE_LIGHTMAP' : '', parameters.aoMap ? '#define USE_AOMAP' : '', parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', parameters.bumpMap ? '#define USE_BUMPMAP' : '', parameters.normalMap ? '#define USE_NORMALMAP' : '', parameters.normalMap && parameters.objectSpaceNormalMap ? '#define OBJECTSPACE_NORMALMAP' : '', parameters.normalMap && parameters.tangentSpaceNormalMap ? '#define TANGENTSPACE_NORMALMAP' : '', parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', parameters.displacementMap && parameters.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '', parameters.specularMap ? '#define USE_SPECULARMAP' : '', parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', parameters.alphaMap ? '#define USE_ALPHAMAP' : '', parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', parameters.vertexTangents ? '#define USE_TANGENT' : '', parameters.vertexColors ? '#define USE_COLOR' : '', parameters.vertexUvs ? '#define USE_UV' : '', parameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', parameters.flatShading ? '#define FLAT_SHADED' : '', parameters.skinning ? '#define USE_SKINNING' : '', parameters.useVertexTexture ? '#define BONE_TEXTURE' : '', parameters.morphTargets ? '#define USE_MORPHTARGETS' : '', parameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '', parameters.doubleSided ? '#define DOUBLE_SIDED' : '', parameters.flipSided ? '#define FLIP_SIDED' : '', parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', parameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '', parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '', 'uniform mat4 modelMatrix;', 'uniform mat4 modelViewMatrix;', 'uniform mat4 projectionMatrix;', 'uniform mat4 viewMatrix;', 'uniform mat3 normalMatrix;', 'uniform vec3 cameraPosition;', 'uniform bool isOrthographic;', '#ifdef USE_INSTANCING', '\tattribute mat4 instanceMatrix;', '#endif', '#ifdef USE_INSTANCING_COLOR', '\tattribute vec3 instanceColor;', '#endif', 'attribute vec3 position;', 'attribute vec3 normal;', 'attribute vec2 uv;', '#ifdef USE_TANGENT', '\tattribute vec4 tangent;', '#endif', '#ifdef USE_COLOR', '\tattribute vec3 color;', '#endif', '#ifdef USE_MORPHTARGETS', '\tattribute vec3 morphTarget0;', '\tattribute vec3 morphTarget1;', '\tattribute vec3 morphTarget2;', '\tattribute vec3 morphTarget3;', '\t#ifdef USE_MORPHNORMALS', '\t\tattribute vec3 morphNormal0;', '\t\tattribute vec3 morphNormal1;', '\t\tattribute vec3 morphNormal2;', '\t\tattribute vec3 morphNormal3;', '\t#else', '\t\tattribute vec3 morphTarget4;', '\t\tattribute vec3 morphTarget5;', '\t\tattribute vec3 morphTarget6;', '\t\tattribute vec3 morphTarget7;', '\t#endif', '#endif', '#ifdef USE_SKINNING', '\tattribute vec4 skinIndex;', '\tattribute vec4 skinWeight;', '#endif', '\\n'].filter(filterEmptyLine).join('\\n');\n\t\t\tprefixFragment = [customExtensions, generatePrecision(parameters), '#define SHADER_NAME ' + parameters.shaderName, customDefines, parameters.alphaTest ? '#define ALPHATEST ' + parameters.alphaTest + (parameters.alphaTest % 1 ? '' : '.0') : '', // add '.0' if integer\n\t\t\t'#define GAMMA_FACTOR ' + gammaFactorDefine, parameters.useFog && parameters.fog ? '#define USE_FOG' : '', parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', parameters.map ? '#define USE_MAP' : '', parameters.matcap ? '#define USE_MATCAP' : '', parameters.envMap ? '#define USE_ENVMAP' : '', parameters.envMap ? '#define ' + envMapTypeDefine : '', parameters.envMap ? '#define ' + envMapModeDefine : '', parameters.envMap ? '#define ' + envMapBlendingDefine : '', parameters.lightMap ? '#define USE_LIGHTMAP' : '', parameters.aoMap ? '#define USE_AOMAP' : '', parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', parameters.bumpMap ? '#define USE_BUMPMAP' : '', parameters.normalMap ? '#define USE_NORMALMAP' : '', parameters.normalMap && parameters.objectSpaceNormalMap ? '#define OBJECTSPACE_NORMALMAP' : '', parameters.normalMap && parameters.tangentSpaceNormalMap ? '#define TANGENTSPACE_NORMALMAP' : '', parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', parameters.specularMap ? '#define USE_SPECULARMAP' : '', parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', parameters.alphaMap ? '#define USE_ALPHAMAP' : '', parameters.sheen ? '#define USE_SHEEN' : '', parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', parameters.vertexTangents ? '#define USE_TANGENT' : '', parameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '', parameters.vertexUvs ? '#define USE_UV' : '', parameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', parameters.gradientMap ? '#define USE_GRADIENTMAP' : '', parameters.flatShading ? '#define FLAT_SHADED' : '', parameters.doubleSided ? '#define DOUBLE_SIDED' : '', parameters.flipSided ? '#define FLIP_SIDED' : '', parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', parameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '', parameters.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '', parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '', (parameters.extensionShaderTextureLOD || parameters.envMap) && parameters.rendererExtensionShaderTextureLod ? '#define TEXTURE_LOD_EXT' : '', 'uniform mat4 viewMatrix;', 'uniform vec3 cameraPosition;', 'uniform bool isOrthographic;', parameters.toneMapping !== NoToneMapping ? '#define TONE_MAPPING' : '', parameters.toneMapping !== NoToneMapping ? ShaderChunk['tonemapping_pars_fragment'] : '', // this code is required here because it is used by the toneMapping() function defined below\n\t\t\tparameters.toneMapping !== NoToneMapping ? getToneMappingFunction('toneMapping', parameters.toneMapping) : '', parameters.dithering ? '#define DITHERING' : '', ShaderChunk['encodings_pars_fragment'], // this code is required here because it is used by the various encoding/decoding function defined below\n\t\t\tparameters.map ? getTexelDecodingFunction('mapTexelToLinear', parameters.mapEncoding) : '', parameters.matcap ? getTexelDecodingFunction('matcapTexelToLinear', parameters.matcapEncoding) : '', parameters.envMap ? getTexelDecodingFunction('envMapTexelToLinear', parameters.envMapEncoding) : '', parameters.emissiveMap ? getTexelDecodingFunction('emissiveMapTexelToLinear', parameters.emissiveMapEncoding) : '', parameters.lightMap ? getTexelDecodingFunction('lightMapTexelToLinear', parameters.lightMapEncoding) : '', getTexelEncodingFunction('linearToOutputTexel', parameters.outputEncoding), parameters.depthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '', '\\n'].filter(filterEmptyLine).join('\\n');\n\t\t}\n\n\t\tvertexShader = resolveIncludes(vertexShader);\n\t\tvertexShader = replaceLightNums(vertexShader, parameters);\n\t\tvertexShader = replaceClippingPlaneNums(vertexShader, parameters);\n\t\tfragmentShader = resolveIncludes(fragmentShader);\n\t\tfragmentShader = replaceLightNums(fragmentShader, parameters);\n\t\tfragmentShader = replaceClippingPlaneNums(fragmentShader, parameters);\n\t\tvertexShader = unrollLoops(vertexShader);\n\t\tfragmentShader = unrollLoops(fragmentShader);\n\n\t\tif (parameters.isWebGL2 && parameters.isRawShaderMaterial !== true) {\n\t\t\t// GLSL 3.0 conversion for built-in materials and ShaderMaterial\n\t\t\tversionString = '#version 300 es\\n';\n\t\t\tprefixVertex = ['#define attribute in', '#define varying out', '#define texture2D texture'].join('\\n') + '\\n' + prefixVertex;\n\t\t\tprefixFragment = ['#define varying in', parameters.glslVersion === GLSL3 ? '' : 'out highp vec4 pc_fragColor;', parameters.glslVersion === GLSL3 ? '' : '#define gl_FragColor pc_fragColor', '#define gl_FragDepthEXT gl_FragDepth', '#define texture2D texture', '#define textureCube texture', '#define texture2DProj textureProj', '#define texture2DLodEXT textureLod', '#define texture2DProjLodEXT textureProjLod', '#define textureCubeLodEXT textureLod', '#define texture2DGradEXT textureGrad', '#define texture2DProjGradEXT textureProjGrad', '#define textureCubeGradEXT textureGrad'].join('\\n') + '\\n' + prefixFragment;\n\t\t}\n\n\t\tvar vertexGlsl = versionString + prefixVertex + vertexShader;\n\t\tvar fragmentGlsl = versionString + prefixFragment + fragmentShader; // console.log( '*VERTEX*', vertexGlsl );\n\t\t// console.log( '*FRAGMENT*', fragmentGlsl );\n\n\t\tvar glVertexShader = WebGLShader(gl, 35633, vertexGlsl);\n\t\tvar glFragmentShader = WebGLShader(gl, 35632, fragmentGlsl);\n\t\tgl.attachShader(program, glVertexShader);\n\t\tgl.attachShader(program, glFragmentShader); // Force a particular attribute to index 0.\n\n\t\tif (parameters.index0AttributeName !== undefined) {\n\t\t\tgl.bindAttribLocation(program, 0, parameters.index0AttributeName);\n\t\t} else if (parameters.morphTargets === true) {\n\t\t\t// programs with morphTargets displace position out of attribute 0\n\t\t\tgl.bindAttribLocation(program, 0, 'position');\n\t\t}\n\n\t\tgl.linkProgram(program); // check for link errors\n\n\t\tif (renderer.debug.checkShaderErrors) {\n\t\t\tvar programLog = gl.getProgramInfoLog(program).trim();\n\t\t\tvar vertexLog = gl.getShaderInfoLog(glVertexShader).trim();\n\t\t\tvar fragmentLog = gl.getShaderInfoLog(glFragmentShader).trim();\n\t\t\tvar runnable = true;\n\t\t\tvar haveDiagnostics = true;\n\n\t\t\tif (gl.getProgramParameter(program, 35714) === false) {\n\t\t\t\trunnable = false;\n\t\t\t\tvar vertexErrors = getShaderErrors(gl, glVertexShader, 'vertex');\n\t\t\t\tvar fragmentErrors = getShaderErrors(gl, glFragmentShader, 'fragment');\n\t\t\t\tconsole.error('THREE.WebGLProgram: shader error: ', gl.getError(), '35715', gl.getProgramParameter(program, 35715), 'gl.getProgramInfoLog', programLog, vertexErrors, fragmentErrors);\n\t\t\t} else if (programLog !== '') {\n\t\t\t\tconsole.warn('THREE.WebGLProgram: gl.getProgramInfoLog()', programLog);\n\t\t\t} else if (vertexLog === '' || fragmentLog === '') {\n\t\t\t\thaveDiagnostics = false;\n\t\t\t}\n\n\t\t\tif (haveDiagnostics) {\n\t\t\t\tthis.diagnostics = {\n\t\t\t\t\trunnable: runnable,\n\t\t\t\t\tprogramLog: programLog,\n\t\t\t\t\tvertexShader: {\n\t\t\t\t\t\tlog: vertexLog,\n\t\t\t\t\t\tprefix: prefixVertex\n\t\t\t\t\t},\n\t\t\t\t\tfragmentShader: {\n\t\t\t\t\t\tlog: fragmentLog,\n\t\t\t\t\t\tprefix: prefixFragment\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t} // Clean up\n\t\t// Crashes in iOS9 and iOS10. #18402\n\t\t// gl.detachShader( program, glVertexShader );\n\t\t// gl.detachShader( program, glFragmentShader );\n\n\n\t\tgl.deleteShader(glVertexShader);\n\t\tgl.deleteShader(glFragmentShader); // set up caching for uniform locations\n\n\t\tvar cachedUniforms;\n\n\t\tthis.getUniforms = function () {\n\t\t\tif (cachedUniforms === undefined) {\n\t\t\t\tcachedUniforms = new WebGLUniforms(gl, program);\n\t\t\t}\n\n\t\t\treturn cachedUniforms;\n\t\t}; // set up caching for attribute locations\n\n\n\t\tvar cachedAttributes;\n\n\t\tthis.getAttributes = function () {\n\t\t\tif (cachedAttributes === undefined) {\n\t\t\t\tcachedAttributes = fetchAttributeLocations(gl, program);\n\t\t\t}\n\n\t\t\treturn cachedAttributes;\n\t\t}; // free resource\n\n\n\t\tthis.destroy = function () {\n\t\t\tbindingStates.releaseStatesOfProgram(this);\n\t\t\tgl.deleteProgram(program);\n\t\t\tthis.program = undefined;\n\t\t}; //\n\n\n\t\tthis.name = parameters.shaderName;\n\t\tthis.id = programIdCount++;\n\t\tthis.cacheKey = cacheKey;\n\t\tthis.usedTimes = 1;\n\t\tthis.program = program;\n\t\tthis.vertexShader = glVertexShader;\n\t\tthis.fragmentShader = glFragmentShader;\n\t\treturn this;\n\t}\n\n\tfunction WebGLPrograms(renderer, cubemaps, extensions, capabilities, bindingStates, clipping) {\n\t\tvar programs = [];\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;\n\t\tvar floatVertexTextures = capabilities.floatVertexTextures;\n\t\tvar maxVertexUniforms = capabilities.maxVertexUniforms;\n\t\tvar vertexTextures = capabilities.vertexTextures;\n\t\tvar precision = capabilities.precision;\n\t\tvar shaderIDs = {\n\t\t\tMeshDepthMaterial: 'depth',\n\t\t\tMeshDistanceMaterial: 'distanceRGBA',\n\t\t\tMeshNormalMaterial: 'normal',\n\t\t\tMeshBasicMaterial: 'basic',\n\t\t\tMeshLambertMaterial: 'lambert',\n\t\t\tMeshPhongMaterial: 'phong',\n\t\t\tMeshToonMaterial: 'toon',\n\t\t\tMeshStandardMaterial: 'physical',\n\t\t\tMeshPhysicalMaterial: 'physical',\n\t\t\tMeshMatcapMaterial: 'matcap',\n\t\t\tLineBasicMaterial: 'basic',\n\t\t\tLineDashedMaterial: 'dashed',\n\t\t\tPointsMaterial: 'points',\n\t\t\tShadowMaterial: 'shadow',\n\t\t\tSpriteMaterial: 'sprite'\n\t\t};\n\t\tvar parameterNames = ['precision', 'isWebGL2', 'supportsVertexTextures', 'outputEncoding', 'instancing', 'instancingColor', 'map', 'mapEncoding', 'matcap', 'matcapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'envMapCubeUV', 'lightMap', 'lightMapEncoding', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap', 'objectSpaceNormalMap', 'tangentSpaceNormalMap', 'clearcoatMap', 'clearcoatRoughnessMap', 'clearcoatNormalMap', 'displacementMap', 'specularMap', 'roughnessMap', 'metalnessMap', 'gradientMap', 'alphaMap', 'combine', 'vertexColors', 'vertexTangents', 'vertexUvs', 'uvsVertexOnly', 'fog', 'useFog', 'fogExp2', 'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning', 'maxBones', 'useVertexTexture', 'morphTargets', 'morphNormals', 'maxMorphTargets', 'maxMorphNormals', 'premultipliedAlpha', 'numDirLights', 'numPointLights', 'numSpotLights', 'numHemiLights', 'numRectAreaLights', 'numDirLightShadows', 'numPointLightShadows', 'numSpotLightShadows', 'shadowMapEnabled', 'shadowMapType', 'toneMapping', 'physicallyCorrectLights', 'alphaTest', 'doubleSided', 'flipSided', 'numClippingPlanes', 'numClipIntersection', 'depthPacking', 'dithering', 'sheen', 'transmissionMap'];\n\n\t\tfunction getMaxBones(object) {\n\t\t\tvar skeleton = object.skeleton;\n\t\t\tvar bones = skeleton.bones;\n\n\t\t\tif (floatVertexTextures) {\n\t\t\t\treturn 1024;\n\t\t\t} else {\n\t\t\t\t// default for when object is not specified\n\t\t\t\t// ( for example when prebuilding shader to be used with multiple objects )\n\t\t\t\t//\n\t\t\t\t//\t- leave some extra space for other uniforms\n\t\t\t\t//\t- limit here is ANGLE's 254 max uniform vectors\n\t\t\t\t//\t\t(up to 54 should be safe)\n\t\t\t\tvar nVertexUniforms = maxVertexUniforms;\n\t\t\t\tvar nVertexMatrices = Math.floor((nVertexUniforms - 20) / 4);\n\t\t\t\tvar maxBones = Math.min(nVertexMatrices, bones.length);\n\n\t\t\t\tif (maxBones < bones.length) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Skeleton has ' + bones.length + ' bones. This GPU supports ' + maxBones + '.');\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn maxBones;\n\t\t\t}\n\t\t}\n\n\t\tfunction getTextureEncodingFromMap(map) {\n\t\t\tvar encoding;\n\n\t\t\tif (map && map.isTexture) {\n\t\t\t\tencoding = map.encoding;\n\t\t\t} else if (map && map.isWebGLRenderTarget) {\n\t\t\t\tconsole.warn('THREE.WebGLPrograms.getTextureEncodingFromMap: don\\'t use render targets as textures. Use their .texture property instead.');\n\t\t\t\tencoding = map.texture.encoding;\n\t\t\t} else {\n\t\t\t\tencoding = LinearEncoding;\n\t\t\t}\n\n\t\t\treturn encoding;\n\t\t}\n\n\t\tfunction getParameters(material, lights, shadows, scene, object) {\n\t\t\tvar fog = scene.fog;\n\t\t\tvar environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tvar envMap = cubemaps.get(material.envMap || environment);\n\t\t\tvar shaderID = shaderIDs[material.type]; // heuristics to create shader parameters according to lights in the scene\n\t\t\t// (not to blow over maxLights budget)\n\n\t\t\tvar maxBones = object.isSkinnedMesh ? getMaxBones(object) : 0;\n\n\t\t\tif (material.precision !== null) {\n\t\t\t\tprecision = capabilities.getMaxPrecision(material.precision);\n\n\t\t\t\tif (precision !== material.precision) {\n\t\t\t\t\tconsole.warn('THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar vertexShader, fragmentShader;\n\n\t\t\tif (shaderID) {\n\t\t\t\tvar shader = ShaderLib[shaderID];\n\t\t\t\tvertexShader = shader.vertexShader;\n\t\t\t\tfragmentShader = shader.fragmentShader;\n\t\t\t} else {\n\t\t\t\tvertexShader = material.vertexShader;\n\t\t\t\tfragmentShader = material.fragmentShader;\n\t\t\t}\n\n\t\t\tvar currentRenderTarget = renderer.getRenderTarget();\n\t\t\tvar parameters = {\n\t\t\t\tisWebGL2: isWebGL2,\n\t\t\t\tshaderID: shaderID,\n\t\t\t\tshaderName: material.type,\n\t\t\t\tvertexShader: vertexShader,\n\t\t\t\tfragmentShader: fragmentShader,\n\t\t\t\tdefines: material.defines,\n\t\t\t\tisRawShaderMaterial: material.isRawShaderMaterial === true,\n\t\t\t\tglslVersion: material.glslVersion,\n\t\t\t\tprecision: precision,\n\t\t\t\tinstancing: object.isInstancedMesh === true,\n\t\t\t\tinstancingColor: object.isInstancedMesh === true && object.instanceColor !== null,\n\t\t\t\tsupportsVertexTextures: vertexTextures,\n\t\t\t\toutputEncoding: currentRenderTarget !== null ? getTextureEncodingFromMap(currentRenderTarget.texture) : renderer.outputEncoding,\n\t\t\t\tmap: !!material.map,\n\t\t\t\tmapEncoding: getTextureEncodingFromMap(material.map),\n\t\t\t\tmatcap: !!material.matcap,\n\t\t\t\tmatcapEncoding: getTextureEncodingFromMap(material.matcap),\n\t\t\t\tenvMap: !!envMap,\n\t\t\t\tenvMapMode: envMap && envMap.mapping,\n\t\t\t\tenvMapEncoding: getTextureEncodingFromMap(envMap),\n\t\t\t\tenvMapCubeUV: !!envMap && (envMap.mapping === CubeUVReflectionMapping || envMap.mapping === CubeUVRefractionMapping),\n\t\t\t\tlightMap: !!material.lightMap,\n\t\t\t\tlightMapEncoding: getTextureEncodingFromMap(material.lightMap),\n\t\t\t\taoMap: !!material.aoMap,\n\t\t\t\temissiveMap: !!material.emissiveMap,\n\t\t\t\temissiveMapEncoding: getTextureEncodingFromMap(material.emissiveMap),\n\t\t\t\tbumpMap: !!material.bumpMap,\n\t\t\t\tnormalMap: !!material.normalMap,\n\t\t\t\tobjectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap,\n\t\t\t\ttangentSpaceNormalMap: material.normalMapType === TangentSpaceNormalMap,\n\t\t\t\tclearcoatMap: !!material.clearcoatMap,\n\t\t\t\tclearcoatRoughnessMap: !!material.clearcoatRoughnessMap,\n\t\t\t\tclearcoatNormalMap: !!material.clearcoatNormalMap,\n\t\t\t\tdisplacementMap: !!material.displacementMap,\n\t\t\t\troughnessMap: !!material.roughnessMap,\n\t\t\t\tmetalnessMap: !!material.metalnessMap,\n\t\t\t\tspecularMap: !!material.specularMap,\n\t\t\t\talphaMap: !!material.alphaMap,\n\t\t\t\tgradientMap: !!material.gradientMap,\n\t\t\t\tsheen: !!material.sheen,\n\t\t\t\ttransmissionMap: !!material.transmissionMap,\n\t\t\t\tcombine: material.combine,\n\t\t\t\tvertexTangents: material.normalMap && material.vertexTangents,\n\t\t\t\tvertexColors: material.vertexColors,\n\t\t\t\tvertexUvs: !!material.map || !!material.bumpMap || !!material.normalMap || !!material.specularMap || !!material.alphaMap || !!material.emissiveMap || !!material.roughnessMap || !!material.metalnessMap || !!material.clearcoatMap || !!material.clearcoatRoughnessMap || !!material.clearcoatNormalMap || !!material.displacementMap || !!material.transmissionMap,\n\t\t\t\tuvsVertexOnly: !(!!material.map || !!material.bumpMap || !!material.normalMap || !!material.specularMap || !!material.alphaMap || !!material.emissiveMap || !!material.roughnessMap || !!material.metalnessMap || !!material.clearcoatNormalMap || !!material.transmissionMap) && !!material.displacementMap,\n\t\t\t\tfog: !!fog,\n\t\t\t\tuseFog: material.fog,\n\t\t\t\tfogExp2: fog && fog.isFogExp2,\n\t\t\t\tflatShading: material.flatShading,\n\t\t\t\tsizeAttenuation: material.sizeAttenuation,\n\t\t\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\t\t\t\tskinning: material.skinning && maxBones > 0,\n\t\t\t\tmaxBones: maxBones,\n\t\t\t\tuseVertexTexture: floatVertexTextures,\n\t\t\t\tmorphTargets: material.morphTargets,\n\t\t\t\tmorphNormals: material.morphNormals,\n\t\t\t\tmaxMorphTargets: renderer.maxMorphTargets,\n\t\t\t\tmaxMorphNormals: renderer.maxMorphNormals,\n\t\t\t\tnumDirLights: lights.directional.length,\n\t\t\t\tnumPointLights: lights.point.length,\n\t\t\t\tnumSpotLights: lights.spot.length,\n\t\t\t\tnumRectAreaLights: lights.rectArea.length,\n\t\t\t\tnumHemiLights: lights.hemi.length,\n\t\t\t\tnumDirLightShadows: lights.directionalShadowMap.length,\n\t\t\t\tnumPointLightShadows: lights.pointShadowMap.length,\n\t\t\t\tnumSpotLightShadows: lights.spotShadowMap.length,\n\t\t\t\tnumClippingPlanes: clipping.numPlanes,\n\t\t\t\tnumClipIntersection: clipping.numIntersection,\n\t\t\t\tdithering: material.dithering,\n\t\t\t\tshadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,\n\t\t\t\tshadowMapType: renderer.shadowMap.type,\n\t\t\t\ttoneMapping: material.toneMapped ? renderer.toneMapping : NoToneMapping,\n\t\t\t\tphysicallyCorrectLights: renderer.physicallyCorrectLights,\n\t\t\t\tpremultipliedAlpha: material.premultipliedAlpha,\n\t\t\t\talphaTest: material.alphaTest,\n\t\t\t\tdoubleSided: material.side === DoubleSide,\n\t\t\t\tflipSided: material.side === BackSide,\n\t\t\t\tdepthPacking: material.depthPacking !== undefined ? material.depthPacking : false,\n\t\t\t\tindex0AttributeName: material.index0AttributeName,\n\t\t\t\textensionDerivatives: material.extensions && material.extensions.derivatives,\n\t\t\t\textensionFragDepth: material.extensions && material.extensions.fragDepth,\n\t\t\t\textensionDrawBuffers: material.extensions && material.extensions.drawBuffers,\n\t\t\t\textensionShaderTextureLOD: material.extensions && material.extensions.shaderTextureLOD,\n\t\t\t\trendererExtensionFragDepth: isWebGL2 || extensions.has('EXT_frag_depth'),\n\t\t\t\trendererExtensionDrawBuffers: isWebGL2 || extensions.has('WEBGL_draw_buffers'),\n\t\t\t\trendererExtensionShaderTextureLod: isWebGL2 || extensions.has('EXT_shader_texture_lod'),\n\t\t\t\tcustomProgramCacheKey: material.customProgramCacheKey()\n\t\t\t};\n\t\t\treturn parameters;\n\t\t}\n\n\t\tfunction getProgramCacheKey(parameters) {\n\t\t\tvar array = [];\n\n\t\t\tif (parameters.shaderID) {\n\t\t\t\tarray.push(parameters.shaderID);\n\t\t\t} else {\n\t\t\t\tarray.push(parameters.fragmentShader);\n\t\t\t\tarray.push(parameters.vertexShader);\n\t\t\t}\n\n\t\t\tif (parameters.defines !== undefined) {\n\t\t\t\tfor (var name in parameters.defines) {\n\t\t\t\t\tarray.push(name);\n\t\t\t\t\tarray.push(parameters.defines[name]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (parameters.isRawShaderMaterial === false) {\n\t\t\t\tfor (var i = 0; i < parameterNames.length; i++) {\n\t\t\t\t\tarray.push(parameters[parameterNames[i]]);\n\t\t\t\t}\n\n\t\t\t\tarray.push(renderer.outputEncoding);\n\t\t\t\tarray.push(renderer.gammaFactor);\n\t\t\t}\n\n\t\t\tarray.push(parameters.customProgramCacheKey);\n\t\t\treturn array.join();\n\t\t}\n\n\t\tfunction getUniforms(material) {\n\t\t\tvar shaderID = shaderIDs[material.type];\n\t\t\tvar uniforms;\n\n\t\t\tif (shaderID) {\n\t\t\t\tvar shader = ShaderLib[shaderID];\n\t\t\t\tuniforms = UniformsUtils.clone(shader.uniforms);\n\t\t\t} else {\n\t\t\t\tuniforms = material.uniforms;\n\t\t\t}\n\n\t\t\treturn uniforms;\n\t\t}\n\n\t\tfunction acquireProgram(parameters, cacheKey) {\n\t\t\tvar program; // Check if code has been already compiled\n\n\t\t\tfor (var p = 0, pl = programs.length; p < pl; p++) {\n\t\t\t\tvar preexistingProgram = programs[p];\n\n\t\t\t\tif (preexistingProgram.cacheKey === cacheKey) {\n\t\t\t\t\tprogram = preexistingProgram;\n\t\t\t\t\t++program.usedTimes;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (program === undefined) {\n\t\t\t\tprogram = new WebGLProgram(renderer, cacheKey, parameters, bindingStates);\n\t\t\t\tprograms.push(program);\n\t\t\t}\n\n\t\t\treturn program;\n\t\t}\n\n\t\tfunction releaseProgram(program) {\n\t\t\tif (--program.usedTimes === 0) {\n\t\t\t\t// Remove from unordered set\n\t\t\t\tvar i = programs.indexOf(program);\n\t\t\t\tprograms[i] = programs[programs.length - 1];\n\t\t\t\tprograms.pop(); // Free WebGL resources\n\n\t\t\t\tprogram.destroy();\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tgetParameters: getParameters,\n\t\t\tgetProgramCacheKey: getProgramCacheKey,\n\t\t\tgetUniforms: getUniforms,\n\t\t\tacquireProgram: acquireProgram,\n\t\t\treleaseProgram: releaseProgram,\n\t\t\t// Exposed for resource monitoring & error feedback via renderer.info:\n\t\t\tprograms: programs\n\t\t};\n\t}\n\n\tfunction WebGLProperties() {\n\t\tvar properties = new WeakMap();\n\n\t\tfunction get(object) {\n\t\t\tvar map = properties.get(object);\n\n\t\t\tif (map === undefined) {\n\t\t\t\tmap = {};\n\t\t\t\tproperties.set(object, map);\n\t\t\t}\n\n\t\t\treturn map;\n\t\t}\n\n\t\tfunction remove(object) {\n\t\t\tproperties.delete(object);\n\t\t}\n\n\t\tfunction update(object, key, value) {\n\t\t\tproperties.get(object)[key] = value;\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\tproperties = new WeakMap();\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tremove: remove,\n\t\t\tupdate: update,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\tfunction painterSortStable(a, b) {\n\t\tif (a.groupOrder !== b.groupOrder) {\n\t\t\treturn a.groupOrder - b.groupOrder;\n\t\t} else if (a.renderOrder !== b.renderOrder) {\n\t\t\treturn a.renderOrder - b.renderOrder;\n\t\t} else if (a.program !== b.program) {\n\t\t\treturn a.program.id - b.program.id;\n\t\t} else if (a.material.id !== b.material.id) {\n\t\t\treturn a.material.id - b.material.id;\n\t\t} else if (a.z !== b.z) {\n\t\t\treturn a.z - b.z;\n\t\t} else {\n\t\t\treturn a.id - b.id;\n\t\t}\n\t}\n\n\tfunction reversePainterSortStable(a, b) {\n\t\tif (a.groupOrder !== b.groupOrder) {\n\t\t\treturn a.groupOrder - b.groupOrder;\n\t\t} else if (a.renderOrder !== b.renderOrder) {\n\t\t\treturn a.renderOrder - b.renderOrder;\n\t\t} else if (a.z !== b.z) {\n\t\t\treturn b.z - a.z;\n\t\t} else {\n\t\t\treturn a.id - b.id;\n\t\t}\n\t}\n\n\tfunction WebGLRenderList(properties) {\n\t\tvar renderItems = [];\n\t\tvar renderItemsIndex = 0;\n\t\tvar opaque = [];\n\t\tvar transparent = [];\n\t\tvar defaultProgram = {\n\t\t\tid: -1\n\t\t};\n\n\t\tfunction init() {\n\t\t\trenderItemsIndex = 0;\n\t\t\topaque.length = 0;\n\t\t\ttransparent.length = 0;\n\t\t}\n\n\t\tfunction getNextRenderItem(object, geometry, material, groupOrder, z, group) {\n\t\t\tvar renderItem = renderItems[renderItemsIndex];\n\t\t\tvar materialProperties = properties.get(material);\n\n\t\t\tif (renderItem === undefined) {\n\t\t\t\trenderItem = {\n\t\t\t\t\tid: object.id,\n\t\t\t\t\tobject: object,\n\t\t\t\t\tgeometry: geometry,\n\t\t\t\t\tmaterial: material,\n\t\t\t\t\tprogram: materialProperties.program || defaultProgram,\n\t\t\t\t\tgroupOrder: groupOrder,\n\t\t\t\t\trenderOrder: object.renderOrder,\n\t\t\t\t\tz: z,\n\t\t\t\t\tgroup: group\n\t\t\t\t};\n\t\t\t\trenderItems[renderItemsIndex] = renderItem;\n\t\t\t} else {\n\t\t\t\trenderItem.id = object.id;\n\t\t\t\trenderItem.object = object;\n\t\t\t\trenderItem.geometry = geometry;\n\t\t\t\trenderItem.material = material;\n\t\t\t\trenderItem.program = materialProperties.program || defaultProgram;\n\t\t\t\trenderItem.groupOrder = groupOrder;\n\t\t\t\trenderItem.renderOrder = object.renderOrder;\n\t\t\t\trenderItem.z = z;\n\t\t\t\trenderItem.group = group;\n\t\t\t}\n\n\t\t\trenderItemsIndex++;\n\t\t\treturn renderItem;\n\t\t}\n\n\t\tfunction push(object, geometry, material, groupOrder, z, group) {\n\t\t\tvar renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);\n\t\t\t(material.transparent === true ? transparent : opaque).push(renderItem);\n\t\t}\n\n\t\tfunction unshift(object, geometry, material, groupOrder, z, group) {\n\t\t\tvar renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);\n\t\t\t(material.transparent === true ? transparent : opaque).unshift(renderItem);\n\t\t}\n\n\t\tfunction sort(customOpaqueSort, customTransparentSort) {\n\t\t\tif (opaque.length > 1) opaque.sort(customOpaqueSort || painterSortStable);\n\t\t\tif (transparent.length > 1) transparent.sort(customTransparentSort || reversePainterSortStable);\n\t\t}\n\n\t\tfunction finish() {\n\t\t\t// Clear references from inactive renderItems in the list\n\t\t\tfor (var i = renderItemsIndex, il = renderItems.length; i < il; i++) {\n\t\t\t\tvar renderItem = renderItems[i];\n\t\t\t\tif (renderItem.id === null) break;\n\t\t\t\trenderItem.id = null;\n\t\t\t\trenderItem.object = null;\n\t\t\t\trenderItem.geometry = null;\n\t\t\t\trenderItem.material = null;\n\t\t\t\trenderItem.program = null;\n\t\t\t\trenderItem.group = null;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\topaque: opaque,\n\t\t\ttransparent: transparent,\n\t\t\tinit: init,\n\t\t\tpush: push,\n\t\t\tunshift: unshift,\n\t\t\tfinish: finish,\n\t\t\tsort: sort\n\t\t};\n\t}\n\n\tfunction WebGLRenderLists(properties) {\n\t\tvar lists = new WeakMap();\n\n\t\tfunction get(scene, camera) {\n\t\t\tvar cameras = lists.get(scene);\n\t\t\tvar list;\n\n\t\t\tif (cameras === undefined) {\n\t\t\t\tlist = new WebGLRenderList(properties);\n\t\t\t\tlists.set(scene, new WeakMap());\n\t\t\t\tlists.get(scene).set(camera, list);\n\t\t\t} else {\n\t\t\t\tlist = cameras.get(camera);\n\n\t\t\t\tif (list === undefined) {\n\t\t\t\t\tlist = new WebGLRenderList(properties);\n\t\t\t\t\tcameras.set(camera, list);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn list;\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\tlists = new WeakMap();\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\tfunction UniformsCache() {\n\t\tvar lights = {};\n\t\treturn {\n\t\t\tget: function get(light) {\n\t\t\t\tif (lights[light.id] !== undefined) {\n\t\t\t\t\treturn lights[light.id];\n\t\t\t\t}\n\n\t\t\t\tvar uniforms;\n\n\t\t\t\tswitch (light.type) {\n\t\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\t\tcolor: new Color()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'SpotLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\t\tconeCos: 0,\n\t\t\t\t\t\t\tpenumbraCos: 0,\n\t\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'PointLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'HemisphereLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\t\tskyColor: new Color(),\n\t\t\t\t\t\t\tgroundColor: new Color()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'RectAreaLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\t\thalfWidth: new Vector3(),\n\t\t\t\t\t\t\thalfHeight: new Vector3()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tlights[light.id] = uniforms;\n\t\t\t\treturn uniforms;\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction ShadowUniformsCache() {\n\t\tvar lights = {};\n\t\treturn {\n\t\t\tget: function get(light) {\n\t\t\t\tif (lights[light.id] !== undefined) {\n\t\t\t\t\treturn lights[light.id];\n\t\t\t\t}\n\n\t\t\t\tvar uniforms;\n\n\t\t\t\tswitch (light.type) {\n\t\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'SpotLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'PointLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\t\tshadowMapSize: new Vector2(),\n\t\t\t\t\t\t\tshadowCameraNear: 1,\n\t\t\t\t\t\t\tshadowCameraFar: 1000\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// TODO (abelnation): set RectAreaLight shadow uniforms\n\t\t\t\t}\n\n\t\t\t\tlights[light.id] = uniforms;\n\t\t\t\treturn uniforms;\n\t\t\t}\n\t\t};\n\t}\n\n\tvar nextVersion = 0;\n\n\tfunction shadowCastingLightsFirst(lightA, lightB) {\n\t\treturn (lightB.castShadow ? 1 : 0) - (lightA.castShadow ? 1 : 0);\n\t}\n\n\tfunction WebGLLights(extensions, capabilities) {\n\t\tvar cache = new UniformsCache();\n\t\tvar shadowCache = ShadowUniformsCache();\n\t\tvar state = {\n\t\t\tversion: 0,\n\t\t\thash: {\n\t\t\t\tdirectionalLength: -1,\n\t\t\t\tpointLength: -1,\n\t\t\t\tspotLength: -1,\n\t\t\t\trectAreaLength: -1,\n\t\t\t\themiLength: -1,\n\t\t\t\tnumDirectionalShadows: -1,\n\t\t\t\tnumPointShadows: -1,\n\t\t\t\tnumSpotShadows: -1\n\t\t\t},\n\t\t\tambient: [0, 0, 0],\n\t\t\tprobe: [],\n\t\t\tdirectional: [],\n\t\t\tdirectionalShadow: [],\n\t\t\tdirectionalShadowMap: [],\n\t\t\tdirectionalShadowMatrix: [],\n\t\t\tspot: [],\n\t\t\tspotShadow: [],\n\t\t\tspotShadowMap: [],\n\t\t\tspotShadowMatrix: [],\n\t\t\trectArea: [],\n\t\t\trectAreaLTC1: null,\n\t\t\trectAreaLTC2: null,\n\t\t\tpoint: [],\n\t\t\tpointShadow: [],\n\t\t\tpointShadowMap: [],\n\t\t\tpointShadowMatrix: [],\n\t\t\themi: []\n\t\t};\n\n\t\tfor (var i = 0; i < 9; i++) {\n\t\t\tstate.probe.push(new Vector3());\n\t\t}\n\n\t\tvar vector3 = new Vector3();\n\t\tvar matrix4 = new Matrix4();\n\t\tvar matrix42 = new Matrix4();\n\n\t\tfunction setup(lights) {\n\t\t\tvar r = 0,\n\t\t\t\t\tg = 0,\n\t\t\t\t\tb = 0;\n\n\t\t\tfor (var _i = 0; _i < 9; _i++) {\n\t\t\t\tstate.probe[_i].set(0, 0, 0);\n\t\t\t}\n\n\t\t\tvar directionalLength = 0;\n\t\t\tvar pointLength = 0;\n\t\t\tvar spotLength = 0;\n\t\t\tvar rectAreaLength = 0;\n\t\t\tvar hemiLength = 0;\n\t\t\tvar numDirectionalShadows = 0;\n\t\t\tvar numPointShadows = 0;\n\t\t\tvar numSpotShadows = 0;\n\t\t\tlights.sort(shadowCastingLightsFirst);\n\n\t\t\tfor (var _i2 = 0, l = lights.length; _i2 < l; _i2++) {\n\t\t\t\tvar light = lights[_i2];\n\t\t\t\tvar color = light.color;\n\t\t\t\tvar intensity = light.intensity;\n\t\t\t\tvar distance = light.distance;\n\t\t\t\tvar shadowMap = light.shadow && light.shadow.map ? light.shadow.map.texture : null;\n\n\t\t\t\tif (light.isAmbientLight) {\n\t\t\t\t\tr += color.r * intensity;\n\t\t\t\t\tg += color.g * intensity;\n\t\t\t\t\tb += color.b * intensity;\n\t\t\t\t} else if (light.isLightProbe) {\n\t\t\t\t\tfor (var j = 0; j < 9; j++) {\n\t\t\t\t\t\tstate.probe[j].addScaledVector(light.sh.coefficients[j], intensity);\n\t\t\t\t\t}\n\t\t\t\t} else if (light.isDirectionalLight) {\n\t\t\t\t\tvar uniforms = cache.get(light);\n\t\t\t\t\tuniforms.color.copy(light.color).multiplyScalar(light.intensity);\n\n\t\t\t\t\tif (light.castShadow) {\n\t\t\t\t\t\tvar shadow = light.shadow;\n\t\t\t\t\t\tvar shadowUniforms = shadowCache.get(light);\n\t\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\t\t\t\t\t\tstate.directionalShadow[directionalLength] = shadowUniforms;\n\t\t\t\t\t\tstate.directionalShadowMap[directionalLength] = shadowMap;\n\t\t\t\t\t\tstate.directionalShadowMatrix[directionalLength] = light.shadow.matrix;\n\t\t\t\t\t\tnumDirectionalShadows++;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.directional[directionalLength] = uniforms;\n\t\t\t\t\tdirectionalLength++;\n\t\t\t\t} else if (light.isSpotLight) {\n\t\t\t\t\tvar _uniforms = cache.get(light);\n\n\t\t\t\t\t_uniforms.position.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms.color.copy(color).multiplyScalar(intensity);\n\n\t\t\t\t\t_uniforms.distance = distance;\n\t\t\t\t\t_uniforms.coneCos = Math.cos(light.angle);\n\t\t\t\t\t_uniforms.penumbraCos = Math.cos(light.angle * (1 - light.penumbra));\n\t\t\t\t\t_uniforms.decay = light.decay;\n\n\t\t\t\t\tif (light.castShadow) {\n\t\t\t\t\t\tvar _shadow = light.shadow;\n\n\t\t\t\t\t\tvar _shadowUniforms = shadowCache.get(light);\n\n\t\t\t\t\t\t_shadowUniforms.shadowBias = _shadow.bias;\n\t\t\t\t\t\t_shadowUniforms.shadowNormalBias = _shadow.normalBias;\n\t\t\t\t\t\t_shadowUniforms.shadowRadius = _shadow.radius;\n\t\t\t\t\t\t_shadowUniforms.shadowMapSize = _shadow.mapSize;\n\t\t\t\t\t\tstate.spotShadow[spotLength] = _shadowUniforms;\n\t\t\t\t\t\tstate.spotShadowMap[spotLength] = shadowMap;\n\t\t\t\t\t\tstate.spotShadowMatrix[spotLength] = light.shadow.matrix;\n\t\t\t\t\t\tnumSpotShadows++;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.spot[spotLength] = _uniforms;\n\t\t\t\t\tspotLength++;\n\t\t\t\t} else if (light.isRectAreaLight) {\n\t\t\t\t\tvar _uniforms2 = cache.get(light); // (a) intensity is the total visible light emitted\n\t\t\t\t\t//uniforms.color.copy( color ).multiplyScalar( intensity / ( light.width * light.height * Math.PI ) );\n\t\t\t\t\t// (b) intensity is the brightness of the light\n\n\n\t\t\t\t\t_uniforms2.color.copy(color).multiplyScalar(intensity);\n\n\t\t\t\t\t_uniforms2.halfWidth.set(light.width * 0.5, 0.0, 0.0);\n\n\t\t\t\t\t_uniforms2.halfHeight.set(0.0, light.height * 0.5, 0.0);\n\n\t\t\t\t\tstate.rectArea[rectAreaLength] = _uniforms2;\n\t\t\t\t\trectAreaLength++;\n\t\t\t\t} else if (light.isPointLight) {\n\t\t\t\t\tvar _uniforms3 = cache.get(light);\n\n\t\t\t\t\t_uniforms3.color.copy(light.color).multiplyScalar(light.intensity);\n\n\t\t\t\t\t_uniforms3.distance = light.distance;\n\t\t\t\t\t_uniforms3.decay = light.decay;\n\n\t\t\t\t\tif (light.castShadow) {\n\t\t\t\t\t\tvar _shadow2 = light.shadow;\n\n\t\t\t\t\t\tvar _shadowUniforms2 = shadowCache.get(light);\n\n\t\t\t\t\t\t_shadowUniforms2.shadowBias = _shadow2.bias;\n\t\t\t\t\t\t_shadowUniforms2.shadowNormalBias = _shadow2.normalBias;\n\t\t\t\t\t\t_shadowUniforms2.shadowRadius = _shadow2.radius;\n\t\t\t\t\t\t_shadowUniforms2.shadowMapSize = _shadow2.mapSize;\n\t\t\t\t\t\t_shadowUniforms2.shadowCameraNear = _shadow2.camera.near;\n\t\t\t\t\t\t_shadowUniforms2.shadowCameraFar = _shadow2.camera.far;\n\t\t\t\t\t\tstate.pointShadow[pointLength] = _shadowUniforms2;\n\t\t\t\t\t\tstate.pointShadowMap[pointLength] = shadowMap;\n\t\t\t\t\t\tstate.pointShadowMatrix[pointLength] = light.shadow.matrix;\n\t\t\t\t\t\tnumPointShadows++;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.point[pointLength] = _uniforms3;\n\t\t\t\t\tpointLength++;\n\t\t\t\t} else if (light.isHemisphereLight) {\n\t\t\t\t\tvar _uniforms4 = cache.get(light);\n\n\t\t\t\t\t_uniforms4.skyColor.copy(light.color).multiplyScalar(intensity);\n\n\t\t\t\t\t_uniforms4.groundColor.copy(light.groundColor).multiplyScalar(intensity);\n\n\t\t\t\t\tstate.hemi[hemiLength] = _uniforms4;\n\t\t\t\t\themiLength++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (rectAreaLength > 0) {\n\t\t\t\tif (capabilities.isWebGL2) {\n\t\t\t\t\t// WebGL 2\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\t\t\t\t} else {\n\t\t\t\t\t// WebGL 1\n\t\t\t\t\tif (extensions.has('OES_texture_float_linear') === true) {\n\t\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\t\t\t\t\t} else if (extensions.has('OES_texture_half_float_linear') === true) {\n\t\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_HALF_1;\n\t\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_HALF_2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error('THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstate.ambient[0] = r;\n\t\t\tstate.ambient[1] = g;\n\t\t\tstate.ambient[2] = b;\n\t\t\tvar hash = state.hash;\n\n\t\t\tif (hash.directionalLength !== directionalLength || hash.pointLength !== pointLength || hash.spotLength !== spotLength || hash.rectAreaLength !== rectAreaLength || hash.hemiLength !== hemiLength || hash.numDirectionalShadows !== numDirectionalShadows || hash.numPointShadows !== numPointShadows || hash.numSpotShadows !== numSpotShadows) {\n\t\t\t\tstate.directional.length = directionalLength;\n\t\t\t\tstate.spot.length = spotLength;\n\t\t\t\tstate.rectArea.length = rectAreaLength;\n\t\t\t\tstate.point.length = pointLength;\n\t\t\t\tstate.hemi.length = hemiLength;\n\t\t\t\tstate.directionalShadow.length = numDirectionalShadows;\n\t\t\t\tstate.directionalShadowMap.length = numDirectionalShadows;\n\t\t\t\tstate.pointShadow.length = numPointShadows;\n\t\t\t\tstate.pointShadowMap.length = numPointShadows;\n\t\t\t\tstate.spotShadow.length = numSpotShadows;\n\t\t\t\tstate.spotShadowMap.length = numSpotShadows;\n\t\t\t\tstate.directionalShadowMatrix.length = numDirectionalShadows;\n\t\t\t\tstate.pointShadowMatrix.length = numPointShadows;\n\t\t\t\tstate.spotShadowMatrix.length = numSpotShadows;\n\t\t\t\thash.directionalLength = directionalLength;\n\t\t\t\thash.pointLength = pointLength;\n\t\t\t\thash.spotLength = spotLength;\n\t\t\t\thash.rectAreaLength = rectAreaLength;\n\t\t\t\thash.hemiLength = hemiLength;\n\t\t\t\thash.numDirectionalShadows = numDirectionalShadows;\n\t\t\t\thash.numPointShadows = numPointShadows;\n\t\t\t\thash.numSpotShadows = numSpotShadows;\n\t\t\t\tstate.version = nextVersion++;\n\t\t\t}\n\t\t}\n\n\t\tfunction setupView(lights, camera) {\n\t\t\tvar directionalLength = 0;\n\t\t\tvar pointLength = 0;\n\t\t\tvar spotLength = 0;\n\t\t\tvar rectAreaLength = 0;\n\t\t\tvar hemiLength = 0;\n\t\t\tvar viewMatrix = camera.matrixWorldInverse;\n\n\t\t\tfor (var _i3 = 0, l = lights.length; _i3 < l; _i3++) {\n\t\t\t\tvar light = lights[_i3];\n\n\t\t\t\tif (light.isDirectionalLight) {\n\t\t\t\t\tvar uniforms = state.directional[directionalLength];\n\t\t\t\t\tuniforms.direction.setFromMatrixPosition(light.matrixWorld);\n\t\t\t\t\tvector3.setFromMatrixPosition(light.target.matrixWorld);\n\t\t\t\t\tuniforms.direction.sub(vector3);\n\t\t\t\t\tuniforms.direction.transformDirection(viewMatrix);\n\t\t\t\t\tdirectionalLength++;\n\t\t\t\t} else if (light.isSpotLight) {\n\t\t\t\t\tvar _uniforms5 = state.spot[spotLength];\n\n\t\t\t\t\t_uniforms5.position.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms5.position.applyMatrix4(viewMatrix);\n\n\t\t\t\t\t_uniforms5.direction.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\tvector3.setFromMatrixPosition(light.target.matrixWorld);\n\n\t\t\t\t\t_uniforms5.direction.sub(vector3);\n\n\t\t\t\t\t_uniforms5.direction.transformDirection(viewMatrix);\n\n\t\t\t\t\tspotLength++;\n\t\t\t\t} else if (light.isRectAreaLight) {\n\t\t\t\t\tvar _uniforms6 = state.rectArea[rectAreaLength];\n\n\t\t\t\t\t_uniforms6.position.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms6.position.applyMatrix4(viewMatrix); // extract local rotation of light to derive width/height half vectors\n\n\n\t\t\t\t\tmatrix42.identity();\n\t\t\t\t\tmatrix4.copy(light.matrixWorld);\n\t\t\t\t\tmatrix4.premultiply(viewMatrix);\n\t\t\t\t\tmatrix42.extractRotation(matrix4);\n\n\t\t\t\t\t_uniforms6.halfWidth.set(light.width * 0.5, 0.0, 0.0);\n\n\t\t\t\t\t_uniforms6.halfHeight.set(0.0, light.height * 0.5, 0.0);\n\n\t\t\t\t\t_uniforms6.halfWidth.applyMatrix4(matrix42);\n\n\t\t\t\t\t_uniforms6.halfHeight.applyMatrix4(matrix42);\n\n\t\t\t\t\trectAreaLength++;\n\t\t\t\t} else if (light.isPointLight) {\n\t\t\t\t\tvar _uniforms7 = state.point[pointLength];\n\n\t\t\t\t\t_uniforms7.position.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms7.position.applyMatrix4(viewMatrix);\n\n\t\t\t\t\tpointLength++;\n\t\t\t\t} else if (light.isHemisphereLight) {\n\t\t\t\t\tvar _uniforms8 = state.hemi[hemiLength];\n\n\t\t\t\t\t_uniforms8.direction.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms8.direction.transformDirection(viewMatrix);\n\n\t\t\t\t\t_uniforms8.direction.normalize();\n\n\t\t\t\t\themiLength++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tsetup: setup,\n\t\t\tsetupView: setupView,\n\t\t\tstate: state\n\t\t};\n\t}\n\n\tfunction WebGLRenderState(extensions, capabilities) {\n\t\tvar lights = new WebGLLights(extensions, capabilities);\n\t\tvar lightsArray = [];\n\t\tvar shadowsArray = [];\n\n\t\tfunction init() {\n\t\t\tlightsArray.length = 0;\n\t\t\tshadowsArray.length = 0;\n\t\t}\n\n\t\tfunction pushLight(light) {\n\t\t\tlightsArray.push(light);\n\t\t}\n\n\t\tfunction pushShadow(shadowLight) {\n\t\t\tshadowsArray.push(shadowLight);\n\t\t}\n\n\t\tfunction setupLights() {\n\t\t\tlights.setup(lightsArray);\n\t\t}\n\n\t\tfunction setupLightsView(camera) {\n\t\t\tlights.setupView(lightsArray, camera);\n\t\t}\n\n\t\tvar state = {\n\t\t\tlightsArray: lightsArray,\n\t\t\tshadowsArray: shadowsArray,\n\t\t\tlights: lights\n\t\t};\n\t\treturn {\n\t\t\tinit: init,\n\t\t\tstate: state,\n\t\t\tsetupLights: setupLights,\n\t\t\tsetupLightsView: setupLightsView,\n\t\t\tpushLight: pushLight,\n\t\t\tpushShadow: pushShadow\n\t\t};\n\t}\n\n\tfunction WebGLRenderStates(extensions, capabilities) {\n\t\tvar renderStates = new WeakMap();\n\n\t\tfunction get(scene, renderCallDepth) {\n\t\t\tif (renderCallDepth === void 0) {\n\t\t\t\trenderCallDepth = 0;\n\t\t\t}\n\n\t\t\tvar renderState;\n\n\t\t\tif (renderStates.has(scene) === false) {\n\t\t\t\trenderState = new WebGLRenderState(extensions, capabilities);\n\t\t\t\trenderStates.set(scene, []);\n\t\t\t\trenderStates.get(scene).push(renderState);\n\t\t\t} else {\n\t\t\t\tif (renderCallDepth >= renderStates.get(scene).length) {\n\t\t\t\t\trenderState = new WebGLRenderState(extensions, capabilities);\n\t\t\t\t\trenderStates.get(scene).push(renderState);\n\t\t\t\t} else {\n\t\t\t\t\trenderState = renderStates.get(scene)[renderCallDepth];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn renderState;\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\trenderStates = new WeakMap();\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\t/**\n\t * parameters = {\n\t *\n\t *\topacity: <float>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>\n\t * }\n\t */\n\n\tfunction MeshDepthMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshDepthMaterial';\n\t\tthis.depthPacking = BasicDepthPacking;\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.map = null;\n\t\tthis.alphaMap = null;\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.fog = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshDepthMaterial.prototype = Object.create(Material.prototype);\n\tMeshDepthMaterial.prototype.constructor = MeshDepthMaterial;\n\tMeshDepthMaterial.prototype.isMeshDepthMaterial = true;\n\n\tMeshDepthMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.depthPacking = source.depthPacking;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.map = source.map;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\n\t *\treferencePosition: <float>,\n\t *\tnearDistance: <float>,\n\t *\tfarDistance: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>\n\t *\n\t * }\n\t */\n\n\tfunction MeshDistanceMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshDistanceMaterial';\n\t\tthis.referencePosition = new Vector3();\n\t\tthis.nearDistance = 1;\n\t\tthis.farDistance = 1000;\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.map = null;\n\t\tthis.alphaMap = null;\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.fog = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshDistanceMaterial.prototype = Object.create(Material.prototype);\n\tMeshDistanceMaterial.prototype.constructor = MeshDistanceMaterial;\n\tMeshDistanceMaterial.prototype.isMeshDistanceMaterial = true;\n\n\tMeshDistanceMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.referencePosition.copy(source.referencePosition);\n\t\tthis.nearDistance = source.nearDistance;\n\t\tthis.farDistance = source.farDistance;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.map = source.map;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\treturn this;\n\t};\n\n\tvar vsm_frag = \"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include <packing>\\nvoid main() {\\n\\tfloat mean = 0.0;\\n\\tfloat squared_mean = 0.0;\\n\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\\n\\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\\n\\t\\t#ifdef HORIZONTAL_PASS\\n\\t\\t\\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\\n\\t\\t\\tmean += distribution.x;\\n\\t\\t\\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\\t\\t#else\\n\\t\\t\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\\n\\t\\t\\tmean += depth;\\n\\t\\t\\tsquared_mean += depth * depth;\\n\\t\\t#endif\\n\\t}\\n\\tmean = mean * HALF_SAMPLE_RATE;\\n\\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\\n\\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\";\n\n\tvar vsm_vert = \"void main() {\\n\\tgl_Position = vec4( position, 1.0 );\\n}\";\n\n\tfunction WebGLShadowMap(_renderer, _objects, maxTextureSize) {\n\t\tvar _frustum = new Frustum();\n\n\t\tvar _shadowMapSize = new Vector2(),\n\t\t\t\t_viewportSize = new Vector2(),\n\t\t\t\t_viewport = new Vector4(),\n\t\t\t\t_depthMaterials = [],\n\t\t\t\t_distanceMaterials = [],\n\t\t\t\t_materialCache = {};\n\n\t\tvar shadowSide = {\n\t\t\t0: BackSide,\n\t\t\t1: FrontSide,\n\t\t\t2: DoubleSide\n\t\t};\n\t\tvar shadowMaterialVertical = new ShaderMaterial({\n\t\t\tdefines: {\n\t\t\t\tSAMPLE_RATE: 2.0 / 8.0,\n\t\t\t\tHALF_SAMPLE_RATE: 1.0 / 8.0\n\t\t\t},\n\t\t\tuniforms: {\n\t\t\t\tshadow_pass: {\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\tresolution: {\n\t\t\t\t\tvalue: new Vector2()\n\t\t\t\t},\n\t\t\t\tradius: {\n\t\t\t\t\tvalue: 4.0\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: vsm_vert,\n\t\t\tfragmentShader: vsm_frag\n\t\t});\n\t\tvar shadowMaterialHorizontal = shadowMaterialVertical.clone();\n\t\tshadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1;\n\t\tvar fullScreenTri = new BufferGeometry();\n\t\tfullScreenTri.setAttribute('position', new BufferAttribute(new Float32Array([-1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5]), 3));\n\t\tvar fullScreenMesh = new Mesh(fullScreenTri, shadowMaterialVertical);\n\t\tvar scope = this;\n\t\tthis.enabled = false;\n\t\tthis.autoUpdate = true;\n\t\tthis.needsUpdate = false;\n\t\tthis.type = PCFShadowMap;\n\n\t\tthis.render = function (lights, scene, camera) {\n\t\t\tif (scope.enabled === false) return;\n\t\t\tif (scope.autoUpdate === false && scope.needsUpdate === false) return;\n\t\t\tif (lights.length === 0) return;\n\n\t\t\tvar currentRenderTarget = _renderer.getRenderTarget();\n\n\t\t\tvar activeCubeFace = _renderer.getActiveCubeFace();\n\n\t\t\tvar activeMipmapLevel = _renderer.getActiveMipmapLevel();\n\n\t\t\tvar _state = _renderer.state; // Set GL state for depth map.\n\n\t\t\t_state.setBlending(NoBlending);\n\n\t\t\t_state.buffers.color.setClear(1, 1, 1, 1);\n\n\t\t\t_state.buffers.depth.setTest(true);\n\n\t\t\t_state.setScissorTest(false); // render depth map\n\n\n\t\t\tfor (var i = 0, il = lights.length; i < il; i++) {\n\t\t\t\tvar light = lights[i];\n\t\t\t\tvar shadow = light.shadow;\n\n\t\t\t\tif (shadow === undefined) {\n\t\t\t\t\tconsole.warn('THREE.WebGLShadowMap:', light, 'has no shadow.');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (shadow.autoUpdate === false && shadow.needsUpdate === false) continue;\n\n\t\t\t\t_shadowMapSize.copy(shadow.mapSize);\n\n\t\t\t\tvar shadowFrameExtents = shadow.getFrameExtents();\n\n\t\t\t\t_shadowMapSize.multiply(shadowFrameExtents);\n\n\t\t\t\t_viewportSize.copy(shadow.mapSize);\n\n\t\t\t\tif (_shadowMapSize.x > maxTextureSize || _shadowMapSize.y > maxTextureSize) {\n\t\t\t\t\tif (_shadowMapSize.x > maxTextureSize) {\n\t\t\t\t\t\t_viewportSize.x = Math.floor(maxTextureSize / shadowFrameExtents.x);\n\t\t\t\t\t\t_shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x;\n\t\t\t\t\t\tshadow.mapSize.x = _viewportSize.x;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (_shadowMapSize.y > maxTextureSize) {\n\t\t\t\t\t\t_viewportSize.y = Math.floor(maxTextureSize / shadowFrameExtents.y);\n\t\t\t\t\t\t_shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y;\n\t\t\t\t\t\tshadow.mapSize.y = _viewportSize.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (shadow.map === null && !shadow.isPointLightShadow && this.type === VSMShadowMap) {\n\t\t\t\t\tvar pars = {\n\t\t\t\t\t\tminFilter: LinearFilter,\n\t\t\t\t\t\tmagFilter: LinearFilter,\n\t\t\t\t\t\tformat: RGBAFormat\n\t\t\t\t\t};\n\t\t\t\t\tshadow.map = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, pars);\n\t\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\t\t\t\t\tshadow.mapPass = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, pars);\n\t\t\t\t\tshadow.camera.updateProjectionMatrix();\n\t\t\t\t}\n\n\t\t\t\tif (shadow.map === null) {\n\t\t\t\t\tvar _pars = {\n\t\t\t\t\t\tminFilter: NearestFilter,\n\t\t\t\t\t\tmagFilter: NearestFilter,\n\t\t\t\t\t\tformat: RGBAFormat\n\t\t\t\t\t};\n\t\t\t\t\tshadow.map = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, _pars);\n\t\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\t\t\t\t\tshadow.camera.updateProjectionMatrix();\n\t\t\t\t}\n\n\t\t\t\t_renderer.setRenderTarget(shadow.map);\n\n\t\t\t\t_renderer.clear();\n\n\t\t\t\tvar viewportCount = shadow.getViewportCount();\n\n\t\t\t\tfor (var vp = 0; vp < viewportCount; vp++) {\n\t\t\t\t\tvar viewport = shadow.getViewport(vp);\n\n\t\t\t\t\t_viewport.set(_viewportSize.x * viewport.x, _viewportSize.y * viewport.y, _viewportSize.x * viewport.z, _viewportSize.y * viewport.w);\n\n\t\t\t\t\t_state.viewport(_viewport);\n\n\t\t\t\t\tshadow.updateMatrices(light, vp);\n\t\t\t\t\t_frustum = shadow.getFrustum();\n\t\t\t\t\trenderObject(scene, camera, shadow.camera, light, this.type);\n\t\t\t\t} // do blur pass for VSM\n\n\n\t\t\t\tif (!shadow.isPointLightShadow && this.type === VSMShadowMap) {\n\t\t\t\t\tVSMPass(shadow, camera);\n\t\t\t\t}\n\n\t\t\t\tshadow.needsUpdate = false;\n\t\t\t}\n\n\t\t\tscope.needsUpdate = false;\n\n\t\t\t_renderer.setRenderTarget(currentRenderTarget, activeCubeFace, activeMipmapLevel);\n\t\t};\n\n\t\tfunction VSMPass(shadow, camera) {\n\t\t\tvar geometry = _objects.update(fullScreenMesh); // vertical pass\n\n\n\t\t\tshadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture;\n\t\t\tshadowMaterialVertical.uniforms.resolution.value = shadow.mapSize;\n\t\t\tshadowMaterialVertical.uniforms.radius.value = shadow.radius;\n\n\t\t\t_renderer.setRenderTarget(shadow.mapPass);\n\n\t\t\t_renderer.clear();\n\n\t\t\t_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null); // horizontal pass\n\n\n\t\t\tshadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;\n\t\t\tshadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;\n\t\t\tshadowMaterialHorizontal.uniforms.radius.value = shadow.radius;\n\n\t\t\t_renderer.setRenderTarget(shadow.map);\n\n\t\t\t_renderer.clear();\n\n\t\t\t_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);\n\t\t}\n\n\t\tfunction getDepthMaterialVariant(useMorphing, useSkinning, useInstancing) {\n\t\t\tvar index = useMorphing << 0 | useSkinning << 1 | useInstancing << 2;\n\t\t\tvar material = _depthMaterials[index];\n\n\t\t\tif (material === undefined) {\n\t\t\t\tmaterial = new MeshDepthMaterial({\n\t\t\t\t\tdepthPacking: RGBADepthPacking,\n\t\t\t\t\tmorphTargets: useMorphing,\n\t\t\t\t\tskinning: useSkinning\n\t\t\t\t});\n\t\t\t\t_depthMaterials[index] = material;\n\t\t\t}\n\n\t\t\treturn material;\n\t\t}\n\n\t\tfunction getDistanceMaterialVariant(useMorphing, useSkinning, useInstancing) {\n\t\t\tvar index = useMorphing << 0 | useSkinning << 1 | useInstancing << 2;\n\t\t\tvar material = _distanceMaterials[index];\n\n\t\t\tif (material === undefined) {\n\t\t\t\tmaterial = new MeshDistanceMaterial({\n\t\t\t\t\tmorphTargets: useMorphing,\n\t\t\t\t\tskinning: useSkinning\n\t\t\t\t});\n\t\t\t\t_distanceMaterials[index] = material;\n\t\t\t}\n\n\t\t\treturn material;\n\t\t}\n\n\t\tfunction getDepthMaterial(object, geometry, material, light, shadowCameraNear, shadowCameraFar, type) {\n\t\t\tvar result = null;\n\t\t\tvar getMaterialVariant = getDepthMaterialVariant;\n\t\t\tvar customMaterial = object.customDepthMaterial;\n\n\t\t\tif (light.isPointLight === true) {\n\t\t\t\tgetMaterialVariant = getDistanceMaterialVariant;\n\t\t\t\tcustomMaterial = object.customDistanceMaterial;\n\t\t\t}\n\n\t\t\tif (customMaterial === undefined) {\n\t\t\t\tvar useMorphing = false;\n\n\t\t\t\tif (material.morphTargets === true) {\n\t\t\t\t\tuseMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0;\n\t\t\t\t}\n\n\t\t\t\tvar useSkinning = false;\n\n\t\t\t\tif (object.isSkinnedMesh === true) {\n\t\t\t\t\tif (material.skinning === true) {\n\t\t\t\t\t\tuseSkinning = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:', object);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar useInstancing = object.isInstancedMesh === true;\n\t\t\t\tresult = getMaterialVariant(useMorphing, useSkinning, useInstancing);\n\t\t\t} else {\n\t\t\t\tresult = customMaterial;\n\t\t\t}\n\n\t\t\tif (_renderer.localClippingEnabled && material.clipShadows === true && material.clippingPlanes.length !== 0) {\n\t\t\t\t// in this case we need a unique material instance reflecting the\n\t\t\t\t// appropriate state\n\t\t\t\tvar keyA = result.uuid,\n\t\t\t\t\t\tkeyB = material.uuid;\n\t\t\t\tvar materialsForVariant = _materialCache[keyA];\n\n\t\t\t\tif (materialsForVariant === undefined) {\n\t\t\t\t\tmaterialsForVariant = {};\n\t\t\t\t\t_materialCache[keyA] = materialsForVariant;\n\t\t\t\t}\n\n\t\t\t\tvar cachedMaterial = materialsForVariant[keyB];\n\n\t\t\t\tif (cachedMaterial === undefined) {\n\t\t\t\t\tcachedMaterial = result.clone();\n\t\t\t\t\tmaterialsForVariant[keyB] = cachedMaterial;\n\t\t\t\t}\n\n\t\t\t\tresult = cachedMaterial;\n\t\t\t}\n\n\t\t\tresult.visible = material.visible;\n\t\t\tresult.wireframe = material.wireframe;\n\n\t\t\tif (type === VSMShadowMap) {\n\t\t\t\tresult.side = material.shadowSide !== null ? material.shadowSide : material.side;\n\t\t\t} else {\n\t\t\t\tresult.side = material.shadowSide !== null ? material.shadowSide : shadowSide[material.side];\n\t\t\t}\n\n\t\t\tresult.clipShadows = material.clipShadows;\n\t\t\tresult.clippingPlanes = material.clippingPlanes;\n\t\t\tresult.clipIntersection = material.clipIntersection;\n\t\t\tresult.wireframeLinewidth = material.wireframeLinewidth;\n\t\t\tresult.linewidth = material.linewidth;\n\n\t\t\tif (light.isPointLight === true && result.isMeshDistanceMaterial === true) {\n\t\t\t\tresult.referencePosition.setFromMatrixPosition(light.matrixWorld);\n\t\t\t\tresult.nearDistance = shadowCameraNear;\n\t\t\t\tresult.farDistance = shadowCameraFar;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tfunction renderObject(object, camera, shadowCamera, light, type) {\n\t\t\tif (object.visible === false) return;\n\t\t\tvar visible = object.layers.test(camera.layers);\n\n\t\t\tif (visible && (object.isMesh || object.isLine || object.isPoints)) {\n\t\t\t\tif ((object.castShadow || object.receiveShadow && type === VSMShadowMap) && (!object.frustumCulled || _frustum.intersectsObject(object))) {\n\t\t\t\t\tobject.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse, object.matrixWorld);\n\n\t\t\t\t\tvar geometry = _objects.update(object);\n\n\t\t\t\t\tvar material = object.material;\n\n\t\t\t\t\tif (Array.isArray(material)) {\n\t\t\t\t\t\tvar groups = geometry.groups;\n\n\t\t\t\t\t\tfor (var k = 0, kl = groups.length; k < kl; k++) {\n\t\t\t\t\t\t\tvar group = groups[k];\n\t\t\t\t\t\t\tvar groupMaterial = material[group.materialIndex];\n\n\t\t\t\t\t\t\tif (groupMaterial && groupMaterial.visible) {\n\t\t\t\t\t\t\t\tvar depthMaterial = getDepthMaterial(object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type);\n\n\t\t\t\t\t\t\t\t_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (material.visible) {\n\t\t\t\t\t\tvar _depthMaterial = getDepthMaterial(object, geometry, material, light, shadowCamera.near, shadowCamera.far, type);\n\n\t\t\t\t\t\t_renderer.renderBufferDirect(shadowCamera, null, geometry, _depthMaterial, object, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\trenderObject(children[i], camera, shadowCamera, light, type);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction WebGLState(gl, extensions, capabilities) {\n\t\tvar _equationToGL, _factorToGL;\n\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\n\t\tfunction ColorBuffer() {\n\t\t\tvar locked = false;\n\t\t\tvar color = new Vector4();\n\t\t\tvar currentColorMask = null;\n\t\t\tvar currentColorClear = new Vector4(0, 0, 0, 0);\n\t\t\treturn {\n\t\t\t\tsetMask: function setMask(colorMask) {\n\t\t\t\t\tif (currentColorMask !== colorMask && !locked) {\n\t\t\t\t\t\tgl.colorMask(colorMask, colorMask, colorMask, colorMask);\n\t\t\t\t\t\tcurrentColorMask = colorMask;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetLocked: function setLocked(lock) {\n\t\t\t\t\tlocked = lock;\n\t\t\t\t},\n\t\t\t\tsetClear: function setClear(r, g, b, a, premultipliedAlpha) {\n\t\t\t\t\tif (premultipliedAlpha === true) {\n\t\t\t\t\t\tr *= a;\n\t\t\t\t\t\tg *= a;\n\t\t\t\t\t\tb *= a;\n\t\t\t\t\t}\n\n\t\t\t\t\tcolor.set(r, g, b, a);\n\n\t\t\t\t\tif (currentColorClear.equals(color) === false) {\n\t\t\t\t\t\tgl.clearColor(r, g, b, a);\n\t\t\t\t\t\tcurrentColorClear.copy(color);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\treset: function reset() {\n\t\t\t\t\tlocked = false;\n\t\t\t\t\tcurrentColorMask = null;\n\t\t\t\t\tcurrentColorClear.set(-1, 0, 0, 0); // set to invalid state\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tfunction DepthBuffer() {\n\t\t\tvar locked = false;\n\t\t\tvar currentDepthMask = null;\n\t\t\tvar currentDepthFunc = null;\n\t\t\tvar currentDepthClear = null;\n\t\t\treturn {\n\t\t\t\tsetTest: function setTest(depthTest) {\n\t\t\t\t\tif (depthTest) {\n\t\t\t\t\t\tenable(2929);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisable(2929);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetMask: function setMask(depthMask) {\n\t\t\t\t\tif (currentDepthMask !== depthMask && !locked) {\n\t\t\t\t\t\tgl.depthMask(depthMask);\n\t\t\t\t\t\tcurrentDepthMask = depthMask;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetFunc: function setFunc(depthFunc) {\n\t\t\t\t\tif (currentDepthFunc !== depthFunc) {\n\t\t\t\t\t\tif (depthFunc) {\n\t\t\t\t\t\t\tswitch (depthFunc) {\n\t\t\t\t\t\t\t\tcase NeverDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(512);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase AlwaysDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(519);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase LessDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(513);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase LessEqualDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(515);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase EqualDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(514);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase GreaterEqualDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(518);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase GreaterDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(516);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase NotEqualDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(517);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(515);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tgl.depthFunc(515);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrentDepthFunc = depthFunc;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetLocked: function setLocked(lock) {\n\t\t\t\t\tlocked = lock;\n\t\t\t\t},\n\t\t\t\tsetClear: function setClear(depth) {\n\t\t\t\t\tif (currentDepthClear !== depth) {\n\t\t\t\t\t\tgl.clearDepth(depth);\n\t\t\t\t\t\tcurrentDepthClear = depth;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\treset: function reset() {\n\t\t\t\t\tlocked = false;\n\t\t\t\t\tcurrentDepthMask = null;\n\t\t\t\t\tcurrentDepthFunc = null;\n\t\t\t\t\tcurrentDepthClear = null;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tfunction StencilBuffer() {\n\t\t\tvar locked = false;\n\t\t\tvar currentStencilMask = null;\n\t\t\tvar currentStencilFunc = null;\n\t\t\tvar currentStencilRef = null;\n\t\t\tvar currentStencilFuncMask = null;\n\t\t\tvar currentStencilFail = null;\n\t\t\tvar currentStencilZFail = null;\n\t\t\tvar currentStencilZPass = null;\n\t\t\tvar currentStencilClear = null;\n\t\t\treturn {\n\t\t\t\tsetTest: function setTest(stencilTest) {\n\t\t\t\t\tif (!locked) {\n\t\t\t\t\t\tif (stencilTest) {\n\t\t\t\t\t\t\tenable(2960);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdisable(2960);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetMask: function setMask(stencilMask) {\n\t\t\t\t\tif (currentStencilMask !== stencilMask && !locked) {\n\t\t\t\t\t\tgl.stencilMask(stencilMask);\n\t\t\t\t\t\tcurrentStencilMask = stencilMask;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetFunc: function setFunc(stencilFunc, stencilRef, stencilMask) {\n\t\t\t\t\tif (currentStencilFunc !== stencilFunc || currentStencilRef !== stencilRef || currentStencilFuncMask !== stencilMask) {\n\t\t\t\t\t\tgl.stencilFunc(stencilFunc, stencilRef, stencilMask);\n\t\t\t\t\t\tcurrentStencilFunc = stencilFunc;\n\t\t\t\t\t\tcurrentStencilRef = stencilRef;\n\t\t\t\t\t\tcurrentStencilFuncMask = stencilMask;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetOp: function setOp(stencilFail, stencilZFail, stencilZPass) {\n\t\t\t\t\tif (currentStencilFail !== stencilFail || currentStencilZFail !== stencilZFail || currentStencilZPass !== stencilZPass) {\n\t\t\t\t\t\tgl.stencilOp(stencilFail, stencilZFail, stencilZPass);\n\t\t\t\t\t\tcurrentStencilFail = stencilFail;\n\t\t\t\t\t\tcurrentStencilZFail = stencilZFail;\n\t\t\t\t\t\tcurrentStencilZPass = stencilZPass;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetLocked: function setLocked(lock) {\n\t\t\t\t\tlocked = lock;\n\t\t\t\t},\n\t\t\t\tsetClear: function setClear(stencil) {\n\t\t\t\t\tif (currentStencilClear !== stencil) {\n\t\t\t\t\t\tgl.clearStencil(stencil);\n\t\t\t\t\t\tcurrentStencilClear = stencil;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\treset: function reset() {\n\t\t\t\t\tlocked = false;\n\t\t\t\t\tcurrentStencilMask = null;\n\t\t\t\t\tcurrentStencilFunc = null;\n\t\t\t\t\tcurrentStencilRef = null;\n\t\t\t\t\tcurrentStencilFuncMask = null;\n\t\t\t\t\tcurrentStencilFail = null;\n\t\t\t\t\tcurrentStencilZFail = null;\n\t\t\t\t\tcurrentStencilZPass = null;\n\t\t\t\t\tcurrentStencilClear = null;\n\t\t\t\t}\n\t\t\t};\n\t\t} //\n\n\n\t\tvar colorBuffer = new ColorBuffer();\n\t\tvar depthBuffer = new DepthBuffer();\n\t\tvar stencilBuffer = new StencilBuffer();\n\t\tvar enabledCapabilities = {};\n\t\tvar currentProgram = null;\n\t\tvar currentBlendingEnabled = null;\n\t\tvar currentBlending = null;\n\t\tvar currentBlendEquation = null;\n\t\tvar currentBlendSrc = null;\n\t\tvar currentBlendDst = null;\n\t\tvar currentBlendEquationAlpha = null;\n\t\tvar currentBlendSrcAlpha = null;\n\t\tvar currentBlendDstAlpha = null;\n\t\tvar currentPremultipledAlpha = false;\n\t\tvar currentFlipSided = null;\n\t\tvar currentCullFace = null;\n\t\tvar currentLineWidth = null;\n\t\tvar currentPolygonOffsetFactor = null;\n\t\tvar currentPolygonOffsetUnits = null;\n\t\tvar maxTextures = gl.getParameter(35661);\n\t\tvar lineWidthAvailable = false;\n\t\tvar version = 0;\n\t\tvar glVersion = gl.getParameter(7938);\n\n\t\tif (glVersion.indexOf('WebGL') !== -1) {\n\t\t\tversion = parseFloat(/^WebGL (\\d)/.exec(glVersion)[1]);\n\t\t\tlineWidthAvailable = version >= 1.0;\n\t\t} else if (glVersion.indexOf('OpenGL ES') !== -1) {\n\t\t\tversion = parseFloat(/^OpenGL ES (\\d)/.exec(glVersion)[1]);\n\t\t\tlineWidthAvailable = version >= 2.0;\n\t\t}\n\n\t\tvar currentTextureSlot = null;\n\t\tvar currentBoundTextures = {};\n\t\tvar currentScissor = new Vector4();\n\t\tvar currentViewport = new Vector4();\n\n\t\tfunction createTexture(type, target, count) {\n\t\t\tvar data = new Uint8Array(4); // 4 is required to match default unpack alignment of 4.\n\n\t\t\tvar texture = gl.createTexture();\n\t\t\tgl.bindTexture(type, texture);\n\t\t\tgl.texParameteri(type, 10241, 9728);\n\t\t\tgl.texParameteri(type, 10240, 9728);\n\n\t\t\tfor (var i = 0; i < count; i++) {\n\t\t\t\tgl.texImage2D(target + i, 0, 6408, 1, 1, 0, 6408, 5121, data);\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\n\t\tvar emptyTextures = {};\n\t\temptyTextures[3553] = createTexture(3553, 3553, 1);\n\t\temptyTextures[34067] = createTexture(34067, 34069, 6); // init\n\n\t\tcolorBuffer.setClear(0, 0, 0, 1);\n\t\tdepthBuffer.setClear(1);\n\t\tstencilBuffer.setClear(0);\n\t\tenable(2929);\n\t\tdepthBuffer.setFunc(LessEqualDepth);\n\t\tsetFlipSided(false);\n\t\tsetCullFace(CullFaceBack);\n\t\tenable(2884);\n\t\tsetBlending(NoBlending); //\n\n\t\tfunction enable(id) {\n\t\t\tif (enabledCapabilities[id] !== true) {\n\t\t\t\tgl.enable(id);\n\t\t\t\tenabledCapabilities[id] = true;\n\t\t\t}\n\t\t}\n\n\t\tfunction disable(id) {\n\t\t\tif (enabledCapabilities[id] !== false) {\n\t\t\t\tgl.disable(id);\n\t\t\t\tenabledCapabilities[id] = false;\n\t\t\t}\n\t\t}\n\n\t\tfunction useProgram(program) {\n\t\t\tif (currentProgram !== program) {\n\t\t\t\tgl.useProgram(program);\n\t\t\t\tcurrentProgram = program;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tvar equationToGL = (_equationToGL = {}, _equationToGL[AddEquation] = 32774, _equationToGL[SubtractEquation] = 32778, _equationToGL[ReverseSubtractEquation] = 32779, _equationToGL);\n\n\t\tif (isWebGL2) {\n\t\t\tequationToGL[MinEquation] = 32775;\n\t\t\tequationToGL[MaxEquation] = 32776;\n\t\t} else {\n\t\t\tvar extension = extensions.get('EXT_blend_minmax');\n\n\t\t\tif (extension !== null) {\n\t\t\t\tequationToGL[MinEquation] = extension.MIN_EXT;\n\t\t\t\tequationToGL[MaxEquation] = extension.MAX_EXT;\n\t\t\t}\n\t\t}\n\n\t\tvar factorToGL = (_factorToGL = {}, _factorToGL[ZeroFactor] = 0, _factorToGL[OneFactor] = 1, _factorToGL[SrcColorFactor] = 768, _factorToGL[SrcAlphaFactor] = 770, _factorToGL[SrcAlphaSaturateFactor] = 776, _factorToGL[DstColorFactor] = 774, _factorToGL[DstAlphaFactor] = 772, _factorToGL[OneMinusSrcColorFactor] = 769, _factorToGL[OneMinusSrcAlphaFactor] = 771, _factorToGL[OneMinusDstColorFactor] = 775, _factorToGL[OneMinusDstAlphaFactor] = 773, _factorToGL);\n\n\t\tfunction setBlending(blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha) {\n\t\t\tif (blending === NoBlending) {\n\t\t\t\tif (currentBlendingEnabled) {\n\t\t\t\t\tdisable(3042);\n\t\t\t\t\tcurrentBlendingEnabled = false;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!currentBlendingEnabled) {\n\t\t\t\tenable(3042);\n\t\t\t\tcurrentBlendingEnabled = true;\n\t\t\t}\n\n\t\t\tif (blending !== CustomBlending) {\n\t\t\t\tif (blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha) {\n\t\t\t\t\tif (currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation) {\n\t\t\t\t\t\tgl.blendEquation(32774);\n\t\t\t\t\t\tcurrentBlendEquation = AddEquation;\n\t\t\t\t\t\tcurrentBlendEquationAlpha = AddEquation;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (premultipliedAlpha) {\n\t\t\t\t\t\tswitch (blending) {\n\t\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\t\tgl.blendFuncSeparate(1, 771, 1, 771);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\t\tgl.blendFunc(1, 1);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\t\tgl.blendFuncSeparate(0, 0, 769, 771);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\t\tgl.blendFuncSeparate(0, 768, 0, 770);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tconsole.error('THREE.WebGLState: Invalid blending: ', blending);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tswitch (blending) {\n\t\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\t\tgl.blendFuncSeparate(770, 771, 1, 771);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\t\tgl.blendFunc(770, 1);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\t\tgl.blendFunc(0, 769);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\t\tgl.blendFunc(0, 768);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tconsole.error('THREE.WebGLState: Invalid blending: ', blending);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentBlendSrc = null;\n\t\t\t\t\tcurrentBlendDst = null;\n\t\t\t\t\tcurrentBlendSrcAlpha = null;\n\t\t\t\t\tcurrentBlendDstAlpha = null;\n\t\t\t\t\tcurrentBlending = blending;\n\t\t\t\t\tcurrentPremultipledAlpha = premultipliedAlpha;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t} // custom blending\n\n\n\t\t\tblendEquationAlpha = blendEquationAlpha || blendEquation;\n\t\t\tblendSrcAlpha = blendSrcAlpha || blendSrc;\n\t\t\tblendDstAlpha = blendDstAlpha || blendDst;\n\n\t\t\tif (blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha) {\n\t\t\t\tgl.blendEquationSeparate(equationToGL[blendEquation], equationToGL[blendEquationAlpha]);\n\t\t\t\tcurrentBlendEquation = blendEquation;\n\t\t\t\tcurrentBlendEquationAlpha = blendEquationAlpha;\n\t\t\t}\n\n\t\t\tif (blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha) {\n\t\t\t\tgl.blendFuncSeparate(factorToGL[blendSrc], factorToGL[blendDst], factorToGL[blendSrcAlpha], factorToGL[blendDstAlpha]);\n\t\t\t\tcurrentBlendSrc = blendSrc;\n\t\t\t\tcurrentBlendDst = blendDst;\n\t\t\t\tcurrentBlendSrcAlpha = blendSrcAlpha;\n\t\t\t\tcurrentBlendDstAlpha = blendDstAlpha;\n\t\t\t}\n\n\t\t\tcurrentBlending = blending;\n\t\t\tcurrentPremultipledAlpha = null;\n\t\t}\n\n\t\tfunction setMaterial(material, frontFaceCW) {\n\t\t\tmaterial.side === DoubleSide ? disable(2884) : enable(2884);\n\t\t\tvar flipSided = material.side === BackSide;\n\t\t\tif (frontFaceCW) flipSided = !flipSided;\n\t\t\tsetFlipSided(flipSided);\n\t\t\tmaterial.blending === NormalBlending && material.transparent === false ? setBlending(NoBlending) : setBlending(material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha);\n\t\t\tdepthBuffer.setFunc(material.depthFunc);\n\t\t\tdepthBuffer.setTest(material.depthTest);\n\t\t\tdepthBuffer.setMask(material.depthWrite);\n\t\t\tcolorBuffer.setMask(material.colorWrite);\n\t\t\tvar stencilWrite = material.stencilWrite;\n\t\t\tstencilBuffer.setTest(stencilWrite);\n\n\t\t\tif (stencilWrite) {\n\t\t\t\tstencilBuffer.setMask(material.stencilWriteMask);\n\t\t\t\tstencilBuffer.setFunc(material.stencilFunc, material.stencilRef, material.stencilFuncMask);\n\t\t\t\tstencilBuffer.setOp(material.stencilFail, material.stencilZFail, material.stencilZPass);\n\t\t\t}\n\n\t\t\tsetPolygonOffset(material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits);\n\t\t} //\n\n\n\t\tfunction setFlipSided(flipSided) {\n\t\t\tif (currentFlipSided !== flipSided) {\n\t\t\t\tif (flipSided) {\n\t\t\t\t\tgl.frontFace(2304);\n\t\t\t\t} else {\n\t\t\t\t\tgl.frontFace(2305);\n\t\t\t\t}\n\n\t\t\t\tcurrentFlipSided = flipSided;\n\t\t\t}\n\t\t}\n\n\t\tfunction setCullFace(cullFace) {\n\t\t\tif (cullFace !== CullFaceNone) {\n\t\t\t\tenable(2884);\n\n\t\t\t\tif (cullFace !== currentCullFace) {\n\t\t\t\t\tif (cullFace === CullFaceBack) {\n\t\t\t\t\t\tgl.cullFace(1029);\n\t\t\t\t\t} else if (cullFace === CullFaceFront) {\n\t\t\t\t\t\tgl.cullFace(1028);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgl.cullFace(1032);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdisable(2884);\n\t\t\t}\n\n\t\t\tcurrentCullFace = cullFace;\n\t\t}\n\n\t\tfunction setLineWidth(width) {\n\t\t\tif (width !== currentLineWidth) {\n\t\t\t\tif (lineWidthAvailable) gl.lineWidth(width);\n\t\t\t\tcurrentLineWidth = width;\n\t\t\t}\n\t\t}\n\n\t\tfunction setPolygonOffset(polygonOffset, factor, units) {\n\t\t\tif (polygonOffset) {\n\t\t\t\tenable(32823);\n\n\t\t\t\tif (currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units) {\n\t\t\t\t\tgl.polygonOffset(factor, units);\n\t\t\t\t\tcurrentPolygonOffsetFactor = factor;\n\t\t\t\t\tcurrentPolygonOffsetUnits = units;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdisable(32823);\n\t\t\t}\n\t\t}\n\n\t\tfunction setScissorTest(scissorTest) {\n\t\t\tif (scissorTest) {\n\t\t\t\tenable(3089);\n\t\t\t} else {\n\t\t\t\tdisable(3089);\n\t\t\t}\n\t\t} // texture\n\n\n\t\tfunction activeTexture(webglSlot) {\n\t\t\tif (webglSlot === undefined) webglSlot = 33984 + maxTextures - 1;\n\n\t\t\tif (currentTextureSlot !== webglSlot) {\n\t\t\t\tgl.activeTexture(webglSlot);\n\t\t\t\tcurrentTextureSlot = webglSlot;\n\t\t\t}\n\t\t}\n\n\t\tfunction bindTexture(webglType, webglTexture) {\n\t\t\tif (currentTextureSlot === null) {\n\t\t\t\tactiveTexture();\n\t\t\t}\n\n\t\t\tvar boundTexture = currentBoundTextures[currentTextureSlot];\n\n\t\t\tif (boundTexture === undefined) {\n\t\t\t\tboundTexture = {\n\t\t\t\t\ttype: undefined,\n\t\t\t\t\ttexture: undefined\n\t\t\t\t};\n\t\t\t\tcurrentBoundTextures[currentTextureSlot] = boundTexture;\n\t\t\t}\n\n\t\t\tif (boundTexture.type !== webglType || boundTexture.texture !== webglTexture) {\n\t\t\t\tgl.bindTexture(webglType, webglTexture || emptyTextures[webglType]);\n\t\t\t\tboundTexture.type = webglType;\n\t\t\t\tboundTexture.texture = webglTexture;\n\t\t\t}\n\t\t}\n\n\t\tfunction unbindTexture() {\n\t\t\tvar boundTexture = currentBoundTextures[currentTextureSlot];\n\n\t\t\tif (boundTexture !== undefined && boundTexture.type !== undefined) {\n\t\t\t\tgl.bindTexture(boundTexture.type, null);\n\t\t\t\tboundTexture.type = undefined;\n\t\t\t\tboundTexture.texture = undefined;\n\t\t\t}\n\t\t}\n\n\t\tfunction compressedTexImage2D() {\n\t\t\ttry {\n\t\t\t\tgl.compressedTexImage2D.apply(gl, arguments);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('THREE.WebGLState:', error);\n\t\t\t}\n\t\t}\n\n\t\tfunction texImage2D() {\n\t\t\ttry {\n\t\t\t\tgl.texImage2D.apply(gl, arguments);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('THREE.WebGLState:', error);\n\t\t\t}\n\t\t}\n\n\t\tfunction texImage3D() {\n\t\t\ttry {\n\t\t\t\tgl.texImage3D.apply(gl, arguments);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('THREE.WebGLState:', error);\n\t\t\t}\n\t\t} //\n\n\n\t\tfunction scissor(scissor) {\n\t\t\tif (currentScissor.equals(scissor) === false) {\n\t\t\t\tgl.scissor(scissor.x, scissor.y, scissor.z, scissor.w);\n\t\t\t\tcurrentScissor.copy(scissor);\n\t\t\t}\n\t\t}\n\n\t\tfunction viewport(viewport) {\n\t\t\tif (currentViewport.equals(viewport) === false) {\n\t\t\t\tgl.viewport(viewport.x, viewport.y, viewport.z, viewport.w);\n\t\t\t\tcurrentViewport.copy(viewport);\n\t\t\t}\n\t\t} //\n\n\n\t\tfunction reset() {\n\t\t\tenabledCapabilities = {};\n\t\t\tcurrentTextureSlot = null;\n\t\t\tcurrentBoundTextures = {};\n\t\t\tcurrentProgram = null;\n\t\t\tcurrentBlendingEnabled = null;\n\t\t\tcurrentBlending = null;\n\t\t\tcurrentBlendEquation = null;\n\t\t\tcurrentBlendSrc = null;\n\t\t\tcurrentBlendDst = null;\n\t\t\tcurrentBlendEquationAlpha = null;\n\t\t\tcurrentBlendSrcAlpha = null;\n\t\t\tcurrentBlendDstAlpha = null;\n\t\t\tcurrentPremultipledAlpha = false;\n\t\t\tcurrentFlipSided = null;\n\t\t\tcurrentCullFace = null;\n\t\t\tcurrentLineWidth = null;\n\t\t\tcurrentPolygonOffsetFactor = null;\n\t\t\tcurrentPolygonOffsetUnits = null;\n\t\t\tcolorBuffer.reset();\n\t\t\tdepthBuffer.reset();\n\t\t\tstencilBuffer.reset();\n\t\t}\n\n\t\treturn {\n\t\t\tbuffers: {\n\t\t\t\tcolor: colorBuffer,\n\t\t\t\tdepth: depthBuffer,\n\t\t\t\tstencil: stencilBuffer\n\t\t\t},\n\t\t\tenable: enable,\n\t\t\tdisable: disable,\n\t\t\tuseProgram: useProgram,\n\t\t\tsetBlending: setBlending,\n\t\t\tsetMaterial: setMaterial,\n\t\t\tsetFlipSided: setFlipSided,\n\t\t\tsetCullFace: setCullFace,\n\t\t\tsetLineWidth: setLineWidth,\n\t\t\tsetPolygonOffset: setPolygonOffset,\n\t\t\tsetScissorTest: setScissorTest,\n\t\t\tactiveTexture: activeTexture,\n\t\t\tbindTexture: bindTexture,\n\t\t\tunbindTexture: unbindTexture,\n\t\t\tcompressedTexImage2D: compressedTexImage2D,\n\t\t\ttexImage2D: texImage2D,\n\t\t\ttexImage3D: texImage3D,\n\t\t\tscissor: scissor,\n\t\t\tviewport: viewport,\n\t\t\treset: reset\n\t\t};\n\t}\n\n\tfunction WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info) {\n\t\tvar _wrappingToGL, _filterToGL;\n\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar maxTextures = capabilities.maxTextures;\n\t\tvar maxCubemapSize = capabilities.maxCubemapSize;\n\t\tvar maxTextureSize = capabilities.maxTextureSize;\n\t\tvar maxSamples = capabilities.maxSamples;\n\n\t\tvar _videoTextures = new WeakMap();\n\n\t\tvar _canvas; // cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas,\n\t\t// also OffscreenCanvas.getContext(\"webgl\"), but not OffscreenCanvas.getContext(\"2d\")!\n\t\t// Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d).\n\n\n\t\tvar useOffscreenCanvas = false;\n\n\t\ttry {\n\t\t\tuseOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' && new OffscreenCanvas(1, 1).getContext('2d') !== null;\n\t\t} catch (err) {// Ignore any errors\n\t\t}\n\n\t\tfunction createCanvas(width, height) {\n\t\t\t// Use OffscreenCanvas when available. Specially needed in web workers\n\t\t\treturn useOffscreenCanvas ? new OffscreenCanvas(width, height) : document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');\n\t\t}\n\n\t\tfunction resizeImage(image, needsPowerOfTwo, needsNewCanvas, maxSize) {\n\t\t\tvar scale = 1; // handle case if texture exceeds max size\n\n\t\t\tif (image.width > maxSize || image.height > maxSize) {\n\t\t\t\tscale = maxSize / Math.max(image.width, image.height);\n\t\t\t} // only perform resize if necessary\n\n\n\t\t\tif (scale < 1 || needsPowerOfTwo === true) {\n\t\t\t\t// only perform resize for certain image types\n\t\t\t\tif (typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement || typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap) {\n\t\t\t\t\tvar floor = needsPowerOfTwo ? MathUtils.floorPowerOfTwo : Math.floor;\n\t\t\t\t\tvar width = floor(scale * image.width);\n\t\t\t\t\tvar height = floor(scale * image.height);\n\t\t\t\t\tif (_canvas === undefined) _canvas = createCanvas(width, height); // cube textures can't reuse the same canvas\n\n\t\t\t\t\tvar canvas = needsNewCanvas ? createCanvas(width, height) : _canvas;\n\t\t\t\t\tcanvas.width = width;\n\t\t\t\t\tcanvas.height = height;\n\t\t\t\t\tvar context = canvas.getContext('2d');\n\t\t\t\t\tcontext.drawImage(image, 0, 0, width, height);\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').');\n\t\t\t\t\treturn canvas;\n\t\t\t\t} else {\n\t\t\t\t\tif ('data' in image) {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Image in DataTexture is too big (' + image.width + 'x' + image.height + ').');\n\t\t\t\t\t}\n\n\t\t\t\t\treturn image;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn image;\n\t\t}\n\n\t\tfunction isPowerOfTwo(image) {\n\t\t\treturn MathUtils.isPowerOfTwo(image.width) && MathUtils.isPowerOfTwo(image.height);\n\t\t}\n\n\t\tfunction textureNeedsPowerOfTwo(texture) {\n\t\t\tif (isWebGL2) return false;\n\t\t\treturn texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping || texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;\n\t\t}\n\n\t\tfunction textureNeedsGenerateMipmaps(texture, supportsMips) {\n\t\t\treturn texture.generateMipmaps && supportsMips && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;\n\t\t}\n\n\t\tfunction generateMipmap(target, texture, width, height) {\n\t\t\t_gl.generateMipmap(target);\n\n\t\t\tvar textureProperties = properties.get(texture); // Note: Math.log( x ) * Math.LOG2E used instead of Math.log2( x ) which is not supported by IE11\n\n\t\t\ttextureProperties.__maxMipLevel = Math.log(Math.max(width, height)) * Math.LOG2E;\n\t\t}\n\n\t\tfunction getInternalFormat(internalFormatName, glFormat, glType) {\n\t\t\tif (isWebGL2 === false) return glFormat;\n\n\t\t\tif (internalFormatName !== null) {\n\t\t\t\tif (_gl[internalFormatName] !== undefined) return _gl[internalFormatName];\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \\'' + internalFormatName + '\\'');\n\t\t\t}\n\n\t\t\tvar internalFormat = glFormat;\n\n\t\t\tif (glFormat === 6403) {\n\t\t\t\tif (glType === 5126) internalFormat = 33326;\n\t\t\t\tif (glType === 5131) internalFormat = 33325;\n\t\t\t\tif (glType === 5121) internalFormat = 33321;\n\t\t\t}\n\n\t\t\tif (glFormat === 6407) {\n\t\t\t\tif (glType === 5126) internalFormat = 34837;\n\t\t\t\tif (glType === 5131) internalFormat = 34843;\n\t\t\t\tif (glType === 5121) internalFormat = 32849;\n\t\t\t}\n\n\t\t\tif (glFormat === 6408) {\n\t\t\t\tif (glType === 5126) internalFormat = 34836;\n\t\t\t\tif (glType === 5131) internalFormat = 34842;\n\t\t\t\tif (glType === 5121) internalFormat = 32856;\n\t\t\t}\n\n\t\t\tif (internalFormat === 33325 || internalFormat === 33326 || internalFormat === 34842 || internalFormat === 34836) {\n\t\t\t\textensions.get('EXT_color_buffer_float');\n\t\t\t}\n\n\t\t\treturn internalFormat;\n\t\t} // Fallback filters for non-power-of-2 textures\n\n\n\t\tfunction filterFallback(f) {\n\t\t\tif (f === NearestFilter || f === NearestMipmapNearestFilter || f === NearestMipmapLinearFilter) {\n\t\t\t\treturn 9728;\n\t\t\t}\n\n\t\t\treturn 9729;\n\t\t} //\n\n\n\t\tfunction onTextureDispose(event) {\n\t\t\tvar texture = event.target;\n\t\t\ttexture.removeEventListener('dispose', onTextureDispose);\n\t\t\tdeallocateTexture(texture);\n\n\t\t\tif (texture.isVideoTexture) {\n\t\t\t\t_videoTextures.delete(texture);\n\t\t\t}\n\n\t\t\tinfo.memory.textures--;\n\t\t}\n\n\t\tfunction onRenderTargetDispose(event) {\n\t\t\tvar renderTarget = event.target;\n\t\t\trenderTarget.removeEventListener('dispose', onRenderTargetDispose);\n\t\t\tdeallocateRenderTarget(renderTarget);\n\t\t\tinfo.memory.textures--;\n\t\t} //\n\n\n\t\tfunction deallocateTexture(texture) {\n\t\t\tvar textureProperties = properties.get(texture);\n\t\t\tif (textureProperties.__webglInit === undefined) return;\n\n\t\t\t_gl.deleteTexture(textureProperties.__webglTexture);\n\n\t\t\tproperties.remove(texture);\n\t\t}\n\n\t\tfunction deallocateRenderTarget(renderTarget) {\n\t\t\tvar renderTargetProperties = properties.get(renderTarget);\n\t\t\tvar textureProperties = properties.get(renderTarget.texture);\n\t\t\tif (!renderTarget) return;\n\n\t\t\tif (textureProperties.__webglTexture !== undefined) {\n\t\t\t\t_gl.deleteTexture(textureProperties.__webglTexture);\n\t\t\t}\n\n\t\t\tif (renderTarget.depthTexture) {\n\t\t\t\trenderTarget.depthTexture.dispose();\n\t\t\t}\n\n\t\t\tif (renderTarget.isWebGLCubeRenderTarget) {\n\t\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\t\t_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i]);\n\n\t\t\t\t\tif (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer);\n\n\t\t\t\tif (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer);\n\t\t\t\tif (renderTargetProperties.__webglMultisampledFramebuffer) _gl.deleteFramebuffer(renderTargetProperties.__webglMultisampledFramebuffer);\n\t\t\t\tif (renderTargetProperties.__webglColorRenderbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglColorRenderbuffer);\n\t\t\t\tif (renderTargetProperties.__webglDepthRenderbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthRenderbuffer);\n\t\t\t}\n\n\t\t\tproperties.remove(renderTarget.texture);\n\t\t\tproperties.remove(renderTarget);\n\t\t} //\n\n\n\t\tvar textureUnits = 0;\n\n\t\tfunction resetTextureUnits() {\n\t\t\ttextureUnits = 0;\n\t\t}\n\n\t\tfunction allocateTextureUnit() {\n\t\t\tvar textureUnit = textureUnits;\n\n\t\t\tif (textureUnit >= maxTextures) {\n\t\t\t\tconsole.warn('THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + maxTextures);\n\t\t\t}\n\n\t\t\ttextureUnits += 1;\n\t\t\treturn textureUnit;\n\t\t} //\n\n\n\t\tfunction setTexture2D(texture, slot) {\n\t\t\tvar textureProperties = properties.get(texture);\n\t\t\tif (texture.isVideoTexture) updateVideoTexture(texture);\n\n\t\t\tif (texture.version > 0 && textureProperties.__version !== texture.version) {\n\t\t\t\tvar image = texture.image;\n\n\t\t\t\tif (image === undefined) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture marked for update but image is undefined');\n\t\t\t\t} else if (image.complete === false) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture marked for update but image is incomplete');\n\t\t\t\t} else {\n\t\t\t\t\tuploadTexture(textureProperties, texture, slot);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(3553, textureProperties.__webglTexture);\n\t\t}\n\n\t\tfunction setTexture2DArray(texture, slot) {\n\t\t\tvar textureProperties = properties.get(texture);\n\n\t\t\tif (texture.version > 0 && textureProperties.__version !== texture.version) {\n\t\t\t\tuploadTexture(textureProperties, texture, slot);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(35866, textureProperties.__webglTexture);\n\t\t}\n\n\t\tfunction setTexture3D(texture, slot) {\n\t\t\tvar textureProperties = properties.get(texture);\n\n\t\t\tif (texture.version > 0 && textureProperties.__version !== texture.version) {\n\t\t\t\tuploadTexture(textureProperties, texture, slot);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(32879, textureProperties.__webglTexture);\n\t\t}\n\n\t\tfunction setTextureCube(texture, slot) {\n\t\t\tvar textureProperties = properties.get(texture);\n\n\t\t\tif (texture.version > 0 && textureProperties.__version !== texture.version) {\n\t\t\t\tuploadCubeTexture(textureProperties, texture, slot);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(34067, textureProperties.__webglTexture);\n\t\t}\n\n\t\tvar wrappingToGL = (_wrappingToGL = {}, _wrappingToGL[RepeatWrapping] = 10497, _wrappingToGL[ClampToEdgeWrapping] = 33071, _wrappingToGL[MirroredRepeatWrapping] = 33648, _wrappingToGL);\n\t\tvar filterToGL = (_filterToGL = {}, _filterToGL[NearestFilter] = 9728, _filterToGL[NearestMipmapNearestFilter] = 9984, _filterToGL[NearestMipmapLinearFilter] = 9986, _filterToGL[LinearFilter] = 9729, _filterToGL[LinearMipmapNearestFilter] = 9985, _filterToGL[LinearMipmapLinearFilter] = 9987, _filterToGL);\n\n\t\tfunction setTextureParameters(textureType, texture, supportsMips) {\n\t\t\tif (supportsMips) {\n\t\t\t\t_gl.texParameteri(textureType, 10242, wrappingToGL[texture.wrapS]);\n\n\t\t\t\t_gl.texParameteri(textureType, 10243, wrappingToGL[texture.wrapT]);\n\n\t\t\t\tif (textureType === 32879 || textureType === 35866) {\n\t\t\t\t\t_gl.texParameteri(textureType, 32882, wrappingToGL[texture.wrapR]);\n\t\t\t\t}\n\n\t\t\t\t_gl.texParameteri(textureType, 10240, filterToGL[texture.magFilter]);\n\n\t\t\t\t_gl.texParameteri(textureType, 10241, filterToGL[texture.minFilter]);\n\t\t\t} else {\n\t\t\t\t_gl.texParameteri(textureType, 10242, 33071);\n\n\t\t\t\t_gl.texParameteri(textureType, 10243, 33071);\n\n\t\t\t\tif (textureType === 32879 || textureType === 35866) {\n\t\t\t\t\t_gl.texParameteri(textureType, 32882, 33071);\n\t\t\t\t}\n\n\t\t\t\tif (texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.');\n\t\t\t\t}\n\n\t\t\t\t_gl.texParameteri(textureType, 10240, filterFallback(texture.magFilter));\n\n\t\t\t\t_gl.texParameteri(textureType, 10241, filterFallback(texture.minFilter));\n\n\t\t\t\tif (texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar extension = extensions.get('EXT_texture_filter_anisotropic');\n\n\t\t\tif (extension) {\n\t\t\t\tif (texture.type === FloatType && extensions.get('OES_texture_float_linear') === null) return;\n\t\t\t\tif (texture.type === HalfFloatType && (isWebGL2 || extensions.get('OES_texture_half_float_linear')) === null) return;\n\n\t\t\t\tif (texture.anisotropy > 1 || properties.get(texture).__currentAnisotropy) {\n\t\t\t\t\t_gl.texParameterf(textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(texture.anisotropy, capabilities.getMaxAnisotropy()));\n\n\t\t\t\t\tproperties.get(texture).__currentAnisotropy = texture.anisotropy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction initTexture(textureProperties, texture) {\n\t\t\tif (textureProperties.__webglInit === undefined) {\n\t\t\t\ttextureProperties.__webglInit = true;\n\t\t\t\ttexture.addEventListener('dispose', onTextureDispose);\n\t\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\t\t\t\tinfo.memory.textures++;\n\t\t\t}\n\t\t}\n\n\t\tfunction uploadTexture(textureProperties, texture, slot) {\n\t\t\tvar textureType = 3553;\n\t\t\tif (texture.isDataTexture2DArray) textureType = 35866;\n\t\t\tif (texture.isDataTexture3D) textureType = 32879;\n\t\t\tinitTexture(textureProperties, texture);\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(textureType, textureProperties.__webglTexture);\n\n\t\t\t_gl.pixelStorei(37440, texture.flipY);\n\n\t\t\t_gl.pixelStorei(37441, texture.premultiplyAlpha);\n\n\t\t\t_gl.pixelStorei(3317, texture.unpackAlignment);\n\n\t\t\tvar needsPowerOfTwo = textureNeedsPowerOfTwo(texture) && isPowerOfTwo(texture.image) === false;\n\t\t\tvar image = resizeImage(texture.image, needsPowerOfTwo, false, maxTextureSize);\n\t\t\tvar supportsMips = isPowerOfTwo(image) || isWebGL2,\n\t\t\t\t\tglFormat = utils.convert(texture.format);\n\t\t\tvar glType = utils.convert(texture.type),\n\t\t\t\t\tglInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType);\n\t\t\tsetTextureParameters(textureType, texture, supportsMips);\n\t\t\tvar mipmap;\n\t\t\tvar mipmaps = texture.mipmaps;\n\n\t\t\tif (texture.isDepthTexture) {\n\t\t\t\t// populate depth texture with dummy data\n\t\t\t\tglInternalFormat = 6402;\n\n\t\t\t\tif (isWebGL2) {\n\t\t\t\t\tif (texture.type === FloatType) {\n\t\t\t\t\t\tglInternalFormat = 36012;\n\t\t\t\t\t} else if (texture.type === UnsignedIntType) {\n\t\t\t\t\t\tglInternalFormat = 33190;\n\t\t\t\t\t} else if (texture.type === UnsignedInt248Type) {\n\t\t\t\t\t\tglInternalFormat = 35056;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglInternalFormat = 33189; // WebGL2 requires sized internalformat for glTexImage2D\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (texture.type === FloatType) {\n\t\t\t\t\t\tconsole.error('WebGLRenderer: Floating point depth texture requires WebGL2.');\n\t\t\t\t\t}\n\t\t\t\t} // validation checks for WebGL 1\n\n\n\t\t\t\tif (texture.format === DepthFormat && glInternalFormat === 6402) {\n\t\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t\t// DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tif (texture.type !== UnsignedShortType && texture.type !== UnsignedIntType) {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.');\n\t\t\t\t\t\ttexture.type = UnsignedShortType;\n\t\t\t\t\t\tglType = utils.convert(texture.type);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (texture.format === DepthStencilFormat && glInternalFormat === 6402) {\n\t\t\t\t\t// Depth stencil textures need the DEPTH_STENCIL internal format\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tglInternalFormat = 34041; // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t\t// DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL.\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\n\t\t\t\t\tif (texture.type !== UnsignedInt248Type) {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.');\n\t\t\t\t\t\ttexture.type = UnsignedInt248Type;\n\t\t\t\t\t\tglType = utils.convert(texture.type);\n\t\t\t\t\t}\n\t\t\t\t} //\n\n\n\t\t\t\tstate.texImage2D(3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null);\n\t\t\t} else if (texture.isDataTexture) {\n\t\t\t\t// use manually created mipmaps if available\n\t\t\t\t// if there are no manual mipmaps\n\t\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\t\t\t\tif (mipmaps.length > 0 && supportsMips) {\n\t\t\t\t\tfor (var i = 0, il = mipmaps.length; i < il; i++) {\n\t\t\t\t\t\tmipmap = mipmaps[i];\n\t\t\t\t\t\tstate.texImage2D(3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.generateMipmaps = false;\n\t\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\t\t\t\t} else {\n\t\t\t\t\tstate.texImage2D(3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data);\n\t\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\t\t\t\t}\n\t\t\t} else if (texture.isCompressedTexture) {\n\t\t\t\tfor (var _i = 0, _il = mipmaps.length; _i < _il; _i++) {\n\t\t\t\t\tmipmap = mipmaps[_i];\n\n\t\t\t\t\tif (texture.format !== RGBAFormat && texture.format !== RGBFormat) {\n\t\t\t\t\t\tif (glFormat !== null) {\n\t\t\t\t\t\t\tstate.compressedTexImage2D(3553, _i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.texImage2D(3553, _i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\t\t\t} else if (texture.isDataTexture2DArray) {\n\t\t\t\tstate.texImage3D(35866, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data);\n\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\t\t\t} else if (texture.isDataTexture3D) {\n\t\t\t\tstate.texImage3D(32879, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data);\n\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\t\t\t} else {\n\t\t\t\t// regular Texture (image, video, canvas)\n\t\t\t\t// use manually created mipmaps if available\n\t\t\t\t// if there are no manual mipmaps\n\t\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\t\t\t\tif (mipmaps.length > 0 && supportsMips) {\n\t\t\t\t\tfor (var _i2 = 0, _il2 = mipmaps.length; _i2 < _il2; _i2++) {\n\t\t\t\t\t\tmipmap = mipmaps[_i2];\n\t\t\t\t\t\tstate.texImage2D(3553, _i2, glInternalFormat, glFormat, glType, mipmap);\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.generateMipmaps = false;\n\t\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\t\t\t\t} else {\n\t\t\t\t\tstate.texImage2D(3553, 0, glInternalFormat, glFormat, glType, image);\n\t\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (textureNeedsGenerateMipmaps(texture, supportsMips)) {\n\t\t\t\tgenerateMipmap(textureType, texture, image.width, image.height);\n\t\t\t}\n\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tif (texture.onUpdate) texture.onUpdate(texture);\n\t\t}\n\n\t\tfunction uploadCubeTexture(textureProperties, texture, slot) {\n\t\t\tif (texture.image.length !== 6) return;\n\t\t\tinitTexture(textureProperties, texture);\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(34067, textureProperties.__webglTexture);\n\n\t\t\t_gl.pixelStorei(37440, texture.flipY);\n\n\t\t\t_gl.pixelStorei(37441, texture.premultiplyAlpha);\n\n\t\t\t_gl.pixelStorei(3317, texture.unpackAlignment);\n\n\t\t\tvar isCompressed = texture && (texture.isCompressedTexture || texture.image[0].isCompressedTexture);\n\t\t\tvar isDataTexture = texture.image[0] && texture.image[0].isDataTexture;\n\t\t\tvar cubeImage = [];\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tif (!isCompressed && !isDataTexture) {\n\t\t\t\t\tcubeImage[i] = resizeImage(texture.image[i], false, true, maxCubemapSize);\n\t\t\t\t} else {\n\t\t\t\t\tcubeImage[i] = isDataTexture ? texture.image[i].image : texture.image[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar image = cubeImage[0],\n\t\t\t\t\tsupportsMips = isPowerOfTwo(image) || isWebGL2,\n\t\t\t\t\tglFormat = utils.convert(texture.format),\n\t\t\t\t\tglType = utils.convert(texture.type),\n\t\t\t\t\tglInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType);\n\t\t\tsetTextureParameters(34067, texture, supportsMips);\n\t\t\tvar mipmaps;\n\n\t\t\tif (isCompressed) {\n\t\t\t\tfor (var _i3 = 0; _i3 < 6; _i3++) {\n\t\t\t\t\tmipmaps = cubeImage[_i3].mipmaps;\n\n\t\t\t\t\tfor (var j = 0; j < mipmaps.length; j++) {\n\t\t\t\t\t\tvar mipmap = mipmaps[j];\n\n\t\t\t\t\t\tif (texture.format !== RGBAFormat && texture.format !== RGBFormat) {\n\t\t\t\t\t\t\tif (glFormat !== null) {\n\t\t\t\t\t\t\t\tstate.compressedTexImage2D(34069 + _i3, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstate.texImage2D(34069 + _i3, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\t\t\t} else {\n\t\t\t\tmipmaps = texture.mipmaps;\n\n\t\t\t\tfor (var _i4 = 0; _i4 < 6; _i4++) {\n\t\t\t\t\tif (isDataTexture) {\n\t\t\t\t\t\tstate.texImage2D(34069 + _i4, 0, glInternalFormat, cubeImage[_i4].width, cubeImage[_i4].height, 0, glFormat, glType, cubeImage[_i4].data);\n\n\t\t\t\t\t\tfor (var _j = 0; _j < mipmaps.length; _j++) {\n\t\t\t\t\t\t\tvar _mipmap = mipmaps[_j];\n\t\t\t\t\t\t\tvar mipmapImage = _mipmap.image[_i4].image;\n\t\t\t\t\t\t\tstate.texImage2D(34069 + _i4, _j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.texImage2D(34069 + _i4, 0, glInternalFormat, glFormat, glType, cubeImage[_i4]);\n\n\t\t\t\t\t\tfor (var _j2 = 0; _j2 < mipmaps.length; _j2++) {\n\t\t\t\t\t\t\tvar _mipmap2 = mipmaps[_j2];\n\t\t\t\t\t\t\tstate.texImage2D(34069 + _i4, _j2 + 1, glInternalFormat, glFormat, glType, _mipmap2.image[_i4]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length;\n\t\t\t}\n\n\t\t\tif (textureNeedsGenerateMipmaps(texture, supportsMips)) {\n\t\t\t\t// We assume images for cube map have the same size.\n\t\t\t\tgenerateMipmap(34067, texture, image.width, image.height);\n\t\t\t}\n\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tif (texture.onUpdate) texture.onUpdate(texture);\n\t\t} // Render targets\n\t\t// Setup storage for target texture and bind it to correct framebuffer\n\n\n\t\tfunction setupFrameBufferTexture(framebuffer, renderTarget, attachment, textureTarget) {\n\t\t\tvar glFormat = utils.convert(renderTarget.texture.format);\n\t\t\tvar glType = utils.convert(renderTarget.texture.type);\n\t\t\tvar glInternalFormat = getInternalFormat(renderTarget.texture.internalFormat, glFormat, glType);\n\t\t\tstate.texImage2D(textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null);\n\n\t\t\t_gl.bindFramebuffer(36160, framebuffer);\n\n\t\t\t_gl.framebufferTexture2D(36160, attachment, textureTarget, properties.get(renderTarget.texture).__webglTexture, 0);\n\n\t\t\t_gl.bindFramebuffer(36160, null);\n\t\t} // Setup storage for internal depth/stencil buffers and bind to correct framebuffer\n\n\n\t\tfunction setupRenderBufferStorage(renderbuffer, renderTarget, isMultisample) {\n\t\t\t_gl.bindRenderbuffer(36161, renderbuffer);\n\n\t\t\tif (renderTarget.depthBuffer && !renderTarget.stencilBuffer) {\n\t\t\t\tvar glInternalFormat = 33189;\n\n\t\t\t\tif (isMultisample) {\n\t\t\t\t\tvar depthTexture = renderTarget.depthTexture;\n\n\t\t\t\t\tif (depthTexture && depthTexture.isDepthTexture) {\n\t\t\t\t\t\tif (depthTexture.type === FloatType) {\n\t\t\t\t\t\t\tglInternalFormat = 36012;\n\t\t\t\t\t\t} else if (depthTexture.type === UnsignedIntType) {\n\t\t\t\t\t\t\tglInternalFormat = 33190;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar samples = getRenderTargetSamples(renderTarget);\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample(36161, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n\t\t\t\t} else {\n\t\t\t\t\t_gl.renderbufferStorage(36161, glInternalFormat, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\n\t\t\t\t_gl.framebufferRenderbuffer(36160, 36096, 36161, renderbuffer);\n\t\t\t} else if (renderTarget.depthBuffer && renderTarget.stencilBuffer) {\n\t\t\t\tif (isMultisample) {\n\t\t\t\t\tvar _samples = getRenderTargetSamples(renderTarget);\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample(36161, _samples, 35056, renderTarget.width, renderTarget.height);\n\t\t\t\t} else {\n\t\t\t\t\t_gl.renderbufferStorage(36161, 34041, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\n\t\t\t\t_gl.framebufferRenderbuffer(36160, 33306, 36161, renderbuffer);\n\t\t\t} else {\n\t\t\t\tvar glFormat = utils.convert(renderTarget.texture.format);\n\t\t\t\tvar glType = utils.convert(renderTarget.texture.type);\n\n\t\t\t\tvar _glInternalFormat = getInternalFormat(renderTarget.texture.internalFormat, glFormat, glType);\n\n\t\t\t\tif (isMultisample) {\n\t\t\t\t\tvar _samples2 = getRenderTargetSamples(renderTarget);\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample(36161, _samples2, _glInternalFormat, renderTarget.width, renderTarget.height);\n\t\t\t\t} else {\n\t\t\t\t\t_gl.renderbufferStorage(36161, _glInternalFormat, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_gl.bindRenderbuffer(36161, null);\n\t\t} // Setup resources for a Depth Texture for a FBO (needs an extension)\n\n\n\t\tfunction setupDepthTexture(framebuffer, renderTarget) {\n\t\t\tvar isCube = renderTarget && renderTarget.isWebGLCubeRenderTarget;\n\t\t\tif (isCube) throw new Error('Depth Texture with cube render targets is not supported');\n\n\t\t\t_gl.bindFramebuffer(36160, framebuffer);\n\n\t\t\tif (!(renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture)) {\n\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\t\t\t} // upload an empty depth texture with framebuffer size\n\n\n\t\t\tif (!properties.get(renderTarget.depthTexture).__webglTexture || renderTarget.depthTexture.image.width !== renderTarget.width || renderTarget.depthTexture.image.height !== renderTarget.height) {\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t}\n\n\t\t\tsetTexture2D(renderTarget.depthTexture, 0);\n\n\t\t\tvar webglDepthTexture = properties.get(renderTarget.depthTexture).__webglTexture;\n\n\t\t\tif (renderTarget.depthTexture.format === DepthFormat) {\n\t\t\t\t_gl.framebufferTexture2D(36160, 36096, 3553, webglDepthTexture, 0);\n\t\t\t} else if (renderTarget.depthTexture.format === DepthStencilFormat) {\n\t\t\t\t_gl.framebufferTexture2D(36160, 33306, 3553, webglDepthTexture, 0);\n\t\t\t} else {\n\t\t\t\tthrow new Error('Unknown depthTexture format');\n\t\t\t}\n\t\t} // Setup GL resources for a non-texture depth buffer\n\n\n\t\tfunction setupDepthRenderbuffer(renderTarget) {\n\t\t\tvar renderTargetProperties = properties.get(renderTarget);\n\t\t\tvar isCube = renderTarget.isWebGLCubeRenderTarget === true;\n\n\t\t\tif (renderTarget.depthTexture) {\n\t\t\t\tif (isCube) throw new Error('target.depthTexture not supported in Cube render targets');\n\t\t\t\tsetupDepthTexture(renderTargetProperties.__webglFramebuffer, renderTarget);\n\t\t\t} else {\n\t\t\t\tif (isCube) {\n\t\t\t\t\trenderTargetProperties.__webglDepthbuffer = [];\n\n\t\t\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\t\t\t_gl.bindFramebuffer(36160, renderTargetProperties.__webglFramebuffer[i]);\n\n\t\t\t\t\t\trenderTargetProperties.__webglDepthbuffer[i] = _gl.createRenderbuffer();\n\t\t\t\t\t\tsetupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i], renderTarget, false);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t_gl.bindFramebuffer(36160, renderTargetProperties.__webglFramebuffer);\n\n\t\t\t\t\trenderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer, renderTarget, false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_gl.bindFramebuffer(36160, null);\n\t\t} // Set up GL resources for the render target\n\n\n\t\tfunction setupRenderTarget(renderTarget) {\n\t\t\tvar renderTargetProperties = properties.get(renderTarget);\n\t\t\tvar textureProperties = properties.get(renderTarget.texture);\n\t\t\trenderTarget.addEventListener('dispose', onRenderTargetDispose);\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\t\t\tinfo.memory.textures++;\n\t\t\tvar isCube = renderTarget.isWebGLCubeRenderTarget === true;\n\t\t\tvar isMultisample = renderTarget.isWebGLMultisampleRenderTarget === true;\n\t\t\tvar supportsMips = isPowerOfTwo(renderTarget) || isWebGL2; // Handles WebGL2 RGBFormat fallback - #18858\n\n\t\t\tif (isWebGL2 && renderTarget.texture.format === RGBFormat && (renderTarget.texture.type === FloatType || renderTarget.texture.type === HalfFloatType)) {\n\t\t\t\trenderTarget.texture.format = RGBAFormat;\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.');\n\t\t\t} // Setup framebuffer\n\n\n\t\t\tif (isCube) {\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[i] = _gl.createFramebuffer();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t\tif (isMultisample) {\n\t\t\t\t\tif (isWebGL2) {\n\t\t\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer();\n\n\t\t\t\t\t\t_gl.bindRenderbuffer(36161, renderTargetProperties.__webglColorRenderbuffer);\n\n\t\t\t\t\t\tvar glFormat = utils.convert(renderTarget.texture.format);\n\t\t\t\t\t\tvar glType = utils.convert(renderTarget.texture.type);\n\t\t\t\t\t\tvar glInternalFormat = getInternalFormat(renderTarget.texture.internalFormat, glFormat, glType);\n\t\t\t\t\t\tvar samples = getRenderTargetSamples(renderTarget);\n\n\t\t\t\t\t\t_gl.renderbufferStorageMultisample(36161, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n\n\t\t\t\t\t\t_gl.bindFramebuffer(36160, renderTargetProperties.__webglMultisampledFramebuffer);\n\n\t\t\t\t\t\t_gl.framebufferRenderbuffer(36160, 36064, 36161, renderTargetProperties.__webglColorRenderbuffer);\n\n\t\t\t\t\t\t_gl.bindRenderbuffer(36161, null);\n\n\t\t\t\t\t\tif (renderTarget.depthBuffer) {\n\t\t\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\t\t\tsetupRenderBufferStorage(renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_gl.bindFramebuffer(36160, null);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // Setup color buffer\n\n\n\t\t\tif (isCube) {\n\t\t\t\tstate.bindTexture(34067, textureProperties.__webglTexture);\n\t\t\t\tsetTextureParameters(34067, renderTarget.texture, supportsMips);\n\n\t\t\t\tfor (var _i5 = 0; _i5 < 6; _i5++) {\n\t\t\t\t\tsetupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[_i5], renderTarget, 36064, 34069 + _i5);\n\t\t\t\t}\n\n\t\t\t\tif (textureNeedsGenerateMipmaps(renderTarget.texture, supportsMips)) {\n\t\t\t\t\tgenerateMipmap(34067, renderTarget.texture, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture(34067, null);\n\t\t\t} else {\n\t\t\t\tstate.bindTexture(3553, textureProperties.__webglTexture);\n\t\t\t\tsetTextureParameters(3553, renderTarget.texture, supportsMips);\n\t\t\t\tsetupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, 36064, 3553);\n\n\t\t\t\tif (textureNeedsGenerateMipmaps(renderTarget.texture, supportsMips)) {\n\t\t\t\t\tgenerateMipmap(3553, renderTarget.texture, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture(3553, null);\n\t\t\t} // Setup depth and stencil buffers\n\n\n\t\t\tif (renderTarget.depthBuffer) {\n\t\t\t\tsetupDepthRenderbuffer(renderTarget);\n\t\t\t}\n\t\t}\n\n\t\tfunction updateRenderTargetMipmap(renderTarget) {\n\t\t\tvar texture = renderTarget.texture;\n\t\t\tvar supportsMips = isPowerOfTwo(renderTarget) || isWebGL2;\n\n\t\t\tif (textureNeedsGenerateMipmaps(texture, supportsMips)) {\n\t\t\t\tvar target = renderTarget.isWebGLCubeRenderTarget ? 34067 : 3553;\n\n\t\t\t\tvar webglTexture = properties.get(texture).__webglTexture;\n\n\t\t\t\tstate.bindTexture(target, webglTexture);\n\t\t\t\tgenerateMipmap(target, texture, renderTarget.width, renderTarget.height);\n\t\t\t\tstate.bindTexture(target, null);\n\t\t\t}\n\t\t}\n\n\t\tfunction updateMultisampleRenderTarget(renderTarget) {\n\t\t\tif (renderTarget.isWebGLMultisampleRenderTarget) {\n\t\t\t\tif (isWebGL2) {\n\t\t\t\t\tvar renderTargetProperties = properties.get(renderTarget);\n\n\t\t\t\t\t_gl.bindFramebuffer(36008, renderTargetProperties.__webglMultisampledFramebuffer);\n\n\t\t\t\t\t_gl.bindFramebuffer(36009, renderTargetProperties.__webglFramebuffer);\n\n\t\t\t\t\tvar width = renderTarget.width;\n\t\t\t\t\tvar height = renderTarget.height;\n\t\t\t\t\tvar mask = 16384;\n\t\t\t\t\tif (renderTarget.depthBuffer) mask |= 256;\n\t\t\t\t\tif (renderTarget.stencilBuffer) mask |= 1024;\n\n\t\t\t\t\t_gl.blitFramebuffer(0, 0, width, height, 0, 0, width, height, mask, 9728);\n\n\t\t\t\t\t_gl.bindFramebuffer(36160, renderTargetProperties.__webglMultisampledFramebuffer); // see #18905\n\n\t\t\t\t} else {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction getRenderTargetSamples(renderTarget) {\n\t\t\treturn isWebGL2 && renderTarget.isWebGLMultisampleRenderTarget ? Math.min(maxSamples, renderTarget.samples) : 0;\n\t\t}\n\n\t\tfunction updateVideoTexture(texture) {\n\t\t\tvar frame = info.render.frame; // Check the last frame we updated the VideoTexture\n\n\t\t\tif (_videoTextures.get(texture) !== frame) {\n\t\t\t\t_videoTextures.set(texture, frame);\n\n\t\t\t\ttexture.update();\n\t\t\t}\n\t\t} // backwards compatibility\n\n\n\t\tvar warnedTexture2D = false;\n\t\tvar warnedTextureCube = false;\n\n\t\tfunction safeSetTexture2D(texture, slot) {\n\t\t\tif (texture && texture.isWebGLRenderTarget) {\n\t\t\t\tif (warnedTexture2D === false) {\n\t\t\t\t\tconsole.warn('THREE.WebGLTextures.safeSetTexture2D: don\\'t use render targets as textures. Use their .texture property instead.');\n\t\t\t\t\twarnedTexture2D = true;\n\t\t\t\t}\n\n\t\t\t\ttexture = texture.texture;\n\t\t\t}\n\n\t\t\tsetTexture2D(texture, slot);\n\t\t}\n\n\t\tfunction safeSetTextureCube(texture, slot) {\n\t\t\tif (texture && texture.isWebGLCubeRenderTarget) {\n\t\t\t\tif (warnedTextureCube === false) {\n\t\t\t\t\tconsole.warn('THREE.WebGLTextures.safeSetTextureCube: don\\'t use cube render targets as textures. Use their .texture property instead.');\n\t\t\t\t\twarnedTextureCube = true;\n\t\t\t\t}\n\n\t\t\t\ttexture = texture.texture;\n\t\t\t}\n\n\t\t\tsetTextureCube(texture, slot);\n\t\t} //\n\n\n\t\tthis.allocateTextureUnit = allocateTextureUnit;\n\t\tthis.resetTextureUnits = resetTextureUnits;\n\t\tthis.setTexture2D = setTexture2D;\n\t\tthis.setTexture2DArray = setTexture2DArray;\n\t\tthis.setTexture3D = setTexture3D;\n\t\tthis.setTextureCube = setTextureCube;\n\t\tthis.setupRenderTarget = setupRenderTarget;\n\t\tthis.updateRenderTargetMipmap = updateRenderTargetMipmap;\n\t\tthis.updateMultisampleRenderTarget = updateMultisampleRenderTarget;\n\t\tthis.safeSetTexture2D = safeSetTexture2D;\n\t\tthis.safeSetTextureCube = safeSetTextureCube;\n\t}\n\n\tfunction WebGLUtils(gl, extensions, capabilities) {\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\n\t\tfunction convert(p) {\n\t\t\tvar extension;\n\t\t\tif (p === UnsignedByteType) return 5121;\n\t\t\tif (p === UnsignedShort4444Type) return 32819;\n\t\t\tif (p === UnsignedShort5551Type) return 32820;\n\t\t\tif (p === UnsignedShort565Type) return 33635;\n\t\t\tif (p === ByteType) return 5120;\n\t\t\tif (p === ShortType) return 5122;\n\t\t\tif (p === UnsignedShortType) return 5123;\n\t\t\tif (p === IntType) return 5124;\n\t\t\tif (p === UnsignedIntType) return 5125;\n\t\t\tif (p === FloatType) return 5126;\n\n\t\t\tif (p === HalfFloatType) {\n\t\t\t\tif (isWebGL2) return 5131;\n\t\t\t\textension = extensions.get('OES_texture_half_float');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\treturn extension.HALF_FLOAT_OES;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === AlphaFormat) return 6406;\n\t\t\tif (p === RGBFormat) return 6407;\n\t\t\tif (p === RGBAFormat) return 6408;\n\t\t\tif (p === LuminanceFormat) return 6409;\n\t\t\tif (p === LuminanceAlphaFormat) return 6410;\n\t\t\tif (p === DepthFormat) return 6402;\n\t\t\tif (p === DepthStencilFormat) return 34041;\n\t\t\tif (p === RedFormat) return 6403; // WebGL2 formats.\n\n\t\t\tif (p === RedIntegerFormat) return 36244;\n\t\t\tif (p === RGFormat) return 33319;\n\t\t\tif (p === RGIntegerFormat) return 33320;\n\t\t\tif (p === RGBIntegerFormat) return 36248;\n\t\t\tif (p === RGBAIntegerFormat) return 36249;\n\n\t\t\tif (p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_s3tc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\tif (p === RGB_S3TC_DXT1_Format) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif (p === RGBA_S3TC_DXT1_Format) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif (p === RGBA_S3TC_DXT3_Format) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif (p === RGBA_S3TC_DXT5_Format) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_pvrtc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\tif (p === RGB_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif (p === RGB_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\tif (p === RGBA_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif (p === RGBA_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGB_ETC1_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_etc1');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\treturn extension.COMPRESSED_RGB_ETC1_WEBGL;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_etc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\tif (p === RGB_ETC2_Format) return extension.COMPRESSED_RGB8_ETC2;\n\t\t\t\t\tif (p === RGBA_ETC2_EAC_Format) return extension.COMPRESSED_RGBA8_ETC2_EAC;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format || p === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format || p === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format || p === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format || p === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format || p === SRGB8_ALPHA8_ASTC_4x4_Format || p === SRGB8_ALPHA8_ASTC_5x4_Format || p === SRGB8_ALPHA8_ASTC_5x5_Format || p === SRGB8_ALPHA8_ASTC_6x5_Format || p === SRGB8_ALPHA8_ASTC_6x6_Format || p === SRGB8_ALPHA8_ASTC_8x5_Format || p === SRGB8_ALPHA8_ASTC_8x6_Format || p === SRGB8_ALPHA8_ASTC_8x8_Format || p === SRGB8_ALPHA8_ASTC_10x5_Format || p === SRGB8_ALPHA8_ASTC_10x6_Format || p === SRGB8_ALPHA8_ASTC_10x8_Format || p === SRGB8_ALPHA8_ASTC_10x10_Format || p === SRGB8_ALPHA8_ASTC_12x10_Format || p === SRGB8_ALPHA8_ASTC_12x12_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_astc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\t// TODO Complete?\n\t\t\t\t\treturn p;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGBA_BPTC_Format) {\n\t\t\t\textension = extensions.get('EXT_texture_compression_bptc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\t// TODO Complete?\n\t\t\t\t\treturn p;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === UnsignedInt248Type) {\n\t\t\t\tif (isWebGL2) return 34042;\n\t\t\t\textension = extensions.get('WEBGL_depth_texture');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\treturn extension.UNSIGNED_INT_24_8_WEBGL;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tconvert: convert\n\t\t};\n\t}\n\n\tfunction Group() {\n\t\tObject3D.call(this);\n\t\tthis.type = 'Group';\n\t}\n\n\tGroup.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Group,\n\t\tisGroup: true\n\t});\n\n\tfunction ArrayCamera(array) {\n\t\tif (array === void 0) {\n\t\t\tarray = [];\n\t\t}\n\n\t\tPerspectiveCamera.call(this);\n\t\tthis.cameras = array;\n\t}\n\n\tArrayCamera.prototype = Object.assign(Object.create(PerspectiveCamera.prototype), {\n\t\tconstructor: ArrayCamera,\n\t\tisArrayCamera: true\n\t});\n\n\t/**\n\t * @author jsantell / https://www.jsantell.com/\n\t * @author mrdoob / http://mrdoob.com/\n\t */\n\tvar cameraLPos = new Vector3();\n\tvar cameraRPos = new Vector3();\n\t/**\n\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t * the cameras' projection and world matrices have already been set.\n\t * And that near and far planes are identical for both cameras.\n\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t */\n\n\tfunction setProjectionFromUnion(camera, cameraL, cameraR) {\n\t\tcameraLPos.setFromMatrixPosition(cameraL.matrixWorld);\n\t\tcameraRPos.setFromMatrixPosition(cameraR.matrixWorld);\n\t\tvar ipd = cameraLPos.distanceTo(cameraRPos);\n\t\tvar projL = cameraL.projectionMatrix.elements;\n\t\tvar projR = cameraR.projectionMatrix.elements; // VR systems will have identical far and near planes, and\n\t\t// most likely identical top and bottom frustum extents.\n\t\t// Use the left camera for these values.\n\n\t\tvar near = projL[14] / (projL[10] - 1);\n\t\tvar far = projL[14] / (projL[10] + 1);\n\t\tvar topFov = (projL[9] + 1) / projL[5];\n\t\tvar bottomFov = (projL[9] - 1) / projL[5];\n\t\tvar leftFov = (projL[8] - 1) / projL[0];\n\t\tvar rightFov = (projR[8] + 1) / projR[0];\n\t\tvar left = near * leftFov;\n\t\tvar right = near * rightFov; // Calculate the new camera's position offset from the\n\t\t// left camera. xOffset should be roughly half `ipd`.\n\n\t\tvar zOffset = ipd / (-leftFov + rightFov);\n\t\tvar xOffset = zOffset * -leftFov; // TODO: Better way to apply this offset?\n\n\t\tcameraL.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);\n\t\tcamera.translateX(xOffset);\n\t\tcamera.translateZ(zOffset);\n\t\tcamera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale);\n\t\tcamera.matrixWorldInverse.getInverse(camera.matrixWorld); // Find the union of the frustum values of the cameras and scale\n\t\t// the values so that the near plane's position does not change in world space,\n\t\t// although must now be relative to the new union camera.\n\n\t\tvar near2 = near + zOffset;\n\t\tvar far2 = far + zOffset;\n\t\tvar left2 = left - xOffset;\n\t\tvar right2 = right + (ipd - xOffset);\n\t\tvar top2 = topFov * far / far2 * near2;\n\t\tvar bottom2 = bottomFov * far / far2 * near2;\n\t\tcamera.projectionMatrix.makePerspective(left2, right2, top2, bottom2, near2, far2);\n\t}\n\n\t/**\n\t * @author mrdoob / http://mrdoob.com/\n\t */\n\n\tfunction WebVRManager(renderer) {\n\t\tvar renderWidth, renderHeight;\n\t\tvar scope = this;\n\t\tvar device = null;\n\t\tvar frameData = null;\n\t\tvar poseTarget = null;\n\t\tvar controllers = [];\n\t\tvar standingMatrix = new Matrix4();\n\t\tvar standingMatrixInverse = new Matrix4();\n\t\tvar framebufferScaleFactor = 1.0;\n\t\tvar referenceSpaceType = 'local-floor';\n\n\t\tif (typeof window !== 'undefined' && 'VRFrameData' in window) {\n\t\t\tframeData = new window.VRFrameData();\n\t\t\twindow.addEventListener('vrdisplaypresentchange', onVRDisplayPresentChange, false);\n\t\t}\n\n\t\tvar matrixWorldInverse = new Matrix4();\n\t\tvar tempQuaternion = new Quaternion();\n\t\tvar tempPosition = new Vector3();\n\t\tvar cameraL = new PerspectiveCamera();\n\t\tcameraL.viewport = new Vector4();\n\t\tcameraL.layers.enable(1);\n\t\tvar cameraR = new PerspectiveCamera();\n\t\tcameraR.viewport = new Vector4();\n\t\tcameraR.layers.enable(2);\n\t\tvar cameraVR = new ArrayCamera([cameraL, cameraR]);\n\t\tcameraVR.layers.enable(1);\n\t\tcameraVR.layers.enable(2);\n\t\tvar currentSize = new Vector2(),\n\t\t\t\tcurrentPixelRatio;\n\n\t\tfunction onVRDisplayPresentChange() {\n\t\t\tvar isPresenting = scope.isPresenting = device !== null && device.isPresenting === true;\n\n\t\t\tif (isPresenting) {\n\t\t\t\tvar eyeParameters = device.getEyeParameters('left');\n\t\t\t\trenderWidth = 2 * eyeParameters.renderWidth * framebufferScaleFactor;\n\t\t\t\trenderHeight = eyeParameters.renderHeight * framebufferScaleFactor;\n\t\t\t\tcurrentPixelRatio = renderer.getPixelRatio();\n\t\t\t\trenderer.getSize(currentSize);\n\t\t\t\trenderer.setDrawingBufferSize(renderWidth, renderHeight, 1);\n\t\t\t\tcameraL.viewport.set(0, 0, renderWidth / 2, renderHeight);\n\t\t\t\tcameraR.viewport.set(renderWidth / 2, 0, renderWidth / 2, renderHeight);\n\t\t\t\tanimation.start();\n\t\t\t\tscope.dispatchEvent({\n\t\t\t\t\ttype: 'sessionstart'\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (scope.enabled) {\n\t\t\t\t\trenderer.setDrawingBufferSize(currentSize.width, currentSize.height, currentPixelRatio);\n\t\t\t\t}\n\n\t\t\t\tanimation.stop();\n\t\t\t\tscope.dispatchEvent({\n\t\t\t\t\ttype: 'sessionend'\n\t\t\t\t});\n\t\t\t}\n\t\t} //\n\n\n\t\tvar triggers = [];\n\t\tvar grips = [];\n\n\t\tfunction findGamepad(id) {\n\t\t\tvar gamepads = navigator.getGamepads && navigator.getGamepads();\n\n\t\t\tfor (var i = 0, l = gamepads.length; i < l; i++) {\n\t\t\t\tvar gamepad = gamepads[i];\n\n\t\t\t\tif (gamepad && (gamepad.id === 'Daydream Controller' || gamepad.id === 'Gear VR Controller' || gamepad.id === 'Oculus Go Controller' || gamepad.id === 'OpenVR Gamepad' || gamepad.id.startsWith('Oculus Touch') || gamepad.id.startsWith('HTC Vive Focus') || gamepad.id.startsWith('Spatial Controller'))) {\n\t\t\t\t\tvar hand = gamepad.hand;\n\t\t\t\t\tif (id === 0 && (hand === '' || hand === 'right')) return gamepad;\n\t\t\t\t\tif (id === 1 && hand === 'left') return gamepad;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction updateControllers() {\n\t\t\tfor (var i = 0; i < controllers.length; i++) {\n\t\t\t\tvar controller = controllers[i];\n\t\t\t\tvar gamepad = findGamepad(i);\n\n\t\t\t\tif (gamepad !== undefined && gamepad.pose !== undefined) {\n\t\t\t\t\tif (gamepad.pose === null) return; // Pose\n\n\t\t\t\t\tvar pose = gamepad.pose;\n\t\t\t\t\tif (pose.hasPosition === false) controller.position.set(0.2, -0.6, -0.05);\n\t\t\t\t\tif (pose.position !== null) controller.position.fromArray(pose.position);\n\t\t\t\t\tif (pose.orientation !== null) controller.quaternion.fromArray(pose.orientation);\n\t\t\t\t\tcontroller.matrix.compose(controller.position, controller.quaternion, controller.scale);\n\t\t\t\t\tcontroller.matrix.premultiply(standingMatrix);\n\t\t\t\t\tcontroller.matrix.decompose(controller.position, controller.quaternion, controller.scale);\n\t\t\t\t\tcontroller.matrixWorldNeedsUpdate = true;\n\t\t\t\t\tcontroller.visible = true; // Trigger\n\n\t\t\t\t\tvar buttonId = gamepad.id === 'Daydream Controller' ? 0 : 1;\n\t\t\t\t\tif (triggers[i] === undefined) triggers[i] = false;\n\n\t\t\t\t\tif (triggers[i] !== gamepad.buttons[buttonId].pressed) {\n\t\t\t\t\t\ttriggers[i] = gamepad.buttons[buttonId].pressed;\n\n\t\t\t\t\t\tif (triggers[i] === true) {\n\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\ttype: 'selectstart'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\ttype: 'selectend'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\ttype: 'select'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} // Grip\n\n\n\t\t\t\t\tbuttonId = 2;\n\t\t\t\t\tif (grips[i] === undefined) grips[i] = false; // Skip if the grip button doesn't exist on this controller\n\n\t\t\t\t\tif (gamepad.buttons[buttonId] !== undefined) {\n\t\t\t\t\t\tif (grips[i] !== gamepad.buttons[buttonId].pressed) {\n\t\t\t\t\t\t\tgrips[i] = gamepad.buttons[buttonId].pressed;\n\n\t\t\t\t\t\t\tif (grips[i] === true) {\n\t\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\t\ttype: 'squeezestart'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\t\ttype: 'squeezeend'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\t\ttype: 'squeeze'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction updateViewportFromBounds(viewport, bounds) {\n\t\t\tif (bounds !== null && bounds.length === 4) {\n\t\t\t\tviewport.set(bounds[0] * renderWidth, bounds[1] * renderHeight, bounds[2] * renderWidth, bounds[3] * renderHeight);\n\t\t\t}\n\t\t} //\n\n\n\t\tthis.enabled = false;\n\n\t\tthis.getController = function (id) {\n\t\t\tvar controller = controllers[id];\n\n\t\t\tif (controller === undefined) {\n\t\t\t\tcontroller = new Group();\n\t\t\t\tcontroller.matrixAutoUpdate = false;\n\t\t\t\tcontroller.visible = false;\n\t\t\t\tcontrollers[id] = controller;\n\t\t\t}\n\n\t\t\treturn controller;\n\t\t};\n\n\t\tthis.getDevice = function () {\n\t\t\treturn device;\n\t\t};\n\n\t\tthis.setDevice = function (value) {\n\t\t\tif (value !== undefined) device = value;\n\t\t\tanimation.setContext(value);\n\t\t};\n\n\t\tthis.setFramebufferScaleFactor = function (value) {\n\t\t\tframebufferScaleFactor = value;\n\t\t};\n\n\t\tthis.setReferenceSpaceType = function (value) {\n\t\t\treferenceSpaceType = value;\n\t\t};\n\n\t\tthis.setPoseTarget = function (object) {\n\t\t\tif (object !== undefined) poseTarget = object;\n\t\t};\n\n\t\tthis.getCamera = function (camera) {\n\t\t\tvar userHeight = referenceSpaceType === 'local-floor' ? 1.6 : 0;\n\t\t\tdevice.depthNear = camera.near;\n\t\t\tdevice.depthFar = camera.far;\n\t\t\tdevice.getFrameData(frameData); //\n\n\t\t\tif (referenceSpaceType === 'local-floor') {\n\t\t\t\tvar stageParameters = device.stageParameters;\n\n\t\t\t\tif (stageParameters) {\n\t\t\t\t\tstandingMatrix.fromArray(stageParameters.sittingToStandingTransform);\n\t\t\t\t} else {\n\t\t\t\t\tstandingMatrix.makeTranslation(0, userHeight, 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar pose = frameData.pose;\n\t\t\tvar poseObject = poseTarget !== null ? poseTarget : camera; // We want to manipulate poseObject by its position and quaternion components since users may rely on them.\n\n\t\t\tposeObject.matrix.copy(standingMatrix);\n\t\t\tposeObject.matrix.decompose(poseObject.position, poseObject.quaternion, poseObject.scale);\n\n\t\t\tif (pose.orientation !== null) {\n\t\t\t\ttempQuaternion.fromArray(pose.orientation);\n\t\t\t\tposeObject.quaternion.multiply(tempQuaternion);\n\t\t\t}\n\n\t\t\tif (pose.position !== null) {\n\t\t\t\ttempQuaternion.setFromRotationMatrix(standingMatrix);\n\t\t\t\ttempPosition.fromArray(pose.position);\n\t\t\t\ttempPosition.applyQuaternion(tempQuaternion);\n\t\t\t\tposeObject.position.add(tempPosition);\n\t\t\t}\n\n\t\t\tposeObject.updateMatrixWorld();\n\t\t\tvar children = poseObject.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tchildren[i].updateMatrixWorld(true);\n\t\t\t} //\n\n\n\t\t\tcameraL.near = camera.near;\n\t\t\tcameraR.near = camera.near;\n\t\t\tcameraL.far = camera.far;\n\t\t\tcameraR.far = camera.far;\n\t\t\tcameraL.matrixWorldInverse.fromArray(frameData.leftViewMatrix);\n\t\t\tcameraR.matrixWorldInverse.fromArray(frameData.rightViewMatrix); // TODO (mrdoob) Double check this code\n\n\t\t\tstandingMatrixInverse.getInverse(standingMatrix);\n\n\t\t\tif (referenceSpaceType === 'local-floor') {\n\t\t\t\tcameraL.matrixWorldInverse.multiply(standingMatrixInverse);\n\t\t\t\tcameraR.matrixWorldInverse.multiply(standingMatrixInverse);\n\t\t\t}\n\n\t\t\tvar parent = poseObject.parent;\n\n\t\t\tif (parent !== null) {\n\t\t\t\tmatrixWorldInverse.getInverse(parent.matrixWorld);\n\t\t\t\tcameraL.matrixWorldInverse.multiply(matrixWorldInverse);\n\t\t\t\tcameraR.matrixWorldInverse.multiply(matrixWorldInverse);\n\t\t\t} // envMap and Mirror needs camera.matrixWorld\n\n\n\t\t\tcameraL.matrixWorld.getInverse(cameraL.matrixWorldInverse);\n\t\t\tcameraR.matrixWorld.getInverse(cameraR.matrixWorldInverse);\n\t\t\tcameraL.projectionMatrix.fromArray(frameData.leftProjectionMatrix);\n\t\t\tcameraR.projectionMatrix.fromArray(frameData.rightProjectionMatrix);\n\t\t\tsetProjectionFromUnion(cameraVR, cameraL, cameraR); //\n\n\t\t\tvar layers = device.getLayers();\n\n\t\t\tif (layers.length) {\n\t\t\t\tvar layer = layers[0];\n\t\t\t\tupdateViewportFromBounds(cameraL.viewport, layer.leftBounds);\n\t\t\t\tupdateViewportFromBounds(cameraR.viewport, layer.rightBounds);\n\t\t\t}\n\n\t\t\tupdateControllers();\n\t\t\treturn cameraVR;\n\t\t};\n\n\t\tthis.getStandingMatrix = function () {\n\t\t\treturn standingMatrix;\n\t\t};\n\n\t\tthis.isPresenting = false; // Animation Loop\n\n\t\tvar animation = new WebGLAnimation();\n\n\t\tthis.setAnimationLoop = function (callback) {\n\t\t\tanimation.setAnimationLoop(callback);\n\t\t\tif (this.isPresenting) animation.start();\n\t\t};\n\n\t\tthis.submitFrame = function () {\n\t\t\tif (this.isPresenting) device.submitFrame();\n\t\t};\n\n\t\tthis.dispose = function () {\n\t\t\tif (typeof window !== 'undefined') {\n\t\t\t\twindow.removeEventListener('vrdisplaypresentchange', onVRDisplayPresentChange);\n\t\t\t}\n\t\t}; // DEPRECATED\n\n\n\t\tthis.setFrameOfReferenceType = function () {\n\t\t\tconsole.warn('THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.');\n\t\t};\n\t}\n\n\tObject.assign(WebVRManager.prototype, EventDispatcher.prototype);\n\n\tfunction WebXRController() {\n\t\tthis._targetRay = null;\n\t\tthis._grip = null;\n\t\tthis._hand = null;\n\t}\n\n\tObject.assign(WebXRController.prototype, {\n\t\tconstructor: WebXRController,\n\t\tgetHandSpace: function getHandSpace() {\n\t\t\tif (this._hand === null) {\n\t\t\t\tthis._hand = new Group();\n\t\t\t\tthis._hand.matrixAutoUpdate = false;\n\t\t\t\tthis._hand.visible = false;\n\t\t\t\tthis._hand.joints = {};\n\t\t\t\tthis._hand.inputState = {\n\t\t\t\t\tpinching: false\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn this._hand;\n\t\t},\n\t\tgetTargetRaySpace: function getTargetRaySpace() {\n\t\t\tif (this._targetRay === null) {\n\t\t\t\tthis._targetRay = new Group();\n\t\t\t\tthis._targetRay.matrixAutoUpdate = false;\n\t\t\t\tthis._targetRay.visible = false;\n\t\t\t}\n\n\t\t\treturn this._targetRay;\n\t\t},\n\t\tgetGripSpace: function getGripSpace() {\n\t\t\tif (this._grip === null) {\n\t\t\t\tthis._grip = new Group();\n\t\t\t\tthis._grip.matrixAutoUpdate = false;\n\t\t\t\tthis._grip.visible = false;\n\t\t\t}\n\n\t\t\treturn this._grip;\n\t\t},\n\t\tdispatchEvent: function dispatchEvent(event) {\n\t\t\tif (this._targetRay !== null) {\n\t\t\t\tthis._targetRay.dispatchEvent(event);\n\t\t\t}\n\n\t\t\tif (this._grip !== null) {\n\t\t\t\tthis._grip.dispatchEvent(event);\n\t\t\t}\n\n\t\t\tif (this._hand !== null) {\n\t\t\t\tthis._hand.dispatchEvent(event);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tdisconnect: function disconnect(inputSource) {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'disconnected',\n\t\t\t\tdata: inputSource\n\t\t\t});\n\n\t\t\tif (this._targetRay !== null) {\n\t\t\t\tthis._targetRay.visible = false;\n\t\t\t}\n\n\t\t\tif (this._grip !== null) {\n\t\t\t\tthis._grip.visible = false;\n\t\t\t}\n\n\t\t\tif (this._hand !== null) {\n\t\t\t\tthis._hand.visible = false;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tupdate: function update(inputSource, frame, referenceSpace) {\n\t\t\tvar inputPose = null;\n\t\t\tvar gripPose = null;\n\t\t\tvar handPose = null;\n\t\t\tvar targetRay = this._targetRay;\n\t\t\tvar grip = this._grip;\n\t\t\tvar hand = this._hand;\n\n\t\t\tif (inputSource && frame.session.visibilityState !== 'visible-blurred') {\n\t\t\t\tif (hand && inputSource.hand) {\n\t\t\t\t\thandPose = true;\n\n\t\t\t\t\tfor (var _iterator = _createForOfIteratorHelperLoose(inputSource.hand.values()), _step; !(_step = _iterator()).done;) {\n\t\t\t\t\t\tvar inputjoint = _step.value;\n\t\t\t\t\t\t// Update the joints groups with the XRJoint poses\n\t\t\t\t\t\tvar jointPose = frame.getJointPose(inputjoint, referenceSpace);\n\n\t\t\t\t\t\tif (hand.joints[inputjoint.jointName] === undefined) {\n\t\t\t\t\t\t\t// The transform of this joint will be updated with the joint pose on each frame\n\t\t\t\t\t\t\tvar _joint = new Group();\n\n\t\t\t\t\t\t\t_joint.matrixAutoUpdate = false;\n\t\t\t\t\t\t\t_joint.visible = false;\n\t\t\t\t\t\t\thand.joints[inputjoint.jointName] = _joint; // ??\n\n\t\t\t\t\t\t\thand.add(_joint);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar joint = hand.joints[inputjoint.jointName];\n\n\t\t\t\t\t\tif (jointPose !== null) {\n\t\t\t\t\t\t\tjoint.matrix.fromArray(jointPose.transform.matrix);\n\t\t\t\t\t\t\tjoint.matrix.decompose(joint.position, joint.rotation, joint.scale);\n\t\t\t\t\t\t\tjoint.jointRadius = jointPose.radius;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tjoint.visible = jointPose !== null;\n\t\t\t\t\t} // Custom events\n\t\t\t\t\t// Check pinchz\n\n\n\t\t\t\t\tvar indexTip = hand.joints['index-finger-tip'];\n\t\t\t\t\tvar thumbTip = hand.joints['thumb-tip'];\n\t\t\t\t\tvar distance = indexTip.position.distanceTo(thumbTip.position);\n\t\t\t\t\tvar distanceToPinch = 0.02;\n\t\t\t\t\tvar threshold = 0.005;\n\n\t\t\t\t\tif (hand.inputState.pinching && distance > distanceToPinch + threshold) {\n\t\t\t\t\t\thand.inputState.pinching = false;\n\t\t\t\t\t\tthis.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'pinchend',\n\t\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\t\ttarget: this\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (!hand.inputState.pinching && distance <= distanceToPinch - threshold) {\n\t\t\t\t\t\thand.inputState.pinching = true;\n\t\t\t\t\t\tthis.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'pinchstart',\n\t\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\t\ttarget: this\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (targetRay !== null) {\n\t\t\t\t\t\tinputPose = frame.getPose(inputSource.targetRaySpace, referenceSpace);\n\n\t\t\t\t\t\tif (inputPose !== null) {\n\t\t\t\t\t\t\ttargetRay.matrix.fromArray(inputPose.transform.matrix);\n\t\t\t\t\t\t\ttargetRay.matrix.decompose(targetRay.position, targetRay.rotation, targetRay.scale);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (grip !== null && inputSource.gripSpace) {\n\t\t\t\t\t\tgripPose = frame.getPose(inputSource.gripSpace, referenceSpace);\n\n\t\t\t\t\t\tif (gripPose !== null) {\n\t\t\t\t\t\t\tgrip.matrix.fromArray(gripPose.transform.matrix);\n\t\t\t\t\t\t\tgrip.matrix.decompose(grip.position, grip.rotation, grip.scale);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (targetRay !== null) {\n\t\t\t\ttargetRay.visible = inputPose !== null;\n\t\t\t}\n\n\t\t\tif (grip !== null) {\n\t\t\t\tgrip.visible = gripPose !== null;\n\t\t\t}\n\n\t\t\tif (hand !== null) {\n\t\t\t\thand.visible = handPose !== null;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction WebXRManager(renderer, gl) {\n\t\tvar scope = this;\n\t\tvar session = null;\n\t\tvar framebufferScaleFactor = 1.0;\n\t\tvar referenceSpace = null;\n\t\tvar referenceSpaceType = 'local-floor';\n\t\tvar pose = null;\n\t\tvar poseTarget = null;\n\t\tvar controllers = [];\n\t\tvar inputSourcesMap = new Map();\n\t\tvar layers = [];\n\t\tvar baseLayer; //\n\n\t\tvar cameraL = new PerspectiveCamera();\n\t\tcameraL.layers.enable(1);\n\t\tcameraL.viewport = new Vector4();\n\t\tvar cameraR = new PerspectiveCamera();\n\t\tcameraR.layers.enable(2);\n\t\tcameraR.viewport = new Vector4();\n\t\tvar cameras = [cameraL, cameraR];\n\t\tvar cameraVR = new ArrayCamera();\n\t\tcameraVR.layers.enable(1);\n\t\tcameraVR.layers.enable(2);\n\t\tvar _currentDepthNear = null;\n\t\tvar _currentDepthFar = null; //\n\n\t\tthis.layersEnabled = false;\n\t\tthis.enabled = false;\n\t\tthis.isPresenting = false;\n\n\t\tthis.getCameraPose = function () {\n\t\t\treturn pose;\n\t\t};\n\n\t\tthis.getController = function (index) {\n\t\t\tvar controller = controllers[index];\n\n\t\t\tif (controller === undefined) {\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[index] = controller;\n\t\t\t}\n\n\t\t\treturn controller.getTargetRaySpace();\n\t\t};\n\n\t\tthis.getControllerGrip = function (index) {\n\t\t\tvar controller = controllers[index];\n\n\t\t\tif (controller === undefined) {\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[index] = controller;\n\t\t\t}\n\n\t\t\treturn controller.getGripSpace();\n\t\t};\n\n\t\tthis.getHand = function (index) {\n\t\t\tvar controller = controllers[index];\n\n\t\t\tif (controller === undefined) {\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[index] = controller;\n\t\t\t}\n\n\t\t\treturn controller.getHandSpace();\n\t\t}; //\n\n\n\t\tfunction onSessionEvent(event) {\n\t\t\tvar controller = inputSourcesMap.get(event.inputSource);\n\n\t\t\tif (controller) {\n\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\ttype: event.type,\n\t\t\t\t\tdata: event.inputSource\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfunction onSessionEnd() {\n\t\t\tinputSourcesMap.forEach(function (controller, inputSource) {\n\t\t\t\tcontroller.disconnect(inputSource);\n\t\t\t});\n\t\t\tinputSourcesMap.clear();\n\t\t\t_currentDepthNear = null;\n\t\t\t_currentDepthFar = null; //\n\n\t\t\trenderer.setFramebuffer(null);\n\t\t\trenderer.setRenderTarget(renderer.getRenderTarget()); // Hack #15830\n\n\t\t\tanimation.stop();\n\t\t\tscope.isPresenting = false;\n\t\t\tscope.dispatchEvent({\n\t\t\t\ttype: 'sessionend'\n\t\t\t});\n\t\t}\n\n\t\tthis.setFramebufferScaleFactor = function (value) {\n\t\t\tframebufferScaleFactor = value;\n\n\t\t\tif (scope.isPresenting === true) {\n\t\t\t\tconsole.warn('THREE.WebXRManager: Cannot change framebuffer scale while presenting.');\n\t\t\t}\n\t\t};\n\n\t\tthis.setReferenceSpaceType = function (value) {\n\t\t\treferenceSpaceType = value;\n\n\t\t\tif (scope.isPresenting === true) {\n\t\t\t\tconsole.warn('THREE.WebXRManager: Cannot change reference space type while presenting.');\n\t\t\t}\n\t\t};\n\n\t\tthis.getReferenceSpace = function () {\n\t\t\treturn referenceSpace;\n\t\t};\n\n\t\tthis.getSession = function () {\n\t\t\treturn session;\n\t\t};\n\n\t\tthis.setSession = /*#__PURE__*/function () {\n\t\t\tvar _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(value) {\n\t\t\t\tvar attributes, layerInit;\n\t\t\t\treturn regeneratorRuntime.wrap(function _callee$(_context) {\n\t\t\t\t\twhile (1) {\n\t\t\t\t\t\tswitch (_context.prev = _context.next) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tsession = value;\n\n\t\t\t\t\t\t\t\tif (!(session !== null)) {\n\t\t\t\t\t\t\t\t\t_context.next = 24;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsession.addEventListener('select', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('selectstart', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('selectend', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('squeeze', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('squeezestart', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('squeezeend', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('end', onSessionEnd);\n\t\t\t\t\t\t\t\tsession.addEventListener('inputsourceschange', onInputSourcesChange);\n\t\t\t\t\t\t\t\tattributes = gl.getContextAttributes();\n\n\t\t\t\t\t\t\t\tif (!(attributes.xrCompatible !== true)) {\n\t\t\t\t\t\t\t\t\t_context.next = 14;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t_context.next = 14;\n\t\t\t\t\t\t\t\treturn gl.makeXRCompatible();\n\n\t\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\t\tlayerInit = {\n\t\t\t\t\t\t\t\t\tantialias: attributes.antialias,\n\t\t\t\t\t\t\t\t\talpha: attributes.alpha,\n\t\t\t\t\t\t\t\t\tdepth: attributes.depth,\n\t\t\t\t\t\t\t\t\tstencil: attributes.stencil,\n\t\t\t\t\t\t\t\t\tframebufferScaleFactor: framebufferScaleFactor\n\t\t\t\t\t\t\t\t}; // eslint-disable-next-line no-undef\n\n\t\t\t\t\t\t\t\tbaseLayer = new XRWebGLLayer(session, gl, layerInit);\n\n\t\t\t\t\t\t\t\tif (window.XRWebGLBinding && this.layersEnabled) {\n\t\t\t\t\t\t\t\t\tthis.addLayer(baseLayer);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsession.updateRenderState({\n\t\t\t\t\t\t\t\t\t\tbaseLayer: baseLayer\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t_context.next = 19;\n\t\t\t\t\t\t\t\treturn session.requestReferenceSpace(referenceSpaceType);\n\n\t\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\t\treferenceSpace = _context.sent;\n\t\t\t\t\t\t\t\tanimation.setContext(session);\n\t\t\t\t\t\t\t\tanimation.start();\n\t\t\t\t\t\t\t\tscope.isPresenting = true;\n\t\t\t\t\t\t\t\tscope.dispatchEvent({\n\t\t\t\t\t\t\t\t\ttype: 'sessionstart'\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\tcase \"end\":\n\t\t\t\t\t\t\t\treturn _context.stop();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, _callee, this);\n\t\t\t}));\n\n\t\t\treturn function (_x) {\n\t\t\t\treturn _ref.apply(this, arguments);\n\t\t\t};\n\t\t}();\n\n\t\tthis.addLayer = function (layer) {\n\t\t\tif (!window.XRWebGLBinding || !this.layersEnabled || !session) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlayers.push(layer);\n\t\t\tsession.updateRenderState({\n\t\t\t\tlayers: layers\n\t\t\t});\n\t\t};\n\n\t\tthis.removeLayer = function (layer) {\n\t\t\tif (!window.XRWebGLBinding || !this.layersEnabled || !session) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlayers.splice(layers.indexOf(layer), 1);\n\t\t\tsession.updateRenderState({\n\t\t\t\tlayers: layers\n\t\t\t});\n\t\t};\n\n\t\tfunction onInputSourcesChange(event) {\n\t\t\tvar inputSources = session.inputSources; // Assign inputSources to available controllers\n\n\t\t\tfor (var i = 0; i < controllers.length; i++) {\n\t\t\t\tinputSourcesMap.set(inputSources[i], controllers[i]);\n\t\t\t} // Notify disconnected\n\n\n\t\t\tfor (var _i = 0; _i < event.removed.length; _i++) {\n\t\t\t\tvar inputSource = event.removed[_i];\n\t\t\t\tvar controller = inputSourcesMap.get(inputSource);\n\n\t\t\t\tif (controller) {\n\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\ttype: 'disconnected',\n\t\t\t\t\t\tdata: inputSource\n\t\t\t\t\t});\n\t\t\t\t\tinputSourcesMap.delete(inputSource);\n\t\t\t\t}\n\t\t\t} // Notify connected\n\n\n\t\t\tfor (var _i2 = 0; _i2 < event.added.length; _i2++) {\n\t\t\t\tvar _inputSource = event.added[_i2];\n\n\t\t\t\tvar _controller = inputSourcesMap.get(_inputSource);\n\n\t\t\t\tif (_controller) {\n\t\t\t\t\t_controller.dispatchEvent({\n\t\t\t\t\t\ttype: 'connected',\n\t\t\t\t\t\tdata: _inputSource\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} //\n\n\n\t\tvar cameraLPos = new Vector3();\n\t\tvar cameraRPos = new Vector3();\n\t\t/**\n\t\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t\t * the cameras' projection and world matrices have already been set.\n\t\t * And that near and far planes are identical for both cameras.\n\t\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t\t */\n\n\t\tfunction setProjectionFromUnion(camera, cameraL, cameraR) {\n\t\t\tcameraLPos.setFromMatrixPosition(cameraL.matrixWorld);\n\t\t\tcameraRPos.setFromMatrixPosition(cameraR.matrixWorld);\n\t\t\tvar ipd = cameraLPos.distanceTo(cameraRPos);\n\t\t\tvar projL = cameraL.projectionMatrix.elements;\n\t\t\tvar projR = cameraR.projectionMatrix.elements; // VR systems will have identical far and near planes, and\n\t\t\t// most likely identical top and bottom frustum extents.\n\t\t\t// Use the left camera for these values.\n\n\t\t\tvar near = projL[14] / (projL[10] - 1);\n\t\t\tvar far = projL[14] / (projL[10] + 1);\n\t\t\tvar topFov = (projL[9] + 1) / projL[5];\n\t\t\tvar bottomFov = (projL[9] - 1) / projL[5];\n\t\t\tvar leftFov = (projL[8] - 1) / projL[0];\n\t\t\tvar rightFov = (projR[8] + 1) / projR[0];\n\t\t\tvar left = near * leftFov;\n\t\t\tvar right = near * rightFov; // Calculate the new camera's position offset from the\n\t\t\t// left camera. xOffset should be roughly half `ipd`.\n\n\t\t\tvar zOffset = ipd / (-leftFov + rightFov);\n\t\t\tvar xOffset = zOffset * -leftFov; // TODO: Better way to apply this offset?\n\n\t\t\tcameraL.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);\n\t\t\tcamera.translateX(xOffset);\n\t\t\tcamera.translateZ(zOffset);\n\t\t\tcamera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale);\n\t\t\tcamera.matrixWorldInverse.copy(camera.matrixWorld).invert(); // Find the union of the frustum values of the cameras and scale\n\t\t\t// the values so that the near plane's position does not change in world space,\n\t\t\t// although must now be relative to the new union camera.\n\n\t\t\tvar near2 = near + zOffset;\n\t\t\tvar far2 = far + zOffset;\n\t\t\tvar left2 = left - xOffset;\n\t\t\tvar right2 = right + (ipd - xOffset);\n\t\t\tvar top2 = topFov * far / far2 * near2;\n\t\t\tvar bottom2 = bottomFov * far / far2 * near2;\n\t\t\tcamera.projectionMatrix.makePerspective(left2, right2, top2, bottom2, near2, far2);\n\t\t}\n\n\t\tfunction updateCamera(camera, parent) {\n\t\t\tif (parent === null) {\n\t\t\t\tcamera.matrixWorld.copy(camera.matrix);\n\t\t\t} else {\n\t\t\t\tcamera.matrixWorld.multiplyMatrices(parent.matrixWorld, camera.matrix);\n\t\t\t}\n\n\t\t\tcamera.matrixWorldInverse.copy(camera.matrixWorld).invert();\n\t\t}\n\n\t\tthis.setPoseTarget = function (object) {\n\t\t\tif (object !== undefined) poseTarget = object;\n\t\t};\n\n\t\tthis.getCamera = function (camera) {\n\t\t\tcameraVR.near = cameraR.near = cameraL.near = camera.near;\n\t\t\tcameraVR.far = cameraR.far = cameraL.far = camera.far;\n\n\t\t\tif (_currentDepthNear !== cameraVR.near || _currentDepthFar !== cameraVR.far) {\n\t\t\t\t// Note that the new renderState won't apply until the next frame. See #18320\n\t\t\t\tsession.updateRenderState({\n\t\t\t\t\tdepthNear: cameraVR.near,\n\t\t\t\t\tdepthFar: cameraVR.far\n\t\t\t\t});\n\t\t\t\t_currentDepthNear = cameraVR.near;\n\t\t\t\t_currentDepthFar = cameraVR.far;\n\t\t\t}\n\n\t\t\tvar parent = camera.parent;\n\t\t\tvar cameras = cameraVR.cameras;\n\t\t\tvar object = poseTarget || camera;\n\t\t\tupdateCamera(cameraVR, parent);\n\n\t\t\tfor (var i = 0; i < cameras.length; i++) {\n\t\t\t\tupdateCamera(cameras[i], parent);\n\t\t\t} // update camera and its children\n\n\n\t\t\tobject.matrixWorld.copy(cameraVR.matrixWorld);\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var _i3 = 0, l = children.length; _i3 < l; _i3++) {\n\t\t\t\tchildren[_i3].updateMatrixWorld(true);\n\t\t\t} // update projection matrix for proper view frustum culling\n\n\n\t\t\tif (cameras.length === 2) {\n\t\t\t\tsetProjectionFromUnion(cameraVR, cameraL, cameraR);\n\t\t\t} else {\n\t\t\t\t// assume single camera setup (AR)\n\t\t\t\tcameraVR.projectionMatrix.copy(cameraL.projectionMatrix);\n\t\t\t}\n\n\t\t\treturn cameraVR;\n\t\t}; // Animation Loop\n\n\n\t\tvar onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame(time, frame) {\n\t\t\tpose = frame.getViewerPose(referenceSpace);\n\n\t\t\tif (pose !== null) {\n\t\t\t\tvar views = pose.views;\n\t\t\t\trenderer.setFramebuffer(baseLayer.framebuffer);\n\t\t\t\tvar cameraVRNeedsUpdate = false; // check if it's necessary to rebuild cameraVR's camera list\n\n\t\t\t\tif (views.length !== cameraVR.cameras.length) {\n\t\t\t\t\tcameraVR.cameras.length = 0;\n\t\t\t\t\tcameraVRNeedsUpdate = true;\n\t\t\t\t}\n\n\t\t\t\tfor (var i = 0; i < views.length; i++) {\n\t\t\t\t\tvar view = views[i];\n\t\t\t\t\tvar viewport = baseLayer.getViewport(view);\n\t\t\t\t\tvar camera = cameras[i];\n\t\t\t\t\tcamera.matrix.fromArray(view.transform.matrix);\n\t\t\t\t\tcamera.projectionMatrix.fromArray(view.projectionMatrix);\n\t\t\t\t\tcamera.viewport.set(viewport.x, viewport.y, viewport.width, viewport.height);\n\n\t\t\t\t\tif (i === 0) {\n\t\t\t\t\t\tcameraVR.matrix.copy(camera.matrix);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cameraVRNeedsUpdate === true) {\n\t\t\t\t\t\tcameraVR.cameras.push(camera);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} //\n\n\n\t\t\tvar inputSources = session.inputSources;\n\n\t\t\tfor (var _i4 = 0; _i4 < controllers.length; _i4++) {\n\t\t\t\tvar controller = controllers[_i4];\n\t\t\t\tvar inputSource = inputSources[_i4];\n\t\t\t\tcontroller.update(inputSource, frame, referenceSpace);\n\t\t\t}\n\n\t\t\tif (onAnimationFrameCallback) onAnimationFrameCallback(time, frame);\n\t\t}\n\n\t\tvar animation = new WebGLAnimation();\n\t\tanimation.setAnimationLoop(onAnimationFrame);\n\n\t\tthis.setAnimationLoop = function (callback) {\n\t\t\tonAnimationFrameCallback = callback;\n\t\t};\n\n\t\tthis.dispose = function () {};\n\t}\n\n\tObject.assign(WebXRManager.prototype, EventDispatcher.prototype);\n\n\tfunction WebGLMaterials(properties) {\n\t\tfunction refreshFogUniforms(uniforms, fog) {\n\t\t\tuniforms.fogColor.value.copy(fog.color);\n\n\t\t\tif (fog.isFog) {\n\t\t\t\tuniforms.fogNear.value = fog.near;\n\t\t\t\tuniforms.fogFar.value = fog.far;\n\t\t\t} else if (fog.isFogExp2) {\n\t\t\t\tuniforms.fogDensity.value = fog.density;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshMaterialUniforms(uniforms, material, pixelRatio, height) {\n\t\t\tif (material.isMeshBasicMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t} else if (material.isMeshLambertMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsLambert(uniforms, material);\n\t\t\t} else if (material.isMeshToonMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsToon(uniforms, material);\n\t\t\t} else if (material.isMeshPhongMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsPhong(uniforms, material);\n\t\t\t} else if (material.isMeshStandardMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\n\t\t\t\tif (material.isMeshPhysicalMaterial) {\n\t\t\t\t\trefreshUniformsPhysical(uniforms, material);\n\t\t\t\t} else {\n\t\t\t\t\trefreshUniformsStandard(uniforms, material);\n\t\t\t\t}\n\t\t\t} else if (material.isMeshMatcapMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsMatcap(uniforms, material);\n\t\t\t} else if (material.isMeshDepthMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsDepth(uniforms, material);\n\t\t\t} else if (material.isMeshDistanceMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsDistance(uniforms, material);\n\t\t\t} else if (material.isMeshNormalMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsNormal(uniforms, material);\n\t\t\t} else if (material.isLineBasicMaterial) {\n\t\t\t\trefreshUniformsLine(uniforms, material);\n\n\t\t\t\tif (material.isLineDashedMaterial) {\n\t\t\t\t\trefreshUniformsDash(uniforms, material);\n\t\t\t\t}\n\t\t\t} else if (material.isPointsMaterial) {\n\t\t\t\trefreshUniformsPoints(uniforms, material, pixelRatio, height);\n\t\t\t} else if (material.isSpriteMaterial) {\n\t\t\t\trefreshUniformsSprites(uniforms, material);\n\t\t\t} else if (material.isShadowMaterial) {\n\t\t\t\tuniforms.color.value.copy(material.color);\n\t\t\t\tuniforms.opacity.value = material.opacity;\n\t\t\t} else if (material.isShaderMaterial) {\n\t\t\t\tmaterial.uniformsNeedUpdate = false; // #15581\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsCommon(uniforms, material) {\n\t\t\tuniforms.opacity.value = material.opacity;\n\n\t\t\tif (material.color) {\n\t\t\t\tuniforms.diffuse.value.copy(material.color);\n\t\t\t}\n\n\t\t\tif (material.emissive) {\n\t\t\t\tuniforms.emissive.value.copy(material.emissive).multiplyScalar(material.emissiveIntensity);\n\t\t\t}\n\n\t\t\tif (material.map) {\n\t\t\t\tuniforms.map.value = material.map;\n\t\t\t}\n\n\t\t\tif (material.alphaMap) {\n\t\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\t\t\t}\n\n\t\t\tif (material.specularMap) {\n\t\t\t\tuniforms.specularMap.value = material.specularMap;\n\t\t\t}\n\n\t\t\tvar envMap = properties.get(material).envMap;\n\n\t\t\tif (envMap) {\n\t\t\t\tuniforms.envMap.value = envMap;\n\t\t\t\tuniforms.flipEnvMap.value = envMap.isCubeTexture && envMap._needsFlipEnvMap ? -1 : 1;\n\t\t\t\tuniforms.reflectivity.value = material.reflectivity;\n\t\t\t\tuniforms.refractionRatio.value = material.refractionRatio;\n\n\t\t\t\tvar maxMipLevel = properties.get(envMap).__maxMipLevel;\n\n\t\t\t\tif (maxMipLevel !== undefined) {\n\t\t\t\t\tuniforms.maxMipLevel.value = maxMipLevel;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (material.lightMap) {\n\t\t\t\tuniforms.lightMap.value = material.lightMap;\n\t\t\t\tuniforms.lightMapIntensity.value = material.lightMapIntensity;\n\t\t\t}\n\n\t\t\tif (material.aoMap) {\n\t\t\t\tuniforms.aoMap.value = material.aoMap;\n\t\t\t\tuniforms.aoMapIntensity.value = material.aoMapIntensity;\n\t\t\t} // uv repeat and offset setting priorities\n\t\t\t// 1. color map\n\t\t\t// 2. specular map\n\t\t\t// 3. displacementMap map\n\t\t\t// 4. normal map\n\t\t\t// 5. bump map\n\t\t\t// 6. roughnessMap map\n\t\t\t// 7. metalnessMap map\n\t\t\t// 8. alphaMap map\n\t\t\t// 9. emissiveMap map\n\t\t\t// 10. clearcoat map\n\t\t\t// 11. clearcoat normal map\n\t\t\t// 12. clearcoat roughnessMap map\n\n\n\t\t\tvar uvScaleMap;\n\n\t\t\tif (material.map) {\n\t\t\t\tuvScaleMap = material.map;\n\t\t\t} else if (material.specularMap) {\n\t\t\t\tuvScaleMap = material.specularMap;\n\t\t\t} else if (material.displacementMap) {\n\t\t\t\tuvScaleMap = material.displacementMap;\n\t\t\t} else if (material.normalMap) {\n\t\t\t\tuvScaleMap = material.normalMap;\n\t\t\t} else if (material.bumpMap) {\n\t\t\t\tuvScaleMap = material.bumpMap;\n\t\t\t} else if (material.roughnessMap) {\n\t\t\t\tuvScaleMap = material.roughnessMap;\n\t\t\t} else if (material.metalnessMap) {\n\t\t\t\tuvScaleMap = material.metalnessMap;\n\t\t\t} else if (material.alphaMap) {\n\t\t\t\tuvScaleMap = material.alphaMap;\n\t\t\t} else if (material.emissiveMap) {\n\t\t\t\tuvScaleMap = material.emissiveMap;\n\t\t\t} else if (material.clearcoatMap) {\n\t\t\t\tuvScaleMap = material.clearcoatMap;\n\t\t\t} else if (material.clearcoatNormalMap) {\n\t\t\t\tuvScaleMap = material.clearcoatNormalMap;\n\t\t\t} else if (material.clearcoatRoughnessMap) {\n\t\t\t\tuvScaleMap = material.clearcoatRoughnessMap;\n\t\t\t}\n\n\t\t\tif (uvScaleMap !== undefined) {\n\t\t\t\t// backwards compatibility\n\t\t\t\tif (uvScaleMap.isWebGLRenderTarget) {\n\t\t\t\t\tuvScaleMap = uvScaleMap.texture;\n\t\t\t\t}\n\n\t\t\t\tif (uvScaleMap.matrixAutoUpdate === true) {\n\t\t\t\t\tuvScaleMap.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tuniforms.uvTransform.value.copy(uvScaleMap.matrix);\n\t\t\t} // uv repeat and offset setting priorities for uv2\n\t\t\t// 1. ao map\n\t\t\t// 2. light map\n\n\n\t\t\tvar uv2ScaleMap;\n\n\t\t\tif (material.aoMap) {\n\t\t\t\tuv2ScaleMap = material.aoMap;\n\t\t\t} else if (material.lightMap) {\n\t\t\t\tuv2ScaleMap = material.lightMap;\n\t\t\t}\n\n\t\t\tif (uv2ScaleMap !== undefined) {\n\t\t\t\t// backwards compatibility\n\t\t\t\tif (uv2ScaleMap.isWebGLRenderTarget) {\n\t\t\t\t\tuv2ScaleMap = uv2ScaleMap.texture;\n\t\t\t\t}\n\n\t\t\t\tif (uv2ScaleMap.matrixAutoUpdate === true) {\n\t\t\t\t\tuv2ScaleMap.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tuniforms.uv2Transform.value.copy(uv2ScaleMap.matrix);\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsLine(uniforms, material) {\n\t\t\tuniforms.diffuse.value.copy(material.color);\n\t\t\tuniforms.opacity.value = material.opacity;\n\t\t}\n\n\t\tfunction refreshUniformsDash(uniforms, material) {\n\t\t\tuniforms.dashSize.value = material.dashSize;\n\t\t\tuniforms.totalSize.value = material.dashSize + material.gapSize;\n\t\t\tuniforms.scale.value = material.scale;\n\t\t}\n\n\t\tfunction refreshUniformsPoints(uniforms, material, pixelRatio, height) {\n\t\t\tuniforms.diffuse.value.copy(material.color);\n\t\t\tuniforms.opacity.value = material.opacity;\n\t\t\tuniforms.size.value = material.size * pixelRatio;\n\t\t\tuniforms.scale.value = height * 0.5;\n\n\t\t\tif (material.map) {\n\t\t\t\tuniforms.map.value = material.map;\n\t\t\t}\n\n\t\t\tif (material.alphaMap) {\n\t\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\t\t\t} // uv repeat and offset setting priorities\n\t\t\t// 1. color map\n\t\t\t// 2. alpha map\n\n\n\t\t\tvar uvScaleMap;\n\n\t\t\tif (material.map) {\n\t\t\t\tuvScaleMap = material.map;\n\t\t\t} else if (material.alphaMap) {\n\t\t\t\tuvScaleMap = material.alphaMap;\n\t\t\t}\n\n\t\t\tif (uvScaleMap !== undefined) {\n\t\t\t\tif (uvScaleMap.matrixAutoUpdate === true) {\n\t\t\t\t\tuvScaleMap.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tuniforms.uvTransform.value.copy(uvScaleMap.matrix);\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsSprites(uniforms, material) {\n\t\t\tuniforms.diffuse.value.copy(material.color);\n\t\t\tuniforms.opacity.value = material.opacity;\n\t\t\tuniforms.rotation.value = material.rotation;\n\n\t\t\tif (material.map) {\n\t\t\t\tuniforms.map.value = material.map;\n\t\t\t}\n\n\t\t\tif (material.alphaMap) {\n\t\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\t\t\t} // uv repeat and offset setting priorities\n\t\t\t// 1. color map\n\t\t\t// 2. alpha map\n\n\n\t\t\tvar uvScaleMap;\n\n\t\t\tif (material.map) {\n\t\t\t\tuvScaleMap = material.map;\n\t\t\t} else if (material.alphaMap) {\n\t\t\t\tuvScaleMap = material.alphaMap;\n\t\t\t}\n\n\t\t\tif (uvScaleMap !== undefined) {\n\t\t\t\tif (uvScaleMap.matrixAutoUpdate === true) {\n\t\t\t\t\tuvScaleMap.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tuniforms.uvTransform.value.copy(uvScaleMap.matrix);\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsLambert(uniforms, material) {\n\t\t\tif (material.emissiveMap) {\n\t\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsPhong(uniforms, material) {\n\t\t\tuniforms.specular.value.copy(material.specular);\n\t\t\tuniforms.shininess.value = Math.max(material.shininess, 1e-4); // to prevent pow( 0.0, 0.0 )\n\n\t\t\tif (material.emissiveMap) {\n\t\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\t\t\t}\n\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsToon(uniforms, material) {\n\t\t\tif (material.gradientMap) {\n\t\t\t\tuniforms.gradientMap.value = material.gradientMap;\n\t\t\t}\n\n\t\t\tif (material.emissiveMap) {\n\t\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\t\t\t}\n\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsStandard(uniforms, material) {\n\t\t\tuniforms.roughness.value = material.roughness;\n\t\t\tuniforms.metalness.value = material.metalness;\n\n\t\t\tif (material.roughnessMap) {\n\t\t\t\tuniforms.roughnessMap.value = material.roughnessMap;\n\t\t\t}\n\n\t\t\tif (material.metalnessMap) {\n\t\t\t\tuniforms.metalnessMap.value = material.metalnessMap;\n\t\t\t}\n\n\t\t\tif (material.emissiveMap) {\n\t\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\t\t\t}\n\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\n\t\t\tvar envMap = properties.get(material).envMap;\n\n\t\t\tif (envMap) {\n\t\t\t\t//uniforms.envMap.value = material.envMap; // part of uniforms common\n\t\t\t\tuniforms.envMapIntensity.value = material.envMapIntensity;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsPhysical(uniforms, material) {\n\t\t\trefreshUniformsStandard(uniforms, material);\n\t\t\tuniforms.reflectivity.value = material.reflectivity; // also part of uniforms common\n\n\t\t\tuniforms.clearcoat.value = material.clearcoat;\n\t\t\tuniforms.clearcoatRoughness.value = material.clearcoatRoughness;\n\t\t\tif (material.sheen) uniforms.sheen.value.copy(material.sheen);\n\n\t\t\tif (material.clearcoatMap) {\n\t\t\t\tuniforms.clearcoatMap.value = material.clearcoatMap;\n\t\t\t}\n\n\t\t\tif (material.clearcoatRoughnessMap) {\n\t\t\t\tuniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap;\n\t\t\t}\n\n\t\t\tif (material.clearcoatNormalMap) {\n\t\t\t\tuniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale);\n\t\t\t\tuniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;\n\n\t\t\t\tif (material.side === BackSide) {\n\t\t\t\t\tuniforms.clearcoatNormalScale.value.negate();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tuniforms.transmission.value = material.transmission;\n\n\t\t\tif (material.transmissionMap) {\n\t\t\t\tuniforms.transmissionMap.value = material.transmissionMap;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsMatcap(uniforms, material) {\n\t\t\tif (material.matcap) {\n\t\t\t\tuniforms.matcap.value = material.matcap;\n\t\t\t}\n\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsDepth(uniforms, material) {\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsDistance(uniforms, material) {\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\n\t\t\tuniforms.referencePosition.value.copy(material.referencePosition);\n\t\t\tuniforms.nearDistance.value = material.nearDistance;\n\t\t\tuniforms.farDistance.value = material.farDistance;\n\t\t}\n\n\t\tfunction refreshUniformsNormal(uniforms, material) {\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trefreshFogUniforms: refreshFogUniforms,\n\t\t\trefreshMaterialUniforms: refreshMaterialUniforms\n\t\t};\n\t}\n\n\tfunction createCanvasElement() {\n\t\tvar canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');\n\t\tcanvas.style.display = 'block';\n\t\treturn canvas;\n\t}\n\n\tfunction WebGLRenderer(parameters) {\n\t\tparameters = parameters || {};\n\n\t\tvar _canvas = parameters.canvas !== undefined ? parameters.canvas : createCanvasElement(),\n\t\t\t\t_context = parameters.context !== undefined ? parameters.context : null,\n\t\t\t\t_alpha = parameters.alpha !== undefined ? parameters.alpha : false,\n\t\t\t\t_depth = parameters.depth !== undefined ? parameters.depth : true,\n\t\t\t\t_stencil = parameters.stencil !== undefined ? parameters.stencil : true,\n\t\t\t\t_antialias = parameters.antialias !== undefined ? parameters.antialias : false,\n\t\t\t\t_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true,\n\t\t\t\t_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false,\n\t\t\t\t_powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default',\n\t\t\t\t_failIfMajorPerformanceCaveat = parameters.failIfMajorPerformanceCaveat !== undefined ? parameters.failIfMajorPerformanceCaveat : false;\n\n\t\tvar currentRenderList = null;\n\t\tvar currentRenderState = null; // render() can be called from within a callback triggered by another render.\n\t\t// We track this so that the nested render call gets its state isolated from the parent render call.\n\n\t\tvar renderStateStack = []; // public properties\n\n\t\tthis.domElement = _canvas; // Debug configuration container\n\n\t\tthis.debug = {\n\t\t\t/**\n\t\t\t * Enables error checking and reporting when shader programs are being compiled\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tcheckShaderErrors: true\n\t\t}; // clearing\n\n\t\tthis.autoClear = true;\n\t\tthis.autoClearColor = true;\n\t\tthis.autoClearDepth = true;\n\t\tthis.autoClearStencil = true; // scene graph\n\n\t\tthis.sortObjects = true; // user-defined clipping\n\n\t\tthis.clippingPlanes = [];\n\t\tthis.localClippingEnabled = false; // physically based shading\n\n\t\tthis.gammaFactor = 2.0; // for backwards compatibility\n\n\t\tthis.outputEncoding = LinearEncoding; // physical lights\n\n\t\tthis.physicallyCorrectLights = false; // tone mapping\n\n\t\tthis.toneMapping = NoToneMapping;\n\t\tthis.toneMappingExposure = 1.0; // morphs\n\n\t\tthis.maxMorphTargets = 8;\n\t\tthis.maxMorphNormals = 4; // internal properties\n\n\t\tvar _this = this;\n\n\t\tvar _isContextLost = false; // internal state cache\n\n\t\tvar _framebuffer = null;\n\t\tvar _currentActiveCubeFace = 0;\n\t\tvar _currentActiveMipmapLevel = 0;\n\t\tvar _currentRenderTarget = null;\n\t\tvar _currentFramebuffer = null;\n\n\t\tvar _currentMaterialId = -1;\n\n\t\tvar _currentCamera = null;\n\n\t\tvar _currentViewport = new Vector4();\n\n\t\tvar _currentScissor = new Vector4();\n\n\t\tvar _currentScissorTest = null; //\n\n\t\tvar _width = _canvas.width;\n\t\tvar _height = _canvas.height;\n\t\tvar _pixelRatio = 1;\n\t\tvar _opaqueSort = null;\n\t\tvar _transparentSort = null;\n\n\t\tvar _viewport = new Vector4(0, 0, _width, _height);\n\n\t\tvar _scissor = new Vector4(0, 0, _width, _height);\n\n\t\tvar _scissorTest = false; // frustum\n\n\t\tvar _frustum = new Frustum(); // clipping\n\n\n\t\tvar _clippingEnabled = false;\n\t\tvar _localClippingEnabled = false; // camera matrices cache\n\n\t\tvar _projScreenMatrix = new Matrix4();\n\n\t\tvar _vector3 = new Vector3();\n\n\t\tvar _emptyScene = {\n\t\t\tbackground: null,\n\t\t\tfog: null,\n\t\t\tenvironment: null,\n\t\t\toverrideMaterial: null,\n\t\t\tisScene: true\n\t\t};\n\n\t\tfunction getTargetPixelRatio() {\n\t\t\treturn _currentRenderTarget === null ? _pixelRatio : 1;\n\t\t} // initialize\n\n\n\t\tvar _gl = _context;\n\n\t\tfunction getContext(contextNames, contextAttributes) {\n\t\t\tfor (var i = 0; i < contextNames.length; i++) {\n\t\t\t\tvar contextName = contextNames[i];\n\n\t\t\t\tvar context = _canvas.getContext(contextName, contextAttributes);\n\n\t\t\t\tif (context !== null) return context;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\tvar contextAttributes = {\n\t\t\t\talpha: _alpha,\n\t\t\t\tdepth: _depth,\n\t\t\t\tstencil: _stencil,\n\t\t\t\tantialias: _antialias,\n\t\t\t\tpremultipliedAlpha: _premultipliedAlpha,\n\t\t\t\tpreserveDrawingBuffer: _preserveDrawingBuffer,\n\t\t\t\tpowerPreference: _powerPreference,\n\t\t\t\tfailIfMajorPerformanceCaveat: _failIfMajorPerformanceCaveat\n\t\t\t}; // event listeners must be registered before WebGL context is created, see #12753\n\n\t\t\t_canvas.addEventListener('webglcontextlost', onContextLost, false);\n\n\t\t\t_canvas.addEventListener('webglcontextrestored', onContextRestore, false);\n\n\t\t\tif (_gl === null) {\n\t\t\t\tvar contextNames = ['webgl2', 'webgl', 'experimental-webgl'];\n\n\t\t\t\tif (_this.isWebGL1Renderer === true) {\n\t\t\t\t\tcontextNames.shift();\n\t\t\t\t}\n\n\t\t\t\t_gl = getContext(contextNames, contextAttributes);\n\n\t\t\t\tif (_gl === null) {\n\t\t\t\t\tif (getContext(contextNames)) {\n\t\t\t\t\t\tthrow new Error('Error creating WebGL context with your selected attributes.');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error('Error creating WebGL context.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // Some experimental-webgl implementations do not have getShaderPrecisionFormat\n\n\n\t\t\tif (_gl.getShaderPrecisionFormat === undefined) {\n\t\t\t\t_gl.getShaderPrecisionFormat = function () {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'rangeMin': 1,\n\t\t\t\t\t\t'rangeMax': 1,\n\t\t\t\t\t\t'precision': 1\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error('THREE.WebGLRenderer: ' + error.message);\n\t\t\tthrow error;\n\t\t}\n\n\t\tvar extensions, capabilities, state, info;\n\t\tvar properties, textures, cubemaps, attributes, geometries, objects;\n\t\tvar programCache, materials, renderLists, renderStates, clipping;\n\t\tvar background, morphtargets, bufferRenderer, indexedBufferRenderer;\n\t\tvar utils, bindingStates;\n\n\t\tfunction initGLContext() {\n\t\t\textensions = new WebGLExtensions(_gl);\n\t\t\tcapabilities = new WebGLCapabilities(_gl, extensions, parameters);\n\t\t\textensions.init(capabilities);\n\t\t\tutils = new WebGLUtils(_gl, extensions, capabilities);\n\t\t\tstate = new WebGLState(_gl, extensions, capabilities);\n\t\t\tstate.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor());\n\t\t\tstate.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor());\n\t\t\tinfo = new WebGLInfo(_gl);\n\t\t\tproperties = new WebGLProperties();\n\t\t\ttextures = new WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info);\n\t\t\tcubemaps = new WebGLCubeMaps(_this);\n\t\t\tattributes = new WebGLAttributes(_gl, capabilities);\n\t\t\tbindingStates = new WebGLBindingStates(_gl, extensions, attributes, capabilities);\n\t\t\tgeometries = new WebGLGeometries(_gl, attributes, info, bindingStates);\n\t\t\tobjects = new WebGLObjects(_gl, geometries, attributes, info);\n\t\t\tmorphtargets = new WebGLMorphtargets(_gl);\n\t\t\tclipping = new WebGLClipping(properties);\n\t\t\tprogramCache = new WebGLPrograms(_this, cubemaps, extensions, capabilities, bindingStates, clipping);\n\t\t\tmaterials = new WebGLMaterials(properties);\n\t\t\trenderLists = new WebGLRenderLists(properties);\n\t\t\trenderStates = new WebGLRenderStates(extensions, capabilities);\n\t\t\tbackground = new WebGLBackground(_this, cubemaps, state, objects, _premultipliedAlpha);\n\t\t\tbufferRenderer = new WebGLBufferRenderer(_gl, extensions, info, capabilities);\n\t\t\tindexedBufferRenderer = new WebGLIndexedBufferRenderer(_gl, extensions, info, capabilities);\n\t\t\tinfo.programs = programCache.programs;\n\t\t\t_this.capabilities = capabilities;\n\t\t\t_this.extensions = extensions;\n\t\t\t_this.properties = properties;\n\t\t\t_this.renderLists = renderLists;\n\t\t\t_this.state = state;\n\t\t\t_this.info = info;\n\t\t}\n\n\t\tinitGLContext();\n\t\tvar xr = typeof navigator !== 'undefined' && 'xr' in navigator ? new WebXRManager(_this, _gl) : new WebVRManager(_this);\n\t\tthis.xr = xr; // shadow map\n\n\t\tvar shadowMap = new WebGLShadowMap(_this, objects, capabilities.maxTextureSize);\n\t\tthis.shadowMap = shadowMap; // API\n\n\t\tthis.getContext = function () {\n\t\t\treturn _gl;\n\t\t};\n\n\t\tthis.getContextAttributes = function () {\n\t\t\treturn _gl.getContextAttributes();\n\t\t};\n\n\t\tthis.forceContextLoss = function () {\n\t\t\tvar extension = extensions.get('WEBGL_lose_context');\n\t\t\tif (extension) extension.loseContext();\n\t\t};\n\n\t\tthis.forceContextRestore = function () {\n\t\t\tvar extension = extensions.get('WEBGL_lose_context');\n\t\t\tif (extension) extension.restoreContext();\n\t\t};\n\n\t\tthis.getPixelRatio = function () {\n\t\t\treturn _pixelRatio;\n\t\t};\n\n\t\tthis.setPixelRatio = function (value) {\n\t\t\tif (value === undefined) return;\n\t\t\t_pixelRatio = value;\n\t\t\tthis.setSize(_width, _height, false);\n\t\t};\n\n\t\tthis.getSize = function (target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('WebGLRenderer: .getsize() now requires a Vector2 as an argument');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn target.set(_width, _height);\n\t\t};\n\n\t\tthis.setSize = function (width, height, updateStyle) {\n\t\t\tif (xr.isPresenting) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: Can\\'t change size while VR device is presenting.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t_width = width;\n\t\t\t_height = height;\n\t\t\t_canvas.width = Math.floor(width * _pixelRatio);\n\t\t\t_canvas.height = Math.floor(height * _pixelRatio);\n\n\t\t\tif (updateStyle !== false) {\n\t\t\t\t_canvas.style.width = width + 'px';\n\t\t\t\t_canvas.style.height = height + 'px';\n\t\t\t}\n\n\t\t\tthis.setViewport(0, 0, width, height);\n\t\t};\n\n\t\tthis.getDrawingBufferSize = function (target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn target.set(_width * _pixelRatio, _height * _pixelRatio).floor();\n\t\t};\n\n\t\tthis.setDrawingBufferSize = function (width, height, pixelRatio) {\n\t\t\t_width = width;\n\t\t\t_height = height;\n\t\t\t_pixelRatio = pixelRatio;\n\t\t\t_canvas.width = Math.floor(width * pixelRatio);\n\t\t\t_canvas.height = Math.floor(height * pixelRatio);\n\t\t\tthis.setViewport(0, 0, width, height);\n\t\t};\n\n\t\tthis.getCurrentViewport = function (target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument');\n\t\t\t\ttarget = new Vector4();\n\t\t\t}\n\n\t\t\treturn target.copy(_currentViewport);\n\t\t};\n\n\t\tthis.getViewport = function (target) {\n\t\t\treturn target.copy(_viewport);\n\t\t};\n\n\t\tthis.setViewport = function (x, y, width, height) {\n\t\t\tif (x.isVector4) {\n\t\t\t\t_viewport.set(x.x, x.y, x.z, x.w);\n\t\t\t} else {\n\t\t\t\t_viewport.set(x, y, width, height);\n\t\t\t}\n\n\t\t\tstate.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor());\n\t\t};\n\n\t\tthis.getScissor = function (target) {\n\t\t\treturn target.copy(_scissor);\n\t\t};\n\n\t\tthis.setScissor = function (x, y, width, height) {\n\t\t\tif (x.isVector4) {\n\t\t\t\t_scissor.set(x.x, x.y, x.z, x.w);\n\t\t\t} else {\n\t\t\t\t_scissor.set(x, y, width, height);\n\t\t\t}\n\n\t\t\tstate.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor());\n\t\t};\n\n\t\tthis.getScissorTest = function () {\n\t\t\treturn _scissorTest;\n\t\t};\n\n\t\tthis.setScissorTest = function (boolean) {\n\t\t\tstate.setScissorTest(_scissorTest = boolean);\n\t\t};\n\n\t\tthis.setOpaqueSort = function (method) {\n\t\t\t_opaqueSort = method;\n\t\t};\n\n\t\tthis.setTransparentSort = function (method) {\n\t\t\t_transparentSort = method;\n\t\t}; // Clearing\n\n\n\t\tthis.getClearColor = function (target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('WebGLRenderer: .getClearColor() now requires a Color as an argument');\n\t\t\t\ttarget = new Color();\n\t\t\t}\n\n\t\t\treturn target.copy(background.getClearColor());\n\t\t};\n\n\t\tthis.setClearColor = function () {\n\t\t\tbackground.setClearColor.apply(background, arguments);\n\t\t};\n\n\t\tthis.getClearAlpha = function () {\n\t\t\treturn background.getClearAlpha();\n\t\t};\n\n\t\tthis.setClearAlpha = function () {\n\t\t\tbackground.setClearAlpha.apply(background, arguments);\n\t\t};\n\n\t\tthis.clear = function (color, depth, stencil) {\n\t\t\tvar bits = 0;\n\t\t\tif (color === undefined || color) bits |= 16384;\n\t\t\tif (depth === undefined || depth) bits |= 256;\n\t\t\tif (stencil === undefined || stencil) bits |= 1024;\n\n\t\t\t_gl.clear(bits);\n\t\t};\n\n\t\tthis.clearColor = function () {\n\t\t\tthis.clear(true, false, false);\n\t\t};\n\n\t\tthis.clearDepth = function () {\n\t\t\tthis.clear(false, true, false);\n\t\t};\n\n\t\tthis.clearStencil = function () {\n\t\t\tthis.clear(false, false, true);\n\t\t}; //\n\n\n\t\tthis.dispose = function () {\n\t\t\t_canvas.removeEventListener('webglcontextlost', onContextLost, false);\n\n\t\t\t_canvas.removeEventListener('webglcontextrestored', onContextRestore, false);\n\n\t\t\trenderLists.dispose();\n\t\t\trenderStates.dispose();\n\t\t\tproperties.dispose();\n\t\t\tcubemaps.dispose();\n\t\t\tobjects.dispose();\n\t\t\tbindingStates.dispose();\n\t\t\txr.dispose();\n\t\t\tanimation.stop();\n\t\t}; // Events\n\n\n\t\tfunction onContextLost(event) {\n\t\t\tevent.preventDefault();\n\t\t\tconsole.log('THREE.WebGLRenderer: Context Lost.');\n\t\t\t_isContextLost = true;\n\t\t}\n\n\t\tfunction onContextRestore()\n\t\t/* event */\n\t\t{\n\t\t\tconsole.log('THREE.WebGLRenderer: Context Restored.');\n\t\t\t_isContextLost = false;\n\t\t\tinitGLContext();\n\t\t}\n\n\t\tfunction onMaterialDispose(event) {\n\t\t\tvar material = event.target;\n\t\t\tmaterial.removeEventListener('dispose', onMaterialDispose);\n\t\t\tdeallocateMaterial(material);\n\t\t} // Buffer deallocation\n\n\n\t\tfunction deallocateMaterial(material) {\n\t\t\treleaseMaterialProgramReference(material);\n\t\t\tproperties.remove(material);\n\t\t}\n\n\t\tfunction releaseMaterialProgramReference(material) {\n\t\t\tvar programInfo = properties.get(material).program;\n\n\t\t\tif (programInfo !== undefined) {\n\t\t\t\tprogramCache.releaseProgram(programInfo);\n\t\t\t}\n\t\t} // Buffer rendering\n\n\n\t\tfunction renderObjectImmediate(object, program) {\n\t\t\tobject.render(function (object) {\n\t\t\t\t_this.renderBufferImmediate(object, program);\n\t\t\t});\n\t\t}\n\n\t\tthis.renderBufferImmediate = function (object, program) {\n\t\t\tbindingStates.initAttributes();\n\t\t\tvar buffers = properties.get(object);\n\t\t\tif (object.hasPositions && !buffers.position) buffers.position = _gl.createBuffer();\n\t\t\tif (object.hasNormals && !buffers.normal) buffers.normal = _gl.createBuffer();\n\t\t\tif (object.hasUvs && !buffers.uv) buffers.uv = _gl.createBuffer();\n\t\t\tif (object.hasColors && !buffers.color) buffers.color = _gl.createBuffer();\n\t\t\tvar programAttributes = program.getAttributes();\n\n\t\t\tif (object.hasPositions) {\n\t\t\t\t_gl.bindBuffer(34962, buffers.position);\n\n\t\t\t\t_gl.bufferData(34962, object.positionArray, 35048);\n\n\t\t\t\tbindingStates.enableAttribute(programAttributes.position);\n\n\t\t\t\t_gl.vertexAttribPointer(programAttributes.position, 3, 5126, false, 0, 0);\n\t\t\t}\n\n\t\t\tif (object.hasNormals) {\n\t\t\t\t_gl.bindBuffer(34962, buffers.normal);\n\n\t\t\t\t_gl.bufferData(34962, object.normalArray, 35048);\n\n\t\t\t\tbindingStates.enableAttribute(programAttributes.normal);\n\n\t\t\t\t_gl.vertexAttribPointer(programAttributes.normal, 3, 5126, false, 0, 0);\n\t\t\t}\n\n\t\t\tif (object.hasUvs) {\n\t\t\t\t_gl.bindBuffer(34962, buffers.uv);\n\n\t\t\t\t_gl.bufferData(34962, object.uvArray, 35048);\n\n\t\t\t\tbindingStates.enableAttribute(programAttributes.uv);\n\n\t\t\t\t_gl.vertexAttribPointer(programAttributes.uv, 2, 5126, false, 0, 0);\n\t\t\t}\n\n\t\t\tif (object.hasColors) {\n\t\t\t\t_gl.bindBuffer(34962, buffers.color);\n\n\t\t\t\t_gl.bufferData(34962, object.colorArray, 35048);\n\n\t\t\t\tbindingStates.enableAttribute(programAttributes.color);\n\n\t\t\t\t_gl.vertexAttribPointer(programAttributes.color, 3, 5126, false, 0, 0);\n\t\t\t}\n\n\t\t\tbindingStates.disableUnusedAttributes();\n\n\t\t\t_gl.drawArrays(4, 0, object.count);\n\n\t\t\tobject.count = 0;\n\t\t};\n\n\t\tthis.renderBufferDirect = function (camera, scene, geometry, material, object, group) {\n\t\t\tif (scene === null) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null)\n\n\t\t\tvar frontFaceCW = object.isMesh && object.matrixWorld.determinant() < 0;\n\t\t\tvar program = setProgram(camera, scene, material, object);\n\t\t\tstate.setMaterial(material, frontFaceCW); //\n\n\t\t\tvar index = geometry.index;\n\t\t\tvar position = geometry.attributes.position; //\n\n\t\t\tif (index === null) {\n\t\t\t\tif (position === undefined || position.count === 0) return;\n\t\t\t} else if (index.count === 0) {\n\t\t\t\treturn;\n\t\t\t} //\n\n\n\t\t\tvar rangeFactor = 1;\n\n\t\t\tif (material.wireframe === true) {\n\t\t\t\tindex = geometries.getWireframeAttribute(geometry);\n\t\t\t\trangeFactor = 2;\n\t\t\t}\n\n\t\t\tif (material.morphTargets || material.morphNormals) {\n\t\t\t\tmorphtargets.update(object, geometry, material, program);\n\t\t\t}\n\n\t\t\tbindingStates.setup(object, material, program, geometry, index);\n\t\t\tvar attribute;\n\t\t\tvar renderer = bufferRenderer;\n\n\t\t\tif (index !== null) {\n\t\t\t\tattribute = attributes.get(index);\n\t\t\t\trenderer = indexedBufferRenderer;\n\t\t\t\trenderer.setIndex(attribute);\n\t\t\t} //\n\n\n\t\t\tvar dataCount = index !== null ? index.count : position.count;\n\t\t\tvar rangeStart = geometry.drawRange.start * rangeFactor;\n\t\t\tvar rangeCount = geometry.drawRange.count * rangeFactor;\n\t\t\tvar groupStart = group !== null ? group.start * rangeFactor : 0;\n\t\t\tvar groupCount = group !== null ? group.count * rangeFactor : Infinity;\n\t\t\tvar drawStart = Math.max(rangeStart, groupStart);\n\t\t\tvar drawEnd = Math.min(dataCount, rangeStart + rangeCount, groupStart + groupCount) - 1;\n\t\t\tvar drawCount = Math.max(0, drawEnd - drawStart + 1);\n\t\t\tif (drawCount === 0) return; //\n\n\t\t\tif (object.isMesh) {\n\t\t\t\tif (material.wireframe === true) {\n\t\t\t\t\tstate.setLineWidth(material.wireframeLinewidth * getTargetPixelRatio());\n\t\t\t\t\trenderer.setMode(1);\n\t\t\t\t} else {\n\t\t\t\t\trenderer.setMode(4);\n\t\t\t\t}\n\t\t\t} else if (object.isLine) {\n\t\t\t\tvar lineWidth = material.linewidth;\n\t\t\t\tif (lineWidth === undefined) lineWidth = 1; // Not using Line*Material\n\n\t\t\t\tstate.setLineWidth(lineWidth * getTargetPixelRatio());\n\n\t\t\t\tif (object.isLineSegments) {\n\t\t\t\t\trenderer.setMode(1);\n\t\t\t\t} else if (object.isLineLoop) {\n\t\t\t\t\trenderer.setMode(2);\n\t\t\t\t} else {\n\t\t\t\t\trenderer.setMode(3);\n\t\t\t\t}\n\t\t\t} else if (object.isPoints) {\n\t\t\t\trenderer.setMode(0);\n\t\t\t} else if (object.isSprite) {\n\t\t\t\trenderer.setMode(4);\n\t\t\t}\n\n\t\t\tif (object.isInstancedMesh) {\n\t\t\t\trenderer.renderInstances(drawStart, drawCount, object.count);\n\t\t\t} else if (geometry.isInstancedBufferGeometry) {\n\t\t\t\tvar instanceCount = Math.min(geometry.instanceCount, geometry._maxInstanceCount);\n\t\t\t\trenderer.renderInstances(drawStart, drawCount, instanceCount);\n\t\t\t} else {\n\t\t\t\trenderer.render(drawStart, drawCount);\n\t\t\t}\n\t\t}; // Compile\n\n\n\t\tthis.compile = function (scene, camera) {\n\t\t\tcurrentRenderState = renderStates.get(scene);\n\t\t\tcurrentRenderState.init();\n\t\t\tscene.traverseVisible(function (object) {\n\t\t\t\tif (object.isLight && object.layers.test(camera.layers)) {\n\t\t\t\t\tcurrentRenderState.pushLight(object);\n\n\t\t\t\t\tif (object.castShadow) {\n\t\t\t\t\t\tcurrentRenderState.pushShadow(object);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tcurrentRenderState.setupLights();\n\t\t\tvar compiled = new WeakMap();\n\t\t\tscene.traverse(function (object) {\n\t\t\t\tvar material = object.material;\n\n\t\t\t\tif (material) {\n\t\t\t\t\tif (Array.isArray(material)) {\n\t\t\t\t\t\tfor (var i = 0; i < material.length; i++) {\n\t\t\t\t\t\t\tvar material2 = material[i];\n\n\t\t\t\t\t\t\tif (compiled.has(material2) === false) {\n\t\t\t\t\t\t\t\tinitMaterial(material2, scene, object);\n\t\t\t\t\t\t\t\tcompiled.set(material2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (compiled.has(material) === false) {\n\t\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t\t\tcompiled.set(material);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}; // Animation Loop\n\n\n\t\tvar onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame(time) {\n\t\t\tif (xr.isPresenting) return;\n\t\t\tif (onAnimationFrameCallback) onAnimationFrameCallback(time);\n\t\t}\n\n\t\tvar animation = new WebGLAnimation();\n\t\tanimation.setAnimationLoop(onAnimationFrame);\n\t\tif (typeof window !== 'undefined') animation.setContext(window);\n\n\t\tthis.setAnimationLoop = function (callback) {\n\t\t\tonAnimationFrameCallback = callback;\n\t\t\txr.setAnimationLoop(callback);\n\t\t\tcallback === null ? animation.stop() : animation.start();\n\t\t}; // Rendering\n\n\n\t\tthis.render = function (scene, camera) {\n\t\t\tvar renderTarget, forceClear;\n\n\t\t\tif (arguments[2] !== undefined) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.');\n\t\t\t\trenderTarget = arguments[2];\n\t\t\t}\n\n\t\t\tif (arguments[3] !== undefined) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.');\n\t\t\t\tforceClear = arguments[3];\n\t\t\t}\n\n\t\t\tif (camera !== undefined && camera.isCamera !== true) {\n\t\t\t\tconsole.error('THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_isContextLost === true) return; // reset caching for this frame\n\n\t\t\tbindingStates.resetDefaultState();\n\t\t\t_currentMaterialId = -1;\n\t\t\t_currentCamera = null; // update scene graph\n\n\t\t\tif (scene.autoUpdate === true) scene.updateMatrixWorld(); // update camera matrices and frustum\n\n\t\t\tif (camera.parent === null) camera.updateMatrixWorld();\n\n\t\t\tif (xr.enabled === true && xr.isPresenting === true) {\n\t\t\t\tcamera = xr.getCamera(camera);\n\t\t\t} //\n\n\n\t\t\tif (scene.isScene === true) scene.onBeforeRender(_this, scene, camera, renderTarget || _currentRenderTarget);\n\t\t\tcurrentRenderState = renderStates.get(scene, renderStateStack.length);\n\t\t\tcurrentRenderState.init();\n\t\t\trenderStateStack.push(currentRenderState);\n\n\t\t\t_projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);\n\n\t\t\t_frustum.setFromProjectionMatrix(_projScreenMatrix);\n\n\t\t\t_localClippingEnabled = this.localClippingEnabled;\n\t\t\t_clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled, camera);\n\t\t\tcurrentRenderList = renderLists.get(scene, camera);\n\t\t\tcurrentRenderList.init();\n\t\t\tprojectObject(scene, camera, 0, _this.sortObjects);\n\t\t\tcurrentRenderList.finish();\n\n\t\t\tif (_this.sortObjects === true) {\n\t\t\t\tcurrentRenderList.sort(_opaqueSort, _transparentSort);\n\t\t\t} //\n\n\n\t\t\tif (_clippingEnabled === true) clipping.beginShadows();\n\t\t\tvar shadowsArray = currentRenderState.state.shadowsArray;\n\t\t\tshadowMap.render(shadowsArray, scene, camera);\n\t\t\tcurrentRenderState.setupLights();\n\t\t\tcurrentRenderState.setupLightsView(camera);\n\t\t\tif (_clippingEnabled === true) clipping.endShadows(); //\n\n\t\t\tif (this.info.autoReset === true) this.info.reset();\n\n\t\t\tif (renderTarget !== undefined) {\n\t\t\t\tthis.setRenderTarget(renderTarget);\n\t\t\t} //\n\n\n\t\t\tbackground.render(currentRenderList, scene, camera, forceClear); // render scene\n\n\t\t\tvar opaqueObjects = currentRenderList.opaque;\n\t\t\tvar transparentObjects = currentRenderList.transparent;\n\t\t\tif (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene, camera);\n\t\t\tif (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera); //\n\n\t\t\tif (scene.isScene === true) scene.onAfterRender(_this, scene, camera); //\n\n\t\t\tif (_currentRenderTarget !== null) {\n\t\t\t\t// Generate mipmap if we're using any kind of mipmap filtering\n\t\t\t\ttextures.updateRenderTargetMipmap(_currentRenderTarget); // resolve multisample renderbuffers to a single-sample texture if necessary\n\n\t\t\t\ttextures.updateMultisampleRenderTarget(_currentRenderTarget);\n\t\t\t} // Ensure depth buffer writing is enabled so it can be cleared on next render\n\n\n\t\t\tstate.buffers.depth.setTest(true);\n\t\t\tstate.buffers.depth.setMask(true);\n\t\t\tstate.buffers.color.setMask(true);\n\t\t\tstate.setPolygonOffset(false);\n\n\t\t\tif (xr.enabled && xr.submitFrame) {\n\t\t\t\txr.submitFrame();\n\t\t\t} // _gl.finish();\n\n\n\t\t\trenderStateStack.pop();\n\n\t\t\tif (renderStateStack.length > 0) {\n\t\t\t\tcurrentRenderState = renderStateStack[renderStateStack.length - 1];\n\t\t\t} else {\n\t\t\t\tcurrentRenderState = null;\n\t\t\t}\n\n\t\t\tcurrentRenderList = null;\n\t\t};\n\n\t\tfunction projectObject(object, camera, groupOrder, sortObjects) {\n\t\t\tif (object.visible === false) return;\n\t\t\tvar visible = object.layers.test(camera.layers);\n\n\t\t\tif (visible) {\n\t\t\t\tif (object.isGroup) {\n\t\t\t\t\tgroupOrder = object.renderOrder;\n\t\t\t\t} else if (object.isLOD) {\n\t\t\t\t\tif (object.autoUpdate === true) object.update(camera);\n\t\t\t\t} else if (object.isLight) {\n\t\t\t\t\tcurrentRenderState.pushLight(object);\n\n\t\t\t\t\tif (object.castShadow) {\n\t\t\t\t\t\tcurrentRenderState.pushShadow(object);\n\t\t\t\t\t}\n\t\t\t\t} else if (object.isSprite) {\n\t\t\t\t\tif (!object.frustumCulled || _frustum.intersectsSprite(object)) {\n\t\t\t\t\t\tif (sortObjects) {\n\t\t\t\t\t\t\t_vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar geometry = objects.update(object);\n\t\t\t\t\t\tvar material = object.material;\n\n\t\t\t\t\t\tif (material.visible) {\n\t\t\t\t\t\t\tcurrentRenderList.push(object, geometry, material, groupOrder, _vector3.z, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (object.isImmediateRenderObject) {\n\t\t\t\t\tif (sortObjects) {\n\t\t\t\t\t\t_vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentRenderList.push(object, null, object.material, groupOrder, _vector3.z, null);\n\t\t\t\t} else if (object.isMesh || object.isLine || object.isPoints) {\n\t\t\t\t\tif (object.isSkinnedMesh) {\n\t\t\t\t\t\t// update skeleton only once in a frame\n\t\t\t\t\t\tif (object.skeleton.frame !== info.render.frame) {\n\t\t\t\t\t\t\tobject.skeleton.update();\n\t\t\t\t\t\t\tobject.skeleton.frame = info.render.frame;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!object.frustumCulled || _frustum.intersectsObject(object)) {\n\t\t\t\t\t\tif (sortObjects) {\n\t\t\t\t\t\t\t_vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar _geometry = objects.update(object);\n\n\t\t\t\t\t\tvar _material = object.material;\n\n\t\t\t\t\t\tif (Array.isArray(_material)) {\n\t\t\t\t\t\t\tvar groups = _geometry.groups;\n\n\t\t\t\t\t\t\tfor (var i = 0, l = groups.length; i < l; i++) {\n\t\t\t\t\t\t\t\tvar group = groups[i];\n\t\t\t\t\t\t\t\tvar groupMaterial = _material[group.materialIndex];\n\n\t\t\t\t\t\t\t\tif (groupMaterial && groupMaterial.visible) {\n\t\t\t\t\t\t\t\t\tcurrentRenderList.push(object, _geometry, groupMaterial, groupOrder, _vector3.z, group);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (_material.visible) {\n\t\t\t\t\t\t\tcurrentRenderList.push(object, _geometry, _material, groupOrder, _vector3.z, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var _i = 0, _l = children.length; _i < _l; _i++) {\n\t\t\t\tprojectObject(children[_i], camera, groupOrder, sortObjects);\n\t\t\t}\n\t\t}\n\n\t\tfunction renderObjects(renderList, scene, camera) {\n\t\t\tvar overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n\n\t\t\tfor (var i = 0, l = renderList.length; i < l; i++) {\n\t\t\t\tvar renderItem = renderList[i];\n\t\t\t\tvar object = renderItem.object;\n\t\t\t\tvar geometry = renderItem.geometry;\n\t\t\t\tvar material = overrideMaterial === null ? renderItem.material : overrideMaterial;\n\t\t\t\tvar group = renderItem.group;\n\n\t\t\t\tif (camera.isArrayCamera) {\n\t\t\t\t\tvar cameras = camera.cameras;\n\n\t\t\t\t\tfor (var j = 0, jl = cameras.length; j < jl; j++) {\n\t\t\t\t\t\tvar camera2 = cameras[j];\n\n\t\t\t\t\t\tif (object.layers.test(camera2.layers)) {\n\t\t\t\t\t\t\tstate.viewport(_currentViewport.copy(camera2.viewport));\n\t\t\t\t\t\t\tcurrentRenderState.setupLightsView(camera2);\n\t\t\t\t\t\t\trenderObject(object, scene, camera2, geometry, material, group);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trenderObject(object, scene, camera, geometry, material, group);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction renderObject(object, scene, camera, geometry, material, group) {\n\t\t\tobject.onBeforeRender(_this, scene, camera, geometry, material, group);\n\t\t\tobject.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse, object.matrixWorld);\n\t\t\tobject.normalMatrix.getNormalMatrix(object.modelViewMatrix);\n\n\t\t\tif (object.isImmediateRenderObject) {\n\t\t\t\tvar program = setProgram(camera, scene, material, object);\n\t\t\t\tstate.setMaterial(material);\n\t\t\t\tbindingStates.reset();\n\t\t\t\trenderObjectImmediate(object, program);\n\t\t\t} else {\n\t\t\t\t_this.renderBufferDirect(camera, scene, geometry, material, object, group);\n\t\t\t}\n\n\t\t\tobject.onAfterRender(_this, scene, camera, geometry, material, group);\n\t\t}\n\n\t\tfunction initMaterial(material, scene, object) {\n\t\t\tif (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\t\tvar materialProperties = properties.get(material);\n\t\t\tvar lights = currentRenderState.state.lights;\n\t\t\tvar shadowsArray = currentRenderState.state.shadowsArray;\n\t\t\tvar lightsStateVersion = lights.state.version;\n\t\t\tvar parameters = programCache.getParameters(material, lights.state, shadowsArray, scene, object);\n\t\t\tvar programCacheKey = programCache.getProgramCacheKey(parameters);\n\t\t\tvar program = materialProperties.program;\n\t\t\tvar programChange = true; // always update environment and fog - changing these trigger an initMaterial call, but it's possible that the program doesn't change\n\n\t\t\tmaterialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tmaterialProperties.fog = scene.fog;\n\t\t\tmaterialProperties.envMap = cubemaps.get(material.envMap || materialProperties.environment);\n\n\t\t\tif (program === undefined) {\n\t\t\t\t// new material\n\t\t\t\tmaterial.addEventListener('dispose', onMaterialDispose);\n\t\t\t} else if (program.cacheKey !== programCacheKey) {\n\t\t\t\t// changed glsl or parameters\n\t\t\t\treleaseMaterialProgramReference(material);\n\t\t\t} else if (materialProperties.lightsStateVersion !== lightsStateVersion) {\n\t\t\t\tprogramChange = false;\n\t\t\t} else if (parameters.shaderID !== undefined) {\n\t\t\t\t// same glsl and uniform list\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t// only rebuild uniform list\n\t\t\t\tprogramChange = false;\n\t\t\t}\n\n\t\t\tif (programChange) {\n\t\t\t\tparameters.uniforms = programCache.getUniforms(material);\n\t\t\t\tmaterial.onBeforeCompile(parameters, _this);\n\t\t\t\tprogram = programCache.acquireProgram(parameters, programCacheKey);\n\t\t\t\tmaterialProperties.program = program;\n\t\t\t\tmaterialProperties.uniforms = parameters.uniforms;\n\t\t\t\tmaterialProperties.outputEncoding = parameters.outputEncoding;\n\t\t\t}\n\n\t\t\tvar uniforms = materialProperties.uniforms;\n\n\t\t\tif (!material.isShaderMaterial && !material.isRawShaderMaterial || material.clipping === true) {\n\t\t\t\tmaterialProperties.numClippingPlanes = clipping.numPlanes;\n\t\t\t\tmaterialProperties.numIntersection = clipping.numIntersection;\n\t\t\t\tuniforms.clippingPlanes = clipping.uniform;\n\t\t\t} // store the light setup it was created for\n\n\n\t\t\tmaterialProperties.needsLights = materialNeedsLights(material);\n\t\t\tmaterialProperties.lightsStateVersion = lightsStateVersion;\n\n\t\t\tif (materialProperties.needsLights) {\n\t\t\t\t// wire up the material to this renderer's lighting state\n\t\t\t\tuniforms.ambientLightColor.value = lights.state.ambient;\n\t\t\t\tuniforms.lightProbe.value = lights.state.probe;\n\t\t\t\tuniforms.directionalLights.value = lights.state.directional;\n\t\t\t\tuniforms.directionalLightShadows.value = lights.state.directionalShadow;\n\t\t\t\tuniforms.spotLights.value = lights.state.spot;\n\t\t\t\tuniforms.spotLightShadows.value = lights.state.spotShadow;\n\t\t\t\tuniforms.rectAreaLights.value = lights.state.rectArea;\n\t\t\t\tuniforms.ltc_1.value = lights.state.rectAreaLTC1;\n\t\t\t\tuniforms.ltc_2.value = lights.state.rectAreaLTC2;\n\t\t\t\tuniforms.pointLights.value = lights.state.point;\n\t\t\t\tuniforms.pointLightShadows.value = lights.state.pointShadow;\n\t\t\t\tuniforms.hemisphereLights.value = lights.state.hemi;\n\t\t\t\tuniforms.directionalShadowMap.value = lights.state.directionalShadowMap;\n\t\t\t\tuniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;\n\t\t\t\tuniforms.spotShadowMap.value = lights.state.spotShadowMap;\n\t\t\t\tuniforms.spotShadowMatrix.value = lights.state.spotShadowMatrix;\n\t\t\t\tuniforms.pointShadowMap.value = lights.state.pointShadowMap;\n\t\t\t\tuniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix; // TODO (abelnation): add area lights shadow info to uniforms\n\t\t\t}\n\n\t\t\tvar progUniforms = materialProperties.program.getUniforms();\n\t\t\tvar uniformsList = WebGLUniforms.seqWithValue(progUniforms.seq, uniforms);\n\t\t\tmaterialProperties.uniformsList = uniformsList;\n\t\t}\n\n\t\tfunction setProgram(camera, scene, material, object) {\n\t\t\tif (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\t\ttextures.resetTextureUnits();\n\t\t\tvar fog = scene.fog;\n\t\t\tvar environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tvar encoding = _currentRenderTarget === null ? _this.outputEncoding : _currentRenderTarget.texture.encoding;\n\t\t\tvar envMap = cubemaps.get(material.envMap || environment);\n\t\t\tvar materialProperties = properties.get(material);\n\t\t\tvar lights = currentRenderState.state.lights;\n\n\t\t\tif (_clippingEnabled === true) {\n\t\t\t\tif (_localClippingEnabled === true || camera !== _currentCamera) {\n\t\t\t\t\tvar useCache = camera === _currentCamera && material.id === _currentMaterialId; // we might want to call this function with some ClippingGroup\n\t\t\t\t\t// object instead of the material, once it becomes feasible\n\t\t\t\t\t// (#8465, #8379)\n\n\t\t\t\t\tclipping.setState(material, camera, useCache);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (material.version === materialProperties.__version) {\n\t\t\t\tif (material.fog && materialProperties.fog !== fog) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.environment !== environment) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.needsLights && materialProperties.lightsStateVersion !== lights.state.version) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.numClippingPlanes !== undefined && (materialProperties.numClippingPlanes !== clipping.numPlanes || materialProperties.numIntersection !== clipping.numIntersection)) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.outputEncoding !== encoding) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.envMap !== envMap) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\tmaterialProperties.__version = material.version;\n\t\t\t}\n\n\t\t\tvar refreshProgram = false;\n\t\t\tvar refreshMaterial = false;\n\t\t\tvar refreshLights = false;\n\t\t\tvar program = materialProperties.program,\n\t\t\t\t\tp_uniforms = program.getUniforms(),\n\t\t\t\t\tm_uniforms = materialProperties.uniforms;\n\n\t\t\tif (state.useProgram(program.program)) {\n\t\t\t\trefreshProgram = true;\n\t\t\t\trefreshMaterial = true;\n\t\t\t\trefreshLights = true;\n\t\t\t}\n\n\t\t\tif (material.id !== _currentMaterialId) {\n\t\t\t\t_currentMaterialId = material.id;\n\t\t\t\trefreshMaterial = true;\n\t\t\t}\n\n\t\t\tif (refreshProgram || _currentCamera !== camera) {\n\t\t\t\tp_uniforms.setValue(_gl, 'projectionMatrix', camera.projectionMatrix);\n\n\t\t\t\tif (capabilities.logarithmicDepthBuffer) {\n\t\t\t\t\tp_uniforms.setValue(_gl, 'logDepthBufFC', 2.0 / (Math.log(camera.far + 1.0) / Math.LN2));\n\t\t\t\t}\n\n\t\t\t\tif (_currentCamera !== camera) {\n\t\t\t\t\t_currentCamera = camera; // lighting uniforms depend on the camera so enforce an update\n\t\t\t\t\t// now, in case this material supports lights - or later, when\n\t\t\t\t\t// the next material that does gets activated:\n\n\t\t\t\t\trefreshMaterial = true; // set to true on material change\n\n\t\t\t\t\trefreshLights = true; // remains set until update done\n\t\t\t\t} // load material specific uniforms\n\t\t\t\t// (shader material also gets them for the sake of genericity)\n\n\n\t\t\t\tif (material.isShaderMaterial || material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshStandardMaterial || material.envMap) {\n\t\t\t\t\tvar uCamPos = p_uniforms.map.cameraPosition;\n\n\t\t\t\t\tif (uCamPos !== undefined) {\n\t\t\t\t\t\tuCamPos.setValue(_gl, _vector3.setFromMatrixPosition(camera.matrixWorld));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial) {\n\t\t\t\t\tp_uniforms.setValue(_gl, 'isOrthographic', camera.isOrthographicCamera === true);\n\t\t\t\t}\n\n\t\t\t\tif (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial || material.isShadowMaterial || material.skinning) {\n\t\t\t\t\tp_uniforms.setValue(_gl, 'viewMatrix', camera.matrixWorldInverse);\n\t\t\t\t}\n\t\t\t} // skinning uniforms must be set even if material didn't change\n\t\t\t// auto-setting of texture unit for bone texture must go before other textures\n\t\t\t// otherwise textures used for skinning can take over texture units reserved for other material textures\n\n\n\t\t\tif (material.skinning) {\n\t\t\t\tp_uniforms.setOptional(_gl, object, 'bindMatrix');\n\t\t\t\tp_uniforms.setOptional(_gl, object, 'bindMatrixInverse');\n\t\t\t\tvar skeleton = object.skeleton;\n\n\t\t\t\tif (skeleton) {\n\t\t\t\t\tvar bones = skeleton.bones;\n\n\t\t\t\t\tif (capabilities.floatVertexTextures) {\n\t\t\t\t\t\tif (skeleton.boneTexture === null) {\n\t\t\t\t\t\t\t// layout (1 matrix = 4 pixels)\n\t\t\t\t\t\t\t//\t\t\tRGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n\t\t\t\t\t\t\t//\twith\t8x8\tpixel texture max\t 16 bones * 4 pixels =\t(8 * 8)\n\t\t\t\t\t\t\t//\t\t\t 16x16 pixel texture max\t 64 bones * 4 pixels = (16 * 16)\n\t\t\t\t\t\t\t//\t\t\t 32x32 pixel texture max\t256 bones * 4 pixels = (32 * 32)\n\t\t\t\t\t\t\t//\t\t\t 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)\n\t\t\t\t\t\t\tvar size = Math.sqrt(bones.length * 4); // 4 pixels needed for 1 matrix\n\n\t\t\t\t\t\t\tsize = MathUtils.ceilPowerOfTwo(size);\n\t\t\t\t\t\t\tsize = Math.max(size, 4);\n\t\t\t\t\t\t\tvar boneMatrices = new Float32Array(size * size * 4); // 4 floats per RGBA pixel\n\n\t\t\t\t\t\t\tboneMatrices.set(skeleton.boneMatrices); // copy current values\n\n\t\t\t\t\t\t\tvar boneTexture = new DataTexture(boneMatrices, size, size, RGBAFormat, FloatType);\n\t\t\t\t\t\t\tskeleton.boneMatrices = boneMatrices;\n\t\t\t\t\t\t\tskeleton.boneTexture = boneTexture;\n\t\t\t\t\t\t\tskeleton.boneTextureSize = size;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tp_uniforms.setValue(_gl, 'boneTexture', skeleton.boneTexture, textures);\n\t\t\t\t\t\tp_uniforms.setValue(_gl, 'boneTextureSize', skeleton.boneTextureSize);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tp_uniforms.setOptional(_gl, skeleton, 'boneMatrices');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow) {\n\t\t\t\tmaterialProperties.receiveShadow = object.receiveShadow;\n\t\t\t\tp_uniforms.setValue(_gl, 'receiveShadow', object.receiveShadow);\n\t\t\t}\n\n\t\t\tif (refreshMaterial) {\n\t\t\t\tp_uniforms.setValue(_gl, 'toneMappingExposure', _this.toneMappingExposure);\n\n\t\t\t\tif (materialProperties.needsLights) {\n\t\t\t\t\t// the current material requires lighting info\n\t\t\t\t\t// note: all lighting uniforms are always set correctly\n\t\t\t\t\t// they simply reference the renderer's state for their\n\t\t\t\t\t// values\n\t\t\t\t\t//\n\t\t\t\t\t// use the current material's .needsUpdate flags to set\n\t\t\t\t\t// the GL state when required\n\t\t\t\t\tmarkUniformsLightsNeedsUpdate(m_uniforms, refreshLights);\n\t\t\t\t} // refresh uniforms common to several materials\n\n\n\t\t\t\tif (fog && material.fog) {\n\t\t\t\t\tmaterials.refreshFogUniforms(m_uniforms, fog);\n\t\t\t\t}\n\n\t\t\t\tmaterials.refreshMaterialUniforms(m_uniforms, material, _pixelRatio, _height);\n\t\t\t\tWebGLUniforms.upload(_gl, materialProperties.uniformsList, m_uniforms, textures);\n\t\t\t}\n\n\t\t\tif (material.isShaderMaterial && material.uniformsNeedUpdate === true) {\n\t\t\t\tWebGLUniforms.upload(_gl, materialProperties.uniformsList, m_uniforms, textures);\n\t\t\t\tmaterial.uniformsNeedUpdate = false;\n\t\t\t}\n\n\t\t\tif (material.isSpriteMaterial) {\n\t\t\t\tp_uniforms.setValue(_gl, 'center', object.center);\n\t\t\t} // common matrices\n\n\n\t\t\tp_uniforms.setValue(_gl, 'modelViewMatrix', object.modelViewMatrix);\n\t\t\tp_uniforms.setValue(_gl, 'normalMatrix', object.normalMatrix);\n\t\t\tp_uniforms.setValue(_gl, 'modelMatrix', object.matrixWorld);\n\t\t\treturn program;\n\t\t} // If uniforms are marked as clean, they don't need to be loaded to the GPU.\n\n\n\t\tfunction markUniformsLightsNeedsUpdate(uniforms, value) {\n\t\t\tuniforms.ambientLightColor.needsUpdate = value;\n\t\t\tuniforms.lightProbe.needsUpdate = value;\n\t\t\tuniforms.directionalLights.needsUpdate = value;\n\t\t\tuniforms.directionalLightShadows.needsUpdate = value;\n\t\t\tuniforms.pointLights.needsUpdate = value;\n\t\t\tuniforms.pointLightShadows.needsUpdate = value;\n\t\t\tuniforms.spotLights.needsUpdate = value;\n\t\t\tuniforms.spotLightShadows.needsUpdate = value;\n\t\t\tuniforms.rectAreaLights.needsUpdate = value;\n\t\t\tuniforms.hemisphereLights.needsUpdate = value;\n\t\t}\n\n\t\tfunction materialNeedsLights(material) {\n\t\t\treturn material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial || material.isMeshStandardMaterial || material.isShadowMaterial || material.isShaderMaterial && material.lights === true;\n\t\t} // this.setTexture2D = setTexture2D;\n\n\n\t\tthis.setTexture2D = function () {\n\t\t\tvar warned = false; // backwards compatibility: peel texture.texture\n\n\t\t\treturn function setTexture2D(texture, slot) {\n\t\t\t\tif (texture && texture.isWebGLRenderTarget) {\n\t\t\t\t\tif (!warned) {\n\t\t\t\t\t\tconsole.warn(\"THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead.\");\n\t\t\t\t\t\twarned = true;\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture = texture.texture;\n\t\t\t\t}\n\n\t\t\t\ttextures.setTexture2D(texture, slot);\n\t\t\t};\n\t\t}(); //\n\n\n\t\tthis.setFramebuffer = function (value) {\n\t\t\tif (_framebuffer !== value && _currentRenderTarget === null) _gl.bindFramebuffer(36160, value);\n\t\t\t_framebuffer = value;\n\t\t};\n\n\t\tthis.getActiveCubeFace = function () {\n\t\t\treturn _currentActiveCubeFace;\n\t\t};\n\n\t\tthis.getActiveMipmapLevel = function () {\n\t\t\treturn _currentActiveMipmapLevel;\n\t\t};\n\n\t\tthis.getRenderList = function () {\n\t\t\treturn currentRenderList;\n\t\t};\n\n\t\tthis.setRenderList = function (renderList) {\n\t\t\tcurrentRenderList = renderList;\n\t\t};\n\n\t\tthis.getRenderTarget = function () {\n\t\t\treturn _currentRenderTarget;\n\t\t};\n\n\t\tthis.setRenderTarget = function (renderTarget, activeCubeFace, activeMipmapLevel) {\n\t\t\tif (activeCubeFace === void 0) {\n\t\t\t\tactiveCubeFace = 0;\n\t\t\t}\n\n\t\t\tif (activeMipmapLevel === void 0) {\n\t\t\t\tactiveMipmapLevel = 0;\n\t\t\t}\n\n\t\t\t_currentRenderTarget = renderTarget;\n\t\t\t_currentActiveCubeFace = activeCubeFace;\n\t\t\t_currentActiveMipmapLevel = activeMipmapLevel;\n\n\t\t\tif (renderTarget && properties.get(renderTarget).__webglFramebuffer === undefined) {\n\t\t\t\ttextures.setupRenderTarget(renderTarget);\n\t\t\t}\n\n\t\t\tvar framebuffer = _framebuffer;\n\t\t\tvar isCube = false;\n\n\t\t\tif (renderTarget) {\n\t\t\t\tvar __webglFramebuffer = properties.get(renderTarget).__webglFramebuffer;\n\n\t\t\t\tif (renderTarget.isWebGLCubeRenderTarget) {\n\t\t\t\t\tframebuffer = __webglFramebuffer[activeCubeFace];\n\t\t\t\t\tisCube = true;\n\t\t\t\t} else if (renderTarget.isWebGLMultisampleRenderTarget) {\n\t\t\t\t\tframebuffer = properties.get(renderTarget).__webglMultisampledFramebuffer;\n\t\t\t\t} else {\n\t\t\t\t\tframebuffer = __webglFramebuffer;\n\t\t\t\t}\n\n\t\t\t\t_currentViewport.copy(renderTarget.viewport);\n\n\t\t\t\t_currentScissor.copy(renderTarget.scissor);\n\n\t\t\t\t_currentScissorTest = renderTarget.scissorTest;\n\t\t\t} else {\n\t\t\t\t_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor();\n\n\t\t\t\t_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor();\n\n\t\t\t\t_currentScissorTest = _scissorTest;\n\t\t\t}\n\n\t\t\tif (_currentFramebuffer !== framebuffer) {\n\t\t\t\t_gl.bindFramebuffer(36160, framebuffer);\n\n\t\t\t\t_currentFramebuffer = framebuffer;\n\t\t\t}\n\n\t\t\tstate.viewport(_currentViewport);\n\t\t\tstate.scissor(_currentScissor);\n\t\t\tstate.setScissorTest(_currentScissorTest);\n\n\t\t\tif (isCube) {\n\t\t\t\tvar textureProperties = properties.get(renderTarget.texture);\n\n\t\t\t\t_gl.framebufferTexture2D(36160, 36064, 34069 + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel);\n\t\t\t}\n\t\t};\n\n\t\tthis.readRenderTargetPixels = function (renderTarget, x, y, width, height, buffer, activeCubeFaceIndex) {\n\t\t\tif (!(renderTarget && renderTarget.isWebGLRenderTarget)) {\n\t\t\t\tconsole.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar framebuffer = properties.get(renderTarget).__webglFramebuffer;\n\n\t\t\tif (renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined) {\n\t\t\t\tframebuffer = framebuffer[activeCubeFaceIndex];\n\t\t\t}\n\n\t\t\tif (framebuffer) {\n\t\t\t\tvar restore = false;\n\n\t\t\t\tif (framebuffer !== _currentFramebuffer) {\n\t\t\t\t\t_gl.bindFramebuffer(36160, framebuffer);\n\n\t\t\t\t\trestore = true;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar texture = renderTarget.texture;\n\t\t\t\t\tvar textureFormat = texture.format;\n\t\t\t\t\tvar textureType = texture.type;\n\n\t\t\t\t\tif (textureFormat !== RGBAFormat && utils.convert(textureFormat) !== _gl.getParameter(35739)) {\n\t\t\t\t\t\tconsole.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar halfFloatSupportedByExt = textureType === HalfFloatType && (extensions.has('EXT_color_buffer_half_float') || capabilities.isWebGL2 && extensions.has('EXT_color_buffer_float'));\n\n\t\t\t\t\tif (textureType !== UnsignedByteType && utils.convert(textureType) !== _gl.getParameter(35738) && // IE11, Edge and Chrome Mac < 52 (#9513)\n\t\t\t\t\t!(textureType === FloatType && (capabilities.isWebGL2 || extensions.has('OES_texture_float') || extensions.has('WEBGL_color_buffer_float'))) && // Chrome Mac >= 52 and Firefox\n\t\t\t\t\t!halfFloatSupportedByExt) {\n\t\t\t\t\t\tconsole.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (_gl.checkFramebufferStatus(36160) === 36053) {\n\t\t\t\t\t\t// the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)\n\t\t\t\t\t\tif (x >= 0 && x <= renderTarget.width - width && y >= 0 && y <= renderTarget.height - height) {\n\t\t\t\t\t\t\t_gl.readPixels(x, y, width, height, utils.convert(textureFormat), utils.convert(textureType), buffer);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error('THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.');\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (restore) {\n\t\t\t\t\t\t_gl.bindFramebuffer(36160, _currentFramebuffer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.copyFramebufferToTexture = function (position, texture, level) {\n\t\t\tif (level === void 0) {\n\t\t\t\tlevel = 0;\n\t\t\t}\n\n\t\t\tvar levelScale = Math.pow(2, -level);\n\t\t\tvar width = Math.floor(texture.image.width * levelScale);\n\t\t\tvar height = Math.floor(texture.image.height * levelScale);\n\t\t\tvar glFormat = utils.convert(texture.format);\n\t\t\ttextures.setTexture2D(texture, 0);\n\n\t\t\t_gl.copyTexImage2D(3553, level, glFormat, position.x, position.y, width, height, 0);\n\n\t\t\tstate.unbindTexture();\n\t\t};\n\n\t\tthis.copyTextureToTexture = function (position, srcTexture, dstTexture, level) {\n\t\t\tif (level === void 0) {\n\t\t\t\tlevel = 0;\n\t\t\t}\n\n\t\t\tvar width = srcTexture.image.width;\n\t\t\tvar height = srcTexture.image.height;\n\t\t\tvar glFormat = utils.convert(dstTexture.format);\n\t\t\tvar glType = utils.convert(dstTexture.type);\n\t\t\ttextures.setTexture2D(dstTexture, 0); // As another texture upload may have changed pixelStorei\n\t\t\t// parameters, make sure they are correct for the dstTexture\n\n\t\t\t_gl.pixelStorei(37440, dstTexture.flipY);\n\n\t\t\t_gl.pixelStorei(37441, dstTexture.premultiplyAlpha);\n\n\t\t\t_gl.pixelStorei(3317, dstTexture.unpackAlignment);\n\n\t\t\tif (srcTexture.isDataTexture) {\n\t\t\t\t_gl.texSubImage2D(3553, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data);\n\t\t\t} else {\n\t\t\t\tif (srcTexture.isCompressedTexture) {\n\t\t\t\t\t_gl.compressedTexSubImage2D(3553, level, position.x, position.y, srcTexture.mipmaps[0].width, srcTexture.mipmaps[0].height, glFormat, srcTexture.mipmaps[0].data);\n\t\t\t\t} else {\n\t\t\t\t\t_gl.texSubImage2D(3553, level, position.x, position.y, glFormat, glType, srcTexture.image);\n\t\t\t\t}\n\t\t\t} // Generate mipmaps only when copying level 0\n\n\n\t\t\tif (level === 0 && dstTexture.generateMipmaps) _gl.generateMipmap(3553);\n\t\t\tstate.unbindTexture();\n\t\t};\n\n\t\tthis.initTexture = function (texture) {\n\t\t\ttextures.setTexture2D(texture, 0);\n\t\t\tstate.unbindTexture();\n\t\t};\n\n\t\tthis.resetState = function () {\n\t\t\tstate.reset();\n\t\t\tbindingStates.reset();\n\t\t};\n\n\t\tif (typeof __THREE_DEVTOOLS__ !== 'undefined') {\n\t\t\t__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', {\n\t\t\t\tdetail: this\n\t\t\t})); // eslint-disable-line no-undef\n\n\t\t}\n\t}\n\n\tfunction WebGL1Renderer(parameters) {\n\t\tWebGLRenderer.call(this, parameters);\n\t}\n\n\tWebGL1Renderer.prototype = Object.assign(Object.create(WebGLRenderer.prototype), {\n\t\tconstructor: WebGL1Renderer,\n\t\tisWebGL1Renderer: true\n\t});\n\n\tvar FogExp2 = /*#__PURE__*/function () {\n\t\tfunction FogExp2(color, density) {\n\t\t\tObject.defineProperty(this, 'isFogExp2', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.name = '';\n\t\t\tthis.color = new Color(color);\n\t\t\tthis.density = density !== undefined ? density : 0.00025;\n\t\t}\n\n\t\tvar _proto = FogExp2.prototype;\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new FogExp2(this.color, this.density);\n\t\t};\n\n\t\t_proto.toJSON = function toJSON()\n\t\t/* meta */\n\t\t{\n\t\t\treturn {\n\t\t\t\ttype: 'FogExp2',\n\t\t\t\tcolor: this.color.getHex(),\n\t\t\t\tdensity: this.density\n\t\t\t};\n\t\t};\n\n\t\treturn FogExp2;\n\t}();\n\n\tvar Fog = /*#__PURE__*/function () {\n\t\tfunction Fog(color, near, far) {\n\t\t\tObject.defineProperty(this, 'isFog', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.name = '';\n\t\t\tthis.color = new Color(color);\n\t\t\tthis.near = near !== undefined ? near : 1;\n\t\t\tthis.far = far !== undefined ? far : 1000;\n\t\t}\n\n\t\tvar _proto = Fog.prototype;\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new Fog(this.color, this.near, this.far);\n\t\t};\n\n\t\t_proto.toJSON = function toJSON()\n\t\t/* meta */\n\t\t{\n\t\t\treturn {\n\t\t\t\ttype: 'Fog',\n\t\t\t\tcolor: this.color.getHex(),\n\t\t\t\tnear: this.near,\n\t\t\t\tfar: this.far\n\t\t\t};\n\t\t};\n\n\t\treturn Fog;\n\t}();\n\n\tvar Scene = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(Scene, _Object3D);\n\n\t\tfunction Scene() {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\tObject.defineProperty(_assertThisInitialized(_this), 'isScene', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\t_this.type = 'Scene';\n\t\t\t_this.background = null;\n\t\t\t_this.environment = null;\n\t\t\t_this.fog = null;\n\t\t\t_this.overrideMaterial = null;\n\t\t\t_this.autoUpdate = true; // checked by the renderer\n\n\t\t\tif (typeof __THREE_DEVTOOLS__ !== 'undefined') {\n\t\t\t\t__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', {\n\t\t\t\t\tdetail: _assertThisInitialized(_this)\n\t\t\t\t})); // eslint-disable-line no-undef\n\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = Scene.prototype;\n\n\t\t_proto.copy = function copy(source, recursive) {\n\t\t\t_Object3D.prototype.copy.call(this, source, recursive);\n\n\t\t\tif (source.background !== null) this.background = source.background.clone();\n\t\t\tif (source.environment !== null) this.environment = source.environment.clone();\n\t\t\tif (source.fog !== null) this.fog = source.fog.clone();\n\t\t\tif (source.overrideMaterial !== null) this.overrideMaterial = source.overrideMaterial.clone();\n\t\t\tthis.autoUpdate = source.autoUpdate;\n\t\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toJSON = function toJSON(meta) {\n\t\t\tvar data = _Object3D.prototype.toJSON.call(this, meta);\n\n\t\t\tif (this.background !== null) data.object.background = this.background.toJSON(meta);\n\t\t\tif (this.environment !== null) data.object.environment = this.environment.toJSON(meta);\n\t\t\tif (this.fog !== null) data.object.fog = this.fog.toJSON();\n\t\t\treturn data;\n\t\t};\n\n\t\treturn Scene;\n\t}(Object3D);\n\n\tfunction InterleavedBuffer(array, stride) {\n\t\tthis.array = array;\n\t\tthis.stride = stride;\n\t\tthis.count = array !== undefined ? array.length / stride : 0;\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = {\n\t\t\toffset: 0,\n\t\t\tcount: -1\n\t\t};\n\t\tthis.version = 0;\n\t\tthis.uuid = MathUtils.generateUUID();\n\t}\n\n\tObject.defineProperty(InterleavedBuffer.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\tObject.assign(InterleavedBuffer.prototype, {\n\t\tisInterleavedBuffer: true,\n\t\tonUploadCallback: function onUploadCallback() {},\n\t\tsetUsage: function setUsage(value) {\n\t\t\tthis.usage = value;\n\t\t\treturn this;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.array = new source.array.constructor(source.array);\n\t\t\tthis.count = source.count;\n\t\t\tthis.stride = source.stride;\n\t\t\tthis.usage = source.usage;\n\t\t\treturn this;\n\t\t},\n\t\tcopyAt: function copyAt(index1, attribute, index2) {\n\t\t\tindex1 *= this.stride;\n\t\t\tindex2 *= attribute.stride;\n\n\t\t\tfor (var i = 0, l = this.stride; i < l; i++) {\n\t\t\t\tthis.array[index1 + i] = attribute.array[index2 + i];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tset: function set(value, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.array.set(value, offset);\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone(data) {\n\t\t\tif (data.arrayBuffers === undefined) {\n\t\t\t\tdata.arrayBuffers = {};\n\t\t\t}\n\n\t\t\tif (this.array.buffer._uuid === undefined) {\n\t\t\t\tthis.array.buffer._uuid = MathUtils.generateUUID();\n\t\t\t}\n\n\t\t\tif (data.arrayBuffers[this.array.buffer._uuid] === undefined) {\n\t\t\t\tdata.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer;\n\t\t\t}\n\n\t\t\tvar array = new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]);\n\t\t\tvar ib = new InterleavedBuffer(array, this.stride);\n\t\t\tib.setUsage(this.usage);\n\t\t\treturn ib;\n\t\t},\n\t\tonUpload: function onUpload(callback) {\n\t\t\tthis.onUploadCallback = callback;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(data) {\n\t\t\tif (data.arrayBuffers === undefined) {\n\t\t\t\tdata.arrayBuffers = {};\n\t\t\t} // generate UUID for array buffer if necessary\n\n\n\t\t\tif (this.array.buffer._uuid === undefined) {\n\t\t\t\tthis.array.buffer._uuid = MathUtils.generateUUID();\n\t\t\t}\n\n\t\t\tif (data.arrayBuffers[this.array.buffer._uuid] === undefined) {\n\t\t\t\tdata.arrayBuffers[this.array.buffer._uuid] = Array.prototype.slice.call(new Uint32Array(this.array.buffer));\n\t\t\t} //\n\n\n\t\t\treturn {\n\t\t\t\tuuid: this.uuid,\n\t\t\t\tbuffer: this.array.buffer._uuid,\n\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\tstride: this.stride\n\t\t\t};\n\t\t}\n\t});\n\n\tvar _vector$6 = new Vector3();\n\n\tfunction InterleavedBufferAttribute(interleavedBuffer, itemSize, offset, normalized) {\n\t\tthis.name = '';\n\t\tthis.data = interleavedBuffer;\n\t\tthis.itemSize = itemSize;\n\t\tthis.offset = offset;\n\t\tthis.normalized = normalized === true;\n\t}\n\n\tObject.defineProperties(InterleavedBufferAttribute.prototype, {\n\t\tcount: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.data.count;\n\t\t\t}\n\t\t},\n\t\tarray: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.data.array;\n\t\t\t}\n\t\t},\n\t\tneedsUpdate: {\n\t\t\tset: function set(value) {\n\t\t\t\tthis.data.needsUpdate = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.assign(InterleavedBufferAttribute.prototype, {\n\t\tisInterleavedBufferAttribute: true,\n\t\tapplyMatrix4: function applyMatrix4(m) {\n\t\t\tfor (var i = 0, l = this.data.count; i < l; i++) {\n\t\t\t\t_vector$6.x = this.getX(i);\n\t\t\t\t_vector$6.y = this.getY(i);\n\t\t\t\t_vector$6.z = this.getZ(i);\n\n\t\t\t\t_vector$6.applyMatrix4(m);\n\n\t\t\t\tthis.setXYZ(i, _vector$6.x, _vector$6.y, _vector$6.z);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tsetX: function setX(index, x) {\n\t\t\tthis.data.array[index * this.data.stride + this.offset] = x;\n\t\t\treturn this;\n\t\t},\n\t\tsetY: function setY(index, y) {\n\t\t\tthis.data.array[index * this.data.stride + this.offset + 1] = y;\n\t\t\treturn this;\n\t\t},\n\t\tsetZ: function setZ(index, z) {\n\t\t\tthis.data.array[index * this.data.stride + this.offset + 2] = z;\n\t\t\treturn this;\n\t\t},\n\t\tsetW: function setW(index, w) {\n\t\t\tthis.data.array[index * this.data.stride + this.offset + 3] = w;\n\t\t\treturn this;\n\t\t},\n\t\tgetX: function getX(index) {\n\t\t\treturn this.data.array[index * this.data.stride + this.offset];\n\t\t},\n\t\tgetY: function getY(index) {\n\t\t\treturn this.data.array[index * this.data.stride + this.offset + 1];\n\t\t},\n\t\tgetZ: function getZ(index) {\n\t\t\treturn this.data.array[index * this.data.stride + this.offset + 2];\n\t\t},\n\t\tgetW: function getW(index) {\n\t\t\treturn this.data.array[index * this.data.stride + this.offset + 3];\n\t\t},\n\t\tsetXY: function setXY(index, x, y) {\n\t\t\tindex = index * this.data.stride + this.offset;\n\t\t\tthis.data.array[index + 0] = x;\n\t\t\tthis.data.array[index + 1] = y;\n\t\t\treturn this;\n\t\t},\n\t\tsetXYZ: function setXYZ(index, x, y, z) {\n\t\t\tindex = index * this.data.stride + this.offset;\n\t\t\tthis.data.array[index + 0] = x;\n\t\t\tthis.data.array[index + 1] = y;\n\t\t\tthis.data.array[index + 2] = z;\n\t\t\treturn this;\n\t\t},\n\t\tsetXYZW: function setXYZW(index, x, y, z, w) {\n\t\t\tindex = index * this.data.stride + this.offset;\n\t\t\tthis.data.array[index + 0] = x;\n\t\t\tthis.data.array[index + 1] = y;\n\t\t\tthis.data.array[index + 2] = z;\n\t\t\tthis.data.array[index + 3] = w;\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone(data) {\n\t\t\tif (data === undefined) {\n\t\t\t\tconsole.log('THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.');\n\t\t\t\tvar array = [];\n\n\t\t\t\tfor (var i = 0; i < this.count; i++) {\n\t\t\t\t\tvar index = i * this.data.stride + this.offset;\n\n\t\t\t\t\tfor (var j = 0; j < this.itemSize; j++) {\n\t\t\t\t\t\tarray.push(this.data.array[index + j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new BufferAttribute(new this.array.constructor(array), this.itemSize, this.normalized);\n\t\t\t} else {\n\t\t\t\tif (data.interleavedBuffers === undefined) {\n\t\t\t\t\tdata.interleavedBuffers = {};\n\t\t\t\t}\n\n\t\t\t\tif (data.interleavedBuffers[this.data.uuid] === undefined) {\n\t\t\t\t\tdata.interleavedBuffers[this.data.uuid] = this.data.clone(data);\n\t\t\t\t}\n\n\t\t\t\treturn new InterleavedBufferAttribute(data.interleavedBuffers[this.data.uuid], this.itemSize, this.offset, this.normalized);\n\t\t\t}\n\t\t},\n\t\ttoJSON: function toJSON(data) {\n\t\t\tif (data === undefined) {\n\t\t\t\tconsole.log('THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.');\n\t\t\t\tvar array = [];\n\n\t\t\t\tfor (var i = 0; i < this.count; i++) {\n\t\t\t\t\tvar index = i * this.data.stride + this.offset;\n\n\t\t\t\t\tfor (var j = 0; j < this.itemSize; j++) {\n\t\t\t\t\t\tarray.push(this.data.array[index + j]);\n\t\t\t\t\t}\n\t\t\t\t} // deinterleave data and save it as an ordinary buffer attribute for now\n\n\n\t\t\t\treturn {\n\t\t\t\t\titemSize: this.itemSize,\n\t\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\t\tarray: array,\n\t\t\t\t\tnormalized: this.normalized\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// save as true interlaved attribtue\n\t\t\t\tif (data.interleavedBuffers === undefined) {\n\t\t\t\t\tdata.interleavedBuffers = {};\n\t\t\t\t}\n\n\t\t\t\tif (data.interleavedBuffers[this.data.uuid] === undefined) {\n\t\t\t\t\tdata.interleavedBuffers[this.data.uuid] = this.data.toJSON(data);\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tisInterleavedBufferAttribute: true,\n\t\t\t\t\titemSize: this.itemSize,\n\t\t\t\t\tdata: this.data.uuid,\n\t\t\t\t\toffset: this.offset,\n\t\t\t\t\tnormalized: this.normalized\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\trotation: <float>,\n\t *\tsizeAttenuation: <bool>\n\t * }\n\t */\n\n\tfunction SpriteMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'SpriteMaterial';\n\t\tthis.color = new Color(0xffffff);\n\t\tthis.map = null;\n\t\tthis.alphaMap = null;\n\t\tthis.rotation = 0;\n\t\tthis.sizeAttenuation = true;\n\t\tthis.transparent = true;\n\t\tthis.setValues(parameters);\n\t}\n\n\tSpriteMaterial.prototype = Object.create(Material.prototype);\n\tSpriteMaterial.prototype.constructor = SpriteMaterial;\n\tSpriteMaterial.prototype.isSpriteMaterial = true;\n\n\tSpriteMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.rotation = source.rotation;\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\t\treturn this;\n\t};\n\n\tvar _geometry;\n\n\tvar _intersectPoint = new Vector3();\n\n\tvar _worldScale = new Vector3();\n\n\tvar _mvPosition = new Vector3();\n\n\tvar _alignedPosition = new Vector2();\n\n\tvar _rotatedPosition = new Vector2();\n\n\tvar _viewWorldMatrix = new Matrix4();\n\n\tvar _vA$1 = new Vector3();\n\n\tvar _vB$1 = new Vector3();\n\n\tvar _vC$1 = new Vector3();\n\n\tvar _uvA$1 = new Vector2();\n\n\tvar _uvB$1 = new Vector2();\n\n\tvar _uvC$1 = new Vector2();\n\n\tfunction Sprite(material) {\n\t\tObject3D.call(this);\n\t\tthis.type = 'Sprite';\n\n\t\tif (_geometry === undefined) {\n\t\t\t_geometry = new BufferGeometry();\n\t\t\tvar float32Array = new Float32Array([-0.5, -0.5, 0, 0, 0, 0.5, -0.5, 0, 1, 0, 0.5, 0.5, 0, 1, 1, -0.5, 0.5, 0, 0, 1]);\n\t\t\tvar interleavedBuffer = new InterleavedBuffer(float32Array, 5);\n\n\t\t\t_geometry.setIndex([0, 1, 2, 0, 2, 3]);\n\n\t\t\t_geometry.setAttribute('position', new InterleavedBufferAttribute(interleavedBuffer, 3, 0, false));\n\n\t\t\t_geometry.setAttribute('uv', new InterleavedBufferAttribute(interleavedBuffer, 2, 3, false));\n\t\t}\n\n\t\tthis.geometry = _geometry;\n\t\tthis.material = material !== undefined ? material : new SpriteMaterial();\n\t\tthis.center = new Vector2(0.5, 0.5);\n\t}\n\n\tSprite.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Sprite,\n\t\tisSprite: true,\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tif (raycaster.camera === null) {\n\t\t\t\tconsole.error('THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.');\n\t\t\t}\n\n\t\t\t_worldScale.setFromMatrixScale(this.matrixWorld);\n\n\t\t\t_viewWorldMatrix.copy(raycaster.camera.matrixWorld);\n\n\t\t\tthis.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse, this.matrixWorld);\n\n\t\t\t_mvPosition.setFromMatrixPosition(this.modelViewMatrix);\n\n\t\t\tif (raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false) {\n\t\t\t\t_worldScale.multiplyScalar(-_mvPosition.z);\n\t\t\t}\n\n\t\t\tvar rotation = this.material.rotation;\n\t\t\tvar sin, cos;\n\n\t\t\tif (rotation !== 0) {\n\t\t\t\tcos = Math.cos(rotation);\n\t\t\t\tsin = Math.sin(rotation);\n\t\t\t}\n\n\t\t\tvar center = this.center;\n\t\t\ttransformVertex(_vA$1.set(-0.5, -0.5, 0), _mvPosition, center, _worldScale, sin, cos);\n\t\t\ttransformVertex(_vB$1.set(0.5, -0.5, 0), _mvPosition, center, _worldScale, sin, cos);\n\t\t\ttransformVertex(_vC$1.set(0.5, 0.5, 0), _mvPosition, center, _worldScale, sin, cos);\n\n\t\t\t_uvA$1.set(0, 0);\n\n\t\t\t_uvB$1.set(1, 0);\n\n\t\t\t_uvC$1.set(1, 1); // check first triangle\n\n\n\t\t\tvar intersect = raycaster.ray.intersectTriangle(_vA$1, _vB$1, _vC$1, false, _intersectPoint);\n\n\t\t\tif (intersect === null) {\n\t\t\t\t// check second triangle\n\t\t\t\ttransformVertex(_vB$1.set(-0.5, 0.5, 0), _mvPosition, center, _worldScale, sin, cos);\n\n\t\t\t\t_uvB$1.set(0, 1);\n\n\t\t\t\tintersect = raycaster.ray.intersectTriangle(_vA$1, _vC$1, _vB$1, false, _intersectPoint);\n\n\t\t\t\tif (intersect === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar distance = raycaster.ray.origin.distanceTo(_intersectPoint);\n\t\t\tif (distance < raycaster.near || distance > raycaster.far) return;\n\t\t\tintersects.push({\n\t\t\t\tdistance: distance,\n\t\t\t\tpoint: _intersectPoint.clone(),\n\t\t\t\tuv: Triangle.getUV(_intersectPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2()),\n\t\t\t\tface: null,\n\t\t\t\tobject: this\n\t\t\t});\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\t\t\tif (source.center !== undefined) this.center.copy(source.center);\n\t\t\tthis.material = source.material;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction transformVertex(vertexPosition, mvPosition, center, scale, sin, cos) {\n\t\t// compute position in camera space\n\t\t_alignedPosition.subVectors(vertexPosition, center).addScalar(0.5).multiply(scale); // to check if rotation is not zero\n\n\n\t\tif (sin !== undefined) {\n\t\t\t_rotatedPosition.x = cos * _alignedPosition.x - sin * _alignedPosition.y;\n\t\t\t_rotatedPosition.y = sin * _alignedPosition.x + cos * _alignedPosition.y;\n\t\t} else {\n\t\t\t_rotatedPosition.copy(_alignedPosition);\n\t\t}\n\n\t\tvertexPosition.copy(mvPosition);\n\t\tvertexPosition.x += _rotatedPosition.x;\n\t\tvertexPosition.y += _rotatedPosition.y; // transform to world space\n\n\t\tvertexPosition.applyMatrix4(_viewWorldMatrix);\n\t}\n\n\tvar _v1$4 = new Vector3();\n\n\tvar _v2$2 = new Vector3();\n\n\tfunction LOD() {\n\t\tObject3D.call(this);\n\t\tthis._currentLevel = 0;\n\t\tthis.type = 'LOD';\n\t\tObject.defineProperties(this, {\n\t\t\tlevels: {\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: []\n\t\t\t}\n\t\t});\n\t\tthis.autoUpdate = true;\n\t}\n\n\tLOD.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: LOD,\n\t\tisLOD: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source, false);\n\t\t\tvar levels = source.levels;\n\n\t\t\tfor (var i = 0, l = levels.length; i < l; i++) {\n\t\t\t\tvar level = levels[i];\n\t\t\t\tthis.addLevel(level.object.clone(), level.distance);\n\t\t\t}\n\n\t\t\tthis.autoUpdate = source.autoUpdate;\n\t\t\treturn this;\n\t\t},\n\t\taddLevel: function addLevel(object, distance) {\n\t\t\tif (distance === void 0) {\n\t\t\t\tdistance = 0;\n\t\t\t}\n\n\t\t\tdistance = Math.abs(distance);\n\t\t\tvar levels = this.levels;\n\t\t\tvar l;\n\n\t\t\tfor (l = 0; l < levels.length; l++) {\n\t\t\t\tif (distance < levels[l].distance) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlevels.splice(l, 0, {\n\t\t\t\tdistance: distance,\n\t\t\t\tobject: object\n\t\t\t});\n\t\t\tthis.add(object);\n\t\t\treturn this;\n\t\t},\n\t\tgetCurrentLevel: function getCurrentLevel() {\n\t\t\treturn this._currentLevel;\n\t\t},\n\t\tgetObjectForDistance: function getObjectForDistance(distance) {\n\t\t\tvar levels = this.levels;\n\n\t\t\tif (levels.length > 0) {\n\t\t\t\tvar i, l;\n\n\t\t\t\tfor (i = 1, l = levels.length; i < l; i++) {\n\t\t\t\t\tif (distance < levels[i].distance) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn levels[i - 1].object;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar levels = this.levels;\n\n\t\t\tif (levels.length > 0) {\n\t\t\t\t_v1$4.setFromMatrixPosition(this.matrixWorld);\n\n\t\t\t\tvar distance = raycaster.ray.origin.distanceTo(_v1$4);\n\t\t\t\tthis.getObjectForDistance(distance).raycast(raycaster, intersects);\n\t\t\t}\n\t\t},\n\t\tupdate: function update(camera) {\n\t\t\tvar levels = this.levels;\n\n\t\t\tif (levels.length > 1) {\n\t\t\t\t_v1$4.setFromMatrixPosition(camera.matrixWorld);\n\n\t\t\t\t_v2$2.setFromMatrixPosition(this.matrixWorld);\n\n\t\t\t\tvar distance = _v1$4.distanceTo(_v2$2) / camera.zoom;\n\t\t\t\tlevels[0].object.visible = true;\n\t\t\t\tvar i, l;\n\n\t\t\t\tfor (i = 1, l = levels.length; i < l; i++) {\n\t\t\t\t\tif (distance >= levels[i].distance) {\n\t\t\t\t\t\tlevels[i - 1].object.visible = false;\n\t\t\t\t\t\tlevels[i].object.visible = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._currentLevel = i - 1;\n\n\t\t\t\tfor (; i < l; i++) {\n\t\t\t\t\tlevels[i].object.visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Object3D.prototype.toJSON.call(this, meta);\n\t\t\tif (this.autoUpdate === false) data.object.autoUpdate = false;\n\t\t\tdata.object.levels = [];\n\t\t\tvar levels = this.levels;\n\n\t\t\tfor (var i = 0, l = levels.length; i < l; i++) {\n\t\t\t\tvar level = levels[i];\n\t\t\t\tdata.object.levels.push({\n\t\t\t\t\tobject: level.object.uuid,\n\t\t\t\t\tdistance: level.distance\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tvar _basePosition = new Vector3();\n\n\tvar _skinIndex = new Vector4();\n\n\tvar _skinWeight = new Vector4();\n\n\tvar _vector$7 = new Vector3();\n\n\tvar _matrix$1 = new Matrix4();\n\n\tfunction SkinnedMesh(geometry, material) {\n\t\tif (geometry && geometry.isGeometry) {\n\t\t\tconsole.error('THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t}\n\n\t\tMesh.call(this, geometry, material);\n\t\tthis.type = 'SkinnedMesh';\n\t\tthis.bindMode = 'attached';\n\t\tthis.bindMatrix = new Matrix4();\n\t\tthis.bindMatrixInverse = new Matrix4();\n\t}\n\n\tSkinnedMesh.prototype = Object.assign(Object.create(Mesh.prototype), {\n\t\tconstructor: SkinnedMesh,\n\t\tisSkinnedMesh: true,\n\t\tcopy: function copy(source) {\n\t\t\tMesh.prototype.copy.call(this, source);\n\t\t\tthis.bindMode = source.bindMode;\n\t\t\tthis.bindMatrix.copy(source.bindMatrix);\n\t\t\tthis.bindMatrixInverse.copy(source.bindMatrixInverse);\n\t\t\tthis.skeleton = source.skeleton;\n\t\t\treturn this;\n\t\t},\n\t\tbind: function bind(skeleton, bindMatrix) {\n\t\t\tthis.skeleton = skeleton;\n\n\t\t\tif (bindMatrix === undefined) {\n\t\t\t\tthis.updateMatrixWorld(true);\n\t\t\t\tthis.skeleton.calculateInverses();\n\t\t\t\tbindMatrix = this.matrixWorld;\n\t\t\t}\n\n\t\t\tthis.bindMatrix.copy(bindMatrix);\n\t\t\tthis.bindMatrixInverse.copy(bindMatrix).invert();\n\t\t},\n\t\tpose: function pose() {\n\t\t\tthis.skeleton.pose();\n\t\t},\n\t\tnormalizeSkinWeights: function normalizeSkinWeights() {\n\t\t\tvar vector = new Vector4();\n\t\t\tvar skinWeight = this.geometry.attributes.skinWeight;\n\n\t\t\tfor (var i = 0, l = skinWeight.count; i < l; i++) {\n\t\t\t\tvector.x = skinWeight.getX(i);\n\t\t\t\tvector.y = skinWeight.getY(i);\n\t\t\t\tvector.z = skinWeight.getZ(i);\n\t\t\t\tvector.w = skinWeight.getW(i);\n\t\t\t\tvar scale = 1.0 / vector.manhattanLength();\n\n\t\t\t\tif (scale !== Infinity) {\n\t\t\t\t\tvector.multiplyScalar(scale);\n\t\t\t\t} else {\n\t\t\t\t\tvector.set(1, 0, 0, 0); // do something reasonable\n\t\t\t\t}\n\n\t\t\t\tskinWeight.setXYZW(i, vector.x, vector.y, vector.z, vector.w);\n\t\t\t}\n\t\t},\n\t\tupdateMatrixWorld: function updateMatrixWorld(force) {\n\t\t\tMesh.prototype.updateMatrixWorld.call(this, force);\n\n\t\t\tif (this.bindMode === 'attached') {\n\t\t\t\tthis.bindMatrixInverse.copy(this.matrixWorld).invert();\n\t\t\t} else if (this.bindMode === 'detached') {\n\t\t\t\tthis.bindMatrixInverse.copy(this.bindMatrix).invert();\n\t\t\t} else {\n\t\t\t\tconsole.warn('THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode);\n\t\t\t}\n\t\t},\n\t\tboneTransform: function boneTransform(index, target) {\n\t\t\tvar skeleton = this.skeleton;\n\t\t\tvar geometry = this.geometry;\n\n\t\t\t_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex, index);\n\n\t\t\t_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight, index);\n\n\t\t\t_basePosition.fromBufferAttribute(geometry.attributes.position, index).applyMatrix4(this.bindMatrix);\n\n\t\t\ttarget.set(0, 0, 0);\n\n\t\t\tfor (var i = 0; i < 4; i++) {\n\t\t\t\tvar weight = _skinWeight.getComponent(i);\n\n\t\t\t\tif (weight !== 0) {\n\t\t\t\t\tvar boneIndex = _skinIndex.getComponent(i);\n\n\t\t\t\t\t_matrix$1.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld, skeleton.boneInverses[boneIndex]);\n\n\t\t\t\t\ttarget.addScaledVector(_vector$7.copy(_basePosition).applyMatrix4(_matrix$1), weight);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn target.applyMatrix4(this.bindMatrixInverse);\n\t\t}\n\t});\n\n\tfunction Bone() {\n\t\tObject3D.call(this);\n\t\tthis.type = 'Bone';\n\t}\n\n\tBone.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Bone,\n\t\tisBone: true\n\t});\n\n\tvar _offsetMatrix = new Matrix4();\n\n\tvar _identityMatrix = new Matrix4();\n\n\tfunction Skeleton(bones, boneInverses) {\n\t\tif (bones === void 0) {\n\t\t\tbones = [];\n\t\t}\n\n\t\tif (boneInverses === void 0) {\n\t\t\tboneInverses = [];\n\t\t}\n\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.bones = bones.slice(0);\n\t\tthis.boneInverses = boneInverses;\n\t\tthis.boneMatrices = null;\n\t\tthis.boneTexture = null;\n\t\tthis.boneTextureSize = 0;\n\t\tthis.frame = -1;\n\t\tthis.init();\n\t}\n\n\tObject.assign(Skeleton.prototype, {\n\t\tinit: function init() {\n\t\t\tvar bones = this.bones;\n\t\t\tvar boneInverses = this.boneInverses;\n\t\t\tthis.boneMatrices = new Float32Array(bones.length * 16); // calculate inverse bone matrices if necessary\n\n\t\t\tif (boneInverses.length === 0) {\n\t\t\t\tthis.calculateInverses();\n\t\t\t} else {\n\t\t\t\t// handle special case\n\t\t\t\tif (bones.length !== boneInverses.length) {\n\t\t\t\t\tconsole.warn('THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.');\n\t\t\t\t\tthis.boneInverses = [];\n\n\t\t\t\t\tfor (var i = 0, il = this.bones.length; i < il; i++) {\n\t\t\t\t\t\tthis.boneInverses.push(new Matrix4());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcalculateInverses: function calculateInverses() {\n\t\t\tthis.boneInverses.length = 0;\n\n\t\t\tfor (var i = 0, il = this.bones.length; i < il; i++) {\n\t\t\t\tvar inverse = new Matrix4();\n\n\t\t\t\tif (this.bones[i]) {\n\t\t\t\t\tinverse.copy(this.bones[i].matrixWorld).invert();\n\t\t\t\t}\n\n\t\t\t\tthis.boneInverses.push(inverse);\n\t\t\t}\n\t\t},\n\t\tpose: function pose() {\n\t\t\t// recover the bind-time world matrices\n\t\t\tfor (var i = 0, il = this.bones.length; i < il; i++) {\n\t\t\t\tvar bone = this.bones[i];\n\n\t\t\t\tif (bone) {\n\t\t\t\t\tbone.matrixWorld.copy(this.boneInverses[i]).invert();\n\t\t\t\t}\n\t\t\t} // compute the local matrices, positions, rotations and scales\n\n\n\t\t\tfor (var _i = 0, _il = this.bones.length; _i < _il; _i++) {\n\t\t\t\tvar _bone = this.bones[_i];\n\n\t\t\t\tif (_bone) {\n\t\t\t\t\tif (_bone.parent && _bone.parent.isBone) {\n\t\t\t\t\t\t_bone.matrix.copy(_bone.parent.matrixWorld).invert();\n\n\t\t\t\t\t\t_bone.matrix.multiply(_bone.matrixWorld);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_bone.matrix.copy(_bone.matrixWorld);\n\t\t\t\t\t}\n\n\t\t\t\t\t_bone.matrix.decompose(_bone.position, _bone.quaternion, _bone.scale);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tupdate: function update() {\n\t\t\tvar bones = this.bones;\n\t\t\tvar boneInverses = this.boneInverses;\n\t\t\tvar boneMatrices = this.boneMatrices;\n\t\t\tvar boneTexture = this.boneTexture; // flatten bone matrices to array\n\n\t\t\tfor (var i = 0, il = bones.length; i < il; i++) {\n\t\t\t\t// compute the offset between the current and the original transform\n\t\t\t\tvar matrix = bones[i] ? bones[i].matrixWorld : _identityMatrix;\n\n\t\t\t\t_offsetMatrix.multiplyMatrices(matrix, boneInverses[i]);\n\n\t\t\t\t_offsetMatrix.toArray(boneMatrices, i * 16);\n\t\t\t}\n\n\t\t\tif (boneTexture !== null) {\n\t\t\t\tboneTexture.needsUpdate = true;\n\t\t\t}\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new Skeleton(this.bones, this.boneInverses);\n\t\t},\n\t\tgetBoneByName: function getBoneByName(name) {\n\t\t\tfor (var i = 0, il = this.bones.length; i < il; i++) {\n\t\t\t\tvar bone = this.bones[i];\n\n\t\t\t\tif (bone.name === name) {\n\t\t\t\t\treturn bone;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tif (this.boneTexture !== null) {\n\t\t\t\tthis.boneTexture.dispose();\n\t\t\t\tthis.boneTexture = null;\n\t\t\t}\n\t\t},\n\t\tfromJSON: function fromJSON(json, bones) {\n\t\t\tthis.uuid = json.uuid;\n\n\t\t\tfor (var i = 0, l = json.bones.length; i < l; i++) {\n\t\t\t\tvar uuid = json.bones[i];\n\t\t\t\tvar bone = bones[uuid];\n\n\t\t\t\tif (bone === undefined) {\n\t\t\t\t\tconsole.warn('THREE.Skeleton: No bone found with UUID:', uuid);\n\t\t\t\t\tbone = new Bone();\n\t\t\t\t}\n\n\t\t\t\tthis.bones.push(bone);\n\t\t\t\tthis.boneInverses.push(new Matrix4().fromArray(json.boneInverses[i]));\n\t\t\t}\n\n\t\t\tthis.init();\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Skeleton',\n\t\t\t\t\tgenerator: 'Skeleton.toJSON'\n\t\t\t\t},\n\t\t\t\tbones: [],\n\t\t\t\tboneInverses: []\n\t\t\t};\n\t\t\tdata.uuid = this.uuid;\n\t\t\tvar bones = this.bones;\n\t\t\tvar boneInverses = this.boneInverses;\n\n\t\t\tfor (var i = 0, l = bones.length; i < l; i++) {\n\t\t\t\tvar bone = bones[i];\n\t\t\t\tdata.bones.push(bone.uuid);\n\t\t\t\tvar boneInverse = boneInverses[i];\n\t\t\t\tdata.boneInverses.push(boneInverse.toArray());\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tvar _instanceLocalMatrix = new Matrix4();\n\n\tvar _instanceWorldMatrix = new Matrix4();\n\n\tvar _instanceIntersects = [];\n\n\tvar _mesh = new Mesh();\n\n\tfunction InstancedMesh(geometry, material, count) {\n\t\tMesh.call(this, geometry, material);\n\t\tthis.instanceMatrix = new BufferAttribute(new Float32Array(count * 16), 16);\n\t\tthis.instanceColor = null;\n\t\tthis.count = count;\n\t\tthis.frustumCulled = false;\n\t}\n\n\tInstancedMesh.prototype = Object.assign(Object.create(Mesh.prototype), {\n\t\tconstructor: InstancedMesh,\n\t\tisInstancedMesh: true,\n\t\tcopy: function copy(source) {\n\t\t\tMesh.prototype.copy.call(this, source);\n\t\t\tthis.instanceMatrix.copy(source.instanceMatrix);\n\t\t\tif (source.instanceColor !== null) this.instanceColor = source.instanceColor.clone();\n\t\t\tthis.count = source.count;\n\t\t\treturn this;\n\t\t},\n\t\tgetColorAt: function getColorAt(index, color) {\n\t\t\tcolor.fromArray(this.instanceColor.array, index * 3);\n\t\t},\n\t\tgetMatrixAt: function getMatrixAt(index, matrix) {\n\t\t\tmatrix.fromArray(this.instanceMatrix.array, index * 16);\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar matrixWorld = this.matrixWorld;\n\t\t\tvar raycastTimes = this.count;\n\t\t\t_mesh.geometry = this.geometry;\n\t\t\t_mesh.material = this.material;\n\t\t\tif (_mesh.material === undefined) return;\n\n\t\t\tfor (var instanceId = 0; instanceId < raycastTimes; instanceId++) {\n\t\t\t\t// calculate the world matrix for each instance\n\t\t\t\tthis.getMatrixAt(instanceId, _instanceLocalMatrix);\n\n\t\t\t\t_instanceWorldMatrix.multiplyMatrices(matrixWorld, _instanceLocalMatrix); // the mesh represents this single instance\n\n\n\t\t\t\t_mesh.matrixWorld = _instanceWorldMatrix;\n\n\t\t\t\t_mesh.raycast(raycaster, _instanceIntersects); // process the result of raycast\n\n\n\t\t\t\tfor (var i = 0, l = _instanceIntersects.length; i < l; i++) {\n\t\t\t\t\tvar intersect = _instanceIntersects[i];\n\t\t\t\t\tintersect.instanceId = instanceId;\n\t\t\t\t\tintersect.object = this;\n\t\t\t\t\tintersects.push(intersect);\n\t\t\t\t}\n\n\t\t\t\t_instanceIntersects.length = 0;\n\t\t\t}\n\t\t},\n\t\tsetColorAt: function setColorAt(index, color) {\n\t\t\tif (this.instanceColor === null) {\n\t\t\t\tthis.instanceColor = new BufferAttribute(new Float32Array(this.count * 3), 3);\n\t\t\t}\n\n\t\t\tcolor.toArray(this.instanceColor.array, index * 3);\n\t\t},\n\t\tsetMatrixAt: function setMatrixAt(index, matrix) {\n\t\t\tmatrix.toArray(this.instanceMatrix.array, index * 16);\n\t\t},\n\t\tupdateMorphTargets: function updateMorphTargets() {},\n\t\tdispose: function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t}\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\n\t *\tlinewidth: <float>,\n\t *\tlinecap: \"round\",\n\t *\tlinejoin: \"round\"\n\t * }\n\t */\n\n\tfunction LineBasicMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'LineBasicMaterial';\n\t\tthis.color = new Color(0xffffff);\n\t\tthis.linewidth = 1;\n\t\tthis.linecap = 'round';\n\t\tthis.linejoin = 'round';\n\t\tthis.morphTargets = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tLineBasicMaterial.prototype = Object.create(Material.prototype);\n\tLineBasicMaterial.prototype.constructor = LineBasicMaterial;\n\tLineBasicMaterial.prototype.isLineBasicMaterial = true;\n\n\tLineBasicMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.linewidth = source.linewidth;\n\t\tthis.linecap = source.linecap;\n\t\tthis.linejoin = source.linejoin;\n\t\tthis.morphTargets = source.morphTargets;\n\t\treturn this;\n\t};\n\n\tvar _start = new Vector3();\n\n\tvar _end = new Vector3();\n\n\tvar _inverseMatrix$1 = new Matrix4();\n\n\tvar _ray$1 = new Ray();\n\n\tvar _sphere$2 = new Sphere();\n\n\tfunction Line(geometry, material) {\n\t\tif (geometry === void 0) {\n\t\t\tgeometry = new BufferGeometry();\n\t\t}\n\n\t\tif (material === void 0) {\n\t\t\tmaterial = new LineBasicMaterial();\n\t\t}\n\n\t\tObject3D.call(this);\n\t\tthis.type = 'Line';\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\t\tthis.updateMorphTargets();\n\t}\n\n\tLine.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Line,\n\t\tisLine: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\t\t\tthis.material = source.material;\n\t\t\tthis.geometry = source.geometry;\n\t\t\treturn this;\n\t\t},\n\t\tcomputeLineDistances: function computeLineDistances() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\t// we assume non-indexed geometry\n\t\t\t\tif (geometry.index === null) {\n\t\t\t\t\tvar positionAttribute = geometry.attributes.position;\n\t\t\t\t\tvar lineDistances = [0];\n\n\t\t\t\t\tfor (var i = 1, l = positionAttribute.count; i < l; i++) {\n\t\t\t\t\t\t_start.fromBufferAttribute(positionAttribute, i - 1);\n\n\t\t\t\t\t\t_end.fromBufferAttribute(positionAttribute, i);\n\n\t\t\t\t\t\tlineDistances[i] = lineDistances[i - 1];\n\t\t\t\t\t\tlineDistances[i] += _start.distanceTo(_end);\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.setAttribute('lineDistance', new Float32BufferAttribute(lineDistances, 1));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.warn('THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.');\n\t\t\t\t}\n\t\t\t} else if (geometry.isGeometry) {\n\t\t\t\tconsole.error('THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar matrixWorld = this.matrixWorld;\n\t\t\tvar threshold = raycaster.params.Line.threshold; // Checking boundingSphere distance to ray\n\n\t\t\tif (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n\n\t\t\t_sphere$2.copy(geometry.boundingSphere);\n\n\t\t\t_sphere$2.applyMatrix4(matrixWorld);\n\n\t\t\t_sphere$2.radius += threshold;\n\t\t\tif (raycaster.ray.intersectsSphere(_sphere$2) === false) return; //\n\n\t\t\t_inverseMatrix$1.copy(matrixWorld).invert();\n\n\t\t\t_ray$1.copy(raycaster.ray).applyMatrix4(_inverseMatrix$1);\n\n\t\t\tvar localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3);\n\t\t\tvar localThresholdSq = localThreshold * localThreshold;\n\t\t\tvar vStart = new Vector3();\n\t\t\tvar vEnd = new Vector3();\n\t\t\tvar interSegment = new Vector3();\n\t\t\tvar interRay = new Vector3();\n\t\t\tvar step = this.isLineSegments ? 2 : 1;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar index = geometry.index;\n\t\t\t\tvar attributes = geometry.attributes;\n\t\t\t\tvar positionAttribute = attributes.position;\n\n\t\t\t\tif (index !== null) {\n\t\t\t\t\tvar indices = index.array;\n\n\t\t\t\t\tfor (var i = 0, l = indices.length - 1; i < l; i += step) {\n\t\t\t\t\t\tvar a = indices[i];\n\t\t\t\t\t\tvar b = indices[i + 1];\n\t\t\t\t\t\tvStart.fromBufferAttribute(positionAttribute, a);\n\t\t\t\t\t\tvEnd.fromBufferAttribute(positionAttribute, b);\n\n\t\t\t\t\t\tvar distSq = _ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment);\n\n\t\t\t\t\t\tif (distSq > localThresholdSq) continue;\n\t\t\t\t\t\tinterRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation\n\n\t\t\t\t\t\tvar distance = raycaster.ray.origin.distanceTo(interRay);\n\t\t\t\t\t\tif (distance < raycaster.near || distance > raycaster.far) continue;\n\t\t\t\t\t\tintersects.push({\n\t\t\t\t\t\t\tdistance: distance,\n\t\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4(this.matrixWorld),\n\t\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\t\tface: null,\n\t\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\t\tobject: this\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (var _i = 0, _l = positionAttribute.count - 1; _i < _l; _i += step) {\n\t\t\t\t\t\tvStart.fromBufferAttribute(positionAttribute, _i);\n\t\t\t\t\t\tvEnd.fromBufferAttribute(positionAttribute, _i + 1);\n\n\t\t\t\t\t\tvar _distSq = _ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment);\n\n\t\t\t\t\t\tif (_distSq > localThresholdSq) continue;\n\t\t\t\t\t\tinterRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation\n\n\t\t\t\t\t\tvar _distance = raycaster.ray.origin.distanceTo(interRay);\n\n\t\t\t\t\t\tif (_distance < raycaster.near || _distance > raycaster.far) continue;\n\t\t\t\t\t\tintersects.push({\n\t\t\t\t\t\t\tdistance: _distance,\n\t\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4(this.matrixWorld),\n\t\t\t\t\t\t\tindex: _i,\n\t\t\t\t\t\t\tface: null,\n\t\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\t\tobject: this\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (geometry.isGeometry) {\n\t\t\t\tconsole.error('THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\t\t},\n\t\tupdateMorphTargets: function updateMorphTargets() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar morphAttributes = geometry.morphAttributes;\n\t\t\t\tvar keys = Object.keys(morphAttributes);\n\n\t\t\t\tif (keys.length > 0) {\n\t\t\t\t\tvar morphAttribute = morphAttributes[keys[0]];\n\n\t\t\t\t\tif (morphAttribute !== undefined) {\n\t\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\t\tfor (var m = 0, ml = morphAttribute.length; m < ml; m++) {\n\t\t\t\t\t\t\tvar name = morphAttribute[m].name || String(m);\n\t\t\t\t\t\t\tthis.morphTargetInfluences.push(0);\n\t\t\t\t\t\t\tthis.morphTargetDictionary[name] = m;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar morphTargets = geometry.morphTargets;\n\n\t\t\t\tif (morphTargets !== undefined && morphTargets.length > 0) {\n\t\t\t\t\tconsole.error('THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tvar _start$1 = new Vector3();\n\n\tvar _end$1 = new Vector3();\n\n\tfunction LineSegments(geometry, material) {\n\t\tLine.call(this, geometry, material);\n\t\tthis.type = 'LineSegments';\n\t}\n\n\tLineSegments.prototype = Object.assign(Object.create(Line.prototype), {\n\t\tconstructor: LineSegments,\n\t\tisLineSegments: true,\n\t\tcomputeLineDistances: function computeLineDistances() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\t// we assume non-indexed geometry\n\t\t\t\tif (geometry.index === null) {\n\t\t\t\t\tvar positionAttribute = geometry.attributes.position;\n\t\t\t\t\tvar lineDistances = [];\n\n\t\t\t\t\tfor (var i = 0, l = positionAttribute.count; i < l; i += 2) {\n\t\t\t\t\t\t_start$1.fromBufferAttribute(positionAttribute, i);\n\n\t\t\t\t\t\t_end$1.fromBufferAttribute(positionAttribute, i + 1);\n\n\t\t\t\t\t\tlineDistances[i] = i === 0 ? 0 : lineDistances[i - 1];\n\t\t\t\t\t\tlineDistances[i + 1] = lineDistances[i] + _start$1.distanceTo(_end$1);\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.setAttribute('lineDistance', new Float32BufferAttribute(lineDistances, 1));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.warn('THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.');\n\t\t\t\t}\n\t\t\t} else if (geometry.isGeometry) {\n\t\t\t\tconsole.error('THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction LineLoop(geometry, material) {\n\t\tLine.call(this, geometry, material);\n\t\tthis.type = 'LineLoop';\n\t}\n\n\tLineLoop.prototype = Object.assign(Object.create(Line.prototype), {\n\t\tconstructor: LineLoop,\n\t\tisLineLoop: true\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tsize: <float>,\n\t *\tsizeAttenuation: <bool>\n\t *\n\t *\tmorphTargets: <bool>\n\t * }\n\t */\n\n\tfunction PointsMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'PointsMaterial';\n\t\tthis.color = new Color(0xffffff);\n\t\tthis.map = null;\n\t\tthis.alphaMap = null;\n\t\tthis.size = 1;\n\t\tthis.sizeAttenuation = true;\n\t\tthis.morphTargets = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tPointsMaterial.prototype = Object.create(Material.prototype);\n\tPointsMaterial.prototype.constructor = PointsMaterial;\n\tPointsMaterial.prototype.isPointsMaterial = true;\n\n\tPointsMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.size = source.size;\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\t\tthis.morphTargets = source.morphTargets;\n\t\treturn this;\n\t};\n\n\tvar _inverseMatrix$2 = new Matrix4();\n\n\tvar _ray$2 = new Ray();\n\n\tvar _sphere$3 = new Sphere();\n\n\tvar _position$1 = new Vector3();\n\n\tfunction Points(geometry, material) {\n\t\tif (geometry === void 0) {\n\t\t\tgeometry = new BufferGeometry();\n\t\t}\n\n\t\tif (material === void 0) {\n\t\t\tmaterial = new PointsMaterial();\n\t\t}\n\n\t\tObject3D.call(this);\n\t\tthis.type = 'Points';\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\t\tthis.updateMorphTargets();\n\t}\n\n\tPoints.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Points,\n\t\tisPoints: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\t\t\tthis.material = source.material;\n\t\t\tthis.geometry = source.geometry;\n\t\t\treturn this;\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar matrixWorld = this.matrixWorld;\n\t\t\tvar threshold = raycaster.params.Points.threshold; // Checking boundingSphere distance to ray\n\n\t\t\tif (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n\n\t\t\t_sphere$3.copy(geometry.boundingSphere);\n\n\t\t\t_sphere$3.applyMatrix4(matrixWorld);\n\n\t\t\t_sphere$3.radius += threshold;\n\t\t\tif (raycaster.ray.intersectsSphere(_sphere$3) === false) return; //\n\n\t\t\t_inverseMatrix$2.copy(matrixWorld).invert();\n\n\t\t\t_ray$2.copy(raycaster.ray).applyMatrix4(_inverseMatrix$2);\n\n\t\t\tvar localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3);\n\t\t\tvar localThresholdSq = localThreshold * localThreshold;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar index = geometry.index;\n\t\t\t\tvar attributes = geometry.attributes;\n\t\t\t\tvar positionAttribute = attributes.position;\n\n\t\t\t\tif (index !== null) {\n\t\t\t\t\tvar indices = index.array;\n\n\t\t\t\t\tfor (var i = 0, il = indices.length; i < il; i++) {\n\t\t\t\t\t\tvar a = indices[i];\n\n\t\t\t\t\t\t_position$1.fromBufferAttribute(positionAttribute, a);\n\n\t\t\t\t\t\ttestPoint(_position$1, a, localThresholdSq, matrixWorld, raycaster, intersects, this);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (var _i = 0, l = positionAttribute.count; _i < l; _i++) {\n\t\t\t\t\t\t_position$1.fromBufferAttribute(positionAttribute, _i);\n\n\t\t\t\t\t\ttestPoint(_position$1, _i, localThresholdSq, matrixWorld, raycaster, intersects, this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error('THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\t\t},\n\t\tupdateMorphTargets: function updateMorphTargets() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar morphAttributes = geometry.morphAttributes;\n\t\t\t\tvar keys = Object.keys(morphAttributes);\n\n\t\t\t\tif (keys.length > 0) {\n\t\t\t\t\tvar morphAttribute = morphAttributes[keys[0]];\n\n\t\t\t\t\tif (morphAttribute !== undefined) {\n\t\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\t\tfor (var m = 0, ml = morphAttribute.length; m < ml; m++) {\n\t\t\t\t\t\t\tvar name = morphAttribute[m].name || String(m);\n\t\t\t\t\t\t\tthis.morphTargetInfluences.push(0);\n\t\t\t\t\t\t\tthis.morphTargetDictionary[name] = m;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar morphTargets = geometry.morphTargets;\n\n\t\t\t\tif (morphTargets !== undefined && morphTargets.length > 0) {\n\t\t\t\t\tconsole.error('THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction testPoint(point, index, localThresholdSq, matrixWorld, raycaster, intersects, object) {\n\t\tvar rayPointDistanceSq = _ray$2.distanceSqToPoint(point);\n\n\t\tif (rayPointDistanceSq < localThresholdSq) {\n\t\t\tvar intersectPoint = new Vector3();\n\n\t\t\t_ray$2.closestPointToPoint(point, intersectPoint);\n\n\t\t\tintersectPoint.applyMatrix4(matrixWorld);\n\t\t\tvar distance = raycaster.ray.origin.distanceTo(intersectPoint);\n\t\t\tif (distance < raycaster.near || distance > raycaster.far) return;\n\t\t\tintersects.push({\n\t\t\t\tdistance: distance,\n\t\t\t\tdistanceToRay: Math.sqrt(rayPointDistanceSq),\n\t\t\t\tpoint: intersectPoint,\n\t\t\t\tindex: index,\n\t\t\t\tface: null,\n\t\t\t\tobject: object\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction VideoTexture(video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy) {\n\t\tTexture.call(this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n\t\tthis.format = format !== undefined ? format : RGBFormat;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : LinearFilter;\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : LinearFilter;\n\t\tthis.generateMipmaps = false;\n\t\tvar scope = this;\n\n\t\tfunction updateVideo() {\n\t\t\tscope.needsUpdate = true;\n\t\t\tvideo.requestVideoFrameCallback(updateVideo);\n\t\t}\n\n\t\tif ('requestVideoFrameCallback' in video) {\n\t\t\tvideo.requestVideoFrameCallback(updateVideo);\n\t\t}\n\t}\n\n\tVideoTexture.prototype = Object.assign(Object.create(Texture.prototype), {\n\t\tconstructor: VideoTexture,\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor(this.image).copy(this);\n\t\t},\n\t\tisVideoTexture: true,\n\t\tupdate: function update() {\n\t\t\tvar video = this.image;\n\t\t\tvar hasVideoFrameCallback = ('requestVideoFrameCallback' in video);\n\n\t\t\tif (hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA) {\n\t\t\t\tthis.needsUpdate = true;\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction CompressedTexture(mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding) {\n\t\tTexture.call(this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);\n\t\tthis.image = {\n\t\t\twidth: width,\n\t\t\theight: height\n\t\t};\n\t\tthis.mipmaps = mipmaps; // no flipping for cube textures\n\t\t// (also flipping doesn't work for compressed textures )\n\n\t\tthis.flipY = false; // can't generate mipmaps for compressed textures\n\t\t// mips must be embedded in DDS files\n\n\t\tthis.generateMipmaps = false;\n\t}\n\n\tCompressedTexture.prototype = Object.create(Texture.prototype);\n\tCompressedTexture.prototype.constructor = CompressedTexture;\n\tCompressedTexture.prototype.isCompressedTexture = true;\n\n\tfunction CanvasTexture(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy) {\n\t\tTexture.call(this, canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n\t\tthis.needsUpdate = true;\n\t}\n\n\tCanvasTexture.prototype = Object.create(Texture.prototype);\n\tCanvasTexture.prototype.constructor = CanvasTexture;\n\tCanvasTexture.prototype.isCanvasTexture = true;\n\n\tfunction DepthTexture(width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format) {\n\t\tformat = format !== undefined ? format : DepthFormat;\n\n\t\tif (format !== DepthFormat && format !== DepthStencilFormat) {\n\t\t\tthrow new Error('DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat');\n\t\t}\n\n\t\tif (type === undefined && format === DepthFormat) type = UnsignedShortType;\n\t\tif (type === undefined && format === DepthStencilFormat) type = UnsignedInt248Type;\n\t\tTexture.call(this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n\t\tthis.image = {\n\t\t\twidth: width,\n\t\t\theight: height\n\t\t};\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : NearestFilter;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : NearestFilter;\n\t\tthis.flipY = false;\n\t\tthis.generateMipmaps = false;\n\t}\n\n\tDepthTexture.prototype = Object.create(Texture.prototype);\n\tDepthTexture.prototype.constructor = DepthTexture;\n\tDepthTexture.prototype.isDepthTexture = true;\n\n\tvar CircleGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(CircleGeometry, _BufferGeometry);\n\n\t\tfunction CircleGeometry(radius, segments, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (segments === void 0) {\n\t\t\t\tsegments = 8;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'CircleGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tsegments: segments,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\t\t\tsegments = Math.max(3, segments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar uv = new Vector2(); // center point\n\n\t\t\tvertices.push(0, 0, 0);\n\t\t\tnormals.push(0, 0, 1);\n\t\t\tuvs.push(0.5, 0.5);\n\n\t\t\tfor (var s = 0, i = 3; s <= segments; s++, i += 3) {\n\t\t\t\tvar segment = thetaStart + s / segments * thetaLength; // vertex\n\n\t\t\t\tvertex.x = radius * Math.cos(segment);\n\t\t\t\tvertex.y = radius * Math.sin(segment);\n\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\tnormals.push(0, 0, 1); // uvs\n\n\t\t\t\tuv.x = (vertices[i] / radius + 1) / 2;\n\t\t\t\tuv.y = (vertices[i + 1] / radius + 1) / 2;\n\t\t\t\tuvs.push(uv.x, uv.y);\n\t\t\t} // indices\n\n\n\t\t\tfor (var _i = 1; _i <= segments; _i++) {\n\t\t\t\tindices.push(_i, _i + 1, 0);\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn CircleGeometry;\n\t}(BufferGeometry);\n\n\tvar CylinderGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(CylinderGeometry, _BufferGeometry);\n\n\t\tfunction CylinderGeometry(radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (radiusTop === void 0) {\n\t\t\t\tradiusTop = 1;\n\t\t\t}\n\n\t\t\tif (radiusBottom === void 0) {\n\t\t\t\tradiusBottom = 1;\n\t\t\t}\n\n\t\t\tif (height === void 0) {\n\t\t\t\theight = 1;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 1;\n\t\t\t}\n\n\t\t\tif (openEnded === void 0) {\n\t\t\t\topenEnded = false;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'CylinderGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradiusTop: radiusTop,\n\t\t\t\tradiusBottom: radiusBottom,\n\t\t\t\theight: height,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\theightSegments: heightSegments,\n\t\t\t\topenEnded: openEnded,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\n\t\t\tvar scope = _assertThisInitialized(_this);\n\n\t\t\tradialSegments = Math.floor(radialSegments);\n\t\t\theightSegments = Math.floor(heightSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar index = 0;\n\t\t\tvar indexArray = [];\n\t\t\tvar halfHeight = height / 2;\n\t\t\tvar groupStart = 0; // generate geometry\n\n\t\t\tgenerateTorso();\n\n\t\t\tif (openEnded === false) {\n\t\t\t\tif (radiusTop > 0) generateCap(true);\n\t\t\t\tif (radiusBottom > 0) generateCap(false);\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\tfunction generateTorso() {\n\t\t\t\tvar normal = new Vector3();\n\t\t\t\tvar vertex = new Vector3();\n\t\t\t\tvar groupCount = 0; // this will be used to calculate the normal\n\n\t\t\t\tvar slope = (radiusBottom - radiusTop) / height; // generate vertices, normals and uvs\n\n\t\t\t\tfor (var y = 0; y <= heightSegments; y++) {\n\t\t\t\t\tvar indexRow = [];\n\t\t\t\t\tvar v = y / heightSegments; // calculate the radius of the current row\n\n\t\t\t\t\tvar radius = v * (radiusBottom - radiusTop) + radiusTop;\n\n\t\t\t\t\tfor (var x = 0; x <= radialSegments; x++) {\n\t\t\t\t\t\tvar u = x / radialSegments;\n\t\t\t\t\t\tvar theta = u * thetaLength + thetaStart;\n\t\t\t\t\t\tvar sinTheta = Math.sin(theta);\n\t\t\t\t\t\tvar cosTheta = Math.cos(theta); // vertex\n\n\t\t\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\t\t\tvertex.y = -v * height + halfHeight;\n\t\t\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\t\tnormal.set(sinTheta, slope, cosTheta).normalize();\n\t\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\t\t\tuvs.push(u, 1 - v); // save index of vertex in respective row\n\n\t\t\t\t\t\tindexRow.push(index++);\n\t\t\t\t\t} // now save vertices of the row in our index array\n\n\n\t\t\t\t\tindexArray.push(indexRow);\n\t\t\t\t} // generate indices\n\n\n\t\t\t\tfor (var _x = 0; _x < radialSegments; _x++) {\n\t\t\t\t\tfor (var _y = 0; _y < heightSegments; _y++) {\n\t\t\t\t\t\t// we use the index array to access the correct indices\n\t\t\t\t\t\tvar a = indexArray[_y][_x];\n\t\t\t\t\t\tvar b = indexArray[_y + 1][_x];\n\t\t\t\t\t\tvar c = indexArray[_y + 1][_x + 1];\n\t\t\t\t\t\tvar d = indexArray[_y][_x + 1]; // faces\n\n\t\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\t\tindices.push(b, c, d); // update group counter\n\n\t\t\t\t\t\tgroupCount += 6;\n\t\t\t\t\t}\n\t\t\t\t} // add a group to the geometry. this will ensure multi material support\n\n\n\t\t\t\tscope.addGroup(groupStart, groupCount, 0); // calculate new start value for groups\n\n\t\t\t\tgroupStart += groupCount;\n\t\t\t}\n\n\t\t\tfunction generateCap(top) {\n\t\t\t\t// save the index of the first center vertex\n\t\t\t\tvar centerIndexStart = index;\n\t\t\t\tvar uv = new Vector2();\n\t\t\t\tvar vertex = new Vector3();\n\t\t\t\tvar groupCount = 0;\n\t\t\t\tvar radius = top === true ? radiusTop : radiusBottom;\n\t\t\t\tvar sign = top === true ? 1 : -1; // first we generate the center vertex data of the cap.\n\t\t\t\t// because the geometry needs one set of uvs per face,\n\t\t\t\t// we must generate a center vertex per face/segment\n\n\t\t\t\tfor (var x = 1; x <= radialSegments; x++) {\n\t\t\t\t\t// vertex\n\t\t\t\t\tvertices.push(0, halfHeight * sign, 0); // normal\n\n\t\t\t\t\tnormals.push(0, sign, 0); // uv\n\n\t\t\t\t\tuvs.push(0.5, 0.5); // increase index\n\n\t\t\t\t\tindex++;\n\t\t\t\t} // save the index of the last center vertex\n\n\n\t\t\t\tvar centerIndexEnd = index; // now we generate the surrounding vertices, normals and uvs\n\n\t\t\t\tfor (var _x2 = 0; _x2 <= radialSegments; _x2++) {\n\t\t\t\t\tvar u = _x2 / radialSegments;\n\t\t\t\t\tvar theta = u * thetaLength + thetaStart;\n\t\t\t\t\tvar cosTheta = Math.cos(theta);\n\t\t\t\t\tvar sinTheta = Math.sin(theta); // vertex\n\n\t\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\t\tvertex.y = halfHeight * sign;\n\t\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\tnormals.push(0, sign, 0); // uv\n\n\t\t\t\t\tuv.x = cosTheta * 0.5 + 0.5;\n\t\t\t\t\tuv.y = sinTheta * 0.5 * sign + 0.5;\n\t\t\t\t\tuvs.push(uv.x, uv.y); // increase index\n\n\t\t\t\t\tindex++;\n\t\t\t\t} // generate indices\n\n\n\t\t\t\tfor (var _x3 = 0; _x3 < radialSegments; _x3++) {\n\t\t\t\t\tvar c = centerIndexStart + _x3;\n\t\t\t\t\tvar i = centerIndexEnd + _x3;\n\n\t\t\t\t\tif (top === true) {\n\t\t\t\t\t\t// face top\n\t\t\t\t\t\tindices.push(i, i + 1, c);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// face bottom\n\t\t\t\t\t\tindices.push(i + 1, i, c);\n\t\t\t\t\t}\n\n\t\t\t\t\tgroupCount += 3;\n\t\t\t\t} // add a group to the geometry. this will ensure multi material support\n\n\n\t\t\t\tscope.addGroup(groupStart, groupCount, top === true ? 1 : 2); // calculate new start value for groups\n\n\t\t\t\tgroupStart += groupCount;\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn CylinderGeometry;\n\t}(BufferGeometry);\n\n\tvar ConeGeometry = /*#__PURE__*/function (_CylinderGeometry) {\n\t\t_inheritsLoose(ConeGeometry, _CylinderGeometry);\n\n\t\tfunction ConeGeometry(radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (height === void 0) {\n\t\t\t\theight = 1;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 1;\n\t\t\t}\n\n\t\t\tif (openEnded === void 0) {\n\t\t\t\topenEnded = false;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _CylinderGeometry.call(this, 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength) || this;\n\t\t\t_this.type = 'ConeGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\theight: height,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\theightSegments: heightSegments,\n\t\t\t\topenEnded: openEnded,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn ConeGeometry;\n\t}(CylinderGeometry);\n\n\tvar PolyhedronGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(PolyhedronGeometry, _BufferGeometry);\n\n\t\tfunction PolyhedronGeometry(vertices, indices, radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'PolyhedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tvertices: vertices,\n\t\t\t\tindices: indices,\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t}; // default buffer data\n\n\t\t\tvar vertexBuffer = [];\n\t\t\tvar uvBuffer = []; // the subdivision creates the vertex buffer data\n\n\t\t\tsubdivide(detail); // all vertices should lie on a conceptual sphere with a given radius\n\n\t\t\tapplyRadius(radius); // finally, create the uv data\n\n\t\t\tgenerateUVs(); // build non-indexed geometry\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertexBuffer, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(vertexBuffer.slice(), 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvBuffer, 2));\n\n\t\t\tif (detail === 0) {\n\t\t\t\t_this.computeVertexNormals(); // flat normals\n\n\t\t\t} else {\n\t\t\t\t_this.normalizeNormals(); // smooth normals\n\n\t\t\t} // helper functions\n\n\n\t\t\tfunction subdivide(detail) {\n\t\t\t\tvar a = new Vector3();\n\t\t\t\tvar b = new Vector3();\n\t\t\t\tvar c = new Vector3(); // iterate over all faces and apply a subdivison with the given detail value\n\n\t\t\t\tfor (var i = 0; i < indices.length; i += 3) {\n\t\t\t\t\t// get the vertices of the face\n\t\t\t\t\tgetVertexByIndex(indices[i + 0], a);\n\t\t\t\t\tgetVertexByIndex(indices[i + 1], b);\n\t\t\t\t\tgetVertexByIndex(indices[i + 2], c); // perform subdivision\n\n\t\t\t\t\tsubdivideFace(a, b, c, detail);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction subdivideFace(a, b, c, detail) {\n\t\t\t\tvar cols = detail + 1; // we use this multidimensional array as a data structure for creating the subdivision\n\n\t\t\t\tvar v = []; // construct all of the vertices for this subdivision\n\n\t\t\t\tfor (var i = 0; i <= cols; i++) {\n\t\t\t\t\tv[i] = [];\n\t\t\t\t\tvar aj = a.clone().lerp(c, i / cols);\n\t\t\t\t\tvar bj = b.clone().lerp(c, i / cols);\n\t\t\t\t\tvar rows = cols - i;\n\n\t\t\t\t\tfor (var j = 0; j <= rows; j++) {\n\t\t\t\t\t\tif (j === 0 && i === cols) {\n\t\t\t\t\t\t\tv[i][j] = aj;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tv[i][j] = aj.clone().lerp(bj, j / rows);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // construct all of the faces\n\n\n\t\t\t\tfor (var _i = 0; _i < cols; _i++) {\n\t\t\t\t\tfor (var _j = 0; _j < 2 * (cols - _i) - 1; _j++) {\n\t\t\t\t\t\tvar k = Math.floor(_j / 2);\n\n\t\t\t\t\t\tif (_j % 2 === 0) {\n\t\t\t\t\t\t\tpushVertex(v[_i][k + 1]);\n\t\t\t\t\t\t\tpushVertex(v[_i + 1][k]);\n\t\t\t\t\t\t\tpushVertex(v[_i][k]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpushVertex(v[_i][k + 1]);\n\t\t\t\t\t\t\tpushVertex(v[_i + 1][k + 1]);\n\t\t\t\t\t\t\tpushVertex(v[_i + 1][k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction applyRadius(radius) {\n\t\t\t\tvar vertex = new Vector3(); // iterate over the entire buffer and apply the radius to each vertex\n\n\t\t\t\tfor (var i = 0; i < vertexBuffer.length; i += 3) {\n\t\t\t\t\tvertex.x = vertexBuffer[i + 0];\n\t\t\t\t\tvertex.y = vertexBuffer[i + 1];\n\t\t\t\t\tvertex.z = vertexBuffer[i + 2];\n\t\t\t\t\tvertex.normalize().multiplyScalar(radius);\n\t\t\t\t\tvertexBuffer[i + 0] = vertex.x;\n\t\t\t\t\tvertexBuffer[i + 1] = vertex.y;\n\t\t\t\t\tvertexBuffer[i + 2] = vertex.z;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction generateUVs() {\n\t\t\t\tvar vertex = new Vector3();\n\n\t\t\t\tfor (var i = 0; i < vertexBuffer.length; i += 3) {\n\t\t\t\t\tvertex.x = vertexBuffer[i + 0];\n\t\t\t\t\tvertex.y = vertexBuffer[i + 1];\n\t\t\t\t\tvertex.z = vertexBuffer[i + 2];\n\t\t\t\t\tvar u = azimuth(vertex) / 2 / Math.PI + 0.5;\n\t\t\t\t\tvar v = inclination(vertex) / Math.PI + 0.5;\n\t\t\t\t\tuvBuffer.push(u, 1 - v);\n\t\t\t\t}\n\n\t\t\t\tcorrectUVs();\n\t\t\t\tcorrectSeam();\n\t\t\t}\n\n\t\t\tfunction correctSeam() {\n\t\t\t\t// handle case when face straddles the seam, see #3269\n\t\t\t\tfor (var i = 0; i < uvBuffer.length; i += 6) {\n\t\t\t\t\t// uv data of a single face\n\t\t\t\t\tvar x0 = uvBuffer[i + 0];\n\t\t\t\t\tvar x1 = uvBuffer[i + 2];\n\t\t\t\t\tvar x2 = uvBuffer[i + 4];\n\t\t\t\t\tvar max = Math.max(x0, x1, x2);\n\t\t\t\t\tvar min = Math.min(x0, x1, x2); // 0.9 is somewhat arbitrary\n\n\t\t\t\t\tif (max > 0.9 && min < 0.1) {\n\t\t\t\t\t\tif (x0 < 0.2) uvBuffer[i + 0] += 1;\n\t\t\t\t\t\tif (x1 < 0.2) uvBuffer[i + 2] += 1;\n\t\t\t\t\t\tif (x2 < 0.2) uvBuffer[i + 4] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction pushVertex(vertex) {\n\t\t\t\tvertexBuffer.push(vertex.x, vertex.y, vertex.z);\n\t\t\t}\n\n\t\t\tfunction getVertexByIndex(index, vertex) {\n\t\t\t\tvar stride = index * 3;\n\t\t\t\tvertex.x = vertices[stride + 0];\n\t\t\t\tvertex.y = vertices[stride + 1];\n\t\t\t\tvertex.z = vertices[stride + 2];\n\t\t\t}\n\n\t\t\tfunction correctUVs() {\n\t\t\t\tvar a = new Vector3();\n\t\t\t\tvar b = new Vector3();\n\t\t\t\tvar c = new Vector3();\n\t\t\t\tvar centroid = new Vector3();\n\t\t\t\tvar uvA = new Vector2();\n\t\t\t\tvar uvB = new Vector2();\n\t\t\t\tvar uvC = new Vector2();\n\n\t\t\t\tfor (var i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6) {\n\t\t\t\t\ta.set(vertexBuffer[i + 0], vertexBuffer[i + 1], vertexBuffer[i + 2]);\n\t\t\t\t\tb.set(vertexBuffer[i + 3], vertexBuffer[i + 4], vertexBuffer[i + 5]);\n\t\t\t\t\tc.set(vertexBuffer[i + 6], vertexBuffer[i + 7], vertexBuffer[i + 8]);\n\t\t\t\t\tuvA.set(uvBuffer[j + 0], uvBuffer[j + 1]);\n\t\t\t\t\tuvB.set(uvBuffer[j + 2], uvBuffer[j + 3]);\n\t\t\t\t\tuvC.set(uvBuffer[j + 4], uvBuffer[j + 5]);\n\t\t\t\t\tcentroid.copy(a).add(b).add(c).divideScalar(3);\n\t\t\t\t\tvar azi = azimuth(centroid);\n\t\t\t\t\tcorrectUV(uvA, j + 0, a, azi);\n\t\t\t\t\tcorrectUV(uvB, j + 2, b, azi);\n\t\t\t\t\tcorrectUV(uvC, j + 4, c, azi);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction correctUV(uv, stride, vector, azimuth) {\n\t\t\t\tif (azimuth < 0 && uv.x === 1) {\n\t\t\t\t\tuvBuffer[stride] = uv.x - 1;\n\t\t\t\t}\n\n\t\t\t\tif (vector.x === 0 && vector.z === 0) {\n\t\t\t\t\tuvBuffer[stride] = azimuth / 2 / Math.PI + 0.5;\n\t\t\t\t}\n\t\t\t} // Angle around the Y axis, counter-clockwise when looking from above.\n\n\n\t\t\tfunction azimuth(vector) {\n\t\t\t\treturn Math.atan2(vector.z, -vector.x);\n\t\t\t} // Angle above the XZ plane.\n\n\n\t\t\tfunction inclination(vector) {\n\t\t\t\treturn Math.atan2(-vector.y, Math.sqrt(vector.x * vector.x + vector.z * vector.z));\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn PolyhedronGeometry;\n\t}(BufferGeometry);\n\n\tvar DodecahedronGeometry = /*#__PURE__*/function (_PolyhedronGeometry) {\n\t\t_inheritsLoose(DodecahedronGeometry, _PolyhedronGeometry);\n\n\t\tfunction DodecahedronGeometry(radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\tvar t = (1 + Math.sqrt(5)) / 2;\n\t\t\tvar r = 1 / t;\n\t\t\tvar vertices = [// (±1, ±1, ±1)\n\t\t\t-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, ±1/φ, ±φ)\n\t\t\t0, -r, -t, 0, -r, t, 0, r, -t, 0, r, t, // (±1/φ, ±φ, 0)\n\t\t\t-r, -t, 0, -r, t, 0, r, -t, 0, r, t, 0, // (±φ, 0, ±1/φ)\n\t\t\t-t, 0, -r, t, 0, -r, -t, 0, r, t, 0, r];\n\t\t\tvar indices = [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];\n\t\t\t_this = _PolyhedronGeometry.call(this, vertices, indices, radius, detail) || this;\n\t\t\t_this.type = 'DodecahedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn DodecahedronGeometry;\n\t}(PolyhedronGeometry);\n\n\tvar _v0$2 = new Vector3();\n\n\tvar _v1$5 = new Vector3();\n\n\tvar _normal$1 = new Vector3();\n\n\tvar _triangle = new Triangle();\n\n\tvar EdgesGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(EdgesGeometry, _BufferGeometry);\n\n\t\tfunction EdgesGeometry(geometry, thresholdAngle) {\n\t\t\tvar _this;\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'EdgesGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tthresholdAngle: thresholdAngle\n\t\t\t};\n\t\t\tthresholdAngle = thresholdAngle !== undefined ? thresholdAngle : 1;\n\n\t\t\tif (geometry.isGeometry === true) {\n\t\t\t\tconsole.error('THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\treturn _assertThisInitialized(_this);\n\t\t\t}\n\n\t\t\tvar precisionPoints = 4;\n\t\t\tvar precision = Math.pow(10, precisionPoints);\n\t\t\tvar thresholdDot = Math.cos(MathUtils.DEG2RAD * thresholdAngle);\n\t\t\tvar indexAttr = geometry.getIndex();\n\t\t\tvar positionAttr = geometry.getAttribute('position');\n\t\t\tvar indexCount = indexAttr ? indexAttr.count : positionAttr.count;\n\t\t\tvar indexArr = [0, 0, 0];\n\t\t\tvar vertKeys = ['a', 'b', 'c'];\n\t\t\tvar hashes = new Array(3);\n\t\t\tvar edgeData = {};\n\t\t\tvar vertices = [];\n\n\t\t\tfor (var i = 0; i < indexCount; i += 3) {\n\t\t\t\tif (indexAttr) {\n\t\t\t\t\tindexArr[0] = indexAttr.getX(i);\n\t\t\t\t\tindexArr[1] = indexAttr.getX(i + 1);\n\t\t\t\t\tindexArr[2] = indexAttr.getX(i + 2);\n\t\t\t\t} else {\n\t\t\t\t\tindexArr[0] = i;\n\t\t\t\t\tindexArr[1] = i + 1;\n\t\t\t\t\tindexArr[2] = i + 2;\n\t\t\t\t}\n\n\t\t\t\tvar a = _triangle.a,\n\t\t\t\t\t\tb = _triangle.b,\n\t\t\t\t\t\tc = _triangle.c;\n\t\t\t\ta.fromBufferAttribute(positionAttr, indexArr[0]);\n\t\t\t\tb.fromBufferAttribute(positionAttr, indexArr[1]);\n\t\t\t\tc.fromBufferAttribute(positionAttr, indexArr[2]);\n\n\t\t\t\t_triangle.getNormal(_normal$1); // create hashes for the edge from the vertices\n\n\n\t\t\t\thashes[0] = Math.round(a.x * precision) + \",\" + Math.round(a.y * precision) + \",\" + Math.round(a.z * precision);\n\t\t\t\thashes[1] = Math.round(b.x * precision) + \",\" + Math.round(b.y * precision) + \",\" + Math.round(b.z * precision);\n\t\t\t\thashes[2] = Math.round(c.x * precision) + \",\" + Math.round(c.y * precision) + \",\" + Math.round(c.z * precision); // skip degenerate triangles\n\n\t\t\t\tif (hashes[0] === hashes[1] || hashes[1] === hashes[2] || hashes[2] === hashes[0]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} // iterate over every edge\n\n\n\t\t\t\tfor (var j = 0; j < 3; j++) {\n\t\t\t\t\t// get the first and next vertex making up the edge\n\t\t\t\t\tvar jNext = (j + 1) % 3;\n\t\t\t\t\tvar vecHash0 = hashes[j];\n\t\t\t\t\tvar vecHash1 = hashes[jNext];\n\t\t\t\t\tvar v0 = _triangle[vertKeys[j]];\n\t\t\t\t\tvar v1 = _triangle[vertKeys[jNext]];\n\t\t\t\t\tvar hash = vecHash0 + \"_\" + vecHash1;\n\t\t\t\t\tvar reverseHash = vecHash1 + \"_\" + vecHash0;\n\n\t\t\t\t\tif (reverseHash in edgeData && edgeData[reverseHash]) {\n\t\t\t\t\t\t// if we found a sibling edge add it into the vertex array if\n\t\t\t\t\t\t// it meets the angle threshold and delete the edge from the map.\n\t\t\t\t\t\tif (_normal$1.dot(edgeData[reverseHash].normal) <= thresholdDot) {\n\t\t\t\t\t\t\tvertices.push(v0.x, v0.y, v0.z);\n\t\t\t\t\t\t\tvertices.push(v1.x, v1.y, v1.z);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tedgeData[reverseHash] = null;\n\t\t\t\t\t} else if (!(hash in edgeData)) {\n\t\t\t\t\t\t// if we've already got an edge here then skip adding a new one\n\t\t\t\t\t\tedgeData[hash] = {\n\t\t\t\t\t\t\tindex0: indexArr[j],\n\t\t\t\t\t\t\tindex1: indexArr[jNext],\n\t\t\t\t\t\t\tnormal: _normal$1.clone()\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // iterate over all remaining, unmatched edges and add them to the vertex array\n\n\n\t\t\tfor (var key in edgeData) {\n\t\t\t\tif (edgeData[key]) {\n\t\t\t\t\tvar _edgeData$key = edgeData[key],\n\t\t\t\t\t\t\tindex0 = _edgeData$key.index0,\n\t\t\t\t\t\t\tindex1 = _edgeData$key.index1;\n\n\t\t\t\t\t_v0$2.fromBufferAttribute(positionAttr, index0);\n\n\t\t\t\t\t_v1$5.fromBufferAttribute(positionAttr, index1);\n\n\t\t\t\t\tvertices.push(_v0$2.x, _v0$2.y, _v0$2.z);\n\t\t\t\t\tvertices.push(_v1$5.x, _v1$5.y, _v1$5.z);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn EdgesGeometry;\n\t}(BufferGeometry);\n\n\t/**\n\t * Port from https://github.com/mapbox/earcut (v2.2.2)\n\t */\n\tvar Earcut = {\n\t\ttriangulate: function triangulate(data, holeIndices, dim) {\n\t\t\tdim = dim || 2;\n\t\t\tvar hasHoles = holeIndices && holeIndices.length;\n\t\t\tvar outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\t\t\tvar outerNode = linkedList(data, 0, outerLen, dim, true);\n\t\t\tvar triangles = [];\n\t\t\tif (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\t\t\tvar minX, minY, maxX, maxY, x, y, invSize;\n\t\t\tif (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim); // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n\n\t\t\tif (data.length > 80 * dim) {\n\t\t\t\tminX = maxX = data[0];\n\t\t\t\tminY = maxY = data[1];\n\n\t\t\t\tfor (var i = dim; i < outerLen; i += dim) {\n\t\t\t\t\tx = data[i];\n\t\t\t\t\ty = data[i + 1];\n\t\t\t\t\tif (x < minX) minX = x;\n\t\t\t\t\tif (y < minY) minY = y;\n\t\t\t\t\tif (x > maxX) maxX = x;\n\t\t\t\t\tif (y > maxY) maxY = y;\n\t\t\t\t} // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n\n\n\t\t\t\tinvSize = Math.max(maxX - minX, maxY - minY);\n\t\t\t\tinvSize = invSize !== 0 ? 1 / invSize : 0;\n\t\t\t}\n\n\t\t\tearcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\t\t\treturn triangles;\n\t\t}\n\t}; // create a circular doubly linked list from polygon points in the specified winding order\n\n\tfunction linkedList(data, start, end, dim, clockwise) {\n\t\tvar i, last;\n\n\t\tif (clockwise === signedArea(data, start, end, dim) > 0) {\n\t\t\tfor (i = start; i < end; i += dim) {\n\t\t\t\tlast = insertNode(i, data[i], data[i + 1], last);\n\t\t\t}\n\t\t} else {\n\t\t\tfor (i = end - dim; i >= start; i -= dim) {\n\t\t\t\tlast = insertNode(i, data[i], data[i + 1], last);\n\t\t\t}\n\t\t}\n\n\t\tif (last && equals(last, last.next)) {\n\t\t\tremoveNode(last);\n\t\t\tlast = last.next;\n\t\t}\n\n\t\treturn last;\n\t} // eliminate colinear or duplicate points\n\n\n\tfunction filterPoints(start, end) {\n\t\tif (!start) return start;\n\t\tif (!end) end = start;\n\t\tvar p = start,\n\t\t\t\tagain;\n\n\t\tdo {\n\t\t\tagain = false;\n\n\t\t\tif (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n\t\t\t\tremoveNode(p);\n\t\t\t\tp = end = p.prev;\n\t\t\t\tif (p === p.next) break;\n\t\t\t\tagain = true;\n\t\t\t} else {\n\t\t\t\tp = p.next;\n\t\t\t}\n\t\t} while (again || p !== end);\n\n\t\treturn end;\n\t} // main ear slicing loop which triangulates a polygon (given as a linked list)\n\n\n\tfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n\t\tif (!ear) return; // interlink polygon nodes in z-order\n\n\t\tif (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\t\tvar stop = ear,\n\t\t\t\tprev,\n\t\t\t\tnext; // iterate through ears, slicing them one by one\n\n\t\twhile (ear.prev !== ear.next) {\n\t\t\tprev = ear.prev;\n\t\t\tnext = ear.next;\n\n\t\t\tif (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n\t\t\t\t// cut off the triangle\n\t\t\t\ttriangles.push(prev.i / dim);\n\t\t\t\ttriangles.push(ear.i / dim);\n\t\t\t\ttriangles.push(next.i / dim);\n\t\t\t\tremoveNode(ear); // skipping the next vertex leads to less sliver triangles\n\n\t\t\t\tear = next.next;\n\t\t\t\tstop = next.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tear = next; // if we looped through the whole remaining polygon and can't find any more ears\n\n\t\t\tif (ear === stop) {\n\t\t\t\t// try filtering points and slicing again\n\t\t\t\tif (!pass) {\n\t\t\t\t\tearcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1); // if this didn't work, try curing all small self-intersections locally\n\t\t\t\t} else if (pass === 1) {\n\t\t\t\t\tear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n\t\t\t\t\tearcutLinked(ear, triangles, dim, minX, minY, invSize, 2); // as a last resort, try splitting the remaining polygon into two\n\t\t\t\t} else if (pass === 2) {\n\t\t\t\t\tsplitEarcut(ear, triangles, dim, minX, minY, invSize);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} // check whether a polygon node forms a valid ear with adjacent nodes\n\n\n\tfunction isEar(ear) {\n\t\tvar a = ear.prev,\n\t\t\t\tb = ear,\n\t\t\t\tc = ear.next;\n\t\tif (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\t\t// now make sure we don't have other points inside the potential ear\n\n\t\tvar p = ear.next.next;\n\n\t\twhile (p !== ear.prev) {\n\t\t\tif (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction isEarHashed(ear, minX, minY, invSize) {\n\t\tvar a = ear.prev,\n\t\t\t\tb = ear,\n\t\t\t\tc = ear.next;\n\t\tif (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\t\t// triangle bbox; min & max are calculated like this for speed\n\n\t\tvar minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x,\n\t\t\t\tminTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y,\n\t\t\t\tmaxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x,\n\t\t\t\tmaxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y; // z-order range for the current triangle bbox;\n\n\t\tvar minZ = zOrder(minTX, minTY, minX, minY, invSize),\n\t\t\t\tmaxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\t\tvar p = ear.prevZ,\n\t\t\t\tn = ear.nextZ; // look for points inside the triangle in both directions\n\n\t\twhile (p && p.z >= minZ && n && n.z <= maxZ) {\n\t\t\tif (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n\t\t\tp = p.prevZ;\n\t\t\tif (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n\t\t\tn = n.nextZ;\n\t\t} // look for remaining points in decreasing z-order\n\n\n\t\twhile (p && p.z >= minZ) {\n\t\t\tif (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n\t\t\tp = p.prevZ;\n\t\t} // look for remaining points in increasing z-order\n\n\n\t\twhile (n && n.z <= maxZ) {\n\t\t\tif (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n\t\t\tn = n.nextZ;\n\t\t}\n\n\t\treturn true;\n\t} // go through all polygon nodes and cure small local self-intersections\n\n\n\tfunction cureLocalIntersections(start, triangles, dim) {\n\t\tvar p = start;\n\n\t\tdo {\n\t\t\tvar a = p.prev,\n\t\t\t\t\tb = p.next.next;\n\n\t\t\tif (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\t\t\t\ttriangles.push(a.i / dim);\n\t\t\t\ttriangles.push(p.i / dim);\n\t\t\t\ttriangles.push(b.i / dim); // remove two nodes involved\n\n\t\t\t\tremoveNode(p);\n\t\t\t\tremoveNode(p.next);\n\t\t\t\tp = start = b;\n\t\t\t}\n\n\t\t\tp = p.next;\n\t\t} while (p !== start);\n\n\t\treturn filterPoints(p);\n\t} // try splitting polygon into two and triangulate them independently\n\n\n\tfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n\t\t// look for a valid diagonal that divides the polygon into two\n\t\tvar a = start;\n\n\t\tdo {\n\t\t\tvar b = a.next.next;\n\n\t\t\twhile (b !== a.prev) {\n\t\t\t\tif (a.i !== b.i && isValidDiagonal(a, b)) {\n\t\t\t\t\t// split the polygon in two by the diagonal\n\t\t\t\t\tvar c = splitPolygon(a, b); // filter colinear points around the cuts\n\n\t\t\t\t\ta = filterPoints(a, a.next);\n\t\t\t\t\tc = filterPoints(c, c.next); // run earcut on each half\n\n\t\t\t\t\tearcutLinked(a, triangles, dim, minX, minY, invSize);\n\t\t\t\t\tearcutLinked(c, triangles, dim, minX, minY, invSize);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tb = b.next;\n\t\t\t}\n\n\t\t\ta = a.next;\n\t\t} while (a !== start);\n\t} // link every hole into the outer loop, producing a single-ring polygon without holes\n\n\n\tfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n\t\tvar queue = [];\n\t\tvar i, len, start, end, list;\n\n\t\tfor (i = 0, len = holeIndices.length; i < len; i++) {\n\t\t\tstart = holeIndices[i] * dim;\n\t\t\tend = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n\t\t\tlist = linkedList(data, start, end, dim, false);\n\t\t\tif (list === list.next) list.steiner = true;\n\t\t\tqueue.push(getLeftmost(list));\n\t\t}\n\n\t\tqueue.sort(compareX); // process holes from left to right\n\n\t\tfor (i = 0; i < queue.length; i++) {\n\t\t\teliminateHole(queue[i], outerNode);\n\t\t\touterNode = filterPoints(outerNode, outerNode.next);\n\t\t}\n\n\t\treturn outerNode;\n\t}\n\n\tfunction compareX(a, b) {\n\t\treturn a.x - b.x;\n\t} // find a bridge between vertices that connects hole with an outer ring and and link it\n\n\n\tfunction eliminateHole(hole, outerNode) {\n\t\touterNode = findHoleBridge(hole, outerNode);\n\n\t\tif (outerNode) {\n\t\t\tvar b = splitPolygon(outerNode, hole); // filter collinear points around the cuts\n\n\t\t\tfilterPoints(outerNode, outerNode.next);\n\t\t\tfilterPoints(b, b.next);\n\t\t}\n\t} // David Eberly's algorithm for finding a bridge between hole and outer polygon\n\n\n\tfunction findHoleBridge(hole, outerNode) {\n\t\tvar p = outerNode;\n\t\tvar hx = hole.x;\n\t\tvar hy = hole.y;\n\t\tvar qx = -Infinity,\n\t\t\t\tm; // find a segment intersected by a ray from the hole's leftmost point to the left;\n\t\t// segment's endpoint with lesser x will be potential connection point\n\n\t\tdo {\n\t\t\tif (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n\t\t\t\tvar x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n\n\t\t\t\tif (x <= hx && x > qx) {\n\t\t\t\t\tqx = x;\n\n\t\t\t\t\tif (x === hx) {\n\t\t\t\t\t\tif (hy === p.y) return p;\n\t\t\t\t\t\tif (hy === p.next.y) return p.next;\n\t\t\t\t\t}\n\n\t\t\t\t\tm = p.x < p.next.x ? p : p.next;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tp = p.next;\n\t\t} while (p !== outerNode);\n\n\t\tif (!m) return null;\n\t\tif (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint\n\t\t// look for points inside the triangle of hole point, segment intersection and endpoint;\n\t\t// if there are no points found, we have a valid connection;\n\t\t// otherwise choose the point of the minimum angle with the ray as connection point\n\n\t\tvar stop = m,\n\t\t\t\tmx = m.x,\n\t\t\t\tmy = m.y;\n\t\tvar tanMin = Infinity,\n\t\t\t\ttan;\n\t\tp = m;\n\n\t\tdo {\n\t\t\tif (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\t\t\t\ttan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n\t\t\t\tif (locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) {\n\t\t\t\t\tm = p;\n\t\t\t\t\ttanMin = tan;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tp = p.next;\n\t\t} while (p !== stop);\n\n\t\treturn m;\n\t} // whether sector in vertex m contains sector in vertex p in the same coordinates\n\n\n\tfunction sectorContainsSector(m, p) {\n\t\treturn area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n\t} // interlink polygon nodes in z-order\n\n\n\tfunction indexCurve(start, minX, minY, invSize) {\n\t\tvar p = start;\n\n\t\tdo {\n\t\t\tif (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n\t\t\tp.prevZ = p.prev;\n\t\t\tp.nextZ = p.next;\n\t\t\tp = p.next;\n\t\t} while (p !== start);\n\n\t\tp.prevZ.nextZ = null;\n\t\tp.prevZ = null;\n\t\tsortLinked(p);\n\t} // Simon Tatham's linked list merge sort algorithm\n\t// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\n\n\n\tfunction sortLinked(list) {\n\t\tvar i,\n\t\t\t\tp,\n\t\t\t\tq,\n\t\t\t\te,\n\t\t\t\ttail,\n\t\t\t\tnumMerges,\n\t\t\t\tpSize,\n\t\t\t\tqSize,\n\t\t\t\tinSize = 1;\n\n\t\tdo {\n\t\t\tp = list;\n\t\t\tlist = null;\n\t\t\ttail = null;\n\t\t\tnumMerges = 0;\n\n\t\t\twhile (p) {\n\t\t\t\tnumMerges++;\n\t\t\t\tq = p;\n\t\t\t\tpSize = 0;\n\n\t\t\t\tfor (i = 0; i < inSize; i++) {\n\t\t\t\t\tpSize++;\n\t\t\t\t\tq = q.nextZ;\n\t\t\t\t\tif (!q) break;\n\t\t\t\t}\n\n\t\t\t\tqSize = inSize;\n\n\t\t\t\twhile (pSize > 0 || qSize > 0 && q) {\n\t\t\t\t\tif (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n\t\t\t\t\t\te = p;\n\t\t\t\t\t\tp = p.nextZ;\n\t\t\t\t\t\tpSize--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\te = q;\n\t\t\t\t\t\tq = q.nextZ;\n\t\t\t\t\t\tqSize--;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tail) tail.nextZ = e;else list = e;\n\t\t\t\t\te.prevZ = tail;\n\t\t\t\t\ttail = e;\n\t\t\t\t}\n\n\t\t\t\tp = q;\n\t\t\t}\n\n\t\t\ttail.nextZ = null;\n\t\t\tinSize *= 2;\n\t\t} while (numMerges > 1);\n\n\t\treturn list;\n\t} // z-order of a point given coords and inverse of the longer side of data bbox\n\n\n\tfunction zOrder(x, y, minX, minY, invSize) {\n\t\t// coords are transformed into non-negative 15-bit integer range\n\t\tx = 32767 * (x - minX) * invSize;\n\t\ty = 32767 * (y - minY) * invSize;\n\t\tx = (x | x << 8) & 0x00FF00FF;\n\t\tx = (x | x << 4) & 0x0F0F0F0F;\n\t\tx = (x | x << 2) & 0x33333333;\n\t\tx = (x | x << 1) & 0x55555555;\n\t\ty = (y | y << 8) & 0x00FF00FF;\n\t\ty = (y | y << 4) & 0x0F0F0F0F;\n\t\ty = (y | y << 2) & 0x33333333;\n\t\ty = (y | y << 1) & 0x55555555;\n\t\treturn x | y << 1;\n\t} // find the leftmost node of a polygon ring\n\n\n\tfunction getLeftmost(start) {\n\t\tvar p = start,\n\t\t\t\tleftmost = start;\n\n\t\tdo {\n\t\t\tif (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;\n\t\t\tp = p.next;\n\t\t} while (p !== start);\n\n\t\treturn leftmost;\n\t} // check if a point lies within a convex triangle\n\n\n\tfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t\treturn (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t} // check if a diagonal between two polygon nodes is valid (lies in polygon interior)\n\n\n\tfunction isValidDiagonal(a, b) {\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && ( // dones't intersect other edges\n\t\tlocallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && ( // locally visible\n\t\tarea(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n\t\tequals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n\t} // signed area of a triangle\n\n\n\tfunction area(p, q, r) {\n\t\treturn (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t} // check if two points are equal\n\n\n\tfunction equals(p1, p2) {\n\t\treturn p1.x === p2.x && p1.y === p2.y;\n\t} // check if two segments intersect\n\n\n\tfunction intersects(p1, q1, p2, q2) {\n\t\tvar o1 = sign(area(p1, q1, p2));\n\t\tvar o2 = sign(area(p1, q1, q2));\n\t\tvar o3 = sign(area(p2, q2, p1));\n\t\tvar o4 = sign(area(p2, q2, q1));\n\t\tif (o1 !== o2 && o3 !== o4) return true; // general case\n\n\t\tif (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n\n\t\tif (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n\n\t\tif (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n\n\t\tif (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n\t\treturn false;\n\t} // for collinear points p, q, r, check if point q lies on segment pr\n\n\n\tfunction onSegment(p, q, r) {\n\t\treturn q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n\t}\n\n\tfunction sign(num) {\n\t\treturn num > 0 ? 1 : num < 0 ? -1 : 0;\n\t} // check if a polygon diagonal intersects any polygon segments\n\n\n\tfunction intersectsPolygon(a, b) {\n\t\tvar p = a;\n\n\t\tdo {\n\t\t\tif (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true;\n\t\t\tp = p.next;\n\t\t} while (p !== a);\n\n\t\treturn false;\n\t} // check if a polygon diagonal is locally inside the polygon\n\n\n\tfunction locallyInside(a, b) {\n\t\treturn area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n\t} // check if the middle point of a polygon diagonal is inside the polygon\n\n\n\tfunction middleInside(a, b) {\n\t\tvar p = a,\n\t\t\t\tinside = false;\n\t\tvar px = (a.x + b.x) / 2,\n\t\t\t\tpy = (a.y + b.y) / 2;\n\n\t\tdo {\n\t\t\tif (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x) inside = !inside;\n\t\t\tp = p.next;\n\t\t} while (p !== a);\n\n\t\treturn inside;\n\t} // link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n\t// if one belongs to the outer ring and another to a hole, it merges it into a single ring\n\n\n\tfunction splitPolygon(a, b) {\n\t\tvar a2 = new Node(a.i, a.x, a.y),\n\t\t\t\tb2 = new Node(b.i, b.x, b.y),\n\t\t\t\tan = a.next,\n\t\t\t\tbp = b.prev;\n\t\ta.next = b;\n\t\tb.prev = a;\n\t\ta2.next = an;\n\t\tan.prev = a2;\n\t\tb2.next = a2;\n\t\ta2.prev = b2;\n\t\tbp.next = b2;\n\t\tb2.prev = bp;\n\t\treturn b2;\n\t} // create a node and optionally link it with previous one (in a circular doubly linked list)\n\n\n\tfunction insertNode(i, x, y, last) {\n\t\tvar p = new Node(i, x, y);\n\n\t\tif (!last) {\n\t\t\tp.prev = p;\n\t\t\tp.next = p;\n\t\t} else {\n\t\t\tp.next = last.next;\n\t\t\tp.prev = last;\n\t\t\tlast.next.prev = p;\n\t\t\tlast.next = p;\n\t\t}\n\n\t\treturn p;\n\t}\n\n\tfunction removeNode(p) {\n\t\tp.next.prev = p.prev;\n\t\tp.prev.next = p.next;\n\t\tif (p.prevZ) p.prevZ.nextZ = p.nextZ;\n\t\tif (p.nextZ) p.nextZ.prevZ = p.prevZ;\n\t}\n\n\tfunction Node(i, x, y) {\n\t\t// vertex index in coordinates array\n\t\tthis.i = i; // vertex coordinates\n\n\t\tthis.x = x;\n\t\tthis.y = y; // previous and next vertex nodes in a polygon ring\n\n\t\tthis.prev = null;\n\t\tthis.next = null; // z-order curve value\n\n\t\tthis.z = null; // previous and next nodes in z-order\n\n\t\tthis.prevZ = null;\n\t\tthis.nextZ = null; // indicates whether this is a steiner point\n\n\t\tthis.steiner = false;\n\t}\n\n\tfunction signedArea(data, start, end, dim) {\n\t\tvar sum = 0;\n\n\t\tfor (var i = start, j = end - dim; i < end; i += dim) {\n\t\t\tsum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n\t\t\tj = i;\n\t\t}\n\n\t\treturn sum;\n\t}\n\n\tvar ShapeUtils = {\n\t\t// calculate area of the contour polygon\n\t\tarea: function area(contour) {\n\t\t\tvar n = contour.length;\n\t\t\tvar a = 0.0;\n\n\t\t\tfor (var p = n - 1, q = 0; q < n; p = q++) {\n\t\t\t\ta += contour[p].x * contour[q].y - contour[q].x * contour[p].y;\n\t\t\t}\n\n\t\t\treturn a * 0.5;\n\t\t},\n\t\tisClockWise: function isClockWise(pts) {\n\t\t\treturn ShapeUtils.area(pts) < 0;\n\t\t},\n\t\ttriangulateShape: function triangulateShape(contour, holes) {\n\t\t\tvar vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ]\n\n\t\t\tvar holeIndices = []; // array of hole indices\n\n\t\t\tvar faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ]\n\n\t\t\tremoveDupEndPts(contour);\n\t\t\taddContour(vertices, contour); //\n\n\t\t\tvar holeIndex = contour.length;\n\t\t\tholes.forEach(removeDupEndPts);\n\n\t\t\tfor (var i = 0; i < holes.length; i++) {\n\t\t\t\tholeIndices.push(holeIndex);\n\t\t\t\tholeIndex += holes[i].length;\n\t\t\t\taddContour(vertices, holes[i]);\n\t\t\t} //\n\n\n\t\t\tvar triangles = Earcut.triangulate(vertices, holeIndices); //\n\n\t\t\tfor (var _i = 0; _i < triangles.length; _i += 3) {\n\t\t\t\tfaces.push(triangles.slice(_i, _i + 3));\n\t\t\t}\n\n\t\t\treturn faces;\n\t\t}\n\t};\n\n\tfunction removeDupEndPts(points) {\n\t\tvar l = points.length;\n\n\t\tif (l > 2 && points[l - 1].equals(points[0])) {\n\t\t\tpoints.pop();\n\t\t}\n\t}\n\n\tfunction addContour(vertices, contour) {\n\t\tfor (var i = 0; i < contour.length; i++) {\n\t\t\tvertices.push(contour[i].x);\n\t\t\tvertices.push(contour[i].y);\n\t\t}\n\t}\n\n\tvar ExtrudeGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(ExtrudeGeometry, _BufferGeometry);\n\n\t\tfunction ExtrudeGeometry(shapes, options) {\n\t\t\tvar _this;\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'ExtrudeGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tshapes: shapes,\n\t\t\t\toptions: options\n\t\t\t};\n\t\t\tshapes = Array.isArray(shapes) ? shapes : [shapes];\n\n\t\t\tvar scope = _assertThisInitialized(_this);\n\n\t\t\tvar verticesArray = [];\n\t\t\tvar uvArray = [];\n\n\t\t\tfor (var i = 0, l = shapes.length; i < l; i++) {\n\t\t\t\tvar shape = shapes[i];\n\t\t\t\taddShape(shape);\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(verticesArray, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvArray, 2));\n\n\t\t\t_this.computeVertexNormals(); // functions\n\n\n\t\t\tfunction addShape(shape) {\n\t\t\t\tvar placeholder = []; // options\n\n\t\t\t\tvar curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;\n\t\t\t\tvar steps = options.steps !== undefined ? options.steps : 1;\n\t\t\t\tvar depth = options.depth !== undefined ? options.depth : 100;\n\t\t\t\tvar bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;\n\t\t\t\tvar bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 6;\n\t\t\t\tvar bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 2;\n\t\t\t\tvar bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0;\n\t\t\t\tvar bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3;\n\t\t\t\tvar extrudePath = options.extrudePath;\n\t\t\t\tvar uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator; // deprecated options\n\n\t\t\t\tif (options.amount !== undefined) {\n\t\t\t\t\tconsole.warn('THREE.ExtrudeBufferGeometry: amount has been renamed to depth.');\n\t\t\t\t\tdepth = options.amount;\n\t\t\t\t} //\n\n\n\t\t\t\tvar extrudePts,\n\t\t\t\t\t\textrudeByPath = false;\n\t\t\t\tvar splineTube, binormal, normal, position2;\n\n\t\t\t\tif (extrudePath) {\n\t\t\t\t\textrudePts = extrudePath.getSpacedPoints(steps);\n\t\t\t\t\textrudeByPath = true;\n\t\t\t\t\tbevelEnabled = false; // bevels not supported for path extrusion\n\t\t\t\t\t// SETUP TNB variables\n\t\t\t\t\t// TODO1 - have a .isClosed in spline?\n\n\t\t\t\t\tsplineTube = extrudePath.computeFrenetFrames(steps, false); // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);\n\n\t\t\t\t\tbinormal = new Vector3();\n\t\t\t\t\tnormal = new Vector3();\n\t\t\t\t\tposition2 = new Vector3();\n\t\t\t\t} // Safeguards if bevels are not enabled\n\n\n\t\t\t\tif (!bevelEnabled) {\n\t\t\t\t\tbevelSegments = 0;\n\t\t\t\t\tbevelThickness = 0;\n\t\t\t\t\tbevelSize = 0;\n\t\t\t\t\tbevelOffset = 0;\n\t\t\t\t} // Variables initialization\n\n\n\t\t\t\tvar shapePoints = shape.extractPoints(curveSegments);\n\t\t\t\tvar vertices = shapePoints.shape;\n\t\t\t\tvar holes = shapePoints.holes;\n\t\t\t\tvar reverse = !ShapeUtils.isClockWise(vertices);\n\n\t\t\t\tif (reverse) {\n\t\t\t\t\tvertices = vertices.reverse(); // Maybe we should also check if holes are in the opposite direction, just to be safe ...\n\n\t\t\t\t\tfor (var h = 0, hl = holes.length; h < hl; h++) {\n\t\t\t\t\t\tvar ahole = holes[h];\n\n\t\t\t\t\t\tif (ShapeUtils.isClockWise(ahole)) {\n\t\t\t\t\t\t\tholes[h] = ahole.reverse();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar faces = ShapeUtils.triangulateShape(vertices, holes);\n\t\t\t\t/* Vertices */\n\n\t\t\t\tvar contour = vertices; // vertices has all points but contour has only points of circumference\n\n\t\t\t\tfor (var _h = 0, _hl = holes.length; _h < _hl; _h++) {\n\t\t\t\t\tvar _ahole = holes[_h];\n\t\t\t\t\tvertices = vertices.concat(_ahole);\n\t\t\t\t}\n\n\t\t\t\tfunction scalePt2(pt, vec, size) {\n\t\t\t\t\tif (!vec) console.error('THREE.ExtrudeGeometry: vec does not exist');\n\t\t\t\t\treturn vec.clone().multiplyScalar(size).add(pt);\n\t\t\t\t}\n\n\t\t\t\tvar vlen = vertices.length,\n\t\t\t\t\t\tflen = faces.length; // Find directions for point movement\n\n\t\t\t\tfunction getBevelVec(inPt, inPrev, inNext) {\n\t\t\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t\t\t//\t shifted by 1 unit (length of normalized vector) to the left\n\t\t\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t\t\t//\n\t\t\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t\t\t//\tadjacent edges of inPt at a distance of 1 unit on the left side.\n\t\t\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\t\t\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\t\t\t\tv_next_y = inNext.y - inPt.y;\n\t\t\t\t\tvar v_prev_lensq = v_prev_x * v_prev_x + v_prev_y * v_prev_y; // check for collinear edges\n\n\t\t\t\t\tvar collinear0 = v_prev_x * v_next_y - v_prev_y * v_next_x;\n\n\t\t\t\t\tif (Math.abs(collinear0) > Number.EPSILON) {\n\t\t\t\t\t\t// not collinear\n\t\t\t\t\t\t// length of vectors for normalizing\n\t\t\t\t\t\tvar v_prev_len = Math.sqrt(v_prev_lensq);\n\t\t\t\t\t\tvar v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y); // shift adjacent points by unit vectors to the left\n\n\t\t\t\t\t\tvar ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len;\n\t\t\t\t\t\tvar ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len;\n\t\t\t\t\t\tvar ptNextShift_x = inNext.x - v_next_y / v_next_len;\n\t\t\t\t\t\tvar ptNextShift_y = inNext.y + v_next_x / v_next_len; // scaling factor for v_prev to intersection point\n\n\t\t\t\t\t\tvar sf = ((ptNextShift_x - ptPrevShift_x) * v_next_y - (ptNextShift_y - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x); // vector from inPt to intersection point\n\n\t\t\t\t\t\tv_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x;\n\t\t\t\t\t\tv_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y; // Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t\t\t//\tbut prevent crazy spikes\n\n\t\t\t\t\t\tvar v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;\n\n\t\t\t\t\t\tif (v_trans_lensq <= 2) {\n\t\t\t\t\t\t\treturn new Vector2(v_trans_x, v_trans_y);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshrink_by = Math.sqrt(v_trans_lensq / 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// handle special case of collinear edges\n\t\t\t\t\t\tvar direction_eq = false; // assumes: opposite\n\n\t\t\t\t\t\tif (v_prev_x > Number.EPSILON) {\n\t\t\t\t\t\t\tif (v_next_x > Number.EPSILON) {\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (v_prev_x < -Number.EPSILON) {\n\t\t\t\t\t\t\t\tif (v_next_x < -Number.EPSILON) {\n\t\t\t\t\t\t\t\t\tdirection_eq = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (Math.sign(v_prev_y) === Math.sign(v_next_y)) {\n\t\t\t\t\t\t\t\t\tdirection_eq = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (direction_eq) {\n\t\t\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\t\t\tv_trans_x = -v_prev_y;\n\t\t\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\t\t\tshrink_by = Math.sqrt(v_prev_lensq);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\t\t\tshrink_by = Math.sqrt(v_prev_lensq / 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new Vector2(v_trans_x / shrink_by, v_trans_y / shrink_by);\n\t\t\t\t}\n\n\t\t\t\tvar contourMovements = [];\n\n\t\t\t\tfor (var _i = 0, il = contour.length, j = il - 1, k = _i + 1; _i < il; _i++, j++, k++) {\n\t\t\t\t\tif (j === il) j = 0;\n\t\t\t\t\tif (k === il) k = 0; //\t(j)---(i)---(k)\n\t\t\t\t\t// console.log('i,j,k', i, j , k)\n\n\t\t\t\t\tcontourMovements[_i] = getBevelVec(contour[_i], contour[j], contour[k]);\n\t\t\t\t}\n\n\t\t\t\tvar holesMovements = [];\n\t\t\t\tvar oneHoleMovements,\n\t\t\t\t\t\tverticesMovements = contourMovements.concat();\n\n\t\t\t\tfor (var _h2 = 0, _hl2 = holes.length; _h2 < _hl2; _h2++) {\n\t\t\t\t\tvar _ahole2 = holes[_h2];\n\t\t\t\t\toneHoleMovements = [];\n\n\t\t\t\t\tfor (var _i2 = 0, _il = _ahole2.length, _j = _il - 1, _k = _i2 + 1; _i2 < _il; _i2++, _j++, _k++) {\n\t\t\t\t\t\tif (_j === _il) _j = 0;\n\t\t\t\t\t\tif (_k === _il) _k = 0; //\t(j)---(i)---(k)\n\n\t\t\t\t\t\toneHoleMovements[_i2] = getBevelVec(_ahole2[_i2], _ahole2[_j], _ahole2[_k]);\n\t\t\t\t\t}\n\n\t\t\t\t\tholesMovements.push(oneHoleMovements);\n\t\t\t\t\tverticesMovements = verticesMovements.concat(oneHoleMovements);\n\t\t\t\t} // Loop bevelSegments, 1 for the front, 1 for the back\n\n\n\t\t\t\tfor (var b = 0; b < bevelSegments; b++) {\n\t\t\t\t\t//for ( b = bevelSegments; b > 0; b -- ) {\n\t\t\t\t\tvar t = b / bevelSegments;\n\t\t\t\t\tvar z = bevelThickness * Math.cos(t * Math.PI / 2);\n\n\t\t\t\t\tvar _bs = bevelSize * Math.sin(t * Math.PI / 2) + bevelOffset; // contract shape\n\n\n\t\t\t\t\tfor (var _i3 = 0, _il2 = contour.length; _i3 < _il2; _i3++) {\n\t\t\t\t\t\tvar vert = scalePt2(contour[_i3], contourMovements[_i3], _bs);\n\t\t\t\t\t\tv(vert.x, vert.y, -z);\n\t\t\t\t\t} // expand holes\n\n\n\t\t\t\t\tfor (var _h3 = 0, _hl3 = holes.length; _h3 < _hl3; _h3++) {\n\t\t\t\t\t\tvar _ahole3 = holes[_h3];\n\t\t\t\t\t\toneHoleMovements = holesMovements[_h3];\n\n\t\t\t\t\t\tfor (var _i4 = 0, _il3 = _ahole3.length; _i4 < _il3; _i4++) {\n\t\t\t\t\t\t\tvar _vert = scalePt2(_ahole3[_i4], oneHoleMovements[_i4], _bs);\n\n\t\t\t\t\t\t\tv(_vert.x, _vert.y, -z);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar bs = bevelSize + bevelOffset; // Back facing vertices\n\n\t\t\t\tfor (var _i5 = 0; _i5 < vlen; _i5++) {\n\t\t\t\t\tvar _vert2 = bevelEnabled ? scalePt2(vertices[_i5], verticesMovements[_i5], bs) : vertices[_i5];\n\n\t\t\t\t\tif (!extrudeByPath) {\n\t\t\t\t\t\tv(_vert2.x, _vert2.y, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x );\n\t\t\t\t\t\tnormal.copy(splineTube.normals[0]).multiplyScalar(_vert2.x);\n\t\t\t\t\t\tbinormal.copy(splineTube.binormals[0]).multiplyScalar(_vert2.y);\n\t\t\t\t\t\tposition2.copy(extrudePts[0]).add(normal).add(binormal);\n\t\t\t\t\t\tv(position2.x, position2.y, position2.z);\n\t\t\t\t\t}\n\t\t\t\t} // Add stepped vertices...\n\t\t\t\t// Including front facing vertices\n\n\n\t\t\t\tfor (var s = 1; s <= steps; s++) {\n\t\t\t\t\tfor (var _i6 = 0; _i6 < vlen; _i6++) {\n\t\t\t\t\t\tvar _vert3 = bevelEnabled ? scalePt2(vertices[_i6], verticesMovements[_i6], bs) : vertices[_i6];\n\n\t\t\t\t\t\tif (!extrudeByPath) {\n\t\t\t\t\t\t\tv(_vert3.x, _vert3.y, depth / steps * s);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x );\n\t\t\t\t\t\t\tnormal.copy(splineTube.normals[s]).multiplyScalar(_vert3.x);\n\t\t\t\t\t\t\tbinormal.copy(splineTube.binormals[s]).multiplyScalar(_vert3.y);\n\t\t\t\t\t\t\tposition2.copy(extrudePts[s]).add(normal).add(binormal);\n\t\t\t\t\t\t\tv(position2.x, position2.y, position2.z);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // Add bevel segments planes\n\t\t\t\t//for ( b = 1; b <= bevelSegments; b ++ ) {\n\n\n\t\t\t\tfor (var _b = bevelSegments - 1; _b >= 0; _b--) {\n\t\t\t\t\tvar _t = _b / bevelSegments;\n\n\t\t\t\t\tvar _z = bevelThickness * Math.cos(_t * Math.PI / 2);\n\n\t\t\t\t\tvar _bs2 = bevelSize * Math.sin(_t * Math.PI / 2) + bevelOffset; // contract shape\n\n\n\t\t\t\t\tfor (var _i7 = 0, _il4 = contour.length; _i7 < _il4; _i7++) {\n\t\t\t\t\t\tvar _vert4 = scalePt2(contour[_i7], contourMovements[_i7], _bs2);\n\n\t\t\t\t\t\tv(_vert4.x, _vert4.y, depth + _z);\n\t\t\t\t\t} // expand holes\n\n\n\t\t\t\t\tfor (var _h4 = 0, _hl4 = holes.length; _h4 < _hl4; _h4++) {\n\t\t\t\t\t\tvar _ahole4 = holes[_h4];\n\t\t\t\t\t\toneHoleMovements = holesMovements[_h4];\n\n\t\t\t\t\t\tfor (var _i8 = 0, _il5 = _ahole4.length; _i8 < _il5; _i8++) {\n\t\t\t\t\t\t\tvar _vert5 = scalePt2(_ahole4[_i8], oneHoleMovements[_i8], _bs2);\n\n\t\t\t\t\t\t\tif (!extrudeByPath) {\n\t\t\t\t\t\t\t\tv(_vert5.x, _vert5.y, depth + _z);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tv(_vert5.x, _vert5.y + extrudePts[steps - 1].y, extrudePts[steps - 1].x + _z);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* Faces */\n\t\t\t\t// Top and bottom faces\n\n\n\t\t\t\tbuildLidFaces(); // Sides faces\n\n\t\t\t\tbuildSideFaces(); /////\tInternal functions\n\n\t\t\t\tfunction buildLidFaces() {\n\t\t\t\t\tvar start = verticesArray.length / 3;\n\n\t\t\t\t\tif (bevelEnabled) {\n\t\t\t\t\t\tvar layer = 0; // steps + 1\n\n\t\t\t\t\t\tvar offset = vlen * layer; // Bottom faces\n\n\t\t\t\t\t\tfor (var _i9 = 0; _i9 < flen; _i9++) {\n\t\t\t\t\t\t\tvar face = faces[_i9];\n\t\t\t\t\t\t\tf3(face[2] + offset, face[1] + offset, face[0] + offset);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlayer = steps + bevelSegments * 2;\n\t\t\t\t\t\toffset = vlen * layer; // Top faces\n\n\t\t\t\t\t\tfor (var _i10 = 0; _i10 < flen; _i10++) {\n\t\t\t\t\t\t\tvar _face = faces[_i10];\n\t\t\t\t\t\t\tf3(_face[0] + offset, _face[1] + offset, _face[2] + offset);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Bottom faces\n\t\t\t\t\t\tfor (var _i11 = 0; _i11 < flen; _i11++) {\n\t\t\t\t\t\t\tvar _face2 = faces[_i11];\n\t\t\t\t\t\t\tf3(_face2[2], _face2[1], _face2[0]);\n\t\t\t\t\t\t} // Top faces\n\n\n\t\t\t\t\t\tfor (var _i12 = 0; _i12 < flen; _i12++) {\n\t\t\t\t\t\t\tvar _face3 = faces[_i12];\n\t\t\t\t\t\t\tf3(_face3[0] + vlen * steps, _face3[1] + vlen * steps, _face3[2] + vlen * steps);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.addGroup(start, verticesArray.length / 3 - start, 0);\n\t\t\t\t} // Create faces for the z-sides of the shape\n\n\n\t\t\t\tfunction buildSideFaces() {\n\t\t\t\t\tvar start = verticesArray.length / 3;\n\t\t\t\t\tvar layeroffset = 0;\n\t\t\t\t\tsidewalls(contour, layeroffset);\n\t\t\t\t\tlayeroffset += contour.length;\n\n\t\t\t\t\tfor (var _h5 = 0, _hl5 = holes.length; _h5 < _hl5; _h5++) {\n\t\t\t\t\t\tvar _ahole5 = holes[_h5];\n\t\t\t\t\t\tsidewalls(_ahole5, layeroffset); //, true\n\n\t\t\t\t\t\tlayeroffset += _ahole5.length;\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.addGroup(start, verticesArray.length / 3 - start, 1);\n\t\t\t\t}\n\n\t\t\t\tfunction sidewalls(contour, layeroffset) {\n\t\t\t\t\tvar i = contour.length;\n\n\t\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\t\tvar _j2 = i;\n\n\t\t\t\t\t\tvar _k2 = i - 1;\n\n\t\t\t\t\t\tif (_k2 < 0) _k2 = contour.length - 1; //console.log('b', i,j, i-1, k,vertices.length);\n\n\t\t\t\t\t\tfor (var _s = 0, sl = steps + bevelSegments * 2; _s < sl; _s++) {\n\t\t\t\t\t\t\tvar slen1 = vlen * _s;\n\t\t\t\t\t\t\tvar slen2 = vlen * (_s + 1);\n\n\t\t\t\t\t\t\tvar a = layeroffset + _j2 + slen1,\n\t\t\t\t\t\t\t\t\t_b2 = layeroffset + _k2 + slen1,\n\t\t\t\t\t\t\t\t\tc = layeroffset + _k2 + slen2,\n\t\t\t\t\t\t\t\t\td = layeroffset + _j2 + slen2;\n\n\t\t\t\t\t\t\tf4(a, _b2, c, d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction v(x, y, z) {\n\t\t\t\t\tplaceholder.push(x);\n\t\t\t\t\tplaceholder.push(y);\n\t\t\t\t\tplaceholder.push(z);\n\t\t\t\t}\n\n\t\t\t\tfunction f3(a, b, c) {\n\t\t\t\t\taddVertex(a);\n\t\t\t\t\taddVertex(b);\n\t\t\t\t\taddVertex(c);\n\t\t\t\t\tvar nextIndex = verticesArray.length / 3;\n\t\t\t\t\tvar uvs = uvgen.generateTopUV(scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1);\n\t\t\t\t\taddUV(uvs[0]);\n\t\t\t\t\taddUV(uvs[1]);\n\t\t\t\t\taddUV(uvs[2]);\n\t\t\t\t}\n\n\t\t\t\tfunction f4(a, b, c, d) {\n\t\t\t\t\taddVertex(a);\n\t\t\t\t\taddVertex(b);\n\t\t\t\t\taddVertex(d);\n\t\t\t\t\taddVertex(b);\n\t\t\t\t\taddVertex(c);\n\t\t\t\t\taddVertex(d);\n\t\t\t\t\tvar nextIndex = verticesArray.length / 3;\n\t\t\t\t\tvar uvs = uvgen.generateSideWallUV(scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1);\n\t\t\t\t\taddUV(uvs[0]);\n\t\t\t\t\taddUV(uvs[1]);\n\t\t\t\t\taddUV(uvs[3]);\n\t\t\t\t\taddUV(uvs[1]);\n\t\t\t\t\taddUV(uvs[2]);\n\t\t\t\t\taddUV(uvs[3]);\n\t\t\t\t}\n\n\t\t\t\tfunction addVertex(index) {\n\t\t\t\t\tverticesArray.push(placeholder[index * 3 + 0]);\n\t\t\t\t\tverticesArray.push(placeholder[index * 3 + 1]);\n\t\t\t\t\tverticesArray.push(placeholder[index * 3 + 2]);\n\t\t\t\t}\n\n\t\t\t\tfunction addUV(vector2) {\n\t\t\t\t\tuvArray.push(vector2.x);\n\t\t\t\t\tuvArray.push(vector2.y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = ExtrudeGeometry.prototype;\n\n\t\t_proto.toJSON = function toJSON() {\n\t\t\tvar data = BufferGeometry.prototype.toJSON.call(this);\n\t\t\tvar shapes = this.parameters.shapes;\n\t\t\tvar options = this.parameters.options;\n\t\t\treturn _toJSON(shapes, options, data);\n\t\t};\n\n\t\treturn ExtrudeGeometry;\n\t}(BufferGeometry);\n\n\tvar WorldUVGenerator = {\n\t\tgenerateTopUV: function generateTopUV(geometry, vertices, indexA, indexB, indexC) {\n\t\t\tvar a_x = vertices[indexA * 3];\n\t\t\tvar a_y = vertices[indexA * 3 + 1];\n\t\t\tvar b_x = vertices[indexB * 3];\n\t\t\tvar b_y = vertices[indexB * 3 + 1];\n\t\t\tvar c_x = vertices[indexC * 3];\n\t\t\tvar c_y = vertices[indexC * 3 + 1];\n\t\t\treturn [new Vector2(a_x, a_y), new Vector2(b_x, b_y), new Vector2(c_x, c_y)];\n\t\t},\n\t\tgenerateSideWallUV: function generateSideWallUV(geometry, vertices, indexA, indexB, indexC, indexD) {\n\t\t\tvar a_x = vertices[indexA * 3];\n\t\t\tvar a_y = vertices[indexA * 3 + 1];\n\t\t\tvar a_z = vertices[indexA * 3 + 2];\n\t\t\tvar b_x = vertices[indexB * 3];\n\t\t\tvar b_y = vertices[indexB * 3 + 1];\n\t\t\tvar b_z = vertices[indexB * 3 + 2];\n\t\t\tvar c_x = vertices[indexC * 3];\n\t\t\tvar c_y = vertices[indexC * 3 + 1];\n\t\t\tvar c_z = vertices[indexC * 3 + 2];\n\t\t\tvar d_x = vertices[indexD * 3];\n\t\t\tvar d_y = vertices[indexD * 3 + 1];\n\t\t\tvar d_z = vertices[indexD * 3 + 2];\n\n\t\t\tif (Math.abs(a_y - b_y) < 0.01) {\n\t\t\t\treturn [new Vector2(a_x, 1 - a_z), new Vector2(b_x, 1 - b_z), new Vector2(c_x, 1 - c_z), new Vector2(d_x, 1 - d_z)];\n\t\t\t} else {\n\t\t\t\treturn [new Vector2(a_y, 1 - a_z), new Vector2(b_y, 1 - b_z), new Vector2(c_y, 1 - c_z), new Vector2(d_y, 1 - d_z)];\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction _toJSON(shapes, options, data) {\n\t\tdata.shapes = [];\n\n\t\tif (Array.isArray(shapes)) {\n\t\t\tfor (var i = 0, l = shapes.length; i < l; i++) {\n\t\t\t\tvar shape = shapes[i];\n\t\t\t\tdata.shapes.push(shape.uuid);\n\t\t\t}\n\t\t} else {\n\t\t\tdata.shapes.push(shapes.uuid);\n\t\t}\n\n\t\tif (options.extrudePath !== undefined) data.options.extrudePath = options.extrudePath.toJSON();\n\t\treturn data;\n\t}\n\n\tvar IcosahedronGeometry = /*#__PURE__*/function (_PolyhedronGeometry) {\n\t\t_inheritsLoose(IcosahedronGeometry, _PolyhedronGeometry);\n\n\t\tfunction IcosahedronGeometry(radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\tvar t = (1 + Math.sqrt(5)) / 2;\n\t\t\tvar vertices = [-1, t, 0, 1, t, 0, -1, -t, 0, 1, -t, 0, 0, -1, t, 0, 1, t, 0, -1, -t, 0, 1, -t, t, 0, -1, t, 0, 1, -t, 0, -1, -t, 0, 1];\n\t\t\tvar indices = [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];\n\t\t\t_this = _PolyhedronGeometry.call(this, vertices, indices, radius, detail) || this;\n\t\t\t_this.type = 'IcosahedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn IcosahedronGeometry;\n\t}(PolyhedronGeometry);\n\n\tvar LatheGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(LatheGeometry, _BufferGeometry);\n\n\t\tfunction LatheGeometry(points, segments, phiStart, phiLength) {\n\t\t\tvar _this;\n\n\t\t\tif (segments === void 0) {\n\t\t\t\tsegments = 12;\n\t\t\t}\n\n\t\t\tif (phiStart === void 0) {\n\t\t\t\tphiStart = 0;\n\t\t\t}\n\n\t\t\tif (phiLength === void 0) {\n\t\t\t\tphiLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'LatheGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tpoints: points,\n\t\t\t\tsegments: segments,\n\t\t\t\tphiStart: phiStart,\n\t\t\t\tphiLength: phiLength\n\t\t\t};\n\t\t\tsegments = Math.floor(segments); // clamp phiLength so it's in range of [ 0, 2PI ]\n\n\t\t\tphiLength = MathUtils.clamp(phiLength, 0, Math.PI * 2); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar inverseSegments = 1.0 / segments;\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar uv = new Vector2(); // generate vertices and uvs\n\n\t\t\tfor (var i = 0; i <= segments; i++) {\n\t\t\t\tvar phi = phiStart + i * inverseSegments * phiLength;\n\t\t\t\tvar sin = Math.sin(phi);\n\t\t\t\tvar cos = Math.cos(phi);\n\n\t\t\t\tfor (var j = 0; j <= points.length - 1; j++) {\n\t\t\t\t\t// vertex\n\t\t\t\t\tvertex.x = points[j].x * sin;\n\t\t\t\t\tvertex.y = points[j].y;\n\t\t\t\t\tvertex.z = points[j].x * cos;\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // uv\n\n\t\t\t\t\tuv.x = i / segments;\n\t\t\t\t\tuv.y = j / (points.length - 1);\n\t\t\t\t\tuvs.push(uv.x, uv.y);\n\t\t\t\t}\n\t\t\t} // indices\n\n\n\t\t\tfor (var _i = 0; _i < segments; _i++) {\n\t\t\t\tfor (var _j = 0; _j < points.length - 1; _j++) {\n\t\t\t\t\tvar base = _j + _i * points.length;\n\t\t\t\t\tvar a = base;\n\t\t\t\t\tvar b = base + points.length;\n\t\t\t\t\tvar c = base + points.length + 1;\n\t\t\t\t\tvar d = base + 1; // faces\n\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // generate normals\n\n\n\t\t\t_this.computeVertexNormals(); // if the geometry is closed, we need to average the normals along the seam.\n\t\t\t// because the corresponding vertices are identical (but still have different UVs).\n\n\n\t\t\tif (phiLength === Math.PI * 2) {\n\t\t\t\tvar normals = _this.attributes.normal.array;\n\t\t\t\tvar n1 = new Vector3();\n\t\t\t\tvar n2 = new Vector3();\n\t\t\t\tvar n = new Vector3(); // this is the buffer offset for the last line of vertices\n\n\t\t\t\tvar _base = segments * points.length * 3;\n\n\t\t\t\tfor (var _i2 = 0, _j2 = 0; _i2 < points.length; _i2++, _j2 += 3) {\n\t\t\t\t\t// select the normal of the vertex in the first line\n\t\t\t\t\tn1.x = normals[_j2 + 0];\n\t\t\t\t\tn1.y = normals[_j2 + 1];\n\t\t\t\t\tn1.z = normals[_j2 + 2]; // select the normal of the vertex in the last line\n\n\t\t\t\t\tn2.x = normals[_base + _j2 + 0];\n\t\t\t\t\tn2.y = normals[_base + _j2 + 1];\n\t\t\t\t\tn2.z = normals[_base + _j2 + 2]; // average normals\n\n\t\t\t\t\tn.addVectors(n1, n2).normalize(); // assign the new values to both normals\n\n\t\t\t\t\tnormals[_j2 + 0] = normals[_base + _j2 + 0] = n.x;\n\t\t\t\t\tnormals[_j2 + 1] = normals[_base + _j2 + 1] = n.y;\n\t\t\t\t\tnormals[_j2 + 2] = normals[_base + _j2 + 2] = n.z;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn LatheGeometry;\n\t}(BufferGeometry);\n\n\tvar OctahedronGeometry = /*#__PURE__*/function (_PolyhedronGeometry) {\n\t\t_inheritsLoose(OctahedronGeometry, _PolyhedronGeometry);\n\n\t\tfunction OctahedronGeometry(radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\tvar vertices = [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1];\n\t\t\tvar indices = [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2];\n\t\t\t_this = _PolyhedronGeometry.call(this, vertices, indices, radius, detail) || this;\n\t\t\t_this.type = 'OctahedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn OctahedronGeometry;\n\t}(PolyhedronGeometry);\n\n\t/**\n\t * Parametric Surfaces Geometry\n\t * based on the brilliant article by @prideout https://prideout.net/blog/old/blog/index.html@p=44.html\n\t */\n\n\tfunction ParametricGeometry(func, slices, stacks) {\n\t\tBufferGeometry.call(this);\n\t\tthis.type = 'ParametricGeometry';\n\t\tthis.parameters = {\n\t\t\tfunc: func,\n\t\t\tslices: slices,\n\t\t\tstacks: stacks\n\t\t}; // buffers\n\n\t\tvar indices = [];\n\t\tvar vertices = [];\n\t\tvar normals = [];\n\t\tvar uvs = [];\n\t\tvar EPS = 0.00001;\n\t\tvar normal = new Vector3();\n\t\tvar p0 = new Vector3(),\n\t\t\t\tp1 = new Vector3();\n\t\tvar pu = new Vector3(),\n\t\t\t\tpv = new Vector3();\n\n\t\tif (func.length < 3) {\n\t\t\tconsole.error('THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.');\n\t\t} // generate vertices, normals and uvs\n\n\n\t\tvar sliceCount = slices + 1;\n\n\t\tfor (var i = 0; i <= stacks; i++) {\n\t\t\tvar v = i / stacks;\n\n\t\t\tfor (var j = 0; j <= slices; j++) {\n\t\t\t\tvar u = j / slices; // vertex\n\n\t\t\t\tfunc(u, v, p0);\n\t\t\t\tvertices.push(p0.x, p0.y, p0.z); // normal\n\t\t\t\t// approximate tangent vectors via finite differences\n\n\t\t\t\tif (u - EPS >= 0) {\n\t\t\t\t\tfunc(u - EPS, v, p1);\n\t\t\t\t\tpu.subVectors(p0, p1);\n\t\t\t\t} else {\n\t\t\t\t\tfunc(u + EPS, v, p1);\n\t\t\t\t\tpu.subVectors(p1, p0);\n\t\t\t\t}\n\n\t\t\t\tif (v - EPS >= 0) {\n\t\t\t\t\tfunc(u, v - EPS, p1);\n\t\t\t\t\tpv.subVectors(p0, p1);\n\t\t\t\t} else {\n\t\t\t\t\tfunc(u, v + EPS, p1);\n\t\t\t\t\tpv.subVectors(p1, p0);\n\t\t\t\t} // cross product of tangent vectors returns surface normal\n\n\n\t\t\t\tnormal.crossVectors(pu, pv).normalize();\n\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\tuvs.push(u, v);\n\t\t\t}\n\t\t} // generate indices\n\n\n\t\tfor (var _i = 0; _i < stacks; _i++) {\n\t\t\tfor (var _j = 0; _j < slices; _j++) {\n\t\t\t\tvar a = _i * sliceCount + _j;\n\t\t\t\tvar b = _i * sliceCount + _j + 1;\n\t\t\t\tvar c = (_i + 1) * sliceCount + _j + 1;\n\t\t\t\tvar d = (_i + 1) * sliceCount + _j; // faces one and two\n\n\t\t\t\tindices.push(a, b, d);\n\t\t\t\tindices.push(b, c, d);\n\t\t\t}\n\t\t} // build geometry\n\n\n\t\tthis.setIndex(indices);\n\t\tthis.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\tthis.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\t\tthis.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\t}\n\n\tParametricGeometry.prototype = Object.create(BufferGeometry.prototype);\n\tParametricGeometry.prototype.constructor = ParametricGeometry;\n\n\tvar RingGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(RingGeometry, _BufferGeometry);\n\n\t\tfunction RingGeometry(innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (innerRadius === void 0) {\n\t\t\t\tinnerRadius = 0.5;\n\t\t\t}\n\n\t\t\tif (outerRadius === void 0) {\n\t\t\t\touterRadius = 1;\n\t\t\t}\n\n\t\t\tif (thetaSegments === void 0) {\n\t\t\t\tthetaSegments = 8;\n\t\t\t}\n\n\t\t\tif (phiSegments === void 0) {\n\t\t\t\tphiSegments = 1;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'RingGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tinnerRadius: innerRadius,\n\t\t\t\touterRadius: outerRadius,\n\t\t\t\tthetaSegments: thetaSegments,\n\t\t\t\tphiSegments: phiSegments,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\t\t\tthetaSegments = Math.max(3, thetaSegments);\n\t\t\tphiSegments = Math.max(1, phiSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // some helper variables\n\n\t\t\tvar radius = innerRadius;\n\t\t\tvar radiusStep = (outerRadius - innerRadius) / phiSegments;\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar uv = new Vector2(); // generate vertices, normals and uvs\n\n\t\t\tfor (var j = 0; j <= phiSegments; j++) {\n\t\t\t\tfor (var i = 0; i <= thetaSegments; i++) {\n\t\t\t\t\t// values are generate from the inside of the ring to the outside\n\t\t\t\t\tvar segment = thetaStart + i / thetaSegments * thetaLength; // vertex\n\n\t\t\t\t\tvertex.x = radius * Math.cos(segment);\n\t\t\t\t\tvertex.y = radius * Math.sin(segment);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\tnormals.push(0, 0, 1); // uv\n\n\t\t\t\t\tuv.x = (vertex.x / outerRadius + 1) / 2;\n\t\t\t\t\tuv.y = (vertex.y / outerRadius + 1) / 2;\n\t\t\t\t\tuvs.push(uv.x, uv.y);\n\t\t\t\t} // increase the radius for next row of vertices\n\n\n\t\t\t\tradius += radiusStep;\n\t\t\t} // indices\n\n\n\t\t\tfor (var _j = 0; _j < phiSegments; _j++) {\n\t\t\t\tvar thetaSegmentLevel = _j * (thetaSegments + 1);\n\n\t\t\t\tfor (var _i = 0; _i < thetaSegments; _i++) {\n\t\t\t\t\tvar _segment = _i + thetaSegmentLevel;\n\n\t\t\t\t\tvar a = _segment;\n\t\t\t\t\tvar b = _segment + thetaSegments + 1;\n\t\t\t\t\tvar c = _segment + thetaSegments + 2;\n\t\t\t\t\tvar d = _segment + 1; // faces\n\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn RingGeometry;\n\t}(BufferGeometry);\n\n\tvar ShapeGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(ShapeGeometry, _BufferGeometry);\n\n\t\tfunction ShapeGeometry(shapes, curveSegments) {\n\t\t\tvar _this;\n\n\t\t\tif (curveSegments === void 0) {\n\t\t\t\tcurveSegments = 12;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'ShapeGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tshapes: shapes,\n\t\t\t\tcurveSegments: curveSegments\n\t\t\t}; // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar groupStart = 0;\n\t\t\tvar groupCount = 0; // allow single and array values for \"shapes\" parameter\n\n\t\t\tif (Array.isArray(shapes) === false) {\n\t\t\t\taddShape(shapes);\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < shapes.length; i++) {\n\t\t\t\t\taddShape(shapes[i]);\n\n\t\t\t\t\t_this.addGroup(groupStart, groupCount, i); // enables MultiMaterial support\n\n\n\t\t\t\t\tgroupStart += groupCount;\n\t\t\t\t\tgroupCount = 0;\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // helper functions\n\n\n\t\t\tfunction addShape(shape) {\n\t\t\t\tvar indexOffset = vertices.length / 3;\n\t\t\t\tvar points = shape.extractPoints(curveSegments);\n\t\t\t\tvar shapeVertices = points.shape;\n\t\t\t\tvar shapeHoles = points.holes; // check direction of vertices\n\n\t\t\t\tif (ShapeUtils.isClockWise(shapeVertices) === false) {\n\t\t\t\t\tshapeVertices = shapeVertices.reverse();\n\t\t\t\t}\n\n\t\t\t\tfor (var _i = 0, l = shapeHoles.length; _i < l; _i++) {\n\t\t\t\t\tvar shapeHole = shapeHoles[_i];\n\n\t\t\t\t\tif (ShapeUtils.isClockWise(shapeHole) === true) {\n\t\t\t\t\t\tshapeHoles[_i] = shapeHole.reverse();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar faces = ShapeUtils.triangulateShape(shapeVertices, shapeHoles); // join vertices of inner and outer paths to a single array\n\n\t\t\t\tfor (var _i2 = 0, _l = shapeHoles.length; _i2 < _l; _i2++) {\n\t\t\t\t\tvar _shapeHole = shapeHoles[_i2];\n\t\t\t\t\tshapeVertices = shapeVertices.concat(_shapeHole);\n\t\t\t\t} // vertices, normals, uvs\n\n\n\t\t\t\tfor (var _i3 = 0, _l2 = shapeVertices.length; _i3 < _l2; _i3++) {\n\t\t\t\t\tvar vertex = shapeVertices[_i3];\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, 0);\n\t\t\t\t\tnormals.push(0, 0, 1);\n\t\t\t\t\tuvs.push(vertex.x, vertex.y); // world uvs\n\t\t\t\t} // incides\n\n\n\t\t\t\tfor (var _i4 = 0, _l3 = faces.length; _i4 < _l3; _i4++) {\n\t\t\t\t\tvar face = faces[_i4];\n\t\t\t\t\tvar a = face[0] + indexOffset;\n\t\t\t\t\tvar b = face[1] + indexOffset;\n\t\t\t\t\tvar c = face[2] + indexOffset;\n\t\t\t\t\tindices.push(a, b, c);\n\t\t\t\t\tgroupCount += 3;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = ShapeGeometry.prototype;\n\n\t\t_proto.toJSON = function toJSON() {\n\t\t\tvar data = BufferGeometry.prototype.toJSON.call(this);\n\t\t\tvar shapes = this.parameters.shapes;\n\t\t\treturn _toJSON$1(shapes, data);\n\t\t};\n\n\t\treturn ShapeGeometry;\n\t}(BufferGeometry);\n\n\tfunction _toJSON$1(shapes, data) {\n\t\tdata.shapes = [];\n\n\t\tif (Array.isArray(shapes)) {\n\t\t\tfor (var i = 0, l = shapes.length; i < l; i++) {\n\t\t\t\tvar shape = shapes[i];\n\t\t\t\tdata.shapes.push(shape.uuid);\n\t\t\t}\n\t\t} else {\n\t\t\tdata.shapes.push(shapes.uuid);\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tvar SphereGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(SphereGeometry, _BufferGeometry);\n\n\t\tfunction SphereGeometry(radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (widthSegments === void 0) {\n\t\t\t\twidthSegments = 8;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 6;\n\t\t\t}\n\n\t\t\tif (phiStart === void 0) {\n\t\t\t\tphiStart = 0;\n\t\t\t}\n\n\t\t\tif (phiLength === void 0) {\n\t\t\t\tphiLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'SphereGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\twidthSegments: widthSegments,\n\t\t\t\theightSegments: heightSegments,\n\t\t\t\tphiStart: phiStart,\n\t\t\t\tphiLength: phiLength,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\t\t\twidthSegments = Math.max(3, Math.floor(widthSegments));\n\t\t\theightSegments = Math.max(2, Math.floor(heightSegments));\n\t\t\tvar thetaEnd = Math.min(thetaStart + thetaLength, Math.PI);\n\t\t\tvar index = 0;\n\t\t\tvar grid = [];\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar normal = new Vector3(); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // generate vertices, normals and uvs\n\n\t\t\tfor (var iy = 0; iy <= heightSegments; iy++) {\n\t\t\t\tvar verticesRow = [];\n\t\t\t\tvar v = iy / heightSegments; // special case for the poles\n\n\t\t\t\tvar uOffset = 0;\n\n\t\t\t\tif (iy == 0 && thetaStart == 0) {\n\t\t\t\t\tuOffset = 0.5 / widthSegments;\n\t\t\t\t} else if (iy == heightSegments && thetaEnd == Math.PI) {\n\t\t\t\t\tuOffset = -0.5 / widthSegments;\n\t\t\t\t}\n\n\t\t\t\tfor (var ix = 0; ix <= widthSegments; ix++) {\n\t\t\t\t\tvar u = ix / widthSegments; // vertex\n\n\t\t\t\t\tvertex.x = -radius * Math.cos(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);\n\t\t\t\t\tvertex.y = radius * Math.cos(thetaStart + v * thetaLength);\n\t\t\t\t\tvertex.z = radius * Math.sin(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\tnormal.copy(vertex).normalize();\n\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\t\tuvs.push(u + uOffset, 1 - v);\n\t\t\t\t\tverticesRow.push(index++);\n\t\t\t\t}\n\n\t\t\t\tgrid.push(verticesRow);\n\t\t\t} // indices\n\n\n\t\t\tfor (var _iy = 0; _iy < heightSegments; _iy++) {\n\t\t\t\tfor (var _ix = 0; _ix < widthSegments; _ix++) {\n\t\t\t\t\tvar a = grid[_iy][_ix + 1];\n\t\t\t\t\tvar b = grid[_iy][_ix];\n\t\t\t\t\tvar c = grid[_iy + 1][_ix];\n\t\t\t\t\tvar d = grid[_iy + 1][_ix + 1];\n\t\t\t\t\tif (_iy !== 0 || thetaStart > 0) indices.push(a, b, d);\n\t\t\t\t\tif (_iy !== heightSegments - 1 || thetaEnd < Math.PI) indices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn SphereGeometry;\n\t}(BufferGeometry);\n\n\tvar TetrahedronGeometry = /*#__PURE__*/function (_PolyhedronGeometry) {\n\t\t_inheritsLoose(TetrahedronGeometry, _PolyhedronGeometry);\n\n\t\tfunction TetrahedronGeometry(radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\tvar vertices = [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1];\n\t\t\tvar indices = [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1];\n\t\t\t_this = _PolyhedronGeometry.call(this, vertices, indices, radius, detail) || this;\n\t\t\t_this.type = 'TetrahedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn TetrahedronGeometry;\n\t}(PolyhedronGeometry);\n\n\tvar TextGeometry = /*#__PURE__*/function (_ExtrudeGeometry) {\n\t\t_inheritsLoose(TextGeometry, _ExtrudeGeometry);\n\n\t\tfunction TextGeometry(text, parameters) {\n\t\t\tvar _this;\n\n\t\t\tif (parameters === void 0) {\n\t\t\t\tparameters = {};\n\t\t\t}\n\n\t\t\tvar font = parameters.font;\n\n\t\t\tif (!(font && font.isFont)) {\n\t\t\t\tconsole.error('THREE.TextGeometry: font parameter is not an instance of THREE.Font.');\n\t\t\t\treturn new BufferGeometry() || _assertThisInitialized(_this);\n\t\t\t}\n\n\t\t\tvar shapes = font.generateShapes(text, parameters.size); // translate parameters to ExtrudeGeometry API\n\n\t\t\tparameters.depth = parameters.height !== undefined ? parameters.height : 50; // defaults\n\n\t\t\tif (parameters.bevelThickness === undefined) parameters.bevelThickness = 10;\n\t\t\tif (parameters.bevelSize === undefined) parameters.bevelSize = 8;\n\t\t\tif (parameters.bevelEnabled === undefined) parameters.bevelEnabled = false;\n\t\t\t_this = _ExtrudeGeometry.call(this, shapes, parameters) || this;\n\t\t\t_this.type = 'TextGeometry';\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn TextGeometry;\n\t}(ExtrudeGeometry);\n\n\tvar TorusGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(TorusGeometry, _BufferGeometry);\n\n\t\tfunction TorusGeometry(radius, tube, radialSegments, tubularSegments, arc) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (tube === void 0) {\n\t\t\t\ttube = 0.4;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (tubularSegments === void 0) {\n\t\t\t\ttubularSegments = 6;\n\t\t\t}\n\n\t\t\tif (arc === void 0) {\n\t\t\t\tarc = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'TorusGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\ttube: tube,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\ttubularSegments: tubularSegments,\n\t\t\t\tarc: arc\n\t\t\t};\n\t\t\tradialSegments = Math.floor(radialSegments);\n\t\t\ttubularSegments = Math.floor(tubularSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar center = new Vector3();\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar normal = new Vector3(); // generate vertices, normals and uvs\n\n\t\t\tfor (var j = 0; j <= radialSegments; j++) {\n\t\t\t\tfor (var i = 0; i <= tubularSegments; i++) {\n\t\t\t\t\tvar u = i / tubularSegments * arc;\n\t\t\t\t\tvar v = j / radialSegments * Math.PI * 2; // vertex\n\n\t\t\t\t\tvertex.x = (radius + tube * Math.cos(v)) * Math.cos(u);\n\t\t\t\t\tvertex.y = (radius + tube * Math.cos(v)) * Math.sin(u);\n\t\t\t\t\tvertex.z = tube * Math.sin(v);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\tcenter.x = radius * Math.cos(u);\n\t\t\t\t\tcenter.y = radius * Math.sin(u);\n\t\t\t\t\tnormal.subVectors(vertex, center).normalize();\n\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\t\tuvs.push(i / tubularSegments);\n\t\t\t\t\tuvs.push(j / radialSegments);\n\t\t\t\t}\n\t\t\t} // generate indices\n\n\n\t\t\tfor (var _j = 1; _j <= radialSegments; _j++) {\n\t\t\t\tfor (var _i = 1; _i <= tubularSegments; _i++) {\n\t\t\t\t\t// indices\n\t\t\t\t\tvar a = (tubularSegments + 1) * _j + _i - 1;\n\t\t\t\t\tvar b = (tubularSegments + 1) * (_j - 1) + _i - 1;\n\t\t\t\t\tvar c = (tubularSegments + 1) * (_j - 1) + _i;\n\t\t\t\t\tvar d = (tubularSegments + 1) * _j + _i; // faces\n\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn TorusGeometry;\n\t}(BufferGeometry);\n\n\tvar TorusKnotGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(TorusKnotGeometry, _BufferGeometry);\n\n\t\tfunction TorusKnotGeometry(radius, tube, tubularSegments, radialSegments, p, q) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (tube === void 0) {\n\t\t\t\ttube = 0.4;\n\t\t\t}\n\n\t\t\tif (tubularSegments === void 0) {\n\t\t\t\ttubularSegments = 64;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (p === void 0) {\n\t\t\t\tp = 2;\n\t\t\t}\n\n\t\t\tif (q === void 0) {\n\t\t\t\tq = 3;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'TorusKnotGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\ttube: tube,\n\t\t\t\ttubularSegments: tubularSegments,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\tp: p,\n\t\t\t\tq: q\n\t\t\t};\n\t\t\ttubularSegments = Math.floor(tubularSegments);\n\t\t\tradialSegments = Math.floor(radialSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar normal = new Vector3();\n\t\t\tvar P1 = new Vector3();\n\t\t\tvar P2 = new Vector3();\n\t\t\tvar B = new Vector3();\n\t\t\tvar T = new Vector3();\n\t\t\tvar N = new Vector3(); // generate vertices, normals and uvs\n\n\t\t\tfor (var i = 0; i <= tubularSegments; ++i) {\n\t\t\t\t// the radian \"u\" is used to calculate the position on the torus curve of the current tubular segement\n\t\t\t\tvar u = i / tubularSegments * p * Math.PI * 2; // now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead.\n\t\t\t\t// these points are used to create a special \"coordinate space\", which is necessary to calculate the correct vertex positions\n\n\t\t\t\tcalculatePositionOnCurve(u, p, q, radius, P1);\n\t\t\t\tcalculatePositionOnCurve(u + 0.01, p, q, radius, P2); // calculate orthonormal basis\n\n\t\t\t\tT.subVectors(P2, P1);\n\t\t\t\tN.addVectors(P2, P1);\n\t\t\t\tB.crossVectors(T, N);\n\t\t\t\tN.crossVectors(B, T); // normalize B, N. T can be ignored, we don't use it\n\n\t\t\t\tB.normalize();\n\t\t\t\tN.normalize();\n\n\t\t\t\tfor (var j = 0; j <= radialSegments; ++j) {\n\t\t\t\t\t// now calculate the vertices. they are nothing more than an extrusion of the torus curve.\n\t\t\t\t\t// because we extrude a shape in the xy-plane, there is no need to calculate a z-value.\n\t\t\t\t\tvar v = j / radialSegments * Math.PI * 2;\n\t\t\t\t\tvar cx = -tube * Math.cos(v);\n\t\t\t\t\tvar cy = tube * Math.sin(v); // now calculate the final vertex position.\n\t\t\t\t\t// first we orient the extrusion with our basis vectos, then we add it to the current position on the curve\n\n\t\t\t\t\tvertex.x = P1.x + (cx * N.x + cy * B.x);\n\t\t\t\t\tvertex.y = P1.y + (cx * N.y + cy * B.y);\n\t\t\t\t\tvertex.z = P1.z + (cx * N.z + cy * B.z);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)\n\n\t\t\t\t\tnormal.subVectors(vertex, P1).normalize();\n\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\t\tuvs.push(i / tubularSegments);\n\t\t\t\t\tuvs.push(j / radialSegments);\n\t\t\t\t}\n\t\t\t} // generate indices\n\n\n\t\t\tfor (var _j = 1; _j <= tubularSegments; _j++) {\n\t\t\t\tfor (var _i = 1; _i <= radialSegments; _i++) {\n\t\t\t\t\t// indices\n\t\t\t\t\tvar a = (radialSegments + 1) * (_j - 1) + (_i - 1);\n\t\t\t\t\tvar b = (radialSegments + 1) * _j + (_i - 1);\n\t\t\t\t\tvar c = (radialSegments + 1) * _j + _i;\n\t\t\t\t\tvar d = (radialSegments + 1) * (_j - 1) + _i; // faces\n\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // this function calculates the current position on the torus curve\n\n\n\t\t\tfunction calculatePositionOnCurve(u, p, q, radius, position) {\n\t\t\t\tvar cu = Math.cos(u);\n\t\t\t\tvar su = Math.sin(u);\n\t\t\t\tvar quOverP = q / p * u;\n\t\t\t\tvar cs = Math.cos(quOverP);\n\t\t\t\tposition.x = radius * (2 + cs) * 0.5 * cu;\n\t\t\t\tposition.y = radius * (2 + cs) * su * 0.5;\n\t\t\t\tposition.z = radius * Math.sin(quOverP) * 0.5;\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn TorusKnotGeometry;\n\t}(BufferGeometry);\n\n\tvar TubeGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(TubeGeometry, _BufferGeometry);\n\n\t\tfunction TubeGeometry(path, tubularSegments, radius, radialSegments, closed) {\n\t\t\tvar _this;\n\n\t\t\tif (tubularSegments === void 0) {\n\t\t\t\ttubularSegments = 64;\n\t\t\t}\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (closed === void 0) {\n\t\t\t\tclosed = false;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'TubeGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tpath: path,\n\t\t\t\ttubularSegments: tubularSegments,\n\t\t\t\tradius: radius,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\tclosed: closed\n\t\t\t};\n\t\t\tvar frames = path.computeFrenetFrames(tubularSegments, closed); // expose internals\n\n\t\t\t_this.tangents = frames.tangents;\n\t\t\t_this.normals = frames.normals;\n\t\t\t_this.binormals = frames.binormals; // helper variables\n\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar normal = new Vector3();\n\t\t\tvar uv = new Vector2();\n\t\t\tvar P = new Vector3(); // buffer\n\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = [];\n\t\t\tvar indices = []; // create buffer data\n\n\t\t\tgenerateBufferData(); // build geometry\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // functions\n\n\n\t\t\tfunction generateBufferData() {\n\t\t\t\tfor (var i = 0; i < tubularSegments; i++) {\n\t\t\t\t\tgenerateSegment(i);\n\t\t\t\t} // if the geometry is not closed, generate the last row of vertices and normals\n\t\t\t\t// at the regular position on the given path\n\t\t\t\t//\n\t\t\t\t// if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)\n\n\n\t\t\t\tgenerateSegment(closed === false ? tubularSegments : 0); // uvs are generated in a separate function.\n\t\t\t\t// this makes it easy compute correct values for closed geometries\n\n\t\t\t\tgenerateUVs(); // finally create faces\n\n\t\t\t\tgenerateIndices();\n\t\t\t}\n\n\t\t\tfunction generateSegment(i) {\n\t\t\t\t// we use getPointAt to sample evenly distributed points from the given path\n\t\t\t\tP = path.getPointAt(i / tubularSegments, P); // retrieve corresponding normal and binormal\n\n\t\t\t\tvar N = frames.normals[i];\n\t\t\t\tvar B = frames.binormals[i]; // generate normals and vertices for the current segment\n\n\t\t\t\tfor (var j = 0; j <= radialSegments; j++) {\n\t\t\t\t\tvar v = j / radialSegments * Math.PI * 2;\n\t\t\t\t\tvar sin = Math.sin(v);\n\t\t\t\t\tvar cos = -Math.cos(v); // normal\n\n\t\t\t\t\tnormal.x = cos * N.x + sin * B.x;\n\t\t\t\t\tnormal.y = cos * N.y + sin * B.y;\n\t\t\t\t\tnormal.z = cos * N.z + sin * B.z;\n\t\t\t\t\tnormal.normalize();\n\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // vertex\n\n\t\t\t\t\tvertex.x = P.x + radius * normal.x;\n\t\t\t\t\tvertex.y = P.y + radius * normal.y;\n\t\t\t\t\tvertex.z = P.z + radius * normal.z;\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction generateIndices() {\n\t\t\t\tfor (var j = 1; j <= tubularSegments; j++) {\n\t\t\t\t\tfor (var i = 1; i <= radialSegments; i++) {\n\t\t\t\t\t\tvar a = (radialSegments + 1) * (j - 1) + (i - 1);\n\t\t\t\t\t\tvar b = (radialSegments + 1) * j + (i - 1);\n\t\t\t\t\t\tvar c = (radialSegments + 1) * j + i;\n\t\t\t\t\t\tvar d = (radialSegments + 1) * (j - 1) + i; // faces\n\n\t\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction generateUVs() {\n\t\t\t\tfor (var i = 0; i <= tubularSegments; i++) {\n\t\t\t\t\tfor (var j = 0; j <= radialSegments; j++) {\n\t\t\t\t\t\tuv.x = i / tubularSegments;\n\t\t\t\t\t\tuv.y = j / radialSegments;\n\t\t\t\t\t\tuvs.push(uv.x, uv.y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = TubeGeometry.prototype;\n\n\t\t_proto.toJSON = function toJSON() {\n\t\t\tvar data = BufferGeometry.prototype.toJSON.call(this);\n\t\t\tdata.path = this.parameters.path.toJSON();\n\t\t\treturn data;\n\t\t};\n\n\t\treturn TubeGeometry;\n\t}(BufferGeometry);\n\n\tvar WireframeGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(WireframeGeometry, _BufferGeometry);\n\n\t\tfunction WireframeGeometry(geometry) {\n\t\t\tvar _this;\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'WireframeGeometry';\n\n\t\t\tif (geometry.isGeometry === true) {\n\t\t\t\tconsole.error('THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\treturn _assertThisInitialized(_this);\n\t\t\t} // buffer\n\n\n\t\t\tvar vertices = []; // helper variables\n\n\t\t\tvar edge = [0, 0],\n\t\t\t\t\tedges = {};\n\t\t\tvar vertex = new Vector3();\n\n\t\t\tif (geometry.index !== null) {\n\t\t\t\t// indexed BufferGeometry\n\t\t\t\tvar position = geometry.attributes.position;\n\t\t\t\tvar indices = geometry.index;\n\t\t\t\tvar groups = geometry.groups;\n\n\t\t\t\tif (groups.length === 0) {\n\t\t\t\t\tgroups = [{\n\t\t\t\t\t\tstart: 0,\n\t\t\t\t\t\tcount: indices.count,\n\t\t\t\t\t\tmaterialIndex: 0\n\t\t\t\t\t}];\n\t\t\t\t} // create a data structure that contains all eges without duplicates\n\n\n\t\t\t\tfor (var o = 0, ol = groups.length; o < ol; ++o) {\n\t\t\t\t\tvar group = groups[o];\n\t\t\t\t\tvar start = group.start;\n\t\t\t\t\tvar count = group.count;\n\n\t\t\t\t\tfor (var i = start, l = start + count; i < l; i += 3) {\n\t\t\t\t\t\tfor (var j = 0; j < 3; j++) {\n\t\t\t\t\t\t\tvar edge1 = indices.getX(i + j);\n\t\t\t\t\t\t\tvar edge2 = indices.getX(i + (j + 1) % 3);\n\t\t\t\t\t\t\tedge[0] = Math.min(edge1, edge2); // sorting prevents duplicates\n\n\t\t\t\t\t\t\tedge[1] = Math.max(edge1, edge2);\n\t\t\t\t\t\t\tvar key = edge[0] + ',' + edge[1];\n\n\t\t\t\t\t\t\tif (edges[key] === undefined) {\n\t\t\t\t\t\t\t\tedges[key] = {\n\t\t\t\t\t\t\t\t\tindex1: edge[0],\n\t\t\t\t\t\t\t\t\tindex2: edge[1]\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // generate vertices\n\n\n\t\t\t\tfor (var _key in edges) {\n\t\t\t\t\tvar e = edges[_key];\n\t\t\t\t\tvertex.fromBufferAttribute(position, e.index1);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t\tvertex.fromBufferAttribute(position, e.index2);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// non-indexed BufferGeometry\n\t\t\t\tvar _position = geometry.attributes.position;\n\n\t\t\t\tfor (var _i = 0, _l = _position.count / 3; _i < _l; _i++) {\n\t\t\t\t\tfor (var _j = 0; _j < 3; _j++) {\n\t\t\t\t\t\t// three edges per triangle, an edge is represented as (index1, index2)\n\t\t\t\t\t\t// e.g. the first triangle has the following edges: (0,1),(1,2),(2,0)\n\t\t\t\t\t\tvar index1 = 3 * _i + _j;\n\t\t\t\t\t\tvertex.fromBufferAttribute(_position, index1);\n\t\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t\t\tvar index2 = 3 * _i + (_j + 1) % 3;\n\t\t\t\t\t\tvertex.fromBufferAttribute(_position, index2);\n\t\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn WireframeGeometry;\n\t}(BufferGeometry);\n\n\tvar Geometries = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tBoxGeometry: BoxGeometry,\n\t\tBoxBufferGeometry: BoxGeometry,\n\t\tCircleGeometry: CircleGeometry,\n\t\tCircleBufferGeometry: CircleGeometry,\n\t\tConeGeometry: ConeGeometry,\n\t\tConeBufferGeometry: ConeGeometry,\n\t\tCylinderGeometry: CylinderGeometry,\n\t\tCylinderBufferGeometry: CylinderGeometry,\n\t\tDodecahedronGeometry: DodecahedronGeometry,\n\t\tDodecahedronBufferGeometry: DodecahedronGeometry,\n\t\tEdgesGeometry: EdgesGeometry,\n\t\tExtrudeGeometry: ExtrudeGeometry,\n\t\tExtrudeBufferGeometry: ExtrudeGeometry,\n\t\tIcosahedronGeometry: IcosahedronGeometry,\n\t\tIcosahedronBufferGeometry: IcosahedronGeometry,\n\t\tLatheGeometry: LatheGeometry,\n\t\tLatheBufferGeometry: LatheGeometry,\n\t\tOctahedronGeometry: OctahedronGeometry,\n\t\tOctahedronBufferGeometry: OctahedronGeometry,\n\t\tParametricGeometry: ParametricGeometry,\n\t\tParametricBufferGeometry: ParametricGeometry,\n\t\tPlaneGeometry: PlaneGeometry,\n\t\tPlaneBufferGeometry: PlaneGeometry,\n\t\tPolyhedronGeometry: PolyhedronGeometry,\n\t\tPolyhedronBufferGeometry: PolyhedronGeometry,\n\t\tRingGeometry: RingGeometry,\n\t\tRingBufferGeometry: RingGeometry,\n\t\tShapeGeometry: ShapeGeometry,\n\t\tShapeBufferGeometry: ShapeGeometry,\n\t\tSphereGeometry: SphereGeometry,\n\t\tSphereBufferGeometry: SphereGeometry,\n\t\tTetrahedronGeometry: TetrahedronGeometry,\n\t\tTetrahedronBufferGeometry: TetrahedronGeometry,\n\t\tTextGeometry: TextGeometry,\n\t\tTextBufferGeometry: TextGeometry,\n\t\tTorusGeometry: TorusGeometry,\n\t\tTorusBufferGeometry: TorusGeometry,\n\t\tTorusKnotGeometry: TorusKnotGeometry,\n\t\tTorusKnotBufferGeometry: TorusKnotGeometry,\n\t\tTubeGeometry: TubeGeometry,\n\t\tTubeBufferGeometry: TubeGeometry,\n\t\tWireframeGeometry: WireframeGeometry\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <THREE.Color>\n\t * }\n\t */\n\n\tfunction ShadowMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'ShadowMaterial';\n\t\tthis.color = new Color(0x000000);\n\t\tthis.transparent = true;\n\t\tthis.setValues(parameters);\n\t}\n\n\tShadowMaterial.prototype = Object.create(Material.prototype);\n\tShadowMaterial.prototype.constructor = ShadowMaterial;\n\tShadowMaterial.prototype.isShadowMaterial = true;\n\n\tShadowMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\treturn this;\n\t};\n\n\tfunction RawShaderMaterial(parameters) {\n\t\tShaderMaterial.call(this, parameters);\n\t\tthis.type = 'RawShaderMaterial';\n\t}\n\n\tRawShaderMaterial.prototype = Object.create(ShaderMaterial.prototype);\n\tRawShaderMaterial.prototype.constructor = RawShaderMaterial;\n\tRawShaderMaterial.prototype.isRawShaderMaterial = true;\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\troughness: <float>,\n\t *\tmetalness: <float>,\n\t *\topacity: <float>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\temissive: <hex>,\n\t *\temissiveIntensity: <float>\n\t *\temissiveMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\troughnessMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tmetalnessMap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tenvMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n\t *\tenvMapIntensity: <float>\n\t *\n\t *\trefractionRatio: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshStandardMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.defines = {\n\t\t\t'STANDARD': ''\n\t\t};\n\t\tthis.type = 'MeshStandardMaterial';\n\t\tthis.color = new Color(0xffffff); // diffuse\n\n\t\tthis.roughness = 1.0;\n\t\tthis.metalness = 0.0;\n\t\tthis.map = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.emissive = new Color(0x000000);\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.roughnessMap = null;\n\t\tthis.metalnessMap = null;\n\t\tthis.alphaMap = null;\n\t\tthis.envMap = null;\n\t\tthis.envMapIntensity = 1.0;\n\t\tthis.refractionRatio = 0.98;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.vertexTangents = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshStandardMaterial.prototype = Object.create(Material.prototype);\n\tMeshStandardMaterial.prototype.constructor = MeshStandardMaterial;\n\tMeshStandardMaterial.prototype.isMeshStandardMaterial = true;\n\n\tMeshStandardMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.defines = {\n\t\t\t'STANDARD': ''\n\t\t};\n\t\tthis.color.copy(source.color);\n\t\tthis.roughness = source.roughness;\n\t\tthis.metalness = source.metalness;\n\t\tthis.map = source.map;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.emissive.copy(source.emissive);\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.roughnessMap = source.roughnessMap;\n\t\tthis.metalnessMap = source.metalnessMap;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.envMap = source.envMap;\n\t\tthis.envMapIntensity = source.envMapIntensity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\tthis.vertexTangents = source.vertexTangents;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tclearcoat: <float>,\n\t *\tclearcoatMap: new THREE.Texture( <Image> ),\n\t *\tclearcoatRoughness: <float>,\n\t *\tclearcoatRoughnessMap: new THREE.Texture( <Image> ),\n\t *\tclearcoatNormalScale: <Vector2>,\n\t *\tclearcoatNormalMap: new THREE.Texture( <Image> ),\n\t *\n\t *\treflectivity: <float>,\n\t *\tior: <float>,\n\t *\n\t *\tsheen: <Color>,\n\t *\n\t *\ttransmission: <float>,\n\t *\ttransmissionMap: new THREE.Texture( <Image> )\n\t * }\n\t */\n\n\tfunction MeshPhysicalMaterial(parameters) {\n\t\tMeshStandardMaterial.call(this);\n\t\tthis.defines = {\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\t\t};\n\t\tthis.type = 'MeshPhysicalMaterial';\n\t\tthis.clearcoat = 0.0;\n\t\tthis.clearcoatMap = null;\n\t\tthis.clearcoatRoughness = 0.0;\n\t\tthis.clearcoatRoughnessMap = null;\n\t\tthis.clearcoatNormalScale = new Vector2(1, 1);\n\t\tthis.clearcoatNormalMap = null;\n\t\tthis.reflectivity = 0.5; // maps to F0 = 0.04\n\n\t\tObject.defineProperty(this, 'ior', {\n\t\t\tget: function get() {\n\t\t\t\treturn (1 + 0.4 * this.reflectivity) / (1 - 0.4 * this.reflectivity);\n\t\t\t},\n\t\t\tset: function set(ior) {\n\t\t\t\tthis.reflectivity = MathUtils.clamp(2.5 * (ior - 1) / (ior + 1), 0, 1);\n\t\t\t}\n\t\t});\n\t\tthis.sheen = null; // null will disable sheen bsdf\n\n\t\tthis.transmission = 0.0;\n\t\tthis.transmissionMap = null;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshPhysicalMaterial.prototype = Object.create(MeshStandardMaterial.prototype);\n\tMeshPhysicalMaterial.prototype.constructor = MeshPhysicalMaterial;\n\tMeshPhysicalMaterial.prototype.isMeshPhysicalMaterial = true;\n\n\tMeshPhysicalMaterial.prototype.copy = function (source) {\n\t\tMeshStandardMaterial.prototype.copy.call(this, source);\n\t\tthis.defines = {\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\t\t};\n\t\tthis.clearcoat = source.clearcoat;\n\t\tthis.clearcoatMap = source.clearcoatMap;\n\t\tthis.clearcoatRoughness = source.clearcoatRoughness;\n\t\tthis.clearcoatRoughnessMap = source.clearcoatRoughnessMap;\n\t\tthis.clearcoatNormalMap = source.clearcoatNormalMap;\n\t\tthis.clearcoatNormalScale.copy(source.clearcoatNormalScale);\n\t\tthis.reflectivity = source.reflectivity;\n\n\t\tif (source.sheen) {\n\t\t\tthis.sheen = (this.sheen || new Color()).copy(source.sheen);\n\t\t} else {\n\t\t\tthis.sheen = null;\n\t\t}\n\n\t\tthis.transmission = source.transmission;\n\t\tthis.transmissionMap = source.transmissionMap;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\tspecular: <hex>,\n\t *\tshininess: <float>,\n\t *\topacity: <float>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\temissive: <hex>,\n\t *\temissiveIntensity: <float>\n\t *\temissiveMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\tspecularMap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tenvMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n\t *\tcombine: THREE.MultiplyOperation,\n\t *\treflectivity: <float>,\n\t *\trefractionRatio: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshPhongMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshPhongMaterial';\n\t\tthis.color = new Color(0xffffff); // diffuse\n\n\t\tthis.specular = new Color(0x111111);\n\t\tthis.shininess = 30;\n\t\tthis.map = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.emissive = new Color(0x000000);\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.specularMap = null;\n\t\tthis.alphaMap = null;\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshPhongMaterial.prototype = Object.create(Material.prototype);\n\tMeshPhongMaterial.prototype.constructor = MeshPhongMaterial;\n\tMeshPhongMaterial.prototype.isMeshPhongMaterial = true;\n\n\tMeshPhongMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.specular.copy(source.specular);\n\t\tthis.shininess = source.shininess;\n\t\tthis.map = source.map;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.emissive.copy(source.emissive);\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.specularMap = source.specularMap;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\tgradientMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\temissive: <hex>,\n\t *\temissiveIntensity: <float>\n\t *\temissiveMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshToonMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.defines = {\n\t\t\t'TOON': ''\n\t\t};\n\t\tthis.type = 'MeshToonMaterial';\n\t\tthis.color = new Color(0xffffff);\n\t\tthis.map = null;\n\t\tthis.gradientMap = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.emissive = new Color(0x000000);\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.alphaMap = null;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshToonMaterial.prototype = Object.create(Material.prototype);\n\tMeshToonMaterial.prototype.constructor = MeshToonMaterial;\n\tMeshToonMaterial.prototype.isMeshToonMaterial = true;\n\n\tMeshToonMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.gradientMap = source.gradientMap;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.emissive.copy(source.emissive);\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\topacity: <float>,\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshNormalMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshNormalMaterial';\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.fog = false;\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshNormalMaterial.prototype = Object.create(Material.prototype);\n\tMeshNormalMaterial.prototype.constructor = MeshNormalMaterial;\n\tMeshNormalMaterial.prototype.isMeshNormalMaterial = true;\n\n\tMeshNormalMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\temissive: <hex>,\n\t *\temissiveIntensity: <float>\n\t *\temissiveMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tspecularMap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tenvMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n\t *\tcombine: THREE.Multiply,\n\t *\treflectivity: <float>,\n\t *\trefractionRatio: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshLambertMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshLambertMaterial';\n\t\tthis.color = new Color(0xffffff); // diffuse\n\n\t\tthis.map = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.emissive = new Color(0x000000);\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\t\tthis.specularMap = null;\n\t\tthis.alphaMap = null;\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshLambertMaterial.prototype = Object.create(Material.prototype);\n\tMeshLambertMaterial.prototype.constructor = MeshLambertMaterial;\n\tMeshLambertMaterial.prototype.isMeshLambertMaterial = true;\n\n\tMeshLambertMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.emissive.copy(source.emissive);\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\t\tthis.specularMap = source.specularMap;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\n\t *\tmatcap: new THREE.Texture( <Image> ),\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshMatcapMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.defines = {\n\t\t\t'MATCAP': ''\n\t\t};\n\t\tthis.type = 'MeshMatcapMaterial';\n\t\tthis.color = new Color(0xffffff); // diffuse\n\n\t\tthis.matcap = null;\n\t\tthis.map = null;\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.alphaMap = null;\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshMatcapMaterial.prototype = Object.create(Material.prototype);\n\tMeshMatcapMaterial.prototype.constructor = MeshMatcapMaterial;\n\tMeshMatcapMaterial.prototype.isMeshMatcapMaterial = true;\n\n\tMeshMatcapMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.defines = {\n\t\t\t'MATCAP': ''\n\t\t};\n\t\tthis.color.copy(source.color);\n\t\tthis.matcap = source.matcap;\n\t\tthis.map = source.map;\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\n\t *\tlinewidth: <float>,\n\t *\n\t *\tscale: <float>,\n\t *\tdashSize: <float>,\n\t *\tgapSize: <float>\n\t * }\n\t */\n\n\tfunction LineDashedMaterial(parameters) {\n\t\tLineBasicMaterial.call(this);\n\t\tthis.type = 'LineDashedMaterial';\n\t\tthis.scale = 1;\n\t\tthis.dashSize = 3;\n\t\tthis.gapSize = 1;\n\t\tthis.setValues(parameters);\n\t}\n\n\tLineDashedMaterial.prototype = Object.create(LineBasicMaterial.prototype);\n\tLineDashedMaterial.prototype.constructor = LineDashedMaterial;\n\tLineDashedMaterial.prototype.isLineDashedMaterial = true;\n\n\tLineDashedMaterial.prototype.copy = function (source) {\n\t\tLineBasicMaterial.prototype.copy.call(this, source);\n\t\tthis.scale = source.scale;\n\t\tthis.dashSize = source.dashSize;\n\t\tthis.gapSize = source.gapSize;\n\t\treturn this;\n\t};\n\n\tvar Materials = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tShadowMaterial: ShadowMaterial,\n\t\tSpriteMaterial: SpriteMaterial,\n\t\tRawShaderMaterial: RawShaderMaterial,\n\t\tShaderMaterial: ShaderMaterial,\n\t\tPointsMaterial: PointsMaterial,\n\t\tMeshPhysicalMaterial: MeshPhysicalMaterial,\n\t\tMeshStandardMaterial: MeshStandardMaterial,\n\t\tMeshPhongMaterial: MeshPhongMaterial,\n\t\tMeshToonMaterial: MeshToonMaterial,\n\t\tMeshNormalMaterial: MeshNormalMaterial,\n\t\tMeshLambertMaterial: MeshLambertMaterial,\n\t\tMeshDepthMaterial: MeshDepthMaterial,\n\t\tMeshDistanceMaterial: MeshDistanceMaterial,\n\t\tMeshBasicMaterial: MeshBasicMaterial,\n\t\tMeshMatcapMaterial: MeshMatcapMaterial,\n\t\tLineDashedMaterial: LineDashedMaterial,\n\t\tLineBasicMaterial: LineBasicMaterial,\n\t\tMaterial: Material\n\t});\n\n\tvar AnimationUtils = {\n\t\t// same as Array.prototype.slice, but also works on typed arrays\n\t\tarraySlice: function arraySlice(array, from, to) {\n\t\t\tif (AnimationUtils.isTypedArray(array)) {\n\t\t\t\t// in ios9 array.subarray(from, undefined) will return empty array\n\t\t\t\t// but array.subarray(from) or array.subarray(from, len) is correct\n\t\t\t\treturn new array.constructor(array.subarray(from, to !== undefined ? to : array.length));\n\t\t\t}\n\n\t\t\treturn array.slice(from, to);\n\t\t},\n\t\t// converts an array to a specific type\n\t\tconvertArray: function convertArray(array, type, forceClone) {\n\t\t\tif (!array || // let 'undefined' and 'null' pass\n\t\t\t!forceClone && array.constructor === type) return array;\n\n\t\t\tif (typeof type.BYTES_PER_ELEMENT === 'number') {\n\t\t\t\treturn new type(array); // create typed array\n\t\t\t}\n\n\t\t\treturn Array.prototype.slice.call(array); // create Array\n\t\t},\n\t\tisTypedArray: function isTypedArray(object) {\n\t\t\treturn ArrayBuffer.isView(object) && !(object instanceof DataView);\n\t\t},\n\t\t// returns an array by which times and values can be sorted\n\t\tgetKeyframeOrder: function getKeyframeOrder(times) {\n\t\t\tfunction compareTime(i, j) {\n\t\t\t\treturn times[i] - times[j];\n\t\t\t}\n\n\t\t\tvar n = times.length;\n\t\t\tvar result = new Array(n);\n\n\t\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\t\tresult[i] = i;\n\t\t\t}\n\n\t\t\tresult.sort(compareTime);\n\t\t\treturn result;\n\t\t},\n\t\t// uses the array previously returned by 'getKeyframeOrder' to sort data\n\t\tsortedArray: function sortedArray(values, stride, order) {\n\t\t\tvar nValues = values.length;\n\t\t\tvar result = new values.constructor(nValues);\n\n\t\t\tfor (var i = 0, dstOffset = 0; dstOffset !== nValues; ++i) {\n\t\t\t\tvar srcOffset = order[i] * stride;\n\n\t\t\t\tfor (var j = 0; j !== stride; ++j) {\n\t\t\t\t\tresult[dstOffset++] = values[srcOffset + j];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t},\n\t\t// function for parsing AOS keyframe formats\n\t\tflattenJSON: function flattenJSON(jsonKeys, times, values, valuePropertyName) {\n\t\t\tvar i = 1,\n\t\t\t\t\tkey = jsonKeys[0];\n\n\t\t\twhile (key !== undefined && key[valuePropertyName] === undefined) {\n\t\t\t\tkey = jsonKeys[i++];\n\t\t\t}\n\n\t\t\tif (key === undefined) return; // no data\n\n\t\t\tvar value = key[valuePropertyName];\n\t\t\tif (value === undefined) return; // no data\n\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tdo {\n\t\t\t\t\tvalue = key[valuePropertyName];\n\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\ttimes.push(key.time);\n\t\t\t\t\t\tvalues.push.apply(values, value); // push all elements\n\t\t\t\t\t}\n\n\t\t\t\t\tkey = jsonKeys[i++];\n\t\t\t\t} while (key !== undefined);\n\t\t\t} else if (value.toArray !== undefined) {\n\t\t\t\t// ...assume THREE.Math-ish\n\t\t\t\tdo {\n\t\t\t\t\tvalue = key[valuePropertyName];\n\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\ttimes.push(key.time);\n\t\t\t\t\t\tvalue.toArray(values, values.length);\n\t\t\t\t\t}\n\n\t\t\t\t\tkey = jsonKeys[i++];\n\t\t\t\t} while (key !== undefined);\n\t\t\t} else {\n\t\t\t\t// otherwise push as-is\n\t\t\t\tdo {\n\t\t\t\t\tvalue = key[valuePropertyName];\n\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\ttimes.push(key.time);\n\t\t\t\t\t\tvalues.push(value);\n\t\t\t\t\t}\n\n\t\t\t\t\tkey = jsonKeys[i++];\n\t\t\t\t} while (key !== undefined);\n\t\t\t}\n\t\t},\n\t\tsubclip: function subclip(sourceClip, name, startFrame, endFrame, fps) {\n\t\t\tif (fps === void 0) {\n\t\t\t\tfps = 30;\n\t\t\t}\n\n\t\t\tvar clip = sourceClip.clone();\n\t\t\tclip.name = name;\n\t\t\tvar tracks = [];\n\n\t\t\tfor (var i = 0; i < clip.tracks.length; ++i) {\n\t\t\t\tvar track = clip.tracks[i];\n\t\t\t\tvar valueSize = track.getValueSize();\n\t\t\t\tvar times = [];\n\t\t\t\tvar values = [];\n\n\t\t\t\tfor (var j = 0; j < track.times.length; ++j) {\n\t\t\t\t\tvar frame = track.times[j] * fps;\n\t\t\t\t\tif (frame < startFrame || frame >= endFrame) continue;\n\t\t\t\t\ttimes.push(track.times[j]);\n\n\t\t\t\t\tfor (var k = 0; k < valueSize; ++k) {\n\t\t\t\t\t\tvalues.push(track.values[j * valueSize + k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (times.length === 0) continue;\n\t\t\t\ttrack.times = AnimationUtils.convertArray(times, track.times.constructor);\n\t\t\t\ttrack.values = AnimationUtils.convertArray(values, track.values.constructor);\n\t\t\t\ttracks.push(track);\n\t\t\t}\n\n\t\t\tclip.tracks = tracks; // find minimum .times value across all tracks in the trimmed clip\n\n\t\t\tvar minStartTime = Infinity;\n\n\t\t\tfor (var _i = 0; _i < clip.tracks.length; ++_i) {\n\t\t\t\tif (minStartTime > clip.tracks[_i].times[0]) {\n\t\t\t\t\tminStartTime = clip.tracks[_i].times[0];\n\t\t\t\t}\n\t\t\t} // shift all tracks such that clip begins at t=0\n\n\n\t\t\tfor (var _i2 = 0; _i2 < clip.tracks.length; ++_i2) {\n\t\t\t\tclip.tracks[_i2].shift(-1 * minStartTime);\n\t\t\t}\n\n\t\t\tclip.resetDuration();\n\t\t\treturn clip;\n\t\t},\n\t\tmakeClipAdditive: function makeClipAdditive(targetClip, referenceFrame, referenceClip, fps) {\n\t\t\tif (referenceFrame === void 0) {\n\t\t\t\treferenceFrame = 0;\n\t\t\t}\n\n\t\t\tif (referenceClip === void 0) {\n\t\t\t\treferenceClip = targetClip;\n\t\t\t}\n\n\t\t\tif (fps === void 0) {\n\t\t\t\tfps = 30;\n\t\t\t}\n\n\t\t\tif (fps <= 0) fps = 30;\n\t\t\tvar numTracks = referenceClip.tracks.length;\n\t\t\tvar referenceTime = referenceFrame / fps; // Make each track's values relative to the values at the reference frame\n\n\t\t\tvar _loop = function _loop(i) {\n\t\t\t\tvar referenceTrack = referenceClip.tracks[i];\n\t\t\t\tvar referenceTrackType = referenceTrack.ValueTypeName; // Skip this track if it's non-numeric\n\n\t\t\t\tif (referenceTrackType === 'bool' || referenceTrackType === 'string') return \"continue\"; // Find the track in the target clip whose name and type matches the reference track\n\n\t\t\t\tvar targetTrack = targetClip.tracks.find(function (track) {\n\t\t\t\t\treturn track.name === referenceTrack.name && track.ValueTypeName === referenceTrackType;\n\t\t\t\t});\n\t\t\t\tif (targetTrack === undefined) return \"continue\";\n\t\t\t\tvar referenceOffset = 0;\n\t\t\t\tvar referenceValueSize = referenceTrack.getValueSize();\n\n\t\t\t\tif (referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) {\n\t\t\t\t\treferenceOffset = referenceValueSize / 3;\n\t\t\t\t}\n\n\t\t\t\tvar targetOffset = 0;\n\t\t\t\tvar targetValueSize = targetTrack.getValueSize();\n\n\t\t\t\tif (targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) {\n\t\t\t\t\ttargetOffset = targetValueSize / 3;\n\t\t\t\t}\n\n\t\t\t\tvar lastIndex = referenceTrack.times.length - 1;\n\t\t\t\tvar referenceValue = void 0; // Find the value to subtract out of the track\n\n\t\t\t\tif (referenceTime <= referenceTrack.times[0]) {\n\t\t\t\t\t// Reference frame is earlier than the first keyframe, so just use the first keyframe\n\t\t\t\t\tvar startIndex = referenceOffset;\n\t\t\t\t\tvar endIndex = referenceValueSize - referenceOffset;\n\t\t\t\t\treferenceValue = AnimationUtils.arraySlice(referenceTrack.values, startIndex, endIndex);\n\t\t\t\t} else if (referenceTime >= referenceTrack.times[lastIndex]) {\n\t\t\t\t\t// Reference frame is after the last keyframe, so just use the last keyframe\n\t\t\t\t\tvar _startIndex = lastIndex * referenceValueSize + referenceOffset;\n\n\t\t\t\t\tvar _endIndex = _startIndex + referenceValueSize - referenceOffset;\n\n\t\t\t\t\treferenceValue = AnimationUtils.arraySlice(referenceTrack.values, _startIndex, _endIndex);\n\t\t\t\t} else {\n\t\t\t\t\t// Interpolate to the reference value\n\t\t\t\t\tvar interpolant = referenceTrack.createInterpolant();\n\t\t\t\t\tvar _startIndex2 = referenceOffset;\n\n\t\t\t\t\tvar _endIndex2 = referenceValueSize - referenceOffset;\n\n\t\t\t\t\tinterpolant.evaluate(referenceTime);\n\t\t\t\t\treferenceValue = AnimationUtils.arraySlice(interpolant.resultBuffer, _startIndex2, _endIndex2);\n\t\t\t\t} // Conjugate the quaternion\n\n\n\t\t\t\tif (referenceTrackType === 'quaternion') {\n\t\t\t\t\tvar referenceQuat = new Quaternion().fromArray(referenceValue).normalize().conjugate();\n\t\t\t\t\treferenceQuat.toArray(referenceValue);\n\t\t\t\t} // Subtract the reference value from all of the track values\n\n\n\t\t\t\tvar numTimes = targetTrack.times.length;\n\n\t\t\t\tfor (var j = 0; j < numTimes; ++j) {\n\t\t\t\t\tvar valueStart = j * targetValueSize + targetOffset;\n\n\t\t\t\t\tif (referenceTrackType === 'quaternion') {\n\t\t\t\t\t\t// Multiply the conjugate for quaternion track types\n\t\t\t\t\t\tQuaternion.multiplyQuaternionsFlat(targetTrack.values, valueStart, referenceValue, 0, targetTrack.values, valueStart);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar valueEnd = targetValueSize - targetOffset * 2; // Subtract each value for all other numeric track types\n\n\t\t\t\t\t\tfor (var k = 0; k < valueEnd; ++k) {\n\t\t\t\t\t\t\ttargetTrack.values[valueStart + k] -= referenceValue[k];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfor (var i = 0; i < numTracks; ++i) {\n\t\t\t\tvar _ret = _loop(i);\n\n\t\t\t\tif (_ret === \"continue\") continue;\n\t\t\t}\n\n\t\t\ttargetClip.blendMode = AdditiveAnimationBlendMode;\n\t\t\treturn targetClip;\n\t\t}\n\t};\n\n\t/**\n\t * Abstract base class of interpolants over parametric samples.\n\t *\n\t * The parameter domain is one dimensional, typically the time or a path\n\t * along a curve defined by the data.\n\t *\n\t * The sample values can have any dimensionality and derived classes may\n\t * apply special interpretations to the data.\n\t *\n\t * This class provides the interval seek in a Template Method, deferring\n\t * the actual interpolation to derived classes.\n\t *\n\t * Time complexity is O(1) for linear access crossing at most two points\n\t * and O(log N) for random access, where N is the number of positions.\n\t *\n\t * References:\n\t *\n\t * \t\thttp://www.oodesign.com/template-method-pattern.html\n\t *\n\t */\n\tfunction Interpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tthis.parameterPositions = parameterPositions;\n\t\tthis._cachedIndex = 0;\n\t\tthis.resultBuffer = resultBuffer !== undefined ? resultBuffer : new sampleValues.constructor(sampleSize);\n\t\tthis.sampleValues = sampleValues;\n\t\tthis.valueSize = sampleSize;\n\t}\n\n\tObject.assign(Interpolant.prototype, {\n\t\tevaluate: function evaluate(t) {\n\t\t\tvar pp = this.parameterPositions;\n\t\t\tvar i1 = this._cachedIndex,\n\t\t\t\t\tt1 = pp[i1],\n\t\t\t\t\tt0 = pp[i1 - 1];\n\n\t\t\tvalidate_interval: {\n\t\t\t\tseek: {\n\t\t\t\t\tvar right;\n\n\t\t\t\t\tlinear_scan: {\n\t\t\t\t\t\t//- See http://jsperf.com/comparison-to-undefined/3\n\t\t\t\t\t\t//- slower code:\n\t\t\t\t\t\t//-\n\t\t\t\t\t\t//- \t\t\t\tif ( t >= t1 || t1 === undefined ) {\n\t\t\t\t\t\tforward_scan: if (!(t < t1)) {\n\t\t\t\t\t\t\tfor (var giveUpAt = i1 + 2;;) {\n\t\t\t\t\t\t\t\tif (t1 === undefined) {\n\t\t\t\t\t\t\t\t\tif (t < t0) break forward_scan; // after end\n\n\t\t\t\t\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\t\t\t\t\treturn this.afterEnd_(i1 - 1, t, t0);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (i1 === giveUpAt) break; // this loop\n\n\t\t\t\t\t\t\t\tt0 = t1;\n\t\t\t\t\t\t\t\tt1 = pp[++i1];\n\n\t\t\t\t\t\t\t\tif (t < t1) {\n\t\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\t\tbreak seek;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} // prepare binary search on the right side of the index\n\n\n\t\t\t\t\t\t\tright = pp.length;\n\t\t\t\t\t\t\tbreak linear_scan;\n\t\t\t\t\t\t} //- slower code:\n\t\t\t\t\t\t//-\t\t\t\t\tif ( t < t0 || t0 === undefined ) {\n\n\n\t\t\t\t\t\tif (!(t >= t0)) {\n\t\t\t\t\t\t\t// looping?\n\t\t\t\t\t\t\tvar t1global = pp[1];\n\n\t\t\t\t\t\t\tif (t < t1global) {\n\t\t\t\t\t\t\t\ti1 = 2; // + 1, using the scan for the details\n\n\t\t\t\t\t\t\t\tt0 = t1global;\n\t\t\t\t\t\t\t} // linear reverse scan\n\n\n\t\t\t\t\t\t\tfor (var _giveUpAt = i1 - 2;;) {\n\t\t\t\t\t\t\t\tif (t0 === undefined) {\n\t\t\t\t\t\t\t\t\t// before start\n\t\t\t\t\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\t\t\t\t\treturn this.beforeStart_(0, t, t1);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (i1 === _giveUpAt) break; // this loop\n\n\t\t\t\t\t\t\t\tt1 = t0;\n\t\t\t\t\t\t\t\tt0 = pp[--i1 - 1];\n\n\t\t\t\t\t\t\t\tif (t >= t0) {\n\t\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\t\tbreak seek;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} // prepare binary search on the left side of the index\n\n\n\t\t\t\t\t\t\tright = i1;\n\t\t\t\t\t\t\ti1 = 0;\n\t\t\t\t\t\t\tbreak linear_scan;\n\t\t\t\t\t\t} // the interval is valid\n\n\n\t\t\t\t\t\tbreak validate_interval;\n\t\t\t\t\t} // linear scan\n\t\t\t\t\t// binary search\n\n\n\t\t\t\t\twhile (i1 < right) {\n\t\t\t\t\t\tvar mid = i1 + right >>> 1;\n\n\t\t\t\t\t\tif (t < pp[mid]) {\n\t\t\t\t\t\t\tright = mid;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ti1 = mid + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tt1 = pp[i1];\n\t\t\t\t\tt0 = pp[i1 - 1]; // check boundary cases, again\n\n\t\t\t\t\tif (t0 === undefined) {\n\t\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\t\treturn this.beforeStart_(0, t, t1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (t1 === undefined) {\n\t\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\t\treturn this.afterEnd_(i1 - 1, t0, t);\n\t\t\t\t\t}\n\t\t\t\t} // seek\n\n\n\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\tthis.intervalChanged_(i1, t0, t1);\n\t\t\t} // validate_interval\n\n\n\t\t\treturn this.interpolate_(i1, t0, t, t1);\n\t\t},\n\t\tsettings: null,\n\t\t// optional, subclass-specific settings structure\n\t\t// Note: The indirection allows central control of many interpolants.\n\t\t// --- Protected interface\n\t\tDefaultSettings_: {},\n\t\tgetSettings_: function getSettings_() {\n\t\t\treturn this.settings || this.DefaultSettings_;\n\t\t},\n\t\tcopySampleValue_: function copySampleValue_(index) {\n\t\t\t// copies a sample value to the result buffer\n\t\t\tvar result = this.resultBuffer,\n\t\t\t\t\tvalues = this.sampleValues,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toffset = index * stride;\n\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tresult[i] = values[offset + i];\n\t\t\t}\n\n\t\t\treturn result;\n\t\t},\n\t\t// Template methods for derived classes:\n\t\tinterpolate_: function interpolate_()\n\t\t/* i1, t0, t, t1 */\n\t\t{\n\t\t\tthrow new Error('call to abstract method'); // implementations shall return this.resultBuffer\n\t\t},\n\t\tintervalChanged_: function intervalChanged_()\n\t\t/* i1, t0, t1 */\n\t\t{// empty\n\t\t}\n\t}); // DECLARE ALIAS AFTER assign prototype\n\n\tObject.assign(Interpolant.prototype, {\n\t\t//( 0, t, t0 ), returns this.resultBuffer\n\t\tbeforeStart_: Interpolant.prototype.copySampleValue_,\n\t\t//( N-1, tN-1, t ), returns this.resultBuffer\n\t\tafterEnd_: Interpolant.prototype.copySampleValue_\n\t});\n\n\t/**\n\t * Fast and simple cubic spline interpolant.\n\t *\n\t * It was derived from a Hermitian construction setting the first derivative\n\t * at each sample position to the linear slope between neighboring positions\n\t * over their parameter interval.\n\t */\n\n\tfunction CubicInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tInterpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer);\n\t\tthis._weightPrev = -0;\n\t\tthis._offsetPrev = -0;\n\t\tthis._weightNext = -0;\n\t\tthis._offsetNext = -0;\n\t}\n\n\tCubicInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), {\n\t\tconstructor: CubicInterpolant,\n\t\tDefaultSettings_: {\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\t\t},\n\t\tintervalChanged_: function intervalChanged_(i1, t0, t1) {\n\t\t\tvar pp = this.parameterPositions;\n\t\t\tvar iPrev = i1 - 2,\n\t\t\t\t\tiNext = i1 + 1,\n\t\t\t\t\ttPrev = pp[iPrev],\n\t\t\t\t\ttNext = pp[iNext];\n\n\t\t\tif (tPrev === undefined) {\n\t\t\t\tswitch (this.getSettings_().endingStart) {\n\t\t\t\t\tcase ZeroSlopeEnding:\n\t\t\t\t\t\t// f'(t0) = 0\n\t\t\t\t\t\tiPrev = i1;\n\t\t\t\t\t\ttPrev = 2 * t0 - t1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase WrapAroundEnding:\n\t\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\t\tiPrev = pp.length - 2;\n\t\t\t\t\t\ttPrev = t0 + pp[iPrev] - pp[iPrev + 1];\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ZeroCurvatureEnding\n\t\t\t\t\t\t// f''(t0) = 0 a.k.a. Natural Spline\n\t\t\t\t\t\tiPrev = i1;\n\t\t\t\t\t\ttPrev = t1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tNext === undefined) {\n\t\t\t\tswitch (this.getSettings_().endingEnd) {\n\t\t\t\t\tcase ZeroSlopeEnding:\n\t\t\t\t\t\t// f'(tN) = 0\n\t\t\t\t\t\tiNext = i1;\n\t\t\t\t\t\ttNext = 2 * t1 - t0;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase WrapAroundEnding:\n\t\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\t\tiNext = 1;\n\t\t\t\t\t\ttNext = t1 + pp[1] - pp[0];\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ZeroCurvatureEnding\n\t\t\t\t\t\t// f''(tN) = 0, a.k.a. Natural Spline\n\t\t\t\t\t\tiNext = i1 - 1;\n\t\t\t\t\t\ttNext = t0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar halfDt = (t1 - t0) * 0.5,\n\t\t\t\t\tstride = this.valueSize;\n\t\t\tthis._weightPrev = halfDt / (t0 - tPrev);\n\t\t\tthis._weightNext = halfDt / (tNext - t1);\n\t\t\tthis._offsetPrev = iPrev * stride;\n\t\t\tthis._offsetNext = iNext * stride;\n\t\t},\n\t\tinterpolate_: function interpolate_(i1, t0, t, t1) {\n\t\t\tvar result = this.resultBuffer,\n\t\t\t\t\tvalues = this.sampleValues,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\to1 = i1 * stride,\n\t\t\t\t\to0 = o1 - stride,\n\t\t\t\t\toP = this._offsetPrev,\n\t\t\t\t\toN = this._offsetNext,\n\t\t\t\t\twP = this._weightPrev,\n\t\t\t\t\twN = this._weightNext,\n\t\t\t\t\tp = (t - t0) / (t1 - t0),\n\t\t\t\t\tpp = p * p,\n\t\t\t\t\tppp = pp * p; // evaluate polynomials\n\n\t\t\tvar sP = -wP * ppp + 2 * wP * pp - wP * p;\n\t\t\tvar s0 = (1 + wP) * ppp + (-1.5 - 2 * wP) * pp + (-0.5 + wP) * p + 1;\n\t\t\tvar s1 = (-1 - wN) * ppp + (1.5 + wN) * pp + 0.5 * p;\n\t\t\tvar sN = wN * ppp - wN * pp; // combine data linearly\n\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tresult[i] = sP * values[oP + i] + s0 * values[o0 + i] + s1 * values[o1 + i] + sN * values[oN + i];\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t});\n\n\tfunction LinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tInterpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer);\n\t}\n\n\tLinearInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), {\n\t\tconstructor: LinearInterpolant,\n\t\tinterpolate_: function interpolate_(i1, t0, t, t1) {\n\t\t\tvar result = this.resultBuffer,\n\t\t\t\t\tvalues = this.sampleValues,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toffset1 = i1 * stride,\n\t\t\t\t\toffset0 = offset1 - stride,\n\t\t\t\t\tweight1 = (t - t0) / (t1 - t0),\n\t\t\t\t\tweight0 = 1 - weight1;\n\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tresult[i] = values[offset0 + i] * weight0 + values[offset1 + i] * weight1;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t});\n\n\t/**\n\t *\n\t * Interpolant that evaluates to the sample value at the position preceeding\n\t * the parameter.\n\t */\n\n\tfunction DiscreteInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tInterpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer);\n\t}\n\n\tDiscreteInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), {\n\t\tconstructor: DiscreteInterpolant,\n\t\tinterpolate_: function interpolate_(i1\n\t\t/*, t0, t, t1 */\n\t\t) {\n\t\t\treturn this.copySampleValue_(i1 - 1);\n\t\t}\n\t});\n\n\tfunction KeyframeTrack(name, times, values, interpolation) {\n\t\tif (name === undefined) throw new Error('THREE.KeyframeTrack: track name is undefined');\n\t\tif (times === undefined || times.length === 0) throw new Error('THREE.KeyframeTrack: no keyframes in track named ' + name);\n\t\tthis.name = name;\n\t\tthis.times = AnimationUtils.convertArray(times, this.TimeBufferType);\n\t\tthis.values = AnimationUtils.convertArray(values, this.ValueBufferType);\n\t\tthis.setInterpolation(interpolation || this.DefaultInterpolation);\n\t} // Static methods\n\n\n\tObject.assign(KeyframeTrack, {\n\t\t// Serialization (in static context, because of constructor invocation\n\t\t// and automatic invocation of .toJSON):\n\t\ttoJSON: function toJSON(track) {\n\t\t\tvar trackType = track.constructor;\n\t\t\tvar json; // derived classes can define a static toJSON method\n\n\t\t\tif (trackType.toJSON !== undefined) {\n\t\t\t\tjson = trackType.toJSON(track);\n\t\t\t} else {\n\t\t\t\t// by default, we assume the data can be serialized as-is\n\t\t\t\tjson = {\n\t\t\t\t\t'name': track.name,\n\t\t\t\t\t'times': AnimationUtils.convertArray(track.times, Array),\n\t\t\t\t\t'values': AnimationUtils.convertArray(track.values, Array)\n\t\t\t\t};\n\t\t\t\tvar interpolation = track.getInterpolation();\n\n\t\t\t\tif (interpolation !== track.DefaultInterpolation) {\n\t\t\t\t\tjson.interpolation = interpolation;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tjson.type = track.ValueTypeName; // mandatory\n\n\t\t\treturn json;\n\t\t}\n\t});\n\tObject.assign(KeyframeTrack.prototype, {\n\t\tconstructor: KeyframeTrack,\n\t\tTimeBufferType: Float32Array,\n\t\tValueBufferType: Float32Array,\n\t\tDefaultInterpolation: InterpolateLinear,\n\t\tInterpolantFactoryMethodDiscrete: function InterpolantFactoryMethodDiscrete(result) {\n\t\t\treturn new DiscreteInterpolant(this.times, this.values, this.getValueSize(), result);\n\t\t},\n\t\tInterpolantFactoryMethodLinear: function InterpolantFactoryMethodLinear(result) {\n\t\t\treturn new LinearInterpolant(this.times, this.values, this.getValueSize(), result);\n\t\t},\n\t\tInterpolantFactoryMethodSmooth: function InterpolantFactoryMethodSmooth(result) {\n\t\t\treturn new CubicInterpolant(this.times, this.values, this.getValueSize(), result);\n\t\t},\n\t\tsetInterpolation: function setInterpolation(interpolation) {\n\t\t\tvar factoryMethod;\n\n\t\t\tswitch (interpolation) {\n\t\t\t\tcase InterpolateDiscrete:\n\t\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodDiscrete;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase InterpolateLinear:\n\t\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodLinear;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase InterpolateSmooth:\n\t\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodSmooth;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (factoryMethod === undefined) {\n\t\t\t\tvar message = 'unsupported interpolation for ' + this.ValueTypeName + ' keyframe track named ' + this.name;\n\n\t\t\t\tif (this.createInterpolant === undefined) {\n\t\t\t\t\t// fall back to default, unless the default itself is messed up\n\t\t\t\t\tif (interpolation !== this.DefaultInterpolation) {\n\t\t\t\t\t\tthis.setInterpolation(this.DefaultInterpolation);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(message); // fatal, in this case\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconsole.warn('THREE.KeyframeTrack:', message);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tthis.createInterpolant = factoryMethod;\n\t\t\treturn this;\n\t\t},\n\t\tgetInterpolation: function getInterpolation() {\n\t\t\tswitch (this.createInterpolant) {\n\t\t\t\tcase this.InterpolantFactoryMethodDiscrete:\n\t\t\t\t\treturn InterpolateDiscrete;\n\n\t\t\t\tcase this.InterpolantFactoryMethodLinear:\n\t\t\t\t\treturn InterpolateLinear;\n\n\t\t\t\tcase this.InterpolantFactoryMethodSmooth:\n\t\t\t\t\treturn InterpolateSmooth;\n\t\t\t}\n\t\t},\n\t\tgetValueSize: function getValueSize() {\n\t\t\treturn this.values.length / this.times.length;\n\t\t},\n\t\t// move all keyframes either forwards or backwards in time\n\t\tshift: function shift(timeOffset) {\n\t\t\tif (timeOffset !== 0.0) {\n\t\t\t\tvar times = this.times;\n\n\t\t\t\tfor (var i = 0, n = times.length; i !== n; ++i) {\n\t\t\t\t\ttimes[i] += timeOffset;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// scale all keyframe times by a factor (useful for frame <-> seconds conversions)\n\t\tscale: function scale(timeScale) {\n\t\t\tif (timeScale !== 1.0) {\n\t\t\t\tvar times = this.times;\n\n\t\t\t\tfor (var i = 0, n = times.length; i !== n; ++i) {\n\t\t\t\t\ttimes[i] *= timeScale;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// removes keyframes before and after animation without changing any values within the range [startTime, endTime].\n\t\t// IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values\n\t\ttrim: function trim(startTime, endTime) {\n\t\t\tvar times = this.times,\n\t\t\t\t\tnKeys = times.length;\n\t\t\tvar from = 0,\n\t\t\t\t\tto = nKeys - 1;\n\n\t\t\twhile (from !== nKeys && times[from] < startTime) {\n\t\t\t\t++from;\n\t\t\t}\n\n\t\t\twhile (to !== -1 && times[to] > endTime) {\n\t\t\t\t--to;\n\t\t\t}\n\n\t\t\t++to; // inclusive -> exclusive bound\n\n\t\t\tif (from !== 0 || to !== nKeys) {\n\t\t\t\t// empty tracks are forbidden, so keep at least one keyframe\n\t\t\t\tif (from >= to) {\n\t\t\t\t\tto = Math.max(to, 1);\n\t\t\t\t\tfrom = to - 1;\n\t\t\t\t}\n\n\t\t\t\tvar stride = this.getValueSize();\n\t\t\t\tthis.times = AnimationUtils.arraySlice(times, from, to);\n\t\t\t\tthis.values = AnimationUtils.arraySlice(this.values, from * stride, to * stride);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable\n\t\tvalidate: function validate() {\n\t\t\tvar valid = true;\n\t\t\tvar valueSize = this.getValueSize();\n\n\t\t\tif (valueSize - Math.floor(valueSize) !== 0) {\n\t\t\t\tconsole.error('THREE.KeyframeTrack: Invalid value size in track.', this);\n\t\t\t\tvalid = false;\n\t\t\t}\n\n\t\t\tvar times = this.times,\n\t\t\t\t\tvalues = this.values,\n\t\t\t\t\tnKeys = times.length;\n\n\t\t\tif (nKeys === 0) {\n\t\t\t\tconsole.error('THREE.KeyframeTrack: Track is empty.', this);\n\t\t\t\tvalid = false;\n\t\t\t}\n\n\t\t\tvar prevTime = null;\n\n\t\t\tfor (var i = 0; i !== nKeys; i++) {\n\t\t\t\tvar currTime = times[i];\n\n\t\t\t\tif (typeof currTime === 'number' && isNaN(currTime)) {\n\t\t\t\t\tconsole.error('THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime);\n\t\t\t\t\tvalid = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (prevTime !== null && prevTime > currTime) {\n\t\t\t\t\tconsole.error('THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime);\n\t\t\t\t\tvalid = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tprevTime = currTime;\n\t\t\t}\n\n\t\t\tif (values !== undefined) {\n\t\t\t\tif (AnimationUtils.isTypedArray(values)) {\n\t\t\t\t\tfor (var _i = 0, n = values.length; _i !== n; ++_i) {\n\t\t\t\t\t\tvar value = values[_i];\n\n\t\t\t\t\t\tif (isNaN(value)) {\n\t\t\t\t\t\t\tconsole.error('THREE.KeyframeTrack: Value is not a valid number.', this, _i, value);\n\t\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn valid;\n\t\t},\n\t\t// removes equivalent sequential keys as common in morph target sequences\n\t\t// (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)\n\t\toptimize: function optimize() {\n\t\t\t// times or values may be shared with other tracks, so overwriting is unsafe\n\t\t\tvar times = AnimationUtils.arraySlice(this.times),\n\t\t\t\t\tvalues = AnimationUtils.arraySlice(this.values),\n\t\t\t\t\tstride = this.getValueSize(),\n\t\t\t\t\tsmoothInterpolation = this.getInterpolation() === InterpolateSmooth,\n\t\t\t\t\tlastIndex = times.length - 1;\n\t\t\tvar writeIndex = 1;\n\n\t\t\tfor (var i = 1; i < lastIndex; ++i) {\n\t\t\t\tvar keep = false;\n\t\t\t\tvar time = times[i];\n\t\t\t\tvar timeNext = times[i + 1]; // remove adjacent keyframes scheduled at the same time\n\n\t\t\t\tif (time !== timeNext && (i !== 1 || time !== times[0])) {\n\t\t\t\t\tif (!smoothInterpolation) {\n\t\t\t\t\t\t// remove unnecessary keyframes same as their neighbors\n\t\t\t\t\t\tvar offset = i * stride,\n\t\t\t\t\t\t\t\toffsetP = offset - stride,\n\t\t\t\t\t\t\t\toffsetN = offset + stride;\n\n\t\t\t\t\t\tfor (var j = 0; j !== stride; ++j) {\n\t\t\t\t\t\t\tvar value = values[offset + j];\n\n\t\t\t\t\t\t\tif (value !== values[offsetP + j] || value !== values[offsetN + j]) {\n\t\t\t\t\t\t\t\tkeep = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tkeep = true;\n\t\t\t\t\t}\n\t\t\t\t} // in-place compaction\n\n\n\t\t\t\tif (keep) {\n\t\t\t\t\tif (i !== writeIndex) {\n\t\t\t\t\t\ttimes[writeIndex] = times[i];\n\t\t\t\t\t\tvar readOffset = i * stride,\n\t\t\t\t\t\t\t\twriteOffset = writeIndex * stride;\n\n\t\t\t\t\t\tfor (var _j = 0; _j !== stride; ++_j) {\n\t\t\t\t\t\t\tvalues[writeOffset + _j] = values[readOffset + _j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t++writeIndex;\n\t\t\t\t}\n\t\t\t} // flush last keyframe (compaction looks ahead)\n\n\n\t\t\tif (lastIndex > 0) {\n\t\t\t\ttimes[writeIndex] = times[lastIndex];\n\n\t\t\t\tfor (var _readOffset = lastIndex * stride, _writeOffset = writeIndex * stride, _j2 = 0; _j2 !== stride; ++_j2) {\n\t\t\t\t\tvalues[_writeOffset + _j2] = values[_readOffset + _j2];\n\t\t\t\t}\n\n\t\t\t\t++writeIndex;\n\t\t\t}\n\n\t\t\tif (writeIndex !== times.length) {\n\t\t\t\tthis.times = AnimationUtils.arraySlice(times, 0, writeIndex);\n\t\t\t\tthis.values = AnimationUtils.arraySlice(values, 0, writeIndex * stride);\n\t\t\t} else {\n\t\t\t\tthis.times = times;\n\t\t\t\tthis.values = values;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\tvar times = AnimationUtils.arraySlice(this.times, 0);\n\t\t\tvar values = AnimationUtils.arraySlice(this.values, 0);\n\t\t\tvar TypedKeyframeTrack = this.constructor;\n\t\t\tvar track = new TypedKeyframeTrack(this.name, times, values); // Interpolant argument to constructor is not saved, so copy the factory method directly.\n\n\t\t\ttrack.createInterpolant = this.createInterpolant;\n\t\t\treturn track;\n\t\t}\n\t});\n\n\t/**\n\t * A Track of Boolean keyframe values.\n\t */\n\n\tfunction BooleanKeyframeTrack(name, times, values) {\n\t\tKeyframeTrack.call(this, name, times, values);\n\t}\n\n\tBooleanKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: BooleanKeyframeTrack,\n\t\tValueTypeName: 'bool',\n\t\tValueBufferType: Array,\n\t\tDefaultInterpolation: InterpolateDiscrete,\n\t\tInterpolantFactoryMethodLinear: undefined,\n\t\tInterpolantFactoryMethodSmooth: undefined // Note: Actually this track could have a optimized / compressed\n\t\t// representation of a single value and a custom interpolant that\n\t\t// computes \"firstValue ^ isOdd( index )\".\n\n\t});\n\n\t/**\n\t * A Track of keyframe values that represent color.\n\t */\n\n\tfunction ColorKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tColorKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: ColorKeyframeTrack,\n\t\tValueTypeName: 'color' // ValueBufferType is inherited\n\t\t// DefaultInterpolation is inherited\n\t\t// Note: Very basic implementation and nothing special yet.\n\t\t// However, this is the place for color space parameterization.\n\n\t});\n\n\t/**\n\t * A Track of numeric keyframe values.\n\t */\n\n\tfunction NumberKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tNumberKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: NumberKeyframeTrack,\n\t\tValueTypeName: 'number' // ValueBufferType is inherited\n\t\t// DefaultInterpolation is inherited\n\n\t});\n\n\t/**\n\t * Spherical linear unit quaternion interpolant.\n\t */\n\n\tfunction QuaternionLinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tInterpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer);\n\t}\n\n\tQuaternionLinearInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), {\n\t\tconstructor: QuaternionLinearInterpolant,\n\t\tinterpolate_: function interpolate_(i1, t0, t, t1) {\n\t\t\tvar result = this.resultBuffer,\n\t\t\t\t\tvalues = this.sampleValues,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\talpha = (t - t0) / (t1 - t0);\n\t\t\tvar offset = i1 * stride;\n\n\t\t\tfor (var end = offset + stride; offset !== end; offset += 4) {\n\t\t\t\tQuaternion.slerpFlat(result, 0, values, offset - stride, values, offset, alpha);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t});\n\n\t/**\n\t * A Track of quaternion keyframe values.\n\t */\n\n\tfunction QuaternionKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tQuaternionKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: QuaternionKeyframeTrack,\n\t\tValueTypeName: 'quaternion',\n\t\t// ValueBufferType is inherited\n\t\tDefaultInterpolation: InterpolateLinear,\n\t\tInterpolantFactoryMethodLinear: function InterpolantFactoryMethodLinear(result) {\n\t\t\treturn new QuaternionLinearInterpolant(this.times, this.values, this.getValueSize(), result);\n\t\t},\n\t\tInterpolantFactoryMethodSmooth: undefined // not yet implemented\n\n\t});\n\n\t/**\n\t * A Track that interpolates Strings\n\t */\n\n\tfunction StringKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tStringKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: StringKeyframeTrack,\n\t\tValueTypeName: 'string',\n\t\tValueBufferType: Array,\n\t\tDefaultInterpolation: InterpolateDiscrete,\n\t\tInterpolantFactoryMethodLinear: undefined,\n\t\tInterpolantFactoryMethodSmooth: undefined\n\t});\n\n\t/**\n\t * A Track of vectored keyframe values.\n\t */\n\n\tfunction VectorKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tVectorKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: VectorKeyframeTrack,\n\t\tValueTypeName: 'vector' // ValueBufferType is inherited\n\t\t// DefaultInterpolation is inherited\n\n\t});\n\n\tfunction AnimationClip(name, duration, tracks, blendMode) {\n\t\tif (duration === void 0) {\n\t\t\tduration = -1;\n\t\t}\n\n\t\tif (blendMode === void 0) {\n\t\t\tblendMode = NormalAnimationBlendMode;\n\t\t}\n\n\t\tthis.name = name;\n\t\tthis.tracks = tracks;\n\t\tthis.duration = duration;\n\t\tthis.blendMode = blendMode;\n\t\tthis.uuid = MathUtils.generateUUID(); // this means it should figure out its duration by scanning the tracks\n\n\t\tif (this.duration < 0) {\n\t\t\tthis.resetDuration();\n\t\t}\n\t}\n\n\tfunction getTrackTypeForValueTypeName(typeName) {\n\t\tswitch (typeName.toLowerCase()) {\n\t\t\tcase 'scalar':\n\t\t\tcase 'double':\n\t\t\tcase 'float':\n\t\t\tcase 'number':\n\t\t\tcase 'integer':\n\t\t\t\treturn NumberKeyframeTrack;\n\n\t\t\tcase 'vector':\n\t\t\tcase 'vector2':\n\t\t\tcase 'vector3':\n\t\t\tcase 'vector4':\n\t\t\t\treturn VectorKeyframeTrack;\n\n\t\t\tcase 'color':\n\t\t\t\treturn ColorKeyframeTrack;\n\n\t\t\tcase 'quaternion':\n\t\t\t\treturn QuaternionKeyframeTrack;\n\n\t\t\tcase 'bool':\n\t\t\tcase 'boolean':\n\t\t\t\treturn BooleanKeyframeTrack;\n\n\t\t\tcase 'string':\n\t\t\t\treturn StringKeyframeTrack;\n\t\t}\n\n\t\tthrow new Error('THREE.KeyframeTrack: Unsupported typeName: ' + typeName);\n\t}\n\n\tfunction parseKeyframeTrack(json) {\n\t\tif (json.type === undefined) {\n\t\t\tthrow new Error('THREE.KeyframeTrack: track type undefined, can not parse');\n\t\t}\n\n\t\tvar trackType = getTrackTypeForValueTypeName(json.type);\n\n\t\tif (json.times === undefined) {\n\t\t\tvar times = [],\n\t\t\t\t\tvalues = [];\n\t\t\tAnimationUtils.flattenJSON(json.keys, times, values, 'value');\n\t\t\tjson.times = times;\n\t\t\tjson.values = values;\n\t\t} // derived classes can define a static parse method\n\n\n\t\tif (trackType.parse !== undefined) {\n\t\t\treturn trackType.parse(json);\n\t\t} else {\n\t\t\t// by default, we assume a constructor compatible with the base\n\t\t\treturn new trackType(json.name, json.times, json.values, json.interpolation);\n\t\t}\n\t}\n\n\tObject.assign(AnimationClip, {\n\t\tparse: function parse(json) {\n\t\t\tvar tracks = [],\n\t\t\t\t\tjsonTracks = json.tracks,\n\t\t\t\t\tframeTime = 1.0 / (json.fps || 1.0);\n\n\t\t\tfor (var i = 0, n = jsonTracks.length; i !== n; ++i) {\n\t\t\t\ttracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime));\n\t\t\t}\n\n\t\t\tvar clip = new AnimationClip(json.name, json.duration, tracks, json.blendMode);\n\t\t\tclip.uuid = json.uuid;\n\t\t\treturn clip;\n\t\t},\n\t\ttoJSON: function toJSON(clip) {\n\t\t\tvar tracks = [],\n\t\t\t\t\tclipTracks = clip.tracks;\n\t\t\tvar json = {\n\t\t\t\t'name': clip.name,\n\t\t\t\t'duration': clip.duration,\n\t\t\t\t'tracks': tracks,\n\t\t\t\t'uuid': clip.uuid,\n\t\t\t\t'blendMode': clip.blendMode\n\t\t\t};\n\n\t\t\tfor (var i = 0, n = clipTracks.length; i !== n; ++i) {\n\t\t\t\ttracks.push(KeyframeTrack.toJSON(clipTracks[i]));\n\t\t\t}\n\n\t\t\treturn json;\n\t\t},\n\t\tCreateFromMorphTargetSequence: function CreateFromMorphTargetSequence(name, morphTargetSequence, fps, noLoop) {\n\t\t\tvar numMorphTargets = morphTargetSequence.length;\n\t\t\tvar tracks = [];\n\n\t\t\tfor (var i = 0; i < numMorphTargets; i++) {\n\t\t\t\tvar times = [];\n\t\t\t\tvar values = [];\n\t\t\t\ttimes.push((i + numMorphTargets - 1) % numMorphTargets, i, (i + 1) % numMorphTargets);\n\t\t\t\tvalues.push(0, 1, 0);\n\t\t\t\tvar order = AnimationUtils.getKeyframeOrder(times);\n\t\t\t\ttimes = AnimationUtils.sortedArray(times, 1, order);\n\t\t\t\tvalues = AnimationUtils.sortedArray(values, 1, order); // if there is a key at the first frame, duplicate it as the\n\t\t\t\t// last frame as well for perfect loop.\n\n\t\t\t\tif (!noLoop && times[0] === 0) {\n\t\t\t\t\ttimes.push(numMorphTargets);\n\t\t\t\t\tvalues.push(values[0]);\n\t\t\t\t}\n\n\t\t\t\ttracks.push(new NumberKeyframeTrack('.morphTargetInfluences[' + morphTargetSequence[i].name + ']', times, values).scale(1.0 / fps));\n\t\t\t}\n\n\t\t\treturn new AnimationClip(name, -1, tracks);\n\t\t},\n\t\tfindByName: function findByName(objectOrClipArray, name) {\n\t\t\tvar clipArray = objectOrClipArray;\n\n\t\t\tif (!Array.isArray(objectOrClipArray)) {\n\t\t\t\tvar o = objectOrClipArray;\n\t\t\t\tclipArray = o.geometry && o.geometry.animations || o.animations;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < clipArray.length; i++) {\n\t\t\t\tif (clipArray[i].name === name) {\n\t\t\t\t\treturn clipArray[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\tCreateClipsFromMorphTargetSequences: function CreateClipsFromMorphTargetSequences(morphTargets, fps, noLoop) {\n\t\t\tvar animationToMorphTargets = {}; // tested with https://regex101.com/ on trick sequences\n\t\t\t// such flamingo_flyA_003, flamingo_run1_003, crdeath0059\n\n\t\t\tvar pattern = /^([\\w-]*?)([\\d]+)$/; // sort morph target names into animation groups based\n\t\t\t// patterns like Walk_001, Walk_002, Run_001, Run_002\n\n\t\t\tfor (var i = 0, il = morphTargets.length; i < il; i++) {\n\t\t\t\tvar morphTarget = morphTargets[i];\n\t\t\t\tvar parts = morphTarget.name.match(pattern);\n\n\t\t\t\tif (parts && parts.length > 1) {\n\t\t\t\t\tvar name = parts[1];\n\t\t\t\t\tvar animationMorphTargets = animationToMorphTargets[name];\n\n\t\t\t\t\tif (!animationMorphTargets) {\n\t\t\t\t\t\tanimationToMorphTargets[name] = animationMorphTargets = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tanimationMorphTargets.push(morphTarget);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar clips = [];\n\n\t\t\tfor (var _name in animationToMorphTargets) {\n\t\t\t\tclips.push(AnimationClip.CreateFromMorphTargetSequence(_name, animationToMorphTargets[_name], fps, noLoop));\n\t\t\t}\n\n\t\t\treturn clips;\n\t\t},\n\t\t// parse the animation.hierarchy format\n\t\tparseAnimation: function parseAnimation(animation, bones) {\n\t\t\tif (!animation) {\n\t\t\t\tconsole.error('THREE.AnimationClip: No animation in JSONLoader data.');\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar addNonemptyTrack = function addNonemptyTrack(trackType, trackName, animationKeys, propertyName, destTracks) {\n\t\t\t\t// only return track if there are actually keys.\n\t\t\t\tif (animationKeys.length !== 0) {\n\t\t\t\t\tvar times = [];\n\t\t\t\t\tvar values = [];\n\t\t\t\t\tAnimationUtils.flattenJSON(animationKeys, times, values, propertyName); // empty keys are filtered out, so check again\n\n\t\t\t\t\tif (times.length !== 0) {\n\t\t\t\t\t\tdestTracks.push(new trackType(trackName, times, values));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvar tracks = [];\n\t\t\tvar clipName = animation.name || 'default';\n\t\t\tvar fps = animation.fps || 30;\n\t\t\tvar blendMode = animation.blendMode; // automatic length determination in AnimationClip.\n\n\t\t\tvar duration = animation.length || -1;\n\t\t\tvar hierarchyTracks = animation.hierarchy || [];\n\n\t\t\tfor (var h = 0; h < hierarchyTracks.length; h++) {\n\t\t\t\tvar animationKeys = hierarchyTracks[h].keys; // skip empty tracks\n\n\t\t\t\tif (!animationKeys || animationKeys.length === 0) continue; // process morph targets\n\n\t\t\t\tif (animationKeys[0].morphTargets) {\n\t\t\t\t\t// figure out all morph targets used in this track\n\t\t\t\t\tvar morphTargetNames = {};\n\t\t\t\t\tvar k = void 0;\n\n\t\t\t\t\tfor (k = 0; k < animationKeys.length; k++) {\n\t\t\t\t\t\tif (animationKeys[k].morphTargets) {\n\t\t\t\t\t\t\tfor (var m = 0; m < animationKeys[k].morphTargets.length; m++) {\n\t\t\t\t\t\t\t\tmorphTargetNames[animationKeys[k].morphTargets[m]] = -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} // create a track for each morph target with all zero\n\t\t\t\t\t// morphTargetInfluences except for the keys in which\n\t\t\t\t\t// the morphTarget is named.\n\n\n\t\t\t\t\tfor (var morphTargetName in morphTargetNames) {\n\t\t\t\t\t\tvar times = [];\n\t\t\t\t\t\tvar values = [];\n\n\t\t\t\t\t\tfor (var _m = 0; _m !== animationKeys[k].morphTargets.length; ++_m) {\n\t\t\t\t\t\t\tvar animationKey = animationKeys[k];\n\t\t\t\t\t\t\ttimes.push(animationKey.time);\n\t\t\t\t\t\t\tvalues.push(animationKey.morphTarget === morphTargetName ? 1 : 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttracks.push(new NumberKeyframeTrack('.morphTargetInfluence[' + morphTargetName + ']', times, values));\n\t\t\t\t\t}\n\n\t\t\t\t\tduration = morphTargetNames.length * (fps || 1.0);\n\t\t\t\t} else {\n\t\t\t\t\t// ...assume skeletal animation\n\t\t\t\t\tvar boneName = '.bones[' + bones[h].name + ']';\n\t\t\t\t\taddNonemptyTrack(VectorKeyframeTrack, boneName + '.position', animationKeys, 'pos', tracks);\n\t\t\t\t\taddNonemptyTrack(QuaternionKeyframeTrack, boneName + '.quaternion', animationKeys, 'rot', tracks);\n\t\t\t\t\taddNonemptyTrack(VectorKeyframeTrack, boneName + '.scale', animationKeys, 'scl', tracks);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tracks.length === 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar clip = new AnimationClip(clipName, duration, tracks, blendMode);\n\t\t\treturn clip;\n\t\t}\n\t});\n\tObject.assign(AnimationClip.prototype, {\n\t\tresetDuration: function resetDuration() {\n\t\t\tvar tracks = this.tracks;\n\t\t\tvar duration = 0;\n\n\t\t\tfor (var i = 0, n = tracks.length; i !== n; ++i) {\n\t\t\t\tvar track = this.tracks[i];\n\t\t\t\tduration = Math.max(duration, track.times[track.times.length - 1]);\n\t\t\t}\n\n\t\t\tthis.duration = duration;\n\t\t\treturn this;\n\t\t},\n\t\ttrim: function trim() {\n\t\t\tfor (var i = 0; i < this.tracks.length; i++) {\n\t\t\t\tthis.tracks[i].trim(0, this.duration);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tvalidate: function validate() {\n\t\t\tvar valid = true;\n\n\t\t\tfor (var i = 0; i < this.tracks.length; i++) {\n\t\t\t\tvalid = valid && this.tracks[i].validate();\n\t\t\t}\n\n\t\t\treturn valid;\n\t\t},\n\t\toptimize: function optimize() {\n\t\t\tfor (var i = 0; i < this.tracks.length; i++) {\n\t\t\t\tthis.tracks[i].optimize();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\tvar tracks = [];\n\n\t\t\tfor (var i = 0; i < this.tracks.length; i++) {\n\t\t\t\ttracks.push(this.tracks[i].clone());\n\t\t\t}\n\n\t\t\treturn new AnimationClip(this.name, this.duration, tracks, this.blendMode);\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\treturn AnimationClip.toJSON(this);\n\t\t}\n\t});\n\n\tvar Cache = {\n\t\tenabled: false,\n\t\tfiles: {},\n\t\tadd: function add(key, file) {\n\t\t\tif (this.enabled === false) return; // console.log( 'THREE.Cache', 'Adding key:', key );\n\n\t\t\tthis.files[key] = file;\n\t\t},\n\t\tget: function get(key) {\n\t\t\tif (this.enabled === false) return; // console.log( 'THREE.Cache', 'Checking key:', key );\n\n\t\t\treturn this.files[key];\n\t\t},\n\t\tremove: function remove(key) {\n\t\t\tdelete this.files[key];\n\t\t},\n\t\tclear: function clear() {\n\t\t\tthis.files = {};\n\t\t}\n\t};\n\n\tfunction LoadingManager(onLoad, onProgress, onError) {\n\t\tvar scope = this;\n\t\tvar isLoading = false;\n\t\tvar itemsLoaded = 0;\n\t\tvar itemsTotal = 0;\n\t\tvar urlModifier = undefined;\n\t\tvar handlers = []; // Refer to #5689 for the reason why we don't set .onStart\n\t\t// in the constructor\n\n\t\tthis.onStart = undefined;\n\t\tthis.onLoad = onLoad;\n\t\tthis.onProgress = onProgress;\n\t\tthis.onError = onError;\n\n\t\tthis.itemStart = function (url) {\n\t\t\titemsTotal++;\n\n\t\t\tif (isLoading === false) {\n\t\t\t\tif (scope.onStart !== undefined) {\n\t\t\t\t\tscope.onStart(url, itemsLoaded, itemsTotal);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tisLoading = true;\n\t\t};\n\n\t\tthis.itemEnd = function (url) {\n\t\t\titemsLoaded++;\n\n\t\t\tif (scope.onProgress !== undefined) {\n\t\t\t\tscope.onProgress(url, itemsLoaded, itemsTotal);\n\t\t\t}\n\n\t\t\tif (itemsLoaded === itemsTotal) {\n\t\t\t\tisLoading = false;\n\n\t\t\t\tif (scope.onLoad !== undefined) {\n\t\t\t\t\tscope.onLoad();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.itemError = function (url) {\n\t\t\tif (scope.onError !== undefined) {\n\t\t\t\tscope.onError(url);\n\t\t\t}\n\t\t};\n\n\t\tthis.resolveURL = function (url) {\n\t\t\tif (urlModifier) {\n\t\t\t\treturn urlModifier(url);\n\t\t\t}\n\n\t\t\treturn url;\n\t\t};\n\n\t\tthis.setURLModifier = function (transform) {\n\t\t\turlModifier = transform;\n\t\t\treturn this;\n\t\t};\n\n\t\tthis.addHandler = function (regex, loader) {\n\t\t\thandlers.push(regex, loader);\n\t\t\treturn this;\n\t\t};\n\n\t\tthis.removeHandler = function (regex) {\n\t\t\tvar index = handlers.indexOf(regex);\n\n\t\t\tif (index !== -1) {\n\t\t\t\thandlers.splice(index, 2);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\tthis.getHandler = function (file) {\n\t\t\tfor (var i = 0, l = handlers.length; i < l; i += 2) {\n\t\t\t\tvar regex = handlers[i];\n\t\t\t\tvar loader = handlers[i + 1];\n\t\t\t\tif (regex.global) regex.lastIndex = 0; // see #17920\n\n\t\t\t\tif (regex.test(file)) {\n\t\t\t\t\treturn loader;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t};\n\t}\n\n\tvar DefaultLoadingManager = new LoadingManager();\n\n\tfunction Loader(manager) {\n\t\tthis.manager = manager !== undefined ? manager : DefaultLoadingManager;\n\t\tthis.crossOrigin = 'anonymous';\n\t\tthis.withCredentials = false;\n\t\tthis.path = '';\n\t\tthis.resourcePath = '';\n\t\tthis.requestHeader = {};\n\t}\n\n\tObject.assign(Loader.prototype, {\n\t\tload: function load()\n\t\t/* url, onLoad, onProgress, onError */\n\t\t{},\n\t\tloadAsync: function loadAsync(url, onProgress) {\n\t\t\tvar scope = this;\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tscope.load(url, resolve, onProgress, reject);\n\t\t\t});\n\t\t},\n\t\tparse: function parse()\n\t\t/* data */\n\t\t{},\n\t\tsetCrossOrigin: function setCrossOrigin(crossOrigin) {\n\t\t\tthis.crossOrigin = crossOrigin;\n\t\t\treturn this;\n\t\t},\n\t\tsetWithCredentials: function setWithCredentials(value) {\n\t\t\tthis.withCredentials = value;\n\t\t\treturn this;\n\t\t},\n\t\tsetPath: function setPath(path) {\n\t\t\tthis.path = path;\n\t\t\treturn this;\n\t\t},\n\t\tsetResourcePath: function setResourcePath(resourcePath) {\n\t\t\tthis.resourcePath = resourcePath;\n\t\t\treturn this;\n\t\t},\n\t\tsetRequestHeader: function setRequestHeader(requestHeader) {\n\t\t\tthis.requestHeader = requestHeader;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tvar loading = {};\n\n\tfunction FileLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tFileLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: FileLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tif (url === undefined) url = '';\n\t\t\tif (this.path !== undefined) url = this.path + url;\n\t\t\turl = this.manager.resolveURL(url);\n\t\t\tvar scope = this;\n\t\t\tvar cached = Cache.get(url);\n\n\t\t\tif (cached !== undefined) {\n\t\t\t\tscope.manager.itemStart(url);\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (onLoad) onLoad(cached);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, 0);\n\t\t\t\treturn cached;\n\t\t\t} // Check if request is duplicate\n\n\n\t\t\tif (loading[url] !== undefined) {\n\t\t\t\tloading[url].push({\n\t\t\t\t\tonLoad: onLoad,\n\t\t\t\t\tonProgress: onProgress,\n\t\t\t\t\tonError: onError\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t} // Check for data: URI\n\n\n\t\t\tvar dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/;\n\t\t\tvar dataUriRegexResult = url.match(dataUriRegex);\n\t\t\tvar request; // Safari can not handle Data URIs through XMLHttpRequest so process manually\n\n\t\t\tif (dataUriRegexResult) {\n\t\t\t\tvar mimeType = dataUriRegexResult[1];\n\t\t\t\tvar isBase64 = !!dataUriRegexResult[2];\n\t\t\t\tvar data = dataUriRegexResult[3];\n\t\t\t\tdata = decodeURIComponent(data);\n\t\t\t\tif (isBase64) data = atob(data);\n\n\t\t\t\ttry {\n\t\t\t\t\tvar response;\n\t\t\t\t\tvar responseType = (this.responseType || '').toLowerCase();\n\n\t\t\t\t\tswitch (responseType) {\n\t\t\t\t\t\tcase 'arraybuffer':\n\t\t\t\t\t\tcase 'blob':\n\t\t\t\t\t\t\tvar view = new Uint8Array(data.length);\n\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tview[i] = data.charCodeAt(i);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (responseType === 'blob') {\n\t\t\t\t\t\t\t\tresponse = new Blob([view.buffer], {\n\t\t\t\t\t\t\t\t\ttype: mimeType\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresponse = view.buffer;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'document':\n\t\t\t\t\t\t\tvar parser = new DOMParser();\n\t\t\t\t\t\t\tresponse = parser.parseFromString(data, mimeType);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'json':\n\t\t\t\t\t\t\tresponse = JSON.parse(data);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t// 'text' or other\n\t\t\t\t\t\t\tresponse = data;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t} // Wait for next browser tick like standard XMLHttpRequest event dispatching does\n\n\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tif (onLoad) onLoad(response);\n\t\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t\t}, 0);\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// Wait for next browser tick like standard XMLHttpRequest event dispatching does\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tif (onError) onError(error);\n\t\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Initialise array for duplicate requests\n\t\t\t\tloading[url] = [];\n\t\t\t\tloading[url].push({\n\t\t\t\t\tonLoad: onLoad,\n\t\t\t\t\tonProgress: onProgress,\n\t\t\t\t\tonError: onError\n\t\t\t\t});\n\t\t\t\trequest = new XMLHttpRequest();\n\t\t\t\trequest.open('GET', url, true);\n\t\t\t\trequest.addEventListener('load', function (event) {\n\t\t\t\t\tvar response = this.response;\n\t\t\t\t\tvar callbacks = loading[url];\n\t\t\t\t\tdelete loading[url];\n\n\t\t\t\t\tif (this.status === 200 || this.status === 0) {\n\t\t\t\t\t\t// Some browsers return HTTP Status 0 when using non-http protocol\n\t\t\t\t\t\t// e.g. 'file://' or 'data://'. Handle as success.\n\t\t\t\t\t\tif (this.status === 0) console.warn('THREE.FileLoader: HTTP Status 0 received.'); // Add to cache only on HTTP success, so that we do not cache\n\t\t\t\t\t\t// error response bodies as proper responses to requests.\n\n\t\t\t\t\t\tCache.add(url, response);\n\n\t\t\t\t\t\tfor (var _i = 0, il = callbacks.length; _i < il; _i++) {\n\t\t\t\t\t\t\tvar callback = callbacks[_i];\n\t\t\t\t\t\t\tif (callback.onLoad) callback.onLoad(response);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (var _i2 = 0, _il = callbacks.length; _i2 < _il; _i2++) {\n\t\t\t\t\t\t\tvar _callback = callbacks[_i2];\n\t\t\t\t\t\t\tif (_callback.onError) _callback.onError(event);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\t\t\t\trequest.addEventListener('progress', function (event) {\n\t\t\t\t\tvar callbacks = loading[url];\n\n\t\t\t\t\tfor (var _i3 = 0, il = callbacks.length; _i3 < il; _i3++) {\n\t\t\t\t\t\tvar callback = callbacks[_i3];\n\t\t\t\t\t\tif (callback.onProgress) callback.onProgress(event);\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\t\t\t\trequest.addEventListener('error', function (event) {\n\t\t\t\t\tvar callbacks = loading[url];\n\t\t\t\t\tdelete loading[url];\n\n\t\t\t\t\tfor (var _i4 = 0, il = callbacks.length; _i4 < il; _i4++) {\n\t\t\t\t\t\tvar callback = callbacks[_i4];\n\t\t\t\t\t\tif (callback.onError) callback.onError(event);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, false);\n\t\t\t\trequest.addEventListener('abort', function (event) {\n\t\t\t\t\tvar callbacks = loading[url];\n\t\t\t\t\tdelete loading[url];\n\n\t\t\t\t\tfor (var _i5 = 0, il = callbacks.length; _i5 < il; _i5++) {\n\t\t\t\t\t\tvar callback = callbacks[_i5];\n\t\t\t\t\t\tif (callback.onError) callback.onError(event);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, false);\n\t\t\t\tif (this.responseType !== undefined) request.responseType = this.responseType;\n\t\t\t\tif (this.withCredentials !== undefined) request.withCredentials = this.withCredentials;\n\t\t\t\tif (request.overrideMimeType) request.overrideMimeType(this.mimeType !== undefined ? this.mimeType : 'text/plain');\n\n\t\t\t\tfor (var header in this.requestHeader) {\n\t\t\t\t\trequest.setRequestHeader(header, this.requestHeader[header]);\n\t\t\t\t}\n\n\t\t\t\trequest.send(null);\n\t\t\t}\n\n\t\t\tscope.manager.itemStart(url);\n\t\t\treturn request;\n\t\t},\n\t\tsetResponseType: function setResponseType(value) {\n\t\t\tthis.responseType = value;\n\t\t\treturn this;\n\t\t},\n\t\tsetMimeType: function setMimeType(value) {\n\t\t\tthis.mimeType = value;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction AnimationLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tAnimationLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: AnimationLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(scope.manager);\n\t\t\tloader.setPath(scope.path);\n\t\t\tloader.setRequestHeader(scope.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\ttry {\n\t\t\t\t\tonLoad(scope.parse(JSON.parse(text)));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (onError) {\n\t\t\t\t\t\tonError(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t},\n\t\tparse: function parse(json) {\n\t\t\tvar animations = [];\n\n\t\t\tfor (var i = 0; i < json.length; i++) {\n\t\t\t\tvar clip = AnimationClip.parse(json[i]);\n\t\t\t\tanimations.push(clip);\n\t\t\t}\n\n\t\t\treturn animations;\n\t\t}\n\t});\n\n\t/**\n\t * Abstract Base class to block based textures loader (dds, pvr, ...)\n\t *\n\t * Sub classes have to implement the parse() method which will be used in load().\n\t */\n\n\tfunction CompressedTextureLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tCompressedTextureLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: CompressedTextureLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar images = [];\n\t\t\tvar texture = new CompressedTexture();\n\t\t\tvar loader = new FileLoader(this.manager);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.setResponseType('arraybuffer');\n\t\t\tloader.setRequestHeader(this.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tvar loaded = 0;\n\n\t\t\tfunction loadTexture(i) {\n\t\t\t\tloader.load(url[i], function (buffer) {\n\t\t\t\t\tvar texDatas = scope.parse(buffer, true);\n\t\t\t\t\timages[i] = {\n\t\t\t\t\t\twidth: texDatas.width,\n\t\t\t\t\t\theight: texDatas.height,\n\t\t\t\t\t\tformat: texDatas.format,\n\t\t\t\t\t\tmipmaps: texDatas.mipmaps\n\t\t\t\t\t};\n\t\t\t\t\tloaded += 1;\n\n\t\t\t\t\tif (loaded === 6) {\n\t\t\t\t\t\tif (texDatas.mipmapCount === 1) texture.minFilter = LinearFilter;\n\t\t\t\t\t\ttexture.image = images;\n\t\t\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\t\t\ttexture.needsUpdate = true;\n\t\t\t\t\t\tif (onLoad) onLoad(texture);\n\t\t\t\t\t}\n\t\t\t\t}, onProgress, onError);\n\t\t\t}\n\n\t\t\tif (Array.isArray(url)) {\n\t\t\t\tfor (var i = 0, il = url.length; i < il; ++i) {\n\t\t\t\t\tloadTexture(i);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// compressed cubemap texture stored in a single DDS file\n\t\t\t\tloader.load(url, function (buffer) {\n\t\t\t\t\tvar texDatas = scope.parse(buffer, true);\n\n\t\t\t\t\tif (texDatas.isCubemap) {\n\t\t\t\t\t\tvar faces = texDatas.mipmaps.length / texDatas.mipmapCount;\n\n\t\t\t\t\t\tfor (var f = 0; f < faces; f++) {\n\t\t\t\t\t\t\timages[f] = {\n\t\t\t\t\t\t\t\tmipmaps: []\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tfor (var _i = 0; _i < texDatas.mipmapCount; _i++) {\n\t\t\t\t\t\t\t\timages[f].mipmaps.push(texDatas.mipmaps[f * texDatas.mipmapCount + _i]);\n\t\t\t\t\t\t\t\timages[f].format = texDatas.format;\n\t\t\t\t\t\t\t\timages[f].width = texDatas.width;\n\t\t\t\t\t\t\t\timages[f].height = texDatas.height;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttexture.image = images;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttexture.image.width = texDatas.width;\n\t\t\t\t\t\ttexture.image.height = texDatas.height;\n\t\t\t\t\t\ttexture.mipmaps = texDatas.mipmaps;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (texDatas.mipmapCount === 1) {\n\t\t\t\t\t\ttexture.minFilter = LinearFilter;\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\t\ttexture.needsUpdate = true;\n\t\t\t\t\tif (onLoad) onLoad(texture);\n\t\t\t\t}, onProgress, onError);\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\t});\n\n\tfunction ImageLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tImageLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: ImageLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tif (this.path !== undefined) url = this.path + url;\n\t\t\turl = this.manager.resolveURL(url);\n\t\t\tvar scope = this;\n\t\t\tvar cached = Cache.get(url);\n\n\t\t\tif (cached !== undefined) {\n\t\t\t\tscope.manager.itemStart(url);\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (onLoad) onLoad(cached);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, 0);\n\t\t\t\treturn cached;\n\t\t\t}\n\n\t\t\tvar image = document.createElementNS('http://www.w3.org/1999/xhtml', 'img');\n\n\t\t\tfunction onImageLoad() {\n\t\t\t\timage.removeEventListener('load', onImageLoad, false);\n\t\t\t\timage.removeEventListener('error', onImageError, false);\n\t\t\t\tCache.add(url, this);\n\t\t\t\tif (onLoad) onLoad(this);\n\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t}\n\n\t\t\tfunction onImageError(event) {\n\t\t\t\timage.removeEventListener('load', onImageLoad, false);\n\t\t\t\timage.removeEventListener('error', onImageError, false);\n\t\t\t\tif (onError) onError(event);\n\t\t\t\tscope.manager.itemError(url);\n\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t}\n\n\t\t\timage.addEventListener('load', onImageLoad, false);\n\t\t\timage.addEventListener('error', onImageError, false);\n\n\t\t\tif (url.substr(0, 5) !== 'data:') {\n\t\t\t\tif (this.crossOrigin !== undefined) image.crossOrigin = this.crossOrigin;\n\t\t\t}\n\n\t\t\tscope.manager.itemStart(url);\n\t\t\timage.src = url;\n\t\t\treturn image;\n\t\t}\n\t});\n\n\tfunction CubeTextureLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tCubeTextureLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: CubeTextureLoader,\n\t\tload: function load(urls, onLoad, onProgress, onError) {\n\t\t\tvar texture = new CubeTexture();\n\t\t\tvar loader = new ImageLoader(this.manager);\n\t\t\tloader.setCrossOrigin(this.crossOrigin);\n\t\t\tloader.setPath(this.path);\n\t\t\tvar loaded = 0;\n\n\t\t\tfunction loadTexture(i) {\n\t\t\t\tloader.load(urls[i], function (image) {\n\t\t\t\t\ttexture.images[i] = image;\n\t\t\t\t\tloaded++;\n\n\t\t\t\t\tif (loaded === 6) {\n\t\t\t\t\t\ttexture.needsUpdate = true;\n\t\t\t\t\t\tif (onLoad) onLoad(texture);\n\t\t\t\t\t}\n\t\t\t\t}, undefined, onError);\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < urls.length; ++i) {\n\t\t\t\tloadTexture(i);\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\t});\n\n\t/**\n\t * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)\n\t *\n\t * Sub classes have to implement the parse() method which will be used in load().\n\t */\n\n\tfunction DataTextureLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tDataTextureLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: DataTextureLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar texture = new DataTexture();\n\t\t\tvar loader = new FileLoader(this.manager);\n\t\t\tloader.setResponseType('arraybuffer');\n\t\t\tloader.setRequestHeader(this.requestHeader);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (buffer) {\n\t\t\t\tvar texData = scope.parse(buffer);\n\t\t\t\tif (!texData) return;\n\n\t\t\t\tif (texData.image !== undefined) {\n\t\t\t\t\ttexture.image = texData.image;\n\t\t\t\t} else if (texData.data !== undefined) {\n\t\t\t\t\ttexture.image.width = texData.width;\n\t\t\t\t\ttexture.image.height = texData.height;\n\t\t\t\t\ttexture.image.data = texData.data;\n\t\t\t\t}\n\n\t\t\t\ttexture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping;\n\t\t\t\ttexture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping;\n\t\t\t\ttexture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter;\n\t\t\t\ttexture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter;\n\t\t\t\ttexture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1;\n\n\t\t\t\tif (texData.encoding !== undefined) {\n\t\t\t\t\ttexture.encoding = texData.encoding;\n\t\t\t\t}\n\n\t\t\t\tif (texData.flipY !== undefined) {\n\t\t\t\t\ttexture.flipY = texData.flipY;\n\t\t\t\t}\n\n\t\t\t\tif (texData.format !== undefined) {\n\t\t\t\t\ttexture.format = texData.format;\n\t\t\t\t}\n\n\t\t\t\tif (texData.type !== undefined) {\n\t\t\t\t\ttexture.type = texData.type;\n\t\t\t\t}\n\n\t\t\t\tif (texData.mipmaps !== undefined) {\n\t\t\t\t\ttexture.mipmaps = texData.mipmaps;\n\t\t\t\t\ttexture.minFilter = LinearMipmapLinearFilter; // presumably...\n\t\t\t\t}\n\n\t\t\t\tif (texData.mipmapCount === 1) {\n\t\t\t\t\ttexture.minFilter = LinearFilter;\n\t\t\t\t}\n\n\t\t\t\ttexture.needsUpdate = true;\n\t\t\t\tif (onLoad) onLoad(texture, texData);\n\t\t\t}, onProgress, onError);\n\t\t\treturn texture;\n\t\t}\n\t});\n\n\tfunction TextureLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tTextureLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: TextureLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar texture = new Texture();\n\t\t\tvar loader = new ImageLoader(this.manager);\n\t\t\tloader.setCrossOrigin(this.crossOrigin);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.load(url, function (image) {\n\t\t\t\ttexture.image = image; // JPEGs can't have an alpha channel, so memory can be saved by storing them as RGB.\n\n\t\t\t\tvar isJPEG = url.search(/\\.jpe?g($|\\?)/i) > 0 || url.search(/^data\\:image\\/jpeg/) === 0;\n\t\t\t\ttexture.format = isJPEG ? RGBFormat : RGBAFormat;\n\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\tif (onLoad !== undefined) {\n\t\t\t\t\tonLoad(texture);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t\treturn texture;\n\t\t}\n\t});\n\n\t/**\n\t * Extensible curve object.\n\t *\n\t * Some common of curve methods:\n\t * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget )\n\t * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget )\n\t * .getPoints(), .getSpacedPoints()\n\t * .getLength()\n\t * .updateArcLengths()\n\t *\n\t * This following curves inherit from THREE.Curve:\n\t *\n\t * -- 2D curves --\n\t * THREE.ArcCurve\n\t * THREE.CubicBezierCurve\n\t * THREE.EllipseCurve\n\t * THREE.LineCurve\n\t * THREE.QuadraticBezierCurve\n\t * THREE.SplineCurve\n\t *\n\t * -- 3D curves --\n\t * THREE.CatmullRomCurve3\n\t * THREE.CubicBezierCurve3\n\t * THREE.LineCurve3\n\t * THREE.QuadraticBezierCurve3\n\t *\n\t * A series of curves can be represented as a THREE.CurvePath.\n\t *\n\t **/\n\n\tfunction Curve() {\n\t\tthis.type = 'Curve';\n\t\tthis.arcLengthDivisions = 200;\n\t}\n\n\tObject.assign(Curve.prototype, {\n\t\t// Virtual base class method to overwrite and implement in subclasses\n\t\t//\t- t [0 .. 1]\n\t\tgetPoint: function getPoint()\n\t\t/* t, optionalTarget */\n\t\t{\n\t\t\tconsole.warn('THREE.Curve: .getPoint() not implemented.');\n\t\t\treturn null;\n\t\t},\n\t\t// Get point at relative position in curve according to arc length\n\t\t// - u [0 .. 1]\n\t\tgetPointAt: function getPointAt(u, optionalTarget) {\n\t\t\tvar t = this.getUtoTmapping(u);\n\t\t\treturn this.getPoint(t, optionalTarget);\n\t\t},\n\t\t// Get sequence of points using getPoint( t )\n\t\tgetPoints: function getPoints(divisions) {\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 5;\n\t\t\t}\n\n\t\t\tvar points = [];\n\n\t\t\tfor (var d = 0; d <= divisions; d++) {\n\t\t\t\tpoints.push(this.getPoint(d / divisions));\n\t\t\t}\n\n\t\t\treturn points;\n\t\t},\n\t\t// Get sequence of points using getPointAt( u )\n\t\tgetSpacedPoints: function getSpacedPoints(divisions) {\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 5;\n\t\t\t}\n\n\t\t\tvar points = [];\n\n\t\t\tfor (var d = 0; d <= divisions; d++) {\n\t\t\t\tpoints.push(this.getPointAt(d / divisions));\n\t\t\t}\n\n\t\t\treturn points;\n\t\t},\n\t\t// Get total curve arc length\n\t\tgetLength: function getLength() {\n\t\t\tvar lengths = this.getLengths();\n\t\t\treturn lengths[lengths.length - 1];\n\t\t},\n\t\t// Get list of cumulative segment lengths\n\t\tgetLengths: function getLengths(divisions) {\n\t\t\tif (divisions === undefined) divisions = this.arcLengthDivisions;\n\n\t\t\tif (this.cacheArcLengths && this.cacheArcLengths.length === divisions + 1 && !this.needsUpdate) {\n\t\t\t\treturn this.cacheArcLengths;\n\t\t\t}\n\n\t\t\tthis.needsUpdate = false;\n\t\t\tvar cache = [];\n\t\t\tvar current,\n\t\t\t\t\tlast = this.getPoint(0);\n\t\t\tvar sum = 0;\n\t\t\tcache.push(0);\n\n\t\t\tfor (var p = 1; p <= divisions; p++) {\n\t\t\t\tcurrent = this.getPoint(p / divisions);\n\t\t\t\tsum += current.distanceTo(last);\n\t\t\t\tcache.push(sum);\n\t\t\t\tlast = current;\n\t\t\t}\n\n\t\t\tthis.cacheArcLengths = cache;\n\t\t\treturn cache; // { sums: cache, sum: sum }; Sum is in the last element.\n\t\t},\n\t\tupdateArcLengths: function updateArcLengths() {\n\t\t\tthis.needsUpdate = true;\n\t\t\tthis.getLengths();\n\t\t},\n\t\t// Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\n\t\tgetUtoTmapping: function getUtoTmapping(u, distance) {\n\t\t\tvar arcLengths = this.getLengths();\n\t\t\tvar i = 0;\n\t\t\tvar il = arcLengths.length;\n\t\t\tvar targetArcLength; // The targeted u distance value to get\n\n\t\t\tif (distance) {\n\t\t\t\ttargetArcLength = distance;\n\t\t\t} else {\n\t\t\t\ttargetArcLength = u * arcLengths[il - 1];\n\t\t\t} // binary search for the index with largest value smaller than target u distance\n\n\n\t\t\tvar low = 0,\n\t\t\t\t\thigh = il - 1,\n\t\t\t\t\tcomparison;\n\n\t\t\twhile (low <= high) {\n\t\t\t\ti = Math.floor(low + (high - low) / 2); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n\n\t\t\t\tcomparison = arcLengths[i] - targetArcLength;\n\n\t\t\t\tif (comparison < 0) {\n\t\t\t\t\tlow = i + 1;\n\t\t\t\t} else if (comparison > 0) {\n\t\t\t\t\thigh = i - 1;\n\t\t\t\t} else {\n\t\t\t\t\thigh = i;\n\t\t\t\t\tbreak; // DONE\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ti = high;\n\n\t\t\tif (arcLengths[i] === targetArcLength) {\n\t\t\t\treturn i / (il - 1);\n\t\t\t} // we could get finer grain at lengths, or use simple interpolation between two points\n\n\n\t\t\tvar lengthBefore = arcLengths[i];\n\t\t\tvar lengthAfter = arcLengths[i + 1];\n\t\t\tvar segmentLength = lengthAfter - lengthBefore; // determine where we are between the 'before' and 'after' points\n\n\t\t\tvar segmentFraction = (targetArcLength - lengthBefore) / segmentLength; // add that fractional amount to t\n\n\t\t\tvar t = (i + segmentFraction) / (il - 1);\n\t\t\treturn t;\n\t\t},\n\t\t// Returns a unit vector tangent at t\n\t\t// In case any sub curve does not implement its tangent derivation,\n\t\t// 2 points a small delta apart will be used to find its gradient\n\t\t// which seems to give a reasonable approximation\n\t\tgetTangent: function getTangent(t, optionalTarget) {\n\t\t\tvar delta = 0.0001;\n\t\t\tvar t1 = t - delta;\n\t\t\tvar t2 = t + delta; // Capping in case of danger\n\n\t\t\tif (t1 < 0) t1 = 0;\n\t\t\tif (t2 > 1) t2 = 1;\n\t\t\tvar pt1 = this.getPoint(t1);\n\t\t\tvar pt2 = this.getPoint(t2);\n\t\t\tvar tangent = optionalTarget || (pt1.isVector2 ? new Vector2() : new Vector3());\n\t\t\ttangent.copy(pt2).sub(pt1).normalize();\n\t\t\treturn tangent;\n\t\t},\n\t\tgetTangentAt: function getTangentAt(u, optionalTarget) {\n\t\t\tvar t = this.getUtoTmapping(u);\n\t\t\treturn this.getTangent(t, optionalTarget);\n\t\t},\n\t\tcomputeFrenetFrames: function computeFrenetFrames(segments, closed) {\n\t\t\t// see http://www.cs.indiana.edu/pub/techreports/TR425.pdf\n\t\t\tvar normal = new Vector3();\n\t\t\tvar tangents = [];\n\t\t\tvar normals = [];\n\t\t\tvar binormals = [];\n\t\t\tvar vec = new Vector3();\n\t\t\tvar mat = new Matrix4(); // compute the tangent vectors for each segment on the curve\n\n\t\t\tfor (var i = 0; i <= segments; i++) {\n\t\t\t\tvar u = i / segments;\n\t\t\t\ttangents[i] = this.getTangentAt(u, new Vector3());\n\t\t\t\ttangents[i].normalize();\n\t\t\t} // select an initial normal vector perpendicular to the first tangent vector,\n\t\t\t// and in the direction of the minimum tangent xyz component\n\n\n\t\t\tnormals[0] = new Vector3();\n\t\t\tbinormals[0] = new Vector3();\n\t\t\tvar min = Number.MAX_VALUE;\n\t\t\tvar tx = Math.abs(tangents[0].x);\n\t\t\tvar ty = Math.abs(tangents[0].y);\n\t\t\tvar tz = Math.abs(tangents[0].z);\n\n\t\t\tif (tx <= min) {\n\t\t\t\tmin = tx;\n\t\t\t\tnormal.set(1, 0, 0);\n\t\t\t}\n\n\t\t\tif (ty <= min) {\n\t\t\t\tmin = ty;\n\t\t\t\tnormal.set(0, 1, 0);\n\t\t\t}\n\n\t\t\tif (tz <= min) {\n\t\t\t\tnormal.set(0, 0, 1);\n\t\t\t}\n\n\t\t\tvec.crossVectors(tangents[0], normal).normalize();\n\t\t\tnormals[0].crossVectors(tangents[0], vec);\n\t\t\tbinormals[0].crossVectors(tangents[0], normals[0]); // compute the slowly-varying normal and binormal vectors for each segment on the curve\n\n\t\t\tfor (var _i = 1; _i <= segments; _i++) {\n\t\t\t\tnormals[_i] = normals[_i - 1].clone();\n\t\t\t\tbinormals[_i] = binormals[_i - 1].clone();\n\t\t\t\tvec.crossVectors(tangents[_i - 1], tangents[_i]);\n\n\t\t\t\tif (vec.length() > Number.EPSILON) {\n\t\t\t\t\tvec.normalize();\n\t\t\t\t\tvar theta = Math.acos(MathUtils.clamp(tangents[_i - 1].dot(tangents[_i]), -1, 1)); // clamp for floating pt errors\n\n\t\t\t\t\tnormals[_i].applyMatrix4(mat.makeRotationAxis(vec, theta));\n\t\t\t\t}\n\n\t\t\t\tbinormals[_i].crossVectors(tangents[_i], normals[_i]);\n\t\t\t} // if the curve is closed, postprocess the vectors so the first and last normal vectors are the same\n\n\n\t\t\tif (closed === true) {\n\t\t\t\tvar _theta = Math.acos(MathUtils.clamp(normals[0].dot(normals[segments]), -1, 1));\n\n\t\t\t\t_theta /= segments;\n\n\t\t\t\tif (tangents[0].dot(vec.crossVectors(normals[0], normals[segments])) > 0) {\n\t\t\t\t\t_theta = -_theta;\n\t\t\t\t}\n\n\t\t\t\tfor (var _i2 = 1; _i2 <= segments; _i2++) {\n\t\t\t\t\t// twist a little...\n\t\t\t\t\tnormals[_i2].applyMatrix4(mat.makeRotationAxis(tangents[_i2], _theta * _i2));\n\n\t\t\t\t\tbinormals[_i2].crossVectors(tangents[_i2], normals[_i2]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttangents: tangents,\n\t\t\t\tnormals: normals,\n\t\t\t\tbinormals: binormals\n\t\t\t};\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.arcLengthDivisions = source.arcLengthDivisions;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Curve',\n\t\t\t\t\tgenerator: 'Curve.toJSON'\n\t\t\t\t}\n\t\t\t};\n\t\t\tdata.arcLengthDivisions = this.arcLengthDivisions;\n\t\t\tdata.type = this.type;\n\t\t\treturn data;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tthis.arcLengthDivisions = json.arcLengthDivisions;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction EllipseCurve(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n\t\tCurve.call(this);\n\t\tthis.type = 'EllipseCurve';\n\t\tthis.aX = aX || 0;\n\t\tthis.aY = aY || 0;\n\t\tthis.xRadius = xRadius || 1;\n\t\tthis.yRadius = yRadius || 1;\n\t\tthis.aStartAngle = aStartAngle || 0;\n\t\tthis.aEndAngle = aEndAngle || 2 * Math.PI;\n\t\tthis.aClockwise = aClockwise || false;\n\t\tthis.aRotation = aRotation || 0;\n\t}\n\n\tEllipseCurve.prototype = Object.create(Curve.prototype);\n\tEllipseCurve.prototype.constructor = EllipseCurve;\n\tEllipseCurve.prototype.isEllipseCurve = true;\n\n\tEllipseCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tvar point = optionalTarget || new Vector2();\n\t\tvar twoPi = Math.PI * 2;\n\t\tvar deltaAngle = this.aEndAngle - this.aStartAngle;\n\t\tvar samePoints = Math.abs(deltaAngle) < Number.EPSILON; // ensures that deltaAngle is 0 .. 2 PI\n\n\t\twhile (deltaAngle < 0) {\n\t\t\tdeltaAngle += twoPi;\n\t\t}\n\n\t\twhile (deltaAngle > twoPi) {\n\t\t\tdeltaAngle -= twoPi;\n\t\t}\n\n\t\tif (deltaAngle < Number.EPSILON) {\n\t\t\tif (samePoints) {\n\t\t\t\tdeltaAngle = 0;\n\t\t\t} else {\n\t\t\t\tdeltaAngle = twoPi;\n\t\t\t}\n\t\t}\n\n\t\tif (this.aClockwise === true && !samePoints) {\n\t\t\tif (deltaAngle === twoPi) {\n\t\t\t\tdeltaAngle = -twoPi;\n\t\t\t} else {\n\t\t\t\tdeltaAngle = deltaAngle - twoPi;\n\t\t\t}\n\t\t}\n\n\t\tvar angle = this.aStartAngle + t * deltaAngle;\n\t\tvar x = this.aX + this.xRadius * Math.cos(angle);\n\t\tvar y = this.aY + this.yRadius * Math.sin(angle);\n\n\t\tif (this.aRotation !== 0) {\n\t\t\tvar cos = Math.cos(this.aRotation);\n\t\t\tvar sin = Math.sin(this.aRotation);\n\t\t\tvar tx = x - this.aX;\n\t\t\tvar ty = y - this.aY; // Rotate the point about the center of the ellipse.\n\n\t\t\tx = tx * cos - ty * sin + this.aX;\n\t\t\ty = tx * sin + ty * cos + this.aY;\n\t\t}\n\n\t\treturn point.set(x, y);\n\t};\n\n\tEllipseCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.aX = source.aX;\n\t\tthis.aY = source.aY;\n\t\tthis.xRadius = source.xRadius;\n\t\tthis.yRadius = source.yRadius;\n\t\tthis.aStartAngle = source.aStartAngle;\n\t\tthis.aEndAngle = source.aEndAngle;\n\t\tthis.aClockwise = source.aClockwise;\n\t\tthis.aRotation = source.aRotation;\n\t\treturn this;\n\t};\n\n\tEllipseCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.aX = this.aX;\n\t\tdata.aY = this.aY;\n\t\tdata.xRadius = this.xRadius;\n\t\tdata.yRadius = this.yRadius;\n\t\tdata.aStartAngle = this.aStartAngle;\n\t\tdata.aEndAngle = this.aEndAngle;\n\t\tdata.aClockwise = this.aClockwise;\n\t\tdata.aRotation = this.aRotation;\n\t\treturn data;\n\t};\n\n\tEllipseCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.aX = json.aX;\n\t\tthis.aY = json.aY;\n\t\tthis.xRadius = json.xRadius;\n\t\tthis.yRadius = json.yRadius;\n\t\tthis.aStartAngle = json.aStartAngle;\n\t\tthis.aEndAngle = json.aEndAngle;\n\t\tthis.aClockwise = json.aClockwise;\n\t\tthis.aRotation = json.aRotation;\n\t\treturn this;\n\t};\n\n\tfunction ArcCurve(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n\t\tEllipseCurve.call(this, aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);\n\t\tthis.type = 'ArcCurve';\n\t}\n\n\tArcCurve.prototype = Object.create(EllipseCurve.prototype);\n\tArcCurve.prototype.constructor = ArcCurve;\n\tArcCurve.prototype.isArcCurve = true;\n\n\t/**\n\t * Centripetal CatmullRom Curve - which is useful for avoiding\n\t * cusps and self-intersections in non-uniform catmull rom curves.\n\t * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\n\t *\n\t * curve.type accepts centripetal(default), chordal and catmullrom\n\t * curve.tension is used for catmullrom which defaults to 0.5\n\t */\n\n\t/*\n\tBased on an optimized c++ solution in\n\t - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/\n\t - http://ideone.com/NoEbVM\n\n\tThis CubicPoly class could be used for reusing some variables and calculations,\n\tbut for three.js curve use, it could be possible inlined and flatten into a single function call\n\twhich can be placed in CurveUtils.\n\t*/\n\n\tfunction CubicPoly() {\n\t\tvar c0 = 0,\n\t\t\t\tc1 = 0,\n\t\t\t\tc2 = 0,\n\t\t\t\tc3 = 0;\n\t\t/*\n\t\t * Compute coefficients for a cubic polynomial\n\t\t *\t p(s) = c0 + c1*s + c2*s^2 + c3*s^3\n\t\t * such that\n\t\t *\t p(0) = x0, p(1) = x1\n\t\t *\tand\n\t\t *\t p'(0) = t0, p'(1) = t1.\n\t\t */\n\n\t\tfunction init(x0, x1, t0, t1) {\n\t\t\tc0 = x0;\n\t\t\tc1 = t0;\n\t\t\tc2 = -3 * x0 + 3 * x1 - 2 * t0 - t1;\n\t\t\tc3 = 2 * x0 - 2 * x1 + t0 + t1;\n\t\t}\n\n\t\treturn {\n\t\t\tinitCatmullRom: function initCatmullRom(x0, x1, x2, x3, tension) {\n\t\t\t\tinit(x1, x2, tension * (x2 - x0), tension * (x3 - x1));\n\t\t\t},\n\t\t\tinitNonuniformCatmullRom: function initNonuniformCatmullRom(x0, x1, x2, x3, dt0, dt1, dt2) {\n\t\t\t\t// compute tangents when parameterized in [t1,t2]\n\t\t\t\tvar t1 = (x1 - x0) / dt0 - (x2 - x0) / (dt0 + dt1) + (x2 - x1) / dt1;\n\t\t\t\tvar t2 = (x2 - x1) / dt1 - (x3 - x1) / (dt1 + dt2) + (x3 - x2) / dt2; // rescale tangents for parametrization in [0,1]\n\n\t\t\t\tt1 *= dt1;\n\t\t\t\tt2 *= dt1;\n\t\t\t\tinit(x1, x2, t1, t2);\n\t\t\t},\n\t\t\tcalc: function calc(t) {\n\t\t\t\tvar t2 = t * t;\n\t\t\t\tvar t3 = t2 * t;\n\t\t\t\treturn c0 + c1 * t + c2 * t2 + c3 * t3;\n\t\t\t}\n\t\t};\n\t} //\n\n\n\tvar tmp = new Vector3();\n\tvar px = new CubicPoly(),\n\t\t\tpy = new CubicPoly(),\n\t\t\tpz = new CubicPoly();\n\n\tfunction CatmullRomCurve3(points, closed, curveType, tension) {\n\t\tif (points === void 0) {\n\t\t\tpoints = [];\n\t\t}\n\n\t\tif (closed === void 0) {\n\t\t\tclosed = false;\n\t\t}\n\n\t\tif (curveType === void 0) {\n\t\t\tcurveType = 'centripetal';\n\t\t}\n\n\t\tif (tension === void 0) {\n\t\t\ttension = 0.5;\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'CatmullRomCurve3';\n\t\tthis.points = points;\n\t\tthis.closed = closed;\n\t\tthis.curveType = curveType;\n\t\tthis.tension = tension;\n\t}\n\n\tCatmullRomCurve3.prototype = Object.create(Curve.prototype);\n\tCatmullRomCurve3.prototype.constructor = CatmullRomCurve3;\n\tCatmullRomCurve3.prototype.isCatmullRomCurve3 = true;\n\n\tCatmullRomCurve3.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector3();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar points = this.points;\n\t\tvar l = points.length;\n\t\tvar p = (l - (this.closed ? 0 : 1)) * t;\n\t\tvar intPoint = Math.floor(p);\n\t\tvar weight = p - intPoint;\n\n\t\tif (this.closed) {\n\t\t\tintPoint += intPoint > 0 ? 0 : (Math.floor(Math.abs(intPoint) / l) + 1) * l;\n\t\t} else if (weight === 0 && intPoint === l - 1) {\n\t\t\tintPoint = l - 2;\n\t\t\tweight = 1;\n\t\t}\n\n\t\tvar p0, p3; // 4 points (p1 & p2 defined below)\n\n\t\tif (this.closed || intPoint > 0) {\n\t\t\tp0 = points[(intPoint - 1) % l];\n\t\t} else {\n\t\t\t// extrapolate first point\n\t\t\ttmp.subVectors(points[0], points[1]).add(points[0]);\n\t\t\tp0 = tmp;\n\t\t}\n\n\t\tvar p1 = points[intPoint % l];\n\t\tvar p2 = points[(intPoint + 1) % l];\n\n\t\tif (this.closed || intPoint + 2 < l) {\n\t\t\tp3 = points[(intPoint + 2) % l];\n\t\t} else {\n\t\t\t// extrapolate last point\n\t\t\ttmp.subVectors(points[l - 1], points[l - 2]).add(points[l - 1]);\n\t\t\tp3 = tmp;\n\t\t}\n\n\t\tif (this.curveType === 'centripetal' || this.curveType === 'chordal') {\n\t\t\t// init Centripetal / Chordal Catmull-Rom\n\t\t\tvar pow = this.curveType === 'chordal' ? 0.5 : 0.25;\n\t\t\tvar dt0 = Math.pow(p0.distanceToSquared(p1), pow);\n\t\t\tvar dt1 = Math.pow(p1.distanceToSquared(p2), pow);\n\t\t\tvar dt2 = Math.pow(p2.distanceToSquared(p3), pow); // safety check for repeated points\n\n\t\t\tif (dt1 < 1e-4) dt1 = 1.0;\n\t\t\tif (dt0 < 1e-4) dt0 = dt1;\n\t\t\tif (dt2 < 1e-4) dt2 = dt1;\n\t\t\tpx.initNonuniformCatmullRom(p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2);\n\t\t\tpy.initNonuniformCatmullRom(p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2);\n\t\t\tpz.initNonuniformCatmullRom(p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2);\n\t\t} else if (this.curveType === 'catmullrom') {\n\t\t\tpx.initCatmullRom(p0.x, p1.x, p2.x, p3.x, this.tension);\n\t\t\tpy.initCatmullRom(p0.y, p1.y, p2.y, p3.y, this.tension);\n\t\t\tpz.initCatmullRom(p0.z, p1.z, p2.z, p3.z, this.tension);\n\t\t}\n\n\t\tpoint.set(px.calc(weight), py.calc(weight), pz.calc(weight));\n\t\treturn point;\n\t};\n\n\tCatmullRomCurve3.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.points = [];\n\n\t\tfor (var i = 0, l = source.points.length; i < l; i++) {\n\t\t\tvar point = source.points[i];\n\t\t\tthis.points.push(point.clone());\n\t\t}\n\n\t\tthis.closed = source.closed;\n\t\tthis.curveType = source.curveType;\n\t\tthis.tension = source.tension;\n\t\treturn this;\n\t};\n\n\tCatmullRomCurve3.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.points = [];\n\n\t\tfor (var i = 0, l = this.points.length; i < l; i++) {\n\t\t\tvar point = this.points[i];\n\t\t\tdata.points.push(point.toArray());\n\t\t}\n\n\t\tdata.closed = this.closed;\n\t\tdata.curveType = this.curveType;\n\t\tdata.tension = this.tension;\n\t\treturn data;\n\t};\n\n\tCatmullRomCurve3.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.points = [];\n\n\t\tfor (var i = 0, l = json.points.length; i < l; i++) {\n\t\t\tvar point = json.points[i];\n\t\t\tthis.points.push(new Vector3().fromArray(point));\n\t\t}\n\n\t\tthis.closed = json.closed;\n\t\tthis.curveType = json.curveType;\n\t\tthis.tension = json.tension;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Bezier Curves formulas obtained from\n\t * http://en.wikipedia.org/wiki/Bézier_curve\n\t */\n\tfunction CatmullRom(t, p0, p1, p2, p3) {\n\t\tvar v0 = (p2 - p0) * 0.5;\n\t\tvar v1 = (p3 - p1) * 0.5;\n\t\tvar t2 = t * t;\n\t\tvar t3 = t * t2;\n\t\treturn (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n\t} //\n\n\n\tfunction QuadraticBezierP0(t, p) {\n\t\tvar k = 1 - t;\n\t\treturn k * k * p;\n\t}\n\n\tfunction QuadraticBezierP1(t, p) {\n\t\treturn 2 * (1 - t) * t * p;\n\t}\n\n\tfunction QuadraticBezierP2(t, p) {\n\t\treturn t * t * p;\n\t}\n\n\tfunction QuadraticBezier(t, p0, p1, p2) {\n\t\treturn QuadraticBezierP0(t, p0) + QuadraticBezierP1(t, p1) + QuadraticBezierP2(t, p2);\n\t} //\n\n\n\tfunction CubicBezierP0(t, p) {\n\t\tvar k = 1 - t;\n\t\treturn k * k * k * p;\n\t}\n\n\tfunction CubicBezierP1(t, p) {\n\t\tvar k = 1 - t;\n\t\treturn 3 * k * k * t * p;\n\t}\n\n\tfunction CubicBezierP2(t, p) {\n\t\treturn 3 * (1 - t) * t * t * p;\n\t}\n\n\tfunction CubicBezierP3(t, p) {\n\t\treturn t * t * t * p;\n\t}\n\n\tfunction CubicBezier(t, p0, p1, p2, p3) {\n\t\treturn CubicBezierP0(t, p0) + CubicBezierP1(t, p1) + CubicBezierP2(t, p2) + CubicBezierP3(t, p3);\n\t}\n\n\tfunction CubicBezierCurve(v0, v1, v2, v3) {\n\t\tif (v0 === void 0) {\n\t\t\tv0 = new Vector2();\n\t\t}\n\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector2();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector2();\n\t\t}\n\n\t\tif (v3 === void 0) {\n\t\t\tv3 = new Vector2();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'CubicBezierCurve';\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\t}\n\n\tCubicBezierCurve.prototype = Object.create(Curve.prototype);\n\tCubicBezierCurve.prototype.constructor = CubicBezierCurve;\n\tCubicBezierCurve.prototype.isCubicBezierCurve = true;\n\n\tCubicBezierCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector2();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar v0 = this.v0,\n\t\t\t\tv1 = this.v1,\n\t\t\t\tv2 = this.v2,\n\t\t\t\tv3 = this.v3;\n\t\tpoint.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y));\n\t\treturn point;\n\t};\n\n\tCubicBezierCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v0.copy(source.v0);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\tthis.v3.copy(source.v3);\n\t\treturn this;\n\t};\n\n\tCubicBezierCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\t\treturn data;\n\t};\n\n\tCubicBezierCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v0.fromArray(json.v0);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\tthis.v3.fromArray(json.v3);\n\t\treturn this;\n\t};\n\n\tfunction CubicBezierCurve3(v0, v1, v2, v3) {\n\t\tif (v0 === void 0) {\n\t\t\tv0 = new Vector3();\n\t\t}\n\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector3();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector3();\n\t\t}\n\n\t\tif (v3 === void 0) {\n\t\t\tv3 = new Vector3();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'CubicBezierCurve3';\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\t}\n\n\tCubicBezierCurve3.prototype = Object.create(Curve.prototype);\n\tCubicBezierCurve3.prototype.constructor = CubicBezierCurve3;\n\tCubicBezierCurve3.prototype.isCubicBezierCurve3 = true;\n\n\tCubicBezierCurve3.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector3();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar v0 = this.v0,\n\t\t\t\tv1 = this.v1,\n\t\t\t\tv2 = this.v2,\n\t\t\t\tv3 = this.v3;\n\t\tpoint.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y), CubicBezier(t, v0.z, v1.z, v2.z, v3.z));\n\t\treturn point;\n\t};\n\n\tCubicBezierCurve3.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v0.copy(source.v0);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\tthis.v3.copy(source.v3);\n\t\treturn this;\n\t};\n\n\tCubicBezierCurve3.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\t\treturn data;\n\t};\n\n\tCubicBezierCurve3.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v0.fromArray(json.v0);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\tthis.v3.fromArray(json.v3);\n\t\treturn this;\n\t};\n\n\tfunction LineCurve(v1, v2) {\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector2();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector2();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'LineCurve';\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t}\n\n\tLineCurve.prototype = Object.create(Curve.prototype);\n\tLineCurve.prototype.constructor = LineCurve;\n\tLineCurve.prototype.isLineCurve = true;\n\n\tLineCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector2();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\n\t\tif (t === 1) {\n\t\t\tpoint.copy(this.v2);\n\t\t} else {\n\t\t\tpoint.copy(this.v2).sub(this.v1);\n\t\t\tpoint.multiplyScalar(t).add(this.v1);\n\t\t}\n\n\t\treturn point;\n\t}; // Line curve is linear, so we can overwrite default getPointAt\n\n\n\tLineCurve.prototype.getPointAt = function (u, optionalTarget) {\n\t\treturn this.getPoint(u, optionalTarget);\n\t};\n\n\tLineCurve.prototype.getTangent = function (t, optionalTarget) {\n\t\tvar tangent = optionalTarget || new Vector2();\n\t\ttangent.copy(this.v2).sub(this.v1).normalize();\n\t\treturn tangent;\n\t};\n\n\tLineCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\treturn this;\n\t};\n\n\tLineCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\treturn data;\n\t};\n\n\tLineCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\treturn this;\n\t};\n\n\tfunction LineCurve3(v1, v2) {\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector3();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector3();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'LineCurve3';\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t}\n\n\tLineCurve3.prototype = Object.create(Curve.prototype);\n\tLineCurve3.prototype.constructor = LineCurve3;\n\tLineCurve3.prototype.isLineCurve3 = true;\n\n\tLineCurve3.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector3();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\n\t\tif (t === 1) {\n\t\t\tpoint.copy(this.v2);\n\t\t} else {\n\t\t\tpoint.copy(this.v2).sub(this.v1);\n\t\t\tpoint.multiplyScalar(t).add(this.v1);\n\t\t}\n\n\t\treturn point;\n\t}; // Line curve is linear, so we can overwrite default getPointAt\n\n\n\tLineCurve3.prototype.getPointAt = function (u, optionalTarget) {\n\t\treturn this.getPoint(u, optionalTarget);\n\t};\n\n\tLineCurve3.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\treturn this;\n\t};\n\n\tLineCurve3.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\treturn data;\n\t};\n\n\tLineCurve3.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\treturn this;\n\t};\n\n\tfunction QuadraticBezierCurve(v0, v1, v2) {\n\t\tif (v0 === void 0) {\n\t\t\tv0 = new Vector2();\n\t\t}\n\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector2();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector2();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'QuadraticBezierCurve';\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t}\n\n\tQuadraticBezierCurve.prototype = Object.create(Curve.prototype);\n\tQuadraticBezierCurve.prototype.constructor = QuadraticBezierCurve;\n\tQuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;\n\n\tQuadraticBezierCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector2();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar v0 = this.v0,\n\t\t\t\tv1 = this.v1,\n\t\t\t\tv2 = this.v2;\n\t\tpoint.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y));\n\t\treturn point;\n\t};\n\n\tQuadraticBezierCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v0.copy(source.v0);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\treturn this;\n\t};\n\n\tQuadraticBezierCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\treturn data;\n\t};\n\n\tQuadraticBezierCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v0.fromArray(json.v0);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\treturn this;\n\t};\n\n\tfunction QuadraticBezierCurve3(v0, v1, v2) {\n\t\tif (v0 === void 0) {\n\t\t\tv0 = new Vector3();\n\t\t}\n\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector3();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector3();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'QuadraticBezierCurve3';\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t}\n\n\tQuadraticBezierCurve3.prototype = Object.create(Curve.prototype);\n\tQuadraticBezierCurve3.prototype.constructor = QuadraticBezierCurve3;\n\tQuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;\n\n\tQuadraticBezierCurve3.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector3();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar v0 = this.v0,\n\t\t\t\tv1 = this.v1,\n\t\t\t\tv2 = this.v2;\n\t\tpoint.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y), QuadraticBezier(t, v0.z, v1.z, v2.z));\n\t\treturn point;\n\t};\n\n\tQuadraticBezierCurve3.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v0.copy(source.v0);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\treturn this;\n\t};\n\n\tQuadraticBezierCurve3.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\treturn data;\n\t};\n\n\tQuadraticBezierCurve3.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v0.fromArray(json.v0);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\treturn this;\n\t};\n\n\tfunction SplineCurve(points) {\n\t\tif (points === void 0) {\n\t\t\tpoints = [];\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'SplineCurve';\n\t\tthis.points = points;\n\t}\n\n\tSplineCurve.prototype = Object.create(Curve.prototype);\n\tSplineCurve.prototype.constructor = SplineCurve;\n\tSplineCurve.prototype.isSplineCurve = true;\n\n\tSplineCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector2();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar points = this.points;\n\t\tvar p = (points.length - 1) * t;\n\t\tvar intPoint = Math.floor(p);\n\t\tvar weight = p - intPoint;\n\t\tvar p0 = points[intPoint === 0 ? intPoint : intPoint - 1];\n\t\tvar p1 = points[intPoint];\n\t\tvar p2 = points[intPoint > points.length - 2 ? points.length - 1 : intPoint + 1];\n\t\tvar p3 = points[intPoint > points.length - 3 ? points.length - 1 : intPoint + 2];\n\t\tpoint.set(CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));\n\t\treturn point;\n\t};\n\n\tSplineCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.points = [];\n\n\t\tfor (var i = 0, l = source.points.length; i < l; i++) {\n\t\t\tvar point = source.points[i];\n\t\t\tthis.points.push(point.clone());\n\t\t}\n\n\t\treturn this;\n\t};\n\n\tSplineCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.points = [];\n\n\t\tfor (var i = 0, l = this.points.length; i < l; i++) {\n\t\t\tvar point = this.points[i];\n\t\t\tdata.points.push(point.toArray());\n\t\t}\n\n\t\treturn data;\n\t};\n\n\tSplineCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.points = [];\n\n\t\tfor (var i = 0, l = json.points.length; i < l; i++) {\n\t\t\tvar point = json.points[i];\n\t\t\tthis.points.push(new Vector2().fromArray(point));\n\t\t}\n\n\t\treturn this;\n\t};\n\n\tvar Curves = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tArcCurve: ArcCurve,\n\t\tCatmullRomCurve3: CatmullRomCurve3,\n\t\tCubicBezierCurve: CubicBezierCurve,\n\t\tCubicBezierCurve3: CubicBezierCurve3,\n\t\tEllipseCurve: EllipseCurve,\n\t\tLineCurve: LineCurve,\n\t\tLineCurve3: LineCurve3,\n\t\tQuadraticBezierCurve: QuadraticBezierCurve,\n\t\tQuadraticBezierCurve3: QuadraticBezierCurve3,\n\t\tSplineCurve: SplineCurve\n\t});\n\n\t/**************************************************************\n\t *\tCurved Path - a curve path is simply a array of connected\n\t *\tcurves, but retains the api of a curve\n\t **************************************************************/\n\n\tfunction CurvePath() {\n\t\tCurve.call(this);\n\t\tthis.type = 'CurvePath';\n\t\tthis.curves = [];\n\t\tthis.autoClose = false; // Automatically closes the path\n\t}\n\n\tCurvePath.prototype = Object.assign(Object.create(Curve.prototype), {\n\t\tconstructor: CurvePath,\n\t\tadd: function add(curve) {\n\t\t\tthis.curves.push(curve);\n\t\t},\n\t\tclosePath: function closePath() {\n\t\t\t// Add a line curve if start and end of lines are not connected\n\t\t\tvar startPoint = this.curves[0].getPoint(0);\n\t\t\tvar endPoint = this.curves[this.curves.length - 1].getPoint(1);\n\n\t\t\tif (!startPoint.equals(endPoint)) {\n\t\t\t\tthis.curves.push(new LineCurve(endPoint, startPoint));\n\t\t\t}\n\t\t},\n\t\t// To get accurate point with reference to\n\t\t// entire path distance at time t,\n\t\t// following has to be done:\n\t\t// 1. Length of each sub path have to be known\n\t\t// 2. Locate and identify type of curve\n\t\t// 3. Get t for the curve\n\t\t// 4. Return curve.getPointAt(t')\n\t\tgetPoint: function getPoint(t) {\n\t\t\tvar d = t * this.getLength();\n\t\t\tvar curveLengths = this.getCurveLengths();\n\t\t\tvar i = 0; // To think about boundaries points.\n\n\t\t\twhile (i < curveLengths.length) {\n\t\t\t\tif (curveLengths[i] >= d) {\n\t\t\t\t\tvar diff = curveLengths[i] - d;\n\t\t\t\t\tvar curve = this.curves[i];\n\t\t\t\t\tvar segmentLength = curve.getLength();\n\t\t\t\t\tvar u = segmentLength === 0 ? 0 : 1 - diff / segmentLength;\n\t\t\t\t\treturn curve.getPointAt(u);\n\t\t\t\t}\n\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\treturn null; // loop where sum != 0, sum > d , sum+1 <d\n\t\t},\n\t\t// We cannot use the default THREE.Curve getPoint() with getLength() because in\n\t\t// THREE.Curve, getLength() depends on getPoint() but in THREE.CurvePath\n\t\t// getPoint() depends on getLength\n\t\tgetLength: function getLength() {\n\t\t\tvar lens = this.getCurveLengths();\n\t\t\treturn lens[lens.length - 1];\n\t\t},\n\t\t// cacheLengths must be recalculated.\n\t\tupdateArcLengths: function updateArcLengths() {\n\t\t\tthis.needsUpdate = true;\n\t\t\tthis.cacheLengths = null;\n\t\t\tthis.getCurveLengths();\n\t\t},\n\t\t// Compute lengths and cache them\n\t\t// We cannot overwrite getLengths() because UtoT mapping uses it.\n\t\tgetCurveLengths: function getCurveLengths() {\n\t\t\t// We use cache values if curves and cache array are same length\n\t\t\tif (this.cacheLengths && this.cacheLengths.length === this.curves.length) {\n\t\t\t\treturn this.cacheLengths;\n\t\t\t} // Get length of sub-curve\n\t\t\t// Push sums into cached array\n\n\n\t\t\tvar lengths = [];\n\t\t\tvar sums = 0;\n\n\t\t\tfor (var i = 0, l = this.curves.length; i < l; i++) {\n\t\t\t\tsums += this.curves[i].getLength();\n\t\t\t\tlengths.push(sums);\n\t\t\t}\n\n\t\t\tthis.cacheLengths = lengths;\n\t\t\treturn lengths;\n\t\t},\n\t\tgetSpacedPoints: function getSpacedPoints(divisions) {\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 40;\n\t\t\t}\n\n\t\t\tvar points = [];\n\n\t\t\tfor (var i = 0; i <= divisions; i++) {\n\t\t\t\tpoints.push(this.getPoint(i / divisions));\n\t\t\t}\n\n\t\t\tif (this.autoClose) {\n\t\t\t\tpoints.push(points[0]);\n\t\t\t}\n\n\t\t\treturn points;\n\t\t},\n\t\tgetPoints: function getPoints(divisions) {\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 12;\n\t\t\t}\n\n\t\t\tvar points = [];\n\t\t\tvar last;\n\n\t\t\tfor (var i = 0, curves = this.curves; i < curves.length; i++) {\n\t\t\t\tvar curve = curves[i];\n\t\t\t\tvar resolution = curve && curve.isEllipseCurve ? divisions * 2 : curve && (curve.isLineCurve || curve.isLineCurve3) ? 1 : curve && curve.isSplineCurve ? divisions * curve.points.length : divisions;\n\t\t\t\tvar pts = curve.getPoints(resolution);\n\n\t\t\t\tfor (var j = 0; j < pts.length; j++) {\n\t\t\t\t\tvar point = pts[j];\n\t\t\t\t\tif (last && last.equals(point)) continue; // ensures no consecutive points are duplicates\n\n\t\t\t\t\tpoints.push(point);\n\t\t\t\t\tlast = point;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.autoClose && points.length > 1 && !points[points.length - 1].equals(points[0])) {\n\t\t\t\tpoints.push(points[0]);\n\t\t\t}\n\n\t\t\treturn points;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tCurve.prototype.copy.call(this, source);\n\t\t\tthis.curves = [];\n\n\t\t\tfor (var i = 0, l = source.curves.length; i < l; i++) {\n\t\t\t\tvar curve = source.curves[i];\n\t\t\t\tthis.curves.push(curve.clone());\n\t\t\t}\n\n\t\t\tthis.autoClose = source.autoClose;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\t\tdata.autoClose = this.autoClose;\n\t\t\tdata.curves = [];\n\n\t\t\tfor (var i = 0, l = this.curves.length; i < l; i++) {\n\t\t\t\tvar curve = this.curves[i];\n\t\t\t\tdata.curves.push(curve.toJSON());\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tCurve.prototype.fromJSON.call(this, json);\n\t\t\tthis.autoClose = json.autoClose;\n\t\t\tthis.curves = [];\n\n\t\t\tfor (var i = 0, l = json.curves.length; i < l; i++) {\n\t\t\t\tvar curve = json.curves[i];\n\t\t\t\tthis.curves.push(new Curves[curve.type]().fromJSON(curve));\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction Path(points) {\n\t\tCurvePath.call(this);\n\t\tthis.type = 'Path';\n\t\tthis.currentPoint = new Vector2();\n\n\t\tif (points) {\n\t\t\tthis.setFromPoints(points);\n\t\t}\n\t}\n\n\tPath.prototype = Object.assign(Object.create(CurvePath.prototype), {\n\t\tconstructor: Path,\n\t\tsetFromPoints: function setFromPoints(points) {\n\t\t\tthis.moveTo(points[0].x, points[0].y);\n\n\t\t\tfor (var i = 1, l = points.length; i < l; i++) {\n\t\t\t\tthis.lineTo(points[i].x, points[i].y);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tmoveTo: function moveTo(x, y) {\n\t\t\tthis.currentPoint.set(x, y); // TODO consider referencing vectors instead of copying?\n\n\t\t\treturn this;\n\t\t},\n\t\tlineTo: function lineTo(x, y) {\n\t\t\tvar curve = new LineCurve(this.currentPoint.clone(), new Vector2(x, y));\n\t\t\tthis.curves.push(curve);\n\t\t\tthis.currentPoint.set(x, y);\n\t\t\treturn this;\n\t\t},\n\t\tquadraticCurveTo: function quadraticCurveTo(aCPx, aCPy, aX, aY) {\n\t\t\tvar curve = new QuadraticBezierCurve(this.currentPoint.clone(), new Vector2(aCPx, aCPy), new Vector2(aX, aY));\n\t\t\tthis.curves.push(curve);\n\t\t\tthis.currentPoint.set(aX, aY);\n\t\t\treturn this;\n\t\t},\n\t\tbezierCurveTo: function bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {\n\t\t\tvar curve = new CubicBezierCurve(this.currentPoint.clone(), new Vector2(aCP1x, aCP1y), new Vector2(aCP2x, aCP2y), new Vector2(aX, aY));\n\t\t\tthis.curves.push(curve);\n\t\t\tthis.currentPoint.set(aX, aY);\n\t\t\treturn this;\n\t\t},\n\t\tsplineThru: function splineThru(pts\n\t\t/*Array of Vector*/\n\t\t) {\n\t\t\tvar npts = [this.currentPoint.clone()].concat(pts);\n\t\t\tvar curve = new SplineCurve(npts);\n\t\t\tthis.curves.push(curve);\n\t\t\tthis.currentPoint.copy(pts[pts.length - 1]);\n\t\t\treturn this;\n\t\t},\n\t\tarc: function arc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n\t\t\tvar x0 = this.currentPoint.x;\n\t\t\tvar y0 = this.currentPoint.y;\n\t\t\tthis.absarc(aX + x0, aY + y0, aRadius, aStartAngle, aEndAngle, aClockwise);\n\t\t\treturn this;\n\t\t},\n\t\tabsarc: function absarc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n\t\t\tthis.absellipse(aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);\n\t\t\treturn this;\n\t\t},\n\t\tellipse: function ellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n\t\t\tvar x0 = this.currentPoint.x;\n\t\t\tvar y0 = this.currentPoint.y;\n\t\t\tthis.absellipse(aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation);\n\t\t\treturn this;\n\t\t},\n\t\tabsellipse: function absellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n\t\t\tvar curve = new EllipseCurve(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation);\n\n\t\t\tif (this.curves.length > 0) {\n\t\t\t\t// if a previous curve is present, attempt to join\n\t\t\t\tvar firstPoint = curve.getPoint(0);\n\n\t\t\t\tif (!firstPoint.equals(this.currentPoint)) {\n\t\t\t\t\tthis.lineTo(firstPoint.x, firstPoint.y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.curves.push(curve);\n\t\t\tvar lastPoint = curve.getPoint(1);\n\t\t\tthis.currentPoint.copy(lastPoint);\n\t\t\treturn this;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tCurvePath.prototype.copy.call(this, source);\n\t\t\tthis.currentPoint.copy(source.currentPoint);\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = CurvePath.prototype.toJSON.call(this);\n\t\t\tdata.currentPoint = this.currentPoint.toArray();\n\t\t\treturn data;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tCurvePath.prototype.fromJSON.call(this, json);\n\t\t\tthis.currentPoint.fromArray(json.currentPoint);\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction Shape(points) {\n\t\tPath.call(this, points);\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.type = 'Shape';\n\t\tthis.holes = [];\n\t}\n\n\tShape.prototype = Object.assign(Object.create(Path.prototype), {\n\t\tconstructor: Shape,\n\t\tgetPointsHoles: function getPointsHoles(divisions) {\n\t\t\tvar holesPts = [];\n\n\t\t\tfor (var i = 0, l = this.holes.length; i < l; i++) {\n\t\t\t\tholesPts[i] = this.holes[i].getPoints(divisions);\n\t\t\t}\n\n\t\t\treturn holesPts;\n\t\t},\n\t\t// get points of shape and holes (keypoints based on segments parameter)\n\t\textractPoints: function extractPoints(divisions) {\n\t\t\treturn {\n\t\t\t\tshape: this.getPoints(divisions),\n\t\t\t\tholes: this.getPointsHoles(divisions)\n\t\t\t};\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tPath.prototype.copy.call(this, source);\n\t\t\tthis.holes = [];\n\n\t\t\tfor (var i = 0, l = source.holes.length; i < l; i++) {\n\t\t\t\tvar hole = source.holes[i];\n\t\t\t\tthis.holes.push(hole.clone());\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = Path.prototype.toJSON.call(this);\n\t\t\tdata.uuid = this.uuid;\n\t\t\tdata.holes = [];\n\n\t\t\tfor (var i = 0, l = this.holes.length; i < l; i++) {\n\t\t\t\tvar hole = this.holes[i];\n\t\t\t\tdata.holes.push(hole.toJSON());\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tPath.prototype.fromJSON.call(this, json);\n\t\t\tthis.uuid = json.uuid;\n\t\t\tthis.holes = [];\n\n\t\t\tfor (var i = 0, l = json.holes.length; i < l; i++) {\n\t\t\t\tvar hole = json.holes[i];\n\t\t\t\tthis.holes.push(new Path().fromJSON(hole));\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction Light(color, intensity) {\n\t\tif (intensity === void 0) {\n\t\t\tintensity = 1;\n\t\t}\n\n\t\tObject3D.call(this);\n\t\tthis.type = 'Light';\n\t\tthis.color = new Color(color);\n\t\tthis.intensity = intensity;\n\t}\n\n\tLight.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Light,\n\t\tisLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\t\t\tthis.color.copy(source.color);\n\t\t\tthis.intensity = source.intensity;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Object3D.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.color = this.color.getHex();\n\t\t\tdata.object.intensity = this.intensity;\n\t\t\tif (this.groundColor !== undefined) data.object.groundColor = this.groundColor.getHex();\n\t\t\tif (this.distance !== undefined) data.object.distance = this.distance;\n\t\t\tif (this.angle !== undefined) data.object.angle = this.angle;\n\t\t\tif (this.decay !== undefined) data.object.decay = this.decay;\n\t\t\tif (this.penumbra !== undefined) data.object.penumbra = this.penumbra;\n\t\t\tif (this.shadow !== undefined) data.object.shadow = this.shadow.toJSON();\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction HemisphereLight(skyColor, groundColor, intensity) {\n\t\tLight.call(this, skyColor, intensity);\n\t\tthis.type = 'HemisphereLight';\n\t\tthis.position.copy(Object3D.DefaultUp);\n\t\tthis.updateMatrix();\n\t\tthis.groundColor = new Color(groundColor);\n\t}\n\n\tHemisphereLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: HemisphereLight,\n\t\tisHemisphereLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.groundColor.copy(source.groundColor);\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction LightShadow(camera) {\n\t\tthis.camera = camera;\n\t\tthis.bias = 0;\n\t\tthis.normalBias = 0;\n\t\tthis.radius = 1;\n\t\tthis.mapSize = new Vector2(512, 512);\n\t\tthis.map = null;\n\t\tthis.mapPass = null;\n\t\tthis.matrix = new Matrix4();\n\t\tthis.autoUpdate = true;\n\t\tthis.needsUpdate = false;\n\t\tthis._frustum = new Frustum();\n\t\tthis._frameExtents = new Vector2(1, 1);\n\t\tthis._viewportCount = 1;\n\t\tthis._viewports = [new Vector4(0, 0, 1, 1)];\n\t}\n\n\tObject.assign(LightShadow.prototype, {\n\t\t_projScreenMatrix: new Matrix4(),\n\t\t_lightPositionWorld: new Vector3(),\n\t\t_lookTarget: new Vector3(),\n\t\tgetViewportCount: function getViewportCount() {\n\t\t\treturn this._viewportCount;\n\t\t},\n\t\tgetFrustum: function getFrustum() {\n\t\t\treturn this._frustum;\n\t\t},\n\t\tupdateMatrices: function updateMatrices(light) {\n\t\t\tvar shadowCamera = this.camera,\n\t\t\t\t\tshadowMatrix = this.matrix,\n\t\t\t\t\tprojScreenMatrix = this._projScreenMatrix,\n\t\t\t\t\tlookTarget = this._lookTarget,\n\t\t\t\t\tlightPositionWorld = this._lightPositionWorld;\n\t\t\tlightPositionWorld.setFromMatrixPosition(light.matrixWorld);\n\t\t\tshadowCamera.position.copy(lightPositionWorld);\n\t\t\tlookTarget.setFromMatrixPosition(light.target.matrixWorld);\n\t\t\tshadowCamera.lookAt(lookTarget);\n\t\t\tshadowCamera.updateMatrixWorld();\n\t\t\tprojScreenMatrix.multiplyMatrices(shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse);\n\n\t\t\tthis._frustum.setFromProjectionMatrix(projScreenMatrix);\n\n\t\t\tshadowMatrix.set(0.5, 0.0, 0.0, 0.5, 0.0, 0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0);\n\t\t\tshadowMatrix.multiply(shadowCamera.projectionMatrix);\n\t\t\tshadowMatrix.multiply(shadowCamera.matrixWorldInverse);\n\t\t},\n\t\tgetViewport: function getViewport(viewportIndex) {\n\t\t\treturn this._viewports[viewportIndex];\n\t\t},\n\t\tgetFrameExtents: function getFrameExtents() {\n\t\t\treturn this._frameExtents;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.camera = source.camera.clone();\n\t\t\tthis.bias = source.bias;\n\t\t\tthis.radius = source.radius;\n\t\t\tthis.mapSize.copy(source.mapSize);\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar object = {};\n\t\t\tif (this.bias !== 0) object.bias = this.bias;\n\t\t\tif (this.normalBias !== 0) object.normalBias = this.normalBias;\n\t\t\tif (this.radius !== 1) object.radius = this.radius;\n\t\t\tif (this.mapSize.x !== 512 || this.mapSize.y !== 512) object.mapSize = this.mapSize.toArray();\n\t\t\tobject.camera = this.camera.toJSON(false).object;\n\t\t\tdelete object.camera.matrix;\n\t\t\treturn object;\n\t\t}\n\t});\n\n\tfunction SpotLightShadow() {\n\t\tLightShadow.call(this, new PerspectiveCamera(50, 1, 0.5, 500));\n\t\tthis.focus = 1;\n\t}\n\n\tSpotLightShadow.prototype = Object.assign(Object.create(LightShadow.prototype), {\n\t\tconstructor: SpotLightShadow,\n\t\tisSpotLightShadow: true,\n\t\tupdateMatrices: function updateMatrices(light) {\n\t\t\tvar camera = this.camera;\n\t\t\tvar fov = MathUtils.RAD2DEG * 2 * light.angle * this.focus;\n\t\t\tvar aspect = this.mapSize.width / this.mapSize.height;\n\t\t\tvar far = light.distance || camera.far;\n\n\t\t\tif (fov !== camera.fov || aspect !== camera.aspect || far !== camera.far) {\n\t\t\t\tcamera.fov = fov;\n\t\t\t\tcamera.aspect = aspect;\n\t\t\t\tcamera.far = far;\n\t\t\t\tcamera.updateProjectionMatrix();\n\t\t\t}\n\n\t\t\tLightShadow.prototype.updateMatrices.call(this, light);\n\t\t}\n\t});\n\n\tfunction SpotLight(color, intensity, distance, angle, penumbra, decay) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'SpotLight';\n\t\tthis.position.copy(Object3D.DefaultUp);\n\t\tthis.updateMatrix();\n\t\tthis.target = new Object3D();\n\t\tObject.defineProperty(this, 'power', {\n\t\t\tget: function get() {\n\t\t\t\t// intensity = power per solid angle.\n\t\t\t\t// ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\t\t\treturn this.intensity * Math.PI;\n\t\t\t},\n\t\t\tset: function set(power) {\n\t\t\t\t// intensity = power per solid angle.\n\t\t\t\t// ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\t\t\tthis.intensity = power / Math.PI;\n\t\t\t}\n\t\t});\n\t\tthis.distance = distance !== undefined ? distance : 0;\n\t\tthis.angle = angle !== undefined ? angle : Math.PI / 3;\n\t\tthis.penumbra = penumbra !== undefined ? penumbra : 0;\n\t\tthis.decay = decay !== undefined ? decay : 1; // for physically correct lights, should be 2.\n\n\t\tthis.shadow = new SpotLightShadow();\n\t}\n\n\tSpotLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: SpotLight,\n\t\tisSpotLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.distance = source.distance;\n\t\t\tthis.angle = source.angle;\n\t\t\tthis.penumbra = source.penumbra;\n\t\t\tthis.decay = source.decay;\n\t\t\tthis.target = source.target.clone();\n\t\t\tthis.shadow = source.shadow.clone();\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction PointLightShadow() {\n\t\tLightShadow.call(this, new PerspectiveCamera(90, 1, 0.5, 500));\n\t\tthis._frameExtents = new Vector2(4, 2);\n\t\tthis._viewportCount = 6;\n\t\tthis._viewports = [// These viewports map a cube-map onto a 2D texture with the\n\t\t// following orientation:\n\t\t//\n\t\t//\txzXZ\n\t\t//\t y Y\n\t\t//\n\t\t// X - Positive x direction\n\t\t// x - Negative x direction\n\t\t// Y - Positive y direction\n\t\t// y - Negative y direction\n\t\t// Z - Positive z direction\n\t\t// z - Negative z direction\n\t\t// positive X\n\t\tnew Vector4(2, 1, 1, 1), // negative X\n\t\tnew Vector4(0, 1, 1, 1), // positive Z\n\t\tnew Vector4(3, 1, 1, 1), // negative Z\n\t\tnew Vector4(1, 1, 1, 1), // positive Y\n\t\tnew Vector4(3, 0, 1, 1), // negative Y\n\t\tnew Vector4(1, 0, 1, 1)];\n\t\tthis._cubeDirections = [new Vector3(1, 0, 0), new Vector3(-1, 0, 0), new Vector3(0, 0, 1), new Vector3(0, 0, -1), new Vector3(0, 1, 0), new Vector3(0, -1, 0)];\n\t\tthis._cubeUps = [new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 0, 1), new Vector3(0, 0, -1)];\n\t}\n\n\tPointLightShadow.prototype = Object.assign(Object.create(LightShadow.prototype), {\n\t\tconstructor: PointLightShadow,\n\t\tisPointLightShadow: true,\n\t\tupdateMatrices: function updateMatrices(light, viewportIndex) {\n\t\t\tif (viewportIndex === void 0) {\n\t\t\t\tviewportIndex = 0;\n\t\t\t}\n\n\t\t\tvar camera = this.camera,\n\t\t\t\t\tshadowMatrix = this.matrix,\n\t\t\t\t\tlightPositionWorld = this._lightPositionWorld,\n\t\t\t\t\tlookTarget = this._lookTarget,\n\t\t\t\t\tprojScreenMatrix = this._projScreenMatrix;\n\t\t\tlightPositionWorld.setFromMatrixPosition(light.matrixWorld);\n\t\t\tcamera.position.copy(lightPositionWorld);\n\t\t\tlookTarget.copy(camera.position);\n\t\t\tlookTarget.add(this._cubeDirections[viewportIndex]);\n\t\t\tcamera.up.copy(this._cubeUps[viewportIndex]);\n\t\t\tcamera.lookAt(lookTarget);\n\t\t\tcamera.updateMatrixWorld();\n\t\t\tshadowMatrix.makeTranslation(-lightPositionWorld.x, -lightPositionWorld.y, -lightPositionWorld.z);\n\t\t\tprojScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);\n\n\t\t\tthis._frustum.setFromProjectionMatrix(projScreenMatrix);\n\t\t}\n\t});\n\n\tfunction PointLight(color, intensity, distance, decay) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'PointLight';\n\t\tObject.defineProperty(this, 'power', {\n\t\t\tget: function get() {\n\t\t\t\t// intensity = power per solid angle.\n\t\t\t\t// ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\t\t\treturn this.intensity * 4 * Math.PI;\n\t\t\t},\n\t\t\tset: function set(power) {\n\t\t\t\t// intensity = power per solid angle.\n\t\t\t\t// ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\t\t\tthis.intensity = power / (4 * Math.PI);\n\t\t\t}\n\t\t});\n\t\tthis.distance = distance !== undefined ? distance : 0;\n\t\tthis.decay = decay !== undefined ? decay : 1; // for physically correct lights, should be 2.\n\n\t\tthis.shadow = new PointLightShadow();\n\t}\n\n\tPointLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: PointLight,\n\t\tisPointLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.distance = source.distance;\n\t\t\tthis.decay = source.decay;\n\t\t\tthis.shadow = source.shadow.clone();\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction OrthographicCamera(left, right, top, bottom, near, far) {\n\t\tif (left === void 0) {\n\t\t\tleft = -1;\n\t\t}\n\n\t\tif (right === void 0) {\n\t\t\tright = 1;\n\t\t}\n\n\t\tif (top === void 0) {\n\t\t\ttop = 1;\n\t\t}\n\n\t\tif (bottom === void 0) {\n\t\t\tbottom = -1;\n\t\t}\n\n\t\tif (near === void 0) {\n\t\t\tnear = 0.1;\n\t\t}\n\n\t\tif (far === void 0) {\n\t\t\tfar = 2000;\n\t\t}\n\n\t\tCamera.call(this);\n\t\tthis.type = 'OrthographicCamera';\n\t\tthis.zoom = 1;\n\t\tthis.view = null;\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.top = top;\n\t\tthis.bottom = bottom;\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.updateProjectionMatrix();\n\t}\n\n\tOrthographicCamera.prototype = Object.assign(Object.create(Camera.prototype), {\n\t\tconstructor: OrthographicCamera,\n\t\tisOrthographicCamera: true,\n\t\tcopy: function copy(source, recursive) {\n\t\t\tCamera.prototype.copy.call(this, source, recursive);\n\t\t\tthis.left = source.left;\n\t\t\tthis.right = source.right;\n\t\t\tthis.top = source.top;\n\t\t\tthis.bottom = source.bottom;\n\t\t\tthis.near = source.near;\n\t\t\tthis.far = source.far;\n\t\t\tthis.zoom = source.zoom;\n\t\t\tthis.view = source.view === null ? null : Object.assign({}, source.view);\n\t\t\treturn this;\n\t\t},\n\t\tsetViewOffset: function setViewOffset(fullWidth, fullHeight, x, y, width, height) {\n\t\t\tif (this.view === null) {\n\t\t\t\tthis.view = {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tfullWidth: 1,\n\t\t\t\t\tfullHeight: 1,\n\t\t\t\t\toffsetX: 0,\n\t\t\t\t\toffsetY: 0,\n\t\t\t\t\twidth: 1,\n\t\t\t\t\theight: 1\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.view.enabled = true;\n\t\t\tthis.view.fullWidth = fullWidth;\n\t\t\tthis.view.fullHeight = fullHeight;\n\t\t\tthis.view.offsetX = x;\n\t\t\tthis.view.offsetY = y;\n\t\t\tthis.view.width = width;\n\t\t\tthis.view.height = height;\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\t\tclearViewOffset: function clearViewOffset() {\n\t\t\tif (this.view !== null) {\n\t\t\t\tthis.view.enabled = false;\n\t\t\t}\n\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\t\tupdateProjectionMatrix: function updateProjectionMatrix() {\n\t\t\tvar dx = (this.right - this.left) / (2 * this.zoom);\n\t\t\tvar dy = (this.top - this.bottom) / (2 * this.zoom);\n\t\t\tvar cx = (this.right + this.left) / 2;\n\t\t\tvar cy = (this.top + this.bottom) / 2;\n\t\t\tvar left = cx - dx;\n\t\t\tvar right = cx + dx;\n\t\t\tvar top = cy + dy;\n\t\t\tvar bottom = cy - dy;\n\n\t\t\tif (this.view !== null && this.view.enabled) {\n\t\t\t\tvar scaleW = (this.right - this.left) / this.view.fullWidth / this.zoom;\n\t\t\t\tvar scaleH = (this.top - this.bottom) / this.view.fullHeight / this.zoom;\n\t\t\t\tleft += scaleW * this.view.offsetX;\n\t\t\t\tright = left + scaleW * this.view.width;\n\t\t\t\ttop -= scaleH * this.view.offsetY;\n\t\t\t\tbottom = top - scaleH * this.view.height;\n\t\t\t}\n\n\t\t\tthis.projectionMatrix.makeOrthographic(left, right, top, bottom, this.near, this.far);\n\t\t\tthis.projectionMatrixInverse.copy(this.projectionMatrix).invert();\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Object3D.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.zoom = this.zoom;\n\t\t\tdata.object.left = this.left;\n\t\t\tdata.object.right = this.right;\n\t\t\tdata.object.top = this.top;\n\t\t\tdata.object.bottom = this.bottom;\n\t\t\tdata.object.near = this.near;\n\t\t\tdata.object.far = this.far;\n\t\t\tif (this.view !== null) data.object.view = Object.assign({}, this.view);\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction DirectionalLightShadow() {\n\t\tLightShadow.call(this, new OrthographicCamera(-5, 5, 5, -5, 0.5, 500));\n\t}\n\n\tDirectionalLightShadow.prototype = Object.assign(Object.create(LightShadow.prototype), {\n\t\tconstructor: DirectionalLightShadow,\n\t\tisDirectionalLightShadow: true,\n\t\tupdateMatrices: function updateMatrices(light) {\n\t\t\tLightShadow.prototype.updateMatrices.call(this, light);\n\t\t}\n\t});\n\n\tfunction DirectionalLight(color, intensity) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'DirectionalLight';\n\t\tthis.position.copy(Object3D.DefaultUp);\n\t\tthis.updateMatrix();\n\t\tthis.target = new Object3D();\n\t\tthis.shadow = new DirectionalLightShadow();\n\t}\n\n\tDirectionalLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: DirectionalLight,\n\t\tisDirectionalLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.target = source.target.clone();\n\t\t\tthis.shadow = source.shadow.clone();\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction AmbientLight(color, intensity) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'AmbientLight';\n\t}\n\n\tAmbientLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: AmbientLight,\n\t\tisAmbientLight: true\n\t});\n\n\tfunction RectAreaLight(color, intensity, width, height) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'RectAreaLight';\n\t\tthis.width = width !== undefined ? width : 10;\n\t\tthis.height = height !== undefined ? height : 10;\n\t}\n\n\tRectAreaLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: RectAreaLight,\n\t\tisRectAreaLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.width = source.width;\n\t\t\tthis.height = source.height;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Light.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.width = this.width;\n\t\t\tdata.object.height = this.height;\n\t\t\treturn data;\n\t\t}\n\t});\n\n\t/**\n\t * Primary reference:\n\t *\t https://graphics.stanford.edu/papers/envmap/envmap.pdf\n\t *\n\t * Secondary reference:\n\t *\t https://www.ppsloan.org/publications/StupidSH36.pdf\n\t */\n\t// 3-band SH defined by 9 coefficients\n\n\tvar SphericalHarmonics3 = /*#__PURE__*/function () {\n\t\tfunction SphericalHarmonics3() {\n\t\t\tObject.defineProperty(this, 'isSphericalHarmonics3', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.coefficients = [];\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients.push(new Vector3());\n\t\t\t}\n\t\t}\n\n\t\tvar _proto = SphericalHarmonics3.prototype;\n\n\t\t_proto.set = function set(coefficients) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].copy(coefficients[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.zero = function zero() {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].set(0, 0, 0);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t} // get the radiance in the direction of the normal\n\t\t// target is a Vector3\n\t\t;\n\n\t\t_proto.getAt = function getAt(normal, target) {\n\t\t\t// normal is assumed to be unit length\n\t\t\tvar x = normal.x,\n\t\t\t\t\ty = normal.y,\n\t\t\t\t\tz = normal.z;\n\t\t\tvar coeff = this.coefficients; // band 0\n\n\t\t\ttarget.copy(coeff[0]).multiplyScalar(0.282095); // band 1\n\n\t\t\ttarget.addScaledVector(coeff[1], 0.488603 * y);\n\t\t\ttarget.addScaledVector(coeff[2], 0.488603 * z);\n\t\t\ttarget.addScaledVector(coeff[3], 0.488603 * x); // band 2\n\n\t\t\ttarget.addScaledVector(coeff[4], 1.092548 * (x * y));\n\t\t\ttarget.addScaledVector(coeff[5], 1.092548 * (y * z));\n\t\t\ttarget.addScaledVector(coeff[6], 0.315392 * (3.0 * z * z - 1.0));\n\t\t\ttarget.addScaledVector(coeff[7], 1.092548 * (x * z));\n\t\t\ttarget.addScaledVector(coeff[8], 0.546274 * (x * x - y * y));\n\t\t\treturn target;\n\t\t} // get the irradiance (radiance convolved with cosine lobe) in the direction of the normal\n\t\t// target is a Vector3\n\t\t// https://graphics.stanford.edu/papers/envmap/envmap.pdf\n\t\t;\n\n\t\t_proto.getIrradianceAt = function getIrradianceAt(normal, target) {\n\t\t\t// normal is assumed to be unit length\n\t\t\tvar x = normal.x,\n\t\t\t\t\ty = normal.y,\n\t\t\t\t\tz = normal.z;\n\t\t\tvar coeff = this.coefficients; // band 0\n\n\t\t\ttarget.copy(coeff[0]).multiplyScalar(0.886227); // π * 0.282095\n\t\t\t// band 1\n\n\t\t\ttarget.addScaledVector(coeff[1], 2.0 * 0.511664 * y); // ( 2 * π / 3 ) * 0.488603\n\n\t\t\ttarget.addScaledVector(coeff[2], 2.0 * 0.511664 * z);\n\t\t\ttarget.addScaledVector(coeff[3], 2.0 * 0.511664 * x); // band 2\n\n\t\t\ttarget.addScaledVector(coeff[4], 2.0 * 0.429043 * x * y); // ( π / 4 ) * 1.092548\n\n\t\t\ttarget.addScaledVector(coeff[5], 2.0 * 0.429043 * y * z);\n\t\t\ttarget.addScaledVector(coeff[6], 0.743125 * z * z - 0.247708); // ( π / 4 ) * 0.315392 * 3\n\n\t\t\ttarget.addScaledVector(coeff[7], 2.0 * 0.429043 * x * z);\n\t\t\ttarget.addScaledVector(coeff[8], 0.429043 * (x * x - y * y)); // ( π / 4 ) * 0.546274\n\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.add = function add(sh) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].add(sh.coefficients[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScaledSH = function addScaledSH(sh, s) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].addScaledVector(sh.coefficients[i], s);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.scale = function scale(s) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].multiplyScalar(s);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerp = function lerp(sh, alpha) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].lerp(sh.coefficients[i], alpha);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(sh) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tif (!this.coefficients[i].equals(sh.coefficients[i])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.copy = function copy(sh) {\n\t\t\treturn this.set(sh.coefficients);\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tvar coefficients = this.coefficients;\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tcoefficients[i].fromArray(array, offset + i * 3);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tvar coefficients = this.coefficients;\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tcoefficients[i].toArray(array, offset + i * 3);\n\t\t\t}\n\n\t\t\treturn array;\n\t\t} // evaluate the basis functions\n\t\t// shBasis is an Array[ 9 ]\n\t\t;\n\n\t\tSphericalHarmonics3.getBasisAt = function getBasisAt(normal, shBasis) {\n\t\t\t// normal is assumed to be unit length\n\t\t\tvar x = normal.x,\n\t\t\t\t\ty = normal.y,\n\t\t\t\t\tz = normal.z; // band 0\n\n\t\t\tshBasis[0] = 0.282095; // band 1\n\n\t\t\tshBasis[1] = 0.488603 * y;\n\t\t\tshBasis[2] = 0.488603 * z;\n\t\t\tshBasis[3] = 0.488603 * x; // band 2\n\n\t\t\tshBasis[4] = 1.092548 * x * y;\n\t\t\tshBasis[5] = 1.092548 * y * z;\n\t\t\tshBasis[6] = 0.315392 * (3 * z * z - 1);\n\t\t\tshBasis[7] = 1.092548 * x * z;\n\t\t\tshBasis[8] = 0.546274 * (x * x - y * y);\n\t\t};\n\n\t\treturn SphericalHarmonics3;\n\t}();\n\n\tfunction LightProbe(sh, intensity) {\n\t\tLight.call(this, undefined, intensity);\n\t\tthis.type = 'LightProbe';\n\t\tthis.sh = sh !== undefined ? sh : new SphericalHarmonics3();\n\t}\n\n\tLightProbe.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: LightProbe,\n\t\tisLightProbe: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.sh.copy(source.sh);\n\t\t\treturn this;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tthis.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();\n\n\t\t\tthis.sh.fromArray(json.sh);\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Light.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.sh = this.sh.toArray();\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction MaterialLoader(manager) {\n\t\tLoader.call(this, manager);\n\t\tthis.textures = {};\n\t}\n\n\tMaterialLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: MaterialLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(scope.manager);\n\t\t\tloader.setPath(scope.path);\n\t\t\tloader.setRequestHeader(scope.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\ttry {\n\t\t\t\t\tonLoad(scope.parse(JSON.parse(text)));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (onError) {\n\t\t\t\t\t\tonError(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t},\n\t\tparse: function parse(json) {\n\t\t\tvar textures = this.textures;\n\n\t\t\tfunction getTexture(name) {\n\t\t\t\tif (textures[name] === undefined) {\n\t\t\t\t\tconsole.warn('THREE.MaterialLoader: Undefined texture', name);\n\t\t\t\t}\n\n\t\t\t\treturn textures[name];\n\t\t\t}\n\n\t\t\tvar material = new Materials[json.type]();\n\t\t\tif (json.uuid !== undefined) material.uuid = json.uuid;\n\t\t\tif (json.name !== undefined) material.name = json.name;\n\t\t\tif (json.color !== undefined && material.color !== undefined) material.color.setHex(json.color);\n\t\t\tif (json.roughness !== undefined) material.roughness = json.roughness;\n\t\t\tif (json.metalness !== undefined) material.metalness = json.metalness;\n\t\t\tif (json.sheen !== undefined) material.sheen = new Color().setHex(json.sheen);\n\t\t\tif (json.emissive !== undefined && material.emissive !== undefined) material.emissive.setHex(json.emissive);\n\t\t\tif (json.specular !== undefined && material.specular !== undefined) material.specular.setHex(json.specular);\n\t\t\tif (json.shininess !== undefined) material.shininess = json.shininess;\n\t\t\tif (json.clearcoat !== undefined) material.clearcoat = json.clearcoat;\n\t\t\tif (json.clearcoatRoughness !== undefined) material.clearcoatRoughness = json.clearcoatRoughness;\n\t\t\tif (json.fog !== undefined) material.fog = json.fog;\n\t\t\tif (json.flatShading !== undefined) material.flatShading = json.flatShading;\n\t\t\tif (json.blending !== undefined) material.blending = json.blending;\n\t\t\tif (json.combine !== undefined) material.combine = json.combine;\n\t\t\tif (json.side !== undefined) material.side = json.side;\n\t\t\tif (json.opacity !== undefined) material.opacity = json.opacity;\n\t\t\tif (json.transparent !== undefined) material.transparent = json.transparent;\n\t\t\tif (json.alphaTest !== undefined) material.alphaTest = json.alphaTest;\n\t\t\tif (json.depthTest !== undefined) material.depthTest = json.depthTest;\n\t\t\tif (json.depthWrite !== undefined) material.depthWrite = json.depthWrite;\n\t\t\tif (json.colorWrite !== undefined) material.colorWrite = json.colorWrite;\n\t\t\tif (json.stencilWrite !== undefined) material.stencilWrite = json.stencilWrite;\n\t\t\tif (json.stencilWriteMask !== undefined) material.stencilWriteMask = json.stencilWriteMask;\n\t\t\tif (json.stencilFunc !== undefined) material.stencilFunc = json.stencilFunc;\n\t\t\tif (json.stencilRef !== undefined) material.stencilRef = json.stencilRef;\n\t\t\tif (json.stencilFuncMask !== undefined) material.stencilFuncMask = json.stencilFuncMask;\n\t\t\tif (json.stencilFail !== undefined) material.stencilFail = json.stencilFail;\n\t\t\tif (json.stencilZFail !== undefined) material.stencilZFail = json.stencilZFail;\n\t\t\tif (json.stencilZPass !== undefined) material.stencilZPass = json.stencilZPass;\n\t\t\tif (json.wireframe !== undefined) material.wireframe = json.wireframe;\n\t\t\tif (json.wireframeLinewidth !== undefined) material.wireframeLinewidth = json.wireframeLinewidth;\n\t\t\tif (json.wireframeLinecap !== undefined) material.wireframeLinecap = json.wireframeLinecap;\n\t\t\tif (json.wireframeLinejoin !== undefined) material.wireframeLinejoin = json.wireframeLinejoin;\n\t\t\tif (json.rotation !== undefined) material.rotation = json.rotation;\n\t\t\tif (json.linewidth !== 1) material.linewidth = json.linewidth;\n\t\t\tif (json.dashSize !== undefined) material.dashSize = json.dashSize;\n\t\t\tif (json.gapSize !== undefined) material.gapSize = json.gapSize;\n\t\t\tif (json.scale !== undefined) material.scale = json.scale;\n\t\t\tif (json.polygonOffset !== undefined) material.polygonOffset = json.polygonOffset;\n\t\t\tif (json.polygonOffsetFactor !== undefined) material.polygonOffsetFactor = json.polygonOffsetFactor;\n\t\t\tif (json.polygonOffsetUnits !== undefined) material.polygonOffsetUnits = json.polygonOffsetUnits;\n\t\t\tif (json.skinning !== undefined) material.skinning = json.skinning;\n\t\t\tif (json.morphTargets !== undefined) material.morphTargets = json.morphTargets;\n\t\t\tif (json.morphNormals !== undefined) material.morphNormals = json.morphNormals;\n\t\t\tif (json.dithering !== undefined) material.dithering = json.dithering;\n\t\t\tif (json.vertexTangents !== undefined) material.vertexTangents = json.vertexTangents;\n\t\t\tif (json.visible !== undefined) material.visible = json.visible;\n\t\t\tif (json.toneMapped !== undefined) material.toneMapped = json.toneMapped;\n\t\t\tif (json.userData !== undefined) material.userData = json.userData;\n\n\t\t\tif (json.vertexColors !== undefined) {\n\t\t\t\tif (typeof json.vertexColors === 'number') {\n\t\t\t\t\tmaterial.vertexColors = json.vertexColors > 0 ? true : false;\n\t\t\t\t} else {\n\t\t\t\t\tmaterial.vertexColors = json.vertexColors;\n\t\t\t\t}\n\t\t\t} // Shader Material\n\n\n\t\t\tif (json.uniforms !== undefined) {\n\t\t\t\tfor (var name in json.uniforms) {\n\t\t\t\t\tvar uniform = json.uniforms[name];\n\t\t\t\t\tmaterial.uniforms[name] = {};\n\n\t\t\t\t\tswitch (uniform.type) {\n\t\t\t\t\t\tcase 't':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = getTexture(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Color().setHex(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'v2':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Vector2().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'v3':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Vector3().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'v4':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Vector4().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'm3':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Matrix3().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'm4':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Matrix4().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = uniform.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (json.defines !== undefined) material.defines = json.defines;\n\t\t\tif (json.vertexShader !== undefined) material.vertexShader = json.vertexShader;\n\t\t\tif (json.fragmentShader !== undefined) material.fragmentShader = json.fragmentShader;\n\n\t\t\tif (json.extensions !== undefined) {\n\t\t\t\tfor (var key in json.extensions) {\n\t\t\t\t\tmaterial.extensions[key] = json.extensions[key];\n\t\t\t\t}\n\t\t\t} // Deprecated\n\n\n\t\t\tif (json.shading !== undefined) material.flatShading = json.shading === 1; // THREE.FlatShading\n\t\t\t// for PointsMaterial\n\n\t\t\tif (json.size !== undefined) material.size = json.size;\n\t\t\tif (json.sizeAttenuation !== undefined) material.sizeAttenuation = json.sizeAttenuation; // maps\n\n\t\t\tif (json.map !== undefined) material.map = getTexture(json.map);\n\t\t\tif (json.matcap !== undefined) material.matcap = getTexture(json.matcap);\n\t\t\tif (json.alphaMap !== undefined) material.alphaMap = getTexture(json.alphaMap);\n\t\t\tif (json.bumpMap !== undefined) material.bumpMap = getTexture(json.bumpMap);\n\t\t\tif (json.bumpScale !== undefined) material.bumpScale = json.bumpScale;\n\t\t\tif (json.normalMap !== undefined) material.normalMap = getTexture(json.normalMap);\n\t\t\tif (json.normalMapType !== undefined) material.normalMapType = json.normalMapType;\n\n\t\t\tif (json.normalScale !== undefined) {\n\t\t\t\tvar normalScale = json.normalScale;\n\n\t\t\t\tif (Array.isArray(normalScale) === false) {\n\t\t\t\t\t// Blender exporter used to export a scalar. See #7459\n\t\t\t\t\tnormalScale = [normalScale, normalScale];\n\t\t\t\t}\n\n\t\t\t\tmaterial.normalScale = new Vector2().fromArray(normalScale);\n\t\t\t}\n\n\t\t\tif (json.displacementMap !== undefined) material.displacementMap = getTexture(json.displacementMap);\n\t\t\tif (json.displacementScale !== undefined) material.displacementScale = json.displacementScale;\n\t\t\tif (json.displacementBias !== undefined) material.displacementBias = json.displacementBias;\n\t\t\tif (json.roughnessMap !== undefined) material.roughnessMap = getTexture(json.roughnessMap);\n\t\t\tif (json.metalnessMap !== undefined) material.metalnessMap = getTexture(json.metalnessMap);\n\t\t\tif (json.emissiveMap !== undefined) material.emissiveMap = getTexture(json.emissiveMap);\n\t\t\tif (json.emissiveIntensity !== undefined) material.emissiveIntensity = json.emissiveIntensity;\n\t\t\tif (json.specularMap !== undefined) material.specularMap = getTexture(json.specularMap);\n\t\t\tif (json.envMap !== undefined) material.envMap = getTexture(json.envMap);\n\t\t\tif (json.envMapIntensity !== undefined) material.envMapIntensity = json.envMapIntensity;\n\t\t\tif (json.reflectivity !== undefined) material.reflectivity = json.reflectivity;\n\t\t\tif (json.refractionRatio !== undefined) material.refractionRatio = json.refractionRatio;\n\t\t\tif (json.lightMap !== undefined) material.lightMap = getTexture(json.lightMap);\n\t\t\tif (json.lightMapIntensity !== undefined) material.lightMapIntensity = json.lightMapIntensity;\n\t\t\tif (json.aoMap !== undefined) material.aoMap = getTexture(json.aoMap);\n\t\t\tif (json.aoMapIntensity !== undefined) material.aoMapIntensity = json.aoMapIntensity;\n\t\t\tif (json.gradientMap !== undefined) material.gradientMap = getTexture(json.gradientMap);\n\t\t\tif (json.clearcoatMap !== undefined) material.clearcoatMap = getTexture(json.clearcoatMap);\n\t\t\tif (json.clearcoatRoughnessMap !== undefined) material.clearcoatRoughnessMap = getTexture(json.clearcoatRoughnessMap);\n\t\t\tif (json.clearcoatNormalMap !== undefined) material.clearcoatNormalMap = getTexture(json.clearcoatNormalMap);\n\t\t\tif (json.clearcoatNormalScale !== undefined) material.clearcoatNormalScale = new Vector2().fromArray(json.clearcoatNormalScale);\n\t\t\tif (json.transmission !== undefined) material.transmission = json.transmission;\n\t\t\tif (json.transmissionMap !== undefined) material.transmissionMap = getTexture(json.transmissionMap);\n\t\t\treturn material;\n\t\t},\n\t\tsetTextures: function setTextures(value) {\n\t\t\tthis.textures = value;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tvar LoaderUtils = {\n\t\tdecodeText: function decodeText(array) {\n\t\t\tif (typeof TextDecoder !== 'undefined') {\n\t\t\t\treturn new TextDecoder().decode(array);\n\t\t\t} // Avoid the String.fromCharCode.apply(null, array) shortcut, which\n\t\t\t// throws a \"maximum call stack size exceeded\" error for large arrays.\n\n\n\t\t\tvar s = '';\n\n\t\t\tfor (var i = 0, il = array.length; i < il; i++) {\n\t\t\t\t// Implicitly assumes little-endian.\n\t\t\t\ts += String.fromCharCode(array[i]);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// merges multi-byte utf-8 characters.\n\t\t\t\treturn decodeURIComponent(escape(s));\n\t\t\t} catch (e) {\n\t\t\t\t// see #16358\n\t\t\t\treturn s;\n\t\t\t}\n\t\t},\n\t\textractUrlBase: function extractUrlBase(url) {\n\t\t\tvar index = url.lastIndexOf('/');\n\t\t\tif (index === -1) return './';\n\t\t\treturn url.substr(0, index + 1);\n\t\t}\n\t};\n\n\tfunction InstancedBufferGeometry() {\n\t\tBufferGeometry.call(this);\n\t\tthis.type = 'InstancedBufferGeometry';\n\t\tthis.instanceCount = Infinity;\n\t}\n\n\tInstancedBufferGeometry.prototype = Object.assign(Object.create(BufferGeometry.prototype), {\n\t\tconstructor: InstancedBufferGeometry,\n\t\tisInstancedBufferGeometry: true,\n\t\tcopy: function copy(source) {\n\t\t\tBufferGeometry.prototype.copy.call(this, source);\n\t\t\tthis.instanceCount = source.instanceCount;\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = BufferGeometry.prototype.toJSON.call(this);\n\t\t\tdata.instanceCount = this.instanceCount;\n\t\t\tdata.isInstancedBufferGeometry = true;\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction InstancedBufferAttribute(array, itemSize, normalized, meshPerAttribute) {\n\t\tif (typeof normalized === 'number') {\n\t\t\tmeshPerAttribute = normalized;\n\t\t\tnormalized = false;\n\t\t\tconsole.error('THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.');\n\t\t}\n\n\t\tBufferAttribute.call(this, array, itemSize, normalized);\n\t\tthis.meshPerAttribute = meshPerAttribute || 1;\n\t}\n\n\tInstancedBufferAttribute.prototype = Object.assign(Object.create(BufferAttribute.prototype), {\n\t\tconstructor: InstancedBufferAttribute,\n\t\tisInstancedBufferAttribute: true,\n\t\tcopy: function copy(source) {\n\t\t\tBufferAttribute.prototype.copy.call(this, source);\n\t\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = BufferAttribute.prototype.toJSON.call(this);\n\t\t\tdata.meshPerAttribute = this.meshPerAttribute;\n\t\t\tdata.isInstancedBufferAttribute = true;\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction BufferGeometryLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tBufferGeometryLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: BufferGeometryLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(scope.manager);\n\t\t\tloader.setPath(scope.path);\n\t\t\tloader.setRequestHeader(scope.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\ttry {\n\t\t\t\t\tonLoad(scope.parse(JSON.parse(text)));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (onError) {\n\t\t\t\t\t\tonError(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t},\n\t\tparse: function parse(json) {\n\t\t\tvar interleavedBufferMap = {};\n\t\t\tvar arrayBufferMap = {};\n\n\t\t\tfunction getInterleavedBuffer(json, uuid) {\n\t\t\t\tif (interleavedBufferMap[uuid] !== undefined) return interleavedBufferMap[uuid];\n\t\t\t\tvar interleavedBuffers = json.interleavedBuffers;\n\t\t\t\tvar interleavedBuffer = interleavedBuffers[uuid];\n\t\t\t\tvar buffer = getArrayBuffer(json, interleavedBuffer.buffer);\n\t\t\t\tvar array = getTypedArray(interleavedBuffer.type, buffer);\n\t\t\t\tvar ib = new InterleavedBuffer(array, interleavedBuffer.stride);\n\t\t\t\tib.uuid = interleavedBuffer.uuid;\n\t\t\t\tinterleavedBufferMap[uuid] = ib;\n\t\t\t\treturn ib;\n\t\t\t}\n\n\t\t\tfunction getArrayBuffer(json, uuid) {\n\t\t\t\tif (arrayBufferMap[uuid] !== undefined) return arrayBufferMap[uuid];\n\t\t\t\tvar arrayBuffers = json.arrayBuffers;\n\t\t\t\tvar arrayBuffer = arrayBuffers[uuid];\n\t\t\t\tvar ab = new Uint32Array(arrayBuffer).buffer;\n\t\t\t\tarrayBufferMap[uuid] = ab;\n\t\t\t\treturn ab;\n\t\t\t}\n\n\t\t\tvar geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry();\n\t\t\tvar index = json.data.index;\n\n\t\t\tif (index !== undefined) {\n\t\t\t\tvar typedArray = getTypedArray(index.type, index.array);\n\t\t\t\tgeometry.setIndex(new BufferAttribute(typedArray, 1));\n\t\t\t}\n\n\t\t\tvar attributes = json.data.attributes;\n\n\t\t\tfor (var key in attributes) {\n\t\t\t\tvar attribute = attributes[key];\n\t\t\t\tvar bufferAttribute = void 0;\n\n\t\t\t\tif (attribute.isInterleavedBufferAttribute) {\n\t\t\t\t\tvar interleavedBuffer = getInterleavedBuffer(json.data, attribute.data);\n\t\t\t\t\tbufferAttribute = new InterleavedBufferAttribute(interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized);\n\t\t\t\t} else {\n\t\t\t\t\tvar _typedArray = getTypedArray(attribute.type, attribute.array);\n\n\t\t\t\t\tvar bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute;\n\t\t\t\t\tbufferAttribute = new bufferAttributeConstr(_typedArray, attribute.itemSize, attribute.normalized);\n\t\t\t\t}\n\n\t\t\t\tif (attribute.name !== undefined) bufferAttribute.name = attribute.name;\n\t\t\t\tgeometry.setAttribute(key, bufferAttribute);\n\t\t\t}\n\n\t\t\tvar morphAttributes = json.data.morphAttributes;\n\n\t\t\tif (morphAttributes) {\n\t\t\t\tfor (var _key in morphAttributes) {\n\t\t\t\t\tvar attributeArray = morphAttributes[_key];\n\t\t\t\t\tvar array = [];\n\n\t\t\t\t\tfor (var i = 0, il = attributeArray.length; i < il; i++) {\n\t\t\t\t\t\tvar _attribute = attributeArray[i];\n\n\t\t\t\t\t\tvar _bufferAttribute = void 0;\n\n\t\t\t\t\t\tif (_attribute.isInterleavedBufferAttribute) {\n\t\t\t\t\t\t\tvar _interleavedBuffer = getInterleavedBuffer(json.data, _attribute.data);\n\n\t\t\t\t\t\t\t_bufferAttribute = new InterleavedBufferAttribute(_interleavedBuffer, _attribute.itemSize, _attribute.offset, _attribute.normalized);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar _typedArray2 = getTypedArray(_attribute.type, _attribute.array);\n\n\t\t\t\t\t\t\t_bufferAttribute = new BufferAttribute(_typedArray2, _attribute.itemSize, _attribute.normalized);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (_attribute.name !== undefined) _bufferAttribute.name = _attribute.name;\n\t\t\t\t\t\tarray.push(_bufferAttribute);\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.morphAttributes[_key] = array;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar morphTargetsRelative = json.data.morphTargetsRelative;\n\n\t\t\tif (morphTargetsRelative) {\n\t\t\t\tgeometry.morphTargetsRelative = true;\n\t\t\t}\n\n\t\t\tvar groups = json.data.groups || json.data.drawcalls || json.data.offsets;\n\n\t\t\tif (groups !== undefined) {\n\t\t\t\tfor (var _i = 0, n = groups.length; _i !== n; ++_i) {\n\t\t\t\t\tvar group = groups[_i];\n\t\t\t\t\tgeometry.addGroup(group.start, group.count, group.materialIndex);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar boundingSphere = json.data.boundingSphere;\n\n\t\t\tif (boundingSphere !== undefined) {\n\t\t\t\tvar center = new Vector3();\n\n\t\t\t\tif (boundingSphere.center !== undefined) {\n\t\t\t\t\tcenter.fromArray(boundingSphere.center);\n\t\t\t\t}\n\n\t\t\t\tgeometry.boundingSphere = new Sphere(center, boundingSphere.radius);\n\t\t\t}\n\n\t\t\tif (json.name) geometry.name = json.name;\n\t\t\tif (json.userData) geometry.userData = json.userData;\n\t\t\treturn geometry;\n\t\t}\n\t});\n\n\tvar ObjectLoader = /*#__PURE__*/function (_Loader) {\n\t\t_inheritsLoose(ObjectLoader, _Loader);\n\n\t\tfunction ObjectLoader(manager) {\n\t\t\treturn _Loader.call(this, manager) || this;\n\t\t}\n\n\t\tvar _proto = ObjectLoader.prototype;\n\n\t\t_proto.load = function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar path = this.path === '' ? LoaderUtils.extractUrlBase(url) : this.path;\n\t\t\tthis.resourcePath = this.resourcePath || path;\n\t\t\tvar loader = new FileLoader(this.manager);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.setRequestHeader(this.requestHeader);\n\t\t\tloader.setWithCredentials(this.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\tvar json = null;\n\n\t\t\t\ttry {\n\t\t\t\t\tjson = JSON.parse(text);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (onError !== undefined) onError(error);\n\t\t\t\t\tconsole.error('THREE:ObjectLoader: Can\\'t parse ' + url + '.', error.message);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar metadata = json.metadata;\n\n\t\t\t\tif (metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry') {\n\t\t\t\t\tconsole.error('THREE.ObjectLoader: Can\\'t load ' + url);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tscope.parse(json, onLoad);\n\t\t\t}, onProgress, onError);\n\t\t};\n\n\t\t_proto.parse = function parse(json, onLoad) {\n\t\t\tvar animations = this.parseAnimations(json.animations);\n\t\t\tvar shapes = this.parseShapes(json.shapes);\n\t\t\tvar geometries = this.parseGeometries(json.geometries, shapes);\n\t\t\tvar images = this.parseImages(json.images, function () {\n\t\t\t\tif (onLoad !== undefined) onLoad(object);\n\t\t\t});\n\t\t\tvar textures = this.parseTextures(json.textures, images);\n\t\t\tvar materials = this.parseMaterials(json.materials, textures);\n\t\t\tvar object = this.parseObject(json.object, geometries, materials, animations);\n\t\t\tvar skeletons = this.parseSkeletons(json.skeletons, object);\n\t\t\tthis.bindSkeletons(object, skeletons); //\n\n\t\t\tif (onLoad !== undefined) {\n\t\t\t\tvar hasImages = false;\n\n\t\t\t\tfor (var uuid in images) {\n\t\t\t\t\tif (images[uuid] instanceof HTMLImageElement) {\n\t\t\t\t\t\thasImages = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (hasImages === false) onLoad(object);\n\t\t\t}\n\n\t\t\treturn object;\n\t\t};\n\n\t\t_proto.parseShapes = function parseShapes(json) {\n\t\t\tvar shapes = {};\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar shape = new Shape().fromJSON(json[i]);\n\t\t\t\t\tshapes[shape.uuid] = shape;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn shapes;\n\t\t};\n\n\t\t_proto.parseSkeletons = function parseSkeletons(json, object) {\n\t\t\tvar skeletons = {};\n\t\t\tvar bones = {}; // generate bone lookup table\n\n\t\t\tobject.traverse(function (child) {\n\t\t\t\tif (child.isBone) bones[child.uuid] = child;\n\t\t\t}); // create skeletons\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar skeleton = new Skeleton().fromJSON(json[i], bones);\n\t\t\t\t\tskeletons[skeleton.uuid] = skeleton;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn skeletons;\n\t\t};\n\n\t\t_proto.parseGeometries = function parseGeometries(json, shapes) {\n\t\t\tvar geometries = {};\n\t\t\tvar geometryShapes;\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tvar bufferGeometryLoader = new BufferGeometryLoader();\n\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar geometry = void 0;\n\t\t\t\t\tvar data = json[i];\n\n\t\t\t\t\tswitch (data.type) {\n\t\t\t\t\t\tcase 'PlaneGeometry':\n\t\t\t\t\t\tcase 'PlaneBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.width, data.height, data.widthSegments, data.heightSegments);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'BoxGeometry':\n\t\t\t\t\t\tcase 'BoxBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'CircleGeometry':\n\t\t\t\t\t\tcase 'CircleBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.segments, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'CylinderGeometry':\n\t\t\t\t\t\tcase 'CylinderBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'ConeGeometry':\n\t\t\t\t\t\tcase 'ConeBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'SphereGeometry':\n\t\t\t\t\t\tcase 'SphereBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'DodecahedronGeometry':\n\t\t\t\t\t\tcase 'DodecahedronBufferGeometry':\n\t\t\t\t\t\tcase 'IcosahedronGeometry':\n\t\t\t\t\t\tcase 'IcosahedronBufferGeometry':\n\t\t\t\t\t\tcase 'OctahedronGeometry':\n\t\t\t\t\t\tcase 'OctahedronBufferGeometry':\n\t\t\t\t\t\tcase 'TetrahedronGeometry':\n\t\t\t\t\t\tcase 'TetrahedronBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.detail);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'RingGeometry':\n\t\t\t\t\t\tcase 'RingBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'TorusGeometry':\n\t\t\t\t\t\tcase 'TorusBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'TorusKnotGeometry':\n\t\t\t\t\t\tcase 'TorusKnotBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'TubeGeometry':\n\t\t\t\t\t\tcase 'TubeBufferGeometry':\n\t\t\t\t\t\t\t// This only works for built-in curves (e.g. CatmullRomCurve3).\n\t\t\t\t\t\t\t// User defined curves or instances of CurvePath will not be deserialized.\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](new Curves[data.path.type]().fromJSON(data.path), data.tubularSegments, data.radius, data.radialSegments, data.closed);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'LatheGeometry':\n\t\t\t\t\t\tcase 'LatheBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.points, data.segments, data.phiStart, data.phiLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'PolyhedronGeometry':\n\t\t\t\t\t\tcase 'PolyhedronBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.vertices, data.indices, data.radius, data.details);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'ShapeGeometry':\n\t\t\t\t\t\tcase 'ShapeBufferGeometry':\n\t\t\t\t\t\t\tgeometryShapes = [];\n\n\t\t\t\t\t\t\tfor (var j = 0, jl = data.shapes.length; j < jl; j++) {\n\t\t\t\t\t\t\t\tvar shape = shapes[data.shapes[j]];\n\t\t\t\t\t\t\t\tgeometryShapes.push(shape);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](geometryShapes, data.curveSegments);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'ExtrudeGeometry':\n\t\t\t\t\t\tcase 'ExtrudeBufferGeometry':\n\t\t\t\t\t\t\tgeometryShapes = [];\n\n\t\t\t\t\t\t\tfor (var _j = 0, _jl = data.shapes.length; _j < _jl; _j++) {\n\t\t\t\t\t\t\t\tvar _shape = shapes[data.shapes[_j]];\n\t\t\t\t\t\t\t\tgeometryShapes.push(_shape);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar extrudePath = data.options.extrudePath;\n\n\t\t\t\t\t\t\tif (extrudePath !== undefined) {\n\t\t\t\t\t\t\t\tdata.options.extrudePath = new Curves[extrudePath.type]().fromJSON(extrudePath);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](geometryShapes, data.options);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'BufferGeometry':\n\t\t\t\t\t\tcase 'InstancedBufferGeometry':\n\t\t\t\t\t\t\tgeometry = bufferGeometryLoader.parse(data);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'Geometry':\n\t\t\t\t\t\t\tif ('THREE' in window && 'LegacyJSONLoader' in THREE) {\n\t\t\t\t\t\t\t\tvar geometryLoader = new THREE.LegacyJSONLoader();\n\t\t\t\t\t\t\t\tgeometry = geometryLoader.parse(data, this.resourcePath).geometry;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconsole.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type \"Geometry\".');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Unsupported geometry type \"' + data.type + '\"');\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.uuid = data.uuid;\n\t\t\t\t\tif (data.name !== undefined) geometry.name = data.name;\n\t\t\t\t\tif (geometry.isBufferGeometry === true && data.userData !== undefined) geometry.userData = data.userData;\n\t\t\t\t\tgeometries[data.uuid] = geometry;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn geometries;\n\t\t};\n\n\t\t_proto.parseMaterials = function parseMaterials(json, textures) {\n\t\t\tvar cache = {}; // MultiMaterial\n\n\t\t\tvar materials = {};\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tvar loader = new MaterialLoader();\n\t\t\t\tloader.setTextures(textures);\n\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar data = json[i];\n\n\t\t\t\t\tif (data.type === 'MultiMaterial') {\n\t\t\t\t\t\t// Deprecated\n\t\t\t\t\t\tvar array = [];\n\n\t\t\t\t\t\tfor (var j = 0; j < data.materials.length; j++) {\n\t\t\t\t\t\t\tvar material = data.materials[j];\n\n\t\t\t\t\t\t\tif (cache[material.uuid] === undefined) {\n\t\t\t\t\t\t\t\tcache[material.uuid] = loader.parse(material);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tarray.push(cache[material.uuid]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaterials[data.uuid] = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (cache[data.uuid] === undefined) {\n\t\t\t\t\t\t\tcache[data.uuid] = loader.parse(data);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaterials[data.uuid] = cache[data.uuid];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn materials;\n\t\t};\n\n\t\t_proto.parseAnimations = function parseAnimations(json) {\n\t\t\tvar animations = {};\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tfor (var i = 0; i < json.length; i++) {\n\t\t\t\t\tvar data = json[i];\n\t\t\t\t\tvar clip = AnimationClip.parse(data);\n\t\t\t\t\tanimations[clip.uuid] = clip;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn animations;\n\t\t};\n\n\t\t_proto.parseImages = function parseImages(json, onLoad) {\n\t\t\tvar scope = this;\n\t\t\tvar images = {};\n\t\t\tvar loader;\n\n\t\t\tfunction loadImage(url) {\n\t\t\t\tscope.manager.itemStart(url);\n\t\t\t\treturn loader.load(url, function () {\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, undefined, function () {\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction deserializeImage(image) {\n\t\t\t\tif (typeof image === 'string') {\n\t\t\t\t\tvar url = image;\n\t\t\t\t\tvar path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(url) ? url : scope.resourcePath + url;\n\t\t\t\t\treturn loadImage(path);\n\t\t\t\t} else {\n\t\t\t\t\tif (image.data) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tdata: getTypedArray(image.type, image.data),\n\t\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\t\theight: image.height\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (json !== undefined && json.length > 0) {\n\t\t\t\tvar manager = new LoadingManager(onLoad);\n\t\t\t\tloader = new ImageLoader(manager);\n\t\t\t\tloader.setCrossOrigin(this.crossOrigin);\n\n\t\t\t\tfor (var i = 0, il = json.length; i < il; i++) {\n\t\t\t\t\tvar image = json[i];\n\t\t\t\t\tvar url = image.url;\n\n\t\t\t\t\tif (Array.isArray(url)) {\n\t\t\t\t\t\t// load array of images e.g CubeTexture\n\t\t\t\t\t\timages[image.uuid] = [];\n\n\t\t\t\t\t\tfor (var j = 0, jl = url.length; j < jl; j++) {\n\t\t\t\t\t\t\tvar currentUrl = url[j];\n\t\t\t\t\t\t\tvar deserializedImage = deserializeImage(currentUrl);\n\n\t\t\t\t\t\t\tif (deserializedImage !== null) {\n\t\t\t\t\t\t\t\tif (deserializedImage instanceof HTMLImageElement) {\n\t\t\t\t\t\t\t\t\timages[image.uuid].push(deserializedImage);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\t\t\t\t\t\t\t\t\timages[image.uuid].push(new DataTexture(deserializedImage.data, deserializedImage.width, deserializedImage.height));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// load single image\n\t\t\t\t\t\tvar _deserializedImage = deserializeImage(image.url);\n\n\t\t\t\t\t\tif (_deserializedImage !== null) {\n\t\t\t\t\t\t\timages[image.uuid] = _deserializedImage;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn images;\n\t\t};\n\n\t\t_proto.parseTextures = function parseTextures(json, images) {\n\t\t\tfunction parseConstant(value, type) {\n\t\t\t\tif (typeof value === 'number') return value;\n\t\t\t\tconsole.warn('THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value);\n\t\t\t\treturn type[value];\n\t\t\t}\n\n\t\t\tvar textures = {};\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar data = json[i];\n\n\t\t\t\t\tif (data.image === undefined) {\n\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: No \"image\" specified for', data.uuid);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (images[data.image] === undefined) {\n\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Undefined image', data.image);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar texture = void 0;\n\t\t\t\t\tvar image = images[data.image];\n\n\t\t\t\t\tif (Array.isArray(image)) {\n\t\t\t\t\t\ttexture = new CubeTexture(image);\n\t\t\t\t\t\tif (image.length === 6) texture.needsUpdate = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (image && image.data) {\n\t\t\t\t\t\t\ttexture = new DataTexture(image.data, image.width, image.height);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttexture = new Texture(image);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (image) texture.needsUpdate = true; // textures can have undefined image data\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.uuid = data.uuid;\n\t\t\t\t\tif (data.name !== undefined) texture.name = data.name;\n\t\t\t\t\tif (data.mapping !== undefined) texture.mapping = parseConstant(data.mapping, TEXTURE_MAPPING);\n\t\t\t\t\tif (data.offset !== undefined) texture.offset.fromArray(data.offset);\n\t\t\t\t\tif (data.repeat !== undefined) texture.repeat.fromArray(data.repeat);\n\t\t\t\t\tif (data.center !== undefined) texture.center.fromArray(data.center);\n\t\t\t\t\tif (data.rotation !== undefined) texture.rotation = data.rotation;\n\n\t\t\t\t\tif (data.wrap !== undefined) {\n\t\t\t\t\t\ttexture.wrapS = parseConstant(data.wrap[0], TEXTURE_WRAPPING);\n\t\t\t\t\t\ttexture.wrapT = parseConstant(data.wrap[1], TEXTURE_WRAPPING);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (data.format !== undefined) texture.format = data.format;\n\t\t\t\t\tif (data.type !== undefined) texture.type = data.type;\n\t\t\t\t\tif (data.encoding !== undefined) texture.encoding = data.encoding;\n\t\t\t\t\tif (data.minFilter !== undefined) texture.minFilter = parseConstant(data.minFilter, TEXTURE_FILTER);\n\t\t\t\t\tif (data.magFilter !== undefined) texture.magFilter = parseConstant(data.magFilter, TEXTURE_FILTER);\n\t\t\t\t\tif (data.anisotropy !== undefined) texture.anisotropy = data.anisotropy;\n\t\t\t\t\tif (data.flipY !== undefined) texture.flipY = data.flipY;\n\t\t\t\t\tif (data.premultiplyAlpha !== undefined) texture.premultiplyAlpha = data.premultiplyAlpha;\n\t\t\t\t\tif (data.unpackAlignment !== undefined) texture.unpackAlignment = data.unpackAlignment;\n\t\t\t\t\ttextures[data.uuid] = texture;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn textures;\n\t\t};\n\n\t\t_proto.parseObject = function parseObject(data, geometries, materials, animations) {\n\t\t\tvar object;\n\n\t\t\tfunction getGeometry(name) {\n\t\t\t\tif (geometries[name] === undefined) {\n\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Undefined geometry', name);\n\t\t\t\t}\n\n\t\t\t\treturn geometries[name];\n\t\t\t}\n\n\t\t\tfunction getMaterial(name) {\n\t\t\t\tif (name === undefined) return undefined;\n\n\t\t\t\tif (Array.isArray(name)) {\n\t\t\t\t\tvar array = [];\n\n\t\t\t\t\tfor (var i = 0, l = name.length; i < l; i++) {\n\t\t\t\t\t\tvar uuid = name[i];\n\n\t\t\t\t\t\tif (materials[uuid] === undefined) {\n\t\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Undefined material', uuid);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarray.push(materials[uuid]);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn array;\n\t\t\t\t}\n\n\t\t\t\tif (materials[name] === undefined) {\n\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Undefined material', name);\n\t\t\t\t}\n\n\t\t\t\treturn materials[name];\n\t\t\t}\n\n\t\t\tvar geometry, material;\n\n\t\t\tswitch (data.type) {\n\t\t\t\tcase 'Scene':\n\t\t\t\t\tobject = new Scene();\n\n\t\t\t\t\tif (data.background !== undefined) {\n\t\t\t\t\t\tif (Number.isInteger(data.background)) {\n\t\t\t\t\t\t\tobject.background = new Color(data.background);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (data.fog !== undefined) {\n\t\t\t\t\t\tif (data.fog.type === 'Fog') {\n\t\t\t\t\t\t\tobject.fog = new Fog(data.fog.color, data.fog.near, data.fog.far);\n\t\t\t\t\t\t} else if (data.fog.type === 'FogExp2') {\n\t\t\t\t\t\t\tobject.fog = new FogExp2(data.fog.color, data.fog.density);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PerspectiveCamera':\n\t\t\t\t\tobject = new PerspectiveCamera(data.fov, data.aspect, data.near, data.far);\n\t\t\t\t\tif (data.focus !== undefined) object.focus = data.focus;\n\t\t\t\t\tif (data.zoom !== undefined) object.zoom = data.zoom;\n\t\t\t\t\tif (data.filmGauge !== undefined) object.filmGauge = data.filmGauge;\n\t\t\t\t\tif (data.filmOffset !== undefined) object.filmOffset = data.filmOffset;\n\t\t\t\t\tif (data.view !== undefined) object.view = Object.assign({}, data.view);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'OrthographicCamera':\n\t\t\t\t\tobject = new OrthographicCamera(data.left, data.right, data.top, data.bottom, data.near, data.far);\n\t\t\t\t\tif (data.zoom !== undefined) object.zoom = data.zoom;\n\t\t\t\t\tif (data.view !== undefined) object.view = Object.assign({}, data.view);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'AmbientLight':\n\t\t\t\t\tobject = new AmbientLight(data.color, data.intensity);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tobject = new DirectionalLight(data.color, data.intensity);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tobject = new PointLight(data.color, data.intensity, data.distance, data.decay);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RectAreaLight':\n\t\t\t\t\tobject = new RectAreaLight(data.color, data.intensity, data.width, data.height);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tobject = new SpotLight(data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'HemisphereLight':\n\t\t\t\t\tobject = new HemisphereLight(data.color, data.groundColor, data.intensity);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'LightProbe':\n\t\t\t\t\tobject = new LightProbe().fromJSON(data);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SkinnedMesh':\n\t\t\t\t\tgeometry = getGeometry(data.geometry);\n\t\t\t\t\tmaterial = getMaterial(data.material);\n\t\t\t\t\tobject = new SkinnedMesh(geometry, material);\n\t\t\t\t\tif (data.bindMode !== undefined) object.bindMode = data.bindMode;\n\t\t\t\t\tif (data.bindMatrix !== undefined) object.bindMatrix.fromArray(data.bindMatrix);\n\t\t\t\t\tif (data.skeleton !== undefined) object.skeleton = data.skeleton;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Mesh':\n\t\t\t\t\tgeometry = getGeometry(data.geometry);\n\t\t\t\t\tmaterial = getMaterial(data.material);\n\t\t\t\t\tobject = new Mesh(geometry, material);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'InstancedMesh':\n\t\t\t\t\tgeometry = getGeometry(data.geometry);\n\t\t\t\t\tmaterial = getMaterial(data.material);\n\t\t\t\t\tvar count = data.count;\n\t\t\t\t\tvar instanceMatrix = data.instanceMatrix;\n\t\t\t\t\tobject = new InstancedMesh(geometry, material, count);\n\t\t\t\t\tobject.instanceMatrix = new BufferAttribute(new Float32Array(instanceMatrix.array), 16);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'LOD':\n\t\t\t\t\tobject = new LOD();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Line':\n\t\t\t\t\tobject = new Line(getGeometry(data.geometry), getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'LineLoop':\n\t\t\t\t\tobject = new LineLoop(getGeometry(data.geometry), getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'LineSegments':\n\t\t\t\t\tobject = new LineSegments(getGeometry(data.geometry), getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointCloud':\n\t\t\t\tcase 'Points':\n\t\t\t\t\tobject = new Points(getGeometry(data.geometry), getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Sprite':\n\t\t\t\t\tobject = new Sprite(getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Group':\n\t\t\t\t\tobject = new Group();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Bone':\n\t\t\t\t\tobject = new Bone();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tobject = new Object3D();\n\t\t\t}\n\n\t\t\tobject.uuid = data.uuid;\n\t\t\tif (data.name !== undefined) object.name = data.name;\n\n\t\t\tif (data.matrix !== undefined) {\n\t\t\t\tobject.matrix.fromArray(data.matrix);\n\t\t\t\tif (data.matrixAutoUpdate !== undefined) object.matrixAutoUpdate = data.matrixAutoUpdate;\n\t\t\t\tif (object.matrixAutoUpdate) object.matrix.decompose(object.position, object.quaternion, object.scale);\n\t\t\t} else {\n\t\t\t\tif (data.position !== undefined) object.position.fromArray(data.position);\n\t\t\t\tif (data.rotation !== undefined) object.rotation.fromArray(data.rotation);\n\t\t\t\tif (data.quaternion !== undefined) object.quaternion.fromArray(data.quaternion);\n\t\t\t\tif (data.scale !== undefined) object.scale.fromArray(data.scale);\n\t\t\t}\n\n\t\t\tif (data.castShadow !== undefined) object.castShadow = data.castShadow;\n\t\t\tif (data.receiveShadow !== undefined) object.receiveShadow = data.receiveShadow;\n\n\t\t\tif (data.shadow) {\n\t\t\t\tif (data.shadow.bias !== undefined) object.shadow.bias = data.shadow.bias;\n\t\t\t\tif (data.shadow.normalBias !== undefined) object.shadow.normalBias = data.shadow.normalBias;\n\t\t\t\tif (data.shadow.radius !== undefined) object.shadow.radius = data.shadow.radius;\n\t\t\t\tif (data.shadow.mapSize !== undefined) object.shadow.mapSize.fromArray(data.shadow.mapSize);\n\t\t\t\tif (data.shadow.camera !== undefined) object.shadow.camera = this.parseObject(data.shadow.camera);\n\t\t\t}\n\n\t\t\tif (data.visible !== undefined) object.visible = data.visible;\n\t\t\tif (data.frustumCulled !== undefined) object.frustumCulled = data.frustumCulled;\n\t\t\tif (data.renderOrder !== undefined) object.renderOrder = data.renderOrder;\n\t\t\tif (data.userData !== undefined) object.userData = data.userData;\n\t\t\tif (data.layers !== undefined) object.layers.mask = data.layers;\n\n\t\t\tif (data.children !== undefined) {\n\t\t\t\tvar children = data.children;\n\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tobject.add(this.parseObject(children[i], geometries, materials, animations));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (data.animations !== undefined) {\n\t\t\t\tvar objectAnimations = data.animations;\n\n\t\t\t\tfor (var _i = 0; _i < objectAnimations.length; _i++) {\n\t\t\t\t\tvar uuid = objectAnimations[_i];\n\t\t\t\t\tobject.animations.push(animations[uuid]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (data.type === 'LOD') {\n\t\t\t\tif (data.autoUpdate !== undefined) object.autoUpdate = data.autoUpdate;\n\t\t\t\tvar levels = data.levels;\n\n\t\t\t\tfor (var l = 0; l < levels.length; l++) {\n\t\t\t\t\tvar level = levels[l];\n\t\t\t\t\tvar child = object.getObjectByProperty('uuid', level.object);\n\n\t\t\t\t\tif (child !== undefined) {\n\t\t\t\t\t\tobject.addLevel(child, level.distance);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn object;\n\t\t};\n\n\t\t_proto.bindSkeletons = function bindSkeletons(object, skeletons) {\n\t\t\tif (Object.keys(skeletons).length === 0) return;\n\t\t\tobject.traverse(function (child) {\n\t\t\t\tif (child.isSkinnedMesh === true && child.skeleton !== undefined) {\n\t\t\t\t\tvar skeleton = skeletons[child.skeleton];\n\n\t\t\t\t\tif (skeleton === undefined) {\n\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.bind(skeleton, child.bindMatrix);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t/* DEPRECATED */\n\t\t;\n\n\t\t_proto.setTexturePath = function setTexturePath(value) {\n\t\t\tconsole.warn('THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().');\n\t\t\treturn this.setResourcePath(value);\n\t\t};\n\n\t\treturn ObjectLoader;\n\t}(Loader);\n\n\tvar TEXTURE_MAPPING = {\n\t\tUVMapping: UVMapping,\n\t\tCubeReflectionMapping: CubeReflectionMapping,\n\t\tCubeRefractionMapping: CubeRefractionMapping,\n\t\tEquirectangularReflectionMapping: EquirectangularReflectionMapping,\n\t\tEquirectangularRefractionMapping: EquirectangularRefractionMapping,\n\t\tCubeUVReflectionMapping: CubeUVReflectionMapping,\n\t\tCubeUVRefractionMapping: CubeUVRefractionMapping\n\t};\n\tvar TEXTURE_WRAPPING = {\n\t\tRepeatWrapping: RepeatWrapping,\n\t\tClampToEdgeWrapping: ClampToEdgeWrapping,\n\t\tMirroredRepeatWrapping: MirroredRepeatWrapping\n\t};\n\tvar TEXTURE_FILTER = {\n\t\tNearestFilter: NearestFilter,\n\t\tNearestMipmapNearestFilter: NearestMipmapNearestFilter,\n\t\tNearestMipmapLinearFilter: NearestMipmapLinearFilter,\n\t\tLinearFilter: LinearFilter,\n\t\tLinearMipmapNearestFilter: LinearMipmapNearestFilter,\n\t\tLinearMipmapLinearFilter: LinearMipmapLinearFilter\n\t};\n\n\tfunction ImageBitmapLoader(manager) {\n\t\tif (typeof createImageBitmap === 'undefined') {\n\t\t\tconsole.warn('THREE.ImageBitmapLoader: createImageBitmap() not supported.');\n\t\t}\n\n\t\tif (typeof fetch === 'undefined') {\n\t\t\tconsole.warn('THREE.ImageBitmapLoader: fetch() not supported.');\n\t\t}\n\n\t\tLoader.call(this, manager);\n\t\tthis.options = {\n\t\t\tpremultiplyAlpha: 'none'\n\t\t};\n\t}\n\n\tImageBitmapLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: ImageBitmapLoader,\n\t\tisImageBitmapLoader: true,\n\t\tsetOptions: function setOptions(options) {\n\t\t\tthis.options = options;\n\t\t\treturn this;\n\t\t},\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tif (url === undefined) url = '';\n\t\t\tif (this.path !== undefined) url = this.path + url;\n\t\t\turl = this.manager.resolveURL(url);\n\t\t\tvar scope = this;\n\t\t\tvar cached = Cache.get(url);\n\n\t\t\tif (cached !== undefined) {\n\t\t\t\tscope.manager.itemStart(url);\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (onLoad) onLoad(cached);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, 0);\n\t\t\t\treturn cached;\n\t\t\t}\n\n\t\t\tvar fetchOptions = {};\n\t\t\tfetchOptions.credentials = this.crossOrigin === 'anonymous' ? 'same-origin' : 'include';\n\t\t\tfetch(url, fetchOptions).then(function (res) {\n\t\t\t\treturn res.blob();\n\t\t\t}).then(function (blob) {\n\t\t\t\treturn createImageBitmap(blob, scope.options);\n\t\t\t}).then(function (imageBitmap) {\n\t\t\t\tCache.add(url, imageBitmap);\n\t\t\t\tif (onLoad) onLoad(imageBitmap);\n\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t}).catch(function (e) {\n\t\t\t\tif (onError) onError(e);\n\t\t\t\tscope.manager.itemError(url);\n\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t});\n\t\t\tscope.manager.itemStart(url);\n\t\t}\n\t});\n\n\tfunction ShapePath() {\n\t\tthis.type = 'ShapePath';\n\t\tthis.color = new Color();\n\t\tthis.subPaths = [];\n\t\tthis.currentPath = null;\n\t}\n\n\tObject.assign(ShapePath.prototype, {\n\t\tmoveTo: function moveTo(x, y) {\n\t\t\tthis.currentPath = new Path();\n\t\t\tthis.subPaths.push(this.currentPath);\n\t\t\tthis.currentPath.moveTo(x, y);\n\t\t\treturn this;\n\t\t},\n\t\tlineTo: function lineTo(x, y) {\n\t\t\tthis.currentPath.lineTo(x, y);\n\t\t\treturn this;\n\t\t},\n\t\tquadraticCurveTo: function quadraticCurveTo(aCPx, aCPy, aX, aY) {\n\t\t\tthis.currentPath.quadraticCurveTo(aCPx, aCPy, aX, aY);\n\t\t\treturn this;\n\t\t},\n\t\tbezierCurveTo: function bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {\n\t\t\tthis.currentPath.bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY);\n\t\t\treturn this;\n\t\t},\n\t\tsplineThru: function splineThru(pts) {\n\t\t\tthis.currentPath.splineThru(pts);\n\t\t\treturn this;\n\t\t},\n\t\ttoShapes: function toShapes(isCCW, noHoles) {\n\t\t\tfunction toShapesNoHoles(inSubpaths) {\n\t\t\t\tvar shapes = [];\n\n\t\t\t\tfor (var i = 0, l = inSubpaths.length; i < l; i++) {\n\t\t\t\t\tvar _tmpPath = inSubpaths[i];\n\n\t\t\t\t\tvar _tmpShape = new Shape();\n\n\t\t\t\t\t_tmpShape.curves = _tmpPath.curves;\n\t\t\t\t\tshapes.push(_tmpShape);\n\t\t\t\t}\n\n\t\t\t\treturn shapes;\n\t\t\t}\n\n\t\t\tfunction isPointInsidePolygon(inPt, inPolygon) {\n\t\t\t\tvar polyLen = inPolygon.length; // inPt on polygon contour => immediate success\t\tor\n\t\t\t\t// toggling of inside/outside at every single! intersection point of an edge\n\t\t\t\t//\twith the horizontal line through inPt, left of inPt\n\t\t\t\t//\tnot counting lowerY endpoints of edges and whole edges on that line\n\n\t\t\t\tvar inside = false;\n\n\t\t\t\tfor (var p = polyLen - 1, q = 0; q < polyLen; p = q++) {\n\t\t\t\t\tvar edgeLowPt = inPolygon[p];\n\t\t\t\t\tvar edgeHighPt = inPolygon[q];\n\t\t\t\t\tvar edgeDx = edgeHighPt.x - edgeLowPt.x;\n\t\t\t\t\tvar edgeDy = edgeHighPt.y - edgeLowPt.y;\n\n\t\t\t\t\tif (Math.abs(edgeDy) > Number.EPSILON) {\n\t\t\t\t\t\t// not parallel\n\t\t\t\t\t\tif (edgeDy < 0) {\n\t\t\t\t\t\t\tedgeLowPt = inPolygon[q];\n\t\t\t\t\t\t\tedgeDx = -edgeDx;\n\t\t\t\t\t\t\tedgeHighPt = inPolygon[p];\n\t\t\t\t\t\t\tedgeDy = -edgeDy;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (inPt.y < edgeLowPt.y || inPt.y > edgeHighPt.y) continue;\n\n\t\t\t\t\t\tif (inPt.y === edgeLowPt.y) {\n\t\t\t\t\t\t\tif (inPt.x === edgeLowPt.x) return true; // inPt is on contour ?\n\t\t\t\t\t\t\t// continue;\t\t\t\t// no intersection or edgeLowPt => doesn't count !!!\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar perpEdge = edgeDy * (inPt.x - edgeLowPt.x) - edgeDx * (inPt.y - edgeLowPt.y);\n\t\t\t\t\t\t\tif (perpEdge === 0) return true; // inPt is on contour ?\n\n\t\t\t\t\t\t\tif (perpEdge < 0) continue;\n\t\t\t\t\t\t\tinside = !inside; // true intersection left of inPt\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// parallel or collinear\n\t\t\t\t\t\tif (inPt.y !== edgeLowPt.y) continue; // parallel\n\t\t\t\t\t\t// edge lies on the same horizontal line as inPt\n\n\t\t\t\t\t\tif (edgeHighPt.x <= inPt.x && inPt.x <= edgeLowPt.x || edgeLowPt.x <= inPt.x && inPt.x <= edgeHighPt.x) return true; // inPt: Point on contour !\n\t\t\t\t\t\t// continue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn inside;\n\t\t\t}\n\n\t\t\tvar isClockWise = ShapeUtils.isClockWise;\n\t\t\tvar subPaths = this.subPaths;\n\t\t\tif (subPaths.length === 0) return [];\n\t\t\tif (noHoles === true) return toShapesNoHoles(subPaths);\n\t\t\tvar solid, tmpPath, tmpShape;\n\t\t\tvar shapes = [];\n\n\t\t\tif (subPaths.length === 1) {\n\t\t\t\ttmpPath = subPaths[0];\n\t\t\t\ttmpShape = new Shape();\n\t\t\t\ttmpShape.curves = tmpPath.curves;\n\t\t\t\tshapes.push(tmpShape);\n\t\t\t\treturn shapes;\n\t\t\t}\n\n\t\t\tvar holesFirst = !isClockWise(subPaths[0].getPoints());\n\t\t\tholesFirst = isCCW ? !holesFirst : holesFirst; // console.log(\"Holes first\", holesFirst);\n\n\t\t\tvar betterShapeHoles = [];\n\t\t\tvar newShapes = [];\n\t\t\tvar newShapeHoles = [];\n\t\t\tvar mainIdx = 0;\n\t\t\tvar tmpPoints;\n\t\t\tnewShapes[mainIdx] = undefined;\n\t\t\tnewShapeHoles[mainIdx] = [];\n\n\t\t\tfor (var i = 0, l = subPaths.length; i < l; i++) {\n\t\t\t\ttmpPath = subPaths[i];\n\t\t\t\ttmpPoints = tmpPath.getPoints();\n\t\t\t\tsolid = isClockWise(tmpPoints);\n\t\t\t\tsolid = isCCW ? !solid : solid;\n\n\t\t\t\tif (solid) {\n\t\t\t\t\tif (!holesFirst && newShapes[mainIdx]) mainIdx++;\n\t\t\t\t\tnewShapes[mainIdx] = {\n\t\t\t\t\t\ts: new Shape(),\n\t\t\t\t\t\tp: tmpPoints\n\t\t\t\t\t};\n\t\t\t\t\tnewShapes[mainIdx].s.curves = tmpPath.curves;\n\t\t\t\t\tif (holesFirst) mainIdx++;\n\t\t\t\t\tnewShapeHoles[mainIdx] = []; //console.log('cw', i);\n\t\t\t\t} else {\n\t\t\t\t\tnewShapeHoles[mainIdx].push({\n\t\t\t\t\t\th: tmpPath,\n\t\t\t\t\t\tp: tmpPoints[0]\n\t\t\t\t\t}); //console.log('ccw', i);\n\t\t\t\t}\n\t\t\t} // only Holes? -> probably all Shapes with wrong orientation\n\n\n\t\t\tif (!newShapes[0]) return toShapesNoHoles(subPaths);\n\n\t\t\tif (newShapes.length > 1) {\n\t\t\t\tvar ambiguous = false;\n\t\t\t\tvar toChange = [];\n\n\t\t\t\tfor (var sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx++) {\n\t\t\t\t\tbetterShapeHoles[sIdx] = [];\n\t\t\t\t}\n\n\t\t\t\tfor (var _sIdx = 0, _sLen = newShapes.length; _sIdx < _sLen; _sIdx++) {\n\t\t\t\t\tvar sho = newShapeHoles[_sIdx];\n\n\t\t\t\t\tfor (var hIdx = 0; hIdx < sho.length; hIdx++) {\n\t\t\t\t\t\tvar ho = sho[hIdx];\n\t\t\t\t\t\tvar hole_unassigned = true;\n\n\t\t\t\t\t\tfor (var s2Idx = 0; s2Idx < newShapes.length; s2Idx++) {\n\t\t\t\t\t\t\tif (isPointInsidePolygon(ho.p, newShapes[s2Idx].p)) {\n\t\t\t\t\t\t\t\tif (_sIdx !== s2Idx) toChange.push({\n\t\t\t\t\t\t\t\t\tfroms: _sIdx,\n\t\t\t\t\t\t\t\t\ttos: s2Idx,\n\t\t\t\t\t\t\t\t\thole: hIdx\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (hole_unassigned) {\n\t\t\t\t\t\t\t\t\thole_unassigned = false;\n\t\t\t\t\t\t\t\t\tbetterShapeHoles[s2Idx].push(ho);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tambiguous = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (hole_unassigned) {\n\t\t\t\t\t\t\tbetterShapeHoles[_sIdx].push(ho);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // console.log(\"ambiguous: \", ambiguous);\n\n\n\t\t\t\tif (toChange.length > 0) {\n\t\t\t\t\t// console.log(\"to change: \", toChange);\n\t\t\t\t\tif (!ambiguous) newShapeHoles = betterShapeHoles;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar tmpHoles;\n\n\t\t\tfor (var _i = 0, il = newShapes.length; _i < il; _i++) {\n\t\t\t\ttmpShape = newShapes[_i].s;\n\t\t\t\tshapes.push(tmpShape);\n\t\t\t\ttmpHoles = newShapeHoles[_i];\n\n\t\t\t\tfor (var j = 0, jl = tmpHoles.length; j < jl; j++) {\n\t\t\t\t\ttmpShape.holes.push(tmpHoles[j].h);\n\t\t\t\t}\n\t\t\t} //console.log(\"shape\", shapes);\n\n\n\t\t\treturn shapes;\n\t\t}\n\t});\n\n\tvar Font = /*#__PURE__*/function () {\n\t\tfunction Font(data) {\n\t\t\tObject.defineProperty(this, 'isFont', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.type = 'Font';\n\t\t\tthis.data = data;\n\t\t}\n\n\t\tvar _proto = Font.prototype;\n\n\t\t_proto.generateShapes = function generateShapes(text, size) {\n\t\t\tif (size === void 0) {\n\t\t\t\tsize = 100;\n\t\t\t}\n\n\t\t\tvar shapes = [];\n\t\t\tvar paths = createPaths(text, size, this.data);\n\n\t\t\tfor (var p = 0, pl = paths.length; p < pl; p++) {\n\t\t\t\tArray.prototype.push.apply(shapes, paths[p].toShapes());\n\t\t\t}\n\n\t\t\treturn shapes;\n\t\t};\n\n\t\treturn Font;\n\t}();\n\n\tfunction createPaths(text, size, data) {\n\t\tvar chars = Array.from ? Array.from(text) : String(text).split(''); // workaround for IE11, see #13988\n\n\t\tvar scale = size / data.resolution;\n\t\tvar line_height = (data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness) * scale;\n\t\tvar paths = [];\n\t\tvar offsetX = 0,\n\t\t\t\toffsetY = 0;\n\n\t\tfor (var i = 0; i < chars.length; i++) {\n\t\t\tvar char = chars[i];\n\n\t\t\tif (char === '\\n') {\n\t\t\t\toffsetX = 0;\n\t\t\t\toffsetY -= line_height;\n\t\t\t} else {\n\t\t\t\tvar ret = createPath(char, scale, offsetX, offsetY, data);\n\t\t\t\toffsetX += ret.offsetX;\n\t\t\t\tpaths.push(ret.path);\n\t\t\t}\n\t\t}\n\n\t\treturn paths;\n\t}\n\n\tfunction createPath(char, scale, offsetX, offsetY, data) {\n\t\tvar glyph = data.glyphs[char] || data.glyphs['?'];\n\n\t\tif (!glyph) {\n\t\t\tconsole.error('THREE.Font: character \"' + char + '\" does not exists in font family ' + data.familyName + '.');\n\t\t\treturn;\n\t\t}\n\n\t\tvar path = new ShapePath();\n\t\tvar x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2;\n\n\t\tif (glyph.o) {\n\t\t\tvar outline = glyph._cachedOutline || (glyph._cachedOutline = glyph.o.split(' '));\n\n\t\t\tfor (var i = 0, l = outline.length; i < l;) {\n\t\t\t\tvar action = outline[i++];\n\n\t\t\t\tswitch (action) {\n\t\t\t\t\tcase 'm':\n\t\t\t\t\t\t// moveTo\n\t\t\t\t\t\tx = outline[i++] * scale + offsetX;\n\t\t\t\t\t\ty = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tpath.moveTo(x, y);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'l':\n\t\t\t\t\t\t// lineTo\n\t\t\t\t\t\tx = outline[i++] * scale + offsetX;\n\t\t\t\t\t\ty = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tpath.lineTo(x, y);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'q':\n\t\t\t\t\t\t// quadraticCurveTo\n\t\t\t\t\t\tcpx = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tcpx1 = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy1 = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tpath.quadraticCurveTo(cpx1, cpy1, cpx, cpy);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t// bezierCurveTo\n\t\t\t\t\t\tcpx = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tcpx1 = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy1 = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tcpx2 = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy2 = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tpath.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, cpx, cpy);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\toffsetX: glyph.ha * scale,\n\t\t\tpath: path\n\t\t};\n\t}\n\n\tfunction FontLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tFontLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: FontLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(this.manager);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.setRequestHeader(this.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\tvar json;\n\n\t\t\t\ttry {\n\t\t\t\t\tjson = JSON.parse(text);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.warn('THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead.');\n\t\t\t\t\tjson = JSON.parse(text.substring(65, text.length - 2));\n\t\t\t\t}\n\n\t\t\t\tvar font = scope.parse(json);\n\t\t\t\tif (onLoad) onLoad(font);\n\t\t\t}, onProgress, onError);\n\t\t},\n\t\tparse: function parse(json) {\n\t\t\treturn new Font(json);\n\t\t}\n\t});\n\n\tvar _context;\n\n\tvar AudioContext = {\n\t\tgetContext: function getContext() {\n\t\t\tif (_context === undefined) {\n\t\t\t\t_context = new (window.AudioContext || window.webkitAudioContext)();\n\t\t\t}\n\n\t\t\treturn _context;\n\t\t},\n\t\tsetContext: function setContext(value) {\n\t\t\t_context = value;\n\t\t}\n\t};\n\n\tfunction AudioLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tAudioLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: AudioLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(scope.manager);\n\t\t\tloader.setResponseType('arraybuffer');\n\t\t\tloader.setPath(scope.path);\n\t\t\tloader.setRequestHeader(scope.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (buffer) {\n\t\t\t\ttry {\n\t\t\t\t\t// Create a copy of the buffer. The `decodeAudioData` method\n\t\t\t\t\t// detaches the buffer when complete, preventing reuse.\n\t\t\t\t\tvar bufferCopy = buffer.slice(0);\n\t\t\t\t\tvar context = AudioContext.getContext();\n\t\t\t\t\tcontext.decodeAudioData(bufferCopy, function (audioBuffer) {\n\t\t\t\t\t\tonLoad(audioBuffer);\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (onError) {\n\t\t\t\t\t\tonError(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t}\n\t});\n\n\tfunction HemisphereLightProbe(skyColor, groundColor, intensity) {\n\t\tLightProbe.call(this, undefined, intensity);\n\t\tvar color1 = new Color().set(skyColor);\n\t\tvar color2 = new Color().set(groundColor);\n\t\tvar sky = new Vector3(color1.r, color1.g, color1.b);\n\t\tvar ground = new Vector3(color2.r, color2.g, color2.b); // without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI );\n\n\t\tvar c0 = Math.sqrt(Math.PI);\n\t\tvar c1 = c0 * Math.sqrt(0.75);\n\t\tthis.sh.coefficients[0].copy(sky).add(ground).multiplyScalar(c0);\n\t\tthis.sh.coefficients[1].copy(sky).sub(ground).multiplyScalar(c1);\n\t}\n\n\tHemisphereLightProbe.prototype = Object.assign(Object.create(LightProbe.prototype), {\n\t\tconstructor: HemisphereLightProbe,\n\t\tisHemisphereLightProbe: true,\n\t\tcopy: function copy(source) {\n\t\t\t// modifying colors not currently supported\n\t\t\tLightProbe.prototype.copy.call(this, source);\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = LightProbe.prototype.toJSON.call(this, meta); // data.sh = this.sh.toArray(); // todo\n\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction AmbientLightProbe(color, intensity) {\n\t\tLightProbe.call(this, undefined, intensity);\n\t\tvar color1 = new Color().set(color); // without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI );\n\n\t\tthis.sh.coefficients[0].set(color1.r, color1.g, color1.b).multiplyScalar(2 * Math.sqrt(Math.PI));\n\t}\n\n\tAmbientLightProbe.prototype = Object.assign(Object.create(LightProbe.prototype), {\n\t\tconstructor: AmbientLightProbe,\n\t\tisAmbientLightProbe: true,\n\t\tcopy: function copy(source) {\n\t\t\t// modifying color not currently supported\n\t\t\tLightProbe.prototype.copy.call(this, source);\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = LightProbe.prototype.toJSON.call(this, meta); // data.sh = this.sh.toArray(); // todo\n\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tvar _eyeRight = new Matrix4();\n\n\tvar _eyeLeft = new Matrix4();\n\n\tfunction StereoCamera() {\n\t\tthis.type = 'StereoCamera';\n\t\tthis.aspect = 1;\n\t\tthis.eyeSep = 0.064;\n\t\tthis.cameraL = new PerspectiveCamera();\n\t\tthis.cameraL.layers.enable(1);\n\t\tthis.cameraL.matrixAutoUpdate = false;\n\t\tthis.cameraR = new PerspectiveCamera();\n\t\tthis.cameraR.layers.enable(2);\n\t\tthis.cameraR.matrixAutoUpdate = false;\n\t\tthis._cache = {\n\t\t\tfocus: null,\n\t\t\tfov: null,\n\t\t\taspect: null,\n\t\t\tnear: null,\n\t\t\tfar: null,\n\t\t\tzoom: null,\n\t\t\teyeSep: null\n\t\t};\n\t}\n\n\tObject.assign(StereoCamera.prototype, {\n\t\tupdate: function update(camera) {\n\t\t\tvar cache = this._cache;\n\t\t\tvar needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;\n\n\t\t\tif (needsUpdate) {\n\t\t\t\tcache.focus = camera.focus;\n\t\t\t\tcache.fov = camera.fov;\n\t\t\t\tcache.aspect = camera.aspect * this.aspect;\n\t\t\t\tcache.near = camera.near;\n\t\t\t\tcache.far = camera.far;\n\t\t\t\tcache.zoom = camera.zoom;\n\t\t\t\tcache.eyeSep = this.eyeSep; // Off-axis stereoscopic effect based on\n\t\t\t\t// http://paulbourke.net/stereographics/stereorender/\n\n\t\t\t\tvar projectionMatrix = camera.projectionMatrix.clone();\n\t\t\t\tvar eyeSepHalf = cache.eyeSep / 2;\n\t\t\t\tvar eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;\n\t\t\t\tvar ymax = cache.near * Math.tan(MathUtils.DEG2RAD * cache.fov * 0.5) / cache.zoom;\n\t\t\t\tvar xmin, xmax; // translate xOffset\n\n\t\t\t\t_eyeLeft.elements[12] = -eyeSepHalf;\n\t\t\t\t_eyeRight.elements[12] = eyeSepHalf; // for left eye\n\n\t\t\t\txmin = -ymax * cache.aspect + eyeSepOnProjection;\n\t\t\t\txmax = ymax * cache.aspect + eyeSepOnProjection;\n\t\t\t\tprojectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin);\n\t\t\t\tprojectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);\n\t\t\t\tthis.cameraL.projectionMatrix.copy(projectionMatrix); // for right eye\n\n\t\t\t\txmin = -ymax * cache.aspect - eyeSepOnProjection;\n\t\t\t\txmax = ymax * cache.aspect - eyeSepOnProjection;\n\t\t\t\tprojectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin);\n\t\t\t\tprojectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);\n\t\t\t\tthis.cameraR.projectionMatrix.copy(projectionMatrix);\n\t\t\t}\n\n\t\t\tthis.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft);\n\t\t\tthis.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight);\n\t\t}\n\t});\n\n\tvar Clock = /*#__PURE__*/function () {\n\t\tfunction Clock(autoStart) {\n\t\t\tthis.autoStart = autoStart !== undefined ? autoStart : true;\n\t\t\tthis.startTime = 0;\n\t\t\tthis.oldTime = 0;\n\t\t\tthis.elapsedTime = 0;\n\t\t\tthis.running = false;\n\t\t}\n\n\t\tvar _proto = Clock.prototype;\n\n\t\t_proto.start = function start() {\n\t\t\tthis.startTime = now();\n\t\t\tthis.oldTime = this.startTime;\n\t\t\tthis.elapsedTime = 0;\n\t\t\tthis.running = true;\n\t\t};\n\n\t\t_proto.stop = function stop() {\n\t\t\tthis.getElapsedTime();\n\t\t\tthis.running = false;\n\t\t\tthis.autoStart = false;\n\t\t};\n\n\t\t_proto.getElapsedTime = function getElapsedTime() {\n\t\t\tthis.getDelta();\n\t\t\treturn this.elapsedTime;\n\t\t};\n\n\t\t_proto.getDelta = function getDelta() {\n\t\t\tvar diff = 0;\n\n\t\t\tif (this.autoStart && !this.running) {\n\t\t\t\tthis.start();\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (this.running) {\n\t\t\t\tvar newTime = now();\n\t\t\t\tdiff = (newTime - this.oldTime) / 1000;\n\t\t\t\tthis.oldTime = newTime;\n\t\t\t\tthis.elapsedTime += diff;\n\t\t\t}\n\n\t\t\treturn diff;\n\t\t};\n\n\t\treturn Clock;\n\t}();\n\n\tfunction now() {\n\t\treturn (typeof performance === 'undefined' ? Date : performance).now(); // see #10732\n\t}\n\n\tvar _position$2 = /*@__PURE__*/new Vector3();\n\n\tvar _quaternion$3 = /*@__PURE__*/new Quaternion();\n\n\tvar _scale$1 = /*@__PURE__*/new Vector3();\n\n\tvar _orientation = /*@__PURE__*/new Vector3();\n\n\tvar AudioListener = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(AudioListener, _Object3D);\n\n\t\tfunction AudioListener() {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.type = 'AudioListener';\n\t\t\t_this.context = AudioContext.getContext();\n\t\t\t_this.gain = _this.context.createGain();\n\n\t\t\t_this.gain.connect(_this.context.destination);\n\n\t\t\t_this.filter = null;\n\t\t\t_this.timeDelta = 0; // private\n\n\t\t\t_this._clock = new Clock();\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = AudioListener.prototype;\n\n\t\t_proto.getInput = function getInput() {\n\t\t\treturn this.gain;\n\t\t};\n\n\t\t_proto.removeFilter = function removeFilter() {\n\t\t\tif (this.filter !== null) {\n\t\t\t\tthis.gain.disconnect(this.filter);\n\t\t\t\tthis.filter.disconnect(this.context.destination);\n\t\t\t\tthis.gain.connect(this.context.destination);\n\t\t\t\tthis.filter = null;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getFilter = function getFilter() {\n\t\t\treturn this.filter;\n\t\t};\n\n\t\t_proto.setFilter = function setFilter(value) {\n\t\t\tif (this.filter !== null) {\n\t\t\t\tthis.gain.disconnect(this.filter);\n\t\t\t\tthis.filter.disconnect(this.context.destination);\n\t\t\t} else {\n\t\t\t\tthis.gain.disconnect(this.context.destination);\n\t\t\t}\n\n\t\t\tthis.filter = value;\n\t\t\tthis.gain.connect(this.filter);\n\t\t\tthis.filter.connect(this.context.destination);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getMasterVolume = function getMasterVolume() {\n\t\t\treturn this.gain.gain.value;\n\t\t};\n\n\t\t_proto.setMasterVolume = function setMasterVolume(value) {\n\t\t\tthis.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\t_Object3D.prototype.updateMatrixWorld.call(this, force);\n\n\t\t\tvar listener = this.context.listener;\n\t\t\tvar up = this.up;\n\t\t\tthis.timeDelta = this._clock.getDelta();\n\t\t\tthis.matrixWorld.decompose(_position$2, _quaternion$3, _scale$1);\n\n\t\t\t_orientation.set(0, 0, -1).applyQuaternion(_quaternion$3);\n\n\t\t\tif (listener.positionX) {\n\t\t\t\t// code path for Chrome (see #14393)\n\t\t\t\tvar endTime = this.context.currentTime + this.timeDelta;\n\t\t\t\tlistener.positionX.linearRampToValueAtTime(_position$2.x, endTime);\n\t\t\t\tlistener.positionY.linearRampToValueAtTime(_position$2.y, endTime);\n\t\t\t\tlistener.positionZ.linearRampToValueAtTime(_position$2.z, endTime);\n\t\t\t\tlistener.forwardX.linearRampToValueAtTime(_orientation.x, endTime);\n\t\t\t\tlistener.forwardY.linearRampToValueAtTime(_orientation.y, endTime);\n\t\t\t\tlistener.forwardZ.linearRampToValueAtTime(_orientation.z, endTime);\n\t\t\t\tlistener.upX.linearRampToValueAtTime(up.x, endTime);\n\t\t\t\tlistener.upY.linearRampToValueAtTime(up.y, endTime);\n\t\t\t\tlistener.upZ.linearRampToValueAtTime(up.z, endTime);\n\t\t\t} else {\n\t\t\t\tlistener.setPosition(_position$2.x, _position$2.y, _position$2.z);\n\t\t\t\tlistener.setOrientation(_orientation.x, _orientation.y, _orientation.z, up.x, up.y, up.z);\n\t\t\t}\n\t\t};\n\n\t\treturn AudioListener;\n\t}(Object3D);\n\n\tvar Audio = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(Audio, _Object3D);\n\n\t\tfunction Audio(listener) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.type = 'Audio';\n\t\t\t_this.listener = listener;\n\t\t\t_this.context = listener.context;\n\t\t\t_this.gain = _this.context.createGain();\n\n\t\t\t_this.gain.connect(listener.getInput());\n\n\t\t\t_this.autoplay = false;\n\t\t\t_this.buffer = null;\n\t\t\t_this.detune = 0;\n\t\t\t_this.loop = false;\n\t\t\t_this.loopStart = 0;\n\t\t\t_this.loopEnd = 0;\n\t\t\t_this.offset = 0;\n\t\t\t_this.duration = undefined;\n\t\t\t_this.playbackRate = 1;\n\t\t\t_this.isPlaying = false;\n\t\t\t_this.hasPlaybackControl = true;\n\t\t\t_this.source = null;\n\t\t\t_this.sourceType = 'empty';\n\t\t\t_this._startedAt = 0;\n\t\t\t_this._progress = 0;\n\t\t\t_this._connected = false;\n\t\t\t_this.filters = [];\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = Audio.prototype;\n\n\t\t_proto.getOutput = function getOutput() {\n\t\t\treturn this.gain;\n\t\t};\n\n\t\t_proto.setNodeSource = function setNodeSource(audioNode) {\n\t\t\tthis.hasPlaybackControl = false;\n\t\t\tthis.sourceType = 'audioNode';\n\t\t\tthis.source = audioNode;\n\t\t\tthis.connect();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setMediaElementSource = function setMediaElementSource(mediaElement) {\n\t\t\tthis.hasPlaybackControl = false;\n\t\t\tthis.sourceType = 'mediaNode';\n\t\t\tthis.source = this.context.createMediaElementSource(mediaElement);\n\t\t\tthis.connect();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setMediaStreamSource = function setMediaStreamSource(mediaStream) {\n\t\t\tthis.hasPlaybackControl = false;\n\t\t\tthis.sourceType = 'mediaStreamNode';\n\t\t\tthis.source = this.context.createMediaStreamSource(mediaStream);\n\t\t\tthis.connect();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setBuffer = function setBuffer(audioBuffer) {\n\t\t\tthis.buffer = audioBuffer;\n\t\t\tthis.sourceType = 'buffer';\n\t\t\tif (this.autoplay) this.play();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.play = function play(delay) {\n\t\t\tif (delay === void 0) {\n\t\t\t\tdelay = 0;\n\t\t\t}\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\tconsole.warn('THREE.Audio: Audio is already playing.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._startedAt = this.context.currentTime + delay;\n\t\t\tvar source = this.context.createBufferSource();\n\t\t\tsource.buffer = this.buffer;\n\t\t\tsource.loop = this.loop;\n\t\t\tsource.loopStart = this.loopStart;\n\t\t\tsource.loopEnd = this.loopEnd;\n\t\t\tsource.onended = this.onEnded.bind(this);\n\t\t\tsource.start(this._startedAt, this._progress + this.offset, this.duration);\n\t\t\tthis.isPlaying = true;\n\t\t\tthis.source = source;\n\t\t\tthis.setDetune(this.detune);\n\t\t\tthis.setPlaybackRate(this.playbackRate);\n\t\t\treturn this.connect();\n\t\t};\n\n\t\t_proto.pause = function pause() {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\t// update current progress\n\t\t\t\tthis._progress += Math.max(this.context.currentTime - this._startedAt, 0) * this.playbackRate;\n\n\t\t\t\tif (this.loop === true) {\n\t\t\t\t\t// ensure _progress does not exceed duration with looped audios\n\t\t\t\t\tthis._progress = this._progress % (this.duration || this.buffer.duration);\n\t\t\t\t}\n\n\t\t\t\tthis.source.stop();\n\t\t\t\tthis.source.onended = null;\n\t\t\t\tthis.isPlaying = false;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.stop = function stop() {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._progress = 0;\n\t\t\tthis.source.stop();\n\t\t\tthis.source.onended = null;\n\t\t\tthis.isPlaying = false;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.connect = function connect() {\n\t\t\tif (this.filters.length > 0) {\n\t\t\t\tthis.source.connect(this.filters[0]);\n\n\t\t\t\tfor (var i = 1, l = this.filters.length; i < l; i++) {\n\t\t\t\t\tthis.filters[i - 1].connect(this.filters[i]);\n\t\t\t\t}\n\n\t\t\t\tthis.filters[this.filters.length - 1].connect(this.getOutput());\n\t\t\t} else {\n\t\t\t\tthis.source.connect(this.getOutput());\n\t\t\t}\n\n\t\t\tthis._connected = true;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.disconnect = function disconnect() {\n\t\t\tif (this.filters.length > 0) {\n\t\t\t\tthis.source.disconnect(this.filters[0]);\n\n\t\t\t\tfor (var i = 1, l = this.filters.length; i < l; i++) {\n\t\t\t\t\tthis.filters[i - 1].disconnect(this.filters[i]);\n\t\t\t\t}\n\n\t\t\t\tthis.filters[this.filters.length - 1].disconnect(this.getOutput());\n\t\t\t} else {\n\t\t\t\tthis.source.disconnect(this.getOutput());\n\t\t\t}\n\n\t\t\tthis._connected = false;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getFilters = function getFilters() {\n\t\t\treturn this.filters;\n\t\t};\n\n\t\t_proto.setFilters = function setFilters(value) {\n\t\t\tif (!value) value = [];\n\n\t\t\tif (this._connected === true) {\n\t\t\t\tthis.disconnect();\n\t\t\t\tthis.filters = value.slice();\n\t\t\t\tthis.connect();\n\t\t\t} else {\n\t\t\t\tthis.filters = value.slice();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setDetune = function setDetune(value) {\n\t\t\tthis.detune = value;\n\t\t\tif (this.source.detune === undefined) return; // only set detune when available\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\tthis.source.detune.setTargetAtTime(this.detune, this.context.currentTime, 0.01);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getDetune = function getDetune() {\n\t\t\treturn this.detune;\n\t\t};\n\n\t\t_proto.getFilter = function getFilter() {\n\t\t\treturn this.getFilters()[0];\n\t\t};\n\n\t\t_proto.setFilter = function setFilter(filter) {\n\t\t\treturn this.setFilters(filter ? [filter] : []);\n\t\t};\n\n\t\t_proto.setPlaybackRate = function setPlaybackRate(value) {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.playbackRate = value;\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\tthis.source.playbackRate.setTargetAtTime(this.playbackRate, this.context.currentTime, 0.01);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getPlaybackRate = function getPlaybackRate() {\n\t\t\treturn this.playbackRate;\n\t\t};\n\n\t\t_proto.onEnded = function onEnded() {\n\t\t\tthis.isPlaying = false;\n\t\t};\n\n\t\t_proto.getLoop = function getLoop() {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn this.loop;\n\t\t};\n\n\t\t_proto.setLoop = function setLoop(value) {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.loop = value;\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\tthis.source.loop = this.loop;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setLoopStart = function setLoopStart(value) {\n\t\t\tthis.loopStart = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setLoopEnd = function setLoopEnd(value) {\n\t\t\tthis.loopEnd = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getVolume = function getVolume() {\n\t\t\treturn this.gain.gain.value;\n\t\t};\n\n\t\t_proto.setVolume = function setVolume(value) {\n\t\t\tthis.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01);\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Audio;\n\t}(Object3D);\n\n\tvar _position$3 = /*@__PURE__*/new Vector3();\n\n\tvar _quaternion$4 = /*@__PURE__*/new Quaternion();\n\n\tvar _scale$2 = /*@__PURE__*/new Vector3();\n\n\tvar _orientation$1 = /*@__PURE__*/new Vector3();\n\n\tvar PositionalAudio = /*#__PURE__*/function (_Audio) {\n\t\t_inheritsLoose(PositionalAudio, _Audio);\n\n\t\tfunction PositionalAudio(listener) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Audio.call(this, listener) || this;\n\t\t\t_this.panner = _this.context.createPanner();\n\t\t\t_this.panner.panningModel = 'HRTF';\n\n\t\t\t_this.panner.connect(_this.gain);\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = PositionalAudio.prototype;\n\n\t\t_proto.getOutput = function getOutput() {\n\t\t\treturn this.panner;\n\t\t};\n\n\t\t_proto.getRefDistance = function getRefDistance() {\n\t\t\treturn this.panner.refDistance;\n\t\t};\n\n\t\t_proto.setRefDistance = function setRefDistance(value) {\n\t\t\tthis.panner.refDistance = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getRolloffFactor = function getRolloffFactor() {\n\t\t\treturn this.panner.rolloffFactor;\n\t\t};\n\n\t\t_proto.setRolloffFactor = function setRolloffFactor(value) {\n\t\t\tthis.panner.rolloffFactor = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getDistanceModel = function getDistanceModel() {\n\t\t\treturn this.panner.distanceModel;\n\t\t};\n\n\t\t_proto.setDistanceModel = function setDistanceModel(value) {\n\t\t\tthis.panner.distanceModel = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getMaxDistance = function getMaxDistance() {\n\t\t\treturn this.panner.maxDistance;\n\t\t};\n\n\t\t_proto.setMaxDistance = function setMaxDistance(value) {\n\t\t\tthis.panner.maxDistance = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setDirectionalCone = function setDirectionalCone(coneInnerAngle, coneOuterAngle, coneOuterGain) {\n\t\t\tthis.panner.coneInnerAngle = coneInnerAngle;\n\t\t\tthis.panner.coneOuterAngle = coneOuterAngle;\n\t\t\tthis.panner.coneOuterGain = coneOuterGain;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\t_Audio.prototype.updateMatrixWorld.call(this, force);\n\n\t\t\tif (this.hasPlaybackControl === true && this.isPlaying === false) return;\n\t\t\tthis.matrixWorld.decompose(_position$3, _quaternion$4, _scale$2);\n\n\t\t\t_orientation$1.set(0, 0, 1).applyQuaternion(_quaternion$4);\n\n\t\t\tvar panner = this.panner;\n\n\t\t\tif (panner.positionX) {\n\t\t\t\t// code path for Chrome and Firefox (see #14393)\n\t\t\t\tvar endTime = this.context.currentTime + this.listener.timeDelta;\n\t\t\t\tpanner.positionX.linearRampToValueAtTime(_position$3.x, endTime);\n\t\t\t\tpanner.positionY.linearRampToValueAtTime(_position$3.y, endTime);\n\t\t\t\tpanner.positionZ.linearRampToValueAtTime(_position$3.z, endTime);\n\t\t\t\tpanner.orientationX.linearRampToValueAtTime(_orientation$1.x, endTime);\n\t\t\t\tpanner.orientationY.linearRampToValueAtTime(_orientation$1.y, endTime);\n\t\t\t\tpanner.orientationZ.linearRampToValueAtTime(_orientation$1.z, endTime);\n\t\t\t} else {\n\t\t\t\tpanner.setPosition(_position$3.x, _position$3.y, _position$3.z);\n\t\t\t\tpanner.setOrientation(_orientation$1.x, _orientation$1.y, _orientation$1.z);\n\t\t\t}\n\t\t};\n\n\t\treturn PositionalAudio;\n\t}(Audio);\n\n\tvar AudioAnalyser = /*#__PURE__*/function () {\n\t\tfunction AudioAnalyser(audio, fftSize) {\n\t\t\tif (fftSize === void 0) {\n\t\t\t\tfftSize = 2048;\n\t\t\t}\n\n\t\t\tthis.analyser = audio.context.createAnalyser();\n\t\t\tthis.analyser.fftSize = fftSize;\n\t\t\tthis.data = new Uint8Array(this.analyser.frequencyBinCount);\n\t\t\taudio.getOutput().connect(this.analyser);\n\t\t}\n\n\t\tvar _proto = AudioAnalyser.prototype;\n\n\t\t_proto.getFrequencyData = function getFrequencyData() {\n\t\t\tthis.analyser.getByteFrequencyData(this.data);\n\t\t\treturn this.data;\n\t\t};\n\n\t\t_proto.getAverageFrequency = function getAverageFrequency() {\n\t\t\tvar value = 0;\n\t\t\tvar data = this.getFrequencyData();\n\n\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\tvalue += data[i];\n\t\t\t}\n\n\t\t\treturn value / data.length;\n\t\t};\n\n\t\treturn AudioAnalyser;\n\t}();\n\n\tfunction PropertyMixer(binding, typeName, valueSize) {\n\t\tthis.binding = binding;\n\t\tthis.valueSize = valueSize;\n\t\tvar mixFunction, mixFunctionAdditive, setIdentity; // buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ]\n\t\t//\n\t\t// interpolators can use .buffer as their .result\n\t\t// the data then goes to 'incoming'\n\t\t//\n\t\t// 'accu0' and 'accu1' are used frame-interleaved for\n\t\t// the cumulative result and are compared to detect\n\t\t// changes\n\t\t//\n\t\t// 'orig' stores the original state of the property\n\t\t//\n\t\t// 'add' is used for additive cumulative results\n\t\t//\n\t\t// 'work' is optional and is only present for quaternion types. It is used\n\t\t// to store intermediate quaternion multiplication results\n\n\t\tswitch (typeName) {\n\t\t\tcase 'quaternion':\n\t\t\t\tmixFunction = this._slerp;\n\t\t\t\tmixFunctionAdditive = this._slerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityQuaternion;\n\t\t\t\tthis.buffer = new Float64Array(valueSize * 6);\n\t\t\t\tthis._workIndex = 5;\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\tcase 'bool':\n\t\t\t\tmixFunction = this._select; // Use the regular mix function and for additive on these types,\n\t\t\t\t// additive is not relevant for non-numeric types\n\n\t\t\t\tmixFunctionAdditive = this._select;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityOther;\n\t\t\t\tthis.buffer = new Array(valueSize * 5);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tmixFunction = this._lerp;\n\t\t\t\tmixFunctionAdditive = this._lerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityNumeric;\n\t\t\t\tthis.buffer = new Float64Array(valueSize * 5);\n\t\t}\n\n\t\tthis._mixBufferRegion = mixFunction;\n\t\tthis._mixBufferRegionAdditive = mixFunctionAdditive;\n\t\tthis._setIdentity = setIdentity;\n\t\tthis._origIndex = 3;\n\t\tthis._addIndex = 4;\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\t\tthis.useCount = 0;\n\t\tthis.referenceCount = 0;\n\t}\n\n\tObject.assign(PropertyMixer.prototype, {\n\t\t// accumulate data in the 'incoming' region into 'accu<i>'\n\t\taccumulate: function accumulate(accuIndex, weight) {\n\t\t\t// note: happily accumulating nothing when weight = 0, the caller knows\n\t\t\t// the weight and shouldn't have made the call in the first place\n\t\t\tvar buffer = this.buffer,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toffset = accuIndex * stride + stride;\n\t\t\tvar currentWeight = this.cumulativeWeight;\n\n\t\t\tif (currentWeight === 0) {\n\t\t\t\t// accuN := incoming * weight\n\t\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\t\tbuffer[offset + i] = buffer[i];\n\t\t\t\t}\n\n\t\t\t\tcurrentWeight = weight;\n\t\t\t} else {\n\t\t\t\t// accuN := accuN + incoming * weight\n\t\t\t\tcurrentWeight += weight;\n\t\t\t\tvar mix = weight / currentWeight;\n\n\t\t\t\tthis._mixBufferRegion(buffer, offset, 0, mix, stride);\n\t\t\t}\n\n\t\t\tthis.cumulativeWeight = currentWeight;\n\t\t},\n\t\t// accumulate data in the 'incoming' region into 'add'\n\t\taccumulateAdditive: function accumulateAdditive(weight) {\n\t\t\tvar buffer = this.buffer,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toffset = stride * this._addIndex;\n\n\t\t\tif (this.cumulativeWeightAdditive === 0) {\n\t\t\t\t// add = identity\n\t\t\t\tthis._setIdentity();\n\t\t\t} // add := add + incoming * weight\n\n\n\t\t\tthis._mixBufferRegionAdditive(buffer, offset, 0, weight, stride);\n\n\t\t\tthis.cumulativeWeightAdditive += weight;\n\t\t},\n\t\t// apply the state of 'accu<i>' to the binding when accus differ\n\t\tapply: function apply(accuIndex) {\n\t\t\tvar stride = this.valueSize,\n\t\t\t\t\tbuffer = this.buffer,\n\t\t\t\t\toffset = accuIndex * stride + stride,\n\t\t\t\t\tweight = this.cumulativeWeight,\n\t\t\t\t\tweightAdditive = this.cumulativeWeightAdditive,\n\t\t\t\t\tbinding = this.binding;\n\t\t\tthis.cumulativeWeight = 0;\n\t\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\t\tif (weight < 1) {\n\t\t\t\t// accuN := accuN + original * ( 1 - cumulativeWeight )\n\t\t\t\tvar originalValueOffset = stride * this._origIndex;\n\n\t\t\t\tthis._mixBufferRegion(buffer, offset, originalValueOffset, 1 - weight, stride);\n\t\t\t}\n\n\t\t\tif (weightAdditive > 0) {\n\t\t\t\t// accuN := accuN + additive accuN\n\t\t\t\tthis._mixBufferRegionAdditive(buffer, offset, this._addIndex * stride, 1, stride);\n\t\t\t}\n\n\t\t\tfor (var i = stride, e = stride + stride; i !== e; ++i) {\n\t\t\t\tif (buffer[i] !== buffer[i + stride]) {\n\t\t\t\t\t// value has changed -> update scene graph\n\t\t\t\t\tbinding.setValue(buffer, offset);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// remember the state of the bound property and copy it to both accus\n\t\tsaveOriginalState: function saveOriginalState() {\n\t\t\tvar binding = this.binding;\n\t\t\tvar buffer = this.buffer,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toriginalValueOffset = stride * this._origIndex;\n\t\t\tbinding.getValue(buffer, originalValueOffset); // accu[0..1] := orig -- initially detect changes against the original\n\n\t\t\tfor (var i = stride, e = originalValueOffset; i !== e; ++i) {\n\t\t\t\tbuffer[i] = buffer[originalValueOffset + i % stride];\n\t\t\t} // Add to identity for additive\n\n\n\t\t\tthis._setIdentity();\n\n\t\t\tthis.cumulativeWeight = 0;\n\t\t\tthis.cumulativeWeightAdditive = 0;\n\t\t},\n\t\t// apply the state previously taken via 'saveOriginalState' to the binding\n\t\trestoreOriginalState: function restoreOriginalState() {\n\t\t\tvar originalValueOffset = this.valueSize * 3;\n\t\t\tthis.binding.setValue(this.buffer, originalValueOffset);\n\t\t},\n\t\t_setAdditiveIdentityNumeric: function _setAdditiveIdentityNumeric() {\n\t\t\tvar startIndex = this._addIndex * this.valueSize;\n\t\t\tvar endIndex = startIndex + this.valueSize;\n\n\t\t\tfor (var i = startIndex; i < endIndex; i++) {\n\t\t\t\tthis.buffer[i] = 0;\n\t\t\t}\n\t\t},\n\t\t_setAdditiveIdentityQuaternion: function _setAdditiveIdentityQuaternion() {\n\t\t\tthis._setAdditiveIdentityNumeric();\n\n\t\t\tthis.buffer[this._addIndex * this.valueSize + 3] = 1;\n\t\t},\n\t\t_setAdditiveIdentityOther: function _setAdditiveIdentityOther() {\n\t\t\tvar startIndex = this._origIndex * this.valueSize;\n\t\t\tvar targetIndex = this._addIndex * this.valueSize;\n\n\t\t\tfor (var i = 0; i < this.valueSize; i++) {\n\t\t\t\tthis.buffer[targetIndex + i] = this.buffer[startIndex + i];\n\t\t\t}\n\t\t},\n\t\t// mix functions\n\t\t_select: function _select(buffer, dstOffset, srcOffset, t, stride) {\n\t\t\tif (t >= 0.5) {\n\t\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\t\tbuffer[dstOffset + i] = buffer[srcOffset + i];\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t_slerp: function _slerp(buffer, dstOffset, srcOffset, t) {\n\t\t\tQuaternion.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t);\n\t\t},\n\t\t_slerpAdditive: function _slerpAdditive(buffer, dstOffset, srcOffset, t, stride) {\n\t\t\tvar workOffset = this._workIndex * stride; // Store result in intermediate buffer offset\n\n\t\t\tQuaternion.multiplyQuaternionsFlat(buffer, workOffset, buffer, dstOffset, buffer, srcOffset); // Slerp to the intermediate result\n\n\t\t\tQuaternion.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t);\n\t\t},\n\t\t_lerp: function _lerp(buffer, dstOffset, srcOffset, t, stride) {\n\t\t\tvar s = 1 - t;\n\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tvar j = dstOffset + i;\n\t\t\t\tbuffer[j] = buffer[j] * s + buffer[srcOffset + i] * t;\n\t\t\t}\n\t\t},\n\t\t_lerpAdditive: function _lerpAdditive(buffer, dstOffset, srcOffset, t, stride) {\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tvar j = dstOffset + i;\n\t\t\t\tbuffer[j] = buffer[j] + buffer[srcOffset + i] * t;\n\t\t\t}\n\t\t}\n\t});\n\n\t// Characters [].:/ are reserved for track binding syntax.\n\tvar _RESERVED_CHARS_RE = '\\\\[\\\\]\\\\.:\\\\/';\n\n\tvar _reservedRe = new RegExp('[' + _RESERVED_CHARS_RE + ']', 'g'); // Attempts to allow node names from any language. ES5's `\\w` regexp matches\n\t// only latin characters, and the unicode \\p{L} is not yet supported. So\n\t// instead, we exclude reserved characters and match everything else.\n\n\n\tvar _wordChar = '[^' + _RESERVED_CHARS_RE + ']';\n\n\tvar _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace('\\\\.', '') + ']'; // Parent directories, delimited by '/' or ':'. Currently unused, but must\n\t// be matched to parse the rest of the track name.\n\n\n\tvar _directoryRe = /((?:WC+[\\/:])*)/.source.replace('WC', _wordChar); // Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.\n\n\n\tvar _nodeRe = /(WCOD+)?/.source.replace('WCOD', _wordCharOrDot); // Object on target node, and accessor. May not contain reserved\n\t// characters. Accessor may contain any character except closing bracket.\n\n\n\tvar _objectRe = /(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace('WC', _wordChar); // Property and accessor. May not contain reserved characters. Accessor may\n\t// contain any non-bracket characters.\n\n\n\tvar _propertyRe = /\\.(WC+)(?:\\[(.+)\\])?/.source.replace('WC', _wordChar);\n\n\tvar _trackRe = new RegExp('' + '^' + _directoryRe + _nodeRe + _objectRe + _propertyRe + '$');\n\n\tvar _supportedObjectNames = ['material', 'materials', 'bones'];\n\n\tfunction Composite(targetGroup, path, optionalParsedPath) {\n\t\tvar parsedPath = optionalParsedPath || PropertyBinding.parseTrackName(path);\n\t\tthis._targetGroup = targetGroup;\n\t\tthis._bindings = targetGroup.subscribe_(path, parsedPath);\n\t}\n\n\tObject.assign(Composite.prototype, {\n\t\tgetValue: function getValue(array, offset) {\n\t\t\tthis.bind(); // bind all binding\n\n\t\t\tvar firstValidIndex = this._targetGroup.nCachedObjects_,\n\t\t\t\t\tbinding = this._bindings[firstValidIndex]; // and only call .getValue on the first\n\n\t\t\tif (binding !== undefined) binding.getValue(array, offset);\n\t\t},\n\t\tsetValue: function setValue(array, offset) {\n\t\t\tvar bindings = this._bindings;\n\n\t\t\tfor (var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) {\n\t\t\t\tbindings[i].setValue(array, offset);\n\t\t\t}\n\t\t},\n\t\tbind: function bind() {\n\t\t\tvar bindings = this._bindings;\n\n\t\t\tfor (var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) {\n\t\t\t\tbindings[i].bind();\n\t\t\t}\n\t\t},\n\t\tunbind: function unbind() {\n\t\t\tvar bindings = this._bindings;\n\n\t\t\tfor (var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) {\n\t\t\t\tbindings[i].unbind();\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction PropertyBinding(rootNode, path, parsedPath) {\n\t\tthis.path = path;\n\t\tthis.parsedPath = parsedPath || PropertyBinding.parseTrackName(path);\n\t\tthis.node = PropertyBinding.findNode(rootNode, this.parsedPath.nodeName) || rootNode;\n\t\tthis.rootNode = rootNode;\n\t}\n\n\tObject.assign(PropertyBinding, {\n\t\tComposite: Composite,\n\t\tcreate: function create(root, path, parsedPath) {\n\t\t\tif (!(root && root.isAnimationObjectGroup)) {\n\t\t\t\treturn new PropertyBinding(root, path, parsedPath);\n\t\t\t} else {\n\t\t\t\treturn new PropertyBinding.Composite(root, path, parsedPath);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Replaces spaces with underscores and removes unsupported characters from\n\t\t * node names, to ensure compatibility with parseTrackName().\n\t\t *\n\t\t * @param {string} name Node name to be sanitized.\n\t\t * @return {string}\n\t\t */\n\t\tsanitizeNodeName: function sanitizeNodeName(name) {\n\t\t\treturn name.replace(/\\s/g, '_').replace(_reservedRe, '');\n\t\t},\n\t\tparseTrackName: function parseTrackName(trackName) {\n\t\t\tvar matches = _trackRe.exec(trackName);\n\n\t\t\tif (!matches) {\n\t\t\t\tthrow new Error('PropertyBinding: Cannot parse trackName: ' + trackName);\n\t\t\t}\n\n\t\t\tvar results = {\n\t\t\t\t// directoryName: matches[ 1 ], // (tschw) currently unused\n\t\t\t\tnodeName: matches[2],\n\t\t\t\tobjectName: matches[3],\n\t\t\t\tobjectIndex: matches[4],\n\t\t\t\tpropertyName: matches[5],\n\t\t\t\t// required\n\t\t\t\tpropertyIndex: matches[6]\n\t\t\t};\n\t\t\tvar lastDot = results.nodeName && results.nodeName.lastIndexOf('.');\n\n\t\t\tif (lastDot !== undefined && lastDot !== -1) {\n\t\t\t\tvar objectName = results.nodeName.substring(lastDot + 1); // Object names must be checked against an allowlist. Otherwise, there\n\t\t\t\t// is no way to parse 'foo.bar.baz': 'baz' must be a property, but\n\t\t\t\t// 'bar' could be the objectName, or part of a nodeName (which can\n\t\t\t\t// include '.' characters).\n\n\t\t\t\tif (_supportedObjectNames.indexOf(objectName) !== -1) {\n\t\t\t\t\tresults.nodeName = results.nodeName.substring(0, lastDot);\n\t\t\t\t\tresults.objectName = objectName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (results.propertyName === null || results.propertyName.length === 0) {\n\t\t\t\tthrow new Error('PropertyBinding: can not parse propertyName from trackName: ' + trackName);\n\t\t\t}\n\n\t\t\treturn results;\n\t\t},\n\t\tfindNode: function findNode(root, nodeName) {\n\t\t\tif (!nodeName || nodeName === '' || nodeName === '.' || nodeName === -1 || nodeName === root.name || nodeName === root.uuid) {\n\t\t\t\treturn root;\n\t\t\t} // search into skeleton bones.\n\n\n\t\t\tif (root.skeleton) {\n\t\t\t\tvar bone = root.skeleton.getBoneByName(nodeName);\n\n\t\t\t\tif (bone !== undefined) {\n\t\t\t\t\treturn bone;\n\t\t\t\t}\n\t\t\t} // search into node subtree.\n\n\n\t\t\tif (root.children) {\n\t\t\t\tvar searchNodeSubtree = function searchNodeSubtree(children) {\n\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\t\tvar childNode = children[i];\n\n\t\t\t\t\t\tif (childNode.name === nodeName || childNode.uuid === nodeName) {\n\t\t\t\t\t\t\treturn childNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar result = searchNodeSubtree(childNode.children);\n\t\t\t\t\t\tif (result) return result;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t};\n\n\t\t\t\tvar subTreeNode = searchNodeSubtree(root.children);\n\n\t\t\t\tif (subTreeNode) {\n\t\t\t\t\treturn subTreeNode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\t});\n\tObject.assign(PropertyBinding.prototype, {\n\t\t// prototype, continued\n\t\t// these are used to \"bind\" a nonexistent property\n\t\t_getValue_unavailable: function _getValue_unavailable() {},\n\t\t_setValue_unavailable: function _setValue_unavailable() {},\n\t\tBindingType: {\n\t\t\tDirect: 0,\n\t\t\tEntireArray: 1,\n\t\t\tArrayElement: 2,\n\t\t\tHasFromToArray: 3\n\t\t},\n\t\tVersioning: {\n\t\t\tNone: 0,\n\t\t\tNeedsUpdate: 1,\n\t\t\tMatrixWorldNeedsUpdate: 2\n\t\t},\n\t\tGetterByBindingType: [function getValue_direct(buffer, offset) {\n\t\t\tbuffer[offset] = this.node[this.propertyName];\n\t\t}, function getValue_array(buffer, offset) {\n\t\t\tvar source = this.resolvedProperty;\n\n\t\t\tfor (var i = 0, n = source.length; i !== n; ++i) {\n\t\t\t\tbuffer[offset++] = source[i];\n\t\t\t}\n\t\t}, function getValue_arrayElement(buffer, offset) {\n\t\t\tbuffer[offset] = this.resolvedProperty[this.propertyIndex];\n\t\t}, function getValue_toArray(buffer, offset) {\n\t\t\tthis.resolvedProperty.toArray(buffer, offset);\n\t\t}],\n\t\tSetterByBindingTypeAndVersioning: [[// Direct\n\t\tfunction setValue_direct(buffer, offset) {\n\t\t\tthis.targetObject[this.propertyName] = buffer[offset];\n\t\t}, function setValue_direct_setNeedsUpdate(buffer, offset) {\n\t\t\tthis.targetObject[this.propertyName] = buffer[offset];\n\t\t\tthis.targetObject.needsUpdate = true;\n\t\t}, function setValue_direct_setMatrixWorldNeedsUpdate(buffer, offset) {\n\t\t\tthis.targetObject[this.propertyName] = buffer[offset];\n\t\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\t\t}], [// EntireArray\n\t\tfunction setValue_array(buffer, offset) {\n\t\t\tvar dest = this.resolvedProperty;\n\n\t\t\tfor (var i = 0, n = dest.length; i !== n; ++i) {\n\t\t\t\tdest[i] = buffer[offset++];\n\t\t\t}\n\t\t}, function setValue_array_setNeedsUpdate(buffer, offset) {\n\t\t\tvar dest = this.resolvedProperty;\n\n\t\t\tfor (var i = 0, n = dest.length; i !== n; ++i) {\n\t\t\t\tdest[i] = buffer[offset++];\n\t\t\t}\n\n\t\t\tthis.targetObject.needsUpdate = true;\n\t\t}, function setValue_array_setMatrixWorldNeedsUpdate(buffer, offset) {\n\t\t\tvar dest = this.resolvedProperty;\n\n\t\t\tfor (var i = 0, n = dest.length; i !== n; ++i) {\n\t\t\t\tdest[i] = buffer[offset++];\n\t\t\t}\n\n\t\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\t\t}], [// ArrayElement\n\t\tfunction setValue_arrayElement(buffer, offset) {\n\t\t\tthis.resolvedProperty[this.propertyIndex] = buffer[offset];\n\t\t}, function setValue_arrayElement_setNeedsUpdate(buffer, offset) {\n\t\t\tthis.resolvedProperty[this.propertyIndex] = buffer[offset];\n\t\t\tthis.targetObject.needsUpdate = true;\n\t\t}, function setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer, offset) {\n\t\t\tthis.resolvedProperty[this.propertyIndex] = buffer[offset];\n\t\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\t\t}], [// HasToFromArray\n\t\tfunction setValue_fromArray(buffer, offset) {\n\t\t\tthis.resolvedProperty.fromArray(buffer, offset);\n\t\t}, function setValue_fromArray_setNeedsUpdate(buffer, offset) {\n\t\t\tthis.resolvedProperty.fromArray(buffer, offset);\n\t\t\tthis.targetObject.needsUpdate = true;\n\t\t}, function setValue_fromArray_setMatrixWorldNeedsUpdate(buffer, offset) {\n\t\t\tthis.resolvedProperty.fromArray(buffer, offset);\n\t\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\t\t}]],\n\t\tgetValue: function getValue_unbound(targetArray, offset) {\n\t\t\tthis.bind();\n\t\t\tthis.getValue(targetArray, offset); // Note: This class uses a State pattern on a per-method basis:\n\t\t\t// 'bind' sets 'this.getValue' / 'setValue' and shadows the\n\t\t\t// prototype version of these methods with one that represents\n\t\t\t// the bound state. When the property is not found, the methods\n\t\t\t// become no-ops.\n\t\t},\n\t\tsetValue: function getValue_unbound(sourceArray, offset) {\n\t\t\tthis.bind();\n\t\t\tthis.setValue(sourceArray, offset);\n\t\t},\n\t\t// create getter / setter pair for a property in the scene graph\n\t\tbind: function bind() {\n\t\t\tvar targetObject = this.node;\n\t\t\tvar parsedPath = this.parsedPath;\n\t\t\tvar objectName = parsedPath.objectName;\n\t\t\tvar propertyName = parsedPath.propertyName;\n\t\t\tvar propertyIndex = parsedPath.propertyIndex;\n\n\t\t\tif (!targetObject) {\n\t\t\t\ttargetObject = PropertyBinding.findNode(this.rootNode, parsedPath.nodeName) || this.rootNode;\n\t\t\t\tthis.node = targetObject;\n\t\t\t} // set fail state so we can just 'return' on error\n\n\n\t\t\tthis.getValue = this._getValue_unavailable;\n\t\t\tthis.setValue = this._setValue_unavailable; // ensure there is a value node\n\n\t\t\tif (!targetObject) {\n\t\t\t\tconsole.error('THREE.PropertyBinding: Trying to update node for track: ' + this.path + ' but it wasn\\'t found.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (objectName) {\n\t\t\t\tvar objectIndex = parsedPath.objectIndex; // special cases were we need to reach deeper into the hierarchy to get the face materials....\n\n\t\t\t\tswitch (objectName) {\n\t\t\t\t\tcase 'materials':\n\t\t\t\t\t\tif (!targetObject.material) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to material as node does not have a material.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!targetObject.material.materials) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttargetObject = targetObject.material.materials;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'bones':\n\t\t\t\t\t\tif (!targetObject.skeleton) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} // potential future optimization: skip this if propertyIndex is already an integer\n\t\t\t\t\t\t// and convert the integer string to a true integer.\n\n\n\t\t\t\t\t\ttargetObject = targetObject.skeleton.bones; // support resolving morphTarget names into indices.\n\n\t\t\t\t\t\tfor (var i = 0; i < targetObject.length; i++) {\n\t\t\t\t\t\t\tif (targetObject[i].name === objectIndex) {\n\t\t\t\t\t\t\t\tobjectIndex = i;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (targetObject[objectName] === undefined) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to objectName of node undefined.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttargetObject = targetObject[objectName];\n\t\t\t\t}\n\n\t\t\t\tif (objectIndex !== undefined) {\n\t\t\t\t\tif (targetObject[objectIndex] === undefined) {\n\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject[objectIndex];\n\t\t\t\t}\n\t\t\t} // resolve property\n\n\n\t\t\tvar nodeProperty = targetObject[propertyName];\n\n\t\t\tif (nodeProperty === undefined) {\n\t\t\t\tvar nodeName = parsedPath.nodeName;\n\t\t\t\tconsole.error('THREE.PropertyBinding: Trying to update property for track: ' + nodeName + '.' + propertyName + ' but it wasn\\'t found.', targetObject);\n\t\t\t\treturn;\n\t\t\t} // determine versioning scheme\n\n\n\t\t\tvar versioning = this.Versioning.None;\n\t\t\tthis.targetObject = targetObject;\n\n\t\t\tif (targetObject.needsUpdate !== undefined) {\n\t\t\t\t// material\n\t\t\t\tversioning = this.Versioning.NeedsUpdate;\n\t\t\t} else if (targetObject.matrixWorldNeedsUpdate !== undefined) {\n\t\t\t\t// node transform\n\t\t\t\tversioning = this.Versioning.MatrixWorldNeedsUpdate;\n\t\t\t} // determine how the property gets bound\n\n\n\t\t\tvar bindingType = this.BindingType.Direct;\n\n\t\t\tif (propertyIndex !== undefined) {\n\t\t\t\t// access a sub element of the property array (only primitives are supported right now)\n\t\t\t\tif (propertyName === 'morphTargetInfluences') {\n\t\t\t\t\t// potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer.\n\t\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\t\tif (!targetObject.geometry) {\n\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (targetObject.geometry.isBufferGeometry) {\n\t\t\t\t\t\tif (!targetObject.geometry.morphAttributes) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (targetObject.morphTargetDictionary[propertyIndex] !== undefined) {\n\t\t\t\t\t\t\tpropertyIndex = targetObject.morphTargetDictionary[propertyIndex];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.', this);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbindingType = this.BindingType.ArrayElement;\n\t\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\t\tthis.propertyIndex = propertyIndex;\n\t\t\t} else if (nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined) {\n\t\t\t\t// must use copy for Object3D.Euler/Quaternion\n\t\t\t\tbindingType = this.BindingType.HasFromToArray;\n\t\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\t} else if (Array.isArray(nodeProperty)) {\n\t\t\t\tbindingType = this.BindingType.EntireArray;\n\t\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\t} else {\n\t\t\t\tthis.propertyName = propertyName;\n\t\t\t} // select getter / setter\n\n\n\t\t\tthis.getValue = this.GetterByBindingType[bindingType];\n\t\t\tthis.setValue = this.SetterByBindingTypeAndVersioning[bindingType][versioning];\n\t\t},\n\t\tunbind: function unbind() {\n\t\t\tthis.node = null; // back to the prototype version of getValue / setValue\n\t\t\t// note: avoiding to mutate the shape of 'this' via 'delete'\n\n\t\t\tthis.getValue = this._getValue_unbound;\n\t\t\tthis.setValue = this._setValue_unbound;\n\t\t}\n\t}); // DECLARE ALIAS AFTER assign prototype\n\n\tObject.assign(PropertyBinding.prototype, {\n\t\t// initial state of these methods that calls 'bind'\n\t\t_getValue_unbound: PropertyBinding.prototype.getValue,\n\t\t_setValue_unbound: PropertyBinding.prototype.setValue\n\t});\n\n\t/**\n\t *\n\t * A group of objects that receives a shared animation state.\n\t *\n\t * Usage:\n\t *\n\t *\t- Add objects you would otherwise pass as 'root' to the\n\t *\t\tconstructor or the .clipAction method of AnimationMixer.\n\t *\n\t *\t- Instead pass this object as 'root'.\n\t *\n\t *\t- You can also add and remove objects later when the mixer\n\t *\t\tis running.\n\t *\n\t * Note:\n\t *\n\t *\t\tObjects of this class appear as one object to the mixer,\n\t *\t\tso cache control of the individual objects must be done\n\t *\t\ton the group.\n\t *\n\t * Limitation:\n\t *\n\t *\t- The animated properties must be compatible among the\n\t *\t\tall objects in the group.\n\t *\n\t *\t- A single property can either be controlled through a\n\t *\t\ttarget group or directly, but not both.\n\t */\n\n\tfunction AnimationObjectGroup() {\n\t\tthis.uuid = MathUtils.generateUUID(); // cached objects followed by the active ones\n\n\t\tthis._objects = Array.prototype.slice.call(arguments);\n\t\tthis.nCachedObjects_ = 0; // threshold\n\t\t// note: read by PropertyBinding.Composite\n\n\t\tvar indices = {};\n\t\tthis._indicesByUUID = indices; // for bookkeeping\n\n\t\tfor (var i = 0, n = arguments.length; i !== n; ++i) {\n\t\t\tindices[arguments[i].uuid] = i;\n\t\t}\n\n\t\tthis._paths = []; // inside: string\n\n\t\tthis._parsedPaths = []; // inside: { we don't care, here }\n\n\t\tthis._bindings = []; // inside: Array< PropertyBinding >\n\n\t\tthis._bindingsIndicesByPath = {}; // inside: indices in these arrays\n\n\t\tvar scope = this;\n\t\tthis.stats = {\n\t\t\tobjects: {\n\t\t\t\tget total() {\n\t\t\t\t\treturn scope._objects.length;\n\t\t\t\t},\n\n\t\t\t\tget inUse() {\n\t\t\t\t\treturn this.total - scope.nCachedObjects_;\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tget bindingsPerObject() {\n\t\t\t\treturn scope._bindings.length;\n\t\t\t}\n\n\t\t};\n\t}\n\n\tObject.assign(AnimationObjectGroup.prototype, {\n\t\tisAnimationObjectGroup: true,\n\t\tadd: function add() {\n\t\t\tvar objects = this._objects,\n\t\t\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\t\t\tpaths = this._paths,\n\t\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\t\tbindings = this._bindings,\n\t\t\t\t\tnBindings = bindings.length;\n\t\t\tvar knownObject = undefined,\n\t\t\t\t\tnObjects = objects.length,\n\t\t\t\t\tnCachedObjects = this.nCachedObjects_;\n\n\t\t\tfor (var i = 0, n = arguments.length; i !== n; ++i) {\n\t\t\t\tvar object = arguments[i],\n\t\t\t\t\t\tuuid = object.uuid;\n\t\t\t\tvar index = indicesByUUID[uuid];\n\n\t\t\t\tif (index === undefined) {\n\t\t\t\t\t// unknown object -> add it to the ACTIVE region\n\t\t\t\t\tindex = nObjects++;\n\t\t\t\t\tindicesByUUID[uuid] = index;\n\t\t\t\t\tobjects.push(object); // accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor (var j = 0, m = nBindings; j !== m; ++j) {\n\t\t\t\t\t\tbindings[j].push(new PropertyBinding(object, paths[j], parsedPaths[j]));\n\t\t\t\t\t}\n\t\t\t\t} else if (index < nCachedObjects) {\n\t\t\t\t\tknownObject = objects[index]; // move existing object to the ACTIVE region\n\n\t\t\t\t\tvar firstActiveIndex = --nCachedObjects,\n\t\t\t\t\t\t\tlastCachedObject = objects[firstActiveIndex];\n\t\t\t\t\tindicesByUUID[lastCachedObject.uuid] = index;\n\t\t\t\t\tobjects[index] = lastCachedObject;\n\t\t\t\t\tindicesByUUID[uuid] = firstActiveIndex;\n\t\t\t\t\tobjects[firstActiveIndex] = object; // accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor (var _j = 0, _m = nBindings; _j !== _m; ++_j) {\n\t\t\t\t\t\tvar bindingsForPath = bindings[_j],\n\t\t\t\t\t\t\t\tlastCached = bindingsForPath[firstActiveIndex];\n\t\t\t\t\t\tvar binding = bindingsForPath[index];\n\t\t\t\t\t\tbindingsForPath[index] = lastCached;\n\n\t\t\t\t\t\tif (binding === undefined) {\n\t\t\t\t\t\t\t// since we do not bother to create new bindings\n\t\t\t\t\t\t\t// for objects that are cached, the binding may\n\t\t\t\t\t\t\t// or may not exist\n\t\t\t\t\t\t\tbinding = new PropertyBinding(object, paths[_j], parsedPaths[_j]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbindingsForPath[firstActiveIndex] = binding;\n\t\t\t\t\t}\n\t\t\t\t} else if (objects[index] !== knownObject) {\n\t\t\t\t\tconsole.error('THREE.AnimationObjectGroup: Different objects with the same UUID ' + 'detected. Clean the caches or recreate your infrastructure when reloading scenes.');\n\t\t\t\t} // else the object is already where we want it to be\n\n\t\t\t} // for arguments\n\n\n\t\t\tthis.nCachedObjects_ = nCachedObjects;\n\t\t},\n\t\tremove: function remove() {\n\t\t\tvar objects = this._objects,\n\t\t\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\t\t\tbindings = this._bindings,\n\t\t\t\t\tnBindings = bindings.length;\n\t\t\tvar nCachedObjects = this.nCachedObjects_;\n\n\t\t\tfor (var i = 0, n = arguments.length; i !== n; ++i) {\n\t\t\t\tvar object = arguments[i],\n\t\t\t\t\t\tuuid = object.uuid,\n\t\t\t\t\t\tindex = indicesByUUID[uuid];\n\n\t\t\t\tif (index !== undefined && index >= nCachedObjects) {\n\t\t\t\t\t// move existing object into the CACHED region\n\t\t\t\t\tvar lastCachedIndex = nCachedObjects++,\n\t\t\t\t\t\t\tfirstActiveObject = objects[lastCachedIndex];\n\t\t\t\t\tindicesByUUID[firstActiveObject.uuid] = index;\n\t\t\t\t\tobjects[index] = firstActiveObject;\n\t\t\t\t\tindicesByUUID[uuid] = lastCachedIndex;\n\t\t\t\t\tobjects[lastCachedIndex] = object; // accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor (var j = 0, m = nBindings; j !== m; ++j) {\n\t\t\t\t\t\tvar bindingsForPath = bindings[j],\n\t\t\t\t\t\t\t\tfirstActive = bindingsForPath[lastCachedIndex],\n\t\t\t\t\t\t\t\tbinding = bindingsForPath[index];\n\t\t\t\t\t\tbindingsForPath[index] = firstActive;\n\t\t\t\t\t\tbindingsForPath[lastCachedIndex] = binding;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // for arguments\n\n\n\t\t\tthis.nCachedObjects_ = nCachedObjects;\n\t\t},\n\t\t// remove & forget\n\t\tuncache: function uncache() {\n\t\t\tvar objects = this._objects,\n\t\t\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\t\t\tbindings = this._bindings,\n\t\t\t\t\tnBindings = bindings.length;\n\t\t\tvar nCachedObjects = this.nCachedObjects_,\n\t\t\t\t\tnObjects = objects.length;\n\n\t\t\tfor (var i = 0, n = arguments.length; i !== n; ++i) {\n\t\t\t\tvar object = arguments[i],\n\t\t\t\t\t\tuuid = object.uuid,\n\t\t\t\t\t\tindex = indicesByUUID[uuid];\n\n\t\t\t\tif (index !== undefined) {\n\t\t\t\t\tdelete indicesByUUID[uuid];\n\n\t\t\t\t\tif (index < nCachedObjects) {\n\t\t\t\t\t\t// object is cached, shrink the CACHED region\n\t\t\t\t\t\tvar firstActiveIndex = --nCachedObjects,\n\t\t\t\t\t\t\t\tlastCachedObject = objects[firstActiveIndex],\n\t\t\t\t\t\t\t\tlastIndex = --nObjects,\n\t\t\t\t\t\t\t\tlastObject = objects[lastIndex]; // last cached object takes this object's place\n\n\t\t\t\t\t\tindicesByUUID[lastCachedObject.uuid] = index;\n\t\t\t\t\t\tobjects[index] = lastCachedObject; // last object goes to the activated slot and pop\n\n\t\t\t\t\t\tindicesByUUID[lastObject.uuid] = firstActiveIndex;\n\t\t\t\t\t\tobjects[firstActiveIndex] = lastObject;\n\t\t\t\t\t\tobjects.pop(); // accounting is done, now do the same for all bindings\n\n\t\t\t\t\t\tfor (var j = 0, m = nBindings; j !== m; ++j) {\n\t\t\t\t\t\t\tvar bindingsForPath = bindings[j],\n\t\t\t\t\t\t\t\t\tlastCached = bindingsForPath[firstActiveIndex],\n\t\t\t\t\t\t\t\t\tlast = bindingsForPath[lastIndex];\n\t\t\t\t\t\t\tbindingsForPath[index] = lastCached;\n\t\t\t\t\t\t\tbindingsForPath[firstActiveIndex] = last;\n\t\t\t\t\t\t\tbindingsForPath.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// object is active, just swap with the last and pop\n\t\t\t\t\t\tvar _lastIndex = --nObjects,\n\t\t\t\t\t\t\t\t_lastObject = objects[_lastIndex];\n\n\t\t\t\t\t\tif (_lastIndex > 0) {\n\t\t\t\t\t\t\tindicesByUUID[_lastObject.uuid] = index;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tobjects[index] = _lastObject;\n\t\t\t\t\t\tobjects.pop(); // accounting is done, now do the same for all bindings\n\n\t\t\t\t\t\tfor (var _j2 = 0, _m2 = nBindings; _j2 !== _m2; ++_j2) {\n\t\t\t\t\t\t\tvar _bindingsForPath = bindings[_j2];\n\t\t\t\t\t\t\t_bindingsForPath[index] = _bindingsForPath[_lastIndex];\n\n\t\t\t\t\t\t\t_bindingsForPath.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t} // cached or active\n\n\t\t\t\t} // if object is known\n\n\t\t\t} // for arguments\n\n\n\t\t\tthis.nCachedObjects_ = nCachedObjects;\n\t\t},\n\t\t// Internal interface used by befriended PropertyBinding.Composite:\n\t\tsubscribe_: function subscribe_(path, parsedPath) {\n\t\t\t// returns an array of bindings for the given path that is changed\n\t\t\t// according to the contained objects in the group\n\t\t\tvar indicesByPath = this._bindingsIndicesByPath;\n\t\t\tvar index = indicesByPath[path];\n\t\t\tvar bindings = this._bindings;\n\t\t\tif (index !== undefined) return bindings[index];\n\t\t\tvar paths = this._paths,\n\t\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\t\tobjects = this._objects,\n\t\t\t\t\tnObjects = objects.length,\n\t\t\t\t\tnCachedObjects = this.nCachedObjects_,\n\t\t\t\t\tbindingsForPath = new Array(nObjects);\n\t\t\tindex = bindings.length;\n\t\t\tindicesByPath[path] = index;\n\t\t\tpaths.push(path);\n\t\t\tparsedPaths.push(parsedPath);\n\t\t\tbindings.push(bindingsForPath);\n\n\t\t\tfor (var i = nCachedObjects, n = objects.length; i !== n; ++i) {\n\t\t\t\tvar object = objects[i];\n\t\t\t\tbindingsForPath[i] = new PropertyBinding(object, path, parsedPath);\n\t\t\t}\n\n\t\t\treturn bindingsForPath;\n\t\t},\n\t\tunsubscribe_: function unsubscribe_(path) {\n\t\t\t// tells the group to forget about a property path and no longer\n\t\t\t// update the array previously obtained with 'subscribe_'\n\t\t\tvar indicesByPath = this._bindingsIndicesByPath,\n\t\t\t\t\tindex = indicesByPath[path];\n\n\t\t\tif (index !== undefined) {\n\t\t\t\tvar paths = this._paths,\n\t\t\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\t\t\tbindings = this._bindings,\n\t\t\t\t\t\tlastBindingsIndex = bindings.length - 1,\n\t\t\t\t\t\tlastBindings = bindings[lastBindingsIndex],\n\t\t\t\t\t\tlastBindingsPath = path[lastBindingsIndex];\n\t\t\t\tindicesByPath[lastBindingsPath] = index;\n\t\t\t\tbindings[index] = lastBindings;\n\t\t\t\tbindings.pop();\n\t\t\t\tparsedPaths[index] = parsedPaths[lastBindingsIndex];\n\t\t\t\tparsedPaths.pop();\n\t\t\t\tpaths[index] = paths[lastBindingsIndex];\n\t\t\t\tpaths.pop();\n\t\t\t}\n\t\t}\n\t});\n\n\tvar AnimationAction = /*#__PURE__*/function () {\n\t\tfunction AnimationAction(mixer, clip, localRoot, blendMode) {\n\t\t\tif (localRoot === void 0) {\n\t\t\t\tlocalRoot = null;\n\t\t\t}\n\n\t\t\tif (blendMode === void 0) {\n\t\t\t\tblendMode = clip.blendMode;\n\t\t\t}\n\n\t\t\tthis._mixer = mixer;\n\t\t\tthis._clip = clip;\n\t\t\tthis._localRoot = localRoot;\n\t\t\tthis.blendMode = blendMode;\n\t\t\tvar tracks = clip.tracks,\n\t\t\t\t\tnTracks = tracks.length,\n\t\t\t\t\tinterpolants = new Array(nTracks);\n\t\t\tvar interpolantSettings = {\n\t\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\t\tendingEnd: ZeroCurvatureEnding\n\t\t\t};\n\n\t\t\tfor (var i = 0; i !== nTracks; ++i) {\n\t\t\t\tvar interpolant = tracks[i].createInterpolant(null);\n\t\t\t\tinterpolants[i] = interpolant;\n\t\t\t\tinterpolant.settings = interpolantSettings;\n\t\t\t}\n\n\t\t\tthis._interpolantSettings = interpolantSettings;\n\t\t\tthis._interpolants = interpolants; // bound by the mixer\n\t\t\t// inside: PropertyMixer (managed by the mixer)\n\n\t\t\tthis._propertyBindings = new Array(nTracks);\n\t\t\tthis._cacheIndex = null; // for the memory manager\n\n\t\t\tthis._byClipCacheIndex = null; // for the memory manager\n\n\t\t\tthis._timeScaleInterpolant = null;\n\t\t\tthis._weightInterpolant = null;\n\t\t\tthis.loop = LoopRepeat;\n\t\t\tthis._loopCount = -1; // global mixer time when the action is to be started\n\t\t\t// it's set back to 'null' upon start of the action\n\n\t\t\tthis._startTime = null; // scaled local time of the action\n\t\t\t// gets clamped or wrapped to 0..clip.duration according to loop\n\n\t\t\tthis.time = 0;\n\t\t\tthis.timeScale = 1;\n\t\t\tthis._effectiveTimeScale = 1;\n\t\t\tthis.weight = 1;\n\t\t\tthis._effectiveWeight = 1;\n\t\t\tthis.repetitions = Infinity; // no. of repetitions when looping\n\n\t\t\tthis.paused = false; // true -> zero effective time scale\n\n\t\t\tthis.enabled = true; // false -> zero effective weight\n\n\t\t\tthis.clampWhenFinished = false; // keep feeding the last frame?\n\n\t\t\tthis.zeroSlopeAtStart = true; // for smooth interpolation w/o separate\n\n\t\t\tthis.zeroSlopeAtEnd = true; // clips for start, loop and end\n\t\t} // State & Scheduling\n\n\n\t\tvar _proto = AnimationAction.prototype;\n\n\t\t_proto.play = function play() {\n\t\t\tthis._mixer._activateAction(this);\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.stop = function stop() {\n\t\t\tthis._mixer._deactivateAction(this);\n\n\t\t\treturn this.reset();\n\t\t};\n\n\t\t_proto.reset = function reset() {\n\t\t\tthis.paused = false;\n\t\t\tthis.enabled = true;\n\t\t\tthis.time = 0; // restart clip\n\n\t\t\tthis._loopCount = -1; // forget previous loops\n\n\t\t\tthis._startTime = null; // forget scheduling\n\n\t\t\treturn this.stopFading().stopWarping();\n\t\t};\n\n\t\t_proto.isRunning = function isRunning() {\n\t\t\treturn this.enabled && !this.paused && this.timeScale !== 0 && this._startTime === null && this._mixer._isActiveAction(this);\n\t\t} // return true when play has been called\n\t\t;\n\n\t\t_proto.isScheduled = function isScheduled() {\n\t\t\treturn this._mixer._isActiveAction(this);\n\t\t};\n\n\t\t_proto.startAt = function startAt(time) {\n\t\t\tthis._startTime = time;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setLoop = function setLoop(mode, repetitions) {\n\t\t\tthis.loop = mode;\n\t\t\tthis.repetitions = repetitions;\n\t\t\treturn this;\n\t\t} // Weight\n\t\t// set the weight stopping any scheduled fading\n\t\t// although .enabled = false yields an effective weight of zero, this\n\t\t// method does *not* change .enabled, because it would be confusing\n\t\t;\n\n\t\t_proto.setEffectiveWeight = function setEffectiveWeight(weight) {\n\t\t\tthis.weight = weight; // note: same logic as when updated at runtime\n\n\t\t\tthis._effectiveWeight = this.enabled ? weight : 0;\n\t\t\treturn this.stopFading();\n\t\t} // return the weight considering fading and .enabled\n\t\t;\n\n\t\t_proto.getEffectiveWeight = function getEffectiveWeight() {\n\t\t\treturn this._effectiveWeight;\n\t\t};\n\n\t\t_proto.fadeIn = function fadeIn(duration) {\n\t\t\treturn this._scheduleFading(duration, 0, 1);\n\t\t};\n\n\t\t_proto.fadeOut = function fadeOut(duration) {\n\t\t\treturn this._scheduleFading(duration, 1, 0);\n\t\t};\n\n\t\t_proto.crossFadeFrom = function crossFadeFrom(fadeOutAction, duration, warp) {\n\t\t\tfadeOutAction.fadeOut(duration);\n\t\t\tthis.fadeIn(duration);\n\n\t\t\tif (warp) {\n\t\t\t\tvar fadeInDuration = this._clip.duration,\n\t\t\t\t\t\tfadeOutDuration = fadeOutAction._clip.duration,\n\t\t\t\t\t\tstartEndRatio = fadeOutDuration / fadeInDuration,\n\t\t\t\t\t\tendStartRatio = fadeInDuration / fadeOutDuration;\n\t\t\t\tfadeOutAction.warp(1.0, startEndRatio, duration);\n\t\t\t\tthis.warp(endStartRatio, 1.0, duration);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.crossFadeTo = function crossFadeTo(fadeInAction, duration, warp) {\n\t\t\treturn fadeInAction.crossFadeFrom(this, duration, warp);\n\t\t};\n\n\t\t_proto.stopFading = function stopFading() {\n\t\t\tvar weightInterpolant = this._weightInterpolant;\n\n\t\t\tif (weightInterpolant !== null) {\n\t\t\t\tthis._weightInterpolant = null;\n\n\t\t\t\tthis._mixer._takeBackControlInterpolant(weightInterpolant);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t} // Time Scale Control\n\t\t// set the time scale stopping any scheduled warping\n\t\t// although .paused = true yields an effective time scale of zero, this\n\t\t// method does *not* change .paused, because it would be confusing\n\t\t;\n\n\t\t_proto.setEffectiveTimeScale = function setEffectiveTimeScale(timeScale) {\n\t\t\tthis.timeScale = timeScale;\n\t\t\tthis._effectiveTimeScale = this.paused ? 0 : timeScale;\n\t\t\treturn this.stopWarping();\n\t\t} // return the time scale considering warping and .paused\n\t\t;\n\n\t\t_proto.getEffectiveTimeScale = function getEffectiveTimeScale() {\n\t\t\treturn this._effectiveTimeScale;\n\t\t};\n\n\t\t_proto.setDuration = function setDuration(duration) {\n\t\t\tthis.timeScale = this._clip.duration / duration;\n\t\t\treturn this.stopWarping();\n\t\t};\n\n\t\t_proto.syncWith = function syncWith(action) {\n\t\t\tthis.time = action.time;\n\t\t\tthis.timeScale = action.timeScale;\n\t\t\treturn this.stopWarping();\n\t\t};\n\n\t\t_proto.halt = function halt(duration) {\n\t\t\treturn this.warp(this._effectiveTimeScale, 0, duration);\n\t\t};\n\n\t\t_proto.warp = function warp(startTimeScale, endTimeScale, duration) {\n\t\t\tvar mixer = this._mixer,\n\t\t\t\t\tnow = mixer.time,\n\t\t\t\t\ttimeScale = this.timeScale;\n\t\t\tvar interpolant = this._timeScaleInterpolant;\n\n\t\t\tif (interpolant === null) {\n\t\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\t\tthis._timeScaleInterpolant = interpolant;\n\t\t\t}\n\n\t\t\tvar times = interpolant.parameterPositions,\n\t\t\t\t\tvalues = interpolant.sampleValues;\n\t\t\ttimes[0] = now;\n\t\t\ttimes[1] = now + duration;\n\t\t\tvalues[0] = startTimeScale / timeScale;\n\t\t\tvalues[1] = endTimeScale / timeScale;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.stopWarping = function stopWarping() {\n\t\t\tvar timeScaleInterpolant = this._timeScaleInterpolant;\n\n\t\t\tif (timeScaleInterpolant !== null) {\n\t\t\t\tthis._timeScaleInterpolant = null;\n\n\t\t\t\tthis._mixer._takeBackControlInterpolant(timeScaleInterpolant);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t} // Object Accessors\n\t\t;\n\n\t\t_proto.getMixer = function getMixer() {\n\t\t\treturn this._mixer;\n\t\t};\n\n\t\t_proto.getClip = function getClip() {\n\t\t\treturn this._clip;\n\t\t};\n\n\t\t_proto.getRoot = function getRoot() {\n\t\t\treturn this._localRoot || this._mixer._root;\n\t\t} // Interna\n\t\t;\n\n\t\t_proto._update = function _update(time, deltaTime, timeDirection, accuIndex) {\n\t\t\t// called by the mixer\n\t\t\tif (!this.enabled) {\n\t\t\t\t// call ._updateWeight() to update ._effectiveWeight\n\t\t\t\tthis._updateWeight(time);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar startTime = this._startTime;\n\n\t\t\tif (startTime !== null) {\n\t\t\t\t// check for scheduled start of action\n\t\t\t\tvar timeRunning = (time - startTime) * timeDirection;\n\n\t\t\t\tif (timeRunning < 0 || timeDirection === 0) {\n\t\t\t\t\treturn; // yet to come / don't decide when delta = 0\n\t\t\t\t} // start\n\n\n\t\t\t\tthis._startTime = null; // unschedule\n\n\t\t\t\tdeltaTime = timeDirection * timeRunning;\n\t\t\t} // apply time scale and advance time\n\n\n\t\t\tdeltaTime *= this._updateTimeScale(time);\n\n\t\t\tvar clipTime = this._updateTime(deltaTime); // note: _updateTime may disable the action resulting in\n\t\t\t// an effective weight of 0\n\n\n\t\t\tvar weight = this._updateWeight(time);\n\n\t\t\tif (weight > 0) {\n\t\t\t\tvar _interpolants = this._interpolants;\n\t\t\t\tvar propertyMixers = this._propertyBindings;\n\n\t\t\t\tswitch (this.blendMode) {\n\t\t\t\t\tcase AdditiveAnimationBlendMode:\n\t\t\t\t\t\tfor (var j = 0, m = _interpolants.length; j !== m; ++j) {\n\t\t\t\t\t\t\t_interpolants[j].evaluate(clipTime);\n\n\t\t\t\t\t\t\tpropertyMixers[j].accumulateAdditive(weight);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase NormalAnimationBlendMode:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tfor (var _j = 0, _m = _interpolants.length; _j !== _m; ++_j) {\n\t\t\t\t\t\t\t_interpolants[_j].evaluate(clipTime);\n\n\t\t\t\t\t\t\tpropertyMixers[_j].accumulate(accuIndex, weight);\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t_proto._updateWeight = function _updateWeight(time) {\n\t\t\tvar weight = 0;\n\n\t\t\tif (this.enabled) {\n\t\t\t\tweight = this.weight;\n\t\t\t\tvar interpolant = this._weightInterpolant;\n\n\t\t\t\tif (interpolant !== null) {\n\t\t\t\t\tvar interpolantValue = interpolant.evaluate(time)[0];\n\t\t\t\t\tweight *= interpolantValue;\n\n\t\t\t\t\tif (time > interpolant.parameterPositions[1]) {\n\t\t\t\t\t\tthis.stopFading();\n\n\t\t\t\t\t\tif (interpolantValue === 0) {\n\t\t\t\t\t\t\t// faded out, disable\n\t\t\t\t\t\t\tthis.enabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._effectiveWeight = weight;\n\t\t\treturn weight;\n\t\t};\n\n\t\t_proto._updateTimeScale = function _updateTimeScale(time) {\n\t\t\tvar timeScale = 0;\n\n\t\t\tif (!this.paused) {\n\t\t\t\ttimeScale = this.timeScale;\n\t\t\t\tvar interpolant = this._timeScaleInterpolant;\n\n\t\t\t\tif (interpolant !== null) {\n\t\t\t\t\tvar interpolantValue = interpolant.evaluate(time)[0];\n\t\t\t\t\ttimeScale *= interpolantValue;\n\n\t\t\t\t\tif (time > interpolant.parameterPositions[1]) {\n\t\t\t\t\t\tthis.stopWarping();\n\n\t\t\t\t\t\tif (timeScale === 0) {\n\t\t\t\t\t\t\t// motion has halted, pause\n\t\t\t\t\t\t\tthis.paused = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// warp done - apply final time scale\n\t\t\t\t\t\t\tthis.timeScale = timeScale;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._effectiveTimeScale = timeScale;\n\t\t\treturn timeScale;\n\t\t};\n\n\t\t_proto._updateTime = function _updateTime(deltaTime) {\n\t\t\tvar duration = this._clip.duration;\n\t\t\tvar loop = this.loop;\n\t\t\tvar time = this.time + deltaTime;\n\t\t\tvar loopCount = this._loopCount;\n\t\t\tvar pingPong = loop === LoopPingPong;\n\n\t\t\tif (deltaTime === 0) {\n\t\t\t\tif (loopCount === -1) return time;\n\t\t\t\treturn pingPong && (loopCount & 1) === 1 ? duration - time : time;\n\t\t\t}\n\n\t\t\tif (loop === LoopOnce) {\n\t\t\t\tif (loopCount === -1) {\n\t\t\t\t\t// just started\n\t\t\t\t\tthis._loopCount = 0;\n\n\t\t\t\t\tthis._setEndings(true, true, false);\n\t\t\t\t}\n\n\t\t\t\thandle_stop: {\n\t\t\t\t\tif (time >= duration) {\n\t\t\t\t\t\ttime = duration;\n\t\t\t\t\t} else if (time < 0) {\n\t\t\t\t\t\ttime = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.time = time;\n\t\t\t\t\t\tbreak handle_stop;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.clampWhenFinished) this.paused = true;else this.enabled = false;\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent({\n\t\t\t\t\t\ttype: 'finished',\n\t\t\t\t\t\taction: this,\n\t\t\t\t\t\tdirection: deltaTime < 0 ? -1 : 1\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// repetitive Repeat or PingPong\n\t\t\t\tif (loopCount === -1) {\n\t\t\t\t\t// just started\n\t\t\t\t\tif (deltaTime >= 0) {\n\t\t\t\t\t\tloopCount = 0;\n\n\t\t\t\t\t\tthis._setEndings(true, this.repetitions === 0, pingPong);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// when looping in reverse direction, the initial\n\t\t\t\t\t\t// transition through zero counts as a repetition,\n\t\t\t\t\t\t// so leave loopCount at -1\n\t\t\t\t\t\tthis._setEndings(this.repetitions === 0, true, pingPong);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (time >= duration || time < 0) {\n\t\t\t\t\t// wrap around\n\t\t\t\t\tvar loopDelta = Math.floor(time / duration); // signed\n\n\t\t\t\t\ttime -= duration * loopDelta;\n\t\t\t\t\tloopCount += Math.abs(loopDelta);\n\t\t\t\t\tvar pending = this.repetitions - loopCount;\n\n\t\t\t\t\tif (pending <= 0) {\n\t\t\t\t\t\t// have to stop (switch state, clamp time, fire event)\n\t\t\t\t\t\tif (this.clampWhenFinished) this.paused = true;else this.enabled = false;\n\t\t\t\t\t\ttime = deltaTime > 0 ? duration : 0;\n\t\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\t\tthis._mixer.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'finished',\n\t\t\t\t\t\t\taction: this,\n\t\t\t\t\t\t\tdirection: deltaTime > 0 ? 1 : -1\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// keep running\n\t\t\t\t\t\tif (pending === 1) {\n\t\t\t\t\t\t\t// entering the last round\n\t\t\t\t\t\t\tvar atStart = deltaTime < 0;\n\n\t\t\t\t\t\t\tthis._setEndings(atStart, !atStart, pingPong);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._setEndings(false, false, pingPong);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._loopCount = loopCount;\n\t\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\t\tthis._mixer.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'loop',\n\t\t\t\t\t\t\taction: this,\n\t\t\t\t\t\t\tloopDelta: loopDelta\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.time = time;\n\t\t\t\t}\n\n\t\t\t\tif (pingPong && (loopCount & 1) === 1) {\n\t\t\t\t\t// invert time for the \"pong round\"\n\t\t\t\t\treturn duration - time;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn time;\n\t\t};\n\n\t\t_proto._setEndings = function _setEndings(atStart, atEnd, pingPong) {\n\t\t\tvar settings = this._interpolantSettings;\n\n\t\t\tif (pingPong) {\n\t\t\t\tsettings.endingStart = ZeroSlopeEnding;\n\t\t\t\tsettings.endingEnd = ZeroSlopeEnding;\n\t\t\t} else {\n\t\t\t\t// assuming for LoopOnce atStart == atEnd == true\n\t\t\t\tif (atStart) {\n\t\t\t\t\tsettings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\t\t\t\t} else {\n\t\t\t\t\tsettings.endingStart = WrapAroundEnding;\n\t\t\t\t}\n\n\t\t\t\tif (atEnd) {\n\t\t\t\t\tsettings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\t\t\t\t} else {\n\t\t\t\t\tsettings.endingEnd = WrapAroundEnding;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t_proto._scheduleFading = function _scheduleFading(duration, weightNow, weightThen) {\n\t\t\tvar mixer = this._mixer,\n\t\t\t\t\tnow = mixer.time;\n\t\t\tvar interpolant = this._weightInterpolant;\n\n\t\t\tif (interpolant === null) {\n\t\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\t\tthis._weightInterpolant = interpolant;\n\t\t\t}\n\n\t\t\tvar times = interpolant.parameterPositions,\n\t\t\t\t\tvalues = interpolant.sampleValues;\n\t\t\ttimes[0] = now;\n\t\t\tvalues[0] = weightNow;\n\t\t\ttimes[1] = now + duration;\n\t\t\tvalues[1] = weightThen;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn AnimationAction;\n\t}();\n\n\tfunction AnimationMixer(root) {\n\t\tthis._root = root;\n\n\t\tthis._initMemoryManager();\n\n\t\tthis._accuIndex = 0;\n\t\tthis.time = 0;\n\t\tthis.timeScale = 1.0;\n\t}\n\n\tAnimationMixer.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: AnimationMixer,\n\t\t_bindAction: function _bindAction(action, prototypeAction) {\n\t\t\tvar root = action._localRoot || this._root,\n\t\t\t\t\ttracks = action._clip.tracks,\n\t\t\t\t\tnTracks = tracks.length,\n\t\t\t\t\tbindings = action._propertyBindings,\n\t\t\t\t\tinterpolants = action._interpolants,\n\t\t\t\t\trootUuid = root.uuid,\n\t\t\t\t\tbindingsByRoot = this._bindingsByRootAndName;\n\t\t\tvar bindingsByName = bindingsByRoot[rootUuid];\n\n\t\t\tif (bindingsByName === undefined) {\n\t\t\t\tbindingsByName = {};\n\t\t\t\tbindingsByRoot[rootUuid] = bindingsByName;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i !== nTracks; ++i) {\n\t\t\t\tvar track = tracks[i],\n\t\t\t\t\t\ttrackName = track.name;\n\t\t\t\tvar binding = bindingsByName[trackName];\n\n\t\t\t\tif (binding !== undefined) {\n\t\t\t\t\tbindings[i] = binding;\n\t\t\t\t} else {\n\t\t\t\t\tbinding = bindings[i];\n\n\t\t\t\t\tif (binding !== undefined) {\n\t\t\t\t\t\t// existing binding, make sure the cache knows\n\t\t\t\t\t\tif (binding._cacheIndex === null) {\n\t\t\t\t\t\t\t++binding.referenceCount;\n\n\t\t\t\t\t\t\tthis._addInactiveBinding(binding, rootUuid, trackName);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar path = prototypeAction && prototypeAction._propertyBindings[i].binding.parsedPath;\n\t\t\t\t\tbinding = new PropertyMixer(PropertyBinding.create(root, trackName, path), track.ValueTypeName, track.getValueSize());\n\t\t\t\t\t++binding.referenceCount;\n\n\t\t\t\t\tthis._addInactiveBinding(binding, rootUuid, trackName);\n\n\t\t\t\t\tbindings[i] = binding;\n\t\t\t\t}\n\n\t\t\t\tinterpolants[i].resultBuffer = binding.buffer;\n\t\t\t}\n\t\t},\n\t\t_activateAction: function _activateAction(action) {\n\t\t\tif (!this._isActiveAction(action)) {\n\t\t\t\tif (action._cacheIndex === null) {\n\t\t\t\t\t// this action has been forgotten by the cache, but the user\n\t\t\t\t\t// appears to be still using it -> rebind\n\t\t\t\t\tvar rootUuid = (action._localRoot || this._root).uuid,\n\t\t\t\t\t\t\tclipUuid = action._clip.uuid,\n\t\t\t\t\t\t\tactionsForClip = this._actionsByClip[clipUuid];\n\n\t\t\t\t\tthis._bindAction(action, actionsForClip && actionsForClip.knownActions[0]);\n\n\t\t\t\t\tthis._addInactiveAction(action, clipUuid, rootUuid);\n\t\t\t\t}\n\n\t\t\t\tvar bindings = action._propertyBindings; // increment reference counts / sort out state\n\n\t\t\t\tfor (var i = 0, n = bindings.length; i !== n; ++i) {\n\t\t\t\t\tvar binding = bindings[i];\n\n\t\t\t\t\tif (binding.useCount++ === 0) {\n\t\t\t\t\t\tthis._lendBinding(binding);\n\n\t\t\t\t\t\tbinding.saveOriginalState();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._lendAction(action);\n\t\t\t}\n\t\t},\n\t\t_deactivateAction: function _deactivateAction(action) {\n\t\t\tif (this._isActiveAction(action)) {\n\t\t\t\tvar bindings = action._propertyBindings; // decrement reference counts / sort out state\n\n\t\t\t\tfor (var i = 0, n = bindings.length; i !== n; ++i) {\n\t\t\t\t\tvar binding = bindings[i];\n\n\t\t\t\t\tif (--binding.useCount === 0) {\n\t\t\t\t\t\tbinding.restoreOriginalState();\n\n\t\t\t\t\t\tthis._takeBackBinding(binding);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._takeBackAction(action);\n\t\t\t}\n\t\t},\n\t\t// Memory manager\n\t\t_initMemoryManager: function _initMemoryManager() {\n\t\t\tthis._actions = []; // 'nActiveActions' followed by inactive ones\n\n\t\t\tthis._nActiveActions = 0;\n\t\t\tthis._actionsByClip = {}; // inside:\n\t\t\t// {\n\t\t\t// \tknownActions: Array< AnimationAction > - used as prototypes\n\t\t\t// \tactionByRoot: AnimationAction - lookup\n\t\t\t// }\n\n\t\t\tthis._bindings = []; // 'nActiveBindings' followed by inactive ones\n\n\t\t\tthis._nActiveBindings = 0;\n\t\t\tthis._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer >\n\n\t\t\tthis._controlInterpolants = []; // same game as above\n\n\t\t\tthis._nActiveControlInterpolants = 0;\n\t\t\tvar scope = this;\n\t\t\tthis.stats = {\n\t\t\t\tactions: {\n\t\t\t\t\tget total() {\n\t\t\t\t\t\treturn scope._actions.length;\n\t\t\t\t\t},\n\n\t\t\t\t\tget inUse() {\n\t\t\t\t\t\treturn scope._nActiveActions;\n\t\t\t\t\t}\n\n\t\t\t\t},\n\t\t\t\tbindings: {\n\t\t\t\t\tget total() {\n\t\t\t\t\t\treturn scope._bindings.length;\n\t\t\t\t\t},\n\n\t\t\t\t\tget inUse() {\n\t\t\t\t\t\treturn scope._nActiveBindings;\n\t\t\t\t\t}\n\n\t\t\t\t},\n\t\t\t\tcontrolInterpolants: {\n\t\t\t\t\tget total() {\n\t\t\t\t\t\treturn scope._controlInterpolants.length;\n\t\t\t\t\t},\n\n\t\t\t\t\tget inUse() {\n\t\t\t\t\t\treturn scope._nActiveControlInterpolants;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\t// Memory management for AnimationAction objects\n\t\t_isActiveAction: function _isActiveAction(action) {\n\t\t\tvar index = action._cacheIndex;\n\t\t\treturn index !== null && index < this._nActiveActions;\n\t\t},\n\t\t_addInactiveAction: function _addInactiveAction(action, clipUuid, rootUuid) {\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tactionsByClip = this._actionsByClip;\n\t\t\tvar actionsForClip = actionsByClip[clipUuid];\n\n\t\t\tif (actionsForClip === undefined) {\n\t\t\t\tactionsForClip = {\n\t\t\t\t\tknownActions: [action],\n\t\t\t\t\tactionByRoot: {}\n\t\t\t\t};\n\t\t\t\taction._byClipCacheIndex = 0;\n\t\t\t\tactionsByClip[clipUuid] = actionsForClip;\n\t\t\t} else {\n\t\t\t\tvar knownActions = actionsForClip.knownActions;\n\t\t\t\taction._byClipCacheIndex = knownActions.length;\n\t\t\t\tknownActions.push(action);\n\t\t\t}\n\n\t\t\taction._cacheIndex = actions.length;\n\t\t\tactions.push(action);\n\t\t\tactionsForClip.actionByRoot[rootUuid] = action;\n\t\t},\n\t\t_removeInactiveAction: function _removeInactiveAction(action) {\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tlastInactiveAction = actions[actions.length - 1],\n\t\t\t\t\tcacheIndex = action._cacheIndex;\n\t\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\t\tactions[cacheIndex] = lastInactiveAction;\n\t\t\tactions.pop();\n\t\t\taction._cacheIndex = null;\n\t\t\tvar clipUuid = action._clip.uuid,\n\t\t\t\t\tactionsByClip = this._actionsByClip,\n\t\t\t\t\tactionsForClip = actionsByClip[clipUuid],\n\t\t\t\t\tknownActionsForClip = actionsForClip.knownActions,\n\t\t\t\t\tlastKnownAction = knownActionsForClip[knownActionsForClip.length - 1],\n\t\t\t\t\tbyClipCacheIndex = action._byClipCacheIndex;\n\t\t\tlastKnownAction._byClipCacheIndex = byClipCacheIndex;\n\t\t\tknownActionsForClip[byClipCacheIndex] = lastKnownAction;\n\t\t\tknownActionsForClip.pop();\n\t\t\taction._byClipCacheIndex = null;\n\t\t\tvar actionByRoot = actionsForClip.actionByRoot,\n\t\t\t\t\trootUuid = (action._localRoot || this._root).uuid;\n\t\t\tdelete actionByRoot[rootUuid];\n\n\t\t\tif (knownActionsForClip.length === 0) {\n\t\t\t\tdelete actionsByClip[clipUuid];\n\t\t\t}\n\n\t\t\tthis._removeInactiveBindingsForAction(action);\n\t\t},\n\t\t_removeInactiveBindingsForAction: function _removeInactiveBindingsForAction(action) {\n\t\t\tvar bindings = action._propertyBindings;\n\n\t\t\tfor (var i = 0, n = bindings.length; i !== n; ++i) {\n\t\t\t\tvar binding = bindings[i];\n\n\t\t\t\tif (--binding.referenceCount === 0) {\n\t\t\t\t\tthis._removeInactiveBinding(binding);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t_lendAction: function _lendAction(action) {\n\t\t\t// [ active actions |\tinactive actions\t]\n\t\t\t// [\tactive actions >| inactive actions ]\n\t\t\t//\t\t\t\t\t\t\t\t s\t\t\t\ta\n\t\t\t//\t\t\t\t\t\t\t\t\t<-swap->\n\t\t\t//\t\t\t\t\t\t\t\t a\t\t\t\ts\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tprevIndex = action._cacheIndex,\n\t\t\t\t\tlastActiveIndex = this._nActiveActions++,\n\t\t\t\t\tfirstInactiveAction = actions[lastActiveIndex];\n\t\t\taction._cacheIndex = lastActiveIndex;\n\t\t\tactions[lastActiveIndex] = action;\n\t\t\tfirstInactiveAction._cacheIndex = prevIndex;\n\t\t\tactions[prevIndex] = firstInactiveAction;\n\t\t},\n\t\t_takeBackAction: function _takeBackAction(action) {\n\t\t\t// [\tactive actions\t| inactive actions ]\n\t\t\t// [ active actions |< inactive actions\t]\n\t\t\t//\t\t\t\ta\t\t\t\ts\n\t\t\t//\t\t\t\t <-swap->\n\t\t\t//\t\t\t\ts\t\t\t\ta\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tprevIndex = action._cacheIndex,\n\t\t\t\t\tfirstInactiveIndex = --this._nActiveActions,\n\t\t\t\t\tlastActiveAction = actions[firstInactiveIndex];\n\t\t\taction._cacheIndex = firstInactiveIndex;\n\t\t\tactions[firstInactiveIndex] = action;\n\t\t\tlastActiveAction._cacheIndex = prevIndex;\n\t\t\tactions[prevIndex] = lastActiveAction;\n\t\t},\n\t\t// Memory management for PropertyMixer objects\n\t\t_addInactiveBinding: function _addInactiveBinding(binding, rootUuid, trackName) {\n\t\t\tvar bindingsByRoot = this._bindingsByRootAndName,\n\t\t\t\t\tbindings = this._bindings;\n\t\t\tvar bindingByName = bindingsByRoot[rootUuid];\n\n\t\t\tif (bindingByName === undefined) {\n\t\t\t\tbindingByName = {};\n\t\t\t\tbindingsByRoot[rootUuid] = bindingByName;\n\t\t\t}\n\n\t\t\tbindingByName[trackName] = binding;\n\t\t\tbinding._cacheIndex = bindings.length;\n\t\t\tbindings.push(binding);\n\t\t},\n\t\t_removeInactiveBinding: function _removeInactiveBinding(binding) {\n\t\t\tvar bindings = this._bindings,\n\t\t\t\t\tpropBinding = binding.binding,\n\t\t\t\t\trootUuid = propBinding.rootNode.uuid,\n\t\t\t\t\ttrackName = propBinding.path,\n\t\t\t\t\tbindingsByRoot = this._bindingsByRootAndName,\n\t\t\t\t\tbindingByName = bindingsByRoot[rootUuid],\n\t\t\t\t\tlastInactiveBinding = bindings[bindings.length - 1],\n\t\t\t\t\tcacheIndex = binding._cacheIndex;\n\t\t\tlastInactiveBinding._cacheIndex = cacheIndex;\n\t\t\tbindings[cacheIndex] = lastInactiveBinding;\n\t\t\tbindings.pop();\n\t\t\tdelete bindingByName[trackName];\n\n\t\t\tif (Object.keys(bindingByName).length === 0) {\n\t\t\t\tdelete bindingsByRoot[rootUuid];\n\t\t\t}\n\t\t},\n\t\t_lendBinding: function _lendBinding(binding) {\n\t\t\tvar bindings = this._bindings,\n\t\t\t\t\tprevIndex = binding._cacheIndex,\n\t\t\t\t\tlastActiveIndex = this._nActiveBindings++,\n\t\t\t\t\tfirstInactiveBinding = bindings[lastActiveIndex];\n\t\t\tbinding._cacheIndex = lastActiveIndex;\n\t\t\tbindings[lastActiveIndex] = binding;\n\t\t\tfirstInactiveBinding._cacheIndex = prevIndex;\n\t\t\tbindings[prevIndex] = firstInactiveBinding;\n\t\t},\n\t\t_takeBackBinding: function _takeBackBinding(binding) {\n\t\t\tvar bindings = this._bindings,\n\t\t\t\t\tprevIndex = binding._cacheIndex,\n\t\t\t\t\tfirstInactiveIndex = --this._nActiveBindings,\n\t\t\t\t\tlastActiveBinding = bindings[firstInactiveIndex];\n\t\t\tbinding._cacheIndex = firstInactiveIndex;\n\t\t\tbindings[firstInactiveIndex] = binding;\n\t\t\tlastActiveBinding._cacheIndex = prevIndex;\n\t\t\tbindings[prevIndex] = lastActiveBinding;\n\t\t},\n\t\t// Memory management of Interpolants for weight and time scale\n\t\t_lendControlInterpolant: function _lendControlInterpolant() {\n\t\t\tvar interpolants = this._controlInterpolants,\n\t\t\t\t\tlastActiveIndex = this._nActiveControlInterpolants++;\n\t\t\tvar interpolant = interpolants[lastActiveIndex];\n\n\t\t\tif (interpolant === undefined) {\n\t\t\t\tinterpolant = new LinearInterpolant(new Float32Array(2), new Float32Array(2), 1, this._controlInterpolantsResultBuffer);\n\t\t\t\tinterpolant.__cacheIndex = lastActiveIndex;\n\t\t\t\tinterpolants[lastActiveIndex] = interpolant;\n\t\t\t}\n\n\t\t\treturn interpolant;\n\t\t},\n\t\t_takeBackControlInterpolant: function _takeBackControlInterpolant(interpolant) {\n\t\t\tvar interpolants = this._controlInterpolants,\n\t\t\t\t\tprevIndex = interpolant.__cacheIndex,\n\t\t\t\t\tfirstInactiveIndex = --this._nActiveControlInterpolants,\n\t\t\t\t\tlastActiveInterpolant = interpolants[firstInactiveIndex];\n\t\t\tinterpolant.__cacheIndex = firstInactiveIndex;\n\t\t\tinterpolants[firstInactiveIndex] = interpolant;\n\t\t\tlastActiveInterpolant.__cacheIndex = prevIndex;\n\t\t\tinterpolants[prevIndex] = lastActiveInterpolant;\n\t\t},\n\t\t_controlInterpolantsResultBuffer: new Float32Array(1),\n\t\t// return an action for a clip optionally using a custom root target\n\t\t// object (this method allocates a lot of dynamic memory in case a\n\t\t// previously unknown clip/root combination is specified)\n\t\tclipAction: function clipAction(clip, optionalRoot, blendMode) {\n\t\t\tvar root = optionalRoot || this._root,\n\t\t\t\t\trootUuid = root.uuid;\n\t\t\tvar clipObject = typeof clip === 'string' ? AnimationClip.findByName(root, clip) : clip;\n\t\t\tvar clipUuid = clipObject !== null ? clipObject.uuid : clip;\n\t\t\tvar actionsForClip = this._actionsByClip[clipUuid];\n\t\t\tvar prototypeAction = null;\n\n\t\t\tif (blendMode === undefined) {\n\t\t\t\tif (clipObject !== null) {\n\t\t\t\t\tblendMode = clipObject.blendMode;\n\t\t\t\t} else {\n\t\t\t\t\tblendMode = NormalAnimationBlendMode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (actionsForClip !== undefined) {\n\t\t\t\tvar existingAction = actionsForClip.actionByRoot[rootUuid];\n\n\t\t\t\tif (existingAction !== undefined && existingAction.blendMode === blendMode) {\n\t\t\t\t\treturn existingAction;\n\t\t\t\t} // we know the clip, so we don't have to parse all\n\t\t\t\t// the bindings again but can just copy\n\n\n\t\t\t\tprototypeAction = actionsForClip.knownActions[0]; // also, take the clip from the prototype action\n\n\t\t\t\tif (clipObject === null) clipObject = prototypeAction._clip;\n\t\t\t} // clip must be known when specified via string\n\n\n\t\t\tif (clipObject === null) return null; // allocate all resources required to run it\n\n\t\t\tvar newAction = new AnimationAction(this, clipObject, optionalRoot, blendMode);\n\n\t\t\tthis._bindAction(newAction, prototypeAction); // and make the action known to the memory manager\n\n\n\t\t\tthis._addInactiveAction(newAction, clipUuid, rootUuid);\n\n\t\t\treturn newAction;\n\t\t},\n\t\t// get an existing action\n\t\texistingAction: function existingAction(clip, optionalRoot) {\n\t\t\tvar root = optionalRoot || this._root,\n\t\t\t\t\trootUuid = root.uuid,\n\t\t\t\t\tclipObject = typeof clip === 'string' ? AnimationClip.findByName(root, clip) : clip,\n\t\t\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\t\t\t\t\tactionsForClip = this._actionsByClip[clipUuid];\n\n\t\t\tif (actionsForClip !== undefined) {\n\t\t\t\treturn actionsForClip.actionByRoot[rootUuid] || null;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\t// deactivates all previously scheduled actions\n\t\tstopAllAction: function stopAllAction() {\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tnActions = this._nActiveActions;\n\n\t\t\tfor (var i = nActions - 1; i >= 0; --i) {\n\t\t\t\tactions[i].stop();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// advance the time and update apply the animation\n\t\tupdate: function update(deltaTime) {\n\t\t\tdeltaTime *= this.timeScale;\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tnActions = this._nActiveActions,\n\t\t\t\t\ttime = this.time += deltaTime,\n\t\t\t\t\ttimeDirection = Math.sign(deltaTime),\n\t\t\t\t\taccuIndex = this._accuIndex ^= 1; // run active actions\n\n\t\t\tfor (var i = 0; i !== nActions; ++i) {\n\t\t\t\tvar action = actions[i];\n\n\t\t\t\taction._update(time, deltaTime, timeDirection, accuIndex);\n\t\t\t} // update scene graph\n\n\n\t\t\tvar bindings = this._bindings,\n\t\t\t\t\tnBindings = this._nActiveBindings;\n\n\t\t\tfor (var _i = 0; _i !== nBindings; ++_i) {\n\t\t\t\tbindings[_i].apply(accuIndex);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// Allows you to seek to a specific time in an animation.\n\t\tsetTime: function setTime(timeInSeconds) {\n\t\t\tthis.time = 0; // Zero out time attribute for AnimationMixer object;\n\n\t\t\tfor (var i = 0; i < this._actions.length; i++) {\n\t\t\t\tthis._actions[i].time = 0; // Zero out time attribute for all associated AnimationAction objects.\n\t\t\t}\n\n\t\t\treturn this.update(timeInSeconds); // Update used to set exact time. Returns \"this\" AnimationMixer object.\n\t\t},\n\t\t// return this mixer's root target object\n\t\tgetRoot: function getRoot() {\n\t\t\treturn this._root;\n\t\t},\n\t\t// free all resources specific to a particular clip\n\t\tuncacheClip: function uncacheClip(clip) {\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tclipUuid = clip.uuid,\n\t\t\t\t\tactionsByClip = this._actionsByClip,\n\t\t\t\t\tactionsForClip = actionsByClip[clipUuid];\n\n\t\t\tif (actionsForClip !== undefined) {\n\t\t\t\t// note: just calling _removeInactiveAction would mess up the\n\t\t\t\t// iteration state and also require updating the state we can\n\t\t\t\t// just throw away\n\t\t\t\tvar actionsToRemove = actionsForClip.knownActions;\n\n\t\t\t\tfor (var i = 0, n = actionsToRemove.length; i !== n; ++i) {\n\t\t\t\t\tvar action = actionsToRemove[i];\n\n\t\t\t\t\tthis._deactivateAction(action);\n\n\t\t\t\t\tvar cacheIndex = action._cacheIndex,\n\t\t\t\t\t\t\tlastInactiveAction = actions[actions.length - 1];\n\t\t\t\t\taction._cacheIndex = null;\n\t\t\t\t\taction._byClipCacheIndex = null;\n\t\t\t\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\t\t\t\tactions[cacheIndex] = lastInactiveAction;\n\t\t\t\t\tactions.pop();\n\n\t\t\t\t\tthis._removeInactiveBindingsForAction(action);\n\t\t\t\t}\n\n\t\t\t\tdelete actionsByClip[clipUuid];\n\t\t\t}\n\t\t},\n\t\t// free all resources specific to a particular root target object\n\t\tuncacheRoot: function uncacheRoot(root) {\n\t\t\tvar rootUuid = root.uuid,\n\t\t\t\t\tactionsByClip = this._actionsByClip;\n\n\t\t\tfor (var clipUuid in actionsByClip) {\n\t\t\t\tvar actionByRoot = actionsByClip[clipUuid].actionByRoot,\n\t\t\t\t\t\taction = actionByRoot[rootUuid];\n\n\t\t\t\tif (action !== undefined) {\n\t\t\t\t\tthis._deactivateAction(action);\n\n\t\t\t\t\tthis._removeInactiveAction(action);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar bindingsByRoot = this._bindingsByRootAndName,\n\t\t\t\t\tbindingByName = bindingsByRoot[rootUuid];\n\n\t\t\tif (bindingByName !== undefined) {\n\t\t\t\tfor (var trackName in bindingByName) {\n\t\t\t\t\tvar binding = bindingByName[trackName];\n\t\t\t\t\tbinding.restoreOriginalState();\n\n\t\t\t\t\tthis._removeInactiveBinding(binding);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// remove a targeted clip from the cache\n\t\tuncacheAction: function uncacheAction(clip, optionalRoot) {\n\t\t\tvar action = this.existingAction(clip, optionalRoot);\n\n\t\t\tif (action !== null) {\n\t\t\t\tthis._deactivateAction(action);\n\n\t\t\t\tthis._removeInactiveAction(action);\n\t\t\t}\n\t\t}\n\t});\n\n\tvar Uniform = /*#__PURE__*/function () {\n\t\tfunction Uniform(value) {\n\t\t\tif (typeof value === 'string') {\n\t\t\t\tconsole.warn('THREE.Uniform: Type parameter is no longer needed.');\n\t\t\t\tvalue = arguments[1];\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tvar _proto = Uniform.prototype;\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new Uniform(this.value.clone === undefined ? this.value : this.value.clone());\n\t\t};\n\n\t\treturn Uniform;\n\t}();\n\n\tfunction InstancedInterleavedBuffer(array, stride, meshPerAttribute) {\n\t\tInterleavedBuffer.call(this, array, stride);\n\t\tthis.meshPerAttribute = meshPerAttribute || 1;\n\t}\n\n\tInstancedInterleavedBuffer.prototype = Object.assign(Object.create(InterleavedBuffer.prototype), {\n\t\tconstructor: InstancedInterleavedBuffer,\n\t\tisInstancedInterleavedBuffer: true,\n\t\tcopy: function copy(source) {\n\t\t\tInterleavedBuffer.prototype.copy.call(this, source);\n\t\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone(data) {\n\t\t\tvar ib = InterleavedBuffer.prototype.clone.call(this, data);\n\t\t\tib.meshPerAttribute = this.meshPerAttribute;\n\t\t\treturn ib;\n\t\t},\n\t\ttoJSON: function toJSON(data) {\n\t\t\tvar json = InterleavedBuffer.prototype.toJSON.call(this, data);\n\t\t\tjson.isInstancedInterleavedBuffer = true;\n\t\t\tjson.meshPerAttribute = this.meshPerAttribute;\n\t\t\treturn json;\n\t\t}\n\t});\n\n\tfunction GLBufferAttribute(buffer, type, itemSize, elementSize, count) {\n\t\tthis.buffer = buffer;\n\t\tthis.type = type;\n\t\tthis.itemSize = itemSize;\n\t\tthis.elementSize = elementSize;\n\t\tthis.count = count;\n\t\tthis.version = 0;\n\t}\n\n\tObject.defineProperty(GLBufferAttribute.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\tObject.assign(GLBufferAttribute.prototype, {\n\t\tisGLBufferAttribute: true,\n\t\tsetBuffer: function setBuffer(buffer) {\n\t\t\tthis.buffer = buffer;\n\t\t\treturn this;\n\t\t},\n\t\tsetType: function setType(type, elementSize) {\n\t\t\tthis.type = type;\n\t\t\tthis.elementSize = elementSize;\n\t\t\treturn this;\n\t\t},\n\t\tsetItemSize: function setItemSize(itemSize) {\n\t\t\tthis.itemSize = itemSize;\n\t\t\treturn this;\n\t\t},\n\t\tsetCount: function setCount(count) {\n\t\t\tthis.count = count;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction Raycaster(origin, direction, near, far) {\n\t\tthis.ray = new Ray(origin, direction); // direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.near = near || 0;\n\t\tthis.far = far || Infinity;\n\t\tthis.camera = null;\n\t\tthis.layers = new Layers();\n\t\tthis.params = {\n\t\t\tMesh: {},\n\t\t\tLine: {\n\t\t\t\tthreshold: 1\n\t\t\t},\n\t\t\tLOD: {},\n\t\t\tPoints: {\n\t\t\t\tthreshold: 1\n\t\t\t},\n\t\t\tSprite: {}\n\t\t};\n\t\tObject.defineProperties(this.params, {\n\t\t\tPointCloud: {\n\t\t\t\tget: function get() {\n\t\t\t\t\tconsole.warn('THREE.Raycaster: params.PointCloud has been renamed to params.Points.');\n\t\t\t\t\treturn this.Points;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tfunction ascSort(a, b) {\n\t\treturn a.distance - b.distance;\n\t}\n\n\tfunction _intersectObject(object, raycaster, intersects, recursive) {\n\t\tif (object.layers.test(raycaster.layers)) {\n\t\t\tobject.raycast(raycaster, intersects);\n\t\t}\n\n\t\tif (recursive === true) {\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\t_intersectObject(children[i], raycaster, intersects, true);\n\t\t\t}\n\t\t}\n\t}\n\n\tObject.assign(Raycaster.prototype, {\n\t\tset: function set(origin, direction) {\n\t\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\t\t\tthis.ray.set(origin, direction);\n\t\t},\n\t\tsetFromCamera: function setFromCamera(coords, camera) {\n\t\t\tif (camera && camera.isPerspectiveCamera) {\n\t\t\t\tthis.ray.origin.setFromMatrixPosition(camera.matrixWorld);\n\t\t\t\tthis.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();\n\t\t\t\tthis.camera = camera;\n\t\t\t} else if (camera && camera.isOrthographicCamera) {\n\t\t\t\tthis.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera\n\n\t\t\t\tthis.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);\n\t\t\t\tthis.camera = camera;\n\t\t\t} else {\n\t\t\t\tconsole.error('THREE.Raycaster: Unsupported camera type: ' + camera.type);\n\t\t\t}\n\t\t},\n\t\tintersectObject: function intersectObject(object, recursive, optionalTarget) {\n\t\t\tvar intersects = optionalTarget || [];\n\n\t\t\t_intersectObject(object, this, intersects, recursive);\n\n\t\t\tintersects.sort(ascSort);\n\t\t\treturn intersects;\n\t\t},\n\t\tintersectObjects: function intersectObjects(objects, recursive, optionalTarget) {\n\t\t\tvar intersects = optionalTarget || [];\n\n\t\t\tif (Array.isArray(objects) === false) {\n\t\t\t\tconsole.warn('THREE.Raycaster.intersectObjects: objects is not an Array.');\n\t\t\t\treturn intersects;\n\t\t\t}\n\n\t\t\tfor (var i = 0, l = objects.length; i < l; i++) {\n\t\t\t\t_intersectObject(objects[i], this, intersects, recursive);\n\t\t\t}\n\n\t\t\tintersects.sort(ascSort);\n\t\t\treturn intersects;\n\t\t}\n\t});\n\n\t/**\n\t * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system\n\t *\n\t * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.\n\t * The azimuthal angle (theta) is measured from the positive z-axis.\n\t */\n\n\tvar Spherical = /*#__PURE__*/function () {\n\t\tfunction Spherical(radius, phi, theta) {\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (phi === void 0) {\n\t\t\t\tphi = 0;\n\t\t\t}\n\n\t\t\tif (theta === void 0) {\n\t\t\t\ttheta = 0;\n\t\t\t}\n\n\t\t\tthis.radius = radius;\n\t\t\tthis.phi = phi; // polar angle\n\n\t\t\tthis.theta = theta; // azimuthal angle\n\n\t\t\treturn this;\n\t\t}\n\n\t\tvar _proto = Spherical.prototype;\n\n\t\t_proto.set = function set(radius, phi, theta) {\n\t\t\tthis.radius = radius;\n\t\t\tthis.phi = phi;\n\t\t\tthis.theta = theta;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(other) {\n\t\t\tthis.radius = other.radius;\n\t\t\tthis.phi = other.phi;\n\t\t\tthis.theta = other.theta;\n\t\t\treturn this;\n\t\t} // restrict phi to be betwee EPS and PI-EPS\n\t\t;\n\n\t\t_proto.makeSafe = function makeSafe() {\n\t\t\tvar EPS = 0.000001;\n\t\t\tthis.phi = Math.max(EPS, Math.min(Math.PI - EPS, this.phi));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromVector3 = function setFromVector3(v) {\n\t\t\treturn this.setFromCartesianCoords(v.x, v.y, v.z);\n\t\t};\n\n\t\t_proto.setFromCartesianCoords = function setFromCartesianCoords(x, y, z) {\n\t\t\tthis.radius = Math.sqrt(x * x + y * y + z * z);\n\n\t\t\tif (this.radius === 0) {\n\t\t\t\tthis.theta = 0;\n\t\t\t\tthis.phi = 0;\n\t\t\t} else {\n\t\t\t\tthis.theta = Math.atan2(x, z);\n\t\t\t\tthis.phi = Math.acos(MathUtils.clamp(y / this.radius, -1, 1));\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Spherical;\n\t}();\n\n\t/**\n\t * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system\n\t */\n\tvar Cylindrical = /*#__PURE__*/function () {\n\t\tfunction Cylindrical(radius, theta, y) {\n\t\t\tthis.radius = radius !== undefined ? radius : 1.0; // distance from the origin to a point in the x-z plane\n\n\t\t\tthis.theta = theta !== undefined ? theta : 0; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis\n\n\t\t\tthis.y = y !== undefined ? y : 0; // height above the x-z plane\n\n\t\t\treturn this;\n\t\t}\n\n\t\tvar _proto = Cylindrical.prototype;\n\n\t\t_proto.set = function set(radius, theta, y) {\n\t\t\tthis.radius = radius;\n\t\t\tthis.theta = theta;\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(other) {\n\t\t\tthis.radius = other.radius;\n\t\t\tthis.theta = other.theta;\n\t\t\tthis.y = other.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromVector3 = function setFromVector3(v) {\n\t\t\treturn this.setFromCartesianCoords(v.x, v.y, v.z);\n\t\t};\n\n\t\t_proto.setFromCartesianCoords = function setFromCartesianCoords(x, y, z) {\n\t\t\tthis.radius = Math.sqrt(x * x + z * z);\n\t\t\tthis.theta = Math.atan2(x, z);\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Cylindrical;\n\t}();\n\n\tvar _vector$8 = /*@__PURE__*/new Vector2();\n\n\tvar Box2 = /*#__PURE__*/function () {\n\t\tfunction Box2(min, max) {\n\t\t\tObject.defineProperty(this, 'isBox2', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.min = min !== undefined ? min : new Vector2(+Infinity, +Infinity);\n\t\t\tthis.max = max !== undefined ? max : new Vector2(-Infinity, -Infinity);\n\t\t}\n\n\t\tvar _proto = Box2.prototype;\n\n\t\t_proto.set = function set(min, max) {\n\t\t\tthis.min.copy(min);\n\t\t\tthis.max.copy(max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromPoints = function setFromPoints(points) {\n\t\t\tthis.makeEmpty();\n\n\t\t\tfor (var i = 0, il = points.length; i < il; i++) {\n\t\t\t\tthis.expandByPoint(points[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromCenterAndSize = function setFromCenterAndSize(center, size) {\n\t\t\tvar halfSize = _vector$8.copy(size).multiplyScalar(0.5);\n\n\t\t\tthis.min.copy(center).sub(halfSize);\n\t\t\tthis.max.copy(center).add(halfSize);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(box) {\n\t\t\tthis.min.copy(box.min);\n\t\t\tthis.max.copy(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeEmpty = function makeEmpty() {\n\t\t\tthis.min.x = this.min.y = +Infinity;\n\t\t\tthis.max.x = this.max.y = -Infinity;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.isEmpty = function isEmpty() {\n\t\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\t\t\treturn this.max.x < this.min.x || this.max.y < this.min.y;\n\t\t};\n\n\t\t_proto.getCenter = function getCenter(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box2: .getCenter() target is now required');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn this.isEmpty() ? target.set(0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);\n\t\t};\n\n\t\t_proto.getSize = function getSize(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box2: .getSize() target is now required');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn this.isEmpty() ? target.set(0, 0) : target.subVectors(this.max, this.min);\n\t\t};\n\n\t\t_proto.expandByPoint = function expandByPoint(point) {\n\t\t\tthis.min.min(point);\n\t\t\tthis.max.max(point);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByVector = function expandByVector(vector) {\n\t\t\tthis.min.sub(vector);\n\t\t\tthis.max.add(vector);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByScalar = function expandByScalar(scalar) {\n\t\t\tthis.min.addScalar(-scalar);\n\t\t\tthis.max.addScalar(scalar);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\treturn point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y ? false : true;\n\t\t};\n\n\t\t_proto.containsBox = function containsBox(box) {\n\t\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y;\n\t\t};\n\n\t\t_proto.getParameter = function getParameter(point, target) {\n\t\t\t// This can potentially have a divide by zero if the box\n\t\t\t// has a size dimension of 0.\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box2: .getParameter() target is now required');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y));\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\t// using 4 splitting planes to rule out intersections\n\t\t\treturn box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y ? false : true;\n\t\t};\n\n\t\t_proto.clampPoint = function clampPoint(point, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box2: .clampPoint() target is now required');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn target.copy(point).clamp(this.min, this.max);\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\tvar clampedPoint = _vector$8.copy(point).clamp(this.min, this.max);\n\n\t\t\treturn clampedPoint.sub(point).length();\n\t\t};\n\n\t\t_proto.intersect = function intersect(box) {\n\t\t\tthis.min.max(box.min);\n\t\t\tthis.max.min(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.union = function union(box) {\n\t\t\tthis.min.min(box.min);\n\t\t\tthis.max.max(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(offset) {\n\t\t\tthis.min.add(offset);\n\t\t\tthis.max.add(offset);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(box) {\n\t\t\treturn box.min.equals(this.min) && box.max.equals(this.max);\n\t\t};\n\n\t\treturn Box2;\n\t}();\n\n\tvar _startP = /*@__PURE__*/new Vector3();\n\n\tvar _startEnd = /*@__PURE__*/new Vector3();\n\n\tvar Line3 = /*#__PURE__*/function () {\n\t\tfunction Line3(start, end) {\n\t\t\tthis.start = start !== undefined ? start : new Vector3();\n\t\t\tthis.end = end !== undefined ? end : new Vector3();\n\t\t}\n\n\t\tvar _proto = Line3.prototype;\n\n\t\t_proto.set = function set(start, end) {\n\t\t\tthis.start.copy(start);\n\t\t\tthis.end.copy(end);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(line) {\n\t\t\tthis.start.copy(line.start);\n\t\t\tthis.end.copy(line.end);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getCenter = function getCenter(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Line3: .getCenter() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.addVectors(this.start, this.end).multiplyScalar(0.5);\n\t\t};\n\n\t\t_proto.delta = function delta(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Line3: .delta() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.subVectors(this.end, this.start);\n\t\t};\n\n\t\t_proto.distanceSq = function distanceSq() {\n\t\t\treturn this.start.distanceToSquared(this.end);\n\t\t};\n\n\t\t_proto.distance = function distance() {\n\t\t\treturn this.start.distanceTo(this.end);\n\t\t};\n\n\t\t_proto.at = function at(t, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Line3: .at() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn this.delta(target).multiplyScalar(t).add(this.start);\n\t\t};\n\n\t\t_proto.closestPointToPointParameter = function closestPointToPointParameter(point, clampToLine) {\n\t\t\t_startP.subVectors(point, this.start);\n\n\t\t\t_startEnd.subVectors(this.end, this.start);\n\n\t\t\tvar startEnd2 = _startEnd.dot(_startEnd);\n\n\t\t\tvar startEnd_startP = _startEnd.dot(_startP);\n\n\t\t\tvar t = startEnd_startP / startEnd2;\n\n\t\t\tif (clampToLine) {\n\t\t\t\tt = MathUtils.clamp(t, 0, 1);\n\t\t\t}\n\n\t\t\treturn t;\n\t\t};\n\n\t\t_proto.closestPointToPoint = function closestPointToPoint(point, clampToLine, target) {\n\t\t\tvar t = this.closestPointToPointParameter(point, clampToLine);\n\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Line3: .closestPointToPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn this.delta(target).multiplyScalar(t).add(this.start);\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix) {\n\t\t\tthis.start.applyMatrix4(matrix);\n\t\t\tthis.end.applyMatrix4(matrix);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(line) {\n\t\t\treturn line.start.equals(this.start) && line.end.equals(this.end);\n\t\t};\n\n\t\treturn Line3;\n\t}();\n\n\tfunction ImmediateRenderObject(material) {\n\t\tObject3D.call(this);\n\t\tthis.material = material;\n\n\t\tthis.render = function ()\n\t\t/* renderCallback */\n\t\t{};\n\n\t\tthis.hasPositions = false;\n\t\tthis.hasNormals = false;\n\t\tthis.hasColors = false;\n\t\tthis.hasUvs = false;\n\t\tthis.positionArray = null;\n\t\tthis.normalArray = null;\n\t\tthis.colorArray = null;\n\t\tthis.uvArray = null;\n\t\tthis.count = 0;\n\t}\n\n\tImmediateRenderObject.prototype = Object.create(Object3D.prototype);\n\tImmediateRenderObject.prototype.constructor = ImmediateRenderObject;\n\tImmediateRenderObject.prototype.isImmediateRenderObject = true;\n\n\tvar _vector$9 = /*@__PURE__*/new Vector3();\n\n\tvar SpotLightHelper = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(SpotLightHelper, _Object3D);\n\n\t\tfunction SpotLightHelper(light, color) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.light = light;\n\n\t\t\t_this.light.updateMatrixWorld();\n\n\t\t\t_this.matrix = light.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\t_this.color = color;\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tvar positions = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1];\n\n\t\t\tfor (var i = 0, j = 1, l = 32; i < l; i++, j++) {\n\t\t\t\tvar p1 = i / l * Math.PI * 2;\n\t\t\t\tvar p2 = j / l * Math.PI * 2;\n\t\t\t\tpositions.push(Math.cos(p1), Math.sin(p1), 1, Math.cos(p2), Math.sin(p2), 1);\n\t\t\t}\n\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(positions, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tfog: false,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this.cone = new LineSegments(geometry, material);\n\n\t\t\t_this.add(_this.cone);\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = SpotLightHelper.prototype;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.cone.geometry.dispose();\n\t\t\tthis.cone.material.dispose();\n\t\t};\n\n\t\t_proto.update = function update() {\n\t\t\tthis.light.updateMatrixWorld();\n\t\t\tvar coneLength = this.light.distance ? this.light.distance : 1000;\n\t\t\tvar coneWidth = coneLength * Math.tan(this.light.angle);\n\t\t\tthis.cone.scale.set(coneWidth, coneWidth, coneLength);\n\n\t\t\t_vector$9.setFromMatrixPosition(this.light.target.matrixWorld);\n\n\t\t\tthis.cone.lookAt(_vector$9);\n\n\t\t\tif (this.color !== undefined) {\n\t\t\t\tthis.cone.material.color.set(this.color);\n\t\t\t} else {\n\t\t\t\tthis.cone.material.color.copy(this.light.color);\n\t\t\t}\n\t\t};\n\n\t\treturn SpotLightHelper;\n\t}(Object3D);\n\n\tvar _vector$a = /*@__PURE__*/new Vector3();\n\n\tvar _boneMatrix = /*@__PURE__*/new Matrix4();\n\n\tvar _matrixWorldInv = /*@__PURE__*/new Matrix4();\n\n\tvar SkeletonHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(SkeletonHelper, _LineSegments);\n\n\t\tfunction SkeletonHelper(object) {\n\t\t\tvar _this;\n\n\t\t\tvar bones = getBoneList(object);\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tvar vertices = [];\n\t\t\tvar colors = [];\n\t\t\tvar color1 = new Color(0, 0, 1);\n\t\t\tvar color2 = new Color(0, 1, 0);\n\n\t\t\tfor (var i = 0; i < bones.length; i++) {\n\t\t\t\tvar bone = bones[i];\n\n\t\t\t\tif (bone.parent && bone.parent.isBone) {\n\t\t\t\t\tvertices.push(0, 0, 0);\n\t\t\t\t\tvertices.push(0, 0, 0);\n\t\t\t\t\tcolors.push(color1.r, color1.g, color1.b);\n\t\t\t\t\tcolors.push(color2.r, color2.g, color2.b);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tvertexColors: true,\n\t\t\t\tdepthTest: false,\n\t\t\t\tdepthWrite: false,\n\t\t\t\ttoneMapped: false,\n\t\t\t\ttransparent: true\n\t\t\t});\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'SkeletonHelper';\n\t\t\t_this.isSkeletonHelper = true;\n\t\t\t_this.root = object;\n\t\t\t_this.bones = bones;\n\t\t\t_this.matrix = object.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = SkeletonHelper.prototype;\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\tvar bones = this.bones;\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar position = geometry.getAttribute('position');\n\n\t\t\t_matrixWorldInv.copy(this.root.matrixWorld).invert();\n\n\t\t\tfor (var i = 0, j = 0; i < bones.length; i++) {\n\t\t\t\tvar bone = bones[i];\n\n\t\t\t\tif (bone.parent && bone.parent.isBone) {\n\t\t\t\t\t_boneMatrix.multiplyMatrices(_matrixWorldInv, bone.matrixWorld);\n\n\t\t\t\t\t_vector$a.setFromMatrixPosition(_boneMatrix);\n\n\t\t\t\t\tposition.setXYZ(j, _vector$a.x, _vector$a.y, _vector$a.z);\n\n\t\t\t\t\t_boneMatrix.multiplyMatrices(_matrixWorldInv, bone.parent.matrixWorld);\n\n\t\t\t\t\t_vector$a.setFromMatrixPosition(_boneMatrix);\n\n\t\t\t\t\tposition.setXYZ(j + 1, _vector$a.x, _vector$a.y, _vector$a.z);\n\t\t\t\t\tj += 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgeometry.getAttribute('position').needsUpdate = true;\n\n\t\t\t_LineSegments.prototype.updateMatrixWorld.call(this, force);\n\t\t};\n\n\t\treturn SkeletonHelper;\n\t}(LineSegments);\n\n\tfunction getBoneList(object) {\n\t\tvar boneList = [];\n\n\t\tif (object && object.isBone) {\n\t\t\tboneList.push(object);\n\t\t}\n\n\t\tfor (var i = 0; i < object.children.length; i++) {\n\t\t\tboneList.push.apply(boneList, getBoneList(object.children[i]));\n\t\t}\n\n\t\treturn boneList;\n\t}\n\n\tvar PointLightHelper = /*#__PURE__*/function (_Mesh) {\n\t\t_inheritsLoose(PointLightHelper, _Mesh);\n\n\t\tfunction PointLightHelper(light, sphereSize, color) {\n\t\t\tvar _this;\n\n\t\t\tvar geometry = new SphereGeometry(sphereSize, 4, 2);\n\t\t\tvar material = new MeshBasicMaterial({\n\t\t\t\twireframe: true,\n\t\t\t\tfog: false,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this = _Mesh.call(this, geometry, material) || this;\n\t\t\t_this.light = light;\n\n\t\t\t_this.light.updateMatrixWorld();\n\n\t\t\t_this.color = color;\n\t\t\t_this.type = 'PointLightHelper';\n\t\t\t_this.matrix = _this.light.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\n\t\t\t_this.update();\n\t\t\t/*\n\t\t\t// TODO: delete this comment?\n\t\t\tconst distanceGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 );\n\t\t\tconst distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );\n\t\t\t\tthis.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );\n\t\t\tthis.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );\n\t\t\t\tconst d = light.distance;\n\t\t\t\tif ( d === 0.0 ) {\n\t\t\t\t\tthis.lightDistance.visible = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.lightDistance.scale.set( d, d, d );\n\t\t\t\t}\n\t\t\t\tthis.add( this.lightDistance );\n\t\t\t*/\n\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = PointLightHelper.prototype;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.geometry.dispose();\n\t\t\tthis.material.dispose();\n\t\t};\n\n\t\t_proto.update = function update() {\n\t\t\tif (this.color !== undefined) {\n\t\t\t\tthis.material.color.set(this.color);\n\t\t\t} else {\n\t\t\t\tthis.material.color.copy(this.light.color);\n\t\t\t}\n\t\t\t/*\n\t\t\tconst d = this.light.distance;\n\t\t\t\t\tif ( d === 0.0 ) {\n\t\t\t\t\t\tthis.lightDistance.visible = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.lightDistance.visible = true;\n\t\t\t\tthis.lightDistance.scale.set( d, d, d );\n\t\t\t\t\t}\n\t\t\t*/\n\n\t\t};\n\n\t\treturn PointLightHelper;\n\t}(Mesh);\n\n\tvar _vector$b = /*@__PURE__*/new Vector3();\n\n\tvar _color1 = /*@__PURE__*/new Color();\n\n\tvar _color2 = /*@__PURE__*/new Color();\n\n\tvar HemisphereLightHelper = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(HemisphereLightHelper, _Object3D);\n\n\t\tfunction HemisphereLightHelper(light, size, color) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.light = light;\n\n\t\t\t_this.light.updateMatrixWorld();\n\n\t\t\t_this.matrix = light.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\t_this.color = color;\n\t\t\tvar geometry = new OctahedronGeometry(size);\n\t\t\tgeometry.rotateY(Math.PI * 0.5);\n\t\t\t_this.material = new MeshBasicMaterial({\n\t\t\t\twireframe: true,\n\t\t\t\tfog: false,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\tif (_this.color === undefined) _this.material.vertexColors = true;\n\t\t\tvar position = geometry.getAttribute('position');\n\t\t\tvar colors = new Float32Array(position.count * 3);\n\t\t\tgeometry.setAttribute('color', new BufferAttribute(colors, 3));\n\n\t\t\t_this.add(new Mesh(geometry, _this.material));\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = HemisphereLightHelper.prototype;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.children[0].geometry.dispose();\n\t\t\tthis.children[0].material.dispose();\n\t\t};\n\n\t\t_proto.update = function update() {\n\t\t\tvar mesh = this.children[0];\n\n\t\t\tif (this.color !== undefined) {\n\t\t\t\tthis.material.color.set(this.color);\n\t\t\t} else {\n\t\t\t\tvar colors = mesh.geometry.getAttribute('color');\n\n\t\t\t\t_color1.copy(this.light.color);\n\n\t\t\t\t_color2.copy(this.light.groundColor);\n\n\t\t\t\tfor (var i = 0, l = colors.count; i < l; i++) {\n\t\t\t\t\tvar color = i < l / 2 ? _color1 : _color2;\n\t\t\t\t\tcolors.setXYZ(i, color.r, color.g, color.b);\n\t\t\t\t}\n\n\t\t\t\tcolors.needsUpdate = true;\n\t\t\t}\n\n\t\t\tmesh.lookAt(_vector$b.setFromMatrixPosition(this.light.matrixWorld).negate());\n\t\t};\n\n\t\treturn HemisphereLightHelper;\n\t}(Object3D);\n\n\tvar GridHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(GridHelper, _LineSegments);\n\n\t\tfunction GridHelper(size, divisions, color1, color2) {\n\t\t\tvar _this;\n\n\t\t\tif (size === void 0) {\n\t\t\t\tsize = 10;\n\t\t\t}\n\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 10;\n\t\t\t}\n\n\t\t\tif (color1 === void 0) {\n\t\t\t\tcolor1 = 0x444444;\n\t\t\t}\n\n\t\t\tif (color2 === void 0) {\n\t\t\t\tcolor2 = 0x888888;\n\t\t\t}\n\n\t\t\tcolor1 = new Color(color1);\n\t\t\tcolor2 = new Color(color2);\n\t\t\tvar center = divisions / 2;\n\t\t\tvar step = size / divisions;\n\t\t\tvar halfSize = size / 2;\n\t\t\tvar vertices = [],\n\t\t\t\t\tcolors = [];\n\n\t\t\tfor (var i = 0, j = 0, k = -halfSize; i <= divisions; i++, k += step) {\n\t\t\t\tvertices.push(-halfSize, 0, k, halfSize, 0, k);\n\t\t\t\tvertices.push(k, 0, -halfSize, k, 0, halfSize);\n\t\t\t\tvar color = i === center ? color1 : color2;\n\t\t\t\tcolor.toArray(colors, j);\n\t\t\t\tj += 3;\n\t\t\t\tcolor.toArray(colors, j);\n\t\t\t\tj += 3;\n\t\t\t\tcolor.toArray(colors, j);\n\t\t\t\tj += 3;\n\t\t\t\tcolor.toArray(colors, j);\n\t\t\t\tj += 3;\n\t\t\t}\n\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tvertexColors: true,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'GridHelper';\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn GridHelper;\n\t}(LineSegments);\n\n\tvar PolarGridHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(PolarGridHelper, _LineSegments);\n\n\t\tfunction PolarGridHelper(radius, radials, circles, divisions, color1, color2) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 10;\n\t\t\t}\n\n\t\t\tif (radials === void 0) {\n\t\t\t\tradials = 16;\n\t\t\t}\n\n\t\t\tif (circles === void 0) {\n\t\t\t\tcircles = 8;\n\t\t\t}\n\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 64;\n\t\t\t}\n\n\t\t\tif (color1 === void 0) {\n\t\t\t\tcolor1 = 0x444444;\n\t\t\t}\n\n\t\t\tif (color2 === void 0) {\n\t\t\t\tcolor2 = 0x888888;\n\t\t\t}\n\n\t\t\tcolor1 = new Color(color1);\n\t\t\tcolor2 = new Color(color2);\n\t\t\tvar vertices = [];\n\t\t\tvar colors = []; // create the radials\n\n\t\t\tfor (var i = 0; i <= radials; i++) {\n\t\t\t\tvar v = i / radials * (Math.PI * 2);\n\t\t\t\tvar x = Math.sin(v) * radius;\n\t\t\t\tvar z = Math.cos(v) * radius;\n\t\t\t\tvertices.push(0, 0, 0);\n\t\t\t\tvertices.push(x, 0, z);\n\t\t\t\tvar color = i & 1 ? color1 : color2;\n\t\t\t\tcolors.push(color.r, color.g, color.b);\n\t\t\t\tcolors.push(color.r, color.g, color.b);\n\t\t\t} // create the circles\n\n\n\t\t\tfor (var _i = 0; _i <= circles; _i++) {\n\t\t\t\tvar _color = _i & 1 ? color1 : color2;\n\n\t\t\t\tvar r = radius - radius / circles * _i;\n\n\t\t\t\tfor (var j = 0; j < divisions; j++) {\n\t\t\t\t\t// first vertex\n\t\t\t\t\tvar _v = j / divisions * (Math.PI * 2);\n\n\t\t\t\t\tvar _x = Math.sin(_v) * r;\n\n\t\t\t\t\tvar _z = Math.cos(_v) * r;\n\n\t\t\t\t\tvertices.push(_x, 0, _z);\n\t\t\t\t\tcolors.push(_color.r, _color.g, _color.b); // second vertex\n\n\t\t\t\t\t_v = (j + 1) / divisions * (Math.PI * 2);\n\t\t\t\t\t_x = Math.sin(_v) * r;\n\t\t\t\t\t_z = Math.cos(_v) * r;\n\t\t\t\t\tvertices.push(_x, 0, _z);\n\t\t\t\t\tcolors.push(_color.r, _color.g, _color.b);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tvertexColors: true,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'PolarGridHelper';\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn PolarGridHelper;\n\t}(LineSegments);\n\n\tvar _v1$6 = /*@__PURE__*/new Vector3();\n\n\tvar _v2$3 = /*@__PURE__*/new Vector3();\n\n\tvar _v3$1 = /*@__PURE__*/new Vector3();\n\n\tvar DirectionalLightHelper = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(DirectionalLightHelper, _Object3D);\n\n\t\tfunction DirectionalLightHelper(light, size, color) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.light = light;\n\n\t\t\t_this.light.updateMatrixWorld();\n\n\t\t\t_this.matrix = light.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\t_this.color = color;\n\t\t\tif (size === undefined) size = 1;\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute([-size, size, 0, size, size, 0, size, -size, 0, -size, -size, 0, -size, size, 0], 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tfog: false,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this.lightPlane = new Line(geometry, material);\n\n\t\t\t_this.add(_this.lightPlane);\n\n\t\t\tgeometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3));\n\t\t\t_this.targetLine = new Line(geometry, material);\n\n\t\t\t_this.add(_this.targetLine);\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = DirectionalLightHelper.prototype;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.lightPlane.geometry.dispose();\n\t\t\tthis.lightPlane.material.dispose();\n\t\t\tthis.targetLine.geometry.dispose();\n\t\t\tthis.targetLine.material.dispose();\n\t\t};\n\n\t\t_proto.update = function update() {\n\t\t\t_v1$6.setFromMatrixPosition(this.light.matrixWorld);\n\n\t\t\t_v2$3.setFromMatrixPosition(this.light.target.matrixWorld);\n\n\t\t\t_v3$1.subVectors(_v2$3, _v1$6);\n\n\t\t\tthis.lightPlane.lookAt(_v2$3);\n\n\t\t\tif (this.color !== undefined) {\n\t\t\t\tthis.lightPlane.material.color.set(this.color);\n\t\t\t\tthis.targetLine.material.color.set(this.color);\n\t\t\t} else {\n\t\t\t\tthis.lightPlane.material.color.copy(this.light.color);\n\t\t\t\tthis.targetLine.material.color.copy(this.light.color);\n\t\t\t}\n\n\t\t\tthis.targetLine.lookAt(_v2$3);\n\t\t\tthis.targetLine.scale.z = _v3$1.length();\n\t\t};\n\n\t\treturn DirectionalLightHelper;\n\t}(Object3D);\n\n\tvar _vector$c = /*@__PURE__*/new Vector3();\n\n\tvar _camera = /*@__PURE__*/new Camera();\n\t/**\n\t *\t- shows frustum, line of sight and up of the camera\n\t *\t- suitable for fast updates\n\t * \t- based on frustum visualization in lightgl.js shadowmap example\n\t *\t\thttp://evanw.github.com/lightgl.js/tests/shadowmap.html\n\t */\n\n\n\tvar CameraHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(CameraHelper, _LineSegments);\n\n\t\tfunction CameraHelper(camera) {\n\t\t\tvar _this;\n\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tcolor: 0xffffff,\n\t\t\t\tvertexColors: true,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\tvar vertices = [];\n\t\t\tvar colors = [];\n\t\t\tvar pointMap = {}; // colors\n\n\t\t\tvar colorFrustum = new Color(0xffaa00);\n\t\t\tvar colorCone = new Color(0xff0000);\n\t\t\tvar colorUp = new Color(0x00aaff);\n\t\t\tvar colorTarget = new Color(0xffffff);\n\t\t\tvar colorCross = new Color(0x333333); // near\n\n\t\t\taddLine('n1', 'n2', colorFrustum);\n\t\t\taddLine('n2', 'n4', colorFrustum);\n\t\t\taddLine('n4', 'n3', colorFrustum);\n\t\t\taddLine('n3', 'n1', colorFrustum); // far\n\n\t\t\taddLine('f1', 'f2', colorFrustum);\n\t\t\taddLine('f2', 'f4', colorFrustum);\n\t\t\taddLine('f4', 'f3', colorFrustum);\n\t\t\taddLine('f3', 'f1', colorFrustum); // sides\n\n\t\t\taddLine('n1', 'f1', colorFrustum);\n\t\t\taddLine('n2', 'f2', colorFrustum);\n\t\t\taddLine('n3', 'f3', colorFrustum);\n\t\t\taddLine('n4', 'f4', colorFrustum); // cone\n\n\t\t\taddLine('p', 'n1', colorCone);\n\t\t\taddLine('p', 'n2', colorCone);\n\t\t\taddLine('p', 'n3', colorCone);\n\t\t\taddLine('p', 'n4', colorCone); // up\n\n\t\t\taddLine('u1', 'u2', colorUp);\n\t\t\taddLine('u2', 'u3', colorUp);\n\t\t\taddLine('u3', 'u1', colorUp); // target\n\n\t\t\taddLine('c', 't', colorTarget);\n\t\t\taddLine('p', 'c', colorCross); // cross\n\n\t\t\taddLine('cn1', 'cn2', colorCross);\n\t\t\taddLine('cn3', 'cn4', colorCross);\n\t\t\taddLine('cf1', 'cf2', colorCross);\n\t\t\taddLine('cf3', 'cf4', colorCross);\n\n\t\t\tfunction addLine(a, b, color) {\n\t\t\t\taddPoint(a, color);\n\t\t\t\taddPoint(b, color);\n\t\t\t}\n\n\t\t\tfunction addPoint(id, color) {\n\t\t\t\tvertices.push(0, 0, 0);\n\t\t\t\tcolors.push(color.r, color.g, color.b);\n\n\t\t\t\tif (pointMap[id] === undefined) {\n\t\t\t\t\tpointMap[id] = [];\n\t\t\t\t}\n\n\t\t\t\tpointMap[id].push(vertices.length / 3 - 1);\n\t\t\t}\n\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'CameraHelper';\n\t\t\t_this.camera = camera;\n\t\t\tif (_this.camera.updateProjectionMatrix) _this.camera.updateProjectionMatrix();\n\t\t\t_this.matrix = camera.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\t_this.pointMap = pointMap;\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = CameraHelper.prototype;\n\n\t\t_proto.update = function update() {\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar pointMap = this.pointMap;\n\t\t\tvar w = 1,\n\t\t\t\t\th = 1; // we need just camera projection matrix inverse\n\t\t\t// world matrix must be identity\n\n\t\t\t_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse); // center / target\n\n\n\t\t\tsetPoint('c', pointMap, geometry, _camera, 0, 0, -1);\n\t\t\tsetPoint('t', pointMap, geometry, _camera, 0, 0, 1); // near\n\n\t\t\tsetPoint('n1', pointMap, geometry, _camera, -w, -h, -1);\n\t\t\tsetPoint('n2', pointMap, geometry, _camera, w, -h, -1);\n\t\t\tsetPoint('n3', pointMap, geometry, _camera, -w, h, -1);\n\t\t\tsetPoint('n4', pointMap, geometry, _camera, w, h, -1); // far\n\n\t\t\tsetPoint('f1', pointMap, geometry, _camera, -w, -h, 1);\n\t\t\tsetPoint('f2', pointMap, geometry, _camera, w, -h, 1);\n\t\t\tsetPoint('f3', pointMap, geometry, _camera, -w, h, 1);\n\t\t\tsetPoint('f4', pointMap, geometry, _camera, w, h, 1); // up\n\n\t\t\tsetPoint('u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, -1);\n\t\t\tsetPoint('u2', pointMap, geometry, _camera, -w * 0.7, h * 1.1, -1);\n\t\t\tsetPoint('u3', pointMap, geometry, _camera, 0, h * 2, -1); // cross\n\n\t\t\tsetPoint('cf1', pointMap, geometry, _camera, -w, 0, 1);\n\t\t\tsetPoint('cf2', pointMap, geometry, _camera, w, 0, 1);\n\t\t\tsetPoint('cf3', pointMap, geometry, _camera, 0, -h, 1);\n\t\t\tsetPoint('cf4', pointMap, geometry, _camera, 0, h, 1);\n\t\t\tsetPoint('cn1', pointMap, geometry, _camera, -w, 0, -1);\n\t\t\tsetPoint('cn2', pointMap, geometry, _camera, w, 0, -1);\n\t\t\tsetPoint('cn3', pointMap, geometry, _camera, 0, -h, -1);\n\t\t\tsetPoint('cn4', pointMap, geometry, _camera, 0, h, -1);\n\t\t\tgeometry.getAttribute('position').needsUpdate = true;\n\t\t};\n\n\t\treturn CameraHelper;\n\t}(LineSegments);\n\n\tfunction setPoint(point, pointMap, geometry, camera, x, y, z) {\n\t\t_vector$c.set(x, y, z).unproject(camera);\n\n\t\tvar points = pointMap[point];\n\n\t\tif (points !== undefined) {\n\t\t\tvar position = geometry.getAttribute('position');\n\n\t\t\tfor (var i = 0, l = points.length; i < l; i++) {\n\t\t\t\tposition.setXYZ(points[i], _vector$c.x, _vector$c.y, _vector$c.z);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar _box$3 = /*@__PURE__*/new Box3();\n\n\tvar BoxHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(BoxHelper, _LineSegments);\n\n\t\tfunction BoxHelper(object, color) {\n\t\t\tvar _this;\n\n\t\t\tif (color === void 0) {\n\t\t\t\tcolor = 0xffff00;\n\t\t\t}\n\n\t\t\tvar indices = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]);\n\t\t\tvar positions = new Float32Array(8 * 3);\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setIndex(new BufferAttribute(indices, 1));\n\t\t\tgeometry.setAttribute('position', new BufferAttribute(positions, 3));\n\t\t\t_this = _LineSegments.call(this, geometry, new LineBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t})) || this;\n\t\t\t_this.object = object;\n\t\t\t_this.type = 'BoxHelper';\n\t\t\t_this.matrixAutoUpdate = false;\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = BoxHelper.prototype;\n\n\t\t_proto.update = function update(object) {\n\t\t\tif (object !== undefined) {\n\t\t\t\tconsole.warn('THREE.BoxHelper: .update() has no longer arguments.');\n\t\t\t}\n\n\t\t\tif (this.object !== undefined) {\n\t\t\t\t_box$3.setFromObject(this.object);\n\t\t\t}\n\n\t\t\tif (_box$3.isEmpty()) return;\n\t\t\tvar min = _box$3.min;\n\t\t\tvar max = _box$3.max;\n\t\t\t/*\n\t\t\t\t5____4\n\t\t\t1/___0/|\n\t\t\t| 6__|_7\n\t\t\t2/___3/\n\t\t\t\t\t0: max.x, max.y, max.z\n\t\t\t1: min.x, max.y, max.z\n\t\t\t2: min.x, min.y, max.z\n\t\t\t3: max.x, min.y, max.z\n\t\t\t4: max.x, max.y, min.z\n\t\t\t5: min.x, max.y, min.z\n\t\t\t6: min.x, min.y, min.z\n\t\t\t7: max.x, min.y, min.z\n\t\t\t*/\n\n\t\t\tvar position = this.geometry.attributes.position;\n\t\t\tvar array = position.array;\n\t\t\tarray[0] = max.x;\n\t\t\tarray[1] = max.y;\n\t\t\tarray[2] = max.z;\n\t\t\tarray[3] = min.x;\n\t\t\tarray[4] = max.y;\n\t\t\tarray[5] = max.z;\n\t\t\tarray[6] = min.x;\n\t\t\tarray[7] = min.y;\n\t\t\tarray[8] = max.z;\n\t\t\tarray[9] = max.x;\n\t\t\tarray[10] = min.y;\n\t\t\tarray[11] = max.z;\n\t\t\tarray[12] = max.x;\n\t\t\tarray[13] = max.y;\n\t\t\tarray[14] = min.z;\n\t\t\tarray[15] = min.x;\n\t\t\tarray[16] = max.y;\n\t\t\tarray[17] = min.z;\n\t\t\tarray[18] = min.x;\n\t\t\tarray[19] = min.y;\n\t\t\tarray[20] = min.z;\n\t\t\tarray[21] = max.x;\n\t\t\tarray[22] = min.y;\n\t\t\tarray[23] = min.z;\n\t\t\tposition.needsUpdate = true;\n\t\t\tthis.geometry.computeBoundingSphere();\n\t\t};\n\n\t\t_proto.setFromObject = function setFromObject(object) {\n\t\t\tthis.object = object;\n\t\t\tthis.update();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copy = function copy(source) {\n\t\t\tLineSegments.prototype.copy.call(this, source);\n\t\t\tthis.object = source.object;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn BoxHelper;\n\t}(LineSegments);\n\n\tvar Box3Helper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(Box3Helper, _LineSegments);\n\n\t\tfunction Box3Helper(box, color) {\n\t\t\tvar _this;\n\n\t\t\tif (color === void 0) {\n\t\t\t\tcolor = 0xffff00;\n\t\t\t}\n\n\t\t\tvar indices = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]);\n\t\t\tvar positions = [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1];\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setIndex(new BufferAttribute(indices, 1));\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(positions, 3));\n\t\t\t_this = _LineSegments.call(this, geometry, new LineBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t})) || this;\n\t\t\t_this.box = box;\n\t\t\t_this.type = 'Box3Helper';\n\n\t\t\t_this.geometry.computeBoundingSphere();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = Box3Helper.prototype;\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\tvar box = this.box;\n\t\t\tif (box.isEmpty()) return;\n\t\t\tbox.getCenter(this.position);\n\t\t\tbox.getSize(this.scale);\n\t\t\tthis.scale.multiplyScalar(0.5);\n\n\t\t\t_LineSegments.prototype.updateMatrixWorld.call(this, force);\n\t\t};\n\n\t\treturn Box3Helper;\n\t}(LineSegments);\n\n\tvar PlaneHelper = /*#__PURE__*/function (_Line) {\n\t\t_inheritsLoose(PlaneHelper, _Line);\n\n\t\tfunction PlaneHelper(plane, size, hex) {\n\t\t\tvar _this;\n\n\t\t\tif (size === void 0) {\n\t\t\t\tsize = 1;\n\t\t\t}\n\n\t\t\tif (hex === void 0) {\n\t\t\t\thex = 0xffff00;\n\t\t\t}\n\n\t\t\tvar color = hex;\n\t\t\tvar positions = [1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0];\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(positions, 3));\n\t\t\tgeometry.computeBoundingSphere();\n\t\t\t_this = _Line.call(this, geometry, new LineBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t})) || this;\n\t\t\t_this.type = 'PlaneHelper';\n\t\t\t_this.plane = plane;\n\t\t\t_this.size = size;\n\t\t\tvar positions2 = [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1];\n\t\t\tvar geometry2 = new BufferGeometry();\n\t\t\tgeometry2.setAttribute('position', new Float32BufferAttribute(positions2, 3));\n\t\t\tgeometry2.computeBoundingSphere();\n\n\t\t\t_this.add(new Mesh(geometry2, new MeshBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\topacity: 0.2,\n\t\t\t\ttransparent: true,\n\t\t\t\tdepthWrite: false,\n\t\t\t\ttoneMapped: false\n\t\t\t})));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = PlaneHelper.prototype;\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\tvar scale = -this.plane.constant;\n\t\t\tif (Math.abs(scale) < 1e-8) scale = 1e-8; // sign does not matter\n\n\t\t\tthis.scale.set(0.5 * this.size, 0.5 * this.size, scale);\n\t\t\tthis.children[0].material.side = scale < 0 ? BackSide : FrontSide; // renderer flips side when determinant < 0; flipping not wanted here\n\n\t\t\tthis.lookAt(this.plane.normal);\n\n\t\t\t_Line.prototype.updateMatrixWorld.call(this, force);\n\t\t};\n\n\t\treturn PlaneHelper;\n\t}(Line);\n\n\tvar _axis = /*@__PURE__*/new Vector3();\n\n\tvar _lineGeometry, _coneGeometry;\n\n\tvar ArrowHelper = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(ArrowHelper, _Object3D);\n\n\t\tfunction ArrowHelper(dir, origin, length, color, headLength, headWidth) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this; // dir is assumed to be normalized\n\n\t\t\t_this.type = 'ArrowHelper';\n\t\t\tif (dir === undefined) dir = new Vector3(0, 0, 1);\n\t\t\tif (origin === undefined) origin = new Vector3(0, 0, 0);\n\t\t\tif (length === undefined) length = 1;\n\t\t\tif (color === undefined) color = 0xffff00;\n\t\t\tif (headLength === undefined) headLength = 0.2 * length;\n\t\t\tif (headWidth === undefined) headWidth = 0.2 * headLength;\n\n\t\t\tif (_lineGeometry === undefined) {\n\t\t\t\t_lineGeometry = new BufferGeometry();\n\n\t\t\t\t_lineGeometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3));\n\n\t\t\t\t_coneGeometry = new CylinderGeometry(0, 0.5, 1, 5, 1);\n\n\t\t\t\t_coneGeometry.translate(0, -0.5, 0);\n\t\t\t}\n\n\t\t\t_this.position.copy(origin);\n\n\t\t\t_this.line = new Line(_lineGeometry, new LineBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t}));\n\t\t\t_this.line.matrixAutoUpdate = false;\n\n\t\t\t_this.add(_this.line);\n\n\t\t\t_this.cone = new Mesh(_coneGeometry, new MeshBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t}));\n\t\t\t_this.cone.matrixAutoUpdate = false;\n\n\t\t\t_this.add(_this.cone);\n\n\t\t\t_this.setDirection(dir);\n\n\t\t\t_this.setLength(length, headLength, headWidth);\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = ArrowHelper.prototype;\n\n\t\t_proto.setDirection = function setDirection(dir) {\n\t\t\t// dir is assumed to be normalized\n\t\t\tif (dir.y > 0.99999) {\n\t\t\t\tthis.quaternion.set(0, 0, 0, 1);\n\t\t\t} else if (dir.y < -0.99999) {\n\t\t\t\tthis.quaternion.set(1, 0, 0, 0);\n\t\t\t} else {\n\t\t\t\t_axis.set(dir.z, 0, -dir.x).normalize();\n\n\t\t\t\tvar radians = Math.acos(dir.y);\n\t\t\t\tthis.quaternion.setFromAxisAngle(_axis, radians);\n\t\t\t}\n\t\t};\n\n\t\t_proto.setLength = function setLength(length, headLength, headWidth) {\n\t\t\tif (headLength === undefined) headLength = 0.2 * length;\n\t\t\tif (headWidth === undefined) headWidth = 0.2 * headLength;\n\t\t\tthis.line.scale.set(1, Math.max(0.0001, length - headLength), 1); // see #17458\n\n\t\t\tthis.line.updateMatrix();\n\t\t\tthis.cone.scale.set(headWidth, headLength, headWidth);\n\t\t\tthis.cone.position.y = length;\n\t\t\tthis.cone.updateMatrix();\n\t\t};\n\n\t\t_proto.setColor = function setColor(color) {\n\t\t\tthis.line.material.color.set(color);\n\t\t\tthis.cone.material.color.set(color);\n\t\t};\n\n\t\t_proto.copy = function copy(source) {\n\t\t\t_Object3D.prototype.copy.call(this, source, false);\n\n\t\t\tthis.line.copy(source.line);\n\t\t\tthis.cone.copy(source.cone);\n\t\t\treturn this;\n\t\t};\n\n\t\treturn ArrowHelper;\n\t}(Object3D);\n\n\tvar AxesHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(AxesHelper, _LineSegments);\n\n\t\tfunction AxesHelper(size) {\n\t\t\tvar _this;\n\n\t\t\tif (size === void 0) {\n\t\t\t\tsize = 1;\n\t\t\t}\n\n\t\t\tvar vertices = [0, 0, 0, size, 0, 0, 0, 0, 0, 0, size, 0, 0, 0, 0, 0, 0, size];\n\t\t\tvar colors = [1, 0, 0, 1, 0.6, 0, 0, 1, 0, 0.6, 1, 0, 0, 0, 1, 0, 0.6, 1];\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tvertexColors: true,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'AxesHelper';\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn AxesHelper;\n\t}(LineSegments);\n\n\tvar _floatView = new Float32Array(1);\n\n\tvar _int32View = new Int32Array(_floatView.buffer);\n\n\tvar DataUtils = {\n\t\t// Converts float32 to float16 (stored as uint16 value).\n\t\ttoHalfFloat: function toHalfFloat(val) {\n\t\t\t// Source: http://gamedev.stackexchange.com/questions/17326/conversion-of-a-number-from-single-precision-floating-point-representation-to-a/17410#17410\n\n\t\t\t/* This method is faster than the OpenEXR implementation (very often\n\t\t\t* used, eg. in Ogre), with the additional benefit of rounding, inspired\n\t\t\t* by James Tursa?s half-precision code. */\n\t\t\t_floatView[0] = val;\n\t\t\tvar x = _int32View[0];\n\t\t\tvar bits = x >> 16 & 0x8000;\n\t\t\t/* Get the sign */\n\n\t\t\tvar m = x >> 12 & 0x07ff;\n\t\t\t/* Keep one extra bit for rounding */\n\n\t\t\tvar e = x >> 23 & 0xff;\n\t\t\t/* Using int is faster here */\n\n\t\t\t/* If zero, or denormal, or exponent underflows too much for a denormal\n\t\t\t\t* half, return signed zero. */\n\n\t\t\tif (e < 103) return bits;\n\t\t\t/* If NaN, return NaN. If Inf or exponent overflow, return Inf. */\n\n\t\t\tif (e > 142) {\n\t\t\t\tbits |= 0x7c00;\n\t\t\t\t/* If exponent was 0xff and one mantissa bit was set, it means NaN,\n\t\t\t\t\t\t\t* not Inf, so make sure we set one mantissa bit too. */\n\n\t\t\t\tbits |= (e == 255 ? 0 : 1) && x & 0x007fffff;\n\t\t\t\treturn bits;\n\t\t\t}\n\t\t\t/* If exponent underflows but not too much, return a denormal */\n\n\n\t\t\tif (e < 113) {\n\t\t\t\tm |= 0x0800;\n\t\t\t\t/* Extra rounding may overflow and set mantissa to 0 and exponent\n\t\t\t\t\t* to 1, which is OK. */\n\n\t\t\t\tbits |= (m >> 114 - e) + (m >> 113 - e & 1);\n\t\t\t\treturn bits;\n\t\t\t}\n\n\t\t\tbits |= e - 112 << 10 | m >> 1;\n\t\t\t/* Extra rounding. An overflow will set mantissa to 0 and increment\n\t\t\t\t* the exponent, which is OK. */\n\n\t\t\tbits += m & 1;\n\t\t\treturn bits;\n\t\t}\n\t};\n\n\tvar _ENCODINGS;\n\tvar LOD_MIN = 4;\n\tvar LOD_MAX = 8;\n\tvar SIZE_MAX = Math.pow(2, LOD_MAX); // The standard deviations (radians) associated with the extra mips. These are\n\t// chosen to approximate a Trowbridge-Reitz distribution function times the\n\t// geometric shadowing function. These sigma values squared must match the\n\t// variance #defines in cube_uv_reflection_fragment.glsl.js.\n\n\tvar EXTRA_LOD_SIGMA = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582];\n\tvar TOTAL_LODS = LOD_MAX - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length; // The maximum length of the blur for loop. Smaller sigmas will use fewer\n\t// samples and exit early, but not recompile the shader.\n\n\tvar MAX_SAMPLES = 20;\n\tvar ENCODINGS = (_ENCODINGS = {}, _ENCODINGS[LinearEncoding] = 0, _ENCODINGS[sRGBEncoding] = 1, _ENCODINGS[RGBEEncoding] = 2, _ENCODINGS[RGBM7Encoding] = 3, _ENCODINGS[RGBM16Encoding] = 4, _ENCODINGS[RGBDEncoding] = 5, _ENCODINGS[GammaEncoding] = 6, _ENCODINGS);\n\tvar backgroundMaterial = new MeshBasicMaterial({\n\t\tside: BackSide,\n\t\tdepthWrite: false,\n\t\tdepthTest: false\n\t});\n\tvar backgroundBox = new Mesh(new BoxGeometry(), backgroundMaterial);\n\n\tvar _flatCamera = /*@__PURE__*/new OrthographicCamera();\n\n\tvar _createPlanes2 = /*@__PURE__*/_createPlanes(),\n\t\t\t_lodPlanes = _createPlanes2._lodPlanes,\n\t\t\t_sizeLods = _createPlanes2._sizeLods,\n\t\t\t_sigmas = _createPlanes2._sigmas;\n\n\tvar _clearColor = /*@__PURE__*/new Color();\n\n\tvar _oldTarget = null; // Golden Ratio\n\n\tvar PHI = (1 + Math.sqrt(5)) / 2;\n\tvar INV_PHI = 1 / PHI; // Vertices of a dodecahedron (except the opposites, which represent the\n\t// same axis), used as axis directions evenly spread on a sphere.\n\n\tvar _axisDirections = [/*@__PURE__*/new Vector3(1, 1, 1), /*@__PURE__*/new Vector3(-1, 1, 1), /*@__PURE__*/new Vector3(1, 1, -1), /*@__PURE__*/new Vector3(-1, 1, -1), /*@__PURE__*/new Vector3(0, PHI, INV_PHI), /*@__PURE__*/new Vector3(0, PHI, -INV_PHI), /*@__PURE__*/new Vector3(INV_PHI, 0, PHI), /*@__PURE__*/new Vector3(-INV_PHI, 0, PHI), /*@__PURE__*/new Vector3(PHI, INV_PHI, 0), /*@__PURE__*/new Vector3(-PHI, INV_PHI, 0)];\n\t/**\n\t * This class generates a Prefiltered, Mipmapped Radiance Environment Map\n\t * (PMREM) from a cubeMap environment texture. This allows different levels of\n\t * blur to be quickly accessed based on material roughness. It is packed into a\n\t * special CubeUV format that allows us to perform custom interpolation so that\n\t * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap\n\t * chain, it only goes down to the LOD_MIN level (above), and then creates extra\n\t * even more filtered 'mips' at the same LOD_MIN resolution, associated with\n\t * higher roughness levels. In this way we maintain resolution to smoothly\n\t * interpolate diffuse lighting while limiting sampling computation.\n\t */\n\n\tfunction convertLinearToRGBE(color) {\n\t\tvar maxComponent = Math.max(color.r, color.g, color.b);\n\t\tvar fExp = Math.min(Math.max(Math.ceil(Math.log2(maxComponent)), -128.0), 127.0);\n\t\tcolor.multiplyScalar(Math.pow(2.0, -fExp));\n\t\tvar alpha = (fExp + 128.0) / 255.0;\n\t\treturn alpha;\n\t}\n\n\tvar PMREMGenerator = /*#__PURE__*/function () {\n\t\tfunction PMREMGenerator(renderer) {\n\t\t\tthis._renderer = renderer;\n\t\t\tthis._pingPongRenderTarget = null;\n\t\t\tthis._blurMaterial = _getBlurShader(MAX_SAMPLES);\n\t\t\tthis._equirectShader = null;\n\t\t\tthis._cubemapShader = null;\n\n\t\t\tthis._compileMaterial(this._blurMaterial);\n\t\t}\n\t\t/**\n\t\t * Generates a PMREM from a supplied Scene, which can be faster than using an\n\t\t * image if networking bandwidth is low. Optional sigma specifies a blur radius\n\t\t * in radians to be applied to the scene before PMREM generation. Optional near\n\t\t * and far planes ensure the scene is rendered in its entirety (the cubeCamera\n\t\t * is placed at the origin).\n\t\t */\n\n\n\t\tvar _proto = PMREMGenerator.prototype;\n\n\t\t_proto.fromScene = function fromScene(scene, sigma, near, far) {\n\t\t\tif (sigma === void 0) {\n\t\t\t\tsigma = 0;\n\t\t\t}\n\n\t\t\tif (near === void 0) {\n\t\t\t\tnear = 0.1;\n\t\t\t}\n\n\t\t\tif (far === void 0) {\n\t\t\t\tfar = 100;\n\t\t\t}\n\n\t\t\t_oldTarget = this._renderer.getRenderTarget();\n\n\t\t\tvar cubeUVRenderTarget = this._allocateTargets();\n\n\t\t\tthis._sceneToCubeUV(scene, near, far, cubeUVRenderTarget);\n\n\t\t\tif (sigma > 0) {\n\t\t\t\tthis._blur(cubeUVRenderTarget, 0, 0, sigma);\n\t\t\t}\n\n\t\t\tthis._applyPMREM(cubeUVRenderTarget);\n\n\t\t\tthis._cleanup(cubeUVRenderTarget);\n\n\t\t\treturn cubeUVRenderTarget;\n\t\t}\n\t\t/**\n\t\t * Generates a PMREM from an equirectangular texture, which can be either LDR\n\t\t * (RGBFormat) or HDR (RGBEFormat). The ideal input image size is 1k (1024 x 512),\n\t\t * as this matches best with the 256 x 256 cubemap output.\n\t\t */\n\t\t;\n\n\t\t_proto.fromEquirectangular = function fromEquirectangular(equirectangular) {\n\t\t\treturn this._fromTexture(equirectangular);\n\t\t}\n\t\t/**\n\t\t * Generates a PMREM from an cubemap texture, which can be either LDR\n\t\t * (RGBFormat) or HDR (RGBEFormat). The ideal input cube size is 256 x 256,\n\t\t * as this matches best with the 256 x 256 cubemap output.\n\t\t */\n\t\t;\n\n\t\t_proto.fromCubemap = function fromCubemap(cubemap) {\n\t\t\treturn this._fromTexture(cubemap);\n\t\t}\n\t\t/**\n\t\t * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during\n\t\t * your texture's network fetch for increased concurrency.\n\t\t */\n\t\t;\n\n\t\t_proto.compileCubemapShader = function compileCubemapShader() {\n\t\t\tif (this._cubemapShader === null) {\n\t\t\t\tthis._cubemapShader = _getCubemapShader();\n\n\t\t\t\tthis._compileMaterial(this._cubemapShader);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during\n\t\t * your texture's network fetch for increased concurrency.\n\t\t */\n\t\t;\n\n\t\t_proto.compileEquirectangularShader = function compileEquirectangularShader() {\n\t\t\tif (this._equirectShader === null) {\n\t\t\t\tthis._equirectShader = _getEquirectShader();\n\n\t\t\t\tthis._compileMaterial(this._equirectShader);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,\n\t\t * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on\n\t\t * one of them will cause any others to also become unusable.\n\t\t */\n\t\t;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis._blurMaterial.dispose();\n\n\t\t\tif (this._cubemapShader !== null) this._cubemapShader.dispose();\n\t\t\tif (this._equirectShader !== null) this._equirectShader.dispose();\n\n\t\t\tfor (var i = 0; i < _lodPlanes.length; i++) {\n\t\t\t\t_lodPlanes[i].dispose();\n\t\t\t}\n\t\t} // private interface\n\t\t;\n\n\t\t_proto._cleanup = function _cleanup(outputTarget) {\n\t\t\tthis._pingPongRenderTarget.dispose();\n\n\t\t\tthis._renderer.setRenderTarget(_oldTarget);\n\n\t\t\toutputTarget.scissorTest = false;\n\n\t\t\t_setViewport(outputTarget, 0, 0, outputTarget.width, outputTarget.height);\n\t\t};\n\n\t\t_proto._fromTexture = function _fromTexture(texture) {\n\t\t\t_oldTarget = this._renderer.getRenderTarget();\n\n\t\t\tvar cubeUVRenderTarget = this._allocateTargets(texture);\n\n\t\t\tthis._textureToCubeUV(texture, cubeUVRenderTarget);\n\n\t\t\tthis._applyPMREM(cubeUVRenderTarget);\n\n\t\t\tthis._cleanup(cubeUVRenderTarget);\n\n\t\t\treturn cubeUVRenderTarget;\n\t\t};\n\n\t\t_proto._allocateTargets = function _allocateTargets(texture) {\n\t\t\t// warning: null texture is valid\n\t\t\tvar params = {\n\t\t\t\tmagFilter: NearestFilter,\n\t\t\t\tminFilter: NearestFilter,\n\t\t\t\tgenerateMipmaps: false,\n\t\t\t\ttype: UnsignedByteType,\n\t\t\t\tformat: RGBEFormat,\n\t\t\t\tencoding: _isLDR(texture) ? texture.encoding : RGBEEncoding,\n\t\t\t\tdepthBuffer: false\n\t\t\t};\n\n\t\t\tvar cubeUVRenderTarget = _createRenderTarget(params);\n\n\t\t\tcubeUVRenderTarget.depthBuffer = texture ? false : true;\n\t\t\tthis._pingPongRenderTarget = _createRenderTarget(params);\n\t\t\treturn cubeUVRenderTarget;\n\t\t};\n\n\t\t_proto._compileMaterial = function _compileMaterial(material) {\n\t\t\tvar tmpMesh = new Mesh(_lodPlanes[0], material);\n\n\t\t\tthis._renderer.compile(tmpMesh, _flatCamera);\n\t\t};\n\n\t\t_proto._sceneToCubeUV = function _sceneToCubeUV(scene, near, far, cubeUVRenderTarget) {\n\t\t\tvar fov = 90;\n\t\t\tvar aspect = 1;\n\t\t\tvar cubeCamera = new PerspectiveCamera(fov, aspect, near, far);\n\t\t\tvar upSign = [1, -1, 1, 1, 1, 1];\n\t\t\tvar forwardSign = [1, 1, 1, -1, -1, -1];\n\t\t\tvar renderer = this._renderer;\n\t\t\tvar originalAutoClear = renderer.autoClear;\n\t\t\tvar outputEncoding = renderer.outputEncoding;\n\t\t\tvar toneMapping = renderer.toneMapping;\n\t\t\trenderer.getClearColor(_clearColor);\n\t\t\trenderer.toneMapping = NoToneMapping;\n\t\t\trenderer.outputEncoding = LinearEncoding;\n\t\t\trenderer.autoClear = false;\n\t\t\tvar useSolidColor = false;\n\t\t\tvar background = scene.background;\n\n\t\t\tif (background) {\n\t\t\t\tif (background.isColor) {\n\t\t\t\t\tbackgroundMaterial.color.copy(background).convertSRGBToLinear();\n\t\t\t\t\tscene.background = null;\n\t\t\t\t\tvar alpha = convertLinearToRGBE(backgroundMaterial.color);\n\t\t\t\t\tbackgroundMaterial.opacity = alpha;\n\t\t\t\t\tuseSolidColor = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbackgroundMaterial.color.copy(_clearColor).convertSRGBToLinear();\n\n\t\t\t\tvar _alpha = convertLinearToRGBE(backgroundMaterial.color);\n\n\t\t\t\tbackgroundMaterial.opacity = _alpha;\n\t\t\t\tuseSolidColor = true;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tvar col = i % 3;\n\n\t\t\t\tif (col == 0) {\n\t\t\t\t\tcubeCamera.up.set(0, upSign[i], 0);\n\t\t\t\t\tcubeCamera.lookAt(forwardSign[i], 0, 0);\n\t\t\t\t} else if (col == 1) {\n\t\t\t\t\tcubeCamera.up.set(0, 0, upSign[i]);\n\t\t\t\t\tcubeCamera.lookAt(0, forwardSign[i], 0);\n\t\t\t\t} else {\n\t\t\t\t\tcubeCamera.up.set(0, upSign[i], 0);\n\t\t\t\t\tcubeCamera.lookAt(0, 0, forwardSign[i]);\n\t\t\t\t}\n\n\t\t\t\t_setViewport(cubeUVRenderTarget, col * SIZE_MAX, i > 2 ? SIZE_MAX : 0, SIZE_MAX, SIZE_MAX);\n\n\t\t\t\trenderer.setRenderTarget(cubeUVRenderTarget);\n\n\t\t\t\tif (useSolidColor) {\n\t\t\t\t\trenderer.render(backgroundBox, cubeCamera);\n\t\t\t\t}\n\n\t\t\t\trenderer.render(scene, cubeCamera);\n\t\t\t}\n\n\t\t\trenderer.toneMapping = toneMapping;\n\t\t\trenderer.outputEncoding = outputEncoding;\n\t\t\trenderer.autoClear = originalAutoClear;\n\t\t};\n\n\t\t_proto._textureToCubeUV = function _textureToCubeUV(texture, cubeUVRenderTarget) {\n\t\t\tvar renderer = this._renderer;\n\n\t\t\tif (texture.isCubeTexture) {\n\t\t\t\tif (this._cubemapShader == null) {\n\t\t\t\t\tthis._cubemapShader = _getCubemapShader();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this._equirectShader == null) {\n\t\t\t\t\tthis._equirectShader = _getEquirectShader();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar material = texture.isCubeTexture ? this._cubemapShader : this._equirectShader;\n\t\t\tvar mesh = new Mesh(_lodPlanes[0], material);\n\t\t\tvar uniforms = material.uniforms;\n\t\t\tuniforms['envMap'].value = texture;\n\n\t\t\tif (!texture.isCubeTexture) {\n\t\t\t\tuniforms['texelSize'].value.set(1.0 / texture.image.width, 1.0 / texture.image.height);\n\t\t\t}\n\n\t\t\tuniforms['inputEncoding'].value = ENCODINGS[texture.encoding];\n\t\t\tuniforms['outputEncoding'].value = ENCODINGS[cubeUVRenderTarget.texture.encoding];\n\n\t\t\t_setViewport(cubeUVRenderTarget, 0, 0, 3 * SIZE_MAX, 2 * SIZE_MAX);\n\n\t\t\trenderer.setRenderTarget(cubeUVRenderTarget);\n\t\t\trenderer.render(mesh, _flatCamera);\n\t\t};\n\n\t\t_proto._applyPMREM = function _applyPMREM(cubeUVRenderTarget) {\n\t\t\tvar renderer = this._renderer;\n\t\t\tvar autoClear = renderer.autoClear;\n\t\t\trenderer.autoClear = false;\n\n\t\t\tfor (var i = 1; i < TOTAL_LODS; i++) {\n\t\t\t\tvar sigma = Math.sqrt(_sigmas[i] * _sigmas[i] - _sigmas[i - 1] * _sigmas[i - 1]);\n\t\t\t\tvar poleAxis = _axisDirections[(i - 1) % _axisDirections.length];\n\n\t\t\t\tthis._blur(cubeUVRenderTarget, i - 1, i, sigma, poleAxis);\n\t\t\t}\n\n\t\t\trenderer.autoClear = autoClear;\n\t\t}\n\t\t/**\n\t\t * This is a two-pass Gaussian blur for a cubemap. Normally this is done\n\t\t * vertically and horizontally, but this breaks down on a cube. Here we apply\n\t\t * the blur latitudinally (around the poles), and then longitudinally (towards\n\t\t * the poles) to approximate the orthogonally-separable blur. It is least\n\t\t * accurate at the poles, but still does a decent job.\n\t\t */\n\t\t;\n\n\t\t_proto._blur = function _blur(cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis) {\n\t\t\tvar pingPongRenderTarget = this._pingPongRenderTarget;\n\n\t\t\tthis._halfBlur(cubeUVRenderTarget, pingPongRenderTarget, lodIn, lodOut, sigma, 'latitudinal', poleAxis);\n\n\t\t\tthis._halfBlur(pingPongRenderTarget, cubeUVRenderTarget, lodOut, lodOut, sigma, 'longitudinal', poleAxis);\n\t\t};\n\n\t\t_proto._halfBlur = function _halfBlur(targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis) {\n\t\t\tvar renderer = this._renderer;\n\t\t\tvar blurMaterial = this._blurMaterial;\n\n\t\t\tif (direction !== 'latitudinal' && direction !== 'longitudinal') {\n\t\t\t\tconsole.error('blur direction must be either latitudinal or longitudinal!');\n\t\t\t} // Number of standard deviations at which to cut off the discrete approximation.\n\n\n\t\t\tvar STANDARD_DEVIATIONS = 3;\n\t\t\tvar blurMesh = new Mesh(_lodPlanes[lodOut], blurMaterial);\n\t\t\tvar blurUniforms = blurMaterial.uniforms;\n\t\t\tvar pixels = _sizeLods[lodIn] - 1;\n\t\t\tvar radiansPerPixel = isFinite(sigmaRadians) ? Math.PI / (2 * pixels) : 2 * Math.PI / (2 * MAX_SAMPLES - 1);\n\t\t\tvar sigmaPixels = sigmaRadians / radiansPerPixel;\n\t\t\tvar samples = isFinite(sigmaRadians) ? 1 + Math.floor(STANDARD_DEVIATIONS * sigmaPixels) : MAX_SAMPLES;\n\n\t\t\tif (samples > MAX_SAMPLES) {\n\t\t\t\tconsole.warn(\"sigmaRadians, \" + sigmaRadians + \", is too large and will clip, as it requested \" + samples + \" samples when the maximum is set to \" + MAX_SAMPLES);\n\t\t\t}\n\n\t\t\tvar weights = [];\n\t\t\tvar sum = 0;\n\n\t\t\tfor (var i = 0; i < MAX_SAMPLES; ++i) {\n\t\t\t\tvar _x = i / sigmaPixels;\n\n\t\t\t\tvar weight = Math.exp(-_x * _x / 2);\n\t\t\t\tweights.push(weight);\n\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tsum += weight;\n\t\t\t\t} else if (i < samples) {\n\t\t\t\t\tsum += 2 * weight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var _i = 0; _i < weights.length; _i++) {\n\t\t\t\tweights[_i] = weights[_i] / sum;\n\t\t\t}\n\n\t\t\tblurUniforms['envMap'].value = targetIn.texture;\n\t\t\tblurUniforms['samples'].value = samples;\n\t\t\tblurUniforms['weights'].value = weights;\n\t\t\tblurUniforms['latitudinal'].value = direction === 'latitudinal';\n\n\t\t\tif (poleAxis) {\n\t\t\t\tblurUniforms['poleAxis'].value = poleAxis;\n\t\t\t}\n\n\t\t\tblurUniforms['dTheta'].value = radiansPerPixel;\n\t\t\tblurUniforms['mipInt'].value = LOD_MAX - lodIn;\n\t\t\tblurUniforms['inputEncoding'].value = ENCODINGS[targetIn.texture.encoding];\n\t\t\tblurUniforms['outputEncoding'].value = ENCODINGS[targetIn.texture.encoding];\n\t\t\tvar outputSize = _sizeLods[lodOut];\n\t\t\tvar x = 3 * Math.max(0, SIZE_MAX - 2 * outputSize);\n\t\t\tvar y = (lodOut === 0 ? 0 : 2 * SIZE_MAX) + 2 * outputSize * (lodOut > LOD_MAX - LOD_MIN ? lodOut - LOD_MAX + LOD_MIN : 0);\n\n\t\t\t_setViewport(targetOut, x, y, 3 * outputSize, 2 * outputSize);\n\n\t\t\trenderer.setRenderTarget(targetOut);\n\t\t\trenderer.render(blurMesh, _flatCamera);\n\t\t};\n\n\t\treturn PMREMGenerator;\n\t}();\n\n\tfunction _isLDR(texture) {\n\t\tif (texture === undefined || texture.type !== UnsignedByteType) return false;\n\t\treturn texture.encoding === LinearEncoding || texture.encoding === sRGBEncoding || texture.encoding === GammaEncoding;\n\t}\n\n\tfunction _createPlanes() {\n\t\tvar _lodPlanes = [];\n\t\tvar _sizeLods = [];\n\t\tvar _sigmas = [];\n\t\tvar lod = LOD_MAX;\n\n\t\tfor (var i = 0; i < TOTAL_LODS; i++) {\n\t\t\tvar sizeLod = Math.pow(2, lod);\n\n\t\t\t_sizeLods.push(sizeLod);\n\n\t\t\tvar sigma = 1.0 / sizeLod;\n\n\t\t\tif (i > LOD_MAX - LOD_MIN) {\n\t\t\t\tsigma = EXTRA_LOD_SIGMA[i - LOD_MAX + LOD_MIN - 1];\n\t\t\t} else if (i == 0) {\n\t\t\t\tsigma = 0;\n\t\t\t}\n\n\t\t\t_sigmas.push(sigma);\n\n\t\t\tvar texelSize = 1.0 / (sizeLod - 1);\n\t\t\tvar min = -texelSize / 2;\n\t\t\tvar max = 1 + texelSize / 2;\n\t\t\tvar uv1 = [min, min, max, min, max, max, min, min, max, max, min, max];\n\t\t\tvar cubeFaces = 6;\n\t\t\tvar vertices = 6;\n\t\t\tvar positionSize = 3;\n\t\t\tvar uvSize = 2;\n\t\t\tvar faceIndexSize = 1;\n\t\t\tvar position = new Float32Array(positionSize * vertices * cubeFaces);\n\t\t\tvar uv = new Float32Array(uvSize * vertices * cubeFaces);\n\t\t\tvar faceIndex = new Float32Array(faceIndexSize * vertices * cubeFaces);\n\n\t\t\tfor (var face = 0; face < cubeFaces; face++) {\n\t\t\t\tvar x = face % 3 * 2 / 3 - 1;\n\t\t\t\tvar y = face > 2 ? 0 : -1;\n\t\t\t\tvar coordinates = [x, y, 0, x + 2 / 3, y, 0, x + 2 / 3, y + 1, 0, x, y, 0, x + 2 / 3, y + 1, 0, x, y + 1, 0];\n\t\t\t\tposition.set(coordinates, positionSize * vertices * face);\n\t\t\t\tuv.set(uv1, uvSize * vertices * face);\n\t\t\t\tvar fill = [face, face, face, face, face, face];\n\t\t\t\tfaceIndex.set(fill, faceIndexSize * vertices * face);\n\t\t\t}\n\n\t\t\tvar planes = new BufferGeometry();\n\t\t\tplanes.setAttribute('position', new BufferAttribute(position, positionSize));\n\t\t\tplanes.setAttribute('uv', new BufferAttribute(uv, uvSize));\n\t\t\tplanes.setAttribute('faceIndex', new BufferAttribute(faceIndex, faceIndexSize));\n\n\t\t\t_lodPlanes.push(planes);\n\n\t\t\tif (lod > LOD_MIN) {\n\t\t\t\tlod--;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t_lodPlanes: _lodPlanes,\n\t\t\t_sizeLods: _sizeLods,\n\t\t\t_sigmas: _sigmas\n\t\t};\n\t}\n\n\tfunction _createRenderTarget(params) {\n\t\tvar cubeUVRenderTarget = new WebGLRenderTarget(3 * SIZE_MAX, 3 * SIZE_MAX, params);\n\t\tcubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping;\n\t\tcubeUVRenderTarget.texture.name = 'PMREM.cubeUv';\n\t\tcubeUVRenderTarget.scissorTest = true;\n\t\treturn cubeUVRenderTarget;\n\t}\n\n\tfunction _setViewport(target, x, y, width, height) {\n\t\ttarget.viewport.set(x, y, width, height);\n\t\ttarget.scissor.set(x, y, width, height);\n\t}\n\n\tfunction _getBlurShader(maxSamples) {\n\t\tvar weights = new Float32Array(maxSamples);\n\t\tvar poleAxis = new Vector3(0, 1, 0);\n\t\tvar shaderMaterial = new RawShaderMaterial({\n\t\t\tname: 'SphericalGaussianBlur',\n\t\t\tdefines: {\n\t\t\t\t'n': maxSamples\n\t\t\t},\n\t\t\tuniforms: {\n\t\t\t\t'envMap': {\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\t'samples': {\n\t\t\t\t\tvalue: 1\n\t\t\t\t},\n\t\t\t\t'weights': {\n\t\t\t\t\tvalue: weights\n\t\t\t\t},\n\t\t\t\t'latitudinal': {\n\t\t\t\t\tvalue: false\n\t\t\t\t},\n\t\t\t\t'dTheta': {\n\t\t\t\t\tvalue: 0\n\t\t\t\t},\n\t\t\t\t'mipInt': {\n\t\t\t\t\tvalue: 0\n\t\t\t\t},\n\t\t\t\t'poleAxis': {\n\t\t\t\t\tvalue: poleAxis\n\t\t\t\t},\n\t\t\t\t'inputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t},\n\t\t\t\t'outputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: _getCommonVertexShader(),\n\t\t\tfragmentShader:\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform sampler2D envMap;\\n\\t\\t\\tuniform int samples;\\n\\t\\t\\tuniform float weights[ n ];\\n\\t\\t\\tuniform bool latitudinal;\\n\\t\\t\\tuniform float dTheta;\\n\\t\\t\\tuniform float mipInt;\\n\\t\\t\\tuniform vec3 poleAxis;\\n\\n\\t\\t\\t\" + _getEncodings() + \"\\n\\n\\t\\t\\t#define ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\t#include <cube_uv_reflection_fragment>\\n\\n\\t\\t\\tvec3 getSample( float theta, vec3 axis ) {\\n\\n\\t\\t\\t\\tfloat cosTheta = cos( theta );\\n\\t\\t\\t\\t// Rodrigues' axis-angle rotation\\n\\t\\t\\t\\tvec3 sampleDirection = vOutputDirection * cosTheta\\n\\t\\t\\t\\t\\t+ cross( axis, vOutputDirection ) * sin( theta )\\n\\t\\t\\t\\t\\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\\n\\n\\t\\t\\t\\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\\n\\n\\t\\t\\t}\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\\n\\n\\t\\t\\t\\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\\n\\n\\t\\t\\t\\t\\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\taxis = normalize( axis );\\n\\n\\t\\t\\t\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\t\\t\\t\\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\\n\\n\\t\\t\\t\\tfor ( int i = 1; i < n; i++ ) {\\n\\n\\t\\t\\t\\t\\tif ( i >= samples ) {\\n\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\tfloat theta = dTheta * float( i );\\n\\t\\t\\t\\t\\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\\n\\t\\t\\t\\t\\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tgl_FragColor = linearToOutputTexel( gl_FragColor );\\n\\n\\t\\t\\t}\\n\\t\\t\",\n\t\t\tblending: NoBlending,\n\t\t\tdepthTest: false,\n\t\t\tdepthWrite: false\n\t\t});\n\t\treturn shaderMaterial;\n\t}\n\n\tfunction _getEquirectShader() {\n\t\tvar texelSize = new Vector2(1, 1);\n\t\tvar shaderMaterial = new RawShaderMaterial({\n\t\t\tname: 'EquirectangularToCubeUV',\n\t\t\tuniforms: {\n\t\t\t\t'envMap': {\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\t'texelSize': {\n\t\t\t\t\tvalue: texelSize\n\t\t\t\t},\n\t\t\t\t'inputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t},\n\t\t\t\t'outputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: _getCommonVertexShader(),\n\t\t\tfragmentShader:\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform sampler2D envMap;\\n\\t\\t\\tuniform vec2 texelSize;\\n\\n\\t\\t\\t\" + _getEncodings() + \"\\n\\n\\t\\t\\t#include <common>\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\n\\t\\t\\t\\tvec3 outputDirection = normalize( vOutputDirection );\\n\\t\\t\\t\\tvec2 uv = equirectUv( outputDirection );\\n\\n\\t\\t\\t\\tvec2 f = fract( uv / texelSize - 0.5 );\\n\\t\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\t\\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\\n\\t\\t\\t\\tuv.x += texelSize.x;\\n\\t\\t\\t\\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\\n\\t\\t\\t\\tuv.y += texelSize.y;\\n\\t\\t\\t\\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\\n\\t\\t\\t\\tuv.x -= texelSize.x;\\n\\t\\t\\t\\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\\n\\n\\t\\t\\t\\tvec3 tm = mix( tl, tr, f.x );\\n\\t\\t\\t\\tvec3 bm = mix( bl, br, f.x );\\n\\t\\t\\t\\tgl_FragColor.rgb = mix( tm, bm, f.y );\\n\\n\\t\\t\\t\\tgl_FragColor = linearToOutputTexel( gl_FragColor );\\n\\n\\t\\t\\t}\\n\\t\\t\",\n\t\t\tblending: NoBlending,\n\t\t\tdepthTest: false,\n\t\t\tdepthWrite: false\n\t\t});\n\t\treturn shaderMaterial;\n\t}\n\n\tfunction _getCubemapShader() {\n\t\tvar shaderMaterial = new RawShaderMaterial({\n\t\t\tname: 'CubemapToCubeUV',\n\t\t\tuniforms: {\n\t\t\t\t'envMap': {\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\t'inputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t},\n\t\t\t\t'outputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: _getCommonVertexShader(),\n\t\t\tfragmentShader:\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform samplerCube envMap;\\n\\n\\t\\t\\t\" + _getEncodings() + \"\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\t\\t\\t\\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\\n\\t\\t\\t\\tgl_FragColor = linearToOutputTexel( gl_FragColor );\\n\\n\\t\\t\\t}\\n\\t\\t\",\n\t\t\tblending: NoBlending,\n\t\t\tdepthTest: false,\n\t\t\tdepthWrite: false\n\t\t});\n\t\treturn shaderMaterial;\n\t}\n\n\tfunction _getCommonVertexShader() {\n\t\treturn (\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\tprecision mediump float;\\n\\t\\tprecision mediump int;\\n\\n\\t\\tattribute vec3 position;\\n\\t\\tattribute vec2 uv;\\n\\t\\tattribute float faceIndex;\\n\\n\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t// RH coordinate system; PMREM face-indexing convention\\n\\t\\tvec3 getDirection( vec2 uv, float face ) {\\n\\n\\t\\t\\tuv = 2.0 * uv - 1.0;\\n\\n\\t\\t\\tvec3 direction = vec3( uv, 1.0 );\\n\\n\\t\\t\\tif ( face == 0.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx; // ( 1, v, u ) pos x\\n\\n\\t\\t\\t} else if ( face == 1.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\\n\\n\\t\\t\\t} else if ( face == 2.0 ) {\\n\\n\\t\\t\\t\\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\\n\\n\\t\\t\\t} else if ( face == 3.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\\n\\n\\t\\t\\t} else if ( face == 4.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\\n\\n\\t\\t\\t} else if ( face == 5.0 ) {\\n\\n\\t\\t\\t\\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\\n\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn direction;\\n\\n\\t\\t}\\n\\n\\t\\tvoid main() {\\n\\n\\t\\t\\tvOutputDirection = getDirection( uv, faceIndex );\\n\\t\\t\\tgl_Position = vec4( position, 1.0 );\\n\\n\\t\\t}\\n\\t\"\n\t\t);\n\t}\n\n\tfunction _getEncodings() {\n\t\treturn (\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\tuniform int inputEncoding;\\n\\t\\tuniform int outputEncoding;\\n\\n\\t\\t#include <encodings_pars_fragment>\\n\\n\\t\\tvec4 inputTexelToLinear( vec4 value ) {\\n\\n\\t\\t\\tif ( inputEncoding == 0 ) {\\n\\n\\t\\t\\t\\treturn value;\\n\\n\\t\\t\\t} else if ( inputEncoding == 1 ) {\\n\\n\\t\\t\\t\\treturn sRGBToLinear( value );\\n\\n\\t\\t\\t} else if ( inputEncoding == 2 ) {\\n\\n\\t\\t\\t\\treturn RGBEToLinear( value );\\n\\n\\t\\t\\t} else if ( inputEncoding == 3 ) {\\n\\n\\t\\t\\t\\treturn RGBMToLinear( value, 7.0 );\\n\\n\\t\\t\\t} else if ( inputEncoding == 4 ) {\\n\\n\\t\\t\\t\\treturn RGBMToLinear( value, 16.0 );\\n\\n\\t\\t\\t} else if ( inputEncoding == 5 ) {\\n\\n\\t\\t\\t\\treturn RGBDToLinear( value, 256.0 );\\n\\n\\t\\t\\t} else {\\n\\n\\t\\t\\t\\treturn GammaToLinear( value, 2.2 );\\n\\n\\t\\t\\t}\\n\\n\\t\\t}\\n\\n\\t\\tvec4 linearToOutputTexel( vec4 value ) {\\n\\n\\t\\t\\tif ( outputEncoding == 0 ) {\\n\\n\\t\\t\\t\\treturn value;\\n\\n\\t\\t\\t} else if ( outputEncoding == 1 ) {\\n\\n\\t\\t\\t\\treturn LinearTosRGB( value );\\n\\n\\t\\t\\t} else if ( outputEncoding == 2 ) {\\n\\n\\t\\t\\t\\treturn LinearToRGBE( value );\\n\\n\\t\\t\\t} else if ( outputEncoding == 3 ) {\\n\\n\\t\\t\\t\\treturn LinearToRGBM( value, 7.0 );\\n\\n\\t\\t\\t} else if ( outputEncoding == 4 ) {\\n\\n\\t\\t\\t\\treturn LinearToRGBM( value, 16.0 );\\n\\n\\t\\t\\t} else if ( outputEncoding == 5 ) {\\n\\n\\t\\t\\t\\treturn LinearToRGBD( value, 256.0 );\\n\\n\\t\\t\\t} else {\\n\\n\\t\\t\\t\\treturn LinearToGamma( value, 2.2 );\\n\\n\\t\\t\\t}\\n\\n\\t\\t}\\n\\n\\t\\tvec4 envMapTexelToLinear( vec4 color ) {\\n\\n\\t\\t\\treturn inputTexelToLinear( color );\\n\\n\\t\\t}\\n\\t\"\n\t\t);\n\t}\n\n\tfunction Face4(a, b, c, d, normal, color, materialIndex) {\n\t\tconsole.warn('THREE.Face4 has been removed. A THREE.Face3 will be created instead.');\n\t\treturn new Face3(a, b, c, normal, color, materialIndex);\n\t}\n\tvar LineStrip = 0;\n\tvar LinePieces = 1;\n\tvar NoColors = 0;\n\tvar FaceColors = 1;\n\tvar VertexColors = 2;\n\tfunction MeshFaceMaterial(materials) {\n\t\tconsole.warn('THREE.MeshFaceMaterial has been removed. Use an Array instead.');\n\t\treturn materials;\n\t}\n\tfunction MultiMaterial(materials) {\n\t\tif (materials === void 0) {\n\t\t\tmaterials = [];\n\t\t}\n\n\t\tconsole.warn('THREE.MultiMaterial has been removed. Use an Array instead.');\n\t\tmaterials.isMultiMaterial = true;\n\t\tmaterials.materials = materials;\n\n\t\tmaterials.clone = function () {\n\t\t\treturn materials.slice();\n\t\t};\n\n\t\treturn materials;\n\t}\n\tfunction PointCloud(geometry, material) {\n\t\tconsole.warn('THREE.PointCloud has been renamed to THREE.Points.');\n\t\treturn new Points(geometry, material);\n\t}\n\tfunction Particle(material) {\n\t\tconsole.warn('THREE.Particle has been renamed to THREE.Sprite.');\n\t\treturn new Sprite(material);\n\t}\n\tfunction ParticleSystem(geometry, material) {\n\t\tconsole.warn('THREE.ParticleSystem has been renamed to THREE.Points.');\n\t\treturn new Points(geometry, material);\n\t}\n\tfunction PointCloudMaterial(parameters) {\n\t\tconsole.warn('THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.');\n\t\treturn new PointsMaterial(parameters);\n\t}\n\tfunction ParticleBasicMaterial(parameters) {\n\t\tconsole.warn('THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.');\n\t\treturn new PointsMaterial(parameters);\n\t}\n\tfunction ParticleSystemMaterial(parameters) {\n\t\tconsole.warn('THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.');\n\t\treturn new PointsMaterial(parameters);\n\t}\n\tfunction Vertex(x, y, z) {\n\t\tconsole.warn('THREE.Vertex has been removed. Use THREE.Vector3 instead.');\n\t\treturn new Vector3(x, y, z);\n\t} //\n\n\tfunction DynamicBufferAttribute(array, itemSize) {\n\t\tconsole.warn('THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead.');\n\t\treturn new BufferAttribute(array, itemSize).setUsage(DynamicDrawUsage);\n\t}\n\tfunction Int8Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.');\n\t\treturn new Int8BufferAttribute(array, itemSize);\n\t}\n\tfunction Uint8Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.');\n\t\treturn new Uint8BufferAttribute(array, itemSize);\n\t}\n\tfunction Uint8ClampedAttribute(array, itemSize) {\n\t\tconsole.warn('THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.');\n\t\treturn new Uint8ClampedBufferAttribute(array, itemSize);\n\t}\n\tfunction Int16Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.');\n\t\treturn new Int16BufferAttribute(array, itemSize);\n\t}\n\tfunction Uint16Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.');\n\t\treturn new Uint16BufferAttribute(array, itemSize);\n\t}\n\tfunction Int32Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.');\n\t\treturn new Int32BufferAttribute(array, itemSize);\n\t}\n\tfunction Uint32Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.');\n\t\treturn new Uint32BufferAttribute(array, itemSize);\n\t}\n\tfunction Float32Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.');\n\t\treturn new Float32BufferAttribute(array, itemSize);\n\t}\n\tfunction Float64Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.');\n\t\treturn new Float64BufferAttribute(array, itemSize);\n\t} //\n\n\tCurve.create = function (construct, getPoint) {\n\t\tconsole.log('THREE.Curve.create() has been deprecated');\n\t\tconstruct.prototype = Object.create(Curve.prototype);\n\t\tconstruct.prototype.constructor = construct;\n\t\tconstruct.prototype.getPoint = getPoint;\n\t\treturn construct;\n\t}; //\n\n\n\tObject.assign(Path.prototype, {\n\t\tfromPoints: function fromPoints(points) {\n\t\t\tconsole.warn('THREE.Path: .fromPoints() has been renamed to .setFromPoints().');\n\t\t\treturn this.setFromPoints(points);\n\t\t}\n\t}); //\n\n\tfunction ClosedSplineCurve3(points) {\n\t\tconsole.warn('THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.');\n\t\tCatmullRomCurve3.call(this, points);\n\t\tthis.type = 'catmullrom';\n\t\tthis.closed = true;\n\t}\n\tClosedSplineCurve3.prototype = Object.create(CatmullRomCurve3.prototype); //\n\n\tfunction SplineCurve3(points) {\n\t\tconsole.warn('THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.');\n\t\tCatmullRomCurve3.call(this, points);\n\t\tthis.type = 'catmullrom';\n\t}\n\tSplineCurve3.prototype = Object.create(CatmullRomCurve3.prototype); //\n\n\tfunction Spline(points) {\n\t\tconsole.warn('THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.');\n\t\tCatmullRomCurve3.call(this, points);\n\t\tthis.type = 'catmullrom';\n\t}\n\tSpline.prototype = Object.create(CatmullRomCurve3.prototype);\n\tObject.assign(Spline.prototype, {\n\t\tinitFromArray: function initFromArray()\n\t\t/* a */\n\t\t{\n\t\t\tconsole.error('THREE.Spline: .initFromArray() has been removed.');\n\t\t},\n\t\tgetControlPointsArray: function getControlPointsArray()\n\t\t/* optionalTarget */\n\t\t{\n\t\t\tconsole.error('THREE.Spline: .getControlPointsArray() has been removed.');\n\t\t},\n\t\treparametrizeByArcLength: function reparametrizeByArcLength()\n\t\t/* samplingCoef */\n\t\t{\n\t\t\tconsole.error('THREE.Spline: .reparametrizeByArcLength() has been removed.');\n\t\t}\n\t}); //\n\n\tfunction AxisHelper(size) {\n\t\tconsole.warn('THREE.AxisHelper has been renamed to THREE.AxesHelper.');\n\t\treturn new AxesHelper(size);\n\t}\n\tfunction BoundingBoxHelper(object, color) {\n\t\tconsole.warn('THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.');\n\t\treturn new BoxHelper(object, color);\n\t}\n\tfunction EdgesHelper(object, hex) {\n\t\tconsole.warn('THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.');\n\t\treturn new LineSegments(new EdgesGeometry(object.geometry), new LineBasicMaterial({\n\t\t\tcolor: hex !== undefined ? hex : 0xffffff\n\t\t}));\n\t}\n\n\tGridHelper.prototype.setColors = function () {\n\t\tconsole.error('THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.');\n\t};\n\n\tSkeletonHelper.prototype.update = function () {\n\t\tconsole.error('THREE.SkeletonHelper: update() no longer needs to be called.');\n\t};\n\n\tfunction WireframeHelper(object, hex) {\n\t\tconsole.warn('THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.');\n\t\treturn new LineSegments(new WireframeGeometry(object.geometry), new LineBasicMaterial({\n\t\t\tcolor: hex !== undefined ? hex : 0xffffff\n\t\t}));\n\t} //\n\n\tObject.assign(Loader.prototype, {\n\t\textractUrlBase: function extractUrlBase(url) {\n\t\t\tconsole.warn('THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.');\n\t\t\treturn LoaderUtils.extractUrlBase(url);\n\t\t}\n\t});\n\tLoader.Handlers = {\n\t\tadd: function add()\n\t\t/* regex, loader */\n\t\t{\n\t\t\tconsole.error('THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.');\n\t\t},\n\t\tget: function get()\n\t\t/* file */\n\t\t{\n\t\t\tconsole.error('THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.');\n\t\t}\n\t};\n\tfunction XHRLoader(manager) {\n\t\tconsole.warn('THREE.XHRLoader has been renamed to THREE.FileLoader.');\n\t\treturn new FileLoader(manager);\n\t}\n\tfunction BinaryTextureLoader(manager) {\n\t\tconsole.warn('THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.');\n\t\treturn new DataTextureLoader(manager);\n\t} //\n\n\tObject.assign(Box2.prototype, {\n\t\tcenter: function center(optionalTarget) {\n\t\t\tconsole.warn('THREE.Box2: .center() has been renamed to .getCenter().');\n\t\t\treturn this.getCenter(optionalTarget);\n\t\t},\n\t\tempty: function empty() {\n\t\t\tconsole.warn('THREE.Box2: .empty() has been renamed to .isEmpty().');\n\t\t\treturn this.isEmpty();\n\t\t},\n\t\tisIntersectionBox: function isIntersectionBox(box) {\n\t\t\tconsole.warn('THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().');\n\t\t\treturn this.intersectsBox(box);\n\t\t},\n\t\tsize: function size(optionalTarget) {\n\t\t\tconsole.warn('THREE.Box2: .size() has been renamed to .getSize().');\n\t\t\treturn this.getSize(optionalTarget);\n\t\t}\n\t});\n\tObject.assign(Box3.prototype, {\n\t\tcenter: function center(optionalTarget) {\n\t\t\tconsole.warn('THREE.Box3: .center() has been renamed to .getCenter().');\n\t\t\treturn this.getCenter(optionalTarget);\n\t\t},\n\t\tempty: function empty() {\n\t\t\tconsole.warn('THREE.Box3: .empty() has been renamed to .isEmpty().');\n\t\t\treturn this.isEmpty();\n\t\t},\n\t\tisIntersectionBox: function isIntersectionBox(box) {\n\t\t\tconsole.warn('THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().');\n\t\t\treturn this.intersectsBox(box);\n\t\t},\n\t\tisIntersectionSphere: function isIntersectionSphere(sphere) {\n\t\t\tconsole.warn('THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().');\n\t\t\treturn this.intersectsSphere(sphere);\n\t\t},\n\t\tsize: function size(optionalTarget) {\n\t\t\tconsole.warn('THREE.Box3: .size() has been renamed to .getSize().');\n\t\t\treturn this.getSize(optionalTarget);\n\t\t}\n\t});\n\tObject.assign(Sphere.prototype, {\n\t\tempty: function empty() {\n\t\t\tconsole.warn('THREE.Sphere: .empty() has been renamed to .isEmpty().');\n\t\t\treturn this.isEmpty();\n\t\t}\n\t});\n\n\tFrustum.prototype.setFromMatrix = function (m) {\n\t\tconsole.warn('THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().');\n\t\treturn this.setFromProjectionMatrix(m);\n\t};\n\n\tLine3.prototype.center = function (optionalTarget) {\n\t\tconsole.warn('THREE.Line3: .center() has been renamed to .getCenter().');\n\t\treturn this.getCenter(optionalTarget);\n\t};\n\n\tObject.assign(MathUtils, {\n\t\trandom16: function random16() {\n\t\t\tconsole.warn('THREE.Math: .random16() has been deprecated. Use Math.random() instead.');\n\t\t\treturn Math.random();\n\t\t},\n\t\tnearestPowerOfTwo: function nearestPowerOfTwo(value) {\n\t\t\tconsole.warn('THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().');\n\t\t\treturn MathUtils.floorPowerOfTwo(value);\n\t\t},\n\t\tnextPowerOfTwo: function nextPowerOfTwo(value) {\n\t\t\tconsole.warn('THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().');\n\t\t\treturn MathUtils.ceilPowerOfTwo(value);\n\t\t}\n\t});\n\tObject.assign(Matrix3.prototype, {\n\t\tflattenToArrayOffset: function flattenToArrayOffset(array, offset) {\n\t\t\tconsole.warn('THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.');\n\t\t\treturn this.toArray(array, offset);\n\t\t},\n\t\tmultiplyVector3: function multiplyVector3(vector) {\n\t\t\tconsole.warn('THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.');\n\t\t\treturn vector.applyMatrix3(this);\n\t\t},\n\t\tmultiplyVector3Array: function multiplyVector3Array()\n\t\t/* a */\n\t\t{\n\t\t\tconsole.error('THREE.Matrix3: .multiplyVector3Array() has been removed.');\n\t\t},\n\t\tapplyToBufferAttribute: function applyToBufferAttribute(attribute) {\n\t\t\tconsole.warn('THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.');\n\t\t\treturn attribute.applyMatrix3(this);\n\t\t},\n\t\tapplyToVector3Array: function applyToVector3Array()\n\t\t/* array, offset, length */\n\t\t{\n\t\t\tconsole.error('THREE.Matrix3: .applyToVector3Array() has been removed.');\n\t\t},\n\t\tgetInverse: function getInverse(matrix) {\n\t\t\tconsole.warn('THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.');\n\t\t\treturn this.copy(matrix).invert();\n\t\t}\n\t});\n\tObject.assign(Matrix4.prototype, {\n\t\textractPosition: function extractPosition(m) {\n\t\t\tconsole.warn('THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().');\n\t\t\treturn this.copyPosition(m);\n\t\t},\n\t\tflattenToArrayOffset: function flattenToArrayOffset(array, offset) {\n\t\t\tconsole.warn('THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.');\n\t\t\treturn this.toArray(array, offset);\n\t\t},\n\t\tgetPosition: function getPosition() {\n\t\t\tconsole.warn('THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.');\n\t\t\treturn new Vector3().setFromMatrixColumn(this, 3);\n\t\t},\n\t\tsetRotationFromQuaternion: function setRotationFromQuaternion(q) {\n\t\t\tconsole.warn('THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().');\n\t\t\treturn this.makeRotationFromQuaternion(q);\n\t\t},\n\t\tmultiplyToArray: function multiplyToArray() {\n\t\t\tconsole.warn('THREE.Matrix4: .multiplyToArray() has been removed.');\n\t\t},\n\t\tmultiplyVector3: function multiplyVector3(vector) {\n\t\t\tconsole.warn('THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.');\n\t\t\treturn vector.applyMatrix4(this);\n\t\t},\n\t\tmultiplyVector4: function multiplyVector4(vector) {\n\t\t\tconsole.warn('THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.');\n\t\t\treturn vector.applyMatrix4(this);\n\t\t},\n\t\tmultiplyVector3Array: function multiplyVector3Array()\n\t\t/* a */\n\t\t{\n\t\t\tconsole.error('THREE.Matrix4: .multiplyVector3Array() has been removed.');\n\t\t},\n\t\trotateAxis: function rotateAxis(v) {\n\t\t\tconsole.warn('THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.');\n\t\t\tv.transformDirection(this);\n\t\t},\n\t\tcrossVector: function crossVector(vector) {\n\t\t\tconsole.warn('THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.');\n\t\t\treturn vector.applyMatrix4(this);\n\t\t},\n\t\ttranslate: function translate() {\n\t\t\tconsole.error('THREE.Matrix4: .translate() has been removed.');\n\t\t},\n\t\trotateX: function rotateX() {\n\t\t\tconsole.error('THREE.Matrix4: .rotateX() has been removed.');\n\t\t},\n\t\trotateY: function rotateY() {\n\t\t\tconsole.error('THREE.Matrix4: .rotateY() has been removed.');\n\t\t},\n\t\trotateZ: function rotateZ() {\n\t\t\tconsole.error('THREE.Matrix4: .rotateZ() has been removed.');\n\t\t},\n\t\trotateByAxis: function rotateByAxis() {\n\t\t\tconsole.error('THREE.Matrix4: .rotateByAxis() has been removed.');\n\t\t},\n\t\tapplyToBufferAttribute: function applyToBufferAttribute(attribute) {\n\t\t\tconsole.warn('THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.');\n\t\t\treturn attribute.applyMatrix4(this);\n\t\t},\n\t\tapplyToVector3Array: function applyToVector3Array()\n\t\t/* array, offset, length */\n\t\t{\n\t\t\tconsole.error('THREE.Matrix4: .applyToVector3Array() has been removed.');\n\t\t},\n\t\tmakeFrustum: function makeFrustum(left, right, bottom, top, near, far) {\n\t\t\tconsole.warn('THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.');\n\t\t\treturn this.makePerspective(left, right, top, bottom, near, far);\n\t\t},\n\t\tgetInverse: function getInverse(matrix) {\n\t\t\tconsole.warn('THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.');\n\t\t\treturn this.copy(matrix).invert();\n\t\t}\n\t});\n\n\tPlane.prototype.isIntersectionLine = function (line) {\n\t\tconsole.warn('THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().');\n\t\treturn this.intersectsLine(line);\n\t};\n\n\tObject.assign(Quaternion.prototype, {\n\t\tmultiplyVector3: function multiplyVector3(vector) {\n\t\t\tconsole.warn('THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.');\n\t\t\treturn vector.applyQuaternion(this);\n\t\t},\n\t\tinverse: function inverse() {\n\t\t\tconsole.warn('THREE.Quaternion: .inverse() has been renamed to invert().');\n\t\t\treturn this.invert();\n\t\t}\n\t});\n\tObject.assign(Ray.prototype, {\n\t\tisIntersectionBox: function isIntersectionBox(box) {\n\t\t\tconsole.warn('THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().');\n\t\t\treturn this.intersectsBox(box);\n\t\t},\n\t\tisIntersectionPlane: function isIntersectionPlane(plane) {\n\t\t\tconsole.warn('THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().');\n\t\t\treturn this.intersectsPlane(plane);\n\t\t},\n\t\tisIntersectionSphere: function isIntersectionSphere(sphere) {\n\t\t\tconsole.warn('THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().');\n\t\t\treturn this.intersectsSphere(sphere);\n\t\t}\n\t});\n\tObject.assign(Triangle.prototype, {\n\t\tarea: function area() {\n\t\t\tconsole.warn('THREE.Triangle: .area() has been renamed to .getArea().');\n\t\t\treturn this.getArea();\n\t\t},\n\t\tbarycoordFromPoint: function barycoordFromPoint(point, target) {\n\t\t\tconsole.warn('THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().');\n\t\t\treturn this.getBarycoord(point, target);\n\t\t},\n\t\tmidpoint: function midpoint(target) {\n\t\t\tconsole.warn('THREE.Triangle: .midpoint() has been renamed to .getMidpoint().');\n\t\t\treturn this.getMidpoint(target);\n\t\t},\n\t\tnormal: function normal(target) {\n\t\t\tconsole.warn('THREE.Triangle: .normal() has been renamed to .getNormal().');\n\t\t\treturn this.getNormal(target);\n\t\t},\n\t\tplane: function plane(target) {\n\t\t\tconsole.warn('THREE.Triangle: .plane() has been renamed to .getPlane().');\n\t\t\treturn this.getPlane(target);\n\t\t}\n\t});\n\tObject.assign(Triangle, {\n\t\tbarycoordFromPoint: function barycoordFromPoint(point, a, b, c, target) {\n\t\t\tconsole.warn('THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().');\n\t\t\treturn Triangle.getBarycoord(point, a, b, c, target);\n\t\t},\n\t\tnormal: function normal(a, b, c, target) {\n\t\t\tconsole.warn('THREE.Triangle: .normal() has been renamed to .getNormal().');\n\t\t\treturn Triangle.getNormal(a, b, c, target);\n\t\t}\n\t});\n\tObject.assign(Shape.prototype, {\n\t\textractAllPoints: function extractAllPoints(divisions) {\n\t\t\tconsole.warn('THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.');\n\t\t\treturn this.extractPoints(divisions);\n\t\t},\n\t\textrude: function extrude(options) {\n\t\t\tconsole.warn('THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.');\n\t\t\treturn new ExtrudeGeometry(this, options);\n\t\t},\n\t\tmakeGeometry: function makeGeometry(options) {\n\t\t\tconsole.warn('THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.');\n\t\t\treturn new ShapeGeometry(this, options);\n\t\t}\n\t});\n\tObject.assign(Vector2.prototype, {\n\t\tfromAttribute: function fromAttribute(attribute, index, offset) {\n\t\t\tconsole.warn('THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().');\n\t\t\treturn this.fromBufferAttribute(attribute, index, offset);\n\t\t},\n\t\tdistanceToManhattan: function distanceToManhattan(v) {\n\t\t\tconsole.warn('THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().');\n\t\t\treturn this.manhattanDistanceTo(v);\n\t\t},\n\t\tlengthManhattan: function lengthManhattan() {\n\t\t\tconsole.warn('THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().');\n\t\t\treturn this.manhattanLength();\n\t\t}\n\t});\n\tObject.assign(Vector3.prototype, {\n\t\tsetEulerFromRotationMatrix: function setEulerFromRotationMatrix() {\n\t\t\tconsole.error('THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.');\n\t\t},\n\t\tsetEulerFromQuaternion: function setEulerFromQuaternion() {\n\t\t\tconsole.error('THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.');\n\t\t},\n\t\tgetPositionFromMatrix: function getPositionFromMatrix(m) {\n\t\t\tconsole.warn('THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().');\n\t\t\treturn this.setFromMatrixPosition(m);\n\t\t},\n\t\tgetScaleFromMatrix: function getScaleFromMatrix(m) {\n\t\t\tconsole.warn('THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().');\n\t\t\treturn this.setFromMatrixScale(m);\n\t\t},\n\t\tgetColumnFromMatrix: function getColumnFromMatrix(index, matrix) {\n\t\t\tconsole.warn('THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().');\n\t\t\treturn this.setFromMatrixColumn(matrix, index);\n\t\t},\n\t\tapplyProjection: function applyProjection(m) {\n\t\t\tconsole.warn('THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.');\n\t\t\treturn this.applyMatrix4(m);\n\t\t},\n\t\tfromAttribute: function fromAttribute(attribute, index, offset) {\n\t\t\tconsole.warn('THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().');\n\t\t\treturn this.fromBufferAttribute(attribute, index, offset);\n\t\t},\n\t\tdistanceToManhattan: function distanceToManhattan(v) {\n\t\t\tconsole.warn('THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().');\n\t\t\treturn this.manhattanDistanceTo(v);\n\t\t},\n\t\tlengthManhattan: function lengthManhattan() {\n\t\t\tconsole.warn('THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().');\n\t\t\treturn this.manhattanLength();\n\t\t}\n\t});\n\tObject.assign(Vector4.prototype, {\n\t\tfromAttribute: function fromAttribute(attribute, index, offset) {\n\t\t\tconsole.warn('THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().');\n\t\t\treturn this.fromBufferAttribute(attribute, index, offset);\n\t\t},\n\t\tlengthManhattan: function lengthManhattan() {\n\t\t\tconsole.warn('THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().');\n\t\t\treturn this.manhattanLength();\n\t\t}\n\t}); //\n\n\tObject.assign(Object3D.prototype, {\n\t\tgetChildByName: function getChildByName(name) {\n\t\t\tconsole.warn('THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().');\n\t\t\treturn this.getObjectByName(name);\n\t\t},\n\t\trenderDepth: function renderDepth() {\n\t\t\tconsole.warn('THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.');\n\t\t},\n\t\ttranslate: function translate(distance, axis) {\n\t\t\tconsole.warn('THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.');\n\t\t\treturn this.translateOnAxis(axis, distance);\n\t\t},\n\t\tgetWorldRotation: function getWorldRotation() {\n\t\t\tconsole.error('THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.');\n\t\t},\n\t\tapplyMatrix: function applyMatrix(matrix) {\n\t\t\tconsole.warn('THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().');\n\t\t\treturn this.applyMatrix4(matrix);\n\t\t}\n\t});\n\tObject.defineProperties(Object3D.prototype, {\n\t\teulerOrder: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Object3D: .eulerOrder is now .rotation.order.');\n\t\t\t\treturn this.rotation.order;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Object3D: .eulerOrder is now .rotation.order.');\n\t\t\t\tthis.rotation.order = value;\n\t\t\t}\n\t\t},\n\t\tuseQuaternion: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.');\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.');\n\t\t\t}\n\t\t}\n\t});\n\tObject.assign(Mesh.prototype, {\n\t\tsetDrawMode: function setDrawMode() {\n\t\t\tconsole.error('THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.');\n\t\t}\n\t});\n\tObject.defineProperties(Mesh.prototype, {\n\t\tdrawMode: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.error('THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.');\n\t\t\t\treturn TrianglesDrawMode;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.error('THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.');\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(LOD.prototype, {\n\t\tobjects: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.LOD: .objects has been renamed to .levels.');\n\t\t\t\treturn this.levels;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperty(Skeleton.prototype, 'useVertexTexture', {\n\t\tget: function get() {\n\t\t\tconsole.warn('THREE.Skeleton: useVertexTexture has been removed.');\n\t\t},\n\t\tset: function set() {\n\t\t\tconsole.warn('THREE.Skeleton: useVertexTexture has been removed.');\n\t\t}\n\t});\n\n\tSkinnedMesh.prototype.initBones = function () {\n\t\tconsole.error('THREE.SkinnedMesh: initBones() has been removed.');\n\t};\n\n\tObject.defineProperty(Curve.prototype, '__arcLengthDivisions', {\n\t\tget: function get() {\n\t\t\tconsole.warn('THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.');\n\t\t\treturn this.arcLengthDivisions;\n\t\t},\n\t\tset: function set(value) {\n\t\t\tconsole.warn('THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.');\n\t\t\tthis.arcLengthDivisions = value;\n\t\t}\n\t}); //\n\n\tPerspectiveCamera.prototype.setLens = function (focalLength, filmGauge) {\n\t\tconsole.warn('THREE.PerspectiveCamera.setLens is deprecated. ' + 'Use .setFocalLength and .filmGauge for a photographic setup.');\n\t\tif (filmGauge !== undefined) this.filmGauge = filmGauge;\n\t\tthis.setFocalLength(focalLength);\n\t}; //\n\n\n\tObject.defineProperties(Light.prototype, {\n\t\tonlyShadow: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Light: .onlyShadow has been removed.');\n\t\t\t}\n\t\t},\n\t\tshadowCameraFov: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraFov is now .shadow.camera.fov.');\n\t\t\t\tthis.shadow.camera.fov = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraLeft: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraLeft is now .shadow.camera.left.');\n\t\t\t\tthis.shadow.camera.left = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraRight: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraRight is now .shadow.camera.right.');\n\t\t\t\tthis.shadow.camera.right = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraTop: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraTop is now .shadow.camera.top.');\n\t\t\t\tthis.shadow.camera.top = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraBottom: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.');\n\t\t\t\tthis.shadow.camera.bottom = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraNear: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraNear is now .shadow.camera.near.');\n\t\t\t\tthis.shadow.camera.near = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraFar: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraFar is now .shadow.camera.far.');\n\t\t\t\tthis.shadow.camera.far = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraVisible: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.');\n\t\t\t}\n\t\t},\n\t\tshadowBias: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowBias is now .shadow.bias.');\n\t\t\t\tthis.shadow.bias = value;\n\t\t\t}\n\t\t},\n\t\tshadowDarkness: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Light: .shadowDarkness has been removed.');\n\t\t\t}\n\t\t},\n\t\tshadowMapWidth: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.');\n\t\t\t\tthis.shadow.mapSize.width = value;\n\t\t\t}\n\t\t},\n\t\tshadowMapHeight: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.');\n\t\t\t\tthis.shadow.mapSize.height = value;\n\t\t\t}\n\t\t}\n\t}); //\n\n\tObject.defineProperties(BufferAttribute.prototype, {\n\t\tlength: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.BufferAttribute: .length has been deprecated. Use .count instead.');\n\t\t\t\treturn this.array.length;\n\t\t\t}\n\t\t},\n\t\tdynamic: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.');\n\t\t\t\treturn this.usage === DynamicDrawUsage;\n\t\t\t},\n\t\t\tset: function set()\n\t\t\t/* value */\n\t\t\t{\n\t\t\t\tconsole.warn('THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.');\n\t\t\t\tthis.setUsage(DynamicDrawUsage);\n\t\t\t}\n\t\t}\n\t});\n\tObject.assign(BufferAttribute.prototype, {\n\t\tsetDynamic: function setDynamic(value) {\n\t\t\tconsole.warn('THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.');\n\t\t\tthis.setUsage(value === true ? DynamicDrawUsage : StaticDrawUsage);\n\t\t\treturn this;\n\t\t},\n\t\tcopyIndicesArray: function copyIndicesArray()\n\t\t/* indices */\n\t\t{\n\t\t\tconsole.error('THREE.BufferAttribute: .copyIndicesArray() has been removed.');\n\t\t},\n\t\tsetArray: function setArray()\n\t\t/* array */\n\t\t{\n\t\t\tconsole.error('THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers');\n\t\t}\n\t});\n\tObject.assign(BufferGeometry.prototype, {\n\t\taddIndex: function addIndex(index) {\n\t\t\tconsole.warn('THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().');\n\t\t\tthis.setIndex(index);\n\t\t},\n\t\taddAttribute: function addAttribute(name, attribute) {\n\t\t\tconsole.warn('THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().');\n\n\t\t\tif (!(attribute && attribute.isBufferAttribute) && !(attribute && attribute.isInterleavedBufferAttribute)) {\n\t\t\t\tconsole.warn('THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).');\n\t\t\t\treturn this.setAttribute(name, new BufferAttribute(arguments[1], arguments[2]));\n\t\t\t}\n\n\t\t\tif (name === 'index') {\n\t\t\t\tconsole.warn('THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.');\n\t\t\t\tthis.setIndex(attribute);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this.setAttribute(name, attribute);\n\t\t},\n\t\taddDrawCall: function addDrawCall(start, count, indexOffset) {\n\t\t\tif (indexOffset !== undefined) {\n\t\t\t\tconsole.warn('THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.');\n\t\t\t}\n\n\t\t\tconsole.warn('THREE.BufferGeometry: .addDrawCall() is now .addGroup().');\n\t\t\tthis.addGroup(start, count);\n\t\t},\n\t\tclearDrawCalls: function clearDrawCalls() {\n\t\t\tconsole.warn('THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().');\n\t\t\tthis.clearGroups();\n\t\t},\n\t\tcomputeOffsets: function computeOffsets() {\n\t\t\tconsole.warn('THREE.BufferGeometry: .computeOffsets() has been removed.');\n\t\t},\n\t\tremoveAttribute: function removeAttribute(name) {\n\t\t\tconsole.warn('THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute().');\n\t\t\treturn this.deleteAttribute(name);\n\t\t},\n\t\tapplyMatrix: function applyMatrix(matrix) {\n\t\t\tconsole.warn('THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().');\n\t\t\treturn this.applyMatrix4(matrix);\n\t\t}\n\t});\n\tObject.defineProperties(BufferGeometry.prototype, {\n\t\tdrawcalls: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.error('THREE.BufferGeometry: .drawcalls has been renamed to .groups.');\n\t\t\t\treturn this.groups;\n\t\t\t}\n\t\t},\n\t\toffsets: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.BufferGeometry: .offsets has been renamed to .groups.');\n\t\t\t\treturn this.groups;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(InstancedBufferGeometry.prototype, {\n\t\tmaxInstancedCount: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.');\n\t\t\t\treturn this.instanceCount;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.');\n\t\t\t\tthis.instanceCount = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(Raycaster.prototype, {\n\t\tlinePrecision: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.');\n\t\t\t\treturn this.params.Line.threshold;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.');\n\t\t\t\tthis.params.Line.threshold = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(InterleavedBuffer.prototype, {\n\t\tdynamic: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.');\n\t\t\t\treturn this.usage === DynamicDrawUsage;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.');\n\t\t\t\tthis.setUsage(value);\n\t\t\t}\n\t\t}\n\t});\n\tObject.assign(InterleavedBuffer.prototype, {\n\t\tsetDynamic: function setDynamic(value) {\n\t\t\tconsole.warn('THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.');\n\t\t\tthis.setUsage(value === true ? DynamicDrawUsage : StaticDrawUsage);\n\t\t\treturn this;\n\t\t},\n\t\tsetArray: function setArray()\n\t\t/* array */\n\t\t{\n\t\t\tconsole.error('THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers');\n\t\t}\n\t}); //\n\n\tObject.assign(ExtrudeGeometry.prototype, {\n\t\tgetArrays: function getArrays() {\n\t\t\tconsole.error('THREE.ExtrudeGeometry: .getArrays() has been removed.');\n\t\t},\n\t\taddShapeList: function addShapeList() {\n\t\t\tconsole.error('THREE.ExtrudeGeometry: .addShapeList() has been removed.');\n\t\t},\n\t\taddShape: function addShape() {\n\t\t\tconsole.error('THREE.ExtrudeGeometry: .addShape() has been removed.');\n\t\t}\n\t}); //\n\n\tObject.assign(Scene.prototype, {\n\t\tdispose: function dispose() {\n\t\t\tconsole.error('THREE.Scene: .dispose() has been removed.');\n\t\t}\n\t}); //\n\n\tObject.defineProperties(Uniform.prototype, {\n\t\tdynamic: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.');\n\t\t\t}\n\t\t},\n\t\tonUpdate: {\n\t\t\tvalue: function value() {\n\t\t\t\tconsole.warn('THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.');\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t}); //\n\n\tObject.defineProperties(Material.prototype, {\n\t\twrapAround: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Material: .wrapAround has been removed.');\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Material: .wrapAround has been removed.');\n\t\t\t}\n\t\t},\n\t\toverdraw: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Material: .overdraw has been removed.');\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Material: .overdraw has been removed.');\n\t\t\t}\n\t\t},\n\t\twrapRGB: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Material: .wrapRGB has been removed.');\n\t\t\t\treturn new Color();\n\t\t\t}\n\t\t},\n\t\tshading: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.error('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.');\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.');\n\t\t\t\tthis.flatShading = value === FlatShading;\n\t\t\t}\n\t\t},\n\t\tstencilMask: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.');\n\t\t\t\treturn this.stencilFuncMask;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.');\n\t\t\t\tthis.stencilFuncMask = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(MeshPhongMaterial.prototype, {\n\t\tmetal: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.');\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead');\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(MeshPhysicalMaterial.prototype, {\n\t\ttransparency: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.');\n\t\t\t\treturn this.transmission;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.');\n\t\t\t\tthis.transmission = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(ShaderMaterial.prototype, {\n\t\tderivatives: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.');\n\t\t\t\treturn this.extensions.derivatives;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.');\n\t\t\t\tthis.extensions.derivatives = value;\n\t\t\t}\n\t\t}\n\t}); //\n\n\tObject.assign(WebGLRenderer.prototype, {\n\t\tclearTarget: function clearTarget(renderTarget, color, depth, stencil) {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.');\n\t\t\tthis.setRenderTarget(renderTarget);\n\t\t\tthis.clear(color, depth, stencil);\n\t\t},\n\t\tanimate: function animate(callback) {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .animate() is now .setAnimationLoop().');\n\t\t\tthis.setAnimationLoop(callback);\n\t\t},\n\t\tgetCurrentRenderTarget: function getCurrentRenderTarget() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().');\n\t\t\treturn this.getRenderTarget();\n\t\t},\n\t\tgetMaxAnisotropy: function getMaxAnisotropy() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().');\n\t\t\treturn this.capabilities.getMaxAnisotropy();\n\t\t},\n\t\tgetPrecision: function getPrecision() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.');\n\t\t\treturn this.capabilities.precision;\n\t\t},\n\t\tresetGLState: function resetGLState() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .resetGLState() is now .state.reset().');\n\t\t\treturn this.state.reset();\n\t\t},\n\t\tsupportsFloatTextures: function supportsFloatTextures() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \\'OES_texture_float\\' ).');\n\t\t\treturn this.extensions.get('OES_texture_float');\n\t\t},\n\t\tsupportsHalfFloatTextures: function supportsHalfFloatTextures() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \\'OES_texture_half_float\\' ).');\n\t\t\treturn this.extensions.get('OES_texture_half_float');\n\t\t},\n\t\tsupportsStandardDerivatives: function supportsStandardDerivatives() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \\'OES_standard_derivatives\\' ).');\n\t\t\treturn this.extensions.get('OES_standard_derivatives');\n\t\t},\n\t\tsupportsCompressedTextureS3TC: function supportsCompressedTextureS3TC() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \\'WEBGL_compressed_texture_s3tc\\' ).');\n\t\t\treturn this.extensions.get('WEBGL_compressed_texture_s3tc');\n\t\t},\n\t\tsupportsCompressedTexturePVRTC: function supportsCompressedTexturePVRTC() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \\'WEBGL_compressed_texture_pvrtc\\' ).');\n\t\t\treturn this.extensions.get('WEBGL_compressed_texture_pvrtc');\n\t\t},\n\t\tsupportsBlendMinMax: function supportsBlendMinMax() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \\'EXT_blend_minmax\\' ).');\n\t\t\treturn this.extensions.get('EXT_blend_minmax');\n\t\t},\n\t\tsupportsVertexTextures: function supportsVertexTextures() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.');\n\t\t\treturn this.capabilities.vertexTextures;\n\t\t},\n\t\tsupportsInstancedArrays: function supportsInstancedArrays() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \\'ANGLE_instanced_arrays\\' ).');\n\t\t\treturn this.extensions.get('ANGLE_instanced_arrays');\n\t\t},\n\t\tenableScissorTest: function enableScissorTest(boolean) {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().');\n\t\t\tthis.setScissorTest(boolean);\n\t\t},\n\t\tinitMaterial: function initMaterial() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .initMaterial() has been removed.');\n\t\t},\n\t\taddPrePlugin: function addPrePlugin() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .addPrePlugin() has been removed.');\n\t\t},\n\t\taddPostPlugin: function addPostPlugin() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .addPostPlugin() has been removed.');\n\t\t},\n\t\tupdateShadowMap: function updateShadowMap() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .updateShadowMap() has been removed.');\n\t\t},\n\t\tsetFaceCulling: function setFaceCulling() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .setFaceCulling() has been removed.');\n\t\t},\n\t\tallocTextureUnit: function allocTextureUnit() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .allocTextureUnit() has been removed.');\n\t\t},\n\t\tsetTexture: function setTexture() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .setTexture() has been removed.');\n\t\t},\n\t\tsetTextureCube: function setTextureCube() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .setTextureCube() has been removed.');\n\t\t},\n\t\tgetActiveMipMapLevel: function getActiveMipMapLevel() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().');\n\t\t\treturn this.getActiveMipmapLevel();\n\t\t}\n\t});\n\tObject.defineProperties(WebGLRenderer.prototype, {\n\t\tshadowMapEnabled: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.shadowMap.enabled;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.');\n\t\t\t\tthis.shadowMap.enabled = value;\n\t\t\t}\n\t\t},\n\t\tshadowMapType: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.shadowMap.type;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.');\n\t\t\t\tthis.shadowMap.type = value;\n\t\t\t}\n\t\t},\n\t\tshadowMapCullFace: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.');\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t\tset: function set()\n\t\t\t/* value */\n\t\t\t{\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.');\n\t\t\t}\n\t\t},\n\t\tcontext: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .context has been removed. Use .getContext() instead.');\n\t\t\t\treturn this.getContext();\n\t\t\t}\n\t\t},\n\t\tvr: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .vr has been renamed to .xr');\n\t\t\t\treturn this.xr;\n\t\t\t}\n\t\t},\n\t\tgammaInput: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.');\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.');\n\t\t\t}\n\t\t},\n\t\tgammaOutput: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.');\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.');\n\t\t\t\tthis.outputEncoding = value === true ? sRGBEncoding : LinearEncoding;\n\t\t\t}\n\t\t},\n\t\ttoneMappingWhitePoint: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.');\n\t\t\t\treturn 1.0;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.');\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(WebGLShadowMap.prototype, {\n\t\tcullFace: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.');\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t\tset: function set()\n\t\t\t/* cullFace */\n\t\t\t{\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.');\n\t\t\t}\n\t\t},\n\t\trenderReverseSided: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.');\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.');\n\t\t\t}\n\t\t},\n\t\trenderSingleSided: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.');\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.');\n\t\t\t}\n\t\t}\n\t});\n\tfunction WebGLRenderTargetCube(width, height, options) {\n\t\tconsole.warn('THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).');\n\t\treturn new WebGLCubeRenderTarget(width, options);\n\t} //\n\n\tObject.defineProperties(WebGLRenderTarget.prototype, {\n\t\twrapS: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.');\n\t\t\t\treturn this.texture.wrapS;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.');\n\t\t\t\tthis.texture.wrapS = value;\n\t\t\t}\n\t\t},\n\t\twrapT: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.');\n\t\t\t\treturn this.texture.wrapT;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.');\n\t\t\t\tthis.texture.wrapT = value;\n\t\t\t}\n\t\t},\n\t\tmagFilter: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.');\n\t\t\t\treturn this.texture.magFilter;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.');\n\t\t\t\tthis.texture.magFilter = value;\n\t\t\t}\n\t\t},\n\t\tminFilter: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.');\n\t\t\t\treturn this.texture.minFilter;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.');\n\t\t\t\tthis.texture.minFilter = value;\n\t\t\t}\n\t\t},\n\t\tanisotropy: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.');\n\t\t\t\treturn this.texture.anisotropy;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.');\n\t\t\t\tthis.texture.anisotropy = value;\n\t\t\t}\n\t\t},\n\t\toffset: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .offset is now .texture.offset.');\n\t\t\t\treturn this.texture.offset;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .offset is now .texture.offset.');\n\t\t\t\tthis.texture.offset = value;\n\t\t\t}\n\t\t},\n\t\trepeat: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .repeat is now .texture.repeat.');\n\t\t\t\treturn this.texture.repeat;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .repeat is now .texture.repeat.');\n\t\t\t\tthis.texture.repeat = value;\n\t\t\t}\n\t\t},\n\t\tformat: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .format is now .texture.format.');\n\t\t\t\treturn this.texture.format;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .format is now .texture.format.');\n\t\t\t\tthis.texture.format = value;\n\t\t\t}\n\t\t},\n\t\ttype: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .type is now .texture.type.');\n\t\t\t\treturn this.texture.type;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .type is now .texture.type.');\n\t\t\t\tthis.texture.type = value;\n\t\t\t}\n\t\t},\n\t\tgenerateMipmaps: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.');\n\t\t\t\treturn this.texture.generateMipmaps;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.');\n\t\t\t\tthis.texture.generateMipmaps = value;\n\t\t\t}\n\t\t}\n\t}); //\n\n\tObject.defineProperties(Audio.prototype, {\n\t\tload: {\n\t\t\tvalue: function value(file) {\n\t\t\t\tconsole.warn('THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.');\n\t\t\t\tvar scope = this;\n\t\t\t\tvar audioLoader = new AudioLoader();\n\t\t\t\taudioLoader.load(file, function (buffer) {\n\t\t\t\t\tscope.setBuffer(buffer);\n\t\t\t\t});\n\t\t\t\treturn this;\n\t\t\t}\n\t\t},\n\t\tstartTime: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Audio: .startTime is now .play( delay ).');\n\t\t\t}\n\t\t}\n\t});\n\n\tAudioAnalyser.prototype.getData = function () {\n\t\tconsole.warn('THREE.AudioAnalyser: .getData() is now .getFrequencyData().');\n\t\treturn this.getFrequencyData();\n\t}; //\n\n\n\tCubeCamera.prototype.updateCubeMap = function (renderer, scene) {\n\t\tconsole.warn('THREE.CubeCamera: .updateCubeMap() is now .update().');\n\t\treturn this.update(renderer, scene);\n\t};\n\n\tCubeCamera.prototype.clear = function (renderer, color, depth, stencil) {\n\t\tconsole.warn('THREE.CubeCamera: .clear() is now .renderTarget.clear().');\n\t\treturn this.renderTarget.clear(renderer, color, depth, stencil);\n\t}; //\n\n\n\tvar GeometryUtils = {\n\t\tmerge: function merge(geometry1, geometry2, materialIndexOffset) {\n\t\t\tconsole.warn('THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.');\n\t\t\tvar matrix;\n\n\t\t\tif (geometry2.isMesh) {\n\t\t\t\tgeometry2.matrixAutoUpdate && geometry2.updateMatrix();\n\t\t\t\tmatrix = geometry2.matrix;\n\t\t\t\tgeometry2 = geometry2.geometry;\n\t\t\t}\n\n\t\t\tgeometry1.merge(geometry2, matrix, materialIndexOffset);\n\t\t},\n\t\tcenter: function center(geometry) {\n\t\t\tconsole.warn('THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.');\n\t\t\treturn geometry.center();\n\t\t}\n\t};\n\tImageUtils.crossOrigin = undefined;\n\n\tImageUtils.loadTexture = function (url, mapping, onLoad, onError) {\n\t\tconsole.warn('THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.');\n\t\tvar loader = new TextureLoader();\n\t\tloader.setCrossOrigin(this.crossOrigin);\n\t\tvar texture = loader.load(url, onLoad, undefined, onError);\n\t\tif (mapping) texture.mapping = mapping;\n\t\treturn texture;\n\t};\n\n\tImageUtils.loadTextureCube = function (urls, mapping, onLoad, onError) {\n\t\tconsole.warn('THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.');\n\t\tvar loader = new CubeTextureLoader();\n\t\tloader.setCrossOrigin(this.crossOrigin);\n\t\tvar texture = loader.load(urls, onLoad, undefined, onError);\n\t\tif (mapping) texture.mapping = mapping;\n\t\treturn texture;\n\t};\n\n\tImageUtils.loadCompressedTexture = function () {\n\t\tconsole.error('THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.');\n\t};\n\n\tImageUtils.loadCompressedTextureCube = function () {\n\t\tconsole.error('THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.');\n\t}; //\n\n\n\tfunction CanvasRenderer() {\n\t\tconsole.error('THREE.CanvasRenderer has been removed');\n\t} //\n\n\tfunction JSONLoader() {\n\t\tconsole.error('THREE.JSONLoader has been removed.');\n\t} //\n\n\tvar SceneUtils = {\n\t\tcreateMultiMaterialObject: function createMultiMaterialObject()\n\t\t/* geometry, materials */\n\t\t{\n\t\t\tconsole.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js');\n\t\t},\n\t\tdetach: function detach()\n\t\t/* child, parent, scene */\n\t\t{\n\t\t\tconsole.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js');\n\t\t},\n\t\tattach: function attach()\n\t\t/* child, scene, parent */\n\t\t{\n\t\t\tconsole.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js');\n\t\t}\n\t}; //\n\n\tfunction LensFlare() {\n\t\tconsole.error('THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js');\n\t}\n\n\tif (typeof __THREE_DEVTOOLS__ !== 'undefined') {\n\t\t/* eslint-disable no-undef */\n\t\t__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('register', {\n\t\t\tdetail: {\n\t\t\t\trevision: REVISION\n\t\t\t}\n\t\t}));\n\t\t/* eslint-enable no-undef */\n\n\t}\n\n\tif (typeof window !== 'undefined') {\n\t\tif (window.__THREE__) {\n\t\t\tconsole.warn('WARNING: Multiple instances of Three.js being imported.');\n\t\t} else {\n\t\t\twindow.__THREE__ = REVISION;\n\t\t}\n\t}\n\n\texports.ACESFilmicToneMapping = ACESFilmicToneMapping;\n\texports.AddEquation = AddEquation;\n\texports.AddOperation = AddOperation;\n\texports.AdditiveAnimationBlendMode = AdditiveAnimationBlendMode;\n\texports.AdditiveBlending = AdditiveBlending;\n\texports.AlphaFormat = AlphaFormat;\n\texports.AlwaysDepth = AlwaysDepth;\n\texports.AlwaysStencilFunc = AlwaysStencilFunc;\n\texports.AmbientLight = AmbientLight;\n\texports.AmbientLightProbe = AmbientLightProbe;\n\texports.AnimationClip = AnimationClip;\n\texports.AnimationLoader = AnimationLoader;\n\texports.AnimationMixer = AnimationMixer;\n\texports.AnimationObjectGroup = AnimationObjectGroup;\n\texports.AnimationUtils = AnimationUtils;\n\texports.ArcCurve = ArcCurve;\n\texports.ArrayCamera = ArrayCamera;\n\texports.ArrowHelper = ArrowHelper;\n\texports.Audio = Audio;\n\texports.AudioAnalyser = AudioAnalyser;\n\texports.AudioContext = AudioContext;\n\texports.AudioListener = AudioListener;\n\texports.AudioLoader = AudioLoader;\n\texports.AxesHelper = AxesHelper;\n\texports.AxisHelper = AxisHelper;\n\texports.BackSide = BackSide;\n\texports.BasicDepthPacking = BasicDepthPacking;\n\texports.BasicShadowMap = BasicShadowMap;\n\texports.BinaryTextureLoader = BinaryTextureLoader;\n\texports.Bone = Bone;\n\texports.BooleanKeyframeTrack = BooleanKeyframeTrack;\n\texports.BoundingBoxHelper = BoundingBoxHelper;\n\texports.Box2 = Box2;\n\texports.Box3 = Box3;\n\texports.Box3Helper = Box3Helper;\n\texports.BoxBufferGeometry = BoxGeometry;\n\texports.BoxGeometry = BoxGeometry;\n\texports.BoxHelper = BoxHelper;\n\texports.BufferAttribute = BufferAttribute;\n\texports.BufferGeometry = BufferGeometry;\n\texports.BufferGeometryLoader = BufferGeometryLoader;\n\texports.ByteType = ByteType;\n\texports.Cache = Cache;\n\texports.Camera = Camera;\n\texports.CameraHelper = CameraHelper;\n\texports.CanvasRenderer = CanvasRenderer;\n\texports.CanvasTexture = CanvasTexture;\n\texports.CatmullRomCurve3 = CatmullRomCurve3;\n\texports.CineonToneMapping = CineonToneMapping;\n\texports.CircleBufferGeometry = CircleGeometry;\n\texports.CircleGeometry = CircleGeometry;\n\texports.ClampToEdgeWrapping = ClampToEdgeWrapping;\n\texports.Clock = Clock;\n\texports.ClosedSplineCurve3 = ClosedSplineCurve3;\n\texports.Color = Color;\n\texports.ColorKeyframeTrack = ColorKeyframeTrack;\n\texports.CompressedTexture = CompressedTexture;\n\texports.CompressedTextureLoader = CompressedTextureLoader;\n\texports.ConeBufferGeometry = ConeGeometry;\n\texports.ConeGeometry = ConeGeometry;\n\texports.CubeCamera = CubeCamera;\n\texports.CubeReflectionMapping = CubeReflectionMapping;\n\texports.CubeRefractionMapping = CubeRefractionMapping;\n\texports.CubeTexture = CubeTexture;\n\texports.CubeTextureLoader = CubeTextureLoader;\n\texports.CubeUVReflectionMapping = CubeUVReflectionMapping;\n\texports.CubeUVRefractionMapping = CubeUVRefractionMapping;\n\texports.CubicBezierCurve = CubicBezierCurve;\n\texports.CubicBezierCurve3 = CubicBezierCurve3;\n\texports.CubicInterpolant = CubicInterpolant;\n\texports.CullFaceBack = CullFaceBack;\n\texports.CullFaceFront = CullFaceFront;\n\texports.CullFaceFrontBack = CullFaceFrontBack;\n\texports.CullFaceNone = CullFaceNone;\n\texports.Curve = Curve;\n\texports.CurvePath = CurvePath;\n\texports.CustomBlending = CustomBlending;\n\texports.CustomToneMapping = CustomToneMapping;\n\texports.CylinderBufferGeometry = CylinderGeometry;\n\texports.CylinderGeometry = CylinderGeometry;\n\texports.Cylindrical = Cylindrical;\n\texports.DataTexture = DataTexture;\n\texports.DataTexture2DArray = DataTexture2DArray;\n\texports.DataTexture3D = DataTexture3D;\n\texports.DataTextureLoader = DataTextureLoader;\n\texports.DataUtils = DataUtils;\n\texports.DecrementStencilOp = DecrementStencilOp;\n\texports.DecrementWrapStencilOp = DecrementWrapStencilOp;\n\texports.DefaultLoadingManager = DefaultLoadingManager;\n\texports.DepthFormat = DepthFormat;\n\texports.DepthStencilFormat = DepthStencilFormat;\n\texports.DepthTexture = DepthTexture;\n\texports.DirectionalLight = DirectionalLight;\n\texports.DirectionalLightHelper = DirectionalLightHelper;\n\texports.DiscreteInterpolant = DiscreteInterpolant;\n\texports.DodecahedronBufferGeometry = DodecahedronGeometry;\n\texports.DodecahedronGeometry = DodecahedronGeometry;\n\texports.DoubleSide = DoubleSide;\n\texports.DstAlphaFactor = DstAlphaFactor;\n\texports.DstColorFactor = DstColorFactor;\n\texports.DynamicBufferAttribute = DynamicBufferAttribute;\n\texports.DynamicCopyUsage = DynamicCopyUsage;\n\texports.DynamicDrawUsage = DynamicDrawUsage;\n\texports.DynamicReadUsage = DynamicReadUsage;\n\texports.EdgesGeometry = EdgesGeometry;\n\texports.EdgesHelper = EdgesHelper;\n\texports.EllipseCurve = EllipseCurve;\n\texports.EqualDepth = EqualDepth;\n\texports.EqualStencilFunc = EqualStencilFunc;\n\texports.EquirectangularReflectionMapping = EquirectangularReflectionMapping;\n\texports.EquirectangularRefractionMapping = EquirectangularRefractionMapping;\n\texports.Euler = Euler;\n\texports.EventDispatcher = EventDispatcher;\n\texports.ExtrudeBufferGeometry = ExtrudeGeometry;\n\texports.ExtrudeGeometry = ExtrudeGeometry;\n\texports.Face3 = Face3;\n\texports.Face4 = Face4;\n\texports.FaceColors = FaceColors;\n\texports.FileLoader = FileLoader;\n\texports.FlatShading = FlatShading;\n\texports.Float16BufferAttribute = Float16BufferAttribute;\n\texports.Float32Attribute = Float32Attribute;\n\texports.Float32BufferAttribute = Float32BufferAttribute;\n\texports.Float64Attribute = Float64Attribute;\n\texports.Float64BufferAttribute = Float64BufferAttribute;\n\texports.FloatType = FloatType;\n\texports.Fog = Fog;\n\texports.FogExp2 = FogExp2;\n\texports.Font = Font;\n\texports.FontLoader = FontLoader;\n\texports.FrontSide = FrontSide;\n\texports.Frustum = Frustum;\n\texports.GLBufferAttribute = GLBufferAttribute;\n\texports.GLSL1 = GLSL1;\n\texports.GLSL3 = GLSL3;\n\texports.GammaEncoding = GammaEncoding;\n\texports.GeometryUtils = GeometryUtils;\n\texports.GreaterDepth = GreaterDepth;\n\texports.GreaterEqualDepth = GreaterEqualDepth;\n\texports.GreaterEqualStencilFunc = GreaterEqualStencilFunc;\n\texports.GreaterStencilFunc = GreaterStencilFunc;\n\texports.GridHelper = GridHelper;\n\texports.Group = Group;\n\texports.HalfFloatType = HalfFloatType;\n\texports.HemisphereLight = HemisphereLight;\n\texports.HemisphereLightHelper = HemisphereLightHelper;\n\texports.HemisphereLightProbe = HemisphereLightProbe;\n\texports.IcosahedronBufferGeometry = IcosahedronGeometry;\n\texports.IcosahedronGeometry = IcosahedronGeometry;\n\texports.ImageBitmapLoader = ImageBitmapLoader;\n\texports.ImageLoader = ImageLoader;\n\texports.ImageUtils = ImageUtils;\n\texports.ImmediateRenderObject = ImmediateRenderObject;\n\texports.IncrementStencilOp = IncrementStencilOp;\n\texports.IncrementWrapStencilOp = IncrementWrapStencilOp;\n\texports.InstancedBufferAttribute = InstancedBufferAttribute;\n\texports.InstancedBufferGeometry = InstancedBufferGeometry;\n\texports.InstancedInterleavedBuffer = InstancedInterleavedBuffer;\n\texports.InstancedMesh = InstancedMesh;\n\texports.Int16Attribute = Int16Attribute;\n\texports.Int16BufferAttribute = Int16BufferAttribute;\n\texports.Int32Attribute = Int32Attribute;\n\texports.Int32BufferAttribute = Int32BufferAttribute;\n\texports.Int8Attribute = Int8Attribute;\n\texports.Int8BufferAttribute = Int8BufferAttribute;\n\texports.IntType = IntType;\n\texports.InterleavedBuffer = InterleavedBuffer;\n\texports.InterleavedBufferAttribute = InterleavedBufferAttribute;\n\texports.Interpolant = Interpolant;\n\texports.InterpolateDiscrete = InterpolateDiscrete;\n\texports.InterpolateLinear = InterpolateLinear;\n\texports.InterpolateSmooth = InterpolateSmooth;\n\texports.InvertStencilOp = InvertStencilOp;\n\texports.JSONLoader = JSONLoader;\n\texports.KeepStencilOp = KeepStencilOp;\n\texports.KeyframeTrack = KeyframeTrack;\n\texports.LOD = LOD;\n\texports.LatheBufferGeometry = LatheGeometry;\n\texports.LatheGeometry = LatheGeometry;\n\texports.Layers = Layers;\n\texports.LensFlare = LensFlare;\n\texports.LessDepth = LessDepth;\n\texports.LessEqualDepth = LessEqualDepth;\n\texports.LessEqualStencilFunc = LessEqualStencilFunc;\n\texports.LessStencilFunc = LessStencilFunc;\n\texports.Light = Light;\n\texports.LightProbe = LightProbe;\n\texports.Line = Line;\n\texports.Line3 = Line3;\n\texports.LineBasicMaterial = LineBasicMaterial;\n\texports.LineCurve = LineCurve;\n\texports.LineCurve3 = LineCurve3;\n\texports.LineDashedMaterial = LineDashedMaterial;\n\texports.LineLoop = LineLoop;\n\texports.LinePieces = LinePieces;\n\texports.LineSegments = LineSegments;\n\texports.LineStrip = LineStrip;\n\texports.LinearEncoding = LinearEncoding;\n\texports.LinearFilter = LinearFilter;\n\texports.LinearInterpolant = LinearInterpolant;\n\texports.LinearMipMapLinearFilter = LinearMipMapLinearFilter;\n\texports.LinearMipMapNearestFilter = LinearMipMapNearestFilter;\n\texports.LinearMipmapLinearFilter = LinearMipmapLinearFilter;\n\texports.LinearMipmapNearestFilter = LinearMipmapNearestFilter;\n\texports.LinearToneMapping = LinearToneMapping;\n\texports.Loader = Loader;\n\texports.LoaderUtils = LoaderUtils;\n\texports.LoadingManager = LoadingManager;\n\texports.LogLuvEncoding = LogLuvEncoding;\n\texports.LoopOnce = LoopOnce;\n\texports.LoopPingPong = LoopPingPong;\n\texports.LoopRepeat = LoopRepeat;\n\texports.LuminanceAlphaFormat = LuminanceAlphaFormat;\n\texports.LuminanceFormat = LuminanceFormat;\n\texports.MOUSE = MOUSE;\n\texports.Material = Material;\n\texports.MaterialLoader = MaterialLoader;\n\texports.Math = MathUtils;\n\texports.MathUtils = MathUtils;\n\texports.Matrix3 = Matrix3;\n\texports.Matrix4 = Matrix4;\n\texports.MaxEquation = MaxEquation;\n\texports.Mesh = Mesh;\n\texports.MeshBasicMaterial = MeshBasicMaterial;\n\texports.MeshDepthMaterial = MeshDepthMaterial;\n\texports.MeshDistanceMaterial = MeshDistanceMaterial;\n\texports.MeshFaceMaterial = MeshFaceMaterial;\n\texports.MeshLambertMaterial = MeshLambertMaterial;\n\texports.MeshMatcapMaterial = MeshMatcapMaterial;\n\texports.MeshNormalMaterial = MeshNormalMaterial;\n\texports.MeshPhongMaterial = MeshPhongMaterial;\n\texports.MeshPhysicalMaterial = MeshPhysicalMaterial;\n\texports.MeshStandardMaterial = MeshStandardMaterial;\n\texports.MeshToonMaterial = MeshToonMaterial;\n\texports.MinEquation = MinEquation;\n\texports.MirroredRepeatWrapping = MirroredRepeatWrapping;\n\texports.MixOperation = MixOperation;\n\texports.MultiMaterial = MultiMaterial;\n\texports.MultiplyBlending = MultiplyBlending;\n\texports.MultiplyOperation = MultiplyOperation;\n\texports.NearestFilter = NearestFilter;\n\texports.NearestMipMapLinearFilter = NearestMipMapLinearFilter;\n\texports.NearestMipMapNearestFilter = NearestMipMapNearestFilter;\n\texports.NearestMipmapLinearFilter = NearestMipmapLinearFilter;\n\texports.NearestMipmapNearestFilter = NearestMipmapNearestFilter;\n\texports.NeverDepth = NeverDepth;\n\texports.NeverStencilFunc = NeverStencilFunc;\n\texports.NoBlending = NoBlending;\n\texports.NoColors = NoColors;\n\texports.NoToneMapping = NoToneMapping;\n\texports.NormalAnimationBlendMode = NormalAnimationBlendMode;\n\texports.NormalBlending = NormalBlending;\n\texports.NotEqualDepth = NotEqualDepth;\n\texports.NotEqualStencilFunc = NotEqualStencilFunc;\n\texports.NumberKeyframeTrack = NumberKeyframeTrack;\n\texports.Object3D = Object3D;\n\texports.ObjectLoader = ObjectLoader;\n\texports.ObjectSpaceNormalMap = ObjectSpaceNormalMap;\n\texports.OctahedronBufferGeometry = OctahedronGeometry;\n\texports.OctahedronGeometry = OctahedronGeometry;\n\texports.OneFactor = OneFactor;\n\texports.OneMinusDstAlphaFactor = OneMinusDstAlphaFactor;\n\texports.OneMinusDstColorFactor = OneMinusDstColorFactor;\n\texports.OneMinusSrcAlphaFactor = OneMinusSrcAlphaFactor;\n\texports.OneMinusSrcColorFactor = OneMinusSrcColorFactor;\n\texports.OrthographicCamera = OrthographicCamera;\n\texports.PCFShadowMap = PCFShadowMap;\n\texports.PCFSoftShadowMap = PCFSoftShadowMap;\n\texports.PMREMGenerator = PMREMGenerator;\n\texports.ParametricBufferGeometry = ParametricGeometry;\n\texports.ParametricGeometry = ParametricGeometry;\n\texports.Particle = Particle;\n\texports.ParticleBasicMaterial = ParticleBasicMaterial;\n\texports.ParticleSystem = ParticleSystem;\n\texports.ParticleSystemMaterial = ParticleSystemMaterial;\n\texports.Path = Path;\n\texports.PerspectiveCamera = PerspectiveCamera;\n\texports.Plane = Plane;\n\texports.PlaneBufferGeometry = PlaneGeometry;\n\texports.PlaneGeometry = PlaneGeometry;\n\texports.PlaneHelper = PlaneHelper;\n\texports.PointCloud = PointCloud;\n\texports.PointCloudMaterial = PointCloudMaterial;\n\texports.PointLight = PointLight;\n\texports.PointLightHelper = PointLightHelper;\n\texports.Points = Points;\n\texports.PointsMaterial = PointsMaterial;\n\texports.PolarGridHelper = PolarGridHelper;\n\texports.PolyhedronBufferGeometry = PolyhedronGeometry;\n\texports.PolyhedronGeometry = PolyhedronGeometry;\n\texports.PositionalAudio = PositionalAudio;\n\texports.PropertyBinding = PropertyBinding;\n\texports.PropertyMixer = PropertyMixer;\n\texports.QuadraticBezierCurve = QuadraticBezierCurve;\n\texports.QuadraticBezierCurve3 = QuadraticBezierCurve3;\n\texports.Quaternion = Quaternion;\n\texports.QuaternionKeyframeTrack = QuaternionKeyframeTrack;\n\texports.QuaternionLinearInterpolant = QuaternionLinearInterpolant;\n\texports.REVISION = REVISION;\n\texports.RGBADepthPacking = RGBADepthPacking;\n\texports.RGBAFormat = RGBAFormat;\n\texports.RGBAIntegerFormat = RGBAIntegerFormat;\n\texports.RGBA_ASTC_10x10_Format = RGBA_ASTC_10x10_Format;\n\texports.RGBA_ASTC_10x5_Format = RGBA_ASTC_10x5_Format;\n\texports.RGBA_ASTC_10x6_Format = RGBA_ASTC_10x6_Format;\n\texports.RGBA_ASTC_10x8_Format = RGBA_ASTC_10x8_Format;\n\texports.RGBA_ASTC_12x10_Format = RGBA_ASTC_12x10_Format;\n\texports.RGBA_ASTC_12x12_Format = RGBA_ASTC_12x12_Format;\n\texports.RGBA_ASTC_4x4_Format = RGBA_ASTC_4x4_Format;\n\texports.RGBA_ASTC_5x4_Format = RGBA_ASTC_5x4_Format;\n\texports.RGBA_ASTC_5x5_Format = RGBA_ASTC_5x5_Format;\n\texports.RGBA_ASTC_6x5_Format = RGBA_ASTC_6x5_Format;\n\texports.RGBA_ASTC_6x6_Format = RGBA_ASTC_6x6_Format;\n\texports.RGBA_ASTC_8x5_Format = RGBA_ASTC_8x5_Format;\n\texports.RGBA_ASTC_8x6_Format = RGBA_ASTC_8x6_Format;\n\texports.RGBA_ASTC_8x8_Format = RGBA_ASTC_8x8_Format;\n\texports.RGBA_BPTC_Format = RGBA_BPTC_Format;\n\texports.RGBA_ETC2_EAC_Format = RGBA_ETC2_EAC_Format;\n\texports.RGBA_PVRTC_2BPPV1_Format = RGBA_PVRTC_2BPPV1_Format;\n\texports.RGBA_PVRTC_4BPPV1_Format = RGBA_PVRTC_4BPPV1_Format;\n\texports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format;\n\texports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format;\n\texports.RGBA_S3TC_DXT5_Format = RGBA_S3TC_DXT5_Format;\n\texports.RGBDEncoding = RGBDEncoding;\n\texports.RGBEEncoding = RGBEEncoding;\n\texports.RGBEFormat = RGBEFormat;\n\texports.RGBFormat = RGBFormat;\n\texports.RGBIntegerFormat = RGBIntegerFormat;\n\texports.RGBM16Encoding = RGBM16Encoding;\n\texports.RGBM7Encoding = RGBM7Encoding;\n\texports.RGB_ETC1_Format = RGB_ETC1_Format;\n\texports.RGB_ETC2_Format = RGB_ETC2_Format;\n\texports.RGB_PVRTC_2BPPV1_Format = RGB_PVRTC_2BPPV1_Format;\n\texports.RGB_PVRTC_4BPPV1_Format = RGB_PVRTC_4BPPV1_Format;\n\texports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format;\n\texports.RGFormat = RGFormat;\n\texports.RGIntegerFormat = RGIntegerFormat;\n\texports.RawShaderMaterial = RawShaderMaterial;\n\texports.Ray = Ray;\n\texports.Raycaster = Raycaster;\n\texports.RectAreaLight = RectAreaLight;\n\texports.RedFormat = RedFormat;\n\texports.RedIntegerFormat = RedIntegerFormat;\n\texports.ReinhardToneMapping = ReinhardToneMapping;\n\texports.RepeatWrapping = RepeatWrapping;\n\texports.ReplaceStencilOp = ReplaceStencilOp;\n\texports.ReverseSubtractEquation = ReverseSubtractEquation;\n\texports.RingBufferGeometry = RingGeometry;\n\texports.RingGeometry = RingGeometry;\n\texports.SRGB8_ALPHA8_ASTC_10x10_Format = SRGB8_ALPHA8_ASTC_10x10_Format;\n\texports.SRGB8_ALPHA8_ASTC_10x5_Format = SRGB8_ALPHA8_ASTC_10x5_Format;\n\texports.SRGB8_ALPHA8_ASTC_10x6_Format = SRGB8_ALPHA8_ASTC_10x6_Format;\n\texports.SRGB8_ALPHA8_ASTC_10x8_Format = SRGB8_ALPHA8_ASTC_10x8_Format;\n\texports.SRGB8_ALPHA8_ASTC_12x10_Format = SRGB8_ALPHA8_ASTC_12x10_Format;\n\texports.SRGB8_ALPHA8_ASTC_12x12_Format = SRGB8_ALPHA8_ASTC_12x12_Format;\n\texports.SRGB8_ALPHA8_ASTC_4x4_Format = SRGB8_ALPHA8_ASTC_4x4_Format;\n\texports.SRGB8_ALPHA8_ASTC_5x4_Format = SRGB8_ALPHA8_ASTC_5x4_Format;\n\texports.SRGB8_ALPHA8_ASTC_5x5_Format = SRGB8_ALPHA8_ASTC_5x5_Format;\n\texports.SRGB8_ALPHA8_ASTC_6x5_Format = SRGB8_ALPHA8_ASTC_6x5_Format;\n\texports.SRGB8_ALPHA8_ASTC_6x6_Format = SRGB8_ALPHA8_ASTC_6x6_Format;\n\texports.SRGB8_ALPHA8_ASTC_8x5_Format = SRGB8_ALPHA8_ASTC_8x5_Format;\n\texports.SRGB8_ALPHA8_ASTC_8x6_Format = SRGB8_ALPHA8_ASTC_8x6_Format;\n\texports.SRGB8_ALPHA8_ASTC_8x8_Format = SRGB8_ALPHA8_ASTC_8x8_Format;\n\texports.Scene = Scene;\n\texports.SceneUtils = SceneUtils;\n\texports.ShaderChunk = ShaderChunk;\n\texports.ShaderLib = ShaderLib;\n\texports.ShaderMaterial = ShaderMaterial;\n\texports.ShadowMaterial = ShadowMaterial;\n\texports.Shape = Shape;\n\texports.ShapeBufferGeometry = ShapeGeometry;\n\texports.ShapeGeometry = ShapeGeometry;\n\texports.ShapePath = ShapePath;\n\texports.ShapeUtils = ShapeUtils;\n\texports.ShortType = ShortType;\n\texports.Skeleton = Skeleton;\n\texports.SkeletonHelper = SkeletonHelper;\n\texports.SkinnedMesh = SkinnedMesh;\n\texports.SmoothShading = SmoothShading;\n\texports.Sphere = Sphere;\n\texports.SphereBufferGeometry = SphereGeometry;\n\texports.SphereGeometry = SphereGeometry;\n\texports.Spherical = Spherical;\n\texports.SphericalHarmonics3 = SphericalHarmonics3;\n\texports.Spline = Spline;\n\texports.SplineCurve = SplineCurve;\n\texports.SplineCurve3 = SplineCurve3;\n\texports.SpotLight = SpotLight;\n\texports.SpotLightHelper = SpotLightHelper;\n\texports.Sprite = Sprite;\n\texports.SpriteMaterial = SpriteMaterial;\n\texports.SrcAlphaFactor = SrcAlphaFactor;\n\texports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor;\n\texports.SrcColorFactor = SrcColorFactor;\n\texports.StaticCopyUsage = StaticCopyUsage;\n\texports.StaticDrawUsage = StaticDrawUsage;\n\texports.StaticReadUsage = StaticReadUsage;\n\texports.StereoCamera = StereoCamera;\n\texports.StreamCopyUsage = StreamCopyUsage;\n\texports.StreamDrawUsage = StreamDrawUsage;\n\texports.StreamReadUsage = StreamReadUsage;\n\texports.StringKeyframeTrack = StringKeyframeTrack;\n\texports.SubtractEquation = SubtractEquation;\n\texports.SubtractiveBlending = SubtractiveBlending;\n\texports.TOUCH = TOUCH;\n\texports.TangentSpaceNormalMap = TangentSpaceNormalMap;\n\texports.TetrahedronBufferGeometry = TetrahedronGeometry;\n\texports.TetrahedronGeometry = TetrahedronGeometry;\n\texports.TextBufferGeometry = TextGeometry;\n\texports.TextGeometry = TextGeometry;\n\texports.Texture = Texture;\n\texports.TextureLoader = TextureLoader;\n\texports.TorusBufferGeometry = TorusGeometry;\n\texports.TorusGeometry = TorusGeometry;\n\texports.TorusKnotBufferGeometry = TorusKnotGeometry;\n\texports.TorusKnotGeometry = TorusKnotGeometry;\n\texports.Triangle = Triangle;\n\texports.TriangleFanDrawMode = TriangleFanDrawMode;\n\texports.TriangleStripDrawMode = TriangleStripDrawMode;\n\texports.TrianglesDrawMode = TrianglesDrawMode;\n\texports.TubeBufferGeometry = TubeGeometry;\n\texports.TubeGeometry = TubeGeometry;\n\texports.UVMapping = UVMapping;\n\texports.Uint16Attribute = Uint16Attribute;\n\texports.Uint16BufferAttribute = Uint16BufferAttribute;\n\texports.Uint32Attribute = Uint32Attribute;\n\texports.Uint32BufferAttribute = Uint32BufferAttribute;\n\texports.Uint8Attribute = Uint8Attribute;\n\texports.Uint8BufferAttribute = Uint8BufferAttribute;\n\texports.Uint8ClampedAttribute = Uint8ClampedAttribute;\n\texports.Uint8ClampedBufferAttribute = Uint8ClampedBufferAttribute;\n\texports.Uniform = Uniform;\n\texports.UniformsLib = UniformsLib;\n\texports.UniformsUtils = UniformsUtils;\n\texports.UnsignedByteType = UnsignedByteType;\n\texports.UnsignedInt248Type = UnsignedInt248Type;\n\texports.UnsignedIntType = UnsignedIntType;\n\texports.UnsignedShort4444Type = UnsignedShort4444Type;\n\texports.UnsignedShort5551Type = UnsignedShort5551Type;\n\texports.UnsignedShort565Type = UnsignedShort565Type;\n\texports.UnsignedShortType = UnsignedShortType;\n\texports.VSMShadowMap = VSMShadowMap;\n\texports.Vector2 = Vector2;\n\texports.Vector3 = Vector3;\n\texports.Vector4 = Vector4;\n\texports.VectorKeyframeTrack = VectorKeyframeTrack;\n\texports.Vertex = Vertex;\n\texports.VertexColors = VertexColors;\n\texports.VideoTexture = VideoTexture;\n\texports.WebGL1Renderer = WebGL1Renderer;\n\texports.WebGLCubeRenderTarget = WebGLCubeRenderTarget;\n\texports.WebGLMultisampleRenderTarget = WebGLMultisampleRenderTarget;\n\texports.WebGLRenderTarget = WebGLRenderTarget;\n\texports.WebGLRenderTargetCube = WebGLRenderTargetCube;\n\texports.WebGLRenderer = WebGLRenderer;\n\texports.WebGLUtils = WebGLUtils;\n\texports.WireframeGeometry = WireframeGeometry;\n\texports.WireframeHelper = WireframeHelper;\n\texports.WrapAroundEnding = WrapAroundEnding;\n\texports.XHRLoader = XHRLoader;\n\texports.ZeroCurvatureEnding = ZeroCurvatureEnding;\n\texports.ZeroFactor = ZeroFactor;\n\texports.ZeroSlopeEnding = ZeroSlopeEnding;\n\texports.ZeroStencilOp = ZeroStencilOp;\n\texports.sRGBEncoding = sRGBEncoding;\n\n\tObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],58:[function(_dereq_,module,exports){\nTHREE.DRACOLoader = function ( manager ) {\n\n\tTHREE.Loader.call( this, manager );\n\n\tthis.decoderPath = '';\n\tthis.decoderConfig = {};\n\tthis.decoderBinary = null;\n\tthis.decoderPending = null;\n\n\tthis.workerLimit = 4;\n\tthis.workerPool = [];\n\tthis.workerNextTaskID = 1;\n\tthis.workerSourceURL = '';\n\n\tthis.defaultAttributeIDs = {\n\t\tposition: 'POSITION',\n\t\tnormal: 'NORMAL',\n\t\tcolor: 'COLOR',\n\t\tuv: 'TEX_COORD'\n\t};\n\tthis.defaultAttributeTypes = {\n\t\tposition: 'Float32Array',\n\t\tnormal: 'Float32Array',\n\t\tcolor: 'Float32Array',\n\t\tuv: 'Float32Array'\n\t};\n\n};\n\nTHREE.DRACOLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), {\n\n\tconstructor: THREE.DRACOLoader,\n\n\tsetDecoderPath: function ( path ) {\n\n\t\tthis.decoderPath = path;\n\n\t\treturn this;\n\n\t},\n\n\tsetDecoderConfig: function ( config ) {\n\n\t\tthis.decoderConfig = config;\n\n\t\treturn this;\n\n\t},\n\n\tsetWorkerLimit: function ( workerLimit ) {\n\n\t\tthis.workerLimit = workerLimit;\n\n\t\treturn this;\n\n\t},\n\n\t/** @deprecated */\n\tsetVerbosity: function () {\n\n\t\tconsole.warn( 'THREE.DRACOLoader: The .setVerbosity() method has been removed.' );\n\n\t},\n\n\t/** @deprecated */\n\tsetDrawMode: function () {\n\n\t\tconsole.warn( 'THREE.DRACOLoader: The .setDrawMode() method has been removed.' );\n\n\t},\n\n\t/** @deprecated */\n\tsetSkipDequantization: function () {\n\n\t\tconsole.warn( 'THREE.DRACOLoader: The .setSkipDequantization() method has been removed.' );\n\n\t},\n\n\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\tvar loader = new THREE.FileLoader( this.manager );\n\n\t\tloader.setPath( this.path );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\tloader.load( url, ( buffer ) => {\n\n\t\t\tvar taskConfig = {\n\t\t\t\tattributeIDs: this.defaultAttributeIDs,\n\t\t\t\tattributeTypes: this.defaultAttributeTypes,\n\t\t\t\tuseUniqueIDs: false\n\t\t\t};\n\n\t\t\tthis.decodeGeometry( buffer, taskConfig )\n\t\t\t\t.then( onLoad )\n\t\t\t\t.catch( onError );\n\n\t\t}, onProgress, onError );\n\n\t},\n\n\t/** @deprecated Kept for backward-compatibility with previous DRACOLoader versions. */\n\tdecodeDracoFile: function ( buffer, callback, attributeIDs, attributeTypes ) {\n\n\t\tvar taskConfig = {\n\t\t\tattributeIDs: attributeIDs || this.defaultAttributeIDs,\n\t\t\tattributeTypes: attributeTypes || this.defaultAttributeTypes,\n\t\t\tuseUniqueIDs: !! attributeIDs\n\t\t};\n\n\t\tthis.decodeGeometry( buffer, taskConfig ).then( callback );\n\n\t},\n\n\tdecodeGeometry: function ( buffer, taskConfig ) {\n\n\t\t// TODO: For backward-compatibility, support 'attributeTypes' objects containing\n\t\t// references (rather than names) to typed array constructors. These must be\n\t\t// serialized before sending them to the worker.\n\t\tfor ( var attribute in taskConfig.attributeTypes ) {\n\n\t\t\tvar type = taskConfig.attributeTypes[ attribute ];\n\n\t\t\tif ( type.BYTES_PER_ELEMENT !== undefined ) {\n\n\t\t\t\ttaskConfig.attributeTypes[ attribute ] = type.name;\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tvar taskKey = JSON.stringify( taskConfig );\n\n\t\t// Check for an existing task using this buffer. A transferred buffer cannot be transferred\n\t\t// again from this thread.\n\t\tif ( THREE.DRACOLoader.taskCache.has( buffer ) ) {\n\n\t\t\tvar cachedTask = THREE.DRACOLoader.taskCache.get( buffer );\n\n\t\t\tif ( cachedTask.key === taskKey ) {\n\n\t\t\t\treturn cachedTask.promise;\n\n\t\t\t} else if ( buffer.byteLength === 0 ) {\n\n\t\t\t\t// Technically, it would be possible to wait for the previous task to complete,\n\t\t\t\t// transfer the buffer back, and decode again with the second configuration. That\n\t\t\t\t// is complex, and I don't know of any reason to decode a Draco buffer twice in\n\t\t\t\t// different ways, so this is left unimplemented.\n\t\t\t\tthrow new Error(\n\n\t\t\t\t\t'THREE.DRACOLoader: Unable to re-decode a buffer with different ' +\n\t\t\t\t\t'settings. Buffer has already been transferred.'\n\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tvar worker;\n\t\tvar taskID = this.workerNextTaskID ++;\n\t\tvar taskCost = buffer.byteLength;\n\n\t\t// Obtain a worker and assign a task, and construct a geometry instance\n\t\t// when the task completes.\n\t\tvar geometryPending = this._getWorker( taskID, taskCost )\n\t\t\t.then( ( _worker ) => {\n\n\t\t\t\tworker = _worker;\n\n\t\t\t\treturn new Promise( ( resolve, reject ) => {\n\n\t\t\t\t\tworker._callbacks[ taskID ] = { resolve, reject };\n\n\t\t\t\t\tworker.postMessage( { type: 'decode', id: taskID, taskConfig, buffer }, [ buffer ] );\n\n\t\t\t\t\t// this.debug();\n\n\t\t\t\t} );\n\n\t\t\t} )\n\t\t\t.then( ( message ) => this._createGeometry( message.geometry ) );\n\n\t\t// Remove task from the task list.\n\t\t// Note: replaced '.finally()' with '.catch().then()' block - iOS 11 support (#19416)\n\t\tgeometryPending\n\t\t\t.catch( () => true )\n\t\t\t.then( () => {\n\n\t\t\t\tif ( worker && taskID ) {\n\n\t\t\t\t\tthis._releaseTask( worker, taskID );\n\n\t\t\t\t\t// this.debug();\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t// Cache the task result.\n\t\tTHREE.DRACOLoader.taskCache.set( buffer, {\n\n\t\t\tkey: taskKey,\n\t\t\tpromise: geometryPending\n\n\t\t} );\n\n\t\treturn geometryPending;\n\n\t},\n\n\t_createGeometry: function ( geometryData ) {\n\n\t\tvar geometry = new THREE.BufferGeometry();\n\n\t\tif ( geometryData.index ) {\n\n\t\t\tgeometry.setIndex( new THREE.BufferAttribute( geometryData.index.array, 1 ) );\n\n\t\t}\n\n\t\tfor ( var i = 0; i < geometryData.attributes.length; i ++ ) {\n\n\t\t\tvar attribute = geometryData.attributes[ i ];\n\t\t\tvar name = attribute.name;\n\t\t\tvar array = attribute.array;\n\t\t\tvar itemSize = attribute.itemSize;\n\n\t\t\tgeometry.setAttribute( name, new THREE.BufferAttribute( array, itemSize ) );\n\n\t\t}\n\n\t\treturn geometry;\n\n\t},\n\n\t_loadLibrary: function ( url, responseType ) {\n\n\t\tvar loader = new THREE.FileLoader( this.manager );\n\t\tloader.setPath( this.decoderPath );\n\t\tloader.setResponseType( responseType );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\treturn new Promise( ( resolve, reject ) => {\n\n\t\t\tloader.load( url, resolve, undefined, reject );\n\n\t\t} );\n\n\t},\n\n\tpreload: function () {\n\n\t\tthis._initDecoder();\n\n\t\treturn this;\n\n\t},\n\n\t_initDecoder: function () {\n\n\t\tif ( this.decoderPending ) return this.decoderPending;\n\n\t\tvar useJS = typeof WebAssembly !== 'object' || this.decoderConfig.type === 'js';\n\t\tvar librariesPending = [];\n\n\t\tif ( useJS ) {\n\n\t\t\tlibrariesPending.push( this._loadLibrary( 'draco_decoder.js', 'text' ) );\n\n\t\t} else {\n\n\t\t\tlibrariesPending.push( this._loadLibrary( 'draco_wasm_wrapper.js', 'text' ) );\n\t\t\tlibrariesPending.push( this._loadLibrary( 'draco_decoder.wasm', 'arraybuffer' ) );\n\n\t\t}\n\n\t\tthis.decoderPending = Promise.all( librariesPending )\n\t\t\t.then( ( libraries ) => {\n\n\t\t\t\tvar jsContent = libraries[ 0 ];\n\n\t\t\t\tif ( ! useJS ) {\n\n\t\t\t\t\tthis.decoderConfig.wasmBinary = libraries[ 1 ];\n\n\t\t\t\t}\n\n\t\t\t\tvar fn = THREE.DRACOLoader.DRACOWorker.toString();\n\n\t\t\t\tvar body = [\n\t\t\t\t\t'/* draco decoder */',\n\t\t\t\t\tjsContent,\n\t\t\t\t\t'',\n\t\t\t\t\t'/* worker */',\n\t\t\t\t\tfn.substring( fn.indexOf( '{' ) + 1, fn.lastIndexOf( '}' ) )\n\t\t\t\t].join( '\\n' );\n\n\t\t\t\tthis.workerSourceURL = URL.createObjectURL( new Blob( [ body ] ) );\n\n\t\t\t} );\n\n\t\treturn this.decoderPending;\n\n\t},\n\n\t_getWorker: function ( taskID, taskCost ) {\n\n\t\treturn this._initDecoder().then( () => {\n\n\t\t\tif ( this.workerPool.length < this.workerLimit ) {\n\n\t\t\t\tvar worker = new Worker( this.workerSourceURL );\n\n\t\t\t\tworker._callbacks = {};\n\t\t\t\tworker._taskCosts = {};\n\t\t\t\tworker._taskLoad = 0;\n\n\t\t\t\tworker.postMessage( { type: 'init', decoderConfig: this.decoderConfig } );\n\n\t\t\t\tworker.onmessage = function ( e ) {\n\n\t\t\t\t\tvar message = e.data;\n\n\t\t\t\t\tswitch ( message.type ) {\n\n\t\t\t\t\t\tcase 'decode':\n\t\t\t\t\t\t\tworker._callbacks[ message.id ].resolve( message );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'error':\n\t\t\t\t\t\t\tworker._callbacks[ message.id ].reject( message );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.DRACOLoader: Unexpected message, \"' + message.type + '\"' );\n\n\t\t\t\t\t}\n\n\t\t\t\t};\n\n\t\t\t\tthis.workerPool.push( worker );\n\n\t\t\t} else {\n\n\t\t\t\tthis.workerPool.sort( function ( a, b ) {\n\n\t\t\t\t\treturn a._taskLoad > b._taskLoad ? - 1 : 1;\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tvar worker = this.workerPool[ this.workerPool.length - 1 ];\n\t\t\tworker._taskCosts[ taskID ] = taskCost;\n\t\t\tworker._taskLoad += taskCost;\n\t\t\treturn worker;\n\n\t\t} );\n\n\t},\n\n\t_releaseTask: function ( worker, taskID ) {\n\n\t\tworker._taskLoad -= worker._taskCosts[ taskID ];\n\t\tdelete worker._callbacks[ taskID ];\n\t\tdelete worker._taskCosts[ taskID ];\n\n\t},\n\n\tdebug: function () {\n\n\t\tconsole.log( 'Task load: ', this.workerPool.map( ( worker ) => worker._taskLoad ) );\n\n\t},\n\n\tdispose: function () {\n\n\t\tfor ( var i = 0; i < this.workerPool.length; ++ i ) {\n\n\t\t\tthis.workerPool[ i ].terminate();\n\n\t\t}\n\n\t\tthis.workerPool.length = 0;\n\n\t\treturn this;\n\n\t}\n\n} );\n\n/* WEB WORKER */\n\nTHREE.DRACOLoader.DRACOWorker = function () {\n\n\tvar decoderConfig;\n\tvar decoderPending;\n\n\tonmessage = function ( e ) {\n\n\t\tvar message = e.data;\n\n\t\tswitch ( message.type ) {\n\n\t\t\tcase 'init':\n\t\t\t\tdecoderConfig = message.decoderConfig;\n\t\t\t\tdecoderPending = new Promise( function ( resolve/*, reject*/ ) {\n\n\t\t\t\t\tdecoderConfig.onModuleLoaded = function ( draco ) {\n\n\t\t\t\t\t\t// Module is Promise-like. Wrap before resolving to avoid loop.\n\t\t\t\t\t\tresolve( { draco: draco } );\n\n\t\t\t\t\t};\n\n\t\t\t\t\tDracoDecoderModule( decoderConfig ); // eslint-disable-line no-undef\n\n\t\t\t\t} );\n\t\t\t\tbreak;\n\n\t\t\tcase 'decode':\n\t\t\t\tvar buffer = message.buffer;\n\t\t\t\tvar taskConfig = message.taskConfig;\n\t\t\t\tdecoderPending.then( ( module ) => {\n\n\t\t\t\t\tvar draco = module.draco;\n\t\t\t\t\tvar decoder = new draco.Decoder();\n\t\t\t\t\tvar decoderBuffer = new draco.DecoderBuffer();\n\t\t\t\t\tdecoderBuffer.Init( new Int8Array( buffer ), buffer.byteLength );\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tvar geometry = decodeGeometry( draco, decoder, decoderBuffer, taskConfig );\n\n\t\t\t\t\t\tvar buffers = geometry.attributes.map( ( attr ) => attr.array.buffer );\n\n\t\t\t\t\t\tif ( geometry.index ) buffers.push( geometry.index.array.buffer );\n\n\t\t\t\t\t\tself.postMessage( { type: 'decode', id: message.id, geometry }, buffers );\n\n\t\t\t\t\t} catch ( error ) {\n\n\t\t\t\t\t\tconsole.error( error );\n\n\t\t\t\t\t\tself.postMessage( { type: 'error', id: message.id, error: error.message } );\n\n\t\t\t\t\t} finally {\n\n\t\t\t\t\t\tdraco.destroy( decoderBuffer );\n\t\t\t\t\t\tdraco.destroy( decoder );\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t};\n\n\tfunction decodeGeometry( draco, decoder, decoderBuffer, taskConfig ) {\n\n\t\tvar attributeIDs = taskConfig.attributeIDs;\n\t\tvar attributeTypes = taskConfig.attributeTypes;\n\n\t\tvar dracoGeometry;\n\t\tvar decodingStatus;\n\n\t\tvar geometryType = decoder.GetEncodedGeometryType( decoderBuffer );\n\n\t\tif ( geometryType === draco.TRIANGULAR_MESH ) {\n\n\t\t\tdracoGeometry = new draco.Mesh();\n\t\t\tdecodingStatus = decoder.DecodeBufferToMesh( decoderBuffer, dracoGeometry );\n\n\t\t} else if ( geometryType === draco.POINT_CLOUD ) {\n\n\t\t\tdracoGeometry = new draco.PointCloud();\n\t\t\tdecodingStatus = decoder.DecodeBufferToPointCloud( decoderBuffer, dracoGeometry );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.DRACOLoader: Unexpected geometry type.' );\n\n\t\t}\n\n\t\tif ( ! decodingStatus.ok() || dracoGeometry.ptr === 0 ) {\n\n\t\t\tthrow new Error( 'THREE.DRACOLoader: Decoding failed: ' + decodingStatus.error_msg() );\n\n\t\t}\n\n\t\tvar geometry = { index: null, attributes: [] };\n\n\t\t// Gather all vertex attributes.\n\t\tfor ( var attributeName in attributeIDs ) {\n\n\t\t\tvar attributeType = self[ attributeTypes[ attributeName ] ];\n\n\t\t\tvar attribute;\n\t\t\tvar attributeID;\n\n\t\t\t// A Draco file may be created with default vertex attributes, whose attribute IDs\n\t\t\t// are mapped 1:1 from their semantic name (POSITION, NORMAL, ...). Alternatively,\n\t\t\t// a Draco file may contain a custom set of attributes, identified by known unique\n\t\t\t// IDs. glTF files always do the latter, and `.drc` files typically do the former.\n\t\t\tif ( taskConfig.useUniqueIDs ) {\n\n\t\t\t\tattributeID = attributeIDs[ attributeName ];\n\t\t\t\tattribute = decoder.GetAttributeByUniqueId( dracoGeometry, attributeID );\n\n\t\t\t} else {\n\n\t\t\t\tattributeID = decoder.GetAttributeId( dracoGeometry, draco[ attributeIDs[ attributeName ] ] );\n\n\t\t\t\tif ( attributeID === - 1 ) continue;\n\n\t\t\t\tattribute = decoder.GetAttribute( dracoGeometry, attributeID );\n\n\t\t\t}\n\n\t\t\tgeometry.attributes.push( decodeAttribute( draco, decoder, dracoGeometry, attributeName, attributeType, attribute ) );\n\n\t\t}\n\n\t\t// Add index.\n\t\tif ( geometryType === draco.TRIANGULAR_MESH ) {\n\n\t\t\tgeometry.index = decodeIndex( draco, decoder, dracoGeometry );\n\n\t\t}\n\n\t\tdraco.destroy( dracoGeometry );\n\n\t\treturn geometry;\n\n\t}\n\n\tfunction decodeIndex( draco, decoder, dracoGeometry ) {\n\n\t\tvar numFaces = dracoGeometry.num_faces();\n\t\tvar numIndices = numFaces * 3;\n\t\tvar byteLength = numIndices * 4;\n\n\t\tvar ptr = draco._malloc( byteLength );\n\t\tdecoder.GetTrianglesUInt32Array( dracoGeometry, byteLength, ptr );\n\t\tvar index = new Uint32Array( draco.HEAPF32.buffer, ptr, numIndices ).slice();\n\t\tdraco._free( ptr );\n\n\t\treturn { array: index, itemSize: 1 };\n\n\t}\n\n\tfunction decodeAttribute( draco, decoder, dracoGeometry, attributeName, attributeType, attribute ) {\n\n\t\tvar numComponents = attribute.num_components();\n\t\tvar numPoints = dracoGeometry.num_points();\n\t\tvar numValues = numPoints * numComponents;\n\t\tvar byteLength = numValues * attributeType.BYTES_PER_ELEMENT;\n\t\tvar dataType = getDracoDataType( draco, attributeType );\n\n\t\tvar ptr = draco._malloc( byteLength );\n\t\tdecoder.GetAttributeDataArrayForAllPoints( dracoGeometry, attribute, dataType, byteLength, ptr );\n\t\tvar array = new attributeType( draco.HEAPF32.buffer, ptr, numValues ).slice();\n\t\tdraco._free( ptr );\n\n\t\treturn {\n\t\t\tname: attributeName,\n\t\t\tarray: array,\n\t\t\titemSize: numComponents\n\t\t};\n\n\t}\n\n\tfunction getDracoDataType( draco, attributeType ) {\n\n\t\tswitch ( attributeType ) {\n\n\t\t\tcase Float32Array: return draco.DT_FLOAT32;\n\t\t\tcase Int8Array: return draco.DT_INT8;\n\t\t\tcase Int16Array: return draco.DT_INT16;\n\t\t\tcase Int32Array: return draco.DT_INT32;\n\t\t\tcase Uint8Array: return draco.DT_UINT8;\n\t\t\tcase Uint16Array: return draco.DT_UINT16;\n\t\t\tcase Uint32Array: return draco.DT_UINT32;\n\n\t\t}\n\n\t}\n\n};\n\nTHREE.DRACOLoader.taskCache = new WeakMap();\n\n/** Deprecated static methods */\n\n/** @deprecated */\nTHREE.DRACOLoader.setDecoderPath = function () {\n\n\tconsole.warn( 'THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.' );\n\n};\n\n/** @deprecated */\nTHREE.DRACOLoader.setDecoderConfig = function () {\n\n\tconsole.warn( 'THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.' );\n\n};\n\n/** @deprecated */\nTHREE.DRACOLoader.releaseDecoderModule = function () {\n\n\tconsole.warn( 'THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.' );\n\n};\n\n/** @deprecated */\nTHREE.DRACOLoader.getDecoderModule = function () {\n\n\tconsole.warn( 'THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.' );\n\n};\n\n},{}],59:[function(_dereq_,module,exports){\nTHREE.GLTFLoader = ( function () {\n\n\tfunction GLTFLoader( manager ) {\n\n\t\tTHREE.Loader.call( this, manager );\n\n\t\tthis.dracoLoader = null;\n\t\tthis.ddsLoader = null;\n\t\tthis.ktx2Loader = null;\n\t\tthis.meshoptDecoder = null;\n\n\t\tthis.pluginCallbacks = [];\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFMaterialsClearcoatExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFTextureBasisUExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFTextureWebPExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFMaterialsTransmissionExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFLightsExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFMeshoptCompression( parser );\n\n\t\t} );\n\n\t}\n\n\tGLTFLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), {\n\n\t\tconstructor: GLTFLoader,\n\n\t\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\t\tvar scope = this;\n\n\t\t\tvar resourcePath;\n\n\t\t\tif ( this.resourcePath !== '' ) {\n\n\t\t\t\tresourcePath = this.resourcePath;\n\n\t\t\t} else if ( this.path !== '' ) {\n\n\t\t\t\tresourcePath = this.path;\n\n\t\t\t} else {\n\n\t\t\t\tresourcePath = THREE.LoaderUtils.extractUrlBase( url );\n\n\t\t\t}\n\n\t\t\t// Tells the LoadingManager to track an extra item, which resolves after\n\t\t\t// the model is fully loaded. This means the count of items loaded will\n\t\t\t// be incorrect, but ensures manager.onLoad() does not fire early.\n\t\t\tthis.manager.itemStart( url );\n\n\t\t\tvar _onError = function ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t};\n\n\t\t\tvar loader = new THREE.FileLoader( this.manager );\n\n\t\t\tloader.setPath( this.path );\n\t\t\tloader.setResponseType( 'arraybuffer' );\n\t\t\tloader.setRequestHeader( this.requestHeader );\n\t\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\t\tloader.load( url, function ( data ) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tscope.parse( data, resourcePath, function ( gltf ) {\n\n\t\t\t\t\t\tonLoad( gltf );\n\n\t\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t\t}, _onError );\n\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t_onError( e );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, _onError );\n\n\t\t},\n\n\t\tsetDRACOLoader: function ( dracoLoader ) {\n\n\t\t\tthis.dracoLoader = dracoLoader;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tsetDDSLoader: function ( ddsLoader ) {\n\n\t\t\tthis.ddsLoader = ddsLoader;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tsetKTX2Loader: function ( ktx2Loader ) {\n\n\t\t\tthis.ktx2Loader = ktx2Loader;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tsetMeshoptDecoder: function ( meshoptDecoder ) {\n\n\t\t\tthis.meshoptDecoder = meshoptDecoder;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tregister: function ( callback ) {\n\n\t\t\tif ( this.pluginCallbacks.indexOf( callback ) === - 1 ) {\n\n\t\t\t\tthis.pluginCallbacks.push( callback );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t},\n\n\t\tunregister: function ( callback ) {\n\n\t\t\tif ( this.pluginCallbacks.indexOf( callback ) !== - 1 ) {\n\n\t\t\t\tthis.pluginCallbacks.splice( this.pluginCallbacks.indexOf( callback ), 1 );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t},\n\n\t\tparse: function ( data, path, onLoad, onError ) {\n\n\t\t\tvar content;\n\t\t\tvar extensions = {};\n\t\t\tvar plugins = {};\n\n\t\t\tif ( typeof data === 'string' ) {\n\n\t\t\t\tcontent = data;\n\n\t\t\t} else {\n\n\t\t\t\tvar magic = THREE.LoaderUtils.decodeText( new Uint8Array( data, 0, 4 ) );\n\n\t\t\t\tif ( magic === BINARY_EXTENSION_HEADER_MAGIC ) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\textensions[ EXTENSIONS.KHR_BINARY_GLTF ] = new GLTFBinaryExtension( data );\n\n\t\t\t\t\t} catch ( error ) {\n\n\t\t\t\t\t\tif ( onError ) onError( error );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcontent = extensions[ EXTENSIONS.KHR_BINARY_GLTF ].content;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tcontent = THREE.LoaderUtils.decodeText( new Uint8Array( data ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar json = JSON.parse( content );\n\n\t\t\tif ( json.asset === undefined || json.asset.version[ 0 ] < 2 ) {\n\n\t\t\t\tif ( onError ) onError( new Error( 'THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.' ) );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tvar parser = new GLTFParser( json, {\n\n\t\t\t\tpath: path || this.resourcePath || '',\n\t\t\t\tcrossOrigin: this.crossOrigin,\n\t\t\t\tmanager: this.manager,\n\t\t\t\tktx2Loader: this.ktx2Loader,\n\t\t\t\tmeshoptDecoder: this.meshoptDecoder\n\n\t\t\t} );\n\n\t\t\tparser.fileLoader.setRequestHeader( this.requestHeader );\n\n\t\t\tfor ( var i = 0; i < this.pluginCallbacks.length; i ++ ) {\n\n\t\t\t\tvar plugin = this.pluginCallbacks[ i ]( parser );\n\t\t\t\tplugins[ plugin.name ] = plugin;\n\n\t\t\t\t// Workaround to avoid determining as unknown extension\n\t\t\t\t// in addUnknownExtensionsToUserData().\n\t\t\t\t// Remove this workaround if we move all the existing\n\t\t\t\t// extension handlers to plugin system\n\t\t\t\textensions[ plugin.name ] = true;\n\n\t\t\t}\n\n\t\t\tif ( json.extensionsUsed ) {\n\n\t\t\t\tfor ( var i = 0; i < json.extensionsUsed.length; ++ i ) {\n\n\t\t\t\t\tvar extensionName = json.extensionsUsed[ i ];\n\t\t\t\t\tvar extensionsRequired = json.extensionsRequired || [];\n\n\t\t\t\t\tswitch ( extensionName ) {\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_MATERIALS_UNLIT:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFMaterialsUnlitExtension();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFMaterialsPbrSpecularGlossinessExtension();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_DRACO_MESH_COMPRESSION:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFDracoMeshCompressionExtension( json, this.dracoLoader );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.MSFT_TEXTURE_DDS:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFTextureDDSExtension( this.ddsLoader );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_TEXTURE_TRANSFORM:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFTextureTransformExtension();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_MESH_QUANTIZATION:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFMeshQuantizationExtension();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tif ( extensionsRequired.indexOf( extensionName ) >= 0 && plugins[ extensionName ] === undefined ) {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Unknown extension \"' + extensionName + '\".' );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tparser.setExtensions( extensions );\n\t\t\tparser.setPlugins( plugins );\n\t\t\tparser.parse( onLoad, onError );\n\n\t\t}\n\n\t} );\n\n\t/* GLTFREGISTRY */\n\n\tfunction GLTFRegistry() {\n\n\t\tvar objects = {};\n\n\t\treturn\t{\n\n\t\t\tget: function ( key ) {\n\n\t\t\t\treturn objects[ key ];\n\n\t\t\t},\n\n\t\t\tadd: function ( key, object ) {\n\n\t\t\t\tobjects[ key ] = object;\n\n\t\t\t},\n\n\t\t\tremove: function ( key ) {\n\n\t\t\t\tdelete objects[ key ];\n\n\t\t\t},\n\n\t\t\tremoveAll: function () {\n\n\t\t\t\tobjects = {};\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t/*********************************/\n\t/********** EXTENSIONS ***********/\n\t/*********************************/\n\n\tvar EXTENSIONS = {\n\t\tKHR_BINARY_GLTF: 'KHR_binary_glTF',\n\t\tKHR_DRACO_MESH_COMPRESSION: 'KHR_draco_mesh_compression',\n\t\tKHR_LIGHTS_PUNCTUAL: 'KHR_lights_punctual',\n\t\tKHR_MATERIALS_CLEARCOAT: 'KHR_materials_clearcoat',\n\t\tKHR_MATERIALS_PBR_SPECULAR_GLOSSINESS: 'KHR_materials_pbrSpecularGlossiness',\n\t\tKHR_MATERIALS_TRANSMISSION: 'KHR_materials_transmission',\n\t\tKHR_MATERIALS_UNLIT: 'KHR_materials_unlit',\n\t\tKHR_TEXTURE_BASISU: 'KHR_texture_basisu',\n\t\tKHR_TEXTURE_TRANSFORM: 'KHR_texture_transform',\n\t\tKHR_MESH_QUANTIZATION: 'KHR_mesh_quantization',\n\t\tEXT_TEXTURE_WEBP: 'EXT_texture_webp',\n\t\tEXT_MESHOPT_COMPRESSION: 'EXT_meshopt_compression',\n\t\tMSFT_TEXTURE_DDS: 'MSFT_texture_dds'\n\t};\n\n\t/**\n\t * DDS Texture Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_texture_dds\n\t *\n\t */\n\tfunction GLTFTextureDDSExtension( ddsLoader ) {\n\n\t\tif ( ! ddsLoader ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader' );\n\n\t\t}\n\n\t\tthis.name = EXTENSIONS.MSFT_TEXTURE_DDS;\n\t\tthis.ddsLoader = ddsLoader;\n\n\t}\n\n\t/**\n\t * Punctual Lights Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual\n\t */\n\tfunction GLTFLightsExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.KHR_LIGHTS_PUNCTUAL;\n\n\t\t// Object3D instance caches\n\t\tthis.cache = { refs: {}, uses: {} };\n\n\t}\n\n\tGLTFLightsExtension.prototype._markDefs = function () {\n\n\t\tvar parser = this.parser;\n\t\tvar nodeDefs = this.parser.json.nodes || [];\n\n\t\tfor ( var nodeIndex = 0, nodeLength = nodeDefs.length; nodeIndex < nodeLength; nodeIndex ++ ) {\n\n\t\t\tvar nodeDef = nodeDefs[ nodeIndex ];\n\n\t\t\tif ( nodeDef.extensions\n\t\t\t\t&& nodeDef.extensions[ this.name ]\n\t\t\t\t&& nodeDef.extensions[ this.name ].light !== undefined ) {\n\n\t\t\t\tparser._addNodeRef( this.cache, nodeDef.extensions[ this.name ].light );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\tGLTFLightsExtension.prototype._loadLight = function ( lightIndex ) {\n\n\t\tvar parser = this.parser;\n\t\tvar cacheKey = 'light:' + lightIndex;\n\t\tvar dependency = parser.cache.get( cacheKey );\n\n\t\tif ( dependency ) return dependency;\n\n\t\tvar json = parser.json;\n\t\tvar extensions = ( json.extensions && json.extensions[ this.name ] ) || {};\n\t\tvar lightDefs = extensions.lights || [];\n\t\tvar lightDef = lightDefs[ lightIndex ];\n\t\tvar lightNode;\n\n\t\tvar color = new THREE.Color( 0xffffff );\n\n\t\tif ( lightDef.color !== undefined ) color.fromArray( lightDef.color );\n\n\t\tvar range = lightDef.range !== undefined ? lightDef.range : 0;\n\n\t\tswitch ( lightDef.type ) {\n\n\t\t\tcase 'directional':\n\t\t\t\tlightNode = new THREE.DirectionalLight( color );\n\t\t\t\tlightNode.target.position.set( 0, 0, - 1 );\n\t\t\t\tlightNode.add( lightNode.target );\n\t\t\t\tbreak;\n\n\t\t\tcase 'point':\n\t\t\t\tlightNode = new THREE.PointLight( color );\n\t\t\t\tlightNode.distance = range;\n\t\t\t\tbreak;\n\n\t\t\tcase 'spot':\n\t\t\t\tlightNode = new THREE.SpotLight( color );\n\t\t\t\tlightNode.distance = range;\n\t\t\t\t// Handle spotlight properties.\n\t\t\t\tlightDef.spot = lightDef.spot || {};\n\t\t\t\tlightDef.spot.innerConeAngle = lightDef.spot.innerConeAngle !== undefined ? lightDef.spot.innerConeAngle : 0;\n\t\t\t\tlightDef.spot.outerConeAngle = lightDef.spot.outerConeAngle !== undefined ? lightDef.spot.outerConeAngle : Math.PI / 4.0;\n\t\t\t\tlightNode.angle = lightDef.spot.outerConeAngle;\n\t\t\t\tlightNode.penumbra = 1.0 - lightDef.spot.innerConeAngle / lightDef.spot.outerConeAngle;\n\t\t\t\tlightNode.target.position.set( 0, 0, - 1 );\n\t\t\t\tlightNode.add( lightNode.target );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'THREE.GLTFLoader: Unexpected light type: ' + lightDef.type );\n\n\t\t}\n\n\t\t// Some lights (e.g. spot) default to a position other than the origin. Reset the position\n\t\t// here, because node-level parsing will only override position if explicitly specified.\n\t\tlightNode.position.set( 0, 0, 0 );\n\n\t\tlightNode.decay = 2;\n\n\t\tif ( lightDef.intensity !== undefined ) lightNode.intensity = lightDef.intensity;\n\n\t\tlightNode.name = parser.createUniqueName( lightDef.name || ( 'light_' + lightIndex ) );\n\n\t\tdependency = Promise.resolve( lightNode );\n\n\t\tparser.cache.add( cacheKey, dependency );\n\n\t\treturn dependency;\n\n\t};\n\n\tGLTFLightsExtension.prototype.createNodeAttachment = function ( nodeIndex ) {\n\n\t\tvar self = this;\n\t\tvar parser = this.parser;\n\t\tvar json = parser.json;\n\t\tvar nodeDef = json.nodes[ nodeIndex ];\n\t\tvar lightDef = ( nodeDef.extensions && nodeDef.extensions[ this.name ] ) || {};\n\t\tvar lightIndex = lightDef.light;\n\n\t\tif ( lightIndex === undefined ) return null;\n\n\t\treturn this._loadLight( lightIndex ).then( function ( light ) {\n\n\t\t\treturn parser._getNodeRef( self.cache, lightIndex, light );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Unlit Materials Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit\n\t */\n\tfunction GLTFMaterialsUnlitExtension() {\n\n\t\tthis.name = EXTENSIONS.KHR_MATERIALS_UNLIT;\n\n\t}\n\n\tGLTFMaterialsUnlitExtension.prototype.getMaterialType = function () {\n\n\t\treturn THREE.MeshBasicMaterial;\n\n\t};\n\n\tGLTFMaterialsUnlitExtension.prototype.extendParams = function ( materialParams, materialDef, parser ) {\n\n\t\tvar pending = [];\n\n\t\tmaterialParams.color = new THREE.Color( 1.0, 1.0, 1.0 );\n\t\tmaterialParams.opacity = 1.0;\n\n\t\tvar metallicRoughness = materialDef.pbrMetallicRoughness;\n\n\t\tif ( metallicRoughness ) {\n\n\t\t\tif ( Array.isArray( metallicRoughness.baseColorFactor ) ) {\n\n\t\t\t\tvar array = metallicRoughness.baseColorFactor;\n\n\t\t\t\tmaterialParams.color.fromArray( array );\n\t\t\t\tmaterialParams.opacity = array[ 3 ];\n\n\t\t\t}\n\n\t\t\tif ( metallicRoughness.baseColorTexture !== undefined ) {\n\n\t\t\t\tpending.push( parser.assignTexture( materialParams, 'map', metallicRoughness.baseColorTexture ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn Promise.all( pending );\n\n\t};\n\n\t/**\n\t * Clearcoat Materials Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat\n\t */\n\tfunction GLTFMaterialsClearcoatExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.KHR_MATERIALS_CLEARCOAT;\n\n\t}\n\n\tGLTFMaterialsClearcoatExtension.prototype.getMaterialType = function ( materialIndex ) {\n\n\t\tvar parser = this.parser;\n\t\tvar materialDef = parser.json.materials[ materialIndex ];\n\n\t\tif ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null;\n\n\t\treturn THREE.MeshPhysicalMaterial;\n\n\t};\n\n\tGLTFMaterialsClearcoatExtension.prototype.extendMaterialParams = function ( materialIndex, materialParams ) {\n\n\t\tvar parser = this.parser;\n\t\tvar materialDef = parser.json.materials[ materialIndex ];\n\n\t\tif ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) {\n\n\t\t\treturn Promise.resolve();\n\n\t\t}\n\n\t\tvar pending = [];\n\n\t\tvar extension = materialDef.extensions[ this.name ];\n\n\t\tif ( extension.clearcoatFactor !== undefined ) {\n\n\t\t\tmaterialParams.clearcoat = extension.clearcoatFactor;\n\n\t\t}\n\n\t\tif ( extension.clearcoatTexture !== undefined ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'clearcoatMap', extension.clearcoatTexture ) );\n\n\t\t}\n\n\t\tif ( extension.clearcoatRoughnessFactor !== undefined ) {\n\n\t\t\tmaterialParams.clearcoatRoughness = extension.clearcoatRoughnessFactor;\n\n\t\t}\n\n\t\tif ( extension.clearcoatRoughnessTexture !== undefined ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'clearcoatRoughnessMap', extension.clearcoatRoughnessTexture ) );\n\n\t\t}\n\n\t\tif ( extension.clearcoatNormalTexture !== undefined ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'clearcoatNormalMap', extension.clearcoatNormalTexture ) );\n\n\t\t\tif ( extension.clearcoatNormalTexture.scale !== undefined ) {\n\n\t\t\t\tvar scale = extension.clearcoatNormalTexture.scale;\n\n\t\t\t\t// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995\n\t\t\t\tmaterialParams.clearcoatNormalScale = new THREE.Vector2( scale, -scale );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn Promise.all( pending );\n\n\t};\n\n\t/**\n\t * Transmission Materials Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_transmission\n\t * Draft: https://github.com/KhronosGroup/glTF/pull/1698\n\t */\n\tfunction GLTFMaterialsTransmissionExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.KHR_MATERIALS_TRANSMISSION;\n\n\t}\n\n\tGLTFMaterialsTransmissionExtension.prototype.getMaterialType = function ( materialIndex ) {\n\n\t\tvar parser = this.parser;\n\t\tvar materialDef = parser.json.materials[ materialIndex ];\n\n\t\tif ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null;\n\n\t\treturn THREE.MeshPhysicalMaterial;\n\n\t};\n\n\tGLTFMaterialsTransmissionExtension.prototype.extendMaterialParams = function ( materialIndex, materialParams ) {\n\n\t\tvar parser = this.parser;\n\t\tvar materialDef = parser.json.materials[ materialIndex ];\n\n\t\tif ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) {\n\n\t\t\treturn Promise.resolve();\n\n\t\t}\n\n\t\tvar pending = [];\n\n\t\tvar extension = materialDef.extensions[ this.name ];\n\n\t\tif ( extension.transmissionFactor !== undefined ) {\n\n\t\t\tmaterialParams.transmission = extension.transmissionFactor;\n\n\t\t}\n\n\t\tif ( extension.transmissionTexture !== undefined ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'transmissionMap', extension.transmissionTexture ) );\n\n\t\t}\n\n\t\treturn Promise.all( pending );\n\n\t};\n\n\t/**\n\t * BasisU Texture Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu\n\t */\n\tfunction GLTFTextureBasisUExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.KHR_TEXTURE_BASISU;\n\n\t}\n\n\tGLTFTextureBasisUExtension.prototype.loadTexture = function ( textureIndex ) {\n\n\t\tvar parser = this.parser;\n\t\tvar json = parser.json;\n\n\t\tvar textureDef = json.textures[ textureIndex ];\n\n\t\tif ( ! textureDef.extensions || ! textureDef.extensions[ this.name ] ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tvar extension = textureDef.extensions[ this.name ];\n\t\tvar source = json.images[ extension.source ];\n\t\tvar loader = parser.options.ktx2Loader;\n\n\t\tif ( ! loader ) {\n\n\t\t\tif ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) {\n\n\t\t\t\tthrow new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );\n\n\t\t\t} else {\n\n\t\t\t\t// Assumes that the extension is optional and that a fallback texture is present\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn parser.loadTextureImage( textureIndex, source, loader );\n\n\t};\n\n\t/**\n\t * WebP Texture Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp\n\t */\n\tfunction GLTFTextureWebPExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.EXT_TEXTURE_WEBP;\n\t\tthis.isSupported = null;\n\n\t}\n\n\tGLTFTextureWebPExtension.prototype.loadTexture = function ( textureIndex ) {\n\n\t\tvar name = this.name;\n\t\tvar parser = this.parser;\n\t\tvar json = parser.json;\n\n\t\tvar textureDef = json.textures[ textureIndex ];\n\n\t\tif ( ! textureDef.extensions || ! textureDef.extensions[ name ] ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tvar extension = textureDef.extensions[ name ];\n\t\tvar source = json.images[ extension.source ];\n\t\tvar loader = source.uri ? parser.options.manager.getHandler( source.uri ) : parser.textureLoader;\n\n\t\treturn this.detectSupport().then( function ( isSupported ) {\n\n\t\t\tif ( isSupported ) return parser.loadTextureImage( textureIndex, source, loader );\n\n\t\t\tif ( json.extensionsRequired && json.extensionsRequired.indexOf( name ) >= 0 ) {\n\n\t\t\t\tthrow new Error( 'THREE.GLTFLoader: WebP required by asset but unsupported.' );\n\n\t\t\t}\n\n\t\t\t// Fall back to PNG or JPEG.\n\t\t\treturn parser.loadTexture( textureIndex );\n\n\t\t} );\n\n\t};\n\n\tGLTFTextureWebPExtension.prototype.detectSupport = function () {\n\n\t\tif ( ! this.isSupported ) {\n\n\t\t\tthis.isSupported = new Promise( function ( resolve ) {\n\n\t\t\t\tvar image = new Image();\n\n\t\t\t\t// Lossy test image. Support for lossy images doesn't guarantee support for all\n\t\t\t\t// WebP images, unfortunately.\n\t\t\t\timage.src = 'data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA';\n\n\t\t\t\timage.onload = image.onerror = function () {\n\n\t\t\t\t\tresolve( image.height === 1 );\n\n\t\t\t\t};\n\n\t\t\t} );\n\n\t\t}\n\n\t\treturn this.isSupported;\n\n\t};\n\n\t/**\n\t* meshopt BufferView Compression Extension\n\t*\n\t* Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression\n\t*/\n\tfunction GLTFMeshoptCompression( parser ) {\n\n\t\tthis.name = EXTENSIONS.EXT_MESHOPT_COMPRESSION;\n\t\tthis.parser = parser;\n\n\t}\n\n\tGLTFMeshoptCompression.prototype.loadBufferView = function ( index ) {\n\n\t\tvar json = this.parser.json;\n\t\tvar bufferView = json.bufferViews[ index ];\n\n\t\tif ( bufferView.extensions && bufferView.extensions[ this.name ] ) {\n\n\t\t\tvar extensionDef = bufferView.extensions[ this.name ];\n\n\t\t\tvar buffer = this.parser.getDependency( 'buffer', extensionDef.buffer );\n\t\t\tvar decoder = this.parser.options.meshoptDecoder;\n\n\t\t\tif ( ! decoder || ! decoder.supported ) {\n\n\t\t\t\tif ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) {\n\n\t\t\t\t\tthrow new Error( 'THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files' );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Assumes that the extension is optional and that fallback buffer data is present\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn Promise.all( [ buffer, decoder.ready ] ).then( function ( res ) {\n\n\t\t\t\tvar byteOffset = extensionDef.byteOffset || 0;\n\t\t\t\tvar byteLength = extensionDef.byteLength || 0;\n\n\t\t\t\tvar count = extensionDef.count;\n\t\t\t\tvar stride = extensionDef.byteStride;\n\n\t\t\t\tvar result = new ArrayBuffer( count * stride );\n\t\t\t\tvar source = new Uint8Array( res[ 0 ], byteOffset, byteLength );\n\n\t\t\t\tdecoder.decodeGltfBuffer( new Uint8Array( result ), count, stride, source, extensionDef.mode, extensionDef.filter );\n\t\t\t\treturn result;\n\n\t\t\t} );\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t};\n\n\t/* BINARY EXTENSION */\n\tvar BINARY_EXTENSION_HEADER_MAGIC = 'glTF';\n\tvar BINARY_EXTENSION_HEADER_LENGTH = 12;\n\tvar BINARY_EXTENSION_CHUNK_TYPES = { JSON: 0x4E4F534A, BIN: 0x004E4942 };\n\n\tfunction GLTFBinaryExtension( data ) {\n\n\t\tthis.name = EXTENSIONS.KHR_BINARY_GLTF;\n\t\tthis.content = null;\n\t\tthis.body = null;\n\n\t\tvar headerView = new DataView( data, 0, BINARY_EXTENSION_HEADER_LENGTH );\n\n\t\tthis.header = {\n\t\t\tmagic: THREE.LoaderUtils.decodeText( new Uint8Array( data.slice( 0, 4 ) ) ),\n\t\t\tversion: headerView.getUint32( 4, true ),\n\t\t\tlength: headerView.getUint32( 8, true )\n\t\t};\n\n\t\tif ( this.header.magic !== BINARY_EXTENSION_HEADER_MAGIC ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: Unsupported glTF-Binary header.' );\n\n\t\t} else if ( this.header.version < 2.0 ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: Legacy binary file detected.' );\n\n\t\t}\n\n\t\tvar chunkContentsLength = this.header.length - BINARY_EXTENSION_HEADER_LENGTH;\n\t\tvar chunkView = new DataView( data, BINARY_EXTENSION_HEADER_LENGTH );\n\t\tvar chunkIndex = 0;\n\n\t\twhile ( chunkIndex < chunkContentsLength ) {\n\n\t\t\tvar chunkLength = chunkView.getUint32( chunkIndex, true );\n\t\t\tchunkIndex += 4;\n\n\t\t\tvar chunkType = chunkView.getUint32( chunkIndex, true );\n\t\t\tchunkIndex += 4;\n\n\t\t\tif ( chunkType === BINARY_EXTENSION_CHUNK_TYPES.JSON ) {\n\n\t\t\t\tvar contentArray = new Uint8Array( data, BINARY_EXTENSION_HEADER_LENGTH + chunkIndex, chunkLength );\n\t\t\t\tthis.content = THREE.LoaderUtils.decodeText( contentArray );\n\n\t\t\t} else if ( chunkType === BINARY_EXTENSION_CHUNK_TYPES.BIN ) {\n\n\t\t\t\tvar byteOffset = BINARY_EXTENSION_HEADER_LENGTH + chunkIndex;\n\t\t\t\tthis.body = data.slice( byteOffset, byteOffset + chunkLength );\n\n\t\t\t}\n\n\t\t\t// Clients must ignore chunks with unknown types.\n\n\t\t\tchunkIndex += chunkLength;\n\n\t\t}\n\n\t\tif ( this.content === null ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: JSON content not found.' );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * DRACO Mesh Compression Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression\n\t */\n\tfunction GLTFDracoMeshCompressionExtension( json, dracoLoader ) {\n\n\t\tif ( ! dracoLoader ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: No DRACOLoader instance provided.' );\n\n\t\t}\n\n\t\tthis.name = EXTENSIONS.KHR_DRACO_MESH_COMPRESSION;\n\t\tthis.json = json;\n\t\tthis.dracoLoader = dracoLoader;\n\t\tthis.dracoLoader.preload();\n\n\t}\n\n\tGLTFDracoMeshCompressionExtension.prototype.decodePrimitive = function ( primitive, parser ) {\n\n\t\tvar json = this.json;\n\t\tvar dracoLoader = this.dracoLoader;\n\t\tvar bufferViewIndex = primitive.extensions[ this.name ].bufferView;\n\t\tvar gltfAttributeMap = primitive.extensions[ this.name ].attributes;\n\t\tvar threeAttributeMap = {};\n\t\tvar attributeNormalizedMap = {};\n\t\tvar attributeTypeMap = {};\n\n\t\tfor ( var attributeName in gltfAttributeMap ) {\n\n\t\t\tvar threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase();\n\n\t\t\tthreeAttributeMap[ threeAttributeName ] = gltfAttributeMap[ attributeName ];\n\n\t\t}\n\n\t\tfor ( attributeName in primitive.attributes ) {\n\n\t\t\tvar threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase();\n\n\t\t\tif ( gltfAttributeMap[ attributeName ] !== undefined ) {\n\n\t\t\t\tvar accessorDef = json.accessors[ primitive.attributes[ attributeName ] ];\n\t\t\t\tvar componentType = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ];\n\n\t\t\t\tattributeTypeMap[ threeAttributeName ] = componentType;\n\t\t\t\tattributeNormalizedMap[ threeAttributeName ] = accessorDef.normalized === true;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn parser.getDependency( 'bufferView', bufferViewIndex ).then( function ( bufferView ) {\n\n\t\t\treturn new Promise( function ( resolve ) {\n\n\t\t\t\tdracoLoader.decodeDracoFile( bufferView, function ( geometry ) {\n\n\t\t\t\t\tfor ( var attributeName in geometry.attributes ) {\n\n\t\t\t\t\t\tvar attribute = geometry.attributes[ attributeName ];\n\t\t\t\t\t\tvar normalized = attributeNormalizedMap[ attributeName ];\n\n\t\t\t\t\t\tif ( normalized !== undefined ) attribute.normalized = normalized;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve( geometry );\n\n\t\t\t\t}, threeAttributeMap, attributeTypeMap );\n\n\t\t\t} );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Texture Transform Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform\n\t */\n\tfunction GLTFTextureTransformExtension() {\n\n\t\tthis.name = EXTENSIONS.KHR_TEXTURE_TRANSFORM;\n\n\t}\n\n\tGLTFTextureTransformExtension.prototype.extendTexture = function ( texture, transform ) {\n\n\t\ttexture = texture.clone();\n\n\t\tif ( transform.offset !== undefined ) {\n\n\t\t\ttexture.offset.fromArray( transform.offset );\n\n\t\t}\n\n\t\tif ( transform.rotation !== undefined ) {\n\n\t\t\ttexture.rotation = transform.rotation;\n\n\t\t}\n\n\t\tif ( transform.scale !== undefined ) {\n\n\t\t\ttexture.repeat.fromArray( transform.scale );\n\n\t\t}\n\n\t\tif ( transform.texCoord !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFLoader: Custom UV sets in \"' + this.name + '\" extension not yet supported.' );\n\n\t\t}\n\n\t\ttexture.needsUpdate = true;\n\n\t\treturn texture;\n\n\t};\n\n\t/**\n\t * Specular-Glossiness Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness\n\t */\n\n\t/**\n\t * A sub class of THREE.StandardMaterial with some of the functionality\n\t * changed via the `onBeforeCompile` callback\n\t * @pailhead\n\t */\n\n\tfunction GLTFMeshStandardSGMaterial( params ) {\n\n\t\tTHREE.MeshStandardMaterial.call( this );\n\n\t\tthis.isGLTFSpecularGlossinessMaterial = true;\n\n\t\t//various chunks that need replacing\n\t\tvar specularMapParsFragmentChunk = [\n\t\t\t'#ifdef USE_SPECULARMAP',\n\t\t\t'\tuniform sampler2D specularMap;',\n\t\t\t'#endif'\n\t\t].join( '\\n' );\n\n\t\tvar glossinessMapParsFragmentChunk = [\n\t\t\t'#ifdef USE_GLOSSINESSMAP',\n\t\t\t'\tuniform sampler2D glossinessMap;',\n\t\t\t'#endif'\n\t\t].join( '\\n' );\n\n\t\tvar specularMapFragmentChunk = [\n\t\t\t'vec3 specularFactor = specular;',\n\t\t\t'#ifdef USE_SPECULARMAP',\n\t\t\t'\tvec4 texelSpecular = texture2D( specularMap, vUv );',\n\t\t\t'\ttexelSpecular = sRGBToLinear( texelSpecular );',\n\t\t\t'\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture',\n\t\t\t'\tspecularFactor *= texelSpecular.rgb;',\n\t\t\t'#endif'\n\t\t].join( '\\n' );\n\n\t\tvar glossinessMapFragmentChunk = [\n\t\t\t'float glossinessFactor = glossiness;',\n\t\t\t'#ifdef USE_GLOSSINESSMAP',\n\t\t\t'\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );',\n\t\t\t'\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture',\n\t\t\t'\tglossinessFactor *= texelGlossiness.a;',\n\t\t\t'#endif'\n\t\t].join( '\\n' );\n\n\t\tvar lightPhysicalFragmentChunk = [\n\t\t\t'PhysicalMaterial material;',\n\t\t\t'material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );',\n\t\t\t'vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );',\n\t\t\t'float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );',\n\t\t\t'material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.',\n\t\t\t'material.specularRoughness += geometryRoughness;',\n\t\t\t'material.specularRoughness = min( material.specularRoughness, 1.0 );',\n\t\t\t'material.specularColor = specularFactor;',\n\t\t].join( '\\n' );\n\n\t\tvar uniforms = {\n\t\t\tspecular: { value: new THREE.Color().setHex( 0xffffff ) },\n\t\t\tglossiness: { value: 1 },\n\t\t\tspecularMap: { value: null },\n\t\t\tglossinessMap: { value: null }\n\t\t};\n\n\t\tthis._extraUniforms = uniforms;\n\n\t\tthis.onBeforeCompile = function ( shader ) {\n\n\t\t\tfor ( var uniformName in uniforms ) {\n\n\t\t\t\tshader.uniforms[ uniformName ] = uniforms[ uniformName ];\n\n\t\t\t}\n\n\t\t\tshader.fragmentShader = shader.fragmentShader\n\t\t\t\t.replace( 'uniform float roughness;', 'uniform vec3 specular;' )\n\t\t\t\t.replace( 'uniform float metalness;', 'uniform float glossiness;' )\n\t\t\t\t.replace( '#include <roughnessmap_pars_fragment>', specularMapParsFragmentChunk )\n\t\t\t\t.replace( '#include <metalnessmap_pars_fragment>', glossinessMapParsFragmentChunk )\n\t\t\t\t.replace( '#include <roughnessmap_fragment>', specularMapFragmentChunk )\n\t\t\t\t.replace( '#include <metalnessmap_fragment>', glossinessMapFragmentChunk )\n\t\t\t\t.replace( '#include <lights_physical_fragment>', lightPhysicalFragmentChunk );\n\n\t\t};\n\n\t\tObject.defineProperties( this, {\n\n\t\t\tspecular: {\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn uniforms.specular.value;\n\n\t\t\t\t},\n\t\t\t\tset: function ( v ) {\n\n\t\t\t\t\tuniforms.specular.value = v;\n\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tspecularMap: {\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn uniforms.specularMap.value;\n\n\t\t\t\t},\n\t\t\t\tset: function ( v ) {\n\n\t\t\t\t\tuniforms.specularMap.value = v;\n\n\t\t\t\t\tif ( v ) {\n\n\t\t\t\t\t\tthis.defines.USE_SPECULARMAP = ''; // USE_UV is set by the renderer for specular maps\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdelete this.defines.USE_SPECULARMAP;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tglossiness: {\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn uniforms.glossiness.value;\n\n\t\t\t\t},\n\t\t\t\tset: function ( v ) {\n\n\t\t\t\t\tuniforms.glossiness.value = v;\n\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tglossinessMap: {\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn uniforms.glossinessMap.value;\n\n\t\t\t\t},\n\t\t\t\tset: function ( v ) {\n\n\t\t\t\t\tuniforms.glossinessMap.value = v;\n\n\t\t\t\t\tif ( v ) {\n\n\t\t\t\t\t\tthis.defines.USE_GLOSSINESSMAP = '';\n\t\t\t\t\t\tthis.defines.USE_UV = '';\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdelete this.defines.USE_GLOSSINESSMAP;\n\t\t\t\t\t\tdelete this.defines.USE_UV;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t} );\n\n\t\tdelete this.metalness;\n\t\tdelete this.roughness;\n\t\tdelete this.metalnessMap;\n\t\tdelete this.roughnessMap;\n\n\t\tthis.setValues( params );\n\n\t}\n\n\tGLTFMeshStandardSGMaterial.prototype = Object.create( THREE.MeshStandardMaterial.prototype );\n\tGLTFMeshStandardSGMaterial.prototype.constructor = GLTFMeshStandardSGMaterial;\n\n\tGLTFMeshStandardSGMaterial.prototype.copy = function ( source ) {\n\n\t\tTHREE.MeshStandardMaterial.prototype.copy.call( this, source );\n\t\tthis.specularMap = source.specularMap;\n\t\tthis.specular.copy( source.specular );\n\t\tthis.glossinessMap = source.glossinessMap;\n\t\tthis.glossiness = source.glossiness;\n\t\tdelete this.metalness;\n\t\tdelete this.roughness;\n\t\tdelete this.metalnessMap;\n\t\tdelete this.roughnessMap;\n\t\treturn this;\n\n\t};\n\n\tfunction GLTFMaterialsPbrSpecularGlossinessExtension() {\n\n\t\treturn {\n\n\t\t\tname: EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,\n\n\t\t\tspecularGlossinessParams: [\n\t\t\t\t'color',\n\t\t\t\t'map',\n\t\t\t\t'lightMap',\n\t\t\t\t'lightMapIntensity',\n\t\t\t\t'aoMap',\n\t\t\t\t'aoMapIntensity',\n\t\t\t\t'emissive',\n\t\t\t\t'emissiveIntensity',\n\t\t\t\t'emissiveMap',\n\t\t\t\t'bumpMap',\n\t\t\t\t'bumpScale',\n\t\t\t\t'normalMap',\n\t\t\t\t'normalMapType',\n\t\t\t\t'displacementMap',\n\t\t\t\t'displacementScale',\n\t\t\t\t'displacementBias',\n\t\t\t\t'specularMap',\n\t\t\t\t'specular',\n\t\t\t\t'glossinessMap',\n\t\t\t\t'glossiness',\n\t\t\t\t'alphaMap',\n\t\t\t\t'envMap',\n\t\t\t\t'envMapIntensity',\n\t\t\t\t'refractionRatio',\n\t\t\t],\n\n\t\t\tgetMaterialType: function () {\n\n\t\t\t\treturn GLTFMeshStandardSGMaterial;\n\n\t\t\t},\n\n\t\t\textendParams: function ( materialParams, materialDef, parser ) {\n\n\t\t\t\tvar pbrSpecularGlossiness = materialDef.extensions[ this.name ];\n\n\t\t\t\tmaterialParams.color = new THREE.Color( 1.0, 1.0, 1.0 );\n\t\t\t\tmaterialParams.opacity = 1.0;\n\n\t\t\t\tvar pending = [];\n\n\t\t\t\tif ( Array.isArray( pbrSpecularGlossiness.diffuseFactor ) ) {\n\n\t\t\t\t\tvar array = pbrSpecularGlossiness.diffuseFactor;\n\n\t\t\t\t\tmaterialParams.color.fromArray( array );\n\t\t\t\t\tmaterialParams.opacity = array[ 3 ];\n\n\t\t\t\t}\n\n\t\t\t\tif ( pbrSpecularGlossiness.diffuseTexture !== undefined ) {\n\n\t\t\t\t\tpending.push( parser.assignTexture( materialParams, 'map', pbrSpecularGlossiness.diffuseTexture ) );\n\n\t\t\t\t}\n\n\t\t\t\tmaterialParams.emissive = new THREE.Color( 0.0, 0.0, 0.0 );\n\t\t\t\tmaterialParams.glossiness = pbrSpecularGlossiness.glossinessFactor !== undefined ? pbrSpecularGlossiness.glossinessFactor : 1.0;\n\t\t\t\tmaterialParams.specular = new THREE.Color( 1.0, 1.0, 1.0 );\n\n\t\t\t\tif ( Array.isArray( pbrSpecularGlossiness.specularFactor ) ) {\n\n\t\t\t\t\tmaterialParams.specular.fromArray( pbrSpecularGlossiness.specularFactor );\n\n\t\t\t\t}\n\n\t\t\t\tif ( pbrSpecularGlossiness.specularGlossinessTexture !== undefined ) {\n\n\t\t\t\t\tvar specGlossMapDef = pbrSpecularGlossiness.specularGlossinessTexture;\n\t\t\t\t\tpending.push( parser.assignTexture( materialParams, 'glossinessMap', specGlossMapDef ) );\n\t\t\t\t\tpending.push( parser.assignTexture( materialParams, 'specularMap', specGlossMapDef ) );\n\n\t\t\t\t}\n\n\t\t\t\treturn Promise.all( pending );\n\n\t\t\t},\n\n\t\t\tcreateMaterial: function ( materialParams ) {\n\n\t\t\t\tvar material = new GLTFMeshStandardSGMaterial( materialParams );\n\t\t\t\tmaterial.fog = true;\n\n\t\t\t\tmaterial.color = materialParams.color;\n\n\t\t\t\tmaterial.map = materialParams.map === undefined ? null : materialParams.map;\n\n\t\t\t\tmaterial.lightMap = null;\n\t\t\t\tmaterial.lightMapIntensity = 1.0;\n\n\t\t\t\tmaterial.aoMap = materialParams.aoMap === undefined ? null : materialParams.aoMap;\n\t\t\t\tmaterial.aoMapIntensity = 1.0;\n\n\t\t\t\tmaterial.emissive = materialParams.emissive;\n\t\t\t\tmaterial.emissiveIntensity = 1.0;\n\t\t\t\tmaterial.emissiveMap = materialParams.emissiveMap === undefined ? null : materialParams.emissiveMap;\n\n\t\t\t\tmaterial.bumpMap = materialParams.bumpMap === undefined ? null : materialParams.bumpMap;\n\t\t\t\tmaterial.bumpScale = 1;\n\n\t\t\t\tmaterial.normalMap = materialParams.normalMap === undefined ? null : materialParams.normalMap;\n\t\t\t\tmaterial.normalMapType = THREE.TangentSpaceNormalMap;\n\n\t\t\t\tif ( materialParams.normalScale ) material.normalScale = materialParams.normalScale;\n\n\t\t\t\tmaterial.displacementMap = null;\n\t\t\t\tmaterial.displacementScale = 1;\n\t\t\t\tmaterial.displacementBias = 0;\n\n\t\t\t\tmaterial.specularMap = materialParams.specularMap === undefined ? null : materialParams.specularMap;\n\t\t\t\tmaterial.specular = materialParams.specular;\n\n\t\t\t\tmaterial.glossinessMap = materialParams.glossinessMap === undefined ? null : materialParams.glossinessMap;\n\t\t\t\tmaterial.glossiness = materialParams.glossiness;\n\n\t\t\t\tmaterial.alphaMap = null;\n\n\t\t\t\tmaterial.envMap = materialParams.envMap === undefined ? null : materialParams.envMap;\n\t\t\t\tmaterial.envMapIntensity = 1.0;\n\n\t\t\t\tmaterial.refractionRatio = 0.98;\n\n\t\t\t\treturn material;\n\n\t\t\t},\n\n\t\t};\n\n\t}\n\n\t/**\n\t * Mesh Quantization Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization\n\t */\n\tfunction GLTFMeshQuantizationExtension() {\n\n\t\tthis.name = EXTENSIONS.KHR_MESH_QUANTIZATION;\n\n\t}\n\n\t/*********************************/\n\t/********** INTERPOLATION ********/\n\t/*********************************/\n\n\t// Spline Interpolation\n\t// Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#appendix-c-spline-interpolation\n\tfunction GLTFCubicSplineInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tTHREE.Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tGLTFCubicSplineInterpolant.prototype = Object.create( THREE.Interpolant.prototype );\n\tGLTFCubicSplineInterpolant.prototype.constructor = GLTFCubicSplineInterpolant;\n\n\tGLTFCubicSplineInterpolant.prototype.copySampleValue_ = function ( index ) {\n\n\t\t// Copies a sample value to the result buffer. See description of glTF\n\t\t// CUBICSPLINE values layout in interpolate_() function below.\n\n\t\tvar result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tvalueSize = this.valueSize,\n\t\t\toffset = index * valueSize * 3 + valueSize;\n\n\t\tfor ( var i = 0; i !== valueSize; i ++ ) {\n\n\t\t\tresult[ i ] = values[ offset + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t};\n\n\tGLTFCubicSplineInterpolant.prototype.beforeStart_ = GLTFCubicSplineInterpolant.prototype.copySampleValue_;\n\n\tGLTFCubicSplineInterpolant.prototype.afterEnd_ = GLTFCubicSplineInterpolant.prototype.copySampleValue_;\n\n\tGLTFCubicSplineInterpolant.prototype.interpolate_ = function ( i1, t0, t, t1 ) {\n\n\t\tvar result = this.resultBuffer;\n\t\tvar values = this.sampleValues;\n\t\tvar stride = this.valueSize;\n\n\t\tvar stride2 = stride * 2;\n\t\tvar stride3 = stride * 3;\n\n\t\tvar td = t1 - t0;\n\n\t\tvar p = ( t - t0 ) / td;\n\t\tvar pp = p * p;\n\t\tvar ppp = pp * p;\n\n\t\tvar offset1 = i1 * stride3;\n\t\tvar offset0 = offset1 - stride3;\n\n\t\tvar s2 = - 2 * ppp + 3 * pp;\n\t\tvar s3 = ppp - pp;\n\t\tvar s0 = 1 - s2;\n\t\tvar s1 = s3 - pp + p;\n\n\t\t// Layout of keyframe output values for CUBICSPLINE animations:\n\t\t// [ inTangent_1, splineVertex_1, outTangent_1, inTangent_2, splineVertex_2, ... ]\n\t\tfor ( var i = 0; i !== stride; i ++ ) {\n\n\t\t\tvar p0 = values[ offset0 + i + stride ]; // splineVertex_k\n\t\t\tvar m0 = values[ offset0 + i + stride2 ] * td; // outTangent_k * (t_k+1 - t_k)\n\t\t\tvar p1 = values[ offset1 + i + stride ]; // splineVertex_k+1\n\t\t\tvar m1 = values[ offset1 + i ] * td; // inTangent_k+1 * (t_k+1 - t_k)\n\n\t\t\tresult[ i ] = s0 * p0 + s1 * m0 + s2 * p1 + s3 * m1;\n\n\t\t}\n\n\t\treturn result;\n\n\t};\n\n\t/*********************************/\n\t/********** INTERNALS ************/\n\t/*********************************/\n\n\t/* CONSTANTS */\n\n\tvar WEBGL_CONSTANTS = {\n\t\tFLOAT: 5126,\n\t\t//FLOAT_MAT2: 35674,\n\t\tFLOAT_MAT3: 35675,\n\t\tFLOAT_MAT4: 35676,\n\t\tFLOAT_VEC2: 35664,\n\t\tFLOAT_VEC3: 35665,\n\t\tFLOAT_VEC4: 35666,\n\t\tLINEAR: 9729,\n\t\tREPEAT: 10497,\n\t\tSAMPLER_2D: 35678,\n\t\tPOINTS: 0,\n\t\tLINES: 1,\n\t\tLINE_LOOP: 2,\n\t\tLINE_STRIP: 3,\n\t\tTRIANGLES: 4,\n\t\tTRIANGLE_STRIP: 5,\n\t\tTRIANGLE_FAN: 6,\n\t\tUNSIGNED_BYTE: 5121,\n\t\tUNSIGNED_SHORT: 5123\n\t};\n\n\tvar WEBGL_COMPONENT_TYPES = {\n\t\t5120: Int8Array,\n\t\t5121: Uint8Array,\n\t\t5122: Int16Array,\n\t\t5123: Uint16Array,\n\t\t5125: Uint32Array,\n\t\t5126: Float32Array\n\t};\n\n\tvar WEBGL_FILTERS = {\n\t\t9728: THREE.NearestFilter,\n\t\t9729: THREE.LinearFilter,\n\t\t9984: THREE.NearestMipmapNearestFilter,\n\t\t9985: THREE.LinearMipmapNearestFilter,\n\t\t9986: THREE.NearestMipmapLinearFilter,\n\t\t9987: THREE.LinearMipmapLinearFilter\n\t};\n\n\tvar WEBGL_WRAPPINGS = {\n\t\t33071: THREE.ClampToEdgeWrapping,\n\t\t33648: THREE.MirroredRepeatWrapping,\n\t\t10497: THREE.RepeatWrapping\n\t};\n\n\tvar WEBGL_TYPE_SIZES = {\n\t\t'SCALAR': 1,\n\t\t'VEC2': 2,\n\t\t'VEC3': 3,\n\t\t'VEC4': 4,\n\t\t'MAT2': 4,\n\t\t'MAT3': 9,\n\t\t'MAT4': 16\n\t};\n\n\tvar ATTRIBUTES = {\n\t\tPOSITION: 'position',\n\t\tNORMAL: 'normal',\n\t\tTANGENT: 'tangent',\n\t\tTEXCOORD_0: 'uv',\n\t\tTEXCOORD_1: 'uv2',\n\t\tCOLOR_0: 'color',\n\t\tWEIGHTS_0: 'skinWeight',\n\t\tJOINTS_0: 'skinIndex',\n\t};\n\n\tvar PATH_PROPERTIES = {\n\t\tscale: 'scale',\n\t\ttranslation: 'position',\n\t\trotation: 'quaternion',\n\t\tweights: 'morphTargetInfluences'\n\t};\n\n\tvar INTERPOLATION = {\n\t\tCUBICSPLINE: undefined, // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each\n\t\t // keyframe track will be initialized with a default interpolation type, then modified.\n\t\tLINEAR: THREE.InterpolateLinear,\n\t\tSTEP: THREE.InterpolateDiscrete\n\t};\n\n\tvar ALPHA_MODES = {\n\t\tOPAQUE: 'OPAQUE',\n\t\tMASK: 'MASK',\n\t\tBLEND: 'BLEND'\n\t};\n\n\t/* UTILITY FUNCTIONS */\n\n\tfunction resolveURL( url, path ) {\n\n\t\t// Invalid URL\n\t\tif ( typeof url !== 'string' || url === '' ) return '';\n\n\t\t// Host Relative URL\n\t\tif ( /^https?:\\/\\//i.test( path ) && /^\\//.test( url ) ) {\n\n\t\t\tpath = path.replace( /(^https?:\\/\\/[^\\/]+).*/i, '$1' );\n\n\t\t}\n\n\t\t// Absolute URL http://,https://,//\n\t\tif ( /^(https?:)?\\/\\//i.test( url ) ) return url;\n\n\t\t// Data URI\n\t\tif ( /^data:.*,.*$/i.test( url ) ) return url;\n\n\t\t// Blob URL\n\t\tif ( /^blob:.*$/i.test( url ) ) return url;\n\n\t\t// Relative URL\n\t\treturn path + url;\n\n\t}\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#default-material\n\t */\n\tfunction createDefaultMaterial( cache ) {\n\n\t\tif ( cache[ 'DefaultMaterial' ] === undefined ) {\n\n\t\t\tcache[ 'DefaultMaterial' ] = new THREE.MeshStandardMaterial( {\n\t\t\t\tcolor: 0xFFFFFF,\n\t\t\t\temissive: 0x000000,\n\t\t\t\tmetalness: 1,\n\t\t\t\troughness: 1,\n\t\t\t\ttransparent: false,\n\t\t\t\tdepthTest: true,\n\t\t\t\tside: THREE.FrontSide\n\t\t\t} );\n\n\t\t}\n\n\t\treturn cache[ 'DefaultMaterial' ];\n\n\t}\n\n\tfunction addUnknownExtensionsToUserData( knownExtensions, object, objectDef ) {\n\n\t\t// Add unknown glTF extensions to an object's userData.\n\n\t\tfor ( var name in objectDef.extensions ) {\n\n\t\t\tif ( knownExtensions[ name ] === undefined ) {\n\n\t\t\t\tobject.userData.gltfExtensions = object.userData.gltfExtensions || {};\n\t\t\t\tobject.userData.gltfExtensions[ name ] = objectDef.extensions[ name ];\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t/**\n\t * @param {THREE.Object3D|THREE.Material|THREE.BufferGeometry} object\n\t * @param {GLTF.definition} gltfDef\n\t */\n\tfunction assignExtrasToUserData( object, gltfDef ) {\n\n\t\tif ( gltfDef.extras !== undefined ) {\n\n\t\t\tif ( typeof gltfDef.extras === 'object' ) {\n\n\t\t\t\tObject.assign( object.userData, gltfDef.extras );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Ignoring primitive type .extras, ' + gltfDef.extras );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#morph-targets\n\t *\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {Array<GLTF.Target>} targets\n\t * @param {GLTFParser} parser\n\t * @return {Promise<THREE.BufferGeometry>}\n\t */\n\tfunction addMorphTargets( geometry, targets, parser ) {\n\n\t\tvar hasMorphPosition = false;\n\t\tvar hasMorphNormal = false;\n\n\t\tfor ( var i = 0, il = targets.length; i < il; i ++ ) {\n\n\t\t\tvar target = targets[ i ];\n\n\t\t\tif ( target.POSITION !== undefined ) hasMorphPosition = true;\n\t\t\tif ( target.NORMAL !== undefined ) hasMorphNormal = true;\n\n\t\t\tif ( hasMorphPosition && hasMorphNormal ) break;\n\n\t\t}\n\n\t\tif ( ! hasMorphPosition && ! hasMorphNormal ) return Promise.resolve( geometry );\n\n\t\tvar pendingPositionAccessors = [];\n\t\tvar pendingNormalAccessors = [];\n\n\t\tfor ( var i = 0, il = targets.length; i < il; i ++ ) {\n\n\t\t\tvar target = targets[ i ];\n\n\t\t\tif ( hasMorphPosition ) {\n\n\t\t\t\tvar pendingAccessor = target.POSITION !== undefined\n\t\t\t\t\t? parser.getDependency( 'accessor', target.POSITION )\n\t\t\t\t\t: geometry.attributes.position;\n\n\t\t\t\tpendingPositionAccessors.push( pendingAccessor );\n\n\t\t\t}\n\n\t\t\tif ( hasMorphNormal ) {\n\n\t\t\t\tvar pendingAccessor = target.NORMAL !== undefined\n\t\t\t\t\t? parser.getDependency( 'accessor', target.NORMAL )\n\t\t\t\t\t: geometry.attributes.normal;\n\n\t\t\t\tpendingNormalAccessors.push( pendingAccessor );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn Promise.all( [\n\t\t\tPromise.all( pendingPositionAccessors ),\n\t\t\tPromise.all( pendingNormalAccessors )\n\t\t] ).then( function ( accessors ) {\n\n\t\t\tvar morphPositions = accessors[ 0 ];\n\t\t\tvar morphNormals = accessors[ 1 ];\n\n\t\t\tif ( hasMorphPosition ) geometry.morphAttributes.position = morphPositions;\n\t\t\tif ( hasMorphNormal ) geometry.morphAttributes.normal = morphNormals;\n\t\t\tgeometry.morphTargetsRelative = true;\n\n\t\t\treturn geometry;\n\n\t\t} );\n\n\t}\n\n\t/**\n\t * @param {THREE.Mesh} mesh\n\t * @param {GLTF.Mesh} meshDef\n\t */\n\tfunction updateMorphTargets( mesh, meshDef ) {\n\n\t\tmesh.updateMorphTargets();\n\n\t\tif ( meshDef.weights !== undefined ) {\n\n\t\t\tfor ( var i = 0, il = meshDef.weights.length; i < il; i ++ ) {\n\n\t\t\t\tmesh.morphTargetInfluences[ i ] = meshDef.weights[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// .extras has user-defined data, so check that .extras.targetNames is an array.\n\t\tif ( meshDef.extras && Array.isArray( meshDef.extras.targetNames ) ) {\n\n\t\t\tvar targetNames = meshDef.extras.targetNames;\n\n\t\t\tif ( mesh.morphTargetInfluences.length === targetNames.length ) {\n\n\t\t\t\tmesh.morphTargetDictionary = {};\n\n\t\t\t\tfor ( var i = 0, il = targetNames.length; i < il; i ++ ) {\n\n\t\t\t\t\tmesh.morphTargetDictionary[ targetNames[ i ] ] = i;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction createPrimitiveKey( primitiveDef ) {\n\n\t\tvar dracoExtension = primitiveDef.extensions && primitiveDef.extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ];\n\t\tvar geometryKey;\n\n\t\tif ( dracoExtension ) {\n\n\t\t\tgeometryKey = 'draco:' + dracoExtension.bufferView\n\t\t\t\t+ ':' + dracoExtension.indices\n\t\t\t\t+ ':' + createAttributesKey( dracoExtension.attributes );\n\n\t\t} else {\n\n\t\t\tgeometryKey = primitiveDef.indices + ':' + createAttributesKey( primitiveDef.attributes ) + ':' + primitiveDef.mode;\n\n\t\t}\n\n\t\treturn geometryKey;\n\n\t}\n\n\tfunction createAttributesKey( attributes ) {\n\n\t\tvar attributesKey = '';\n\n\t\tvar keys = Object.keys( attributes ).sort();\n\n\t\tfor ( var i = 0, il = keys.length; i < il; i ++ ) {\n\n\t\t\tattributesKey += keys[ i ] + ':' + attributes[ keys[ i ] ] + ';';\n\n\t\t}\n\n\t\treturn attributesKey;\n\n\t}\n\n\t/* GLTF PARSER */\n\n\tfunction GLTFParser( json, options ) {\n\n\t\tthis.json = json || {};\n\t\tthis.extensions = {};\n\t\tthis.plugins = {};\n\t\tthis.options = options || {};\n\n\t\t// loader object cache\n\t\tthis.cache = new GLTFRegistry();\n\n\t\t// associations between Three.js objects and glTF elements\n\t\tthis.associations = new Map();\n\n\t\t// BufferGeometry caching\n\t\tthis.primitiveCache = {};\n\n\t\t// Object3D instance caches\n\t\tthis.meshCache = { refs: {}, uses: {} };\n\t\tthis.cameraCache = { refs: {}, uses: {} };\n\t\tthis.lightCache = { refs: {}, uses: {} };\n\n\t\t// Track node names, to ensure no duplicates\n\t\tthis.nodeNamesUsed = {};\n\n\t\t// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the\n\t\t// expensive work of uploading a texture to the GPU off the main thread.\n\t\tif ( typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false ) {\n\n\t\t\tthis.textureLoader = new THREE.ImageBitmapLoader( this.options.manager );\n\n\t\t} else {\n\n\t\t\tthis.textureLoader = new THREE.TextureLoader( this.options.manager );\n\n\t\t}\n\n\t\tthis.textureLoader.setCrossOrigin( this.options.crossOrigin );\n\n\t\tthis.fileLoader = new THREE.FileLoader( this.options.manager );\n\t\tthis.fileLoader.setResponseType( 'arraybuffer' );\n\n\t\tif ( this.options.crossOrigin === 'use-credentials' ) {\n\n\t\t\tthis.fileLoader.setWithCredentials( true );\n\n\t\t}\n\n\t}\n\n\tGLTFParser.prototype.setExtensions = function ( extensions ) {\n\n\t\tthis.extensions = extensions;\n\n\t};\n\n\tGLTFParser.prototype.setPlugins = function ( plugins ) {\n\n\t\tthis.plugins = plugins;\n\n\t};\n\n\tGLTFParser.prototype.parse = function ( onLoad, onError ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar extensions = this.extensions;\n\n\t\t// Clear the loader cache\n\t\tthis.cache.removeAll();\n\n\t\t// Mark the special nodes/meshes in json for efficient parse\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\treturn ext._markDefs && ext._markDefs();\n\n\t\t} );\n\n\t\tPromise.all( [\n\n\t\t\tthis.getDependencies( 'scene' ),\n\t\t\tthis.getDependencies( 'animation' ),\n\t\t\tthis.getDependencies( 'camera' ),\n\n\t\t] ).then( function ( dependencies ) {\n\n\t\t\tvar result = {\n\t\t\t\tscene: dependencies[ 0 ][ json.scene || 0 ],\n\t\t\t\tscenes: dependencies[ 0 ],\n\t\t\t\tanimations: dependencies[ 1 ],\n\t\t\t\tcameras: dependencies[ 2 ],\n\t\t\t\tasset: json.asset,\n\t\t\t\tparser: parser,\n\t\t\t\tuserData: {}\n\t\t\t};\n\n\t\t\taddUnknownExtensionsToUserData( extensions, result, json );\n\n\t\t\tassignExtrasToUserData( result, json );\n\n\t\t\tonLoad( result );\n\n\t\t} ).catch( onError );\n\n\t};\n\n\t/**\n\t * Marks the special nodes/meshes in json for efficient parse.\n\t */\n\tGLTFParser.prototype._markDefs = function () {\n\n\t\tvar nodeDefs = this.json.nodes || [];\n\t\tvar skinDefs = this.json.skins || [];\n\t\tvar meshDefs = this.json.meshes || [];\n\n\t\t// Nothing in the node definition indicates whether it is a Bone or an\n\t\t// Object3D. Use the skins' joint references to mark bones.\n\t\tfor ( var skinIndex = 0, skinLength = skinDefs.length; skinIndex < skinLength; skinIndex ++ ) {\n\n\t\t\tvar joints = skinDefs[ skinIndex ].joints;\n\n\t\t\tfor ( var i = 0, il = joints.length; i < il; i ++ ) {\n\n\t\t\t\tnodeDefs[ joints[ i ] ].isBone = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Iterate over all nodes, marking references to shared resources,\n\t\t// as well as skeleton joints.\n\t\tfor ( var nodeIndex = 0, nodeLength = nodeDefs.length; nodeIndex < nodeLength; nodeIndex ++ ) {\n\n\t\t\tvar nodeDef = nodeDefs[ nodeIndex ];\n\n\t\t\tif ( nodeDef.mesh !== undefined ) {\n\n\t\t\t\tthis._addNodeRef( this.meshCache, nodeDef.mesh );\n\n\t\t\t\t// Nothing in the mesh definition indicates whether it is\n\t\t\t\t// a SkinnedMesh or Mesh. Use the node's mesh reference\n\t\t\t\t// to mark SkinnedMesh if node has skin.\n\t\t\t\tif ( nodeDef.skin !== undefined ) {\n\n\t\t\t\t\tmeshDefs[ nodeDef.mesh ].isSkinnedMesh = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( nodeDef.camera !== undefined ) {\n\n\t\t\t\tthis._addNodeRef( this.cameraCache, nodeDef.camera );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t/**\n\t * Counts references to shared node / Object3D resources. These resources\n\t * can be reused, or \"instantiated\", at multiple nodes in the scene\n\t * hierarchy. Mesh, Camera, and Light instances are instantiated and must\n\t * be marked. Non-scenegraph resources (like Materials, Geometries, and\n\t * Textures) can be reused directly and are not marked here.\n\t *\n\t * Example: CesiumMilkTruck sample model reuses \"Wheel\" meshes.\n\t */\n\tGLTFParser.prototype._addNodeRef = function ( cache, index ) {\n\n\t\tif ( index === undefined ) return;\n\n\t\tif ( cache.refs[ index ] === undefined ) {\n\n\t\t\tcache.refs[ index ] = cache.uses[ index ] = 0;\n\n\t\t}\n\n\t\tcache.refs[ index ] ++;\n\n\t};\n\n\t/** Returns a reference to a shared resource, cloning it if necessary. */\n\tGLTFParser.prototype._getNodeRef = function ( cache, index, object ) {\n\n\t\tif ( cache.refs[ index ] <= 1 ) return object;\n\n\t\tvar ref = object.clone();\n\n\t\tref.name += '_instance_' + ( cache.uses[ index ] ++ );\n\n\t\treturn ref;\n\n\t};\n\n\tGLTFParser.prototype._invokeOne = function ( func ) {\n\n\t\tvar extensions = Object.values( this.plugins );\n\t\textensions.push( this );\n\n\t\tfor ( var i = 0; i < extensions.length; i ++ ) {\n\n\t\t\tvar result = func( extensions[ i ] );\n\n\t\t\tif ( result ) return result;\n\n\t\t}\n\n\t};\n\n\tGLTFParser.prototype._invokeAll = function ( func ) {\n\n\t\tvar extensions = Object.values( this.plugins );\n\t\textensions.unshift( this );\n\n\t\tvar pending = [];\n\n\t\tfor ( var i = 0; i < extensions.length; i ++ ) {\n\n\t\t\tvar result = func( extensions[ i ] );\n\n\t\t\tif ( result ) pending.push( result );\n\n\t\t}\n\n\t\treturn pending;\n\n\t};\n\n\t/**\n\t * Requests the specified dependency asynchronously, with caching.\n\t * @param {string} type\n\t * @param {number} index\n\t * @return {Promise<THREE.Object3D|THREE.Material|THREE.Texture|THREE.AnimationClip|ArrayBuffer|Object>}\n\t */\n\tGLTFParser.prototype.getDependency = function ( type, index ) {\n\n\t\tvar cacheKey = type + ':' + index;\n\t\tvar dependency = this.cache.get( cacheKey );\n\n\t\tif ( ! dependency ) {\n\n\t\t\tswitch ( type ) {\n\n\t\t\t\tcase 'scene':\n\t\t\t\t\tdependency = this.loadScene( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'node':\n\t\t\t\t\tdependency = this.loadNode( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'mesh':\n\t\t\t\t\tdependency = this._invokeOne( function ( ext ) {\n\n\t\t\t\t\t\treturn ext.loadMesh && ext.loadMesh( index );\n\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'accessor':\n\t\t\t\t\tdependency = this.loadAccessor( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'bufferView':\n\t\t\t\t\tdependency = this._invokeOne( function ( ext ) {\n\n\t\t\t\t\t\treturn ext.loadBufferView && ext.loadBufferView( index );\n\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'buffer':\n\t\t\t\t\tdependency = this.loadBuffer( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'material':\n\t\t\t\t\tdependency = this._invokeOne( function ( ext ) {\n\n\t\t\t\t\t\treturn ext.loadMaterial && ext.loadMaterial( index );\n\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'texture':\n\t\t\t\t\tdependency = this._invokeOne( function ( ext ) {\n\n\t\t\t\t\t\treturn ext.loadTexture && ext.loadTexture( index );\n\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'skin':\n\t\t\t\t\tdependency = this.loadSkin( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'animation':\n\t\t\t\t\tdependency = this.loadAnimation( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'camera':\n\t\t\t\t\tdependency = this.loadCamera( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'Unknown type: ' + type );\n\n\t\t\t}\n\n\t\t\tthis.cache.add( cacheKey, dependency );\n\n\t\t}\n\n\t\treturn dependency;\n\n\t};\n\n\t/**\n\t * Requests all dependencies of the specified type asynchronously, with caching.\n\t * @param {string} type\n\t * @return {Promise<Array<Object>>}\n\t */\n\tGLTFParser.prototype.getDependencies = function ( type ) {\n\n\t\tvar dependencies = this.cache.get( type );\n\n\t\tif ( ! dependencies ) {\n\n\t\t\tvar parser = this;\n\t\t\tvar defs = this.json[ type + ( type === 'mesh' ? 'es' : 's' ) ] || [];\n\n\t\t\tdependencies = Promise.all( defs.map( function ( def, index ) {\n\n\t\t\t\treturn parser.getDependency( type, index );\n\n\t\t\t} ) );\n\n\t\t\tthis.cache.add( type, dependencies );\n\n\t\t}\n\n\t\treturn dependencies;\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views\n\t * @param {number} bufferIndex\n\t * @return {Promise<ArrayBuffer>}\n\t */\n\tGLTFParser.prototype.loadBuffer = function ( bufferIndex ) {\n\n\t\tvar bufferDef = this.json.buffers[ bufferIndex ];\n\t\tvar loader = this.fileLoader;\n\n\t\tif ( bufferDef.type && bufferDef.type !== 'arraybuffer' ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: ' + bufferDef.type + ' buffer type is not supported.' );\n\n\t\t}\n\n\t\t// If present, GLB container is required to be the first buffer.\n\t\tif ( bufferDef.uri === undefined && bufferIndex === 0 ) {\n\n\t\t\treturn Promise.resolve( this.extensions[ EXTENSIONS.KHR_BINARY_GLTF ].body );\n\n\t\t}\n\n\t\tvar options = this.options;\n\n\t\treturn new Promise( function ( resolve, reject ) {\n\n\t\t\tloader.load( resolveURL( bufferDef.uri, options.path ), resolve, undefined, function () {\n\n\t\t\t\treject( new Error( 'THREE.GLTFLoader: Failed to load buffer \"' + bufferDef.uri + '\".' ) );\n\n\t\t\t} );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views\n\t * @param {number} bufferViewIndex\n\t * @return {Promise<ArrayBuffer>}\n\t */\n\tGLTFParser.prototype.loadBufferView = function ( bufferViewIndex ) {\n\n\t\tvar bufferViewDef = this.json.bufferViews[ bufferViewIndex ];\n\n\t\treturn this.getDependency( 'buffer', bufferViewDef.buffer ).then( function ( buffer ) {\n\n\t\t\tvar byteLength = bufferViewDef.byteLength || 0;\n\t\t\tvar byteOffset = bufferViewDef.byteOffset || 0;\n\t\t\treturn buffer.slice( byteOffset, byteOffset + byteLength );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors\n\t * @param {number} accessorIndex\n\t * @return {Promise<THREE.BufferAttribute|THREE.InterleavedBufferAttribute>}\n\t */\n\tGLTFParser.prototype.loadAccessor = function ( accessorIndex ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\n\t\tvar accessorDef = this.json.accessors[ accessorIndex ];\n\n\t\tif ( accessorDef.bufferView === undefined && accessorDef.sparse === undefined ) {\n\n\t\t\t// Ignore empty accessors, which may be used to declare runtime\n\t\t\t// information about attributes coming from another source (e.g. Draco\n\t\t\t// compression extension).\n\t\t\treturn Promise.resolve( null );\n\n\t\t}\n\n\t\tvar pendingBufferViews = [];\n\n\t\tif ( accessorDef.bufferView !== undefined ) {\n\n\t\t\tpendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.bufferView ) );\n\n\t\t} else {\n\n\t\t\tpendingBufferViews.push( null );\n\n\t\t}\n\n\t\tif ( accessorDef.sparse !== undefined ) {\n\n\t\t\tpendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.sparse.indices.bufferView ) );\n\t\t\tpendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.sparse.values.bufferView ) );\n\n\t\t}\n\n\t\treturn Promise.all( pendingBufferViews ).then( function ( bufferViews ) {\n\n\t\t\tvar bufferView = bufferViews[ 0 ];\n\n\t\t\tvar itemSize = WEBGL_TYPE_SIZES[ accessorDef.type ];\n\t\t\tvar TypedArray = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ];\n\n\t\t\t// For VEC3: itemSize is 3, elementBytes is 4, itemBytes is 12.\n\t\t\tvar elementBytes = TypedArray.BYTES_PER_ELEMENT;\n\t\t\tvar itemBytes = elementBytes * itemSize;\n\t\t\tvar byteOffset = accessorDef.byteOffset || 0;\n\t\t\tvar byteStride = accessorDef.bufferView !== undefined ? json.bufferViews[ accessorDef.bufferView ].byteStride : undefined;\n\t\t\tvar normalized = accessorDef.normalized === true;\n\t\t\tvar array, bufferAttribute;\n\n\t\t\t// The buffer is not interleaved if the stride is the item size in bytes.\n\t\t\tif ( byteStride && byteStride !== itemBytes ) {\n\n\t\t\t\t// Each \"slice\" of the buffer, as defined by 'count' elements of 'byteStride' bytes, gets its own InterleavedBuffer\n\t\t\t\t// This makes sure that IBA.count reflects accessor.count properly\n\t\t\t\tvar ibSlice = Math.floor( byteOffset / byteStride );\n\t\t\t\tvar ibCacheKey = 'InterleavedBuffer:' + accessorDef.bufferView + ':' + accessorDef.componentType + ':' + ibSlice + ':' + accessorDef.count;\n\t\t\t\tvar ib = parser.cache.get( ibCacheKey );\n\n\t\t\t\tif ( ! ib ) {\n\n\t\t\t\t\tarray = new TypedArray( bufferView, ibSlice * byteStride, accessorDef.count * byteStride / elementBytes );\n\n\t\t\t\t\t// Integer parameters to IB/IBA are in array elements, not bytes.\n\t\t\t\t\tib = new THREE.InterleavedBuffer( array, byteStride / elementBytes );\n\n\t\t\t\t\tparser.cache.add( ibCacheKey, ib );\n\n\t\t\t\t}\n\n\t\t\t\tbufferAttribute = new THREE.InterleavedBufferAttribute( ib, itemSize, ( byteOffset % byteStride ) / elementBytes, normalized );\n\n\t\t\t} else {\n\n\t\t\t\tif ( bufferView === null ) {\n\n\t\t\t\t\tarray = new TypedArray( accessorDef.count * itemSize );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tarray = new TypedArray( bufferView, byteOffset, accessorDef.count * itemSize );\n\n\t\t\t\t}\n\n\t\t\t\tbufferAttribute = new THREE.BufferAttribute( array, itemSize, normalized );\n\n\t\t\t}\n\n\t\t\t// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#sparse-accessors\n\t\t\tif ( accessorDef.sparse !== undefined ) {\n\n\t\t\t\tvar itemSizeIndices = WEBGL_TYPE_SIZES.SCALAR;\n\t\t\t\tvar TypedArrayIndices = WEBGL_COMPONENT_TYPES[ accessorDef.sparse.indices.componentType ];\n\n\t\t\t\tvar byteOffsetIndices = accessorDef.sparse.indices.byteOffset || 0;\n\t\t\t\tvar byteOffsetValues = accessorDef.sparse.values.byteOffset || 0;\n\n\t\t\t\tvar sparseIndices = new TypedArrayIndices( bufferViews[ 1 ], byteOffsetIndices, accessorDef.sparse.count * itemSizeIndices );\n\t\t\t\tvar sparseValues = new TypedArray( bufferViews[ 2 ], byteOffsetValues, accessorDef.sparse.count * itemSize );\n\n\t\t\t\tif ( bufferView !== null ) {\n\n\t\t\t\t\t// Avoid modifying the original ArrayBuffer, if the bufferView wasn't initialized with zeroes.\n\t\t\t\t\tbufferAttribute = new THREE.BufferAttribute( bufferAttribute.array.slice(), bufferAttribute.itemSize, bufferAttribute.normalized );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( var i = 0, il = sparseIndices.length; i < il; i ++ ) {\n\n\t\t\t\t\tvar index = sparseIndices[ i ];\n\n\t\t\t\t\tbufferAttribute.setX( index, sparseValues[ i * itemSize ] );\n\t\t\t\t\tif ( itemSize >= 2 ) bufferAttribute.setY( index, sparseValues[ i * itemSize + 1 ] );\n\t\t\t\t\tif ( itemSize >= 3 ) bufferAttribute.setZ( index, sparseValues[ i * itemSize + 2 ] );\n\t\t\t\t\tif ( itemSize >= 4 ) bufferAttribute.setW( index, sparseValues[ i * itemSize + 3 ] );\n\t\t\t\t\tif ( itemSize >= 5 ) throw new Error( 'THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn bufferAttribute;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures\n\t * @param {number} textureIndex\n\t * @return {Promise<THREE.Texture>}\n\t */\n\tGLTFParser.prototype.loadTexture = function ( textureIndex ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar options = this.options;\n\n\t\tvar textureDef = json.textures[ textureIndex ];\n\n\t\tvar textureExtensions = textureDef.extensions || {};\n\n\t\tvar source;\n\n\t\tif ( textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ] ) {\n\n\t\t\tsource = json.images[ textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].source ];\n\n\t\t} else {\n\n\t\t\tsource = json.images[ textureDef.source ];\n\n\t\t}\n\n\t\tvar loader;\n\n\t\tif ( source.uri ) {\n\n\t\t\tloader = options.manager.getHandler( source.uri );\n\n\t\t}\n\n\t\tif ( ! loader ) {\n\n\t\t\tloader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]\n\t\t\t\t? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader\n\t\t\t\t: this.textureLoader;\n\n\t\t}\n\n\t\treturn this.loadTextureImage( textureIndex, source, loader );\n\n\t};\n\n\tGLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar options = this.options;\n\n\t\tvar textureDef = json.textures[ textureIndex ];\n\n\t\tvar URL = self.URL || self.webkitURL;\n\n\t\tvar sourceURI = source.uri;\n\t\tvar isObjectURL = false;\n\t\tvar hasAlpha = true;\n\n\t\tif ( source.mimeType === 'image/jpeg' ) hasAlpha = false;\n\n\t\tif ( source.bufferView !== undefined ) {\n\n\t\t\t// Load binary image data from bufferView, if provided.\n\n\t\t\tsourceURI = parser.getDependency( 'bufferView', source.bufferView ).then( function ( bufferView ) {\n\n\t\t\t\tif ( source.mimeType === 'image/png' ) {\n\n\t\t\t\t\t// Inspect the PNG 'IHDR' chunk to determine whether the image could have an\n\t\t\t\t\t// alpha channel. This check is conservative — the image could have an alpha\n\t\t\t\t\t// channel with all values == 1, and the indexed type (colorType == 3) only\n\t\t\t\t\t// sometimes contains alpha.\n\t\t\t\t\t//\n\t\t\t\t\t// https://en.wikipedia.org/wiki/Portable_Network_Graphics#File_header\n\t\t\t\t\tvar colorType = new DataView( bufferView, 25, 1 ).getUint8( 0, false );\n\t\t\t\t\thasAlpha = colorType === 6 || colorType === 4 || colorType === 3;\n\n\t\t\t\t}\n\n\t\t\t\tisObjectURL = true;\n\t\t\t\tvar blob = new Blob( [ bufferView ], { type: source.mimeType } );\n\t\t\t\tsourceURI = URL.createObjectURL( blob );\n\t\t\t\treturn sourceURI;\n\n\t\t\t} );\n\n\t\t}\n\n\t\treturn Promise.resolve( sourceURI ).then( function ( sourceURI ) {\n\n\t\t\treturn new Promise( function ( resolve, reject ) {\n\n\t\t\t\tvar onLoad = resolve;\n\n\t\t\t\tif ( loader.isImageBitmapLoader === true ) {\n\n\t\t\t\t\tonLoad = function ( imageBitmap ) {\n\n\t\t\t\t\t\tresolve( new THREE.CanvasTexture( imageBitmap ) );\n\n\t\t\t\t\t};\n\n\t\t\t\t}\n\n\t\t\t\tloader.load( resolveURL( sourceURI, options.path ), onLoad, undefined, reject );\n\n\t\t\t} );\n\n\t\t} ).then( function ( texture ) {\n\n\t\t\t// Clean up resources and configure Texture.\n\n\t\t\tif ( isObjectURL === true ) {\n\n\t\t\t\tURL.revokeObjectURL( sourceURI );\n\n\t\t\t}\n\n\t\t\ttexture.flipY = false;\n\n\t\t\tif ( textureDef.name ) texture.name = textureDef.name;\n\n\t\t\t// When there is definitely no alpha channel in the texture, set RGBFormat to save space.\n\t\t\tif ( ! hasAlpha ) texture.format = THREE.RGBFormat;\n\n\t\t\tvar samplers = json.samplers || {};\n\t\t\tvar sampler = samplers[ textureDef.sampler ] || {};\n\n\t\t\ttexture.magFilter = WEBGL_FILTERS[ sampler.magFilter ] || THREE.LinearFilter;\n\t\t\ttexture.minFilter = WEBGL_FILTERS[ sampler.minFilter ] || THREE.LinearMipmapLinearFilter;\n\t\t\ttexture.wrapS = WEBGL_WRAPPINGS[ sampler.wrapS ] || THREE.RepeatWrapping;\n\t\t\ttexture.wrapT = WEBGL_WRAPPINGS[ sampler.wrapT ] || THREE.RepeatWrapping;\n\n\t\t\tparser.associations.set( texture, {\n\t\t\t\ttype: 'textures',\n\t\t\t\tindex: textureIndex\n\t\t\t} );\n\n\t\t\treturn texture;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Asynchronously assigns a texture to the given material parameters.\n\t * @param {Object} materialParams\n\t * @param {string} mapName\n\t * @param {Object} mapDef\n\t * @return {Promise}\n\t */\n\tGLTFParser.prototype.assignTexture = function ( materialParams, mapName, mapDef ) {\n\n\t\tvar parser = this;\n\n\t\treturn this.getDependency( 'texture', mapDef.index ).then( function ( texture ) {\n\n\t\t\t// Materials sample aoMap from UV set 1 and other maps from UV set 0 - this can't be configured\n\t\t\t// However, we will copy UV set 0 to UV set 1 on demand for aoMap\n\t\t\tif ( mapDef.texCoord !== undefined && mapDef.texCoord != 0 && ! ( mapName === 'aoMap' && mapDef.texCoord == 1 ) ) {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Custom UV set ' + mapDef.texCoord + ' for texture ' + mapName + ' not yet supported.' );\n\n\t\t\t}\n\n\t\t\tif ( parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] ) {\n\n\t\t\t\tvar transform = mapDef.extensions !== undefined ? mapDef.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] : undefined;\n\n\t\t\t\tif ( transform ) {\n\n\t\t\t\t\tvar gltfReference = parser.associations.get( texture );\n\t\t\t\t\ttexture = parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ].extendTexture( texture, transform );\n\t\t\t\t\tparser.associations.set( texture, gltfReference );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tmaterialParams[ mapName ] = texture;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Assigns final material to a Mesh, Line, or Points instance. The instance\n\t * already has a material (generated from the glTF material options alone)\n\t * but reuse of the same glTF material may require multiple threejs materials\n\t * to accomodate different primitive types, defines, etc. New materials will\n\t * be created if necessary, and reused from a cache.\n\t * @param {THREE.Object3D} mesh Mesh, Line, or Points instance.\n\t */\n\tGLTFParser.prototype.assignFinalMaterial = function ( mesh ) {\n\n\t\tvar geometry = mesh.geometry;\n\t\tvar material = mesh.material;\n\n\t\tvar useVertexTangents = geometry.attributes.tangent !== undefined;\n\t\tvar useVertexColors = geometry.attributes.color !== undefined;\n\t\tvar useFlatShading = geometry.attributes.normal === undefined;\n\t\tvar useSkinning = mesh.isSkinnedMesh === true;\n\t\tvar useMorphTargets = Object.keys( geometry.morphAttributes ).length > 0;\n\t\tvar useMorphNormals = useMorphTargets && geometry.morphAttributes.normal !== undefined;\n\n\t\tif ( mesh.isPoints ) {\n\n\t\t\tvar cacheKey = 'PointsMaterial:' + material.uuid;\n\n\t\t\tvar pointsMaterial = this.cache.get( cacheKey );\n\n\t\t\tif ( ! pointsMaterial ) {\n\n\t\t\t\tpointsMaterial = new THREE.PointsMaterial();\n\t\t\t\tTHREE.Material.prototype.copy.call( pointsMaterial, material );\n\t\t\t\tpointsMaterial.color.copy( material.color );\n\t\t\t\tpointsMaterial.map = material.map;\n\t\t\t\tpointsMaterial.sizeAttenuation = false; // glTF spec says points should be 1px\n\n\t\t\t\tthis.cache.add( cacheKey, pointsMaterial );\n\n\t\t\t}\n\n\t\t\tmaterial = pointsMaterial;\n\n\t\t} else if ( mesh.isLine ) {\n\n\t\t\tvar cacheKey = 'LineBasicMaterial:' + material.uuid;\n\n\t\t\tvar lineMaterial = this.cache.get( cacheKey );\n\n\t\t\tif ( ! lineMaterial ) {\n\n\t\t\t\tlineMaterial = new THREE.LineBasicMaterial();\n\t\t\t\tTHREE.Material.prototype.copy.call( lineMaterial, material );\n\t\t\t\tlineMaterial.color.copy( material.color );\n\n\t\t\t\tthis.cache.add( cacheKey, lineMaterial );\n\n\t\t\t}\n\n\t\t\tmaterial = lineMaterial;\n\n\t\t}\n\n\t\t// Clone the material if it will be modified\n\t\tif ( useVertexTangents || useVertexColors || useFlatShading || useSkinning || useMorphTargets ) {\n\n\t\t\tvar cacheKey = 'ClonedMaterial:' + material.uuid + ':';\n\n\t\t\tif ( material.isGLTFSpecularGlossinessMaterial ) cacheKey += 'specular-glossiness:';\n\t\t\tif ( useSkinning ) cacheKey += 'skinning:';\n\t\t\tif ( useVertexTangents ) cacheKey += 'vertex-tangents:';\n\t\t\tif ( useVertexColors ) cacheKey += 'vertex-colors:';\n\t\t\tif ( useFlatShading ) cacheKey += 'flat-shading:';\n\t\t\tif ( useMorphTargets ) cacheKey += 'morph-targets:';\n\t\t\tif ( useMorphNormals ) cacheKey += 'morph-normals:';\n\n\t\t\tvar cachedMaterial = this.cache.get( cacheKey );\n\n\t\t\tif ( ! cachedMaterial ) {\n\n\t\t\t\tcachedMaterial = material.clone();\n\n\t\t\t\tif ( useSkinning ) cachedMaterial.skinning = true;\n\t\t\t\tif ( useVertexColors ) cachedMaterial.vertexColors = true;\n\t\t\t\tif ( useFlatShading ) cachedMaterial.flatShading = true;\n\t\t\t\tif ( useMorphTargets ) cachedMaterial.morphTargets = true;\n\t\t\t\tif ( useMorphNormals ) cachedMaterial.morphNormals = true;\n\t\t\t\t\n\t\t\t\tif ( useVertexTangents ) {\n\n\t\t\t\t\tcachedMaterial.vertexTangents = true;\n\n\t\t\t\t\t// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995\n\t\t\t\t\tif ( material.normalScale ) material.normalScale.y *= -1;\n\t\t\t\t\tif ( material.clearcoatNormalScale ) material.clearcoatNormalScale.y *= -1;\n\n\t\t\t\t}\n\n\t\t\t\tthis.cache.add( cacheKey, cachedMaterial );\n\n\t\t\t\tthis.associations.set( cachedMaterial, this.associations.get( material ) );\n\n\t\t\t}\n\n\t\t\tmaterial = cachedMaterial;\n\n\t\t}\n\n\t\t// workarounds for mesh and geometry\n\n\t\tif ( material.aoMap && geometry.attributes.uv2 === undefined && geometry.attributes.uv !== undefined ) {\n\n\t\t\tgeometry.setAttribute( 'uv2', geometry.attributes.uv );\n\n\t\t}\n\n\t\tmesh.material = material;\n\n\t};\n\n\tGLTFParser.prototype.getMaterialType = function ( /* materialIndex */ ) {\n\n\t\treturn THREE.MeshStandardMaterial;\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials\n\t * @param {number} materialIndex\n\t * @return {Promise<THREE.Material>}\n\t */\n\tGLTFParser.prototype.loadMaterial = function ( materialIndex ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar extensions = this.extensions;\n\t\tvar materialDef = json.materials[ materialIndex ];\n\n\t\tvar materialType;\n\t\tvar materialParams = {};\n\t\tvar materialExtensions = materialDef.extensions || {};\n\n\t\tvar pending = [];\n\n\t\tif ( materialExtensions[ EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS ] ) {\n\n\t\t\tvar sgExtension = extensions[ EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS ];\n\t\t\tmaterialType = sgExtension.getMaterialType();\n\t\t\tpending.push( sgExtension.extendParams( materialParams, materialDef, parser ) );\n\n\t\t} else if ( materialExtensions[ EXTENSIONS.KHR_MATERIALS_UNLIT ] ) {\n\n\t\t\tvar kmuExtension = extensions[ EXTENSIONS.KHR_MATERIALS_UNLIT ];\n\t\t\tmaterialType = kmuExtension.getMaterialType();\n\t\t\tpending.push( kmuExtension.extendParams( materialParams, materialDef, parser ) );\n\n\t\t} else {\n\n\t\t\t// Specification:\n\t\t\t// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#metallic-roughness-material\n\n\t\t\tvar metallicRoughness = materialDef.pbrMetallicRoughness || {};\n\n\t\t\tmaterialParams.color = new THREE.Color( 1.0, 1.0, 1.0 );\n\t\t\tmaterialParams.opacity = 1.0;\n\n\t\t\tif ( Array.isArray( metallicRoughness.baseColorFactor ) ) {\n\n\t\t\t\tvar array = metallicRoughness.baseColorFactor;\n\n\t\t\t\tmaterialParams.color.fromArray( array );\n\t\t\t\tmaterialParams.opacity = array[ 3 ];\n\n\t\t\t}\n\n\t\t\tif ( metallicRoughness.baseColorTexture !== undefined ) {\n\n\t\t\t\tpending.push( parser.assignTexture( materialParams, 'map', metallicRoughness.baseColorTexture ) );\n\n\t\t\t}\n\n\t\t\tmaterialParams.metalness = metallicRoughness.metallicFactor !== undefined ? metallicRoughness.metallicFactor : 1.0;\n\t\t\tmaterialParams.roughness = metallicRoughness.roughnessFactor !== undefined ? metallicRoughness.roughnessFactor : 1.0;\n\n\t\t\tif ( metallicRoughness.metallicRoughnessTexture !== undefined ) {\n\n\t\t\t\tpending.push( parser.assignTexture( materialParams, 'metalnessMap', metallicRoughness.metallicRoughnessTexture ) );\n\t\t\t\tpending.push( parser.assignTexture( materialParams, 'roughnessMap', metallicRoughness.metallicRoughnessTexture ) );\n\n\t\t\t}\n\n\t\t\tmaterialType = this._invokeOne( function ( ext ) {\n\n\t\t\t\treturn ext.getMaterialType && ext.getMaterialType( materialIndex );\n\n\t\t\t} );\n\n\t\t\tpending.push( Promise.all( this._invokeAll( function ( ext ) {\n\n\t\t\t\treturn ext.extendMaterialParams && ext.extendMaterialParams( materialIndex, materialParams );\n\n\t\t\t} ) ) );\n\n\t\t}\n\n\t\tif ( materialDef.doubleSided === true ) {\n\n\t\t\tmaterialParams.side = THREE.DoubleSide;\n\n\t\t}\n\n\t\tvar alphaMode = materialDef.alphaMode || ALPHA_MODES.OPAQUE;\n\n\t\tif ( alphaMode === ALPHA_MODES.BLEND ) {\n\n\t\t\tmaterialParams.transparent = true;\n\n\t\t\t// See: https://github.com/mrdoob/three.js/issues/17706\n\t\t\tmaterialParams.depthWrite = false;\n\n\t\t} else {\n\n\t\t\tmaterialParams.transparent = false;\n\n\t\t\tif ( alphaMode === ALPHA_MODES.MASK ) {\n\n\t\t\t\tmaterialParams.alphaTest = materialDef.alphaCutoff !== undefined ? materialDef.alphaCutoff : 0.5;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( materialDef.normalTexture !== undefined && materialType !== THREE.MeshBasicMaterial ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'normalMap', materialDef.normalTexture ) );\n\n\t\t\t// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995\n\t\t\tmaterialParams.normalScale = new THREE.Vector2( 1, -1 );\n\n\t\t\tif ( materialDef.normalTexture.scale !== undefined ) {\n\n\t\t\t\tmaterialParams.normalScale.set( materialDef.normalTexture.scale, -materialDef.normalTexture.scale );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( materialDef.occlusionTexture !== undefined && materialType !== THREE.MeshBasicMaterial ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'aoMap', materialDef.occlusionTexture ) );\n\n\t\t\tif ( materialDef.occlusionTexture.strength !== undefined ) {\n\n\t\t\t\tmaterialParams.aoMapIntensity = materialDef.occlusionTexture.strength;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( materialDef.emissiveFactor !== undefined && materialType !== THREE.MeshBasicMaterial ) {\n\n\t\t\tmaterialParams.emissive = new THREE.Color().fromArray( materialDef.emissiveFactor );\n\n\t\t}\n\n\t\tif ( materialDef.emissiveTexture !== undefined && materialType !== THREE.MeshBasicMaterial ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'emissiveMap', materialDef.emissiveTexture ) );\n\n\t\t}\n\n\t\treturn Promise.all( pending ).then( function () {\n\n\t\t\tvar material;\n\n\t\t\tif ( materialType === GLTFMeshStandardSGMaterial ) {\n\n\t\t\t\tmaterial = extensions[ EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS ].createMaterial( materialParams );\n\n\t\t\t} else {\n\n\t\t\t\tmaterial = new materialType( materialParams );\n\n\t\t\t}\n\n\t\t\tif ( materialDef.name ) material.name = materialDef.name;\n\n\t\t\t// baseColorTexture, emissiveTexture, and specularGlossinessTexture use sRGB encoding.\n\t\t\tif ( material.map ) material.map.encoding = THREE.sRGBEncoding;\n\t\t\tif ( material.emissiveMap ) material.emissiveMap.encoding = THREE.sRGBEncoding;\n\n\t\t\tassignExtrasToUserData( material, materialDef );\n\n\t\t\tparser.associations.set( material, { type: 'materials', index: materialIndex } );\n\n\t\t\tif ( materialDef.extensions ) addUnknownExtensionsToUserData( extensions, material, materialDef );\n\n\t\t\treturn material;\n\n\t\t} );\n\n\t};\n\n\t/** When Object3D instances are targeted by animation, they need unique names. */\n\tGLTFParser.prototype.createUniqueName = function ( originalName ) {\n\n\t\tvar sanitizedName = THREE.PropertyBinding.sanitizeNodeName( originalName || '' );\n\n\t\tvar name = sanitizedName;\n\n\t\tfor ( var i = 1; this.nodeNamesUsed[ name ]; ++ i ) {\n\n\t\t\tname = sanitizedName + '_' + i;\n\n\t\t}\n\n\t\tthis.nodeNamesUsed[ name ] = true;\n\n\t\treturn name;\n\n\t};\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {GLTF.Primitive} primitiveDef\n\t * @param {GLTFParser} parser\n\t */\n\tfunction computeBounds( geometry, primitiveDef, parser ) {\n\n\t\tvar attributes = primitiveDef.attributes;\n\n\t\tvar box = new THREE.Box3();\n\n\t\tif ( attributes.POSITION !== undefined ) {\n\n\t\t\tvar accessor = parser.json.accessors[ attributes.POSITION ];\n\n\t\t\tvar min = accessor.min;\n\t\t\tvar max = accessor.max;\n\n\t\t\t// glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.\n\n\t\t\tif ( min !== undefined && max !== undefined ) {\n\n\t\t\t\tbox.set(\n\t\t\t\t\tnew THREE.Vector3( min[ 0 ], min[ 1 ], min[ 2 ] ),\n\t\t\t\t\tnew THREE.Vector3( max[ 0 ], max[ 1 ], max[ 2 ] ) );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Missing min/max properties for accessor POSITION.' );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tvar targets = primitiveDef.targets;\n\n\t\tif ( targets !== undefined ) {\n\n\t\t\tvar maxDisplacement = new THREE.Vector3();\n\t\t\tvar vector = new THREE.Vector3();\n\n\t\t\tfor ( var i = 0, il = targets.length; i < il; i ++ ) {\n\n\t\t\t\tvar target = targets[ i ];\n\n\t\t\t\tif ( target.POSITION !== undefined ) {\n\n\t\t\t\t\tvar accessor = parser.json.accessors[ target.POSITION ];\n\t\t\t\t\tvar min = accessor.min;\n\t\t\t\t\tvar max = accessor.max;\n\n\t\t\t\t\t// glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.\n\n\t\t\t\t\tif ( min !== undefined && max !== undefined ) {\n\n\t\t\t\t\t\t// we need to get max of absolute components because target weight is [-1,1]\n\t\t\t\t\t\tvector.setX( Math.max( Math.abs( min[ 0 ] ), Math.abs( max[ 0 ] ) ) );\n\t\t\t\t\t\tvector.setY( Math.max( Math.abs( min[ 1 ] ), Math.abs( max[ 1 ] ) ) );\n\t\t\t\t\t\tvector.setZ( Math.max( Math.abs( min[ 2 ] ), Math.abs( max[ 2 ] ) ) );\n\n\t\t\t\t\t\t// Note: this assumes that the sum of all weights is at most 1. This isn't quite correct - it's more conservative\n\t\t\t\t\t\t// to assume that each target can have a max weight of 1. However, for some use cases - notably, when morph targets\n\t\t\t\t\t\t// are used to implement key-frame animations and as such only two are active at a time - this results in very large\n\t\t\t\t\t\t// boxes. So for now we make a box that's sometimes a touch too small but is hopefully mostly of reasonable size.\n\t\t\t\t\t\tmaxDisplacement.max( vector );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Missing min/max properties for accessor POSITION.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// As per comment above this box isn't conservative, but has a reasonable size for a very large number of morph targets.\n\t\t\tbox.expandByVector( maxDisplacement );\n\n\t\t}\n\n\t\tgeometry.boundingBox = box;\n\n\t\tvar sphere = new THREE.Sphere();\n\n\t\tbox.getCenter( sphere.center );\n\t\tsphere.radius = box.min.distanceTo( box.max ) / 2;\n\n\t\tgeometry.boundingSphere = sphere;\n\n\t}\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {GLTF.Primitive} primitiveDef\n\t * @param {GLTFParser} parser\n\t * @return {Promise<THREE.BufferGeometry>}\n\t */\n\tfunction addPrimitiveAttributes( geometry, primitiveDef, parser ) {\n\n\t\tvar attributes = primitiveDef.attributes;\n\n\t\tvar pending = [];\n\n\t\tfunction assignAttributeAccessor( accessorIndex, attributeName ) {\n\n\t\t\treturn parser.getDependency( 'accessor', accessorIndex )\n\t\t\t\t.then( function ( accessor ) {\n\n\t\t\t\t\tgeometry.setAttribute( attributeName, accessor );\n\n\t\t\t\t} );\n\n\t\t}\n\n\t\tfor ( var gltfAttributeName in attributes ) {\n\n\t\t\tvar threeAttributeName = ATTRIBUTES[ gltfAttributeName ] || gltfAttributeName.toLowerCase();\n\n\t\t\t// Skip attributes already provided by e.g. Draco extension.\n\t\t\tif ( threeAttributeName in geometry.attributes ) continue;\n\n\t\t\tpending.push( assignAttributeAccessor( attributes[ gltfAttributeName ], threeAttributeName ) );\n\n\t\t}\n\n\t\tif ( primitiveDef.indices !== undefined && ! geometry.index ) {\n\n\t\t\tvar accessor = parser.getDependency( 'accessor', primitiveDef.indices ).then( function ( accessor ) {\n\n\t\t\t\tgeometry.setIndex( accessor );\n\n\t\t\t} );\n\n\t\t\tpending.push( accessor );\n\n\t\t}\n\n\t\tassignExtrasToUserData( geometry, primitiveDef );\n\n\t\tcomputeBounds( geometry, primitiveDef, parser );\n\n\t\treturn Promise.all( pending ).then( function () {\n\n\t\t\treturn primitiveDef.targets !== undefined\n\t\t\t\t? addMorphTargets( geometry, primitiveDef.targets, parser )\n\t\t\t\t: geometry;\n\n\t\t} );\n\n\t}\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {Number} drawMode\n\t * @return {THREE.BufferGeometry}\n\t */\n\tfunction toTrianglesDrawMode( geometry, drawMode ) {\n\n\t\tvar index = geometry.getIndex();\n\n\t\t// generate index if not present\n\n\t\tif ( index === null ) {\n\n\t\t\tvar indices = [];\n\n\t\t\tvar position = geometry.getAttribute( 'position' );\n\n\t\t\tif ( position !== undefined ) {\n\n\t\t\t\tfor ( var i = 0; i < position.count; i ++ ) {\n\n\t\t\t\t\tindices.push( i );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.setIndex( indices );\n\t\t\t\tindex = geometry.getIndex();\n\n\t\t\t} else {\n\n\t\t\t\tconsole.error( 'THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.' );\n\t\t\t\treturn geometry;\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tvar numberOfTriangles = index.count - 2;\n\t\tvar newIndices = [];\n\n\t\tif ( drawMode === THREE.TriangleFanDrawMode ) {\n\n\t\t\t// gl.TRIANGLE_FAN\n\n\t\t\tfor ( var i = 1; i <= numberOfTriangles; i ++ ) {\n\n\t\t\t\tnewIndices.push( index.getX( 0 ) );\n\t\t\t\tnewIndices.push( index.getX( i ) );\n\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// gl.TRIANGLE_STRIP\n\n\t\t\tfor ( var i = 0; i < numberOfTriangles; i ++ ) {\n\n\t\t\t\tif ( i % 2 === 0 ) {\n\n\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\t\t\t\t\tnewIndices.push( index.getX( i + 2 ) );\n\n\n\t\t\t\t} else {\n\n\t\t\t\t\tnewIndices.push( index.getX( i + 2 ) );\n\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( ( newIndices.length / 3 ) !== numberOfTriangles ) {\n\n\t\t\tconsole.error( 'THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.' );\n\n\t\t}\n\n\t\t// build final geometry\n\n\t\tvar newGeometry = geometry.clone();\n\t\tnewGeometry.setIndex( newIndices );\n\n\t\treturn newGeometry;\n\n\t}\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#geometry\n\t *\n\t * Creates BufferGeometries from primitives.\n\t *\n\t * @param {Array<GLTF.Primitive>} primitives\n\t * @return {Promise<Array<THREE.BufferGeometry>>}\n\t */\n\tGLTFParser.prototype.loadGeometries = function ( primitives ) {\n\n\t\tvar parser = this;\n\t\tvar extensions = this.extensions;\n\t\tvar cache = this.primitiveCache;\n\n\t\tfunction createDracoPrimitive( primitive ) {\n\n\t\t\treturn extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ]\n\t\t\t\t.decodePrimitive( primitive, parser )\n\t\t\t\t.then( function ( geometry ) {\n\n\t\t\t\t\treturn addPrimitiveAttributes( geometry, primitive, parser );\n\n\t\t\t\t} );\n\n\t\t}\n\n\t\tvar pending = [];\n\n\t\tfor ( var i = 0, il = primitives.length; i < il; i ++ ) {\n\n\t\t\tvar primitive = primitives[ i ];\n\t\t\tvar cacheKey = createPrimitiveKey( primitive );\n\n\t\t\t// See if we've already created this geometry\n\t\t\tvar cached = cache[ cacheKey ];\n\n\t\t\tif ( cached ) {\n\n\t\t\t\t// Use the cached geometry if it exists\n\t\t\t\tpending.push( cached.promise );\n\n\t\t\t} else {\n\n\t\t\t\tvar geometryPromise;\n\n\t\t\t\tif ( primitive.extensions && primitive.extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ] ) {\n\n\t\t\t\t\t// Use DRACO geometry if available\n\t\t\t\t\tgeometryPromise = createDracoPrimitive( primitive );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Otherwise create a new geometry\n\t\t\t\t\tgeometryPromise = addPrimitiveAttributes( new THREE.BufferGeometry(), primitive, parser );\n\n\t\t\t\t}\n\n\t\t\t\t// Cache this geometry\n\t\t\t\tcache[ cacheKey ] = { primitive: primitive, promise: geometryPromise };\n\n\t\t\t\tpending.push( geometryPromise );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn Promise.all( pending );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes\n\t * @param {number} meshIndex\n\t * @return {Promise<THREE.Group|THREE.Mesh|THREE.SkinnedMesh>}\n\t */\n\tGLTFParser.prototype.loadMesh = function ( meshIndex ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar extensions = this.extensions;\n\n\t\tvar meshDef = json.meshes[ meshIndex ];\n\t\tvar primitives = meshDef.primitives;\n\n\t\tvar pending = [];\n\n\t\tfor ( var i = 0, il = primitives.length; i < il; i ++ ) {\n\n\t\t\tvar material = primitives[ i ].material === undefined\n\t\t\t\t? createDefaultMaterial( this.cache )\n\t\t\t\t: this.getDependency( 'material', primitives[ i ].material );\n\n\t\t\tpending.push( material );\n\n\t\t}\n\n\t\tpending.push( parser.loadGeometries( primitives ) );\n\n\t\treturn Promise.all( pending ).then( function ( results ) {\n\n\t\t\tvar materials = results.slice( 0, results.length - 1 );\n\t\t\tvar geometries = results[ results.length - 1 ];\n\n\t\t\tvar meshes = [];\n\n\t\t\tfor ( var i = 0, il = geometries.length; i < il; i ++ ) {\n\n\t\t\t\tvar geometry = geometries[ i ];\n\t\t\t\tvar primitive = primitives[ i ];\n\n\t\t\t\t// 1. create Mesh\n\n\t\t\t\tvar mesh;\n\n\t\t\t\tvar material = materials[ i ];\n\n\t\t\t\tif ( primitive.mode === WEBGL_CONSTANTS.TRIANGLES ||\n\t\t\t\t\tprimitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ||\n\t\t\t\t\tprimitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN ||\n\t\t\t\t\tprimitive.mode === undefined ) {\n\n\t\t\t\t\t// .isSkinnedMesh isn't in glTF spec. See ._markDefs()\n\t\t\t\t\tmesh = meshDef.isSkinnedMesh === true\n\t\t\t\t\t\t? new THREE.SkinnedMesh( geometry, material )\n\t\t\t\t\t\t: new THREE.Mesh( geometry, material );\n\n\t\t\t\t\t// Fix double sided rendered models on certain mobile devices, see https://github.com/mrdoob/three.js/issues/20997#issuecomment-756082184\n\n\t\t\t\t\tif ( material.isMeshStandardMaterial === true &&\n\t\t\t\t\t\tmaterial.side === THREE.DoubleSide &&\n\t\t\t\t\t\tgeometry.getIndex() !== null &&\n\t\t\t\t\t\tgeometry.hasAttribute( 'position' ) === true &&\n\t\t\t\t\t\tgeometry.hasAttribute( 'normal' ) === true &&\n\t\t\t\t\t\tgeometry.hasAttribute( 'uv' ) === true &&\n\t\t\t\t\t\tgeometry.hasAttribute( 'tangent' ) === false ) {\n\n\t\t\t\t\t\tgeometry.computeTangents();\n\t\t\t\t\t\tmaterial.vertexTangents = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( mesh.isSkinnedMesh === true && ! mesh.geometry.attributes.skinWeight.normalized ) {\n\n\t\t\t\t\t\t// we normalize floating point skin weight array to fix malformed assets (see #15319)\n\t\t\t\t\t\t// it's important to skip this for non-float32 data since normalizeSkinWeights assumes non-normalized inputs\n\t\t\t\t\t\tmesh.normalizeSkinWeights();\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ) {\n\n\t\t\t\t\t\tmesh.geometry = toTrianglesDrawMode( mesh.geometry, THREE.TriangleStripDrawMode );\n\n\t\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN ) {\n\n\t\t\t\t\t\tmesh.geometry = toTrianglesDrawMode( mesh.geometry, THREE.TriangleFanDrawMode );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.LINES ) {\n\n\t\t\t\t\tmesh = new THREE.LineSegments( geometry, material );\n\n\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.LINE_STRIP ) {\n\n\t\t\t\t\tmesh = new THREE.Line( geometry, material );\n\n\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.LINE_LOOP ) {\n\n\t\t\t\t\tmesh = new THREE.LineLoop( geometry, material );\n\n\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.POINTS ) {\n\n\t\t\t\t\tmesh = new THREE.Points( geometry, material );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( 'THREE.GLTFLoader: Primitive mode unsupported: ' + primitive.mode );\n\n\t\t\t\t}\n\n\t\t\t\tif ( Object.keys( mesh.geometry.morphAttributes ).length > 0 ) {\n\n\t\t\t\t\tupdateMorphTargets( mesh, meshDef );\n\n\t\t\t\t}\n\n\t\t\t\tmesh.name = parser.createUniqueName( meshDef.name || ( 'mesh_' + meshIndex ) );\n\n\t\t\t\tassignExtrasToUserData( mesh, meshDef );\n\n\t\t\t\tif ( primitive.extensions ) addUnknownExtensionsToUserData( extensions, mesh, primitive );\n\n\t\t\t\tparser.assignFinalMaterial( mesh );\n\n\t\t\t\tmeshes.push( mesh );\n\n\t\t\t}\n\n\t\t\tif ( meshes.length === 1 ) {\n\n\t\t\t\treturn meshes[ 0 ];\n\n\t\t\t}\n\n\t\t\tvar group = new THREE.Group();\n\n\t\t\tfor ( var i = 0, il = meshes.length; i < il; i ++ ) {\n\n\t\t\t\tgroup.add( meshes[ i ] );\n\n\t\t\t}\n\n\t\t\treturn group;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras\n\t * @param {number} cameraIndex\n\t * @return {Promise<THREE.Camera>}\n\t */\n\tGLTFParser.prototype.loadCamera = function ( cameraIndex ) {\n\n\t\tvar camera;\n\t\tvar cameraDef = this.json.cameras[ cameraIndex ];\n\t\tvar params = cameraDef[ cameraDef.type ];\n\n\t\tif ( ! params ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFLoader: Missing camera parameters.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( cameraDef.type === 'perspective' ) {\n\n\t\t\tcamera = new THREE.PerspectiveCamera( THREE.MathUtils.radToDeg( params.yfov ), params.aspectRatio || 1, params.znear || 1, params.zfar || 2e6 );\n\n\t\t} else if ( cameraDef.type === 'orthographic' ) {\n\n\t\t\tcamera = new THREE.OrthographicCamera( - params.xmag, params.xmag, params.ymag, - params.ymag, params.znear, params.zfar );\n\n\t\t}\n\n\t\tif ( cameraDef.name ) camera.name = this.createUniqueName( cameraDef.name );\n\n\t\tassignExtrasToUserData( camera, cameraDef );\n\n\t\treturn Promise.resolve( camera );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins\n\t * @param {number} skinIndex\n\t * @return {Promise<Object>}\n\t */\n\tGLTFParser.prototype.loadSkin = function ( skinIndex ) {\n\n\t\tvar skinDef = this.json.skins[ skinIndex ];\n\n\t\tvar skinEntry = { joints: skinDef.joints };\n\n\t\tif ( skinDef.inverseBindMatrices === undefined ) {\n\n\t\t\treturn Promise.resolve( skinEntry );\n\n\t\t}\n\n\t\treturn this.getDependency( 'accessor', skinDef.inverseBindMatrices ).then( function ( accessor ) {\n\n\t\t\tskinEntry.inverseBindMatrices = accessor;\n\n\t\t\treturn skinEntry;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations\n\t * @param {number} animationIndex\n\t * @return {Promise<THREE.AnimationClip>}\n\t */\n\tGLTFParser.prototype.loadAnimation = function ( animationIndex ) {\n\n\t\tvar json = this.json;\n\n\t\tvar animationDef = json.animations[ animationIndex ];\n\n\t\tvar pendingNodes = [];\n\t\tvar pendingInputAccessors = [];\n\t\tvar pendingOutputAccessors = [];\n\t\tvar pendingSamplers = [];\n\t\tvar pendingTargets = [];\n\n\t\tfor ( var i = 0, il = animationDef.channels.length; i < il; i ++ ) {\n\n\t\t\tvar channel = animationDef.channels[ i ];\n\t\t\tvar sampler = animationDef.samplers[ channel.sampler ];\n\t\t\tvar target = channel.target;\n\t\t\tvar name = target.node !== undefined ? target.node : target.id; // NOTE: target.id is deprecated.\n\t\t\tvar input = animationDef.parameters !== undefined ? animationDef.parameters[ sampler.input ] : sampler.input;\n\t\t\tvar output = animationDef.parameters !== undefined ? animationDef.parameters[ sampler.output ] : sampler.output;\n\n\t\t\tpendingNodes.push( this.getDependency( 'node', name ) );\n\t\t\tpendingInputAccessors.push( this.getDependency( 'accessor', input ) );\n\t\t\tpendingOutputAccessors.push( this.getDependency( 'accessor', output ) );\n\t\t\tpendingSamplers.push( sampler );\n\t\t\tpendingTargets.push( target );\n\n\t\t}\n\n\t\treturn Promise.all( [\n\n\t\t\tPromise.all( pendingNodes ),\n\t\t\tPromise.all( pendingInputAccessors ),\n\t\t\tPromise.all( pendingOutputAccessors ),\n\t\t\tPromise.all( pendingSamplers ),\n\t\t\tPromise.all( pendingTargets )\n\n\t\t] ).then( function ( dependencies ) {\n\n\t\t\tvar nodes = dependencies[ 0 ];\n\t\t\tvar inputAccessors = dependencies[ 1 ];\n\t\t\tvar outputAccessors = dependencies[ 2 ];\n\t\t\tvar samplers = dependencies[ 3 ];\n\t\t\tvar targets = dependencies[ 4 ];\n\n\t\t\tvar tracks = [];\n\n\t\t\tfor ( var i = 0, il = nodes.length; i < il; i ++ ) {\n\n\t\t\t\tvar node = nodes[ i ];\n\t\t\t\tvar inputAccessor = inputAccessors[ i ];\n\t\t\t\tvar outputAccessor = outputAccessors[ i ];\n\t\t\t\tvar sampler = samplers[ i ];\n\t\t\t\tvar target = targets[ i ];\n\n\t\t\t\tif ( node === undefined ) continue;\n\n\t\t\t\tnode.updateMatrix();\n\t\t\t\tnode.matrixAutoUpdate = true;\n\n\t\t\t\tvar TypedKeyframeTrack;\n\n\t\t\t\tswitch ( PATH_PROPERTIES[ target.path ] ) {\n\n\t\t\t\t\tcase PATH_PROPERTIES.weights:\n\n\t\t\t\t\t\tTypedKeyframeTrack = THREE.NumberKeyframeTrack;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase PATH_PROPERTIES.rotation:\n\n\t\t\t\t\t\tTypedKeyframeTrack = THREE.QuaternionKeyframeTrack;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase PATH_PROPERTIES.position:\n\t\t\t\t\tcase PATH_PROPERTIES.scale:\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tTypedKeyframeTrack = THREE.VectorKeyframeTrack;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tvar targetName = node.name ? node.name : node.uuid;\n\n\t\t\t\tvar interpolation = sampler.interpolation !== undefined ? INTERPOLATION[ sampler.interpolation ] : THREE.InterpolateLinear;\n\n\t\t\t\tvar targetNames = [];\n\n\t\t\t\tif ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) {\n\n\t\t\t\t\t// Node may be a THREE.Group (glTF mesh with several primitives) or a THREE.Mesh.\n\t\t\t\t\tnode.traverse( function ( object ) {\n\n\t\t\t\t\t\tif ( object.isMesh === true && object.morphTargetInfluences ) {\n\n\t\t\t\t\t\t\ttargetNames.push( object.name ? object.name : object.uuid );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttargetNames.push( targetName );\n\n\t\t\t\t}\n\n\t\t\t\tvar outputArray = outputAccessor.array;\n\n\t\t\t\tif ( outputAccessor.normalized ) {\n\n\t\t\t\t\tvar scale;\n\n\t\t\t\t\tif ( outputArray.constructor === Int8Array ) {\n\n\t\t\t\t\t\tscale = 1 / 127;\n\n\t\t\t\t\t} else if ( outputArray.constructor === Uint8Array ) {\n\n\t\t\t\t\t\tscale = 1 / 255;\n\n\t\t\t\t\t} else if ( outputArray.constructor == Int16Array ) {\n\n\t\t\t\t\t\tscale = 1 / 32767;\n\n\t\t\t\t\t} else if ( outputArray.constructor === Uint16Array ) {\n\n\t\t\t\t\t\tscale = 1 / 65535;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthrow new Error( 'THREE.GLTFLoader: Unsupported output accessor component type.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar scaled = new Float32Array( outputArray.length );\n\n\t\t\t\t\tfor ( var j = 0, jl = outputArray.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tscaled[ j ] = outputArray[ j ] * scale;\n\n\t\t\t\t\t}\n\n\t\t\t\t\toutputArray = scaled;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( var j = 0, jl = targetNames.length; j < jl; j ++ ) {\n\n\t\t\t\t\tvar track = new TypedKeyframeTrack(\n\t\t\t\t\t\ttargetNames[ j ] + '.' + PATH_PROPERTIES[ target.path ],\n\t\t\t\t\t\tinputAccessor.array,\n\t\t\t\t\t\toutputArray,\n\t\t\t\t\t\tinterpolation\n\t\t\t\t\t);\n\n\t\t\t\t\t// Override interpolation with custom factory method.\n\t\t\t\t\tif ( sampler.interpolation === 'CUBICSPLINE' ) {\n\n\t\t\t\t\t\ttrack.createInterpolant = function InterpolantFactoryMethodGLTFCubicSpline( result ) {\n\n\t\t\t\t\t\t\t// A CUBICSPLINE keyframe in glTF has three output values for each input value,\n\t\t\t\t\t\t\t// representing inTangent, splineVertex, and outTangent. As a result, track.getValueSize()\n\t\t\t\t\t\t\t// must be divided by three to get the interpolant's sampleSize argument.\n\n\t\t\t\t\t\t\treturn new GLTFCubicSplineInterpolant( this.times, this.values, this.getValueSize() / 3, result );\n\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// Mark as CUBICSPLINE. `track.getInterpolation()` doesn't support custom interpolants.\n\t\t\t\t\t\ttrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttracks.push( track );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar name = animationDef.name ? animationDef.name : 'animation_' + animationIndex;\n\n\t\t\treturn new THREE.AnimationClip( name, undefined, tracks );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy\n\t * @param {number} nodeIndex\n\t * @return {Promise<THREE.Object3D>}\n\t */\n\tGLTFParser.prototype.loadNode = function ( nodeIndex ) {\n\n\t\tvar json = this.json;\n\t\tvar extensions = this.extensions;\n\t\tvar parser = this;\n\n\t\tvar nodeDef = json.nodes[ nodeIndex ];\n\n\t\t// reserve node's name before its dependencies, so the root has the intended name.\n\t\tvar nodeName = nodeDef.name ? parser.createUniqueName( nodeDef.name ) : '';\n\n\t\treturn ( function () {\n\n\t\t\tvar pending = [];\n\n\t\t\tif ( nodeDef.mesh !== undefined ) {\n\n\t\t\t\tpending.push( parser.getDependency( 'mesh', nodeDef.mesh ).then( function ( mesh ) {\n\n\t\t\t\t\tvar node = parser._getNodeRef( parser.meshCache, nodeDef.mesh, mesh );\n\n\t\t\t\t\t// if weights are provided on the node, override weights on the mesh.\n\t\t\t\t\tif ( nodeDef.weights !== undefined ) {\n\n\t\t\t\t\t\tnode.traverse( function ( o ) {\n\n\t\t\t\t\t\t\tif ( ! o.isMesh ) return;\n\n\t\t\t\t\t\t\tfor ( var i = 0, il = nodeDef.weights.length; i < il; i ++ ) {\n\n\t\t\t\t\t\t\t\to.morphTargetInfluences[ i ] = nodeDef.weights[ i ];\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn node;\n\n\t\t\t\t} ) );\n\n\t\t\t}\n\n\t\t\tif ( nodeDef.camera !== undefined ) {\n\n\t\t\t\tpending.push( parser.getDependency( 'camera', nodeDef.camera ).then( function ( camera ) {\n\n\t\t\t\t\treturn parser._getNodeRef( parser.cameraCache, nodeDef.camera, camera );\n\n\t\t\t\t} ) );\n\n\t\t\t}\n\n\t\t\tparser._invokeAll( function ( ext ) {\n\n\t\t\t\treturn ext.createNodeAttachment && ext.createNodeAttachment( nodeIndex );\n\n\t\t\t} ).forEach( function ( promise ) {\n\n\t\t\t\tpending.push( promise );\n\n\t\t\t} );\n\n\t\t\treturn Promise.all( pending );\n\n\t\t}() ).then( function ( objects ) {\n\n\t\t\tvar node;\n\n\t\t\t// .isBone isn't in glTF spec. See ._markDefs\n\t\t\tif ( nodeDef.isBone === true ) {\n\n\t\t\t\tnode = new THREE.Bone();\n\n\t\t\t} else if ( objects.length > 1 ) {\n\n\t\t\t\tnode = new THREE.Group();\n\n\t\t\t} else if ( objects.length === 1 ) {\n\n\t\t\t\tnode = objects[ 0 ];\n\n\t\t\t} else {\n\n\t\t\t\tnode = new THREE.Object3D();\n\n\t\t\t}\n\n\t\t\tif ( node !== objects[ 0 ] ) {\n\n\t\t\t\tfor ( var i = 0, il = objects.length; i < il; i ++ ) {\n\n\t\t\t\t\tnode.add( objects[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( nodeDef.name ) {\n\n\t\t\t\tnode.userData.name = nodeDef.name;\n\t\t\t\tnode.name = nodeName;\n\n\t\t\t}\n\n\t\t\tassignExtrasToUserData( node, nodeDef );\n\n\t\t\tif ( nodeDef.extensions ) addUnknownExtensionsToUserData( extensions, node, nodeDef );\n\n\t\t\tif ( nodeDef.matrix !== undefined ) {\n\n\t\t\t\tvar matrix = new THREE.Matrix4();\n\t\t\t\tmatrix.fromArray( nodeDef.matrix );\n\t\t\t\tnode.applyMatrix4( matrix );\n\n\t\t\t} else {\n\n\t\t\t\tif ( nodeDef.translation !== undefined ) {\n\n\t\t\t\t\tnode.position.fromArray( nodeDef.translation );\n\n\t\t\t\t}\n\n\t\t\t\tif ( nodeDef.rotation !== undefined ) {\n\n\t\t\t\t\tnode.quaternion.fromArray( nodeDef.rotation );\n\n\t\t\t\t}\n\n\t\t\t\tif ( nodeDef.scale !== undefined ) {\n\n\t\t\t\t\tnode.scale.fromArray( nodeDef.scale );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tparser.associations.set( node, { type: 'nodes', index: nodeIndex } );\n\n\t\t\treturn node;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes\n\t * @param {number} sceneIndex\n\t * @return {Promise<THREE.Group>}\n\t */\n\tGLTFParser.prototype.loadScene = function () {\n\n\t\t// scene node hierachy builder\n\n\t\tfunction buildNodeHierachy( nodeId, parentObject, json, parser ) {\n\n\t\t\tvar nodeDef = json.nodes[ nodeId ];\n\n\t\t\treturn parser.getDependency( 'node', nodeId ).then( function ( node ) {\n\n\t\t\t\tif ( nodeDef.skin === undefined ) return node;\n\n\t\t\t\t// build skeleton here as well\n\n\t\t\t\tvar skinEntry;\n\n\t\t\t\treturn parser.getDependency( 'skin', nodeDef.skin ).then( function ( skin ) {\n\n\t\t\t\t\tskinEntry = skin;\n\n\t\t\t\t\tvar pendingJoints = [];\n\n\t\t\t\t\tfor ( var i = 0, il = skinEntry.joints.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tpendingJoints.push( parser.getDependency( 'node', skinEntry.joints[ i ] ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.all( pendingJoints );\n\n\t\t\t\t} ).then( function ( jointNodes ) {\n\n\t\t\t\t\tnode.traverse( function ( mesh ) {\n\n\t\t\t\t\t\tif ( ! mesh.isMesh ) return;\n\n\t\t\t\t\t\tvar bones = [];\n\t\t\t\t\t\tvar boneInverses = [];\n\n\t\t\t\t\t\tfor ( var j = 0, jl = jointNodes.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\t\tvar jointNode = jointNodes[ j ];\n\n\t\t\t\t\t\t\tif ( jointNode ) {\n\n\t\t\t\t\t\t\t\tbones.push( jointNode );\n\n\t\t\t\t\t\t\t\tvar mat = new THREE.Matrix4();\n\n\t\t\t\t\t\t\t\tif ( skinEntry.inverseBindMatrices !== undefined ) {\n\n\t\t\t\t\t\t\t\t\tmat.fromArray( skinEntry.inverseBindMatrices.array, j * 16 );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tboneInverses.push( mat );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Joint \"%s\" could not be found.', skinEntry.joints[ j ] );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmesh.bind( new THREE.Skeleton( bones, boneInverses ), mesh.matrixWorld );\n\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn node;\n\n\t\t\t\t} );\n\n\t\t\t} ).then( function ( node ) {\n\n\t\t\t\t// build node hierachy\n\n\t\t\t\tparentObject.add( node );\n\n\t\t\t\tvar pending = [];\n\n\t\t\t\tif ( nodeDef.children ) {\n\n\t\t\t\t\tvar children = nodeDef.children;\n\n\t\t\t\t\tfor ( var i = 0, il = children.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tvar child = children[ i ];\n\t\t\t\t\t\tpending.push( buildNodeHierachy( child, node, json, parser ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn Promise.all( pending );\n\n\t\t\t} );\n\n\t\t}\n\n\t\treturn function loadScene( sceneIndex ) {\n\n\t\t\tvar json = this.json;\n\t\t\tvar extensions = this.extensions;\n\t\t\tvar sceneDef = this.json.scenes[ sceneIndex ];\n\t\t\tvar parser = this;\n\n\t\t\t// Loader returns Group, not Scene.\n\t\t\t// See: https://github.com/mrdoob/three.js/issues/18342#issuecomment-578981172\n\t\t\tvar scene = new THREE.Group();\n\t\t\tif ( sceneDef.name ) scene.name = parser.createUniqueName( sceneDef.name );\n\n\t\t\tassignExtrasToUserData( scene, sceneDef );\n\n\t\t\tif ( sceneDef.extensions ) addUnknownExtensionsToUserData( extensions, scene, sceneDef );\n\n\t\t\tvar nodeIds = sceneDef.nodes || [];\n\n\t\t\tvar pending = [];\n\n\t\t\tfor ( var i = 0, il = nodeIds.length; i < il; i ++ ) {\n\n\t\t\t\tpending.push( buildNodeHierachy( nodeIds[ i ], scene, json, parser ) );\n\n\t\t\t}\n\n\t\t\treturn Promise.all( pending ).then( function () {\n\n\t\t\t\treturn scene;\n\n\t\t\t} );\n\n\t\t};\n\n\t}();\n\n\treturn GLTFLoader;\n\n} )();\n\n},{}],60:[function(_dereq_,module,exports){\n/**\n * Loads a Wavefront .mtl file specifying materials\n */\n\nTHREE.MTLLoader = function ( manager ) {\n\n\tTHREE.Loader.call( this, manager );\n\n};\n\nTHREE.MTLLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), {\n\n\tconstructor: THREE.MTLLoader,\n\n\t/**\n\t * Loads and parses a MTL asset from a URL.\n\t *\n\t * @param {String} url - URL to the MTL file.\n\t * @param {Function} [onLoad] - Callback invoked with the loaded object.\n\t * @param {Function} [onProgress] - Callback for download progress.\n\t * @param {Function} [onError] - Callback for download errors.\n\t *\n\t * @see setPath setResourcePath\n\t *\n\t * @note In order for relative texture references to resolve correctly\n\t * you must call setResourcePath() explicitly prior to load.\n\t */\n\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\tvar scope = this;\n\n\t\tvar path = ( this.path === '' ) ? THREE.LoaderUtils.extractUrlBase( url ) : this.path;\n\n\t\tvar loader = new THREE.FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( text, path ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t},\n\n\tsetMaterialOptions: function ( value ) {\n\n\t\tthis.materialOptions = value;\n\t\treturn this;\n\n\t},\n\n\t/**\n\t * Parses a MTL file.\n\t *\n\t * @param {String} text - Content of MTL file\n\t * @return {THREE.MTLLoader.MaterialCreator}\n\t *\n\t * @see setPath setResourcePath\n\t *\n\t * @note In order for relative texture references to resolve correctly\n\t * you must call setResourcePath() explicitly prior to parse.\n\t */\n\tparse: function ( text, path ) {\n\n\t\tvar lines = text.split( '\\n' );\n\t\tvar info = {};\n\t\tvar delimiter_pattern = /\\s+/;\n\t\tvar materialsInfo = {};\n\n\t\tfor ( var i = 0; i < lines.length; i ++ ) {\n\n\t\t\tvar line = lines[ i ];\n\t\t\tline = line.trim();\n\n\t\t\tif ( line.length === 0 || line.charAt( 0 ) === '#' ) {\n\n\t\t\t\t// Blank line or comment ignore\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tvar pos = line.indexOf( ' ' );\n\n\t\t\tvar key = ( pos >= 0 ) ? line.substring( 0, pos ) : line;\n\t\t\tkey = key.toLowerCase();\n\n\t\t\tvar value = ( pos >= 0 ) ? line.substring( pos + 1 ) : '';\n\t\t\tvalue = value.trim();\n\n\t\t\tif ( key === 'newmtl' ) {\n\n\t\t\t\t// New material\n\n\t\t\t\tinfo = { name: value };\n\t\t\t\tmaterialsInfo[ value ] = info;\n\n\t\t\t} else {\n\n\t\t\t\tif ( key === 'ka' || key === 'kd' || key === 'ks' || key === 'ke' ) {\n\n\t\t\t\t\tvar ss = value.split( delimiter_pattern, 3 );\n\t\t\t\t\tinfo[ key ] = [ parseFloat( ss[ 0 ] ), parseFloat( ss[ 1 ] ), parseFloat( ss[ 2 ] ) ];\n\n\t\t\t\t} else {\n\n\t\t\t\t\tinfo[ key ] = value;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tvar materialCreator = new THREE.MTLLoader.MaterialCreator( this.resourcePath || path, this.materialOptions );\n\t\tmaterialCreator.setCrossOrigin( this.crossOrigin );\n\t\tmaterialCreator.setManager( this.manager );\n\t\tmaterialCreator.setMaterials( materialsInfo );\n\t\treturn materialCreator;\n\n\t}\n\n} );\n\n/**\n * Create a new THREE.MTLLoader.MaterialCreator\n * @param baseUrl - Url relative to which textures are loaded\n * @param options - Set of options on how to construct the materials\n * side: Which side to apply the material\n * THREE.FrontSide (default), THREE.BackSide, THREE.DoubleSide\n * wrap: What type of wrapping to apply for textures\n * THREE.RepeatWrapping (default), THREE.ClampToEdgeWrapping, THREE.MirroredRepeatWrapping\n * normalizeRGB: RGBs need to be normalized to 0-1 from 0-255\n * Default: false, assumed to be already normalized\n * ignoreZeroRGBs: Ignore values of RGBs (Ka,Kd,Ks) that are all 0's\n * Default: false\n * @constructor\n */\n\nTHREE.MTLLoader.MaterialCreator = function ( baseUrl, options ) {\n\n\tthis.baseUrl = baseUrl || '';\n\tthis.options = options;\n\tthis.materialsInfo = {};\n\tthis.materials = {};\n\tthis.materialsArray = [];\n\tthis.nameLookup = {};\n\n\tthis.side = ( this.options && this.options.side ) ? this.options.side : THREE.FrontSide;\n\tthis.wrap = ( this.options && this.options.wrap ) ? this.options.wrap : THREE.RepeatWrapping;\n\n};\n\nTHREE.MTLLoader.MaterialCreator.prototype = {\n\n\tconstructor: THREE.MTLLoader.MaterialCreator,\n\n\tcrossOrigin: 'anonymous',\n\n\tsetCrossOrigin: function ( value ) {\n\n\t\tthis.crossOrigin = value;\n\t\treturn this;\n\n\t},\n\n\tsetManager: function ( value ) {\n\n\t\tthis.manager = value;\n\n\t},\n\n\tsetMaterials: function ( materialsInfo ) {\n\n\t\tthis.materialsInfo = this.convert( materialsInfo );\n\t\tthis.materials = {};\n\t\tthis.materialsArray = [];\n\t\tthis.nameLookup = {};\n\n\t},\n\n\tconvert: function ( materialsInfo ) {\n\n\t\tif ( ! this.options ) return materialsInfo;\n\n\t\tvar converted = {};\n\n\t\tfor ( var mn in materialsInfo ) {\n\n\t\t\t// Convert materials info into normalized form based on options\n\n\t\t\tvar mat = materialsInfo[ mn ];\n\n\t\t\tvar covmat = {};\n\n\t\t\tconverted[ mn ] = covmat;\n\n\t\t\tfor ( var prop in mat ) {\n\n\t\t\t\tvar save = true;\n\t\t\t\tvar value = mat[ prop ];\n\t\t\t\tvar lprop = prop.toLowerCase();\n\n\t\t\t\tswitch ( lprop ) {\n\n\t\t\t\t\tcase 'kd':\n\t\t\t\t\tcase 'ka':\n\t\t\t\t\tcase 'ks':\n\n\t\t\t\t\t\t// Diffuse color (color under white light) using RGB values\n\n\t\t\t\t\t\tif ( this.options && this.options.normalizeRGB ) {\n\n\t\t\t\t\t\t\tvalue = [ value[ 0 ] / 255, value[ 1 ] / 255, value[ 2 ] / 255 ];\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( this.options && this.options.ignoreZeroRGBs ) {\n\n\t\t\t\t\t\t\tif ( value[ 0 ] === 0 && value[ 1 ] === 0 && value[ 2 ] === 0 ) {\n\n\t\t\t\t\t\t\t\t// ignore\n\n\t\t\t\t\t\t\t\tsave = false;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tif ( save ) {\n\n\t\t\t\t\tcovmat[ lprop ] = value;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn converted;\n\n\t},\n\n\tpreload: function () {\n\n\t\tfor ( var mn in this.materialsInfo ) {\n\n\t\t\tthis.create( mn );\n\n\t\t}\n\n\t},\n\n\tgetIndex: function ( materialName ) {\n\n\t\treturn this.nameLookup[ materialName ];\n\n\t},\n\n\tgetAsArray: function () {\n\n\t\tvar index = 0;\n\n\t\tfor ( var mn in this.materialsInfo ) {\n\n\t\t\tthis.materialsArray[ index ] = this.create( mn );\n\t\t\tthis.nameLookup[ mn ] = index;\n\t\t\tindex ++;\n\n\t\t}\n\n\t\treturn this.materialsArray;\n\n\t},\n\n\tcreate: function ( materialName ) {\n\n\t\tif ( this.materials[ materialName ] === undefined ) {\n\n\t\t\tthis.createMaterial_( materialName );\n\n\t\t}\n\n\t\treturn this.materials[ materialName ];\n\n\t},\n\n\tcreateMaterial_: function ( materialName ) {\n\n\t\t// Create material\n\n\t\tvar scope = this;\n\t\tvar mat = this.materialsInfo[ materialName ];\n\t\tvar params = {\n\n\t\t\tname: materialName,\n\t\t\tside: this.side\n\n\t\t};\n\n\t\tfunction resolveURL( baseUrl, url ) {\n\n\t\t\tif ( typeof url !== 'string' || url === '' )\n\t\t\t\treturn '';\n\n\t\t\t// Absolute URL\n\t\t\tif ( /^https?:\\/\\//i.test( url ) ) return url;\n\n\t\t\treturn baseUrl + url;\n\n\t\t}\n\n\t\tfunction setMapForType( mapType, value ) {\n\n\t\t\tif ( params[ mapType ] ) return; // Keep the first encountered texture\n\n\t\t\tvar texParams = scope.getTextureParams( value, params );\n\t\t\tvar map = scope.loadTexture( resolveURL( scope.baseUrl, texParams.url ) );\n\n\t\t\tmap.repeat.copy( texParams.scale );\n\t\t\tmap.offset.copy( texParams.offset );\n\n\t\t\tmap.wrapS = scope.wrap;\n\t\t\tmap.wrapT = scope.wrap;\n\n\t\t\tparams[ mapType ] = map;\n\n\t\t}\n\n\t\tfor ( var prop in mat ) {\n\n\t\t\tvar value = mat[ prop ];\n\t\t\tvar n;\n\n\t\t\tif ( value === '' ) continue;\n\n\t\t\tswitch ( prop.toLowerCase() ) {\n\n\t\t\t\t// Ns is material specular exponent\n\n\t\t\t\tcase 'kd':\n\n\t\t\t\t\t// Diffuse color (color under white light) using RGB values\n\n\t\t\t\t\tparams.color = new THREE.Color().fromArray( value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ks':\n\n\t\t\t\t\t// Specular color (color when light is reflected from shiny surface) using RGB values\n\t\t\t\t\tparams.specular = new THREE.Color().fromArray( value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ke':\n\n\t\t\t\t\t// Emissive using RGB values\n\t\t\t\t\tparams.emissive = new THREE.Color().fromArray( value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_kd':\n\n\t\t\t\t\t// Diffuse texture map\n\n\t\t\t\t\tsetMapForType( 'map', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_ks':\n\n\t\t\t\t\t// Specular map\n\n\t\t\t\t\tsetMapForType( 'specularMap', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_ke':\n\n\t\t\t\t\t// Emissive map\n\n\t\t\t\t\tsetMapForType( 'emissiveMap', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'norm':\n\n\t\t\t\t\tsetMapForType( 'normalMap', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_bump':\n\t\t\t\tcase 'bump':\n\n\t\t\t\t\t// Bump texture map\n\n\t\t\t\t\tsetMapForType( 'bumpMap', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_d':\n\n\t\t\t\t\t// Alpha map\n\n\t\t\t\t\tsetMapForType( 'alphaMap', value );\n\t\t\t\t\tparams.transparent = true;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ns':\n\n\t\t\t\t\t// The specular exponent (defines the focus of the specular highlight)\n\t\t\t\t\t// A high exponent results in a tight, concentrated highlight. Ns values normally range from 0 to 1000.\n\n\t\t\t\t\tparams.shininess = parseFloat( value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'd':\n\t\t\t\t\tn = parseFloat( value );\n\n\t\t\t\t\tif ( n < 1 ) {\n\n\t\t\t\t\t\tparams.opacity = n;\n\t\t\t\t\t\tparams.transparent = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tr':\n\t\t\t\t\tn = parseFloat( value );\n\n\t\t\t\t\tif ( this.options && this.options.invertTrProperty ) n = 1 - n;\n\n\t\t\t\t\tif ( n > 0 ) {\n\n\t\t\t\t\t\tparams.opacity = 1 - n;\n\t\t\t\t\t\tparams.transparent = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.materials[ materialName ] = new THREE.MeshPhongMaterial( params );\n\t\treturn this.materials[ materialName ];\n\n\t},\n\n\tgetTextureParams: function ( value, matParams ) {\n\n\t\tvar texParams = {\n\n\t\t\tscale: new THREE.Vector2( 1, 1 ),\n\t\t\toffset: new THREE.Vector2( 0, 0 )\n\n\t\t };\n\n\t\tvar items = value.split( /\\s+/ );\n\t\tvar pos;\n\n\t\tpos = items.indexOf( '-bm' );\n\n\t\tif ( pos >= 0 ) {\n\n\t\t\tmatParams.bumpScale = parseFloat( items[ pos + 1 ] );\n\t\t\titems.splice( pos, 2 );\n\n\t\t}\n\n\t\tpos = items.indexOf( '-s' );\n\n\t\tif ( pos >= 0 ) {\n\n\t\t\ttexParams.scale.set( parseFloat( items[ pos + 1 ] ), parseFloat( items[ pos + 2 ] ) );\n\t\t\titems.splice( pos, 4 ); // we expect 3 parameters here!\n\n\t\t}\n\n\t\tpos = items.indexOf( '-o' );\n\n\t\tif ( pos >= 0 ) {\n\n\t\t\ttexParams.offset.set( parseFloat( items[ pos + 1 ] ), parseFloat( items[ pos + 2 ] ) );\n\t\t\titems.splice( pos, 4 ); // we expect 3 parameters here!\n\n\t\t}\n\n\t\ttexParams.url = items.join( ' ' ).trim();\n\t\treturn texParams;\n\n\t},\n\n\tloadTexture: function ( url, mapping, onLoad, onProgress, onError ) {\n\n\t\tvar texture;\n\t\tvar manager = ( this.manager !== undefined ) ? this.manager : THREE.DefaultLoadingManager;\n\t\tvar loader = manager.getHandler( url );\n\n\t\tif ( loader === null ) {\n\n\t\t\tloader = new THREE.TextureLoader( manager );\n\n\t\t}\n\n\t\tif ( loader.setCrossOrigin ) loader.setCrossOrigin( this.crossOrigin );\n\t\ttexture = loader.load( url, onLoad, onProgress, onError );\n\n\t\tif ( mapping !== undefined ) texture.mapping = mapping;\n\n\t\treturn texture;\n\n\t}\n\n};\n\n},{}],61:[function(_dereq_,module,exports){\nTHREE.OBJLoader = ( function () {\n\n\t// o object_name | g group_name\n\tvar object_pattern = /^[og]\\s*(.+)?/;\n\t// mtllib file_reference\n\tvar material_library_pattern = /^mtllib /;\n\t// usemtl material_name\n\tvar material_use_pattern = /^usemtl /;\n\t// usemap map_name\n\tvar map_use_pattern = /^usemap /;\n\n\tvar vA = new THREE.Vector3();\n\tvar vB = new THREE.Vector3();\n\tvar vC = new THREE.Vector3();\n\n\tvar ab = new THREE.Vector3();\n\tvar cb = new THREE.Vector3();\n\n\tfunction ParserState() {\n\n\t\tvar state = {\n\t\t\tobjects: [],\n\t\t\tobject: {},\n\n\t\t\tvertices: [],\n\t\t\tnormals: [],\n\t\t\tcolors: [],\n\t\t\tuvs: [],\n\n\t\t\tmaterials: {},\n\t\t\tmaterialLibraries: [],\n\n\t\t\tstartObject: function ( name, fromDeclaration ) {\n\n\t\t\t\t// If the current object (initial from reset) is not from a g/o declaration in the parsed\n\t\t\t\t// file. We need to use it for the first parsed g/o to keep things in sync.\n\t\t\t\tif ( this.object && this.object.fromDeclaration === false ) {\n\n\t\t\t\t\tthis.object.name = name;\n\t\t\t\t\tthis.object.fromDeclaration = ( fromDeclaration !== false );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tvar previousMaterial = ( this.object && typeof this.object.currentMaterial === 'function' ? this.object.currentMaterial() : undefined );\n\n\t\t\t\tif ( this.object && typeof this.object._finalize === 'function' ) {\n\n\t\t\t\t\tthis.object._finalize( true );\n\n\t\t\t\t}\n\n\t\t\t\tthis.object = {\n\t\t\t\t\tname: name || '',\n\t\t\t\t\tfromDeclaration: ( fromDeclaration !== false ),\n\n\t\t\t\t\tgeometry: {\n\t\t\t\t\t\tvertices: [],\n\t\t\t\t\t\tnormals: [],\n\t\t\t\t\t\tcolors: [],\n\t\t\t\t\t\tuvs: [],\n\t\t\t\t\t\thasUVIndices: false\n\t\t\t\t\t},\n\t\t\t\t\tmaterials: [],\n\t\t\t\t\tsmooth: true,\n\n\t\t\t\t\tstartMaterial: function ( name, libraries ) {\n\n\t\t\t\t\t\tvar previous = this._finalize( false );\n\n\t\t\t\t\t\t// New usemtl declaration overwrites an inherited material, except if faces were declared\n\t\t\t\t\t\t// after the material, then it must be preserved for proper MultiMaterial continuation.\n\t\t\t\t\t\tif ( previous && ( previous.inherited || previous.groupCount <= 0 ) ) {\n\n\t\t\t\t\t\t\tthis.materials.splice( previous.index, 1 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar material = {\n\t\t\t\t\t\t\tindex: this.materials.length,\n\t\t\t\t\t\t\tname: name || '',\n\t\t\t\t\t\t\tmtllib: ( Array.isArray( libraries ) && libraries.length > 0 ? libraries[ libraries.length - 1 ] : '' ),\n\t\t\t\t\t\t\tsmooth: ( previous !== undefined ? previous.smooth : this.smooth ),\n\t\t\t\t\t\t\tgroupStart: ( previous !== undefined ? previous.groupEnd : 0 ),\n\t\t\t\t\t\t\tgroupEnd: - 1,\n\t\t\t\t\t\t\tgroupCount: - 1,\n\t\t\t\t\t\t\tinherited: false,\n\n\t\t\t\t\t\t\tclone: function ( index ) {\n\n\t\t\t\t\t\t\t\tvar cloned = {\n\t\t\t\t\t\t\t\t\tindex: ( typeof index === 'number' ? index : this.index ),\n\t\t\t\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t\t\t\t\tmtllib: this.mtllib,\n\t\t\t\t\t\t\t\t\tsmooth: this.smooth,\n\t\t\t\t\t\t\t\t\tgroupStart: 0,\n\t\t\t\t\t\t\t\t\tgroupEnd: - 1,\n\t\t\t\t\t\t\t\t\tgroupCount: - 1,\n\t\t\t\t\t\t\t\t\tinherited: false\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tcloned.clone = this.clone.bind( cloned );\n\t\t\t\t\t\t\t\treturn cloned;\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tthis.materials.push( material );\n\n\t\t\t\t\t\treturn material;\n\n\t\t\t\t\t},\n\n\t\t\t\t\tcurrentMaterial: function () {\n\n\t\t\t\t\t\tif ( this.materials.length > 0 ) {\n\n\t\t\t\t\t\t\treturn this.materials[ this.materials.length - 1 ];\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn undefined;\n\n\t\t\t\t\t},\n\n\t\t\t\t\t_finalize: function ( end ) {\n\n\t\t\t\t\t\tvar lastMultiMaterial = this.currentMaterial();\n\t\t\t\t\t\tif ( lastMultiMaterial && lastMultiMaterial.groupEnd === - 1 ) {\n\n\t\t\t\t\t\t\tlastMultiMaterial.groupEnd = this.geometry.vertices.length / 3;\n\t\t\t\t\t\t\tlastMultiMaterial.groupCount = lastMultiMaterial.groupEnd - lastMultiMaterial.groupStart;\n\t\t\t\t\t\t\tlastMultiMaterial.inherited = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Ignore objects tail materials if no face declarations followed them before a new o/g started.\n\t\t\t\t\t\tif ( end && this.materials.length > 1 ) {\n\n\t\t\t\t\t\t\tfor ( var mi = this.materials.length - 1; mi >= 0; mi -- ) {\n\n\t\t\t\t\t\t\t\tif ( this.materials[ mi ].groupCount <= 0 ) {\n\n\t\t\t\t\t\t\t\t\tthis.materials.splice( mi, 1 );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Guarantee at least one empty material, this makes the creation later more straight forward.\n\t\t\t\t\t\tif ( end && this.materials.length === 0 ) {\n\n\t\t\t\t\t\t\tthis.materials.push( {\n\t\t\t\t\t\t\t\tname: '',\n\t\t\t\t\t\t\t\tsmooth: this.smooth\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn lastMultiMaterial;\n\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Inherit previous objects material.\n\t\t\t\t// Spec tells us that a declared material must be set to all objects until a new material is declared.\n\t\t\t\t// If a usemtl declaration is encountered while this new object is being parsed, it will\n\t\t\t\t// overwrite the inherited material. Exception being that there was already face declarations\n\t\t\t\t// to the inherited material, then it will be preserved for proper MultiMaterial continuation.\n\n\t\t\t\tif ( previousMaterial && previousMaterial.name && typeof previousMaterial.clone === 'function' ) {\n\n\t\t\t\t\tvar declared = previousMaterial.clone( 0 );\n\t\t\t\t\tdeclared.inherited = true;\n\t\t\t\t\tthis.object.materials.push( declared );\n\n\t\t\t\t}\n\n\t\t\t\tthis.objects.push( this.object );\n\n\t\t\t},\n\n\t\t\tfinalize: function () {\n\n\t\t\t\tif ( this.object && typeof this.object._finalize === 'function' ) {\n\n\t\t\t\t\tthis.object._finalize( true );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tparseVertexIndex: function ( value, len ) {\n\n\t\t\t\tvar index = parseInt( value, 10 );\n\t\t\t\treturn ( index >= 0 ? index - 1 : index + len / 3 ) * 3;\n\n\t\t\t},\n\n\t\t\tparseNormalIndex: function ( value, len ) {\n\n\t\t\t\tvar index = parseInt( value, 10 );\n\t\t\t\treturn ( index >= 0 ? index - 1 : index + len / 3 ) * 3;\n\n\t\t\t},\n\n\t\t\tparseUVIndex: function ( value, len ) {\n\n\t\t\t\tvar index = parseInt( value, 10 );\n\t\t\t\treturn ( index >= 0 ? index - 1 : index + len / 2 ) * 2;\n\n\t\t\t},\n\n\t\t\taddVertex: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.vertices;\n\t\t\t\tvar dst = this.object.geometry.vertices;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t\t},\n\n\t\t\taddVertexPoint: function ( a ) {\n\n\t\t\t\tvar src = this.vertices;\n\t\t\t\tvar dst = this.object.geometry.vertices;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\n\t\t\t},\n\n\t\t\taddVertexLine: function ( a ) {\n\n\t\t\t\tvar src = this.vertices;\n\t\t\t\tvar dst = this.object.geometry.vertices;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\n\t\t\t},\n\n\t\t\taddNormal: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.normals;\n\t\t\t\tvar dst = this.object.geometry.normals;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t\t},\n\n\t\t\taddFaceNormal: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.vertices;\n\t\t\t\tvar dst = this.object.geometry.normals;\n\n\t\t\t\tvA.fromArray( src, a );\n\t\t\t\tvB.fromArray( src, b );\n\t\t\t\tvC.fromArray( src, c );\n\n\t\t\t\tcb.subVectors( vC, vB );\n\t\t\t\tab.subVectors( vA, vB );\n\t\t\t\tcb.cross( ab );\n\n\t\t\t\tcb.normalize();\n\n\t\t\t\tdst.push( cb.x, cb.y, cb.z );\n\t\t\t\tdst.push( cb.x, cb.y, cb.z );\n\t\t\t\tdst.push( cb.x, cb.y, cb.z );\n\n\t\t\t},\n\n\t\t\taddColor: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.colors;\n\t\t\t\tvar dst = this.object.geometry.colors;\n\n\t\t\t\tif ( src[ a ] !== undefined ) dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\t\tif ( src[ b ] !== undefined ) dst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\t\tif ( src[ c ] !== undefined ) dst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t\t},\n\n\t\t\taddUV: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.uvs;\n\t\t\t\tvar dst = this.object.geometry.uvs;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ] );\n\t\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ] );\n\t\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ] );\n\n\t\t\t},\n\n\t\t\taddDefaultUV: function () {\n\n\t\t\t\tvar dst = this.object.geometry.uvs;\n\n\t\t\t\tdst.push( 0, 0 );\n\t\t\t\tdst.push( 0, 0 );\n\t\t\t\tdst.push( 0, 0 );\n\n\t\t\t},\n\n\t\t\taddUVLine: function ( a ) {\n\n\t\t\t\tvar src = this.uvs;\n\t\t\t\tvar dst = this.object.geometry.uvs;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ] );\n\n\t\t\t},\n\n\t\t\taddFace: function ( a, b, c, ua, ub, uc, na, nb, nc ) {\n\n\t\t\t\tvar vLen = this.vertices.length;\n\n\t\t\t\tvar ia = this.parseVertexIndex( a, vLen );\n\t\t\t\tvar ib = this.parseVertexIndex( b, vLen );\n\t\t\t\tvar ic = this.parseVertexIndex( c, vLen );\n\n\t\t\t\tthis.addVertex( ia, ib, ic );\n\t\t\t\tthis.addColor( ia, ib, ic );\n\n\t\t\t\t// normals\n\n\t\t\t\tif ( na !== undefined && na !== '' ) {\n\n\t\t\t\t\tvar nLen = this.normals.length;\n\n\t\t\t\t\tia = this.parseNormalIndex( na, nLen );\n\t\t\t\t\tib = this.parseNormalIndex( nb, nLen );\n\t\t\t\t\tic = this.parseNormalIndex( nc, nLen );\n\n\t\t\t\t\tthis.addNormal( ia, ib, ic );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.addFaceNormal( ia, ib, ic );\n\n\t\t\t\t}\n\n\t\t\t\t// uvs\n\n\t\t\t\tif ( ua !== undefined && ua !== '' ) {\n\n\t\t\t\t\tvar uvLen = this.uvs.length;\n\n\t\t\t\t\tia = this.parseUVIndex( ua, uvLen );\n\t\t\t\t\tib = this.parseUVIndex( ub, uvLen );\n\t\t\t\t\tic = this.parseUVIndex( uc, uvLen );\n\n\t\t\t\t\tthis.addUV( ia, ib, ic );\n\n\t\t\t\t\tthis.object.geometry.hasUVIndices = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// add placeholder values (for inconsistent face definitions)\n\n\t\t\t\t\tthis.addDefaultUV();\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\taddPointGeometry: function ( vertices ) {\n\n\t\t\t\tthis.object.geometry.type = 'Points';\n\n\t\t\t\tvar vLen = this.vertices.length;\n\n\t\t\t\tfor ( var vi = 0, l = vertices.length; vi < l; vi ++ ) {\n\n\t\t\t\t\tvar index = this.parseVertexIndex( vertices[ vi ], vLen );\n\n\t\t\t\t\tthis.addVertexPoint( index );\n\t\t\t\t\tthis.addColor( index );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\taddLineGeometry: function ( vertices, uvs ) {\n\n\t\t\t\tthis.object.geometry.type = 'Line';\n\n\t\t\t\tvar vLen = this.vertices.length;\n\t\t\t\tvar uvLen = this.uvs.length;\n\n\t\t\t\tfor ( var vi = 0, l = vertices.length; vi < l; vi ++ ) {\n\n\t\t\t\t\tthis.addVertexLine( this.parseVertexIndex( vertices[ vi ], vLen ) );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( var uvi = 0, l = uvs.length; uvi < l; uvi ++ ) {\n\n\t\t\t\t\tthis.addUVLine( this.parseUVIndex( uvs[ uvi ], uvLen ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tstate.startObject( '', false );\n\n\t\treturn state;\n\n\t}\n\n\t//\n\n\tfunction OBJLoader( manager ) {\n\n\t\tTHREE.Loader.call( this, manager );\n\n\t\tthis.materials = null;\n\n\t}\n\n\tOBJLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), {\n\n\t\tconstructor: OBJLoader,\n\n\t\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\t\tvar scope = this;\n\n\t\t\tvar loader = new THREE.FileLoader( this.manager );\n\t\t\tloader.setPath( this.path );\n\t\t\tloader.setRequestHeader( this.requestHeader );\n\t\t\tloader.setWithCredentials( this.withCredentials );\n\t\t\tloader.load( url, function ( text ) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tonLoad( scope.parse( text ) );\n\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\tif ( onError ) {\n\n\t\t\t\t\t\tonError( e );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, onError );\n\n\t\t},\n\n\t\tsetMaterials: function ( materials ) {\n\n\t\t\tthis.materials = materials;\n\n\t\t\treturn this;\n\n\t\t},\n\n\t\tparse: function ( text ) {\n\n\t\t\tvar state = new ParserState();\n\n\t\t\tif ( text.indexOf( '\\r\\n' ) !== - 1 ) {\n\n\t\t\t\t// This is faster than String.split with regex that splits on both\n\t\t\t\ttext = text.replace( /\\r\\n/g, '\\n' );\n\n\t\t\t}\n\n\t\t\tif ( text.indexOf( '\\\\\\n' ) !== - 1 ) {\n\n\t\t\t\t// join lines separated by a line continuation character (\\)\n\t\t\t\ttext = text.replace( /\\\\\\n/g, '' );\n\n\t\t\t}\n\n\t\t\tvar lines = text.split( '\\n' );\n\t\t\tvar line = '', lineFirstChar = '';\n\t\t\tvar lineLength = 0;\n\t\t\tvar result = [];\n\n\t\t\t// Faster to just trim left side of the line. Use if available.\n\t\t\tvar trimLeft = ( typeof ''.trimLeft === 'function' );\n\n\t\t\tfor ( var i = 0, l = lines.length; i < l; i ++ ) {\n\n\t\t\t\tline = lines[ i ];\n\n\t\t\t\tline = trimLeft ? line.trimLeft() : line.trim();\n\n\t\t\t\tlineLength = line.length;\n\n\t\t\t\tif ( lineLength === 0 ) continue;\n\n\t\t\t\tlineFirstChar = line.charAt( 0 );\n\n\t\t\t\t// @todo invoke passed in handler if any\n\t\t\t\tif ( lineFirstChar === '#' ) continue;\n\n\t\t\t\tif ( lineFirstChar === 'v' ) {\n\n\t\t\t\t\tvar data = line.split( /\\s+/ );\n\n\t\t\t\t\tswitch ( data[ 0 ] ) {\n\n\t\t\t\t\t\tcase 'v':\n\t\t\t\t\t\t\tstate.vertices.push(\n\t\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 2 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 3 ] )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif ( data.length >= 7 ) {\n\n\t\t\t\t\t\t\t\tstate.colors.push(\n\t\t\t\t\t\t\t\t\tparseFloat( data[ 4 ] ),\n\t\t\t\t\t\t\t\t\tparseFloat( data[ 5 ] ),\n\t\t\t\t\t\t\t\t\tparseFloat( data[ 6 ] )\n\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// if no colors are defined, add placeholders so color and vertex indices match\n\n\t\t\t\t\t\t\t\tstate.colors.push( undefined, undefined, undefined );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'vn':\n\t\t\t\t\t\t\tstate.normals.push(\n\t\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 2 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 3 ] )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'vt':\n\t\t\t\t\t\t\tstate.uvs.push(\n\t\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 2 ] )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( lineFirstChar === 'f' ) {\n\n\t\t\t\t\tvar lineData = line.substr( 1 ).trim();\n\t\t\t\t\tvar vertexData = lineData.split( /\\s+/ );\n\t\t\t\t\tvar faceVertices = [];\n\n\t\t\t\t\t// Parse the face vertex data into an easy to work with format\n\n\t\t\t\t\tfor ( var j = 0, jl = vertexData.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tvar vertex = vertexData[ j ];\n\n\t\t\t\t\t\tif ( vertex.length > 0 ) {\n\n\t\t\t\t\t\t\tvar vertexParts = vertex.split( '/' );\n\t\t\t\t\t\t\tfaceVertices.push( vertexParts );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Draw an edge between the first vertex and all subsequent vertices to form an n-gon\n\n\t\t\t\t\tvar v1 = faceVertices[ 0 ];\n\n\t\t\t\t\tfor ( var j = 1, jl = faceVertices.length - 1; j < jl; j ++ ) {\n\n\t\t\t\t\t\tvar v2 = faceVertices[ j ];\n\t\t\t\t\t\tvar v3 = faceVertices[ j + 1 ];\n\n\t\t\t\t\t\tstate.addFace(\n\t\t\t\t\t\t\tv1[ 0 ], v2[ 0 ], v3[ 0 ],\n\t\t\t\t\t\t\tv1[ 1 ], v2[ 1 ], v3[ 1 ],\n\t\t\t\t\t\t\tv1[ 2 ], v2[ 2 ], v3[ 2 ]\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( lineFirstChar === 'l' ) {\n\n\t\t\t\t\tvar lineParts = line.substring( 1 ).trim().split( ' ' );\n\t\t\t\t\tvar lineVertices = [], lineUVs = [];\n\n\t\t\t\t\tif ( line.indexOf( '/' ) === - 1 ) {\n\n\t\t\t\t\t\tlineVertices = lineParts;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tfor ( var li = 0, llen = lineParts.length; li < llen; li ++ ) {\n\n\t\t\t\t\t\t\tvar parts = lineParts[ li ].split( '/' );\n\n\t\t\t\t\t\t\tif ( parts[ 0 ] !== '' ) lineVertices.push( parts[ 0 ] );\n\t\t\t\t\t\t\tif ( parts[ 1 ] !== '' ) lineUVs.push( parts[ 1 ] );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.addLineGeometry( lineVertices, lineUVs );\n\n\t\t\t\t} else if ( lineFirstChar === 'p' ) {\n\n\t\t\t\t\tvar lineData = line.substr( 1 ).trim();\n\t\t\t\t\tvar pointData = lineData.split( ' ' );\n\n\t\t\t\t\tstate.addPointGeometry( pointData );\n\n\t\t\t\t} else if ( ( result = object_pattern.exec( line ) ) !== null ) {\n\n\t\t\t\t\t// o object_name\n\t\t\t\t\t// or\n\t\t\t\t\t// g group_name\n\n\t\t\t\t\t// WORKAROUND: https://bugs.chromium.org/p/v8/issues/detail?id=2869\n\t\t\t\t\t// var name = result[ 0 ].substr( 1 ).trim();\n\t\t\t\t\tvar name = ( ' ' + result[ 0 ].substr( 1 ).trim() ).substr( 1 );\n\n\t\t\t\t\tstate.startObject( name );\n\n\t\t\t\t} else if ( material_use_pattern.test( line ) ) {\n\n\t\t\t\t\t// material\n\n\t\t\t\t\tstate.object.startMaterial( line.substring( 7 ).trim(), state.materialLibraries );\n\n\t\t\t\t} else if ( material_library_pattern.test( line ) ) {\n\n\t\t\t\t\t// mtl file\n\n\t\t\t\t\tstate.materialLibraries.push( line.substring( 7 ).trim() );\n\n\t\t\t\t} else if ( map_use_pattern.test( line ) ) {\n\n\t\t\t\t\t// the line is parsed but ignored since the loader assumes textures are defined MTL files\n\t\t\t\t\t// (according to https://www.okino.com/conv/imp_wave.htm, 'usemap' is the old-style Wavefront texture reference method)\n\n\t\t\t\t\tconsole.warn( 'THREE.OBJLoader: Rendering identifier \"usemap\" not supported. Textures must be defined in MTL files.' );\n\n\t\t\t\t} else if ( lineFirstChar === 's' ) {\n\n\t\t\t\t\tresult = line.split( ' ' );\n\n\t\t\t\t\t// smooth shading\n\n\t\t\t\t\t// @todo Handle files that have varying smooth values for a set of faces inside one geometry,\n\t\t\t\t\t// but does not define a usemtl for each face set.\n\t\t\t\t\t// This should be detected and a dummy material created (later MultiMaterial and geometry groups).\n\t\t\t\t\t// This requires some care to not create extra material on each smooth value for \"normal\" obj files.\n\t\t\t\t\t// where explicit usemtl defines geometry groups.\n\t\t\t\t\t// Example asset: examples/models/obj/cerberus/Cerberus.obj\n\n\t\t\t\t\t/*\n\t\t\t\t\t * http://paulbourke.net/dataformats/obj/\n\t\t\t\t\t * or\n\t\t\t\t\t * http://www.cs.utah.edu/~boulos/cs3505/obj_spec.pdf\n\t\t\t\t\t *\n\t\t\t\t\t * From chapter \"Grouping\" Syntax explanation \"s group_number\":\n\t\t\t\t\t * \"group_number is the smoothing group number. To turn off smoothing groups, use a value of 0 or off.\n\t\t\t\t\t * Polygonal elements use group numbers to put elements in different smoothing groups. For free-form\n\t\t\t\t\t * surfaces, smoothing groups are either turned on or off; there is no difference between values greater\n\t\t\t\t\t * than 0.\"\n\t\t\t\t\t */\n\t\t\t\t\tif ( result.length > 1 ) {\n\n\t\t\t\t\t\tvar value = result[ 1 ].trim().toLowerCase();\n\t\t\t\t\t\tstate.object.smooth = ( value !== '0' && value !== 'off' );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// ZBrush can produce \"s\" lines #11707\n\t\t\t\t\t\tstate.object.smooth = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar material = state.object.currentMaterial();\n\t\t\t\t\tif ( material ) material.smooth = state.object.smooth;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Handle null terminated files without exception\n\t\t\t\t\tif ( line === '\\0' ) continue;\n\n\t\t\t\t\tconsole.warn( 'THREE.OBJLoader: Unexpected line: \"' + line + '\"' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.finalize();\n\n\t\t\tvar container = new THREE.Group();\n\t\t\tcontainer.materialLibraries = [].concat( state.materialLibraries );\n\n\t\t\tvar hasPrimitives = ! ( state.objects.length === 1 && state.objects[ 0 ].geometry.vertices.length === 0 );\n\n\t\t\tif ( hasPrimitives === true ) {\n\n\t\t\t\tfor ( var i = 0, l = state.objects.length; i < l; i ++ ) {\n\n\t\t\t\t\tvar object = state.objects[ i ];\n\t\t\t\t\tvar geometry = object.geometry;\n\t\t\t\t\tvar materials = object.materials;\n\t\t\t\t\tvar isLine = ( geometry.type === 'Line' );\n\t\t\t\t\tvar isPoints = ( geometry.type === 'Points' );\n\t\t\t\t\tvar hasVertexColors = false;\n\n\t\t\t\t\t// Skip o/g line declarations that did not follow with any faces\n\t\t\t\t\tif ( geometry.vertices.length === 0 ) continue;\n\n\t\t\t\t\tvar buffergeometry = new THREE.BufferGeometry();\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'position', new THREE.Float32BufferAttribute( geometry.vertices, 3 ) );\n\n\t\t\t\t\tif ( geometry.normals.length > 0 ) {\n\n\t\t\t\t\t\tbuffergeometry.setAttribute( 'normal', new THREE.Float32BufferAttribute( geometry.normals, 3 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( geometry.colors.length > 0 ) {\n\n\t\t\t\t\t\thasVertexColors = true;\n\t\t\t\t\t\tbuffergeometry.setAttribute( 'color', new THREE.Float32BufferAttribute( geometry.colors, 3 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( geometry.hasUVIndices === true ) {\n\n\t\t\t\t\t\tbuffergeometry.setAttribute( 'uv', new THREE.Float32BufferAttribute( geometry.uvs, 2 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create materials\n\n\t\t\t\t\tvar createdMaterials = [];\n\n\t\t\t\t\tfor ( var mi = 0, miLen = materials.length; mi < miLen; mi ++ ) {\n\n\t\t\t\t\t\tvar sourceMaterial = materials[ mi ];\n\t\t\t\t\t\tvar materialHash = sourceMaterial.name + '_' + sourceMaterial.smooth + '_' + hasVertexColors;\n\t\t\t\t\t\tvar material = state.materials[ materialHash ];\n\n\t\t\t\t\t\tif ( this.materials !== null ) {\n\n\t\t\t\t\t\t\tmaterial = this.materials.create( sourceMaterial.name );\n\n\t\t\t\t\t\t\t// mtl etc. loaders probably can't create line materials correctly, copy properties to a line material.\n\t\t\t\t\t\t\tif ( isLine && material && ! ( material instanceof THREE.LineBasicMaterial ) ) {\n\n\t\t\t\t\t\t\t\tvar materialLine = new THREE.LineBasicMaterial();\n\t\t\t\t\t\t\t\tTHREE.Material.prototype.copy.call( materialLine, material );\n\t\t\t\t\t\t\t\tmaterialLine.color.copy( material.color );\n\t\t\t\t\t\t\t\tmaterial = materialLine;\n\n\t\t\t\t\t\t\t} else if ( isPoints && material && ! ( material instanceof THREE.PointsMaterial ) ) {\n\n\t\t\t\t\t\t\t\tvar materialPoints = new THREE.PointsMaterial( { size: 10, sizeAttenuation: false } );\n\t\t\t\t\t\t\t\tTHREE.Material.prototype.copy.call( materialPoints, material );\n\t\t\t\t\t\t\t\tmaterialPoints.color.copy( material.color );\n\t\t\t\t\t\t\t\tmaterialPoints.map = material.map;\n\t\t\t\t\t\t\t\tmaterial = materialPoints;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( material === undefined ) {\n\n\t\t\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\t\t\tmaterial = new THREE.LineBasicMaterial();\n\n\t\t\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\t\t\tmaterial = new THREE.PointsMaterial( { size: 1, sizeAttenuation: false } );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tmaterial = new THREE.MeshPhongMaterial();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmaterial.name = sourceMaterial.name;\n\t\t\t\t\t\t\tmaterial.flatShading = sourceMaterial.smooth ? false : true;\n\t\t\t\t\t\t\tmaterial.vertexColors = hasVertexColors;\n\n\t\t\t\t\t\t\tstate.materials[ materialHash ] = material;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcreatedMaterials.push( material );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create mesh\n\n\t\t\t\t\tvar mesh;\n\n\t\t\t\t\tif ( createdMaterials.length > 1 ) {\n\n\t\t\t\t\t\tfor ( var mi = 0, miLen = materials.length; mi < miLen; mi ++ ) {\n\n\t\t\t\t\t\t\tvar sourceMaterial = materials[ mi ];\n\t\t\t\t\t\t\tbuffergeometry.addGroup( sourceMaterial.groupStart, sourceMaterial.groupCount, mi );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\t\tmesh = new THREE.LineSegments( buffergeometry, createdMaterials );\n\n\t\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\t\tmesh = new THREE.Points( buffergeometry, createdMaterials );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tmesh = new THREE.Mesh( buffergeometry, createdMaterials );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\t\tmesh = new THREE.LineSegments( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\t\tmesh = new THREE.Points( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tmesh = new THREE.Mesh( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmesh.name = object.name;\n\n\t\t\t\t\tcontainer.add( mesh );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// if there is only the default parser state object with no geometry data, interpret data as point cloud\n\n\t\t\t\tif ( state.vertices.length > 0 ) {\n\n\t\t\t\t\tvar material = new THREE.PointsMaterial( { size: 1, sizeAttenuation: false } );\n\n\t\t\t\t\tvar buffergeometry = new THREE.BufferGeometry();\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'position', new THREE.Float32BufferAttribute( state.vertices, 3 ) );\n\n\t\t\t\t\tif ( state.colors.length > 0 && state.colors[ 0 ] !== undefined ) {\n\n\t\t\t\t\t\tbuffergeometry.setAttribute( 'color', new THREE.Float32BufferAttribute( state.colors, 3 ) );\n\t\t\t\t\t\tmaterial.vertexColors = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar points = new THREE.Points( buffergeometry, material );\n\t\t\t\t\tcontainer.add( points );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn container;\n\n\t\t}\n\n\t} );\n\n\treturn OBJLoader;\n\n} )();\n\n},{}],62:[function(_dereq_,module,exports){\nTHREE.BufferGeometryUtils = {\n\n\tcomputeTangents: function ( geometry ) {\n\n\t\tgeometry.computeTangents();\n\t\tconsole.warn( 'THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.' );\n\n\t},\n\n\t/**\n\t * @param {Array<THREE.BufferGeometry>} geometries\n\t * @param {Boolean} useGroups\n\t * @return {THREE.BufferGeometry}\n\t */\n\tmergeBufferGeometries: function ( geometries, useGroups ) {\n\n\t\tvar isIndexed = geometries[ 0 ].index !== null;\n\n\t\tvar attributesUsed = new Set( Object.keys( geometries[ 0 ].attributes ) );\n\t\tvar morphAttributesUsed = new Set( Object.keys( geometries[ 0 ].morphAttributes ) );\n\n\t\tvar attributes = {};\n\t\tvar morphAttributes = {};\n\n\t\tvar morphTargetsRelative = geometries[ 0 ].morphTargetsRelative;\n\n\t\tvar mergedGeometry = new THREE.BufferGeometry();\n\n\t\tvar offset = 0;\n\n\t\tfor ( var i = 0; i < geometries.length; ++ i ) {\n\n\t\t\tvar geometry = geometries[ i ];\n\t\t\tvar attributesCount = 0;\n\n\t\t\t// ensure that all geometries are indexed, or none\n\n\t\t\tif ( isIndexed !== ( geometry.index !== null ) ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\t// gather attributes, exit early if they're different\n\n\t\t\tfor ( var name in geometry.attributes ) {\n\n\t\t\t\tif ( ! attributesUsed.has( name ) ) {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. All geometries must have compatible attributes; make sure \"' + name + '\" attribute exists among all geometries, or in none of them.' );\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t\tif ( attributes[ name ] === undefined ) attributes[ name ] = [];\n\n\t\t\t\tattributes[ name ].push( geometry.attributes[ name ] );\n\n\t\t\t\tattributesCount ++;\n\n\t\t\t}\n\n\t\t\t// ensure geometries have the same number of attributes\n\n\t\t\tif ( attributesCount !== attributesUsed.size ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. Make sure all geometries have the same number of attributes.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\t// gather morph attributes, exit early if they're different\n\n\t\t\tif ( morphTargetsRelative !== geometry.morphTargetsRelative ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. .morphTargetsRelative must be consistent throughout all geometries.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tfor ( var name in geometry.morphAttributes ) {\n\n\t\t\t\tif ( ! morphAttributesUsed.has( name ) ) {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. .morphAttributes must be consistent throughout all geometries.' );\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t\tif ( morphAttributes[ name ] === undefined ) morphAttributes[ name ] = [];\n\n\t\t\t\tmorphAttributes[ name ].push( geometry.morphAttributes[ name ] );\n\n\t\t\t}\n\n\t\t\t// gather .userData\n\n\t\t\tmergedGeometry.userData.mergedUserData = mergedGeometry.userData.mergedUserData || [];\n\t\t\tmergedGeometry.userData.mergedUserData.push( geometry.userData );\n\n\t\t\tif ( useGroups ) {\n\n\t\t\t\tvar count;\n\n\t\t\t\tif ( isIndexed ) {\n\n\t\t\t\t\tcount = geometry.index.count;\n\n\t\t\t\t} else if ( geometry.attributes.position !== undefined ) {\n\n\t\t\t\t\tcount = geometry.attributes.position.count;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. The geometry must have either an index or a position attribute' );\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t\tmergedGeometry.addGroup( offset, count, i );\n\n\t\t\t\toffset += count;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// merge indices\n\n\t\tif ( isIndexed ) {\n\n\t\t\tvar indexOffset = 0;\n\t\t\tvar mergedIndex = [];\n\n\t\t\tfor ( var i = 0; i < geometries.length; ++ i ) {\n\n\t\t\t\tvar index = geometries[ i ].index;\n\n\t\t\t\tfor ( var j = 0; j < index.count; ++ j ) {\n\n\t\t\t\t\tmergedIndex.push( index.getX( j ) + indexOffset );\n\n\t\t\t\t}\n\n\t\t\t\tindexOffset += geometries[ i ].attributes.position.count;\n\n\t\t\t}\n\n\t\t\tmergedGeometry.setIndex( mergedIndex );\n\n\t\t}\n\n\t\t// merge attributes\n\n\t\tfor ( var name in attributes ) {\n\n\t\t\tvar mergedAttribute = this.mergeBufferAttributes( attributes[ name ] );\n\n\t\t\tif ( ! mergedAttribute ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the ' + name + ' attribute.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tmergedGeometry.setAttribute( name, mergedAttribute );\n\n\t\t}\n\n\t\t// merge morph attributes\n\n\t\tfor ( var name in morphAttributes ) {\n\n\t\t\tvar numMorphTargets = morphAttributes[ name ][ 0 ].length;\n\n\t\t\tif ( numMorphTargets === 0 ) break;\n\n\t\t\tmergedGeometry.morphAttributes = mergedGeometry.morphAttributes || {};\n\t\t\tmergedGeometry.morphAttributes[ name ] = [];\n\n\t\t\tfor ( var i = 0; i < numMorphTargets; ++ i ) {\n\n\t\t\t\tvar morphAttributesToMerge = [];\n\n\t\t\t\tfor ( var j = 0; j < morphAttributes[ name ].length; ++ j ) {\n\n\t\t\t\t\tmorphAttributesToMerge.push( morphAttributes[ name ][ j ][ i ] );\n\n\t\t\t\t}\n\n\t\t\t\tvar mergedMorphAttribute = this.mergeBufferAttributes( morphAttributesToMerge );\n\n\t\t\t\tif ( ! mergedMorphAttribute ) {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the ' + name + ' morphAttribute.' );\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t\tmergedGeometry.morphAttributes[ name ].push( mergedMorphAttribute );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn mergedGeometry;\n\n\t},\n\n\t/**\n\t * @param {Array<THREE.BufferAttribute>} attributes\n\t * @return {THREE.BufferAttribute}\n\t */\n\tmergeBufferAttributes: function ( attributes ) {\n\n\t\tvar TypedArray;\n\t\tvar itemSize;\n\t\tvar normalized;\n\t\tvar arrayLength = 0;\n\n\t\tfor ( var i = 0; i < attributes.length; ++ i ) {\n\n\t\t\tvar attribute = attributes[ i ];\n\n\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tif ( TypedArray === undefined ) TypedArray = attribute.array.constructor;\n\t\t\tif ( TypedArray !== attribute.array.constructor ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tif ( itemSize === undefined ) itemSize = attribute.itemSize;\n\t\t\tif ( itemSize !== attribute.itemSize ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tif ( normalized === undefined ) normalized = attribute.normalized;\n\t\t\tif ( normalized !== attribute.normalized ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tarrayLength += attribute.array.length;\n\n\t\t}\n\n\t\tvar array = new TypedArray( arrayLength );\n\t\tvar offset = 0;\n\n\t\tfor ( var i = 0; i < attributes.length; ++ i ) {\n\n\t\t\tarray.set( attributes[ i ].array, offset );\n\n\t\t\toffset += attributes[ i ].array.length;\n\n\t\t}\n\n\t\treturn new THREE.BufferAttribute( array, itemSize, normalized );\n\n\t},\n\n\t/**\n\t * @param {Array<THREE.BufferAttribute>} attributes\n\t * @return {Array<THREE.InterleavedBufferAttribute>}\n\t */\n\tinterleaveAttributes: function ( attributes ) {\n\n\t\t// Interleaves the provided attributes into an InterleavedBuffer and returns\n\t\t// a set of InterleavedBufferAttributes for each attribute\n\t\tvar TypedArray;\n\t\tvar arrayLength = 0;\n\t\tvar stride = 0;\n\n\t\t// calculate the the length and type of the interleavedBuffer\n\t\tfor ( var i = 0, l = attributes.length; i < l; ++ i ) {\n\n\t\t\tvar attribute = attributes[ i ];\n\n\t\t\tif ( TypedArray === undefined ) TypedArray = attribute.array.constructor;\n\t\t\tif ( TypedArray !== attribute.array.constructor ) {\n\n\t\t\t\tconsole.error( 'AttributeBuffers of different types cannot be interleaved' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tarrayLength += attribute.array.length;\n\t\t\tstride += attribute.itemSize;\n\n\t\t}\n\n\t\t// Create the set of buffer attributes\n\t\tvar interleavedBuffer = new THREE.InterleavedBuffer( new TypedArray( arrayLength ), stride );\n\t\tvar offset = 0;\n\t\tvar res = [];\n\t\tvar getters = [ 'getX', 'getY', 'getZ', 'getW' ];\n\t\tvar setters = [ 'setX', 'setY', 'setZ', 'setW' ];\n\n\t\tfor ( var j = 0, l = attributes.length; j < l; j ++ ) {\n\n\t\t\tvar attribute = attributes[ j ];\n\t\t\tvar itemSize = attribute.itemSize;\n\t\t\tvar count = attribute.count;\n\t\t\tvar iba = new THREE.InterleavedBufferAttribute( interleavedBuffer, itemSize, offset, attribute.normalized );\n\t\t\tres.push( iba );\n\n\t\t\toffset += itemSize;\n\n\t\t\t// Move the data for each attribute into the new interleavedBuffer\n\t\t\t// at the appropriate offset\n\t\t\tfor ( var c = 0; c < count; c ++ ) {\n\n\t\t\t\tfor ( var k = 0; k < itemSize; k ++ ) {\n\n\t\t\t\t\tiba[ setters[ k ] ]( c, attribute[ getters[ k ] ]( c ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn res;\n\n\t},\n\n\t/**\n\t * @param {Array<THREE.BufferGeometry>} geometry\n\t * @return {number}\n\t */\n\testimateBytesUsed: function ( geometry ) {\n\n\t\t// Return the estimated memory used by this geometry in bytes\n\t\t// Calculate using itemSize, count, and BYTES_PER_ELEMENT to account\n\t\t// for InterleavedBufferAttributes.\n\t\tvar mem = 0;\n\t\tfor ( var name in geometry.attributes ) {\n\n\t\t\tvar attr = geometry.getAttribute( name );\n\t\t\tmem += attr.count * attr.itemSize * attr.array.BYTES_PER_ELEMENT;\n\n\t\t}\n\n\t\tvar indices = geometry.getIndex();\n\t\tmem += indices ? indices.count * indices.itemSize * indices.array.BYTES_PER_ELEMENT : 0;\n\t\treturn mem;\n\n\t},\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {number} tolerance\n\t * @return {THREE.BufferGeometry>}\n\t */\n\tmergeVertices: function ( geometry, tolerance = 1e-4 ) {\n\n\t\ttolerance = Math.max( tolerance, Number.EPSILON );\n\n\t\t// Generate an index buffer if the geometry doesn't have one, or optimize it\n\t\t// if it's already available.\n\t\tvar hashToIndex = {};\n\t\tvar indices = geometry.getIndex();\n\t\tvar positions = geometry.getAttribute( 'position' );\n\t\tvar vertexCount = indices ? indices.count : positions.count;\n\n\t\t// next value for triangle indices\n\t\tvar nextIndex = 0;\n\n\t\t// attributes and new attribute arrays\n\t\tvar attributeNames = Object.keys( geometry.attributes );\n\t\tvar attrArrays = {};\n\t\tvar morphAttrsArrays = {};\n\t\tvar newIndices = [];\n\t\tvar getters = [ 'getX', 'getY', 'getZ', 'getW' ];\n\n\t\t// initialize the arrays\n\t\tfor ( var i = 0, l = attributeNames.length; i < l; i ++ ) {\n\n\t\t\tvar name = attributeNames[ i ];\n\n\t\t\tattrArrays[ name ] = [];\n\n\t\t\tvar morphAttr = geometry.morphAttributes[ name ];\n\t\t\tif ( morphAttr ) {\n\n\t\t\t\tmorphAttrsArrays[ name ] = new Array( morphAttr.length ).fill().map( () => [] );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// convert the error tolerance to an amount of decimal places to truncate to\n\t\tvar decimalShift = Math.log10( 1 / tolerance );\n\t\tvar shiftMultiplier = Math.pow( 10, decimalShift );\n\t\tfor ( var i = 0; i < vertexCount; i ++ ) {\n\n\t\t\tvar index = indices ? indices.getX( i ) : i;\n\n\t\t\t// Generate a hash for the vertex attributes at the current index 'i'\n\t\t\tvar hash = '';\n\t\t\tfor ( var j = 0, l = attributeNames.length; j < l; j ++ ) {\n\n\t\t\t\tvar name = attributeNames[ j ];\n\t\t\t\tvar attribute = geometry.getAttribute( name );\n\t\t\t\tvar itemSize = attribute.itemSize;\n\n\t\t\t\tfor ( var k = 0; k < itemSize; k ++ ) {\n\n\t\t\t\t\t// double tilde truncates the decimal value\n\t\t\t\t\thash += `${ ~ ~ ( attribute[ getters[ k ] ]( index ) * shiftMultiplier ) },`;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Add another reference to the vertex if it's already\n\t\t\t// used by another index\n\t\t\tif ( hash in hashToIndex ) {\n\n\t\t\t\tnewIndices.push( hashToIndex[ hash ] );\n\n\t\t\t} else {\n\n\t\t\t\t// copy data to the new index in the attribute arrays\n\t\t\t\tfor ( var j = 0, l = attributeNames.length; j < l; j ++ ) {\n\n\t\t\t\t\tvar name = attributeNames[ j ];\n\t\t\t\t\tvar attribute = geometry.getAttribute( name );\n\t\t\t\t\tvar morphAttr = geometry.morphAttributes[ name ];\n\t\t\t\t\tvar itemSize = attribute.itemSize;\n\t\t\t\t\tvar newarray = attrArrays[ name ];\n\t\t\t\t\tvar newMorphArrays = morphAttrsArrays[ name ];\n\n\t\t\t\t\tfor ( var k = 0; k < itemSize; k ++ ) {\n\n\t\t\t\t\t\tvar getterFunc = getters[ k ];\n\t\t\t\t\t\tnewarray.push( attribute[ getterFunc ]( index ) );\n\n\t\t\t\t\t\tif ( morphAttr ) {\n\n\t\t\t\t\t\t\tfor ( var m = 0, ml = morphAttr.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\t\t\tnewMorphArrays[ m ].push( morphAttr[ m ][ getterFunc ]( index ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\thashToIndex[ hash ] = nextIndex;\n\t\t\t\tnewIndices.push( nextIndex );\n\t\t\t\tnextIndex ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Generate typed arrays from new attribute arrays and update\n\t\t// the attributeBuffers\n\t\tconst result = geometry.clone();\n\t\tfor ( var i = 0, l = attributeNames.length; i < l; i ++ ) {\n\n\t\t\tvar name = attributeNames[ i ];\n\t\t\tvar oldAttribute = geometry.getAttribute( name );\n\n\t\t\tvar buffer = new oldAttribute.array.constructor( attrArrays[ name ] );\n\t\t\tvar attribute = new THREE.BufferAttribute( buffer, oldAttribute.itemSize, oldAttribute.normalized );\n\n\t\t\tresult.setAttribute( name, attribute );\n\n\t\t\t// Update the attribute arrays\n\t\t\tif ( name in morphAttrsArrays ) {\n\n\t\t\t\tfor ( var j = 0; j < morphAttrsArrays[ name ].length; j ++ ) {\n\n\t\t\t\t\tvar oldMorphAttribute = geometry.morphAttributes[ name ][ j ];\n\n\t\t\t\t\tvar buffer = new oldMorphAttribute.array.constructor( morphAttrsArrays[ name ][ j ] );\n\t\t\t\t\tvar morphAttribute = new THREE.BufferAttribute( buffer, oldMorphAttribute.itemSize, oldMorphAttribute.normalized );\n\t\t\t\t\tresult.morphAttributes[ name ][ j ] = morphAttribute;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// indices\n\n\t\tresult.setIndex( newIndices );\n\n\t\treturn result;\n\n\t},\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {number} drawMode\n\t * @return {THREE.BufferGeometry>}\n\t */\n\ttoTrianglesDrawMode: function ( geometry, drawMode ) {\n\n\t\tif ( drawMode === THREE.TrianglesDrawMode ) {\n\n\t\t\tconsole.warn( 'THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.' );\n\t\t\treturn geometry;\n\n\t\t}\n\n\t\tif ( drawMode === THREE.TriangleFanDrawMode || drawMode === THREE.TriangleStripDrawMode ) {\n\n\t\t\tvar index = geometry.getIndex();\n\n\t\t\t// generate index if not present\n\n\t\t\tif ( index === null ) {\n\n\t\t\t\tvar indices = [];\n\n\t\t\t\tvar position = geometry.getAttribute( 'position' );\n\n\t\t\t\tif ( position !== undefined ) {\n\n\t\t\t\t\tfor ( var i = 0; i < position.count; i ++ ) {\n\n\t\t\t\t\t\tindices.push( i );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.setIndex( indices );\n\t\t\t\t\tindex = geometry.getIndex();\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.' );\n\t\t\t\t\treturn geometry;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tvar numberOfTriangles = index.count - 2;\n\t\t\tvar newIndices = [];\n\n\t\t\tif ( drawMode === THREE.TriangleFanDrawMode ) {\n\n\t\t\t\t// gl.TRIANGLE_FAN\n\n\t\t\t\tfor ( var i = 1; i <= numberOfTriangles; i ++ ) {\n\n\t\t\t\t\tnewIndices.push( index.getX( 0 ) );\n\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// gl.TRIANGLE_STRIP\n\n\t\t\t\tfor ( var i = 0; i < numberOfTriangles; i ++ ) {\n\n\t\t\t\t\tif ( i % 2 === 0 ) {\n\n\t\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\t\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\t\t\t\t\t\tnewIndices.push( index.getX( i + 2 ) );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tnewIndices.push( index.getX( i + 2 ) );\n\t\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\t\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( ( newIndices.length / 3 ) !== numberOfTriangles ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.' );\n\n\t\t\t}\n\n\t\t\t// build final geometry\n\n\t\t\tvar newGeometry = geometry.clone();\n\t\t\tnewGeometry.setIndex( newIndices );\n\t\t\tnewGeometry.clearGroups();\n\n\t\t\treturn newGeometry;\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:', drawMode );\n\t\t\treturn geometry;\n\n\t\t}\n\n\t},\n\n\t/**\n\t * Calculates the morphed attributes of a morphed/skinned BufferGeometry.\n\t * Helpful for Raytracing or Decals.\n\t * @param {Mesh | Line | Points} object An instance of Mesh, Line or Points.\n\t * @return {Object} An Object with original position/normal attributes and morphed ones.\n\t */\n\tcomputeMorphedAttributes: function ( object ) {\n\n\t\tif ( object.geometry.isBufferGeometry !== true ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometryUtils: Geometry is not of type THREE.BufferGeometry.' );\n\t\t\treturn null;\n\n\t\t}\n\n\t\tvar _vA = new THREE.Vector3();\n\t\tvar _vB = new THREE.Vector3();\n\t\tvar _vC = new THREE.Vector3();\n\n\t\tvar _tempA = new THREE.Vector3();\n\t\tvar _tempB = new THREE.Vector3();\n\t\tvar _tempC = new THREE.Vector3();\n\n\t\tvar _morphA = new THREE.Vector3();\n\t\tvar _morphB = new THREE.Vector3();\n\t\tvar _morphC = new THREE.Vector3();\n\n\t\tfunction _calculateMorphedAttributeData(\n\t\t\tobject,\n\t\t\tmaterial,\n\t\t\tattribute,\n\t\t\tmorphAttribute,\n\t\t\tmorphTargetsRelative,\n\t\t\ta,\n\t\t\tb,\n\t\t\tc,\n\t\t\tmodifiedAttributeArray\n\t\t) {\n\n\t\t\t_vA.fromBufferAttribute( attribute, a );\n\t\t\t_vB.fromBufferAttribute( attribute, b );\n\t\t\t_vC.fromBufferAttribute( attribute, c );\n\n\t\t\tvar morphInfluences = object.morphTargetInfluences;\n\n\t\t\tif ( material.morphTargets && morphAttribute && morphInfluences ) {\n\n\t\t\t\t_morphA.set( 0, 0, 0 );\n\t\t\t\t_morphB.set( 0, 0, 0 );\n\t\t\t\t_morphC.set( 0, 0, 0 );\n\n\t\t\t\tfor ( var i = 0, il = morphAttribute.length; i < il; i ++ ) {\n\n\t\t\t\t\tvar influence = morphInfluences[ i ];\n\t\t\t\t\tvar morphAttribute = morphAttribute[ i ];\n\n\t\t\t\t\tif ( influence === 0 ) continue;\n\n\t\t\t\t\t_tempA.fromBufferAttribute( morphAttribute, a );\n\t\t\t\t\t_tempB.fromBufferAttribute( morphAttribute, b );\n\t\t\t\t\t_tempC.fromBufferAttribute( morphAttribute, c );\n\n\t\t\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t\t\t_morphA.addScaledVector( _tempA, influence );\n\t\t\t\t\t\t_morphB.addScaledVector( _tempB, influence );\n\t\t\t\t\t\t_morphC.addScaledVector( _tempC, influence );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_morphA.addScaledVector( _tempA.sub( _vA ), influence );\n\t\t\t\t\t\t_morphB.addScaledVector( _tempB.sub( _vB ), influence );\n\t\t\t\t\t\t_morphC.addScaledVector( _tempC.sub( _vC ), influence );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t_vA.add( _morphA );\n\t\t\t\t_vB.add( _morphB );\n\t\t\t\t_vC.add( _morphC );\n\n\t\t\t}\n\n\t\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\t\tobject.boneTransform( a, _vA );\n\t\t\t\tobject.boneTransform( b, _vB );\n\t\t\t\tobject.boneTransform( c, _vC );\n\n\t\t\t}\n\n\t\t\tmodifiedAttributeArray[ a * 3 + 0 ] = _vA.x;\n\t\t\tmodifiedAttributeArray[ a * 3 + 1 ] = _vA.y;\n\t\t\tmodifiedAttributeArray[ a * 3 + 2 ] = _vA.z;\n\t\t\tmodifiedAttributeArray[ b * 3 + 0 ] = _vB.x;\n\t\t\tmodifiedAttributeArray[ b * 3 + 1 ] = _vB.y;\n\t\t\tmodifiedAttributeArray[ b * 3 + 2 ] = _vB.z;\n\t\t\tmodifiedAttributeArray[ c * 3 + 0 ] = _vC.x;\n\t\t\tmodifiedAttributeArray[ c * 3 + 1 ] = _vC.y;\n\t\t\tmodifiedAttributeArray[ c * 3 + 2 ] = _vC.z;\n\n\t\t}\n\n\t\tvar geometry = object.geometry;\n\t\tvar material = object.material;\n\n\t\tvar a, b, c;\n\t\tvar index = geometry.index;\n\t\tvar positionAttribute = geometry.attributes.position;\n\t\tvar morphPosition = geometry.morphAttributes.position;\n\t\tvar morphTargetsRelative = geometry.morphTargetsRelative;\n\t\tvar normalAttribute = geometry.attributes.normal;\n\t\tvar morphNormal = geometry.morphAttributes.position;\n\n\t\tvar groups = geometry.groups;\n\t\tvar drawRange = geometry.drawRange;\n\t\tvar i, j, il, jl;\n\t\tvar group, groupMaterial;\n\t\tvar start, end;\n\n\t\tvar modifiedPosition = new Float32Array( positionAttribute.count * positionAttribute.itemSize );\n\t\tvar modifiedNormal = new Float32Array( normalAttribute.count * normalAttribute.itemSize );\n\n\t\tif ( index !== null ) {\n\n\t\t\t// indexed buffer geometry\n\n\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\tfor ( i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\tgroup = groups[ i ];\n\t\t\t\t\tgroupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\tstart = Math.max( group.start, drawRange.start );\n\t\t\t\t\tend = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\tfor ( j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\ta = index.getX( j );\n\t\t\t\t\t\tb = index.getX( j + 1 );\n\t\t\t\t\t\tc = index.getX( j + 2 );\n\n\t\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\t\tobject,\n\t\t\t\t\t\t\tgroupMaterial,\n\t\t\t\t\t\t\tpositionAttribute,\n\t\t\t\t\t\t\tmorphPosition,\n\t\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\t\tmodifiedPosition\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\t\tobject,\n\t\t\t\t\t\t\tgroupMaterial,\n\t\t\t\t\t\t\tnormalAttribute,\n\t\t\t\t\t\t\tmorphNormal,\n\t\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\t\tmodifiedNormal\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstart = Math.max( 0, drawRange.start );\n\t\t\t\tend = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\ta = index.getX( i );\n\t\t\t\t\tb = index.getX( i + 1 );\n\t\t\t\t\tc = index.getX( i + 2 );\n\n\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tmaterial,\n\t\t\t\t\t\tpositionAttribute,\n\t\t\t\t\t\tmorphPosition,\n\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\tmodifiedPosition\n\t\t\t\t\t);\n\n\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tmaterial,\n\t\t\t\t\t\tnormalAttribute,\n\t\t\t\t\t\tmorphNormal,\n\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\tmodifiedNormal\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( positionAttribute !== undefined ) {\n\n\t\t\t// non-indexed buffer geometry\n\n\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\tfor ( i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\tgroup = groups[ i ];\n\t\t\t\t\tgroupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\tstart = Math.max( group.start, drawRange.start );\n\t\t\t\t\tend = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\tfor ( j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\ta = j;\n\t\t\t\t\t\tb = j + 1;\n\t\t\t\t\t\tc = j + 2;\n\n\t\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\t\tobject,\n\t\t\t\t\t\t\tgroupMaterial,\n\t\t\t\t\t\t\tpositionAttribute,\n\t\t\t\t\t\t\tmorphPosition,\n\t\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\t\tmodifiedPosition\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\t\tobject,\n\t\t\t\t\t\t\tgroupMaterial,\n\t\t\t\t\t\t\tnormalAttribute,\n\t\t\t\t\t\t\tmorphNormal,\n\t\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\t\tmodifiedNormal\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstart = Math.max( 0, drawRange.start );\n\t\t\t\tend = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\ta = i;\n\t\t\t\t\tb = i + 1;\n\t\t\t\t\tc = i + 2;\n\n\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tmaterial,\n\t\t\t\t\t\tpositionAttribute,\n\t\t\t\t\t\tmorphPosition,\n\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\tmodifiedPosition\n\t\t\t\t\t);\n\n\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tmaterial,\n\t\t\t\t\t\tnormalAttribute,\n\t\t\t\t\t\tmorphNormal,\n\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\tmodifiedNormal\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tvar morphedPositionAttribute = new THREE.Float32BufferAttribute( modifiedPosition, 3 );\n\t\tvar morphedNormalAttribute = new THREE.Float32BufferAttribute( modifiedNormal, 3 );\n\n\t\treturn {\n\n\t\t\tpositionAttribute: positionAttribute,\n\t\t\tnormalAttribute: normalAttribute,\n\t\t\tmorphedPositionAttribute: morphedPositionAttribute,\n\t\t\tmorphedNormalAttribute: morphedNormalAttribute\n\n\t\t};\n\n\t}\n\n};\n\n},{}],63:[function(_dereq_,module,exports){\nvar createLayout = _dereq_('layout-bmfont-text')\nvar inherits = _dereq_('inherits')\nvar createIndices = _dereq_('quad-indices')\nvar buffer = _dereq_('three-buffer-vertex-data')\nvar assign = _dereq_('object-assign')\n\nvar vertices = _dereq_('./lib/vertices')\nvar utils = _dereq_('./lib/utils')\n\nvar Base = THREE.BufferGeometry\n\nmodule.exports = function createTextGeometry (opt) {\n return new TextGeometry(opt)\n}\n\nfunction TextGeometry (opt) {\n Base.call(this)\n\n if (typeof opt === 'string') {\n opt = { text: opt }\n }\n\n // use these as default values for any subsequent\n // calls to update()\n this._opt = assign({}, opt)\n\n // also do an initial setup...\n if (opt) this.update(opt)\n}\n\ninherits(TextGeometry, Base)\n\nTextGeometry.prototype.update = function (opt) {\n if (typeof opt === 'string') {\n opt = { text: opt }\n }\n\n // use constructor defaults\n opt = assign({}, this._opt, opt)\n\n if (!opt.font) {\n throw new TypeError('must specify a { font } in options')\n }\n\n this.layout = createLayout(opt)\n\n // get vec2 texcoords\n var flipY = opt.flipY !== false\n\n // the desired BMFont data\n var font = opt.font\n\n // determine texture size from font file\n var texWidth = font.common.scaleW\n var texHeight = font.common.scaleH\n\n // get visible glyphs\n var glyphs = this.layout.glyphs.filter(function (glyph) {\n var bitmap = glyph.data\n return bitmap.width * bitmap.height > 0\n })\n\n // provide visible glyphs for convenience\n this.visibleGlyphs = glyphs\n\n // get common vertex data\n var positions = vertices.positions(glyphs)\n var uvs = vertices.uvs(glyphs, texWidth, texHeight, flipY)\n var indices = createIndices({\n clockwise: true,\n type: 'uint16',\n count: glyphs.length\n })\n\n // update vertex data\n buffer.index(this, indices, 1, 'uint16')\n buffer.attr(this, 'position', positions, 2)\n buffer.attr(this, 'uv', uvs, 2)\n\n // update multipage data\n if (!opt.multipage && 'page' in this.attributes) {\n // disable multipage rendering\n this.removeAttribute('page')\n } else if (opt.multipage) {\n var pages = vertices.pages(glyphs)\n // enable multipage rendering\n buffer.attr(this, 'page', pages, 1)\n }\n}\n\nTextGeometry.prototype.computeBoundingSphere = function () {\n if (this.boundingSphere === null) {\n this.boundingSphere = new THREE.Sphere()\n }\n\n var positions = this.attributes.position.array\n var itemSize = this.attributes.position.itemSize\n if (!positions || !itemSize || positions.length < 2) {\n this.boundingSphere.radius = 0\n this.boundingSphere.center.set(0, 0, 0)\n return\n }\n utils.computeSphere(positions, this.boundingSphere)\n if (isNaN(this.boundingSphere.radius)) {\n console.error('THREE.BufferGeometry.computeBoundingSphere(): ' +\n 'Computed radius is NaN. The ' +\n '\"position\" attribute is likely to have NaN values.')\n }\n}\n\nTextGeometry.prototype.computeBoundingBox = function () {\n if (this.boundingBox === null) {\n this.boundingBox = new THREE.Box3()\n }\n\n var bbox = this.boundingBox\n var positions = this.attributes.position.array\n var itemSize = this.attributes.position.itemSize\n if (!positions || !itemSize || positions.length < 2) {\n bbox.makeEmpty()\n return\n }\n utils.computeBox(positions, bbox)\n}\n\n},{\"./lib/utils\":64,\"./lib/vertices\":65,\"inherits\":30,\"layout-bmfont-text\":36,\"object-assign\":39,\"quad-indices\":51,\"three-buffer-vertex-data\":66}],64:[function(_dereq_,module,exports){\nvar itemSize = 2\nvar box = { min: [0, 0], max: [0, 0] }\n\nfunction bounds (positions) {\n var count = positions.length / itemSize\n box.min[0] = positions[0]\n box.min[1] = positions[1]\n box.max[0] = positions[0]\n box.max[1] = positions[1]\n\n for (var i = 0; i < count; i++) {\n var x = positions[i * itemSize + 0]\n var y = positions[i * itemSize + 1]\n box.min[0] = Math.min(x, box.min[0])\n box.min[1] = Math.min(y, box.min[1])\n box.max[0] = Math.max(x, box.max[0])\n box.max[1] = Math.max(y, box.max[1])\n }\n}\n\nmodule.exports.computeBox = function (positions, output) {\n bounds(positions)\n output.min.set(box.min[0], box.min[1], 0)\n output.max.set(box.max[0], box.max[1], 0)\n}\n\nmodule.exports.computeSphere = function (positions, output) {\n bounds(positions)\n var minX = box.min[0]\n var minY = box.min[1]\n var maxX = box.max[0]\n var maxY = box.max[1]\n var width = maxX - minX\n var height = maxY - minY\n var length = Math.sqrt(width * width + height * height)\n output.center.set(minX + width / 2, minY + height / 2, 0)\n output.radius = length / 2\n}\n\n},{}],65:[function(_dereq_,module,exports){\nmodule.exports.pages = function pages (glyphs) {\n var pages = new Float32Array(glyphs.length * 4 * 1)\n var i = 0\n glyphs.forEach(function (glyph) {\n var id = glyph.data.page || 0\n pages[i++] = id\n pages[i++] = id\n pages[i++] = id\n pages[i++] = id\n })\n return pages\n}\n\nmodule.exports.uvs = function uvs (glyphs, texWidth, texHeight, flipY) {\n var uvs = new Float32Array(glyphs.length * 4 * 2)\n var i = 0\n glyphs.forEach(function (glyph) {\n var bitmap = glyph.data\n var bw = (bitmap.x + bitmap.width)\n var bh = (bitmap.y + bitmap.height)\n\n // top left position\n var u0 = bitmap.x / texWidth\n var v1 = bitmap.y / texHeight\n var u1 = bw / texWidth\n var v0 = bh / texHeight\n\n if (flipY) {\n v1 = (texHeight - bitmap.y) / texHeight\n v0 = (texHeight - bh) / texHeight\n }\n\n // BL\n uvs[i++] = u0\n uvs[i++] = v1\n // TL\n uvs[i++] = u0\n uvs[i++] = v0\n // TR\n uvs[i++] = u1\n uvs[i++] = v0\n // BR\n uvs[i++] = u1\n uvs[i++] = v1\n })\n return uvs\n}\n\nmodule.exports.positions = function positions (glyphs) {\n var positions = new Float32Array(glyphs.length * 4 * 2)\n var i = 0\n glyphs.forEach(function (glyph) {\n var bitmap = glyph.data\n\n // bottom left position\n var x = glyph.position[0] + bitmap.xoffset\n var y = glyph.position[1] + bitmap.yoffset\n\n // quad size\n var w = bitmap.width\n var h = bitmap.height\n\n // BL\n positions[i++] = x\n positions[i++] = y\n // TL\n positions[i++] = x\n positions[i++] = y + h\n // TR\n positions[i++] = x + w\n positions[i++] = y + h\n // BR\n positions[i++] = x + w\n positions[i++] = y\n })\n return positions\n}\n\n},{}],66:[function(_dereq_,module,exports){\nvar flatten = _dereq_('flatten-vertex-data')\nvar warned = false;\n\nmodule.exports.attr = setAttribute\nmodule.exports.index = setIndex\n\nfunction setIndex (geometry, data, itemSize, dtype) {\n if (typeof itemSize !== 'number') itemSize = 1\n if (typeof dtype !== 'string') dtype = 'uint16'\n\n var isR69 = !geometry.index && typeof geometry.setIndex !== 'function'\n var attrib = isR69 ? geometry.getAttribute('index') : geometry.index\n var newAttrib = updateAttribute(attrib, data, itemSize, dtype)\n if (newAttrib) {\n if (isR69) geometry.addAttribute('index', newAttrib)\n else geometry.index = newAttrib\n }\n}\n\nfunction setAttribute (geometry, key, data, itemSize, dtype) {\n if (typeof itemSize !== 'number') itemSize = 3\n if (typeof dtype !== 'string') dtype = 'float32'\n if (Array.isArray(data) &&\n Array.isArray(data[0]) &&\n data[0].length !== itemSize) {\n throw new Error('Nested vertex array has unexpected size; expected ' +\n itemSize + ' but found ' + data[0].length)\n }\n\n var attrib = geometry.getAttribute(key)\n var newAttrib = updateAttribute(attrib, data, itemSize, dtype)\n geometry.setAttribute(key, newAttrib)\n}\n\nfunction updateAttribute (attrib, data, itemSize, dtype) {\n data = data || []\n\n // create a new array with desired type\n data = flatten(data, dtype)\n\n attrib = new THREE.BufferAttribute(data, itemSize);\n attrib.itemSize = itemSize;\n attrib.needsUpdate = true;\n\n return attrib\n}\n\n// Test whether the attribute needs to be re-created,\n// returns false if we can re-use it as-is.\nfunction rebuildAttribute (attrib, data, itemSize) {\n if (attrib.itemSize !== itemSize) return true\n if (!attrib.array) return true\n var attribLength = attrib.array.length\n if (Array.isArray(data) && Array.isArray(data[0])) {\n // [ [ x, y, z ] ]\n return attribLength !== data.length * itemSize\n } else {\n // [ x, y, z ]\n return attribLength !== data.length\n }\n return false\n}\n\n},{\"flatten-vertex-data\":23}],67:[function(_dereq_,module,exports){\n(function (setImmediate,clearImmediate){\nvar nextTick = _dereq_('process/browser.js').nextTick;\nvar apply = Function.prototype.apply;\nvar slice = Array.prototype.slice;\nvar immediateIds = {};\nvar nextImmediateId = 0;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) { timeout.close(); };\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// That's not how node.js implements it but the exposed api is the same.\nexports.setImmediate = typeof setImmediate === \"function\" ? setImmediate : function(fn) {\n var id = nextImmediateId++;\n var args = arguments.length < 2 ? false : slice.call(arguments, 1);\n\n immediateIds[id] = true;\n\n nextTick(function onNextTick() {\n if (immediateIds[id]) {\n // fn.call() is faster so we optimize for the common use-case\n // @see http://jsperf.com/call-apply-segu\n if (args) {\n fn.apply(null, args);\n } else {\n fn.call(null);\n }\n // Prevent ids from leaking\n exports.clearImmediate(id);\n }\n });\n\n return id;\n};\n\nexports.clearImmediate = typeof clearImmediate === \"function\" ? clearImmediate : function(id) {\n delete immediateIds[id];\n};\n}).call(this,_dereq_(\"timers\").setImmediate,_dereq_(\"timers\").clearImmediate)\n\n},{\"process/browser.js\":49,\"timers\":67}],68:[function(_dereq_,module,exports){\n(function (global){\n/**\n * @license\n * webvr-polyfill\n * Copyright (c) 2015-2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @license\n * cardboard-vr-display\n * Copyright (c) 2015-2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @license\n * webvr-polyfill-dpdb \n * Copyright (c) 2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @license\n * wglu-preserve-state\n * Copyright (c) 2016, Brandon Jones.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * @license\n * nosleep.js\n * Copyright (c) 2017, Rich Tibbett\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.WebVRPolyfill = factory());\n}(this, (function () { 'use strict';\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\n\nfunction unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar isMobile = function isMobile() {\n return (/Android/i.test(navigator.userAgent) || /iPhone|iPad|iPod/i.test(navigator.userAgent)\n );\n};\nvar copyArray = function copyArray(source, dest) {\n for (var i = 0, n = source.length; i < n; i++) {\n dest[i] = source[i];\n }\n};\nvar extend = function extend(dest, src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dest[key] = src[key];\n }\n }\n return dest;\n};\n\nvar cardboardVrDisplay = createCommonjsModule(function (module, exports) {\n/**\n * @license\n * cardboard-vr-display\n * Copyright (c) 2015-2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @license\n * gl-preserve-state\n * Copyright (c) 2016, Brandon Jones.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * @license\n * webvr-polyfill-dpdb\n * Copyright (c) 2015-2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @license\n * nosleep.js\n * Copyright (c) 2017, Rich Tibbett\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n(function (global, factory) {\n\tmodule.exports = factory();\n}(commonjsGlobal, (function () { var classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\nvar MIN_TIMESTEP = 0.001;\nvar MAX_TIMESTEP = 1;\nvar dataUri = function dataUri(mimeType, svg) {\n return 'data:' + mimeType + ',' + encodeURIComponent(svg);\n};\nvar lerp = function lerp(a, b, t) {\n return a + (b - a) * t;\n};\nvar isIOS = function () {\n var isIOS = /iPad|iPhone|iPod/.test(navigator.platform);\n return function () {\n return isIOS;\n };\n}();\nvar isWebViewAndroid = function () {\n var isWebViewAndroid = navigator.userAgent.indexOf('Version') !== -1 && navigator.userAgent.indexOf('Android') !== -1 && navigator.userAgent.indexOf('Chrome') !== -1;\n return function () {\n return isWebViewAndroid;\n };\n}();\nvar isSafari = function () {\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n return function () {\n return isSafari;\n };\n}();\nvar isFirefoxAndroid = function () {\n var isFirefoxAndroid = navigator.userAgent.indexOf('Firefox') !== -1 && navigator.userAgent.indexOf('Android') !== -1;\n return function () {\n return isFirefoxAndroid;\n };\n}();\nvar getChromeVersion = function () {\n var match = navigator.userAgent.match(/.*Chrome\\/([0-9]+)/);\n var value = match ? parseInt(match[1], 10) : null;\n return function () {\n return value;\n };\n}();\nvar isSafariWithoutDeviceMotion = function () {\n var value = false;\n value = isIOS() && isSafari() && navigator.userAgent.indexOf('13_4') !== -1;\n return function () {\n return value;\n };\n}();\nvar isChromeWithoutDeviceMotion = function () {\n var value = false;\n if (getChromeVersion() === 65) {\n var match = navigator.userAgent.match(/.*Chrome\\/([0-9\\.]*)/);\n if (match) {\n var _match$1$split = match[1].split('.'),\n _match$1$split2 = slicedToArray(_match$1$split, 4),\n major = _match$1$split2[0],\n minor = _match$1$split2[1],\n branch = _match$1$split2[2],\n build = _match$1$split2[3];\n value = parseInt(branch, 10) === 3325 && parseInt(build, 10) < 148;\n }\n }\n return function () {\n return value;\n };\n}();\nvar isR7 = function () {\n var isR7 = navigator.userAgent.indexOf('R7 Build') !== -1;\n return function () {\n return isR7;\n };\n}();\nvar isLandscapeMode = function isLandscapeMode() {\n var rtn = window.orientation == 90 || window.orientation == -90;\n return isR7() ? !rtn : rtn;\n};\nvar isTimestampDeltaValid = function isTimestampDeltaValid(timestampDeltaS) {\n if (isNaN(timestampDeltaS)) {\n return false;\n }\n if (timestampDeltaS <= MIN_TIMESTEP) {\n return false;\n }\n if (timestampDeltaS > MAX_TIMESTEP) {\n return false;\n }\n return true;\n};\nvar getScreenWidth = function getScreenWidth() {\n return Math.max(window.screen.width, window.screen.height) * window.devicePixelRatio;\n};\nvar getScreenHeight = function getScreenHeight() {\n return Math.min(window.screen.width, window.screen.height) * window.devicePixelRatio;\n};\nvar requestFullscreen = function requestFullscreen(element) {\n if (isWebViewAndroid()) {\n return false;\n }\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element.webkitRequestFullscreen) {\n element.webkitRequestFullscreen();\n } else if (element.mozRequestFullScreen) {\n element.mozRequestFullScreen();\n } else if (element.msRequestFullscreen) {\n element.msRequestFullscreen();\n } else {\n return false;\n }\n return true;\n};\nvar exitFullscreen = function exitFullscreen() {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n } else {\n return false;\n }\n return true;\n};\nvar getFullscreenElement = function getFullscreenElement() {\n return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n};\nvar linkProgram = function linkProgram(gl, vertexSource, fragmentSource, attribLocationMap) {\n var vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(vertexShader, vertexSource);\n gl.compileShader(vertexShader);\n var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(fragmentShader, fragmentSource);\n gl.compileShader(fragmentShader);\n var program = gl.createProgram();\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n for (var attribName in attribLocationMap) {\n gl.bindAttribLocation(program, attribLocationMap[attribName], attribName);\n }gl.linkProgram(program);\n gl.deleteShader(vertexShader);\n gl.deleteShader(fragmentShader);\n return program;\n};\nvar getProgramUniforms = function getProgramUniforms(gl, program) {\n var uniforms = {};\n var uniformCount = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n var uniformName = '';\n for (var i = 0; i < uniformCount; i++) {\n var uniformInfo = gl.getActiveUniform(program, i);\n uniformName = uniformInfo.name.replace('[0]', '');\n uniforms[uniformName] = gl.getUniformLocation(program, uniformName);\n }\n return uniforms;\n};\nvar orthoMatrix = function orthoMatrix(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n};\nvar isMobile = function isMobile() {\n var check = false;\n (function (a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true;\n })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n};\nvar extend = function extend(dest, src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dest[key] = src[key];\n }\n }\n return dest;\n};\nvar safariCssSizeWorkaround = function safariCssSizeWorkaround(canvas) {\n if (isIOS()) {\n var width = canvas.style.width;\n var height = canvas.style.height;\n canvas.style.width = parseInt(width) + 1 + 'px';\n canvas.style.height = parseInt(height) + 'px';\n setTimeout(function () {\n canvas.style.width = width;\n canvas.style.height = height;\n }, 100);\n }\n window.canvas = canvas;\n};\nvar frameDataFromPose = function () {\n var piOver180 = Math.PI / 180.0;\n var rad45 = Math.PI * 0.25;\n function mat4_perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov ? fov.upDegrees * piOver180 : rad45),\n downTan = Math.tan(fov ? fov.downDegrees * piOver180 : rad45),\n leftTan = Math.tan(fov ? fov.leftDegrees * piOver180 : rad45),\n rightTan = Math.tan(fov ? fov.rightDegrees * piOver180 : rad45),\n xScale = 2.0 / (leftTan + rightTan),\n yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n }\n function mat4_fromRotationTranslation(out, q, v) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n xx = x * x2,\n xy = x * y2,\n xz = x * z2,\n yy = y * y2,\n yz = y * z2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n }\n function mat4_translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2],\n a00,\n a01,\n a02,\n a03,\n a10,\n a11,\n a12,\n a13,\n a20,\n a21,\n a22,\n a23;\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];a01 = a[1];a02 = a[2];a03 = a[3];\n a10 = a[4];a11 = a[5];a12 = a[6];a13 = a[7];\n a20 = a[8];a21 = a[9];a22 = a[10];a23 = a[11];\n out[0] = a00;out[1] = a01;out[2] = a02;out[3] = a03;\n out[4] = a10;out[5] = a11;out[6] = a12;out[7] = a13;\n out[8] = a20;out[9] = a21;out[10] = a22;out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n return out;\n }\n function mat4_invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11],\n a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15],\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n }\n var defaultOrientation = new Float32Array([0, 0, 0, 1]);\n var defaultPosition = new Float32Array([0, 0, 0]);\n function updateEyeMatrices(projection, view, pose, fov, offset, vrDisplay) {\n mat4_perspectiveFromFieldOfView(projection, fov || null, vrDisplay.depthNear, vrDisplay.depthFar);\n var orientation = pose.orientation || defaultOrientation;\n var position = pose.position || defaultPosition;\n mat4_fromRotationTranslation(view, orientation, position);\n if (offset) mat4_translate(view, view, offset);\n mat4_invert(view, view);\n }\n return function (frameData, pose, vrDisplay) {\n if (!frameData || !pose) return false;\n frameData.pose = pose;\n frameData.timestamp = pose.timestamp;\n updateEyeMatrices(frameData.leftProjectionMatrix, frameData.leftViewMatrix, pose, vrDisplay._getFieldOfView(\"left\"), vrDisplay._getEyeOffset(\"left\"), vrDisplay);\n updateEyeMatrices(frameData.rightProjectionMatrix, frameData.rightViewMatrix, pose, vrDisplay._getFieldOfView(\"right\"), vrDisplay._getEyeOffset(\"right\"), vrDisplay);\n return true;\n };\n}();\nvar isInsideCrossOriginIFrame = function isInsideCrossOriginIFrame() {\n var isFramed = window.self !== window.top;\n var refOrigin = getOriginFromUrl(document.referrer);\n var thisOrigin = getOriginFromUrl(window.location.href);\n return isFramed && refOrigin !== thisOrigin;\n};\nvar getOriginFromUrl = function getOriginFromUrl(url) {\n var domainIdx;\n var protoSepIdx = url.indexOf(\"://\");\n if (protoSepIdx !== -1) {\n domainIdx = protoSepIdx + 3;\n } else {\n domainIdx = 0;\n }\n var domainEndIdx = url.indexOf('/', domainIdx);\n if (domainEndIdx === -1) {\n domainEndIdx = url.length;\n }\n return url.substring(0, domainEndIdx);\n};\nvar getQuaternionAngle = function getQuaternionAngle(quat) {\n if (quat.w > 1) {\n console.warn('getQuaternionAngle: w > 1');\n return 0;\n }\n var angle = 2 * Math.acos(quat.w);\n return angle;\n};\nvar warnOnce = function () {\n var observedWarnings = {};\n return function (key, message) {\n if (observedWarnings[key] === undefined) {\n console.warn('webvr-polyfill: ' + message);\n observedWarnings[key] = true;\n }\n };\n}();\nvar deprecateWarning = function deprecateWarning(deprecated, suggested) {\n var alternative = suggested ? 'Please use ' + suggested + ' instead.' : '';\n warnOnce(deprecated, deprecated + ' has been deprecated. ' + 'This may not work on native WebVR displays. ' + alternative);\n};\nfunction WGLUPreserveGLState(gl, bindings, callback) {\n if (!bindings) {\n callback(gl);\n return;\n }\n var boundValues = [];\n var activeTexture = null;\n for (var i = 0; i < bindings.length; ++i) {\n var binding = bindings[i];\n switch (binding) {\n case gl.TEXTURE_BINDING_2D:\n case gl.TEXTURE_BINDING_CUBE_MAP:\n var textureUnit = bindings[++i];\n if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31) {\n console.error(\"TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit\");\n boundValues.push(null, null);\n break;\n }\n if (!activeTexture) {\n activeTexture = gl.getParameter(gl.ACTIVE_TEXTURE);\n }\n gl.activeTexture(textureUnit);\n boundValues.push(gl.getParameter(binding), null);\n break;\n case gl.ACTIVE_TEXTURE:\n activeTexture = gl.getParameter(gl.ACTIVE_TEXTURE);\n boundValues.push(null);\n break;\n default:\n boundValues.push(gl.getParameter(binding));\n break;\n }\n }\n callback(gl);\n for (var i = 0; i < bindings.length; ++i) {\n var binding = bindings[i];\n var boundValue = boundValues[i];\n switch (binding) {\n case gl.ACTIVE_TEXTURE:\n break;\n case gl.ARRAY_BUFFER_BINDING:\n gl.bindBuffer(gl.ARRAY_BUFFER, boundValue);\n break;\n case gl.COLOR_CLEAR_VALUE:\n gl.clearColor(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);\n break;\n case gl.COLOR_WRITEMASK:\n gl.colorMask(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);\n break;\n case gl.CURRENT_PROGRAM:\n gl.useProgram(boundValue);\n break;\n case gl.ELEMENT_ARRAY_BUFFER_BINDING:\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, boundValue);\n break;\n case gl.FRAMEBUFFER_BINDING:\n gl.bindFramebuffer(gl.FRAMEBUFFER, boundValue);\n break;\n case gl.RENDERBUFFER_BINDING:\n gl.bindRenderbuffer(gl.RENDERBUFFER, boundValue);\n break;\n case gl.TEXTURE_BINDING_2D:\n var textureUnit = bindings[++i];\n if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31)\n break;\n gl.activeTexture(textureUnit);\n gl.bindTexture(gl.TEXTURE_2D, boundValue);\n break;\n case gl.TEXTURE_BINDING_CUBE_MAP:\n var textureUnit = bindings[++i];\n if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31)\n break;\n gl.activeTexture(textureUnit);\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, boundValue);\n break;\n case gl.VIEWPORT:\n gl.viewport(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);\n break;\n case gl.BLEND:\n case gl.CULL_FACE:\n case gl.DEPTH_TEST:\n case gl.SCISSOR_TEST:\n case gl.STENCIL_TEST:\n if (boundValue) {\n gl.enable(binding);\n } else {\n gl.disable(binding);\n }\n break;\n default:\n console.log(\"No GL restore behavior for 0x\" + binding.toString(16));\n break;\n }\n if (activeTexture) {\n gl.activeTexture(activeTexture);\n }\n }\n}\nvar glPreserveState = WGLUPreserveGLState;\nvar distortionVS = ['attribute vec2 position;', 'attribute vec3 texCoord;', 'varying vec2 vTexCoord;', 'uniform vec4 viewportOffsetScale[2];', 'void main() {', ' vec4 viewport = viewportOffsetScale[int(texCoord.z)];', ' vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;', ' gl_Position = vec4( position, 1.0, 1.0 );', '}'].join('\\n');\nvar distortionFS = ['precision mediump float;', 'uniform sampler2D diffuse;', 'varying vec2 vTexCoord;', 'void main() {', ' gl_FragColor = texture2D(diffuse, vTexCoord);', '}'].join('\\n');\nfunction CardboardDistorter(gl, cardboardUI, bufferScale, dirtySubmitFrameBindings) {\n this.gl = gl;\n this.cardboardUI = cardboardUI;\n this.bufferScale = bufferScale;\n this.dirtySubmitFrameBindings = dirtySubmitFrameBindings;\n this.ctxAttribs = gl.getContextAttributes();\n this.instanceExt = gl.getExtension('ANGLE_instanced_arrays');\n this.meshWidth = 20;\n this.meshHeight = 20;\n this.bufferWidth = gl.drawingBufferWidth;\n this.bufferHeight = gl.drawingBufferHeight;\n this.realBindFramebuffer = gl.bindFramebuffer;\n this.realEnable = gl.enable;\n this.realDisable = gl.disable;\n this.realColorMask = gl.colorMask;\n this.realClearColor = gl.clearColor;\n this.realViewport = gl.viewport;\n if (!isIOS()) {\n this.realCanvasWidth = Object.getOwnPropertyDescriptor(gl.canvas.__proto__, 'width');\n this.realCanvasHeight = Object.getOwnPropertyDescriptor(gl.canvas.__proto__, 'height');\n }\n this.isPatched = false;\n this.lastBoundFramebuffer = null;\n this.cullFace = false;\n this.depthTest = false;\n this.blend = false;\n this.scissorTest = false;\n this.stencilTest = false;\n this.viewport = [0, 0, 0, 0];\n this.colorMask = [true, true, true, true];\n this.clearColor = [0, 0, 0, 0];\n this.attribs = {\n position: 0,\n texCoord: 1\n };\n this.program = linkProgram(gl, distortionVS, distortionFS, this.attribs);\n this.uniforms = getProgramUniforms(gl, this.program);\n this.viewportOffsetScale = new Float32Array(8);\n this.setTextureBounds();\n this.vertexBuffer = gl.createBuffer();\n this.indexBuffer = gl.createBuffer();\n this.indexCount = 0;\n this.renderTarget = gl.createTexture();\n this.framebuffer = gl.createFramebuffer();\n this.depthStencilBuffer = null;\n this.depthBuffer = null;\n this.stencilBuffer = null;\n if (this.ctxAttribs.depth && this.ctxAttribs.stencil) {\n this.depthStencilBuffer = gl.createRenderbuffer();\n } else if (this.ctxAttribs.depth) {\n this.depthBuffer = gl.createRenderbuffer();\n } else if (this.ctxAttribs.stencil) {\n this.stencilBuffer = gl.createRenderbuffer();\n }\n this.patch();\n this.onResize();\n}\nCardboardDistorter.prototype.destroy = function () {\n var gl = this.gl;\n this.unpatch();\n gl.deleteProgram(this.program);\n gl.deleteBuffer(this.vertexBuffer);\n gl.deleteBuffer(this.indexBuffer);\n gl.deleteTexture(this.renderTarget);\n gl.deleteFramebuffer(this.framebuffer);\n if (this.depthStencilBuffer) {\n gl.deleteRenderbuffer(this.depthStencilBuffer);\n }\n if (this.depthBuffer) {\n gl.deleteRenderbuffer(this.depthBuffer);\n }\n if (this.stencilBuffer) {\n gl.deleteRenderbuffer(this.stencilBuffer);\n }\n if (this.cardboardUI) {\n this.cardboardUI.destroy();\n }\n};\nCardboardDistorter.prototype.onResize = function () {\n var gl = this.gl;\n var self = this;\n var glState = [gl.RENDERBUFFER_BINDING, gl.TEXTURE_BINDING_2D, gl.TEXTURE0];\n glPreserveState(gl, glState, function (gl) {\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, null);\n if (self.scissorTest) {\n self.realDisable.call(gl, gl.SCISSOR_TEST);\n }\n self.realColorMask.call(gl, true, true, true, true);\n self.realViewport.call(gl, 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n self.realClearColor.call(gl, 0, 0, 0, 1);\n gl.clear(gl.COLOR_BUFFER_BIT);\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.framebuffer);\n gl.bindTexture(gl.TEXTURE_2D, self.renderTarget);\n gl.texImage2D(gl.TEXTURE_2D, 0, self.ctxAttribs.alpha ? gl.RGBA : gl.RGB, self.bufferWidth, self.bufferHeight, 0, self.ctxAttribs.alpha ? gl.RGBA : gl.RGB, gl.UNSIGNED_BYTE, null);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, self.renderTarget, 0);\n if (self.ctxAttribs.depth && self.ctxAttribs.stencil) {\n gl.bindRenderbuffer(gl.RENDERBUFFER, self.depthStencilBuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, self.bufferWidth, self.bufferHeight);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, self.depthStencilBuffer);\n } else if (self.ctxAttribs.depth) {\n gl.bindRenderbuffer(gl.RENDERBUFFER, self.depthBuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, self.bufferWidth, self.bufferHeight);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, self.depthBuffer);\n } else if (self.ctxAttribs.stencil) {\n gl.bindRenderbuffer(gl.RENDERBUFFER, self.stencilBuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.STENCIL_INDEX8, self.bufferWidth, self.bufferHeight);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.RENDERBUFFER, self.stencilBuffer);\n }\n if (!gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE) {\n console.error('Framebuffer incomplete!');\n }\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.lastBoundFramebuffer);\n if (self.scissorTest) {\n self.realEnable.call(gl, gl.SCISSOR_TEST);\n }\n self.realColorMask.apply(gl, self.colorMask);\n self.realViewport.apply(gl, self.viewport);\n self.realClearColor.apply(gl, self.clearColor);\n });\n if (this.cardboardUI) {\n this.cardboardUI.onResize();\n }\n};\nCardboardDistorter.prototype.patch = function () {\n if (this.isPatched) {\n return;\n }\n var self = this;\n var canvas = this.gl.canvas;\n var gl = this.gl;\n if (!isIOS()) {\n canvas.width = getScreenWidth() * this.bufferScale;\n canvas.height = getScreenHeight() * this.bufferScale;\n Object.defineProperty(canvas, 'width', {\n configurable: true,\n enumerable: true,\n get: function get() {\n return self.bufferWidth;\n },\n set: function set(value) {\n self.bufferWidth = value;\n self.realCanvasWidth.set.call(canvas, value);\n self.onResize();\n }\n });\n Object.defineProperty(canvas, 'height', {\n configurable: true,\n enumerable: true,\n get: function get() {\n return self.bufferHeight;\n },\n set: function set(value) {\n self.bufferHeight = value;\n self.realCanvasHeight.set.call(canvas, value);\n self.onResize();\n }\n });\n }\n this.lastBoundFramebuffer = gl.getParameter(gl.FRAMEBUFFER_BINDING);\n if (this.lastBoundFramebuffer == null) {\n this.lastBoundFramebuffer = this.framebuffer;\n this.gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);\n }\n this.gl.bindFramebuffer = function (target, framebuffer) {\n self.lastBoundFramebuffer = framebuffer ? framebuffer : self.framebuffer;\n self.realBindFramebuffer.call(gl, target, self.lastBoundFramebuffer);\n };\n this.cullFace = gl.getParameter(gl.CULL_FACE);\n this.depthTest = gl.getParameter(gl.DEPTH_TEST);\n this.blend = gl.getParameter(gl.BLEND);\n this.scissorTest = gl.getParameter(gl.SCISSOR_TEST);\n this.stencilTest = gl.getParameter(gl.STENCIL_TEST);\n gl.enable = function (pname) {\n switch (pname) {\n case gl.CULL_FACE:\n self.cullFace = true;break;\n case gl.DEPTH_TEST:\n self.depthTest = true;break;\n case gl.BLEND:\n self.blend = true;break;\n case gl.SCISSOR_TEST:\n self.scissorTest = true;break;\n case gl.STENCIL_TEST:\n self.stencilTest = true;break;\n }\n self.realEnable.call(gl, pname);\n };\n gl.disable = function (pname) {\n switch (pname) {\n case gl.CULL_FACE:\n self.cullFace = false;break;\n case gl.DEPTH_TEST:\n self.depthTest = false;break;\n case gl.BLEND:\n self.blend = false;break;\n case gl.SCISSOR_TEST:\n self.scissorTest = false;break;\n case gl.STENCIL_TEST:\n self.stencilTest = false;break;\n }\n self.realDisable.call(gl, pname);\n };\n this.colorMask = gl.getParameter(gl.COLOR_WRITEMASK);\n gl.colorMask = function (r, g, b, a) {\n self.colorMask[0] = r;\n self.colorMask[1] = g;\n self.colorMask[2] = b;\n self.colorMask[3] = a;\n self.realColorMask.call(gl, r, g, b, a);\n };\n this.clearColor = gl.getParameter(gl.COLOR_CLEAR_VALUE);\n gl.clearColor = function (r, g, b, a) {\n self.clearColor[0] = r;\n self.clearColor[1] = g;\n self.clearColor[2] = b;\n self.clearColor[3] = a;\n self.realClearColor.call(gl, r, g, b, a);\n };\n this.viewport = gl.getParameter(gl.VIEWPORT);\n gl.viewport = function (x, y, w, h) {\n self.viewport[0] = x;\n self.viewport[1] = y;\n self.viewport[2] = w;\n self.viewport[3] = h;\n self.realViewport.call(gl, x, y, w, h);\n };\n this.isPatched = true;\n safariCssSizeWorkaround(canvas);\n};\nCardboardDistorter.prototype.unpatch = function () {\n if (!this.isPatched) {\n return;\n }\n var gl = this.gl;\n var canvas = this.gl.canvas;\n if (!isIOS()) {\n Object.defineProperty(canvas, 'width', this.realCanvasWidth);\n Object.defineProperty(canvas, 'height', this.realCanvasHeight);\n }\n canvas.width = this.bufferWidth;\n canvas.height = this.bufferHeight;\n gl.bindFramebuffer = this.realBindFramebuffer;\n gl.enable = this.realEnable;\n gl.disable = this.realDisable;\n gl.colorMask = this.realColorMask;\n gl.clearColor = this.realClearColor;\n gl.viewport = this.realViewport;\n if (this.lastBoundFramebuffer == this.framebuffer) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n }\n this.isPatched = false;\n setTimeout(function () {\n safariCssSizeWorkaround(canvas);\n }, 1);\n};\nCardboardDistorter.prototype.setTextureBounds = function (leftBounds, rightBounds) {\n if (!leftBounds) {\n leftBounds = [0, 0, 0.5, 1];\n }\n if (!rightBounds) {\n rightBounds = [0.5, 0, 0.5, 1];\n }\n this.viewportOffsetScale[0] = leftBounds[0];\n this.viewportOffsetScale[1] = leftBounds[1];\n this.viewportOffsetScale[2] = leftBounds[2];\n this.viewportOffsetScale[3] = leftBounds[3];\n this.viewportOffsetScale[4] = rightBounds[0];\n this.viewportOffsetScale[5] = rightBounds[1];\n this.viewportOffsetScale[6] = rightBounds[2];\n this.viewportOffsetScale[7] = rightBounds[3];\n};\nCardboardDistorter.prototype.submitFrame = function () {\n var gl = this.gl;\n var self = this;\n var glState = [];\n if (!this.dirtySubmitFrameBindings) {\n glState.push(gl.CURRENT_PROGRAM, gl.ARRAY_BUFFER_BINDING, gl.ELEMENT_ARRAY_BUFFER_BINDING, gl.TEXTURE_BINDING_2D, gl.TEXTURE0);\n }\n glPreserveState(gl, glState, function (gl) {\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, null);\n var positionDivisor = 0;\n var texCoordDivisor = 0;\n if (self.instanceExt) {\n positionDivisor = gl.getVertexAttrib(self.attribs.position, self.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);\n texCoordDivisor = gl.getVertexAttrib(self.attribs.texCoord, self.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);\n }\n if (self.cullFace) {\n self.realDisable.call(gl, gl.CULL_FACE);\n }\n if (self.depthTest) {\n self.realDisable.call(gl, gl.DEPTH_TEST);\n }\n if (self.blend) {\n self.realDisable.call(gl, gl.BLEND);\n }\n if (self.scissorTest) {\n self.realDisable.call(gl, gl.SCISSOR_TEST);\n }\n if (self.stencilTest) {\n self.realDisable.call(gl, gl.STENCIL_TEST);\n }\n self.realColorMask.call(gl, true, true, true, true);\n self.realViewport.call(gl, 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n if (self.ctxAttribs.alpha || isIOS()) {\n self.realClearColor.call(gl, 0, 0, 0, 1);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n gl.useProgram(self.program);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, self.indexBuffer);\n gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);\n gl.enableVertexAttribArray(self.attribs.position);\n gl.enableVertexAttribArray(self.attribs.texCoord);\n gl.vertexAttribPointer(self.attribs.position, 2, gl.FLOAT, false, 20, 0);\n gl.vertexAttribPointer(self.attribs.texCoord, 3, gl.FLOAT, false, 20, 8);\n if (self.instanceExt) {\n if (positionDivisor != 0) {\n self.instanceExt.vertexAttribDivisorANGLE(self.attribs.position, 0);\n }\n if (texCoordDivisor != 0) {\n self.instanceExt.vertexAttribDivisorANGLE(self.attribs.texCoord, 0);\n }\n }\n gl.activeTexture(gl.TEXTURE0);\n gl.uniform1i(self.uniforms.diffuse, 0);\n gl.bindTexture(gl.TEXTURE_2D, self.renderTarget);\n gl.uniform4fv(self.uniforms.viewportOffsetScale, self.viewportOffsetScale);\n gl.drawElements(gl.TRIANGLES, self.indexCount, gl.UNSIGNED_SHORT, 0);\n if (self.cardboardUI) {\n self.cardboardUI.renderNoState();\n }\n self.realBindFramebuffer.call(self.gl, gl.FRAMEBUFFER, self.framebuffer);\n if (!self.ctxAttribs.preserveDrawingBuffer) {\n self.realClearColor.call(gl, 0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n if (!self.dirtySubmitFrameBindings) {\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.lastBoundFramebuffer);\n }\n if (self.cullFace) {\n self.realEnable.call(gl, gl.CULL_FACE);\n }\n if (self.depthTest) {\n self.realEnable.call(gl, gl.DEPTH_TEST);\n }\n if (self.blend) {\n self.realEnable.call(gl, gl.BLEND);\n }\n if (self.scissorTest) {\n self.realEnable.call(gl, gl.SCISSOR_TEST);\n }\n if (self.stencilTest) {\n self.realEnable.call(gl, gl.STENCIL_TEST);\n }\n self.realColorMask.apply(gl, self.colorMask);\n self.realViewport.apply(gl, self.viewport);\n if (self.ctxAttribs.alpha || !self.ctxAttribs.preserveDrawingBuffer) {\n self.realClearColor.apply(gl, self.clearColor);\n }\n if (self.instanceExt) {\n if (positionDivisor != 0) {\n self.instanceExt.vertexAttribDivisorANGLE(self.attribs.position, positionDivisor);\n }\n if (texCoordDivisor != 0) {\n self.instanceExt.vertexAttribDivisorANGLE(self.attribs.texCoord, texCoordDivisor);\n }\n }\n });\n if (isIOS()) {\n var canvas = gl.canvas;\n if (canvas.width != self.bufferWidth || canvas.height != self.bufferHeight) {\n self.bufferWidth = canvas.width;\n self.bufferHeight = canvas.height;\n self.onResize();\n }\n }\n};\nCardboardDistorter.prototype.updateDeviceInfo = function (deviceInfo) {\n var gl = this.gl;\n var self = this;\n var glState = [gl.ARRAY_BUFFER_BINDING, gl.ELEMENT_ARRAY_BUFFER_BINDING];\n glPreserveState(gl, glState, function (gl) {\n var vertices = self.computeMeshVertices_(self.meshWidth, self.meshHeight, deviceInfo);\n gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\n if (!self.indexCount) {\n var indices = self.computeMeshIndices_(self.meshWidth, self.meshHeight);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, self.indexBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);\n self.indexCount = indices.length;\n }\n });\n};\nCardboardDistorter.prototype.computeMeshVertices_ = function (width, height, deviceInfo) {\n var vertices = new Float32Array(2 * width * height * 5);\n var lensFrustum = deviceInfo.getLeftEyeVisibleTanAngles();\n var noLensFrustum = deviceInfo.getLeftEyeNoLensTanAngles();\n var viewport = deviceInfo.getLeftEyeVisibleScreenRect(noLensFrustum);\n var vidx = 0;\n for (var e = 0; e < 2; e++) {\n for (var j = 0; j < height; j++) {\n for (var i = 0; i < width; i++, vidx++) {\n var u = i / (width - 1);\n var v = j / (height - 1);\n var s = u;\n var t = v;\n var x = lerp(lensFrustum[0], lensFrustum[2], u);\n var y = lerp(lensFrustum[3], lensFrustum[1], v);\n var d = Math.sqrt(x * x + y * y);\n var r = deviceInfo.distortion.distortInverse(d);\n var p = x * r / d;\n var q = y * r / d;\n u = (p - noLensFrustum[0]) / (noLensFrustum[2] - noLensFrustum[0]);\n v = (q - noLensFrustum[3]) / (noLensFrustum[1] - noLensFrustum[3]);\n u = (viewport.x + u * viewport.width - 0.5) * 2.0;\n v = (viewport.y + v * viewport.height - 0.5) * 2.0;\n vertices[vidx * 5 + 0] = u;\n vertices[vidx * 5 + 1] = v;\n vertices[vidx * 5 + 2] = s;\n vertices[vidx * 5 + 3] = t;\n vertices[vidx * 5 + 4] = e;\n }\n }\n var w = lensFrustum[2] - lensFrustum[0];\n lensFrustum[0] = -(w + lensFrustum[0]);\n lensFrustum[2] = w - lensFrustum[2];\n w = noLensFrustum[2] - noLensFrustum[0];\n noLensFrustum[0] = -(w + noLensFrustum[0]);\n noLensFrustum[2] = w - noLensFrustum[2];\n viewport.x = 1 - (viewport.x + viewport.width);\n }\n return vertices;\n};\nCardboardDistorter.prototype.computeMeshIndices_ = function (width, height) {\n var indices = new Uint16Array(2 * (width - 1) * (height - 1) * 6);\n var halfwidth = width / 2;\n var halfheight = height / 2;\n var vidx = 0;\n var iidx = 0;\n for (var e = 0; e < 2; e++) {\n for (var j = 0; j < height; j++) {\n for (var i = 0; i < width; i++, vidx++) {\n if (i == 0 || j == 0) continue;\n if (i <= halfwidth == j <= halfheight) {\n indices[iidx++] = vidx;\n indices[iidx++] = vidx - width - 1;\n indices[iidx++] = vidx - width;\n indices[iidx++] = vidx - width - 1;\n indices[iidx++] = vidx;\n indices[iidx++] = vidx - 1;\n } else {\n indices[iidx++] = vidx - 1;\n indices[iidx++] = vidx - width;\n indices[iidx++] = vidx;\n indices[iidx++] = vidx - width;\n indices[iidx++] = vidx - 1;\n indices[iidx++] = vidx - width - 1;\n }\n }\n }\n }\n return indices;\n};\nCardboardDistorter.prototype.getOwnPropertyDescriptor_ = function (proto, attrName) {\n var descriptor = Object.getOwnPropertyDescriptor(proto, attrName);\n if (descriptor.get === undefined || descriptor.set === undefined) {\n descriptor.configurable = true;\n descriptor.enumerable = true;\n descriptor.get = function () {\n return this.getAttribute(attrName);\n };\n descriptor.set = function (val) {\n this.setAttribute(attrName, val);\n };\n }\n return descriptor;\n};\nvar uiVS = ['attribute vec2 position;', 'uniform mat4 projectionMat;', 'void main() {', ' gl_Position = projectionMat * vec4( position, -1.0, 1.0 );', '}'].join('\\n');\nvar uiFS = ['precision mediump float;', 'uniform vec4 color;', 'void main() {', ' gl_FragColor = color;', '}'].join('\\n');\nvar DEG2RAD = Math.PI / 180.0;\nvar kAnglePerGearSection = 60;\nvar kOuterRimEndAngle = 12;\nvar kInnerRimBeginAngle = 20;\nvar kOuterRadius = 1;\nvar kMiddleRadius = 0.75;\nvar kInnerRadius = 0.3125;\nvar kCenterLineThicknessDp = 4;\nvar kButtonWidthDp = 28;\nvar kTouchSlopFactor = 1.5;\nfunction CardboardUI(gl) {\n this.gl = gl;\n this.attribs = {\n position: 0\n };\n this.program = linkProgram(gl, uiVS, uiFS, this.attribs);\n this.uniforms = getProgramUniforms(gl, this.program);\n this.vertexBuffer = gl.createBuffer();\n this.gearOffset = 0;\n this.gearVertexCount = 0;\n this.arrowOffset = 0;\n this.arrowVertexCount = 0;\n this.projMat = new Float32Array(16);\n this.listener = null;\n this.onResize();\n}\nCardboardUI.prototype.destroy = function () {\n var gl = this.gl;\n if (this.listener) {\n gl.canvas.removeEventListener('click', this.listener, false);\n }\n gl.deleteProgram(this.program);\n gl.deleteBuffer(this.vertexBuffer);\n};\nCardboardUI.prototype.listen = function (optionsCallback, backCallback) {\n var canvas = this.gl.canvas;\n this.listener = function (event) {\n var midline = canvas.clientWidth / 2;\n var buttonSize = kButtonWidthDp * kTouchSlopFactor;\n if (event.clientX > midline - buttonSize && event.clientX < midline + buttonSize && event.clientY > canvas.clientHeight - buttonSize) {\n optionsCallback(event);\n }\n else if (event.clientX < buttonSize && event.clientY < buttonSize) {\n backCallback(event);\n }\n };\n canvas.addEventListener('click', this.listener, false);\n};\nCardboardUI.prototype.onResize = function () {\n var gl = this.gl;\n var self = this;\n var glState = [gl.ARRAY_BUFFER_BINDING];\n glPreserveState(gl, glState, function (gl) {\n var vertices = [];\n var midline = gl.drawingBufferWidth / 2;\n var physicalPixels = Math.max(screen.width, screen.height) * window.devicePixelRatio;\n var scalingRatio = gl.drawingBufferWidth / physicalPixels;\n var dps = scalingRatio * window.devicePixelRatio;\n var lineWidth = kCenterLineThicknessDp * dps / 2;\n var buttonSize = kButtonWidthDp * kTouchSlopFactor * dps;\n var buttonScale = kButtonWidthDp * dps / 2;\n var buttonBorder = (kButtonWidthDp * kTouchSlopFactor - kButtonWidthDp) * dps;\n vertices.push(midline - lineWidth, buttonSize);\n vertices.push(midline - lineWidth, gl.drawingBufferHeight);\n vertices.push(midline + lineWidth, buttonSize);\n vertices.push(midline + lineWidth, gl.drawingBufferHeight);\n self.gearOffset = vertices.length / 2;\n function addGearSegment(theta, r) {\n var angle = (90 - theta) * DEG2RAD;\n var x = Math.cos(angle);\n var y = Math.sin(angle);\n vertices.push(kInnerRadius * x * buttonScale + midline, kInnerRadius * y * buttonScale + buttonScale);\n vertices.push(r * x * buttonScale + midline, r * y * buttonScale + buttonScale);\n }\n for (var i = 0; i <= 6; i++) {\n var segmentTheta = i * kAnglePerGearSection;\n addGearSegment(segmentTheta, kOuterRadius);\n addGearSegment(segmentTheta + kOuterRimEndAngle, kOuterRadius);\n addGearSegment(segmentTheta + kInnerRimBeginAngle, kMiddleRadius);\n addGearSegment(segmentTheta + (kAnglePerGearSection - kInnerRimBeginAngle), kMiddleRadius);\n addGearSegment(segmentTheta + (kAnglePerGearSection - kOuterRimEndAngle), kOuterRadius);\n }\n self.gearVertexCount = vertices.length / 2 - self.gearOffset;\n self.arrowOffset = vertices.length / 2;\n function addArrowVertex(x, y) {\n vertices.push(buttonBorder + x, gl.drawingBufferHeight - buttonBorder - y);\n }\n var angledLineWidth = lineWidth / Math.sin(45 * DEG2RAD);\n addArrowVertex(0, buttonScale);\n addArrowVertex(buttonScale, 0);\n addArrowVertex(buttonScale + angledLineWidth, angledLineWidth);\n addArrowVertex(angledLineWidth, buttonScale + angledLineWidth);\n addArrowVertex(angledLineWidth, buttonScale - angledLineWidth);\n addArrowVertex(0, buttonScale);\n addArrowVertex(buttonScale, buttonScale * 2);\n addArrowVertex(buttonScale + angledLineWidth, buttonScale * 2 - angledLineWidth);\n addArrowVertex(angledLineWidth, buttonScale - angledLineWidth);\n addArrowVertex(0, buttonScale);\n addArrowVertex(angledLineWidth, buttonScale - lineWidth);\n addArrowVertex(kButtonWidthDp * dps, buttonScale - lineWidth);\n addArrowVertex(angledLineWidth, buttonScale + lineWidth);\n addArrowVertex(kButtonWidthDp * dps, buttonScale + lineWidth);\n self.arrowVertexCount = vertices.length / 2 - self.arrowOffset;\n gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n });\n};\nCardboardUI.prototype.render = function () {\n var gl = this.gl;\n var self = this;\n var glState = [gl.CULL_FACE, gl.DEPTH_TEST, gl.BLEND, gl.SCISSOR_TEST, gl.STENCIL_TEST, gl.COLOR_WRITEMASK, gl.VIEWPORT, gl.CURRENT_PROGRAM, gl.ARRAY_BUFFER_BINDING];\n glPreserveState(gl, glState, function (gl) {\n gl.disable(gl.CULL_FACE);\n gl.disable(gl.DEPTH_TEST);\n gl.disable(gl.BLEND);\n gl.disable(gl.SCISSOR_TEST);\n gl.disable(gl.STENCIL_TEST);\n gl.colorMask(true, true, true, true);\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n self.renderNoState();\n });\n};\nCardboardUI.prototype.renderNoState = function () {\n var gl = this.gl;\n gl.useProgram(this.program);\n gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);\n gl.enableVertexAttribArray(this.attribs.position);\n gl.vertexAttribPointer(this.attribs.position, 2, gl.FLOAT, false, 8, 0);\n gl.uniform4f(this.uniforms.color, 1.0, 1.0, 1.0, 1.0);\n orthoMatrix(this.projMat, 0, gl.drawingBufferWidth, 0, gl.drawingBufferHeight, 0.1, 1024.0);\n gl.uniformMatrix4fv(this.uniforms.projectionMat, false, this.projMat);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n gl.drawArrays(gl.TRIANGLE_STRIP, this.gearOffset, this.gearVertexCount);\n gl.drawArrays(gl.TRIANGLE_STRIP, this.arrowOffset, this.arrowVertexCount);\n};\nfunction Distortion(coefficients) {\n this.coefficients = coefficients;\n}\nDistortion.prototype.distortInverse = function (radius) {\n var r0 = 0;\n var r1 = 1;\n var dr0 = radius - this.distort(r0);\n while (Math.abs(r1 - r0) > 0.0001 ) {\n var dr1 = radius - this.distort(r1);\n var r2 = r1 - dr1 * ((r1 - r0) / (dr1 - dr0));\n r0 = r1;\n r1 = r2;\n dr0 = dr1;\n }\n return r1;\n};\nDistortion.prototype.distort = function (radius) {\n var r2 = radius * radius;\n var ret = 0;\n for (var i = 0; i < this.coefficients.length; i++) {\n ret = r2 * (ret + this.coefficients[i]);\n }\n return (ret + 1) * radius;\n};\nvar degToRad = Math.PI / 180;\nvar radToDeg = 180 / Math.PI;\nvar Vector3 = function Vector3(x, y, z) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n};\nVector3.prototype = {\n constructor: Vector3,\n set: function set(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n },\n copy: function copy(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n },\n length: function length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n },\n normalize: function normalize() {\n var scalar = this.length();\n if (scalar !== 0) {\n var invScalar = 1 / scalar;\n this.multiplyScalar(invScalar);\n } else {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n }\n return this;\n },\n multiplyScalar: function multiplyScalar(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n this.z *= scalar;\n },\n applyQuaternion: function applyQuaternion(q) {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return this;\n },\n dot: function dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n },\n crossVectors: function crossVectors(a, b) {\n var ax = a.x,\n ay = a.y,\n az = a.z;\n var bx = b.x,\n by = b.y,\n bz = b.z;\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n return this;\n }\n};\nvar Quaternion = function Quaternion(x, y, z, w) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w !== undefined ? w : 1;\n};\nQuaternion.prototype = {\n constructor: Quaternion,\n set: function set(x, y, z, w) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n return this;\n },\n copy: function copy(quaternion) {\n this.x = quaternion.x;\n this.y = quaternion.y;\n this.z = quaternion.z;\n this.w = quaternion.w;\n return this;\n },\n setFromEulerXYZ: function setFromEulerXYZ(x, y, z) {\n var c1 = Math.cos(x / 2);\n var c2 = Math.cos(y / 2);\n var c3 = Math.cos(z / 2);\n var s1 = Math.sin(x / 2);\n var s2 = Math.sin(y / 2);\n var s3 = Math.sin(z / 2);\n this.x = s1 * c2 * c3 + c1 * s2 * s3;\n this.y = c1 * s2 * c3 - s1 * c2 * s3;\n this.z = c1 * c2 * s3 + s1 * s2 * c3;\n this.w = c1 * c2 * c3 - s1 * s2 * s3;\n return this;\n },\n setFromEulerYXZ: function setFromEulerYXZ(x, y, z) {\n var c1 = Math.cos(x / 2);\n var c2 = Math.cos(y / 2);\n var c3 = Math.cos(z / 2);\n var s1 = Math.sin(x / 2);\n var s2 = Math.sin(y / 2);\n var s3 = Math.sin(z / 2);\n this.x = s1 * c2 * c3 + c1 * s2 * s3;\n this.y = c1 * s2 * c3 - s1 * c2 * s3;\n this.z = c1 * c2 * s3 - s1 * s2 * c3;\n this.w = c1 * c2 * c3 + s1 * s2 * s3;\n return this;\n },\n setFromAxisAngle: function setFromAxisAngle(axis, angle) {\n var halfAngle = angle / 2,\n s = Math.sin(halfAngle);\n this.x = axis.x * s;\n this.y = axis.y * s;\n this.z = axis.z * s;\n this.w = Math.cos(halfAngle);\n return this;\n },\n multiply: function multiply(q) {\n return this.multiplyQuaternions(this, q);\n },\n multiplyQuaternions: function multiplyQuaternions(a, b) {\n var qax = a.x,\n qay = a.y,\n qaz = a.z,\n qaw = a.w;\n var qbx = b.x,\n qby = b.y,\n qbz = b.z,\n qbw = b.w;\n this.x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n this.y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n this.z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n this.w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n return this;\n },\n inverse: function inverse() {\n this.x *= -1;\n this.y *= -1;\n this.z *= -1;\n this.normalize();\n return this;\n },\n normalize: function normalize() {\n var l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n if (l === 0) {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n } else {\n l = 1 / l;\n this.x = this.x * l;\n this.y = this.y * l;\n this.z = this.z * l;\n this.w = this.w * l;\n }\n return this;\n },\n slerp: function slerp(qb, t) {\n if (t === 0) return this;\n if (t === 1) return this.copy(qb);\n var x = this.x,\n y = this.y,\n z = this.z,\n w = this.w;\n var cosHalfTheta = w * qb.w + x * qb.x + y * qb.y + z * qb.z;\n if (cosHalfTheta < 0) {\n this.w = -qb.w;\n this.x = -qb.x;\n this.y = -qb.y;\n this.z = -qb.z;\n cosHalfTheta = -cosHalfTheta;\n } else {\n this.copy(qb);\n }\n if (cosHalfTheta >= 1.0) {\n this.w = w;\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }\n var halfTheta = Math.acos(cosHalfTheta);\n var sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta * cosHalfTheta);\n if (Math.abs(sinHalfTheta) < 0.001) {\n this.w = 0.5 * (w + this.w);\n this.x = 0.5 * (x + this.x);\n this.y = 0.5 * (y + this.y);\n this.z = 0.5 * (z + this.z);\n return this;\n }\n var ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta,\n ratioB = Math.sin(t * halfTheta) / sinHalfTheta;\n this.w = w * ratioA + this.w * ratioB;\n this.x = x * ratioA + this.x * ratioB;\n this.y = y * ratioA + this.y * ratioB;\n this.z = z * ratioA + this.z * ratioB;\n return this;\n },\n setFromUnitVectors: function () {\n var v1, r;\n var EPS = 0.000001;\n return function (vFrom, vTo) {\n if (v1 === undefined) v1 = new Vector3();\n r = vFrom.dot(vTo) + 1;\n if (r < EPS) {\n r = 0;\n if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) {\n v1.set(-vFrom.y, vFrom.x, 0);\n } else {\n v1.set(0, -vFrom.z, vFrom.y);\n }\n } else {\n v1.crossVectors(vFrom, vTo);\n }\n this.x = v1.x;\n this.y = v1.y;\n this.z = v1.z;\n this.w = r;\n this.normalize();\n return this;\n };\n }()\n};\nfunction Device(params) {\n this.width = params.width || getScreenWidth();\n this.height = params.height || getScreenHeight();\n this.widthMeters = params.widthMeters;\n this.heightMeters = params.heightMeters;\n this.bevelMeters = params.bevelMeters;\n}\nvar DEFAULT_ANDROID = new Device({\n widthMeters: 0.110,\n heightMeters: 0.062,\n bevelMeters: 0.004\n});\nvar DEFAULT_IOS = new Device({\n widthMeters: 0.1038,\n heightMeters: 0.0584,\n bevelMeters: 0.004\n});\nvar Viewers = {\n CardboardV1: new CardboardViewer({\n id: 'CardboardV1',\n label: 'Cardboard I/O 2014',\n fov: 40,\n interLensDistance: 0.060,\n baselineLensDistance: 0.035,\n screenLensDistance: 0.042,\n distortionCoefficients: [0.441, 0.156],\n inverseCoefficients: [-0.4410035, 0.42756155, -0.4804439, 0.5460139, -0.58821183, 0.5733938, -0.48303202, 0.33299083, -0.17573841, 0.0651772, -0.01488963, 0.001559834]\n }),\n CardboardV2: new CardboardViewer({\n id: 'CardboardV2',\n label: 'Cardboard I/O 2015',\n fov: 60,\n interLensDistance: 0.064,\n baselineLensDistance: 0.035,\n screenLensDistance: 0.039,\n distortionCoefficients: [0.34, 0.55],\n inverseCoefficients: [-0.33836704, -0.18162185, 0.862655, -1.2462051, 1.0560602, -0.58208317, 0.21609078, -0.05444823, 0.009177956, -9.904169E-4, 6.183535E-5, -1.6981803E-6]\n })\n};\nfunction DeviceInfo(deviceParams, additionalViewers) {\n this.viewer = Viewers.CardboardV2;\n this.updateDeviceParams(deviceParams);\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n for (var i = 0; i < additionalViewers.length; i++) {\n var viewer = additionalViewers[i];\n Viewers[viewer.id] = new CardboardViewer(viewer);\n }\n}\nDeviceInfo.prototype.updateDeviceParams = function (deviceParams) {\n this.device = this.determineDevice_(deviceParams) || this.device;\n};\nDeviceInfo.prototype.getDevice = function () {\n return this.device;\n};\nDeviceInfo.prototype.setViewer = function (viewer) {\n this.viewer = viewer;\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n};\nDeviceInfo.prototype.determineDevice_ = function (deviceParams) {\n if (!deviceParams) {\n if (isIOS()) {\n console.warn('Using fallback iOS device measurements.');\n return DEFAULT_IOS;\n } else {\n console.warn('Using fallback Android device measurements.');\n return DEFAULT_ANDROID;\n }\n }\n var METERS_PER_INCH = 0.0254;\n var metersPerPixelX = METERS_PER_INCH / deviceParams.xdpi;\n var metersPerPixelY = METERS_PER_INCH / deviceParams.ydpi;\n var width = getScreenWidth();\n var height = getScreenHeight();\n return new Device({\n widthMeters: metersPerPixelX * width,\n heightMeters: metersPerPixelY * height,\n bevelMeters: deviceParams.bevelMm * 0.001\n });\n};\nDeviceInfo.prototype.getDistortedFieldOfViewLeftEye = function () {\n var viewer = this.viewer;\n var device = this.device;\n var distortion = this.distortion;\n var eyeToScreenDistance = viewer.screenLensDistance;\n var outerDist = (device.widthMeters - viewer.interLensDistance) / 2;\n var innerDist = viewer.interLensDistance / 2;\n var bottomDist = viewer.baselineLensDistance - device.bevelMeters;\n var topDist = device.heightMeters - bottomDist;\n var outerAngle = radToDeg * Math.atan(distortion.distort(outerDist / eyeToScreenDistance));\n var innerAngle = radToDeg * Math.atan(distortion.distort(innerDist / eyeToScreenDistance));\n var bottomAngle = radToDeg * Math.atan(distortion.distort(bottomDist / eyeToScreenDistance));\n var topAngle = radToDeg * Math.atan(distortion.distort(topDist / eyeToScreenDistance));\n return {\n leftDegrees: Math.min(outerAngle, viewer.fov),\n rightDegrees: Math.min(innerAngle, viewer.fov),\n downDegrees: Math.min(bottomAngle, viewer.fov),\n upDegrees: Math.min(topAngle, viewer.fov)\n };\n};\nDeviceInfo.prototype.getLeftEyeVisibleTanAngles = function () {\n var viewer = this.viewer;\n var device = this.device;\n var distortion = this.distortion;\n var fovLeft = Math.tan(-degToRad * viewer.fov);\n var fovTop = Math.tan(degToRad * viewer.fov);\n var fovRight = Math.tan(degToRad * viewer.fov);\n var fovBottom = Math.tan(-degToRad * viewer.fov);\n var halfWidth = device.widthMeters / 4;\n var halfHeight = device.heightMeters / 2;\n var verticalLensOffset = viewer.baselineLensDistance - device.bevelMeters - halfHeight;\n var centerX = viewer.interLensDistance / 2 - halfWidth;\n var centerY = -verticalLensOffset;\n var centerZ = viewer.screenLensDistance;\n var screenLeft = distortion.distort((centerX - halfWidth) / centerZ);\n var screenTop = distortion.distort((centerY + halfHeight) / centerZ);\n var screenRight = distortion.distort((centerX + halfWidth) / centerZ);\n var screenBottom = distortion.distort((centerY - halfHeight) / centerZ);\n var result = new Float32Array(4);\n result[0] = Math.max(fovLeft, screenLeft);\n result[1] = Math.min(fovTop, screenTop);\n result[2] = Math.min(fovRight, screenRight);\n result[3] = Math.max(fovBottom, screenBottom);\n return result;\n};\nDeviceInfo.prototype.getLeftEyeNoLensTanAngles = function () {\n var viewer = this.viewer;\n var device = this.device;\n var distortion = this.distortion;\n var result = new Float32Array(4);\n var fovLeft = distortion.distortInverse(Math.tan(-degToRad * viewer.fov));\n var fovTop = distortion.distortInverse(Math.tan(degToRad * viewer.fov));\n var fovRight = distortion.distortInverse(Math.tan(degToRad * viewer.fov));\n var fovBottom = distortion.distortInverse(Math.tan(-degToRad * viewer.fov));\n var halfWidth = device.widthMeters / 4;\n var halfHeight = device.heightMeters / 2;\n var verticalLensOffset = viewer.baselineLensDistance - device.bevelMeters - halfHeight;\n var centerX = viewer.interLensDistance / 2 - halfWidth;\n var centerY = -verticalLensOffset;\n var centerZ = viewer.screenLensDistance;\n var screenLeft = (centerX - halfWidth) / centerZ;\n var screenTop = (centerY + halfHeight) / centerZ;\n var screenRight = (centerX + halfWidth) / centerZ;\n var screenBottom = (centerY - halfHeight) / centerZ;\n result[0] = Math.max(fovLeft, screenLeft);\n result[1] = Math.min(fovTop, screenTop);\n result[2] = Math.min(fovRight, screenRight);\n result[3] = Math.max(fovBottom, screenBottom);\n return result;\n};\nDeviceInfo.prototype.getLeftEyeVisibleScreenRect = function (undistortedFrustum) {\n var viewer = this.viewer;\n var device = this.device;\n var dist = viewer.screenLensDistance;\n var eyeX = (device.widthMeters - viewer.interLensDistance) / 2;\n var eyeY = viewer.baselineLensDistance - device.bevelMeters;\n var left = (undistortedFrustum[0] * dist + eyeX) / device.widthMeters;\n var top = (undistortedFrustum[1] * dist + eyeY) / device.heightMeters;\n var right = (undistortedFrustum[2] * dist + eyeX) / device.widthMeters;\n var bottom = (undistortedFrustum[3] * dist + eyeY) / device.heightMeters;\n return {\n x: left,\n y: bottom,\n width: right - left,\n height: top - bottom\n };\n};\nDeviceInfo.prototype.getFieldOfViewLeftEye = function (opt_isUndistorted) {\n return opt_isUndistorted ? this.getUndistortedFieldOfViewLeftEye() : this.getDistortedFieldOfViewLeftEye();\n};\nDeviceInfo.prototype.getFieldOfViewRightEye = function (opt_isUndistorted) {\n var fov = this.getFieldOfViewLeftEye(opt_isUndistorted);\n return {\n leftDegrees: fov.rightDegrees,\n rightDegrees: fov.leftDegrees,\n upDegrees: fov.upDegrees,\n downDegrees: fov.downDegrees\n };\n};\nDeviceInfo.prototype.getUndistortedFieldOfViewLeftEye = function () {\n var p = this.getUndistortedParams_();\n return {\n leftDegrees: radToDeg * Math.atan(p.outerDist),\n rightDegrees: radToDeg * Math.atan(p.innerDist),\n downDegrees: radToDeg * Math.atan(p.bottomDist),\n upDegrees: radToDeg * Math.atan(p.topDist)\n };\n};\nDeviceInfo.prototype.getUndistortedViewportLeftEye = function () {\n var p = this.getUndistortedParams_();\n var viewer = this.viewer;\n var device = this.device;\n var eyeToScreenDistance = viewer.screenLensDistance;\n var screenWidth = device.widthMeters / eyeToScreenDistance;\n var screenHeight = device.heightMeters / eyeToScreenDistance;\n var xPxPerTanAngle = device.width / screenWidth;\n var yPxPerTanAngle = device.height / screenHeight;\n var x = Math.round((p.eyePosX - p.outerDist) * xPxPerTanAngle);\n var y = Math.round((p.eyePosY - p.bottomDist) * yPxPerTanAngle);\n return {\n x: x,\n y: y,\n width: Math.round((p.eyePosX + p.innerDist) * xPxPerTanAngle) - x,\n height: Math.round((p.eyePosY + p.topDist) * yPxPerTanAngle) - y\n };\n};\nDeviceInfo.prototype.getUndistortedParams_ = function () {\n var viewer = this.viewer;\n var device = this.device;\n var distortion = this.distortion;\n var eyeToScreenDistance = viewer.screenLensDistance;\n var halfLensDistance = viewer.interLensDistance / 2 / eyeToScreenDistance;\n var screenWidth = device.widthMeters / eyeToScreenDistance;\n var screenHeight = device.heightMeters / eyeToScreenDistance;\n var eyePosX = screenWidth / 2 - halfLensDistance;\n var eyePosY = (viewer.baselineLensDistance - device.bevelMeters) / eyeToScreenDistance;\n var maxFov = viewer.fov;\n var viewerMax = distortion.distortInverse(Math.tan(degToRad * maxFov));\n var outerDist = Math.min(eyePosX, viewerMax);\n var innerDist = Math.min(halfLensDistance, viewerMax);\n var bottomDist = Math.min(eyePosY, viewerMax);\n var topDist = Math.min(screenHeight - eyePosY, viewerMax);\n return {\n outerDist: outerDist,\n innerDist: innerDist,\n topDist: topDist,\n bottomDist: bottomDist,\n eyePosX: eyePosX,\n eyePosY: eyePosY\n };\n};\nfunction CardboardViewer(params) {\n this.id = params.id;\n this.label = params.label;\n this.fov = params.fov;\n this.interLensDistance = params.interLensDistance;\n this.baselineLensDistance = params.baselineLensDistance;\n this.screenLensDistance = params.screenLensDistance;\n this.distortionCoefficients = params.distortionCoefficients;\n this.inverseCoefficients = params.inverseCoefficients;\n}\nDeviceInfo.Viewers = Viewers;\nvar format = 1;\nvar last_updated = \"2019-11-09T17:36:14Z\";\nvar devices = [{\"type\":\"android\",\"rules\":[{\"mdmh\":\"asus/*/Nexus 7/*\"},{\"ua\":\"Nexus 7\"}],\"dpi\":[320.8,323],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"asus/*/ASUS_X00PD/*\"},{\"ua\":\"ASUS_X00PD\"}],\"dpi\":245,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"asus/*/ASUS_X008D/*\"},{\"ua\":\"ASUS_X008D\"}],\"dpi\":282,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"asus/*/ASUS_Z00AD/*\"},{\"ua\":\"ASUS_Z00AD\"}],\"dpi\":[403,404.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel 2 XL/*\"},{\"ua\":\"Pixel 2 XL\"}],\"dpi\":537.9,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel 3 XL/*\"},{\"ua\":\"Pixel 3 XL\"}],\"dpi\":[558.5,553.8],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel XL/*\"},{\"ua\":\"Pixel XL\"}],\"dpi\":[537.9,533],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel 3/*\"},{\"ua\":\"Pixel 3\"}],\"dpi\":442.4,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel 2/*\"},{\"ua\":\"Pixel 2\"}],\"dpi\":441,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel/*\"},{\"ua\":\"Pixel\"}],\"dpi\":[432.6,436.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC6435LVW/*\"},{\"ua\":\"HTC6435LVW\"}],\"dpi\":[449.7,443.3],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC One XL/*\"},{\"ua\":\"HTC One XL\"}],\"dpi\":[315.3,314.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"htc/*/Nexus 9/*\"},{\"ua\":\"Nexus 9\"}],\"dpi\":289,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC One M9/*\"},{\"ua\":\"HTC One M9\"}],\"dpi\":[442.5,443.3],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC One_M8/*\"},{\"ua\":\"HTC One_M8\"}],\"dpi\":[449.7,447.4],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC One/*\"},{\"ua\":\"HTC One\"}],\"dpi\":472.8,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Huawei/*/Nexus 6P/*\"},{\"ua\":\"Nexus 6P\"}],\"dpi\":[515.1,518],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Huawei/*/BLN-L24/*\"},{\"ua\":\"HONORBLN-L24\"}],\"dpi\":480,\"bw\":4,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Huawei/*/BKL-L09/*\"},{\"ua\":\"BKL-L09\"}],\"dpi\":403,\"bw\":3.47,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LENOVO/*/Lenovo PB2-690Y/*\"},{\"ua\":\"Lenovo PB2-690Y\"}],\"dpi\":[457.2,454.713],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/Nexus 5X/*\"},{\"ua\":\"Nexus 5X\"}],\"dpi\":[422,419.9],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LGMS345/*\"},{\"ua\":\"LGMS345\"}],\"dpi\":[221.7,219.1],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LG-D800/*\"},{\"ua\":\"LG-D800\"}],\"dpi\":[422,424.1],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LG-D850/*\"},{\"ua\":\"LG-D850\"}],\"dpi\":[537.9,541.9],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/VS985 4G/*\"},{\"ua\":\"VS985 4G\"}],\"dpi\":[537.9,535.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/Nexus 5/*\"},{\"ua\":\"Nexus 5 B\"}],\"dpi\":[442.4,444.8],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/Nexus 4/*\"},{\"ua\":\"Nexus 4\"}],\"dpi\":[319.8,318.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LG-P769/*\"},{\"ua\":\"LG-P769\"}],\"dpi\":[240.6,247.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LGMS323/*\"},{\"ua\":\"LGMS323\"}],\"dpi\":[206.6,204.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LGLS996/*\"},{\"ua\":\"LGLS996\"}],\"dpi\":[403.4,401.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Micromax/*/4560MMX/*\"},{\"ua\":\"4560MMX\"}],\"dpi\":[240,219.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Micromax/*/A250/*\"},{\"ua\":\"Micromax A250\"}],\"dpi\":[480,446.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Micromax/*/Micromax AQ4501/*\"},{\"ua\":\"Micromax AQ4501\"}],\"dpi\":240,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/G5/*\"},{\"ua\":\"Moto G (5) Plus\"}],\"dpi\":[403.4,403],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/DROID RAZR/*\"},{\"ua\":\"DROID RAZR\"}],\"dpi\":[368.1,256.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT830C/*\"},{\"ua\":\"XT830C\"}],\"dpi\":[254,255.9],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1021/*\"},{\"ua\":\"XT1021\"}],\"dpi\":[254,256.7],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1023/*\"},{\"ua\":\"XT1023\"}],\"dpi\":[254,256.7],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1028/*\"},{\"ua\":\"XT1028\"}],\"dpi\":[326.6,327.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1034/*\"},{\"ua\":\"XT1034\"}],\"dpi\":[326.6,328.4],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1053/*\"},{\"ua\":\"XT1053\"}],\"dpi\":[315.3,316.1],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1562/*\"},{\"ua\":\"XT1562\"}],\"dpi\":[403.4,402.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/Nexus 6/*\"},{\"ua\":\"Nexus 6 B\"}],\"dpi\":[494.3,489.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1063/*\"},{\"ua\":\"XT1063\"}],\"dpi\":[295,296.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1064/*\"},{\"ua\":\"XT1064\"}],\"dpi\":[295,295.6],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1092/*\"},{\"ua\":\"XT1092\"}],\"dpi\":[422,424.1],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1095/*\"},{\"ua\":\"XT1095\"}],\"dpi\":[422,423.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/G4/*\"},{\"ua\":\"Moto G (4)\"}],\"dpi\":401,\"bw\":4,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/A0001/*\"},{\"ua\":\"A0001\"}],\"dpi\":[403.4,401],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE E1001/*\"},{\"ua\":\"ONE E1001\"}],\"dpi\":[442.4,441.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE E1003/*\"},{\"ua\":\"ONE E1003\"}],\"dpi\":[442.4,441.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE E1005/*\"},{\"ua\":\"ONE E1005\"}],\"dpi\":[442.4,441.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE A2001/*\"},{\"ua\":\"ONE A2001\"}],\"dpi\":[391.9,405.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE A2003/*\"},{\"ua\":\"ONE A2003\"}],\"dpi\":[391.9,405.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE A2005/*\"},{\"ua\":\"ONE A2005\"}],\"dpi\":[391.9,405.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A3000/*\"},{\"ua\":\"ONEPLUS A3000\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A3003/*\"},{\"ua\":\"ONEPLUS A3003\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A3010/*\"},{\"ua\":\"ONEPLUS A3010\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A5000/*\"},{\"ua\":\"ONEPLUS A5000 \"}],\"dpi\":[403.411,399.737],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE A5010/*\"},{\"ua\":\"ONEPLUS A5010\"}],\"dpi\":[403,400],\"bw\":2,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A6000/*\"},{\"ua\":\"ONEPLUS A6000\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A6003/*\"},{\"ua\":\"ONEPLUS A6003\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A6010/*\"},{\"ua\":\"ONEPLUS A6010\"}],\"dpi\":401,\"bw\":2,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A6013/*\"},{\"ua\":\"ONEPLUS A6013\"}],\"dpi\":401,\"bw\":2,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OPPO/*/X909/*\"},{\"ua\":\"X909\"}],\"dpi\":[442.4,444.1],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9082/*\"},{\"ua\":\"GT-I9082\"}],\"dpi\":[184.7,185.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G360P/*\"},{\"ua\":\"SM-G360P\"}],\"dpi\":[196.7,205.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/Nexus S/*\"},{\"ua\":\"Nexus S\"}],\"dpi\":[234.5,229.8],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9300/*\"},{\"ua\":\"GT-I9300\"}],\"dpi\":[304.8,303.9],\"bw\":5,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-T230NU/*\"},{\"ua\":\"SM-T230NU\"}],\"dpi\":216,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SGH-T399/*\"},{\"ua\":\"SGH-T399\"}],\"dpi\":[217.7,231.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SGH-M919/*\"},{\"ua\":\"SGH-M919\"}],\"dpi\":[440.8,437.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N9005/*\"},{\"ua\":\"SM-N9005\"}],\"dpi\":[386.4,387],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SAMSUNG-SM-N900A/*\"},{\"ua\":\"SAMSUNG-SM-N900A\"}],\"dpi\":[386.4,387.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9500/*\"},{\"ua\":\"GT-I9500\"}],\"dpi\":[442.5,443.3],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9505/*\"},{\"ua\":\"GT-I9505\"}],\"dpi\":439.4,\"bw\":4,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G900F/*\"},{\"ua\":\"SM-G900F\"}],\"dpi\":[415.6,431.6],\"bw\":5,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G900M/*\"},{\"ua\":\"SM-G900M\"}],\"dpi\":[415.6,431.6],\"bw\":5,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G800F/*\"},{\"ua\":\"SM-G800F\"}],\"dpi\":326.8,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G906S/*\"},{\"ua\":\"SM-G906S\"}],\"dpi\":[562.7,572.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9300/*\"},{\"ua\":\"GT-I9300\"}],\"dpi\":[306.7,304.8],\"bw\":5,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-T535/*\"},{\"ua\":\"SM-T535\"}],\"dpi\":[142.6,136.4],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N920C/*\"},{\"ua\":\"SM-N920C\"}],\"dpi\":[515.1,518.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N920P/*\"},{\"ua\":\"SM-N920P\"}],\"dpi\":[386.3655,390.144],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N920W8/*\"},{\"ua\":\"SM-N920W8\"}],\"dpi\":[515.1,518.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9300I/*\"},{\"ua\":\"GT-I9300I\"}],\"dpi\":[304.8,305.8],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9195/*\"},{\"ua\":\"GT-I9195\"}],\"dpi\":[249.4,256.7],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SPH-L520/*\"},{\"ua\":\"SPH-L520\"}],\"dpi\":[249.4,255.9],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SAMSUNG-SGH-I717/*\"},{\"ua\":\"SAMSUNG-SGH-I717\"}],\"dpi\":285.8,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SPH-D710/*\"},{\"ua\":\"SPH-D710\"}],\"dpi\":[217.7,204.2],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-N7100/*\"},{\"ua\":\"GT-N7100\"}],\"dpi\":265.1,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SCH-I605/*\"},{\"ua\":\"SCH-I605\"}],\"dpi\":265.1,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/Galaxy Nexus/*\"},{\"ua\":\"Galaxy Nexus\"}],\"dpi\":[315.3,314.2],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N910H/*\"},{\"ua\":\"SM-N910H\"}],\"dpi\":[515.1,518],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N910C/*\"},{\"ua\":\"SM-N910C\"}],\"dpi\":[515.2,520.2],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G130M/*\"},{\"ua\":\"SM-G130M\"}],\"dpi\":[165.9,164.8],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G928I/*\"},{\"ua\":\"SM-G928I\"}],\"dpi\":[515.1,518.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G920F/*\"},{\"ua\":\"SM-G920F\"}],\"dpi\":580.6,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G920P/*\"},{\"ua\":\"SM-G920P\"}],\"dpi\":[522.5,577],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G925F/*\"},{\"ua\":\"SM-G925F\"}],\"dpi\":580.6,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G925V/*\"},{\"ua\":\"SM-G925V\"}],\"dpi\":[522.5,576.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G930F/*\"},{\"ua\":\"SM-G930F\"}],\"dpi\":576.6,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G935F/*\"},{\"ua\":\"SM-G935F\"}],\"dpi\":533,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G950F/*\"},{\"ua\":\"SM-G950F\"}],\"dpi\":[562.707,565.293],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G955U/*\"},{\"ua\":\"SM-G955U\"}],\"dpi\":[522.514,525.762],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G955F/*\"},{\"ua\":\"SM-G955F\"}],\"dpi\":[522.514,525.762],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960F/*\"},{\"ua\":\"SM-G960F\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G9600/*\"},{\"ua\":\"SM-G9600\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960T/*\"},{\"ua\":\"SM-G960T\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960N/*\"},{\"ua\":\"SM-G960N\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960U/*\"},{\"ua\":\"SM-G960U\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G9608/*\"},{\"ua\":\"SM-G9608\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960FD/*\"},{\"ua\":\"SM-G960FD\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960W/*\"},{\"ua\":\"SM-G960W\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G965F/*\"},{\"ua\":\"SM-G965F\"}],\"dpi\":529,\"bw\":2,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/C6903/*\"},{\"ua\":\"C6903\"}],\"dpi\":[442.5,443.3],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/D6653/*\"},{\"ua\":\"D6653\"}],\"dpi\":[428.6,427.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/E6653/*\"},{\"ua\":\"E6653\"}],\"dpi\":[428.6,425.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/E6853/*\"},{\"ua\":\"E6853\"}],\"dpi\":[403.4,401.9],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/SGP321/*\"},{\"ua\":\"SGP321\"}],\"dpi\":[224.7,224.1],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"TCT/*/ALCATEL ONE TOUCH Fierce/*\"},{\"ua\":\"ALCATEL ONE TOUCH Fierce\"}],\"dpi\":[240,247.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"THL/*/thl 5000/*\"},{\"ua\":\"thl 5000\"}],\"dpi\":[480,443.3],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Fly/*/IQ4412/*\"},{\"ua\":\"IQ4412\"}],\"dpi\":307.9,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"ZTE/*/ZTE Blade L2/*\"},{\"ua\":\"ZTE Blade L2\"}],\"dpi\":240,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"BENEVE/*/VR518/*\"},{\"ua\":\"VR518\"}],\"dpi\":480,\"bw\":3,\"ac\":500},{\"type\":\"ios\",\"rules\":[{\"res\":[640,960]}],\"dpi\":[325.1,328.4],\"bw\":4,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[640,1136]}],\"dpi\":[317.1,320.2],\"bw\":3,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[750,1334]}],\"dpi\":326.4,\"bw\":4,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[1242,2208]}],\"dpi\":[453.6,458.4],\"bw\":4,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[1125,2001]}],\"dpi\":[410.9,415.4],\"bw\":4,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[1125,2436]}],\"dpi\":458,\"bw\":4,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Huawei/*/EML-L29/*\"},{\"ua\":\"EML-L29\"}],\"dpi\":428,\"bw\":3.45,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Nokia/*/Nokia 7.1/*\"},{\"ua\":\"Nokia 7.1\"}],\"dpi\":[432,431.9],\"bw\":3,\"ac\":500},{\"type\":\"ios\",\"rules\":[{\"res\":[1242,2688]}],\"dpi\":458,\"bw\":4,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G570M/*\"},{\"ua\":\"SM-G570M\"}],\"dpi\":320,\"bw\":3.684,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G970F/*\"},{\"ua\":\"SM-G970F\"}],\"dpi\":438,\"bw\":2.281,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G973F/*\"},{\"ua\":\"SM-G973F\"}],\"dpi\":550,\"bw\":2.002,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G975F/*\"},{\"ua\":\"SM-G975F\"}],\"dpi\":522,\"bw\":2.054,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G977F/*\"},{\"ua\":\"SM-G977F\"}],\"dpi\":505,\"bw\":2.334,\"ac\":500},{\"type\":\"ios\",\"rules\":[{\"res\":[828,1792]}],\"dpi\":326,\"bw\":5,\"ac\":500}];\nvar DPDB_CACHE = {\n\tformat: format,\n\tlast_updated: last_updated,\n\tdevices: devices\n};\nfunction Dpdb(url, onDeviceParamsUpdated) {\n this.dpdb = DPDB_CACHE;\n this.recalculateDeviceParams_();\n if (url) {\n this.onDeviceParamsUpdated = onDeviceParamsUpdated;\n var xhr = new XMLHttpRequest();\n var obj = this;\n xhr.open('GET', url, true);\n xhr.addEventListener('load', function () {\n obj.loading = false;\n if (xhr.status >= 200 && xhr.status <= 299) {\n obj.dpdb = JSON.parse(xhr.response);\n obj.recalculateDeviceParams_();\n } else {\n console.error('Error loading online DPDB!');\n }\n });\n xhr.send();\n }\n}\nDpdb.prototype.getDeviceParams = function () {\n return this.deviceParams;\n};\nDpdb.prototype.recalculateDeviceParams_ = function () {\n var newDeviceParams = this.calcDeviceParams_();\n if (newDeviceParams) {\n this.deviceParams = newDeviceParams;\n if (this.onDeviceParamsUpdated) {\n this.onDeviceParamsUpdated(this.deviceParams);\n }\n } else {\n console.error('Failed to recalculate device parameters.');\n }\n};\nDpdb.prototype.calcDeviceParams_ = function () {\n var db = this.dpdb;\n if (!db) {\n console.error('DPDB not available.');\n return null;\n }\n if (db.format != 1) {\n console.error('DPDB has unexpected format version.');\n return null;\n }\n if (!db.devices || !db.devices.length) {\n console.error('DPDB does not have a devices section.');\n return null;\n }\n var userAgent = navigator.userAgent || navigator.vendor || window.opera;\n var width = getScreenWidth();\n var height = getScreenHeight();\n if (!db.devices) {\n console.error('DPDB has no devices section.');\n return null;\n }\n for (var i = 0; i < db.devices.length; i++) {\n var device = db.devices[i];\n if (!device.rules) {\n console.warn('Device[' + i + '] has no rules section.');\n continue;\n }\n if (device.type != 'ios' && device.type != 'android') {\n console.warn('Device[' + i + '] has invalid type.');\n continue;\n }\n if (isIOS() != (device.type == 'ios')) continue;\n var matched = false;\n for (var j = 0; j < device.rules.length; j++) {\n var rule = device.rules[j];\n if (this.ruleMatches_(rule, userAgent, width, height)) {\n matched = true;\n break;\n }\n }\n if (!matched) continue;\n var xdpi = device.dpi[0] || device.dpi;\n var ydpi = device.dpi[1] || device.dpi;\n return new DeviceParams({ xdpi: xdpi, ydpi: ydpi, bevelMm: device.bw });\n }\n console.warn('No DPDB device match.');\n return null;\n};\nDpdb.prototype.ruleMatches_ = function (rule, ua, screenWidth, screenHeight) {\n if (!rule.ua && !rule.res) return false;\n if (rule.ua && rule.ua.substring(0, 2) === 'SM') rule.ua = rule.ua.substring(0, 7);\n if (rule.ua && ua.indexOf(rule.ua) < 0) return false;\n if (rule.res) {\n if (!rule.res[0] || !rule.res[1]) return false;\n var resX = rule.res[0];\n var resY = rule.res[1];\n if (Math.min(screenWidth, screenHeight) != Math.min(resX, resY) || Math.max(screenWidth, screenHeight) != Math.max(resX, resY)) {\n return false;\n }\n }\n return true;\n};\nfunction DeviceParams(params) {\n this.xdpi = params.xdpi;\n this.ydpi = params.ydpi;\n this.bevelMm = params.bevelMm;\n}\nfunction SensorSample(sample, timestampS) {\n this.set(sample, timestampS);\n}\nSensorSample.prototype.set = function (sample, timestampS) {\n this.sample = sample;\n this.timestampS = timestampS;\n};\nSensorSample.prototype.copy = function (sensorSample) {\n this.set(sensorSample.sample, sensorSample.timestampS);\n};\nfunction ComplementaryFilter(kFilter, isDebug) {\n this.kFilter = kFilter;\n this.isDebug = isDebug;\n this.currentAccelMeasurement = new SensorSample();\n this.currentGyroMeasurement = new SensorSample();\n this.previousGyroMeasurement = new SensorSample();\n if (isIOS()) {\n this.filterQ = new Quaternion(-1, 0, 0, 1);\n } else {\n this.filterQ = new Quaternion(1, 0, 0, 1);\n }\n this.previousFilterQ = new Quaternion();\n this.previousFilterQ.copy(this.filterQ);\n this.accelQ = new Quaternion();\n this.isOrientationInitialized = false;\n this.estimatedGravity = new Vector3();\n this.measuredGravity = new Vector3();\n this.gyroIntegralQ = new Quaternion();\n}\nComplementaryFilter.prototype.addAccelMeasurement = function (vector, timestampS) {\n this.currentAccelMeasurement.set(vector, timestampS);\n};\nComplementaryFilter.prototype.addGyroMeasurement = function (vector, timestampS) {\n this.currentGyroMeasurement.set(vector, timestampS);\n var deltaT = timestampS - this.previousGyroMeasurement.timestampS;\n if (isTimestampDeltaValid(deltaT)) {\n this.run_();\n }\n this.previousGyroMeasurement.copy(this.currentGyroMeasurement);\n};\nComplementaryFilter.prototype.run_ = function () {\n if (!this.isOrientationInitialized) {\n this.accelQ = this.accelToQuaternion_(this.currentAccelMeasurement.sample);\n this.previousFilterQ.copy(this.accelQ);\n this.isOrientationInitialized = true;\n return;\n }\n var deltaT = this.currentGyroMeasurement.timestampS - this.previousGyroMeasurement.timestampS;\n var gyroDeltaQ = this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample, deltaT);\n this.gyroIntegralQ.multiply(gyroDeltaQ);\n this.filterQ.copy(this.previousFilterQ);\n this.filterQ.multiply(gyroDeltaQ);\n var invFilterQ = new Quaternion();\n invFilterQ.copy(this.filterQ);\n invFilterQ.inverse();\n this.estimatedGravity.set(0, 0, -1);\n this.estimatedGravity.applyQuaternion(invFilterQ);\n this.estimatedGravity.normalize();\n this.measuredGravity.copy(this.currentAccelMeasurement.sample);\n this.measuredGravity.normalize();\n var deltaQ = new Quaternion();\n deltaQ.setFromUnitVectors(this.estimatedGravity, this.measuredGravity);\n deltaQ.inverse();\n if (this.isDebug) {\n console.log('Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)', radToDeg * getQuaternionAngle(deltaQ), this.estimatedGravity.x.toFixed(1), this.estimatedGravity.y.toFixed(1), this.estimatedGravity.z.toFixed(1), this.measuredGravity.x.toFixed(1), this.measuredGravity.y.toFixed(1), this.measuredGravity.z.toFixed(1));\n }\n var targetQ = new Quaternion();\n targetQ.copy(this.filterQ);\n targetQ.multiply(deltaQ);\n this.filterQ.slerp(targetQ, 1 - this.kFilter);\n this.previousFilterQ.copy(this.filterQ);\n};\nComplementaryFilter.prototype.getOrientation = function () {\n return this.filterQ;\n};\nComplementaryFilter.prototype.accelToQuaternion_ = function (accel) {\n var normAccel = new Vector3();\n normAccel.copy(accel);\n normAccel.normalize();\n var quat = new Quaternion();\n quat.setFromUnitVectors(new Vector3(0, 0, -1), normAccel);\n quat.inverse();\n return quat;\n};\nComplementaryFilter.prototype.gyroToQuaternionDelta_ = function (gyro, dt) {\n var quat = new Quaternion();\n var axis = new Vector3();\n axis.copy(gyro);\n axis.normalize();\n quat.setFromAxisAngle(axis, gyro.length() * dt);\n return quat;\n};\nfunction PosePredictor(predictionTimeS, isDebug) {\n this.predictionTimeS = predictionTimeS;\n this.isDebug = isDebug;\n this.previousQ = new Quaternion();\n this.previousTimestampS = null;\n this.deltaQ = new Quaternion();\n this.outQ = new Quaternion();\n}\nPosePredictor.prototype.getPrediction = function (currentQ, gyro, timestampS) {\n if (!this.previousTimestampS) {\n this.previousQ.copy(currentQ);\n this.previousTimestampS = timestampS;\n return currentQ;\n }\n var axis = new Vector3();\n axis.copy(gyro);\n axis.normalize();\n var angularSpeed = gyro.length();\n if (angularSpeed < degToRad * 20) {\n if (this.isDebug) {\n console.log('Moving slowly, at %s deg/s: no prediction', (radToDeg * angularSpeed).toFixed(1));\n }\n this.outQ.copy(currentQ);\n this.previousQ.copy(currentQ);\n return this.outQ;\n }\n var predictAngle = angularSpeed * this.predictionTimeS;\n this.deltaQ.setFromAxisAngle(axis, predictAngle);\n this.outQ.copy(this.previousQ);\n this.outQ.multiply(this.deltaQ);\n this.previousQ.copy(currentQ);\n this.previousTimestampS = timestampS;\n return this.outQ;\n};\nfunction FusionPoseSensor(kFilter, predictionTime, yawOnly, isDebug) {\n this.yawOnly = yawOnly;\n this.accelerometer = new Vector3();\n this.gyroscope = new Vector3();\n this.filter = new ComplementaryFilter(kFilter, isDebug);\n this.posePredictor = new PosePredictor(predictionTime, isDebug);\n this.isFirefoxAndroid = isFirefoxAndroid();\n this.isIOS = isIOS();\n var chromeVersion = getChromeVersion();\n this.isDeviceMotionInRadians = !this.isIOS && chromeVersion && chromeVersion < 66;\n this.isWithoutDeviceMotion = isChromeWithoutDeviceMotion() || isSafariWithoutDeviceMotion();\n this.filterToWorldQ = new Quaternion();\n if (isIOS()) {\n this.filterToWorldQ.setFromAxisAngle(new Vector3(1, 0, 0), Math.PI / 2);\n } else {\n this.filterToWorldQ.setFromAxisAngle(new Vector3(1, 0, 0), -Math.PI / 2);\n }\n this.inverseWorldToScreenQ = new Quaternion();\n this.worldToScreenQ = new Quaternion();\n this.originalPoseAdjustQ = new Quaternion();\n this.originalPoseAdjustQ.setFromAxisAngle(new Vector3(0, 0, 1), -window.orientation * Math.PI / 180);\n this.setScreenTransform_();\n if (isLandscapeMode()) {\n this.filterToWorldQ.multiply(this.inverseWorldToScreenQ);\n }\n this.resetQ = new Quaternion();\n this.orientationOut_ = new Float32Array(4);\n this.start();\n}\nFusionPoseSensor.prototype.getPosition = function () {\n return null;\n};\nFusionPoseSensor.prototype.getOrientation = function () {\n var orientation = void 0;\n if (this.isWithoutDeviceMotion && this._deviceOrientationQ) {\n this.deviceOrientationFixQ = this.deviceOrientationFixQ || function () {\n var z = new Quaternion().setFromAxisAngle(new Vector3(0, 0, -1), 0);\n var y = new Quaternion();\n if (window.orientation === -90) {\n y.setFromAxisAngle(new Vector3(0, 1, 0), Math.PI / -2);\n } else {\n y.setFromAxisAngle(new Vector3(0, 1, 0), Math.PI / 2);\n }\n return z.multiply(y);\n }();\n this.deviceOrientationFilterToWorldQ = this.deviceOrientationFilterToWorldQ || function () {\n var q = new Quaternion();\n q.setFromAxisAngle(new Vector3(1, 0, 0), -Math.PI / 2);\n return q;\n }();\n orientation = this._deviceOrientationQ;\n var out = new Quaternion();\n out.copy(orientation);\n out.multiply(this.deviceOrientationFilterToWorldQ);\n out.multiply(this.resetQ);\n out.multiply(this.worldToScreenQ);\n out.multiplyQuaternions(this.deviceOrientationFixQ, out);\n if (this.yawOnly) {\n out.x = 0;\n out.z = 0;\n out.normalize();\n }\n this.orientationOut_[0] = out.x;\n this.orientationOut_[1] = out.y;\n this.orientationOut_[2] = out.z;\n this.orientationOut_[3] = out.w;\n return this.orientationOut_;\n } else {\n var filterOrientation = this.filter.getOrientation();\n orientation = this.posePredictor.getPrediction(filterOrientation, this.gyroscope, this.previousTimestampS);\n }\n var out = new Quaternion();\n out.copy(this.filterToWorldQ);\n out.multiply(this.resetQ);\n out.multiply(orientation);\n out.multiply(this.worldToScreenQ);\n if (this.yawOnly) {\n out.x = 0;\n out.z = 0;\n out.normalize();\n }\n this.orientationOut_[0] = out.x;\n this.orientationOut_[1] = out.y;\n this.orientationOut_[2] = out.z;\n this.orientationOut_[3] = out.w;\n return this.orientationOut_;\n};\nFusionPoseSensor.prototype.resetPose = function () {\n this.resetQ.copy(this.filter.getOrientation());\n this.resetQ.x = 0;\n this.resetQ.y = 0;\n this.resetQ.z *= -1;\n this.resetQ.normalize();\n if (isLandscapeMode()) {\n this.resetQ.multiply(this.inverseWorldToScreenQ);\n }\n this.resetQ.multiply(this.originalPoseAdjustQ);\n};\nFusionPoseSensor.prototype.onDeviceOrientation_ = function (e) {\n this._deviceOrientationQ = this._deviceOrientationQ || new Quaternion();\n var alpha = e.alpha,\n beta = e.beta,\n gamma = e.gamma;\n alpha = (alpha || 0) * Math.PI / 180;\n beta = (beta || 0) * Math.PI / 180;\n gamma = (gamma || 0) * Math.PI / 180;\n this._deviceOrientationQ.setFromEulerYXZ(beta, alpha, -gamma);\n};\nFusionPoseSensor.prototype.onDeviceMotion_ = function (deviceMotion) {\n this.updateDeviceMotion_(deviceMotion);\n};\nFusionPoseSensor.prototype.updateDeviceMotion_ = function (deviceMotion) {\n var accGravity = deviceMotion.accelerationIncludingGravity;\n var rotRate = deviceMotion.rotationRate;\n var timestampS = deviceMotion.timeStamp / 1000;\n var deltaS = timestampS - this.previousTimestampS;\n if (deltaS < 0) {\n warnOnce('fusion-pose-sensor:invalid:non-monotonic', 'Invalid timestamps detected: non-monotonic timestamp from devicemotion');\n this.previousTimestampS = timestampS;\n return;\n } else if (deltaS <= MIN_TIMESTEP || deltaS > MAX_TIMESTEP) {\n warnOnce('fusion-pose-sensor:invalid:outside-threshold', 'Invalid timestamps detected: Timestamp from devicemotion outside expected range.');\n this.previousTimestampS = timestampS;\n return;\n }\n this.accelerometer.set(-accGravity.x, -accGravity.y, -accGravity.z);\n if (rotRate) {\n if (isR7()) {\n this.gyroscope.set(-rotRate.beta, rotRate.alpha, rotRate.gamma);\n } else {\n this.gyroscope.set(rotRate.alpha, rotRate.beta, rotRate.gamma);\n }\n if (!this.isDeviceMotionInRadians) {\n this.gyroscope.multiplyScalar(Math.PI / 180);\n }\n this.filter.addGyroMeasurement(this.gyroscope, timestampS);\n }\n this.filter.addAccelMeasurement(this.accelerometer, timestampS);\n this.previousTimestampS = timestampS;\n};\nFusionPoseSensor.prototype.onOrientationChange_ = function (screenOrientation) {\n this.setScreenTransform_();\n};\nFusionPoseSensor.prototype.onMessage_ = function (event) {\n var message = event.data;\n if (!message || !message.type) {\n return;\n }\n var type = message.type.toLowerCase();\n if (type !== 'devicemotion') {\n return;\n }\n this.updateDeviceMotion_(message.deviceMotionEvent);\n};\nFusionPoseSensor.prototype.setScreenTransform_ = function () {\n this.worldToScreenQ.set(0, 0, 0, 1);\n switch (window.orientation) {\n case 0:\n break;\n case 90:\n this.worldToScreenQ.setFromAxisAngle(new Vector3(0, 0, 1), -Math.PI / 2);\n break;\n case -90:\n this.worldToScreenQ.setFromAxisAngle(new Vector3(0, 0, 1), Math.PI / 2);\n break;\n case 180:\n break;\n }\n this.inverseWorldToScreenQ.copy(this.worldToScreenQ);\n this.inverseWorldToScreenQ.inverse();\n};\nFusionPoseSensor.prototype.start = function () {\n this.onDeviceMotionCallback_ = this.onDeviceMotion_.bind(this);\n this.onOrientationChangeCallback_ = this.onOrientationChange_.bind(this);\n this.onMessageCallback_ = this.onMessage_.bind(this);\n this.onDeviceOrientationCallback_ = this.onDeviceOrientation_.bind(this);\n if (isIOS() && isInsideCrossOriginIFrame()) {\n window.addEventListener('message', this.onMessageCallback_);\n }\n window.addEventListener('orientationchange', this.onOrientationChangeCallback_);\n if (this.isWithoutDeviceMotion) {\n window.addEventListener('deviceorientation', this.onDeviceOrientationCallback_);\n } else {\n window.addEventListener('devicemotion', this.onDeviceMotionCallback_);\n }\n};\nFusionPoseSensor.prototype.stop = function () {\n window.removeEventListener('devicemotion', this.onDeviceMotionCallback_);\n window.removeEventListener('deviceorientation', this.onDeviceOrientationCallback_);\n window.removeEventListener('orientationchange', this.onOrientationChangeCallback_);\n window.removeEventListener('message', this.onMessageCallback_);\n};\nvar SENSOR_FREQUENCY = 60;\nvar X_AXIS = new Vector3(1, 0, 0);\nvar Z_AXIS = new Vector3(0, 0, 1);\nvar SENSOR_TO_VR = new Quaternion();\nSENSOR_TO_VR.setFromAxisAngle(X_AXIS, -Math.PI / 2);\nSENSOR_TO_VR.multiply(new Quaternion().setFromAxisAngle(Z_AXIS, Math.PI / 2));\nvar PoseSensor = function () {\n function PoseSensor(config) {\n classCallCheck(this, PoseSensor);\n this.config = config;\n this.sensor = null;\n this.fusionSensor = null;\n this._out = new Float32Array(4);\n this.api = null;\n this.errors = [];\n this._sensorQ = new Quaternion();\n this._outQ = new Quaternion();\n this._onSensorRead = this._onSensorRead.bind(this);\n this._onSensorError = this._onSensorError.bind(this);\n this.init();\n }\n createClass(PoseSensor, [{\n key: 'init',\n value: function init() {\n var sensor = null;\n try {\n sensor = new RelativeOrientationSensor({\n frequency: SENSOR_FREQUENCY,\n referenceFrame: 'screen'\n });\n sensor.addEventListener('error', this._onSensorError);\n } catch (error) {\n this.errors.push(error);\n if (error.name === 'SecurityError') {\n console.error('Cannot construct sensors due to the Feature Policy');\n console.warn('Attempting to fall back using \"devicemotion\"; however this will ' + 'fail in the future without correct permissions.');\n this.useDeviceMotion();\n } else if (error.name === 'ReferenceError') {\n this.useDeviceMotion();\n } else {\n console.error(error);\n }\n }\n if (sensor) {\n this.api = 'sensor';\n this.sensor = sensor;\n this.sensor.addEventListener('reading', this._onSensorRead);\n this.sensor.start();\n }\n }\n }, {\n key: 'useDeviceMotion',\n value: function useDeviceMotion() {\n this.api = 'devicemotion';\n this.fusionSensor = new FusionPoseSensor(this.config.K_FILTER, this.config.PREDICTION_TIME_S, this.config.YAW_ONLY, this.config.DEBUG);\n if (this.sensor) {\n this.sensor.removeEventListener('reading', this._onSensorRead);\n this.sensor.removeEventListener('error', this._onSensorError);\n this.sensor = null;\n }\n }\n }, {\n key: 'getOrientation',\n value: function getOrientation() {\n if (this.fusionSensor) {\n return this.fusionSensor.getOrientation();\n }\n if (!this.sensor || !this.sensor.quaternion) {\n this._out[0] = this._out[1] = this._out[2] = 0;\n this._out[3] = 1;\n return this._out;\n }\n var q = this.sensor.quaternion;\n this._sensorQ.set(q[0], q[1], q[2], q[3]);\n var out = this._outQ;\n out.copy(SENSOR_TO_VR);\n out.multiply(this._sensorQ);\n if (this.config.YAW_ONLY) {\n out.x = out.z = 0;\n out.normalize();\n }\n this._out[0] = out.x;\n this._out[1] = out.y;\n this._out[2] = out.z;\n this._out[3] = out.w;\n return this._out;\n }\n }, {\n key: '_onSensorError',\n value: function _onSensorError(event) {\n this.errors.push(event.error);\n if (event.error.name === 'NotAllowedError') {\n console.error('Permission to access sensor was denied');\n } else if (event.error.name === 'NotReadableError') {\n console.error('Sensor could not be read');\n } else {\n console.error(event.error);\n }\n this.useDeviceMotion();\n }\n }, {\n key: '_onSensorRead',\n value: function _onSensorRead() {}\n }]);\n return PoseSensor;\n}();\nvar rotateInstructionsAsset = \"<svg width='198' height='240' viewBox='0 0 198 240' xmlns='http://www.w3.org/2000/svg'><g fill='none' fill-rule='evenodd'><path d='M149.625 109.527l6.737 3.891v.886c0 .177.013.36.038.549.01.081.02.162.027.242.14 1.415.974 2.998 2.105 3.999l5.72 5.062.081-.09s4.382-2.53 5.235-3.024l25.97 14.993v54.001c0 .771-.386 1.217-.948 1.217-.233 0-.495-.076-.772-.236l-23.967-13.838-.014.024-27.322 15.775-.85-1.323c-4.731-1.529-9.748-2.74-14.951-3.61a.27.27 0 0 0-.007.024l-5.067 16.961-7.891 4.556-.037-.063v27.59c0 .772-.386 1.217-.948 1.217-.232 0-.495-.076-.772-.236l-42.473-24.522c-.95-.549-1.72-1.877-1.72-2.967v-1.035l-.021.047a5.111 5.111 0 0 0-1.816-.399 5.682 5.682 0 0 0-.546.001 13.724 13.724 0 0 1-1.918-.041c-1.655-.153-3.2-.6-4.404-1.296l-46.576-26.89.005.012-10.278-18.75c-1.001-1.827-.241-4.216 1.698-5.336l56.011-32.345a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.659 3.227 1.853l.005-.003.227.413-.006.004a9.63 9.63 0 0 0 1.477 2.018l.277.27c1.914 1.85 4.468 2.801 7.113 2.801 1.949 0 3.948-.517 5.775-1.572.013 0 7.319-4.219 7.319-4.219a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.658 3.226 1.853l3.25 5.928.022-.018 6.785 3.917-.105-.182 46.881-26.965m0-1.635c-.282 0-.563.073-.815.218l-46.169 26.556-5.41-3.124-3.005-5.481c-.913-1.667-2.699-2.702-4.66-2.703-1.011 0-2.02.274-2.917.792a3825 3825 0 0 1-7.275 4.195l-.044.024a9.937 9.937 0 0 1-4.957 1.353c-2.292 0-4.414-.832-5.976-2.342l-.252-.245a7.992 7.992 0 0 1-1.139-1.534 1.379 1.379 0 0 0-.06-.122l-.227-.414a1.718 1.718 0 0 0-.095-.154c-.938-1.574-2.673-2.545-4.571-2.545-1.011 0-2.02.274-2.917.792L3.125 155.502c-2.699 1.559-3.738 4.94-2.314 7.538l10.278 18.75c.177.323.448.563.761.704l46.426 26.804c1.403.81 3.157 1.332 5.072 1.508a15.661 15.661 0 0 0 2.146.046 4.766 4.766 0 0 1 .396 0c.096.004.19.011.283.022.109 1.593 1.159 3.323 2.529 4.114l42.472 24.522c.524.302 1.058.455 1.59.455 1.497 0 2.583-1.2 2.583-2.852v-26.562l7.111-4.105a1.64 1.64 0 0 0 .749-.948l4.658-15.593c4.414.797 8.692 1.848 12.742 3.128l.533.829a1.634 1.634 0 0 0 2.193.531l26.532-15.317L193 192.433c.523.302 1.058.455 1.59.455 1.497 0 2.583-1.199 2.583-2.852v-54.001c0-.584-.312-1.124-.818-1.416l-25.97-14.993a1.633 1.633 0 0 0-1.636.001c-.606.351-2.993 1.73-4.325 2.498l-4.809-4.255c-.819-.725-1.461-1.933-1.561-2.936a7.776 7.776 0 0 0-.033-.294 2.487 2.487 0 0 1-.023-.336v-.886c0-.584-.312-1.123-.817-1.416l-6.739-3.891a1.633 1.633 0 0 0-.817-.219' fill='#455A64'/><path d='M96.027 132.636l46.576 26.891c1.204.695 1.979 1.587 2.242 2.541l-.01.007-81.374 46.982h-.001c-1.654-.152-3.199-.6-4.403-1.295l-46.576-26.891 83.546-48.235' fill='#FAFAFA'/><path d='M63.461 209.174c-.008 0-.015 0-.022-.002-1.693-.156-3.228-.609-4.441-1.309l-46.576-26.89a.118.118 0 0 1 0-.203l83.546-48.235a.117.117 0 0 1 .117 0l46.576 26.891c1.227.708 2.021 1.612 2.296 2.611a.116.116 0 0 1-.042.124l-.021.016-81.375 46.981a.11.11 0 0 1-.058.016zm-50.747-28.303l46.401 26.79c1.178.68 2.671 1.121 4.32 1.276l81.272-46.922c-.279-.907-1.025-1.73-2.163-2.387l-46.517-26.857-83.313 48.1z' fill='#607D8B'/><path d='M148.327 165.471a5.85 5.85 0 0 1-.546.001c-1.894-.083-3.302-1.038-3.145-2.132a2.693 2.693 0 0 0-.072-1.105l-81.103 46.822c.628.058 1.272.073 1.918.042.182-.009.364-.009.546-.001 1.894.083 3.302 1.038 3.145 2.132l79.257-45.759' fill='#FFF'/><path d='M69.07 211.347a.118.118 0 0 1-.115-.134c.045-.317-.057-.637-.297-.925-.505-.61-1.555-1.022-2.738-1.074a5.966 5.966 0 0 0-.535.001 14.03 14.03 0 0 1-1.935-.041.117.117 0 0 1-.103-.092.116.116 0 0 1 .055-.126l81.104-46.822a.117.117 0 0 1 .171.07c.104.381.129.768.074 1.153-.045.316.057.637.296.925.506.61 1.555 1.021 2.739 1.073.178.008.357.008.535-.001a.117.117 0 0 1 .064.218l-79.256 45.759a.114.114 0 0 1-.059.016zm-3.405-2.372c.089 0 .177.002.265.006 1.266.056 2.353.488 2.908 1.158.227.274.35.575.36.882l78.685-45.429c-.036 0-.072-.001-.107-.003-1.267-.056-2.354-.489-2.909-1.158-.282-.34-.402-.724-.347-1.107a2.604 2.604 0 0 0-.032-.91L63.846 208.97a13.91 13.91 0 0 0 1.528.012c.097-.005.194-.007.291-.007z' fill='#607D8B'/><path d='M2.208 162.134c-1.001-1.827-.241-4.217 1.698-5.337l56.011-32.344c1.939-1.12 4.324-.546 5.326 1.281l.232.41a9.344 9.344 0 0 0 1.47 2.021l.278.27c3.325 3.214 8.583 3.716 12.888 1.23l7.319-4.22c1.94-1.119 4.324-.546 5.325 1.282l3.25 5.928-83.519 48.229-10.278-18.75z' fill='#FAFAFA'/><path d='M12.486 181.001a.112.112 0 0 1-.031-.005.114.114 0 0 1-.071-.056L2.106 162.19c-1.031-1.88-.249-4.345 1.742-5.494l56.01-32.344a4.328 4.328 0 0 1 2.158-.588c1.415 0 2.65.702 3.311 1.882.01.008.018.017.024.028l.227.414a.122.122 0 0 1 .013.038 9.508 9.508 0 0 0 1.439 1.959l.275.266c1.846 1.786 4.344 2.769 7.031 2.769 1.977 0 3.954-.538 5.717-1.557a.148.148 0 0 1 .035-.013l7.284-4.206a4.321 4.321 0 0 1 2.157-.588c1.427 0 2.672.716 3.329 1.914l3.249 5.929a.116.116 0 0 1-.044.157l-83.518 48.229a.116.116 0 0 1-.059.016zm49.53-57.004c-.704 0-1.41.193-2.041.557l-56.01 32.345c-1.882 1.086-2.624 3.409-1.655 5.179l10.221 18.645 83.317-48.112-3.195-5.829c-.615-1.122-1.783-1.792-3.124-1.792a4.08 4.08 0 0 0-2.04.557l-7.317 4.225a.148.148 0 0 1-.035.013 11.7 11.7 0 0 1-5.801 1.569c-2.748 0-5.303-1.007-7.194-2.835l-.278-.27a9.716 9.716 0 0 1-1.497-2.046.096.096 0 0 1-.013-.037l-.191-.347a.11.11 0 0 1-.023-.029c-.615-1.123-1.783-1.793-3.124-1.793z' fill='#607D8B'/><path d='M42.434 155.808c-2.51-.001-4.697-1.258-5.852-3.365-1.811-3.304-.438-7.634 3.059-9.654l12.291-7.098a7.599 7.599 0 0 1 3.789-1.033c2.51 0 4.697 1.258 5.852 3.365 1.811 3.304.439 7.634-3.059 9.654l-12.291 7.098a7.606 7.606 0 0 1-3.789 1.033zm13.287-20.683a7.128 7.128 0 0 0-3.555.971l-12.291 7.098c-3.279 1.893-4.573 5.942-2.883 9.024 1.071 1.955 3.106 3.122 5.442 3.122a7.13 7.13 0 0 0 3.556-.97l12.291-7.098c3.279-1.893 4.572-5.942 2.883-9.024-1.072-1.955-3.106-3.123-5.443-3.123z' fill='#607D8B'/><path d='M149.588 109.407l6.737 3.89v.887c0 .176.013.36.037.549.011.081.02.161.028.242.14 1.415.973 2.998 2.105 3.999l7.396 6.545c.177.156.358.295.541.415 1.579 1.04 2.95.466 3.062-1.282.049-.784.057-1.595.023-2.429l-.003-.16v-1.151l25.987 15.003v54c0 1.09-.77 1.53-1.72.982l-42.473-24.523c-.95-.548-1.72-1.877-1.72-2.966v-34.033' fill='#FAFAFA'/><path d='M194.553 191.25c-.257 0-.54-.085-.831-.253l-42.472-24.521c-.981-.567-1.779-1.943-1.779-3.068v-34.033h.234v34.033c0 1.051.745 2.336 1.661 2.866l42.473 24.521c.424.245.816.288 1.103.122.285-.164.442-.52.442-1.002v-53.933l-25.753-14.868.003 1.106c.034.832.026 1.654-.024 2.439-.054.844-.396 1.464-.963 1.746-.619.309-1.45.173-2.28-.373a5.023 5.023 0 0 1-.553-.426l-7.397-6.544c-1.158-1.026-1.999-2.625-2.143-4.076a9.624 9.624 0 0 0-.027-.238 4.241 4.241 0 0 1-.038-.564v-.82l-6.68-3.856.117-.202 6.738 3.89.058.034v.954c0 .171.012.351.036.533.011.083.021.165.029.246.138 1.395.948 2.935 2.065 3.923l7.397 6.545c.173.153.35.289.527.406.758.499 1.504.63 2.047.359.49-.243.786-.795.834-1.551.05-.778.057-1.591.024-2.417l-.004-.163v-1.355l.175.1 25.987 15.004.059.033v54.068c0 .569-.198.996-.559 1.204a1.002 1.002 0 0 1-.506.131' fill='#607D8B'/><path d='M145.685 163.161l24.115 13.922-25.978 14.998-1.462-.307c-6.534-2.17-13.628-3.728-21.019-4.616-4.365-.524-8.663 1.096-9.598 3.62a2.746 2.746 0 0 0-.011 1.928c1.538 4.267 4.236 8.363 7.995 12.135l.532.845-25.977 14.997-24.115-13.922 75.518-43.6' fill='#FFF'/><path d='M94.282 220.818l-.059-.033-24.29-14.024.175-.101 75.577-43.634.058.033 24.29 14.024-26.191 15.122-.045-.01-1.461-.307c-6.549-2.174-13.613-3.725-21.009-4.614a13.744 13.744 0 0 0-1.638-.097c-3.758 0-7.054 1.531-7.837 3.642a2.62 2.62 0 0 0-.01 1.848c1.535 4.258 4.216 8.326 7.968 12.091l.016.021.526.835.006.01.064.102-.105.061-25.977 14.998-.058.033zm-23.881-14.057l23.881 13.788 24.802-14.32c.546-.315.846-.489 1.017-.575l-.466-.74c-3.771-3.787-6.467-7.881-8.013-12.168a2.851 2.851 0 0 1 .011-2.008c.815-2.199 4.203-3.795 8.056-3.795.557 0 1.117.033 1.666.099 7.412.891 14.491 2.445 21.041 4.621.836.175 1.215.254 1.39.304l25.78-14.884-23.881-13.788-75.284 43.466z' fill='#607D8B'/><path d='M167.23 125.979v50.871l-27.321 15.773-6.461-14.167c-.91-1.996-3.428-1.738-5.624.574a10.238 10.238 0 0 0-2.33 4.018l-6.46 21.628-27.322 15.774v-50.871l75.518-43.6' fill='#FFF'/><path d='M91.712 220.567a.127.127 0 0 1-.059-.016.118.118 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.519-43.6a.117.117 0 0 1 .175.101v50.871c0 .041-.023.08-.059.1l-27.321 15.775a.118.118 0 0 1-.094.01.12.12 0 0 1-.071-.063l-6.46-14.168c-.375-.822-1.062-1.275-1.934-1.275-1.089 0-2.364.686-3.5 1.881a10.206 10.206 0 0 0-2.302 3.972l-6.46 21.627a.118.118 0 0 1-.054.068L91.77 220.551a.12.12 0 0 1-.058.016zm.117-50.92v50.601l27.106-15.65 6.447-21.583a10.286 10.286 0 0 1 2.357-4.065c1.18-1.242 2.517-1.954 3.669-1.954.969 0 1.731.501 2.146 1.411l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M168.543 126.213v50.87l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.624.574a10.248 10.248 0 0 0-2.33 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6' fill='#FFF'/><path d='M93.025 220.8a.123.123 0 0 1-.059-.015.12.12 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.518-43.6a.112.112 0 0 1 .117 0c.036.02.059.059.059.1v50.871a.116.116 0 0 1-.059.101l-27.321 15.774a.111.111 0 0 1-.094.01.115.115 0 0 1-.071-.062l-6.46-14.168c-.375-.823-1.062-1.275-1.935-1.275-1.088 0-2.363.685-3.499 1.881a10.19 10.19 0 0 0-2.302 3.971l-6.461 21.628a.108.108 0 0 1-.053.067l-27.322 15.775a.12.12 0 0 1-.058.015zm.117-50.919v50.6l27.106-15.649 6.447-21.584a10.293 10.293 0 0 1 2.357-4.065c1.179-1.241 2.516-1.954 3.668-1.954.969 0 1.732.502 2.147 1.412l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M169.8 177.083l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.625.574a10.246 10.246 0 0 0-2.329 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6v50.87z' fill='#FAFAFA'/><path d='M94.282 220.917a.234.234 0 0 1-.234-.233v-50.871c0-.083.045-.161.117-.202l75.518-43.601a.234.234 0 1 1 .35.202v50.871a.233.233 0 0 1-.116.202l-27.322 15.775a.232.232 0 0 1-.329-.106l-6.461-14.168c-.36-.789-.992-1.206-1.828-1.206-1.056 0-2.301.672-3.415 1.844a10.099 10.099 0 0 0-2.275 3.924l-6.46 21.628a.235.235 0 0 1-.107.136l-27.322 15.774a.23.23 0 0 1-.116.031zm.233-50.969v50.331l26.891-15.525 6.434-21.539a10.41 10.41 0 0 1 2.384-4.112c1.201-1.265 2.569-1.991 3.753-1.991 1.018 0 1.818.526 2.253 1.48l6.354 13.934 26.982-15.578v-50.331l-75.051 43.331z' fill='#607D8B'/><path d='M109.894 199.943c-1.774 0-3.241-.725-4.244-2.12a.224.224 0 0 1 .023-.294.233.233 0 0 1 .301-.023c.78.547 1.705.827 2.75.827 1.323 0 2.754-.439 4.256-1.306 5.311-3.067 9.631-10.518 9.631-16.611 0-1.927-.442-3.56-1.278-4.724a.232.232 0 0 1 .323-.327c1.671 1.172 2.591 3.381 2.591 6.219 0 6.242-4.426 13.863-9.865 17.003-1.574.908-3.084 1.356-4.488 1.356zm-2.969-1.542c.813.651 1.82.877 2.968.877h.001c1.321 0 2.753-.327 4.254-1.194 5.311-3.067 9.632-10.463 9.632-16.556 0-1.979-.463-3.599-1.326-4.761.411 1.035.625 2.275.625 3.635 0 6.243-4.426 13.883-9.865 17.023-1.574.909-3.084 1.317-4.49 1.317-.641 0-1.243-.149-1.799-.341z' fill='#607D8B'/><path d='M113.097 197.23c5.384-3.108 9.748-10.636 9.748-16.814 0-2.051-.483-3.692-1.323-4.86-1.784-1.252-4.374-1.194-7.257.47-5.384 3.108-9.748 10.636-9.748 16.814 0 2.051.483 3.692 1.323 4.86 1.784 1.252 4.374 1.194 7.257-.47' fill='#FAFAFA'/><path d='M108.724 198.614c-1.142 0-2.158-.213-3.019-.817-.021-.014-.04.014-.055-.007-.894-1.244-1.367-2.948-1.367-4.973 0-6.242 4.426-13.864 9.865-17.005 1.574-.908 3.084-1.363 4.49-1.363 1.142 0 2.158.309 3.018.913a.23.23 0 0 1 .056.056c.894 1.244 1.367 2.972 1.367 4.997 0 6.243-4.426 13.783-9.865 16.923-1.574.909-3.084 1.276-4.49 1.276zm-2.718-1.109c.774.532 1.688.776 2.718.776 1.323 0 2.754-.413 4.256-1.28 5.311-3.066 9.631-10.505 9.631-16.598 0-1.909-.434-3.523-1.255-4.685-.774-.533-1.688-.799-2.718-.799-1.323 0-2.755.441-4.256 1.308-5.311 3.066-9.631 10.506-9.631 16.599 0 1.909.434 3.517 1.255 4.679z' fill='#607D8B'/><path d='M149.318 114.262l-9.984 8.878 15.893 11.031 5.589-6.112-11.498-13.797' fill='#FAFAFA'/><path d='M169.676 120.84l-9.748 5.627c-3.642 2.103-9.528 2.113-13.147.024-3.62-2.089-3.601-5.488.041-7.591l9.495-5.608-6.729-3.885-81.836 47.071 45.923 26.514 3.081-1.779c.631-.365.869-.898.618-1.39-2.357-4.632-2.593-9.546-.683-14.262 5.638-13.92 24.509-24.815 48.618-28.07 8.169-1.103 16.68-.967 24.704.394.852.145 1.776.008 2.407-.357l3.081-1.778-25.825-14.91' fill='#FAFAFA'/><path d='M113.675 183.459a.47.47 0 0 1-.233-.062l-45.924-26.515a.468.468 0 0 1 .001-.809l81.836-47.071a.467.467 0 0 1 .466 0l6.729 3.885a.467.467 0 0 1-.467.809l-6.496-3.75-80.9 46.533 44.988 25.973 2.848-1.644c.192-.111.62-.409.435-.773-2.416-4.748-2.658-9.814-.7-14.65 2.806-6.927 8.885-13.242 17.582-18.263 8.657-4.998 19.518-8.489 31.407-10.094 8.198-1.107 16.79-.97 24.844.397.739.125 1.561.007 2.095-.301l2.381-1.374-25.125-14.506a.467.467 0 0 1 .467-.809l25.825 14.91a.467.467 0 0 1 0 .809l-3.081 1.779c-.721.417-1.763.575-2.718.413-7.963-1.351-16.457-1.486-24.563-.392-11.77 1.589-22.512 5.039-31.065 9.977-8.514 4.916-14.456 11.073-17.183 17.805-1.854 4.578-1.623 9.376.666 13.875.37.725.055 1.513-.8 2.006l-3.081 1.78a.476.476 0 0 1-.234.062' fill='#455A64'/><path d='M153.316 128.279c-2.413 0-4.821-.528-6.652-1.586-1.818-1.049-2.82-2.461-2.82-3.975 0-1.527 1.016-2.955 2.861-4.02l9.493-5.607a.233.233 0 1 1 .238.402l-9.496 5.609c-1.696.979-2.628 2.263-2.628 3.616 0 1.34.918 2.608 2.585 3.571 3.549 2.049 9.343 2.038 12.914-.024l9.748-5.628a.234.234 0 0 1 .234.405l-9.748 5.628c-1.858 1.072-4.296 1.609-6.729 1.609' fill='#607D8B'/><path d='M113.675 182.992l-45.913-26.508M113.675 183.342a.346.346 0 0 1-.175-.047l-45.913-26.508a.35.35 0 1 1 .35-.607l45.913 26.508a.35.35 0 0 1-.175.654' fill='#455A64'/><path d='M67.762 156.484v54.001c0 1.09.77 2.418 1.72 2.967l42.473 24.521c.95.549 1.72.11 1.72-.98v-54.001' fill='#FAFAFA'/><path d='M112.727 238.561c-.297 0-.62-.095-.947-.285l-42.473-24.521c-1.063-.613-1.895-2.05-1.895-3.27v-54.001a.35.35 0 1 1 .701 0v54.001c0 .96.707 2.18 1.544 2.663l42.473 24.522c.344.198.661.243.87.122.206-.119.325-.411.325-.799v-54.001a.35.35 0 1 1 .7 0v54.001c0 .655-.239 1.154-.675 1.406a1.235 1.235 0 0 1-.623.162' fill='#455A64'/><path d='M112.86 147.512h-.001c-2.318 0-4.499-.522-6.142-1.471-1.705-.984-2.643-2.315-2.643-3.749 0-1.445.952-2.791 2.68-3.788l12.041-6.953c1.668-.962 3.874-1.493 6.212-1.493 2.318 0 4.499.523 6.143 1.472 1.704.984 2.643 2.315 2.643 3.748 0 1.446-.952 2.791-2.68 3.789l-12.042 6.952c-1.668.963-3.874 1.493-6.211 1.493zm12.147-16.753c-2.217 0-4.298.497-5.861 1.399l-12.042 6.952c-1.502.868-2.33 1.998-2.33 3.182 0 1.173.815 2.289 2.293 3.142 1.538.889 3.596 1.378 5.792 1.378h.001c2.216 0 4.298-.497 5.861-1.399l12.041-6.953c1.502-.867 2.33-1.997 2.33-3.182 0-1.172-.814-2.288-2.292-3.142-1.539-.888-3.596-1.377-5.793-1.377z' fill='#607D8B'/><path d='M165.63 123.219l-5.734 3.311c-3.167 1.828-8.286 1.837-11.433.02-3.147-1.817-3.131-4.772.036-6.601l5.734-3.31 11.397 6.58' fill='#FAFAFA'/><path d='M154.233 117.448l9.995 5.771-4.682 2.704c-1.434.827-3.352 1.283-5.399 1.283-2.029 0-3.923-.449-5.333-1.263-1.29-.744-2-1.694-2-2.674 0-.991.723-1.955 2.036-2.713l5.383-3.108m0-.809l-5.734 3.31c-3.167 1.829-3.183 4.784-.036 6.601 1.568.905 3.623 1.357 5.684 1.357 2.077 0 4.159-.46 5.749-1.377l5.734-3.311-11.397-6.58M145.445 179.667c-1.773 0-3.241-.85-4.243-2.245-.067-.092-.057-.275.023-.356.08-.081.207-.12.3-.055.781.548 1.706.812 2.751.811 1.322 0 2.754-.446 4.256-1.313 5.31-3.066 9.631-10.522 9.631-16.615 0-1.927-.442-3.562-1.279-4.726a.235.235 0 0 1 .024-.301.232.232 0 0 1 .3-.027c1.67 1.172 2.59 3.38 2.59 6.219 0 6.242-4.425 13.987-9.865 17.127-1.573.908-3.083 1.481-4.488 1.481zM142.476 178c.814.651 1.82 1.002 2.969 1.002 1.322 0 2.753-.452 4.255-1.32 5.31-3.065 9.631-10.523 9.631-16.617 0-1.98-.463-3.63-1.325-4.793.411 1.035.624 2.26.624 3.62 0 6.242-4.425 13.875-9.865 17.015-1.573.909-3.084 1.376-4.489 1.376a5.49 5.49 0 0 1-1.8-.283z' fill='#607D8B'/><path d='M148.648 176.704c5.384-3.108 9.748-10.636 9.748-16.813 0-2.052-.483-3.693-1.322-4.861-1.785-1.252-4.375-1.194-7.258.471-5.383 3.108-9.748 10.636-9.748 16.813 0 2.051.484 3.692 1.323 4.86 1.785 1.253 4.374 1.195 7.257-.47' fill='#FAFAFA'/><path d='M144.276 178.276c-1.143 0-2.158-.307-3.019-.911a.217.217 0 0 1-.055-.054c-.895-1.244-1.367-2.972-1.367-4.997 0-6.241 4.425-13.875 9.865-17.016 1.573-.908 3.084-1.369 4.489-1.369 1.143 0 2.158.307 3.019.91a.24.24 0 0 1 .055.055c.894 1.244 1.367 2.971 1.367 4.997 0 6.241-4.425 13.875-9.865 17.016-1.573.908-3.084 1.369-4.489 1.369zm-2.718-1.172c.773.533 1.687.901 2.718.901 1.322 0 2.754-.538 4.256-1.405 5.31-3.066 9.631-10.567 9.631-16.661 0-1.908-.434-3.554-1.256-4.716-.774-.532-1.688-.814-2.718-.814-1.322 0-2.754.433-4.256 1.3-5.31 3.066-9.631 10.564-9.631 16.657 0 1.91.434 3.576 1.256 4.738z' fill='#607D8B'/><path d='M150.72 172.361l-.363-.295a24.105 24.105 0 0 0 2.148-3.128 24.05 24.05 0 0 0 1.977-4.375l.443.149a24.54 24.54 0 0 1-2.015 4.46 24.61 24.61 0 0 1-2.19 3.189M115.917 191.514l-.363-.294a24.174 24.174 0 0 0 2.148-3.128 24.038 24.038 0 0 0 1.976-4.375l.443.148a24.48 24.48 0 0 1-2.015 4.461 24.662 24.662 0 0 1-2.189 3.188M114 237.476V182.584 237.476' fill='#607D8B'/><g><path d='M81.822 37.474c.017-.135-.075-.28-.267-.392-.327-.188-.826-.21-1.109-.045l-6.012 3.471c-.131.076-.194.178-.191.285.002.132.002.461.002.578v.043l-.007.128-6.591 3.779c-.001 0-2.077 1.046-2.787 5.192 0 0-.912 6.961-.898 19.745.015 12.57.606 17.07 1.167 21.351.22 1.684 3.001 2.125 3.001 2.125.331.04.698-.027 1.08-.248l75.273-43.551c1.808-1.069 2.667-3.719 3.056-6.284 1.213-7.99 1.675-32.978-.275-39.878-.196-.693-.51-1.083-.868-1.282l-2.086-.79c-.727.028-1.416.467-1.534.535L82.032 37.072l-.21.402' fill='#FFF'/><path d='M144.311 1.701l2.085.79c.358.199.672.589.868 1.282 1.949 6.9 1.487 31.887.275 39.878-.39 2.565-1.249 5.215-3.056 6.284L69.21 93.486a1.78 1.78 0 0 1-.896.258l-.183-.011c0 .001-2.782-.44-3.003-2.124-.56-4.282-1.151-8.781-1.165-21.351-.015-12.784.897-19.745.897-19.745.71-4.146 2.787-5.192 2.787-5.192l6.591-3.779.007-.128v-.043c0-.117 0-.446-.002-.578-.003-.107.059-.21.191-.285l6.012-3.472a.98.98 0 0 1 .481-.11c.218 0 .449.053.627.156.193.112.285.258.268.392l.211-.402 60.744-34.836c.117-.068.806-.507 1.534-.535m0-.997l-.039.001c-.618.023-1.283.244-1.974.656l-.021.012-60.519 34.706a2.358 2.358 0 0 0-.831-.15c-.365 0-.704.084-.98.244l-6.012 3.471c-.442.255-.699.69-.689 1.166l.001.15-6.08 3.487c-.373.199-2.542 1.531-3.29 5.898l-.006.039c-.009.07-.92 7.173-.906 19.875.014 12.62.603 17.116 1.172 21.465l.002.015c.308 2.355 3.475 2.923 3.836 2.98l.034.004c.101.013.204.019.305.019a2.77 2.77 0 0 0 1.396-.392l75.273-43.552c1.811-1.071 2.999-3.423 3.542-6.997 1.186-7.814 1.734-33.096-.301-40.299-.253-.893-.704-1.527-1.343-1.882l-.132-.062-2.085-.789a.973.973 0 0 0-.353-.065' fill='#455A64'/><path d='M128.267 11.565l1.495.434-56.339 32.326' fill='#FFF'/><path d='M74.202 90.545a.5.5 0 0 1-.25-.931l18.437-10.645a.499.499 0 1 1 .499.864L74.451 90.478l-.249.067M75.764 42.654l-.108-.062.046-.171 5.135-2.964.17.045-.045.171-5.135 2.964-.063.017M70.52 90.375V46.421l.063-.036L137.84 7.554v43.954l-.062.036L70.52 90.375zm.25-43.811v43.38l66.821-38.579V7.985L70.77 46.564z' fill='#607D8B'/><path d='M86.986 83.182c-.23.149-.612.384-.849.523l-11.505 6.701c-.237.139-.206.252.068.252h.565c.275 0 .693-.113.93-.252L87.7 83.705c.237-.139.428-.253.425-.256a11.29 11.29 0 0 1-.006-.503c0-.274-.188-.377-.418-.227l-.715.463' fill='#607D8B'/><path d='M75.266 90.782H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.236-.138.615-.371.844-.519l.715-.464a.488.488 0 0 1 .266-.089c.172 0 .345.13.345.421 0 .214.001.363.003.437l.006.004-.004.069c-.003.075-.003.075-.486.356l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.108.866-.234l11.505-6.702c.168-.098.294-.173.361-.214-.004-.084-.004-.218-.004-.437l-.095-.171-.131.049-.714.463c-.232.15-.616.386-.854.525l-11.505 6.702-.029.018z' fill='#607D8B'/><path d='M75.266 89.871H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.258-.151.694-.268.993-.268h.565c.2 0 .316.056.346.166.03.11-.043.217-.215.317l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.107.866-.234l11.505-6.702.03-.018-.035-.001h-.565c-.252 0-.649.108-.867.234l-11.505 6.702-.029.018zM74.37 90.801v-1.247 1.247' fill='#607D8B'/><path d='M68.13 93.901c-.751-.093-1.314-.737-1.439-1.376-.831-4.238-1.151-8.782-1.165-21.352-.015-12.784.897-19.745.897-19.745.711-4.146 2.787-5.192 2.787-5.192l74.859-43.219c.223-.129 2.487-1.584 3.195.923 1.95 6.9 1.488 31.887.275 39.878-.389 2.565-1.248 5.215-3.056 6.283L69.21 93.653c-.382.221-.749.288-1.08.248 0 0-2.781-.441-3.001-2.125-.561-4.281-1.152-8.781-1.167-21.351-.014-12.784.898-19.745.898-19.745.71-4.146 2.787-5.191 2.787-5.191l6.598-3.81.871-.119 6.599-3.83.046-.461L68.13 93.901' fill='#FAFAFA'/><path d='M68.317 94.161l-.215-.013h-.001l-.244-.047c-.719-.156-2.772-.736-2.976-2.292-.568-4.34-1.154-8.813-1.168-21.384-.014-12.654.891-19.707.9-19.777.725-4.231 2.832-5.338 2.922-5.382l6.628-3.827.87-.119 6.446-3.742.034-.334a.248.248 0 0 1 .273-.223.248.248 0 0 1 .223.272l-.059.589-6.752 3.919-.87.118-6.556 3.785c-.031.016-1.99 1.068-2.666 5.018-.007.06-.908 7.086-.894 19.702.014 12.539.597 16.996 1.161 21.305.091.691.689 1.154 1.309 1.452a1.95 1.95 0 0 1-.236-.609c-.781-3.984-1.155-8.202-1.17-21.399-.014-12.653.891-19.707.9-19.777.725-4.231 2.832-5.337 2.922-5.382-.004.001 74.444-42.98 74.846-43.212l.028-.017c.904-.538 1.72-.688 2.36-.433.555.221.949.733 1.172 1.52 2.014 7.128 1.46 32.219.281 39.983-.507 3.341-1.575 5.515-3.175 6.462L69.335 93.869a2.023 2.023 0 0 1-1.018.292zm-.147-.507c.293.036.604-.037.915-.217l75.273-43.551c1.823-1.078 2.602-3.915 2.934-6.106 1.174-7.731 1.731-32.695-.268-39.772-.178-.631-.473-1.032-.876-1.192-.484-.193-1.166-.052-1.921.397l-.034.021-74.858 43.218c-.031.017-1.989 1.069-2.666 5.019-.007.059-.908 7.085-.894 19.702.015 13.155.386 17.351 1.161 21.303.09.461.476.983 1.037 1.139.114.025.185.037.196.039h.001z' fill='#455A64'/><path d='M69.317 68.982c.489-.281.885-.056.885.505 0 .56-.396 1.243-.885 1.525-.488.282-.884.057-.884-.504 0-.56.396-1.243.884-1.526' fill='#FFF'/><path d='M68.92 71.133c-.289 0-.487-.228-.487-.625 0-.56.396-1.243.884-1.526a.812.812 0 0 1 .397-.121c.289 0 .488.229.488.626 0 .56-.396 1.243-.885 1.525a.812.812 0 0 1-.397.121m.794-2.459a.976.976 0 0 0-.49.147c-.548.317-.978 1.058-.978 1.687 0 .486.271.812.674.812a.985.985 0 0 0 .491-.146c.548-.317.978-1.057.978-1.687 0-.486-.272-.813-.675-.813' fill='#8097A2'/><path d='M68.92 70.947c-.271 0-.299-.307-.299-.439 0-.491.361-1.116.79-1.363a.632.632 0 0 1 .303-.096c.272 0 .301.306.301.438 0 .491-.363 1.116-.791 1.364a.629.629 0 0 1-.304.096m.794-2.086a.812.812 0 0 0-.397.121c-.488.283-.884.966-.884 1.526 0 .397.198.625.487.625a.812.812 0 0 0 .397-.121c.489-.282.885-.965.885-1.525 0-.397-.199-.626-.488-.626' fill='#8097A2'/><path d='M69.444 85.35c.264-.152.477-.031.477.272 0 .303-.213.67-.477.822-.263.153-.477.031-.477-.271 0-.302.214-.671.477-.823' fill='#FFF'/><path d='M69.23 86.51c-.156 0-.263-.123-.263-.337 0-.302.214-.671.477-.823a.431.431 0 0 1 .214-.066c.156 0 .263.124.263.338 0 .303-.213.67-.477.822a.431.431 0 0 1-.214.066m.428-1.412c-.1 0-.203.029-.307.09-.32.185-.57.618-.57.985 0 .309.185.524.449.524a.63.63 0 0 0 .308-.09c.32-.185.57-.618.57-.985 0-.309-.185-.524-.45-.524' fill='#8097A2'/><path d='M69.23 86.322l-.076-.149c0-.235.179-.544.384-.661l.12-.041.076.151c0 .234-.179.542-.383.66l-.121.04m.428-1.038a.431.431 0 0 0-.214.066c-.263.152-.477.521-.477.823 0 .214.107.337.263.337a.431.431 0 0 0 .214-.066c.264-.152.477-.519.477-.822 0-.214-.107-.338-.263-.338' fill='#8097A2'/><path d='M139.278 7.769v43.667L72.208 90.16V46.493l67.07-38.724' fill='#455A64'/><path d='M72.083 90.375V46.421l.063-.036 67.257-38.831v43.954l-.062.036-67.258 38.831zm.25-43.811v43.38l66.821-38.579V7.985L72.333 46.564z' fill='#607D8B'/></g><path d='M125.737 88.647l-7.639 3.334V84l-11.459 4.713v8.269L99 100.315l13.369 3.646 13.368-15.314' fill='#455A64'/></g></svg>\";\nfunction RotateInstructions() {\n this.loadIcon_();\n var overlay = document.createElement('div');\n var s = overlay.style;\n s.position = 'fixed';\n s.top = 0;\n s.right = 0;\n s.bottom = 0;\n s.left = 0;\n s.backgroundColor = 'gray';\n s.fontFamily = 'sans-serif';\n s.zIndex = 1000000;\n var img = document.createElement('img');\n img.src = this.icon;\n var s = img.style;\n s.marginLeft = '25%';\n s.marginTop = '25%';\n s.width = '50%';\n overlay.appendChild(img);\n var text = document.createElement('div');\n var s = text.style;\n s.textAlign = 'center';\n s.fontSize = '16px';\n s.lineHeight = '24px';\n s.margin = '24px 25%';\n s.width = '50%';\n text.innerHTML = 'Place your phone into your Cardboard viewer.';\n overlay.appendChild(text);\n var snackbar = document.createElement('div');\n var s = snackbar.style;\n s.backgroundColor = '#CFD8DC';\n s.position = 'fixed';\n s.bottom = 0;\n s.width = '100%';\n s.height = '48px';\n s.padding = '14px 24px';\n s.boxSizing = 'border-box';\n s.color = '#656A6B';\n overlay.appendChild(snackbar);\n var snackbarText = document.createElement('div');\n snackbarText.style.float = 'left';\n snackbarText.innerHTML = 'No Cardboard viewer?';\n var snackbarButton = document.createElement('a');\n snackbarButton.href = 'https://www.google.com/get/cardboard/get-cardboard/';\n snackbarButton.innerHTML = 'get one';\n snackbarButton.target = '_blank';\n var s = snackbarButton.style;\n s.float = 'right';\n s.fontWeight = 600;\n s.textTransform = 'uppercase';\n s.borderLeft = '1px solid gray';\n s.paddingLeft = '24px';\n s.textDecoration = 'none';\n s.color = '#656A6B';\n snackbar.appendChild(snackbarText);\n snackbar.appendChild(snackbarButton);\n this.overlay = overlay;\n this.text = text;\n this.hide();\n}\nRotateInstructions.prototype.show = function (parent) {\n if (!parent && !this.overlay.parentElement) {\n document.body.appendChild(this.overlay);\n } else if (parent) {\n if (this.overlay.parentElement && this.overlay.parentElement != parent) this.overlay.parentElement.removeChild(this.overlay);\n parent.appendChild(this.overlay);\n }\n this.overlay.style.display = 'block';\n var img = this.overlay.querySelector('img');\n var s = img.style;\n if (isLandscapeMode()) {\n s.width = '20%';\n s.marginLeft = '40%';\n s.marginTop = '3%';\n } else {\n s.width = '50%';\n s.marginLeft = '25%';\n s.marginTop = '25%';\n }\n};\nRotateInstructions.prototype.hide = function () {\n this.overlay.style.display = 'none';\n};\nRotateInstructions.prototype.showTemporarily = function (ms, parent) {\n this.show(parent);\n this.timer = setTimeout(this.hide.bind(this), ms);\n};\nRotateInstructions.prototype.disableShowTemporarily = function () {\n clearTimeout(this.timer);\n};\nRotateInstructions.prototype.update = function () {\n this.disableShowTemporarily();\n if (!isLandscapeMode() && isMobile()) {\n this.show();\n } else {\n this.hide();\n }\n};\nRotateInstructions.prototype.loadIcon_ = function () {\n this.icon = dataUri('image/svg+xml', rotateInstructionsAsset);\n};\nvar DEFAULT_VIEWER = 'CardboardV1';\nvar VIEWER_KEY = 'WEBVR_CARDBOARD_VIEWER';\nvar CLASS_NAME = 'webvr-polyfill-viewer-selector';\nfunction ViewerSelector(defaultViewer) {\n try {\n this.selectedKey = localStorage.getItem(VIEWER_KEY);\n } catch (error) {\n console.error('Failed to load viewer profile: %s', error);\n }\n if (!this.selectedKey) {\n this.selectedKey = defaultViewer || DEFAULT_VIEWER;\n }\n this.dialog = this.createDialog_(DeviceInfo.Viewers);\n this.root = null;\n this.onChangeCallbacks_ = [];\n}\nViewerSelector.prototype.show = function (root) {\n this.root = root;\n root.appendChild(this.dialog);\n var selected = this.dialog.querySelector('#' + this.selectedKey);\n selected.checked = true;\n this.dialog.style.display = 'block';\n};\nViewerSelector.prototype.hide = function () {\n if (this.root && this.root.contains(this.dialog)) {\n this.root.removeChild(this.dialog);\n }\n this.dialog.style.display = 'none';\n};\nViewerSelector.prototype.getCurrentViewer = function () {\n return DeviceInfo.Viewers[this.selectedKey];\n};\nViewerSelector.prototype.getSelectedKey_ = function () {\n var input = this.dialog.querySelector('input[name=field]:checked');\n if (input) {\n return input.id;\n }\n return null;\n};\nViewerSelector.prototype.onChange = function (cb) {\n this.onChangeCallbacks_.push(cb);\n};\nViewerSelector.prototype.fireOnChange_ = function (viewer) {\n for (var i = 0; i < this.onChangeCallbacks_.length; i++) {\n this.onChangeCallbacks_[i](viewer);\n }\n};\nViewerSelector.prototype.onSave_ = function () {\n this.selectedKey = this.getSelectedKey_();\n if (!this.selectedKey || !DeviceInfo.Viewers[this.selectedKey]) {\n console.error('ViewerSelector.onSave_: this should never happen!');\n return;\n }\n this.fireOnChange_(DeviceInfo.Viewers[this.selectedKey]);\n try {\n localStorage.setItem(VIEWER_KEY, this.selectedKey);\n } catch (error) {\n console.error('Failed to save viewer profile: %s', error);\n }\n this.hide();\n};\nViewerSelector.prototype.createDialog_ = function (options) {\n var container = document.createElement('div');\n container.classList.add(CLASS_NAME);\n container.style.display = 'none';\n var overlay = document.createElement('div');\n var s = overlay.style;\n s.position = 'fixed';\n s.left = 0;\n s.top = 0;\n s.width = '100%';\n s.height = '100%';\n s.background = 'rgba(0, 0, 0, 0.3)';\n overlay.addEventListener('click', this.hide.bind(this));\n var width = 280;\n var dialog = document.createElement('div');\n var s = dialog.style;\n s.boxSizing = 'border-box';\n s.position = 'fixed';\n s.top = '24px';\n s.left = '50%';\n s.marginLeft = -width / 2 + 'px';\n s.width = width + 'px';\n s.padding = '24px';\n s.overflow = 'hidden';\n s.background = '#fafafa';\n s.fontFamily = \"'Roboto', sans-serif\";\n s.boxShadow = '0px 5px 20px #666';\n dialog.appendChild(this.createH1_('Select your viewer'));\n for (var id in options) {\n dialog.appendChild(this.createChoice_(id, options[id].label));\n }\n dialog.appendChild(this.createButton_('Save', this.onSave_.bind(this)));\n container.appendChild(overlay);\n container.appendChild(dialog);\n return container;\n};\nViewerSelector.prototype.createH1_ = function (name) {\n var h1 = document.createElement('h1');\n var s = h1.style;\n s.color = 'black';\n s.fontSize = '20px';\n s.fontWeight = 'bold';\n s.marginTop = 0;\n s.marginBottom = '24px';\n h1.innerHTML = name;\n return h1;\n};\nViewerSelector.prototype.createChoice_ = function (id, name) {\n var div = document.createElement('div');\n div.style.marginTop = '8px';\n div.style.color = 'black';\n var input = document.createElement('input');\n input.style.fontSize = '30px';\n input.setAttribute('id', id);\n input.setAttribute('type', 'radio');\n input.setAttribute('value', id);\n input.setAttribute('name', 'field');\n var label = document.createElement('label');\n label.style.marginLeft = '4px';\n label.setAttribute('for', id);\n label.innerHTML = name;\n div.appendChild(input);\n div.appendChild(label);\n return div;\n};\nViewerSelector.prototype.createButton_ = function (label, onclick) {\n var button = document.createElement('button');\n button.innerHTML = label;\n var s = button.style;\n s.float = 'right';\n s.textTransform = 'uppercase';\n s.color = '#1094f7';\n s.fontSize = '14px';\n s.letterSpacing = 0;\n s.border = 0;\n s.background = 'none';\n s.marginTop = '16px';\n button.addEventListener('click', onclick);\n return button;\n};\nvar commonjsGlobal$$1 = typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {};\nfunction unwrapExports$$1 (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\nfunction createCommonjsModule$$1(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\nvar NoSleep = createCommonjsModule$$1(function (module, exports) {\n(function webpackUniversalModuleDefinition(root, factory) {\n\tmodule.exports = factory();\n})(commonjsGlobal$$1, function() {\nreturn (function(modules) {\n \tvar installedModules = {};\n \tfunction __webpack_require__(moduleId) {\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n \t\tmodule.l = true;\n \t\treturn module.exports;\n \t}\n \t__webpack_require__.m = modules;\n \t__webpack_require__.c = installedModules;\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n \t__webpack_require__.p = \"\";\n \treturn __webpack_require__(__webpack_require__.s = 0);\n })\n ([\n (function(module, exports, __webpack_require__) {\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nvar mediaFile = __webpack_require__(1);\nvar oldIOS = typeof navigator !== 'undefined' && parseFloat(('' + (/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0, ''])[1]).replace('undefined', '3_2').replace('_', '.').replace('_', '')) < 10 && !window.MSStream;\nvar NoSleep = function () {\n function NoSleep() {\n _classCallCheck(this, NoSleep);\n if (oldIOS) {\n this.noSleepTimer = null;\n } else {\n this.noSleepVideo = document.createElement('video');\n this.noSleepVideo.setAttribute('playsinline', '');\n this.noSleepVideo.setAttribute('src', mediaFile);\n this.noSleepVideo.addEventListener('timeupdate', function (e) {\n if (this.noSleepVideo.currentTime > 0.5) {\n this.noSleepVideo.currentTime = Math.random();\n }\n }.bind(this));\n }\n }\n _createClass(NoSleep, [{\n key: 'enable',\n value: function enable() {\n if (oldIOS) {\n this.disable();\n this.noSleepTimer = window.setInterval(function () {\n window.location.href = '/';\n window.setTimeout(window.stop, 0);\n }, 15000);\n } else {\n this.noSleepVideo.play();\n }\n }\n }, {\n key: 'disable',\n value: function disable() {\n if (oldIOS) {\n if (this.noSleepTimer) {\n window.clearInterval(this.noSleepTimer);\n this.noSleepTimer = null;\n }\n } else {\n this.noSleepVideo.pause();\n }\n }\n }]);\n return NoSleep;\n}();\nmodule.exports = NoSleep;\n }),\n (function(module, exports, __webpack_require__) {\nmodule.exports = 'data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9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AAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA=';\n })\n ]);\n});\n});\nvar NoSleep$1 = unwrapExports$$1(NoSleep);\nvar nextDisplayId = 1000;\nvar defaultLeftBounds = [0, 0, 0.5, 1];\nvar defaultRightBounds = [0.5, 0, 0.5, 1];\nvar raf = window.requestAnimationFrame;\nvar caf = window.cancelAnimationFrame;\nfunction VRFrameData() {\n this.leftProjectionMatrix = new Float32Array(16);\n this.leftViewMatrix = new Float32Array(16);\n this.rightProjectionMatrix = new Float32Array(16);\n this.rightViewMatrix = new Float32Array(16);\n this.pose = null;\n}\nfunction VRDisplayCapabilities(config) {\n Object.defineProperties(this, {\n hasPosition: {\n writable: false, enumerable: true, value: config.hasPosition\n },\n hasExternalDisplay: {\n writable: false, enumerable: true, value: config.hasExternalDisplay\n },\n canPresent: {\n writable: false, enumerable: true, value: config.canPresent\n },\n maxLayers: {\n writable: false, enumerable: true, value: config.maxLayers\n },\n hasOrientation: {\n enumerable: true, get: function get() {\n deprecateWarning('VRDisplayCapabilities.prototype.hasOrientation', 'VRDisplay.prototype.getFrameData');\n return config.hasOrientation;\n }\n }\n });\n}\nfunction VRDisplay(config) {\n config = config || {};\n var USE_WAKELOCK = 'wakelock' in config ? config.wakelock : true;\n this.isPolyfilled = true;\n this.displayId = nextDisplayId++;\n this.displayName = '';\n this.depthNear = 0.01;\n this.depthFar = 10000.0;\n this.isPresenting = false;\n Object.defineProperty(this, 'isConnected', {\n get: function get() {\n deprecateWarning('VRDisplay.prototype.isConnected', 'VRDisplayCapabilities.prototype.hasExternalDisplay');\n return false;\n }\n });\n this.capabilities = new VRDisplayCapabilities({\n hasPosition: false,\n hasOrientation: false,\n hasExternalDisplay: false,\n canPresent: false,\n maxLayers: 1\n });\n this.stageParameters = null;\n this.waitingForPresent_ = false;\n this.layer_ = null;\n this.originalParent_ = null;\n this.fullscreenElement_ = null;\n this.fullscreenWrapper_ = null;\n this.fullscreenElementCachedStyle_ = null;\n this.fullscreenEventTarget_ = null;\n this.fullscreenChangeHandler_ = null;\n this.fullscreenErrorHandler_ = null;\n if (USE_WAKELOCK && isMobile()) {\n this.wakelock_ = new NoSleep$1();\n }\n}\nVRDisplay.prototype.getFrameData = function (frameData) {\n return frameDataFromPose(frameData, this._getPose(), this);\n};\nVRDisplay.prototype.getPose = function () {\n deprecateWarning('VRDisplay.prototype.getPose', 'VRDisplay.prototype.getFrameData');\n return this._getPose();\n};\nVRDisplay.prototype.resetPose = function () {\n deprecateWarning('VRDisplay.prototype.resetPose');\n return this._resetPose();\n};\nVRDisplay.prototype.getImmediatePose = function () {\n deprecateWarning('VRDisplay.prototype.getImmediatePose', 'VRDisplay.prototype.getFrameData');\n return this._getPose();\n};\nVRDisplay.prototype.requestAnimationFrame = function (callback) {\n return raf(callback);\n};\nVRDisplay.prototype.cancelAnimationFrame = function (id) {\n return caf(id);\n};\nVRDisplay.prototype.wrapForFullscreen = function (element) {\n if (isIOS()) {\n return element;\n }\n if (!this.fullscreenWrapper_) {\n this.fullscreenWrapper_ = document.createElement('div');\n var cssProperties = ['height: ' + Math.min(screen.height, screen.width) + 'px !important', 'top: 0 !important', 'left: 0 !important', 'right: 0 !important', 'border: 0', 'margin: 0', 'padding: 0', 'z-index: 999999 !important', 'position: fixed'];\n this.fullscreenWrapper_.setAttribute('style', cssProperties.join('; ') + ';');\n this.fullscreenWrapper_.classList.add('webvr-polyfill-fullscreen-wrapper');\n }\n if (this.fullscreenElement_ == element) {\n return this.fullscreenWrapper_;\n }\n if (this.fullscreenElement_) {\n if (this.originalParent_) {\n this.originalParent_.appendChild(this.fullscreenElement_);\n } else {\n this.fullscreenElement_.parentElement.removeChild(this.fullscreenElement_);\n }\n }\n this.fullscreenElement_ = element;\n this.originalParent_ = element.parentElement;\n if (!this.originalParent_) {\n document.body.appendChild(element);\n }\n if (!this.fullscreenWrapper_.parentElement) {\n var parent = this.fullscreenElement_.parentElement;\n parent.insertBefore(this.fullscreenWrapper_, this.fullscreenElement_);\n parent.removeChild(this.fullscreenElement_);\n }\n this.fullscreenWrapper_.insertBefore(this.fullscreenElement_, this.fullscreenWrapper_.firstChild);\n this.fullscreenElementCachedStyle_ = this.fullscreenElement_.getAttribute('style');\n var self = this;\n function applyFullscreenElementStyle() {\n if (!self.fullscreenElement_) {\n return;\n }\n var cssProperties = ['position: absolute', 'top: 0', 'left: 0', 'width: ' + Math.max(screen.width, screen.height) + 'px', 'height: ' + Math.min(screen.height, screen.width) + 'px', 'border: 0', 'margin: 0', 'padding: 0'];\n self.fullscreenElement_.setAttribute('style', cssProperties.join('; ') + ';');\n }\n applyFullscreenElementStyle();\n return this.fullscreenWrapper_;\n};\nVRDisplay.prototype.removeFullscreenWrapper = function () {\n if (!this.fullscreenElement_) {\n return;\n }\n var element = this.fullscreenElement_;\n if (this.fullscreenElementCachedStyle_) {\n element.setAttribute('style', this.fullscreenElementCachedStyle_);\n } else {\n element.removeAttribute('style');\n }\n this.fullscreenElement_ = null;\n this.fullscreenElementCachedStyle_ = null;\n var parent = this.fullscreenWrapper_.parentElement;\n this.fullscreenWrapper_.removeChild(element);\n if (this.originalParent_ === parent) {\n parent.insertBefore(element, this.fullscreenWrapper_);\n }\n else if (this.originalParent_) {\n this.originalParent_.appendChild(element);\n }\n parent.removeChild(this.fullscreenWrapper_);\n return element;\n};\nVRDisplay.prototype.requestPresent = function (layers) {\n var wasPresenting = this.isPresenting;\n var self = this;\n if (!(layers instanceof Array)) {\n deprecateWarning('VRDisplay.prototype.requestPresent with non-array argument', 'an array of VRLayers as the first argument');\n layers = [layers];\n }\n return new Promise(function (resolve, reject) {\n if (!self.capabilities.canPresent) {\n reject(new Error('VRDisplay is not capable of presenting.'));\n return;\n }\n if (layers.length == 0 || layers.length > self.capabilities.maxLayers) {\n reject(new Error('Invalid number of layers.'));\n return;\n }\n var incomingLayer = layers[0];\n if (!incomingLayer.source) {\n resolve();\n return;\n }\n var leftBounds = incomingLayer.leftBounds || defaultLeftBounds;\n var rightBounds = incomingLayer.rightBounds || defaultRightBounds;\n if (wasPresenting) {\n var layer = self.layer_;\n if (layer.source !== incomingLayer.source) {\n layer.source = incomingLayer.source;\n }\n for (var i = 0; i < 4; i++) {\n layer.leftBounds[i] = leftBounds[i];\n layer.rightBounds[i] = rightBounds[i];\n }\n self.wrapForFullscreen(self.layer_.source);\n self.updatePresent_();\n resolve();\n return;\n }\n self.layer_ = {\n predistorted: incomingLayer.predistorted,\n source: incomingLayer.source,\n leftBounds: leftBounds.slice(0),\n rightBounds: rightBounds.slice(0)\n };\n self.waitingForPresent_ = false;\n if (self.layer_ && self.layer_.source) {\n var fullscreenElement = self.wrapForFullscreen(self.layer_.source);\n var onFullscreenChange = function onFullscreenChange() {\n var actualFullscreenElement = getFullscreenElement();\n self.isPresenting = fullscreenElement === actualFullscreenElement;\n if (self.isPresenting) {\n if (screen.orientation && screen.orientation.lock) {\n screen.orientation.lock('landscape-primary').catch(function (error) {\n console.error('screen.orientation.lock() failed due to', error.message);\n });\n }\n self.waitingForPresent_ = false;\n self.beginPresent_();\n resolve();\n } else {\n if (screen.orientation && screen.orientation.unlock) {\n screen.orientation.unlock();\n }\n self.removeFullscreenWrapper();\n self.disableWakeLock();\n self.endPresent_();\n self.removeFullscreenListeners_();\n }\n self.fireVRDisplayPresentChange_();\n };\n var onFullscreenError = function onFullscreenError() {\n if (!self.waitingForPresent_) {\n return;\n }\n self.removeFullscreenWrapper();\n self.removeFullscreenListeners_();\n self.disableWakeLock();\n self.waitingForPresent_ = false;\n self.isPresenting = false;\n reject(new Error('Unable to present.'));\n };\n self.addFullscreenListeners_(fullscreenElement, onFullscreenChange, onFullscreenError);\n if (requestFullscreen(fullscreenElement)) {\n self.enableWakeLock();\n self.waitingForPresent_ = true;\n } else if (isIOS() || isWebViewAndroid()) {\n self.enableWakeLock();\n self.isPresenting = true;\n self.beginPresent_();\n self.fireVRDisplayPresentChange_();\n resolve();\n }\n }\n if (!self.waitingForPresent_ && !isIOS()) {\n exitFullscreen();\n reject(new Error('Unable to present.'));\n }\n });\n};\nVRDisplay.prototype.exitPresent = function () {\n var wasPresenting = this.isPresenting;\n var self = this;\n this.isPresenting = false;\n this.layer_ = null;\n this.disableWakeLock();\n return new Promise(function (resolve, reject) {\n if (wasPresenting) {\n if (!exitFullscreen() && isIOS()) {\n self.endPresent_();\n self.fireVRDisplayPresentChange_();\n }\n if (isWebViewAndroid()) {\n self.removeFullscreenWrapper();\n self.removeFullscreenListeners_();\n self.endPresent_();\n self.fireVRDisplayPresentChange_();\n }\n resolve();\n } else {\n reject(new Error('Was not presenting to VRDisplay.'));\n }\n });\n};\nVRDisplay.prototype.getLayers = function () {\n if (this.layer_) {\n return [this.layer_];\n }\n return [];\n};\nVRDisplay.prototype.fireVRDisplayPresentChange_ = function () {\n var event = new CustomEvent('vrdisplaypresentchange', { detail: { display: this } });\n window.dispatchEvent(event);\n};\nVRDisplay.prototype.fireVRDisplayConnect_ = function () {\n var event = new CustomEvent('vrdisplayconnect', { detail: { display: this } });\n window.dispatchEvent(event);\n};\nVRDisplay.prototype.addFullscreenListeners_ = function (element, changeHandler, errorHandler) {\n this.removeFullscreenListeners_();\n this.fullscreenEventTarget_ = element;\n this.fullscreenChangeHandler_ = changeHandler;\n this.fullscreenErrorHandler_ = errorHandler;\n if (changeHandler) {\n if (document.fullscreenEnabled) {\n element.addEventListener('fullscreenchange', changeHandler, false);\n } else if (document.webkitFullscreenEnabled) {\n element.addEventListener('webkitfullscreenchange', changeHandler, false);\n } else if (document.mozFullScreenEnabled) {\n document.addEventListener('mozfullscreenchange', changeHandler, false);\n } else if (document.msFullscreenEnabled) {\n element.addEventListener('msfullscreenchange', changeHandler, false);\n }\n }\n if (errorHandler) {\n if (document.fullscreenEnabled) {\n element.addEventListener('fullscreenerror', errorHandler, false);\n } else if (document.webkitFullscreenEnabled) {\n element.addEventListener('webkitfullscreenerror', errorHandler, false);\n } else if (document.mozFullScreenEnabled) {\n document.addEventListener('mozfullscreenerror', errorHandler, false);\n } else if (document.msFullscreenEnabled) {\n element.addEventListener('msfullscreenerror', errorHandler, false);\n }\n }\n};\nVRDisplay.prototype.removeFullscreenListeners_ = function () {\n if (!this.fullscreenEventTarget_) return;\n var element = this.fullscreenEventTarget_;\n if (this.fullscreenChangeHandler_) {\n var changeHandler = this.fullscreenChangeHandler_;\n element.removeEventListener('fullscreenchange', changeHandler, false);\n element.removeEventListener('webkitfullscreenchange', changeHandler, false);\n document.removeEventListener('mozfullscreenchange', changeHandler, false);\n element.removeEventListener('msfullscreenchange', changeHandler, false);\n }\n if (this.fullscreenErrorHandler_) {\n var errorHandler = this.fullscreenErrorHandler_;\n element.removeEventListener('fullscreenerror', errorHandler, false);\n element.removeEventListener('webkitfullscreenerror', errorHandler, false);\n document.removeEventListener('mozfullscreenerror', errorHandler, false);\n element.removeEventListener('msfullscreenerror', errorHandler, false);\n }\n this.fullscreenEventTarget_ = null;\n this.fullscreenChangeHandler_ = null;\n this.fullscreenErrorHandler_ = null;\n};\nVRDisplay.prototype.enableWakeLock = function () {\n if (this.wakelock_) {\n this.wakelock_.enable();\n }\n};\nVRDisplay.prototype.disableWakeLock = function () {\n if (this.wakelock_) {\n this.wakelock_.disable();\n }\n};\nVRDisplay.prototype.beginPresent_ = function () {\n};\nVRDisplay.prototype.endPresent_ = function () {\n};\nVRDisplay.prototype.submitFrame = function (pose) {\n};\nVRDisplay.prototype.getEyeParameters = function (whichEye) {\n return null;\n};\nvar config = {\n ADDITIONAL_VIEWERS: [],\n DEFAULT_VIEWER: '',\n MOBILE_WAKE_LOCK: true,\n DEBUG: false,\n DPDB_URL: 'https://dpdb.webvr.rocks/dpdb.json',\n K_FILTER: 0.98,\n PREDICTION_TIME_S: 0.040,\n CARDBOARD_UI_DISABLED: false,\n ROTATE_INSTRUCTIONS_DISABLED: false,\n YAW_ONLY: false,\n BUFFER_SCALE: 0.5,\n DIRTY_SUBMIT_FRAME_BINDINGS: false\n};\nvar Eye = {\n LEFT: 'left',\n RIGHT: 'right'\n};\nfunction CardboardVRDisplay(config$$1) {\n var defaults = extend({}, config);\n config$$1 = extend(defaults, config$$1 || {});\n VRDisplay.call(this, {\n wakelock: config$$1.MOBILE_WAKE_LOCK\n });\n this.config = config$$1;\n this.displayName = 'Cardboard VRDisplay';\n this.capabilities = new VRDisplayCapabilities({\n hasPosition: false,\n hasOrientation: true,\n hasExternalDisplay: false,\n canPresent: true,\n maxLayers: 1\n });\n this.stageParameters = null;\n this.bufferScale_ = this.config.BUFFER_SCALE;\n this.poseSensor_ = new PoseSensor(this.config);\n this.distorter_ = null;\n this.cardboardUI_ = null;\n this.dpdb_ = new Dpdb(this.config.DPDB_URL, this.onDeviceParamsUpdated_.bind(this));\n this.deviceInfo_ = new DeviceInfo(this.dpdb_.getDeviceParams(), config$$1.ADDITIONAL_VIEWERS);\n this.viewerSelector_ = new ViewerSelector(config$$1.DEFAULT_VIEWER);\n this.viewerSelector_.onChange(this.onViewerChanged_.bind(this));\n this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer());\n if (!this.config.ROTATE_INSTRUCTIONS_DISABLED) {\n this.rotateInstructions_ = new RotateInstructions();\n }\n if (isIOS()) {\n window.addEventListener('resize', this.onResize_.bind(this));\n }\n}\nCardboardVRDisplay.prototype = Object.create(VRDisplay.prototype);\nCardboardVRDisplay.prototype._getPose = function () {\n return {\n position: null,\n orientation: this.poseSensor_.getOrientation(),\n linearVelocity: null,\n linearAcceleration: null,\n angularVelocity: null,\n angularAcceleration: null\n };\n};\nCardboardVRDisplay.prototype._resetPose = function () {\n if (this.poseSensor_.resetPose) {\n this.poseSensor_.resetPose();\n }\n};\nCardboardVRDisplay.prototype._getFieldOfView = function (whichEye) {\n var fieldOfView;\n if (whichEye == Eye.LEFT) {\n fieldOfView = this.deviceInfo_.getFieldOfViewLeftEye();\n } else if (whichEye == Eye.RIGHT) {\n fieldOfView = this.deviceInfo_.getFieldOfViewRightEye();\n } else {\n console.error('Invalid eye provided: %s', whichEye);\n return null;\n }\n return fieldOfView;\n};\nCardboardVRDisplay.prototype._getEyeOffset = function (whichEye) {\n var offset;\n if (whichEye == Eye.LEFT) {\n offset = [-this.deviceInfo_.viewer.interLensDistance * 0.5, 0.0, 0.0];\n } else if (whichEye == Eye.RIGHT) {\n offset = [this.deviceInfo_.viewer.interLensDistance * 0.5, 0.0, 0.0];\n } else {\n console.error('Invalid eye provided: %s', whichEye);\n return null;\n }\n return offset;\n};\nCardboardVRDisplay.prototype.getEyeParameters = function (whichEye) {\n var offset = this._getEyeOffset(whichEye);\n var fieldOfView = this._getFieldOfView(whichEye);\n var eyeParams = {\n offset: offset,\n renderWidth: this.deviceInfo_.device.width * 0.5 * this.bufferScale_,\n renderHeight: this.deviceInfo_.device.height * this.bufferScale_\n };\n Object.defineProperty(eyeParams, 'fieldOfView', {\n enumerable: true,\n get: function get() {\n deprecateWarning('VRFieldOfView', 'VRFrameData\\'s projection matrices');\n return fieldOfView;\n }\n });\n return eyeParams;\n};\nCardboardVRDisplay.prototype.onDeviceParamsUpdated_ = function (newParams) {\n if (this.config.DEBUG) {\n console.log('DPDB reported that device params were updated.');\n }\n this.deviceInfo_.updateDeviceParams(newParams);\n if (this.distorter_) {\n this.distorter_.updateDeviceInfo(this.deviceInfo_);\n }\n};\nCardboardVRDisplay.prototype.updateBounds_ = function () {\n if (this.layer_ && this.distorter_ && (this.layer_.leftBounds || this.layer_.rightBounds)) {\n this.distorter_.setTextureBounds(this.layer_.leftBounds, this.layer_.rightBounds);\n }\n};\nCardboardVRDisplay.prototype.beginPresent_ = function () {\n var gl = this.layer_.source.getContext('webgl');\n if (!gl) gl = this.layer_.source.getContext('experimental-webgl');\n if (!gl) gl = this.layer_.source.getContext('webgl2');\n if (!gl) return;\n if (this.layer_.predistorted) {\n if (!this.config.CARDBOARD_UI_DISABLED) {\n gl.canvas.width = getScreenWidth() * this.bufferScale_;\n gl.canvas.height = getScreenHeight() * this.bufferScale_;\n this.cardboardUI_ = new CardboardUI(gl);\n }\n } else {\n if (!this.config.CARDBOARD_UI_DISABLED) {\n this.cardboardUI_ = new CardboardUI(gl);\n }\n this.distorter_ = new CardboardDistorter(gl, this.cardboardUI_, this.config.BUFFER_SCALE, this.config.DIRTY_SUBMIT_FRAME_BINDINGS);\n this.distorter_.updateDeviceInfo(this.deviceInfo_);\n }\n if (this.cardboardUI_) {\n this.cardboardUI_.listen(function (e) {\n this.viewerSelector_.show(this.layer_.source.parentElement);\n e.stopPropagation();\n e.preventDefault();\n }.bind(this), function (e) {\n this.exitPresent();\n e.stopPropagation();\n e.preventDefault();\n }.bind(this));\n }\n if (this.rotateInstructions_) {\n if (isLandscapeMode() && isMobile()) {\n this.rotateInstructions_.showTemporarily(3000, this.layer_.source.parentElement);\n } else {\n this.rotateInstructions_.update();\n }\n }\n this.orientationHandler = this.onOrientationChange_.bind(this);\n window.addEventListener('orientationchange', this.orientationHandler);\n this.vrdisplaypresentchangeHandler = this.updateBounds_.bind(this);\n window.addEventListener('vrdisplaypresentchange', this.vrdisplaypresentchangeHandler);\n this.fireVRDisplayDeviceParamsChange_();\n};\nCardboardVRDisplay.prototype.endPresent_ = function () {\n if (this.distorter_) {\n this.distorter_.destroy();\n this.distorter_ = null;\n }\n if (this.cardboardUI_) {\n this.cardboardUI_.destroy();\n this.cardboardUI_ = null;\n }\n if (this.rotateInstructions_) {\n this.rotateInstructions_.hide();\n }\n this.viewerSelector_.hide();\n window.removeEventListener('orientationchange', this.orientationHandler);\n window.removeEventListener('vrdisplaypresentchange', this.vrdisplaypresentchangeHandler);\n};\nCardboardVRDisplay.prototype.updatePresent_ = function () {\n this.endPresent_();\n this.beginPresent_();\n};\nCardboardVRDisplay.prototype.submitFrame = function (pose) {\n if (this.distorter_) {\n this.updateBounds_();\n this.distorter_.submitFrame();\n } else if (this.cardboardUI_ && this.layer_) {\n var gl = this.layer_.source.getContext('webgl');\n if (!gl) gl = this.layer_.source.getContext('experimental-webgl');\n if (!gl) gl = this.layer_.source.getContext('webgl2');\n var canvas = gl.canvas;\n if (canvas.width != this.lastWidth || canvas.height != this.lastHeight) {\n this.cardboardUI_.onResize();\n }\n this.lastWidth = canvas.width;\n this.lastHeight = canvas.height;\n this.cardboardUI_.render();\n }\n};\nCardboardVRDisplay.prototype.onOrientationChange_ = function (e) {\n this.viewerSelector_.hide();\n if (this.rotateInstructions_) {\n this.rotateInstructions_.update();\n }\n this.onResize_();\n};\nCardboardVRDisplay.prototype.onResize_ = function (e) {\n if (this.layer_) {\n var gl = this.layer_.source.getContext('webgl');\n if (!gl) gl = this.layer_.source.getContext('experimental-webgl');\n if (!gl) gl = this.layer_.source.getContext('webgl2');\n var cssProperties = ['position: absolute', 'top: 0', 'left: 0',\n 'width: 100vw', 'height: 100vh', 'border: 0', 'margin: 0',\n 'padding: 0px', 'box-sizing: content-box'];\n gl.canvas.setAttribute('style', cssProperties.join('; ') + ';');\n safariCssSizeWorkaround(gl.canvas);\n }\n};\nCardboardVRDisplay.prototype.onViewerChanged_ = function (viewer) {\n this.deviceInfo_.setViewer(viewer);\n if (this.distorter_) {\n this.distorter_.updateDeviceInfo(this.deviceInfo_);\n }\n this.fireVRDisplayDeviceParamsChange_();\n};\nCardboardVRDisplay.prototype.fireVRDisplayDeviceParamsChange_ = function () {\n var event = new CustomEvent('vrdisplaydeviceparamschange', {\n detail: {\n vrdisplay: this,\n deviceInfo: this.deviceInfo_\n }\n });\n window.dispatchEvent(event);\n};\nCardboardVRDisplay.VRFrameData = VRFrameData;\nCardboardVRDisplay.VRDisplay = VRDisplay;\nreturn CardboardVRDisplay;\n})));\n});\nvar CardboardVRDisplay = unwrapExports(cardboardVrDisplay);\n\nvar version = \"0.10.12\";\n\nvar DefaultConfig = {\n ADDITIONAL_VIEWERS: [],\n DEFAULT_VIEWER: '',\n PROVIDE_MOBILE_VRDISPLAY: true,\n MOBILE_WAKE_LOCK: true,\n DEBUG: false,\n DPDB_URL: 'https://dpdb.webvr.rocks/dpdb.json',\n K_FILTER: 0.98,\n PREDICTION_TIME_S: 0.040,\n CARDBOARD_UI_DISABLED: false,\n ROTATE_INSTRUCTIONS_DISABLED: false,\n YAW_ONLY: false,\n BUFFER_SCALE: 0.5,\n DIRTY_SUBMIT_FRAME_BINDINGS: false\n};\n\nfunction WebVRPolyfill(config) {\n this.config = extend(extend({}, DefaultConfig), config);\n this.polyfillDisplays = [];\n this.enabled = false;\n this.hasNative = 'getVRDisplays' in navigator;\n this.native = {};\n this.native.getVRDisplays = navigator.getVRDisplays;\n this.native.VRFrameData = window.VRFrameData;\n this.native.VRDisplay = window.VRDisplay;\n if (!this.hasNative || this.config.PROVIDE_MOBILE_VRDISPLAY && isMobile()) {\n this.enable();\n this.getVRDisplays().then(function (displays) {\n if (displays && displays[0] && displays[0].fireVRDisplayConnect_) {\n displays[0].fireVRDisplayConnect_();\n }\n });\n }\n}\nWebVRPolyfill.prototype.getPolyfillDisplays = function () {\n if (this._polyfillDisplaysPopulated) {\n return this.polyfillDisplays;\n }\n if (isMobile()) {\n var vrDisplay = new CardboardVRDisplay({\n ADDITIONAL_VIEWERS: this.config.ADDITIONAL_VIEWERS,\n DEFAULT_VIEWER: this.config.DEFAULT_VIEWER,\n MOBILE_WAKE_LOCK: this.config.MOBILE_WAKE_LOCK,\n DEBUG: this.config.DEBUG,\n DPDB_URL: this.config.DPDB_URL,\n CARDBOARD_UI_DISABLED: this.config.CARDBOARD_UI_DISABLED,\n K_FILTER: this.config.K_FILTER,\n PREDICTION_TIME_S: this.config.PREDICTION_TIME_S,\n ROTATE_INSTRUCTIONS_DISABLED: this.config.ROTATE_INSTRUCTIONS_DISABLED,\n YAW_ONLY: this.config.YAW_ONLY,\n BUFFER_SCALE: this.config.BUFFER_SCALE,\n DIRTY_SUBMIT_FRAME_BINDINGS: this.config.DIRTY_SUBMIT_FRAME_BINDINGS\n });\n this.polyfillDisplays.push(vrDisplay);\n }\n this._polyfillDisplaysPopulated = true;\n return this.polyfillDisplays;\n};\nWebVRPolyfill.prototype.enable = function () {\n this.enabled = true;\n if (this.hasNative && this.native.VRFrameData) {\n var NativeVRFrameData = this.native.VRFrameData;\n var nativeFrameData = new this.native.VRFrameData();\n var nativeGetFrameData = this.native.VRDisplay.prototype.getFrameData;\n window.VRDisplay.prototype.getFrameData = function (frameData) {\n if (frameData instanceof NativeVRFrameData) {\n nativeGetFrameData.call(this, frameData);\n return;\n }\n nativeGetFrameData.call(this, nativeFrameData);\n frameData.pose = nativeFrameData.pose;\n copyArray(nativeFrameData.leftProjectionMatrix, frameData.leftProjectionMatrix);\n copyArray(nativeFrameData.rightProjectionMatrix, frameData.rightProjectionMatrix);\n copyArray(nativeFrameData.leftViewMatrix, frameData.leftViewMatrix);\n copyArray(nativeFrameData.rightViewMatrix, frameData.rightViewMatrix);\n };\n }\n navigator.getVRDisplays = this.getVRDisplays.bind(this);\n window.VRDisplay = CardboardVRDisplay.VRDisplay;\n window.VRFrameData = CardboardVRDisplay.VRFrameData;\n};\nWebVRPolyfill.prototype.getVRDisplays = function () {\n var _this = this;\n var config = this.config;\n if (!this.hasNative) {\n return Promise.resolve(this.getPolyfillDisplays());\n }\n return this.native.getVRDisplays.call(navigator).then(function (nativeDisplays) {\n return nativeDisplays.length > 0 ? nativeDisplays : _this.getPolyfillDisplays();\n });\n};\nWebVRPolyfill.version = version;\nWebVRPolyfill.VRFrameData = CardboardVRDisplay.VRFrameData;\nWebVRPolyfill.VRDisplay = CardboardVRDisplay.VRDisplay;\n\n\nvar webvrPolyfill = Object.freeze({\n\tdefault: WebVRPolyfill\n});\n\nvar require$$0 = ( webvrPolyfill && WebVRPolyfill ) || webvrPolyfill;\n\nif (typeof commonjsGlobal !== 'undefined' && commonjsGlobal.window) {\n if (!commonjsGlobal.document) {\n commonjsGlobal.document = commonjsGlobal.window.document;\n }\n if (!commonjsGlobal.navigator) {\n commonjsGlobal.navigator = commonjsGlobal.window.navigator;\n }\n}\nvar src = require$$0;\n\nreturn src;\n\n})));\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],69:[function(_dereq_,module,exports){\nvar newline = /\\n/\nvar newlineChar = '\\n'\nvar whitespace = /\\s/\n\nmodule.exports = function(text, opt) {\n var lines = module.exports.lines(text, opt)\n return lines.map(function(line) {\n return text.substring(line.start, line.end)\n }).join('\\n')\n}\n\nmodule.exports.lines = function wordwrap(text, opt) {\n opt = opt||{}\n\n //zero width results in nothing visible\n if (opt.width === 0 && opt.mode !== 'nowrap') \n return []\n\n text = text||''\n var width = typeof opt.width === 'number' ? opt.width : Number.MAX_VALUE\n var start = Math.max(0, opt.start||0)\n var end = typeof opt.end === 'number' ? opt.end : text.length\n var mode = opt.mode\n\n var measure = opt.measure || monospace\n if (mode === 'pre')\n return pre(measure, text, start, end, width)\n else\n return greedy(measure, text, start, end, width, mode)\n}\n\nfunction idxOf(text, chr, start, end) {\n var idx = text.indexOf(chr, start)\n if (idx === -1 || idx > end)\n return end\n return idx\n}\n\nfunction isWhitespace(chr) {\n return whitespace.test(chr)\n}\n\nfunction pre(measure, text, start, end, width) {\n var lines = []\n var lineStart = start\n for (var i=start; i<end && i<text.length; i++) {\n var chr = text.charAt(i)\n var isNewline = newline.test(chr)\n\n //If we've reached a newline, then step down a line\n //Or if we've reached the EOF\n if (isNewline || i===end-1) {\n var lineEnd = isNewline ? i : i+1\n var measured = measure(text, lineStart, lineEnd, width)\n lines.push(measured)\n \n lineStart = i+1\n }\n }\n return lines\n}\n\nfunction greedy(measure, text, start, end, width, mode) {\n //A greedy word wrapper based on LibGDX algorithm\n //https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java\n var lines = []\n\n var testWidth = width\n //if 'nowrap' is specified, we only wrap on newline chars\n if (mode === 'nowrap')\n testWidth = Number.MAX_VALUE\n\n while (start < end && start < text.length) {\n //get next newline position\n var newLine = idxOf(text, newlineChar, start, end)\n\n //eat whitespace at start of line\n while (start < newLine) {\n if (!isWhitespace( text.charAt(start) ))\n break\n start++\n }\n\n //determine visible # of glyphs for the available width\n var measured = measure(text, start, newLine, testWidth)\n\n var lineEnd = start + (measured.end-measured.start)\n var nextStart = lineEnd + newlineChar.length\n\n //if we had to cut the line before the next newline...\n if (lineEnd < newLine) {\n //find char to break on\n while (lineEnd > start) {\n if (isWhitespace(text.charAt(lineEnd)))\n break\n lineEnd--\n }\n if (lineEnd === start) {\n if (nextStart > start + newlineChar.length) nextStart--\n lineEnd = nextStart // If no characters to break, show all.\n } else {\n nextStart = lineEnd\n //eat whitespace at end of line\n while (lineEnd > start) {\n if (!isWhitespace(text.charAt(lineEnd - newlineChar.length)))\n break\n lineEnd--\n }\n }\n }\n if (lineEnd >= start) {\n var result = measure(text, start, lineEnd, testWidth)\n lines.push(result)\n }\n start = nextStart\n }\n return lines\n}\n\n//determines the visible number of glyphs within a given width\nfunction monospace(text, start, end, width) {\n var glyphs = Math.min(width, end-start)\n return {\n start: start,\n end: start+glyphs\n }\n}\n},{}],70:[function(_dereq_,module,exports){\n\"use strict\";\nvar window = _dereq_(\"global/window\")\nvar isFunction = _dereq_(\"is-function\")\nvar parseHeaders = _dereq_(\"parse-headers\")\nvar xtend = _dereq_(\"xtend\")\n\nmodule.exports = createXHR\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\n\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\n options = initParams(uri, options, callback)\n options.method = method.toUpperCase()\n return _createXHR(options)\n }\n})\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i])\n }\n}\n\nfunction isEmpty(obj){\n for(var i in obj){\n if(obj.hasOwnProperty(i)) return false\n }\n return true\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri\n\n if (isFunction(options)) {\n callback = options\n if (typeof uri === \"string\") {\n params = {uri:uri}\n }\n } else {\n params = xtend(options, {uri: uri})\n }\n\n params.callback = callback\n return params\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback)\n return _createXHR(options)\n}\n\nfunction _createXHR(options) {\n if(typeof options.callback === \"undefined\"){\n throw new Error(\"callback argument missing\")\n }\n\n var called = false\n var callback = function cbOnce(err, response, body){\n if(!called){\n called = true\n options.callback(err, response, body)\n }\n }\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0)\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined\n\n if (xhr.response) {\n body = xhr.response\n } else {\n body = xhr.responseText || getXml(xhr)\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body)\n } catch (e) {}\n }\n\n return body\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer)\n if(!(evt instanceof Error)){\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\n }\n evt.statusCode = 0\n return callback(evt, failureResponse)\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return\n var status\n clearTimeout(timeoutTimer)\n if(options.useXDR && xhr.status===undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200\n } else {\n status = (xhr.status === 1223 ? 204 : xhr.status)\n }\n var response = failureResponse\n var err = null\n\n if (status !== 0){\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n }\n if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders())\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\")\n }\n return callback(err, response, response.body)\n }\n\n var xhr = options.xhr || null\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest()\n }else{\n xhr = new createXHR.XMLHttpRequest()\n }\n }\n\n var key\n var aborted\n var uri = xhr.url = options.uri || options.url\n var method = xhr.method = options.method || \"GET\"\n var body = options.body || options.data\n var headers = xhr.headers = options.headers || {}\n var sync = !!options.sync\n var isJson = false\n var timeoutTimer\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n }\n\n if (\"json\" in options && options.json !== false) {\n isJson = true\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don't override existing accept header declared by user\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don't override existing accept header declared by user\n body = JSON.stringify(options.json === true ? body : options.json)\n }\n }\n\n xhr.onreadystatechange = readystatechange\n xhr.onload = loadFunc\n xhr.onerror = errorFunc\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n }\n xhr.onabort = function(){\n aborted = true;\n }\n xhr.ontimeout = errorFunc\n xhr.open(method, uri, !sync, options.username, options.password)\n //has to be after open\n if(!sync) {\n xhr.withCredentials = !!options.withCredentials\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0 ) {\n timeoutTimer = setTimeout(function(){\n if (aborted) return\n aborted = true//IE9 may still call readystatechange\n xhr.abort(\"timeout\")\n var e = new Error(\"XMLHttpRequest timeout\")\n e.code = \"ETIMEDOUT\"\n errorFunc(e)\n }, options.timeout )\n }\n\n if (xhr.setRequestHeader) {\n for(key in headers){\n if(headers.hasOwnProperty(key)){\n xhr.setRequestHeader(key, headers[key])\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\")\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType\n }\n\n if (\"beforeSend\" in options &&\n typeof options.beforeSend === \"function\"\n ) {\n options.beforeSend(xhr)\n }\n\n // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n xhr.send(body || null)\n\n return xhr\n\n\n}\n\nfunction getXml(xhr) {\n // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n try {\n if (xhr.responseType === \"document\") {\n return xhr.responseXML\n }\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\"\n if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n return xhr.responseXML\n }\n } catch (e) {}\n\n return null\n}\n\nfunction noop() {}\n\n},{\"global/window\":27,\"is-function\":33,\"parse-headers\":47,\"xtend\":72}],71:[function(_dereq_,module,exports){\nmodule.exports = (function xmlparser() {\n //common browsers\n if (typeof self.DOMParser !== 'undefined') {\n return function(str) {\n var parser = new self.DOMParser()\n return parser.parseFromString(str, 'application/xml')\n }\n } \n\n //IE8 fallback\n if (typeof self.ActiveXObject !== 'undefined'\n && new self.ActiveXObject('Microsoft.XMLDOM')) {\n return function(str) {\n var xmlDoc = new self.ActiveXObject(\"Microsoft.XMLDOM\")\n xmlDoc.async = \"false\"\n xmlDoc.loadXML(str)\n return xmlDoc\n }\n }\n\n //last resort fallback\n return function(str) {\n var div = document.createElement('div')\n div.innerHTML = str\n return div\n }\n})()\n\n},{}],72:[function(_dereq_,module,exports){\nmodule.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n\n},{}],73:[function(_dereq_,module,exports){\nmodule.exports={\n \"name\": \"aframe\",\n \"version\": \"1.2.0\",\n \"description\": \"A web framework for building virtual reality experiences.\",\n \"homepage\": \"https://aframe.io/\",\n \"main\": \"dist/aframe-master.js\",\n \"scripts\": {\n \"browserify\": \"browserify src/index.js -s 'AFRAME' -p browserify-derequire\",\n \"build\": \"shx mkdir -p build/ && npm run browserify -- --debug -t [ envify --INSPECTOR_VERSION dev ] -o build/aframe.js\",\n \"codecov\": \"codecov\",\n \"dev\": \"npm run build && cross-env INSPECTOR_VERSION=dev node ./scripts/budo -t envify\",\n \"dist\": \"node scripts/updateVersionLog.js && npm run dist:min && npm run dist:max\",\n \"dist:max\": \"npm run browserify -s -- --debug | exorcist dist/aframe-master.js.map > dist/aframe-master.js\",\n \"dist:min\": \"npm run browserify -s -- --debug -p [ minifyify --map aframe-master.min.js.map --output dist/aframe-master.min.js.map ] -o dist/aframe-master.min.js\",\n \"docs\": \"markserv --dir docs --port 9001\",\n \"preghpages\": \"node ./scripts/preghpages.js\",\n \"ghpages\": \"ghpages -p gh-pages/\",\n \"lint\": \"semistandard -v | snazzy\",\n \"lint:fix\": \"semistandard --fix\",\n \"precommit\": \"npm run lint\",\n \"prepush\": \"node scripts/testOnlyCheck.js\",\n \"prerelease\": \"node scripts/release.js 1.0.4 1.1.0\",\n \"start\": \"npm run dev\",\n \"start:https\": \"cross-env SSL=true npm run dev\",\n \"test\": \"karma start ./tests/karma.conf.js\",\n \"test:docs\": \"node scripts/docsLint.js\",\n \"test:firefox\": \"npm test -- --browsers Firefox\",\n \"test:chrome\": \"npm test -- --browsers Chrome\",\n \"test:nobrowser\": \"NO_BROWSER=true npm test\",\n \"test:node\": \"mocha --ui tdd tests/node\"\n },\n \"repository\": \"aframevr/aframe\",\n \"license\": \"MIT\",\n \"files\": [\n \"dist/*\",\n \"docs/**/*\",\n \"src/**/*\",\n \"vendor/**/*\"\n ],\n \"dependencies\": {\n \"custom-event-polyfill\": \"^1.0.6\",\n \"debug\": \"ngokevin/debug#noTimestamp\",\n \"deep-assign\": \"^2.0.0\",\n \"document-register-element\": \"dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90\",\n \"load-bmfont\": \"^1.2.3\",\n \"object-assign\": \"^4.0.1\",\n \"present\": \"0.0.6\",\n \"promise-polyfill\": \"^3.1.0\",\n \"super-animejs\": \"^3.1.0\",\n \"super-three\": \"^0.125.1\",\n \"three-bmfont-text\": \"dmarcos/three-bmfont-text#1babdf8507c731a18f8af3b807292e2b9740955e\",\n \"webvr-polyfill\": \"^0.10.12\"\n },\n \"devDependencies\": {\n \"browserify\": \"^13.1.0\",\n \"browserify-css\": \"^0.8.4\",\n \"browserify-derequire\": \"^0.9.4\",\n \"browserify-istanbul\": \"^2.0.0\",\n \"budo\": \"^9.2.0\",\n \"chai\": \"^3.5.0\",\n \"chai-shallow-deep-equal\": \"^1.4.0\",\n \"chalk\": \"^1.1.3\",\n \"codecov\": \"^1.0.1\",\n \"cross-env\": \"^5.0.1\",\n \"envify\": \"^3.4.1\",\n \"exorcist\": \"^0.4.0\",\n \"ghpages\": \"0.0.8\",\n \"git-rev\": \"^0.2.1\",\n \"glob\": \"^7.1.1\",\n \"husky\": \"^0.11.7\",\n \"istanbul\": \"^0.4.5\",\n \"jsdom\": \"^9.11.0\",\n \"karma\": \"1.4.1\",\n \"karma-browserify\": \"^5.1.0\",\n \"karma-chai-shallow-deep-equal\": \"0.0.4\",\n \"karma-chrome-launcher\": \"^2.0.0\",\n \"karma-coverage\": \"^1.1.1\",\n \"karma-env-preprocessor\": \"^0.1.1\",\n \"karma-firefox-launcher\": \"^1.2.0\",\n \"karma-mocha\": \"^1.1.1\",\n \"karma-mocha-reporter\": \"^2.1.0\",\n \"karma-sinon-chai\": \"1.2.4\",\n \"lolex\": \"^1.5.1\",\n \"markserv\": \"github:sukima/markserv#feature/fix-broken-websoketio-link\",\n \"minifyify\": \"^7.3.3\",\n \"mocha\": \"^3.0.2\",\n \"mozilla-download\": \"^1.1.1\",\n \"replace-in-file\": \"^2.5.3\",\n \"semistandard\": \"^9.0.0\",\n \"shelljs\": \"^0.7.7\",\n \"shx\": \"^0.2.2\",\n \"sinon\": \"^1.17.5\",\n \"sinon-chai\": \"2.8.0\",\n \"snazzy\": \"^5.0.0\",\n \"too-wordy\": \"ngokevin/too-wordy\",\n \"uglifyjs\": \"^2.4.10\",\n \"write-good\": \"^0.9.1\"\n },\n \"link\": true,\n \"browserify\": {\n \"transform\": [\n \"browserify-css\",\n \"envify\"\n ]\n },\n \"semistandard\": {\n \"ignore\": [\n \"build/**\",\n \"dist/**\",\n \"examples/**/shaders/*.js\",\n \"**/vendor/**\"\n ]\n },\n \"keywords\": [\n \"3d\",\n \"aframe\",\n \"cardboard\",\n \"components\",\n \"oculus\",\n \"three\",\n \"three.js\",\n \"rift\",\n \"vive\",\n \"vr\",\n \"web-components\",\n \"webvr\"\n ],\n \"browserify-css\": {\n \"minify\": true\n },\n \"engines\": {\n \"node\": \">= 4.6.0\",\n \"npm\": \"^2.15.9\"\n }\n}\n\n},{}],74:[function(_dereq_,module,exports){\nvar anime = _dereq_('super-animejs');\nvar components = _dereq_('../core/component').components;\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils');\n\nvar colorHelperFrom = new THREE.Color();\nvar colorHelperTo = new THREE.Color();\n\nvar getComponentProperty = utils.entity.getComponentProperty;\nvar setComponentProperty = utils.entity.setComponentProperty;\nvar splitCache = {};\n\nvar TYPE_COLOR = 'color';\nvar PROP_POSITION = 'position';\nvar PROP_ROTATION = 'rotation';\nvar PROP_SCALE = 'scale';\nvar STRING_COMPONENTS = 'components';\nvar STRING_OBJECT3D = 'object3D';\n\n/**\n * Animation component for A-Frame using anime.js.\n *\n * The component manually controls the tick by setting `autoplay: false` on anime.js and\n * manually * calling `animation.tick()` in the tick handler. To pause or resume, we toggle a\n * boolean * flag * `isAnimationPlaying`.\n *\n * anime.js animation config for tweenining Javascript objects and values works as:\n *\n * config = {\n * targets: {foo: 0.0, bar: '#000'},\n * foo: 1.0,\n * bar: '#FFF'\n * }\n *\n * The above will tween each property in `targets`. The `to` values are set in the root of\n * the config.\n *\n * @member {object} animation - anime.js instance.\n * @member {boolean} animationIsPlaying - Control if animation is playing.\n */\nmodule.exports.Component = registerComponent('animation', {\n schema: {\n autoplay: {default: true},\n delay: {default: 0},\n dir: {default: ''},\n dur: {default: 1000},\n easing: {default: 'easeInQuad'},\n elasticity: {default: 400},\n enabled: {default: true},\n from: {default: ''},\n loop: {\n default: 0,\n parse: function (value) {\n // Boolean or integer.\n if (value === true || value === 'true') { return true; }\n if (value === false || value === 'false') { return false; }\n return parseInt(value, 10);\n }\n },\n property: {default: ''},\n startEvents: {type: 'array'},\n pauseEvents: {type: 'array'},\n resumeEvents: {type: 'array'},\n round: {default: false},\n to: {default: ''},\n type: {default: ''},\n isRawProperty: {default: false}\n },\n\n multiple: true,\n\n init: function () {\n var self = this;\n\n this.eventDetail = {name: this.attrName};\n this.time = 0;\n\n this.animation = null;\n this.animationIsPlaying = false;\n this.onStartEvent = this.onStartEvent.bind(this);\n this.beginAnimation = this.beginAnimation.bind(this);\n this.pauseAnimation = this.pauseAnimation.bind(this);\n this.resumeAnimation = this.resumeAnimation.bind(this);\n\n this.fromColor = {};\n this.toColor = {};\n this.targets = {};\n this.targetsArray = [];\n\n this.updateConfigForDefault = this.updateConfigForDefault.bind(this);\n this.updateConfigForRawColor = this.updateConfigForRawColor.bind(this);\n\n this.config = {\n complete: function () {\n self.animationIsPlaying = false;\n self.el.emit('animationcomplete', self.eventDetail, false);\n if (self.id) {\n self.el.emit('animationcomplete__' + self.id, self.eventDetail, false);\n }\n }\n };\n },\n\n update: function (oldData) {\n var config = this.config;\n var data = this.data;\n\n this.animationIsPlaying = false;\n\n if (!this.data.enabled) { return; }\n\n if (!data.property) { return; }\n\n // Base config.\n config.autoplay = false;\n config.direction = data.dir;\n config.duration = data.dur;\n config.easing = data.easing;\n config.elasticity = data.elasticity;\n config.loop = data.loop;\n config.round = data.round;\n\n // Start new animation.\n this.createAndStartAnimation();\n },\n\n tick: function (t, dt) {\n if (!this.animationIsPlaying) { return; }\n this.time += dt;\n this.animation.tick(this.time);\n },\n\n remove: function () {\n this.pauseAnimation();\n this.removeEventListeners();\n },\n\n pause: function () {\n this.paused = true;\n this.pausedWasPlaying = this.animationIsPlaying;\n this.pauseAnimation();\n this.removeEventListeners();\n },\n\n /**\n * `play` handler only for resuming scene.\n */\n play: function () {\n if (!this.paused) { return; }\n this.paused = false;\n this.addEventListeners();\n if (this.pausedWasPlaying) {\n this.resumeAnimation();\n this.pausedWasPlaying = false;\n }\n },\n\n /**\n * Start animation from scratch.\n */\n createAndStartAnimation: function () {\n var data = this.data;\n\n this.updateConfig();\n this.animationIsPlaying = false;\n this.animation = anime(this.config);\n this.animation.began = true;\n\n this.removeEventListeners();\n this.addEventListeners();\n\n // Wait for start events for animation.\n if (!data.autoplay || data.startEvents && data.startEvents.length) { return; }\n\n // Delay animation.\n if (data.delay) {\n setTimeout(this.beginAnimation, data.delay);\n return;\n }\n\n // Play animation.\n this.beginAnimation();\n },\n\n /**\n * This is before animation start (including from startEvents).\n * Set to initial state (config.from, time = 0, seekTime = 0).\n */\n beginAnimation: function () {\n this.updateConfig();\n this.animation.began = true;\n this.time = 0;\n this.animationIsPlaying = true;\n this.stopRelatedAnimations();\n this.el.emit('animationbegin', this.eventDetail, false);\n },\n\n pauseAnimation: function () {\n this.animationIsPlaying = false;\n },\n\n resumeAnimation: function () {\n this.animationIsPlaying = true;\n },\n\n /**\n * startEvents callback.\n */\n onStartEvent: function () {\n if (!this.data.enabled) { return; }\n\n this.updateConfig();\n if (this.animation) {\n this.animation.pause();\n }\n this.animation = anime(this.config);\n\n // Include the delay before each start event.\n if (this.data.delay) {\n setTimeout(this.beginAnimation, this.data.delay);\n return;\n }\n this.beginAnimation();\n },\n\n /**\n * rawProperty: true and type: color;\n */\n updateConfigForRawColor: function () {\n var config = this.config;\n var data = this.data;\n var el = this.el;\n var from;\n var key;\n var to;\n\n if (this.waitComponentInitRawProperty(this.updateConfigForRawColor)) {\n return;\n }\n\n from = data.from === '' ? getRawProperty(el, data.property) : data.from;\n to = data.to;\n\n // Use r/g/b vector for color type.\n this.setColorConfig(from, to);\n from = this.fromColor;\n to = this.toColor;\n\n this.targetsArray.length = 0;\n this.targetsArray.push(from);\n config.targets = this.targetsArray;\n for (key in to) { config[key] = to[key]; }\n\n config.update = (function () {\n var lastValue = {};\n return function (anim) {\n var value;\n value = anim.animatables[0].target;\n // For animation timeline.\n if (value.r === lastValue.r &&\n value.g === lastValue.g &&\n value.b === lastValue.b) { return; }\n\n setRawProperty(el, data.property, value, data.type);\n };\n })();\n },\n\n /**\n * Stuff property into generic `property` key.\n */\n updateConfigForDefault: function () {\n var config = this.config;\n var data = this.data;\n var el = this.el;\n var from;\n var isBoolean;\n var isNumber;\n var to;\n\n if (this.waitComponentInitRawProperty(this.updateConfigForDefault)) {\n return;\n }\n\n if (data.from === '') {\n // Infer from.\n from = isRawProperty(data)\n ? getRawProperty(el, data.property)\n : getComponentProperty(el, data.property);\n } else {\n // Explicit from.\n from = data.from;\n }\n\n to = data.to;\n\n isNumber = !isNaN(from || to);\n if (isNumber) {\n from = parseFloat(from);\n to = parseFloat(to);\n } else {\n from = from ? from.toString() : from;\n to = to ? to.toString() : to;\n }\n\n // Convert booleans to integer to allow boolean flipping.\n isBoolean = data.to === 'true' || data.to === 'false' ||\n data.to === true || data.to === false;\n if (isBoolean) {\n from = data.from === 'true' || data.from === true ? 1 : 0;\n to = data.to === 'true' || data.to === true ? 1 : 0;\n }\n\n this.targets.aframeProperty = from;\n config.targets = this.targets;\n config.aframeProperty = to;\n config.update = (function () {\n var lastValue;\n\n return function (anim) {\n var value;\n value = anim.animatables[0].target.aframeProperty;\n\n // Need to do a last value check for animation timeline since all the tweening\n // begins simultaenously even if the value has not changed. Also better for perf\n // anyways.\n if (value === lastValue) { return; }\n lastValue = value;\n\n if (isBoolean) { value = value >= 1; }\n\n if (isRawProperty(data)) {\n setRawProperty(el, data.property, value, data.type);\n } else {\n setComponentProperty(el, data.property, value);\n }\n };\n })();\n },\n\n /**\n * Extend x/y/z/w onto the config.\n * Update vector by modifying object3D.\n */\n updateConfigForVector: function () {\n var config = this.config;\n var data = this.data;\n var el = this.el;\n var key;\n var from;\n var to;\n\n // Parse coordinates.\n from = data.from !== ''\n ? utils.coordinates.parse(data.from) // If data.from defined, use that.\n : getComponentProperty(el, data.property); // If data.from not defined, get on the fly.\n to = utils.coordinates.parse(data.to);\n\n if (data.property === PROP_ROTATION) {\n toRadians(from);\n toRadians(to);\n }\n\n // Set to and from.\n this.targetsArray.length = 0;\n this.targetsArray.push(from);\n config.targets = this.targetsArray;\n for (key in to) { config[key] = to[key]; }\n\n // If animating object3D transformation, run more optimized updater.\n if (data.property === PROP_POSITION || data.property === PROP_ROTATION ||\n data.property === PROP_SCALE) {\n config.update = (function () {\n var lastValue = {};\n return function (anim) {\n var value = anim.animatables[0].target;\n\n if (data.property === PROP_SCALE) {\n value.x = Math.max(0.0001, value.x);\n value.y = Math.max(0.0001, value.y);\n value.z = Math.max(0.0001, value.z);\n }\n\n // For animation timeline.\n if (value.x === lastValue.x &&\n value.y === lastValue.y &&\n value.z === lastValue.z) { return; }\n\n lastValue.x = value.x;\n lastValue.y = value.y;\n lastValue.z = value.z;\n\n el.object3D[data.property].set(value.x, value.y, value.z);\n };\n })();\n return;\n }\n\n // Animating some vector.\n config.update = (function () {\n var lastValue = {};\n return function (anim) {\n var value = anim.animatables[0].target;\n\n // Animate rotation through radians.\n // For animation timeline.\n if (value.x === lastValue.x &&\n value.y === lastValue.y &&\n value.z === lastValue.z) { return; }\n lastValue.x = value.x;\n lastValue.y = value.y;\n lastValue.z = value.z;\n setComponentProperty(el, data.property, value);\n };\n })();\n },\n\n /**\n * Update the config before each run.\n */\n updateConfig: function () {\n var propType;\n\n // Route config type.\n propType = getPropertyType(this.el, this.data.property);\n if (isRawProperty(this.data) && this.data.type === TYPE_COLOR) {\n this.updateConfigForRawColor();\n } else if (propType === 'vec2' || propType === 'vec3' || propType === 'vec4') {\n this.updateConfigForVector();\n } else {\n this.updateConfigForDefault();\n }\n },\n\n /**\n * Wait for component to initialize.\n */\n waitComponentInitRawProperty: function (cb) {\n var componentName;\n var data = this.data;\n var el = this.el;\n var self = this;\n\n if (data.from !== '') { return false; }\n\n if (!data.property.startsWith(STRING_COMPONENTS)) { return false; }\n\n componentName = splitDot(data.property)[1];\n if (el.components[componentName]) { return false; }\n\n el.addEventListener('componentinitialized', function wait (evt) {\n if (evt.detail.name !== componentName) { return; }\n cb();\n // Since the config was created async, create the animation now since we missed it\n // earlier.\n self.animation = anime(self.config);\n el.removeEventListener('componentinitialized', wait);\n });\n return true;\n },\n\n /**\n * Make sure two animations on the same property don't fight each other.\n * e.g., animation__mouseenter=\"property: material.opacity\"\n * animation__mouseleave=\"property: material.opacity\"\n */\n stopRelatedAnimations: function () {\n var component;\n var componentName;\n for (componentName in this.el.components) {\n component = this.el.components[componentName];\n if (componentName === this.attrName) { continue; }\n if (component.name !== 'animation') { continue; }\n if (!component.animationIsPlaying) { continue; }\n if (component.data.property !== this.data.property) { continue; }\n component.animationIsPlaying = false;\n }\n },\n\n addEventListeners: function () {\n var data = this.data;\n var el = this.el;\n addEventListeners(el, data.startEvents, this.onStartEvent);\n addEventListeners(el, data.pauseEvents, this.pauseAnimation);\n addEventListeners(el, data.resumeEvents, this.resumeAnimation);\n },\n\n removeEventListeners: function () {\n var data = this.data;\n var el = this.el;\n removeEventListeners(el, data.startEvents, this.onStartEvent);\n removeEventListeners(el, data.pauseEvents, this.pauseAnimation);\n removeEventListeners(el, data.resumeEvents, this.resumeAnimation);\n },\n\n setColorConfig: function (from, to) {\n colorHelperFrom.set(from);\n colorHelperTo.set(to);\n from = this.fromColor;\n to = this.toColor;\n from.r = colorHelperFrom.r;\n from.g = colorHelperFrom.g;\n from.b = colorHelperFrom.b;\n to.r = colorHelperTo.r;\n to.g = colorHelperTo.g;\n to.b = colorHelperTo.b;\n }\n});\n\n/**\n * Given property name, check schema to see what type we are animating.\n * We just care whether the property is a vector.\n */\nfunction getPropertyType (el, property) {\n var component;\n var componentName;\n var split;\n var propertyName;\n\n split = property.split('.');\n componentName = split[0];\n propertyName = split[1];\n component = el.components[componentName] || components[componentName];\n\n // Primitives.\n if (!component) { return null; }\n\n // Dynamic schema. We only care about vectors anyways.\n if (propertyName && !component.schema[propertyName]) { return null; }\n\n // Multi-prop.\n if (propertyName) { return component.schema[propertyName].type; }\n\n // Single-prop.\n return component.schema.type;\n}\n\n/**\n * Convert object to radians.\n */\nfunction toRadians (obj) {\n obj.x = THREE.Math.degToRad(obj.x);\n obj.y = THREE.Math.degToRad(obj.y);\n obj.z = THREE.Math.degToRad(obj.z);\n}\n\nfunction addEventListeners (el, eventNames, handler) {\n var i;\n for (i = 0; i < eventNames.length; i++) {\n el.addEventListener(eventNames[i], handler);\n }\n}\n\nfunction removeEventListeners (el, eventNames, handler) {\n var i;\n for (i = 0; i < eventNames.length; i++) {\n el.removeEventListener(eventNames[i], handler);\n }\n}\n\nfunction getRawProperty (el, path) {\n var i;\n var split;\n var value;\n split = splitDot(path);\n value = el;\n for (i = 0; i < split.length; i++) {\n value = value[split[i]];\n }\n if (value === undefined) {\n console.log(el);\n throw new Error('[animation] property (' + path + ') could not be found');\n }\n return value;\n}\n\nfunction setRawProperty (el, path, value, type) {\n var i;\n var split;\n var propertyName;\n var targetValue;\n\n if (path.startsWith('object3D.rotation')) {\n value = THREE.Math.degToRad(value);\n }\n\n // Walk.\n split = splitDot(path);\n targetValue = el;\n for (i = 0; i < split.length - 1; i++) { targetValue = targetValue[split[i]]; }\n propertyName = split[split.length - 1];\n\n // Raw color.\n if (type === TYPE_COLOR) {\n if ('r' in targetValue[propertyName]) {\n targetValue[propertyName].r = value.r;\n targetValue[propertyName].g = value.g;\n targetValue[propertyName].b = value.b;\n } else {\n targetValue[propertyName].x = value.r;\n targetValue[propertyName].y = value.g;\n targetValue[propertyName].z = value.b;\n }\n return;\n }\n\n targetValue[propertyName] = value;\n}\n\nfunction splitDot (path) {\n if (path in splitCache) { return splitCache[path]; }\n splitCache[path] = path.split('.');\n return splitCache[path];\n}\n\nfunction isRawProperty (data) {\n return data.isRawProperty || data.property.startsWith(STRING_COMPONENTS) ||\n data.property.startsWith(STRING_OBJECT3D);\n}\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils\":205,\"super-animejs\":56}],75:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\n/**\n * Camera component.\n * Pairs along with camera system to handle tracking the active camera.\n */\nmodule.exports.Component = registerComponent('camera', {\n schema: {\n active: {default: true},\n far: {default: 10000},\n fov: {default: 80, min: 0},\n near: {default: 0.005, min: 0},\n spectator: {default: false},\n zoom: {default: 1, min: 0}\n },\n\n /**\n * Initialize three.js camera and add it to the entity.\n * Add reference from scene to this entity as the camera.\n */\n init: function () {\n var camera;\n var el = this.el;\n\n // Create camera.\n camera = this.camera = new THREE.PerspectiveCamera();\n el.setObject3D('camera', camera);\n },\n\n /**\n * Update three.js camera.\n */\n update: function (oldData) {\n var data = this.data;\n var camera = this.camera;\n\n // Update properties.\n camera.aspect = data.aspect || (window.innerWidth / window.innerHeight);\n camera.far = data.far;\n camera.fov = data.fov;\n camera.near = data.near;\n camera.zoom = data.zoom;\n camera.updateProjectionMatrix();\n\n this.updateActiveCamera(oldData);\n this.updateSpectatorCamera(oldData);\n },\n\n updateActiveCamera: function (oldData) {\n var data = this.data;\n var el = this.el;\n var system = this.system;\n // Active property did not change.\n if (oldData && oldData.active === data.active || data.spectator) { return; }\n\n // If `active` property changes, or first update, handle active camera with system.\n if (data.active && system.activeCameraEl !== el) {\n // Camera enabled. Set camera to this camera.\n system.setActiveCamera(el);\n } else if (!data.active && system.activeCameraEl === el) {\n // Camera disabled. Set camera to another camera.\n system.disableActiveCamera();\n }\n },\n\n updateSpectatorCamera: function (oldData) {\n var data = this.data;\n var el = this.el;\n var system = this.system;\n // spectator property did not change.\n if (oldData && oldData.spectator === data.spectator) { return; }\n\n // If `spectator` property changes, or first update, handle spectator camera with system.\n if (data.spectator && system.spectatorCameraEl !== el) {\n // Camera enabled. Set camera to this camera.\n system.setSpectatorCamera(el);\n } else if (!data.spectator && system.spectatorCameraEl === el) {\n // Camera disabled. Set camera to another camera.\n system.disableSpectatorCamera();\n }\n },\n\n /**\n * Remove camera on remove (callback).\n */\n remove: function () {\n this.el.removeObject3D('camera');\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179}],76:[function(_dereq_,module,exports){\n/* global THREE */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar utils = _dereq_('../utils/');\n\nvar bind = utils.bind;\n\nvar EVENTS = {\n CLICK: 'click',\n FUSING: 'fusing',\n MOUSEENTER: 'mouseenter',\n MOUSEDOWN: 'mousedown',\n MOUSELEAVE: 'mouseleave',\n MOUSEUP: 'mouseup'\n};\n\nvar STATES = {\n FUSING: 'cursor-fusing',\n HOVERING: 'cursor-hovering',\n HOVERED: 'cursor-hovered'\n};\n\nvar CANVAS_EVENTS = {\n DOWN: ['mousedown', 'touchstart'],\n UP: ['mouseup', 'touchend']\n};\n\nvar WEBXR_EVENTS = {\n DOWN: ['selectstart'],\n UP: ['selectend']\n};\n\nvar CANVAS_HOVER_CLASS = 'a-mouse-cursor-hover';\n\n/**\n * Cursor component. Applies the raycaster component specifically for starting the raycaster\n * from the camera and pointing from camera's facing direction, and then only returning the\n * closest intersection. Cursor can be fine-tuned by setting raycaster properties.\n *\n * @member {object} fuseTimeout - Timeout to trigger fuse-click.\n * @member {Element} cursorDownEl - Entity that was last mousedowned during current click.\n * @member {object} intersection - Attributes of the current intersection event, including\n * 3D- and 2D-space coordinates. See: http://threejs.org/docs/api/core/Raycaster.html\n * @member {Element} intersectedEl - Currently-intersected entity. Used to keep track to\n * emit events when unintersecting.\n */\nmodule.exports.Component = registerComponent('cursor', {\n dependencies: ['raycaster'],\n\n schema: {\n downEvents: {default: []},\n fuse: {default: utils.device.isMobile()},\n fuseTimeout: {default: 1500, min: 0},\n mouseCursorStylesEnabled: {default: true},\n upEvents: {default: []},\n rayOrigin: {default: 'entity', oneOf: ['mouse', 'entity']}\n },\n\n init: function () {\n var self = this;\n\n this.fuseTimeout = undefined;\n this.cursorDownEl = null;\n this.intersectedEl = null;\n this.canvasBounds = document.body.getBoundingClientRect();\n this.isCursorDown = false;\n\n // Debounce.\n this.updateCanvasBounds = utils.debounce(function updateCanvasBounds () {\n self.canvasBounds = self.el.sceneEl.canvas.getBoundingClientRect();\n }, 500);\n\n this.eventDetail = {};\n this.intersectedEventDetail = {cursorEl: this.el};\n\n // Bind methods.\n this.onCursorDown = bind(this.onCursorDown, this);\n this.onCursorUp = bind(this.onCursorUp, this);\n this.onIntersection = bind(this.onIntersection, this);\n this.onIntersectionCleared = bind(this.onIntersectionCleared, this);\n this.onMouseMove = bind(this.onMouseMove, this);\n this.onEnterVR = bind(this.onEnterVR, this);\n },\n\n update: function (oldData) {\n if (this.data.rayOrigin === oldData.rayOrigin) { return; }\n this.updateMouseEventListeners();\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n },\n\n remove: function () {\n var el = this.el;\n el.removeState(STATES.HOVERING);\n el.removeState(STATES.FUSING);\n clearTimeout(this.fuseTimeout);\n if (this.intersectedEl) { this.intersectedEl.removeState(STATES.HOVERED); }\n this.removeEventListeners();\n },\n\n addEventListeners: function () {\n var canvas;\n var data = this.data;\n var el = this.el;\n var self = this;\n\n function addCanvasListeners () {\n canvas = el.sceneEl.canvas;\n if (data.downEvents.length || data.upEvents.length) { return; }\n CANVAS_EVENTS.DOWN.forEach(function (downEvent) {\n canvas.addEventListener(downEvent, self.onCursorDown);\n });\n CANVAS_EVENTS.UP.forEach(function (upEvent) {\n canvas.addEventListener(upEvent, self.onCursorUp);\n });\n }\n\n canvas = el.sceneEl.canvas;\n if (canvas) {\n addCanvasListeners();\n } else {\n el.sceneEl.addEventListener('render-target-loaded', addCanvasListeners);\n }\n\n data.downEvents.forEach(function (downEvent) {\n el.addEventListener(downEvent, self.onCursorDown);\n });\n data.upEvents.forEach(function (upEvent) {\n el.addEventListener(upEvent, self.onCursorUp);\n });\n el.addEventListener('raycaster-intersection', this.onIntersection);\n el.addEventListener('raycaster-intersection-cleared', this.onIntersectionCleared);\n\n el.sceneEl.addEventListener('rendererresize', this.updateCanvasBounds);\n el.sceneEl.addEventListener('enter-vr', this.onEnterVR);\n window.addEventListener('resize', this.updateCanvasBounds);\n window.addEventListener('scroll', this.updateCanvasBounds);\n\n this.updateMouseEventListeners();\n },\n\n removeEventListeners: function () {\n var canvas;\n var data = this.data;\n var el = this.el;\n var self = this;\n\n canvas = el.sceneEl.canvas;\n if (canvas && !data.downEvents.length && !data.upEvents.length) {\n CANVAS_EVENTS.DOWN.forEach(function (downEvent) {\n canvas.removeEventListener(downEvent, self.onCursorDown);\n });\n CANVAS_EVENTS.UP.forEach(function (upEvent) {\n canvas.removeEventListener(upEvent, self.onCursorUp);\n });\n }\n\n data.downEvents.forEach(function (downEvent) {\n el.removeEventListener(downEvent, self.onCursorDown);\n });\n data.upEvents.forEach(function (upEvent) {\n el.removeEventListener(upEvent, self.onCursorUp);\n });\n el.removeEventListener('raycaster-intersection', this.onIntersection);\n el.removeEventListener('raycaster-intersection-cleared', this.onIntersectionCleared);\n canvas.removeEventListener('mousemove', this.onMouseMove);\n canvas.removeEventListener('touchstart', this.onMouseMove);\n canvas.removeEventListener('touchmove', this.onMouseMove);\n\n el.sceneEl.removeEventListener('rendererresize', this.updateCanvasBounds);\n el.sceneEl.removeEventListener('enter-vr', this.onEnterVR);\n window.removeEventListener('resize', this.updateCanvasBounds);\n window.removeEventListener('scroll', this.updateCanvasBounds);\n },\n\n updateMouseEventListeners: function () {\n var canvas;\n var el = this.el;\n\n canvas = el.sceneEl.canvas;\n canvas.removeEventListener('mousemove', this.onMouseMove);\n canvas.removeEventListener('touchmove', this.onMouseMove);\n el.setAttribute('raycaster', 'useWorldCoordinates', false);\n if (this.data.rayOrigin !== 'mouse') { return; }\n canvas.addEventListener('mousemove', this.onMouseMove, false);\n canvas.addEventListener('touchmove', this.onMouseMove, false);\n el.setAttribute('raycaster', 'useWorldCoordinates', true);\n this.updateCanvasBounds();\n },\n\n onMouseMove: (function () {\n var direction = new THREE.Vector3();\n var mouse = new THREE.Vector2();\n var origin = new THREE.Vector3();\n var rayCasterConfig = {origin: origin, direction: direction};\n\n return function (evt) {\n var bounds = this.canvasBounds;\n var camera = this.el.sceneEl.camera;\n var left;\n var point;\n var top;\n\n camera.parent.updateMatrixWorld();\n\n // Calculate mouse position based on the canvas element\n if (evt.type === 'touchmove' || evt.type === 'touchstart') {\n // Track the first touch for simplicity.\n point = evt.touches.item(0);\n } else {\n point = evt;\n }\n\n left = point.clientX - bounds.left;\n top = point.clientY - bounds.top;\n mouse.x = (left / bounds.width) * 2 - 1;\n mouse.y = -(top / bounds.height) * 2 + 1;\n\n origin.setFromMatrixPosition(camera.matrixWorld);\n direction.set(mouse.x, mouse.y, 0.5).unproject(camera).sub(origin).normalize();\n this.el.setAttribute('raycaster', rayCasterConfig);\n if (evt.type === 'touchmove') { evt.preventDefault(); }\n };\n })(),\n\n /**\n * Trigger mousedown and keep track of the mousedowned entity.\n */\n onCursorDown: function (evt) {\n this.isCursorDown = true;\n // Raycast again for touch.\n if (this.data.rayOrigin === 'mouse' && evt.type === 'touchstart') {\n this.onMouseMove(evt);\n this.el.components.raycaster.checkIntersections();\n evt.preventDefault();\n }\n\n this.twoWayEmit(EVENTS.MOUSEDOWN);\n this.cursorDownEl = this.intersectedEl;\n },\n\n /**\n * Trigger mouseup if:\n * - Not fusing (mobile has no mouse).\n * - Currently intersecting an entity.\n * - Currently-intersected entity is the same as the one when mousedown was triggered,\n * in case user mousedowned one entity, dragged to another, and mouseupped.\n */\n onCursorUp: function (evt) {\n if (!this.isCursorDown) { return; }\n\n this.isCursorDown = false;\n\n var data = this.data;\n this.twoWayEmit(EVENTS.MOUSEUP);\n\n // If intersected entity has changed since the cursorDown, still emit mouseUp on the\n // previously cursorUp entity.\n if (this.cursorDownEl && this.cursorDownEl !== this.intersectedEl) {\n this.intersectedEventDetail.intersection = null;\n this.cursorDownEl.emit(EVENTS.MOUSEUP, this.intersectedEventDetail);\n }\n\n if ((!data.fuse || data.rayOrigin === 'mouse') &&\n this.intersectedEl && this.cursorDownEl === this.intersectedEl) {\n this.twoWayEmit(EVENTS.CLICK);\n }\n\n this.cursorDownEl = null;\n if (evt.type === 'touchend') { evt.preventDefault(); }\n },\n\n /**\n * Handle intersection.\n */\n onIntersection: function (evt) {\n var currentIntersection;\n var cursorEl = this.el;\n var index;\n var intersectedEl;\n var intersection;\n\n // Select closest object, excluding the cursor.\n index = evt.detail.els[0] === cursorEl ? 1 : 0;\n intersection = evt.detail.intersections[index];\n intersectedEl = evt.detail.els[index];\n\n // If cursor is the only intersected object, ignore the event.\n if (!intersectedEl) { return; }\n\n // Already intersecting this entity.\n if (this.intersectedEl === intersectedEl) { return; }\n\n // Ignore events further away than active intersection.\n if (this.intersectedEl) {\n currentIntersection = this.el.components.raycaster.getIntersection(this.intersectedEl);\n if (currentIntersection && currentIntersection.distance <= intersection.distance) { return; }\n }\n\n // Unset current intersection.\n this.clearCurrentIntersection(true);\n\n this.setIntersection(intersectedEl, intersection);\n },\n\n /**\n * Handle intersection cleared.\n */\n onIntersectionCleared: function (evt) {\n var clearedEls = evt.detail.clearedEls;\n // Check if the current intersection has ended\n if (clearedEls.indexOf(this.intersectedEl) === -1) { return; }\n this.clearCurrentIntersection();\n },\n\n onEnterVR: function () {\n this.clearCurrentIntersection(true);\n var xrSession = this.el.sceneEl.xrSession;\n var self = this;\n if (!xrSession) { return; }\n if (this.data.rayOrigin === 'mouse') { return; }\n WEBXR_EVENTS.DOWN.forEach(function (downEvent) {\n xrSession.addEventListener(downEvent, self.onCursorDown);\n });\n WEBXR_EVENTS.UP.forEach(function (upEvent) {\n xrSession.addEventListener(upEvent, self.onCursorUp);\n });\n },\n\n setIntersection: function (intersectedEl, intersection) {\n var cursorEl = this.el;\n var data = this.data;\n var self = this;\n\n // Already intersecting.\n if (this.intersectedEl === intersectedEl) { return; }\n\n // Set new intersection.\n this.intersectedEl = intersectedEl;\n\n // Hovering.\n cursorEl.addState(STATES.HOVERING);\n intersectedEl.addState(STATES.HOVERED);\n this.twoWayEmit(EVENTS.MOUSEENTER);\n\n if (this.data.mouseCursorStylesEnabled && this.data.rayOrigin === 'mouse') {\n this.el.sceneEl.canvas.classList.add(CANVAS_HOVER_CLASS);\n }\n\n // Begin fuse if necessary.\n if (data.fuseTimeout === 0 || !data.fuse) { return; }\n cursorEl.addState(STATES.FUSING);\n this.twoWayEmit(EVENTS.FUSING);\n this.fuseTimeout = setTimeout(function fuse () {\n cursorEl.removeState(STATES.FUSING);\n self.twoWayEmit(EVENTS.CLICK);\n }, data.fuseTimeout);\n },\n\n clearCurrentIntersection: function (ignoreRemaining) {\n var index;\n var intersection;\n var intersections;\n var cursorEl = this.el;\n\n // Nothing to be cleared.\n if (!this.intersectedEl) { return; }\n\n // No longer hovering (or fusing).\n this.intersectedEl.removeState(STATES.HOVERED);\n cursorEl.removeState(STATES.HOVERING);\n cursorEl.removeState(STATES.FUSING);\n this.twoWayEmit(EVENTS.MOUSELEAVE);\n\n if (this.data.mouseCursorStylesEnabled && this.data.rayOrigin === 'mouse') {\n this.el.sceneEl.canvas.classList.remove(CANVAS_HOVER_CLASS);\n }\n\n // Unset intersected entity (after emitting the event).\n this.intersectedEl = null;\n\n // Clear fuseTimeout.\n clearTimeout(this.fuseTimeout);\n\n // Set intersection to another raycasted element if any.\n if (ignoreRemaining === true) { return; }\n intersections = this.el.components.raycaster.intersections;\n if (intersections.length === 0) { return; }\n // Exclude the cursor.\n index = intersections[0].object.el === cursorEl ? 1 : 0;\n intersection = intersections[index];\n if (!intersection) { return; }\n this.setIntersection(intersection.object.el, intersection);\n },\n\n /**\n * Helper to emit on both the cursor and the intersected entity (if exists).\n */\n twoWayEmit: function (evtName) {\n var el = this.el;\n var intersectedEl = this.intersectedEl;\n var intersection;\n\n intersection = this.el.components.raycaster.getIntersection(intersectedEl);\n this.eventDetail.intersectedEl = intersectedEl;\n this.eventDetail.intersection = intersection;\n el.emit(evtName, this.eventDetail);\n\n if (!intersectedEl) { return; }\n\n this.intersectedEventDetail.intersection = intersection;\n intersectedEl.emit(evtName, this.intersectedEventDetail);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205}],77:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar DAYDREAM_CONTROLLER_MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/google/';\nvar DAYDREAM_CONTROLLER_MODEL_OBJ_URL = DAYDREAM_CONTROLLER_MODEL_BASE_URL + 'vr_controller_daydream.obj';\nvar DAYDREAM_CONTROLLER_MODEL_OBJ_MTL = DAYDREAM_CONTROLLER_MODEL_BASE_URL + 'vr_controller_daydream.mtl';\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'google-daydream';\nvar GAMEPAD_ID_WEBVR = 'Daydream Controller';\n\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n/**\n * Button indices:\n * 0 - trackpad\n * 1 - menu (never dispatched on this layer)\n * 2 - system (never dispatched on this layer)\n *\n * Axis:\n * 0 - trackpad x\n * 1 - trackpad y\n */\nvar INPUT_MAPPING_WEBVR = {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'menu', 'system']\n};\n\n/**\n * Button indices:\n * 0 - none\n * 1 - none\n * 2 - touchpad\n *\n * Axis:\n * 0 - touchpad x\n * 1 - touchpad y\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/google/google-daydream.json\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {touchpad: [0, 1]},\n buttons: ['none', 'none', 'touchpad', 'menu', 'system']\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Daydream controls.\n * Interface with Daydream controller and map Gamepad events to\n * controller buttons: trackpad, menu, system\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('daydream-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n buttonColor: {type: 'color', default: '#000000'},\n buttonTouchedColor: {type: 'color', default: '#777777'},\n buttonHighlightColor: {type: 'color', default: '#FFFFFF'},\n model: {default: true},\n orientationOffset: {type: 'vec3'},\n armModel: {default: true}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX,\n this.data.hand ? {hand: this.data.hand} : {});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n armModel: data.armModel,\n hand: data.hand,\n idPrefix: GAMEPAD_ID_PREFIX,\n id: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset\n });\n if (!this.data.model) { return; }\n this.el.setAttribute('obj-model', {\n obj: DAYDREAM_CONTROLLER_MODEL_OBJ_URL,\n mtl: DAYDREAM_CONTROLLER_MODEL_OBJ_MTL\n });\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n var buttonMeshes;\n if (!this.data.model) { return; }\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.menu = controllerObject3D.getObjectByName('AppButton_AppButton_Cylinder.004');\n buttonMeshes.system = controllerObject3D.getObjectByName('HomeButton_HomeButton_Cylinder.005');\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('TouchPad_TouchPad_Cylinder.003');\n buttonMeshes.touchpad = controllerObject3D.getObjectByName('TouchPad_TouchPad_Cylinder.003');\n // Offset pivot point.\n controllerObject3D.position.set(0, 0, -0.04);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var buttonMeshes = this.buttonMeshes;\n if (!buttonMeshes || !buttonMeshes[buttonName]) { return; }\n var color;\n switch (state) {\n case 'down':\n color = this.data.buttonHighlightColor;\n break;\n case 'touchstart':\n color = this.data.buttonTouchedColor;\n break;\n default:\n color = this.data.buttonColor;\n }\n buttonMeshes[buttonName].material.color.set(color);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],78:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GEARVR_CONTROLLER_MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/samsung/';\nvar GEARVR_CONTROLLER_MODEL_OBJ_URL = GEARVR_CONTROLLER_MODEL_BASE_URL + 'gear_vr_controller.obj';\nvar GEARVR_CONTROLLER_MODEL_OBJ_MTL = GEARVR_CONTROLLER_MODEL_BASE_URL + 'gear_vr_controller.mtl';\n\nvar GAMEPAD_ID_WEBXR = 'samsung-gearvr';\nvar GAMEPAD_ID_WEBVR = 'Gear VR';\n\n// Prefix for Gen1 and Gen2 Oculus Touch Controllers.\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n/**\n * Button indices:\n * 0 - trackpad\n * 1 - trigger\n *\n * Axis:\n * 0 - trackpad x\n * 1 - trackpad y\n */\nvar INPUT_MAPPING_WEBVR = {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'trigger']\n};\n\n/**\n * Button indices:\n * 0 - trigger\n * 1 - none\n * 2 - touchpad\n * 3 - menu\n *\n * Axis:\n * 0 - touchpad x\n * 1 - touchpad y\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/samsung/samsung-gearvr.json\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {touchpad: [0, 1]},\n buttons: ['trigger', 'none', 'touchpad', 'none', 'menu']\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Gear VR controls.\n * Interface with Gear VR controller and map Gamepad events to\n * controller buttons: trackpad, trigger\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('gearvr-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n buttonColor: {type: 'color', default: '#000000'},\n buttonTouchedColor: {type: 'color', default: '#777777'},\n buttonHighlightColor: {type: 'color', default: '#FFFFFF'},\n model: {default: true},\n orientationOffset: {type: 'vec3'},\n armModel: {default: true}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX,\n this.data.hand ? {hand: this.data.hand} : {});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n armModel: data.armModel,\n hand: data.hand,\n idPrefix: GAMEPAD_ID_PREFIX,\n id: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset\n });\n if (!this.data.model) { return; }\n this.el.setAttribute('obj-model', {\n obj: GEARVR_CONTROLLER_MODEL_OBJ_URL,\n mtl: GEARVR_CONTROLLER_MODEL_OBJ_MTL\n });\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n // No need for onButtonChanged, since Gear VR controller has no analog buttons.\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n var buttonMeshes;\n if (!this.data.model) { return; }\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.trigger = controllerObject3D.children[2];\n buttonMeshes.trackpad = controllerObject3D.children[1];\n buttonMeshes.touchpad = controllerObject3D.children[1];\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var buttonMeshes = this.buttonMeshes;\n if (!buttonMeshes || !buttonMeshes[buttonName]) { return; }\n var color;\n switch (state) {\n case 'down':\n color = this.data.buttonHighlightColor;\n break;\n case 'touchstart':\n color = this.data.buttonTouchedColor;\n break;\n default:\n color = this.data.buttonColor;\n }\n buttonMeshes[buttonName].material.color.set(color);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],79:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar GAMEPAD_ID_PREFIX = 'generic';\n\n/**\n * Button indices:\n * 0 - trigger\n * 1 - squeeze\n * 2 - touchpad\n * 3 - thumbstick\n *\n * Axis:\n * 0 - touchpad\n * 1 - thumbstick\n *\n */\nvar INPUT_MAPPING = {\n axes: {\n touchpad: [0, 1],\n thumbstick: [2, 3]\n },\n buttons: ['trigger', 'squeeze', 'touchpad', 'thumbstick']\n};\n\n/**\n * Oculus Go controls.\n * Interface with Oculus Go controller and map Gamepad events to\n * controller buttons: trackpad, trigger\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('generic-tracked-controller-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n defaultModel: {default: true},\n defaultModelColor: {default: 'gray'},\n orientationOffset: {type: 'vec3'},\n disabled: {default: false}\n },\n\n /**\n * Button IDs:\n * 0 - trackpad\n * 1 - trigger\n */\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.wasControllerConnected = false;\n this.lastControllerCheck = 0;\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.bindMethods();\n\n // generic-tracked-controller-controls has the lowest precedence.\n // We must diable this component if there are more specialized controls components.\n this.el.addEventListener('controllerconnected', function (evt) {\n if (evt.detail.name === self.name) { return; }\n self.wasControllerConnected = true;\n self.removeEventListeners();\n self.removeControllersUpdateListener();\n });\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n var data = this.data;\n var hand = data.hand ? data.hand : undefined;\n checkControllerPresentAndSetup(\n this, GAMEPAD_ID_PREFIX,\n {hand: hand, iterateControllerProfiles: true});\n },\n\n play: function () {\n if (this.wasControllerConnected) { return; }\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n\n // Do nothing if tracked-controls already set.\n // Generic controls have the lowest precedence.\n if (this.el.components['tracked-controls']) {\n this.removeEventListeners();\n return;\n }\n el.setAttribute('tracked-controls', {\n hand: data.hand,\n idPrefix: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset,\n iterateControllerProfiles: true\n });\n if (!this.data.defaultModel) { return; }\n this.initDefaultModel();\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n initDefaultModel: function () {\n var modelEl = this.modelEl = document.createElement('a-entity');\n modelEl.setAttribute('geometry', {\n primitive: 'sphere',\n radius: 0.03\n });\n modelEl.setAttribute('material', {color: this.data.color});\n this.el.appendChild(modelEl);\n }\n});\n\n},{\"../core/component\":131,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],80:[function(_dereq_,module,exports){\nvar geometries = _dereq_('../core/geometry').geometries;\nvar geometryNames = _dereq_('../core/geometry').geometryNames;\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\nvar dummyGeometry = new THREE.BufferGeometry();\n\n/**\n * Geometry component. Combined with material component to make a mesh in 3D object.\n * Extended with registered geometries.\n */\nmodule.exports.Component = registerComponent('geometry', {\n schema: {\n buffer: {default: true},\n primitive: {default: 'box', oneOf: geometryNames, schemaChange: true},\n skipCache: {default: false}\n },\n\n init: function () {\n this.geometry = null;\n },\n\n /**\n * Talk to geometry system to get or create geometry.\n */\n update: function (previousData) {\n var data = this.data;\n var el = this.el;\n var mesh;\n var system = this.system;\n\n // Dispose old geometry if we created one.\n if (this.geometry) {\n system.unuseGeometry(previousData);\n this.geometry = null;\n }\n\n // Create new geometry.\n this.geometry = system.getOrCreateGeometry(data);\n\n // Set on mesh. If mesh does not exist, create it.\n mesh = el.getObject3D('mesh');\n if (mesh) {\n mesh.geometry = this.geometry;\n } else {\n mesh = new THREE.Mesh();\n mesh.geometry = this.geometry;\n // Default material if not defined on the entity.\n if (!this.el.getAttribute('material')) {\n mesh.material = new THREE.MeshStandardMaterial({\n color: Math.random() * 0xFFFFFF,\n metalness: 0,\n roughness: 0.5\n });\n }\n el.setObject3D('mesh', mesh);\n }\n },\n\n /**\n * Tell geometry system that entity is no longer using the geometry.\n * Unset the geometry on the mesh\n */\n remove: function () {\n this.system.unuseGeometry(this.data);\n this.el.getObject3D('mesh').geometry = dummyGeometry;\n this.geometry = null;\n },\n\n /**\n * Update geometry component schema based on geometry type.\n */\n updateSchema: function (data) {\n var currentGeometryType = this.oldData && this.oldData.primitive;\n var newGeometryType = data.primitive;\n var schema = geometries[newGeometryType] && geometries[newGeometryType].schema;\n\n // Geometry has no schema.\n if (!schema) { throw new Error('Unknown geometry schema `' + newGeometryType + '`'); }\n // Nothing has changed.\n if (currentGeometryType && currentGeometryType === newGeometryType) { return; }\n\n this.extendSchema(schema);\n }\n});\n\n},{\"../core/component\":131,\"../core/geometry\":132,\"../lib/three\":179}],81:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\nvar warn = utils.debug('components:gltf-model:warn');\n\n/**\n * glTF model loader.\n */\nmodule.exports.Component = registerComponent('gltf-model', {\n schema: {type: 'model'},\n\n init: function () {\n var dracoLoader = this.system.getDRACOLoader();\n this.model = null;\n this.loader = new THREE.GLTFLoader();\n if (dracoLoader) {\n this.loader.setDRACOLoader(dracoLoader);\n }\n },\n\n update: function () {\n var self = this;\n var el = this.el;\n var src = this.data;\n\n if (!src) { return; }\n\n this.remove();\n\n this.loader.load(src, function gltfLoaded (gltfModel) {\n self.model = gltfModel.scene || gltfModel.scenes[0];\n self.model.animations = gltfModel.animations;\n el.setObject3D('mesh', self.model);\n el.emit('model-loaded', {format: 'gltf', model: self.model});\n }, undefined /* onProgress */, function gltfFailed (error) {\n var message = (error && error.message) ? error.message : 'Failed to load glTF model';\n warn(message);\n el.emit('model-error', {format: 'gltf', src: src});\n });\n },\n\n remove: function () {\n if (!this.model) { return; }\n this.el.removeObject3D('mesh');\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205}],82:[function(_dereq_,module,exports){\n/* global THREE */\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\n// Found at https://github.com/aframevr/assets.\nvar MODEL_URLS = {\n toonLeft: 'https://cdn.aframe.io/controllers/hands/leftHand.glb',\n toonRight: 'https://cdn.aframe.io/controllers/hands/rightHand.glb',\n lowPolyLeft: 'https://cdn.aframe.io/controllers/hands/leftHandLow.glb',\n lowPolyRight: 'https://cdn.aframe.io/controllers/hands/rightHandLow.glb',\n highPolyLeft: 'https://cdn.aframe.io/controllers/hands/leftHandHigh.glb',\n highPolyRight: 'https://cdn.aframe.io/controllers/hands/rightHandHigh.glb'\n};\n\n// Poses.\nvar ANIMATIONS = {\n open: 'Open',\n // point: grip active, trackpad surface active, trigger inactive.\n point: 'Point',\n // pointThumb: grip active, trigger inactive, trackpad surface inactive.\n pointThumb: 'Point + Thumb',\n // fist: grip active, trigger active, trackpad surface active.\n fist: 'Fist',\n // hold: trigger active, grip inactive.\n hold: 'Hold',\n // thumbUp: grip active, trigger active, trackpad surface inactive.\n thumbUp: 'Thumb Up'\n};\n\n// Map animation to public events for the API.\nvar EVENTS = {};\nEVENTS[ANIMATIONS.fist] = 'grip';\nEVENTS[ANIMATIONS.thumbUp] = 'pistol';\nEVENTS[ANIMATIONS.point] = 'pointing';\n\n/**\n * Hand controls component that abstracts 6DoF controls:\n * oculus-touch-controls, vive-controls, windows-motion-controls.\n *\n * Originally meant to be a sample implementation of applications-specific controls that\n * abstracts multiple types of controllers.\n *\n * Auto-detect appropriate controller.\n * Handle common events coming from the detected vendor-specific controls.\n * Translate button events to semantic hand-related event names:\n * (gripclose, gripopen, thumbup, thumbdown, pointup, pointdown)\n * Load hand model with gestures that are applied based on the button pressed.\n *\n * @property {string} Hand mapping (`left`, `right`).\n */\nmodule.exports.Component = registerComponent('hand-controls', {\n schema: {\n color: {default: 'white', type: 'color'},\n hand: { default: 'left' },\n handModelStyle: {default: 'lowPoly', oneOf: ['lowPoly', 'highPoly', 'toon']}\n },\n\n init: function () {\n var self = this;\n var el = this.el;\n // Current pose.\n this.gesture = ANIMATIONS.open;\n // Active buttons populated by events provided by the attached controls.\n this.pressedButtons = {};\n this.touchedButtons = {};\n this.loader = new THREE.GLTFLoader();\n this.loader.setCrossOrigin('anonymous');\n\n this.onGripDown = function () { self.handleButton('grip', 'down'); };\n this.onGripUp = function () { self.handleButton('grip', 'up'); };\n this.onTrackpadDown = function () { self.handleButton('trackpad', 'down'); };\n this.onTrackpadUp = function () { self.handleButton('trackpad', 'up'); };\n this.onTrackpadTouchStart = function () { self.handleButton('trackpad', 'touchstart'); };\n this.onTrackpadTouchEnd = function () { self.handleButton('trackpad', 'touchend'); };\n this.onTriggerDown = function () { self.handleButton('trigger', 'down'); };\n this.onTriggerUp = function () { self.handleButton('trigger', 'up'); };\n this.onTriggerTouchStart = function () { self.handleButton('trigger', 'touchstart'); };\n this.onTriggerTouchEnd = function () { self.handleButton('trigger', 'touchend'); };\n this.onGripTouchStart = function () { self.handleButton('grip', 'touchstart'); };\n this.onGripTouchEnd = function () { self.handleButton('grip', 'touchend'); };\n this.onThumbstickDown = function () { self.handleButton('thumbstick', 'down'); };\n this.onThumbstickUp = function () { self.handleButton('thumbstick', 'up'); };\n this.onAorXTouchStart = function () { self.handleButton('AorX', 'touchstart'); };\n this.onAorXTouchEnd = function () { self.handleButton('AorX', 'touchend'); };\n this.onBorYTouchStart = function () { self.handleButton('BorY', 'touchstart'); };\n this.onBorYTouchEnd = function () { self.handleButton('BorY', 'touchend'); };\n this.onSurfaceTouchStart = function () { self.handleButton('surface', 'touchstart'); };\n this.onSurfaceTouchEnd = function () { self.handleButton('surface', 'touchend'); };\n this.onControllerConnected = this.onControllerConnected.bind(this);\n this.onControllerDisconnected = this.onControllerDisconnected.bind(this);\n\n el.addEventListener('controllerconnected', this.onControllerConnected);\n el.addEventListener('controllerdisconnected', this.onControllerDisconnected);\n\n // Hidden by default.\n el.object3D.visible = false;\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n },\n\n tick: function (time, delta) {\n var mesh = this.el.getObject3D('mesh');\n\n if (!mesh || !mesh.mixer) { return; }\n\n mesh.mixer.update(delta / 1000);\n },\n\n onControllerConnected: function () {\n this.el.object3D.visible = true;\n },\n\n onControllerDisconnected: function () {\n this.el.object3D.visible = false;\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('gripdown', this.onGripDown);\n el.addEventListener('gripup', this.onGripUp);\n el.addEventListener('trackpaddown', this.onTrackpadDown);\n el.addEventListener('trackpadup', this.onTrackpadUp);\n el.addEventListener('trackpadtouchstart', this.onTrackpadTouchStart);\n el.addEventListener('trackpadtouchend', this.onTrackpadTouchEnd);\n el.addEventListener('triggerdown', this.onTriggerDown);\n el.addEventListener('triggerup', this.onTriggerUp);\n el.addEventListener('triggertouchstart', this.onTriggerTouchStart);\n el.addEventListener('triggertouchend', this.onTriggerTouchEnd);\n el.addEventListener('griptouchstart', this.onGripTouchStart);\n el.addEventListener('griptouchend', this.onGripTouchEnd);\n el.addEventListener('thumbstickdown', this.onThumbstickDown);\n el.addEventListener('thumbstickup', this.onThumbstickUp);\n el.addEventListener('abuttontouchstart', this.onAorXTouchStart);\n el.addEventListener('abuttontouchend', this.onAorXTouchEnd);\n el.addEventListener('bbuttontouchstart', this.onBorYTouchStart);\n el.addEventListener('bbuttontouchend', this.onBorYTouchEnd);\n el.addEventListener('xbuttontouchstart', this.onAorXTouchStart);\n el.addEventListener('xbuttontouchend', this.onAorXTouchEnd);\n el.addEventListener('ybuttontouchstart', this.onBorYTouchStart);\n el.addEventListener('ybuttontouchend', this.onBorYTouchEnd);\n el.addEventListener('surfacetouchstart', this.onSurfaceTouchStart);\n el.addEventListener('surfacetouchend', this.onSurfaceTouchEnd);\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('gripdown', this.onGripDown);\n el.removeEventListener('gripup', this.onGripUp);\n el.removeEventListener('trackpaddown', this.onTrackpadDown);\n el.removeEventListener('trackpadup', this.onTrackpadUp);\n el.removeEventListener('trackpadtouchstart', this.onTrackpadTouchStart);\n el.removeEventListener('trackpadtouchend', this.onTrackpadTouchEnd);\n el.removeEventListener('triggerdown', this.onTriggerDown);\n el.removeEventListener('triggerup', this.onTriggerUp);\n el.removeEventListener('triggertouchstart', this.onTriggerTouchStart);\n el.removeEventListener('triggertouchend', this.onTriggerTouchEnd);\n el.removeEventListener('griptouchstart', this.onGripTouchStart);\n el.removeEventListener('griptouchend', this.onGripTouchEnd);\n el.removeEventListener('thumbstickdown', this.onThumbstickDown);\n el.removeEventListener('thumbstickup', this.onThumbstickUp);\n el.removeEventListener('abuttontouchstart', this.onAorXTouchStart);\n el.removeEventListener('abuttontouchend', this.onAorXTouchEnd);\n el.removeEventListener('bbuttontouchstart', this.onBorYTouchStart);\n el.removeEventListener('bbuttontouchend', this.onBorYTouchEnd);\n el.removeEventListener('xbuttontouchstart', this.onAorXTouchStart);\n el.removeEventListener('xbuttontouchend', this.onAorXTouchEnd);\n el.removeEventListener('ybuttontouchstart', this.onBorYTouchStart);\n el.removeEventListener('ybuttontouchend', this.onBorYTouchEnd);\n el.removeEventListener('surfacetouchstart', this.onSurfaceTouchStart);\n el.removeEventListener('surfacetouchend', this.onSurfaceTouchEnd);\n },\n\n /**\n * Update handler. More like the `init` handler since the only property is the hand, and\n * that won't be changing much.\n */\n update: function (previousHand) {\n var controlConfiguration;\n var el = this.el;\n var hand = this.data.hand;\n var handModelStyle = this.data.handModelStyle;\n var handColor = this.data.color;\n var self = this;\n\n // Get common configuration to abstract different vendor controls.\n controlConfiguration = {\n hand: hand,\n model: false\n };\n\n // Set model.\n if (hand !== previousHand) {\n var handmodelUrl = MODEL_URLS[handModelStyle + hand.charAt(0).toUpperCase() + hand.slice(1)];\n this.loader.load(handmodelUrl, function (gltf) {\n var mesh = gltf.scene.children[0];\n var handModelOrientation = hand === 'left' ? Math.PI / 2 : -Math.PI / 2;\n mesh.mixer = new THREE.AnimationMixer(mesh);\n self.clips = gltf.animations;\n el.setObject3D('mesh', mesh);\n\n var handMaterial = mesh.children[1].material;\n handMaterial.color = new THREE.Color(handColor);\n mesh.position.set(0, 0, 0);\n mesh.rotation.set(0, 0, handModelOrientation);\n el.setAttribute('magicleap-controls', controlConfiguration);\n el.setAttribute('vive-controls', controlConfiguration);\n el.setAttribute('oculus-touch-controls', controlConfiguration);\n el.setAttribute('windows-motion-controls', controlConfiguration);\n });\n }\n },\n\n remove: function () {\n this.el.removeObject3D('mesh');\n },\n\n /**\n * Play model animation, based on which button was pressed and which kind of event.\n *\n * 1. Process buttons.\n * 2. Determine gesture (this.determineGesture()).\n * 3. Animation gesture (this.animationGesture()).\n * 4. Emit gesture events (this.emitGestureEvents()).\n *\n * @param {string} button - Name of the button.\n * @param {string} evt - Type of event for the button (i.e., down/up/touchstart/touchend).\n */\n handleButton: function (button, evt) {\n var lastGesture;\n var isPressed = evt === 'down';\n var isTouched = evt === 'touchstart';\n\n // Update objects.\n if (evt.indexOf('touch') === 0) {\n // Update touch object.\n if (isTouched === this.touchedButtons[button]) { return; }\n this.touchedButtons[button] = isTouched;\n } else {\n // Update button object.\n if (isPressed === this.pressedButtons[button]) { return; }\n this.pressedButtons[button] = isPressed;\n }\n\n // Determine the gesture.\n lastGesture = this.gesture;\n this.gesture = this.determineGesture();\n\n // Same gesture.\n if (this.gesture === lastGesture) { return; }\n // Animate gesture.\n this.animateGesture(this.gesture, lastGesture);\n\n // Emit events.\n this.emitGestureEvents(this.gesture, lastGesture);\n },\n\n /**\n * Determine which pose hand should be in considering active and touched buttons.\n */\n determineGesture: function () {\n var gesture;\n var isGripActive = this.pressedButtons.grip;\n var isSurfaceActive = this.pressedButtons.surface || this.touchedButtons.surface;\n var isTrackpadActive = this.pressedButtons.trackpad || this.touchedButtons.trackpad;\n var isTriggerActive = this.pressedButtons.trigger || this.touchedButtons.trigger;\n var isABXYActive = this.touchedButtons.AorX || this.touchedButtons.BorY;\n var isVive = isViveController(this.el.components['tracked-controls']);\n\n // Works well with Oculus Touch and Windows Motion Controls, but Vive needs tweaks.\n if (isVive) {\n if (isGripActive || isTriggerActive) {\n gesture = ANIMATIONS.fist;\n } else if (isTrackpadActive) {\n gesture = ANIMATIONS.point;\n }\n } else {\n if (isGripActive) {\n if (isSurfaceActive || isABXYActive || isTrackpadActive) {\n gesture = isTriggerActive ? ANIMATIONS.fist : ANIMATIONS.point;\n } else {\n gesture = isTriggerActive ? ANIMATIONS.thumbUp : ANIMATIONS.pointThumb;\n }\n } else if (isTriggerActive) {\n gesture = ANIMATIONS.hold;\n }\n }\n\n return gesture;\n },\n\n /**\n * Play corresponding clip to a gesture\n */\n getClip: function (gesture) {\n var clip;\n var i;\n for (i = 0; i < this.clips.length; i++) {\n clip = this.clips[i];\n if (clip.name !== gesture) { continue; }\n return clip;\n }\n },\n\n /**\n * Play gesture animation.\n *\n * @param {string} gesture - Which pose to animate to. If absent, then animate to open.\n * @param {string} lastGesture - Previous gesture, to reverse back to open if needed.\n */\n animateGesture: function (gesture, lastGesture) {\n if (gesture) {\n this.playAnimation(gesture || ANIMATIONS.open, lastGesture, false);\n return;\n }\n\n // If no gesture, then reverse the current gesture back to open pose.\n this.playAnimation(lastGesture, lastGesture, true);\n },\n\n /**\n * Emit `hand-controls`-specific events.\n */\n emitGestureEvents: function (gesture, lastGesture) {\n var el = this.el;\n var eventName;\n\n if (lastGesture === gesture) { return; }\n\n // Emit event for lastGesture not inactive.\n eventName = getGestureEventName(lastGesture, false);\n if (eventName) { el.emit(eventName); }\n\n // Emit event for current gesture now active.\n eventName = getGestureEventName(gesture, true);\n if (eventName) { el.emit(eventName); }\n },\n\n /**\n * Play hand animation based on button state.\n *\n * @param {string} gesture - Name of the animation as specified by the model.\n * @param {string} lastGesture - Previous pose.\n * @param {boolean} reverse - Whether animation should play in reverse.\n */\n playAnimation: function (gesture, lastGesture, reverse) {\n var clip;\n var fromAction;\n var mesh = this.el.getObject3D('mesh');\n var toAction;\n\n if (!mesh) { return; }\n\n // Stop all current animations.\n mesh.mixer.stopAllAction();\n\n // Grab clip action.\n clip = this.getClip(gesture);\n toAction = mesh.mixer.clipAction(clip);\n toAction.clampWhenFinished = true;\n toAction.loop = THREE.LoopRepeat;\n toAction.repetitions = 0;\n toAction.timeScale = reverse ? -1 : 1;\n toAction.time = reverse ? clip.duration : 0;\n toAction.weight = 1;\n\n // No gesture to gesture or gesture to no gesture.\n if (!lastGesture || gesture === lastGesture) {\n // Stop all current animations.\n mesh.mixer.stopAllAction();\n // Play animation.\n toAction.play();\n return;\n }\n\n // Animate or crossfade from gesture to gesture.\n clip = this.getClip(lastGesture);\n fromAction = mesh.mixer.clipAction(clip);\n fromAction.weight = 0.15;\n fromAction.play();\n toAction.play();\n fromAction.crossFadeTo(toAction, 0.15, true);\n }\n});\n\n/**\n * Suffix gestures based on toggle state (e.g., open/close, up/down, start/end).\n *\n * @param {string} gesture\n * @param {boolean} active\n */\nfunction getGestureEventName (gesture, active) {\n var eventName;\n\n if (!gesture) { return; }\n\n eventName = EVENTS[gesture];\n if (eventName === 'grip') {\n return eventName + (active ? 'close' : 'open');\n }\n if (eventName === 'point') {\n return eventName + (active ? 'up' : 'down');\n }\n if (eventName === 'pointing' || eventName === 'pistol') {\n return eventName + (active ? 'start' : 'end');\n }\n}\n\nfunction isViveController (trackedControls) {\n var controller = trackedControls && trackedControls.controller;\n var isVive = controller && (controller.id && controller.id.indexOf('OpenVR ') === 0 ||\n (controller.profiles &&\n controller.profiles[0] &&\n controller.profiles[0] === 'htc-vive-controller-mv'));\n return isVive;\n}\n\n},{\"../core/component\":131}],83:[function(_dereq_,module,exports){\n/* global THREE, XRRigidTransform */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\n\nvar LEFT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/unity/left.glb';\nvar RIGHT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/unity/right.glb';\n\nvar BONE_PREFIX = {\n left: 'b_l_',\n right: 'b_r_'\n};\n\nvar JOINTS = [\n 'wrist',\n 'thumb-metacarpal',\n 'thumb-phalanx-proximal',\n 'thumb-phalanx-distal',\n 'thumb-tip',\n 'index-finger-metacarpal',\n 'index-finger-phalanx-proximal',\n 'index-finger-phalanx-intermediate',\n 'index-finger-phalanx-distal',\n 'index-finger-tip',\n 'middle-finger-metacarpal',\n 'middle-finger-phalanx-proximal',\n 'middle-finger-phalanx-intermediate',\n 'middle-finger-phalanx-distal',\n 'middle-finger-tip',\n 'ring-finger-metacarpal',\n 'ring-finger-phalanx-proximal',\n 'ring-finger-phalanx-intermediate',\n 'ring-finger-phalanx-distal',\n 'ring-finger-tip',\n 'pinky-finger-metacarpal',\n 'pinky-finger-phalanx-proximal',\n 'pinky-finger-phalanx-intermediate',\n 'pinky-finger-phalanx-distal',\n 'pinky-finger-tip'\n];\n\nvar BONE_MAPPING = {\n 'wrist': 'wrist',\n 'thumb-metacarpal': 'thumb1',\n 'thumb-phalanx-proximal': 'thumb2',\n 'thumb-phalanx-distal': 'thumb3',\n 'thumb-tip': 'thumb_null',\n 'index-finger-phalanx-proximal': 'index1',\n 'index-finger-phalanx-intermediate': 'index2',\n 'index-finger-phalanx-distal': 'index3',\n 'index-finger-tip': 'index_null',\n 'middle-finger-phalanx-proximal': 'middle1',\n 'middle-finger-phalanx-intermediate': 'middle2',\n 'middle-finger-phalanx-distal': 'middle3',\n 'middle-finger-tip': 'middle_null',\n 'ring-finger-phalanx-proximal': 'ring1',\n 'ring-finger-phalanx-intermediate': 'ring2',\n 'ring-finger-phalanx-distal': 'ring3',\n 'ring-finger-tip': 'ring_null',\n 'pinky-finger-metacarpal': 'pinky0',\n 'pinky-finger-phalanx-proximal': 'pinky1',\n 'pinky-finger-phalanx-intermediate': 'pinky2',\n 'pinky-finger-phalanx-distal': 'pinky3',\n 'pinky-finger-tip': 'pinky_null'\n};\n\nvar PINCH_START_DISTANCE = 0.015;\nvar PINCH_END_DISTANCE = 0.03;\nvar PINCH_POSITION_INTERPOLATION = 0.5;\n\n/**\n * Controls for hand tracking\n */\nmodule.exports.Component = registerComponent('hand-tracking-controls', {\n schema: {\n hand: {default: 'right', oneOf: ['left', 'right']},\n modelStyle: {default: 'mesh', oneOf: ['dots', 'mesh']},\n modelColor: {default: 'white'}\n },\n\n bindMethods: function () {\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n },\n\n addEventListeners: function () {\n this.el.addEventListener('model-loaded', this.onModelLoaded);\n for (var i = 0; i < this.jointEls.length; ++i) {\n this.jointEls[i].object3D.visible = true;\n }\n },\n\n removeEventListeners: function () {\n this.el.removeEventListener('model-loaded', this.onModelLoaded);\n for (var i = 0; i < this.jointEls.length; ++i) {\n this.jointEls[i].object3D.visible = false;\n }\n },\n\n init: function () {\n var sceneEl = this.el.sceneEl;\n var webXROptionalAttributes = sceneEl.getAttribute('webxr').optionalFeatures;\n webXROptionalAttributes.push('hand-tracking');\n sceneEl.setAttribute('webxr', {optionalFeatures: webXROptionalAttributes});\n this.onModelLoaded = this.onModelLoaded.bind(this);\n this.jointEls = [];\n this.controllerPresent = false;\n this.isPinched = false;\n this.pinchEventDetail = {position: new THREE.Vector3()};\n this.indexTipPosition = new THREE.Vector3();\n\n this.bindMethods();\n\n this.updateReferenceSpace = this.updateReferenceSpace.bind(this);\n this.el.sceneEl.addEventListener('enter-vr', this.updateReferenceSpace);\n this.el.sceneEl.addEventListener('exit-vr', this.updateReferenceSpace);\n },\n\n updateReferenceSpace: function () {\n var self = this;\n var xrSession = this.el.sceneEl.xrSession;\n this.referenceSpace = undefined;\n if (!xrSession) { return; }\n var referenceSpaceType = self.el.sceneEl.systems.webxr.sessionReferenceSpaceType;\n xrSession.requestReferenceSpace(referenceSpaceType).then(function (referenceSpace) {\n self.referenceSpace = referenceSpace.getOffsetReferenceSpace(new XRRigidTransform({x: 0, y: 1.5, z: 0}));\n }).catch(function (error) {\n self.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(referenceSpaceType, 'tracked-controls-webxr uses reference space ' + referenceSpaceType);\n throw error;\n });\n },\n\n checkIfControllerPresent: function () {\n var data = this.data;\n var hand = data.hand ? data.hand : undefined;\n checkControllerPresentAndSetup(\n this, '',\n {hand: hand, iterateControllerProfiles: true, handTracking: true});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n tick: function () {\n var sceneEl = this.el.sceneEl;\n var controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n var frame = sceneEl.frame;\n var trackedControlsWebXR = this.el.components['tracked-controls-webxr'];\n if (!controller || !frame || !trackedControlsWebXR) { return; }\n if (controller.hand) {\n this.el.object3D.position.set(0, 0, 0);\n this.el.object3D.rotation.set(0, 0, 0);\n if (frame.getJointPose) { this.updateHandModel(); }\n this.detectGesture();\n }\n },\n\n updateHandModel: function () {\n if (this.data.modelStyle === 'dots') {\n this.updateHandDotsModel();\n }\n\n if (this.data.modelStyle === 'mesh') {\n this.updateHandMeshModel();\n }\n },\n\n getBone: function (name) {\n var bones = this.bones;\n for (var i = 0; i < bones.length; i++) {\n if (bones[i].name === name) { return bones[i]; }\n }\n return null;\n },\n\n updateHandMeshModel: function () {\n var frame = this.el.sceneEl.frame;\n var controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n var referenceSpace = this.referenceSpace;\n\n if (!controller || !this.mesh || !referenceSpace) { return; }\n this.mesh.visible = false;\n for (var inputjoint of controller.hand.values()) {\n var bone;\n var jointPose;\n var jointTransform;\n jointPose = frame.getJointPose(inputjoint, referenceSpace);\n if (!BONE_MAPPING[inputjoint.jointName]) { continue; }\n bone = this.getBone(BONE_PREFIX[this.data.hand] + BONE_MAPPING[inputjoint.jointName]);\n if (bone != null && jointPose) {\n jointTransform = jointPose.transform;\n this.mesh.visible = true;\n bone.position.copy(jointTransform.position).multiplyScalar(100);\n bone.quaternion.set(jointTransform.orientation.x, jointTransform.orientation.y, jointTransform.orientation.z, jointTransform.orientation.w);\n }\n }\n },\n\n updateHandDotsModel: function () {\n var frame = this.el.sceneEl.frame;\n var controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n var trackedControlsWebXR = this.el.components['tracked-controls-webxr'];\n var referenceSpace = trackedControlsWebXR.system.referenceSpace;\n var jointEl;\n var object3D;\n var jointPose;\n var i = 0;\n\n for (var inputjoint of controller.hand.values()) {\n jointEl = this.jointEls[i++];\n object3D = jointEl.object3D;\n jointPose = frame.getJointPose(inputjoint, referenceSpace);\n jointEl.object3D.visible = !!jointPose;\n if (!jointPose) { continue; }\n object3D.matrix.elements = jointPose.transform.matrix;\n object3D.matrix.decompose(object3D.position, object3D.rotation, object3D.scale);\n jointEl.setAttribute('scale', {x: jointPose.radius, y: jointPose.radius, z: jointPose.radius});\n }\n },\n\n detectGesture: function () {\n this.detectPinch();\n },\n\n detectPinch: (function () {\n var thumbTipPosition = new THREE.Vector3();\n return function () {\n var frame = this.el.sceneEl.frame;\n var indexTipPosition = this.indexTipPosition;\n var controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n var trackedControlsWebXR = this.el.components['tracked-controls-webxr'];\n var referenceSpace = this.referenceSpace || trackedControlsWebXR.system.referenceSpace;\n var indexTip = controller.hand.get('index-finger-tip');\n var thumbTip = controller.hand.get('thumb-tip');\n if (!indexTip ||\n !thumbTip) { return; }\n var indexTipPose = frame.getJointPose(indexTip, referenceSpace);\n var thumbTipPose = frame.getJointPose(thumbTip, referenceSpace);\n\n if (!indexTipPose || !thumbTipPose) { return; }\n\n thumbTipPosition.copy(thumbTipPose.transform.position);\n indexTipPosition.copy(indexTipPose.transform.position);\n\n var distance = indexTipPosition.distanceTo(thumbTipPosition);\n\n if (distance < PINCH_START_DISTANCE && this.isPinched === false) {\n this.isPinched = true;\n this.pinchEventDetail.position.copy(indexTipPosition).lerp(thumbTipPosition, PINCH_POSITION_INTERPOLATION);\n this.pinchEventDetail.position.y += 1.5;\n this.el.emit('pinchstarted', this.pinchEventDetail);\n }\n\n if (distance > PINCH_END_DISTANCE && this.isPinched === true) {\n this.isPinched = false;\n this.pinchEventDetail.position.copy(indexTipPosition).lerp(thumbTipPosition, PINCH_POSITION_INTERPOLATION);\n this.pinchEventDetail.position.y += 1.5;\n this.el.emit('pinchended', this.pinchEventDetail);\n }\n\n if (this.isPinched) {\n this.pinchEventDetail.position.copy(indexTipPosition).lerp(thumbTipPosition, PINCH_POSITION_INTERPOLATION);\n this.pinchEventDetail.position.y += 1.5;\n this.el.emit('pinchmoved', this.pinchEventDetail);\n }\n\n indexTipPosition.y += 1.5;\n };\n })(),\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n hand: data.hand,\n iterateControllerProfiles: true,\n handTrackingEnabled: true\n });\n this.initDefaultModel();\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n var controller;\n this.checkIfControllerPresent();\n controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n if (!this.el.getObject3D('mesh')) { return; }\n if (!controller || !controller.hand || !controller.hand[0]) {\n this.el.getObject3D('mesh').visible = false;\n }\n },\n\n initDefaultModel: function () {\n if (this.el.getObject3D('mesh')) { return; }\n if (this.data.modelStyle === 'dots') {\n this.initDotsModel();\n }\n\n if (this.data.modelStyle === 'mesh') {\n this.initMeshHandModel();\n }\n },\n\n initDotsModel: function () {\n // Add models just once.\n if (this.jointEls.length !== 0) { return; }\n for (var i = 0; i < JOINTS.length; ++i) {\n var jointEl = this.jointEl = document.createElement('a-entity');\n jointEl.setAttribute('geometry', {\n primitive: 'sphere',\n radius: 1.0\n });\n jointEl.setAttribute('material', {color: this.data.modelColor});\n jointEl.object3D.visible = false;\n this.el.appendChild(jointEl);\n this.jointEls.push(jointEl);\n }\n },\n\n initMeshHandModel: function () {\n var modelURL = this.data.hand === 'left' ? LEFT_HAND_MODEL_URL : RIGHT_HAND_MODEL_URL;\n this.el.setAttribute('gltf-model', modelURL);\n },\n\n onModelLoaded: function () {\n var mesh = this.mesh = this.el.getObject3D('mesh').children[0];\n var skinnedMesh = this.skinnedMesh = mesh.children[24];\n if (!this.skinnedMesh) { return; }\n this.bones = skinnedMesh.skeleton.bones;\n this.el.removeObject3D('mesh');\n mesh.position.set(0, 1.5, 0);\n mesh.rotation.set(0, 0, 0);\n skinnedMesh.frustumCulled = false;\n skinnedMesh.material = new THREE.MeshStandardMaterial({skinning: true, color: this.data.modelColor});\n this.el.setObject3D('mesh', mesh);\n }\n});\n\n\n},{\"../core/component\":131,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],84:[function(_dereq_,module,exports){\n_dereq_('./animation');\n_dereq_('./camera');\n_dereq_('./cursor');\n_dereq_('./daydream-controls');\n_dereq_('./gearvr-controls');\n_dereq_('./geometry');\n_dereq_('./generic-tracked-controller-controls');\n_dereq_('./gltf-model');\n_dereq_('./hand-tracking-controls');\n_dereq_('./hand-controls');\n_dereq_('./layer');\n_dereq_('./laser-controls');\n_dereq_('./light');\n_dereq_('./line');\n_dereq_('./link');\n_dereq_('./look-controls');\n_dereq_('./magicleap-controls');\n_dereq_('./material');\n_dereq_('./obj-model');\n_dereq_('./oculus-go-controls');\n_dereq_('./oculus-touch-controls');\n_dereq_('./position');\n_dereq_('./raycaster');\n_dereq_('./rotation');\n_dereq_('./scale');\n_dereq_('./shadow');\n_dereq_('./sound');\n_dereq_('./text');\n_dereq_('./tracked-controls');\n_dereq_('./tracked-controls-webvr');\n_dereq_('./tracked-controls-webxr');\n_dereq_('./visible');\n_dereq_('./valve-index-controls');\n_dereq_('./vive-controls');\n_dereq_('./vive-focus-controls');\n_dereq_('./wasd-controls');\n_dereq_('./windows-motion-controls');\n\n_dereq_('./scene/background');\n_dereq_('./scene/debug');\n_dereq_('./scene/device-orientation-permission-ui');\n_dereq_('./scene/embedded');\n_dereq_('./scene/inspector');\n_dereq_('./scene/fog');\n_dereq_('./scene/keyboard-shortcuts');\n_dereq_('./scene/pool');\n_dereq_('./scene/screenshot');\n_dereq_('./scene/stats');\n_dereq_('./scene/vr-mode-ui');\n\n},{\"./animation\":74,\"./camera\":75,\"./cursor\":76,\"./daydream-controls\":77,\"./gearvr-controls\":78,\"./generic-tracked-controller-controls\":79,\"./geometry\":80,\"./gltf-model\":81,\"./hand-controls\":82,\"./hand-tracking-controls\":83,\"./laser-controls\":85,\"./layer\":86,\"./light\":87,\"./line\":88,\"./link\":89,\"./look-controls\":90,\"./magicleap-controls\":91,\"./material\":92,\"./obj-model\":93,\"./oculus-go-controls\":94,\"./oculus-touch-controls\":95,\"./position\":96,\"./raycaster\":97,\"./rotation\":98,\"./scale\":99,\"./scene/background\":100,\"./scene/debug\":101,\"./scene/device-orientation-permission-ui\":102,\"./scene/embedded\":103,\"./scene/fog\":104,\"./scene/inspector\":105,\"./scene/keyboard-shortcuts\":106,\"./scene/pool\":107,\"./scene/screenshot\":108,\"./scene/stats\":109,\"./scene/vr-mode-ui\":110,\"./shadow\":111,\"./sound\":112,\"./text\":113,\"./tracked-controls\":116,\"./tracked-controls-webvr\":114,\"./tracked-controls-webxr\":115,\"./valve-index-controls\":117,\"./visible\":118,\"./vive-controls\":119,\"./vive-focus-controls\":120,\"./wasd-controls\":121,\"./windows-motion-controls\":122}],85:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar utils = _dereq_('../utils/');\n\nregisterComponent('laser-controls', {\n schema: {\n hand: {default: 'right'},\n model: {default: true},\n defaultModelColor: {type: 'color', default: 'grey'}\n },\n\n init: function () {\n var config = this.config;\n var data = this.data;\n var el = this.el;\n var self = this;\n var controlsConfiguration = {hand: data.hand, model: data.model};\n\n // Set all controller models.\n el.setAttribute('daydream-controls', controlsConfiguration);\n el.setAttribute('gearvr-controls', controlsConfiguration);\n el.setAttribute('magicleap-controls', controlsConfiguration);\n el.setAttribute('oculus-go-controls', controlsConfiguration);\n el.setAttribute('oculus-touch-controls', controlsConfiguration);\n el.setAttribute('valve-index-controls', controlsConfiguration);\n el.setAttribute('vive-controls', controlsConfiguration);\n el.setAttribute('vive-focus-controls', controlsConfiguration);\n el.setAttribute('windows-motion-controls', controlsConfiguration);\n el.setAttribute('generic-tracked-controller-controls', controlsConfiguration);\n\n // Wait for controller to connect, or have a valid pointing pose, before creating ray\n el.addEventListener('controllerconnected', createRay);\n el.addEventListener('controllerdisconnected', hideRay);\n el.addEventListener('controllermodelready', function (evt) {\n createRay(evt);\n self.modelReady = true;\n });\n\n function createRay (evt) {\n var controllerConfig = config[evt.detail.name];\n\n if (!controllerConfig) { return; }\n\n // Show the line unless a particular config opts to hide it, until a controllermodelready\n // event comes through.\n var raycasterConfig = utils.extend({\n showLine: true\n }, controllerConfig.raycaster || {});\n\n // The controllermodelready event contains a rayOrigin that takes into account\n // offsets specific to the loaded model.\n if (evt.detail.rayOrigin) {\n raycasterConfig.origin = evt.detail.rayOrigin.origin;\n raycasterConfig.direction = evt.detail.rayOrigin.direction;\n raycasterConfig.showLine = true;\n }\n\n // Only apply a default raycaster if it does not yet exist. This prevents it overwriting\n // config applied from a controllermodelready event.\n if (evt.detail.rayOrigin || !self.modelReady) {\n el.setAttribute('raycaster', raycasterConfig);\n } else {\n el.setAttribute('raycaster', 'showLine', true);\n }\n\n el.setAttribute('cursor', utils.extend({\n fuse: false\n }, controllerConfig.cursor));\n }\n\n function hideRay () {\n el.setAttribute('raycaster', 'showLine', false);\n }\n },\n\n config: {\n 'daydream-controls': {\n cursor: {downEvents: ['trackpaddown', 'triggerdown'], upEvents: ['trackpadup', 'triggerup']}\n },\n\n 'gearvr-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']},\n raycaster: {origin: {x: 0, y: 0.0010, z: 0}}\n },\n\n 'generic-tracked-controller-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']}\n },\n\n 'magicleap-controls': {\n cursor: {downEvents: ['trackpaddown', 'triggerdown'], upEvents: ['trackpadup', 'triggerup']}\n },\n\n 'oculus-go-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']},\n raycaster: {origin: {x: 0, y: 0.0005, z: 0}}\n },\n\n 'oculus-touch-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']},\n raycaster: {origin: {x: 0, y: 0, z: 0}}\n },\n\n 'valve-index-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']}\n },\n\n 'vive-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']}\n },\n\n 'vive-focus-controls': {\n cursor: {downEvents: ['trackpaddown', 'triggerdown'], upEvents: ['trackpadup', 'triggerup']}\n },\n\n 'windows-motion-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']},\n raycaster: {showLine: false}\n }\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205}],86:[function(_dereq_,module,exports){\n/* global THREE, XRRigidTransform, XRWebGLBinding */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar utils = _dereq_('../utils/');\nvar warn = utils.debug('components:layer:warn');\n\nmodule.exports.Component = registerComponent('layer', {\n schema: {\n type: {default: 'quad', oneOf: ['quad', 'monocubemap', 'stereocubemap']},\n src: {type: 'map'},\n rotateCubemap: {default: false},\n width: {default: 0},\n height: {default: 0}\n },\n\n init: function () {\n var gl = this.el.sceneEl.renderer.getContext();\n\n this.quaternion = new THREE.Quaternion();\n this.position = new THREE.Vector3();\n\n this.bindMethods();\n this.needsRedraw = false;\n this.frameBuffer = gl.createFramebuffer();\n var requiredFeatures = this.el.sceneEl.getAttribute('webxr').requiredFeatures;\n requiredFeatures.push('layers');\n this.el.sceneEl.getAttribute('webxr', 'requiredFeatures', requiredFeatures);\n this.el.sceneEl.addEventListener('enter-vr', this.onEnterVR);\n this.el.sceneEl.addEventListener('exit-vr', this.onExitVR);\n },\n\n bindMethods: function () {\n this.onRequestedReferenceSpace = this.onRequestedReferenceSpace.bind(this);\n this.onEnterVR = this.onEnterVR.bind(this);\n this.onExitVR = this.onExitVR.bind(this);\n },\n\n update: function (oldData) {\n if (this.data.src !== oldData.src) { this.updateSrc(); }\n },\n\n updateSrc: function () {\n var type = this.data.type;\n this.texture = undefined;\n if (type === 'quad') {\n this.loadQuadImage();\n return;\n }\n\n if (type === 'monocubemap' || type === 'stereocubemap') {\n this.loadCubeMapImages();\n return;\n }\n },\n\n loadCubeMapImages: function () {\n var type = this.data.type;\n var glayer;\n var xrGLFactory = this.xrGLFactory;\n var frame = this.el.sceneEl.frame;\n var src = this.data.src;\n\n this.visibilityChanged = false;\n if (!this.layer) { return; }\n if (!src.complete) {\n this.pendingCubeMapUpdate = true;\n } else {\n this.pendingCubeMapUpdate = false;\n }\n\n if (!this.loadingScreen) {\n this.loadingScreen = true;\n } else {\n this.loadingScreen = false;\n }\n\n if (type === 'monocubemap') {\n glayer = xrGLFactory.getSubImage(this.layer, frame);\n this.loadCubeMapImage(glayer.colorTexture, src, 0);\n } else {\n glayer = xrGLFactory.getSubImage(this.layer, frame, 'left');\n this.loadCubeMapImage(glayer.colorTexture, src, 0);\n glayer = xrGLFactory.getSubImage(this.layer, frame, 'right');\n this.loadCubeMapImage(glayer.colorTexture, src, 6);\n }\n },\n\n loadQuadImage: function () {\n var src = this.data.src;\n var self = this;\n this.el.sceneEl.systems.material.loadTexture(src, {src: src}, function textureLoaded (texture) {\n self.el.sceneEl.renderer.initTexture(texture);\n self.texture = texture;\n if (src.tagName === 'VIDEO') { setTimeout(function () { self.textureIsVideo = true; }, 1000); }\n if (self.layer) {\n self.layer.height = self.data.height / 2 || self.texture.image.height / 1000;\n self.layer.width = self.data.width / 2 || self.texture.image.width / 1000;\n self.needsRedraw = true;\n }\n self.updateQuadPanel();\n });\n },\n\n preGenerateCubeMapTextures: function (src, callback) {\n if (this.data.type === 'monocubemap') {\n this.generateCubeMapTextures(src, 0, callback);\n } else {\n this.generateCubeMapTextures(src, 0, callback);\n this.generateCubeMapTextures(src, 6, callback);\n }\n },\n\n generateCubeMapTextures: function (src, faceOffset, callback) {\n var data = this.data;\n var cubeFaceSize = this.cubeFaceSize;\n var textureSourceCubeFaceSize = Math.min(src.width, src.height);\n var cubefaceTextures = [];\n var imgTmp0;\n var imgTmp2;\n\n for (var i = 0; i < 6; i++) {\n var tempCanvas = document.createElement('CANVAS');\n tempCanvas.width = tempCanvas.height = cubeFaceSize;\n var tempCanvasContext = tempCanvas.getContext('2d');\n\n if (data.rotateCubemap) {\n if (i === 2 || i === 3) {\n tempCanvasContext.save();\n tempCanvasContext.translate(cubeFaceSize, cubeFaceSize);\n tempCanvasContext.rotate(Math.PI);\n }\n }\n\n // Note that this call to drawImage will not only copy the bytes to the\n // canvas but also could resized the image if our cube face size is\n // smaller than the source image due to GL max texture size.\n tempCanvasContext.drawImage(\n src,\n (i + faceOffset) * textureSourceCubeFaceSize, // top left x coord in source\n 0, // top left y coord in source\n textureSourceCubeFaceSize, // x pixel count from source\n textureSourceCubeFaceSize, // y pixel count from source\n 0, // dest x offset in the canvas\n 0, // dest y offset in the canvas\n cubeFaceSize, // x pixel count in dest\n cubeFaceSize // y pixel count in dest\n );\n\n tempCanvasContext.restore();\n\n if (callback) { callback(); }\n cubefaceTextures.push(tempCanvas);\n }\n\n if (data.rotateCubemap) {\n imgTmp0 = cubefaceTextures[0];\n imgTmp2 = cubefaceTextures[1];\n\n cubefaceTextures[0] = imgTmp2;\n cubefaceTextures[1] = imgTmp0;\n\n imgTmp0 = cubefaceTextures[4];\n imgTmp2 = cubefaceTextures[5];\n\n cubefaceTextures[4] = imgTmp2;\n cubefaceTextures[5] = imgTmp0;\n }\n\n if (callback) { callback(); }\n return cubefaceTextures;\n },\n\n loadCubeMapImage: function (layerColorTexture, src, faceOffset) {\n var gl = this.el.sceneEl.renderer.getContext();\n var cubefaceTextures;\n\n // dont flip the pixels as we load them into the texture buffer.\n // TEXTURE_CUBE_MAP expects the Y to be flipped for the faces and it already\n // is flipped in our texture image.\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, layerColorTexture);\n\n if (!src.complete || this.loadingScreen) {\n cubefaceTextures = this.loadingScreenImages;\n } else {\n cubefaceTextures = this.generateCubeMapTextures(src, faceOffset);\n }\n\n var errorCode = 0;\n cubefaceTextures.forEach(function (canvas, i) {\n gl.texSubImage2D(\n gl.TEXTURE_CUBE_MAP_POSITIVE_X + i,\n 0,\n 0, 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n canvas\n );\n errorCode = gl.getError();\n });\n\n if (errorCode !== 0) {\n console.log('renderingError, WebGL Error Code: ' + errorCode);\n }\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);\n },\n\n tick: function () {\n if (!this.el.sceneEl.xrSession) { return; }\n if (!this.layer && this.el.sceneEl.is('vr-mode')) { this.initLayer(); }\n this.updateTransform();\n if (this.data.src.complete && (this.pendingCubeMapUpdate || this.loadingScreen || this.visibilityChanged)) { this.loadCubeMapImages(); }\n if (!this.needsRedraw && !this.layer.needsRedraw && !this.textureIsVideo) { return; }\n if (this.data.type === 'quad') { this.draw(); }\n this.needsRedraw = false;\n },\n\n initLayer: function () {\n var self = this;\n var type = this.data.type;\n\n this.el.sceneEl.xrSession.onvisibilitychange = function (evt) {\n self.visibilityChanged = evt.session.visibilityState !== 'hidden';\n };\n\n if (type === 'quad') {\n this.initQuadLayer();\n return;\n }\n\n if (type === 'monocubemap' || type === 'stereocubemap') {\n this.initCubeMapLayer();\n return;\n }\n },\n\n initQuadLayer: function () {\n var sceneEl = this.el.sceneEl;\n var gl = sceneEl.renderer.getContext();\n var xrGLFactory = this.xrGLFactory = new XRWebGLBinding(sceneEl.xrSession, gl);\n if (!this.texture) { return; }\n this.layer = xrGLFactory.createQuadLayer({\n space: this.referenceSpace,\n viewPixelHeight: 2048,\n viewPixelWidth: 2048,\n height: this.data.height / 2 || this.texture.image.height / 1000,\n width: this.data.width / 2 || this.texture.image.width / 1000\n });\n sceneEl.renderer.xr.addLayer(this.layer);\n },\n\n initCubeMapLayer: function () {\n var src = this.data.src;\n var sceneEl = this.el.sceneEl;\n var gl = sceneEl.renderer.getContext();\n var glSizeLimit = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);\n var cubeFaceSize = this.cubeFaceSize = Math.min(glSizeLimit, Math.min(src.width, src.height));\n var xrGLFactory = this.xrGLFactory = new XRWebGLBinding(sceneEl.xrSession, gl);\n this.layer = xrGLFactory.createCubeLayer({\n space: this.referenceSpace,\n viewPixelWidth: cubeFaceSize,\n viewPixelHeight: cubeFaceSize,\n layout: this.data.type === 'monocubemap' ? 'mono' : 'stereo',\n isStatic: false\n });\n\n this.initLoadingScreenImages();\n this.loadCubeMapImages();\n sceneEl.renderer.xr.addLayer(this.layer);\n },\n\n initLoadingScreenImages: function () {\n var cubeFaceSize = this.cubeFaceSize;\n var loadingScreenImages = this.loadingScreenImages = [];\n for (var i = 0; i < 6; i++) {\n var tempCanvas = document.createElement('CANVAS');\n tempCanvas.width = tempCanvas.height = cubeFaceSize;\n var tempCanvasContext = tempCanvas.getContext('2d');\n tempCanvas.width = tempCanvas.height = cubeFaceSize;\n tempCanvasContext.fillStyle = 'black';\n tempCanvasContext.fillRect(0, 0, cubeFaceSize, cubeFaceSize);\n if (i !== 2 && i !== 3) {\n tempCanvasContext.translate(cubeFaceSize, 0);\n tempCanvasContext.scale(-1, 1);\n tempCanvasContext.fillStyle = 'white';\n tempCanvasContext.font = '30px Arial';\n tempCanvasContext.fillText('Loading', cubeFaceSize / 2, cubeFaceSize / 2);\n }\n loadingScreenImages.push(tempCanvas);\n }\n },\n\n destroyLayer: function () {\n if (!this.layer) { return; }\n this.el.sceneEl.renderer.xr.removeLayer(this.layer);\n this.layer.destroy();\n this.layer = undefined;\n },\n\n toggleCompositorLayer: function () {\n this.enableCompositorLayer(!this.layerEnabled);\n },\n\n enableCompositorLayer: function (enable) {\n this.layerEnabled = enable;\n this.quadPanelEl.object3D.visible = !this.layerEnabled;\n },\n\n updateQuadPanel: function () {\n var quadPanelEl = this.quadPanelEl;\n if (!this.quadPanelEl) {\n quadPanelEl = this.quadPanelEl = document.createElement('a-entity');\n this.el.appendChild(quadPanelEl);\n }\n\n quadPanelEl.setAttribute('material', {\n shader: 'flat',\n src: this.data.src,\n transparent: true\n });\n\n quadPanelEl.setAttribute('geometry', {\n primitive: 'plane',\n height: this.data.height || this.texture.image.height / 1000,\n width: this.data.width || this.texture.image.height / 1000\n });\n },\n\n draw: function () {\n var sceneEl = this.el.sceneEl;\n var gl = this.el.sceneEl.renderer.getContext();\n var glayer = this.xrGLFactory.getSubImage(this.layer, sceneEl.frame);\n var texture = sceneEl.renderer.properties.get(this.texture).__webglTexture;\n var previousFrameBuffer = gl.getParameter(gl.FRAMEBUFFER_BINDING);\n\n gl.viewport(glayer.viewport.x, glayer.viewport.y, glayer.viewport.width, glayer.viewport.height);\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, glayer.colorTexture, 0);\n\n blitTexture(gl, texture, glayer, this.data.src);\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, previousFrameBuffer);\n },\n\n updateTransform: function () {\n var el = this.el;\n var position = this.position;\n var quaternion = this.quaternion;\n el.object3D.updateMatrixWorld();\n position.setFromMatrixPosition(el.object3D.matrixWorld);\n quaternion.setFromRotationMatrix(el.object3D.matrixWorld);\n if (!this.layerEnabled) { position.set(0, 0, 100000000); }\n this.layer.transform = new XRRigidTransform(position, quaternion);\n },\n\n onEnterVR: function () {\n var sceneEl = this.el.sceneEl;\n var xrSession = sceneEl.xrSession;\n if (!sceneEl.hasWebXR || !XRWebGLBinding || !xrSession) {\n warn('The layer component requires WebXR and the layers API enabled');\n return;\n }\n xrSession.requestReferenceSpace('local').then(this.onRequestedReferenceSpace);\n this.needsRedraw = true;\n this.layerEnabled = true;\n if (this.quadPanelEl) {\n this.quadPanelEl.object3D.visible = false;\n }\n if (this.data.src.play) { this.data.src.play(); }\n },\n\n onExitVR: function () {\n if (this.quadPanelEl) {\n this.quadPanelEl.object3D.visible = true;\n }\n this.destroyLayer();\n },\n\n onRequestedReferenceSpace: function (referenceSpace) {\n this.referenceSpace = referenceSpace;\n }\n});\n\nfunction blitTexture (gl, texture, subImage, textureEl) {\n var xrReadFramebuffer = gl.createFramebuffer();\n let x1offset = subImage.viewport.x;\n let y1offset = subImage.viewport.y;\n let x2offset = subImage.viewport.x + subImage.viewport.width;\n let y2offset = subImage.viewport.y + subImage.viewport.height;\n\n // Update video texture.\n if (textureEl.tagName === 'VIDEO') {\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, textureEl.width, textureEl.height, gl.RGB, gl.UNSIGNED_BYTE, textureEl);\n }\n\n // Bind texture to read framebuffer.\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, xrReadFramebuffer);\n gl.framebufferTexture2D(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n\n // Blit into layer buffer.\n gl.readBuffer(gl.COLOR_ATTACHMENT0);\n gl.blitFramebuffer(0, 0, textureEl.width, textureEl.height, x1offset, y1offset, x2offset, y2offset, gl.COLOR_BUFFER_BIT, gl.NEAREST);\n\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, null);\n gl.deleteFramebuffer(xrReadFramebuffer);\n}\n\n},{\"../core/component\":131,\"../utils/\":205}],87:[function(_dereq_,module,exports){\nvar bind = _dereq_('../utils/bind');\nvar diff = _dereq_('../utils').diff;\nvar debug = _dereq_('../utils/debug');\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\nvar warn = debug('components:light:warn');\n\n/**\n * Light component.\n */\nmodule.exports.Component = registerComponent('light', {\n schema: {\n angle: {default: 60, if: {type: ['spot']}},\n color: {type: 'color'},\n groundColor: {type: 'color', if: {type: ['hemisphere']}},\n decay: {default: 1, if: {type: ['point', 'spot']}},\n distance: {default: 0.0, min: 0, if: {type: ['point', 'spot']}},\n intensity: {default: 1.0, min: 0, if: {type: ['ambient', 'directional', 'hemisphere', 'point', 'spot']}},\n penumbra: {default: 0, min: 0, max: 1, if: {type: ['spot']}},\n type: {\n default: 'directional',\n oneOf: ['ambient', 'directional', 'hemisphere', 'point', 'spot'],\n schemaChange: true\n },\n target: {type: 'selector', if: {type: ['spot', 'directional']}},\n\n // Shadows.\n castShadow: {default: false, if: {type: ['point', 'spot', 'directional']}},\n shadowBias: {default: 0, if: {castShadow: true}},\n shadowCameraFar: {default: 500, if: {castShadow: true}},\n shadowCameraFov: {default: 90, if: {castShadow: true}},\n shadowCameraNear: {default: 0.5, if: {castShadow: true}},\n shadowCameraTop: {default: 5, if: {castShadow: true}},\n shadowCameraRight: {default: 5, if: {castShadow: true}},\n shadowCameraBottom: {default: -5, if: {castShadow: true}},\n shadowCameraLeft: {default: -5, if: {castShadow: true}},\n shadowCameraVisible: {default: false, if: {castShadow: true}},\n shadowMapHeight: {default: 512, if: {castShadow: true}},\n shadowMapWidth: {default: 512, if: {castShadow: true}},\n shadowRadius: {default: 1, if: {castShadow: true}}\n },\n\n /**\n * Notifies scene a light has been added to remove default lighting.\n */\n init: function () {\n var el = this.el;\n this.light = null;\n this.defaultTarget = null;\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.system.registerLight(el);\n },\n\n /**\n * (Re)create or update light.\n */\n update: function (oldData) {\n var data = this.data;\n var diffData = diff(data, oldData);\n var light = this.light;\n var rendererSystem = this.rendererSystem;\n var self = this;\n\n // Existing light.\n if (light && !('type' in diffData)) {\n var shadowsLoaded = false;\n // Light type has not changed. Update light.\n Object.keys(diffData).forEach(function (key) {\n var value = data[key];\n\n switch (key) {\n case 'color': {\n light.color.set(value);\n rendererSystem.applyColorCorrection(light.color);\n break;\n }\n\n case 'groundColor': {\n light.groundColor.set(value);\n rendererSystem.applyColorCorrection(light.groundColor);\n break;\n }\n\n case 'angle': {\n light.angle = degToRad(value);\n break;\n }\n\n case 'target': {\n // Reset target if selector is null.\n if (value === null) {\n if (data.type === 'spot' || data.type === 'directional') {\n light.target = self.defaultTarget;\n }\n } else {\n // Target specified, set target to entity's `object3D` when it is loaded.\n if (value.hasLoaded) {\n self.onSetTarget(value, light);\n } else {\n value.addEventListener('loaded', bind(self.onSetTarget, self, value, light));\n }\n }\n break;\n }\n\n case 'castShadow':\n case 'shadowBias':\n case 'shadowCameraFar':\n case 'shadowCameraFov':\n case 'shadowCameraNear':\n case 'shadowCameraTop':\n case 'shadowCameraRight':\n case 'shadowCameraBottom':\n case 'shadowCameraLeft':\n case 'shadowCameraVisible':\n case 'shadowMapHeight':\n case 'shadowMapWidth':\n case 'shadowRadius':\n if (!shadowsLoaded) {\n self.updateShadow();\n shadowsLoaded = true;\n }\n break;\n\n default: {\n light[key] = value;\n }\n }\n });\n return;\n }\n\n // No light yet or light type has changed. Create and add light.\n this.setLight(this.data);\n this.updateShadow();\n },\n\n setLight: function (data) {\n var el = this.el;\n var newLight = this.getLight(data);\n if (newLight) {\n if (this.light) {\n el.removeObject3D('light');\n }\n\n this.light = newLight;\n this.light.el = el;\n el.setObject3D('light', this.light);\n\n // HACK solution for issue #1624\n if (data.type === 'spot' || data.type === 'directional' || data.type === 'hemisphere') {\n el.getObject3D('light').translateY(-1);\n }\n\n // set and position default lighttarget as a child to enable spotlight orientation\n if (data.type === 'spot') {\n el.setObject3D('light-target', this.defaultTarget);\n el.getObject3D('light-target').position.set(0, 0, -1);\n }\n }\n },\n\n /**\n * Updates shadow-related properties on the current light.\n */\n updateShadow: function () {\n var el = this.el;\n var data = this.data;\n var light = this.light;\n\n light.castShadow = data.castShadow;\n\n // Shadow camera helper.\n var cameraHelper = el.getObject3D('cameraHelper');\n if (data.shadowCameraVisible && !cameraHelper) {\n el.setObject3D('cameraHelper', new THREE.CameraHelper(light.shadow.camera));\n } else if (!data.shadowCameraVisible && cameraHelper) {\n el.removeObject3D('cameraHelper');\n }\n\n if (!data.castShadow) { return light; }\n\n // Shadow appearance.\n light.shadow.bias = data.shadowBias;\n light.shadow.radius = data.shadowRadius;\n light.shadow.mapSize.height = data.shadowMapHeight;\n light.shadow.mapSize.width = data.shadowMapWidth;\n\n // Shadow camera.\n light.shadow.camera.near = data.shadowCameraNear;\n light.shadow.camera.far = data.shadowCameraFar;\n if (light.shadow.camera instanceof THREE.OrthographicCamera) {\n light.shadow.camera.top = data.shadowCameraTop;\n light.shadow.camera.right = data.shadowCameraRight;\n light.shadow.camera.bottom = data.shadowCameraBottom;\n light.shadow.camera.left = data.shadowCameraLeft;\n } else {\n light.shadow.camera.fov = data.shadowCameraFov;\n }\n light.shadow.camera.updateProjectionMatrix();\n\n if (cameraHelper) { cameraHelper.update(); }\n },\n\n /**\n * Creates a new three.js light object given data object defining the light.\n *\n * @param {object} data\n */\n getLight: function (data) {\n var angle = data.angle;\n var color = new THREE.Color(data.color);\n this.rendererSystem.applyColorCorrection(color);\n color = color.getHex();\n var decay = data.decay;\n var distance = data.distance;\n var groundColor = new THREE.Color(data.groundColor);\n this.rendererSystem.applyColorCorrection(groundColor);\n groundColor = groundColor.getHex();\n var intensity = data.intensity;\n var type = data.type;\n var target = data.target;\n var light = null;\n\n switch (type.toLowerCase()) {\n case 'ambient': {\n return new THREE.AmbientLight(color, intensity);\n }\n\n case 'directional': {\n light = new THREE.DirectionalLight(color, intensity);\n this.defaultTarget = light.target;\n if (target) {\n if (target.hasLoaded) {\n this.onSetTarget(target, light);\n } else {\n target.addEventListener('loaded', bind(this.onSetTarget, this, target, light));\n }\n }\n return light;\n }\n\n case 'hemisphere': {\n return new THREE.HemisphereLight(color, groundColor, intensity);\n }\n\n case 'point': {\n return new THREE.PointLight(color, intensity, distance, decay);\n }\n\n case 'spot': {\n light = new THREE.SpotLight(color, intensity, distance, degToRad(angle), data.penumbra, decay);\n this.defaultTarget = light.target;\n if (target) {\n if (target.hasLoaded) {\n this.onSetTarget(target, light);\n } else {\n target.addEventListener('loaded', bind(this.onSetTarget, this, target, light));\n }\n }\n return light;\n }\n\n default: {\n warn('%s is not a valid light type. ' +\n 'Choose from ambient, directional, hemisphere, point, spot.', type);\n }\n }\n },\n\n onSetTarget: function (targetEl, light) {\n light.target = targetEl.object3D;\n },\n\n /**\n * Remove light on remove (callback).\n */\n remove: function () {\n var el = this.el;\n el.removeObject3D('light');\n if (el.getObject3D('cameraHelper')) {\n el.removeObject3D('cameraHelper');\n }\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils\":205,\"../utils/bind\":199,\"../utils/debug\":201}],88:[function(_dereq_,module,exports){\n/* global THREE */\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nmodule.exports.Component = registerComponent('line', {\n schema: {\n start: {type: 'vec3', default: {x: 0, y: 0, z: 0}},\n end: {type: 'vec3', default: {x: 0, y: 0, z: 0}},\n color: {type: 'color', default: '#74BEC1'},\n opacity: {type: 'number', default: 1},\n visible: {default: true}\n },\n\n multiple: true,\n\n init: function () {\n var data = this.data;\n var geometry;\n var material;\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n material = this.material = new THREE.LineBasicMaterial({\n color: data.color,\n opacity: data.opacity,\n transparent: data.opacity < 1,\n visible: data.visible\n });\n geometry = this.geometry = new THREE.BufferGeometry();\n geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(2 * 3), 3));\n\n this.rendererSystem.applyColorCorrection(material.color);\n this.line = new THREE.Line(geometry, material);\n this.el.setObject3D(this.attrName, this.line);\n },\n\n update: function (oldData) {\n var data = this.data;\n var geometry = this.geometry;\n var geoNeedsUpdate = false;\n var material = this.material;\n var positionArray = geometry.attributes.position.array;\n\n // Update geometry.\n if (!isEqualVec3(data.start, oldData.start)) {\n positionArray[0] = data.start.x;\n positionArray[1] = data.start.y;\n positionArray[2] = data.start.z;\n geoNeedsUpdate = true;\n }\n\n if (!isEqualVec3(data.end, oldData.end)) {\n positionArray[3] = data.end.x;\n positionArray[4] = data.end.y;\n positionArray[5] = data.end.z;\n geoNeedsUpdate = true;\n }\n\n if (geoNeedsUpdate) {\n geometry.attributes.position.needsUpdate = true;\n geometry.computeBoundingSphere();\n }\n\n material.color.setStyle(data.color);\n this.rendererSystem.applyColorCorrection(material.color);\n material.opacity = data.opacity;\n material.transparent = data.opacity < 1;\n material.visible = data.visible;\n },\n\n remove: function () {\n this.el.removeObject3D('line', this.line);\n }\n});\n\nfunction isEqualVec3 (a, b) {\n if (!a || !b) { return false; }\n return (a.x === b.x && a.y === b.y && a.z === b.z);\n}\n\n},{\"../core/component\":131}],89:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar registerShader = _dereq_('../core/shader').registerShader;\nvar THREE = _dereq_('../lib/three');\n\n/**\n * Link component. Connect experiences and traverse between them in VR\n *\n * @member {object} hiddenEls - Store the hidden elements during peek mode.\n */\nmodule.exports.Component = registerComponent('link', {\n schema: {\n backgroundColor: {default: 'red', type: 'color'},\n borderColor: {default: 'white', type: 'color'},\n highlighted: {default: false},\n highlightedColor: {default: '#24CAFF', type: 'color'},\n href: {default: ''},\n image: {type: 'asset'},\n on: {default: 'click'},\n peekMode: {default: false},\n title: {default: ''},\n titleColor: {default: 'white', type: 'color'},\n visualAspectEnabled: {default: false}\n },\n\n init: function () {\n this.navigate = this.navigate.bind(this);\n this.previousQuaternion = undefined;\n this.quaternionClone = new THREE.Quaternion();\n // Store hidden elements during peek mode so we can show them again later.\n this.hiddenEls = [];\n },\n\n update: function (oldData) {\n var data = this.data;\n var el = this.el;\n var backgroundColor;\n var strokeColor;\n\n if (!data.visualAspectEnabled) { return; }\n\n this.initVisualAspect();\n\n backgroundColor = data.highlighted ? data.highlightedColor : data.backgroundColor;\n strokeColor = data.highlighted ? data.highlightedColor : data.borderColor;\n el.setAttribute('material', 'backgroundColor', backgroundColor);\n el.setAttribute('material', 'strokeColor', strokeColor);\n\n if (data.on !== oldData.on) { this.updateEventListener(); }\n\n if (oldData.peekMode !== undefined &&\n data.peekMode !== oldData.peekMode) { this.updatePeekMode(); }\n\n if (!data.image || oldData.image === data.image) { return; }\n\n el.setAttribute('material', 'pano',\n typeof data.image === 'string' ? data.image : data.image.src);\n },\n\n /*\n * Toggle all elements and full 360 preview of the linked page.\n */\n updatePeekMode: function () {\n var el = this.el;\n var sphereEl = this.sphereEl;\n if (this.data.peekMode) {\n this.hideAll();\n el.getObject3D('mesh').visible = false;\n sphereEl.setAttribute('visible', true);\n } else {\n this.showAll();\n el.getObject3D('mesh').visible = true;\n sphereEl.setAttribute('visible', false);\n }\n },\n\n play: function () {\n this.updateEventListener();\n },\n\n pause: function () {\n this.removeEventListener();\n },\n\n updateEventListener: function () {\n var el = this.el;\n if (!el.isPlaying) { return; }\n this.removeEventListener();\n el.addEventListener(this.data.on, this.navigate);\n },\n\n removeEventListener: function () {\n var on = this.data.on;\n if (!on) { return; }\n this.el.removeEventListener(on, this.navigate);\n },\n\n initVisualAspect: function () {\n var el = this.el;\n var semiSphereEl;\n var sphereEl;\n var textEl;\n\n if (!this.data.visualAspectEnabled || this.visualAspectInitialized) { return; }\n\n textEl = this.textEl = this.textEl || document.createElement('a-entity');\n sphereEl = this.sphereEl = this.sphereEl || document.createElement('a-entity');\n semiSphereEl = this.semiSphereEl = this.semiSphereEl || document.createElement('a-entity');\n\n // Set portal.\n el.setAttribute('geometry', {primitive: 'circle', radius: 1.0, segments: 64});\n el.setAttribute('material', {shader: 'portal', pano: this.data.image, side: 'double'});\n\n // Set text that displays the link title and URL.\n textEl.setAttribute('text', {\n color: this.data.titleColor,\n align: 'center',\n font: 'kelsonsans',\n value: this.data.title || this.data.href,\n width: 4\n });\n textEl.setAttribute('position', '0 1.5 0');\n el.appendChild(textEl);\n\n // Set sphere rendered when camera is close to portal to allow user to peek inside.\n semiSphereEl.setAttribute('geometry', {\n primitive: 'sphere',\n radius: 1.0,\n phiStart: 0,\n segmentsWidth: 64,\n segmentsHeight: 64,\n phiLength: 180,\n thetaStart: 0,\n thetaLength: 360\n });\n semiSphereEl.setAttribute('material', {\n shader: 'portal',\n borderEnabled: 0.0,\n pano: this.data.image,\n side: 'back'\n });\n semiSphereEl.setAttribute('rotation', '0 180 0');\n semiSphereEl.setAttribute('position', '0 0 0');\n semiSphereEl.setAttribute('visible', false);\n el.appendChild(semiSphereEl);\n\n // Set sphere rendered when camera is close to portal to allow user to peek inside.\n sphereEl.setAttribute('geometry', {\n primitive: 'sphere',\n radius: 10,\n segmentsWidth: 64,\n segmentsHeight: 64\n });\n sphereEl.setAttribute('material', {\n shader: 'portal',\n borderEnabled: 0.0,\n pano: this.data.image,\n side: 'back'\n });\n sphereEl.setAttribute('visible', false);\n el.appendChild(sphereEl);\n\n this.visualAspectInitialized = true;\n },\n\n navigate: function () {\n window.location = this.data.href;\n },\n\n /**\n * 1. Swap plane that represents portal with sphere with a hole when the camera is close\n * so user can peek inside portal. Sphere is rendered on oposite side of portal\n * from where user enters.\n * 2. Place the url/title above or inside portal depending on distance to camera.\n * 3. Face portal to camera when far away from user.\n */\n tick: (function () {\n var cameraWorldPosition = new THREE.Vector3();\n var elWorldPosition = new THREE.Vector3();\n var quaternion = new THREE.Quaternion();\n var scale = new THREE.Vector3();\n\n return function () {\n var el = this.el;\n var object3D = el.object3D;\n var camera = el.sceneEl.camera;\n var cameraPortalOrientation;\n var distance;\n var textEl = this.textEl;\n\n if (!this.data.visualAspectEnabled) { return; }\n\n // Update matrices\n object3D.updateMatrixWorld();\n camera.parent.updateMatrixWorld();\n camera.updateMatrixWorld();\n\n object3D.matrix.decompose(elWorldPosition, quaternion, scale);\n elWorldPosition.setFromMatrixPosition(object3D.matrixWorld);\n cameraWorldPosition.setFromMatrixPosition(camera.matrixWorld);\n distance = elWorldPosition.distanceTo(cameraWorldPosition);\n\n if (distance > 20) {\n // Store original orientation to be restored when the portal stops facing the camera.\n if (!this.previousQuaternion) {\n this.quaternionClone.copy(quaternion);\n this.previousQuaternion = this.quaternionClone;\n }\n // If the portal is far away from the user, face portal to camera.\n object3D.lookAt(cameraWorldPosition);\n } else {\n // When portal is close to the user/camera.\n cameraPortalOrientation = this.calculateCameraPortalOrientation();\n // If user gets very close to portal, replace with holed sphere they can peek in.\n if (distance < 0.5) {\n // Configure text size and sphere orientation depending side user approaches portal.\n if (this.semiSphereEl.getAttribute('visible') === true) { return; }\n textEl.setAttribute('text', 'width', 1.5);\n if (cameraPortalOrientation <= 0.0) {\n textEl.setAttribute('position', '0 0 0.75');\n textEl.setAttribute('rotation', '0 180 0');\n this.semiSphereEl.setAttribute('rotation', '0 0 0');\n } else {\n textEl.setAttribute('position', '0 0 -0.75');\n textEl.setAttribute('rotation', '0 0 0');\n this.semiSphereEl.setAttribute('rotation', '0 180 0');\n }\n el.getObject3D('mesh').visible = false;\n this.semiSphereEl.setAttribute('visible', true);\n this.peekCameraPortalOrientation = cameraPortalOrientation;\n } else {\n // Calculate wich side the camera is approaching the camera (back / front).\n // Adjust text orientation based on camera position.\n if (cameraPortalOrientation <= 0.0) {\n textEl.setAttribute('rotation', '0 180 0');\n } else {\n textEl.setAttribute('rotation', '0 0 0');\n }\n textEl.setAttribute('text', 'width', 5);\n textEl.setAttribute('position', '0 1.5 0');\n el.getObject3D('mesh').visible = true;\n this.semiSphereEl.setAttribute('visible', false);\n this.peekCameraPortalOrientation = undefined;\n }\n if (this.previousQuaternion) {\n object3D.quaternion.copy(this.previousQuaternion);\n this.previousQuaternion = undefined;\n }\n }\n };\n })(),\n\n hideAll: function () {\n var el = this.el;\n var hiddenEls = this.hiddenEls;\n var self = this;\n if (hiddenEls.length > 0) { return; }\n el.sceneEl.object3D.traverse(function (object) {\n if (object && object.el && object.el.hasAttribute('link-controls')) { return; }\n if (!object.el || object === el.sceneEl.object3D || object.el === el ||\n object.el === self.sphereEl || object.el === el.sceneEl.cameraEl ||\n object.el.getAttribute('visible') === false || object.el === self.textEl ||\n object.el === self.semiSphereEl) {\n return;\n }\n object.el.setAttribute('visible', false);\n hiddenEls.push(object.el);\n });\n },\n\n showAll: function () {\n this.hiddenEls.forEach(function (el) { el.setAttribute('visible', true); });\n this.hiddenEls = [];\n },\n\n /**\n * Calculate whether the camera faces the front or back face of the portal.\n * @returns {number} > 0 if camera faces front of portal, < 0 if it faces back of portal.\n */\n calculateCameraPortalOrientation: (function () {\n var mat4 = new THREE.Matrix4();\n var cameraPosition = new THREE.Vector3();\n var portalNormal = new THREE.Vector3(0, 0, 1);\n var portalPosition = new THREE.Vector3(0, 0, 0);\n\n return function () {\n var el = this.el;\n var camera = el.sceneEl.camera;\n\n // Reset tmp variables.\n cameraPosition.set(0, 0, 0);\n portalNormal.set(0, 0, 1);\n portalPosition.set(0, 0, 0);\n\n // Apply portal orientation to the normal.\n el.object3D.matrixWorld.extractRotation(mat4);\n portalNormal.applyMatrix4(mat4);\n\n // Calculate portal world position.\n el.object3D.updateMatrixWorld();\n el.object3D.localToWorld(portalPosition);\n\n // Calculate camera world position.\n camera.parent.parent.updateMatrixWorld();\n camera.parent.updateMatrixWorld();\n camera.updateMatrixWorld();\n camera.localToWorld(cameraPosition);\n\n // Calculate vector from portal to camera.\n // (portal) -------> (camera)\n cameraPosition.sub(portalPosition).normalize();\n portalNormal.normalize();\n\n // Side where camera approaches portal is given by sign of dot product of portal normal\n // and portal to camera vectors.\n return Math.sign(portalNormal.dot(cameraPosition));\n };\n })(),\n\n remove: function () {\n this.removeEventListener();\n }\n});\n\n/* eslint-disable */\nregisterShader('portal', {\n schema: {\n borderEnabled: {default: 1.0, type: 'int', is: 'uniform'},\n backgroundColor: {default: 'red', type: 'color', is: 'uniform'},\n pano: {type: 'map', is: 'uniform'},\n strokeColor: {default: 'white', type: 'color', is: 'uniform'}\n },\n\n vertexShader: [\n 'vec3 portalPosition;',\n 'varying vec3 vWorldPosition;',\n 'varying float vDistanceToCenter;',\n 'varying float vDistance;',\n 'void main() {',\n 'vDistanceToCenter = clamp(length(position - vec3(0.0, 0.0, 0.0)), 0.0, 1.0);',\n 'portalPosition = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;',\n 'vDistance = length(portalPosition - cameraPosition);',\n 'vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;',\n 'gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n '}'\n ].join('\\n'),\n\n fragmentShader: [\n '#define RECIPROCAL_PI2 0.15915494',\n 'uniform sampler2D pano;',\n 'uniform vec3 strokeColor;',\n 'uniform vec3 backgroundColor;',\n 'uniform float borderEnabled;',\n 'varying float vDistanceToCenter;',\n 'varying float vDistance;',\n 'varying vec3 vWorldPosition;',\n 'void main() {',\n 'vec3 direction = normalize(vWorldPosition - cameraPosition);',\n 'vec2 sampleUV;',\n 'float borderThickness = clamp(exp(-vDistance / 50.0), 0.6, 0.95);',\n 'sampleUV.y = clamp(direction.y * 0.5 + 0.5, 0.0, 1.0);',\n 'sampleUV.x = atan(direction.z, -direction.x) * -RECIPROCAL_PI2 + 0.5;',\n 'if (vDistanceToCenter > borderThickness && borderEnabled == 1.0) {',\n 'gl_FragColor = vec4(strokeColor, 1.0);',\n '} else {',\n 'gl_FragColor = mix(texture2D(pano, sampleUV), vec4(backgroundColor, 1.0), clamp(pow((vDistance / 15.0), 2.0), 0.0, 1.0));',\n '}',\n '}'\n ].join('\\n')\n});\n/* eslint-enable */\n\n},{\"../core/component\":131,\"../core/shader\":141,\"../lib/three\":179}],90:[function(_dereq_,module,exports){\n/* global DeviceOrientationEvent */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\nvar bind = utils.bind;\n\n// To avoid recalculation at every mouse movement tick\nvar PI_2 = Math.PI / 2;\n\n/**\n * look-controls. Update entity pose, factoring mouse, touch, and WebVR API data.\n */\nmodule.exports.Component = registerComponent('look-controls', {\n dependencies: ['position', 'rotation'],\n\n schema: {\n enabled: {default: true},\n magicWindowTrackingEnabled: {default: true},\n pointerLockEnabled: {default: false},\n reverseMouseDrag: {default: false},\n reverseTouchDrag: {default: false},\n touchEnabled: {default: true},\n mouseEnabled: {default: true}\n },\n\n init: function () {\n this.deltaYaw = 0;\n this.previousHMDPosition = new THREE.Vector3();\n this.hmdQuaternion = new THREE.Quaternion();\n this.magicWindowAbsoluteEuler = new THREE.Euler();\n this.magicWindowDeltaEuler = new THREE.Euler();\n this.position = new THREE.Vector3();\n this.magicWindowObject = new THREE.Object3D();\n this.rotation = {};\n this.deltaRotation = {};\n this.savedPose = null;\n this.pointerLocked = false;\n this.setupMouseControls();\n this.bindMethods();\n this.previousMouseEvent = {};\n\n this.setupMagicWindowControls();\n\n // To save / restore camera pose\n this.savedPose = {\n position: new THREE.Vector3(),\n rotation: new THREE.Euler()\n };\n\n // Call enter VR handler if the scene has entered VR before the event listeners attached.\n if (this.el.sceneEl.is('vr-mode')) { this.onEnterVR(); }\n },\n\n setupMagicWindowControls: function () {\n var magicWindowControls;\n var data = this.data;\n\n // Only on mobile devices and only enabled if DeviceOrientation permission has been granted.\n if (utils.device.isMobile()) {\n magicWindowControls = this.magicWindowControls = new THREE.DeviceOrientationControls(this.magicWindowObject);\n if (typeof DeviceOrientationEvent !== 'undefined' && DeviceOrientationEvent.requestPermission) {\n magicWindowControls.enabled = false;\n if (this.el.sceneEl.components['device-orientation-permission-ui'].permissionGranted) {\n magicWindowControls.enabled = data.magicWindowTrackingEnabled;\n } else {\n this.el.sceneEl.addEventListener('deviceorientationpermissiongranted', function () {\n magicWindowControls.enabled = data.magicWindowTrackingEnabled;\n });\n }\n }\n }\n },\n\n update: function (oldData) {\n var data = this.data;\n\n // Disable grab cursor classes if no longer enabled.\n if (data.enabled !== oldData.enabled) {\n this.updateGrabCursor(data.enabled);\n }\n\n // Reset magic window eulers if tracking is disabled.\n if (oldData && !data.magicWindowTrackingEnabled && oldData.magicWindowTrackingEnabled) {\n this.magicWindowAbsoluteEuler.set(0, 0, 0);\n this.magicWindowDeltaEuler.set(0, 0, 0);\n }\n\n // Pass on magic window tracking setting to magicWindowControls.\n if (this.magicWindowControls) {\n this.magicWindowControls.enabled = data.magicWindowTrackingEnabled;\n }\n\n if (oldData && !data.pointerLockEnabled !== oldData.pointerLockEnabled) {\n this.removeEventListeners();\n this.addEventListeners();\n if (this.pointerLocked) { this.exitPointerLock(); }\n }\n },\n\n tick: function (t) {\n var data = this.data;\n if (!data.enabled) { return; }\n this.updateOrientation();\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n if (this.pointerLocked) { this.exitPointerLock(); }\n },\n\n remove: function () {\n this.removeEventListeners();\n if (this.pointerLocked) { this.exitPointerLock(); }\n },\n\n bindMethods: function () {\n this.onMouseDown = bind(this.onMouseDown, this);\n this.onMouseMove = bind(this.onMouseMove, this);\n this.onMouseUp = bind(this.onMouseUp, this);\n this.onTouchStart = bind(this.onTouchStart, this);\n this.onTouchMove = bind(this.onTouchMove, this);\n this.onTouchEnd = bind(this.onTouchEnd, this);\n this.onEnterVR = bind(this.onEnterVR, this);\n this.onExitVR = bind(this.onExitVR, this);\n this.onPointerLockChange = bind(this.onPointerLockChange, this);\n this.onPointerLockError = bind(this.onPointerLockError, this);\n },\n\n /**\n * Set up states and Object3Ds needed to store rotation data.\n */\n setupMouseControls: function () {\n this.mouseDown = false;\n this.pitchObject = new THREE.Object3D();\n this.yawObject = new THREE.Object3D();\n this.yawObject.position.y = 10;\n this.yawObject.add(this.pitchObject);\n },\n\n /**\n * Add mouse and touch event listeners to canvas.\n */\n addEventListeners: function () {\n var sceneEl = this.el.sceneEl;\n var canvasEl = sceneEl.canvas;\n\n // Wait for canvas to load.\n if (!canvasEl) {\n sceneEl.addEventListener('render-target-loaded', bind(this.addEventListeners, this));\n return;\n }\n\n // Mouse events.\n canvasEl.addEventListener('mousedown', this.onMouseDown, false);\n window.addEventListener('mousemove', this.onMouseMove, false);\n window.addEventListener('mouseup', this.onMouseUp, false);\n\n // Touch events.\n canvasEl.addEventListener('touchstart', this.onTouchStart);\n window.addEventListener('touchmove', this.onTouchMove);\n window.addEventListener('touchend', this.onTouchEnd);\n\n // sceneEl events.\n sceneEl.addEventListener('enter-vr', this.onEnterVR);\n sceneEl.addEventListener('exit-vr', this.onExitVR);\n\n // Pointer Lock events.\n if (this.data.pointerLockEnabled) {\n document.addEventListener('pointerlockchange', this.onPointerLockChange, false);\n document.addEventListener('mozpointerlockchange', this.onPointerLockChange, false);\n document.addEventListener('pointerlockerror', this.onPointerLockError, false);\n }\n },\n\n /**\n * Remove mouse and touch event listeners from canvas.\n */\n removeEventListeners: function () {\n var sceneEl = this.el.sceneEl;\n var canvasEl = sceneEl && sceneEl.canvas;\n\n if (!canvasEl) { return; }\n\n // Mouse events.\n canvasEl.removeEventListener('mousedown', this.onMouseDown);\n window.removeEventListener('mousemove', this.onMouseMove);\n window.removeEventListener('mouseup', this.onMouseUp);\n\n // Touch events.\n canvasEl.removeEventListener('touchstart', this.onTouchStart);\n window.removeEventListener('touchmove', this.onTouchMove);\n window.removeEventListener('touchend', this.onTouchEnd);\n\n // sceneEl events.\n sceneEl.removeEventListener('enter-vr', this.onEnterVR);\n sceneEl.removeEventListener('exit-vr', this.onExitVR);\n\n // Pointer Lock events.\n document.removeEventListener('pointerlockchange', this.onPointerLockChange, false);\n document.removeEventListener('mozpointerlockchange', this.onPointerLockChange, false);\n document.removeEventListener('pointerlockerror', this.onPointerLockError, false);\n },\n\n /**\n * Update orientation for mobile, mouse drag, and headset.\n * Mouse-drag only enabled if HMD is not active.\n */\n updateOrientation: (function () {\n var poseMatrix = new THREE.Matrix4();\n\n return function () {\n var object3D = this.el.object3D;\n var pitchObject = this.pitchObject;\n var yawObject = this.yawObject;\n var pose;\n var sceneEl = this.el.sceneEl;\n\n // In VR mode, THREE is in charge of updating the camera pose.\n if (sceneEl.is('vr-mode') && sceneEl.checkHeadsetConnected()) {\n // With WebXR THREE applies headset pose to the object3D matrixWorld internally.\n // Reflect values back on position, rotation, scale for getAttribute to return the expected values.\n if (sceneEl.hasWebXR) {\n pose = sceneEl.renderer.xr.getCameraPose();\n if (pose) {\n poseMatrix.elements = pose.transform.matrix;\n poseMatrix.decompose(object3D.position, object3D.rotation, object3D.scale);\n }\n }\n return;\n }\n\n this.updateMagicWindowOrientation();\n\n // On mobile, do camera rotation with touch events and sensors.\n object3D.rotation.x = this.magicWindowDeltaEuler.x + pitchObject.rotation.x;\n object3D.rotation.y = this.magicWindowDeltaEuler.y + yawObject.rotation.y;\n object3D.rotation.z = this.magicWindowDeltaEuler.z;\n };\n })(),\n\n updateMagicWindowOrientation: function () {\n var magicWindowAbsoluteEuler = this.magicWindowAbsoluteEuler;\n var magicWindowDeltaEuler = this.magicWindowDeltaEuler;\n // Calculate magic window HMD quaternion.\n if (this.magicWindowControls && this.magicWindowControls.enabled) {\n this.magicWindowControls.update();\n magicWindowAbsoluteEuler.setFromQuaternion(this.magicWindowObject.quaternion, 'YXZ');\n if (!this.previousMagicWindowYaw && magicWindowAbsoluteEuler.y !== 0) {\n this.previousMagicWindowYaw = magicWindowAbsoluteEuler.y;\n }\n if (this.previousMagicWindowYaw) {\n magicWindowDeltaEuler.x = magicWindowAbsoluteEuler.x;\n magicWindowDeltaEuler.y += magicWindowAbsoluteEuler.y - this.previousMagicWindowYaw;\n magicWindowDeltaEuler.z = magicWindowAbsoluteEuler.z;\n this.previousMagicWindowYaw = magicWindowAbsoluteEuler.y;\n }\n }\n },\n\n /**\n * Translate mouse drag into rotation.\n *\n * Dragging up and down rotates the camera around the X-axis (yaw).\n * Dragging left and right rotates the camera around the Y-axis (pitch).\n */\n onMouseMove: function (evt) {\n var direction;\n var movementX;\n var movementY;\n var pitchObject = this.pitchObject;\n var previousMouseEvent = this.previousMouseEvent;\n var yawObject = this.yawObject;\n\n // Not dragging or not enabled.\n if (!this.data.enabled || (!this.mouseDown && !this.pointerLocked)) { return; }\n\n // Calculate delta.\n if (this.pointerLocked) {\n movementX = evt.movementX || evt.mozMovementX || 0;\n movementY = evt.movementY || evt.mozMovementY || 0;\n } else {\n movementX = evt.screenX - previousMouseEvent.screenX;\n movementY = evt.screenY - previousMouseEvent.screenY;\n }\n this.previousMouseEvent.screenX = evt.screenX;\n this.previousMouseEvent.screenY = evt.screenY;\n\n // Calculate rotation.\n direction = this.data.reverseMouseDrag ? 1 : -1;\n yawObject.rotation.y += movementX * 0.002 * direction;\n pitchObject.rotation.x += movementY * 0.002 * direction;\n pitchObject.rotation.x = Math.max(-PI_2, Math.min(PI_2, pitchObject.rotation.x));\n },\n\n /**\n * Register mouse down to detect mouse drag.\n */\n onMouseDown: function (evt) {\n var sceneEl = this.el.sceneEl;\n if (!this.data.enabled || !this.data.mouseEnabled || (sceneEl.is('vr-mode') && sceneEl.checkHeadsetConnected())) { return; }\n // Handle only primary button.\n if (evt.button !== 0) { return; }\n\n var canvasEl = sceneEl && sceneEl.canvas;\n\n this.mouseDown = true;\n this.previousMouseEvent.screenX = evt.screenX;\n this.previousMouseEvent.screenY = evt.screenY;\n this.showGrabbingCursor();\n\n if (this.data.pointerLockEnabled && !this.pointerLocked) {\n if (canvasEl.requestPointerLock) {\n canvasEl.requestPointerLock();\n } else if (canvasEl.mozRequestPointerLock) {\n canvasEl.mozRequestPointerLock();\n }\n }\n },\n\n /**\n * Shows grabbing cursor on scene\n */\n showGrabbingCursor: function () {\n this.el.sceneEl.canvas.style.cursor = 'grabbing';\n },\n\n /**\n * Hides grabbing cursor on scene\n */\n hideGrabbingCursor: function () {\n this.el.sceneEl.canvas.style.cursor = '';\n },\n\n /**\n * Register mouse up to detect release of mouse drag.\n */\n onMouseUp: function () {\n this.mouseDown = false;\n this.hideGrabbingCursor();\n },\n\n /**\n * Register touch down to detect touch drag.\n */\n onTouchStart: function (evt) {\n if (evt.touches.length !== 1 ||\n !this.data.touchEnabled ||\n this.el.sceneEl.is('vr-mode')) { return; }\n this.touchStart = {\n x: evt.touches[0].pageX,\n y: evt.touches[0].pageY\n };\n this.touchStarted = true;\n },\n\n /**\n * Translate touch move to Y-axis rotation.\n */\n onTouchMove: function (evt) {\n var direction;\n var canvas = this.el.sceneEl.canvas;\n var deltaY;\n var yawObject = this.yawObject;\n\n if (!this.touchStarted || !this.data.touchEnabled) { return; }\n\n deltaY = 2 * Math.PI * (evt.touches[0].pageX - this.touchStart.x) / canvas.clientWidth;\n\n direction = this.data.reverseTouchDrag ? 1 : -1;\n // Limit touch orientaion to to yaw (y axis).\n yawObject.rotation.y -= deltaY * 0.5 * direction;\n this.touchStart = {\n x: evt.touches[0].pageX,\n y: evt.touches[0].pageY\n };\n },\n\n /**\n * Register touch end to detect release of touch drag.\n */\n onTouchEnd: function () {\n this.touchStarted = false;\n },\n\n /**\n * Save pose.\n */\n onEnterVR: function () {\n var sceneEl = this.el.sceneEl;\n if (!sceneEl.checkHeadsetConnected()) { return; }\n this.saveCameraPose();\n this.el.object3D.position.set(0, 0, 0);\n this.el.object3D.rotation.set(0, 0, 0);\n if (sceneEl.hasWebXR) {\n this.el.object3D.matrixAutoUpdate = false;\n this.el.object3D.updateMatrix();\n }\n },\n\n /**\n * Restore the pose.\n */\n onExitVR: function () {\n if (!this.el.sceneEl.checkHeadsetConnected()) { return; }\n this.restoreCameraPose();\n this.previousHMDPosition.set(0, 0, 0);\n this.el.object3D.matrixAutoUpdate = true;\n },\n\n /**\n * Update Pointer Lock state.\n */\n onPointerLockChange: function () {\n this.pointerLocked = !!(document.pointerLockElement || document.mozPointerLockElement);\n },\n\n /**\n * Recover from Pointer Lock error.\n */\n onPointerLockError: function () {\n this.pointerLocked = false;\n },\n\n // Exits pointer-locked mode.\n exitPointerLock: function () {\n document.exitPointerLock();\n this.pointerLocked = false;\n },\n\n /**\n * Toggle the feature of showing/hiding the grab cursor.\n */\n updateGrabCursor: function (enabled) {\n var sceneEl = this.el.sceneEl;\n\n function enableGrabCursor () { sceneEl.canvas.classList.add('a-grab-cursor'); }\n function disableGrabCursor () { sceneEl.canvas.classList.remove('a-grab-cursor'); }\n\n if (!sceneEl.canvas) {\n if (enabled) {\n sceneEl.addEventListener('render-target-loaded', enableGrabCursor);\n } else {\n sceneEl.addEventListener('render-target-loaded', disableGrabCursor);\n }\n return;\n }\n\n if (enabled) {\n enableGrabCursor();\n return;\n }\n disableGrabCursor();\n },\n\n /**\n * Save camera pose before entering VR to restore later if exiting.\n */\n saveCameraPose: function () {\n var el = this.el;\n\n this.savedPose.position.copy(el.object3D.position);\n this.savedPose.rotation.copy(el.object3D.rotation);\n this.hasSavedPose = true;\n },\n\n /**\n * Reset camera pose to before entering VR.\n */\n restoreCameraPose: function () {\n var el = this.el;\n var savedPose = this.savedPose;\n\n if (!this.hasSavedPose) { return; }\n\n // Reset camera orientation.\n el.object3D.position.copy(savedPose.position);\n el.object3D.rotation.copy(savedPose.rotation);\n this.hasSavedPose = false;\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205}],91:[function(_dereq_,module,exports){\nvar bind = _dereq_('../utils/bind');\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\n// See Profiles Registry:\n// https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/registry\n// TODO: Add a more robust system for deriving gamepad name.\nvar GAMEPAD_ID_PREFIX = 'magicleap';\nvar GAMEPAD_ID_SUFFIX = '-one';\nvar GAMEPAD_ID_COMPOSITE = GAMEPAD_ID_PREFIX + GAMEPAD_ID_SUFFIX;\n\nvar MAGICLEAP_CONTROLLER_MODEL_GLB_URL = 'https://cdn.aframe.io/controllers/magicleap/magicleap-one-controller.glb';\n\n/**\n * Button IDs:\n * 0 - trigger\n * 1 - grip\n * 2 - touchpad\n * 3 - menu (never dispatched on this layer)\n *\n * Axis:\n * 0 - touchpad x axis\n * 1 - touchpad y axis\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {touchpad: [0, 1]},\n buttons: ['trigger', 'grip', 'touchpad', 'menu']\n};\n\n/**\n * Magic Leap Controls\n * Interface with Magic Leap control and map Gamepad events to controller\n * buttons: trigger, grip, touchpad, and menu.\n * Load a controller model.\n */\nmodule.exports.Component = registerComponent('magicleap-controls', {\n schema: {\n hand: {default: 'none'},\n model: {default: true},\n orientationOffset: {type: 'vec3'}\n },\n\n mapping: INPUT_MAPPING_WEBXR,\n\n init: function () {\n var self = this;\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.previousButtonValues = {};\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n\n this.bindMethods();\n },\n\n update: function () {\n var data = this.data;\n this.controllerIndex = data.hand === 'right' ? 0 : data.hand === 'left' ? 1 : 2;\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('axismove', this.onAxisMoved);\n el.addEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('axismove', this.onAxisMoved);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n var data = this.data;\n checkControllerPresentAndSetup(this, GAMEPAD_ID_COMPOSITE,\n {index: this.controllerIndex, hand: data.hand});\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n\n el.setAttribute('tracked-controls', {\n // TODO: verify expected behavior between reserved prefixes.\n idPrefix: GAMEPAD_ID_COMPOSITE,\n hand: data.hand,\n controller: this.controllerIndex,\n orientationOffset: data.orientationOffset\n });\n\n // Load model.\n if (!this.data.model) { return; }\n this.el.setAttribute('gltf-model', MAGICLEAP_CONTROLLER_MODEL_GLB_URL);\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n // Note that due to gamepadconnected event propagation issues, we don't rely on events.\n this.checkIfControllerPresent();\n },\n\n /**\n * Rotate the trigger button based on how hard the trigger is pressed.\n */\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n var analogValue;\n\n if (!button) { return; }\n if (button === 'trigger') {\n analogValue = evt.detail.state.value;\n console.log('analog value of trigger press: ' + analogValue);\n }\n\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n // our glb scale is too large.\n controllerObject3D.scale.set(0.01, 0.01, 0.01);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {},\n\n setButtonColor: function (buttonName, color) {}\n\n});\n\n},{\"../core/component\":131,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],92:[function(_dereq_,module,exports){\n/* global Promise */\nvar utils = _dereq_('../utils/');\nvar component = _dereq_('../core/component');\nvar THREE = _dereq_('../lib/three');\nvar shader = _dereq_('../core/shader');\n\nvar error = utils.debug('components:material:error');\nvar registerComponent = component.registerComponent;\nvar shaders = shader.shaders;\nvar shaderNames = shader.shaderNames;\n\n/**\n * Material component.\n *\n * @member {object} shader - Determines how material is shaded. Defaults to `standard`,\n * three.js's implementation of PBR. Another standard shading model is `flat` which\n * uses MeshBasicMaterial.\n */\nmodule.exports.Component = registerComponent('material', {\n schema: {\n alphaTest: {default: 0.0, min: 0.0, max: 1.0},\n depthTest: {default: true},\n depthWrite: {default: true},\n flatShading: {default: false},\n npot: {default: false},\n offset: {type: 'vec2', default: {x: 0, y: 0}},\n opacity: {default: 1.0, min: 0.0, max: 1.0},\n repeat: {type: 'vec2', default: {x: 1, y: 1}},\n shader: {default: 'standard', oneOf: shaderNames, schemaChange: true},\n side: {default: 'front', oneOf: ['front', 'back', 'double']},\n transparent: {default: false},\n vertexColors: {type: 'string', default: 'none', oneOf: ['face', 'vertex']},\n visible: {default: true},\n blending: {default: 'normal', oneOf: ['none', 'normal', 'additive', 'subtractive', 'multiply']},\n dithering: {default: true}\n },\n\n init: function () {\n this.material = null;\n },\n\n /**\n * Update or create material.\n *\n * @param {object|null} oldData\n */\n update: function (oldData) {\n var data = this.data;\n if (!this.shader || data.shader !== oldData.shader) {\n this.updateShader(data.shader);\n }\n this.shader.update(this.data);\n this.updateMaterial(oldData);\n },\n\n updateSchema: function (data) {\n var currentShader;\n var newShader;\n var schema;\n var shader;\n\n newShader = data && data.shader;\n currentShader = this.oldData && this.oldData.shader;\n shader = newShader || currentShader;\n schema = shaders[shader] && shaders[shader].schema;\n\n if (!schema) { error('Unknown shader schema ' + shader); }\n if (currentShader && newShader === currentShader) { return; }\n this.extendSchema(schema);\n this.updateBehavior();\n },\n\n updateBehavior: function () {\n var key;\n var sceneEl = this.el.sceneEl;\n var schema = this.schema;\n var self = this;\n var tickProperties;\n\n function tickTime (time, delta) {\n var key;\n for (key in tickProperties) {\n tickProperties[key] = time;\n }\n self.shader.update(tickProperties);\n }\n\n this.tick = undefined;\n\n tickProperties = {};\n for (key in schema) {\n if (schema[key].type === 'time') {\n this.tick = tickTime;\n tickProperties[key] = true;\n }\n }\n\n if (!sceneEl) { return; }\n if (this.tick) {\n sceneEl.addBehavior(this);\n } else {\n sceneEl.removeBehavior(this);\n }\n },\n\n updateShader: function (shaderName) {\n var data = this.data;\n var Shader = shaders[shaderName] && shaders[shaderName].Shader;\n var shaderInstance;\n\n if (!Shader) { throw new Error('Unknown shader ' + shaderName); }\n\n // Get material from A-Frame shader.\n shaderInstance = this.shader = new Shader();\n shaderInstance.el = this.el;\n shaderInstance.init(data);\n this.setMaterial(shaderInstance.material);\n this.updateSchema(data);\n },\n\n /**\n * Set and update base material properties.\n * Set `needsUpdate` when needed.\n */\n updateMaterial: function (oldData) {\n var data = this.data;\n var material = this.material;\n var oldDataHasKeys;\n\n // Base material properties.\n material.alphaTest = data.alphaTest;\n material.depthTest = data.depthTest !== false;\n material.depthWrite = data.depthWrite !== false;\n material.opacity = data.opacity;\n material.flatShading = data.flatShading;\n material.side = parseSide(data.side);\n material.transparent = data.transparent !== false || data.opacity < 1.0;\n material.vertexColors = parseVertexColors(data.vertexColors);\n material.visible = data.visible;\n material.blending = parseBlending(data.blending);\n material.dithering = data.dithering;\n\n // Check if material needs update.\n for (oldDataHasKeys in oldData) { break; }\n if (oldDataHasKeys &&\n (oldData.alphaTest !== data.alphaTest ||\n oldData.side !== data.side ||\n oldData.vertexColors !== data.vertexColors)) {\n material.needsUpdate = true;\n }\n },\n\n /**\n * Remove material on remove (callback).\n * Dispose of it from memory and unsubscribe from scene updates.\n */\n remove: function () {\n var defaultMaterial = new THREE.MeshBasicMaterial();\n var material = this.material;\n var object3D = this.el.getObject3D('mesh');\n if (object3D) { object3D.material = defaultMaterial; }\n disposeMaterial(material, this.system);\n },\n\n /**\n * (Re)create new material. Has side-effects of setting `this.material` and updating\n * material registration in scene.\n *\n * @param {object} data - Material component data.\n * @param {object} type - Material type to create.\n * @returns {object} Material.\n */\n setMaterial: function (material) {\n var el = this.el;\n var mesh;\n var system = this.system;\n\n if (this.material) { disposeMaterial(this.material, system); }\n\n this.material = material;\n system.registerMaterial(material);\n\n // Set on mesh. If mesh does not exist, wait for it.\n mesh = el.getObject3D('mesh');\n if (mesh) {\n mesh.material = material;\n } else {\n el.addEventListener('object3dset', function waitForMesh (evt) {\n if (evt.detail.type !== 'mesh' || evt.target !== el) { return; }\n el.getObject3D('mesh').material = material;\n el.removeEventListener('object3dset', waitForMesh);\n });\n }\n }\n});\n\n/**\n * Return a three.js constant determining which material face sides to render\n * based on the side parameter (passed as a component property).\n *\n * @param {string} [side=front] - `front`, `back`, or `double`.\n * @returns {number} THREE.FrontSide, THREE.BackSide, or THREE.DoubleSide.\n */\nfunction parseSide (side) {\n switch (side) {\n case 'back': {\n return THREE.BackSide;\n }\n case 'double': {\n return THREE.DoubleSide;\n }\n default: {\n // Including case `front`.\n return THREE.FrontSide;\n }\n }\n}\n\n/**\n * Return a three.js constant determining vertex coloring.\n */\nfunction parseVertexColors (coloring) {\n switch (coloring) {\n case 'face': {\n return THREE.FaceColors;\n }\n case 'vertex': {\n return THREE.VertexColors;\n }\n default: {\n return THREE.NoColors;\n }\n }\n}\n\n/**\n * Return a three.js constant determining blending\n *\n * @param {string} [blending=normal]\n * - `none`, additive`, `subtractive`,`multiply` or `normal`.\n * @returns {number}\n */\nfunction parseBlending (blending) {\n switch (blending) {\n case 'none': {\n return THREE.NoBlending;\n }\n case 'additive': {\n return THREE.AdditiveBlending;\n }\n case 'subtractive': {\n return THREE.SubtractiveBlending;\n }\n case 'multiply': {\n return THREE.MultiplyBlending;\n }\n default: {\n return THREE.NormalBlending;\n }\n }\n}\n\n/**\n * Dispose of material from memory and unsubscribe material from scene updates like fog.\n */\nfunction disposeMaterial (material, system) {\n material.dispose();\n system.unregisterMaterial(material);\n}\n\n},{\"../core/component\":131,\"../core/shader\":141,\"../lib/three\":179,\"../utils/\":205}],93:[function(_dereq_,module,exports){\nvar debug = _dereq_('../utils/debug');\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\nvar warn = debug('components:obj-model:warn');\n\nmodule.exports.Component = registerComponent('obj-model', {\n schema: {\n mtl: {type: 'model'},\n obj: {type: 'model'}\n },\n\n init: function () {\n var self = this;\n\n this.model = null;\n this.objLoader = new THREE.OBJLoader();\n this.mtlLoader = new THREE.MTLLoader(this.objLoader.manager);\n // Allow cross-origin images to be loaded.\n this.mtlLoader.crossOrigin = '';\n\n this.el.addEventListener('componentinitialized', function (evt) {\n if (!self.model) { return; }\n if (evt.detail.name !== 'material') { return; }\n self.applyMaterial();\n });\n },\n\n update: function () {\n var data = this.data;\n if (!data.obj) { return; }\n this.resetMesh();\n this.loadObj(data.obj, data.mtl);\n },\n\n remove: function () {\n if (!this.model) { return; }\n this.resetMesh();\n },\n\n resetMesh: function () {\n this.el.removeObject3D('mesh');\n },\n\n loadObj: function (objUrl, mtlUrl) {\n var self = this;\n var el = this.el;\n var mtlLoader = this.mtlLoader;\n var objLoader = this.objLoader;\n var rendererSystem = this.el.sceneEl.systems.renderer;\n var BASE_PATH = mtlUrl.substr(0, mtlUrl.lastIndexOf('/') + 1);\n\n if (mtlUrl) {\n // .OBJ with an .MTL.\n if (el.hasAttribute('material')) {\n warn('Material component properties are ignored when a .MTL is provided');\n }\n mtlLoader.setResourcePath(BASE_PATH);\n mtlLoader.load(mtlUrl, function (materials) {\n materials.preload();\n objLoader.setMaterials(materials);\n objLoader.load(objUrl, function (objModel) {\n self.model = objModel;\n self.model.traverse(function (object) {\n if (object.isMesh) {\n var material = object.material;\n if (material.color) rendererSystem.applyColorCorrection(material.color);\n if (material.map) rendererSystem.applyColorCorrection(material.map);\n if (material.emissive) rendererSystem.applyColorCorrection(material.emissive);\n if (material.emissiveMap) rendererSystem.applyColorCorrection(material.emissiveMap);\n }\n });\n el.setObject3D('mesh', objModel);\n el.emit('model-loaded', {format: 'obj', model: objModel});\n });\n });\n return;\n }\n\n // .OBJ only.\n objLoader.load(objUrl, function loadObjOnly (objModel) {\n self.model = objModel;\n self.applyMaterial();\n el.setObject3D('mesh', objModel);\n el.emit('model-loaded', {format: 'obj', model: objModel});\n });\n },\n\n /**\n * Apply material from material component recursively.\n */\n applyMaterial: function () {\n var material = this.el.components.material;\n if (!material) { return; }\n this.model.traverse(function (child) {\n if (child instanceof THREE.Mesh) {\n child.material = material.material;\n }\n });\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/debug\":201}],94:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'oculus-go';\nvar GAMEPAD_ID_WEBVR = 'Oculus Go';\n\nvar OCULUS_GO_CONTROLLER_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus/go/oculus-go-controller.gltf';\n\n// Prefix for Gen1 and Gen2 Oculus Touch Controllers.\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n/**\n * Button indices:\n * 0 - trackpad\n * 1 - trigger\n *\n * Axis:\n * 0 - trackpad x\n * 1 - trackpad y\n */\nvar INPUT_MAPPING_WEBVR = {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'trigger']\n};\n\n/**\n * Button indices:\n * 0 - trigger\n * 1 - none\n * 2 - touchpad\n *\n * Axis:\n * 0 - touchpad x\n * 1 - touchpad y\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/oculus/oculus-go.json\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {touchpad: [0, 1]},\n buttons: ['trigger', 'none', 'touchpad']\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Oculus Go controls.\n * Interface with Oculus Go controller and map Gamepad events to\n * controller buttons: trackpad, trigger\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('oculus-go-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n buttonColor: {type: 'color', default: '#FFFFFF'},\n buttonTouchedColor: {type: 'color', default: '#BBBBBB'},\n buttonHighlightColor: {type: 'color', default: '#7A7A7A'},\n model: {default: true},\n orientationOffset: {type: 'vec3'},\n armModel: {default: true}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX,\n this.data.hand ? {hand: this.data.hand} : {});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n armModel: data.armModel,\n hand: data.hand,\n idPrefix: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset\n });\n if (!this.data.model) { return; }\n this.el.setAttribute('gltf-model', OCULUS_GO_CONTROLLER_MODEL_URL);\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n // No need for onButtonChanged, since Oculus Go controller has no analog buttons.\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n var buttonMeshes;\n\n if (!this.data.model) { return; }\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.trigger = controllerObject3D.getObjectByName('oculus_go_button_trigger');\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('oculus_go_touchpad');\n buttonMeshes.touchpad = controllerObject3D.getObjectByName('oculus_go_touchpad');\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var buttonMeshes = this.buttonMeshes;\n if (!buttonMeshes || !buttonMeshes[buttonName]) { return; }\n var color;\n var button;\n switch (state) {\n case 'down':\n color = this.data.buttonHighlightColor;\n break;\n case 'touchstart':\n color = this.data.buttonTouchedColor;\n break;\n default:\n color = this.data.buttonColor;\n }\n button = buttonMeshes[buttonName];\n button.material.color.set(color);\n this.rendererSystem.applyColorCorrection(button.material.color);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],95:[function(_dereq_,module,exports){\nvar bind = _dereq_('../utils/bind');\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'oculus-touch';\nvar GAMEPAD_ID_WEBVR = 'Oculus Touch';\n\n// Prefix for Gen1 and Gen2 Oculus Touch Controllers.\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n// First generation model URL.\nvar TOUCH_CONTROLLER_MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/oculus/oculus-touch-controller-';\n\nvar OCULUS_TOUCH_WEBVR = {\n left: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'left.gltf',\n rayOrigin: {origin: {x: 0.008, y: -0.01, z: 0}, direction: {x: 0, y: -0.8, z: -1}},\n modelPivotOffset: new THREE.Vector3(-0.005, 0.003, -0.055),\n modelPivotRotation: new THREE.Euler(0, 0, 0)\n },\n right: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'right.gltf',\n rayOrigin: {origin: {x: -0.008, y: -0.01, z: 0}, direction: {x: 0, y: -0.8, z: -1}},\n modelPivotOffset: new THREE.Vector3(0.005, 0.003, -0.055),\n modelPivotRotation: new THREE.Euler(0, 0, 0)\n }\n};\n\nvar OCULUS_TOUCH_WEBXR = {\n left: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'left.gltf',\n rayOrigin: {origin: {x: 0.002, y: -0.005, z: -0.03}, direction: {x: 0, y: -0.8, z: -1}},\n modelPivotOffset: new THREE.Vector3(-0.005, 0.036, -0.037),\n modelPivotRotation: new THREE.Euler(Math.PI / 4.5, 0, 0)\n },\n right: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'right.gltf',\n rayOrigin: {origin: {x: -0.002, y: -0.005, z: -0.03}, direction: {x: 0, y: -0.8, z: -1}},\n modelPivotOffset: new THREE.Vector3(0.005, 0.036, -0.037),\n modelPivotRotation: new THREE.Euler(Math.PI / 4.5, 0, 0)\n }\n};\n\nvar OCULUS_TOUCH_CONFIG = isWebXRAvailable ? OCULUS_TOUCH_WEBXR : OCULUS_TOUCH_WEBVR;\n\nvar CONTROLLER_DEFAULT = 'oculus-touch';\nvar CONTROLLER_PROPERTIES = {\n 'oculus-touch': OCULUS_TOUCH_CONFIG,\n 'oculus-touch-v2': {\n left: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'gen2-left.gltf',\n rayOrigin: {origin: {x: -0.01, y: 0, z: -0.02}, direction: {x: 0, y: -0.5, z: -1}},\n modelPivotOffset: new THREE.Vector3(0, 0, 0),\n modelPivotRotation: new THREE.Euler(0, 0, 0)\n },\n right: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'gen2-right.gltf',\n rayOrigin: {origin: {x: 0.01, y: 0, z: -0.02}, direction: {x: 0, y: -0.5, z: -1}},\n modelPivotOffset: new THREE.Vector3(0, 0, 0),\n modelPivotRotation: new THREE.Euler(0, 0, 0)\n }\n },\n 'oculus-touch-v3': {\n left: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'v3-left.glb',\n rayOrigin: {origin: {x: 0.015, y: 0.005, z: 0}, direction: {x: 0, y: 0, z: -1}},\n modelPivotOffset: new THREE.Vector3(0.01, -0.01, 0.05),\n modelPivotRotation: new THREE.Euler(Math.PI / 4, 0, 0)\n },\n right: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'v3-right.glb',\n rayOrigin: {origin: {x: -0.015, y: 0.005, z: 0}, direction: {x: 0, y: 0, z: -1}},\n modelPivotOffset: new THREE.Vector3(-0.01, -0.01, 0.05),\n modelPivotRotation: new THREE.Euler(Math.PI / 4, 0, 0)\n }\n }\n};\n\n/**\n * Button indices:\n * 0 - thumbstick (which has separate axismove / thumbstickmoved events)\n * 1 - trigger (with analog value, which goes up to 1)\n * 2 - grip (with analog value, which goes up to 1)\n * 3 - X (left) or A (right)\n * 4 - Y (left) or B (right)\n * 5 - surface (touch only)\n */\nvar INPUT_MAPPING_WEBVR = {\n left: {\n axes: {thumbstick: [0, 1]},\n buttons: ['thumbstick', 'trigger', 'grip', 'xbutton', 'ybutton', 'surface']\n },\n right: {\n axes: {thumbstick: [0, 1]},\n buttons: ['thumbstick', 'trigger', 'grip', 'abutton', 'bbutton', 'surface']\n }\n};\n\n/**\n * Button indices:\n * 0 - trigger\n * 1 - grip\n * 2 - none\n * 3 - thumbstick\n * 4 - X or A button\n * 5 - Y or B button\n * 6 - surface\n *\n * Axis:\n * 0 - none\n * 1 - none\n * 2 - thumbstick\n * 3 - thumbstick\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/oculus/oculus-touch.json\n */\nvar INPUT_MAPPING_WEBXR = {\n left: {\n axes: {thumbstick: [2, 3]},\n buttons: ['trigger', 'grip', 'none', 'thumbstick', 'xbutton', 'ybutton', 'surface']\n },\n right: {\n axes: {thumbstick: [2, 3]},\n buttons: ['trigger', 'grip', 'none', 'thumbstick', 'abutton', 'bbutton', 'surface']\n }\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Oculus Touch controls.\n * Interface with Oculus Touch controllers and map Gamepad events to\n * controller buttons: thumbstick, trigger, grip, xbutton, ybutton, surface\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('oculus-touch-controls', {\n schema: {\n hand: {default: 'left'},\n buttonColor: {type: 'color', default: '#999'}, // Off-white.\n buttonTouchColor: {type: 'color', default: '#8AB'},\n buttonHighlightColor: {type: 'color', default: '#2DF'}, // Light blue.\n model: {default: true},\n controllerType: {default: 'auto', oneOf: ['auto', 'oculus-touch', 'oculus-touch-v2', 'oculus-touch-v3']},\n orientationOffset: {type: 'vec3', default: {x: 43, y: 0, z: 0}}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self, self.data.hand); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self, self.data.hand); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self, self.data.hand); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self, self.data.hand); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.previousButtonValues = {};\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('axismove', this.onAxisMoved);\n el.addEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('axismove', this.onAxisMoved);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {\n hand: this.data.hand\n });\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n loadModel: function (controller) {\n var data = this.data;\n var controllerId;\n\n if (!data.model) { return; }\n // Set the controller display model based on the data passed in.\n this.displayModel = CONTROLLER_PROPERTIES[data.controllerType] || CONTROLLER_PROPERTIES[CONTROLLER_DEFAULT];\n // If the developer is asking for auto-detection, see if the displayName can be retrieved to identify the specific unit.\n // This only works for WebVR currently.\n if (data.controllerType === 'auto') {\n var trackedControlsSystem = this.el.sceneEl.systems['tracked-controls-webvr'];\n // WebVR\n if (trackedControlsSystem && trackedControlsSystem.vrDisplay) {\n var displayName = trackedControlsSystem.vrDisplay.displayName;\n // The Oculus Quest uses the updated generation 2 inside-out tracked controllers so update the displayModel.\n if (/^Oculus Quest$/.test(displayName)) {\n this.displayModel = CONTROLLER_PROPERTIES['oculus-touch-v2'];\n }\n } else { // WebXR\n controllerId = CONTROLLER_DEFAULT;\n controllerId = controller.profiles.indexOf('oculus-touch-v2') !== -1 ? 'oculus-touch-v2' : controllerId;\n controllerId = controller.profiles.indexOf('oculus-touch-v3') !== -1 ? 'oculus-touch-v3' : controllerId;\n this.displayModel = CONTROLLER_PROPERTIES[controllerId];\n }\n }\n var modelUrl = this.displayModel[data.hand].modelUrl;\n this.el.setAttribute('gltf-model', modelUrl);\n },\n\n injectTrackedControls: function (controller) {\n var data = this.data;\n var webXRId = GAMEPAD_ID_WEBXR;\n var webVRId = data.hand === 'right' ? 'Oculus Touch (Right)' : 'Oculus Touch (Left)';\n var id = isWebXRAvailable ? webXRId : webVRId;\n this.el.setAttribute('tracked-controls', {\n id: id,\n hand: data.hand,\n orientationOffset: data.orientationOffset,\n handTrackingEnabled: false\n });\n this.loadModel(controller);\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n // Note that due to gamepadconnected event propagation issues, we don't rely on events.\n this.checkIfControllerPresent();\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping[this.data.hand].buttons[evt.detail.id];\n var buttonMeshes = this.buttonMeshes;\n var analogValue;\n if (!button) { return; }\n\n if (button === 'trigger' || button === 'grip') { analogValue = evt.detail.state.value; }\n\n // Update trigger and/or grip meshes, if any.\n if (buttonMeshes) {\n if (button === 'trigger' && buttonMeshes.trigger) {\n buttonMeshes.trigger.rotation.x = this.originalXRotationTrigger - analogValue * (Math.PI / 26);\n }\n if (button === 'grip' && buttonMeshes.grip) {\n buttonMeshes.grip.position.x = this.originalXPositionGrip + (this.data.hand === 'left' ? -1 : 1) * analogValue * 0.004;\n }\n }\n\n // Pass along changed event with button state, using the buttom mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onModelLoaded: function (evt) {\n var controllerObject3D = this.controllerObject3D = evt.detail.model;\n var buttonMeshes;\n\n if (!this.data.model) { return; }\n\n buttonMeshes = this.buttonMeshes = {};\n\n buttonMeshes.grip = controllerObject3D.getObjectByName('buttonHand');\n this.originalXPositionGrip = buttonMeshes.grip && buttonMeshes.grip.position.x;\n buttonMeshes.thumbstick = controllerObject3D.getObjectByName('stick');\n buttonMeshes.trigger = controllerObject3D.getObjectByName('buttonTrigger');\n this.originalXRotationTrigger = buttonMeshes.trigger && buttonMeshes.trigger.rotation.x;\n buttonMeshes.xbutton = controllerObject3D.getObjectByName('buttonX');\n buttonMeshes.abutton = controllerObject3D.getObjectByName('buttonA');\n buttonMeshes.ybutton = controllerObject3D.getObjectByName('buttonY');\n buttonMeshes.bbutton = controllerObject3D.getObjectByName('buttonB');\n\n // Offset pivot point\n controllerObject3D.position.copy(this.displayModel[this.data.hand].modelPivotOffset);\n controllerObject3D.rotation.copy(this.displayModel[this.data.hand].modelPivotRotation);\n\n this.el.emit('controllermodelready', {\n name: 'oculus-touch-controls',\n model: this.data.model,\n rayOrigin: this.displayModel[this.data.hand].rayOrigin\n });\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping[this.data.hand].axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var button;\n var color = (state === 'up' || state === 'touchend') ? this.data.buttonColor : state === 'touchstart' ? this.data.buttonTouchColor : this.data.buttonHighlightColor;\n var buttonMeshes = this.buttonMeshes;\n if (!this.data.model) { return; }\n if (buttonMeshes && buttonMeshes[buttonName]) {\n button = buttonMeshes[buttonName];\n button.material.color.set(color);\n this.rendererSystem.applyColorCorrection(button.material.color);\n }\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],96:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nmodule.exports.Component = registerComponent('position', {\n schema: {type: 'vec3'},\n\n update: function () {\n var object3D = this.el.object3D;\n var data = this.data;\n object3D.position.set(data.x, data.y, data.z);\n },\n\n remove: function () {\n // Pretty much for mixins.\n this.el.object3D.position.set(0, 0, 0);\n }\n});\n\n},{\"../core/component\":131}],97:[function(_dereq_,module,exports){\n/* global MutationObserver */\n\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar warn = utils.debug('components:raycaster:warn');\n\n// Defines selectors that should be 'safe' for the MutationObserver used to\n// refresh the whitelist. Matches classnames, IDs, and presence of attributes.\n// Selectors for the value of an attribute, like [position=0 2 0], cannot be\n// reliably detected and are therefore disallowed.\nvar OBSERVER_SELECTOR_RE = /^[\\w\\s-.,[\\]#]*$/;\n\n// Configuration for the MutationObserver used to refresh the whitelist.\n// Listens for addition/removal of elements and attributes within the scene.\nvar OBSERVER_CONFIG = {\n childList: true,\n attributes: true,\n subtree: true\n};\n\nvar EVENTS = {\n INTERSECT: 'raycaster-intersected',\n INTERSECTION: 'raycaster-intersection',\n INTERSECT_CLEAR: 'raycaster-intersected-cleared',\n INTERSECTION_CLEAR: 'raycaster-intersection-cleared'\n};\n\n/**\n * Raycaster component.\n *\n * Pass options to three.js Raycaster including which objects to test.\n * Poll for intersections.\n * Emit event on origin entity and on target entity on intersect.\n *\n * @member {array} intersectedEls - List of currently intersected entities.\n * @member {array} objects - Cached list of meshes to intersect.\n * @member {number} prevCheckTime - Previous time intersection was checked. To help interval.\n * @member {object} raycaster - three.js Raycaster.\n */\nmodule.exports.Component = registerComponent('raycaster', {\n schema: {\n autoRefresh: {default: true},\n direction: {type: 'vec3', default: {x: 0, y: 0, z: -1}},\n enabled: {default: true},\n far: {default: 1000},\n interval: {default: 0},\n near: {default: 0},\n objects: {default: ''},\n origin: {type: 'vec3'},\n showLine: {default: false},\n lineColor: {default: 'white'},\n lineOpacity: {default: 1},\n useWorldCoordinates: {default: false}\n },\n\n multiple: true,\n\n init: function () {\n this.clearedIntersectedEls = [];\n this.unitLineEndVec3 = new THREE.Vector3();\n this.intersectedEls = [];\n this.intersections = [];\n this.newIntersectedEls = [];\n this.newIntersections = [];\n this.objects = [];\n this.prevCheckTime = undefined;\n this.prevIntersectedEls = [];\n this.rawIntersections = [];\n this.raycaster = new THREE.Raycaster();\n this.updateOriginDirection();\n this.setDirty = this.setDirty.bind(this);\n this.updateLine = this.updateLine.bind(this);\n this.observer = new MutationObserver(this.setDirty);\n this.dirty = true;\n this.lineEndVec3 = new THREE.Vector3();\n this.otherLineEndVec3 = new THREE.Vector3();\n this.lineData = {end: this.lineEndVec3};\n\n this.getIntersection = this.getIntersection.bind(this);\n this.intersectedDetail = {el: this.el, getIntersection: this.getIntersection};\n this.intersectedClearedDetail = {el: this.el};\n this.intersectionClearedDetail = {clearedEls: this.clearedIntersectedEls};\n this.intersectionDetail = {};\n },\n\n /**\n * Create or update raycaster object.\n */\n update: function (oldData) {\n var data = this.data;\n var el = this.el;\n var raycaster = this.raycaster;\n\n // Set raycaster properties.\n raycaster.far = data.far;\n raycaster.near = data.near;\n\n // Draw line.\n if (data.showLine &&\n (data.far !== oldData.far || data.origin !== oldData.origin ||\n data.direction !== oldData.direction || !oldData.showLine)) {\n // Calculate unit vector for line direction. Can be multiplied via scalar to performantly\n // adjust line length.\n this.unitLineEndVec3.copy(data.origin).add(data.direction).normalize();\n this.drawLine();\n }\n\n if (!data.showLine && oldData.showLine) {\n el.removeAttribute('line');\n }\n\n if (data.objects !== oldData.objects && !OBSERVER_SELECTOR_RE.test(data.objects)) {\n warn('[raycaster] Selector \"' + data.objects +\n '\" may not update automatically with DOM changes.');\n }\n\n if (!data.objects) {\n warn('[raycaster] For performance, please define raycaster.objects when using ' +\n 'raycaster or cursor components to whitelist which entities to intersect with. ' +\n 'e.g., raycaster=\"objects: [data-raycastable]\".');\n }\n\n if (data.autoRefresh !== oldData.autoRefresh && el.isPlaying) {\n data.autoRefresh\n ? this.addEventListeners()\n : this.removeEventListeners();\n }\n\n if (oldData.enabled && !data.enabled) { this.clearAllIntersections(); }\n\n this.setDirty();\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n },\n\n remove: function () {\n if (this.data.showLine) {\n this.el.removeAttribute('line');\n }\n this.clearAllIntersections();\n },\n\n addEventListeners: function () {\n if (!this.data.autoRefresh) { return; }\n this.observer.observe(this.el.sceneEl, OBSERVER_CONFIG);\n this.el.sceneEl.addEventListener('object3dset', this.setDirty);\n this.el.sceneEl.addEventListener('object3dremove', this.setDirty);\n },\n\n removeEventListeners: function () {\n this.observer.disconnect();\n this.el.sceneEl.removeEventListener('object3dset', this.setDirty);\n this.el.sceneEl.removeEventListener('object3dremove', this.setDirty);\n },\n\n /**\n * Mark the object list as dirty, to be refreshed before next raycast.\n */\n setDirty: function () {\n this.dirty = true;\n },\n\n /**\n * Update list of objects to test for intersection.\n */\n refreshObjects: function () {\n var data = this.data;\n var els;\n\n // If objects not defined, intersect with everything.\n els = data.objects\n ? this.el.sceneEl.querySelectorAll(data.objects)\n : this.el.sceneEl.querySelectorAll('*');\n this.objects = this.flattenObject3DMaps(els);\n this.dirty = false;\n },\n\n /**\n * Check for intersections and cleared intersections on an interval.\n */\n tock: function (time) {\n var data = this.data;\n var prevCheckTime = this.prevCheckTime;\n\n if (!data.enabled) { return; }\n\n // Only check for intersection if interval time has passed.\n if (prevCheckTime && (time - prevCheckTime < data.interval)) { return; }\n\n // Update check time.\n this.prevCheckTime = time;\n this.checkIntersections();\n },\n\n /**\n * Raycast for intersections and emit events for current and cleared intersections.\n */\n checkIntersections: function () {\n var clearedIntersectedEls = this.clearedIntersectedEls;\n var el = this.el;\n var data = this.data;\n var i;\n var intersectedEls = this.intersectedEls;\n var intersection;\n var intersections = this.intersections;\n var newIntersectedEls = this.newIntersectedEls;\n var newIntersections = this.newIntersections;\n var prevIntersectedEls = this.prevIntersectedEls;\n var rawIntersections = this.rawIntersections;\n\n // Refresh the object whitelist if needed.\n if (this.dirty) { this.refreshObjects(); }\n\n // Store old previously intersected entities.\n copyArray(this.prevIntersectedEls, this.intersectedEls);\n\n // Raycast.\n this.updateOriginDirection();\n rawIntersections.length = 0;\n this.raycaster.intersectObjects(this.objects, true, rawIntersections);\n\n // Only keep intersections against objects that have a reference to an entity.\n intersections.length = 0;\n intersectedEls.length = 0;\n for (i = 0; i < rawIntersections.length; i++) {\n intersection = rawIntersections[i];\n // Don't intersect with own line.\n if (data.showLine && intersection.object === el.getObject3D('line')) {\n continue;\n }\n if (intersection.object.el) {\n intersections.push(intersection);\n intersectedEls.push(intersection.object.el);\n }\n }\n\n // Get newly intersected entities.\n newIntersections.length = 0;\n newIntersectedEls.length = 0;\n for (i = 0; i < intersections.length; i++) {\n if (prevIntersectedEls.indexOf(intersections[i].object.el) === -1) {\n newIntersections.push(intersections[i]);\n newIntersectedEls.push(intersections[i].object.el);\n }\n }\n\n // Emit intersection cleared on both entities per formerly intersected entity.\n clearedIntersectedEls.length = 0;\n for (i = 0; i < prevIntersectedEls.length; i++) {\n if (intersectedEls.indexOf(prevIntersectedEls[i]) !== -1) { continue; }\n prevIntersectedEls[i].emit(EVENTS.INTERSECT_CLEAR,\n this.intersectedClearedDetail);\n clearedIntersectedEls.push(prevIntersectedEls[i]);\n }\n if (clearedIntersectedEls.length) {\n el.emit(EVENTS.INTERSECTION_CLEAR, this.intersectionClearedDetail);\n }\n\n // Emit intersected on intersected entity per intersected entity.\n for (i = 0; i < newIntersectedEls.length; i++) {\n newIntersectedEls[i].emit(EVENTS.INTERSECT, this.intersectedDetail);\n }\n\n // Emit all intersections at once on raycasting entity.\n if (newIntersections.length) {\n this.intersectionDetail.els = newIntersectedEls;\n this.intersectionDetail.intersections = newIntersections;\n el.emit(EVENTS.INTERSECTION, this.intersectionDetail);\n }\n\n // Update line length.\n if (data.showLine) { setTimeout(this.updateLine); }\n },\n\n updateLine: function () {\n var el = this.el;\n var intersections = this.intersections;\n var lineLength;\n\n if (intersections.length) {\n if (intersections[0].object.el === el && intersections[1]) {\n lineLength = intersections[1].distance;\n } else {\n lineLength = intersections[0].distance;\n }\n }\n this.drawLine(lineLength);\n },\n\n /**\n * Return the most recent intersection details for a given entity, if any.\n * @param {AEntity} el\n * @return {Object}\n */\n getIntersection: function (el) {\n var i;\n var intersection;\n for (i = 0; i < this.intersections.length; i++) {\n intersection = this.intersections[i];\n if (intersection.object.el === el) { return intersection; }\n }\n return null;\n },\n\n /**\n * Update origin and direction of raycaster using entity transforms and supplied origin or\n * direction offsets.\n */\n updateOriginDirection: (function () {\n var direction = new THREE.Vector3();\n var originVec3 = new THREE.Vector3();\n\n // Closure to make quaternion/vector3 objects private.\n return function updateOriginDirection () {\n var el = this.el;\n var data = this.data;\n\n if (data.useWorldCoordinates) {\n this.raycaster.set(data.origin, data.direction);\n return;\n }\n\n el.object3D.updateMatrixWorld();\n originVec3.setFromMatrixPosition(el.object3D.matrixWorld);\n\n // If non-zero origin, translate the origin into world space.\n if (data.origin.x !== 0 || data.origin.y !== 0 || data.origin.z !== 0) {\n originVec3 = el.object3D.localToWorld(originVec3.copy(data.origin));\n }\n\n // three.js raycaster direction is relative to 0, 0, 0 NOT the origin / offset we\n // provide. Apply the offset to the direction, then rotation from the object,\n // and normalize.\n direction.copy(data.direction).transformDirection(el.object3D.matrixWorld).normalize();\n\n // Apply offset and direction, in world coordinates.\n this.raycaster.set(originVec3, direction);\n };\n })(),\n\n /**\n * Create or update line to give raycaster visual representation.\n * Customize the line through through line component.\n * We draw the line in the raycaster component to customize the line to the\n * raycaster's origin, direction, and far.\n *\n * Unlike the raycaster, we create the line as a child of the object. The line will\n * be affected by the transforms of the objects, so we don't have to calculate transforms\n * like we do with the raycaster.\n *\n * @param {number} length - Length of line. Pass in to shorten the line to the intersection\n * point. If not provided, length will default to the max length, `raycaster.far`.\n */\n drawLine: function (length) {\n var data = this.data;\n var el = this.el;\n var endVec3;\n\n // Switch each time vector so line update triggered and to avoid unnecessary vector clone.\n endVec3 = this.lineData.end === this.lineEndVec3\n ? this.otherLineEndVec3\n : this.lineEndVec3;\n\n // Treat Infinity as 1000m for the line.\n if (length === undefined) {\n length = data.far === Infinity ? 1000 : data.far;\n }\n\n // Update the length of the line if given. `unitLineEndVec3` is the direction\n // given by data.direction, then we apply a scalar to give it a length.\n this.lineData.start = data.origin;\n this.lineData.end = endVec3.copy(this.unitLineEndVec3).multiplyScalar(length);\n this.lineData.color = data.lineColor;\n this.lineData.opacity = data.lineOpacity;\n el.setAttribute('line', this.lineData);\n },\n\n /**\n * Return A-Frame attachments of each element's object3D group (e.g., mesh).\n * Children are flattened by one level, removing the THREE.Group wrapper,\n * so that non-recursive raycasting remains useful.\n *\n * Only push children defined as component attachements (e.g., setObject3D),\n * NOT actual children in the scene graph hierarchy.\n *\n * @param {Array<Element>} els\n * @return {Array<THREE.Object3D>}\n */\n flattenObject3DMaps: function (els) {\n var key;\n var i;\n var objects = this.objects;\n\n // Push meshes and other attachments onto list of objects to intersect.\n objects.length = 0;\n for (i = 0; i < els.length; i++) {\n if (els[i].isEntity && els[i].object3D) {\n for (key in els[i].object3DMap) {\n objects.push(els[i].getObject3D(key));\n }\n }\n }\n\n return objects;\n },\n\n clearAllIntersections: function () {\n var i;\n for (i = 0; i < this.intersectedEls.length; i++) {\n this.intersectedEls[i].emit(EVENTS.INTERSECT_CLEAR,\n this.intersectedClearedDetail);\n }\n copyArray(this.clearedIntersectedEls, this.intersectedEls);\n this.intersectedEls.length = 0;\n this.intersections.length = 0;\n this.el.emit(EVENTS.INTERSECTION_CLEAR, this.intersectionClearedDetail);\n }\n});\n\n/**\n * Copy contents of one array to another without allocating new array.\n */\nfunction copyArray (a, b) {\n var i;\n a.length = b.length;\n for (i = 0; i < b.length; i++) {\n a[i] = b[i];\n }\n}\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205}],98:[function(_dereq_,module,exports){\nvar degToRad = _dereq_('../lib/three').Math.degToRad;\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nmodule.exports.Component = registerComponent('rotation', {\n schema: {type: 'vec3'},\n\n /**\n * Updates object3D rotation.\n */\n update: function () {\n var data = this.data;\n var object3D = this.el.object3D;\n object3D.rotation.set(degToRad(data.x), degToRad(data.y), degToRad(data.z));\n object3D.rotation.order = 'YXZ';\n },\n\n remove: function () {\n // Pretty much for mixins.\n this.el.object3D.rotation.set(0, 0, 0);\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179}],99:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\n// Avoids triggering a zero-determinant which makes object3D matrix non-invertible.\nvar zeroScale = 0.00001;\n\nmodule.exports.Component = registerComponent('scale', {\n schema: {\n type: 'vec3',\n default: {x: 1, y: 1, z: 1}\n },\n\n update: function () {\n var data = this.data;\n var object3D = this.el.object3D;\n var x = data.x === 0 ? zeroScale : data.x;\n var y = data.y === 0 ? zeroScale : data.y;\n var z = data.z === 0 ? zeroScale : data.z;\n object3D.scale.set(x, y, z);\n },\n\n remove: function () {\n // Pretty much for mixins.\n this.el.object3D.scale.set(1, 1, 1);\n }\n});\n\n},{\"../core/component\":131}],100:[function(_dereq_,module,exports){\n/* global THREE */\nvar register = _dereq_('../../core/component').registerComponent;\nvar COMPONENTS = _dereq_('../../core/component').components;\n\nmodule.exports.Component = register('background', {\n schema: {\n color: {type: 'color', default: 'black'},\n transparent: {default: false}\n },\n update: function () {\n var data = this.data;\n var object3D = this.el.object3D;\n if (data.transparent) {\n object3D.background = null;\n return;\n }\n object3D.background = new THREE.Color(data.color);\n },\n\n remove: function () {\n var data = this.data;\n var object3D = this.el.object3D;\n if (data.transparent) {\n object3D.background = null;\n return;\n }\n object3D.background = COMPONENTS[this.name].schema.color.default;\n }\n});\n\n},{\"../../core/component\":131}],101:[function(_dereq_,module,exports){\nvar register = _dereq_('../../core/component').registerComponent;\n\nmodule.exports.Component = register('debug', {\n schema: {default: true}\n});\n\n},{\"../../core/component\":131}],102:[function(_dereq_,module,exports){\n/* global DeviceOrientationEvent, location */\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar utils = _dereq_('../../utils/');\nvar bind = utils.bind;\n\nvar constants = _dereq_('../../constants/');\n\nvar MODAL_CLASS = 'a-modal';\nvar DIALOG_CLASS = 'a-dialog';\nvar DIALOG_TEXT_CLASS = 'a-dialog-text';\nvar DIALOG_TEXT_CONTAINER_CLASS = 'a-dialog-text-container';\nvar DIALOG_BUTTONS_CONTAINER_CLASS = 'a-dialog-buttons-container';\nvar DIALOG_BUTTON_CLASS = 'a-dialog-button';\nvar DIALOG_ALLOW_BUTTON_CLASS = 'a-dialog-allow-button';\nvar DIALOG_DENY_BUTTON_CLASS = 'a-dialog-deny-button';\nvar DIALOG_OK_BUTTON_CLASS = 'a-dialog-ok-button';\n\n/**\n * UI for enabling device motion permission\n */\nmodule.exports.Component = registerComponent('device-orientation-permission-ui', {\n schema: {\n enabled: {default: true},\n deviceMotionMessage: {\n default: 'This immersive website requires access to your device motion sensors.'\n },\n mobileDesktopMessage: {\n default: 'Set your browser to request the mobile version of the site and reload the page to enjoy immersive mode.'\n },\n httpsMessage: {\n default: 'Access this site over HTTPS to enter VR mode and grant access to the device sensors.'\n },\n denyButtonText: {default: 'Deny'},\n allowButtonText: {default: 'Allow'},\n cancelButtonText: {default: 'Cancel'}\n },\n\n init: function () {\n var self = this;\n\n if (!this.data.enabled) { return; }\n\n if (location.hostname !== 'localhost' &&\n location.hostname !== '127.0.0.1' &&\n location.protocol === 'http:') {\n this.showHTTPAlert();\n }\n\n // Show alert on iPad if Safari is on desktop mode.\n if (utils.device.isMobileDeviceRequestingDesktopSite()) {\n this.showMobileDesktopModeAlert();\n return;\n }\n\n // Browser doesn't support or doesn't require permission to DeviceOrientationEvent API.\n if (typeof DeviceOrientationEvent === 'undefined' || !DeviceOrientationEvent.requestPermission) {\n this.permissionGranted = true;\n return;\n }\n\n this.onDeviceMotionDialogAllowClicked = bind(this.onDeviceMotionDialogAllowClicked, this);\n this.onDeviceMotionDialogDenyClicked = bind(this.onDeviceMotionDialogDenyClicked, this);\n // Show dialog only if permission has not yet been granted.\n DeviceOrientationEvent.requestPermission().catch(function () {\n self.devicePermissionDialogEl = createPermissionDialog(\n self.data.denyButtonText,\n self.data.allowButtonText,\n self.data.deviceMotionMessage,\n self.onDeviceMotionDialogAllowClicked,\n self.onDeviceMotionDialogDenyClicked);\n self.el.appendChild(self.devicePermissionDialogEl);\n }).then(function () {\n self.el.emit('deviceorientationpermissiongranted');\n self.permissionGranted = true;\n });\n },\n\n remove: function () {\n // This removes the modal screen\n if (this.devicePermissionDialogEl) { this.el.removeChild(this.devicePermissionDialogEl); }\n },\n\n onDeviceMotionDialogDenyClicked: function () {\n this.remove();\n },\n\n showMobileDesktopModeAlert: function () {\n var self = this;\n var safariIpadAlertEl = createAlertDialog(\n self.data.cancelButtonText,\n self.data.mobileDesktopMessage,\n function () { self.el.removeChild(safariIpadAlertEl); });\n this.el.appendChild(safariIpadAlertEl);\n },\n\n showHTTPAlert: function () {\n var self = this;\n var httpAlertEl = createAlertDialog(\n self.data.cancelButtonText,\n self.data.httpsMessage,\n function () { self.el.removeChild(httpAlertEl); });\n this.el.appendChild(httpAlertEl);\n },\n\n /**\n * Enable device motion permission when clicked.\n */\n onDeviceMotionDialogAllowClicked: function () {\n var self = this;\n this.el.emit('deviceorientationpermissionrequested');\n DeviceOrientationEvent.requestPermission().then(function (response) {\n if (response === 'granted') {\n self.el.emit('deviceorientationpermissiongranted');\n self.permissionGranted = true;\n } else {\n self.el.emit('deviceorientationpermissionrejected');\n }\n self.remove();\n }).catch(console.error);\n }\n});\n\n/**\n * Create a modal dialog that request users permission to access the Device Motion API.\n *\n * @param {function} onAllowClicked - click event handler\n * @param {function} onDenyClicked - click event handler\n *\n * @returns {Element} Wrapper <div>.\n */\nfunction createPermissionDialog (\n denyText, allowText, dialogText, onAllowClicked, onDenyClicked) {\n var buttonsContainer;\n var denyButton;\n var acceptButton;\n\n buttonsContainer = document.createElement('div');\n buttonsContainer.classList.add(DIALOG_BUTTONS_CONTAINER_CLASS);\n\n // Buttons\n denyButton = document.createElement('button');\n denyButton.classList.add(DIALOG_BUTTON_CLASS, DIALOG_DENY_BUTTON_CLASS);\n denyButton.setAttribute(constants.AFRAME_INJECTED, '');\n denyButton.innerHTML = denyText;\n buttonsContainer.appendChild(denyButton);\n\n acceptButton = document.createElement('button');\n acceptButton.classList.add(DIALOG_BUTTON_CLASS, DIALOG_ALLOW_BUTTON_CLASS);\n acceptButton.setAttribute(constants.AFRAME_INJECTED, '');\n acceptButton.innerHTML = allowText;\n buttonsContainer.appendChild(acceptButton);\n\n // Ask for sensor events to be used\n acceptButton.addEventListener('click', function (evt) {\n evt.stopPropagation();\n onAllowClicked();\n });\n\n denyButton.addEventListener('click', function (evt) {\n evt.stopPropagation();\n onDenyClicked();\n });\n\n return createDialog(dialogText, buttonsContainer);\n}\n\nfunction createAlertDialog (closeText, dialogText, onOkClicked) {\n var buttonsContainer;\n var okButton;\n\n buttonsContainer = document.createElement('div');\n buttonsContainer.classList.add(DIALOG_BUTTONS_CONTAINER_CLASS);\n\n // Buttons\n okButton = document.createElement('button');\n okButton.classList.add(DIALOG_BUTTON_CLASS, DIALOG_OK_BUTTON_CLASS);\n okButton.setAttribute(constants.AFRAME_INJECTED, '');\n okButton.innerHTML = closeText;\n buttonsContainer.appendChild(okButton);\n\n // Ask for sensor events to be used\n okButton.addEventListener('click', function (evt) {\n evt.stopPropagation();\n onOkClicked();\n });\n\n return createDialog(dialogText, buttonsContainer);\n}\n\nfunction createDialog (text, buttonsContainerEl) {\n var modalContainer;\n var dialog;\n var dialogTextContainer;\n var dialogText;\n\n modalContainer = document.createElement('div');\n modalContainer.classList.add(MODAL_CLASS);\n modalContainer.setAttribute(constants.AFRAME_INJECTED, '');\n\n dialog = document.createElement('div');\n dialog.className = DIALOG_CLASS;\n dialog.setAttribute(constants.AFRAME_INJECTED, '');\n modalContainer.appendChild(dialog);\n\n dialogTextContainer = document.createElement('div');\n dialogTextContainer.classList.add(DIALOG_TEXT_CONTAINER_CLASS);\n dialog.appendChild(dialogTextContainer);\n\n dialogText = document.createElement('div');\n dialogText.classList.add(DIALOG_TEXT_CLASS);\n dialogText.innerHTML = text;\n dialogTextContainer.appendChild(dialogText);\n\n dialog.appendChild(buttonsContainerEl);\n\n return modalContainer;\n}\n\n},{\"../../constants/\":123,\"../../core/component\":131,\"../../utils/\":205}],103:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\n\n/**\n * Component to embed an a-frame scene within the layout of a 2D page.\n */\nmodule.exports.Component = registerComponent('embedded', {\n dependencies: ['vr-mode-ui'],\n\n schema: {default: true},\n\n update: function () {\n var sceneEl = this.el;\n var enterVREl = sceneEl.querySelector('.a-enter-vr');\n if (this.data === true) {\n if (enterVREl) { enterVREl.classList.add('embedded'); }\n sceneEl.removeFullScreenStyles();\n } else {\n if (enterVREl) { enterVREl.classList.remove('embedded'); }\n sceneEl.addFullScreenStyles();\n }\n }\n\n});\n\n},{\"../../core/component\":131}],104:[function(_dereq_,module,exports){\nvar register = _dereq_('../../core/component').registerComponent;\nvar THREE = _dereq_('../../lib/three');\nvar debug = _dereq_('../../utils/debug');\n\nvar warn = debug('components:fog:warn');\n\n/**\n * Fog component.\n * Applies only to the scene entity.\n */\nmodule.exports.Component = register('fog', {\n schema: {\n color: {type: 'color', default: '#000'},\n density: {default: 0.00025},\n far: {default: 1000, min: 0},\n near: {default: 1, min: 0},\n type: {default: 'linear', oneOf: ['linear', 'exponential']}\n },\n\n update: function () {\n var data = this.data;\n var el = this.el;\n var fog = this.el.object3D.fog;\n\n if (!el.isScene) {\n warn('Fog component can only be applied to <a-scene>');\n return;\n }\n\n // (Re)create fog if fog doesn't exist or fog type changed.\n if (!fog || data.type !== fog.name) {\n el.object3D.fog = getFog(data);\n el.systems.material.updateMaterials();\n return;\n }\n\n // Fog data changed. Update fog.\n Object.keys(this.schema).forEach(function (key) {\n var value = data[key];\n if (key === 'color') { value = new THREE.Color(value); }\n fog[key] = value;\n });\n },\n\n /**\n * Remove fog on remove (callback).\n */\n remove: function () {\n var fog = this.el.object3D.fog;\n if (!fog) { return; }\n fog.far = 0;\n fog.near = 0.1;\n }\n});\n\n/**\n * Creates a fog object. Sets fog.name to be able to detect fog type changes.\n *\n * @param {object} data - Fog data.\n * @returns {object} fog\n */\nfunction getFog (data) {\n var fog;\n if (data.type === 'exponential') {\n fog = new THREE.FogExp2(data.color, data.density);\n } else {\n fog = new THREE.Fog(data.color, data.near, data.far);\n }\n fog.name = data.type;\n return fog;\n}\n\n},{\"../../core/component\":131,\"../../lib/three\":179,\"../../utils/debug\":201}],105:[function(_dereq_,module,exports){\n(function (process){\n/* global AFRAME */\nvar AFRAME_INJECTED = _dereq_('../../constants').AFRAME_INJECTED;\nvar pkg = _dereq_('../../../package');\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar utils = _dereq_('../../utils/');\n\n/**\n * 0.4.2 to 0.4.x\n * Will need to update this when A-Frame goes to 1.x.x.\n */\nfunction getFuzzyPatchVersion (version) {\n var split = version.split('.');\n split[2] = 'x';\n return split.join('.');\n}\n\nvar INSPECTOR_DEV_URL = 'https://aframe.io/aframe-inspector/dist/aframe-inspector.js';\nvar INSPECTOR_RELEASE_URL = 'https://unpkg.com/aframe-inspector@' + getFuzzyPatchVersion(pkg.version) + '/dist/aframe-inspector.min.js';\nvar INSPECTOR_URL = process.env.INSPECTOR_VERSION === 'dev' ? INSPECTOR_DEV_URL : INSPECTOR_RELEASE_URL;\nvar LOADING_MESSAGE = 'Loading Inspector';\nvar LOADING_ERROR_MESSAGE = 'Error loading Inspector';\n\nmodule.exports.Component = registerComponent('inspector', {\n schema: {\n url: {default: INSPECTOR_URL}\n },\n\n init: function () {\n this.firstPlay = true;\n this.onKeydown = this.onKeydown.bind(this);\n this.onMessage = this.onMessage.bind(this);\n this.initOverlay();\n window.addEventListener('keydown', this.onKeydown);\n window.addEventListener('message', this.onMessage);\n },\n\n play: function () {\n var urlParam;\n if (!this.firstPlay) { return; }\n urlParam = utils.getUrlParameter('inspector');\n if (urlParam !== 'false' && !!urlParam) {\n this.openInspector();\n this.firstPlay = false;\n }\n },\n\n initOverlay: function () {\n var dotsHTML = '<span class=\"dots\"><span>.</span><span>.</span><span>.</span></span>';\n this.loadingMessageEl = document.createElement('div');\n this.loadingMessageEl.classList.add('a-inspector-loader');\n this.loadingMessageEl.innerHTML = LOADING_MESSAGE + dotsHTML;\n },\n\n remove: function () {\n this.removeEventListeners();\n },\n\n /**\n * <ctrl> + <alt> + i keyboard shortcut.\n */\n onKeydown: function (evt) {\n var shortcutPressed = evt.keyCode === 73 && (evt.ctrlKey && evt.altKey || evt.getModifierState('AltGraph'));\n if (!shortcutPressed) { return; }\n this.openInspector();\n },\n\n showLoader: function () {\n document.body.appendChild(this.loadingMessageEl);\n },\n\n hideLoader: function () {\n document.body.removeChild(this.loadingMessageEl);\n },\n\n /**\n * postMessage. aframe.io uses this to create a button on examples to open Inspector.\n */\n onMessage: function (evt) {\n if (evt.data === 'INJECT_AFRAME_INSPECTOR') { this.openInspector(); }\n },\n\n openInspector: function (focusEl) {\n var self = this;\n var script;\n\n // Already injected. Open.\n if (AFRAME.INSPECTOR || AFRAME.inspectorInjected) {\n AFRAME.INSPECTOR.open(focusEl);\n return;\n }\n\n this.showLoader();\n\n // Inject.\n script = document.createElement('script');\n script.src = this.data.url;\n script.setAttribute('data-name', 'aframe-inspector');\n script.setAttribute(AFRAME_INJECTED, '');\n script.onload = function () {\n AFRAME.INSPECTOR.open(focusEl);\n self.hideLoader();\n self.removeEventListeners();\n };\n script.onerror = function () {\n self.loadingMessageEl.innerHTML = LOADING_ERROR_MESSAGE;\n };\n document.head.appendChild(script);\n AFRAME.inspectorInjected = true;\n },\n\n removeEventListeners: function () {\n window.removeEventListener('keydown', this.onKeydown);\n window.removeEventListener('message', this.onMessage);\n }\n});\n\n}).call(this,_dereq_('_process'))\n\n},{\"../../../package\":73,\"../../constants\":123,\"../../core/component\":131,\"../../utils/\":205,\"_process\":49}],106:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar shouldCaptureKeyEvent = _dereq_('../../utils/').shouldCaptureKeyEvent;\n\nmodule.exports.Component = registerComponent('keyboard-shortcuts', {\n schema: {\n enterVR: {default: true},\n exitVR: {default: true}\n },\n\n init: function () {\n this.onKeyup = this.onKeyup.bind(this);\n },\n\n update: function (oldData) {\n var data = this.data;\n this.enterVREnabled = data.enterVR;\n },\n\n play: function () {\n window.addEventListener('keyup', this.onKeyup, false);\n },\n\n pause: function () {\n window.removeEventListener('keyup', this.onKeyup);\n },\n\n onKeyup: function (evt) {\n var scene = this.el;\n if (!shouldCaptureKeyEvent(evt)) { return; }\n if (this.enterVREnabled && evt.keyCode === 70) { // f.\n scene.enterVR();\n }\n if (this.enterVREnabled && evt.keyCode === 27) { // escape.\n scene.exitVR();\n }\n }\n});\n\n},{\"../../core/component\":131,\"../../utils/\":205}],107:[function(_dereq_,module,exports){\nvar debug = _dereq_('../../utils/debug');\nvar registerComponent = _dereq_('../../core/component').registerComponent;\n\nvar warn = debug('components:pool:warn');\n\n/**\n * Pool component to reuse entities.\n * Avoids creating and destroying the same kind of entities.\n * Helps reduce GC pauses. For example in a game to reuse enemies entities.\n *\n * @member {array} availableEls - Available entities in the pool.\n * @member {array} usedEls - Entities of the pool in use.\n */\nmodule.exports.Component = registerComponent('pool', {\n schema: {\n container: {default: ''},\n mixin: {default: ''},\n size: {default: 0},\n dynamic: {default: false}\n },\n\n multiple: true,\n\n initPool: function () {\n var i;\n\n this.availableEls = [];\n this.usedEls = [];\n\n if (!this.data.mixin) {\n warn('No mixin provided for pool component.');\n }\n\n if (this.data.container) {\n this.container = document.querySelector(this.data.container);\n if (!this.container) {\n warn('Container ' + this.data.container + ' not found.');\n }\n }\n this.container = this.container || this.el;\n\n for (i = 0; i < this.data.size; ++i) {\n this.createEntity();\n }\n },\n\n update: function (oldData) {\n var data = this.data;\n if (oldData.mixin !== data.mixin || oldData.size !== data.size) {\n this.initPool();\n }\n },\n\n /**\n * Add a new entity to the list of available entities.\n */\n createEntity: function () {\n var el;\n el = document.createElement('a-entity');\n el.play = this.wrapPlay(el.play);\n el.setAttribute('mixin', this.data.mixin);\n el.object3D.visible = false;\n el.pause();\n this.container.appendChild(el);\n this.availableEls.push(el);\n },\n\n /**\n * Play wrapper for pooled entities. When pausing and playing a scene, don't want to play\n * entities that are not in use.\n */\n wrapPlay: function (playMethod) {\n var usedEls = this.usedEls;\n return function () {\n if (usedEls.indexOf(this) === -1) { return; }\n playMethod.call(this);\n };\n },\n\n /**\n * Used to request one of the available entities of the pool.\n */\n requestEntity: function () {\n var el;\n if (this.availableEls.length === 0) {\n if (this.data.dynamic === false) {\n warn('Requested entity from empty pool: ' + this.attrName);\n return;\n } else {\n warn('Requested entity from empty pool. This pool is dynamic and will resize ' +\n 'automatically. You might want to increase its initial size: ' + this.attrName);\n }\n this.createEntity();\n }\n el = this.availableEls.shift();\n this.usedEls.push(el);\n el.object3D.visible = true;\n return el;\n },\n\n /**\n * Used to return a used entity to the pool.\n */\n returnEntity: function (el) {\n var index = this.usedEls.indexOf(el);\n if (index === -1) {\n warn('The returned entity was not previously pooled from ' + this.attrName);\n return;\n }\n this.usedEls.splice(index, 1);\n this.availableEls.push(el);\n el.object3D.visible = false;\n el.pause();\n return el;\n }\n});\n\n},{\"../../core/component\":131,\"../../utils/debug\":201}],108:[function(_dereq_,module,exports){\n/* global ImageData, URL */\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar THREE = _dereq_('../../lib/three');\n\nvar VERTEX_SHADER = [\n 'attribute vec3 position;',\n 'attribute vec2 uv;',\n 'uniform mat4 projectionMatrix;',\n 'uniform mat4 modelViewMatrix;',\n 'varying vec2 vUv;',\n 'void main() {',\n ' vUv = vec2( 1.- uv.x, uv.y );',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );',\n '}'\n].join('\\n');\n\nvar FRAGMENT_SHADER = [\n 'precision mediump float;',\n 'uniform samplerCube map;',\n 'varying vec2 vUv;',\n '#define M_PI 3.141592653589793238462643383279',\n 'void main() {',\n ' vec2 uv = vUv;',\n ' float longitude = uv.x * 2. * M_PI - M_PI + M_PI / 2.;',\n ' float latitude = uv.y * M_PI;',\n ' vec3 dir = vec3(',\n ' - sin( longitude ) * sin( latitude ),',\n ' cos( latitude ),',\n ' - cos( longitude ) * sin( latitude )',\n ' );',\n ' normalize( dir );',\n ' gl_FragColor = vec4( textureCube( map, dir ).rgb, 1.0 );',\n '}'\n].join('\\n');\n\n/**\n * Component to take screenshots of the scene using a keboard shortcut (alt+s).\n * It can be configured to either take 360&deg; captures (`equirectangular`)\n * or regular screenshots (`projection`)\n *\n * This is based on https://github.com/spite/THREE.CubemapToEquirectangular\n * To capture an equirectangular projection of the scene a THREE.CubeCamera is used\n * The cube map produced by the CubeCamera is projected on a quad and then rendered to\n * WebGLRenderTarget with an ortographic camera.\n */\nmodule.exports.Component = registerComponent('screenshot', {\n schema: {\n width: {default: 4096},\n height: {default: 2048},\n camera: {type: 'selector'}\n },\n\n init: function () {\n var el = this.el;\n var self = this;\n\n if (el.renderer) {\n setup();\n } else {\n el.addEventListener('render-target-loaded', setup);\n }\n\n function setup () {\n var gl = el.renderer.getContext();\n if (!gl) { return; }\n self.cubeMapSize = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);\n self.material = new THREE.RawShaderMaterial({\n uniforms: {map: {type: 't', value: null}},\n vertexShader: VERTEX_SHADER,\n fragmentShader: FRAGMENT_SHADER,\n side: THREE.DoubleSide\n });\n self.quad = new THREE.Mesh(\n new THREE.PlaneBufferGeometry(1, 1),\n self.material\n );\n self.quad.visible = false;\n self.camera = new THREE.OrthographicCamera(-1 / 2, 1 / 2, 1 / 2, -1 / 2, -10000, 10000);\n self.canvas = document.createElement('canvas');\n self.ctx = self.canvas.getContext('2d');\n el.object3D.add(self.quad);\n self.onKeyDown = self.onKeyDown.bind(self);\n }\n },\n\n getRenderTarget: function (width, height) {\n return new THREE.WebGLRenderTarget(width, height, {\n minFilter: THREE.LinearFilter,\n magFilter: THREE.LinearFilter,\n wrapS: THREE.ClampToEdgeWrapping,\n wrapT: THREE.ClampToEdgeWrapping,\n format: THREE.RGBAFormat,\n type: THREE.UnsignedByteType\n });\n },\n\n resize: function (width, height) {\n // Resize quad.\n this.quad.scale.set(width, height, 1);\n\n // Resize camera.\n this.camera.left = -1 * width / 2;\n this.camera.right = width / 2;\n this.camera.top = height / 2;\n this.camera.bottom = -1 * height / 2;\n this.camera.updateProjectionMatrix();\n\n // Resize canvas.\n this.canvas.width = width;\n this.canvas.height = height;\n },\n\n play: function () {\n window.addEventListener('keydown', this.onKeyDown);\n },\n\n /**\n * <ctrl> + <alt> + s = Regular screenshot.\n * <ctrl> + <alt> + <shift> + s = Equirectangular screenshot.\n */\n onKeyDown: function (evt) {\n var shortcutPressed = evt.keyCode === 83 && evt.ctrlKey && evt.altKey;\n if (!this.data || !shortcutPressed) { return; }\n var projection = evt.shiftKey ? 'equirectangular' : 'perspective';\n this.capture(projection);\n },\n\n /**\n * Capture a screenshot of the scene.\n *\n * @param {string} projection - Screenshot projection (equirectangular or perspective).\n */\n setCapture: function (projection) {\n var el = this.el;\n var size;\n var camera;\n var cubeCamera;\n var cubeRenderTarget;\n // Configure camera.\n if (projection === 'perspective') {\n // Quad is only used in equirectangular mode. Hide it in this case.\n this.quad.visible = false;\n // Use scene camera.\n camera = (this.data.camera && this.data.camera.components.camera.camera) || el.camera;\n size = {width: this.data.width, height: this.data.height};\n } else {\n // Use ortho camera.\n camera = this.camera;\n cubeRenderTarget = new THREE.WebGLCubeRenderTarget(\n Math.min(this.cubeMapSize, 2048),\n {\n format: THREE.RGBFormat,\n generateMipmaps: true,\n minFilter: THREE.LinearMipmapLinearFilter,\n encoding: THREE.sRGBEncoding\n });\n // Create cube camera and copy position from scene camera.\n cubeCamera = new THREE.CubeCamera(el.camera.near, el.camera.far, cubeRenderTarget);\n // Copy camera position into cube camera;\n el.camera.getWorldPosition(cubeCamera.position);\n el.camera.getWorldQuaternion(cubeCamera.quaternion);\n // Render scene with cube camera.\n cubeCamera.update(el.renderer, el.object3D);\n this.quad.material.uniforms.map.value = cubeCamera.renderTarget.texture;\n size = {width: this.data.width, height: this.data.height};\n // Use quad to project image taken by the cube camera.\n this.quad.visible = true;\n }\n return {\n camera: camera,\n size: size,\n projection: projection\n };\n },\n\n /**\n * Maintained for backwards compatibility.\n */\n capture: function (projection) {\n var isVREnabled = this.el.renderer.xr.enabled;\n var renderer = this.el.renderer;\n var params;\n // Disable VR.\n renderer.xr.enabled = false;\n params = this.setCapture(projection);\n this.renderCapture(params.camera, params.size, params.projection);\n // Trigger file download.\n this.saveCapture();\n // Restore VR.\n renderer.xr.enabled = isVREnabled;\n },\n\n /**\n * Return canvas instead of triggering download (e.g., for uploading blob to server).\n */\n getCanvas: function (projection) {\n var isVREnabled = this.el.renderer.xr.enabled;\n var renderer = this.el.renderer;\n // Disable VR.\n var params = this.setCapture(projection);\n renderer.xr.enabled = false;\n this.renderCapture(params.camera, params.size, params.projection);\n // Restore VR.\n renderer.xr.enabled = isVREnabled;\n return this.canvas;\n },\n\n renderCapture: function (camera, size, projection) {\n var autoClear = this.el.renderer.autoClear;\n var el = this.el;\n var imageData;\n var output;\n var pixels;\n var renderer = el.renderer;\n // Create rendering target and buffer to store the read pixels.\n output = this.getRenderTarget(size.width, size.height);\n pixels = new Uint8Array(4 * size.width * size.height);\n // Resize quad, camera, and canvas.\n this.resize(size.width, size.height);\n // Render scene to render target.\n renderer.autoClear = true;\n renderer.clear();\n renderer.setRenderTarget(output);\n renderer.render(el.object3D, camera);\n renderer.autoClear = autoClear;\n // Read image pizels back.\n renderer.readRenderTargetPixels(output, 0, 0, size.width, size.height, pixels);\n renderer.setRenderTarget(null);\n if (projection === 'perspective') {\n pixels = this.flipPixelsVertically(pixels, size.width, size.height);\n }\n imageData = new ImageData(new Uint8ClampedArray(pixels), size.width, size.height);\n // Hide quad after projecting the image.\n this.quad.visible = false;\n // Copy pixels into canvas.\n this.ctx.putImageData(imageData, 0, 0);\n },\n\n flipPixelsVertically: function (pixels, width, height) {\n var flippedPixels = pixels.slice(0);\n for (var x = 0; x < width; ++x) {\n for (var y = 0; y < height; ++y) {\n flippedPixels[x * 4 + y * width * 4] = pixels[x * 4 + (height - y) * width * 4];\n flippedPixels[x * 4 + 1 + y * width * 4] = pixels[x * 4 + 1 + (height - y) * width * 4];\n flippedPixels[x * 4 + 2 + y * width * 4] = pixels[x * 4 + 2 + (height - y) * width * 4];\n flippedPixels[x * 4 + 3 + y * width * 4] = pixels[x * 4 + 3 + (height - y) * width * 4];\n }\n }\n return flippedPixels;\n },\n\n /**\n * Download capture to file.\n */\n saveCapture: function () {\n this.canvas.toBlob(function (blob) {\n var fileName = 'screenshot-' + document.title.toLowerCase() + '-' + Date.now() + '.png';\n var linkEl = document.createElement('a');\n var url = URL.createObjectURL(blob);\n linkEl.href = url;\n linkEl.setAttribute('download', fileName);\n linkEl.innerHTML = 'downloading...';\n linkEl.style.display = 'none';\n document.body.appendChild(linkEl);\n setTimeout(function () {\n linkEl.click();\n document.body.removeChild(linkEl);\n }, 1);\n }, 'image/png');\n }\n});\n\n},{\"../../core/component\":131,\"../../lib/three\":179}],109:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar RStats = _dereq_('../../../vendor/rStats');\nvar utils = _dereq_('../../utils');\n_dereq_('../../../vendor/rStats.extras');\n_dereq_('../../lib/rStatsAframe');\n\nvar AFrameStats = window.aframeStats;\nvar bind = utils.bind;\nvar HIDDEN_CLASS = 'a-hidden';\nvar ThreeStats = window.threeStats;\n\n/**\n * Stats appended to document.body by RStats.\n */\nmodule.exports.Component = registerComponent('stats', {\n schema: {default: true},\n\n init: function () {\n var scene = this.el;\n\n if (utils.getUrlParameter('stats') === 'false') { return; }\n\n this.stats = createStats(scene);\n this.statsEl = document.querySelector('.rs-base');\n\n this.hideBound = bind(this.hide, this);\n this.showBound = bind(this.show, this);\n\n scene.addEventListener('enter-vr', this.hideBound);\n scene.addEventListener('exit-vr', this.showBound);\n },\n\n update: function () {\n if (!this.stats) { return; }\n return (!this.data) ? this.hide() : this.show();\n },\n\n remove: function () {\n this.el.removeEventListener('enter-vr', this.hideBound);\n this.el.removeEventListener('exit-vr', this.showBound);\n if (!this.statsEl) { return; } // Scene detached.\n this.statsEl.parentNode.removeChild(this.statsEl);\n },\n\n tick: function () {\n var stats = this.stats;\n\n if (!stats) { return; }\n\n stats('rAF').tick();\n stats('FPS').frame();\n stats().update();\n },\n\n hide: function () {\n this.statsEl.classList.add(HIDDEN_CLASS);\n },\n\n show: function () {\n this.statsEl.classList.remove(HIDDEN_CLASS);\n }\n});\n\nfunction createStats (scene) {\n var threeStats = new ThreeStats(scene.renderer);\n var aframeStats = new AFrameStats(scene);\n var plugins = scene.isMobile ? [] : [threeStats, aframeStats];\n return new RStats({\n css: [], // Our stylesheet is injected from `src/index.js`.\n values: {\n fps: {caption: 'fps', below: 30}\n },\n groups: [\n {caption: 'Framerate', values: ['fps', 'raf']}\n ],\n plugins: plugins\n });\n}\n\n},{\"../../../vendor/rStats\":217,\"../../../vendor/rStats.extras\":216,\"../../core/component\":131,\"../../lib/rStatsAframe\":178,\"../../utils\":205}],110:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar constants = _dereq_('../../constants/');\nvar utils = _dereq_('../../utils/');\nvar bind = utils.bind;\n\nvar ENTER_VR_CLASS = 'a-enter-vr';\nvar ENTER_AR_CLASS = 'a-enter-ar';\nvar ENTER_VR_BTN_CLASS = 'a-enter-vr-button';\nvar ENTER_AR_BTN_CLASS = 'a-enter-ar-button';\nvar HIDDEN_CLASS = 'a-hidden';\nvar ORIENTATION_MODAL_CLASS = 'a-orientation-modal';\n\n/**\n * UI for entering VR mode.\n */\nmodule.exports.Component = registerComponent('vr-mode-ui', {\n dependencies: ['canvas'],\n\n schema: {\n enabled: {default: true},\n enterVRButton: {default: ''},\n enterARButton: {default: ''}\n },\n\n init: function () {\n var self = this;\n var sceneEl = this.el;\n\n if (utils.getUrlParameter('ui') === 'false') { return; }\n\n this.insideLoader = false;\n this.enterVREl = null;\n this.enterAREl = null;\n this.orientationModalEl = null;\n this.bindMethods();\n\n // Hide/show VR UI when entering/exiting VR mode.\n sceneEl.addEventListener('enter-vr', this.updateEnterInterfaces);\n sceneEl.addEventListener('exit-vr', this.updateEnterInterfaces);\n sceneEl.addEventListener('update-vr-devices', this.updateEnterInterfaces);\n\n window.addEventListener('message', function (event) {\n if (event.data.type === 'loaderReady') {\n self.insideLoader = true;\n self.remove();\n }\n });\n\n // Modal that tells the user to change orientation if in portrait.\n window.addEventListener('orientationchange', this.toggleOrientationModalIfNeeded);\n },\n\n bindMethods: function () {\n this.onEnterVRButtonClick = bind(this.onEnterVRButtonClick, this);\n this.onEnterARButtonClick = bind(this.onEnterARButtonClick, this);\n this.onModalClick = bind(this.onModalClick, this);\n this.toggleOrientationModalIfNeeded = bind(this.toggleOrientationModalIfNeeded, this);\n this.updateEnterInterfaces = bind(this.updateEnterInterfaces, this);\n },\n\n /**\n * Exit VR when modal clicked.\n */\n onModalClick: function () {\n this.el.exitVR();\n },\n\n /**\n * Enter VR when clicked.\n */\n onEnterVRButtonClick: function () {\n this.el.enterVR();\n },\n\n /**\n * Enter AR when clicked.\n */\n onEnterARButtonClick: function () {\n this.el.enterAR();\n },\n\n update: function () {\n var data = this.data;\n var sceneEl = this.el;\n\n if (!data.enabled || this.insideLoader || utils.getUrlParameter('ui') === 'false') {\n return this.remove();\n }\n\n if (this.enterVREl || this.enterAREl || this.orientationModalEl) { return; }\n\n // Add UI if enabled and not already present.\n if (data.enterVRButton) {\n // Custom button.\n this.enterVREl = document.querySelector(data.enterVRButton);\n this.enterVREl.addEventListener('click', this.onEnterVRButtonClick);\n } else {\n this.enterVREl = createEnterVRButton(this.onEnterVRButtonClick);\n sceneEl.appendChild(this.enterVREl);\n }\n if (data.enterARButton) {\n // Custom button.\n this.enterAREl = document.querySelector(data.enterARButton);\n this.enterAREl.addEventListener('click', this.onEnterARButtonClick);\n } else {\n this.enterAREl = createEnterARButton(this.onEnterARButtonClick);\n sceneEl.appendChild(this.enterAREl);\n }\n\n this.orientationModalEl = createOrientationModal(this.onModalClick);\n sceneEl.appendChild(this.orientationModalEl);\n\n this.updateEnterInterfaces();\n },\n\n remove: function () {\n [this.enterVREl, this.enterAREl, this.orientationModalEl].forEach(function (uiElement) {\n if (uiElement && uiElement.parentNode) {\n uiElement.parentNode.removeChild(uiElement);\n }\n });\n this.enterVREl = undefined;\n this.enterAREl = undefined;\n this.orientationModalEl = undefined;\n },\n\n updateEnterInterfaces: function () {\n this.toggleEnterVRButtonIfNeeded();\n this.toggleEnterARButtonIfNeeded();\n this.toggleOrientationModalIfNeeded();\n },\n\n toggleEnterVRButtonIfNeeded: function () {\n var sceneEl = this.el;\n if (!this.enterVREl) { return; }\n if (sceneEl.is('vr-mode')) {\n this.enterVREl.classList.add(HIDDEN_CLASS);\n } else {\n this.enterVREl.classList.remove(HIDDEN_CLASS);\n }\n },\n\n toggleEnterARButtonIfNeeded: function () {\n var sceneEl = this.el;\n if (!this.enterAREl) { return; }\n // Hide the button while in a session, or if AR is not supported.\n if (sceneEl.is('vr-mode') || !utils.device.checkARSupport()) {\n this.enterAREl.classList.add(HIDDEN_CLASS);\n } else {\n this.enterAREl.classList.remove(HIDDEN_CLASS);\n }\n },\n\n toggleOrientationModalIfNeeded: function () {\n var sceneEl = this.el;\n var orientationModalEl = this.orientationModalEl;\n if (!orientationModalEl || !sceneEl.isMobile) { return; }\n if (!utils.device.isLandscape() && sceneEl.is('vr-mode')) {\n // Show if in VR mode on portrait.\n orientationModalEl.classList.remove(HIDDEN_CLASS);\n } else {\n orientationModalEl.classList.add(HIDDEN_CLASS);\n }\n }\n});\n\n/**\n * Create a button that when clicked will enter into stereo-rendering mode for VR.\n *\n * Structure: <div><button></div>\n *\n * @param {function} onClick - click event handler\n * @returns {Element} Wrapper <div>.\n */\nfunction createEnterVRButton (onClick) {\n var vrButton;\n var wrapper;\n\n // Create elements.\n wrapper = document.createElement('div');\n wrapper.classList.add(ENTER_VR_CLASS);\n wrapper.setAttribute(constants.AFRAME_INJECTED, '');\n vrButton = document.createElement('button');\n vrButton.className = ENTER_VR_BTN_CLASS;\n vrButton.setAttribute('title',\n 'Enter VR mode with a headset or fullscreen mode on a desktop. ' +\n 'Visit https://webvr.rocks or https://webvr.info for more information.');\n vrButton.setAttribute(constants.AFRAME_INJECTED, '');\n if (utils.device.isMobile()) { applyStickyHoverFix(vrButton); }\n // Insert elements.\n wrapper.appendChild(vrButton);\n vrButton.addEventListener('click', function (evt) {\n onClick();\n evt.stopPropagation();\n });\n return wrapper;\n}\n\n/**\n * Create a button that when clicked will enter into AR mode\n *\n * Structure: <div><button></div>\n *\n * @param {function} onClick - click event handler\n * @returns {Element} Wrapper <div>.\n */\nfunction createEnterARButton (onClick) {\n var arButton;\n var wrapper;\n\n // Create elements.\n wrapper = document.createElement('div');\n wrapper.classList.add(ENTER_AR_CLASS);\n wrapper.setAttribute(constants.AFRAME_INJECTED, '');\n arButton = document.createElement('button');\n arButton.className = ENTER_AR_BTN_CLASS;\n arButton.setAttribute('title',\n 'Enter AR mode with a headset or handheld device. ' +\n 'Visit https://webvr.rocks or https://webvr.info for more information.');\n arButton.setAttribute(constants.AFRAME_INJECTED, '');\n if (utils.device.isMobile()) { applyStickyHoverFix(arButton); }\n // Insert elements.\n wrapper.appendChild(arButton);\n arButton.addEventListener('click', function (evt) {\n onClick();\n evt.stopPropagation();\n });\n return wrapper;\n}\n\n/**\n * Creates a modal dialog to request the user to switch to landscape orientation.\n *\n * @param {function} onClick - click event handler\n * @returns {Element} Wrapper <div>.\n */\nfunction createOrientationModal (onClick) {\n var modal = document.createElement('div');\n modal.className = ORIENTATION_MODAL_CLASS;\n modal.classList.add(HIDDEN_CLASS);\n modal.setAttribute(constants.AFRAME_INJECTED, '');\n\n var exit = document.createElement('button');\n exit.setAttribute(constants.AFRAME_INJECTED, '');\n exit.innerHTML = 'Exit VR';\n\n // Exit VR on close.\n exit.addEventListener('click', onClick);\n\n modal.appendChild(exit);\n\n return modal;\n}\n\n/**\n * CSS hover state is sticky in iOS (as in 12/18/2019)\n * They are not removed on mouseleave and this function applies a class\n * to resets the style.\n *\n * @param {function} buttonEl - Button element\n */\nfunction applyStickyHoverFix (buttonEl) {\n buttonEl.addEventListener('touchstart', function () {\n buttonEl.classList.remove('resethover');\n });\n buttonEl.addEventListener('touchend', function () {\n buttonEl.classList.add('resethover');\n });\n}\n\n},{\"../../constants/\":123,\"../../core/component\":131,\"../../utils/\":205}],111:[function(_dereq_,module,exports){\nvar component = _dereq_('../core/component');\nvar THREE = _dereq_('../lib/three');\nvar bind = _dereq_('../utils/bind');\nvar registerComponent = component.registerComponent;\n\n/**\n * Shadow component.\n *\n * When applied to an entity, that entity's geometry and any descendants will cast or receive\n * shadows as specified by the `cast` and `receive` properties.\n */\nmodule.exports.Component = registerComponent('shadow', {\n schema: {\n cast: {default: true},\n receive: {default: true}\n },\n\n init: function () {\n this.onMeshChanged = bind(this.update, this);\n this.el.addEventListener('object3dset', this.onMeshChanged);\n this.system.setShadowMapEnabled(true);\n },\n\n update: function () {\n var data = this.data;\n this.updateDescendants(data.cast, data.receive);\n },\n\n remove: function () {\n var el = this.el;\n el.removeEventListener('object3dset', this.onMeshChanged);\n this.updateDescendants(false, false);\n },\n\n updateDescendants: function (cast, receive) {\n var sceneEl = this.el.sceneEl;\n this.el.object3D.traverse(function (node) {\n if (!(node instanceof THREE.Mesh)) { return; }\n\n node.castShadow = cast;\n node.receiveShadow = receive;\n\n // If scene has already rendered, materials must be updated.\n if (sceneEl.hasLoaded && node.material) {\n var materials = Array.isArray(node.material) ? node.material : [node.material];\n for (var i = 0; i < materials.length; i++) {\n materials[i].needsUpdate = true;\n }\n }\n });\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/bind\":199}],112:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar debug = _dereq_('../utils/debug');\nvar THREE = _dereq_('../lib/three');\n\nvar warn = debug('components:sound:warn');\n\n/**\n * Sound component.\n */\nmodule.exports.Component = registerComponent('sound', {\n schema: {\n autoplay: {default: false},\n distanceModel: {default: 'inverse', oneOf: ['linear', 'inverse', 'exponential']},\n loop: {default: false},\n maxDistance: {default: 10000},\n on: {default: ''},\n poolSize: {default: 1},\n positional: {default: true},\n refDistance: {default: 1},\n rolloffFactor: {default: 1},\n src: {type: 'audio'},\n volume: {default: 1}\n },\n\n multiple: true,\n\n init: function () {\n var self = this;\n\n this.listener = null;\n this.audioLoader = new THREE.AudioLoader();\n this.pool = new THREE.Group();\n this.loaded = false;\n this.mustPlay = false;\n\n // Don't pass evt because playSound takes a function as parameter.\n this.playSoundBound = function () { self.playSound(); };\n },\n\n update: function (oldData) {\n var data = this.data;\n var i;\n var sound;\n var srcChanged = data.src !== oldData.src;\n\n // Create new sound if not yet created or changing `src`.\n if (srcChanged) {\n if (!data.src) { return; }\n this.setupSound();\n }\n\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n if (data.positional) {\n sound.setDistanceModel(data.distanceModel);\n sound.setMaxDistance(data.maxDistance);\n sound.setRefDistance(data.refDistance);\n sound.setRolloffFactor(data.rolloffFactor);\n }\n sound.setLoop(data.loop);\n sound.setVolume(data.volume);\n sound.isPaused = false;\n }\n\n if (data.on !== oldData.on) {\n this.updateEventListener(oldData.on);\n }\n\n // All sound values set. Load in `src`.\n if (srcChanged) {\n var self = this;\n\n this.loaded = false;\n this.audioLoader.load(data.src, function (buffer) {\n for (i = 0; i < self.pool.children.length; i++) {\n sound = self.pool.children[i];\n sound.setBuffer(buffer);\n }\n self.loaded = true;\n\n // Remove this key from cache, otherwise we can't play it again\n THREE.Cache.remove(data.src);\n if (self.data.autoplay || self.mustPlay) { self.playSound(); }\n self.el.emit('sound-loaded', self.evtDetail, false);\n });\n }\n },\n\n pause: function () {\n this.stopSound();\n this.removeEventListener();\n },\n\n play: function () {\n if (this.data.autoplay) { this.playSound(); }\n this.updateEventListener();\n },\n\n remove: function () {\n var i;\n var sound;\n\n this.removeEventListener();\n\n if (this.el.getObject3D(this.attrName)) {\n this.el.removeObject3D(this.attrName);\n }\n\n try {\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n sound.disconnect();\n }\n } catch (e) {\n // disconnect() will throw if it was never connected initially.\n warn('Audio source not properly disconnected');\n }\n },\n\n /**\n * Update listener attached to the user defined on event.\n */\n updateEventListener: function (oldEvt) {\n var el = this.el;\n if (oldEvt) { el.removeEventListener(oldEvt, this.playSoundBound); }\n el.addEventListener(this.data.on, this.playSoundBound);\n },\n\n removeEventListener: function () {\n this.el.removeEventListener(this.data.on, this.playSoundBound);\n },\n\n /**\n * Removes current sound object, creates new sound object, adds to entity.\n *\n * @returns {object} sound\n */\n setupSound: function () {\n var el = this.el;\n var i;\n var sceneEl = el.sceneEl;\n var self = this;\n var sound;\n\n if (this.pool.children.length > 0) {\n this.stopSound();\n el.removeObject3D('sound');\n }\n\n // Only want one AudioListener. Cache it on the scene.\n var listener = this.listener = sceneEl.audioListener || new THREE.AudioListener();\n sceneEl.audioListener = listener;\n\n if (sceneEl.camera) {\n sceneEl.camera.add(listener);\n }\n\n // Wait for camera if necessary.\n sceneEl.addEventListener('camera-set-active', function (evt) {\n evt.detail.cameraEl.getObject3D('camera').add(listener);\n });\n\n // Create [poolSize] audio instances and attach them to pool\n this.pool = new THREE.Group();\n for (i = 0; i < this.data.poolSize; i++) {\n sound = this.data.positional\n ? new THREE.PositionalAudio(listener)\n : new THREE.Audio(listener);\n this.pool.add(sound);\n }\n el.setObject3D(this.attrName, this.pool);\n\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n sound.onEnded = function () {\n this.isPlaying = false;\n self.el.emit('sound-ended', self.evtDetail, false);\n };\n }\n },\n\n /**\n * Pause all the sounds in the pool.\n */\n pauseSound: function () {\n var i;\n var sound;\n\n this.isPlaying = false;\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n if (!sound.source || !sound.source.buffer || !sound.isPlaying || sound.isPaused) {\n continue;\n }\n sound.isPaused = true;\n sound.pause();\n }\n },\n\n /**\n * Look for an unused sound in the pool and play it if found.\n */\n playSound: function (processSound) {\n var found;\n var i;\n var sound;\n\n if (!this.loaded) {\n warn('Sound not loaded yet. It will be played once it finished loading');\n this.mustPlay = true;\n return;\n }\n\n found = false;\n this.isPlaying = true;\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n if (!sound.isPlaying && sound.buffer && !found) {\n if (processSound) { processSound(sound); }\n sound.play();\n sound.isPaused = false;\n found = true;\n continue;\n }\n }\n\n if (!found) {\n warn('All the sounds are playing. If you need to play more sounds simultaneously ' +\n 'consider increasing the size of pool with the `poolSize` attribute.', this.el);\n return;\n }\n\n this.mustPlay = false;\n },\n\n /**\n * Stop all the sounds in the pool.\n */\n stopSound: function () {\n var i;\n var sound;\n this.isPlaying = false;\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n if (!sound.source || !sound.source.buffer) { return; }\n sound.stop();\n }\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/debug\":201}],113:[function(_dereq_,module,exports){\nvar createTextGeometry = _dereq_('three-bmfont-text');\nvar loadBMFont = _dereq_('load-bmfont');\n\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar coreShader = _dereq_('../core/shader');\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar error = utils.debug('components:text:error');\nvar shaders = coreShader.shaders;\nvar warn = utils.debug('components:text:warn');\n\n// 1 to match other A-Frame default widths.\nvar DEFAULT_WIDTH = 1;\n\n// @bryik set anisotropy to 16. Improves look of large amounts of text when viewed from angle.\nvar MAX_ANISOTROPY = 16;\n\nvar FONT_BASE_URL = 'https://cdn.aframe.io/fonts/';\nvar FONTS = {\n aileronsemibold: FONT_BASE_URL + 'Aileron-Semibold.fnt',\n dejavu: FONT_BASE_URL + 'DejaVu-sdf.fnt',\n exo2bold: FONT_BASE_URL + 'Exo2Bold.fnt',\n exo2semibold: FONT_BASE_URL + 'Exo2SemiBold.fnt',\n kelsonsans: FONT_BASE_URL + 'KelsonSans.fnt',\n monoid: FONT_BASE_URL + 'Monoid.fnt',\n mozillavr: FONT_BASE_URL + 'mozillavr.fnt',\n roboto: FONT_BASE_URL + 'Roboto-msdf.json',\n sourcecodepro: FONT_BASE_URL + 'SourceCodePro.fnt'\n};\nvar MSDF_FONTS = ['roboto'];\nvar DEFAULT_FONT = 'roboto';\nmodule.exports.FONTS = FONTS;\n\nvar cache = new PromiseCache();\nvar fontWidthFactors = {};\nvar textures = {};\n\n// Regular expression for detecting a URLs with a protocol prefix.\nvar protocolRe = /^\\w+:/;\n\n/**\n * SDF-based text component.\n * Based on https://github.com/Jam3/three-bmfont-text.\n *\n * All the stock fonts are for the `sdf` registered shader, an improved version of jam3's\n * original `sdf` shader.\n */\nmodule.exports.Component = registerComponent('text', {\n multiple: true,\n\n schema: {\n align: {type: 'string', default: 'left', oneOf: ['left', 'right', 'center']},\n alphaTest: {default: 0.5},\n // `anchor` defaults to center to match geometries.\n anchor: {default: 'center', oneOf: ['left', 'right', 'center', 'align']},\n baseline: {default: 'center', oneOf: ['top', 'center', 'bottom']},\n color: {type: 'color', default: '#FFF'},\n font: {type: 'string', default: DEFAULT_FONT},\n // `fontImage` defaults to the font name as a .png (e.g., mozillavr.fnt -> mozillavr.png).\n fontImage: {type: 'string'},\n // `height` has no default, will be populated at layout.\n height: {type: 'number'},\n letterSpacing: {type: 'number', default: 0},\n // `lineHeight` defaults to font's `lineHeight` value.\n lineHeight: {type: 'number'},\n // `negate` must be true for fonts generated with older versions of msdfgen (white background).\n negate: {type: 'boolean', default: true},\n opacity: {type: 'number', default: 1.0},\n shader: {default: 'sdf', oneOf: shaders},\n side: {default: 'front', oneOf: ['front', 'back', 'double']},\n tabSize: {default: 4},\n transparent: {default: true},\n value: {type: 'string'},\n whiteSpace: {default: 'normal', oneOf: ['normal', 'pre', 'nowrap']},\n // `width` defaults to geometry width if present, else `DEFAULT_WIDTH`.\n width: {type: 'number'},\n // `wrapCount` units are about one default font character. Wrap roughly at this number.\n wrapCount: {type: 'number', default: 40},\n // `wrapPixels` will wrap using bmfont pixel units (e.g., dejavu's is 32 pixels).\n wrapPixels: {type: 'number'},\n // `xOffset` to add padding.\n xOffset: {type: 'number', default: 0},\n // `yOffset` to adjust generated fonts from tools that may have incorrect metrics.\n yOffset: {type: 'number', default: 0},\n // `zOffset` will provide a small z offset to avoid z-fighting.\n zOffset: {type: 'number', default: 0.001}\n },\n\n init: function () {\n this.shaderData = {};\n this.geometry = createTextGeometry();\n this.createOrUpdateMaterial();\n },\n\n update: function (oldData) {\n var data = this.data;\n var font = this.currentFont;\n if (textures[data.font]) {\n this.texture = textures[data.font];\n } else {\n // Create texture per font.\n this.texture = textures[data.font] = new THREE.Texture();\n this.texture.anisotropy = MAX_ANISOTROPY;\n }\n\n // Update material.\n this.createOrUpdateMaterial();\n\n // New font. `updateFont` will later change data and layout.\n if (oldData.font !== data.font) {\n this.updateFont();\n return;\n }\n\n // Update geometry and layout.\n if (font) {\n this.updateGeometry(this.geometry, font);\n this.updateLayout();\n }\n },\n\n /**\n * Clean up geometry, material, texture, mesh, objects.\n */\n remove: function () {\n this.geometry.dispose();\n this.geometry = null;\n this.el.removeObject3D(this.attrName);\n this.material.dispose();\n this.material = null;\n this.texture.dispose();\n this.texture = null;\n if (this.shaderObject) { delete this.shaderObject; }\n },\n\n /**\n * Update the shader of the material.\n */\n createOrUpdateMaterial: function () {\n var data = this.data;\n var hasChangedShader;\n var material = this.material;\n var NewShader;\n var shaderData = this.shaderData;\n var shaderName;\n\n // Infer shader if using a stock font (or from `-msdf` filename convention).\n shaderName = data.shader;\n if (MSDF_FONTS.indexOf(data.font) !== -1 || data.font.indexOf('-msdf.') >= 0) {\n shaderName = 'msdf';\n } else if (data.font in FONTS && MSDF_FONTS.indexOf(data.font) === -1) {\n shaderName = 'sdf';\n }\n\n hasChangedShader = (this.shaderObject && this.shaderObject.name) !== shaderName;\n\n shaderData.alphaTest = data.alphaTest;\n shaderData.color = data.color;\n shaderData.map = this.texture;\n shaderData.opacity = data.opacity;\n shaderData.side = parseSide(data.side);\n shaderData.transparent = data.transparent;\n shaderData.negate = data.negate;\n\n // Shader has not changed, do an update.\n if (!hasChangedShader) {\n // Update shader material.\n this.shaderObject.update(shaderData);\n // Apparently, was not set on `init` nor `update`.\n material.transparent = shaderData.transparent;\n material.side = shaderData.side;\n return;\n }\n\n // Shader has changed. Create a shader material.\n NewShader = createShader(this.el, shaderName, shaderData);\n this.material = NewShader.material;\n this.shaderObject = NewShader.shader;\n\n // Set new shader material.\n this.material.side = shaderData.side;\n if (this.mesh) { this.mesh.material = this.material; }\n },\n\n /**\n * Load font for geometry, load font image for material, and apply.\n */\n updateFont: function () {\n var data = this.data;\n var el = this.el;\n var fontSrc;\n var geometry = this.geometry;\n var self = this;\n\n if (!data.font) { warn('No font specified. Using the default font.'); }\n\n // Make invisible during font swap.\n if (this.mesh) { this.mesh.visible = false; }\n\n // Look up font URL to use, and perform cached load.\n fontSrc = this.lookupFont(data.font || DEFAULT_FONT) || data.font;\n cache.get(fontSrc, function doLoadFont () {\n return loadFont(fontSrc, data.yOffset);\n }).then(function setFont (font) {\n var fontImgSrc;\n\n if (font.pages.length !== 1) {\n throw new Error('Currently only single-page bitmap fonts are supported.');\n }\n\n if (!fontWidthFactors[fontSrc]) {\n font.widthFactor = fontWidthFactors[font] = computeFontWidthFactor(font);\n }\n self.currentFont = font;\n // Look up font image URL to use, and perform cached load.\n fontImgSrc = self.getFontImageSrc();\n cache.get(fontImgSrc, function () {\n return loadTexture(fontImgSrc);\n }).then(function (image) {\n // Make mesh visible and apply font image as texture.\n var texture = self.texture;\n texture.image = image;\n texture.needsUpdate = true;\n textures[data.font] = texture;\n self.texture = texture;\n self.initMesh();\n self.currentFont = font;\n // Update geometry given font metrics.\n self.updateGeometry(geometry, font);\n self.updateLayout();\n self.mesh.visible = true;\n el.emit('textfontset', {font: data.font, fontObj: font});\n }).catch(function (err) {\n error(err.message);\n error(err.stack);\n });\n }).catch(function (err) {\n error(err.message);\n error(err.stack);\n });\n },\n\n initMesh: function () {\n if (this.mesh) { return; }\n this.mesh = new THREE.Mesh(this.geometry, this.material);\n this.el.setObject3D(this.attrName, this.mesh);\n },\n\n getFontImageSrc: function () {\n if (this.data.fontImage) { return this.data.fontImage; }\n var fontSrc = this.lookupFont(this.data.font || DEFAULT_FONT) || this.data.font;\n var imageSrc = this.currentFont.pages[0];\n // If the image URL contains a non-HTTP(S) protocol, assume it's an absolute\n // path on disk and try to infer the path from the font source instead.\n if (imageSrc.match(protocolRe) && imageSrc.indexOf('http') !== 0) {\n return fontSrc.replace(/(\\.fnt)|(\\.json)/, '.png');\n }\n return THREE.LoaderUtils.extractUrlBase(fontSrc) + imageSrc;\n },\n\n /**\n * Update layout with anchor, alignment, baseline, and considering any meshes.\n */\n updateLayout: function () {\n var anchor;\n var baseline;\n var el = this.el;\n var data = this.data;\n var geometry = this.geometry;\n var geometryComponent;\n var height;\n var layout;\n var mesh = this.mesh;\n var textRenderWidth;\n var textScale;\n var width;\n var x;\n var y;\n\n if (!mesh || !geometry.layout) { return; }\n\n // Determine width to use (defined width, geometry's width, or default width).\n geometryComponent = el.getAttribute('geometry');\n width = data.width || (geometryComponent && geometryComponent.width) || DEFAULT_WIDTH;\n\n // Determine wrap pixel count. Either specified or by experimental fudge factor.\n // Note that experimental factor will never be correct for variable width fonts.\n textRenderWidth = computeWidth(data.wrapPixels, data.wrapCount,\n this.currentFont.widthFactor);\n textScale = width / textRenderWidth;\n\n // Determine height to use.\n layout = geometry.layout;\n height = textScale * (layout.height + layout.descender);\n\n // Update geometry dimensions to match text layout if width and height are set to 0.\n // For example, scales a plane to fit text.\n if (geometryComponent && geometryComponent.primitive === 'plane') {\n if (!geometryComponent.width) { el.setAttribute('geometry', 'width', width); }\n if (!geometryComponent.height) { el.setAttribute('geometry', 'height', height); }\n }\n\n // Calculate X position to anchor text left, center, or right.\n anchor = data.anchor === 'align' ? data.align : data.anchor;\n if (anchor === 'left') {\n x = 0;\n } else if (anchor === 'right') {\n x = -1 * layout.width;\n } else if (anchor === 'center') {\n x = -1 * layout.width / 2;\n } else {\n throw new TypeError('Invalid text.anchor property value', anchor);\n }\n\n // Calculate Y position to anchor text top, center, or bottom.\n baseline = data.baseline;\n if (baseline === 'bottom') {\n y = 0;\n } else if (baseline === 'top') {\n y = -1 * layout.height + layout.ascender;\n } else if (baseline === 'center') {\n y = -1 * layout.height / 2;\n } else {\n throw new TypeError('Invalid text.baseline property value', baseline);\n }\n\n // Position and scale mesh to apply layout.\n mesh.position.x = x * textScale + data.xOffset;\n mesh.position.y = y * textScale;\n // Place text slightly in front to avoid Z-fighting.\n mesh.position.z = data.zOffset;\n mesh.scale.set(textScale, -1 * textScale, textScale);\n },\n\n /**\n * Grab font from the constant.\n * Set as a method for test stubbing purposes.\n */\n lookupFont: function (key) {\n return FONTS[key];\n },\n\n /**\n * Update the text geometry using `three-bmfont-text.update`.\n */\n updateGeometry: (function () {\n var geometryUpdateBase = {};\n var geometryUpdateData = {};\n var newLineRegex = /\\\\n/g;\n var tabRegex = /\\\\t/g;\n\n return function (geometry, font) {\n var data = this.data;\n\n geometryUpdateData.font = font;\n geometryUpdateData.lineHeight = data.lineHeight && isFinite(data.lineHeight)\n ? data.lineHeight\n : font.common.lineHeight;\n geometryUpdateData.text = data.value.toString().replace(newLineRegex, '\\n')\n .replace(tabRegex, '\\t');\n geometryUpdateData.width = computeWidth(data.wrapPixels, data.wrapCount,\n font.widthFactor);\n geometry.update(utils.extend(geometryUpdateBase, data, geometryUpdateData));\n };\n })()\n});\n\n/**\n * Due to using negative scale, we return the opposite side specified.\n * https://github.com/mrdoob/three.js/pull/12787/\n */\nfunction parseSide (side) {\n switch (side) {\n case 'back': {\n return THREE.FrontSide;\n }\n case 'double': {\n return THREE.DoubleSide;\n }\n default: {\n return THREE.BackSide;\n }\n }\n}\n\n/**\n * @returns {Promise}\n */\nfunction loadFont (src, yOffset) {\n return new Promise(function (resolve, reject) {\n loadBMFont(src, function (err, font) {\n if (err) {\n error('Error loading font', src);\n reject(err);\n return;\n }\n\n // Fix negative Y offsets for Roboto MSDF font from tool. Experimentally determined.\n if (src.indexOf('/Roboto-msdf.json') >= 0) { yOffset = 30; }\n if (yOffset) { font.chars.map(function doOffset (ch) { ch.yoffset += yOffset; }); }\n\n resolve(font);\n });\n });\n}\n\n/**\n * @returns {Promise}\n */\nfunction loadTexture (src) {\n return new Promise(function (resolve, reject) {\n new THREE.ImageLoader().load(src, function (image) {\n resolve(image);\n }, undefined, function () {\n error('Error loading font image', src);\n reject(null);\n });\n });\n}\n\nfunction createShader (el, shaderName, data) {\n var shader;\n var shaderObject;\n\n // Set up Shader.\n shaderObject = new shaders[shaderName].Shader();\n shaderObject.el = el;\n shaderObject.init(data);\n shaderObject.update(data);\n\n // Get material.\n shader = shaderObject.material;\n // Apparently, was not set on `init` nor `update`.\n shader.transparent = data.transparent;\n\n return {\n material: shader,\n shader: shaderObject\n };\n}\n\n/**\n * Determine wrap pixel count. Either specified or by experimental fudge factor.\n * Note that experimental factor will never be correct for variable width fonts.\n */\nfunction computeWidth (wrapPixels, wrapCount, widthFactor) {\n return wrapPixels || ((0.5 + wrapCount) * widthFactor);\n}\n\n/**\n * Compute default font width factor to use.\n */\nfunction computeFontWidthFactor (font) {\n var sum = 0;\n var digitsum = 0;\n var digits = 0;\n font.chars.map(function (ch) {\n sum += ch.xadvance;\n if (ch.id >= 48 && ch.id <= 57) {\n digits++;\n digitsum += ch.xadvance;\n }\n });\n return digits ? digitsum / digits : sum / font.chars.length;\n}\n\n/**\n * Get or create a promise given a key and promise generator.\n * @todo Move to a utility and use in other parts of A-Frame.\n */\nfunction PromiseCache () {\n var cache = this.cache = {};\n\n this.get = function (key, promiseGenerator) {\n if (key in cache) {\n return cache[key];\n }\n cache[key] = promiseGenerator();\n return cache[key];\n };\n}\n\n},{\"../core/component\":131,\"../core/shader\":141,\"../lib/three\":179,\"../utils/\":205,\"load-bmfont\":37,\"three-bmfont-text\":63}],114:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar controllerUtils = _dereq_('../utils/tracked-controls');\nvar DEFAULT_CAMERA_HEIGHT = _dereq_('../constants').DEFAULT_CAMERA_HEIGHT;\nvar THREE = _dereq_('../lib/three');\n\nvar DEFAULT_HANDEDNESS = _dereq_('../constants').DEFAULT_HANDEDNESS;\n// Vector from eyes to elbow (divided by user height).\nvar EYES_TO_ELBOW = {x: 0.175, y: -0.3, z: -0.03};\n// Vector from eyes to elbow (divided by user height).\nvar FOREARM = {x: 0, y: 0, z: -0.175};\n\n// Due to unfortunate name collision, add empty touches array to avoid Daydream error.\nvar EMPTY_DAYDREAM_TOUCHES = {touches: []};\n\nvar EVENTS = {\n AXISMOVE: 'axismove',\n BUTTONCHANGED: 'buttonchanged',\n BUTTONDOWN: 'buttondown',\n BUTTONUP: 'buttonup',\n TOUCHSTART: 'touchstart',\n TOUCHEND: 'touchend'\n};\n\n/**\n * Tracked controls component.\n * Wrap the gamepad API for pose and button states.\n * Select the appropriate controller and apply pose to the entity.\n * Observe button states and emit appropriate events.\n *\n * @property {number} controller - Index of controller in array returned by Gamepad API.\n * Only used if hand property is not set.\n * @property {string} id - Selected controller among those returned by Gamepad API.\n * @property {number} hand - If multiple controllers found with id, choose the one with the\n * given value for hand. If set, we ignore 'controller' property\n */\nmodule.exports.Component = registerComponent('tracked-controls-webvr', {\n schema: {\n autoHide: {default: true},\n controller: {default: 0},\n id: {type: 'string', default: ''},\n hand: {type: 'string', default: ''},\n idPrefix: {type: 'string', default: ''},\n orientationOffset: {type: 'vec3'},\n // Arm model parameters when not 6DoF.\n armModel: {default: false},\n headElement: {type: 'selector'}\n },\n\n init: function () {\n // Copy variables back to tracked-controls for backwards compatibility.\n // Some 3rd components rely on them.\n this.axis = this.el.components['tracked-controls'].axis = [0, 0, 0];\n this.buttonStates = this.el.components['tracked-controls'].buttonStates = {};\n this.changedAxes = [];\n this.targetControllerNumber = this.data.controller;\n\n this.axisMoveEventDetail = {axis: this.axis, changed: this.changedAxes};\n this.deltaControllerPosition = new THREE.Vector3();\n this.controllerQuaternion = new THREE.Quaternion();\n this.controllerEuler = new THREE.Euler();\n\n this.updateGamepad();\n\n this.buttonEventDetails = {};\n },\n\n tick: function (time, delta) {\n var mesh = this.el.getObject3D('mesh');\n // Update mesh animations.\n if (mesh && mesh.update) { mesh.update(delta / 1000); }\n this.updateGamepad();\n this.updatePose();\n this.updateButtons();\n },\n\n /**\n * Return default user height to use for non-6DOF arm model.\n */\n defaultUserHeight: function () {\n return DEFAULT_CAMERA_HEIGHT;\n },\n\n /**\n * Return head element to use for non-6DOF arm model.\n */\n getHeadElement: function () {\n return this.data.headElement || this.el.sceneEl.camera.el;\n },\n\n /**\n * Handle update controller match criteria (such as `id`, `idPrefix`, `hand`, `controller`)\n */\n updateGamepad: function () {\n var data = this.data;\n var controller = controllerUtils.findMatchingControllerWebVR(\n this.system.controllers,\n data.id,\n data.idPrefix,\n data.hand,\n data.controller\n );\n\n this.controller = controller;\n // Legacy handle to the controller for old components.\n this.el.components['tracked-controls'].controller = controller;\n\n if (this.data.autoHide) { this.el.object3D.visible = !!this.controller; }\n },\n\n /**\n * Applies an artificial arm model to simulate elbow to wrist positioning\n * based on the orientation of the controller.\n *\n * @param {object} controllerPosition - Existing vector to update with controller position.\n */\n applyArmModel: function (controllerPosition) {\n // Use controllerPosition and deltaControllerPosition to avoid creating variables.\n var controller = this.controller;\n var controllerEuler = this.controllerEuler;\n var controllerQuaternion = this.controllerQuaternion;\n var deltaControllerPosition = this.deltaControllerPosition;\n var hand;\n var headEl;\n var headObject3D;\n var pose;\n var userHeight;\n\n headEl = this.getHeadElement();\n headObject3D = headEl.object3D;\n userHeight = this.defaultUserHeight();\n\n pose = controller.pose;\n hand = (controller ? controller.hand : undefined) || DEFAULT_HANDEDNESS;\n\n // Use camera position as head position.\n controllerPosition.copy(headObject3D.position);\n // Set offset for degenerate \"arm model\" to elbow.\n deltaControllerPosition.set(\n EYES_TO_ELBOW.x * (hand === 'left' ? -1 : hand === 'right' ? 1 : 0),\n EYES_TO_ELBOW.y, // Lower than our eyes.\n EYES_TO_ELBOW.z); // Slightly out in front.\n // Scale offset by user height.\n deltaControllerPosition.multiplyScalar(userHeight);\n // Apply camera Y rotation (not X or Z, so you can look down at your hand).\n deltaControllerPosition.applyAxisAngle(headObject3D.up, headObject3D.rotation.y);\n // Apply rotated offset to position.\n controllerPosition.add(deltaControllerPosition);\n\n // Set offset for degenerate \"arm model\" forearm. Forearm sticking out from elbow.\n deltaControllerPosition.set(FOREARM.x, FOREARM.y, FOREARM.z);\n // Scale offset by user height.\n deltaControllerPosition.multiplyScalar(userHeight);\n // Apply controller X/Y rotation (tilting up/down/left/right is usually moving the arm).\n if (pose.orientation) {\n controllerQuaternion.fromArray(pose.orientation);\n } else {\n controllerQuaternion.copy(headObject3D.quaternion);\n }\n controllerEuler.setFromQuaternion(controllerQuaternion);\n controllerEuler.set(controllerEuler.x, controllerEuler.y, 0);\n deltaControllerPosition.applyEuler(controllerEuler);\n // Apply rotated offset to position.\n controllerPosition.add(deltaControllerPosition);\n },\n\n /**\n * Read pose from controller (from Gamepad API), apply transforms, apply to entity.\n */\n updatePose: function () {\n var controller = this.controller;\n var data = this.data;\n var object3D = this.el.object3D;\n var pose;\n var vrDisplay = this.system.vrDisplay;\n var standingMatrix;\n\n if (!controller) { return; }\n\n // Compose pose from Gamepad.\n pose = controller.pose;\n\n if (pose.position) {\n object3D.position.fromArray(pose.position);\n } else {\n // Controller not 6DOF, apply arm model.\n if (data.armModel) { this.applyArmModel(object3D.position); }\n }\n\n if (pose.orientation) {\n object3D.quaternion.fromArray(pose.orientation);\n }\n\n // Apply transforms, if 6DOF and in VR.\n if (vrDisplay && pose.position) {\n standingMatrix = this.el.sceneEl.renderer.xr.getStandingMatrix();\n object3D.matrix.compose(object3D.position, object3D.quaternion, object3D.scale);\n object3D.matrix.multiplyMatrices(standingMatrix, object3D.matrix);\n object3D.matrix.decompose(object3D.position, object3D.quaternion, object3D.scale);\n }\n\n object3D.rotateX(this.data.orientationOffset.x * THREE.Math.DEG2RAD);\n object3D.rotateY(this.data.orientationOffset.y * THREE.Math.DEG2RAD);\n object3D.rotateZ(this.data.orientationOffset.z * THREE.Math.DEG2RAD);\n },\n\n /**\n * Handle button changes including axes, presses, touches, values.\n */\n updateButtons: function () {\n var buttonState;\n var controller = this.controller;\n var id;\n\n if (!controller) { return; }\n\n // Check every button.\n for (id = 0; id < controller.buttons.length; ++id) {\n // Initialize button state.\n if (!this.buttonStates[id]) {\n this.buttonStates[id] = {pressed: false, touched: false, value: 0};\n }\n if (!this.buttonEventDetails[id]) {\n this.buttonEventDetails[id] = {id: id, state: this.buttonStates[id]};\n }\n\n buttonState = controller.buttons[id];\n this.handleButton(id, buttonState);\n }\n // Check axes.\n this.handleAxes();\n },\n\n /**\n * Handle presses and touches for a single button.\n *\n * @param {number} id - Index of button in Gamepad button array.\n * @param {number} buttonState - Value of button state from 0 to 1.\n * @returns {boolean} Whether button has changed in any way.\n */\n handleButton: function (id, buttonState) {\n var changed;\n changed = this.handlePress(id, buttonState) |\n this.handleTouch(id, buttonState) |\n this.handleValue(id, buttonState);\n if (!changed) { return false; }\n this.el.emit(EVENTS.BUTTONCHANGED, this.buttonEventDetails[id], false);\n return true;\n },\n\n /**\n * An axis is an array of values from -1 (up, left) to 1 (down, right).\n * Compare each component of the axis to the previous value to determine change.\n *\n * @returns {boolean} Whether axes changed.\n */\n handleAxes: function () {\n var changed = false;\n var controllerAxes = this.controller.axes;\n var i;\n var previousAxis = this.axis;\n var changedAxes = this.changedAxes;\n\n // Check if axis changed.\n this.changedAxes.splice(0, this.changedAxes.length);\n for (i = 0; i < controllerAxes.length; ++i) {\n changedAxes.push(previousAxis[i] !== controllerAxes[i]);\n if (changedAxes[i]) { changed = true; }\n }\n if (!changed) { return false; }\n\n this.axis.splice(0, this.axis.length);\n for (i = 0; i < controllerAxes.length; i++) {\n this.axis.push(controllerAxes[i]);\n }\n this.el.emit(EVENTS.AXISMOVE, this.axisMoveEventDetail, false);\n return true;\n },\n\n /**\n * Determine whether a button press has occured and emit events as appropriate.\n *\n * @param {string} id - ID of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button press state changed.\n */\n handlePress: function (id, buttonState) {\n var evtName;\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.pressed === previousButtonState.pressed) { return false; }\n\n evtName = buttonState.pressed ? EVENTS.BUTTONDOWN : EVENTS.BUTTONUP;\n this.el.emit(evtName, this.buttonEventDetails[id], false);\n previousButtonState.pressed = buttonState.pressed;\n return true;\n },\n\n /**\n * Determine whether a button touch has occured and emit events as appropriate.\n *\n * @param {string} id - ID of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button touch state changed.\n */\n handleTouch: function (id, buttonState) {\n var evtName;\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.touched === previousButtonState.touched) { return false; }\n\n evtName = buttonState.touched ? EVENTS.TOUCHSTART : EVENTS.TOUCHEND;\n this.el.emit(evtName, this.buttonEventDetails[id], false, EMPTY_DAYDREAM_TOUCHES);\n previousButtonState.touched = buttonState.touched;\n return true;\n },\n\n /**\n * Determine whether a button value has changed.\n *\n * @param {string} id - Id of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button value changed.\n */\n handleValue: function (id, buttonState) {\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.value === previousButtonState.value) { return false; }\n\n previousButtonState.value = buttonState.value;\n return true;\n }\n});\n\n},{\"../constants\":123,\"../core/component\":131,\"../lib/three\":179,\"../utils/tracked-controls\":214}],115:[function(_dereq_,module,exports){\nvar controllerUtils = _dereq_('../utils/tracked-controls');\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nvar EVENTS = {\n AXISMOVE: 'axismove',\n BUTTONCHANGED: 'buttonchanged',\n BUTTONDOWN: 'buttondown',\n BUTTONUP: 'buttonup',\n TOUCHSTART: 'touchstart',\n TOUCHEND: 'touchend'\n};\n\nmodule.exports.Component = registerComponent('tracked-controls-webxr', {\n schema: {\n id: {type: 'string', default: ''},\n hand: {type: 'string', default: ''},\n handTrackingEnabled: {default: false},\n index: {type: 'int', default: -1},\n iterateControllerProfiles: {default: false}\n },\n\n init: function () {\n this.updateController = this.updateController.bind(this);\n this.buttonEventDetails = {};\n this.buttonStates = this.el.components['tracked-controls'].buttonStates = {};\n this.axis = this.el.components['tracked-controls'].axis = [0, 0, 0];\n this.changedAxes = [];\n this.axisMoveEventDetail = {axis: this.axis, changed: this.changedAxes};\n },\n\n update: function () {\n this.updateController();\n },\n\n play: function () {\n var sceneEl = this.el.sceneEl;\n this.updateController();\n sceneEl.addEventListener('controllersupdated', this.updateController);\n },\n\n pause: function () {\n var sceneEl = this.el.sceneEl;\n sceneEl.removeEventListener('controllersupdated', this.updateController);\n },\n\n isControllerPresent: function (evt) {\n if (!this.controller || this.controller.gamepad) { return false; }\n if (evt.inputSource.handedness !== 'none' &&\n evt.inputSource.handedness !== this.data.hand) {\n return false;\n }\n return true;\n },\n\n /**\n * Handle update controller match criteria (such as `id`, `idPrefix`, `hand`, `controller`)\n */\n updateController: function () {\n this.controller = controllerUtils.findMatchingControllerWebXR(\n this.system.controllers,\n this.data.id,\n this.data.hand,\n this.data.index,\n this.data.iterateControllerProfiles,\n this.data.handTrackingEnabled\n );\n // Legacy handle to the controller for old components.\n this.el.components['tracked-controls'].controller = this.controller;\n if (this.data.autoHide) { this.el.object3D.visible = !!this.controller; }\n },\n\n tick: function () {\n var sceneEl = this.el.sceneEl;\n var controller = this.controller;\n var frame = sceneEl.frame;\n if (!controller || !sceneEl.frame || !this.system.referenceSpace) { return; }\n if (!controller.hand) {\n this.pose = frame.getPose(controller.targetRaySpace, this.system.referenceSpace);\n this.updatePose();\n this.updateButtons();\n }\n },\n\n updatePose: function () {\n var object3D = this.el.object3D;\n var pose = this.pose;\n if (!pose) { return; }\n object3D.matrix.elements = pose.transform.matrix;\n object3D.matrix.decompose(object3D.position, object3D.rotation, object3D.scale);\n },\n\n /**\n * Handle button changes including axes, presses, touches, values.\n */\n updateButtons: function () {\n var buttonState;\n var id;\n var controller = this.controller;\n var gamepad;\n if (!controller || !controller.gamepad) { return; }\n\n gamepad = controller.gamepad;\n // Check every button.\n for (id = 0; id < gamepad.buttons.length; ++id) {\n // Initialize button state.\n if (!this.buttonStates[id]) {\n this.buttonStates[id] = {pressed: false, touched: false, value: 0};\n }\n if (!this.buttonEventDetails[id]) {\n this.buttonEventDetails[id] = {id: id, state: this.buttonStates[id]};\n }\n\n buttonState = gamepad.buttons[id];\n this.handleButton(id, buttonState);\n }\n // Check axes.\n this.handleAxes();\n },\n\n /**\n * Handle presses and touches for a single button.\n *\n * @param {number} id - Index of button in Gamepad button array.\n * @param {number} buttonState - Value of button state from 0 to 1.\n * @returns {boolean} Whether button has changed in any way.\n */\n handleButton: function (id, buttonState) {\n var changed;\n changed = this.handlePress(id, buttonState) |\n this.handleTouch(id, buttonState) |\n this.handleValue(id, buttonState);\n if (!changed) { return false; }\n this.el.emit(EVENTS.BUTTONCHANGED, this.buttonEventDetails[id], false);\n return true;\n },\n\n /**\n * An axis is an array of values from -1 (up, left) to 1 (down, right).\n * Compare each component of the axis to the previous value to determine change.\n *\n * @returns {boolean} Whether axes changed.\n */\n handleAxes: function () {\n var changed = false;\n var controllerAxes = this.controller.gamepad.axes;\n var i;\n var previousAxis = this.axis;\n var changedAxes = this.changedAxes;\n\n // Check if axis changed.\n this.changedAxes.splice(0, this.changedAxes.length);\n for (i = 0; i < controllerAxes.length; ++i) {\n changedAxes.push(previousAxis[i] !== controllerAxes[i]);\n if (changedAxes[i]) { changed = true; }\n }\n if (!changed) { return false; }\n\n this.axis.splice(0, this.axis.length);\n for (i = 0; i < controllerAxes.length; i++) {\n this.axis.push(controllerAxes[i]);\n }\n this.el.emit(EVENTS.AXISMOVE, this.axisMoveEventDetail, false);\n return true;\n },\n\n /**\n * Determine whether a button press has occured and emit events as appropriate.\n *\n * @param {string} id - ID of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button press state changed.\n */\n handlePress: function (id, buttonState) {\n var evtName;\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.pressed === previousButtonState.pressed) { return false; }\n\n evtName = buttonState.pressed ? EVENTS.BUTTONDOWN : EVENTS.BUTTONUP;\n this.el.emit(evtName, this.buttonEventDetails[id], false);\n previousButtonState.pressed = buttonState.pressed;\n return true;\n },\n\n /**\n * Determine whether a button touch has occured and emit events as appropriate.\n *\n * @param {string} id - ID of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button touch state changed.\n */\n handleTouch: function (id, buttonState) {\n var evtName;\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.touched === previousButtonState.touched) { return false; }\n\n evtName = buttonState.touched ? EVENTS.TOUCHSTART : EVENTS.TOUCHEND;\n this.el.emit(evtName, this.buttonEventDetails[id], false);\n previousButtonState.touched = buttonState.touched;\n return true;\n },\n\n /**\n * Determine whether a button value has changed.\n *\n * @param {string} id - Id of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button value changed.\n */\n handleValue: function (id, buttonState) {\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.value === previousButtonState.value) { return false; }\n\n previousButtonState.value = buttonState.value;\n return true;\n }\n});\n\n},{\"../core/component\":131,\"../utils/tracked-controls\":214}],116:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\n/**\n * Tracked controls.\n * Abstract controls that decide if the WebVR or WebXR version is going to be applied.\n *\n * @property {number} controller - Index of controller in array returned by Gamepad API.\n * Only used if hand property is not set.\n * @property {string} id - Selected controller among those returned by Gamepad API.\n * @property {number} hand - If multiple controllers found with id, choose the one with the\n * given value for hand. If set, we ignore 'controller' property\n */\nmodule.exports.Component = registerComponent('tracked-controls', {\n schema: {\n autoHide: {default: true},\n controller: {default: -1},\n id: {type: 'string', default: ''},\n hand: {type: 'string', default: ''},\n idPrefix: {type: 'string', default: ''},\n handTrackingEnabled: {default: false},\n orientationOffset: {type: 'vec3'},\n // Arm model parameters when not 6DoF.\n armModel: {default: false},\n headElement: {type: 'selector'},\n iterateControllerProfiles: {default: false}\n },\n\n update: function () {\n var data = this.data;\n var el = this.el;\n if (el.sceneEl.hasWebXR) {\n el.setAttribute('tracked-controls-webxr', {\n id: data.id,\n hand: data.hand,\n index: data.controller,\n iterateControllerProfiles: data.iterateControllerProfiles,\n handTrackingEnabled: data.handTrackingEnabled\n });\n } else {\n el.setAttribute('tracked-controls-webvr', data);\n }\n }\n});\n\n},{\"../core/component\":131}],117:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\nvar THREE = _dereq_('../lib/three');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar INDEX_CONTROLLER_MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/valve/index/valve-index-';\nvar INDEX_CONTROLLER_MODEL_URL = {\n left: INDEX_CONTROLLER_MODEL_BASE_URL + 'left.glb',\n right: INDEX_CONTROLLER_MODEL_BASE_URL + 'right.glb'\n};\n\nvar GAMEPAD_ID_PREFIX = 'valve';\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar INDEX_CONTROLLER_POSITION_OFFSET_WEBVR = {\n left: {x: -0.00023692678902063457, y: 0.04724540367838371, z: -0.061959880395271096},\n right: {x: 0.002471558599671131, y: 0.055765208987076195, z: -0.061068168708348844}\n};\n\nvar INDEX_CONTROLLER_POSITION_OFFSET_WEBXR = {\n left: {x: 0, y: -0.05, z: 0.06},\n right: {x: 0, y: -0.05, z: 0.06}\n};\n\nvar INDEX_CONTROLLER_ROTATION_OFFSET_WEBVR = {\n left: {_x: 0.692295102620542, _y: -0.0627618864318427, _z: -0.06265893149611756, _order: 'XYZ'},\n right: {_x: 0.6484021229942998, _y: -0.032563619881892894, _z: -0.1327973171917482, _order: 'XYZ'}\n};\n\nvar INDEX_CONTROLLER_ROTATION_OFFSET_WEBXR = {\n left: {_x: Math.PI / 3, _y: 0, _z: 0, _order: 'XYZ'},\n right: {_x: Math.PI / 3, _y: 0, _z: 0, _order: 'XYZ'}\n};\n\nvar INDEX_CONTROLLER_ROTATION_OFFSET = isWebXRAvailable ? INDEX_CONTROLLER_ROTATION_OFFSET_WEBXR : INDEX_CONTROLLER_ROTATION_OFFSET_WEBVR;\n\nvar INDEX_CONTROLLER_POSITION_OFFSET = isWebXRAvailable ? INDEX_CONTROLLER_POSITION_OFFSET_WEBXR : INDEX_CONTROLLER_POSITION_OFFSET_WEBVR;\n/**\n * Vive controls.\n * Interface with Vive controllers and map Gamepad events to controller buttons:\n * trackpad, trigger, grip, menu, system\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('valve-index-controls', {\n schema: {\n hand: {default: 'left'},\n buttonColor: {type: 'color', default: '#FAFAFA'}, // Off-white.\n buttonHighlightColor: {type: 'color', default: '#22D1EE'}, // Light blue.\n model: {default: true},\n orientationOffset: {type: 'vec3'}\n },\n\n mapping: {\n axes: {\n trackpad: [0, 1],\n thumbstick: [2, 3]\n },\n buttons: ['trigger', 'grip', 'trackpad', 'thumbstick', 'abutton']\n },\n\n init: function () {\n var self = this;\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.previousButtonValues = {};\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n\n this.bindMethods();\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n /**\n * Once OpenVR returns correct hand data in supporting browsers, we can use hand property.\n * var isPresent = checkControllerPresentAndSetup(this.el.sceneEl, GAMEPAD_ID_PREFIX,\n { hand: data.hand });\n * Until then, use hardcoded index.\n */\n checkIfControllerPresent: function () {\n var data = this.data;\n var controllerIndex = data.hand === 'right' ? 0 : data.hand === 'left' ? 1 : 2;\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {index: controllerIndex, iterateControllerProfiles: true, hand: data.hand});\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n\n // If we have an OpenVR Gamepad, use the fixed mapping.\n el.setAttribute('tracked-controls', {\n idPrefix: GAMEPAD_ID_PREFIX,\n // Hand IDs: 1 = right, 0 = left, 2 = anything else.\n controller: data.hand === 'right' ? 1 : data.hand === 'left' ? 0 : 2,\n hand: data.hand,\n orientationOffset: data.orientationOffset\n });\n\n this.loadModel();\n },\n\n loadModel: function () {\n var data = this.data;\n if (!data.model) { return; }\n this.el.setAttribute('gltf-model', '' + INDEX_CONTROLLER_MODEL_URL[data.hand] + '');\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n /**\n * Rotate the trigger button based on how hard the trigger is pressed.\n */\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n var buttonMeshes = this.buttonMeshes;\n var analogValue;\n\n if (!button) { return; }\n\n if (button === 'trigger') {\n analogValue = evt.detail.state.value;\n // Update trigger rotation depending on button value.\n if (buttonMeshes && buttonMeshes.trigger) {\n buttonMeshes.trigger.rotation.x = this.triggerOriginalRotationX - analogValue * (Math.PI / 40);\n }\n }\n\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onModelLoaded: function (evt) {\n var buttonMeshes;\n var controllerObject3D = evt.detail.model;\n var self = this;\n\n if (!this.data.model) { return; }\n\n // Store button meshes object to be able to change their colors.\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.grip = {\n left: controllerObject3D.getObjectByName('leftgrip'),\n right: controllerObject3D.getObjectByName('rightgrip')\n };\n buttonMeshes.menu = controllerObject3D.getObjectByName('menubutton');\n buttonMeshes.system = controllerObject3D.getObjectByName('systembutton');\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('touchpad');\n buttonMeshes.trigger = controllerObject3D.getObjectByName('trigger');\n this.triggerOriginalRotationX = buttonMeshes.trigger.rotation.x;\n\n // Set default colors.\n Object.keys(buttonMeshes).forEach(function (buttonName) {\n self.setButtonColor(buttonName, self.data.buttonColor);\n });\n\n // Offset pivot point.\n controllerObject3D.position.copy(INDEX_CONTROLLER_POSITION_OFFSET[this.data.hand]);\n controllerObject3D.rotation.copy(INDEX_CONTROLLER_ROTATION_OFFSET[this.data.hand]);\n\n this.el.emit('controllermodelready', {\n name: 'valve-index-controlls',\n model: this.data.model,\n rayOrigin: new THREE.Vector3(0, 0, 0)\n });\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n var color;\n var isTouch;\n if (!this.data.model) { return; }\n\n isTouch = evtName.indexOf('touch') !== -1;\n // Don't change color for trackpad touch.\n if (isTouch) { return; }\n\n // Update colors.\n color = evtName === 'up' ? this.data.buttonColor : this.data.buttonHighlightColor;\n this.setButtonColor(buttonName, color);\n },\n setButtonColor: function (buttonName, color) {\n // TODO: The meshes aren't set up correctly now, skipping for the moment\n return;\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],118:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\n/**\n * Visibility component.\n */\nmodule.exports.Component = registerComponent('visible', {\n schema: {default: true},\n\n update: function () {\n this.el.object3D.visible = this.data;\n }\n});\n\n},{\"../core/component\":131}],119:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar VIVE_CONTROLLER_MODEL_OBJ_URL = 'https://cdn.aframe.io/controllers/vive/vr_controller_vive.obj';\nvar VIVE_CONTROLLER_MODEL_OBJ_MTL = 'https://cdn.aframe.io/controllers/vive/vr_controller_vive.mtl';\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'htc-vive-controller-mv';\nvar GAMEPAD_ID_WEBVR = 'OpenVR ';\n\n// Prefix for Gen1 and Gen2 Oculus Touch Controllers.\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n/**\n * Button IDs:\n * 0 - trackpad\n * 1 - trigger (intensity value from 0.5 to 1)\n * 2 - grip\n * 3 - menu (dispatch but better for menu options)\n * 4 - system (never dispatched on this layer)\n */\nvar INPUT_MAPPING_WEBVR = {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'trigger', 'grip', 'menu', 'system']\n};\n\n/**\n * Button IDs:\n * 0 - trigger\n * 1 - squeeze\n * 2 - touchpad\n * 3 - none (dispatch but better for menu options)\n * 4 - menu (never dispatched on this layer)\n *\n * Axis:\n * 0 - touchpad x axis\n * 1 - touchpad y axis\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/htc/htc-vive.json\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {thumbstick: [0, 1]},\n buttons: ['trigger', 'grip', 'trackpad', 'none', 'menu']\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Vive controls.\n * Interface with Vive controllers and map Gamepad events to controller buttons:\n * trackpad, trigger, grip, menu, system\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('vive-controls', {\n schema: {\n hand: {default: 'left'},\n buttonColor: {type: 'color', default: '#FAFAFA'}, // Off-white.\n buttonHighlightColor: {type: 'color', default: '#22D1EE'}, // Light blue.\n model: {default: true},\n orientationOffset: {type: 'vec3'}\n },\n\n mapping: INPUT_MAPPING,\n\n init: function () {\n var self = this;\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.previousButtonValues = {};\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n\n this.bindMethods();\n },\n\n update: function () {\n var data = this.data;\n this.controllerIndex = data.hand === 'right' ? 0 : data.hand === 'left' ? 1 : 2;\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n /**\n * Once OpenVR returns correct hand data in supporting browsers, we can use hand property.\n * var isPresent = checkControllerPresentAndSetup(this.el.sceneEl, GAMEPAD_ID_PREFIX,\n { hand: data.hand });\n * Until then, use hardcoded index.\n */\n checkIfControllerPresent: function () {\n var data = this.data;\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {index: this.controllerIndex, hand: data.hand});\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n\n // If we have an OpenVR Gamepad, use the fixed mapping.\n el.setAttribute('tracked-controls', {\n idPrefix: GAMEPAD_ID_PREFIX,\n hand: data.hand,\n controller: this.controllerIndex,\n orientationOffset: data.orientationOffset\n });\n\n // Load model.\n if (!this.data.model) { return; }\n this.el.setAttribute('obj-model', {\n obj: VIVE_CONTROLLER_MODEL_OBJ_URL,\n mtl: VIVE_CONTROLLER_MODEL_OBJ_MTL\n });\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n /**\n * Rotate the trigger button based on how hard the trigger is pressed.\n */\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n var buttonMeshes = this.buttonMeshes;\n var analogValue;\n\n if (!button) { return; }\n\n if (button === 'trigger') {\n analogValue = evt.detail.state.value;\n // Update trigger rotation depending on button value.\n if (buttonMeshes && buttonMeshes.trigger) {\n buttonMeshes.trigger.rotation.x = -analogValue * (Math.PI / 12);\n }\n }\n\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onModelLoaded: function (evt) {\n var buttonMeshes;\n var controllerObject3D = evt.detail.model;\n var self = this;\n\n if (!this.data.model) { return; }\n\n // Store button meshes object to be able to change their colors.\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.grip = {\n left: controllerObject3D.getObjectByName('leftgrip'),\n right: controllerObject3D.getObjectByName('rightgrip')\n };\n buttonMeshes.menu = controllerObject3D.getObjectByName('menubutton');\n buttonMeshes.system = controllerObject3D.getObjectByName('systembutton');\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('touchpad');\n buttonMeshes.trigger = controllerObject3D.getObjectByName('trigger');\n\n // Set default colors.\n Object.keys(buttonMeshes).forEach(function (buttonName) {\n self.setButtonColor(buttonName, self.data.buttonColor);\n });\n\n // Offset pivot point.\n controllerObject3D.position.set(0, -0.015, 0.04);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n var color;\n var isTouch;\n if (!this.data.model) { return; }\n\n isTouch = evtName.indexOf('touch') !== -1;\n // Don't change color for trackpad touch.\n if (isTouch) { return; }\n\n // Update colors.\n color = evtName === 'up' ? this.data.buttonColor : this.data.buttonHighlightColor;\n this.setButtonColor(buttonName, color);\n },\n\n setButtonColor: function (buttonName, color) {\n var buttonMeshes = this.buttonMeshes;\n var rendererSystem = this.rendererSystem;\n\n if (!buttonMeshes) { return; }\n\n // Need to do both left and right sides for grip.\n if (buttonName === 'grip') {\n buttonMeshes.grip.left.material.color.set(color);\n buttonMeshes.grip.right.material.color.set(color);\n rendererSystem.applyColorCorrection(buttonMeshes.grip.left.material.color);\n rendererSystem.applyColorCorrection(buttonMeshes.grip.right.material.color);\n return;\n }\n buttonMeshes[buttonName].material.color.set(color);\n rendererSystem.applyColorCorrection(buttonMeshes[buttonName].material.color);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],120:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar GAMEPAD_ID_PREFIX = 'HTC Vive Focus';\n\nvar VIVE_FOCUS_CONTROLLER_MODEL_URL = 'https://cdn.aframe.io/controllers/vive/focus-controller/focus-controller.gltf';\n\n/**\n * Vive Focus controls.\n * Interface with Vive Focus controller and map Gamepad events to\n * controller buttons: trackpad, trigger\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('vive-focus-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n buttonTouchedColor: {type: 'color', default: '#BBBBBB'},\n buttonHighlightColor: {type: 'color', default: '#7A7A7A'},\n model: {default: true},\n orientationOffset: {type: 'vec3'},\n armModel: {default: true}\n },\n\n /**\n * Button IDs:\n * 0 - trackpad\n * 1 - trigger\n */\n mapping: {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'trigger']\n },\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n this.addControllersUpdateListener();\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n this.removeControllersUpdateListener();\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX,\n this.data.hand ? {hand: this.data.hand} : {});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n armModel: data.armModel,\n idPrefix: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset\n });\n if (!this.data.model) { return; }\n this.el.setAttribute('gltf-model', VIVE_FOCUS_CONTROLLER_MODEL_URL);\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n var buttonMeshes;\n\n if (!this.data.model) { return; }\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.trigger = controllerObject3D.getObjectByName('BumperKey');\n buttonMeshes.triggerPressed = controllerObject3D.getObjectByName('BumperKey_Press');\n if (buttonMeshes.triggerPressed) {\n buttonMeshes.triggerPressed.visible = false;\n }\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('TouchPad');\n buttonMeshes.trackpadPressed = controllerObject3D.getObjectByName('TouchPad_Press');\n if (buttonMeshes.trackpadPressed) {\n buttonMeshes.trackpadPressed.visible = false;\n }\n },\n\n // No analog buttons, only emits 0/1 values\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var buttonMeshes = this.buttonMeshes;\n var pressedName = buttonName + 'Pressed';\n if (!buttonMeshes || !buttonMeshes[buttonName] || !buttonMeshes[pressedName]) {\n return;\n }\n var color;\n switch (state) {\n case 'down':\n color = this.data.buttonHighlightColor;\n break;\n case 'touchstart':\n color = this.data.buttonTouchedColor;\n break;\n }\n if (color) {\n buttonMeshes[pressedName].material.color.set(color);\n }\n buttonMeshes[pressedName].visible = !!color;\n buttonMeshes[buttonName].visible = !color;\n }\n});\n\n},{\"../core/component\":131,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],121:[function(_dereq_,module,exports){\nvar KEYCODE_TO_CODE = _dereq_('../constants').keyboardevent.KEYCODE_TO_CODE;\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar bind = utils.bind;\nvar shouldCaptureKeyEvent = utils.shouldCaptureKeyEvent;\n\nvar CLAMP_VELOCITY = 0.00001;\nvar MAX_DELTA = 0.2;\nvar KEYS = [\n 'KeyW', 'KeyA', 'KeyS', 'KeyD',\n 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown'\n];\n\n/**\n * WASD component to control entities using WASD keys.\n */\nmodule.exports.Component = registerComponent('wasd-controls', {\n schema: {\n acceleration: {default: 65},\n adAxis: {default: 'x', oneOf: ['x', 'y', 'z']},\n adEnabled: {default: true},\n adInverted: {default: false},\n enabled: {default: true},\n fly: {default: false},\n wsAxis: {default: 'z', oneOf: ['x', 'y', 'z']},\n wsEnabled: {default: true},\n wsInverted: {default: false}\n },\n\n init: function () {\n // To keep track of the pressed keys.\n this.keys = {};\n this.easing = 1.1;\n\n this.velocity = new THREE.Vector3();\n\n // Bind methods and add event listeners.\n this.onBlur = bind(this.onBlur, this);\n this.onContextMenu = bind(this.onContextMenu, this);\n this.onFocus = bind(this.onFocus, this);\n this.onKeyDown = bind(this.onKeyDown, this);\n this.onKeyUp = bind(this.onKeyUp, this);\n this.onVisibilityChange = bind(this.onVisibilityChange, this);\n this.attachVisibilityEventListeners();\n },\n\n tick: function (time, delta) {\n var data = this.data;\n var el = this.el;\n var velocity = this.velocity;\n\n if (!velocity[data.adAxis] && !velocity[data.wsAxis] &&\n isEmptyObject(this.keys)) { return; }\n\n // Update velocity.\n delta = delta / 1000;\n this.updateVelocity(delta);\n\n if (!velocity[data.adAxis] && !velocity[data.wsAxis]) { return; }\n\n // Get movement vector and translate position.\n el.object3D.position.add(this.getMovementVector(delta));\n },\n\n remove: function () {\n this.removeKeyEventListeners();\n this.removeVisibilityEventListeners();\n },\n\n play: function () {\n this.attachKeyEventListeners();\n },\n\n pause: function () {\n this.keys = {};\n this.removeKeyEventListeners();\n },\n\n updateVelocity: function (delta) {\n var acceleration;\n var adAxis;\n var adSign;\n var data = this.data;\n var keys = this.keys;\n var velocity = this.velocity;\n var wsAxis;\n var wsSign;\n\n adAxis = data.adAxis;\n wsAxis = data.wsAxis;\n\n // If FPS too low, reset velocity.\n if (delta > MAX_DELTA) {\n velocity[adAxis] = 0;\n velocity[wsAxis] = 0;\n return;\n }\n\n // https://gamedev.stackexchange.com/questions/151383/frame-rate-independant-movement-with-acceleration\n var scaledEasing = Math.pow(1 / this.easing, delta * 60);\n // Velocity Easing.\n if (velocity[adAxis] !== 0) {\n velocity[adAxis] = velocity[adAxis] * scaledEasing;\n }\n if (velocity[wsAxis] !== 0) {\n velocity[wsAxis] = velocity[wsAxis] * scaledEasing;\n }\n\n // Clamp velocity easing.\n if (Math.abs(velocity[adAxis]) < CLAMP_VELOCITY) { velocity[adAxis] = 0; }\n if (Math.abs(velocity[wsAxis]) < CLAMP_VELOCITY) { velocity[wsAxis] = 0; }\n\n if (!data.enabled) { return; }\n\n // Update velocity using keys pressed.\n acceleration = data.acceleration;\n if (data.adEnabled) {\n adSign = data.adInverted ? -1 : 1;\n if (keys.KeyA || keys.ArrowLeft) { velocity[adAxis] -= adSign * acceleration * delta; }\n if (keys.KeyD || keys.ArrowRight) { velocity[adAxis] += adSign * acceleration * delta; }\n }\n if (data.wsEnabled) {\n wsSign = data.wsInverted ? -1 : 1;\n if (keys.KeyW || keys.ArrowUp) { velocity[wsAxis] -= wsSign * acceleration * delta; }\n if (keys.KeyS || keys.ArrowDown) { velocity[wsAxis] += wsSign * acceleration * delta; }\n }\n },\n\n getMovementVector: (function () {\n var directionVector = new THREE.Vector3(0, 0, 0);\n var rotationEuler = new THREE.Euler(0, 0, 0, 'YXZ');\n\n return function (delta) {\n var rotation = this.el.getAttribute('rotation');\n var velocity = this.velocity;\n var xRotation;\n\n directionVector.copy(velocity);\n directionVector.multiplyScalar(delta);\n\n // Absolute.\n if (!rotation) { return directionVector; }\n\n xRotation = this.data.fly ? rotation.x : 0;\n\n // Transform direction relative to heading.\n rotationEuler.set(THREE.Math.degToRad(xRotation), THREE.Math.degToRad(rotation.y), 0);\n directionVector.applyEuler(rotationEuler);\n return directionVector;\n };\n })(),\n\n attachVisibilityEventListeners: function () {\n window.oncontextmenu = this.onContextMenu;\n window.addEventListener('blur', this.onBlur);\n window.addEventListener('focus', this.onFocus);\n document.addEventListener('visibilitychange', this.onVisibilityChange);\n },\n\n removeVisibilityEventListeners: function () {\n window.removeEventListener('blur', this.onBlur);\n window.removeEventListener('focus', this.onFocus);\n document.removeEventListener('visibilitychange', this.onVisibilityChange);\n },\n\n attachKeyEventListeners: function () {\n window.addEventListener('keydown', this.onKeyDown);\n window.addEventListener('keyup', this.onKeyUp);\n },\n\n removeKeyEventListeners: function () {\n window.removeEventListener('keydown', this.onKeyDown);\n window.removeEventListener('keyup', this.onKeyUp);\n },\n\n onContextMenu: function () {\n var keys = Object.keys(this.keys);\n for (var i = 0; i < keys.length; i++) {\n delete this.keys[keys[i]];\n }\n },\n\n onBlur: function () {\n this.pause();\n },\n\n onFocus: function () {\n this.play();\n },\n\n onVisibilityChange: function () {\n if (document.hidden) {\n this.onBlur();\n } else {\n this.onFocus();\n }\n },\n\n onKeyDown: function (event) {\n var code;\n if (!shouldCaptureKeyEvent(event)) { return; }\n code = event.code || KEYCODE_TO_CODE[event.keyCode];\n if (KEYS.indexOf(code) !== -1) { this.keys[code] = true; }\n },\n\n onKeyUp: function (event) {\n var code;\n code = event.code || KEYCODE_TO_CODE[event.keyCode];\n delete this.keys[code];\n }\n});\n\nfunction isEmptyObject (keys) {\n var key;\n for (key in keys) { return false; }\n return true;\n}\n\n},{\"../constants\":123,\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205}],122:[function(_dereq_,module,exports){\n/* global THREE */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar utils = _dereq_('../utils/');\n\nvar debug = utils.debug('components:windows-motion-controls:debug');\nvar warn = utils.debug('components:windows-motion-controls:warn');\n\nvar DEFAULT_HANDEDNESS = _dereq_('../constants').DEFAULT_HANDEDNESS;\n\nvar MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/microsoft/';\nvar MODEL_FILENAMES = { left: 'left.glb', right: 'right.glb', default: 'universal.glb' };\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'windows-mixed-reality';\nvar GAMEPAD_ID_WEBVR = 'Spatial Controller (Spatial Interaction Source) ';\nvar GAMEPAD_ID_PATTERN = /([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/;\n\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\nvar INPUT_MAPPING_WEBVR = {\n // A-Frame specific semantic axis names\n axes: {'thumbstick': [0, 1], 'trackpad': [2, 3]},\n // A-Frame specific semantic button names\n buttons: ['thumbstick', 'trigger', 'grip', 'menu', 'trackpad'],\n // A mapping of the semantic name to node name in the glTF model file,\n // that should be transformed by axis value.\n // This array mirrors the browser Gamepad.axes array, such that\n // the mesh corresponding to axis 0 is in this array index 0.\n axisMeshNames: [\n 'THUMBSTICK_X',\n 'THUMBSTICK_Y',\n 'TOUCHPAD_TOUCH_X',\n 'TOUCHPAD_TOUCH_Y'\n ],\n // A mapping of the semantic name to button node name in the glTF model file,\n // that should be transformed by button value.\n buttonMeshNames: {\n 'trigger': 'SELECT',\n 'menu': 'MENU',\n 'grip': 'GRASP',\n 'thumbstick': 'THUMBSTICK_PRESS',\n 'trackpad': 'TOUCHPAD_PRESS'\n },\n pointingPoseMeshName: 'POINTING_POSE'\n};\n\nvar INPUT_MAPPING_WEBXR = {\n // A-Frame specific semantic axis names\n axes: {'touchpad': [0, 1], 'thumbstick': [2, 3]},\n // A-Frame specific semantic button names\n buttons: ['trigger', 'squeeze', 'touchpad', 'thumbstick', 'menu'],\n // A mapping of the semantic name to node name in the glTF model file,\n // that should be transformed by axis value.\n // This array mirrors the browser Gamepad.axes array, such that\n // the mesh corresponding to axis 0 is in this array index 0.\n axisMeshNames: [\n 'TOUCHPAD_TOUCH_X',\n 'TOUCHPAD_TOUCH_X',\n 'THUMBSTICK_X',\n 'THUMBSTICK_Y'\n ],\n // A mapping of the semantic name to button node name in the glTF model file,\n // that should be transformed by button value.\n buttonMeshNames: {\n 'trigger': 'SELECT',\n 'menu': 'MENU',\n 'squeeze': 'GRASP',\n 'thumbstick': 'THUMBSTICK_PRESS',\n 'touchpad': 'TOUCHPAD_PRESS'\n },\n pointingPoseMeshName: 'POINTING_POSE'\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Windows Motion Controller controls.\n * Interface with Windows Motion Controller controllers and map Gamepad events to\n * controller buttons: trackpad, trigger, grip, menu, thumbstick\n * Load a controller model and transform the pressed buttons.\n */\nmodule.exports.Component = registerComponent('windows-motion-controls', {\n schema: {\n hand: {default: DEFAULT_HANDEDNESS},\n // It is possible to have multiple pairs of controllers attached (a pair has both left and right).\n // Set this to 1 to use a controller from the second pair, 2 from the third pair, etc.\n pair: {default: 0},\n // If true, loads the controller glTF asset.\n model: {default: true},\n // If true, will hide the model from the scene if no matching gamepad (based on ID & hand) is connected.\n hideDisconnected: {default: true}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelError = bind(this.onModelError, this);\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n var el = this.el;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.onControllerConnected = function () { self.setModelVisibility(true); };\n this.onControllerDisconnected = function () { self.setModelVisibility(false); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.previousButtonValues = {};\n this.bindMethods();\n\n // Cache for submeshes that we have looked up by name.\n this.loadedMeshInfo = {\n buttonMeshes: null,\n axisMeshes: null\n };\n\n // Pointing poses\n this.rayOrigin = {\n origin: new THREE.Vector3(),\n direction: new THREE.Vector3(0, 0, -1),\n createdFromMesh: false\n };\n\n el.addEventListener('controllerconnected', this.onControllerConnected);\n el.addEventListener('controllerdisconnected', this.onControllerDisconnected);\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('axismove', this.onAxisMoved);\n el.addEventListener('model-error', this.onModelError);\n el.addEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('axismove', this.onAxisMoved);\n el.removeEventListener('model-error', this.onModelError);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {\n hand: this.data.hand,\n index: this.data.pair,\n iterateControllerProfiles: true\n });\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n updateControllerModel: function () {\n // If we do not want to load a model, or, have already loaded the model, emit the controllermodelready event.\n if (!this.data.model || this.rayOrigin.createdFromMesh) {\n this.modelReady();\n return;\n }\n\n var sourceUrl = this.createControllerModelUrl();\n this.loadModel(sourceUrl);\n },\n\n /**\n * Helper function that constructs a URL from the controller ID suffix, for future proofed\n * art assets.\n */\n createControllerModelUrl: function (forceDefault) {\n // Determine the device specific folder based on the ID suffix\n var trackedControlsComponent = this.el.components['tracked-controls'];\n var controller = trackedControlsComponent ? trackedControlsComponent.controller : null;\n var device = 'default';\n var hand = this.data.hand;\n var filename;\n\n if (controller && !window.hasNativeWebXRImplementation) {\n // Read hand directly from the controller, rather than this.data, as in the case that the controller\n // is unhanded this.data will still have 'left' or 'right' (depending on what the user inserted in to the scene).\n // In this case, we want to load the universal model, so need to get the '' from the controller.\n hand = controller.hand;\n\n if (!forceDefault) {\n var match = controller.id.match(GAMEPAD_ID_PATTERN);\n device = ((match && match[0]) || device);\n }\n }\n\n // Hand\n filename = MODEL_FILENAMES[hand] || MODEL_FILENAMES.default;\n\n // Final url\n return MODEL_BASE_URL + device + '/' + filename;\n },\n\n injectTrackedControls: function () {\n var data = this.data;\n this.el.setAttribute('tracked-controls', {\n idPrefix: GAMEPAD_ID_PREFIX,\n controller: data.pair,\n hand: data.hand,\n armModel: false\n });\n\n this.updateControllerModel();\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n onModelError: function (evt) {\n var defaultUrl = this.createControllerModelUrl(true);\n if (evt.detail.src !== defaultUrl) {\n warn('Failed to load controller model for device, attempting to load default.');\n this.loadModel(defaultUrl);\n } else {\n warn('Failed to load default controller model.');\n }\n },\n\n loadModel: function (url) {\n // The model is loaded by the gltf-model compoent when this attribute is initially set,\n // removed and re-loaded if the given url changes.\n this.el.setAttribute('gltf-model', 'url(' + url + ')');\n },\n\n onModelLoaded: function (evt) {\n var rootNode = this.controllerModel = evt.detail.model;\n var loadedMeshInfo = this.loadedMeshInfo;\n var i;\n var meshName;\n var mesh;\n var meshInfo;\n\n debug('Processing model');\n\n // Reset the caches\n loadedMeshInfo.buttonMeshes = {};\n loadedMeshInfo.axisMeshes = {};\n\n // Cache our meshes so we aren't traversing the hierarchy per frame\n if (rootNode) {\n // Button Meshes\n for (i = 0; i < this.mapping.buttons.length; i++) {\n meshName = this.mapping.buttonMeshNames[this.mapping.buttons[i]];\n if (!meshName) {\n debug('Skipping unknown button at index: ' + i + ' with mapped name: ' + this.mapping.buttons[i]);\n continue;\n }\n\n mesh = rootNode.getObjectByName(meshName);\n if (!mesh) {\n warn('Missing button mesh with name: ' + meshName);\n continue;\n }\n\n meshInfo = {\n index: i,\n value: getImmediateChildByName(mesh, 'VALUE'),\n pressed: getImmediateChildByName(mesh, 'PRESSED'),\n unpressed: getImmediateChildByName(mesh, 'UNPRESSED')\n };\n if (meshInfo.value && meshInfo.pressed && meshInfo.unpressed) {\n loadedMeshInfo.buttonMeshes[this.mapping.buttons[i]] = meshInfo;\n } else {\n // If we didn't find the mesh, it simply means this button won't have transforms applied as mapped button value changes.\n warn('Missing button submesh under mesh with name: ' + meshName +\n '(VALUE: ' + !!meshInfo.value +\n ', PRESSED: ' + !!meshInfo.pressed +\n ', UNPRESSED:' + !!meshInfo.unpressed +\n ')');\n }\n }\n\n // Axis Meshes\n for (i = 0; i < this.mapping.axisMeshNames.length; i++) {\n meshName = this.mapping.axisMeshNames[i];\n if (!meshName) {\n debug('Skipping unknown axis at index: ' + i);\n continue;\n }\n\n mesh = rootNode.getObjectByName(meshName);\n if (!mesh) {\n warn('Missing axis mesh with name: ' + meshName);\n continue;\n }\n\n meshInfo = {\n index: i,\n value: getImmediateChildByName(mesh, 'VALUE'),\n min: getImmediateChildByName(mesh, 'MIN'),\n max: getImmediateChildByName(mesh, 'MAX')\n };\n if (meshInfo.value && meshInfo.min && meshInfo.max) {\n loadedMeshInfo.axisMeshes[i] = meshInfo;\n } else {\n // If we didn't find the mesh, it simply means this axis won't have transforms applied as mapped axis values change.\n warn('Missing axis submesh under mesh with name: ' + meshName +\n '(VALUE: ' + !!meshInfo.value +\n ', MIN: ' + !!meshInfo.min +\n ', MAX:' + !!meshInfo.max +\n ')');\n }\n }\n\n this.calculateRayOriginFromMesh(rootNode);\n // Determine if the model has to be visible or not.\n this.setModelVisibility();\n }\n\n debug('Model load complete.');\n\n // Look through only immediate children. This will return null if no mesh exists with the given name.\n function getImmediateChildByName (object3d, value) {\n for (var i = 0, l = object3d.children.length; i < l; i++) {\n var obj = object3d.children[i];\n if (obj && obj['name'] === value) {\n return obj;\n }\n }\n return undefined;\n }\n },\n\n calculateRayOriginFromMesh: (function () {\n var quaternion = new THREE.Quaternion();\n return function (rootNode) {\n var mesh;\n\n // Calculate the pointer pose (used for rays), by applying the world transform of th POINTER_POSE node\n // in the glTF (assumes that root node is at world origin)\n this.rayOrigin.origin.set(0, 0, 0);\n this.rayOrigin.direction.set(0, 0, -1);\n this.rayOrigin.createdFromMesh = true;\n\n // Try to read Pointing pose from the source model\n mesh = rootNode.getObjectByName(this.mapping.pointingPoseMeshName);\n if (mesh) {\n var parent = rootNode.parent;\n\n // We need to read pose transforms accumulated from the root of the glTF, not the scene.\n if (parent) {\n rootNode.parent = null;\n rootNode.updateMatrixWorld(true);\n rootNode.parent = parent;\n }\n\n mesh.getWorldPosition(this.rayOrigin.origin);\n mesh.getWorldQuaternion(quaternion);\n this.rayOrigin.direction.applyQuaternion(quaternion);\n\n // Recalculate the world matrices now that the rootNode is re-attached to the parent.\n if (parent) {\n rootNode.updateMatrixWorld(true);\n }\n } else {\n debug('Mesh does not contain pointing origin data, defaulting to none.');\n }\n\n // Emit event stating that our pointing ray is now accurate.\n this.modelReady();\n };\n })(),\n\n lerpAxisTransform: (function () {\n var quaternion = new THREE.Quaternion();\n return function (axis, axisValue) {\n var axisMeshInfo = this.loadedMeshInfo.axisMeshes[axis];\n if (!axisMeshInfo) return;\n\n var min = axisMeshInfo.min;\n var max = axisMeshInfo.max;\n var target = axisMeshInfo.value;\n\n // Convert from gamepad value range (-1 to +1) to lerp range (0 to 1)\n var lerpValue = axisValue * 0.5 + 0.5;\n target.setRotationFromQuaternion(quaternion.copy(min.quaternion).slerp(max.quaternion, lerpValue));\n target.position.lerpVectors(min.position, max.position, lerpValue);\n };\n })(),\n\n lerpButtonTransform: (function () {\n var quaternion = new THREE.Quaternion();\n return function (buttonName, buttonValue) {\n var buttonMeshInfo = this.loadedMeshInfo.buttonMeshes[buttonName];\n if (!buttonMeshInfo) return;\n\n var min = buttonMeshInfo.unpressed;\n var max = buttonMeshInfo.pressed;\n var target = buttonMeshInfo.value;\n\n target.setRotationFromQuaternion(quaternion.copy(min.quaternion).slerp(max.quaternion, buttonValue));\n target.position.lerpVectors(min.position, max.position, buttonValue);\n };\n })(),\n\n modelReady: function () {\n this.el.emit('controllermodelready', {\n name: 'windows-motion-controls',\n model: this.data.model,\n rayOrigin: this.rayOrigin\n });\n },\n\n onButtonChanged: function (evt) {\n var buttonName = this.mapping.buttons[evt.detail.id];\n\n if (buttonName) {\n // Update the button mesh transform\n if (this.loadedMeshInfo && this.loadedMeshInfo.buttonMeshes) {\n this.lerpButtonTransform(buttonName, evt.detail.state.value);\n }\n\n // Only emit events for buttons that we know how to map from index to name\n this.el.emit(buttonName + 'changed', evt.detail.state);\n }\n },\n\n onAxisMoved: function (evt) {\n var numAxes = this.mapping.axisMeshNames.length;\n\n // Only attempt to update meshes if we have valid data.\n if (this.loadedMeshInfo && this.loadedMeshInfo.axisMeshes) {\n for (var axis = 0; axis < numAxes; axis++) {\n // Update the button mesh transform\n this.lerpAxisTransform(axis, evt.detail.axis[axis] || 0.0);\n }\n }\n\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n setModelVisibility: function (visible) {\n var model = this.el.getObject3D('mesh');\n visible = visible !== undefined ? visible : this.modelVisible;\n this.modelVisible = visible;\n if (!model) { return; }\n model.visible = visible;\n }\n});\n\n},{\"../constants\":123,\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],123:[function(_dereq_,module,exports){\nmodule.exports = {\n AFRAME_INJECTED: 'aframe-injected',\n DEFAULT_CAMERA_HEIGHT: 1.6,\n DEFAULT_HANDEDNESS: 'right',\n keyboardevent: _dereq_('./keyboardevent')\n};\n\n},{\"./keyboardevent\":124}],124:[function(_dereq_,module,exports){\nmodule.exports = {\n // Tiny KeyboardEvent.code polyfill.\n KEYCODE_TO_CODE: {\n '38': 'ArrowUp',\n '37': 'ArrowLeft',\n '40': 'ArrowDown',\n '39': 'ArrowRight',\n '87': 'KeyW',\n '65': 'KeyA',\n '83': 'KeyS',\n '68': 'KeyD'\n }\n};\n\n},{}],125:[function(_dereq_,module,exports){\nvar ANode = _dereq_('./a-node');\nvar bind = _dereq_('../utils/bind');\nvar debug = _dereq_('../utils/debug');\nvar registerElement = _dereq_('./a-register-element').registerElement;\nvar THREE = _dereq_('../lib/three');\n\nvar fileLoader = new THREE.FileLoader();\nvar warn = debug('core:a-assets:warn');\n\n/**\n * Asset management system. Handles blocking on asset loading.\n */\nmodule.exports = registerElement('a-assets', {\n prototype: Object.create(ANode.prototype, {\n createdCallback: {\n value: function () {\n this.isAssets = true;\n this.fileLoader = fileLoader;\n this.timeout = null;\n }\n },\n\n attachedCallback: {\n value: function () {\n var self = this;\n var i;\n var loaded = [];\n var mediaEl;\n var mediaEls;\n var imgEl;\n var imgEls;\n var timeout;\n\n if (!this.parentNode.isScene) {\n throw new Error('<a-assets> must be a child of a <a-scene>.');\n }\n\n // Wait for <img>s.\n imgEls = this.querySelectorAll('img');\n for (i = 0; i < imgEls.length; i++) {\n imgEl = fixUpMediaElement(imgEls[i]);\n loaded.push(new Promise(function (resolve, reject) {\n // Set in cache because we won't be needing to call three.js loader if we have.\n // a loaded media element.\n THREE.Cache.files[imgEls[i].getAttribute('src')] = imgEl;\n imgEl.onload = resolve;\n imgEl.onerror = reject;\n }));\n }\n\n // Wait for <audio>s and <video>s.\n mediaEls = this.querySelectorAll('audio, video');\n for (i = 0; i < mediaEls.length; i++) {\n mediaEl = fixUpMediaElement(mediaEls[i]);\n if (!mediaEl.src && !mediaEl.srcObject) {\n warn('Audio/video asset has neither `src` nor `srcObject` attributes.');\n }\n loaded.push(mediaElementLoaded(mediaEl));\n }\n\n // Trigger loaded for scene to start rendering.\n Promise.all(loaded).then(bind(this.load, this));\n\n // Timeout to start loading anyways.\n timeout = parseInt(this.getAttribute('timeout'), 10) || 3000;\n this.timeout = setTimeout(function () {\n if (self.hasLoaded) { return; }\n warn('Asset loading timed out in ', timeout, 'ms');\n self.emit('timeout');\n self.load();\n }, timeout);\n }\n },\n\n detachedCallback: {\n value: function () {\n if (this.timeout) { clearTimeout(this.timeout); }\n }\n },\n\n load: {\n value: function () {\n ANode.prototype.load.call(this, null, function waitOnFilter (el) {\n return el.isAssetItem && el.hasAttribute('src');\n });\n }\n }\n })\n});\n\n/**\n * Preload using XHRLoader for any type of asset.\n */\nregisterElement('a-asset-item', {\n prototype: Object.create(ANode.prototype, {\n createdCallback: {\n value: function () {\n this.data = null;\n this.isAssetItem = true;\n }\n },\n\n attachedCallback: {\n value: function () {\n var self = this;\n var src = this.getAttribute('src');\n fileLoader.setResponseType(\n this.getAttribute('response-type') || inferResponseType(src));\n fileLoader.load(src, function handleOnLoad (response) {\n self.data = response;\n /*\n Workaround for a Chrome bug. If another XHR is sent to the same url before the\n previous one closes, the second request never finishes.\n setTimeout finishes the first request and lets the logic triggered by load open\n subsequent requests.\n setTimeout can be removed once the fix for the bug below ships:\n https://bugs.chromium.org/p/chromium/issues/detail?id=633696&q=component%3ABlink%3ENetwork%3EXHR%20&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified\n */\n setTimeout(function load () { ANode.prototype.load.call(self); });\n }, function handleOnProgress (xhr) {\n self.emit('progress', {\n loadedBytes: xhr.loaded,\n totalBytes: xhr.total,\n xhr: xhr\n });\n }, function handleOnError (xhr) {\n self.emit('error', {xhr: xhr});\n });\n }\n }\n })\n});\n\n/**\n * Create a Promise that resolves once the media element has finished buffering.\n *\n * @param {Element} el - HTMLMediaElement.\n * @returns {Promise}\n */\nfunction mediaElementLoaded (el) {\n if (!el.hasAttribute('autoplay') && el.getAttribute('preload') !== 'auto') {\n return;\n }\n\n // If media specifies autoplay or preload, wait until media is completely buffered.\n return new Promise(function (resolve, reject) {\n if (el.readyState === 4) { return resolve(); } // Already loaded.\n if (el.error) { return reject(); } // Error.\n\n el.addEventListener('loadeddata', checkProgress, false);\n el.addEventListener('progress', checkProgress, false);\n el.addEventListener('error', reject, false);\n\n function checkProgress () {\n // Add up the seconds buffered.\n var secondsBuffered = 0;\n for (var i = 0; i < el.buffered.length; i++) {\n secondsBuffered += el.buffered.end(i) - el.buffered.start(i);\n }\n\n // Compare seconds buffered to media duration.\n if (secondsBuffered >= el.duration) {\n // Set in cache because we won't be needing to call three.js loader if we have.\n // a loaded media element.\n // Store video elements only. three.js loader is used for audio elements.\n // See assetParse too.\n if (el.tagName === 'VIDEO') {\n THREE.Cache.files[el.getAttribute('src')] = el;\n }\n resolve();\n }\n }\n });\n}\n\n/**\n * Automatically add attributes to media elements where convenient.\n * crossorigin, playsinline.\n */\nfunction fixUpMediaElement (mediaEl) {\n // Cross-origin.\n var newMediaEl = setCrossOrigin(mediaEl);\n\n // Plays inline for mobile.\n if (newMediaEl.tagName && newMediaEl.tagName.toLowerCase() === 'video') {\n newMediaEl.setAttribute('playsinline', '');\n newMediaEl.setAttribute('webkit-playsinline', '');\n }\n\n if (newMediaEl !== mediaEl) {\n mediaEl.parentNode.appendChild(newMediaEl);\n mediaEl.parentNode.removeChild(mediaEl);\n }\n return newMediaEl;\n}\n\n/**\n * Automatically set `crossorigin` if not defined on the media element.\n * If it is not defined, we must create and re-append a new media element <img> and\n * have the browser re-request it with `crossorigin` set.\n *\n * @param {Element} Media element (e.g., <img>, <audio>, <video>).\n * @returns {Element} Media element to be used to listen to for loaded events.\n */\nfunction setCrossOrigin (mediaEl) {\n var newMediaEl;\n var src;\n\n // Already has crossorigin set.\n if (mediaEl.hasAttribute('crossorigin')) { return mediaEl; }\n\n src = mediaEl.getAttribute('src');\n\n if (src !== null) {\n // Does not have protocol.\n if (src.indexOf('://') === -1) { return mediaEl; }\n\n // Determine if cross origin is actually needed.\n if (extractDomain(src) === window.location.host) { return mediaEl; }\n }\n\n warn('Cross-origin element (e.g., <img>) was requested without `crossorigin` set. ' +\n 'A-Frame will re-request the asset with `crossorigin` attribute set. ' +\n 'Please set `crossorigin` on the element (e.g., <img crossorigin=\"anonymous\">)', src);\n mediaEl.crossOrigin = 'anonymous';\n newMediaEl = mediaEl.cloneNode(true);\n return newMediaEl;\n}\n\n/**\n * Extract domain out of URL.\n *\n * @param {string} url\n * @returns {string}\n */\nfunction extractDomain (url) {\n // Find and remove protocol (e.g., http, ftp, etc.) to get domain.\n var domain = url.indexOf('://') > -1 ? url.split('/')[2] : url.split('/')[0];\n\n // Find and remove port number.\n return domain.substring(0, domain.indexOf(':'));\n}\n\n/**\n * Infer response-type attribute from src.\n * Default is text (default XMLHttpRequest.responseType)\n * and arraybuffer for .glb files.\n *\n * @param {string} src\n * @returns {string}\n */\nfunction inferResponseType (src) {\n var fileName = getFileNameFromURL(src);\n var dotLastIndex = fileName.lastIndexOf('.');\n if (dotLastIndex >= 0) {\n var extension = fileName.slice(dotLastIndex, src.search(/\\?|#|$/));\n if (extension === '.glb') {\n return 'arraybuffer';\n }\n }\n return 'text';\n}\nmodule.exports.inferResponseType = inferResponseType;\n\n/**\n * Extract filename from URL\n *\n * @param {string} url\n * @returns {string}\n */\nfunction getFileNameFromURL (url) {\n var parser = document.createElement('a');\n parser.href = url;\n var query = parser.search.replace(/^\\?/, '');\n var filePath = url.replace(query, '').replace('?', '');\n return filePath.substring(filePath.lastIndexOf('/') + 1);\n}\nmodule.exports.getFileNameFromURL = getFileNameFromURL;\n\n},{\"../lib/three\":179,\"../utils/bind\":199,\"../utils/debug\":201,\"./a-node\":129,\"./a-register-element\":130}],126:[function(_dereq_,module,exports){\nvar debug = _dereq_('../utils/debug');\nvar registerElement = _dereq_('./a-register-element').registerElement;\n\nvar warn = debug('core:cubemap:warn');\n\n/**\n * Cubemap element that handles validation and exposes list of URLs.\n * Does not listen to updates.\n */\nmodule.exports = registerElement('a-cubemap', {\n prototype: Object.create(window.HTMLElement.prototype, {\n /**\n * Calculates this.srcs.\n */\n attachedCallback: {\n value: function () {\n this.srcs = this.validate();\n },\n writable: window.debug\n },\n\n /**\n * Checks for exactly six elements with [src].\n * Does not check explicitly for <img>s in case user does not want\n * prefetching.\n *\n * @returns {Array|null} - six URLs if valid, else null.\n */\n validate: {\n value: function () {\n var elements = this.querySelectorAll('[src]');\n var i;\n var srcs = [];\n if (elements.length === 6) {\n for (i = 0; i < elements.length; i++) {\n srcs.push(elements[i].getAttribute('src'));\n }\n return srcs;\n }\n // Else if there are not six elements, throw a warning.\n warn(\n '<a-cubemap> did not contain exactly six elements each with a ' +\n '`src` attribute.');\n },\n writable: window.debug\n }\n })\n});\n\n},{\"../utils/debug\":201,\"./a-register-element\":130}],127:[function(_dereq_,module,exports){\nvar ANode = _dereq_('./a-node');\nvar COMPONENTS = _dereq_('./component').components;\nvar registerElement = _dereq_('./a-register-element').registerElement;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar AEntity;\nvar debug = utils.debug('core:a-entity:debug');\nvar warn = utils.debug('core:a-entity:warn');\n\nvar MULTIPLE_COMPONENT_DELIMITER = '__';\nvar OBJECT3D_COMPONENTS = ['position', 'rotation', 'scale', 'visible'];\nvar ONCE = {once: true};\n\n/**\n * Entity is a container object that components are plugged into to comprise everything in\n * the scene. In A-Frame, they inherently have position, rotation, and scale.\n *\n * To be able to take components, the scene element inherits from the entity definition.\n *\n * @member {object} components - entity's currently initialized components.\n * @member {object} object3D - three.js object.\n * @member {array} states\n * @member {boolean} isPlaying - false if dynamic behavior of the entity is paused.\n */\nvar proto = Object.create(ANode.prototype, {\n createdCallback: {\n value: function () {\n this.components = {};\n // To avoid double initializations and infinite loops.\n this.initializingComponents = {};\n this.componentsToUpdate = {};\n this.isEntity = true;\n this.isPlaying = false;\n this.object3D = new THREE.Group();\n this.object3D.el = this;\n this.object3DMap = {};\n this.parentEl = null;\n this.rotationObj = {};\n this.states = [];\n }\n },\n\n /**\n * Handle changes coming from the browser DOM inspector.\n */\n attributeChangedCallback: {\n value: function (attr, oldVal, newVal) {\n var component = this.components[attr];\n // If the empty string is passed by the component initialization\n // logic we ignore the component update.\n if (component && component.justInitialized && newVal === '') {\n delete component.justInitialized;\n return;\n }\n // When a component is removed after calling el.removeAttribute('material')\n if (!component && newVal === null) { return; }\n this.setEntityAttribute(attr, oldVal, newVal);\n }\n },\n\n /**\n * Add to parent, load, play.\n */\n attachedCallback: {\n value: function () {\n var assetsEl; // Asset management system element.\n var sceneEl = this.sceneEl;\n var self = this; // Component.\n\n this.addToParent();\n\n // Don't .load() scene on attachedCallback.\n if (this.isScene) { return; }\n\n // Gracefully not error when outside of <a-scene> (e.g., tests).\n if (!sceneEl) {\n this.load();\n return;\n }\n\n // Wait for asset management system to finish before loading.\n assetsEl = sceneEl.querySelector('a-assets');\n if (assetsEl && !assetsEl.hasLoaded) {\n assetsEl.addEventListener('loaded', function () { self.load(); });\n return;\n }\n this.load();\n }\n },\n\n /**\n * Tell parent to remove this element's object3D from its object3D.\n * Do not call on scene element because that will cause a call to document.body.remove().\n */\n detachedCallback: {\n value: function () {\n var componentName;\n\n if (!this.parentEl) { return; }\n\n // Remove components.\n for (componentName in this.components) {\n this.removeComponent(componentName, false);\n }\n\n if (this.isScene) { return; }\n\n this.removeFromParent();\n ANode.prototype.detachedCallback.call(this);\n\n // Remove cyclic reference.\n this.object3D.el = null;\n }\n },\n\n getObject3D: {\n value: function (type) {\n return this.object3DMap[type];\n }\n },\n\n /**\n * Set a THREE.Object3D into the map.\n *\n * @param {string} type - Developer-set name of the type of object, will be unique per type.\n * @param {object} obj - A THREE.Object3D.\n */\n setObject3D: {\n value: function (type, obj) {\n var oldObj;\n var self = this;\n\n if (!(obj instanceof THREE.Object3D)) {\n throw new Error(\n '`Entity.setObject3D` was called with an object that was not an instance of ' +\n 'THREE.Object3D.'\n );\n }\n\n // Remove existing object of the type.\n oldObj = this.getObject3D(type);\n if (oldObj) { this.object3D.remove(oldObj); }\n\n // Set references to A-Frame entity.\n obj.el = this;\n if (obj.children.length) {\n obj.traverse(function bindEl (child) {\n child.el = self;\n });\n }\n\n // Add.\n this.object3D.add(obj);\n this.object3DMap[type] = obj;\n this.emit('object3dset', {object: obj, type: type});\n }\n },\n\n /**\n * Remove object from scene and entity object3D map.\n */\n removeObject3D: {\n value: function (type) {\n var obj = this.getObject3D(type);\n if (!obj) {\n warn('Tried to remove `Object3D` of type:', type, 'which was not defined.');\n return;\n }\n this.object3D.remove(obj);\n delete this.object3DMap[type];\n this.emit('object3dremove', {type: type});\n }\n },\n\n /**\n * Gets or creates an object3D of a given type.\n *\n * @param {string} type - Type of the object3D.\n * @param {string} Constructor - Constructor to use to create the object3D if needed.\n * @returns {object}\n */\n getOrCreateObject3D: {\n value: function (type, Constructor) {\n var object3D = this.getObject3D(type);\n if (!object3D && Constructor) {\n object3D = new Constructor();\n this.setObject3D(type, object3D);\n }\n warn('`getOrCreateObject3D` has been deprecated. Use `setObject3D()` ' +\n 'and `object3dset` event instead.');\n return object3D;\n }\n },\n\n /**\n * Add child entity.\n *\n * @param {Element} el - Child entity.\n */\n add: {\n value: function (el) {\n if (!el.object3D) {\n throw new Error(\"Trying to add an element that doesn't have an `object3D`\");\n }\n this.object3D.add(el.object3D);\n this.emit('child-attached', {el: el});\n }\n },\n\n /**\n * Tell parentNode to add this entity to itself.\n */\n addToParent: {\n value: function () {\n var parentNode = this.parentEl = this.parentNode;\n\n // `!parentNode` check primarily for unit tests.\n if (!parentNode || !parentNode.add || this.attachedToParent) { return; }\n\n parentNode.add(this);\n this.attachedToParent = true; // To prevent multiple attachments to same parent.\n }\n },\n\n /**\n * Tell parentNode to remove this entity from itself.\n */\n removeFromParent: {\n value: function () {\n var parentEl = this.parentEl;\n this.parentEl.remove(this);\n this.attachedToParent = false;\n this.parentEl = null;\n parentEl.emit('child-detached', {el: this});\n }\n },\n\n load: {\n value: function () {\n var self = this;\n\n if (this.hasLoaded || !this.parentEl) { return; }\n\n ANode.prototype.load.call(this, function entityLoadCallback () {\n // Check if entity was detached while it was waiting to load.\n if (!self.parentEl) { return; }\n\n self.updateComponents();\n if (self.isScene || self.parentEl.isPlaying) { self.play(); }\n });\n },\n writable: window.debug\n },\n\n /**\n * Remove child entity.\n *\n * @param {Element} el - Child entity.\n */\n remove: {\n value: function (el) {\n if (el) {\n this.object3D.remove(el.object3D);\n } else {\n this.parentNode.removeChild(this);\n }\n }\n },\n\n /**\n * @returns {array} Direct children that are entities.\n */\n getChildEntities: {\n value: function () {\n var children = this.children;\n var childEntities = [];\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child instanceof AEntity) {\n childEntities.push(child);\n }\n }\n\n return childEntities;\n }\n },\n\n /**\n * Initialize component.\n *\n * @param {string} attrName - Attribute name asociated to the component.\n * @param {object} data - Component data\n * @param {boolean} isDependency - True if the component is a dependency.\n */\n initComponent: {\n value: function (attrName, data, isDependency) {\n var component;\n var componentId;\n var componentInfo;\n var componentName;\n var isComponentDefined;\n\n componentInfo = utils.split(attrName, MULTIPLE_COMPONENT_DELIMITER);\n componentName = componentInfo[0];\n componentId = componentInfo.length > 2\n ? componentInfo.slice(1).join('__')\n : componentInfo[1];\n\n // Not a registered component.\n if (!COMPONENTS[componentName]) { return; }\n\n // Component is not a dependency and is undefined.\n // If a component is a dependency, then it is okay to have no data.\n isComponentDefined = checkComponentDefined(this, attrName) ||\n data !== undefined;\n if (!isComponentDefined && !isDependency) { return; }\n\n // Component already initialized.\n if (attrName in this.components) { return; }\n\n // Initialize dependencies first\n this.initComponentDependencies(componentName);\n\n // If component name has an id we check component type multiplic\n if (componentId && !COMPONENTS[componentName].multiple) {\n throw new Error('Trying to initialize multiple ' +\n 'components of type `' + componentName +\n '`. There can only be one component of this type per entity.');\n }\n component = new COMPONENTS[componentName].Component(this, data, componentId);\n if (this.isPlaying) { component.play(); }\n\n // Components are reflected in the DOM as attributes but the state is not shown\n // hence we set the attribute to empty string.\n // The flag justInitialized is for attributeChangedCallback to not overwrite\n // the component with the empty string.\n if (!this.hasAttribute(attrName)) {\n component.justInitialized = true;\n window.HTMLElement.prototype.setAttribute.call(this, attrName, '');\n }\n\n debug('Component initialized: %s', attrName);\n },\n writable: window.debug\n },\n\n /**\n * Initialize dependencies of a component.\n *\n * @param {string} name - Root component name.\n */\n initComponentDependencies: {\n value: function (name) {\n var self = this;\n var component = COMPONENTS[name];\n var dependencies;\n var i;\n\n // Not a component.\n if (!component) { return; }\n\n // No dependencies.\n dependencies = COMPONENTS[name].dependencies;\n\n if (!dependencies) { return; }\n\n // Initialize dependencies.\n for (i = 0; i < dependencies.length; i++) {\n // Call getAttribute to initialize the data from the DOM.\n self.initComponent(\n dependencies[i],\n window.HTMLElement.prototype.getAttribute.call(self, dependencies[i]) || undefined,\n true\n );\n }\n }\n },\n\n removeComponent: {\n value: function (name, destroy) {\n var component;\n\n component = this.components[name];\n if (!component) { return; }\n\n // Wait for component to initialize.\n if (!component.initialized) {\n this.addEventListener('componentinitialized', function tryRemoveLater (evt) {\n if (evt.detail.name !== name) { return; }\n this.removeComponent(name, destroy);\n this.removeEventListener('componentinitialized', tryRemoveLater);\n });\n return;\n }\n\n component.pause();\n component.remove();\n\n // Keep component attached to entity in case of just full entity detach.\n if (destroy) {\n component.destroy();\n delete this.components[name];\n }\n\n this.emit('componentremoved', component.evtDetail, false);\n },\n writable: window.debug\n },\n\n /**\n * Initialize or update all components.\n * Build data using initial components, defined attributes, mixins, and defaults.\n * Update default components before the rest.\n *\n * @member {function} getExtraComponents - Can be implemented to include component data\n * from other sources (e.g., implemented by primitives).\n */\n updateComponents: {\n value: function () {\n var data;\n var extraComponents;\n var i;\n var name;\n var componentsToUpdate = this.componentsToUpdate;\n\n if (!this.hasLoaded) { return; }\n\n // Gather mixin-defined components.\n for (i = 0; i < this.mixinEls.length; i++) {\n for (name in this.mixinEls[i].componentCache) {\n if (isComponent(name)) { componentsToUpdate[name] = true; }\n }\n }\n\n // Gather from extra initial component data if defined (e.g., primitives).\n if (this.getExtraComponents) {\n extraComponents = this.getExtraComponents();\n for (name in extraComponents) {\n if (isComponent(name)) { componentsToUpdate[name] = true; }\n }\n }\n\n // Gather entity-defined components.\n for (i = 0; i < this.attributes.length; ++i) {\n name = this.attributes[i].name;\n if (OBJECT3D_COMPONENTS.indexOf(name) !== -1) { continue; }\n if (isComponent(name)) { componentsToUpdate[name] = true; }\n }\n\n // object3D components first (position, rotation, scale, visible).\n for (i = 0; i < OBJECT3D_COMPONENTS.length; i++) {\n name = OBJECT3D_COMPONENTS[i];\n if (!this.hasAttribute(name)) { continue; }\n this.updateComponent(name, this.getDOMAttribute(name));\n }\n\n // Initialize or update rest of components.\n for (name in componentsToUpdate) {\n data = mergeComponentData(this.getDOMAttribute(name),\n extraComponents && extraComponents[name]);\n this.updateComponent(name, data);\n delete componentsToUpdate[name];\n }\n },\n writable: window.debug\n },\n\n /**\n * Initialize, update, or remove a single component.\n *\n * When initializing, we set the component on `this.components`.\n *\n * @param {string} attr - Component name.\n * @param {object} attrValue - Value of the DOM attribute.\n * @param {boolean} clobber - If new attrValue completely replaces previous properties.\n */\n updateComponent: {\n value: function (attr, attrValue, clobber) {\n var component = this.components[attr];\n\n if (component) {\n // Remove component.\n if (attrValue === null && !checkComponentDefined(this, attr)) {\n this.removeComponent(attr, true);\n return;\n }\n // Component already initialized. Update component.\n component.updateProperties(attrValue, clobber);\n return;\n }\n\n // Component not yet initialized. Initialize component.\n this.initComponent(attr, attrValue, false);\n }\n },\n\n /**\n * If `attr` is a component name, detach the component from the entity.\n *\n * If `propertyName` is given, reset the component property value to its default.\n *\n * @param {string} attr - Attribute name, which could also be a component name.\n * @param {string} propertyName - Component prop name, if resetting an individual prop.\n */\n removeAttribute: {\n value: function (attr, propertyName) {\n var component = this.components[attr];\n\n // Remove component.\n if (component && propertyName === undefined) {\n this.removeComponent(attr, true);\n }\n\n // Reset component property value.\n if (component && propertyName !== undefined) {\n component.resetProperty(propertyName);\n return;\n }\n\n // Remove mixins.\n if (attr === 'mixin') {\n this.mixinUpdate('');\n }\n\n window.HTMLElement.prototype.removeAttribute.call(this, attr);\n }\n },\n\n /**\n * Start dynamic behavior associated with entity such as dynamic components and animations.\n * Tell all children entities to also play.\n */\n play: {\n value: function () {\n var entities;\n var i;\n var key;\n\n // Already playing.\n if (this.isPlaying || !this.hasLoaded) { return; }\n this.isPlaying = true;\n\n // Wake up all components.\n for (key in this.components) { this.components[key].play(); }\n\n // Tell all child entities to play.\n entities = this.getChildEntities();\n for (i = 0; i < entities.length; i++) { entities[i].play(); }\n\n this.emit('play');\n },\n writable: true\n },\n\n /**\n * Pause dynamic behavior associated with entity such as dynamic components and animations.\n * Tell all children entities to also pause.\n */\n pause: {\n value: function () {\n var entities;\n var i;\n var key;\n\n if (!this.isPlaying) { return; }\n this.isPlaying = false;\n\n // Sleep all components.\n for (key in this.components) { this.components[key].pause(); }\n\n // Tell all child entities to pause.\n entities = this.getChildEntities();\n for (i = 0; i < entities.length; i++) { entities[i].pause(); }\n\n this.emit('pause');\n },\n writable: true\n },\n\n /**\n * Deals with updates on entity-specific attributes (i.e., components and mixins).\n *\n * @param {string} attr\n * @param {string} oldVal\n * @param {string|object} newVal\n */\n setEntityAttribute: {\n value: function (attr, oldVal, newVal) {\n if (COMPONENTS[attr] || this.components[attr]) {\n this.updateComponent(attr, newVal);\n return;\n }\n if (attr === 'mixin') {\n // Ignore if `<a-node>` code is just updating computed mixin in the DOM.\n if (newVal === this.computedMixinStr) { return; }\n this.mixinUpdate(newVal, oldVal);\n }\n }\n },\n\n /**\n * When mixins updated, trigger init or optimized-update of relevant components.\n */\n mixinUpdate: {\n value: (function () {\n var componentsUpdated = [];\n\n return function (newMixins, oldMixins) {\n var component;\n var mixinEl;\n var mixinIds;\n var i;\n var self = this;\n\n if (!this.hasLoaded) {\n this.addEventListener('loaded', function () {\n self.mixinUpdate(newMixins, oldMixins);\n }, ONCE);\n return;\n }\n\n oldMixins = oldMixins || this.getAttribute('mixin');\n mixinIds = this.updateMixins(newMixins, oldMixins);\n\n // Loop over current mixins.\n componentsUpdated.length = 0;\n for (i = 0; i < this.mixinEls.length; i++) {\n for (component in this.mixinEls[i].componentCache) {\n if (componentsUpdated.indexOf(component) === -1) {\n if (this.components[component]) {\n // Update. Just rebuild data.\n this.components[component].handleMixinUpdate();\n } else {\n // Init. buildData will gather mixin values.\n this.initComponent(component, null);\n }\n componentsUpdated.push(component);\n }\n }\n }\n\n // Loop over old mixins to call for data rebuild.\n for (i = 0; i < mixinIds.oldMixinIds.length; i++) {\n mixinEl = document.getElementById(mixinIds.oldMixinIds[i]);\n if (!mixinEl) { continue; }\n for (component in mixinEl.componentCache) {\n if (componentsUpdated.indexOf(component) === -1) {\n if (this.components[component]) {\n if (this.getDOMAttribute(component)) {\n // Update component if explicitly defined.\n this.components[component].handleMixinUpdate();\n } else {\n // Remove component if not explicitly defined.\n this.removeComponent(component, true);\n }\n }\n }\n }\n }\n };\n })()\n },\n\n /**\n * setAttribute can:\n *\n * 1. Set a single property of a multi-property component.\n * 2. Set multiple properties of a multi-property component.\n * 3. Replace properties of a multi-property component.\n * 4. Set a value for a single-property component, mixin, or normal HTML attribute.\n *\n * @param {string} attrName - Component or attribute name.\n * @param {*} arg1 - Can be a value, property name, CSS-style property string, or\n * object of properties.\n * @param {*|bool} arg2 - If arg1 is a property name, this should be a value. Otherwise,\n * it is a boolean indicating whether to clobber previous values (defaults to false).\n */\n setAttribute: {\n value: (function () {\n var singlePropUpdate = {};\n\n return function (attrName, arg1, arg2) {\n var newAttrValue;\n var clobber;\n var componentName;\n var delimiterIndex;\n var isDebugMode;\n var key;\n\n delimiterIndex = attrName.indexOf(MULTIPLE_COMPONENT_DELIMITER);\n componentName = delimiterIndex > 0 ? attrName.substring(0, delimiterIndex) : attrName;\n\n // Not a component. Normal set attribute.\n if (!COMPONENTS[componentName]) {\n if (attrName === 'mixin') { this.mixinUpdate(arg1); }\n ANode.prototype.setAttribute.call(this, attrName, arg1);\n return;\n }\n\n // Initialize component first if not yet initialized.\n if (!this.components[attrName] && this.hasAttribute(attrName)) {\n this.updateComponent(\n attrName,\n window.HTMLElement.prototype.getAttribute.call(this, attrName));\n }\n\n // Determine new attributes from the arguments\n if (typeof arg2 !== 'undefined' &&\n typeof arg1 === 'string' &&\n arg1.length > 0 &&\n typeof utils.styleParser.parse(arg1) === 'string') {\n // Update a single property of a multi-property component\n for (key in singlePropUpdate) { delete singlePropUpdate[key]; }\n newAttrValue = singlePropUpdate;\n newAttrValue[arg1] = arg2;\n clobber = false;\n } else {\n // Update with a value, object, or CSS-style property string, with the possiblity\n // of clobbering previous values.\n newAttrValue = arg1;\n clobber = (arg2 === true);\n }\n\n // Update component\n this.updateComponent(attrName, newAttrValue, clobber);\n\n // In debug mode, write component data up to the DOM.\n isDebugMode = this.sceneEl && this.sceneEl.getAttribute('debug');\n if (isDebugMode) { this.components[attrName].flushToDOM(); }\n };\n })(),\n writable: window.debug\n },\n\n /**\n * Reflect component data in the DOM (as seen from the browser DOM Inspector).\n *\n * @param {bool} recursive - Also flushToDOM on the children.\n **/\n flushToDOM: {\n value: function (recursive) {\n var components = this.components;\n var child;\n var children = this.children;\n var i;\n var key;\n\n // Flush entity's components to DOM.\n for (key in components) {\n components[key].flushToDOM();\n }\n\n // Recurse.\n if (!recursive) { return; }\n for (i = 0; i < children.length; ++i) {\n child = children[i];\n if (!child.flushToDOM) { continue; }\n child.flushToDOM(recursive);\n }\n }\n },\n\n /**\n * If `attr` is a component, returns ALL component data including applied mixins and\n * defaults.\n *\n * If `attr` is not a component, fall back to HTML getAttribute.\n *\n * @param {string} attr\n * @returns {object|string} Object if component, else string.\n */\n getAttribute: {\n value: function (attr) {\n // If component, return component data.\n var component;\n if (attr === 'position') { return this.object3D.position; }\n if (attr === 'rotation') { return getRotation(this); }\n if (attr === 'scale') { return this.object3D.scale; }\n if (attr === 'visible') { return this.object3D.visible; }\n component = this.components[attr];\n if (component) { return component.data; }\n return window.HTMLElement.prototype.getAttribute.call(this, attr);\n },\n writable: window.debug\n },\n\n /**\n * If `attr` is a component, returns JUST the component data defined on the entity.\n * Like a partial version of `getComputedAttribute` as returned component data\n * does not include applied mixins or defaults.\n *\n * If `attr` is not a component, fall back to HTML getAttribute.\n *\n * @param {string} attr\n * @returns {object|string} Object if component, else string.\n */\n getDOMAttribute: {\n value: function (attr) {\n // If cached value exists, return partial component data.\n var component = this.components[attr];\n if (component) { return component.attrValue; }\n return window.HTMLElement.prototype.getAttribute.call(this, attr);\n },\n writable: window.debug\n },\n\n addState: {\n value: function (state) {\n if (this.is(state)) { return; }\n this.states.push(state);\n this.emit('stateadded', state);\n }\n },\n\n removeState: {\n value: function (state) {\n var stateIndex = this.states.indexOf(state);\n if (stateIndex === -1) { return; }\n this.states.splice(stateIndex, 1);\n this.emit('stateremoved', state);\n }\n },\n\n /**\n * Checks if the element is in a given state. e.g. el.is('alive');\n * @type {string} state - Name of the state we want to check\n */\n is: {\n value: function (state) {\n return this.states.indexOf(state) !== -1;\n }\n },\n\n /**\n * Open Inspector to this entity.\n */\n inspect: {\n value: function () {\n this.sceneEl.components.inspector.openInspector(this);\n }\n },\n\n /**\n * Clean up memory and return memory to object pools.\n */\n destroy: {\n value: function () {\n var key;\n if (this.parentNode) {\n warn('Entity can only be destroyed if detached from scenegraph.');\n return;\n }\n for (key in this.components) {\n this.components[key].destroy();\n }\n }\n }\n});\n\n/**\n * Check if a component is *defined* for an entity, including defaults and mixins.\n * Does not check whether the component has been *initialized* for an entity.\n *\n * @param {string} el - Entity.\n * @param {string} name - Component name.\n * @returns {boolean}\n */\nfunction checkComponentDefined (el, name) {\n // Check if element contains the component.\n if (el.components[name] && el.components[name].attrValue) { return true; }\n\n return isComponentMixedIn(name, el.mixinEls);\n}\n\n/**\n * Check if any mixins contains a component.\n *\n * @param {string} name - Component name.\n * @param {array} mixinEls - Array of <a-mixin>s.\n */\nfunction isComponentMixedIn (name, mixinEls) {\n var i;\n var inMixin = false;\n for (i = 0; i < mixinEls.length; ++i) {\n inMixin = mixinEls[i].hasAttribute(name);\n if (inMixin) { break; }\n }\n return inMixin;\n}\n\n/**\n * Given entity defined value, merge in extra data if necessary.\n * Handle both single and multi-property components.\n *\n * @param {string} attrValue - Entity data.\n * @param extraData - Entity data from another source to merge in.\n */\nfunction mergeComponentData (attrValue, extraData) {\n // Extra data not defined, just return attrValue.\n if (!extraData) { return attrValue; }\n\n // Merge multi-property data.\n if (extraData.constructor === Object) {\n return utils.extend(extraData, utils.styleParser.parse(attrValue || {}));\n }\n\n // Return data, precendence to the defined value.\n return attrValue || extraData;\n}\n\nfunction isComponent (componentName) {\n if (componentName.indexOf(MULTIPLE_COMPONENT_DELIMITER) !== -1) {\n componentName = utils.split(componentName, MULTIPLE_COMPONENT_DELIMITER)[0];\n }\n if (!COMPONENTS[componentName]) { return false; }\n return true;\n}\n\nfunction getRotation (entityEl) {\n var radToDeg = THREE.Math.radToDeg;\n var rotation = entityEl.object3D.rotation;\n var rotationObj = entityEl.rotationObj;\n rotationObj.x = radToDeg(rotation.x);\n rotationObj.y = radToDeg(rotation.y);\n rotationObj.z = radToDeg(rotation.z);\n return rotationObj;\n}\n\nAEntity = registerElement('a-entity', {prototype: proto});\nmodule.exports = AEntity;\n\n},{\"../lib/three\":179,\"../utils/\":205,\"./a-node\":129,\"./a-register-element\":130,\"./component\":131}],128:[function(_dereq_,module,exports){\nvar ANode = _dereq_('./a-node');\nvar registerElement = _dereq_('./a-register-element').registerElement;\nvar components = _dereq_('./component').components;\nvar utils = _dereq_('../utils');\n\nvar MULTIPLE_COMPONENT_DELIMITER = '__';\n\n/**\n * @member {object} componentCache - Cache of pre-parsed values. An object where the keys\n * are component names and the values are already parsed by the component.\n */\nmodule.exports = registerElement('a-mixin', {\n prototype: Object.create(ANode.prototype, {\n createdCallback: {\n value: function () {\n this.componentCache = {};\n this.id = this.getAttribute('id');\n this.isMixin = true;\n }\n },\n\n attributeChangedCallback: {\n value: function (attr, oldVal, newVal) {\n this.cacheAttribute(attr, newVal);\n this.updateEntities();\n }\n },\n\n attachedCallback: {\n value: function () {\n this.sceneEl = this.closestScene();\n this.cacheAttributes();\n this.updateEntities();\n this.load();\n }\n },\n\n /**\n * setAttribute that parses and caches component values.\n */\n setAttribute: {\n value: function (attr, value) {\n window.HTMLElement.prototype.setAttribute.call(this, attr, value);\n this.cacheAttribute(attr, value);\n }\n },\n\n /**\n * If `attr` is a component, then parse the value using the schema and store it.\n */\n cacheAttribute: {\n value: function (attr, value) {\n var component;\n var componentName;\n\n // Get component data.\n componentName = utils.split(attr, MULTIPLE_COMPONENT_DELIMITER)[0];\n component = components[componentName];\n if (!component) { return; }\n if (value === undefined) {\n value = window.HTMLElement.prototype.getAttribute.call(this, attr);\n }\n this.componentCache[attr] = component.parseAttrValueForCache(value);\n }\n },\n\n /**\n * If `attr` is a component, then grab pre-parsed value from the cache.\n * Else do a normal getAttribute.\n */\n getAttribute: {\n value: function (attr) {\n return this.componentCache[attr] ||\n window.HTMLElement.prototype.getAttribute.call(this, attr);\n }\n },\n\n /**\n * Parse and cache every component defined on the mixin.\n */\n cacheAttributes: {\n value: function () {\n var attributes = this.attributes;\n var attrName;\n var i;\n for (i = 0; i < attributes.length; i++) {\n attrName = attributes[i].name;\n this.cacheAttribute(attrName);\n }\n }\n },\n\n /**\n * For entities that already have been loaded by the time the mixin was attached, tell\n * those entities to register the mixin and refresh their component data.\n */\n updateEntities: {\n value: function () {\n var entity;\n var entities;\n var i;\n\n if (!this.sceneEl) { return; }\n\n entities = this.sceneEl.querySelectorAll('[mixin~=' + this.id + ']');\n for (i = 0; i < entities.length; i++) {\n entity = entities[i];\n if (!entity.hasLoaded || entity.isMixin) { continue; }\n entity.mixinUpdate(this.id);\n }\n }\n }\n })\n});\n\n},{\"../utils\":205,\"./a-node\":129,\"./a-register-element\":130,\"./component\":131}],129:[function(_dereq_,module,exports){\n/* global CustomEvent */\nvar registerElement = _dereq_('./a-register-element').registerElement;\nvar isNode = _dereq_('./a-register-element').isNode;\nvar utils = _dereq_('../utils/');\n\nvar warn = utils.debug('core:a-node:warn');\nvar error = utils.debug('core:a-node:error');\n\n/**\n * Base class for A-Frame that manages loading of objects.\n *\n * Nodes can be modified using mixins.\n * Nodes emit a `loaded` event when they and their children have initialized.\n */\nmodule.exports = registerElement('a-node', {\n prototype: Object.create(window.HTMLElement.prototype, {\n createdCallback: {\n value: function () {\n this.computedMixinStr = '';\n this.hasLoaded = false;\n this.isNode = true;\n this.mixinEls = [];\n },\n writable: window.debug\n },\n\n attachedCallback: {\n value: function () {\n var mixins;\n this.sceneEl = this.closestScene();\n\n if (!this.sceneEl) {\n warn('You are attempting to attach <' + this.tagName + '> outside of an A-Frame ' +\n 'scene. Append this element to `<a-scene>` instead.');\n }\n\n this.hasLoaded = false;\n this.emit('nodeready', undefined, false);\n\n if (!this.isMixin) {\n mixins = this.getAttribute('mixin');\n if (mixins) { this.updateMixins(mixins); }\n }\n },\n writable: window.debug\n },\n\n /**\n * Handle mixin.\n */\n attributeChangedCallback: {\n value: function (attr, oldVal, newVal) {\n // Ignore if `<a-node>` code is just updating computed mixin in the DOM.\n if (newVal === this.computedMixinStr) { return; }\n\n if (attr === 'mixin' && !this.isMixin) {\n this.updateMixins(newVal, oldVal);\n }\n }\n },\n\n /**\n * Returns the first scene by traversing up the tree starting from and\n * including receiver element.\n */\n closestScene: {\n value: function closest () {\n var element = this;\n while (element) {\n if (element.isScene) { break; }\n element = element.parentElement;\n }\n return element;\n }\n },\n\n /**\n * Returns first element matching a selector by traversing up the tree starting\n * from and including receiver element.\n *\n * @param {string} selector - Selector of element to find.\n */\n closest: {\n value: function closest (selector) {\n var matches = this.matches || this.mozMatchesSelector ||\n this.msMatchesSelector || this.oMatchesSelector || this.webkitMatchesSelector;\n var element = this;\n while (element) {\n if (matches.call(element, selector)) { break; }\n element = element.parentElement;\n }\n return element;\n }\n },\n\n detachedCallback: {\n value: function () {\n this.hasLoaded = false;\n }\n },\n\n /**\n * Wait for children to load, if any.\n * Then emit `loaded` event and set `hasLoaded`.\n */\n load: {\n value: function (cb, childFilter) {\n var children;\n var childrenLoaded;\n var self = this;\n\n if (this.hasLoaded) { return; }\n\n // Default to waiting for all nodes.\n childFilter = childFilter || isNode;\n // Wait for children to load (if any), then load.\n children = this.getChildren();\n childrenLoaded = children.filter(childFilter).map(function (child) {\n return new Promise(function waitForLoaded (resolve) {\n if (child.hasLoaded) { return resolve(); }\n child.addEventListener('loaded', resolve);\n });\n });\n\n Promise.all(childrenLoaded).then(function emitLoaded () {\n self.hasLoaded = true;\n if (cb) { cb(); }\n self.emit('loaded', undefined, false);\n }).catch(function (err) {\n error('Failure loading node: ', err);\n });\n },\n writable: true\n },\n\n getChildren: {\n value: function () {\n return Array.prototype.slice.call(this.children, 0);\n }\n },\n\n /**\n * Unregister old mixins and listeners.\n * Register new mixins and listeners.\n * Registering means to update `this.mixinEls` with listeners.\n */\n updateMixins: {\n value: (function () {\n var newMixinIdArray = [];\n var oldMixinIdArray = [];\n var mixinIds = {};\n\n return function (newMixins, oldMixins) {\n var i;\n var newMixinIds;\n var oldMixinIds;\n\n newMixinIdArray.length = 0;\n oldMixinIdArray.length = 0;\n newMixinIds = newMixins ? utils.split(newMixins.trim(), /\\s+/) : newMixinIdArray;\n oldMixinIds = oldMixins ? utils.split(oldMixins.trim(), /\\s+/) : oldMixinIdArray;\n\n mixinIds.newMixinIds = newMixinIds;\n mixinIds.oldMixinIds = oldMixinIds;\n\n // Unregister old mixins.\n for (i = 0; i < oldMixinIds.length; i++) {\n if (newMixinIds.indexOf(oldMixinIds[i]) === -1) {\n this.unregisterMixin(oldMixinIds[i]);\n }\n }\n\n // Register new mixins.\n this.computedMixinStr = '';\n this.mixinEls.length = 0;\n for (i = 0; i < newMixinIds.length; i++) {\n this.registerMixin(document.getElementById(newMixinIds[i]));\n }\n\n // Update DOM. Keep track of `computedMixinStr` to not recurse back here after\n // update.\n if (this.computedMixinStr) {\n this.computedMixinStr = this.computedMixinStr.trim();\n window.HTMLElement.prototype.setAttribute.call(this, 'mixin',\n this.computedMixinStr);\n }\n\n return mixinIds;\n };\n })()\n },\n\n /**\n * From mixin ID, add mixin element to `mixinEls`.\n *\n * @param {Element} mixinEl\n */\n registerMixin: {\n value: function (mixinEl) {\n var compositedMixinIds;\n var i;\n var mixin;\n\n if (!mixinEl) { return; }\n\n // Register composited mixins (if mixin has mixins).\n mixin = mixinEl.getAttribute('mixin');\n if (mixin) {\n compositedMixinIds = utils.split(mixin.trim(), /\\s+/);\n for (i = 0; i < compositedMixinIds.length; i++) {\n this.registerMixin(document.getElementById(compositedMixinIds[i]));\n }\n }\n\n // Register mixin.\n this.computedMixinStr = this.computedMixinStr + ' ' + mixinEl.id;\n this.mixinEls.push(mixinEl);\n }\n },\n\n setAttribute: {\n value: function (attr, newValue) {\n if (attr === 'mixin') { this.updateMixins(newValue); }\n window.HTMLElement.prototype.setAttribute.call(this, attr, newValue);\n }\n },\n\n unregisterMixin: {\n value: function (mixinId) {\n var i;\n var mixinEls = this.mixinEls;\n var mixinEl;\n for (i = 0; i < mixinEls.length; ++i) {\n mixinEl = mixinEls[i];\n if (mixinId === mixinEl.id) {\n mixinEls.splice(i, 1);\n break;\n }\n }\n }\n },\n\n /**\n * Emit a DOM event.\n *\n * @param {string} name - Name of event.\n * @param {object} [detail={}] - Custom data to pass as `detail` to the event.\n * @param {boolean} [bubbles=true] - Whether the event should bubble.\n * @param {object} [extraData] - Extra data to pass to the event, if any.\n */\n emit: {\n value: (function () {\n var data = {};\n\n return function (name, detail, bubbles, extraData) {\n if (bubbles === undefined) { bubbles = true; }\n data.bubbles = !!bubbles;\n data.detail = detail;\n\n // If extra data is present, we need to create a new object.\n if (extraData) { data = utils.extend({}, extraData, data); }\n\n this.dispatchEvent(new CustomEvent(name, data));\n };\n })(),\n writable: window.debug\n }\n })\n});\n\n},{\"../utils/\":205,\"./a-register-element\":130}],130:[function(_dereq_,module,exports){\n/*\n ------------------------------------------------------------\n ------------- WARNING WARNING WARNING WARNING --------------\n ------------------------------------------------------------\n\n This module wraps registerElement to deal with components that inherit from\n `ANode` and `AEntity`. It's a pass through in any other case.\n\n It wraps some of the prototype methods of the created element to make sure\n that the corresponding functions in the base prototypes (`AEntity` and `ANode`)\n are also invoked. The method in the base prototype is always called before the one\n in the derived prototype.\n*/\n\n// Polyfill `document.registerElement`.\n_dereq_('document-register-element');\n\nvar ANode; // Must declare before AEntity. Initialized at the bottom.\nvar AEntity;\nvar knownTags = module.exports.knownTags = {};\n\nfunction addTagName (tagName) {\n knownTags[tagName.toLowerCase()] = true;\n}\n\n/**\n * Return whether the element type is one of our known registered ones.\n *\n * @param {string} node - The name of the tag to register.\n * @returns {boolean} Whether the tag name matches that of our registered custom elements.\n */\nmodule.exports.isNode = function (node) {\n return node.tagName.toLowerCase() in knownTags || node.isNode;\n};\n\n/**\n * @param {string} tagName - The name of the tag to register.\n * @param {object} obj - The prototype of the new element.\n * @returns {object} The prototype of the new element.\n */\nmodule.exports.registerElement = function (tagName, obj) {\n var proto = Object.getPrototypeOf(obj.prototype);\n var newObj = obj;\n var isANode = ANode && proto === ANode.prototype;\n var isAEntity = AEntity && proto === AEntity.prototype;\n\n if (isANode || isAEntity) { addTagName(tagName); }\n\n // Wrap if element inherits from `ANode`.\n if (isANode) {\n newObj = wrapANodeMethods(obj.prototype);\n newObj = {prototype: Object.create(proto, newObj)};\n }\n\n // Wrap if element inherits from `AEntity`.\n if (isAEntity) {\n newObj = wrapAEntityMethods(obj.prototype);\n newObj = {prototype: Object.create(proto, newObj)};\n }\n\n // Give all functions their proper name.\n Object.getOwnPropertyNames(newObj.prototype).forEach(function (propName) {\n var propVal = newObj.prototype[propName];\n if (typeof propVal === 'function') {\n propVal.displayName = propName;\n }\n });\n\n return document.registerElement(tagName, newObj);\n};\n\n/**\n * Wrap some obj methods to call those on `ANode` base prototype.\n *\n * @param {object} obj - Object that contains the methods that will be wrapped.\n * @return {object} An object with the same properties as the input parameter but\n * with some of methods wrapped.\n */\nfunction wrapANodeMethods (obj) {\n var newObj = {};\n var ANodeMethods = [\n 'attachedCallback',\n 'attributeChangedCallback',\n 'createdCallback',\n 'detachedCallback'\n ];\n wrapMethods(newObj, ANodeMethods, obj, ANode.prototype);\n copyProperties(obj, newObj);\n return newObj;\n}\n\n/**\n * This wraps some of the obj methods to call those on `AEntity` base prototype.\n *\n * @param {object} obj - The objects that contains the methods that will be wrapped.\n * @return {object} - An object with the same properties as the input parameter but\n * with some of methods wrapped.\n */\nfunction wrapAEntityMethods (obj) {\n var newObj = {};\n var ANodeMethods = [\n 'attachedCallback',\n 'attributeChangedCallback',\n 'createdCallback',\n 'detachedCallback'\n ];\n var AEntityMethods = [\n 'attachedCallback',\n 'attributeChangedCallback',\n 'createdCallback',\n 'detachedCallback'\n ];\n\n wrapMethods(newObj, ANodeMethods, obj, ANode.prototype);\n wrapMethods(newObj, AEntityMethods, obj, AEntity.prototype);\n // Copies the remaining properties into the new object.\n copyProperties(obj, newObj);\n return newObj;\n}\n\n/**\n * Wrap a list a methods to ensure that those in the base prototype are called\n * before the derived one.\n *\n * @param {object} targetObj - Object that will contain the wrapped methods.\n * @param {array} methodList - List of methods from the derivedObj that will be wrapped.\n * @param {object} derivedObject - Object that inherits from the baseObj.\n * @param {object} baseObj - Object that derivedObj inherits from.\n */\nfunction wrapMethods (targetObj, methodList, derivedObj, baseObj) {\n methodList.forEach(function (methodName) {\n wrapMethod(targetObj, methodName, derivedObj, baseObj);\n });\n}\nmodule.exports.wrapMethods = wrapMethods;\n\n/**\n * Wrap one method to ensure that the one in the base prototype is called before\n * the one in the derived one.\n *\n * @param {object} obj - Object that will contain the wrapped method.\n * @param {string} methodName - The name of the method that will be wrapped.\n * @param {object} derivedObject - Object that inherits from the baseObj.\n * @param {object} baseObj - Object that derivedObj inherits from.\n */\nfunction wrapMethod (obj, methodName, derivedObj, baseObj) {\n var derivedMethod = derivedObj[methodName];\n var baseMethod = baseObj[methodName];\n\n // Derived prototype does not define method, no need to wrap.\n if (!derivedMethod || !baseMethod) { return; }\n\n // Derived prototype doesn't override the one in the base one, no need to wrap.\n if (derivedMethod === baseMethod) { return; }\n\n // Wrap to ensure the base method is called before the one in the derived prototype.\n obj[methodName] = {\n value: function wrappedMethod () {\n baseMethod.apply(this, arguments);\n return derivedMethod.apply(this, arguments);\n },\n writable: window.debug\n };\n}\n\n/**\n * It copies the properties from source to destination object if they don't\n * exist already.\n *\n * @param {object} source - The object where properties are copied from.\n * @param {type} destination - The object where properties are copied to.\n */\nfunction copyProperties (source, destination) {\n var props = Object.getOwnPropertyNames(source);\n props.forEach(function (prop) {\n var desc;\n if (!destination[prop]) {\n desc = Object.getOwnPropertyDescriptor(source, prop);\n destination[prop] = {value: source[prop], writable: desc.writable};\n }\n });\n}\n\nANode = _dereq_('./a-node');\nAEntity = _dereq_('./a-entity');\n\n},{\"./a-entity\":127,\"./a-node\":129,\"document-register-element\":12}],131:[function(_dereq_,module,exports){\n/* global Node */\nvar schema = _dereq_('./schema');\nvar scenes = _dereq_('./scene/scenes');\nvar systems = _dereq_('./system');\nvar utils = _dereq_('../utils/');\n\nvar components = module.exports.components = {}; // Keep track of registered components.\nvar parseProperties = schema.parseProperties;\nvar parseProperty = schema.parseProperty;\nvar processSchema = schema.process;\nvar isSingleProp = schema.isSingleProperty;\nvar stringifyProperties = schema.stringifyProperties;\nvar stringifyProperty = schema.stringifyProperty;\nvar styleParser = utils.styleParser;\nvar warn = utils.debug('core:component:warn');\n\nvar aframeScript = document.currentScript;\nvar upperCaseRegExp = new RegExp('[A-Z]+');\n\n// Object pools by component, created upon registration.\nvar objectPools = {};\n\n/**\n * Component class definition.\n *\n * Components configure appearance, modify behavior, or add functionality to\n * entities. The behavior and appearance of an entity can be changed at runtime\n * by adding, removing, or updating components. Entities do not share instances\n * of components.\n *\n * @member {object} el - Reference to the entity element.\n * @member {string} attrValue - Value of the corresponding HTML attribute.\n * @member {object} data - Component data populated by parsing the\n * mapped attribute of the component plus applying defaults and mixins.\n */\nvar Component = module.exports.Component = function (el, attrValue, id) {\n var self = this;\n this.el = el;\n this.id = id;\n this.attrName = this.name + (id ? '__' + id : '');\n this.evtDetail = {id: this.id, name: this.name};\n this.initialized = false;\n this.isSingleProperty = isSingleProp(this.schema);\n this.isSinglePropertyObject = this.isSingleProperty &&\n isObject(parseProperty(undefined, this.schema)) &&\n !(this.schema.default instanceof window.HTMLElement);\n this.isObjectBased = !this.isSingleProperty || this.isSinglePropertyObject;\n this.el.components[this.attrName] = this;\n this.objectPool = objectPools[this.name];\n\n const events = this.events;\n this.events = {};\n eventsBind(this, events);\n\n // Store component data from previous update call.\n this.attrValue = undefined;\n if (this.isObjectBased) {\n this.nextData = this.objectPool.use();\n // Drop any properties added by dynamic schemas in previous use\n utils.objectPool.removeUnusedKeys(this.nextData, this.schema);\n this.oldData = this.objectPool.use();\n utils.objectPool.removeUnusedKeys(this.oldData, this.schema);\n this.previousOldData = this.objectPool.use();\n utils.objectPool.removeUnusedKeys(this.previousOldData, this.schema);\n this.parsingAttrValue = this.objectPool.use();\n utils.objectPool.removeUnusedKeys(this.parsingAttrValue, this.schema);\n } else {\n this.nextData = undefined;\n this.oldData = undefined;\n this.previousOldData = undefined;\n this.parsingAttrValue = undefined;\n }\n\n // Last value passed to updateProperties.\n this.throttledEmitComponentChanged = utils.throttle(function emitChange () {\n el.emit('componentchanged', self.evtDetail, false);\n }, 200);\n this.updateProperties(attrValue);\n};\n\nComponent.prototype = {\n /**\n * Contains the type schema and defaults for the data values.\n * Data is coerced into the types of the values of the defaults.\n */\n schema: {},\n\n /**\n * Init handler. Similar to attachedCallback.\n * Called during component initialization and is only run once.\n * Components can use this to set initial state.\n */\n init: function () { /* no-op */ },\n\n /**\n * Map of event names to binded event handlers that will be lifecycle-handled.\n * Will be detached on pause / remove.\n * Will be attached on play.\n */\n events: {},\n\n /**\n * Update handler. Similar to attributeChangedCallback.\n * Called whenever component's data changes.\n * Also called on component initialization when the component receives initial data.\n *\n * @param {object} prevData - Previous attributes of the component.\n */\n update: function (prevData) { /* no-op */ },\n\n updateSchema: undefined,\n\n /**\n * Tick handler.\n * Called on each tick of the scene render loop.\n * Affected by play and pause.\n *\n * @param {number} time - Scene tick time.\n * @param {number} timeDelta - Difference in current render time and previous render time.\n */\n tick: undefined,\n\n /**\n * Tock handler.\n * Called on each tock of the scene render loop.\n * Affected by play and pause.\n *\n * @param {number} time - Scene tick time.\n * @param {number} timeDelta - Difference in current render time and previous render time.\n * @param {object} camera - Camera used to render the last frame.\n */\n tock: undefined,\n\n /**\n * Called to start any dynamic behavior (e.g., animation, AI, events, physics).\n */\n play: function () { /* no-op */ },\n\n /**\n * Called to stop any dynamic behavior (e.g., animation, AI, events, physics).\n */\n pause: function () { /* no-op */ },\n\n /**\n * Remove handler. Similar to detachedCallback.\n * Called whenever component is removed from the entity (i.e., removeAttribute).\n * Components can use this to reset behavior on the entity.\n */\n remove: function () { /* no-op */ },\n\n /**\n * Parses each property based on property type.\n * If component is single-property, then parses the single property value.\n *\n * @param {string} value - HTML attribute value.\n * @param {boolean} silent - Suppress warning messages.\n * @returns {object} Component data.\n */\n parse: function (value, silent) {\n var schema = this.schema;\n if (this.isSingleProperty) { return parseProperty(value, schema); }\n return parseProperties(styleParser.parse(value), schema, true, this.name, silent);\n },\n\n /**\n * Stringify properties if necessary.\n *\n * Only called from `Entity.setAttribute` for properties whose parsers accept a non-string\n * value (e.g., selector, vec3 property types).\n *\n * @param {object} data - Complete component data.\n * @returns {string}\n */\n stringify: function (data) {\n var schema = this.schema;\n if (typeof data === 'string') { return data; }\n if (this.isSingleProperty) { return stringifyProperty(data, schema); }\n data = stringifyProperties(data, schema);\n return styleParser.stringify(data);\n },\n\n /**\n * Update the cache of the pre-parsed attribute value.\n *\n * @param {string} value - New data.\n * @param {boolean } clobber - Whether to wipe out and replace previous data.\n */\n updateCachedAttrValue: function (value, clobber) {\n var newAttrValue;\n var tempObject;\n var property;\n\n if (value === undefined) { return; }\n\n // If null value is the new attribute value, make the attribute value falsy.\n if (value === null) {\n if (this.isObjectBased && this.attrValue) {\n this.objectPool.recycle(this.attrValue);\n }\n this.attrValue = undefined;\n return;\n }\n\n if (value instanceof Object && !(value instanceof window.HTMLElement)) {\n // If value is an object, copy it to our pooled newAttrValue object to use to update\n // the attrValue.\n tempObject = this.objectPool.use();\n newAttrValue = utils.extend(tempObject, value);\n } else {\n newAttrValue = this.parseAttrValueForCache(value);\n }\n\n // Merge new data with previous `attrValue` if updating and not clobbering.\n if (this.isObjectBased && !clobber && this.attrValue) {\n for (property in this.attrValue) {\n if (newAttrValue[property] === undefined) {\n newAttrValue[property] = this.attrValue[property];\n }\n }\n }\n\n // Update attrValue.\n if (this.isObjectBased && !this.attrValue) {\n this.attrValue = this.objectPool.use();\n }\n utils.objectPool.clearObject(this.attrValue);\n this.attrValue = extendProperties(this.attrValue, newAttrValue, this.isObjectBased);\n utils.objectPool.clearObject(tempObject);\n },\n\n /**\n * Given an HTML attribute value parses the string based on the component schema.\n * To avoid double parsings of strings into strings we store the original instead\n * of the parsed one\n *\n * @param {string} value - HTML attribute value\n */\n parseAttrValueForCache: function (value) {\n var parsedValue;\n if (typeof value !== 'string') { return value; }\n if (this.isSingleProperty) {\n parsedValue = this.schema.parse(value);\n /**\n * To avoid bogus double parsings. Cached values will be parsed when building\n * component data. For instance when parsing a src id to its url, we want to cache\n * original string and not the parsed one (#monster -> models/monster.dae)\n * so when building data we parse the expected value.\n */\n if (typeof parsedValue === 'string') { parsedValue = value; }\n } else {\n // Parse using the style parser to avoid double parsing of individual properties.\n utils.objectPool.clearObject(this.parsingAttrValue);\n parsedValue = styleParser.parse(value, this.parsingAttrValue);\n }\n return parsedValue;\n },\n\n /**\n * Write cached attribute data to the entity DOM element.\n *\n * @param {boolean} isDefault - Whether component is a default component. Always flush for\n * default components.\n */\n flushToDOM: function (isDefault) {\n var attrValue = isDefault ? this.data : this.attrValue;\n if (attrValue === null || attrValue === undefined) { return; }\n window.HTMLElement.prototype.setAttribute.call(this.el, this.attrName,\n this.stringify(attrValue));\n },\n\n /**\n * Apply new component data if data has changed (from setAttribute).\n *\n * @param {string} attrValue - HTML attribute value.\n * If undefined, use the cached attribute value and continue updating properties.\n * @param {boolean} clobber - The previous component data is overwritten by the atrrValue\n */\n updateProperties: function (attrValue, clobber) {\n var el = this.el;\n\n // Just cache the attribute if the entity has not loaded\n // Components are not initialized until the entity has loaded\n if (!el.hasLoaded) {\n this.updateCachedAttrValue(attrValue);\n return;\n }\n\n // Parse the attribute value.\n // Cache current attrValue for future updates. Updates `this.attrValue`.\n // `null` means no value on purpose, do not set a default value, let mixins take over.\n if (attrValue !== null) {\n attrValue = this.parseAttrValueForCache(attrValue);\n }\n\n // Cache current attrValue for future updates.\n this.updateCachedAttrValue(attrValue, clobber);\n\n if (this.initialized) {\n this.updateComponent(attrValue, clobber);\n this.callUpdateHandler();\n } else {\n this.initComponent();\n }\n },\n\n initComponent: function () {\n var el = this.el;\n var initialOldData;\n\n // Build data.\n if (this.updateSchema) { this.updateSchema(this.buildData(this.attrValue, false, true)); }\n this.data = this.buildData(this.attrValue);\n\n // Component is being already initialized.\n if (el.initializingComponents[this.name]) { return; }\n\n // Prevent infinite loop in case of init method setting same component on the entity.\n el.initializingComponents[this.name] = true;\n // Initialize component.\n this.init();\n this.initialized = true;\n delete el.initializingComponents[this.name];\n\n // Store current data as previous data for future updates.\n this.oldData = extendProperties(this.oldData, this.data, this.isObjectBased);\n\n // For oldData, pass empty object to multiple-prop schemas or object single-prop schema.\n // Pass undefined to rest of types.\n initialOldData = this.isObjectBased ? this.objectPool.use() : undefined;\n this.update(initialOldData);\n if (this.isObjectBased) { this.objectPool.recycle(initialOldData); }\n\n // Play the component if the entity is playing.\n if (el.isPlaying) { this.play(); }\n el.emit('componentinitialized', this.evtDetail, false);\n },\n\n /**\n * @param attrValue - Passed argument from setAttribute.\n */\n updateComponent: function (attrValue, clobber) {\n var key;\n var mayNeedSchemaUpdate;\n\n if (clobber) {\n // Clobber. Rebuild.\n if (this.updateSchema) {\n this.updateSchema(this.buildData(this.attrValue, true, true));\n }\n this.data = this.buildData(this.attrValue, true, false);\n return;\n }\n\n // Apply new value to this.data in place since direct update.\n if (this.isSingleProperty) {\n if (this.isObjectBased) {\n parseProperty(attrValue, this.schema);\n }\n // Single-property (already parsed).\n this.data = attrValue;\n return;\n }\n\n parseProperties(attrValue, this.schema, true, this.name);\n\n // Check if we need to update schema.\n if (this.schemaChangeKeys.length) {\n for (key in attrValue) {\n if (this.schema[key].schemaChange) {\n mayNeedSchemaUpdate = true;\n break;\n }\n }\n }\n if (mayNeedSchemaUpdate) {\n // Rebuild data if need schema update.\n if (this.updateSchema) {\n this.updateSchema(this.buildData(this.attrValue, true, true));\n }\n this.data = this.buildData(this.attrValue, true, false);\n return;\n }\n\n // Normal update.\n for (key in attrValue) {\n if (attrValue[key] === undefined) { continue; }\n this.data[key] = attrValue[key];\n }\n },\n\n /**\n * Check if component should fire update and fire update lifecycle handler.\n */\n callUpdateHandler: function () {\n var hasComponentChanged;\n\n // Store the previous old data before we calculate the new oldData.\n if (this.previousOldData instanceof Object) {\n utils.objectPool.clearObject(this.previousOldData);\n }\n if (this.isObjectBased) {\n copyData(this.previousOldData, this.oldData);\n } else {\n this.previousOldData = this.oldData;\n }\n\n hasComponentChanged = !utils.deepEqual(this.oldData, this.data);\n\n // Don't update if properties haven't changed.\n // Always update rotation, position, scale.\n if (!this.isPositionRotationScale && !hasComponentChanged) { return; }\n\n // Store current data as previous data for future updates.\n // Reuse `this.oldData` object to try not to allocate another one.\n if (this.oldData instanceof Object) { utils.objectPool.clearObject(this.oldData); }\n this.oldData = extendProperties(this.oldData, this.data, this.isObjectBased);\n\n // Update component with the previous old data.\n this.update(this.previousOldData);\n\n this.throttledEmitComponentChanged();\n },\n\n handleMixinUpdate: function () {\n this.data = this.buildData(this.attrValue);\n this.callUpdateHandler();\n },\n\n /**\n * Reset value of a property to the property's default value.\n * If single-prop component, reset value to component's default value.\n *\n * @param {string} propertyName - Name of property to reset.\n */\n resetProperty: function (propertyName) {\n if (this.isObjectBased) {\n if (!(propertyName in this.attrValue)) { return; }\n delete this.attrValue[propertyName];\n this.data[propertyName] = this.schema[propertyName].default;\n } else {\n this.attrValue = this.schema.default;\n this.data = this.schema.default;\n }\n this.updateProperties(this.attrValue);\n },\n\n /**\n * Extend schema of component given a partial schema.\n *\n * Some components might want to mutate their schema based on certain properties.\n * e.g., Material component changes its schema based on `shader` to account for different\n * uniforms\n *\n * @param {object} schemaAddon - Schema chunk that extend base schema.\n */\n extendSchema: function (schemaAddon) {\n var extendedSchema;\n // Clone base schema.\n extendedSchema = utils.extend({}, components[this.name].schema);\n // Extend base schema with new schema chunk.\n utils.extend(extendedSchema, schemaAddon);\n this.schema = processSchema(extendedSchema);\n this.el.emit('schemachanged', this.evtDetail);\n },\n\n /**\n * Build component data from the current state of the entity.data.\n *\n * Precedence:\n * 1. Defaults data\n * 2. Mixin data.\n * 3. Attribute data.\n *\n * Finally coerce the data to the types of the defaults.\n *\n * @param {object} newData - Element new data.\n * @param {boolean} clobber - The previous data is completely replaced by the new one.\n * @param {boolean} silent - Suppress warning messages.\n * @return {object} The component data\n */\n buildData: function (newData, clobber, silent) {\n var componentDefined;\n var data;\n var defaultValue;\n var key;\n var mixinData;\n var nextData = this.nextData;\n var schema = this.schema;\n var i;\n var mixinEls = this.el.mixinEls;\n var previousData;\n\n // Whether component has a defined value. For arrays, treat empty as not defined.\n componentDefined = newData && newData.constructor === Array\n ? newData.length\n : newData !== undefined && newData !== null;\n\n if (this.isObjectBased) { utils.objectPool.clearObject(nextData); }\n\n // 1. Gather default values (lowest precendence).\n if (this.isSingleProperty) {\n if (this.isObjectBased) {\n // If object-based single-prop, then copy over the data to our pooled object.\n data = copyData(nextData, schema.default);\n } else {\n // If is plain single-prop, copy by value the default.\n data = isObjectOrArray(schema.default)\n ? utils.clone(schema.default)\n : schema.default;\n }\n } else {\n // Preserve previously set properties if clobber not enabled.\n previousData = !clobber && this.attrValue;\n\n // Clone default value if object so components don't share object\n data = previousData instanceof Object\n ? copyData(nextData, previousData)\n : nextData;\n\n // Apply defaults.\n for (key in schema) {\n defaultValue = schema[key].default;\n if (data[key] !== undefined) { continue; }\n // Clone default value if object so components don't share object\n data[key] = isObjectOrArray(defaultValue)\n ? utils.clone(defaultValue)\n : defaultValue;\n }\n }\n\n // 2. Gather mixin values.\n for (i = 0; i < mixinEls.length; i++) {\n mixinData = mixinEls[i].getAttribute(this.attrName);\n if (!mixinData) { continue; }\n data = extendProperties(data, mixinData, this.isObjectBased);\n }\n\n // 3. Gather attribute values (highest precendence).\n if (componentDefined) {\n if (this.isSingleProperty) {\n // If object-based, copy the value to not modify the original.\n if (isObject(newData)) {\n copyData(this.parsingAttrValue, newData);\n return parseProperty(this.parsingAttrValue, schema);\n }\n return parseProperty(newData, schema);\n }\n data = extendProperties(data, newData, this.isObjectBased);\n } else {\n // Parse and coerce using the schema.\n if (this.isSingleProperty) { return parseProperty(data, schema); }\n }\n\n return parseProperties(data, schema, undefined, this.name, silent);\n },\n\n /**\n * Attach events from component-defined events map.\n */\n eventsAttach: function () {\n var eventName;\n // Safety detach to prevent double-registration.\n this.eventsDetach();\n for (eventName in this.events) {\n this.el.addEventListener(eventName, this.events[eventName]);\n }\n },\n\n /**\n * Detach events from component-defined events map.\n */\n eventsDetach: function () {\n var eventName;\n for (eventName in this.events) {\n this.el.removeEventListener(eventName, this.events[eventName]);\n }\n },\n\n /**\n * Release and free memory.\n */\n destroy: function () {\n this.objectPool.recycle(this.attrValue);\n this.objectPool.recycle(this.oldData);\n this.objectPool.recycle(this.parsingAttrValue);\n this.attrValue = this.oldData = this.parsingAttrValue = undefined;\n }\n};\n\nfunction eventsBind (component, events) {\n var eventName;\n for (eventName in events) {\n component.events[eventName] = events[eventName].bind(component);\n }\n}\n\n// For testing.\nif (window.debug) {\n var registrationOrderWarnings = module.exports.registrationOrderWarnings = {};\n}\n\n/**\n * Register a component to A-Frame.\n *\n * @param {string} name - Component name.\n * @param {object} definition - Component schema and lifecycle method handlers.\n * @returns {object} Component.\n */\nmodule.exports.registerComponent = function (name, definition) {\n var NewComponent;\n var propertyName;\n var proto = {};\n var schema;\n var schemaIsSingleProp;\n\n // Warning if component is statically registered after the scene.\n if (document.currentScript && document.currentScript !== aframeScript) {\n scenes.forEach(function checkPosition (sceneEl) {\n // Okay to register component after the scene at runtime.\n if (sceneEl.hasLoaded) { return; }\n\n // Check that component is declared before the scene.\n if (document.currentScript.compareDocumentPosition(sceneEl) ===\n Node.DOCUMENT_POSITION_FOLLOWING) { return; }\n\n warn('The component `' + name + '` was registered in a <script> tag after the scene. ' +\n 'Component <script> tags in an HTML file should be declared *before* the scene ' +\n 'such that the component is available to entities during scene initialization.');\n\n // For testing.\n if (window.debug) { registrationOrderWarnings[name] = true; }\n });\n }\n\n if (upperCaseRegExp.test(name) === true) {\n warn('The component name `' + name + '` contains uppercase characters, but ' +\n 'HTML will ignore the capitalization of attribute names. ' +\n 'Change the name to be lowercase: `' + name.toLowerCase() + '`');\n }\n\n if (name.indexOf('__') !== -1) {\n throw new Error('The component name `' + name + '` is not allowed. ' +\n 'The sequence __ (double underscore) is reserved to specify an id' +\n ' for multiple components of the same type');\n }\n\n // Format definition object to prototype object.\n Object.keys(definition).forEach(function (key) {\n proto[key] = {\n value: definition[key],\n writable: true\n };\n });\n\n if (components[name]) {\n throw new Error('The component `' + name + '` has been already registered. ' +\n 'Check that you are not loading two versions of the same component ' +\n 'or two different components of the same name.');\n }\n\n NewComponent = function (el, attr, id) {\n Component.call(this, el, attr, id);\n };\n\n NewComponent.prototype = Object.create(Component.prototype, proto);\n NewComponent.prototype.name = name;\n NewComponent.prototype.isPositionRotationScale =\n name === 'position' || name === 'rotation' || name === 'scale';\n NewComponent.prototype.constructor = NewComponent;\n NewComponent.prototype.system = systems && systems.systems[name];\n NewComponent.prototype.play = wrapPlay(NewComponent.prototype.play);\n NewComponent.prototype.pause = wrapPause(NewComponent.prototype.pause);\n\n schema = utils.extend(processSchema(NewComponent.prototype.schema,\n NewComponent.prototype.name));\n schemaIsSingleProp = isSingleProp(NewComponent.prototype.schema);\n\n // Keep track of keys that may potentially change the schema.\n if (!schemaIsSingleProp) {\n NewComponent.prototype.schemaChangeKeys = [];\n for (propertyName in schema) {\n if (schema[propertyName].schemaChange) {\n NewComponent.prototype.schemaChangeKeys.push(propertyName);\n }\n }\n }\n\n // Create object pool for class of components.\n objectPools[name] = utils.objectPool.createPool();\n\n components[name] = {\n Component: NewComponent,\n dependencies: NewComponent.prototype.dependencies,\n isSingleProp: schemaIsSingleProp,\n multiple: NewComponent.prototype.multiple,\n name: name,\n parse: NewComponent.prototype.parse,\n parseAttrValueForCache: NewComponent.prototype.parseAttrValueForCache,\n schema: schema,\n stringify: NewComponent.prototype.stringify,\n type: NewComponent.prototype.type\n };\n return NewComponent;\n};\n\n/**\n* Clone component data.\n* Clone only the properties that are plain objects while keeping a reference for the rest.\n*\n* @param data - Component data to clone.\n* @returns Cloned data.\n*/\nfunction copyData (dest, sourceData) {\n var parsedProperty;\n var key;\n for (key in sourceData) {\n if (sourceData[key] === undefined) { continue; }\n parsedProperty = sourceData[key];\n dest[key] = isObjectOrArray(parsedProperty)\n ? utils.clone(parsedProperty)\n : parsedProperty;\n }\n return dest;\n}\n\n/**\n* Object extending with checking for single-property schema.\n*\n* @param dest - Destination object or value.\n* @param source - Source object or value\n* @param {boolean} isObjectBased - Whether values are objects.\n* @returns Overridden object or value.\n*/\nfunction extendProperties (dest, source, isObjectBased) {\n var key;\n if (isObjectBased && source.constructor === Object) {\n for (key in source) {\n if (source[key] === undefined) { continue; }\n if (source[key] && source[key].constructor === Object) {\n dest[key] = utils.clone(source[key]);\n } else {\n dest[key] = source[key];\n }\n }\n return dest;\n }\n return source;\n}\n\n/**\n * Checks if a component has defined a method that needs to run every frame.\n */\nfunction hasBehavior (component) {\n return component.tick || component.tock;\n}\n\n/**\n * Wrapper for defined pause method.\n * Pause component by removing tick behavior and calling user's pause method.\n *\n * @param pauseMethod {function}\n */\nfunction wrapPause (pauseMethod) {\n return function pause () {\n var sceneEl = this.el.sceneEl;\n if (!this.isPlaying) { return; }\n pauseMethod.call(this);\n this.isPlaying = false;\n this.eventsDetach();\n // Remove tick behavior.\n if (!hasBehavior(this)) { return; }\n sceneEl.removeBehavior(this);\n };\n}\n\n/**\n * Wrapper for defined play method.\n * Play component by adding tick behavior and calling user's play method.\n *\n * @param playMethod {function}\n */\nfunction wrapPlay (playMethod) {\n return function play () {\n var sceneEl = this.el.sceneEl;\n var shouldPlay = this.el.isPlaying && !this.isPlaying;\n if (!this.initialized || !shouldPlay) { return; }\n playMethod.call(this);\n this.isPlaying = true;\n this.eventsAttach();\n // Add tick behavior.\n if (!hasBehavior(this)) { return; }\n sceneEl.addBehavior(this);\n };\n}\n\nfunction isObject (value) {\n return value && value.constructor === Object && !(value instanceof window.HTMLElement);\n}\n\nfunction isObjectOrArray (value) {\n return value && (value.constructor === Object || value.constructor === Array) &&\n !(value instanceof window.HTMLElement);\n}\n\n},{\"../utils/\":205,\"./scene/scenes\":138,\"./schema\":140,\"./system\":142}],132:[function(_dereq_,module,exports){\nvar schema = _dereq_('./schema');\n\nvar processSchema = schema.process;\nvar geometries = module.exports.geometries = {}; // Registered geometries.\nvar geometryNames = module.exports.geometryNames = []; // Names of registered geometries.\nvar THREE = _dereq_('../lib/three');\n\n/**\n * Geometry class definition.\n *\n * Geometries extend the geometry component API to create and register geometry types.\n */\nvar Geometry = module.exports.Geometry = function () {};\n\nGeometry.prototype = {\n /**\n * Contains the type schema and defaults for the data values.\n * Data is coerced into the types of the values of the defaults.\n */\n schema: {},\n\n /**\n * Init handler. Similar to attachedCallback.\n * Called during shader initialization and is only run once.\n */\n init: function (data) {\n this.geometry = new THREE.BufferGeometry();\n return this.geometry;\n },\n\n /**\n * Update handler. Similar to attributeChangedCallback.\n * Called whenever the associated geometry data changes.\n *\n * @param {object} data - New geometry data.\n */\n update: function (data) { /* no-op */ }\n};\n\n/**\n * Registers a geometry to A-Frame.\n *\n * @param {string} name - Geometry name.\n * @param {object} definition - Geometry property and methods.\n * @returns {object} Geometry.\n */\nmodule.exports.registerGeometry = function (name, definition) {\n var NewGeometry;\n var proto = {};\n\n // Format definition object to prototype object.\n Object.keys(definition).forEach(function expandDefinition (key) {\n proto[key] = {\n value: definition[key],\n writable: true\n };\n });\n\n if (geometries[name]) {\n throw new Error('The geometry `' + name + '` has been already registered');\n }\n NewGeometry = function () { Geometry.call(this); };\n NewGeometry.prototype = Object.create(Geometry.prototype, proto);\n NewGeometry.prototype.name = name;\n NewGeometry.prototype.constructor = NewGeometry;\n geometries[name] = {\n Geometry: NewGeometry,\n schema: processSchema(NewGeometry.prototype.schema)\n };\n geometryNames.push(name);\n return NewGeometry;\n};\n\n},{\"../lib/three\":179,\"./schema\":140}],133:[function(_dereq_,module,exports){\nvar coordinates = _dereq_('../utils/coordinates');\nvar debug = _dereq_('debug');\n\nvar error = debug('core:propertyTypes:warn');\nvar warn = debug('core:propertyTypes:warn');\n\nvar propertyTypes = module.exports.propertyTypes = {};\nvar nonCharRegex = /[,> .[\\]:]/;\nvar urlRegex = /\\url\\((.+)\\)/;\n\n// Built-in property types.\nregisterPropertyType('audio', '', assetParse);\nregisterPropertyType('array', [], arrayParse, arrayStringify);\nregisterPropertyType('asset', '', assetParse);\nregisterPropertyType('boolean', false, boolParse);\nregisterPropertyType('color', '#FFF', defaultParse, defaultStringify);\nregisterPropertyType('int', 0, intParse);\nregisterPropertyType('number', 0, numberParse);\nregisterPropertyType('map', '', assetParse);\nregisterPropertyType('model', '', assetParse);\nregisterPropertyType('selector', null, selectorParse, selectorStringify);\nregisterPropertyType('selectorAll', null, selectorAllParse, selectorAllStringify);\nregisterPropertyType('src', '', srcParse);\nregisterPropertyType('string', '', defaultParse, defaultStringify);\nregisterPropertyType('time', 0, intParse);\nregisterPropertyType('vec2', {x: 0, y: 0}, vecParse, coordinates.stringify);\nregisterPropertyType('vec3', {x: 0, y: 0, z: 0}, vecParse, coordinates.stringify);\nregisterPropertyType('vec4', {x: 0, y: 0, z: 0, w: 1}, vecParse, coordinates.stringify);\n\n/**\n * Register a parser for re-use such that when someone uses `type` in the schema,\n * `schema.process` will set the property `parse` and `stringify`.\n *\n * @param {string} type - Type name.\n * @param [defaultValue=null] -\n * Default value to use if component does not define default value.\n * @param {function} [parse=defaultParse] - Parse string function.\n * @param {function} [stringify=defaultStringify] - Stringify to DOM function.\n */\nfunction registerPropertyType (type, defaultValue, parse, stringify) {\n if ('type' in propertyTypes) {\n error('Property type ' + type + ' is already registered.');\n return;\n }\n\n propertyTypes[type] = {\n default: defaultValue,\n parse: parse || defaultParse,\n stringify: stringify || defaultStringify\n };\n}\nmodule.exports.registerPropertyType = registerPropertyType;\n\nfunction arrayParse (value) {\n if (Array.isArray(value)) { return value; }\n if (!value || typeof value !== 'string') { return []; }\n return value.split(',').map(trim);\n function trim (str) { return str.trim(); }\n}\n\nfunction arrayStringify (value) {\n return value.join(', ');\n}\n\n/**\n * For general assets.\n *\n * @param {string} value - Can either be `url(<value>)`, an ID selector to an asset, or\n * just string.\n * @returns {string} Parsed value from `url(<value>)`, src from `<someasset src>`, or\n * just string.\n */\nfunction assetParse (value) {\n var el;\n var parsedUrl;\n\n // If an element was provided (e.g. canvas or video), just return it.\n if (typeof value !== 'string') { return value; }\n\n // Wrapped `url()` in case of data URI.\n parsedUrl = value.match(urlRegex);\n if (parsedUrl) { return parsedUrl[1]; }\n\n // ID.\n if (value.charAt(0) === '#') {\n el = document.getElementById(value.substring(1));\n if (el) {\n // Pass through media elements. If we have the elements, we don't have to call\n // three.js loaders which would re-request the assets.\n if (el.tagName === 'CANVAS' || el.tagName === 'VIDEO' || el.tagName === 'IMG') {\n return el;\n }\n return el.getAttribute('src');\n }\n warn('\"' + value + '\" asset not found.');\n return;\n }\n\n // Non-wrapped url().\n return value;\n}\n\nfunction defaultParse (value) {\n return value;\n}\n\nfunction defaultStringify (value) {\n if (value === null) { return 'null'; }\n return value.toString();\n}\n\nfunction boolParse (value) {\n return value !== 'false' && value !== false;\n}\n\nfunction intParse (value) {\n return parseInt(value, 10);\n}\n\nfunction numberParse (value) {\n return parseFloat(value, 10);\n}\n\nfunction selectorParse (value) {\n if (!value) { return null; }\n if (typeof value !== 'string') { return value; }\n if (value[0] === '#' && !nonCharRegex.test(value)) {\n // When selecting element by ID only, use getElementById for better performance.\n // Don't match like #myId .child.\n return document.getElementById(value.substring(1));\n }\n return document.querySelector(value);\n}\n\nfunction selectorAllParse (value) {\n if (!value) { return null; }\n if (typeof value !== 'string') { return value; }\n return Array.prototype.slice.call(document.querySelectorAll(value), 0);\n}\n\nfunction selectorStringify (value) {\n if (value.getAttribute) {\n return '#' + value.getAttribute('id');\n }\n return defaultStringify(value);\n}\n\nfunction selectorAllStringify (value) {\n if (value instanceof Array) {\n return value.map(function (element) {\n return '#' + element.getAttribute('id');\n }).join(', ');\n }\n return defaultStringify(value);\n}\n\nfunction srcParse (value) {\n warn('`src` property type is deprecated. Use `asset` instead.');\n return assetParse(value);\n}\n\nfunction vecParse (value) {\n return coordinates.parse(value, this.default);\n}\n\n/**\n * Validate the default values in a schema to match their type.\n *\n * @param {string} type - Property type name.\n * @param defaultVal - Property type default value.\n * @returns {boolean} Whether default value is accurate given the type.\n */\nfunction isValidDefaultValue (type, defaultVal) {\n if (type === 'audio' && typeof defaultVal !== 'string') { return false; }\n if (type === 'array' && !Array.isArray(defaultVal)) { return false; }\n if (type === 'asset' && typeof defaultVal !== 'string') { return false; }\n if (type === 'boolean' && typeof defaultVal !== 'boolean') { return false; }\n if (type === 'color' && typeof defaultVal !== 'string') { return false; }\n if (type === 'int' && typeof defaultVal !== 'number') { return false; }\n if (type === 'number' && typeof defaultVal !== 'number') { return false; }\n if (type === 'map' && typeof defaultVal !== 'string') { return false; }\n if (type === 'model' && typeof defaultVal !== 'string') { return false; }\n if (type === 'selector' && typeof defaultVal !== 'string' &&\n defaultVal !== null) { return false; }\n if (type === 'selectorAll' && typeof defaultVal !== 'string' &&\n defaultVal !== null) { return false; }\n if (type === 'src' && typeof defaultVal !== 'string') { return false; }\n if (type === 'string' && typeof defaultVal !== 'string') { return false; }\n if (type === 'time' && typeof defaultVal !== 'number') { return false; }\n if (type === 'vec2') { return isValidDefaultCoordinate(defaultVal, 2); }\n if (type === 'vec3') { return isValidDefaultCoordinate(defaultVal, 3); }\n if (type === 'vec4') { return isValidDefaultCoordinate(defaultVal, 4); }\n return true;\n}\nmodule.exports.isValidDefaultValue = isValidDefaultValue;\n\n/**\n * Checks if default coordinates are valid.\n *\n * @param possibleCoordinates\n * @param {number} dimensions - 2 for 2D Vector, 3 for 3D vector.\n * @returns {boolean} Whether coordinates are parsed correctly.\n */\nfunction isValidDefaultCoordinate (possibleCoordinates, dimensions) {\n if (possibleCoordinates === null) { return true; }\n if (typeof possibleCoordinates !== 'object') { return false; }\n\n if (Object.keys(possibleCoordinates).length !== dimensions) {\n return false;\n } else {\n var x = possibleCoordinates.x;\n var y = possibleCoordinates.y;\n var z = possibleCoordinates.z;\n var w = possibleCoordinates.w;\n\n if (typeof x !== 'number' || typeof y !== 'number') { return false; }\n if (dimensions > 2 && typeof z !== 'number') { return false; }\n if (dimensions > 3 && typeof w !== 'number') { return false; }\n }\n\n return true;\n}\nmodule.exports.isValidDefaultCoordinate = isValidDefaultCoordinate;\n\n},{\"../utils/coordinates\":200,\"debug\":8}],134:[function(_dereq_,module,exports){\n/* global Promise, screen, CustomEvent */\nvar initMetaTags = _dereq_('./metaTags').inject;\nvar initWakelock = _dereq_('./wakelock');\nvar loadingScreen = _dereq_('./loadingScreen');\nvar re = _dereq_('../a-register-element');\nvar scenes = _dereq_('./scenes');\nvar systems = _dereq_('../system').systems;\nvar THREE = _dereq_('../../lib/three');\nvar utils = _dereq_('../../utils/');\n// Require after.\nvar AEntity = _dereq_('../a-entity');\nvar ANode = _dereq_('../a-node');\nvar initPostMessageAPI = _dereq_('./postMessage');\n\nvar bind = utils.bind;\nvar isIOS = utils.device.isIOS();\nvar isMobile = utils.device.isMobile();\nvar isWebXRAvailable = utils.device.isWebXRAvailable;\nvar registerElement = re.registerElement;\nvar warn = utils.debug('core:a-scene:warn');\n\nif (isIOS) { _dereq_('../../utils/ios-orientationchange-blank-bug'); }\n\n/**\n * Scene element, holds all entities.\n *\n * @member {array} behaviors - Component instances that have registered themselves to be\n updated on every tick.\n * @member {object} camera - three.js Camera object.\n * @member {object} canvas\n * @member {bool} isScene - Differentiates as scene entity as opposed to other entites.\n * @member {bool} isMobile - Whether browser is mobile (via UA detection).\n * @member {object} object3D - Root three.js Scene object.\n * @member {object} renderer\n * @member {bool} renderStarted\n * @member {object} systems - Registered instantiated systems.\n * @member {number} time\n */\nmodule.exports.AScene = registerElement('a-scene', {\n prototype: Object.create(AEntity.prototype, {\n createdCallback: {\n value: function () {\n this.clock = new THREE.Clock();\n this.isIOS = isIOS;\n this.isMobile = isMobile;\n this.hasWebXR = isWebXRAvailable;\n this.isAR = false;\n this.isScene = true;\n this.object3D = new THREE.Scene();\n var self = this;\n this.object3D.onAfterRender = function (renderer, scene, camera) {\n // THREE may swap the camera used for the rendering if in VR, so we pass it to tock\n if (self.isPlaying) { self.tock(self.time, self.delta, camera); }\n };\n this.resize = bind(this.resize, this);\n this.render = bind(this.render, this);\n this.systems = {};\n this.systemNames = [];\n this.time = this.delta = 0;\n\n this.behaviors = {tick: [], tock: []};\n this.hasLoaded = false;\n this.isPlaying = false;\n this.originalHTML = this.innerHTML;\n\n // Default components.\n this.setAttribute('inspector', '');\n this.setAttribute('keyboard-shortcuts', '');\n this.setAttribute('screenshot', '');\n this.setAttribute('vr-mode-ui', '');\n this.setAttribute('device-orientation-permission-ui', '');\n }\n },\n\n addFullScreenStyles: {\n value: function () {\n document.documentElement.classList.add('a-fullscreen');\n }\n },\n\n removeFullScreenStyles: {\n value: function () {\n document.documentElement.classList.remove('a-fullscreen');\n }\n },\n\n attachedCallback: {\n value: function () {\n var self = this;\n var embedded = this.hasAttribute('embedded');\n // Renderer initialization\n setupCanvas(this);\n this.setupRenderer();\n loadingScreen.setup(this, getCanvasSize);\n\n this.resize();\n if (!embedded) { this.addFullScreenStyles(); }\n initPostMessageAPI(this);\n\n initMetaTags(this);\n initWakelock(this);\n\n // Handler to exit VR (e.g., Oculus Browser back button).\n this.onVRPresentChangeBound = bind(this.onVRPresentChange, this);\n window.addEventListener('vrdisplaypresentchange', this.onVRPresentChangeBound);\n\n // Bind functions.\n this.enterVRBound = function () { self.enterVR(); };\n this.exitVRBound = function () { self.exitVR(); };\n this.exitVRTrueBound = function () { self.exitVR(true); };\n this.pointerRestrictedBound = function () { self.pointerRestricted(); };\n this.pointerUnrestrictedBound = function () { self.pointerUnrestricted(); };\n\n if (!isWebXRAvailable) {\n // Exit VR on `vrdisplaydeactivate` (e.g. taking off Rift headset).\n window.addEventListener('vrdisplaydeactivate', this.exitVRBound);\n\n // Exit VR on `vrdisplaydisconnect` (e.g. unplugging Rift headset).\n window.addEventListener('vrdisplaydisconnect', this.exitVRTrueBound);\n\n // Register for mouse restricted events while in VR\n // (e.g. mouse no longer available on desktop 2D view)\n window.addEventListener('vrdisplaypointerrestricted', this.pointerRestrictedBound);\n\n // Register for mouse unrestricted events while in VR\n // (e.g. mouse once again available on desktop 2D view)\n window.addEventListener('vrdisplaypointerunrestricted',\n this.pointerUnrestrictedBound);\n }\n\n window.addEventListener('sessionend', this.resize);\n // Camera set up by camera system.\n this.addEventListener('cameraready', function () {\n self.attachedCallbackPostCamera();\n });\n\n this.initSystems();\n\n // WebXR Immersive navigation handler.\n if (this.hasWebXR && navigator.xr && navigator.xr.addEventListener) {\n navigator.xr.addEventListener('sessiongranted', function () { self.enterVR(); });\n }\n }\n },\n\n attachedCallbackPostCamera: {\n value: function () {\n var resize;\n var self = this;\n\n window.addEventListener('load', resize);\n window.addEventListener('resize', function () {\n // Workaround for a Webkit bug (https://bugs.webkit.org/show_bug.cgi?id=170595)\n // where the window does not contain the correct viewport size\n // after an orientation change. The window size is correct if the operation\n // is postponed a few milliseconds.\n // self.resize can be called directly once the bug above is fixed.\n if (self.isIOS) {\n setTimeout(self.resize, 100);\n } else {\n self.resize();\n }\n });\n this.play();\n\n // Add to scene index.\n scenes.push(this);\n },\n writable: window.debug\n },\n\n /**\n * Initialize all systems.\n */\n initSystems: {\n value: function () {\n var name;\n\n // Initialize camera system first.\n this.initSystem('camera');\n\n for (name in systems) {\n if (name === 'camera') { continue; }\n this.initSystem(name);\n }\n }\n },\n\n /**\n * Initialize a system.\n */\n initSystem: {\n value: function (name) {\n if (this.systems[name]) { return; }\n this.systems[name] = new systems[name](this);\n this.systemNames.push(name);\n }\n },\n\n /**\n * Shut down scene on detach.\n */\n detachedCallback: {\n value: function () {\n // Remove from scene index.\n var sceneIndex = scenes.indexOf(this);\n scenes.splice(sceneIndex, 1);\n\n window.removeEventListener('vrdisplaypresentchange', this.onVRPresentChangeBound);\n window.removeEventListener('vrdisplayactivate', this.enterVRBound);\n window.removeEventListener('vrdisplaydeactivate', this.exitVRBound);\n window.removeEventListener('vrdisplayconnect', this.enterVRBound);\n window.removeEventListener('vrdisplaydisconnect', this.exitVRTrueBound);\n window.removeEventListener('vrdisplaypointerrestricted', this.pointerRestrictedBound);\n window.removeEventListener('vrdisplaypointerunrestricted', this.pointerUnrestrictedBound);\n window.removeEventListener('sessionend', this.resize);\n this.renderer.xr.dispose();\n }\n },\n\n /**\n * Add ticks and tocks.\n *\n * @param {object} behavior - A component.\n */\n addBehavior: {\n value: function (behavior) {\n var behaviorArr;\n var behaviors = this.behaviors;\n var behaviorType;\n\n // Check if behavior has tick and/or tock and add the behavior to the appropriate list.\n for (behaviorType in behaviors) {\n if (!behavior[behaviorType]) { continue; }\n behaviorArr = this.behaviors[behaviorType];\n if (behaviorArr.indexOf(behavior) === -1) {\n behaviorArr.push(behavior);\n }\n }\n }\n },\n\n /**\n * For tests.\n */\n getPointerLockElement: {\n value: function () {\n return document.pointerLockElement;\n },\n writable: window.debug\n },\n\n /**\n * For tests.\n */\n checkHeadsetConnected: {\n value: utils.device.checkHeadsetConnected,\n writable: window.debug\n },\n\n enterAR: {\n value: function () {\n var errorMessage;\n if (!this.hasWebXR) {\n errorMessage = 'Failed to enter AR mode, WebXR not supported.';\n throw new Error(errorMessage);\n }\n if (!utils.device.checkARSupport()) {\n errorMessage = 'Failed to enter AR, WebXR immersive-ar mode not supported in your browser or device.';\n throw new Error(errorMessage);\n }\n return this.enterVR(true);\n }\n },\n\n /**\n * Call `requestPresent` if WebVR or WebVR polyfill.\n * Call `requestFullscreen` on desktop.\n * Handle events, states, fullscreen styles.\n *\n * @param {bool?} useAR - if true, try immersive-ar mode\n * @returns {Promise}\n */\n enterVR: {\n value: function (useAR) {\n var self = this;\n var vrDisplay;\n var vrManager = self.renderer.xr;\n var xrInit;\n\n // Don't enter VR if already in VR.\n if (this.is('vr-mode')) { return Promise.resolve('Already in VR.'); }\n\n // Has VR.\n if (this.checkHeadsetConnected() || this.isMobile) {\n vrManager.enabled = true;\n\n if (this.hasWebXR) {\n // XR API.\n if (this.xrSession) {\n this.xrSession.removeEventListener('end', this.exitVRBound);\n }\n var refspace = this.sceneEl.systems.webxr.sessionReferenceSpaceType;\n vrManager.setReferenceSpaceType(refspace);\n var xrMode = useAR ? 'immersive-ar' : 'immersive-vr';\n xrInit = this.sceneEl.systems.webxr.sessionConfiguration;\n return new Promise(function (resolve, reject) {\n navigator.xr.requestSession(xrMode, xrInit).then(\n function requestSuccess (xrSession) {\n self.xrSession = xrSession;\n vrManager.layersEnabled = xrInit.requiredFeatures.indexOf('layers') !== -1;\n vrManager.setSession(xrSession);\n xrSession.addEventListener('end', self.exitVRBound);\n enterVRSuccess(resolve);\n },\n function requestFail (error) {\n var useAR = xrMode === 'immersive-ar';\n var mode = useAR ? 'AR' : 'VR';\n throw new Error('Failed to enter ' + mode + ' mode (`requestSession`) ' + error);\n }\n );\n });\n } else {\n vrDisplay = utils.device.getVRDisplay();\n vrManager.setDevice(vrDisplay);\n if (vrDisplay.isPresenting &&\n !window.hasNativeWebVRImplementation) {\n enterVRSuccess();\n return Promise.resolve();\n }\n var rendererSystem = this.getAttribute('renderer');\n var presentationAttributes = {\n highRefreshRate: rendererSystem.highRefreshRate,\n foveationLevel: rendererSystem.foveationLevel\n };\n\n return vrDisplay.requestPresent([{\n source: this.canvas,\n attributes: presentationAttributes\n }]).then(enterVRSuccess, enterVRFailure);\n }\n }\n\n // No VR.\n enterVRSuccess();\n return Promise.resolve();\n\n // Callback that happens on enter VR success or enter fullscreen (any API).\n function enterVRSuccess (resolve) {\n // vrdisplaypresentchange fires only once when the first requestPresent is completed;\n // the first requestPresent could be called from ondisplayactivate and there is no way\n // to setup everything from there. Thus, we need to emulate another vrdisplaypresentchange\n // for the actual requestPresent. Need to make sure there are no issues with firing the\n // vrdisplaypresentchange multiple times.\n var event;\n if (window.hasNativeWebVRImplementation && !window.hasNativeWebXRImplementation) {\n event = new CustomEvent('vrdisplaypresentchange', {detail: {display: utils.device.getVRDisplay()}});\n window.dispatchEvent(event);\n }\n\n if (useAR) {\n self.addState('ar-mode');\n } else {\n self.addState('vr-mode');\n }\n self.emit('enter-vr', {target: self});\n // Lock to landscape orientation on mobile.\n if (!isWebXRAvailable && self.isMobile && screen.orientation && screen.orientation.lock) {\n screen.orientation.lock('landscape');\n }\n self.addFullScreenStyles();\n\n // On mobile, the polyfill handles fullscreen.\n // TODO: 07/16 Chromium builds break when `requestFullscreen`ing on a canvas\n // that we are also `requestPresent`ing. Until then, don't fullscreen if headset\n // connected.\n if (!self.isMobile && !self.checkHeadsetConnected()) {\n requestFullscreen(self.canvas);\n }\n\n self.renderer.setAnimationLoop(self.render);\n self.resize();\n if (resolve) { resolve(); }\n }\n\n function enterVRFailure (err) {\n self.removeState('vr-mode');\n if (err && err.message) {\n throw new Error('Failed to enter VR mode (`requestPresent`): ' + err.message);\n } else {\n throw new Error('Failed to enter VR mode (`requestPresent`).');\n }\n }\n },\n writable: true\n },\n /**\n * Call `exitPresent` if WebVR / WebXR or WebVR polyfill.\n * Handle events, states, fullscreen styles.\n *\n * @returns {Promise}\n */\n exitVR: {\n value: function () {\n var self = this;\n var vrDisplay;\n var vrManager = this.renderer.xr;\n\n // Don't exit VR if not in VR.\n if (!this.is('vr-mode') && !this.is('ar-mode')) { return Promise.resolve('Not in immersive mode.'); }\n\n // Handle exiting VR if not yet already and in a headset or polyfill.\n if (this.checkHeadsetConnected() || this.isMobile) {\n vrManager.enabled = false;\n vrDisplay = utils.device.getVRDisplay();\n if (this.hasWebXR) {\n this.xrSession.removeEventListener('end', this.exitVRBound);\n // Capture promise to avoid errors.\n this.xrSession.end().then(function () {}, function () {});\n this.xrSession = undefined;\n vrManager.setSession(null);\n } else {\n if (vrDisplay.isPresenting) {\n return vrDisplay.exitPresent().then(exitVRSuccess, exitVRFailure);\n }\n }\n } else {\n exitFullscreen();\n }\n\n // Handle exiting VR in all other cases (2D fullscreen, external exit VR event).\n exitVRSuccess();\n\n return Promise.resolve();\n\n function exitVRSuccess () {\n self.removeState('vr-mode');\n self.removeState('ar-mode');\n // Lock to landscape orientation on mobile.\n if (self.isMobile && screen.orientation && screen.orientation.unlock) {\n screen.orientation.unlock();\n }\n // Exiting VR in embedded mode, no longer need fullscreen styles.\n if (self.hasAttribute('embedded')) { self.removeFullScreenStyles(); }\n\n self.resize();\n if (self.isIOS) { utils.forceCanvasResizeSafariMobile(self.canvas); }\n self.renderer.setPixelRatio(window.devicePixelRatio);\n self.emit('exit-vr', {target: self});\n }\n\n function exitVRFailure (err) {\n if (err && err.message) {\n throw new Error('Failed to exit VR mode (`exitPresent`): ' + err.message);\n } else {\n throw new Error('Failed to exit VR mode (`exitPresent`).');\n }\n }\n },\n writable: true\n },\n\n pointerRestricted: {\n value: function () {\n if (this.canvas) {\n var pointerLockElement = this.getPointerLockElement();\n if (pointerLockElement && pointerLockElement !== this.canvas && document.exitPointerLock) {\n // Recreate pointer lock on the canvas, if taken on another element.\n document.exitPointerLock();\n }\n\n if (this.canvas.requestPointerLock) {\n this.canvas.requestPointerLock();\n }\n }\n }\n },\n\n pointerUnrestricted: {\n value: function () {\n var pointerLockElement = this.getPointerLockElement();\n if (pointerLockElement && pointerLockElement === this.canvas && document.exitPointerLock) {\n document.exitPointerLock();\n }\n }\n },\n\n /**\n * Handle `vrdisplaypresentchange` event for exiting VR through other means than\n * `<ESC>` key. For example, GearVR back button on Oculus Browser.\n */\n onVRPresentChange: {\n value: function (evt) {\n // Polyfill places display inside the detail property\n var display = evt.display || evt.detail.display;\n // Entering VR.\n if (display && display.isPresenting) {\n this.enterVR();\n return;\n }\n // Exiting VR.\n this.exitVR();\n }\n },\n\n /**\n * Wraps Entity.getAttribute to take into account for systems.\n * If system exists, then return system data rather than possible component data.\n */\n getAttribute: {\n value: function (attr) {\n var system = this.systems[attr];\n if (system) { return system.data; }\n return AEntity.prototype.getAttribute.call(this, attr);\n }\n },\n\n /**\n * `getAttribute` used to be `getDOMAttribute` and `getComputedAttribute` used to be\n * what `getAttribute` is now. Now legacy code.\n */\n getComputedAttribute: {\n value: function (attr) {\n warn('`getComputedAttribute` is deprecated. Use `getAttribute` instead.');\n this.getAttribute(attr);\n }\n },\n\n /**\n * Wraps Entity.getDOMAttribute to take into account for systems.\n * If system exists, then return system data rather than possible component data.\n */\n getDOMAttribute: {\n value: function (attr) {\n var system = this.systems[attr];\n if (system) { return system.data; }\n return AEntity.prototype.getDOMAttribute.call(this, attr);\n }\n },\n\n /**\n * Wrap Entity.setAttribute to take into account for systems.\n * If system exists, then skip component initialization checks and do a normal\n * setAttribute.\n */\n setAttribute: {\n value: function (attr, value, componentPropValue) {\n var system = this.systems[attr];\n if (system) {\n ANode.prototype.setAttribute.call(this, attr, value);\n system.updateProperties(value);\n return;\n }\n AEntity.prototype.setAttribute.call(this, attr, value, componentPropValue);\n }\n },\n\n /**\n * @param {object} behavior - A component.\n */\n removeBehavior: {\n value: function (behavior) {\n var behaviorArr;\n var behaviorType;\n var behaviors = this.behaviors;\n var index;\n\n // Check if behavior has tick and/or tock and remove the behavior from the appropriate\n // array.\n for (behaviorType in behaviors) {\n if (!behavior[behaviorType]) { continue; }\n behaviorArr = this.behaviors[behaviorType];\n index = behaviorArr.indexOf(behavior);\n if (index !== -1) { behaviorArr.splice(index, 1); }\n }\n }\n },\n\n resize: {\n value: function () {\n var camera = this.camera;\n var canvas = this.canvas;\n var embedded;\n var isVRPresenting;\n var size;\n var isPresenting = this.renderer.xr.isPresenting;\n isVRPresenting = this.renderer.xr.enabled && isPresenting;\n\n // Do not update renderer, if a camera or a canvas have not been injected.\n // In VR mode, three handles canvas resize based on the dimensions returned by\n // the getEyeParameters function of the WebVR API. These dimensions are independent of\n // the window size, therefore should not be overwritten with the window's width and\n // height, // except when in fullscreen mode.\n if (!camera || !canvas || (this.is('vr-mode') && (this.isMobile || isVRPresenting))) {\n return;\n }\n\n // Update camera.\n embedded = this.getAttribute('embedded') && !this.is('vr-mode');\n size = getCanvasSize(canvas, embedded, this.maxCanvasSize, this.is('vr-mode'));\n camera.aspect = size.width / size.height;\n camera.updateProjectionMatrix();\n\n // Notify renderer of size change.\n this.renderer.setSize(size.width, size.height, false);\n this.emit('rendererresize', null, false);\n },\n writable: true\n },\n\n setupRenderer: {\n value: function () {\n var self = this;\n var renderer;\n var rendererAttr;\n var rendererAttrString;\n var rendererConfig;\n\n rendererConfig = {\n alpha: true,\n antialias: !isMobile,\n canvas: this.canvas,\n logarithmicDepthBuffer: false,\n powerPreference: 'high-performance'\n };\n\n this.maxCanvasSize = {height: 1920, width: 1920};\n\n if (this.hasAttribute('renderer')) {\n rendererAttrString = this.getAttribute('renderer');\n rendererAttr = utils.styleParser.parse(rendererAttrString);\n\n if (rendererAttr.precision) {\n rendererConfig.precision = rendererAttr.precision + 'p';\n }\n\n if (rendererAttr.antialias && rendererAttr.antialias !== 'auto') {\n rendererConfig.antialias = rendererAttr.antialias === 'true';\n }\n\n if (rendererAttr.logarithmicDepthBuffer && rendererAttr.logarithmicDepthBuffer !== 'auto') {\n rendererConfig.logarithmicDepthBuffer = rendererAttr.logarithmicDepthBuffer === 'true';\n }\n\n if (rendererAttr.alpha) {\n rendererConfig.alpha = rendererAttr.alpha === 'true';\n }\n\n this.maxCanvasSize = {\n width: rendererAttr.maxCanvasWidth\n ? parseInt(rendererAttr.maxCanvasWidth)\n : this.maxCanvasSize.width,\n height: rendererAttr.maxCanvasHeight\n ? parseInt(rendererAttr.maxCanvasHeight)\n : this.maxCanvasSize.height\n };\n }\n\n renderer = this.renderer = new THREE.WebGLRenderer(rendererConfig);\n renderer.setPixelRatio(window.devicePixelRatio);\n renderer.sortObjects = false;\n if (this.camera) { renderer.xr.setPoseTarget(this.camera.el.object3D); }\n this.addEventListener('camera-set-active', function () {\n renderer.xr.setPoseTarget(self.camera.el.object3D);\n });\n },\n writable: window.debug\n },\n\n /**\n * Handler attached to elements to help scene know when to kick off.\n * Scene waits for all entities to load.\n */\n play: {\n value: function () {\n var self = this;\n var sceneEl = this;\n\n if (this.renderStarted) {\n AEntity.prototype.play.call(this);\n return;\n }\n\n this.addEventListener('loaded', function () {\n var renderer = this.renderer;\n var vrDisplay;\n var vrManager = this.renderer.xr;\n AEntity.prototype.play.call(this); // .play() *before* render.\n\n if (sceneEl.renderStarted) { return; }\n sceneEl.resize();\n\n // Kick off render loop.\n if (sceneEl.renderer) {\n if (window.performance) { window.performance.mark('render-started'); }\n loadingScreen.remove();\n vrDisplay = utils.device.getVRDisplay();\n if (vrDisplay && vrDisplay.isPresenting) {\n vrManager.setDevice(vrDisplay);\n vrManager.enabled = true;\n sceneEl.enterVR();\n }\n renderer.setAnimationLoop(this.render);\n sceneEl.renderStarted = true;\n sceneEl.emit('renderstart');\n }\n });\n\n // setTimeout to wait for all nodes to attach and run their callbacks.\n setTimeout(function () {\n AEntity.prototype.load.call(self);\n });\n }\n },\n\n /**\n * Wrap `updateComponent` to not initialize the component if the component has a system\n * (aframevr/aframe#2365).\n */\n updateComponent: {\n value: function (componentName) {\n if (componentName in systems) { return; }\n AEntity.prototype.updateComponent.apply(this, arguments);\n }\n },\n\n /**\n * Behavior-updater meant to be called from scene render.\n * Abstracted to a different function to facilitate unit testing (`scene.tick()`) without\n * needing to render.\n */\n tick: {\n value: function (time, timeDelta) {\n var i;\n var systems = this.systems;\n\n // Components.\n for (i = 0; i < this.behaviors.tick.length; i++) {\n if (!this.behaviors.tick[i].el.isPlaying) { continue; }\n this.behaviors.tick[i].tick(time, timeDelta);\n }\n\n // Systems.\n for (i = 0; i < this.systemNames.length; i++) {\n if (!systems[this.systemNames[i]].tick) { continue; }\n systems[this.systemNames[i]].tick(time, timeDelta);\n }\n }\n },\n\n /**\n * Behavior-updater meant to be called after scene render for post processing purposes.\n * Abstracted to a different function to facilitate unit testing (`scene.tock()`) without\n * needing to render.\n */\n tock: {\n value: function (time, timeDelta, camera) {\n var i;\n var systems = this.systems;\n\n // Components.\n for (i = 0; i < this.behaviors.tock.length; i++) {\n if (!this.behaviors.tock[i].el.isPlaying) { continue; }\n this.behaviors.tock[i].tock(time, timeDelta, camera);\n }\n\n // Systems.\n for (i = 0; i < this.systemNames.length; i++) {\n if (!systems[this.systemNames[i]].tock) { continue; }\n systems[this.systemNames[i]].tock(time, timeDelta, camera);\n }\n }\n },\n\n /**\n * The render loop.\n *\n * Updates animations.\n * Updates behaviors.\n * Renders with request animation frame.\n */\n render: {\n value: function (time, frame) {\n var renderer = this.renderer;\n\n this.frame = frame;\n this.delta = this.clock.getDelta() * 1000;\n this.time = this.clock.elapsedTime * 1000;\n\n if (this.isPlaying) { this.tick(this.time, this.delta); }\n var savedBackground = null;\n if (this.is('ar-mode')) {\n // In AR mode, don't render the default background. Hide it, then\n // restore it again after rendering.\n savedBackground = this.object3D.background;\n this.object3D.background = null;\n }\n renderer.render(this.object3D, this.camera);\n if (savedBackground) {\n this.object3D.background = savedBackground;\n }\n },\n writable: true\n }\n })\n});\n\n/**\n * Return the canvas size where the scene will be rendered.\n * Will be always the window size except when the scene is embedded.\n * The parent size (less than max size) will be returned in that case.\n *\n * @param {object} canvasEl - the canvas element\n * @param {boolean} embedded - Is the scene embedded?\n * @param {object} max - Max size parameters\n * @param {boolean} isVR - If in VR\n */\nfunction getCanvasSize (canvasEl, embedded, maxSize, isVR) {\n if (!canvasEl.parentElement) { return {height: 0, width: 0}; }\n if (embedded) {\n return {\n height: canvasEl.parentElement.offsetHeight,\n width: canvasEl.parentElement.offsetWidth\n };\n }\n return getMaxSize(maxSize, isVR);\n}\n\n/**\n * Return the canvas size. Will be the window size unless that size is greater than the\n * maximum size (1920x1920 by default). The constrained size will be returned in that case,\n * maintaining aspect ratio\n *\n * @param {object} maxSize - Max size parameters (width and height).\n * @param {boolean} isVR - If in VR.\n * @returns {object} Width and height.\n */\nfunction getMaxSize (maxSize, isVR) {\n var aspectRatio;\n var size;\n var pixelRatio = window.devicePixelRatio;\n\n size = {height: document.body.offsetHeight, width: document.body.offsetWidth};\n if (!maxSize || isVR || (maxSize.width === -1 && maxSize.height === -1)) {\n return size;\n }\n\n if (size.width * pixelRatio < maxSize.width &&\n size.height * pixelRatio < maxSize.height) {\n return size;\n }\n\n aspectRatio = size.width / size.height;\n\n if ((size.width * pixelRatio) > maxSize.width && maxSize.width !== -1) {\n size.width = Math.round(maxSize.width / pixelRatio);\n size.height = Math.round(maxSize.width / aspectRatio / pixelRatio);\n }\n\n if ((size.height * pixelRatio) > maxSize.height && maxSize.height !== -1) {\n size.height = Math.round(maxSize.height / pixelRatio);\n size.width = Math.round(maxSize.height * aspectRatio / pixelRatio);\n }\n\n return size;\n}\n\nfunction requestFullscreen (canvas) {\n var requestFullscreen =\n canvas.requestFullscreen ||\n canvas.webkitRequestFullscreen ||\n canvas.mozRequestFullScreen || // The capitalized `S` is not a typo.\n canvas.msRequestFullscreen;\n // Hide navigation buttons on Android.\n requestFullscreen.apply(canvas, [{navigationUI: 'hide'}]);\n}\n\nfunction exitFullscreen () {\n var fullscreenEl =\n document.fullscreenElement ||\n document.webkitFullscreenElement ||\n document.mozFullScreenElement;\n if (!fullscreenEl) { return; }\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n}\n\nfunction setupCanvas (sceneEl) {\n var canvasEl;\n\n canvasEl = document.createElement('canvas');\n canvasEl.classList.add('a-canvas');\n // Mark canvas as provided/injected by A-Frame.\n canvasEl.dataset.aframeCanvas = true;\n sceneEl.appendChild(canvasEl);\n\n document.addEventListener('fullscreenchange', onFullScreenChange);\n document.addEventListener('mozfullscreenchange', onFullScreenChange);\n document.addEventListener('webkitfullscreenchange', onFullScreenChange);\n document.addEventListener('MSFullscreenChange', onFullScreenChange);\n\n // Prevent overscroll on mobile.\n canvasEl.addEventListener('touchmove', function (event) { event.preventDefault(); });\n\n // Set canvas on scene.\n sceneEl.canvas = canvasEl;\n sceneEl.emit('render-target-loaded', {target: canvasEl});\n // For unknown reasons a synchronous resize does not work on desktop when\n // entering/exiting fullscreen.\n setTimeout(bind(sceneEl.resize, sceneEl), 0);\n\n function onFullScreenChange () {\n var fullscreenEl =\n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement;\n // No fullscren element === exit fullscreen\n if (!fullscreenEl) { sceneEl.exitVR(); }\n document.activeElement.blur();\n document.body.focus();\n }\n}\nmodule.exports.setupCanvas = setupCanvas; // For testing.\n\n},{\"../../lib/three\":179,\"../../utils/\":205,\"../../utils/ios-orientationchange-blank-bug\":206,\"../a-entity\":127,\"../a-node\":129,\"../a-register-element\":130,\"../system\":142,\"./loadingScreen\":135,\"./metaTags\":136,\"./postMessage\":137,\"./scenes\":138,\"./wakelock\":139}],135:[function(_dereq_,module,exports){\n/* global THREE */\nvar utils = _dereq_('../../utils/');\nvar styleParser = utils.styleParser;\n\nvar sceneEl;\nvar titleEl;\nvar getSceneCanvasSize;\n\nvar ATTR_NAME = 'loading-screen';\nvar LOADER_TITLE_CLASS = 'a-loader-title';\n\nmodule.exports.setup = function setup (el, getCanvasSize) {\n sceneEl = el;\n getSceneCanvasSize = getCanvasSize;\n var loaderAttribute = sceneEl.hasAttribute(ATTR_NAME) ? styleParser.parse(sceneEl.getAttribute(ATTR_NAME)) : undefined;\n var dotsColor = loaderAttribute && loaderAttribute.dotsColor || 'white';\n var backgroundColor = loaderAttribute && loaderAttribute.backgroundColor || '#24CAFF';\n var loaderEnabled = loaderAttribute === undefined || loaderAttribute.enabled === 'true' || loaderAttribute.enabled === undefined; // true default\n var loaderScene;\n var sphereGeometry;\n var sphereMaterial;\n var sphereMesh1;\n var sphereMesh2;\n var sphereMesh3;\n var camera;\n var clock;\n var time;\n var render;\n\n if (!loaderEnabled) { return; }\n\n // Setup Scene.\n loaderScene = new THREE.Scene();\n sphereGeometry = new THREE.SphereGeometry(0.20, 36, 18, 0, 2 * Math.PI, 0, Math.PI);\n sphereMaterial = new THREE.MeshBasicMaterial({color: dotsColor});\n sphereMesh1 = new THREE.Mesh(sphereGeometry, sphereMaterial);\n sphereMesh2 = sphereMesh1.clone();\n sphereMesh3 = sphereMesh1.clone();\n camera = new THREE.PerspectiveCamera(80, window.innerWidth / window.innerHeight, 0.0005, 10000);\n clock = new THREE.Clock();\n time = 0;\n render = function () {\n sceneEl.renderer.render(loaderScene, camera);\n time = clock.getElapsedTime() % 4;\n sphereMesh1.visible = time >= 1;\n sphereMesh2.visible = time >= 2;\n sphereMesh3.visible = time >= 3;\n };\n\n loaderScene.background = new THREE.Color(backgroundColor);\n loaderScene.add(camera);\n sphereMesh1.position.set(-1, 0, -15);\n sphereMesh2.position.set(0, 0, -15);\n sphereMesh3.position.set(1, 0, -15);\n camera.add(sphereMesh1);\n camera.add(sphereMesh2);\n camera.add(sphereMesh3);\n setupTitle();\n\n // Delay 200ms to avoid loader flashes.\n setTimeout(function () {\n if (sceneEl.hasLoaded) { return; }\n resize(camera);\n titleEl.style.display = 'block';\n window.addEventListener('resize', function () { resize(camera); });\n sceneEl.renderer.setAnimationLoop(render);\n }, 200);\n};\n\nmodule.exports.remove = function remove () {\n window.removeEventListener('resize', resize);\n if (!titleEl) { return; }\n // Hide title.\n titleEl.style.display = 'none';\n};\n\nfunction resize (camera) {\n var embedded = sceneEl.hasAttribute('embedded');\n var size = getSceneCanvasSize(sceneEl.canvas, embedded, sceneEl.maxCanvasSize, sceneEl.is('vr-mode'));\n camera.aspect = size.width / size.height;\n camera.updateProjectionMatrix();\n // Notify renderer of size change.\n sceneEl.renderer.setSize(size.width, size.height, false);\n}\n\nfunction setupTitle () {\n titleEl = document.createElement('div');\n titleEl.className = LOADER_TITLE_CLASS;\n titleEl.innerHTML = document.title;\n titleEl.style.display = 'none';\n sceneEl.appendChild(titleEl);\n}\n\n},{\"../../utils/\":205}],136:[function(_dereq_,module,exports){\nvar constants = _dereq_('../../constants/');\nvar extend = _dereq_('../../utils').extend;\n\nvar MOBILE_HEAD_TAGS = module.exports.MOBILE_HEAD_TAGS = [\n Meta({name: 'viewport', content: 'width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no,user-scalable=no,minimal-ui,viewport-fit=cover'}),\n\n // W3C-standardised meta tags.\n Meta({name: 'mobile-web-app-capable', content: 'yes'}),\n Meta({name: 'theme-color', content: 'black'})\n];\n\nvar MOBILE_IOS_HEAD_TAGS = [\n // iOS-specific meta tags for fullscreen when pinning to homescreen.\n Meta({name: 'apple-mobile-web-app-capable', content: 'yes'}),\n Meta({name: 'apple-mobile-web-app-status-bar-style', content: 'black'}),\n Link({rel: 'apple-touch-icon', href: 'https://aframe.io/images/aframe-logo-152.png'})\n];\n\nfunction Meta (attrs) {\n return {\n tagName: 'meta',\n attributes: attrs,\n exists: function () { return document.querySelector('meta[name=\"' + attrs.name + '\"]'); }\n };\n}\n\nfunction Link (attrs) {\n return {\n tagName: 'link',\n attributes: attrs,\n exists: function () { return document.querySelector('link[rel=\"' + attrs.rel + '\"]'); }\n };\n}\n\n/**\n * Injects the necessary metatags in the document for mobile support:\n * 1. Prevent the user to zoom in the document.\n * 2. Ensure that window.innerWidth and window.innerHeight have the correct\n * values and the canvas is properly scaled.\n * 3. To allow fullscreen mode when pinning a web app on the home screen on\n * iOS.\n * Adapted from https://www.reddit.com/r/web_design/comments/3la04p/\n *\n * @param {object} scene - Scene element\n * @returns {Array}\n */\nmodule.exports.inject = function injectHeadTags (scene) {\n var headEl = document.head;\n var headScriptEl = headEl.querySelector('script');\n var tag;\n var headTags = [];\n MOBILE_HEAD_TAGS.forEach(createAndInjectTag);\n if (scene.isIOS) {\n MOBILE_IOS_HEAD_TAGS.forEach(createAndInjectTag);\n }\n return headTags;\n\n function createAndInjectTag (tagObj) {\n if (!tagObj || tagObj.exists()) { return; }\n\n tag = createTag(tagObj);\n if (!tag) { return; }\n\n if (headScriptEl) {\n headScriptEl.parentNode.insertBefore(tag, headScriptEl);\n } else {\n headEl.appendChild(tag);\n }\n\n headTags.push(tag);\n }\n};\n\nfunction createTag (tagObj) {\n if (!tagObj || !tagObj.tagName) { return; }\n var meta = document.createElement(tagObj.tagName);\n meta.setAttribute(constants.AFRAME_INJECTED, '');\n return extend(meta, tagObj.attributes);\n}\n\n},{\"../../constants/\":123,\"../../utils\":205}],137:[function(_dereq_,module,exports){\nvar bind = _dereq_('../../utils/bind');\nvar isIframed = _dereq_('../../utils/').isIframed;\n\n/**\n * Provides a post message API for scenes contained\n * in an iframe.\n */\nmodule.exports = function initPostMessageAPI (scene) {\n // Handles fullscreen behavior when inside an iframe.\n if (!isIframed()) { return; }\n // postMessage API handler\n window.addEventListener('message', bind(postMessageAPIHandler, scene));\n};\n\nfunction postMessageAPIHandler (event) {\n var scene = this;\n if (!event.data) { return; }\n\n switch (event.data.type) {\n case 'vr': {\n switch (event.data.data) {\n case 'enter':\n scene.enterVR();\n break;\n case 'exit':\n scene.exitVR();\n break;\n }\n }\n }\n}\n\n},{\"../../utils/\":205,\"../../utils/bind\":199}],138:[function(_dereq_,module,exports){\n/*\n Scene index for keeping track of created scenes.\n*/\nmodule.exports = [];\n\n},{}],139:[function(_dereq_,module,exports){\nvar Wakelock = _dereq_('../../../vendor/wakelock/wakelock');\n\nmodule.exports = function initWakelock (scene) {\n if (!scene.isMobile) { return; }\n\n var wakelock = scene.wakelock = new Wakelock();\n scene.addEventListener('enter-vr', function () { wakelock.request(); });\n scene.addEventListener('exit-vr', function () { wakelock.release(); });\n};\n\n},{\"../../../vendor/wakelock/wakelock\":220}],140:[function(_dereq_,module,exports){\nvar utils = _dereq_('../utils/');\nvar PropertyTypes = _dereq_('./propertyTypes');\n\nvar debug = utils.debug;\nvar isValidDefaultValue = PropertyTypes.isValidDefaultValue;\nvar propertyTypes = PropertyTypes.propertyTypes;\n\nvar warn = debug('core:schema:warn');\n\n/**\n * A schema is classified as a schema for a single property if:\n * - `type` is defined on the schema as a string.\n * - OR `default` is defined on the schema, as a reserved keyword.\n * - OR schema is empty.\n */\nfunction isSingleProperty (schema) {\n if ('type' in schema) {\n return typeof schema.type === 'string';\n }\n return 'default' in schema;\n}\nmodule.exports.isSingleProperty = isSingleProperty;\n\n/**\n * Build step to schema to use `type` to inject default value, parser, and stringifier.\n *\n * @param {object} schema\n * @param {string} componentName\n * @returns {object} Schema.\n */\nmodule.exports.process = function (schema, componentName) {\n var propName;\n\n // For single property schema, run processPropDefinition over the whole schema.\n if (isSingleProperty(schema)) {\n return processPropertyDefinition(schema, componentName);\n }\n\n // For multi-property schema, run processPropDefinition over each property definition.\n for (propName in schema) {\n schema[propName] = processPropertyDefinition(schema[propName], componentName);\n }\n return schema;\n};\n\n/**\n * Inject default value, parser, stringifier for single property.\n *\n * @param {object} propDefinition\n * @param {string} componentName\n */\nfunction processPropertyDefinition (propDefinition, componentName) {\n var defaultVal = propDefinition.default;\n var isCustomType;\n var propType;\n var typeName = propDefinition.type;\n\n // Type inference.\n if (!propDefinition.type) {\n if (defaultVal !== undefined &&\n (typeof defaultVal === 'boolean' || typeof defaultVal === 'number')) {\n // Type inference.\n typeName = typeof defaultVal;\n } else if (Array.isArray(defaultVal)) {\n typeName = 'array';\n } else {\n // Fall back to string.\n typeName = 'string';\n }\n } else if (propDefinition.type === 'bool') {\n typeName = 'boolean';\n } else if (propDefinition.type === 'float') {\n typeName = 'number';\n }\n\n propType = propertyTypes[typeName];\n if (!propType) {\n warn('Unknown property type for component `' + componentName + '`: ' + typeName);\n }\n\n // Fill in parse and stringify using property types.\n isCustomType = !!propDefinition.parse;\n propDefinition.parse = propDefinition.parse || propType.parse;\n propDefinition.stringify = propDefinition.stringify || propType.stringify;\n\n // Fill in type name.\n propDefinition.type = typeName;\n\n // Check that default value exists.\n if ('default' in propDefinition) {\n // Check that default values are valid.\n if (!isCustomType && !isValidDefaultValue(typeName, defaultVal)) {\n warn('Default value `' + defaultVal + '` does not match type `' + typeName +\n '` in component `' + componentName + '`');\n }\n } else {\n // Fill in default value.\n propDefinition.default = propType.default;\n }\n\n return propDefinition;\n}\nmodule.exports.processPropertyDefinition = processPropertyDefinition;\n\n/**\n * Parse propData using schema. Use default values if not existing in propData.\n *\n * @param {object} propData - Unparsed properties.\n * @param {object} schema - Property types definition.\n * @param {boolean} getPartialData - Whether to return full component data or just the data\n * with keys in `propData`.\n * @param {string } componentName - Name of the component, used for the property warning.\n * @param {boolean} silent - Suppress warning messages.\n */\nmodule.exports.parseProperties = (function () {\n var propNames = [];\n\n return function (propData, schema, getPartialData, componentName, silent) {\n var i;\n var propName;\n var propDefinition;\n var propValue;\n\n propNames.length = 0;\n for (propName in (getPartialData ? propData : schema)) {\n if (getPartialData && propData[propName] === undefined) { continue; }\n propNames.push(propName);\n }\n\n if (propData === null || typeof propData !== 'object') { return propData; }\n\n // Validation errors.\n for (propName in propData) {\n if (propData[propName] !== undefined && !schema[propName] && !silent) {\n warn('Unknown property `' + propName +\n '` for component/system `' + componentName + '`.');\n }\n }\n\n for (i = 0; i < propNames.length; i++) {\n propName = propNames[i];\n propDefinition = schema[propName];\n propValue = propData[propName];\n if (!(schema[propName])) { return; }\n propData[propName] = parseProperty(propValue, propDefinition);\n }\n\n return propData;\n };\n})();\n\n/**\n * Deserialize a single property.\n */\nfunction parseProperty (value, propDefinition) {\n // Use default value if value is falsy.\n if (value === undefined || value === null || value === '') {\n value = propDefinition.default;\n if (Array.isArray(value)) { value = value.slice(); }\n }\n // Invoke property type parser.\n return propDefinition.parse(value, propDefinition.default);\n}\nmodule.exports.parseProperty = parseProperty;\n\n/**\n * Serialize a group of properties.\n */\nmodule.exports.stringifyProperties = function (propData, schema) {\n var propName;\n var propDefinition;\n var propValue;\n var stringifiedData = {};\n var value;\n\n for (propName in propData) {\n propDefinition = schema[propName];\n propValue = propData[propName];\n value = propValue;\n if (typeof value === 'object') {\n value = stringifyProperty(propValue, propDefinition);\n if (!propDefinition) { warn('Unknown component property: ' + propName); }\n }\n stringifiedData[propName] = value;\n }\n return stringifiedData;\n};\n\n/**\n * Serialize a single property.\n */\nfunction stringifyProperty (value, propDefinition) {\n // This function stringifies but it's used in a context where\n // there's always second stringification pass. By returning the original\n // value when it's not an object we save one unnecessary call\n // to JSON.stringify.\n if (typeof value !== 'object') { return value; }\n // if there's no schema for the property we use standar JSON stringify\n if (!propDefinition || value === null) { return JSON.stringify(value); }\n return propDefinition.stringify(value);\n}\nmodule.exports.stringifyProperty = stringifyProperty;\n\n},{\"../utils/\":205,\"./propertyTypes\":133}],141:[function(_dereq_,module,exports){\nvar schema = _dereq_('./schema');\n\nvar processSchema = schema.process;\nvar shaders = module.exports.shaders = {}; // Keep track of registered shaders.\nvar shaderNames = module.exports.shaderNames = []; // Keep track of the names of registered shaders.\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils');\n\n// A-Frame properties to three.js uniform types.\nvar propertyToThreeMapping = {\n array: 'v3',\n color: 'v3',\n int: 'i',\n number: 'f',\n map: 't',\n time: 'f',\n vec2: 'v2',\n vec3: 'v3',\n vec4: 'v4'\n};\n\n/**\n * Shader class definition.\n *\n * Shaders extend the material component API so you can create your own library\n * of customized materials\n *\n */\nvar Shader = module.exports.Shader = function () {};\n\nShader.prototype = {\n /**\n * Contains the type schema and defaults for the data values.\n * Data is coerced into the types of the values of the defaults.\n */\n schema: {},\n\n vertexShader:\n 'void main() {' +\n 'gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);' +\n '}',\n\n fragmentShader:\n 'void main() {' +\n 'gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);' +\n '}',\n\n /**\n * Init handler. Similar to attachedCallback.\n * Called during shader initialization and is only run once.\n */\n init: function (data) {\n this.attributes = this.initVariables(data, 'attribute');\n this.uniforms = this.initVariables(data, 'uniform');\n this.material = new (this.raw ? THREE.RawShaderMaterial : THREE.ShaderMaterial)({\n // attributes: this.attributes,\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader\n });\n return this.material;\n },\n\n initVariables: function (data, type) {\n var key;\n var schema = this.schema;\n var variables = {};\n var varType;\n\n for (key in schema) {\n if (schema[key].is !== type) { continue; }\n varType = propertyToThreeMapping[schema[key].type];\n variables[key] = {\n type: varType,\n value: undefined // Let updateVariables handle setting these.\n };\n }\n return variables;\n },\n\n /**\n * Update handler. Similar to attributeChangedCallback.\n * Called whenever the associated material data changes.\n *\n * @param {object} data - New material data.\n */\n update: function (data) {\n this.updateVariables(data, 'attribute');\n this.updateVariables(data, 'uniform');\n },\n\n updateVariables: function (data, type) {\n var key;\n var materialKey;\n var schema = this.schema;\n var variables;\n\n variables = type === 'uniform' ? this.uniforms : this.attributes;\n for (key in data) {\n if (!schema[key] || schema[key].is !== type) { continue; }\n\n if (schema[key].type === 'map') {\n // If data unchanged, get out early.\n if (!variables[key] || variables[key].value === data[key]) { continue; }\n\n // Special handling is needed for textures.\n materialKey = '_texture_' + key;\n\n // We can't actually set the variable correctly until we've loaded the texture.\n this.setMapOnTextureLoad(variables, key, materialKey);\n\n // Kick off the texture update now that handler is added.\n utils.material.updateMapMaterialFromData(materialKey, key, this, data);\n continue;\n }\n variables[key].value = this.parseValue(schema[key].type, data[key]);\n variables[key].needsUpdate = true;\n }\n },\n\n parseValue: function (type, value) {\n var color;\n switch (type) {\n case 'vec2': {\n return new THREE.Vector2(value.x, value.y);\n }\n case 'vec3': {\n return new THREE.Vector3(value.x, value.y, value.z);\n }\n case 'vec4': {\n return new THREE.Vector4(value.x, value.y, value.z, value.w);\n }\n case 'color': {\n color = new THREE.Color(value);\n return new THREE.Vector3(color.r, color.g, color.b);\n }\n case 'map': {\n return THREE.ImageUtils.loadTexture(value);\n }\n default: {\n return value;\n }\n }\n },\n\n setMapOnTextureLoad: function (variables, key, materialKey) {\n var self = this;\n this.el.addEventListener('materialtextureloaded', function () {\n variables[key].value = self.material[materialKey];\n variables[key].needsUpdate = true;\n });\n }\n};\n\n/**\n * Registers a shader to A-Frame.\n *\n * @param {string} name - shader name.\n * @param {object} definition - shader property and methods.\n * @returns {object} Shader.\n */\nmodule.exports.registerShader = function (name, definition) {\n var NewShader;\n var proto = {};\n\n // Format definition object to prototype object.\n Object.keys(definition).forEach(function (key) {\n proto[key] = {\n value: definition[key],\n writable: true\n };\n });\n\n if (shaders[name]) {\n throw new Error('The shader ' + name + ' has been already registered');\n }\n NewShader = function () { Shader.call(this); };\n NewShader.prototype = Object.create(Shader.prototype, proto);\n NewShader.prototype.name = name;\n NewShader.prototype.constructor = NewShader;\n shaders[name] = {\n Shader: NewShader,\n schema: processSchema(NewShader.prototype.schema)\n };\n shaderNames.push(name);\n return NewShader;\n};\n\n},{\"../lib/three\":179,\"../utils\":205,\"./schema\":140}],142:[function(_dereq_,module,exports){\nvar components = _dereq_('./component');\nvar schema = _dereq_('./schema');\nvar utils = _dereq_('../utils/');\n\nvar parseProperties = schema.parseProperties;\nvar parseProperty = schema.parseProperty;\nvar processSchema = schema.process;\nvar isSingleProp = schema.isSingleProperty;\nvar styleParser = utils.styleParser;\n\nvar systems = module.exports.systems = {}; // Keep track of registered systems.\n\n/**\n * System class definition.\n *\n * Systems provide global scope and services to a group of instantiated components of the\n * same class. They can also help abstract logic away from components such that components\n * only have to worry about data.\n *\n * For example, a physics component that creates a physics world that oversees\n * all entities with a physics or rigid body component.\n *\n * TODO: Have the System prototype reuse the Component prototype. Most code is copied\n * and some pieces are missing from the Component facilities (e.g., attribute caching,\n * setAttribute behavior).\n *\n * @member {string} name - Name that system is registered under.\n * @member {Element} sceneEl - Handle to the scene element where system applies to.\n */\nvar System = module.exports.System = function (sceneEl) {\n var component = components && components.components[this.name];\n\n // Set reference to scene.\n this.el = sceneEl;\n this.sceneEl = sceneEl;\n\n // Set reference to matching component (if exists).\n if (component) { component.Component.prototype.system = this; }\n\n // Process system configuration.\n this.buildData();\n this.init();\n this.update({});\n};\n\nSystem.prototype = {\n /**\n * Schema to configure system.\n */\n schema: {},\n\n /**\n * Init handler. Called during scene initialization and is only run once.\n * Systems can use this to set initial state.\n */\n init: function () { /* no-op */ },\n\n /**\n * Update handler. Called during scene attribute updates.\n * Systems can use this to dynamically update their state.\n */\n update: function (oldData) { /* no-op */ },\n\n /**\n * Build data and call update handler.\n *\n * @private\n */\n updateProperties: function (rawData) {\n var oldData = this.data;\n if (!Object.keys(schema).length) { return; }\n this.buildData(rawData);\n this.update(oldData);\n },\n\n /**\n * Parse data.\n */\n buildData: function (rawData) {\n var schema = this.schema;\n if (!Object.keys(schema).length) { return; }\n rawData = rawData || window.HTMLElement.prototype.getAttribute.call(this.sceneEl, this.name);\n if (isSingleProp(schema)) {\n this.data = parseProperty(rawData, schema);\n } else {\n this.data = parseProperties(styleParser.parse(rawData) || {}, schema);\n }\n },\n\n /**\n * Tick handler.\n * Called on each tick of the scene render loop.\n * Affected by play and pause.\n *\n * @param {number} time - Scene tick time.\n * @param {number} timeDelta - Difference in current render time and previous render time.\n */\n tick: undefined,\n\n /**\n * Tock handler.\n * Called on each tock of the scene render loop.\n * Affected by play and pause.\n *\n * @param {number} time - Scene tick time.\n * @param {number} timeDelta - Difference in current render time and previous render time.\n */\n tock: undefined,\n\n /**\n * Called to start any dynamic behavior (e.g., animation, AI, events, physics).\n */\n play: function () { /* no-op */ },\n\n /**\n * Called to stop any dynamic behavior (e.g., animation, AI, events, physics).\n */\n pause: function () { /* no-op */ }\n};\n\n/**\n * Registers a system to A-Frame.\n *\n * @param {string} name - Component name.\n * @param {object} definition - Component property and methods.\n * @returns {object} Component.\n */\nmodule.exports.registerSystem = function (name, definition) {\n var i;\n var NewSystem;\n var proto = {};\n var scenes = utils.findAllScenes(document);\n\n // Format definition object to prototype object.\n Object.keys(definition).forEach(function (key) {\n proto[key] = {\n value: definition[key],\n writable: true\n };\n });\n\n if (systems[name]) {\n throw new Error('The system `' + name + '` has been already registered. ' +\n 'Check that you are not loading two versions of the same system ' +\n 'or two different systems of the same name.');\n }\n NewSystem = function (sceneEl) { System.call(this, sceneEl); };\n NewSystem.prototype = Object.create(System.prototype, proto);\n NewSystem.prototype.name = name;\n NewSystem.prototype.constructor = NewSystem;\n NewSystem.prototype.schema = utils.extend(processSchema(NewSystem.prototype.schema));\n systems[name] = NewSystem;\n\n // Initialize systems for existing scenes\n for (i = 0; i < scenes.length; i++) { scenes[i].initSystem(name); }\n};\n\n},{\"../utils/\":205,\"./component\":131,\"./schema\":140}],143:[function(_dereq_,module,exports){\n_dereq_('./pivot');\n\n},{\"./pivot\":144}],144:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar THREE = _dereq_('../../lib/three');\n\nvar originalPosition = new THREE.Vector3();\nvar originalRotation = new THREE.Vector3();\n\n/**\n * Wrap el.object3D within an outer group. Apply pivot to el.object3D as position.\n */\nregisterComponent('pivot', {\n dependencies: ['position'],\n\n schema: {type: 'vec3'},\n\n init: function () {\n var data = this.data;\n var el = this.el;\n var originalParent = el.object3D.parent;\n var originalGroup = el.object3D;\n var outerGroup = new THREE.Group();\n\n originalPosition.copy(originalGroup.position);\n originalRotation.copy(originalGroup.rotation);\n\n // Detach current group from parent.\n originalParent.remove(originalGroup);\n outerGroup.add(originalGroup);\n\n // Set new group as the outer group.\n originalParent.add(outerGroup);\n\n // Set outer group as new object3D.\n el.object3D = outerGroup;\n\n // Apply pivot to original group.\n originalGroup.position.set(-1 * data.x, -1 * data.y, -1 * data.z);\n\n // Offset the pivot so that world position not affected.\n // And restore position onto outer group.\n outerGroup.position.set(data.x + originalPosition.x, data.y + originalPosition.y,\n data.z + originalPosition.z);\n\n // Transfer rotation to outer group.\n outerGroup.rotation.copy(originalGroup.rotation);\n originalGroup.rotation.set(0, 0, 0);\n }\n});\n\n},{\"../../core/component\":131,\"../../lib/three\":179}],145:[function(_dereq_,module,exports){\n/**\n * Common mesh defaults, mappings, and transforms.\n */\nvar components = _dereq_('../../core/component').components;\nvar shaders = _dereq_('../../core/shader').shaders;\nvar utils = _dereq_('../../utils/');\n\nvar materialMappings = {};\nObject.keys(components.material.schema).forEach(addMapping);\nObject.keys(shaders.standard.schema).forEach(addMapping);\n\nfunction addMapping (prop) {\n // To hyphenated.\n var htmlAttrName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n if (prop === 'fog') { htmlAttrName = 'material-fog'; }\n if (prop === 'visible') { htmlAttrName = 'material-visible'; }\n materialMappings[htmlAttrName] = 'material.' + prop;\n}\n\nmodule.exports = function getMeshMixin () {\n return {\n defaultComponents: {material: {}},\n mappings: utils.extend({}, materialMappings)\n };\n};\n\n},{\"../../core/component\":131,\"../../core/shader\":141,\"../../utils/\":205}],146:[function(_dereq_,module,exports){\n_dereq_('./primitives/a-camera');\n_dereq_('./primitives/a-cursor');\n_dereq_('./primitives/a-curvedimage');\n_dereq_('./primitives/a-gltf-model');\n_dereq_('./primitives/a-image');\n_dereq_('./primitives/a-light');\n_dereq_('./primitives/a-link');\n_dereq_('./primitives/a-obj-model');\n_dereq_('./primitives/a-sky');\n_dereq_('./primitives/a-sound');\n_dereq_('./primitives/a-text');\n_dereq_('./primitives/a-video');\n_dereq_('./primitives/a-videosphere');\n_dereq_('./primitives/meshPrimitives');\n\n},{\"./primitives/a-camera\":148,\"./primitives/a-cursor\":149,\"./primitives/a-curvedimage\":150,\"./primitives/a-gltf-model\":151,\"./primitives/a-image\":152,\"./primitives/a-light\":153,\"./primitives/a-link\":154,\"./primitives/a-obj-model\":155,\"./primitives/a-sky\":156,\"./primitives/a-sound\":157,\"./primitives/a-text\":158,\"./primitives/a-video\":159,\"./primitives/a-videosphere\":160,\"./primitives/meshPrimitives\":161}],147:[function(_dereq_,module,exports){\nvar AEntity = _dereq_('../../core/a-entity');\nvar components = _dereq_('../../core/component').components;\nvar registerElement = _dereq_('../../core/a-register-element').registerElement;\nvar utils = _dereq_('../../utils/');\n\nvar debug = utils.debug;\nvar setComponentProperty = utils.entity.setComponentProperty;\nvar log = debug('extras:primitives:debug');\nvar warn = debug('extras:primitives:warn');\n\nvar primitives = module.exports.primitives = {};\n\nmodule.exports.registerPrimitive = function registerPrimitive (name, definition) {\n name = name.toLowerCase();\n log('Registering <%s>', name);\n\n // Deprecation warning for defaultAttributes usage.\n if (definition.defaultAttributes) {\n warn(\"The 'defaultAttributes' object is deprecated. Use 'defaultComponents' instead.\");\n }\n\n var primitive = registerElement(name, {\n prototype: Object.create(AEntity.prototype, {\n defaultComponentsFromPrimitive: {\n value: definition.defaultComponents || definition.defaultAttributes || {}\n },\n deprecated: {value: definition.deprecated || null},\n deprecatedMappings: {value: definition.deprecatedMappings || {}},\n mappings: {value: definition.mappings || {}},\n\n createdCallback: {\n value: function () {\n if (definition.deprecated) { console.warn(definition.deprecated); }\n this.resolveMappingCollisions();\n }\n },\n\n /**\n * If a mapping collides with a registered component name\n * it renames the mapping to componentname-property\n */\n resolveMappingCollisions: {\n value: function () {\n var mappings = this.mappings;\n var self = this;\n Object.keys(mappings).forEach(function resolveCollision (key) {\n var newAttribute;\n if (key !== key.toLowerCase()) { warn('Mapping keys should be specified in lower case. The mapping key ' + key + ' may not be recognized'); }\n if (components[key]) {\n newAttribute = mappings[key].replace('.', '-');\n mappings[newAttribute] = mappings[key];\n delete mappings[key];\n console.warn('The primitive ' + self.tagName.toLowerCase() + ' has a mapping collision. ' +\n 'The attribute ' + key + ' has the same name as a registered component and' +\n ' has been renamed to ' + newAttribute);\n }\n });\n }\n },\n\n getExtraComponents: {\n value: function () {\n var attr;\n var data;\n var i;\n var mapping;\n var mixins;\n var path;\n var self = this;\n\n // Gather component data from default components.\n data = utils.clone(this.defaultComponentsFromPrimitive);\n\n // Factor in mixins to overwrite default components.\n mixins = this.getAttribute('mixin');\n if (mixins) {\n mixins = mixins.trim().split(' ');\n mixins.forEach(function applyMixin (mixinId) {\n var mixinComponents = self.sceneEl.querySelector('#' + mixinId).componentCache;\n Object.keys(mixinComponents).forEach(function setComponent (name) {\n data[name] = extend(data[name], mixinComponents[name]);\n });\n });\n }\n\n // Gather component data from mappings.\n for (i = 0; i < this.attributes.length; i++) {\n attr = this.attributes[i];\n mapping = this.mappings[attr.name];\n if (mapping) {\n path = utils.entity.getComponentPropertyPath(mapping);\n if (path.constructor === Array) {\n data[path[0]] = data[path[0]] || {};\n data[path[0]][path[1]] = attr.value.trim();\n } else {\n data[path] = attr.value.trim();\n }\n continue;\n }\n }\n\n return data;\n\n /**\n * For the base to be extensible, both objects must be pure JavaScript objects.\n * The function assumes that base is undefined, or null or a pure object.\n */\n function extend (base, extension) {\n if (isUndefined(base)) {\n return copy(extension);\n }\n if (isUndefined(extension)) {\n return copy(base);\n }\n if (isPureObject(base) && isPureObject(extension)) {\n return utils.extendDeep(base, extension);\n }\n return copy(extension);\n }\n\n function isUndefined (value) {\n return typeof value === 'undefined';\n }\n\n function copy (value) {\n if (isPureObject(value)) {\n return utils.extendDeep({}, value);\n }\n return value;\n }\n\n function isPureObject (value) {\n return value !== null && value.constructor === Object;\n }\n }\n },\n\n /**\n * Sync to attribute to component property whenever mapped attribute changes.\n * If attribute is mapped to a component property, set the component property using\n * the attribute value.\n */\n attributeChangedCallback: {\n value: function (attr, oldVal, value) {\n var componentName = this.mappings[attr];\n\n if (attr in this.deprecatedMappings) {\n console.warn(this.deprecatedMappings[attr]);\n }\n\n if (!attr || !componentName) { return; }\n\n // Set value.\n setComponentProperty(this, componentName, value);\n }\n }\n })\n });\n\n // Store.\n primitives[name] = primitive;\n return primitive;\n};\n\n/**\n * Add component mappings using schema.\n */\nfunction addComponentMapping (componentName, mappings) {\n var schema = components[componentName].schema;\n Object.keys(schema).map(function (prop) {\n // Hyphenate where there is camelCase.\n var attrName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n // If there is a mapping collision, prefix with component name and hyphen.\n if (mappings[attrName] !== undefined) { attrName = componentName + '-' + prop; }\n mappings[attrName] = componentName + '.' + prop;\n });\n}\n\n/**\n * Helper to define a primitive, building mappings using a component schema.\n */\nfunction definePrimitive (tagName, defaultComponents, mappings) {\n // If no initial mappings provided, start from empty map.\n mappings = mappings || {};\n\n // From the default components, add mapping automagically.\n Object.keys(defaultComponents).map(function buildMappings (componentName) {\n addComponentMapping(componentName, mappings);\n });\n\n // Register the primitive.\n module.exports.registerPrimitive(tagName, utils.extendDeep({}, null, {\n defaultComponents: defaultComponents,\n mappings: mappings\n }));\n}\nmodule.exports.definePrimitive = definePrimitive;\n\n},{\"../../core/a-entity\":127,\"../../core/a-register-element\":130,\"../../core/component\":131,\"../../utils/\":205}],148:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-camera', {\n defaultComponents: {\n 'camera': {},\n 'look-controls': {},\n 'wasd-controls': {},\n 'position': {x: 0, y: 1.6, z: 0}\n },\n\n mappings: {\n active: 'camera.active',\n far: 'camera.far',\n fov: 'camera.fov',\n 'look-controls-enabled': 'look-controls.enabled',\n near: 'camera.near',\n 'pointer-lock-enabled': 'look-controls.pointerLockEnabled',\n 'wasd-controls-enabled': 'wasd-controls.enabled',\n 'reverse-mouse-drag': 'look-controls.reverseMouseDrag',\n zoom: 'camera.zoom'\n }\n});\n\n},{\"../primitives\":147}],149:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-cursor', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n cursor: {},\n geometry: {\n primitive: 'ring',\n radiusOuter: 0.016,\n radiusInner: 0.01,\n segmentsTheta: 32\n },\n material: {\n color: '#000',\n shader: 'flat',\n opacity: 0.8\n },\n position: {\n x: 0,\n y: 0,\n z: -1\n }\n },\n\n mappings: {\n far: 'raycaster.far',\n fuse: 'cursor.fuse',\n 'fuse-timeout': 'cursor.fuseTimeout',\n interval: 'raycaster.interval',\n objects: 'raycaster.objects'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],150:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-curvedimage', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n height: 1,\n primitive: 'cylinder',\n radius: 2,\n segmentsRadial: 48,\n thetaLength: 270,\n openEnded: true,\n thetaStart: 0\n },\n material: {\n color: '#FFF',\n shader: 'flat',\n side: 'double',\n transparent: true,\n repeat: '-1 1'\n }\n },\n\n mappings: {\n height: 'geometry.height',\n 'open-ended': 'geometry.openEnded',\n radius: 'geometry.radius',\n segments: 'geometry.segmentsRadial',\n start: 'geometry.thetaStart',\n 'theta-length': 'geometry.thetaLength',\n 'theta-start': 'geometry.thetaStart',\n 'width': 'geometry.thetaLength'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],151:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-gltf-model', {\n mappings: {\n src: 'gltf-model'\n }\n});\n\n},{\"../primitives\":147}],152:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-image', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n primitive: 'plane'\n },\n material: {\n color: '#FFF',\n shader: 'flat',\n side: 'double',\n transparent: true\n }\n },\n\n mappings: {\n height: 'geometry.height',\n width: 'geometry.width'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],153:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-light', {\n defaultComponents: {\n light: {}\n },\n\n mappings: {\n angle: 'light.angle',\n color: 'light.color',\n 'ground-color': 'light.groundColor',\n decay: 'light.decay',\n distance: 'light.distance',\n intensity: 'light.intensity',\n penumbra: 'light.penumbra',\n type: 'light.type',\n target: 'light.target'\n }\n});\n\n},{\"../primitives\":147}],154:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-link', {\n defaultComponents: {\n link: {\n visualAspectEnabled: true\n }\n },\n\n mappings: {\n href: 'link.href',\n image: 'link.image',\n title: 'link.title'\n }\n});\n\n},{\"../primitives\":147}],155:[function(_dereq_,module,exports){\nvar meshMixin = _dereq_('../getMeshMixin')();\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-obj-model', utils.extendDeep({}, meshMixin, {\n defaultComponents: {\n 'obj-model': {}\n },\n\n mappings: {\n src: 'obj-model.obj',\n mtl: 'obj-model.mtl'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],156:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\nvar meshPrimitives = _dereq_('./meshPrimitives');\n\nregisterPrimitive('a-sky', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n primitive: 'sphere',\n radius: 500,\n segmentsWidth: 64,\n segmentsHeight: 32\n },\n material: {\n color: '#FFF',\n side: 'back',\n shader: 'flat',\n npot: true\n },\n scale: '-1 1 1'\n },\n\n mappings: utils.extendDeep({}, meshPrimitives['a-sphere'].prototype.mappings)\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147,\"./meshPrimitives\":161}],157:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-sound', {\n defaultComponents: {\n sound: {}\n },\n\n mappings: {\n src: 'sound.src',\n on: 'sound.on',\n autoplay: 'sound.autoplay',\n loop: 'sound.loop',\n volume: 'sound.volume'\n }\n});\n\n},{\"../primitives\":147}],158:[function(_dereq_,module,exports){\n// <a-text> using `definePrimitive` helper.\nvar definePrimitive = _dereq_('../primitives').definePrimitive;\ndefinePrimitive('a-text', {text: {anchor: 'align', width: 5}});\n\n},{\"../primitives\":147}],159:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-video', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n primitive: 'plane'\n },\n material: {\n color: '#FFF',\n shader: 'flat',\n side: 'double',\n transparent: true\n }\n },\n\n mappings: {\n height: 'geometry.height',\n width: 'geometry.width'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],160:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-videosphere', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n primitive: 'sphere',\n radius: 500,\n segmentsWidth: 64,\n segmentsHeight: 32\n },\n material: {\n color: '#FFF',\n shader: 'flat',\n side: 'back',\n npot: true\n },\n scale: '-1 1 1'\n },\n\n mappings: {\n radius: 'geometry.radius',\n 'segments-height': 'geometry.segmentsHeight',\n 'segments-width': 'geometry.segmentsWidth'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],161:[function(_dereq_,module,exports){\n/**\n * Automated mesh primitive registration.\n */\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar geometries = _dereq_('../../../core/geometry').geometries;\nvar geometryNames = _dereq_('../../../core/geometry').geometryNames;\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\n// For testing.\nvar meshPrimitives = module.exports = {};\n\n// Generate primitive for each geometry type.\ngeometryNames.forEach(function registerMeshPrimitive (geometryName) {\n var geometry = geometries[geometryName];\n var geometryHyphened = unCamelCase(geometryName);\n\n // Generate mappings.\n var mappings = {};\n Object.keys(geometry.schema).forEach(function createMapping (property) {\n mappings[unCamelCase(property)] = 'geometry.' + property;\n });\n\n // Register.\n var tagName = 'a-' + geometryHyphened;\n var primitive = registerPrimitive(tagName, utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {geometry: {primitive: geometryName}},\n mappings: mappings\n }));\n meshPrimitives[tagName] = primitive;\n});\n\n/**\n * camelCase to hyphened-string.\n */\nfunction unCamelCase (str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\n},{\"../../../core/geometry\":132,\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],162:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('box', {\n schema: {\n depth: {default: 1, min: 0},\n height: {default: 1, min: 0},\n width: {default: 1, min: 0},\n segmentsHeight: {default: 1, min: 1, max: 20, type: 'int'},\n segmentsWidth: {default: 1, min: 1, max: 20, type: 'int'},\n segmentsDepth: {default: 1, min: 1, max: 20, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.BoxGeometry(\n data.width, data.height, data.depth,\n data.segmentsWidth, data.segmentsHeight, data.segmentsDepth);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],163:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('circle', {\n schema: {\n radius: {default: 1, min: 0},\n segments: {default: 32, min: 3, type: 'int'},\n thetaLength: {default: 360, min: 0},\n thetaStart: {default: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.CircleGeometry(\n data.radius, data.segments, degToRad(data.thetaStart), degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],164:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('cone', {\n schema: {\n height: {default: 1, min: 0},\n openEnded: {default: false},\n radiusBottom: {default: 1, min: 0},\n radiusTop: {default: 0.01, min: 0},\n segmentsHeight: {default: 18, min: 1, type: 'int'},\n segmentsRadial: {default: 36, min: 3, type: 'int'},\n thetaLength: {default: 360, min: 0},\n thetaStart: {default: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.CylinderGeometry(\n data.radiusTop, data.radiusBottom, data.height, data.segmentsRadial,\n data.segmentsHeight, data.openEnded, degToRad(data.thetaStart),\n degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],165:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('cylinder', {\n schema: {\n height: {default: 1, min: 0},\n openEnded: {default: false},\n radius: {default: 1, min: 0},\n segmentsHeight: {default: 18, min: 1, type: 'int'},\n segmentsRadial: {default: 36, min: 3, type: 'int'},\n thetaLength: {default: 360, min: 0},\n thetaStart: {default: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.CylinderGeometry(\n data.radius, data.radius, data.height, data.segmentsRadial, data.segmentsHeight,\n data.openEnded, degToRad(data.thetaStart), degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],166:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('dodecahedron', {\n schema: {\n detail: {default: 0, min: 0, max: 5, type: 'int'},\n radius: {default: 1, min: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.DodecahedronGeometry(data.radius, data.detail);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],167:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('icosahedron', {\n schema: {\n detail: {default: 0, min: 0, max: 5, type: 'int'},\n radius: {default: 1, min: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.IcosahedronGeometry(data.radius, data.detail);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],168:[function(_dereq_,module,exports){\n_dereq_('./box.js');\n_dereq_('./circle.js');\n_dereq_('./cone.js');\n_dereq_('./cylinder.js');\n_dereq_('./dodecahedron.js');\n_dereq_('./icosahedron.js');\n_dereq_('./octahedron.js');\n_dereq_('./plane.js');\n_dereq_('./ring.js');\n_dereq_('./sphere.js');\n_dereq_('./tetrahedron.js');\n_dereq_('./torus.js');\n_dereq_('./torusKnot.js');\n_dereq_('./triangle.js');\n\n},{\"./box.js\":162,\"./circle.js\":163,\"./cone.js\":164,\"./cylinder.js\":165,\"./dodecahedron.js\":166,\"./icosahedron.js\":167,\"./octahedron.js\":169,\"./plane.js\":170,\"./ring.js\":171,\"./sphere.js\":172,\"./tetrahedron.js\":173,\"./torus.js\":174,\"./torusKnot.js\":175,\"./triangle.js\":176}],169:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('octahedron', {\n schema: {\n detail: {default: 0, min: 0, max: 5, type: 'int'},\n radius: {default: 1, min: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.OctahedronGeometry(data.radius, data.detail);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],170:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('plane', {\n schema: {\n height: {default: 1, min: 0},\n width: {default: 1, min: 0},\n segmentsHeight: {default: 1, min: 1, max: 20, type: 'int'},\n segmentsWidth: {default: 1, min: 1, max: 20, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.PlaneGeometry(data.width, data.height, data.segmentsWidth, data.segmentsHeight);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],171:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('ring', {\n schema: {\n radiusInner: {default: 0.8, min: 0},\n radiusOuter: {default: 1.2, min: 0},\n segmentsPhi: {default: 10, min: 1, type: 'int'},\n segmentsTheta: {default: 32, min: 3, type: 'int'},\n thetaLength: {default: 360, min: 0},\n thetaStart: {default: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.RingGeometry(\n data.radiusInner, data.radiusOuter, data.segmentsTheta, data.segmentsPhi,\n degToRad(data.thetaStart), degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],172:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('sphere', {\n schema: {\n radius: {default: 1, min: 0},\n phiLength: {default: 360},\n phiStart: {default: 0, min: 0},\n thetaLength: {default: 180, min: 0},\n thetaStart: {default: 0},\n segmentsHeight: {default: 18, min: 2, type: 'int'},\n segmentsWidth: {default: 36, min: 3, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.SphereGeometry(\n data.radius, data.segmentsWidth, data.segmentsHeight, degToRad(data.phiStart),\n degToRad(data.phiLength), degToRad(data.thetaStart), degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],173:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('tetrahedron', {\n schema: {\n detail: {default: 0, min: 0, max: 5, type: 'int'},\n radius: {default: 1, min: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.TetrahedronGeometry(data.radius, data.detail);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],174:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('torus', {\n schema: {\n arc: {default: 360},\n radius: {default: 1, min: 0},\n radiusTubular: {default: 0.2, min: 0},\n segmentsRadial: {default: 36, min: 2, type: 'int'},\n segmentsTubular: {default: 32, min: 3, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.TorusGeometry(\n data.radius, data.radiusTubular * 2, data.segmentsRadial, data.segmentsTubular,\n degToRad(data.arc));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],175:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('torusKnot', {\n schema: {\n p: {default: 2, min: 1},\n q: {default: 3, min: 1},\n radius: {default: 1, min: 0},\n radiusTubular: {default: 0.2, min: 0},\n segmentsRadial: {default: 8, min: 3, type: 'int'},\n segmentsTubular: {default: 100, min: 3, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.TorusKnotGeometry(\n data.radius, data.radiusTubular * 2, data.segmentsTubular, data.segmentsRadial,\n data.p, data.q);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],176:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar quaternion = new THREE.Quaternion();\nvar rotateVector = new THREE.Vector3(0, 0, 1);\nvar uvMinVector = new THREE.Vector2();\nvar uvMaxVector = new THREE.Vector2();\nvar uvScaleVector = new THREE.Vector2();\n\nregisterGeometry('triangle', {\n schema: {\n vertexA: {type: 'vec3', default: {x: 0, y: 0.5, z: 0}},\n vertexB: {type: 'vec3', default: {x: -0.5, y: -0.5, z: 0}},\n vertexC: {type: 'vec3', default: {x: 0.5, y: -0.5, z: 0}}\n },\n\n init: function (data) {\n var geometry;\n var normal;\n var triangle;\n var uvA;\n var uvB;\n var uvC;\n\n var vertices;\n var normals;\n var uvs;\n\n triangle = new THREE.Triangle();\n triangle.a.set(data.vertexA.x, data.vertexA.y, data.vertexA.z);\n triangle.b.set(data.vertexB.x, data.vertexB.y, data.vertexB.z);\n triangle.c.set(data.vertexC.x, data.vertexC.y, data.vertexC.z);\n normal = triangle.getNormal(new THREE.Vector3());\n\n // Rotate the 3D triangle to be parallel to XY plane.\n quaternion.setFromUnitVectors(normal, rotateVector);\n uvA = triangle.a.clone().applyQuaternion(quaternion);\n uvB = triangle.b.clone().applyQuaternion(quaternion);\n uvC = triangle.c.clone().applyQuaternion(quaternion);\n\n // Compute UVs.\n // Normalize x/y values of UV so they are within 0 to 1.\n uvMinVector.set(Math.min(uvA.x, uvB.x, uvC.x), Math.min(uvA.y, uvB.y, uvC.y));\n uvMaxVector.set(Math.max(uvA.x, uvB.x, uvC.x), Math.max(uvA.y, uvB.y, uvC.y));\n uvScaleVector.set(0, 0).subVectors(uvMaxVector, uvMinVector);\n uvA = new THREE.Vector2().subVectors(uvA, uvMinVector).divide(uvScaleVector);\n uvB = new THREE.Vector2().subVectors(uvB, uvMinVector).divide(uvScaleVector);\n uvC = new THREE.Vector2().subVectors(uvC, uvMinVector).divide(uvScaleVector);\n\n geometry = this.geometry = new THREE.BufferGeometry();\n vertices = [\n triangle.a.x, triangle.a.y, triangle.a.z,\n triangle.b.x, triangle.b.y, triangle.b.z,\n triangle.c.x, triangle.c.y, triangle.c.z\n ];\n normals = [\n normal.x, normal.y, normal.z,\n normal.x, normal.y, normal.z,\n normal.x, normal.y, normal.z\n ];\n uvs = [\n uvA.x, uvA.y,\n uvB.x, uvB.y,\n uvC.x, uvC.y\n ];\n\n geometry.setAttribute('position', new THREE.Float32BufferAttribute(vertices, 3));\n geometry.setAttribute('normal', new THREE.Float32BufferAttribute(normals, 3));\n geometry.setAttribute('uv', new THREE.Float32BufferAttribute(uvs, 2));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],177:[function(_dereq_,module,exports){\n// Polyfill `Promise`.\nwindow.Promise = window.Promise || _dereq_('promise-polyfill');\n\n// WebVR polyfill\n// Check before the polyfill runs.\nwindow.hasNativeWebVRImplementation = !!window.navigator.getVRDisplays ||\n !!window.navigator.getVRDevices;\nwindow.hasNativeWebXRImplementation = navigator.xr !== undefined;\n\n// If native WebXR or WebVR are defined WebVRPolyfill does not initialize.\nif (!window.hasNativeWebXRImplementation && !window.hasNativeWebVRImplementation) {\n var isIOSOlderThan10 = _dereq_('./utils/isIOSOlderThan10');\n // Workaround for iOS Safari canvas sizing issues in stereo (webvr-polyfill/issues/102).\n // Only for iOS on versions older than 10.\n var bufferScale = isIOSOlderThan10(window.navigator.userAgent) ? 1 / window.devicePixelRatio : 1;\n var WebVRPolyfill = _dereq_('webvr-polyfill');\n var polyfillConfig = {\n BUFFER_SCALE: bufferScale,\n CARDBOARD_UI_DISABLED: true,\n ROTATE_INSTRUCTIONS_DISABLED: true,\n MOBILE_WAKE_LOCK: !!window.cordova\n };\n window.webvrpolyfill = new WebVRPolyfill(polyfillConfig);\n}\n\nvar utils = _dereq_('./utils/');\nvar debug = utils.debug;\n\nif (utils.isIE11) {\n // Polyfill `CustomEvent`.\n _dereq_('custom-event-polyfill');\n // Polyfill String.startsWith.\n _dereq_('../vendor/starts-with-polyfill');\n}\n\nvar error = debug('A-Frame:error');\nvar warn = debug('A-Frame:warn');\n\nif (window.document.currentScript && window.document.currentScript.parentNode !==\n window.document.head && !window.debug) {\n warn('Put the A-Frame <script> tag in the <head> of the HTML *before* the scene to ' +\n 'ensure everything for A-Frame is properly registered before they are used from ' +\n 'HTML.');\n}\n\n// Error if not using a server.\nif (!window.cordova && window.location.protocol === 'file:') {\n error(\n 'This HTML file is currently being served via the file:// protocol. ' +\n 'Assets, textures, and models WILL NOT WORK due to cross-origin policy! ' +\n 'Please use a local or hosted server: ' +\n 'https://aframe.io/docs/0.5.0/introduction/getting-started.html#using-a-local-server.');\n}\n\n_dereq_('present'); // Polyfill `performance.now()`.\n\n// CSS.\nif (utils.device.isBrowserEnvironment) {\n _dereq_('./style/aframe.css');\n _dereq_('./style/rStats.css');\n}\n\n// Required before `AEntity` so that all components are registered.\nvar AScene = _dereq_('./core/scene/a-scene').AScene;\nvar components = _dereq_('./core/component').components;\nvar registerComponent = _dereq_('./core/component').registerComponent;\nvar registerGeometry = _dereq_('./core/geometry').registerGeometry;\nvar registerPrimitive = _dereq_('./extras/primitives/primitives').registerPrimitive;\nvar registerShader = _dereq_('./core/shader').registerShader;\nvar registerSystem = _dereq_('./core/system').registerSystem;\nvar shaders = _dereq_('./core/shader').shaders;\nvar systems = _dereq_('./core/system').systems;\n// Exports THREE to window so three.js can be used without alteration.\nvar THREE = window.THREE = _dereq_('./lib/three');\n\nvar pkg = _dereq_('../package');\n\n_dereq_('./components/index'); // Register standard components.\n_dereq_('./geometries/index'); // Register standard geometries.\n_dereq_('./shaders/index'); // Register standard shaders.\n_dereq_('./systems/index'); // Register standard systems.\nvar ANode = _dereq_('./core/a-node');\nvar AEntity = _dereq_('./core/a-entity'); // Depends on ANode and core components.\n\n_dereq_('./core/a-assets');\n_dereq_('./core/a-cubemap');\n_dereq_('./core/a-mixin');\n\n// Extras.\n_dereq_('./extras/components/');\n_dereq_('./extras/primitives/');\n\nconsole.log('A-Frame Version: 1.2.0 (Date 2021-02-05, Commit #b220fa00)');\nconsole.log('THREE Version (https://github.com/supermedium/three.js):',\n pkg.dependencies['super-three']);\nconsole.log('WebVR Polyfill Version:', pkg.dependencies['webvr-polyfill']);\n\nmodule.exports = window.AFRAME = {\n AComponent: _dereq_('./core/component').Component,\n AEntity: AEntity,\n ANode: ANode,\n ANIME: _dereq_('super-animejs'),\n AScene: AScene,\n components: components,\n coreComponents: Object.keys(components),\n geometries: _dereq_('./core/geometry').geometries,\n registerComponent: registerComponent,\n registerElement: _dereq_('./core/a-register-element').registerElement,\n registerGeometry: registerGeometry,\n registerPrimitive: registerPrimitive,\n registerShader: registerShader,\n registerSystem: registerSystem,\n primitives: {\n getMeshMixin: _dereq_('./extras/primitives/getMeshMixin'),\n primitives: _dereq_('./extras/primitives/primitives').primitives\n },\n scenes: _dereq_('./core/scene/scenes'),\n schema: _dereq_('./core/schema'),\n shaders: shaders,\n systems: systems,\n THREE: THREE,\n utils: utils,\n version: pkg.version\n};\n\n},{\"../package\":73,\"../vendor/starts-with-polyfill\":218,\"./components/index\":84,\"./core/a-assets\":125,\"./core/a-cubemap\":126,\"./core/a-entity\":127,\"./core/a-mixin\":128,\"./core/a-node\":129,\"./core/a-register-element\":130,\"./core/component\":131,\"./core/geometry\":132,\"./core/scene/a-scene\":134,\"./core/scene/scenes\":138,\"./core/schema\":140,\"./core/shader\":141,\"./core/system\":142,\"./extras/components/\":143,\"./extras/primitives/\":146,\"./extras/primitives/getMeshMixin\":145,\"./extras/primitives/primitives\":147,\"./geometries/index\":168,\"./lib/three\":179,\"./shaders/index\":181,\"./style/aframe.css\":186,\"./style/rStats.css\":187,\"./systems/index\":191,\"./utils/\":205,\"./utils/isIOSOlderThan10\":208,\"custom-event-polyfill\":7,\"present\":48,\"promise-polyfill\":50,\"super-animejs\":56,\"webvr-polyfill\":68}],178:[function(_dereq_,module,exports){\nwindow.aframeStats = function (scene) {\n var _rS = null;\n var _scene = scene;\n var _values = {\n te: {\n caption: 'Entities'\n },\n lt: {\n caption: 'Load Time'\n }\n };\n var _groups = [ {\n caption: 'A-Frame',\n values: [ 'te', 'lt' ]\n } ];\n\n function _update () {\n _rS('te').set(getEntityCount());\n if (window.performance.getEntriesByName) {\n _rS('lt').set(window.performance.getEntriesByName('render-started')[0].startTime.toFixed(0));\n }\n }\n\n function getEntityCount () {\n var elements = _scene.querySelectorAll('*');\n Array.prototype.slice.call(elements).filter(function (el) {\n return el.isEntity;\n });\n return elements.length;\n }\n\n function _start () {}\n\n function _end () {}\n\n function _attach (r) {\n _rS = r;\n }\n\n return {\n update: _update,\n start: _start,\n end: _end,\n attach: _attach,\n values: _values,\n groups: _groups,\n fractions: []\n };\n};\n\nif (typeof module === 'object') {\n module.exports = {\n aframeStats: window.aframeStats\n };\n}\n\n},{}],179:[function(_dereq_,module,exports){\n(function (global){\nvar THREE = global.THREE = _dereq_('super-three');\n\n// Allow cross-origin images to be loaded.\n\n// This should not be on `THREE.Loader` nor `THREE.ImageUtils`.\n// Must be on `THREE.TextureLoader`.\nif (THREE.TextureLoader) {\n THREE.TextureLoader.prototype.crossOrigin = 'anonymous';\n}\n\n// This is for images loaded from the model loaders.\nif (THREE.ImageLoader) {\n THREE.ImageLoader.prototype.crossOrigin = 'anonymous';\n}\n\n// In-memory caching for XHRs (for images, audio files, textures, etc.).\nif (THREE.Cache) {\n THREE.Cache.enabled = true;\n}\n\n// TODO: Eventually include these only if they are needed by a component.\n_dereq_('../../vendor/DeviceOrientationControls'); // THREE.DeviceOrientationControls\n_dereq_('super-three/examples/js/loaders/DRACOLoader'); // THREE.DRACOLoader\n_dereq_('super-three/examples/js/loaders/GLTFLoader'); // THREE.GLTFLoader\n_dereq_('super-three/examples/js/loaders/OBJLoader'); // THREE.OBJLoader\n_dereq_('super-three/examples/js/loaders/MTLLoader'); // THREE.MTLLoader\n_dereq_('super-three/examples/js/utils/BufferGeometryUtils'); // THREE.BufferGeometryUtils\n\nTHREE.DRACOLoader.prototype.crossOrigin = 'anonymous';\nTHREE.GLTFLoader.prototype.crossOrigin = 'anonymous';\nTHREE.MTLLoader.prototype.crossOrigin = 'anonymous';\nTHREE.OBJLoader.prototype.crossOrigin = 'anonymous';\n\nmodule.exports = THREE;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../vendor/DeviceOrientationControls\":215,\"super-three\":57,\"super-three/examples/js/loaders/DRACOLoader\":58,\"super-three/examples/js/loaders/GLTFLoader\":59,\"super-three/examples/js/loaders/MTLLoader\":60,\"super-three/examples/js/loaders/OBJLoader\":61,\"super-three/examples/js/utils/BufferGeometryUtils\":62}],180:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\n/**\n * Flat shader using THREE.MeshBasicMaterial.\n */\nmodule.exports.Shader = registerShader('flat', {\n schema: {\n color: {type: 'color'},\n fog: {default: true},\n height: {default: 256},\n offset: {type: 'vec2', default: {x: 0, y: 0}},\n repeat: {type: 'vec2', default: {x: 1, y: 1}},\n src: {type: 'map'},\n width: {default: 512},\n wireframe: {default: false},\n wireframeLinewidth: {default: 2}\n },\n\n /**\n * Initializes the shader.\n * Adds a reference from the scene to this entity as the camera.\n */\n init: function (data) {\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.materialData = {color: new THREE.Color()};\n this.textureSrc = null;\n getMaterialData(data, this.materialData);\n this.rendererSystem.applyColorCorrection(this.materialData.color);\n this.material = new THREE.MeshBasicMaterial(this.materialData);\n utils.material.updateMap(this, data);\n },\n\n update: function (data) {\n this.updateMaterial(data);\n utils.material.updateMap(this, data);\n },\n\n /**\n * Updating existing material.\n *\n * @param {object} data - Material component data.\n */\n updateMaterial: function (data) {\n var key;\n getMaterialData(data, this.materialData);\n this.rendererSystem.applyColorCorrection(this.materialData.color);\n for (key in this.materialData) {\n this.material[key] = this.materialData[key];\n }\n }\n});\n\n/**\n * Builds and normalize material data, normalizing stuff along the way.\n *\n * @param {object} data - Material data.\n * @param {object} materialData - Object to reuse.\n * @returns {object} Updated material data.\n */\nfunction getMaterialData (data, materialData) {\n materialData.color.set(data.color);\n materialData.fog = data.fog;\n materialData.wireframe = data.wireframe;\n materialData.wireframeLinewidth = data.wireframeLinewidth;\n return materialData;\n}\n\n},{\"../core/shader\":141,\"../lib/three\":179,\"../utils/\":205}],181:[function(_dereq_,module,exports){\n_dereq_('./flat');\n_dereq_('./standard');\n_dereq_('./sdf');\n_dereq_('./msdf');\n_dereq_('./ios10hls');\n\n},{\"./flat\":180,\"./ios10hls\":182,\"./msdf\":183,\"./sdf\":184,\"./standard\":185}],182:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\n\n/**\n * Custom shader for iOS 10 HTTP Live Streaming (HLS).\n * For more information on HLS, see https://datatracker.ietf.org/doc/draft-pantos-http-live-streaming/\n */\nmodule.exports.Shader = registerShader('ios10hls', {\n schema: {\n src: {type: 'map', is: 'uniform'},\n opacity: {type: 'number', is: 'uniform', default: 1}\n },\n\n vertexShader: [\n 'varying vec2 vUV;',\n 'void main(void) {',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n ' vUV = uv;',\n '}'\n ].join('\\n'),\n\n fragmentShader: [\n 'uniform sampler2D src;',\n 'uniform float opacity;',\n 'varying vec2 vUV;',\n 'void main() {',\n ' vec2 offset = vec2(0, 0);',\n ' vec2 repeat = vec2(1, 1);',\n ' vec4 color = texture2D(src, vec2(vUV.x / repeat.x + offset.x, (1.0 - vUV.y) / repeat.y + offset.y)).bgra;',\n ' gl_FragColor = vec4(color.rgb, opacity);',\n '}'\n ].join('\\n')\n});\n\n\n},{\"../core/shader\":141}],183:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\n\nvar isWebGL2AVailable = !!document.createElement('canvas').getContext('webgl2');\n\nvar VERTEX_SHADER_WEBGL1 = [\n 'attribute vec2 uv;',\n 'attribute vec3 position;',\n 'uniform mat4 projectionMatrix;',\n 'uniform mat4 modelViewMatrix;',\n 'varying vec2 vUV;',\n 'void main(void) {',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n ' vUV = uv;',\n '}'\n].join('\\n');\n\nvar VERTEX_SHADER_WEBGL2 = [\n '#version 300 es',\n 'in vec2 uv;',\n 'in vec3 position;',\n 'uniform mat4 projectionMatrix;',\n 'uniform mat4 modelViewMatrix;',\n 'out vec2 vUV;',\n 'void main(void) {',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n ' vUV = uv;',\n '}'\n].join('\\n');\n\nvar VERTEX_SHADER = isWebGL2AVailable ? VERTEX_SHADER_WEBGL2 : VERTEX_SHADER_WEBGL1;\n\nvar FRAGMENT_SHADER_WEBGL1 = [\n '#ifdef GL_OES_standard_derivatives',\n '#extension GL_OES_standard_derivatives: enable',\n '#endif',\n 'precision highp float;',\n 'uniform bool negate;',\n 'uniform float alphaTest;',\n 'uniform float opacity;',\n 'uniform sampler2D map;',\n 'uniform vec3 color;',\n 'varying vec2 vUV;',\n\n 'float median(float r, float g, float b) {',\n ' return max(min(r, g), min(max(r, g), b));',\n '}',\n\n // FIXME: Experimentally determined constants.\n '#define BIG_ENOUGH 0.001',\n '#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)',\n\n 'void main() {',\n ' vec3 sampleColor = texture2D(map, vUV).rgb;',\n ' if (negate) { sampleColor = 1.0 - sampleColor; }',\n\n ' float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;',\n ' float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);',\n ' float dscale = 0.353505;',\n ' vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));',\n ' float isBigEnough = max(abs(duv.x), abs(duv.y));',\n\n // When texel is too small, blend raw alpha value rather than supersampling.\n // FIXME: Experimentally determined constant.\n ' // Do modified alpha test.',\n ' if (isBigEnough > BIG_ENOUGH) {',\n ' float ratio = BIG_ENOUGH / isBigEnough;',\n ' alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);',\n ' }',\n\n ' // Do modified alpha test.',\n ' if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }',\n ' gl_FragColor = vec4(color.xyz, alpha * opacity);',\n '}'\n].join('\\n');\n\nvar FRAGMENT_SHADER_WEBGL2 = [\n '#version 300 es',\n 'precision highp float;',\n 'uniform bool negate;',\n 'uniform float alphaTest;',\n 'uniform float opacity;',\n 'uniform sampler2D map;',\n 'uniform vec3 color;',\n 'in vec2 vUV;',\n 'out vec4 fragColor;',\n\n 'float median(float r, float g, float b) {',\n ' return max(min(r, g), min(max(r, g), b));',\n '}',\n\n // FIXME: Experimentally determined constants.\n '#define BIG_ENOUGH 0.001',\n '#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)',\n\n 'void main() {',\n ' vec3 sampleColor = texture(map, vUV).rgb;',\n ' if (negate) { sampleColor = 1.0 - sampleColor; }',\n\n ' float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;',\n ' float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);',\n ' float dscale = 0.353505;',\n ' vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));',\n ' float isBigEnough = max(abs(duv.x), abs(duv.y));',\n\n // When texel is too small, blend raw alpha value rather than supersampling.\n // FIXME: Experimentally determined constant.\n ' // Do modified alpha test.',\n ' if (isBigEnough > BIG_ENOUGH) {',\n ' float ratio = BIG_ENOUGH / isBigEnough;',\n ' alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);',\n ' }',\n\n ' // Do modified alpha test.',\n ' if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }',\n ' fragColor = vec4(color.xyz, alpha * opacity);',\n '}'\n].join('\\n');\n\nvar FRAGMENT_SHADER = isWebGL2AVailable ? FRAGMENT_SHADER_WEBGL2 : FRAGMENT_SHADER_WEBGL1;\n\n/**\n * Multi-channel signed distance field.\n * Used by text component.\n */\nmodule.exports.Shader = registerShader('msdf', {\n schema: {\n alphaTest: {type: 'number', is: 'uniform', default: 0.5},\n color: {type: 'color', is: 'uniform', default: 'white'},\n map: {type: 'map', is: 'uniform'},\n negate: {type: 'boolean', is: 'uniform', default: true},\n opacity: {type: 'number', is: 'uniform', default: 1.0}\n },\n\n raw: true,\n\n vertexShader: VERTEX_SHADER,\n\n fragmentShader: FRAGMENT_SHADER\n});\n\n},{\"../core/shader\":141}],184:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\n\n/**\n * Signed distance field.\n * Used by text component.\n */\nmodule.exports.Shader = registerShader('sdf', {\n schema: {\n alphaTest: {type: 'number', is: 'uniform', default: 0.5},\n color: {type: 'color', is: 'uniform', default: 'white'},\n map: {type: 'map', is: 'uniform'},\n opacity: {type: 'number', is: 'uniform', default: 1.0}\n },\n\n raw: true,\n\n vertexShader: [\n '#version 300 es',\n 'in vec2 uv;',\n 'in vec3 position;',\n 'uniform mat4 projectionMatrix;',\n 'uniform mat4 modelViewMatrix;',\n 'out vec2 vUV;',\n 'void main(void) {',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n ' vUV = uv;',\n '}'\n ].join('\\n'),\n\n fragmentShader: [\n '#version 300 es',\n 'precision highp float;',\n 'uniform float alphaTest;',\n 'uniform float opacity;',\n 'uniform sampler2D map;',\n 'uniform vec3 color;',\n 'in vec2 vUV;',\n 'out vec4 fragColor;',\n\n '#ifdef GL_OES_standard_derivatives',\n ' float contour(float width, float value) {',\n ' return smoothstep(0.5 - value, 0.5 + value, width);',\n ' }',\n '#else',\n ' float aastep(float value, float afwidth) {',\n ' return smoothstep(0.5 - afwidth, 0.5 + afwidth, value);',\n ' }',\n '#endif',\n\n // FIXME: Experimentally determined constants.\n '#define BIG_ENOUGH 0.001',\n '#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)',\n '#define ALL_SMOOTH 0.4',\n '#define ALL_ROUGH 0.02',\n '#define DISCARD_ALPHA (alphaTest / (2.2 - 1.2 * ratio))',\n\n 'void main() {',\n // When we have derivatives and can get texel size for supersampling.\n ' #ifdef GL_OES_standard_derivatives',\n ' vec2 uv = vUV;',\n ' vec4 texColor = texture(map, uv);',\n ' float dist = texColor.a;',\n ' float width = fwidth(dist);',\n ' float alpha = contour(dist, width);',\n ' float dscale = 0.353505;',\n\n ' vec2 duv = dscale * (dFdx(uv) + dFdy(uv));',\n ' float isBigEnough = max(abs(duv.x), abs(duv.y));',\n\n // When texel is too small, blend raw alpha value rather than supersampling.\n // FIXME: experimentally determined constant\n ' if (isBigEnough > BIG_ENOUGH) {',\n ' float ratio = BIG_ENOUGH / isBigEnough;',\n ' alpha = ratio * alpha + (1.0 - ratio) * dist;',\n ' }',\n\n // Otherwise do weighted supersampling.\n // FIXME: why this weighting?\n ' if (isBigEnough <= BIG_ENOUGH) {',\n ' vec4 box = vec4 (uv - duv, uv + duv);',\n ' alpha = (alpha + 0.5 * (',\n ' contour(texture(map, box.xy).a, width)',\n ' + contour(texture(map, box.zw).a, width)',\n ' + contour(texture(map, box.xw).a, width)',\n ' + contour(texture(map, box.zy).a, width)',\n ' )) / 3.0;',\n ' }',\n\n // Do modified alpha test.\n ' if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }',\n\n ' #else',\n // When we don't have derivatives, use approximations.\n ' vec4 texColor = texture(map, vUV);',\n ' float value = texColor.a;',\n // FIXME: if we understood font pixel dimensions, this could probably be improved\n ' float afwidth = (1.0 / 32.0) * (1.4142135623730951 / (2.0 * gl_FragCoord.w));',\n ' float alpha = aastep(value, afwidth);',\n\n // Use gl_FragCoord.w to guess when we should blend.\n // FIXME: If we understood font pixel dimensions, this could probably be improved.\n ' float ratio = (gl_FragCoord.w >= ALL_SMOOTH) ? 1.0 : (gl_FragCoord.w < ALL_ROUGH) ? 0.0 : (gl_FragCoord.w - ALL_ROUGH) / (ALL_SMOOTH - ALL_ROUGH);',\n ' if (alpha < alphaTest) { if (ratio >= 1.0) { discard; return; } alpha = 0.0; }',\n ' alpha = alpha * ratio + (1.0 - ratio) * value;',\n ' if (ratio < 1.0 && alpha <= DISCARD_ALPHA) { discard; return; }',\n ' #endif',\n\n ' fragColor = vec4(color, opacity * alpha);',\n '}'\n ].join('\\n')\n});\n\n},{\"../core/shader\":141}],185:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar CubeLoader = new THREE.CubeTextureLoader();\nvar texturePromises = {};\n\n/**\n * Standard (physically-based) shader using THREE.MeshStandardMaterial.\n */\nmodule.exports.Shader = registerShader('standard', {\n schema: {\n ambientOcclusionMap: {type: 'map'},\n ambientOcclusionMapIntensity: {default: 1},\n ambientOcclusionTextureOffset: {type: 'vec2'},\n ambientOcclusionTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n color: {type: 'color'},\n\n displacementMap: {type: 'map'},\n displacementScale: {default: 1},\n displacementBias: {default: 0.5},\n displacementTextureOffset: {type: 'vec2'},\n displacementTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n emissive: {type: 'color', default: '#000'},\n emissiveIntensity: {default: 1},\n envMap: {default: ''},\n\n fog: {default: true},\n height: {default: 256},\n\n metalness: {default: 0.0, min: 0.0, max: 1.0},\n metalnessMap: {type: 'map'},\n metalnessTextureOffset: {type: 'vec2'},\n metalnessTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n normalMap: {type: 'map'},\n normalScale: {type: 'vec2', default: {x: 1, y: 1}},\n normalTextureOffset: {type: 'vec2'},\n normalTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n offset: {type: 'vec2', default: {x: 0, y: 0}},\n repeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n roughness: {default: 0.5, min: 0.0, max: 1.0},\n roughnessMap: {type: 'map'},\n roughnessTextureOffset: {type: 'vec2'},\n roughnessTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n sphericalEnvMap: {type: 'map'},\n src: {type: 'map'},\n width: {default: 512},\n wireframe: {default: false},\n wireframeLinewidth: {default: 2}\n },\n\n /**\n * Initializes the shader.\n * Adds a reference from the scene to this entity as the camera.\n */\n init: function (data) {\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.materialData = {color: new THREE.Color(), emissive: new THREE.Color()};\n getMaterialData(data, this.materialData);\n this.rendererSystem.applyColorCorrection(this.materialData.color);\n this.rendererSystem.applyColorCorrection(this.materialData.emissive);\n this.material = new THREE.MeshStandardMaterial(this.materialData);\n\n utils.material.updateMap(this, data);\n if (data.normalMap) { utils.material.updateDistortionMap('normal', this, data); }\n if (data.displacementMap) { utils.material.updateDistortionMap('displacement', this, data); }\n if (data.ambientOcclusionMap) { utils.material.updateDistortionMap('ambientOcclusion', this, data); }\n if (data.metalnessMap) { utils.material.updateDistortionMap('metalness', this, data); }\n if (data.roughnessMap) { utils.material.updateDistortionMap('roughness', this, data); }\n this.updateEnvMap(data);\n },\n\n update: function (data) {\n this.updateMaterial(data);\n utils.material.updateMap(this, data);\n if (data.normalMap) { utils.material.updateDistortionMap('normal', this, data); }\n if (data.displacementMap) { utils.material.updateDistortionMap('displacement', this, data); }\n if (data.ambientOcclusionMap) { utils.material.updateDistortionMap('ambientOcclusion', this, data); }\n if (data.metalnessMap) { utils.material.updateDistortionMap('metalness', this, data); }\n if (data.roughnessMap) { utils.material.updateDistortionMap('roughness', this, data); }\n this.updateEnvMap(data);\n },\n\n /**\n * Updating existing material.\n *\n * @param {object} data - Material component data.\n * @returns {object} Material.\n */\n updateMaterial: function (data) {\n var key;\n var material = this.material;\n getMaterialData(data, this.materialData);\n this.rendererSystem.applyColorCorrection(this.materialData.color);\n this.rendererSystem.applyColorCorrection(this.materialData.emissive);\n for (key in this.materialData) {\n material[key] = this.materialData[key];\n }\n },\n\n /**\n * Handle environment cubemap. Textures are cached in texturePromises.\n */\n updateEnvMap: function (data) {\n var self = this;\n var material = this.material;\n var envMap = data.envMap;\n var sphericalEnvMap = data.sphericalEnvMap;\n\n // No envMap defined or already loading.\n if ((!envMap && !sphericalEnvMap) || this.isLoadingEnvMap) {\n material.envMap = null;\n material.needsUpdate = true;\n return;\n }\n this.isLoadingEnvMap = true;\n\n // if a spherical env map is defined then use it.\n if (sphericalEnvMap) {\n this.el.sceneEl.systems.material.loadTexture(sphericalEnvMap, {src: sphericalEnvMap}, function textureLoaded (texture) {\n self.isLoadingEnvMap = false;\n texture.mapping = THREE.SphericalReflectionMapping;\n material.envMap = texture;\n utils.material.handleTextureEvents(self.el, texture);\n material.needsUpdate = true;\n });\n return;\n }\n\n // Another material is already loading this texture. Wait on promise.\n if (texturePromises[envMap]) {\n texturePromises[envMap].then(function (cube) {\n self.isLoadingEnvMap = false;\n material.envMap = cube;\n utils.material.handleTextureEvents(self.el, cube);\n material.needsUpdate = true;\n });\n return;\n }\n\n // Material is first to load this texture. Load and resolve texture.\n texturePromises[envMap] = new Promise(function (resolve) {\n utils.srcLoader.validateCubemapSrc(envMap, function loadEnvMap (urls) {\n CubeLoader.load(urls, function (cube) {\n // Texture loaded.\n self.isLoadingEnvMap = false;\n material.envMap = cube;\n utils.material.handleTextureEvents(self.el, cube);\n resolve(cube);\n });\n });\n });\n }\n});\n\n/**\n * Builds and normalize material data, normalizing stuff along the way.\n *\n * @param {object} data - Material data.\n * @param {object} materialData - Object to use.\n * @returns {object} Updated materialData.\n */\nfunction getMaterialData (data, materialData) {\n materialData.color.set(data.color);\n materialData.emissive.set(data.emissive);\n materialData.emissiveIntensity = data.emissiveIntensity;\n materialData.fog = data.fog;\n materialData.metalness = data.metalness;\n materialData.roughness = data.roughness;\n materialData.wireframe = data.wireframe;\n materialData.wireframeLinewidth = data.wireframeLinewidth;\n\n if (data.normalMap) { materialData.normalScale = data.normalScale; }\n\n if (data.ambientOcclusionMap) {\n materialData.aoMapIntensity = data.ambientOcclusionMapIntensity;\n }\n\n if (data.displacementMap) {\n materialData.displacementScale = data.displacementScale;\n materialData.displacementBias = data.displacementBias;\n }\n\n return materialData;\n}\n\n},{\"../core/shader\":141,\"../lib/three\":179,\"../utils/\":205}],186:[function(_dereq_,module,exports){\nvar css = \"html.a-fullscreen{bottom:0;left:0;position:fixed;right:0;top:0}html.a-fullscreen body{height:100%;margin:0;overflow:hidden;padding:0;width:100%}html.a-fullscreen .a-canvas{width:100%!important;height:100%!important;top:0!important;left:0!important;right:0!important;bottom:0!important;position:fixed!important}html:not(.a-fullscreen) .a-enter-ar,html:not(.a-fullscreen) .a-enter-vr{right:5px;bottom:5px}:-webkit-full-screen{background-color:transparent}.a-hidden{display:none!important}.a-canvas{height:100%;left:0;position:absolute;top:0;width:100%}.a-canvas.a-grab-cursor:hover{cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}canvas.a-canvas.a-mouse-cursor-hover:hover{cursor:pointer}.a-inspector-loader{background-color:#ed3160;position:fixed;left:3px;top:3px;padding:6px 10px;color:#fff;text-decoration:none;font-size:12px;font-family:Roboto,sans-serif;text-align:center;z-index:99999;width:204px}@keyframes dots-1{from{opacity:0}25%{opacity:1}}@keyframes dots-2{from{opacity:0}50%{opacity:1}}@keyframes dots-3{from{opacity:0}75%{opacity:1}}@-webkit-keyframes dots-1{from{opacity:0}25%{opacity:1}}@-webkit-keyframes dots-2{from{opacity:0}50%{opacity:1}}@-webkit-keyframes dots-3{from{opacity:0}75%{opacity:1}}.a-inspector-loader .dots span{animation:dots-1 2s infinite steps(1);-webkit-animation:dots-1 2s infinite steps(1)}.a-inspector-loader .dots span:first-child+span{animation-name:dots-2;-webkit-animation-name:dots-2}.a-inspector-loader .dots span:first-child+span+span{animation-name:dots-3;-webkit-animation-name:dots-3}a-scene{display:block;position:relative;height:100%;width:100%}a-assets,a-scene audio,a-scene img,a-scene video{display:none}.a-enter-vr-modal,.a-orientation-modal{font-family:Consolas,Andale Mono,Courier New,monospace}.a-enter-vr-modal a{border-bottom:1px solid #fff;padding:2px 0;text-decoration:none;transition:.1s color ease-in}.a-enter-vr-modal a:hover{background-color:#fff;color:#111;padding:2px 4px;position:relative;left:-4px}.a-enter-ar,.a-enter-vr{font-family:sans-serif,monospace;font-size:13px;width:100%;font-weight:200;line-height:16px;position:absolute;right:20px;bottom:20px}.a-enter-ar{right:80px}.a-enter-vr-button,.a-enter-vr-modal,.a-enter-vr-modal a{color:#fff;user-select:none;outline:0}.a-enter-vr-button{background:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z' fill='%23fff'/%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z' fill='%23fff'/%3E%3C/svg%3E\\\") 50% 50% no-repeat rgba(0,0,0,.35)}.a-enter-ar-button{background:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z' fill='%23fff'/%3E%3Cpath d='M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z' fill='%23fff'/%3E%3Cpath d='M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z' fill='%23fff'/%3E%3C/svg%3E\\\") 50% 50% no-repeat rgba(0,0,0,.2)}.a-enter-ar-button,.a-enter-vr-button{background-size:90% 90%;border:0;bottom:0;cursor:pointer;min-width:58px;min-height:34px;padding-right:0;padding-top:0;position:absolute;right:0;transition:background-color .05s ease;-webkit-transition:background-color .05s ease;z-index:9999;border-radius:8px;touch-action:manipulation}.a-enter-ar-button{background-size:100% 90%;margin-right:10px;border-radius:7px}.a-enter-ar-button:active,.a-enter-ar-button:hover,.a-enter-vr-button:active,.a-enter-vr-button:hover{background-color:#ef2d5e}.a-enter-vr-button.resethover{background-color:rgba(0,0,0,.35)}[data-a-enter-vr-no-webvr] .a-enter-vr-button{border-color:#666;opacity:.65}[data-a-enter-vr-no-webvr] .a-enter-vr-button:active,[data-a-enter-vr-no-webvr] .a-enter-vr-button:hover{background-color:rgba(0,0,0,.35);cursor:not-allowed}.a-enter-vr-modal{background-color:#666;border-radius:0;display:none;min-height:32px;margin-right:70px;padding:9px;width:280px;right:2%;position:absolute}.a-enter-vr-modal:after{border-bottom:10px solid transparent;border-left:10px solid #666;border-top:10px solid transparent;display:inline-block;content:'';position:absolute;right:-5px;top:5px;width:0;height:0}.a-enter-vr-modal a,.a-enter-vr-modal p{display:inline}.a-enter-vr-modal p{margin:0}.a-enter-vr-modal p:after{content:' '}[data-a-enter-vr-no-headset].a-enter-vr:hover .a-enter-vr-modal,[data-a-enter-vr-no-webvr].a-enter-vr:hover .a-enter-vr-modal{display:block}.a-orientation-modal{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E) center/50% 50% no-repeat rgba(244,244,244,1);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-orientation-modal:after{color:#666;content:\\\"Insert phone into Cardboard holder.\\\";display:block;position:absolute;text-align:center;top:70%;transform:translateY(-70%);width:100%}.a-orientation-modal button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E) no-repeat;border:none;height:50px;text-indent:-9999px;width:50px}.a-loader-title{background-color:rgba(0,0,0,.6);font-family:sans-serif,monospace;text-align:center;font-size:20px;height:50px;font-weight:300;line-height:50px;position:absolute;right:0;left:0;top:0;color:#fff}.a-modal{background:0 0/50% 50% rgba(0,0,0,.6);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-dialog{position:relative;left:50%;top:50%;transform:translate(-50%,-50%);z-index:199995;width:300px;height:200px;background-size:contain;background-color:#fff;font-family:sans-serif,monospace;font-size:20px;border-radius:3px;padding:6px}.a-dialog-text-container{width:100%;height:70%;align-self:flex-start;display:flex;justify-content:center;align-content:center;flex-direction:column}.a-dialog-text{display:inline-block;font-weight:400;font-size:14pt;margin:8px}.a-dialog-buttons-container{display:inline-flex;align-self:flex-end;width:100%;height:30%}.a-dialog-button{cursor:pointer;align-self:center;opacity:.9;height:80%;width:50%;font-size:12pt;margin:4px;border-radius:2px;text-align:center;border:none;display:inline-block;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);user-select:none}.a-dialog-permission-button:hover{box-shadow:0 7px 14px rgba(0,0,0,.2),0 2px 2px rgba(0,0,0,.2)}.a-dialog-allow-button{background-color:#00ceff}.a-dialog-deny-button{background-color:#ff005b}.a-dialog-ok-button{background-color:#00ceff;width:100%}\"; (_dereq_(\"browserify-css\").createStyle(css, { \"href\": \"src/style/aframe.css\"})); module.exports = css;\n},{\"browserify-css\":4}],187:[function(_dereq_,module,exports){\nvar css = \".rs-base{background-color:#333;color:#fafafa;border-radius:0;font:10px monospace;left:5px;line-height:1em;opacity:.85;overflow:hidden;padding:10px;position:fixed;top:5px;width:300px;z-index:10000}.rs-base div.hidden{display:none}.rs-base h1{color:#fff;cursor:pointer;font-size:1.4em;font-weight:300;margin:0 0 5px;padding:0}.rs-group{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;margin-bottom:5px}.rs-group:last-child{margin-bottom:0}.rs-counter-base{align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;height:10px;-webkit-justify-content:space-between;justify-content:space-between;margin:2px 0}.rs-counter-base.alarm{color:#b70000;text-shadow:0 0 0 #b70000,0 0 1px #fff,0 0 1px #fff,0 0 2px #fff,0 0 2px #fff,0 0 3px #fff,0 0 3px #fff,0 0 4px #fff,0 0 4px #fff}.rs-counter-id{font-weight:300;-webkit-box-ordinal-group:0;-webkit-order:0;order:0;width:54px}.rs-counter-value{font-weight:300;-webkit-box-ordinal-group:1;-webkit-order:1;order:1;text-align:right;width:35px}.rs-canvas{-webkit-box-ordinal-group:2;-webkit-order:2;order:2}@media (min-width:480px){.rs-base{left:20px;top:20px}}\"; (_dereq_(\"browserify-css\").createStyle(css, { \"href\": \"src/style/rStats.css\"})); module.exports = css;\n},{\"browserify-css\":4}],188:[function(_dereq_,module,exports){\nvar constants = _dereq_('../constants/');\nvar registerSystem = _dereq_('../core/system').registerSystem;\n\nvar DEFAULT_CAMERA_ATTR = 'data-aframe-default-camera';\n\n/**\n * Camera system. Manages which camera is active among multiple cameras in scene.\n *\n * @member {object} activeCameraEl - Active camera entity.\n */\nmodule.exports.System = registerSystem('camera', {\n init: function () {\n this.activeCameraEl = null;\n\n this.render = this.render.bind(this);\n this.unwrapRender = this.unwrapRender.bind(this);\n this.wrapRender = this.wrapRender.bind(this);\n\n this.initialCameraFound = false;\n this.numUserCameras = 0;\n this.numUserCamerasChecked = 0;\n this.setupInitialCamera();\n },\n\n /**\n * Setup initial camera, either searching for camera or\n * creating a default camera if user has not added one during the initial scene traversal.\n * We want sceneEl.camera to be ready, set, and initialized before the rest of the scene\n * loads.\n *\n * Default camera offset height is at average eye level (~1.6m).\n */\n setupInitialCamera: function () {\n var cameraEls;\n var i;\n var sceneEl = this.sceneEl;\n var self = this;\n\n // Camera already defined or the one defined it is an spectator one.\n if (sceneEl.camera && !sceneEl.camera.el.getAttribute('camera').spectator) {\n sceneEl.emit('cameraready', {cameraEl: sceneEl.camera.el});\n return;\n }\n\n // Search for initial user-defined camera.\n cameraEls = sceneEl.querySelectorAll('a-camera, [camera]');\n\n // No user cameras, create default one.\n if (!cameraEls.length) {\n this.createDefaultCamera();\n return;\n }\n\n this.numUserCameras = cameraEls.length;\n for (i = 0; i < cameraEls.length; i++) {\n cameraEls[i].addEventListener('object3dset', function (evt) {\n if (evt.detail.type !== 'camera') { return; }\n self.checkUserCamera(this);\n });\n\n // Load camera and wait for camera to initialize.\n if (cameraEls[i].isNode) {\n cameraEls[i].load();\n } else {\n cameraEls[i].addEventListener('nodeready', function () {\n this.load();\n });\n }\n }\n },\n\n /**\n * Check if a user-defined camera entity is appropriate to be initial camera.\n * (active + non-spectator).\n *\n * Keep track of the number of cameras we checked and whether we found one.\n */\n checkUserCamera: function (cameraEl) {\n var cameraData;\n var sceneEl = this.el.sceneEl;\n this.numUserCamerasChecked++;\n\n // Already found one.\n if (this.initialCameraFound) { return; }\n\n // Check if camera is appropriate for being the initial camera.\n cameraData = cameraEl.getAttribute('camera');\n if (!cameraData.active || cameraData.spectator) {\n // No user cameras eligible, create default camera.\n if (this.numUserCamerasChecked === this.numUserCameras) {\n this.createDefaultCamera();\n }\n return;\n }\n\n this.initialCameraFound = true;\n sceneEl.camera = cameraEl.getObject3D('camera');\n sceneEl.emit('cameraready', {cameraEl: cameraEl});\n },\n\n createDefaultCamera: function () {\n var defaultCameraEl;\n var sceneEl = this.sceneEl;\n\n // Set up default camera.\n defaultCameraEl = document.createElement('a-entity');\n defaultCameraEl.setAttribute('camera', {active: true});\n defaultCameraEl.setAttribute('position', {\n x: 0,\n y: constants.DEFAULT_CAMERA_HEIGHT,\n z: 0\n });\n defaultCameraEl.setAttribute('wasd-controls', '');\n defaultCameraEl.setAttribute('look-controls', '');\n defaultCameraEl.setAttribute(constants.AFRAME_INJECTED, '');\n\n defaultCameraEl.addEventListener('object3dset', function (evt) {\n if (evt.detail.type !== 'camera') { return; }\n sceneEl.camera = evt.detail.object;\n sceneEl.emit('cameraready', {cameraEl: defaultCameraEl});\n });\n\n sceneEl.appendChild(defaultCameraEl);\n },\n\n /**\n * Set a different active camera.\n * When we choose a (sort of) random scene camera as the replacement, set its `active` to\n * true. The camera component will call `setActiveCamera` and handle passing the torch to\n * the new camera.\n */\n disableActiveCamera: function () {\n var cameraEls;\n var newActiveCameraEl;\n cameraEls = this.sceneEl.querySelectorAll('[camera]');\n newActiveCameraEl = cameraEls[cameraEls.length - 1];\n newActiveCameraEl.setAttribute('camera', 'active', true);\n },\n\n /**\n * Set active camera to be used by renderer.\n * Removes the default camera (if present).\n * Disables all other cameras in the scene.\n *\n * @param {Element} newCameraEl - Entity with camera component.\n */\n setActiveCamera: function (newCameraEl) {\n var cameraEl;\n var cameraEls;\n var i;\n var newCamera;\n var previousCamera = this.activeCameraEl;\n var sceneEl = this.sceneEl;\n\n // Same camera.\n newCamera = newCameraEl.getObject3D('camera');\n if (!newCamera || newCameraEl === this.activeCameraEl) { return; }\n\n // Grab the default camera.\n var defaultCameraWrapper = sceneEl.querySelector('[' + DEFAULT_CAMERA_ATTR + ']');\n var defaultCameraEl = defaultCameraWrapper &&\n defaultCameraWrapper.querySelector('[camera]');\n\n // Remove default camera if new camera is not the default camera.\n if (newCameraEl !== defaultCameraEl) { removeDefaultCamera(sceneEl); }\n\n // Make new camera active.\n this.activeCameraEl = newCameraEl;\n this.activeCameraEl.play();\n sceneEl.camera = newCamera;\n\n // Disable current camera\n if (previousCamera) {\n previousCamera.setAttribute('camera', 'active', false);\n }\n\n // Disable other cameras in the scene\n cameraEls = sceneEl.querySelectorAll('[camera]');\n for (i = 0; i < cameraEls.length; i++) {\n cameraEl = cameraEls[i];\n if (!cameraEl.isEntity || newCameraEl === cameraEl) { continue; }\n cameraEl.setAttribute('camera', 'active', false);\n cameraEl.pause();\n }\n sceneEl.emit('camera-set-active', {cameraEl: newCameraEl});\n },\n\n /**\n * Set spectator camera to render the scene on a 2D display.\n *\n * @param {Element} newCameraEl - Entity with camera component.\n */\n setSpectatorCamera: function (newCameraEl) {\n var newCamera;\n var previousCamera = this.spectatorCameraEl;\n var sceneEl = this.sceneEl;\n var spectatorCameraEl;\n\n // Same camera.\n newCamera = newCameraEl.getObject3D('camera');\n if (!newCamera || newCameraEl === this.spectatorCameraEl) { return; }\n\n // Disable current camera\n if (previousCamera) {\n previousCamera.setAttribute('camera', 'spectator', false);\n }\n\n spectatorCameraEl = this.spectatorCameraEl = newCameraEl;\n\n sceneEl.addEventListener('enter-vr', this.wrapRender);\n sceneEl.addEventListener('exit-vr', this.unwrapRender);\n\n spectatorCameraEl.setAttribute('camera', 'active', false);\n spectatorCameraEl.play();\n\n sceneEl.emit('camera-set-spectator', {cameraEl: newCameraEl});\n },\n\n /**\n * Disables current spectator camera.\n */\n disableSpectatorCamera: function () {\n this.spectatorCameraEl = undefined;\n },\n\n /**\n * Wrap the render method of the renderer to render\n * the spectator camera after vrDisplay.submitFrame.\n */\n wrapRender: function () {\n if (!this.spectatorCameraEl || this.originalRender) { return; }\n this.originalRender = this.sceneEl.renderer.render;\n this.sceneEl.renderer.render = this.render;\n },\n\n unwrapRender: function () {\n if (!this.originalRender) { return; }\n this.sceneEl.renderer.render = this.originalRender;\n this.originalRender = undefined;\n },\n\n render: function (scene, camera) {\n var isVREnabled;\n var sceneEl = this.sceneEl;\n var spectatorCamera;\n\n isVREnabled = sceneEl.renderer.xr.enabled;\n this.originalRender.call(sceneEl.renderer, scene, camera);\n if (!this.spectatorCameraEl || sceneEl.isMobile || !isVREnabled) { return; }\n spectatorCamera = this.spectatorCameraEl.components.camera.camera;\n sceneEl.renderer.xr.enabled = false;\n this.originalRender.call(sceneEl.renderer, scene, spectatorCamera);\n sceneEl.renderer.xr.enabled = isVREnabled;\n }\n});\n\n/**\n * Remove injected default camera from scene, if present.\n *\n * @param {Element} sceneEl\n */\nfunction removeDefaultCamera (sceneEl) {\n var defaultCamera;\n var camera = sceneEl.camera;\n if (!camera) { return; }\n\n // Remove default camera if present.\n defaultCamera = sceneEl.querySelector('[' + DEFAULT_CAMERA_ATTR + ']');\n if (!defaultCamera) { return; }\n sceneEl.removeChild(defaultCamera);\n}\n\n},{\"../constants/\":123,\"../core/system\":142}],189:[function(_dereq_,module,exports){\nvar geometries = _dereq_('../core/geometry').geometries;\nvar registerSystem = _dereq_('../core/system').registerSystem;\n\n/**\n * System for geometry component.\n * Handle geometry caching.\n *\n * @member {object} cache - Mapping of stringified component data to THREE.BufferGeometry objects.\n * @member {object} cacheCount - Keep track of number of entities using a geometry to\n * know whether to dispose on removal.\n */\nmodule.exports.System = registerSystem('geometry', {\n init: function () {\n this.cache = {};\n this.cacheCount = {};\n },\n\n /**\n * Reset cache. Mainly for testing.\n */\n clearCache: function () {\n this.cache = {};\n this.cacheCount = {};\n },\n\n /**\n * Attempt to retrieve from cache.\n *\n * @returns {Object|null} A geometry if it exists, else null.\n */\n getOrCreateGeometry: function (data) {\n var cache = this.cache;\n var cachedGeometry;\n var hash;\n\n // Skip all caching logic.\n if (data.skipCache) { return createGeometry(data); }\n\n // Try to retrieve from cache first.\n hash = this.hash(data);\n cachedGeometry = cache[hash];\n incrementCacheCount(this.cacheCount, hash);\n\n if (cachedGeometry) { return cachedGeometry; }\n\n // Create geometry.\n cachedGeometry = createGeometry(data);\n\n // Cache and return geometry.\n cache[hash] = cachedGeometry;\n return cachedGeometry;\n },\n\n /**\n * Let system know that an entity is no longer using a geometry.\n */\n unuseGeometry: function (data) {\n var cache = this.cache;\n var cacheCount = this.cacheCount;\n var geometry;\n var hash;\n\n if (data.skipCache) { return; }\n\n hash = this.hash(data);\n\n if (!cache[hash]) { return; }\n\n decrementCacheCount(cacheCount, hash);\n\n // Another entity is still using this geometry. No need to do anything.\n if (cacheCount[hash] > 0) { return; }\n\n // No more entities are using this geometry. Dispose.\n geometry = cache[hash];\n geometry.dispose();\n delete cache[hash];\n delete cacheCount[hash];\n },\n\n /**\n * Use JSON.stringify to turn component data into hash.\n * Should be deterministic within a single browser engine.\n * If not, then look into json-stable-stringify.\n */\n hash: function (data) {\n return JSON.stringify(data);\n }\n});\n\n/**\n * Create geometry using component data.\n *\n * @param {object} data - Component data.\n * @returns {object} Geometry.\n */\nfunction createGeometry (data) {\n var geometryType = data.primitive;\n var GeometryClass = geometries[geometryType] && geometries[geometryType].Geometry;\n var geometryInstance = new GeometryClass();\n\n if (!GeometryClass) { throw new Error('Unknown geometry `' + geometryType + '`'); }\n\n geometryInstance.init(data);\n return geometryInstance.geometry;\n}\n\n/**\n * Decreate count of entity using a geometry.\n */\nfunction decrementCacheCount (cacheCount, hash) {\n cacheCount[hash]--;\n}\n\n/**\n * Increase count of entity using a geometry.\n */\nfunction incrementCacheCount (cacheCount, hash) {\n cacheCount[hash] = cacheCount[hash] === undefined ? 1 : cacheCount[hash] + 1;\n}\n\n},{\"../core/geometry\":132,\"../core/system\":142}],190:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar THREE = _dereq_('../lib/three');\n\n/**\n * glTF model system.\n *\n * Configures glTF loading options. Models using glTF compression require that a Draco decoder be\n * provided externally.\n *\n * @param {string} dracoDecoderPath - Base path from which to load Draco decoder library.\n */\nmodule.exports.System = registerSystem('gltf-model', {\n schema: {\n dracoDecoderPath: {default: ''}\n },\n\n init: function () {\n var path = this.data.dracoDecoderPath;\n this.dracoLoader = new THREE.DRACOLoader();\n this.dracoLoader.setDecoderPath(path);\n },\n\n update: function () {\n var path;\n if (this.dracoLoader) { return; }\n path = this.data.dracoDecoderPath;\n this.dracoLoader = new THREE.DRACOLoader();\n this.dracoLoader.setDecoderPath(path);\n },\n\n getDRACOLoader: function () {\n return this.dracoLoader;\n }\n});\n\n},{\"../core/system\":142,\"../lib/three\":179}],191:[function(_dereq_,module,exports){\n_dereq_('./camera');\n_dereq_('./geometry');\n_dereq_('./gltf-model');\n_dereq_('./light');\n_dereq_('./material');\n_dereq_('./renderer');\n_dereq_('./shadow');\n_dereq_('./tracked-controls-webvr');\n_dereq_('./tracked-controls-webxr');\n_dereq_('./webxr');\n\n},{\"./camera\":188,\"./geometry\":189,\"./gltf-model\":190,\"./light\":192,\"./material\":193,\"./renderer\":194,\"./shadow\":195,\"./tracked-controls-webvr\":196,\"./tracked-controls-webxr\":197,\"./webxr\":198}],192:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar bind = _dereq_('../utils/bind');\nvar constants = _dereq_('../constants/');\n\nvar DEFAULT_LIGHT_ATTR = 'data-aframe-default-light';\n\n/**\n * Light system.\n *\n * Prescribes default lighting if not specified (one ambient, one directional).\n * Removes default lighting from the scene when a new light is added.\n *\n * @param {bool} defaultLights - Whether default lighting are defined.\n * @param {bool} userDefinedLights - Whether user lighting is defined.\n */\nmodule.exports.System = registerSystem('light', {\n schema: {\n defaultLightsEnabled: {default: true}\n },\n\n init: function () {\n this.defaultLights = false;\n this.userDefinedLights = false;\n // Wait for all entities to fully load before checking for existence of lights.\n // Since entities wait for <a-assets> to load, any lights attaching to the scene\n // will do so asynchronously.\n this.sceneEl.addEventListener('loaded', bind(this.setupDefaultLights, this));\n },\n\n /**\n * Notify scene that light has been added and to remove the default.\n *\n * @param {object} el - element holding the light component.\n */\n registerLight: function (el) {\n if (!el.hasAttribute(DEFAULT_LIGHT_ATTR)) {\n // User added a light, remove default lights through DOM.\n this.removeDefaultLights();\n this.userDefinedLights = true;\n }\n },\n\n removeDefaultLights: function () {\n var defaultLights;\n var sceneEl = this.sceneEl;\n\n if (!this.defaultLights) { return; }\n defaultLights = document.querySelectorAll('[' + DEFAULT_LIGHT_ATTR + ']');\n for (var i = 0; i < defaultLights.length; i++) {\n sceneEl.removeChild(defaultLights[i]);\n }\n this.defaultLights = false;\n },\n\n /**\n * Prescibe default lights to the scene.\n * Does so by injecting markup such that this state is not invisible.\n * These lights are removed if the user adds any lights.\n */\n setupDefaultLights: function () {\n var sceneEl = this.sceneEl;\n var ambientLight;\n var directionalLight;\n\n if (this.userDefinedLights || this.defaultLights || !this.data.defaultLightsEnabled) {\n return;\n }\n\n ambientLight = document.createElement('a-entity');\n ambientLight.setAttribute('light', {color: '#BBB', type: 'ambient'});\n ambientLight.setAttribute(DEFAULT_LIGHT_ATTR, '');\n ambientLight.setAttribute(constants.AFRAME_INJECTED, '');\n sceneEl.appendChild(ambientLight);\n\n directionalLight = document.createElement('a-entity');\n directionalLight.setAttribute('light', {color: '#FFF', intensity: 0.6, castShadow: true});\n directionalLight.setAttribute('position', {x: -0.5, y: 1, z: 1});\n directionalLight.setAttribute(DEFAULT_LIGHT_ATTR, '');\n directionalLight.setAttribute(constants.AFRAME_INJECTED, '');\n sceneEl.appendChild(directionalLight);\n\n this.defaultLights = true;\n }\n});\n\n},{\"../constants/\":123,\"../core/system\":142,\"../utils/bind\":199}],193:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\nvar isHLS = _dereq_('../utils/material').isHLS;\n\nvar bind = utils.bind;\nvar debug = utils.debug;\nvar error = debug('components:texture:error');\nvar TextureLoader = new THREE.TextureLoader();\nvar warn = debug('components:texture:warn');\n\nTextureLoader.setCrossOrigin('anonymous');\n\n/**\n * System for material component.\n * Handle material registration, updates (for fog), and texture caching.\n *\n * @member {object} materials - Registered materials.\n * @member {object} textureCounts - Number of times each texture is used. Tracked\n * separately from textureCache, because the cache (1) is populated in\n * multiple places, and (2) may be cleared at any time.\n * @member {object} textureCache - Texture cache for:\n * - Images: textureCache has mapping of src -> repeat -> cached three.js texture.\n * - Videos: textureCache has mapping of videoElement -> cached three.js texture.\n */\nmodule.exports.System = registerSystem('material', {\n init: function () {\n this.materials = {};\n this.textureCounts = {};\n this.textureCache = {};\n\n this.sceneEl.addEventListener(\n 'materialtextureloaded',\n bind(this.onMaterialTextureLoaded, this)\n );\n },\n\n clearTextureCache: function () {\n this.textureCache = {};\n },\n\n /**\n * Determine whether `src` is a image or video. Then try to load the asset, then call back.\n *\n * @param {string, or element} src - Texture URL or element.\n * @param {string} data - Relevant texture data used for caching.\n * @param {function} cb - Callback to pass texture to.\n */\n loadTexture: function (src, data, cb) {\n var self = this;\n\n // Canvas.\n if (src.tagName === 'CANVAS') {\n this.loadCanvas(src, data, cb);\n return;\n }\n\n // Video element.\n if (src.tagName === 'VIDEO') {\n if (!src.src && !src.srcObject && !src.childElementCount) {\n warn('Video element was defined with neither `source` elements nor `src` / `srcObject` attributes.');\n }\n this.loadVideo(src, data, cb);\n return;\n }\n\n utils.srcLoader.validateSrc(src, loadImageCb, loadVideoCb);\n function loadImageCb (src) { self.loadImage(src, data, cb); }\n function loadVideoCb (src) { self.loadVideo(src, data, cb); }\n },\n\n /**\n * High-level function for loading image textures (THREE.Texture).\n *\n * @param {Element|string} src - Texture source.\n * @param {object} data - Texture data.\n * @param {function} cb - Callback to pass texture to.\n */\n loadImage: function (src, data, handleImageTextureLoaded) {\n var hash = this.hash(data);\n var textureCache = this.textureCache;\n\n // Texture already being loaded or already loaded. Wait on promise.\n if (textureCache[hash]) {\n textureCache[hash].then(handleImageTextureLoaded);\n return;\n }\n\n // Texture not yet being loaded. Start loading it.\n textureCache[hash] = loadImageTexture(src, data);\n textureCache[hash].then(handleImageTextureLoaded);\n },\n\n /**\n * High-level function for loading canvas textures (THREE.Texture).\n *\n * @param {Element|string} src - Texture source.\n * @param {object} data - Texture data.\n * @param {function} cb - Callback to pass texture to.\n */\n loadCanvas: function (src, data, cb) {\n var texture;\n texture = new THREE.CanvasTexture(src);\n setTextureProperties(texture, data);\n cb(texture);\n },\n\n /**\n * Load video texture (THREE.VideoTexture).\n * Which is just an image texture that RAFs + needsUpdate.\n * Note that creating a video texture is synchronous unlike loading an image texture.\n * Made asynchronous to be consistent with image textures.\n *\n * @param {Element|string} src - Texture source.\n * @param {object} data - Texture data.\n * @param {function} cb - Callback to pass texture to.\n */\n loadVideo: function (src, data, cb) {\n var hash;\n var texture;\n var textureCache = this.textureCache;\n var videoEl;\n var videoTextureResult;\n\n function handleVideoTextureLoaded (result) {\n result.texture.needsUpdate = true;\n cb(result.texture, result.videoEl);\n }\n\n // Video element provided.\n if (typeof src !== 'string') {\n // Check cache before creating texture.\n videoEl = src;\n hash = this.hashVideo(data, videoEl);\n if (textureCache[hash]) {\n textureCache[hash].then(handleVideoTextureLoaded);\n return;\n }\n // If not in cache, fix up the attributes then start to create the texture.\n fixVideoAttributes(videoEl);\n }\n\n // Only URL provided. Use video element to create texture.\n videoEl = videoEl || createVideoEl(src, data.width, data.height);\n\n // Generated video element already cached. Use that.\n hash = this.hashVideo(data, videoEl);\n if (textureCache[hash]) {\n textureCache[hash].then(handleVideoTextureLoaded);\n return;\n }\n\n // Create new video texture.\n texture = new THREE.VideoTexture(videoEl);\n texture.minFilter = THREE.LinearFilter;\n setTextureProperties(texture, data);\n\n // If iOS and video is HLS, do some hacks.\n if (this.sceneEl.isIOS &&\n isHLS(videoEl.src || videoEl.getAttribute('src'),\n videoEl.type || videoEl.getAttribute('type'))) {\n // Actually BGRA. Tell shader to correct later.\n texture.format = THREE.RGBAFormat;\n texture.needsCorrectionBGRA = true;\n // Apparently needed for HLS. Tell shader to correct later.\n texture.flipY = false;\n texture.needsCorrectionFlipY = true;\n }\n\n // Cache as promise to be consistent with image texture caching.\n videoTextureResult = {texture: texture, videoEl: videoEl};\n textureCache[hash] = Promise.resolve(videoTextureResult);\n handleVideoTextureLoaded(videoTextureResult);\n },\n\n /**\n * Create a hash of the material properties for texture cache key.\n */\n hash: function (data) {\n if (data.src.tagName) {\n // Since `data.src` can be an element, parse out the string if necessary for the hash.\n data = utils.extendDeep({}, data);\n data.src = data.src.src;\n }\n return JSON.stringify(data);\n },\n\n hashVideo: function (data, videoEl) {\n return calculateVideoCacheHash(data, videoEl);\n },\n\n /**\n * Keep track of material in case an update trigger is needed (e.g., fog).\n *\n * @param {object} material\n */\n registerMaterial: function (material) {\n this.materials[material.uuid] = material;\n },\n\n /**\n * Stop tracking material, and dispose of any textures not being used by\n * another material component.\n *\n * @param {object} material\n */\n unregisterMaterial: function (material) {\n delete this.materials[material.uuid];\n\n // If any textures on this material are no longer in use, dispose of them.\n var textureCounts = this.textureCounts;\n Object.keys(material)\n .filter(function (propName) {\n return material[propName] && material[propName].isTexture;\n })\n .forEach(function (mapName) {\n textureCounts[material[mapName].uuid]--;\n if (textureCounts[material[mapName].uuid] <= 0) {\n material[mapName].dispose();\n }\n });\n },\n\n /**\n * Trigger update to all registered materials.\n */\n updateMaterials: function (material) {\n var materials = this.materials;\n Object.keys(materials).forEach(function (uuid) {\n materials[uuid].needsUpdate = true;\n });\n },\n\n /**\n * Track textures used by material components, so that they can be safely\n * disposed when no longer in use. Textures must be registered here, and not\n * through registerMaterial(), because textures may not be attached at the\n * time the material is registered.\n *\n * @param {Event} e\n */\n onMaterialTextureLoaded: function (e) {\n if (!this.textureCounts[e.detail.texture.uuid]) {\n this.textureCounts[e.detail.texture.uuid] = 0;\n }\n this.textureCounts[e.detail.texture.uuid]++;\n }\n});\n\n/**\n * Calculates consistent hash from a video element using its attributes.\n * If the video element has an ID, use that.\n * Else build a hash that looks like `src:myvideo.mp4;height:200;width:400;`.\n *\n * @param data {object} - Texture data such as repeat.\n * @param videoEl {Element} - Video element.\n * @returns {string}\n */\nfunction calculateVideoCacheHash (data, videoEl) {\n var i;\n var id = videoEl.getAttribute('id');\n var hash;\n var videoAttributes;\n\n if (id) { return id; }\n\n // Calculate hash using sorted video attributes.\n hash = '';\n videoAttributes = data || {};\n for (i = 0; i < videoEl.attributes.length; i++) {\n videoAttributes[videoEl.attributes[i].name] = videoEl.attributes[i].value;\n }\n Object.keys(videoAttributes).sort().forEach(function (name) {\n hash += name + ':' + videoAttributes[name] + ';';\n });\n\n return hash;\n}\n\n/**\n * Load image texture.\n *\n * @private\n * @param {string|object} src - An <img> element or url to an image file.\n * @param {object} data - Data to set texture properties like `repeat`.\n * @returns {Promise} Resolves once texture is loaded.\n */\nfunction loadImageTexture (src, data) {\n return new Promise(doLoadImageTexture);\n\n function doLoadImageTexture (resolve, reject) {\n var isEl = typeof src !== 'string';\n\n function resolveTexture (texture) {\n setTextureProperties(texture, data);\n texture.needsUpdate = true;\n resolve(texture);\n }\n\n // Create texture from an element.\n if (isEl) {\n resolveTexture(new THREE.Texture(src));\n return;\n }\n\n // Request and load texture from src string. THREE will create underlying element.\n // Use THREE.TextureLoader (src, onLoad, onProgress, onError) to load texture.\n TextureLoader.load(\n src,\n resolveTexture,\n function () { /* no-op */ },\n function (xhr) {\n error('`$s` could not be fetched (Error code: %s; Response: %s)', xhr.status,\n xhr.statusText);\n }\n );\n }\n}\n\n/**\n * Set texture properties such as repeat and offset.\n *\n * @param {object} data - With keys like `repeat`.\n */\nfunction setTextureProperties (texture, data) {\n var offset = data.offset || {x: 0, y: 0};\n var repeat = data.repeat || {x: 1, y: 1};\n var npot = data.npot || false;\n\n // To support NPOT textures, wrap must be ClampToEdge (not Repeat),\n // and filters must not use mipmaps (i.e. Nearest or Linear).\n if (npot) {\n texture.wrapS = THREE.ClampToEdgeWrapping;\n texture.wrapT = THREE.ClampToEdgeWrapping;\n texture.magFilter = THREE.LinearFilter;\n texture.minFilter = THREE.LinearFilter;\n }\n\n // Don't bother setting repeat if it is 1/1. Power-of-two is required to repeat.\n if (repeat.x !== 1 || repeat.y !== 1) {\n texture.wrapS = THREE.RepeatWrapping;\n texture.wrapT = THREE.RepeatWrapping;\n texture.repeat.set(repeat.x, repeat.y);\n }\n // Don't bother setting offset if it is 0/0.\n if (offset.x !== 0 || offset.y !== 0) {\n texture.offset.set(offset.x, offset.y);\n }\n}\n\n/**\n * Create video element to be used as a texture.\n *\n * @param {string} src - Url to a video file.\n * @param {number} width - Width of the video.\n * @param {number} height - Height of the video.\n * @returns {Element} Video element.\n */\nfunction createVideoEl (src, width, height) {\n var videoEl = document.createElement('video');\n videoEl.width = width;\n videoEl.height = height;\n // Support inline videos for iOS webviews.\n videoEl.setAttribute('playsinline', '');\n videoEl.setAttribute('webkit-playsinline', '');\n videoEl.autoplay = true;\n videoEl.loop = true;\n videoEl.crossOrigin = 'anonymous';\n videoEl.addEventListener('error', function () {\n warn('`$s` is not a valid video', src);\n }, true);\n videoEl.src = src;\n return videoEl;\n}\n\n/**\n * Fixes a video element's attributes to prevent developers from accidentally passing the\n * wrong attribute values to commonly misused video attributes.\n *\n * <video> does not treat `autoplay`, `controls`, `crossorigin`, `loop`, and `preload` as\n * as booleans. Existence of those attributes will mean truthy.\n *\n * For example, translates <video loop=\"false\"> to <video>.\n *\n * @see https://developer.mozilla.org/docs/Web/HTML/Element/video#Attributes\n * @param {Element} videoEl - Video element.\n * @returns {Element} Video element with the correct properties updated.\n */\nfunction fixVideoAttributes (videoEl) {\n videoEl.autoplay = videoEl.hasAttribute('autoplay') && videoEl.getAttribute('autoplay') !== 'false';\n videoEl.controls = videoEl.hasAttribute('controls') && videoEl.getAttribute('controls') !== 'false';\n if (videoEl.getAttribute('loop') === 'false') {\n videoEl.removeAttribute('loop');\n }\n if (videoEl.getAttribute('preload') === 'false') {\n videoEl.preload = 'none';\n }\n videoEl.crossOrigin = videoEl.crossOrigin || 'anonymous';\n // To support inline videos in iOS webviews.\n videoEl.setAttribute('playsinline', '');\n videoEl.setAttribute('webkit-playsinline', '');\n return videoEl;\n}\n\n},{\"../core/system\":142,\"../lib/three\":179,\"../utils/\":205,\"../utils/material\":209}],194:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar utils = _dereq_('../utils/');\nvar THREE = _dereq_('../lib/three');\n\nvar debug = utils.debug;\nvar warn = debug('components:renderer:warn');\n\n/**\n * Determines state of various renderer properties.\n */\nmodule.exports.System = registerSystem('renderer', {\n schema: {\n antialias: {default: 'auto', oneOf: ['true', 'false', 'auto']},\n highRefreshRate: {default: utils.device.isOculusBrowser()},\n logarithmicDepthBuffer: {default: 'auto', oneOf: ['true', 'false', 'auto']},\n maxCanvasWidth: {default: 1920},\n maxCanvasHeight: {default: 1920},\n physicallyCorrectLights: {default: false},\n precision: {default: 'high', oneOf: ['high', 'medium', 'low']},\n sortObjects: {default: false},\n colorManagement: {default: false},\n gammaOutput: {default: false},\n alpha: {default: true},\n foveationLevel: {default: 0}\n },\n\n init: function () {\n var data = this.data;\n var sceneEl = this.el;\n // This is the rendering engine, such as THREE.js so copy over any persistent properties from the rendering system.\n var renderer = sceneEl.renderer;\n renderer.sortObjects = data.sortObjects;\n renderer.physicallyCorrectLights = data.physicallyCorrectLights;\n\n if (data.colorManagement || data.gammaOutput) {\n renderer.outputEncoding = THREE.sRGBEncoding;\n if (data.gammaOutput) {\n warn('Property `gammaOutput` is deprecated. Use `renderer=\"colorManagement: true;\"` instead.');\n }\n }\n\n if (sceneEl.hasAttribute('antialias')) {\n warn('Component `antialias` is deprecated. Use `renderer=\"antialias: true\"` instead.');\n }\n\n if (sceneEl.hasAttribute('logarithmicDepthBuffer')) {\n warn('Component `logarithmicDepthBuffer` is deprecated. Use `renderer=\"logarithmicDepthBuffer: true\"` instead.');\n }\n },\n\n applyColorCorrection: function (colorOrTexture) {\n if (!this.data.colorManagement || !colorOrTexture) {\n return;\n } else if (colorOrTexture.isColor) {\n colorOrTexture.convertSRGBToLinear();\n } else if (colorOrTexture.isTexture) {\n colorOrTexture.encoding = THREE.sRGBEncoding;\n }\n }\n});\n\n},{\"../core/system\":142,\"../lib/three\":179,\"../utils/\":205}],195:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar THREE = _dereq_('../lib/three');\n\nvar SHADOW_MAP_TYPE_MAP = {\n basic: THREE.BasicShadowMap,\n pcf: THREE.PCFShadowMap,\n pcfsoft: THREE.PCFSoftShadowMap\n};\n\n/**\n * Shadow system.\n *\n * Enabled automatically when one or more shadow components are added to the scene, the system sets\n * options on the WebGLRenderer for configuring shadow appearance.\n */\nmodule.exports.System = registerSystem('shadow', {\n schema: {\n enabled: {default: true},\n autoUpdate: {default: true},\n type: {default: 'pcf', oneOf: ['basic', 'pcf', 'pcfsoft']}\n },\n\n init: function () {\n var sceneEl = this.sceneEl;\n var data = this.data;\n\n this.shadowMapEnabled = false;\n\n if (!sceneEl.renderer) { return; } // For tests.\n\n sceneEl.renderer.shadowMap.type = SHADOW_MAP_TYPE_MAP[data.type];\n sceneEl.renderer.shadowMap.autoUpdate = data.autoUpdate;\n this.setShadowMapEnabled(this.shadowMapEnabled);\n },\n\n update: function (prevData) {\n if (prevData.enabled !== this.data.enabled) {\n this.setShadowMapEnabled(this.data.enabled);\n }\n },\n\n /**\n * Enables/disables the renderer shadow map.\n * @param {boolean} enabled\n */\n setShadowMapEnabled: function (enabled) {\n var renderer = this.sceneEl.renderer;\n this.shadowMapEnabled = this.data.enabled && enabled;\n if (renderer) {\n renderer.shadowMap.enabled = this.shadowMapEnabled;\n }\n }\n});\n\n},{\"../core/system\":142,\"../lib/three\":179}],196:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar utils = _dereq_('../utils');\nvar isWebXRAvailable = utils.device.isWebXRAvailable;\n\n/**\n * Tracked controls system.\n * Maintain list with available tracked controllers.\n */\nmodule.exports.System = registerSystem('tracked-controls-webvr', {\n init: function () {\n var self = this;\n\n this.controllers = [];\n this.isChrome = navigator.userAgent.indexOf('Chrome') !== -1;\n\n this.updateControllerList();\n this.throttledUpdateControllerList = utils.throttle(this.updateControllerList, 500, this);\n\n // Don't use WebVR if WebXR is available?\n if (isWebXRAvailable) { return; }\n\n if (!navigator.getVRDisplays) { return; }\n\n this.sceneEl.addEventListener('enter-vr', function () {\n navigator.getVRDisplays().then(function (displays) {\n if (displays.length) { self.vrDisplay = displays[0]; }\n });\n });\n },\n\n tick: function () {\n if (this.isChrome) {\n // Retrieve new controller handlers with updated state (pose, buttons...)\n this.updateControllerList();\n } else {\n this.throttledUpdateControllerList();\n }\n },\n\n /**\n * Update controller list.\n */\n updateControllerList: function () {\n var controllers = this.controllers;\n var gamepad;\n var gamepads;\n var i;\n var prevCount;\n\n gamepads = navigator.getGamepads && navigator.getGamepads();\n if (!gamepads) { return; }\n\n prevCount = controllers.length;\n controllers.length = 0;\n for (i = 0; i < gamepads.length; ++i) {\n gamepad = gamepads[i];\n if (gamepad && gamepad.pose) {\n controllers.push(gamepad);\n }\n }\n\n if (controllers.length !== prevCount) {\n this.el.emit('controllersupdated', undefined, false);\n }\n }\n});\n\n},{\"../core/system\":142,\"../utils\":205}],197:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar utils = _dereq_('../utils');\n\n/**\n * Tracked controls system.\n * Maintain list with available tracked controllers.\n */\nmodule.exports.System = registerSystem('tracked-controls-webxr', {\n init: function () {\n this.controllers = [];\n this.oldControllers = [];\n this.oldControllersLength = 0;\n this.throttledUpdateControllerList = utils.throttle(this.updateControllerList, 500, this);\n this.updateReferenceSpace = this.updateReferenceSpace.bind(this);\n this.el.addEventListener('enter-vr', this.updateReferenceSpace);\n this.el.addEventListener('exit-vr', this.updateReferenceSpace);\n },\n\n tick: function () {\n this.throttledUpdateControllerList();\n },\n\n updateReferenceSpace: function () {\n var self = this;\n var xrSession = this.el.xrSession;\n\n if (!xrSession) {\n this.referenceSpace = undefined;\n this.controllers = [];\n if (this.oldControllersLength > 0) {\n this.oldControllersLength = 0;\n this.el.emit('controllersupdated', undefined, false);\n }\n return;\n }\n var refspace = self.el.sceneEl.systems.webxr.sessionReferenceSpaceType;\n xrSession.requestReferenceSpace(refspace).then(function (referenceSpace) {\n self.referenceSpace = referenceSpace;\n }).catch(function (err) {\n self.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(\n refspace,\n 'tracked-controls-webxr uses reference space \"' + refspace + '\".');\n throw err;\n });\n },\n\n updateControllerList: function () {\n var xrSession = this.el.xrSession;\n var oldControllers = this.oldControllers;\n var i;\n if (!xrSession) {\n if (this.oldControllersLength === 0) { return; }\n // Broadcast that we now have zero controllers connected if there is\n // no session\n this.oldControllersLength = 0;\n this.controllers = [];\n this.el.emit('controllersupdated', undefined, false);\n return;\n }\n\n if (!xrSession.inputSources) { return; }\n this.controllers = xrSession.inputSources;\n if (this.oldControllersLength === this.controllers.length) {\n var equal = true;\n for (i = 0; i < this.controllers.length; ++i) {\n if (this.controllers[i] === oldControllers[i] &&\n this.controllers[i].gamepad === oldControllers[i].gamepad) { continue; }\n equal = false;\n break;\n }\n if (equal) { return; }\n }\n\n // Store reference to current controllers\n oldControllers.length = 0;\n for (i = 0; i < this.controllers.length; i++) {\n oldControllers.push(this.controllers[i]);\n }\n\n this.oldControllersLength = this.controllers.length;\n this.el.emit('controllersupdated', undefined, false);\n }\n});\n\n},{\"../core/system\":142,\"../utils\":205}],198:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\n\nvar utils = _dereq_('../utils/');\nvar warn = utils.debug('systems:webxr:warn');\n\n/**\n * WebXR session initialization and XR module support.\n */\nmodule.exports.System = registerSystem('webxr', {\n schema: {\n referenceSpaceType: {type: 'string', default: 'local-floor'},\n requiredFeatures: {type: 'array', default: ['local-floor']},\n optionalFeatures: {type: 'array', default: ['bounded-floor']},\n overlayElement: {type: 'selector'}\n },\n\n update: function () {\n var data = this.data;\n this.sessionConfiguration = {\n requiredFeatures: data.requiredFeatures,\n optionalFeatures: data.optionalFeatures\n };\n this.sessionReferenceSpaceType = data.referenceSpaceType;\n\n if (data.overlayElement) {\n this.warnIfFeatureNotRequested('dom-overlay');\n this.sessionConfiguration.domOverlay = {root: data.overlayElement};\n }\n },\n\n wasFeatureRequested: function (feature) {\n // Features available by default for immersive sessions don't need to\n // be requested explicitly.\n if (feature === 'viewer' || feature === 'local') return true;\n\n if (this.sessionConfiguration.requiredFeatures.includes(feature) ||\n this.sessionConfiguration.optionalFeatures.includes(feature)) {\n return true;\n }\n\n return false;\n },\n\n warnIfFeatureNotRequested: function (feature, optIntro) {\n if (!this.wasFeatureRequested(feature)) {\n var msg = 'Please add the feature \"' + feature + '\" to a-scene\\'s ' +\n 'webxr system options in requiredFeatures/optionalFeatures.';\n warn((optIntro ? optIntro + ' ' : '') + msg);\n }\n }\n});\n\n},{\"../core/system\":142,\"../utils/\":205}],199:[function(_dereq_,module,exports){\n/**\n * Faster version of Function.prototype.bind\n * @param {Function} fn - Function to wrap.\n * @param {Object} ctx - What to bind as context.\n * @param {...*} arguments - Arguments to pass through.\n */\nmodule.exports = function bind (fn, ctx/* , arg1, arg2 */) {\n return (function (prependedArgs) {\n return function bound () {\n // Concat the bound function arguments with those passed to original bind\n var args = prependedArgs.concat(Array.prototype.slice.call(arguments, 0));\n return fn.apply(ctx, args);\n };\n })(Array.prototype.slice.call(arguments, 2));\n};\n\n},{}],200:[function(_dereq_,module,exports){\n/* global THREE */\nvar debug = _dereq_('./debug');\nvar extend = _dereq_('object-assign');\n\nvar warn = debug('utils:coordinates:warn');\n\n// Order of coordinates parsed by coordinates.parse.\nvar COORDINATE_KEYS = ['x', 'y', 'z', 'w'];\n\n// Coordinate string regex. Handles negative, positive, and decimals.\nvar regex = /^\\s*((-?\\d*\\.{0,1}\\d+(e-?\\d+)?)\\s+){2,3}(-?\\d*\\.{0,1}\\d+(e-?\\d+)?)\\s*$/;\nmodule.exports.regex = regex;\n\nvar OBJECT = 'object';\nvar whitespaceRegex = /\\s+/g;\n\n/**\n * Parses coordinates from an \"x y z\" string.\n * Example: \"3 10 -5\" to {x: 3, y: 10, z: -5}.\n *\n * @param {string} val - An \"x y z\" string.\n * @param {string} defaults - fallback value.\n * @returns {object} An object with keys [x, y, z].\n */\nfunction parse (value, defaultVec) {\n var coordinate;\n var defaultVal;\n var key;\n var i;\n var vec;\n var x;\n var y;\n var z;\n var w;\n\n if (value && value instanceof Object) {\n x = value.x === undefined ? defaultVec && defaultVec.x : value.x;\n y = value.y === undefined ? defaultVec && defaultVec.y : value.y;\n z = value.z === undefined ? defaultVec && defaultVec.z : value.z;\n w = value.w === undefined ? defaultVec && defaultVec.w : value.w;\n if (x !== undefined && x !== null) { value.x = parseIfString(x); }\n if (y !== undefined && y !== null) { value.y = parseIfString(y); }\n if (z !== undefined && z !== null) { value.z = parseIfString(z); }\n if (w !== undefined && w !== null) { value.w = parseIfString(w); }\n return value;\n }\n\n if (value === null || value === undefined) {\n return typeof defaultVec === OBJECT ? extend({}, defaultVec) : defaultVec;\n }\n\n coordinate = value.trim().split(whitespaceRegex);\n vec = {};\n for (i = 0; i < COORDINATE_KEYS.length; i++) {\n key = COORDINATE_KEYS[i];\n if (coordinate[i]) {\n vec[key] = parseFloat(coordinate[i], 10);\n } else {\n defaultVal = defaultVec && defaultVec[key];\n if (defaultVal === undefined) { continue; }\n vec[key] = parseIfString(defaultVal);\n }\n }\n return vec;\n}\nmodule.exports.parse = parse;\n\n/**\n * Stringify coordinates from an object with keys [x y z].\n * Example: {x: 3, y: 10, z: -5} to \"3 10 -5\".\n *\n * @param {object|string} data - An object with keys [x y z].\n * @returns {string} An \"x y z\" string.\n */\nfunction stringify (data) {\n var str;\n if (typeof data !== OBJECT) { return data; }\n str = data.x + ' ' + data.y;\n if (data.z != null) { str += ' ' + data.z; }\n if (data.w != null) { str += ' ' + data.w; }\n return str;\n}\nmodule.exports.stringify = stringify;\n\n/**\n * @returns {bool}\n */\nfunction isCoordinates (value) {\n return regex.test(value);\n}\nmodule.exports.isCoordinates = isCoordinates;\n\nmodule.exports.isCoordinate = function (value) {\n warn('`AFRAME.utils.isCoordinate` has been renamed to `AFRAME.utils.isCoordinates`');\n return isCoordinates(value);\n};\n\nfunction parseIfString (val) {\n if (val !== null && val !== undefined && val.constructor === String) {\n return parseFloat(val, 10);\n }\n return val;\n}\n\n/**\n * Convert {x, y, z} object to three.js Vector3.\n */\nmodule.exports.toVector3 = function (vec3) {\n return new THREE.Vector3(vec3.x, vec3.y, vec3.z);\n};\n\n},{\"./debug\":201,\"object-assign\":39}],201:[function(_dereq_,module,exports){\n(function (process){\nvar debugLib = _dereq_('debug');\nvar extend = _dereq_('object-assign');\n\nvar settings = {\n colors: {\n debug: 'gray',\n error: 'red',\n info: 'gray',\n warn: 'orange'\n }\n};\n\n/**\n * Monkeypatches `debug` so we can colorize error/warning messages.\n *\n * (See issue: https://github.com/visionmedia/debug/issues/137)\n */\nvar debug = function (namespace) {\n var d = debugLib(namespace);\n\n d.color = getDebugNamespaceColor(namespace);\n\n return d;\n};\nextend(debug, debugLib);\n\n/**\n * Returns the type of the namespace (e.g., `error`, `warn`).\n *\n * @param {String} namespace\n * The debug logger's namespace (e.g., `components:geometry:warn`).\n * @returns {String} The type of the namespace (e.g., `warn`).\n * @api private\n */\nfunction getDebugNamespaceType (namespace) {\n var chunks = namespace.split(':');\n\n return chunks[chunks.length - 1]; // Return the last one\n}\n\n/**\n * Returns the color of the namespace (e.g., `orange`).\n *\n * @param {String} namespace\n * The debug logger's namespace (e.g., `components:geometry:warn`).\n * @returns {String} The color of the namespace (e.g., `orange`).\n * @api private\n */\nfunction getDebugNamespaceColor (namespace) {\n var type = getDebugNamespaceType(namespace);\n\n var color = settings.colors && settings.colors[type];\n\n return color || null;\n}\n\n/**\n * Returns `localStorage` if possible.\n *\n * This is necessary because Safari throws when a user disables\n * cookies or `localStorage` and you attempt to access it.\n *\n * @returns {localStorage}\n * @api private\n */\nfunction storage () {\n try {\n return window.localStorage;\n } catch (e) {\n }\n}\n\n/**\n * To enable console logging, type this in the Console of your Dev Tools:\n *\n * localStorage.logs = 1\n *\n * To disable console logging:\n *\n * localStorage.logs = 0\n *\n */\nvar ls = storage();\nif (ls && (parseInt(ls.logs, 10) || ls.logs === 'true')) {\n debug.enable('*');\n} else {\n debug.enable('*:error,*:info,*:warn');\n}\n\nif (process.browser) { window.logs = debug; }\n\nmodule.exports = debug;\n\n}).call(this,_dereq_('_process'))\n\n},{\"_process\":49,\"debug\":8,\"object-assign\":39}],202:[function(_dereq_,module,exports){\n(function (process){\nvar error = _dereq_('debug')('device:error');\n\nvar vrDisplay;\nvar supportsVRSession = false;\nvar supportsARSession = false;\n\n/**\n * Oculus Browser 7 doesn't support the WebXR gamepads module.\n * We fallback to WebVR API and will hotfix when implementation is complete.\n */\nvar isWebXRAvailable = module.exports.isWebXRAvailable = !window.debug && navigator.xr !== undefined;\n\n// Catch vrdisplayactivate early to ensure we can enter VR mode after the scene loads.\nwindow.addEventListener('vrdisplayactivate', function (evt) {\n var canvasEl;\n // WebXR takes priority if available.\n if (isWebXRAvailable) { return; }\n canvasEl = document.createElement('canvas');\n vrDisplay = evt.display;\n // We need to make sure the canvas has a WebGL context associated with it.\n // Otherwise, the requestPresent could be denied.\n canvasEl.getContext('webgl', {});\n // Request present immediately. a-scene will be allowed to enter VR without user gesture.\n vrDisplay.requestPresent([{source: canvasEl}]).then(function () {}, function () {});\n});\n\n// Support both WebVR and WebXR APIs.\nif (isWebXRAvailable) {\n var updateEnterInterfaces = function () {\n var sceneEl = document.querySelector('a-scene');\n if (!sceneEl) {\n window.addEventListener('DOMContentLoaded', updateEnterInterfaces);\n return;\n }\n if (sceneEl.hasLoaded) {\n sceneEl.components['vr-mode-ui'].updateEnterInterfaces();\n } else {\n sceneEl.addEventListener('loaded', updateEnterInterfaces);\n }\n };\n var errorHandler = function (err) {\n error('WebXR session support error: ' + err.message);\n };\n if (navigator.xr.isSessionSupported) {\n // Current WebXR spec uses a boolean-returning isSessionSupported promise\n navigator.xr.isSessionSupported('immersive-vr').then(function (supported) {\n supportsVRSession = supported;\n updateEnterInterfaces();\n }).catch(errorHandler);\n\n navigator.xr.isSessionSupported('immersive-ar').then(function (supported) {\n supportsARSession = supported;\n updateEnterInterfaces();\n }).catch(function () {});\n } else if (navigator.xr.supportsSession) {\n // Fallback for implementations that haven't updated to the new spec yet,\n // the old version used supportsSession which is rejected for missing\n // support.\n navigator.xr.supportsSession('immersive-vr').then(function () {\n supportsVRSession = true;\n updateEnterInterfaces();\n }).catch(errorHandler);\n navigator.xr.supportsSession('immersive-ar').then(function () {\n supportsARSession = true;\n updateEnterInterfaces();\n }).catch(function () {});\n } else {\n error('WebXR has neither isSessionSupported or supportsSession?!');\n }\n} else {\n if (navigator.getVRDisplays) {\n navigator.getVRDisplays().then(function (displays) {\n var sceneEl = document.querySelector('a-scene');\n vrDisplay = displays.length && displays[0];\n if (sceneEl) { sceneEl.emit('displayconnected', {vrDisplay: vrDisplay}); }\n });\n }\n}\n\nfunction getVRDisplay () { return vrDisplay; }\nmodule.exports.getVRDisplay = getVRDisplay;\n\n/**\n * Determine if a headset is connected by checking if a vrDisplay is available.\n */\nfunction checkHeadsetConnected () {\n return supportsVRSession || supportsARSession || !!getVRDisplay();\n}\nmodule.exports.checkHeadsetConnected = checkHeadsetConnected;\n\nfunction checkARSupport () { return supportsARSession; }\nmodule.exports.checkARSupport = checkARSupport;\n\n/**\n * Checks if browser is mobile and not stand-alone dedicated vr device.\n * @return {Boolean} True if mobile browser detected.\n */\nvar isMobile = (function () {\n var _isMobile = false;\n (function (a) {\n // eslint-disable-next-line no-useless-escape\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) {\n _isMobile = true;\n }\n if (isIOS() || isTablet() || isR7()) {\n _isMobile = true;\n }\n if (isMobileVR()) {\n _isMobile = false;\n }\n })(window.navigator.userAgent || window.navigator.vendor || window.opera);\n\n return function () { return _isMobile; };\n})();\nmodule.exports.isMobile = isMobile;\n\n/**\n * Detect tablet devices.\n * @param {string} mockUserAgent - Allow passing a mock user agent for testing.\n */\nfunction isTablet (mockUserAgent) {\n var userAgent = mockUserAgent || window.navigator.userAgent;\n return /ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle/i.test(userAgent);\n}\nmodule.exports.isTablet = isTablet;\n\nfunction isIOS () {\n return /iPad|iPhone|iPod/.test(window.navigator.platform);\n}\nmodule.exports.isIOS = isIOS;\n\nfunction isMobileDeviceRequestingDesktopSite () {\n return !isMobile() && !isMobileVR() && window.orientation !== undefined;\n}\nmodule.exports.isMobileDeviceRequestingDesktopSite = isMobileDeviceRequestingDesktopSite;\n\n/**\n * Detect Oculus Browser (standalone headset)\n */\nfunction isOculusBrowser () {\n return /(OculusBrowser)/i.test(window.navigator.userAgent);\n}\nmodule.exports.isOculusBrowser = isOculusBrowser;\n\n/**\n * Detect Firefox Reality (standalone headset)\n */\nfunction isFirefoxReality () {\n return /(Mobile VR)/i.test(window.navigator.userAgent);\n}\nmodule.exports.isFirefoxReality = isFirefoxReality;\n\n/**\n * Detect browsers in Stand-Alone headsets\n */\nfunction isMobileVR () {\n return isOculusBrowser() || isFirefoxReality();\n}\nmodule.exports.isMobileVR = isMobileVR;\n\nfunction isR7 () {\n return /R7 Build/.test(window.navigator.userAgent);\n}\nmodule.exports.isR7 = isR7;\n\n/**\n * Checks mobile device orientation.\n * @return {Boolean} True if landscape orientation.\n */\nmodule.exports.isLandscape = function () {\n var orientation = window.orientation;\n if (isR7()) { orientation += 90; }\n return orientation === 90 || orientation === -90;\n};\n\n/**\n * Check if running in a browser or spoofed browser (bundler).\n * We need to check a node api that isn't mocked on either side.\n * `require` and `module.exports` are mocked in browser by bundlers.\n * `window` is mocked in node.\n * `process` is also mocked by browserify, but has custom properties.\n */\nmodule.exports.isBrowserEnvironment = !!(!process || process.browser);\n\n/**\n * Check if running in node on the server.\n */\nmodule.exports.isNodeEnvironment = !module.exports.isBrowserEnvironment;\n\n}).call(this,_dereq_('_process'))\n\n},{\"_process\":49,\"debug\":8}],203:[function(_dereq_,module,exports){\n/**\n * Split a delimited component property string (e.g., `material.color`) to an object\n * containing `component` name and `property` name. If there is no delimiter, just return the\n * string back.\n *\n * Cache arrays from splitting strings via delimiter to save on memory.\n *\n * @param {string} str - e.g., `material.opacity`.\n * @param {string} delimiter - e.g., `.`.\n * @returns {array} e.g., `['material', 'opacity']`.\n */\nvar propertyPathCache = {};\nfunction getComponentPropertyPath (str, delimiter) {\n delimiter = delimiter || '.';\n if (!propertyPathCache[delimiter]) { propertyPathCache[delimiter] = {}; }\n if (str.indexOf(delimiter) !== -1) {\n propertyPathCache[delimiter][str] = str.split(delimiter);\n } else {\n propertyPathCache[delimiter][str] = str;\n }\n return propertyPathCache[delimiter][str];\n}\nmodule.exports.getComponentPropertyPath = getComponentPropertyPath;\nmodule.exports.propertyPathCache = propertyPathCache;\n\n/**\n * Get component property using encoded component name + component property name with a\n * delimiter.\n */\nmodule.exports.getComponentProperty = function (el, name, delimiter) {\n var splitName;\n delimiter = delimiter || '.';\n if (name.indexOf(delimiter) !== -1) {\n splitName = getComponentPropertyPath(name, delimiter);\n if (splitName.constructor === String) {\n return el.getAttribute(splitName);\n }\n return el.getAttribute(splitName[0])[splitName[1]];\n }\n return el.getAttribute(name);\n};\n\n/**\n * Set component property using encoded component name + component property name with a\n * delimiter.\n */\nmodule.exports.setComponentProperty = function (el, name, value, delimiter) {\n var splitName;\n delimiter = delimiter || '.';\n if (name.indexOf(delimiter) !== -1) {\n splitName = getComponentPropertyPath(name, delimiter);\n if (splitName.constructor === String) {\n el.setAttribute(splitName, value);\n } else {\n el.setAttribute(splitName[0], splitName[1], value);\n }\n return;\n }\n el.setAttribute(name, value);\n};\n\n},{}],204:[function(_dereq_,module,exports){\nmodule.exports = function forceCanvasResizeSafariMobile (canvasEl) {\n var width = canvasEl.style.width;\n var height = canvasEl.style.height;\n // Taken from webvr-polyfill (https://github.com/borismus/webvr-polyfill/blob/85f657cd502ec9417bf26b87c3cb2afa6a70e079/src/util.js#L200)\n // iOS only workaround for https://bugs.webkit.org/show_bug.cgi?id=152556\n // By changing the size 1 pixel and restoring the previous value\n // we trigger a size recalculation cycle.\n canvasEl.style.width = (parseInt(width, 10) + 1) + 'px';\n canvasEl.style.height = (parseInt(height, 10) + 1) + 'px';\n setTimeout(function () {\n canvasEl.style.width = width;\n canvasEl.style.height = height;\n }, 200);\n};\n\n},{}],205:[function(_dereq_,module,exports){\n/* global location */\n\n/* Centralized place to reference utilities since utils is exposed to the user. */\nvar debug = _dereq_('./debug');\nvar deepAssign = _dereq_('deep-assign');\nvar device = _dereq_('./device');\nvar objectAssign = _dereq_('object-assign');\nvar objectPool = _dereq_('./object-pool');\n\nvar warn = debug('utils:warn');\n\nmodule.exports.bind = _dereq_('./bind');\nmodule.exports.coordinates = _dereq_('./coordinates');\nmodule.exports.debug = debug;\nmodule.exports.device = device;\nmodule.exports.entity = _dereq_('./entity');\nmodule.exports.forceCanvasResizeSafariMobile = _dereq_('./forceCanvasResizeSafariMobile');\nmodule.exports.isIE11 = _dereq_('./is-ie11');\nmodule.exports.material = _dereq_('./material');\nmodule.exports.objectPool = objectPool;\nmodule.exports.split = _dereq_('./split').split;\nmodule.exports.styleParser = _dereq_('./styleParser');\nmodule.exports.trackedControls = _dereq_('./tracked-controls');\n\nmodule.exports.checkHeadsetConnected = function () {\n warn('`utils.checkHeadsetConnected` has moved to `utils.device.checkHeadsetConnected`');\n return device.checkHeadsetConnected(arguments);\n};\nmodule.exports.isGearVR = module.exports.device.isGearVR = function () {\n warn('`utils.isGearVR` has been deprecated, use `utils.device.isMobileVR`');\n};\nmodule.exports.isIOS = function () {\n warn('`utils.isIOS` has moved to `utils.device.isIOS`');\n return device.isIOS(arguments);\n};\nmodule.exports.isOculusGo = module.exports.device.isOculusGo = function () {\n warn('`utils.isOculusGo` has been deprecated, use `utils.device.isMobileVR`');\n};\nmodule.exports.isMobile = function () {\n warn('`utils.isMobile has moved to `utils.device.isMobile`');\n return device.isMobile(arguments);\n};\n\n/**\n * Returns throttle function that gets called at most once every interval.\n *\n * @param {function} functionToThrottle\n * @param {number} minimumInterval - Minimal interval between calls (milliseconds).\n * @param {object} optionalContext - If given, bind function to throttle to this context.\n * @returns {function} Throttled function.\n */\nmodule.exports.throttle = function (functionToThrottle, minimumInterval, optionalContext) {\n var lastTime;\n if (optionalContext) {\n functionToThrottle = module.exports.bind(functionToThrottle, optionalContext);\n }\n return function () {\n var time = Date.now();\n var sinceLastTime = typeof lastTime === 'undefined' ? minimumInterval : time - lastTime;\n if (typeof lastTime === 'undefined' || (sinceLastTime >= minimumInterval)) {\n lastTime = time;\n functionToThrottle.apply(null, arguments);\n }\n };\n};\n\n/**\n * Returns throttle function that gets called at most once every interval.\n * Uses the time/timeDelta timestamps provided by the global render loop for better perf.\n *\n * @param {function} functionToThrottle\n * @param {number} minimumInterval - Minimal interval between calls (milliseconds).\n * @param {object} optionalContext - If given, bind function to throttle to this context.\n * @returns {function} Throttled function.\n */\nmodule.exports.throttleTick = function (functionToThrottle, minimumInterval, optionalContext) {\n var lastTime;\n if (optionalContext) {\n functionToThrottle = module.exports.bind(functionToThrottle, optionalContext);\n }\n return function (time, delta) {\n var sinceLastTime = typeof lastTime === 'undefined' ? delta : time - lastTime;\n if (typeof lastTime === 'undefined' || (sinceLastTime >= minimumInterval)) {\n lastTime = time;\n functionToThrottle(time, sinceLastTime);\n }\n };\n};\n\n/**\n * Returns debounce function that gets called only once after a set of repeated calls.\n *\n * @param {function} functionToDebounce\n * @param {number} wait - Time to wait for repeated function calls (milliseconds).\n * @param {boolean} immediate - Calls the function immediately regardless of if it should be waiting.\n * @returns {function} Debounced function.\n */\nmodule.exports.debounce = function (func, wait, immediate) {\n var timeout;\n return function () {\n var context = this;\n var args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n};\n\n/**\n * Mix the properties of source object(s) into a destination object.\n *\n * @param {object} dest - The object to which properties will be copied.\n * @param {...object} source - The object(s) from which properties will be copied.\n */\nmodule.exports.extend = objectAssign;\nmodule.exports.extendDeep = deepAssign;\n\nmodule.exports.clone = function (obj) {\n return JSON.parse(JSON.stringify(obj));\n};\n\n/**\n * Checks if two values are equal.\n * Includes objects and arrays and nested objects and arrays.\n * Try to keep this function performant as it will be called often to see if a component\n * should be updated.\n *\n * @param {object} a - First object.\n * @param {object} b - Second object.\n * @returns {boolean} Whether two objects are deeply equal.\n */\nvar deepEqual = (function () {\n var arrayPool = objectPool.createPool(function () { return []; });\n\n return function (a, b) {\n var key;\n var keysA;\n var keysB;\n var i;\n var valA;\n var valB;\n\n // If not objects or arrays, compare as values.\n if (a === undefined || b === undefined || a === null || b === null ||\n !(a && b && (a.constructor === Object && b.constructor === Object) ||\n (a.constructor === Array && b.constructor === Array))) {\n return a === b;\n }\n\n // Different number of keys, not equal.\n keysA = arrayPool.use();\n keysB = arrayPool.use();\n keysA.length = 0;\n keysB.length = 0;\n for (key in a) { keysA.push(key); }\n for (key in b) { keysB.push(key); }\n if (keysA.length !== keysB.length) {\n arrayPool.recycle(keysA);\n arrayPool.recycle(keysB);\n return false;\n }\n\n // Return `false` at the first sign of inequality.\n for (i = 0; i < keysA.length; ++i) {\n valA = a[keysA[i]];\n valB = b[keysA[i]];\n // Check nested array and object.\n if ((typeof valA === 'object' || typeof valB === 'object') ||\n (Array.isArray(valA) && Array.isArray(valB))) {\n if (valA === valB) { continue; }\n if (!deepEqual(valA, valB)) {\n arrayPool.recycle(keysA);\n arrayPool.recycle(keysB);\n return false;\n }\n } else if (valA !== valB) {\n arrayPool.recycle(keysA);\n arrayPool.recycle(keysB);\n return false;\n }\n }\n\n arrayPool.recycle(keysA);\n arrayPool.recycle(keysB);\n return true;\n };\n})();\nmodule.exports.deepEqual = deepEqual;\n\n/**\n * Computes the difference between two objects.\n *\n * @param {object} a - First object to compare (e.g., oldData).\n * @param {object} b - Second object to compare (e.g., newData).\n * @returns {object}\n * Difference object where set of keys note which values were not equal, and values are\n * `b`'s values.\n */\nmodule.exports.diff = (function () {\n var keys = [];\n\n return function (a, b, targetObject) {\n var aVal;\n var bVal;\n var bKey;\n var diff;\n var key;\n var i;\n var isComparingObjects;\n\n diff = targetObject || {};\n\n // Collect A keys.\n keys.length = 0;\n for (key in a) { keys.push(key); }\n\n if (!b) { return diff; }\n\n // Collect B keys.\n for (bKey in b) {\n if (keys.indexOf(bKey) === -1) {\n keys.push(bKey);\n }\n }\n\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n aVal = a[key];\n bVal = b[key];\n isComparingObjects = aVal && bVal &&\n aVal.constructor === Object && bVal.constructor === Object;\n if ((isComparingObjects && !deepEqual(aVal, bVal)) ||\n (!isComparingObjects && aVal !== bVal)) {\n diff[key] = bVal;\n }\n }\n return diff;\n };\n})();\n\n/**\n * Returns whether we should capture this keyboard event for keyboard shortcuts.\n * @param {Event} event Event object.\n * @returns {Boolean} Whether the key event should be captured.\n */\nmodule.exports.shouldCaptureKeyEvent = function (event) {\n if (event.metaKey) { return false; }\n return document.activeElement === document.body;\n};\n\n/**\n * Splits a string into an array based on a delimiter.\n *\n * @param {string=} [str=''] Source string\n * @param {string=} [delimiter=' '] Delimiter to use\n * @returns {array} Array of delimited strings\n */\nmodule.exports.splitString = function (str, delimiter) {\n if (typeof delimiter === 'undefined') { delimiter = ' '; }\n // First collapse the whitespace (or whatever the delimiter is).\n var regex = new RegExp(delimiter, 'g');\n str = (str || '').replace(regex, delimiter);\n // Then split.\n return str.split(delimiter);\n};\n\n/**\n * Extracts data from the element given an object that contains expected keys.\n *\n * @param {Element} Source element.\n * @param {Object} [defaults={}] Object of default key-value pairs.\n * @returns {Object}\n */\nmodule.exports.getElData = function (el, defaults) {\n defaults = defaults || {};\n var data = {};\n Object.keys(defaults).forEach(copyAttribute);\n function copyAttribute (key) {\n if (el.hasAttribute(key)) {\n data[key] = el.getAttribute(key);\n }\n }\n return data;\n};\n\n/**\n * Retrieves querystring value.\n * @param {String} name Name of querystring key.\n * @return {String} Value\n */\nmodule.exports.getUrlParameter = function (name) {\n // eslint-disable-next-line no-useless-escape\n name = name.replace(/[\\[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\n var regex = new RegExp('[\\\\?&]' + name + '=([^&#]*)');\n var results = regex.exec(location.search);\n return results === null ? '' : decodeURIComponent(results[1].replace(/\\+/g, ' '));\n};\n\n/**\n * Detects whether context is within iframe.\n */\nmodule.exports.isIframed = function () {\n return window.top !== window.self;\n};\n\n/**\n * Finds all elements under the element that have the isScene\n * property set to true\n */\nmodule.exports.findAllScenes = function (el) {\n var matchingElements = [];\n var allElements = el.getElementsByTagName('*');\n for (var i = 0, n = allElements.length; i < n; i++) {\n if (allElements[i].isScene) {\n // Element exists with isScene set.\n matchingElements.push(allElements[i]);\n }\n }\n return matchingElements;\n};\n\n// Must be at bottom to avoid circular dependency.\nmodule.exports.srcLoader = _dereq_('./src-loader');\n\n},{\"./bind\":199,\"./coordinates\":200,\"./debug\":201,\"./device\":202,\"./entity\":203,\"./forceCanvasResizeSafariMobile\":204,\"./is-ie11\":207,\"./material\":209,\"./object-pool\":210,\"./split\":211,\"./src-loader\":212,\"./styleParser\":213,\"./tracked-controls\":214,\"deep-assign\":10,\"object-assign\":39}],206:[function(_dereq_,module,exports){\n// Safari regression introduced in iOS 12 and remains in iOS 13.\n// https://stackoverflow.com/questions/62717621/white-space-at-page-bottom-after-device-rotation-in-ios-safari\nwindow.addEventListener('orientationchange', function () {\n document.documentElement.style.height = `initial`;\n setTimeout(function () {\n document.documentElement.style.height = `100%`;\n setTimeout(function () {\n // this line prevents the content\n // from hiding behind the address bar\n window.scrollTo(0, 1);\n }, 500);\n }, 500);\n});\n\n},{}],207:[function(_dereq_,module,exports){\n// https://stackoverflow.com/a/17907562\nfunction getInternetExplorerVersion () {\n var version = -1;\n var userAgent = navigator.userAgent;\n var re;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n re = new RegExp('MSIE ([0-9]{1,}[\\\\.0-9]{0,})');\n if (re.exec(userAgent) != null) { version = parseFloat(RegExp.$1); }\n } else if (navigator.appName === 'Netscape') {\n re = new RegExp('Trident/.*rv:([0-9]{1,}[\\\\.0-9]{0,})');\n if (re.exec(userAgent) != null) { version = parseFloat(RegExp.$1); }\n }\n return version;\n}\n\nmodule.exports = getInternetExplorerVersion() === 11;\n\n},{}],208:[function(_dereq_,module,exports){\n/**\n * Check if device is iOS and older than version 10.\n */\nmodule.exports = function isIOSOlderThan10 (userAgent) {\n return /(iphone|ipod|ipad).*os.(7_|8_|9_)/i.test(userAgent);\n};\n\n},{}],209:[function(_dereq_,module,exports){\nvar THREE = _dereq_('../lib/three');\n\nvar HLS_MIMETYPES = ['application/x-mpegurl', 'application/vnd.apple.mpegurl'];\n\nvar COLOR_MAPS = new Set([\n 'emissiveMap',\n 'envMap',\n 'map',\n 'specularMap'\n]);\n\n/**\n * Update `material` texture property (usually but not always `map`)\n * from `data` property (usually but not always `src`)\n *\n * @param {object} shader - A-Frame shader instance.\n * @param {object} data\n */\nmodule.exports.updateMapMaterialFromData = function (materialName, dataName, shader, data) {\n var el = shader.el;\n var material = shader.material;\n var rendererSystem = el.sceneEl.systems.renderer;\n var src = data[dataName];\n\n // Because a single material / shader may have multiple textures,\n // we need to remember the source value for this data property\n // to avoid redundant operations which can be expensive otherwise\n // (e.g. video texture loads).\n if (!shader.materialSrcs) { shader.materialSrcs = {}; }\n\n if (!src) {\n // Forget the prior material src.\n delete shader.materialSrcs[materialName];\n // Remove the texture.\n setMap(null);\n return;\n }\n\n // Don't process if material src hasn't changed.\n if (src === shader.materialSrcs[materialName]) { return; }\n\n // Remember the new src for this texture (there may be multiple).\n shader.materialSrcs[materialName] = src;\n\n // If the new material src is already a texture, just use it.\n if (src instanceof THREE.Texture) { setMap(src); } else {\n // Load texture for the new material src.\n // (And check if we should still use it once available in callback.)\n el.sceneEl.systems.material.loadTexture(src,\n {src: src, repeat: data.repeat, offset: data.offset, npot: data.npot},\n checkSetMap);\n }\n\n function checkSetMap (texture) {\n // If the source has been changed, don't use loaded texture.\n if (shader.materialSrcs[materialName] !== src) { return; }\n setMap(texture);\n }\n\n function setMap (texture) {\n material[materialName] = texture;\n if (texture && COLOR_MAPS.has(materialName)) {\n rendererSystem.applyColorCorrection(texture);\n }\n material.needsUpdate = true;\n handleTextureEvents(el, texture);\n }\n};\n\n/**\n * Update `material.map` given `data.src`. For standard and flat shaders.\n *\n * @param {object} shader - A-Frame shader instance.\n * @param {object} data\n */\nmodule.exports.updateMap = function (shader, data) {\n return module.exports.updateMapMaterialFromData('map', 'src', shader, data);\n};\n\n/**\n * Updates the material's maps which give the illusion of extra geometry.\n *\n * @param {string} longType - The friendly name of the map from the component e.g. ambientOcclusionMap becomes aoMap in THREE.js\n * @param {object} shader - A-Frame shader instance\n * @param {object} data\n */\nmodule.exports.updateDistortionMap = function (longType, shader, data) {\n var shortType = longType;\n if (longType === 'ambientOcclusion') { shortType = 'ao'; }\n var el = shader.el;\n var material = shader.material;\n var rendererSystem = el.sceneEl.systems.renderer;\n var src = data[longType + 'Map'];\n var info = {};\n info.src = src;\n\n // Pass through the repeat and offset to be handled by the material loader.\n info.offset = data[longType + 'TextureOffset'];\n info.repeat = data[longType + 'TextureRepeat'];\n info.wrap = data[longType + 'TextureWrap'];\n\n if (src) {\n if (src === shader[longType + 'TextureSrc']) { return; }\n\n // Texture added or changed.\n shader[longType + 'TextureSrc'] = src;\n el.sceneEl.systems.material.loadTexture(src, info, setMap);\n return;\n }\n\n // Texture removed.\n if (!material.map) { return; }\n setMap(null);\n\n function setMap (texture) {\n var slot = shortType + 'Map';\n material[slot] = texture;\n if (texture && COLOR_MAPS.has(slot)) {\n rendererSystem.applyColorCorrection(texture);\n }\n material.needsUpdate = true;\n handleTextureEvents(el, texture);\n }\n};\n\n/**\n * Emit event on entities on texture-related events.\n *\n * @param {Element} el - Entity.\n * @param {object} texture - three.js Texture.\n */\nfunction handleTextureEvents (el, texture) {\n if (!texture) { return; }\n\n el.emit('materialtextureloaded', {src: texture.image, texture: texture});\n\n // Video events.\n if (!texture.image || texture.image.tagName !== 'VIDEO') { return; }\n\n texture.image.addEventListener('loadeddata', function emitVideoTextureLoadedDataAll () {\n // Check to see if we need to use iOS 10 HLS shader.\n // Only override the shader if it is stock shader that we know doesn't correct.\n if (!el.components || !el.components.material) { return; }\n\n if (texture.needsCorrectionBGRA && texture.needsCorrectionFlipY &&\n ['standard', 'flat'].indexOf(el.components.material.data.shader) !== -1) {\n el.setAttribute('material', 'shader', 'ios10hls');\n }\n\n el.emit('materialvideoloadeddata', {src: texture.image, texture: texture});\n });\n texture.image.addEventListener('ended', function emitVideoTextureEndedAll () {\n // Works for non-looping videos only.\n el.emit('materialvideoended', {src: texture.image, texture: texture});\n });\n}\nmodule.exports.handleTextureEvents = handleTextureEvents;\n\n/**\n * Given video element src and type, guess whether stream is HLS.\n *\n * @param {string} src - src from video element (generally URL to content).\n * @param {string} type - type from video element (generally MIME type if present).\n */\nmodule.exports.isHLS = function (src, type) {\n if (type && HLS_MIMETYPES.includes(type.toLowerCase())) { return true; }\n if (src && src.toLowerCase().indexOf('.m3u8') > 0) { return true; }\n return false;\n};\n\n},{\"../lib/three\":179}],210:[function(_dereq_,module,exports){\n/*\n Adapted deePool by Kyle Simpson.\n MIT License: http://getify.mit-license.org\n*/\nvar EMPTY_SLOT = Object.freeze(Object.create(null));\n\n// Default object factory.\nfunction defaultObjectFactory () { return {}; }\n\n/**\n * Create a new pool.\n */\nmodule.exports.createPool = function createPool (objectFactory) {\n var objPool = [];\n var nextFreeSlot = null; // Pool location to look for a free object to use.\n\n objectFactory = objectFactory || defaultObjectFactory;\n\n function use () {\n var objToUse;\n if (nextFreeSlot === null || nextFreeSlot === objPool.length) {\n grow(objPool.length || 5);\n }\n objToUse = objPool[nextFreeSlot];\n objPool[nextFreeSlot++] = EMPTY_SLOT;\n clearObject(objToUse);\n return objToUse;\n }\n\n function recycle (obj) {\n if (!(obj instanceof Object)) { return; }\n if (nextFreeSlot === null || nextFreeSlot === -1) {\n objPool[objPool.length] = obj;\n return;\n }\n objPool[--nextFreeSlot] = obj;\n }\n\n function grow (count) {\n var currentLength;\n var i;\n\n count = count === undefined ? objPool.length : count;\n if (count > 0 && nextFreeSlot == null) {\n nextFreeSlot = 0;\n }\n\n if (count > 0) {\n currentLength = objPool.length;\n objPool.length += Number(count);\n for (i = currentLength; i < objPool.length; i++) {\n // Add new obj to pool.\n objPool[i] = objectFactory();\n }\n }\n\n return objPool.length;\n }\n\n function size () {\n return objPool.length;\n }\n\n return {\n grow: grow,\n pool: objPool,\n recycle: recycle,\n size: size,\n use: use\n };\n};\n\nfunction clearObject (obj) {\n var key;\n if (!obj || obj.constructor !== Object) { return; }\n for (key in obj) { obj[key] = undefined; }\n}\nmodule.exports.clearObject = clearObject;\n\nfunction removeUnusedKeys (obj, schema) {\n var key;\n if (!obj || obj.constructor !== Object) { return; }\n for (key in obj) {\n if (!(key in schema)) {\n delete obj[key];\n }\n }\n}\nmodule.exports.removeUnusedKeys = removeUnusedKeys;\n\n},{}],211:[function(_dereq_,module,exports){\n/**\n * String split with cached result.\n */\nmodule.exports.split = (function () {\n var splitCache = {};\n\n return function (str, delimiter) {\n if (!(delimiter in splitCache)) { splitCache[delimiter] = {}; }\n\n if (str in splitCache[delimiter]) { return splitCache[delimiter][str]; }\n\n splitCache[delimiter][str] = str.split(delimiter);\n return splitCache[delimiter][str];\n };\n})();\n\n},{}],212:[function(_dereq_,module,exports){\n/* global Image, XMLHttpRequest */\nvar debug = _dereq_('./debug');\n\nvar warn = debug('utils:src-loader:warn');\n\n/**\n * Validate a texture, either as a selector or as a URL.\n * Detects whether `src` is pointing to an image or video and invokes the appropriate\n * callback.\n *\n * `src` will be passed into the callback\n *\n * @params {string|Element} src - URL or media element.\n * @params {function} isImageCb - callback if texture is an image.\n * @params {function} isVideoCb - callback if texture is a video.\n */\nfunction validateSrc (src, isImageCb, isVideoCb) {\n checkIsImage(src, function isAnImageUrl (isImage) {\n if (isImage) {\n isImageCb(src);\n return;\n }\n isVideoCb(src);\n });\n}\n\n/**\n * Validates six images as a cubemap, either as selector or comma-separated\n * URLs.\n *\n * @param {string} src - A selector or comma-separated image URLs. Image URLs\n must be wrapped by `url()`.\n * @param {string} src - A selector or comma-separated image URLs. Image URLs\n must be wrapped by `url()`.\n */\nfunction validateCubemapSrc (src, cb) {\n var aCubemap;\n var cubemapSrcRegex = '';\n var i;\n var urls;\n var validatedUrls = [];\n\n for (i = 0; i < 5; i++) {\n cubemapSrcRegex += '(url\\\\((?:[^\\\\)]+)\\\\),\\\\s*)';\n }\n cubemapSrcRegex += '(url\\\\((?:[^\\\\)]+)\\\\)\\\\s*)';\n urls = src.match(new RegExp(cubemapSrcRegex));\n\n // `src` is a comma-separated list of URLs.\n // In this case, re-use validateSrc for each side of the cube.\n function isImageCb (url) {\n validatedUrls.push(url);\n if (validatedUrls.length === 6) {\n cb(validatedUrls);\n }\n }\n if (urls) {\n for (i = 1; i < 7; i++) {\n validateSrc(parseUrl(urls[i]), isImageCb);\n }\n return;\n }\n\n // `src` is a query selector to <a-cubemap> containing six $([src])s.\n aCubemap = validateAndGetQuerySelector(src);\n if (!aCubemap) { return; }\n if (aCubemap.tagName === 'A-CUBEMAP' && aCubemap.srcs) {\n return cb(aCubemap.srcs);\n }\n // Else if aCubeMap is not a <a-cubemap>.\n warn('Selector \"%s\" does not point to <a-cubemap>', src);\n}\n\n/**\n * Parses src from `url(src)`.\n * @param {string} src - String to parse.\n * @return {string} The parsed src, if parseable.\n */\nfunction parseUrl (src) {\n var parsedSrc = src.match(/\\url\\((.+)\\)/);\n if (!parsedSrc) { return; }\n return parsedSrc[1];\n}\n\n/**\n * Call back whether `src` is an image.\n *\n * @param {string|Element} src - URL or element that will be tested.\n * @param {function} onResult - Callback with whether `src` is an image.\n */\nfunction checkIsImage (src, onResult) {\n var request;\n\n if (src.tagName) {\n onResult(src.tagName === 'IMG');\n return;\n }\n request = new XMLHttpRequest();\n\n // Try to send HEAD request to check if image first.\n request.open('HEAD', src);\n request.addEventListener('load', function (event) {\n var contentType;\n if (request.status >= 200 && request.status < 300) {\n contentType = request.getResponseHeader('Content-Type');\n if (contentType == null) {\n checkIsImageFallback(src, onResult);\n } else {\n if (contentType.startsWith('image')) {\n onResult(true);\n } else {\n onResult(false);\n }\n }\n } else {\n checkIsImageFallback(src, onResult);\n }\n request.abort();\n });\n request.send();\n}\n\nfunction checkIsImageFallback (src, onResult) {\n var tester = new Image();\n tester.addEventListener('load', onLoad);\n function onLoad () { onResult(true); }\n tester.addEventListener('error', onError);\n function onError () { onResult(false); }\n tester.src = src;\n}\n\n/**\n * Query and validate a query selector,\n *\n * @param {string} selector - DOM selector.\n * @return {object|null|undefined} Selected DOM element if exists.\n null if query yields no results.\n undefined if `selector` is not a valid selector.\n */\nfunction validateAndGetQuerySelector (selector) {\n try {\n var el = document.querySelector(selector);\n if (!el) {\n warn('No element was found matching the selector: \"%s\"', selector);\n }\n return el;\n } catch (e) { // Capture exception if it's not a valid selector.\n warn('\"%s\" is not a valid selector', selector);\n return undefined;\n }\n}\n\nmodule.exports = {\n parseUrl: parseUrl,\n validateSrc: validateSrc,\n validateCubemapSrc: validateCubemapSrc\n};\n\n},{\"./debug\":201}],213:[function(_dereq_,module,exports){\n/**\n * Utils for parsing style-like strings (e.g., \"primitive: box; width: 5; height: 4.5\").\n * Some code adapted from `style-attr` (https://github.com/joshwnj/style-attr)\n * by Josh Johnston (MIT License).\n */\nvar DASH_REGEX = /-([a-z])/g;\n\n/**\n * Deserialize style-like string into an object of properties.\n *\n * @param {string} value - HTML attribute value.\n * @param {object} obj - Reused object for object pooling.\n * @returns {object} Property data.\n */\nmodule.exports.parse = function (value, obj) {\n var parsedData;\n if (typeof value !== 'string') { return value; }\n parsedData = styleParse(value, obj);\n // The style parser returns an object { \"\" : \"test\"} when fed a string\n if (parsedData['']) { return value; }\n return transformKeysToCamelCase(parsedData);\n};\n\n/**\n * Serialize an object of properties into a style-like string.\n *\n * @param {object} data - Property data.\n * @returns {string}\n */\nmodule.exports.stringify = function (data) {\n if (typeof data === 'string') { return data; }\n return styleStringify(data);\n};\n\n/**\n * Converts string from hyphen to camelCase.\n *\n * @param {string} str - String to camelCase.\n * @return {string} CamelCased string.\n */\nfunction toCamelCase (str) {\n return str.replace(DASH_REGEX, upperCase);\n}\nmodule.exports.toCamelCase = toCamelCase;\n\n/**\n * Converts object's keys from hyphens to camelCase (e.g., `max-value` to\n * `maxValue`).\n *\n * @param {object} obj - The object to camelCase keys.\n * @return {object} The object with keys camelCased.\n */\nfunction transformKeysToCamelCase (obj) {\n var camelKey;\n var key;\n for (key in obj) {\n camelKey = toCamelCase(key);\n if (key === camelKey) { continue; }\n obj[camelKey] = obj[key];\n delete obj[key];\n }\n return obj;\n}\nmodule.exports.transformKeysToCamelCase = transformKeysToCamelCase;\n\n/**\n * Split a string into chunks matching `<key>: <value>`\n */\nvar getKeyValueChunks = (function () {\n var chunks = [];\n var hasUnclosedUrl = /url\\([^)]+$/;\n\n return function getKeyValueChunks (raw) {\n var chunk = '';\n var nextSplit;\n var offset = 0;\n var sep = ';';\n\n chunks.length = 0;\n\n while (offset < raw.length) {\n nextSplit = raw.indexOf(sep, offset);\n if (nextSplit === -1) { nextSplit = raw.length; }\n\n chunk += raw.substring(offset, nextSplit);\n\n // data URIs can contain semicolons, so make sure we get the whole thing\n if (hasUnclosedUrl.test(chunk)) {\n chunk += ';';\n offset = nextSplit + 1;\n continue;\n }\n\n chunks.push(chunk.trim());\n chunk = '';\n offset = nextSplit + 1;\n }\n\n return chunks;\n };\n})();\n\n/**\n * Convert a style attribute string to an object.\n *\n * @param {object} str - Attribute string.\n * @param {object} obj - Object to reuse as a base, else a new one will be allocated.\n */\nfunction styleParse (str, obj) {\n var chunks;\n var i;\n var item;\n var pos;\n var key;\n var val;\n\n obj = obj || {};\n\n chunks = getKeyValueChunks(str);\n for (i = 0; i < chunks.length; i++) {\n item = chunks[i];\n if (!item) { continue; }\n // Split with `.indexOf` rather than `.split` because the value may also contain colons.\n pos = item.indexOf(':');\n key = item.substr(0, pos).trim();\n val = item.substr(pos + 1).trim();\n obj[key] = val;\n }\n return obj;\n}\n\n/**\n * Convert an object into an attribute string\n **/\nfunction styleStringify (obj) {\n var key;\n var keyCount = 0;\n var i = 0;\n var str = '';\n\n for (key in obj) { keyCount++; }\n\n for (key in obj) {\n str += (key + ': ' + obj[key]);\n if (i < keyCount - 1) { str += '; '; }\n i++;\n }\n return str;\n}\n\nfunction upperCase (str) { return str[1].toUpperCase(); }\n\n},{}],214:[function(_dereq_,module,exports){\nvar DEFAULT_HANDEDNESS = _dereq_('../constants').DEFAULT_HANDEDNESS;\nvar AXIS_LABELS = ['x', 'y', 'z', 'w'];\nvar NUM_HANDS = 2; // Number of hands in a pair. Should always be 2.\n\n/**\n * Called on controller component `.play` handlers.\n * Check if controller matches parameters and inject tracked-controls component.\n * Handle event listeners.\n * Generate controllerconnected or controllerdisconnected events.\n *\n * @param {object} component - Tracked controls component.\n * @param {object} idPrefix - Prefix to match in gamepad id if any.\n * @param {object} queryObject - Map of values to match.\n */\nmodule.exports.checkControllerPresentAndSetup = function (component, idPrefix, queryObject) {\n var el = component.el;\n var controller;\n var hasWebXR = el.sceneEl.hasWebXR;\n var isControllerPresent = hasWebXR ? isControllerPresentWebXR : isControllerPresentWebVR;\n var isPresent;\n\n controller = isControllerPresent(component, idPrefix, queryObject);\n isPresent = !!controller;\n\n // If component was previously paused and now playing, re-add event listeners.\n // Handle the event listeners here since this helper method is control of calling\n // `.addEventListeners` and `.removeEventListeners`.\n if (component.controllerPresent && !component.controllerEventsActive && !hasWebXR) {\n component.addEventListeners();\n }\n\n // Nothing changed, no need to do anything.\n if (isPresent === component.controllerPresent) { return isPresent; }\n\n component.controllerPresent = isPresent;\n\n // Update controller presence.\n if (isPresent) {\n component.addEventListeners();\n component.injectTrackedControls(controller);\n el.emit('controllerconnected', {name: component.name, component: component});\n } else {\n component.removeEventListeners();\n el.emit('controllerdisconnected', {name: component.name, component: component});\n }\n};\n\n/**\n * Enumerate controller (that have pose) and check if they match parameters for WebVR\n *\n * @param {object} component - Tracked controls component.\n * @param {object} idPrefix - Prefix to match in gamepad id if any.\n * @param {object} queryObject - Map of values to match.\n */\nfunction isControllerPresentWebVR (component, idPrefix, queryObject) {\n var gamepads;\n var sceneEl = component.el.sceneEl;\n var trackedControlsSystem;\n var filterControllerIndex = queryObject.index || 0;\n\n if (!idPrefix) { return false; }\n\n trackedControlsSystem = sceneEl && sceneEl.systems['tracked-controls-webvr'];\n if (!trackedControlsSystem) { return false; }\n\n gamepads = trackedControlsSystem.controllers;\n if (!gamepads.length) { return false; }\n\n return !!findMatchingControllerWebVR(gamepads, null, idPrefix, queryObject.hand,\n filterControllerIndex);\n}\n\n/**\n *\n * @param {object} component - Tracked controls component.\n */\nfunction isControllerPresentWebXR (component, id, queryObject) {\n var controllers;\n var sceneEl = component.el.sceneEl;\n var trackedControlsSystem = sceneEl && sceneEl.systems['tracked-controls-webxr'];\n if (!trackedControlsSystem) { return false; }\n\n controllers = trackedControlsSystem.controllers;\n if (!controllers || !controllers.length) { return false; }\n\n return findMatchingControllerWebXR(\n controllers, id,\n queryObject.hand, queryObject.index, queryObject.iterateControllerProfiles, queryObject.handTracking);\n}\n\nmodule.exports.isControllerPresentWebVR = isControllerPresentWebVR;\nmodule.exports.isControllerPresentWebXR = isControllerPresentWebXR;\n\n/**\n * Walk through the given controllers to find any where the device ID equals\n * filterIdExact, or startsWith filterIdPrefix.\n * A controller where this considered true is considered a 'match'.\n *\n * For each matching controller:\n * If filterHand is set, and the controller:\n * is handed, we further verify that controller.hand equals filterHand.\n * is unhanded (controller.hand is ''), we skip until we have found a\n * number of matching controllers that equals filterControllerIndex\n * If filterHand is not set, we skip until we have found the nth matching\n * controller, where n equals filterControllerIndex\n *\n * The method should be called with one of: [filterIdExact, filterIdPrefix] AND\n * one or both of: [filterHand, filterControllerIndex]\n *\n * @param {object} controllers - Array of gamepads to search\n * @param {string} filterIdExact - If set, used to find controllers with id === this value\n * @param {string} filterIdPrefix - If set, used to find controllers with id startsWith this value\n * @param {object} filterHand - If set, further filters controllers with matching 'hand' property\n * @param {object} filterControllerIndex - Find the nth matching controller,\n * where n equals filterControllerIndex. defaults to 0.\n */\nfunction findMatchingControllerWebVR (controllers, filterIdExact, filterIdPrefix, filterHand,\n filterControllerIndex) {\n var controller;\n var i;\n var matchingControllerOccurence = 0;\n var targetControllerMatch = filterControllerIndex >= 0 ? filterControllerIndex : 0;\n\n for (i = 0; i < controllers.length; i++) {\n controller = controllers[i];\n\n // Determine if the controller ID matches our criteria.\n if (filterIdPrefix && !controller.id.startsWith(filterIdPrefix)) {\n continue;\n }\n\n if (!filterIdPrefix && controller.id !== filterIdExact) { continue; }\n\n // If the hand filter and controller handedness are defined we compare them.\n if (filterHand && controller.hand && filterHand !== controller.hand) { continue; }\n\n // If we have detected an unhanded controller and the component was asking\n // for a particular hand, we need to treat the controllers in the array as\n // pairs of controllers. This effectively means that we need to skip\n // NUM_HANDS matches for each controller number, instead of 1.\n if (filterHand && !controller.hand) {\n targetControllerMatch = NUM_HANDS * filterControllerIndex + ((filterHand === DEFAULT_HANDEDNESS) ? 0 : 1);\n } else {\n return controller;\n }\n\n // We are looking for the nth occurence of a matching controller\n // (n equals targetControllerMatch).\n if (matchingControllerOccurence === targetControllerMatch) { return controller; }\n ++matchingControllerOccurence;\n }\n return undefined;\n}\n\nfunction findMatchingControllerWebXR (controllers, idPrefix, handedness, index, iterateProfiles, handTracking) {\n var i;\n var j;\n var controller;\n var controllerMatch = false;\n var controllerHasHandedness;\n var profiles;\n for (i = 0; i < controllers.length; i++) {\n controller = controllers[i];\n profiles = controller.profiles;\n if (handTracking) {\n controllerMatch = controller.hand;\n } else {\n if (iterateProfiles) {\n for (j = 0; j < profiles.length; j++) {\n controllerMatch = profiles[j].startsWith(idPrefix);\n if (controllerMatch) { break; }\n }\n } else {\n controllerMatch = profiles.length > 0 && profiles[0].startsWith(idPrefix);\n }\n }\n if (!controllerMatch) { continue; }\n // Vive controllers are assigned handedness at runtime and it might not be always available.\n controllerHasHandedness = controller.handedness === 'right' || controller.handedness === 'left';\n if (controllerHasHandedness) {\n if (controller.handedness === handedness) { return controllers[i]; }\n } else { // Fallback to index if controller has no handedness.\n if ((i === index)) { return controllers[i]; }\n }\n }\n return undefined;\n}\n\nmodule.exports.findMatchingControllerWebVR = findMatchingControllerWebVR;\nmodule.exports.findMatchingControllerWebXR = findMatchingControllerWebXR;\n\n/**\n * Emit specific `moved` event(s) if axes changed based on original axismoved event.\n *\n * @param {object} component - Controller component in use.\n * @param {array} axesMapping - For example `{thumbstick: [0, 1]}`.\n * @param {object} evt - Event to process.\n */\nmodule.exports.emitIfAxesChanged = function (component, axesMapping, evt) {\n var axes;\n var buttonType;\n var changed;\n var detail;\n var j;\n\n for (buttonType in axesMapping) {\n axes = axesMapping[buttonType];\n\n changed = false;\n for (j = 0; j < axes.length; j++) {\n if (evt.detail.changed[axes[j]]) { changed = true; }\n }\n\n if (!changed) { continue; }\n\n // Axis has changed. Emit the specific moved event with axis values in detail.\n detail = {};\n for (j = 0; j < axes.length; j++) {\n detail[AXIS_LABELS[j]] = evt.detail.axis[axes[j]];\n }\n component.el.emit(buttonType + 'moved', detail);\n }\n};\n\n/**\n * Handle a button event and reemits the events.\n *\n * @param {string} id - id of the button.\n * @param {string} evtName - name of the reemitted event\n * @param {object} component - reference to the component\n * @param {string} hand - handedness of the controller: left or right.\n */\nmodule.exports.onButtonEvent = function (id, evtName, component, hand) {\n var mapping = hand ? component.mapping[hand] : component.mapping;\n var buttonName = mapping.buttons[id];\n component.el.emit(buttonName + evtName);\n if (component.updateModel) {\n component.updateModel(buttonName, evtName);\n }\n};\n\n},{\"../constants\":123}],215:[function(_dereq_,module,exports){\n/**\n * @author richt / http://richt.me\n * @author WestLangley / http://github.com/WestLangley\n *\n * W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)\n */\n\nTHREE.DeviceOrientationControls = function ( object ) {\n\n var scope = this;\n\n this.object = object;\n this.object.rotation.reorder( 'YXZ' );\n\n this.enabled = true;\n\n this.deviceOrientation = {};\n this.screenOrientation = 0;\n\n this.alphaOffset = 0; // radians\n\n var onDeviceOrientationChangeEvent = function ( event ) {\n\n scope.deviceOrientation = event;\n\n };\n\n var onScreenOrientationChangeEvent = function () {\n\n scope.screenOrientation = window.orientation || 0;\n\n };\n\n // The angles alpha, beta and gamma form a set of intrinsic Tait-Bryan angles of type Z-X'-Y''\n\n var setObjectQuaternion = function () {\n\n var zee = new THREE.Vector3( 0, 0, 1 );\n\n var euler = new THREE.Euler();\n\n var q0 = new THREE.Quaternion();\n\n var q1 = new THREE.Quaternion( - Math.sqrt( 0.5 ), 0, 0, Math.sqrt( 0.5 ) ); // - PI/2 around the x-axis\n\n return function ( quaternion, alpha, beta, gamma, orient ) {\n\n euler.set( beta, alpha, - gamma, 'YXZ' ); // 'ZXY' for the device, but 'YXZ' for us\n\n quaternion.setFromEuler( euler ); // orient the device\n\n quaternion.multiply( q1 ); // camera looks out the back of the device, not the top\n\n quaternion.multiply( q0.setFromAxisAngle( zee, - orient ) ); // adjust for screen orientation\n\n };\n\n }();\n\n this.connect = function () {\n \n onScreenOrientationChangeEvent();\n\n window.addEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );\n window.addEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );\n\n scope.enabled = true;\n\n };\n\n this.disconnect = function () {\n\n window.removeEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );\n window.removeEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );\n\n scope.enabled = false;\n\n };\n\n this.update = function () {\n\n if ( scope.enabled === false ) return;\n\n var device = scope.deviceOrientation;\n\n if ( device ) {\n\n var alpha = device.alpha ? THREE.Math.degToRad( device.alpha ) + scope.alphaOffset : 0; // Z\n\n var beta = device.beta ? THREE.Math.degToRad( device.beta ) : 0; // X'\n\n var gamma = device.gamma ? THREE.Math.degToRad( device.gamma ) : 0; // Y''\n\n var orient = scope.screenOrientation ? THREE.Math.degToRad( scope.screenOrientation ) : 0; // O\n\n setObjectQuaternion( scope.object.quaternion, alpha, beta, gamma, orient );\n\n }\n\n\n };\n\n this.dispose = function () {\n\n scope.disconnect();\n\n };\n\n this.connect();\n\n};\n\n},{}],216:[function(_dereq_,module,exports){\nwindow.glStats = function () {\n\n var _rS = null;\n\n var _totalDrawArraysCalls = 0,\n _totalDrawElementsCalls = 0,\n _totalUseProgramCalls = 0,\n _totalFaces = 0,\n _totalVertices = 0,\n _totalPoints = 0,\n _totalBindTexures = 0;\n\n function _h ( f, c ) {\n return function () {\n c.apply( this, arguments );\n f.apply( this, arguments );\n };\n }\n\n WebGLRenderingContext.prototype.drawArrays = _h( WebGLRenderingContext.prototype.drawArrays, function () {\n _totalDrawArraysCalls++;\n if ( arguments[ 0 ] == this.POINTS ) _totalPoints += arguments[ 2 ];\n else _totalVertices += arguments[ 2 ];\n } );\n\n WebGLRenderingContext.prototype.drawElements = _h( WebGLRenderingContext.prototype.drawElements, function () {\n _totalDrawElementsCalls++;\n _totalFaces += arguments[ 1 ] / 3;\n _totalVertices += arguments[ 1 ];\n } );\n\n WebGLRenderingContext.prototype.useProgram = _h( WebGLRenderingContext.prototype.useProgram, function () {\n _totalUseProgramCalls++;\n } );\n\n WebGLRenderingContext.prototype.bindTexture = _h( WebGLRenderingContext.prototype.bindTexture, function () {\n _totalBindTexures++;\n } );\n\n var _values = {\n allcalls: {\n over: 3000,\n caption: 'Calls (hook)'\n },\n drawelements: {\n caption: 'drawElements (hook)'\n },\n drawarrays: {\n caption: 'drawArrays (hook)'\n }\n };\n\n var _groups = [ {\n caption: 'WebGL',\n values: [ 'allcalls', 'drawelements', 'drawarrays', 'useprogram', 'bindtexture', 'glfaces', 'glvertices', 'glpoints' ]\n } ];\n\n var _fractions = [ {\n base: 'allcalls',\n steps: [ 'drawelements', 'drawarrays' ]\n } ];\n\n function _update () {\n _rS( 'allcalls' ).set( _totalDrawArraysCalls + _totalDrawElementsCalls );\n _rS( 'drawElements' ).set( _totalDrawElementsCalls );\n _rS( 'drawArrays' ).set( _totalDrawArraysCalls );\n _rS( 'bindTexture' ).set( _totalBindTexures );\n _rS( 'useProgram' ).set( _totalUseProgramCalls );\n _rS( 'glfaces' ).set( _totalFaces );\n _rS( 'glvertices' ).set( _totalVertices );\n _rS( 'glpoints' ).set( _totalPoints );\n }\n\n function _start () {\n _totalDrawArraysCalls = 0;\n _totalDrawElementsCalls = 0;\n _totalUseProgramCalls = 0;\n _totalFaces = 0;\n _totalVertices = 0;\n _totalPoints = 0;\n _totalBindTexures = 0;\n }\n\n function _end () {}\n\n function _attach ( r ) {\n _rS = r;\n }\n\n return {\n update: _update,\n start: _start,\n end: _end,\n attach: _attach,\n values: _values,\n groups: _groups,\n fractions: _fractions\n };\n\n};\n\nwindow.threeStats = function ( renderer ) {\n\n var _rS = null;\n\n var _values = {\n 'renderer.info.memory.geometries': {\n caption: 'Geometries'\n },\n 'renderer.info.memory.textures': {\n caption: 'Textures'\n },\n 'renderer.info.programs': {\n caption: 'Programs'\n },\n 'renderer.info.render.calls': {\n caption: 'Calls'\n },\n 'renderer.info.render.triangles': {\n caption: 'Triangles',\n over: 1000\n },\n 'renderer.info.render.points': {\n caption: 'Points'\n }\n };\n\n var _groups = [ {\n caption: 'Three.js - Memory',\n values: [ 'renderer.info.memory.geometries', 'renderer.info.programs', 'renderer.info.memory.textures' ]\n }, {\n caption: 'Three.js - Render',\n values: [ 'renderer.info.render.calls', 'renderer.info.render.triangles', 'renderer.info.render.points' ]\n } ];\n\n var _fractions = [];\n\n function _update () {\n\n _rS( 'renderer.info.memory.geometries' ).set( renderer.info.memory.geometries );\n _rS( 'renderer.info.programs' ).set( renderer.info.programs.length );\n _rS( 'renderer.info.memory.textures' ).set( renderer.info.memory.textures );\n _rS( 'renderer.info.render.calls' ).set( renderer.info.render.calls );\n _rS( 'renderer.info.render.triangles' ).set( renderer.info.render.triangles );\n _rS( 'renderer.info.render.points' ).set( renderer.info.render.points );\n\n }\n\n function _start () {}\n\n function _end () {}\n\n function _attach ( r ) {\n _rS = r;\n }\n\n return {\n update: _update,\n start: _start,\n end: _end,\n attach: _attach,\n values: _values,\n groups: _groups,\n fractions: _fractions\n };\n\n};\n\n/*\n * From https://github.com/paulirish/memory-stats.js\n */\n\nwindow.BrowserStats = function () {\n\n var _rS = null;\n\n var _usedJSHeapSize = 0,\n _totalJSHeapSize = 0;\n\n if ( window.performance && !performance.memory ) {\n performance.memory = {\n usedJSHeapSize: 0,\n totalJSHeapSize: 0\n };\n }\n\n if ( performance.memory.totalJSHeapSize === 0 ) {\n console.warn( 'totalJSHeapSize === 0... performance.memory is only available in Chrome .' );\n }\n\n var _values = {\n memory: {\n caption: 'Used Memory',\n average: true,\n avgMs: 1000,\n over: 22\n },\n total: {\n caption: 'Total Memory'\n }\n };\n\n var _groups = [ {\n caption: 'Browser',\n values: [ 'memory', 'total' ]\n } ];\n\n var _fractions = [ {\n base: 'total',\n steps: [ 'memory' ]\n } ];\n\n var log1024 = Math.log( 1024 );\n\n function _size ( v ) {\n\n var precision = 100; //Math.pow(10, 2);\n var i = Math.floor( Math.log( v ) / log1024 );\n return Math.round( v * precision / Math.pow( 1024, i ) ) / precision; // + ' ' + sizes[i];\n\n }\n\n function _update () {\n _usedJSHeapSize = _size( performance.memory.usedJSHeapSize );\n _totalJSHeapSize = _size( performance.memory.totalJSHeapSize );\n\n _rS( 'memory' ).set( _usedJSHeapSize );\n _rS( 'total' ).set( _totalJSHeapSize );\n }\n\n function _start () {\n _usedJSHeapSize = 0;\n }\n\n function _end () {}\n\n function _attach ( r ) {\n _rS = r;\n }\n\n return {\n update: _update,\n start: _start,\n end: _end,\n attach: _attach,\n values: _values,\n groups: _groups,\n fractions: _fractions\n };\n\n};\n\nif (typeof module === 'object') {\n module.exports = {\n glStats: window.glStats,\n threeStats: window.threeStats,\n BrowserStats: window.BrowserStats\n };\n}\n\n},{}],217:[function(_dereq_,module,exports){\n// performance.now() polyfill from https://gist.github.com/paulirish/5438650\n'use strict';\n\n( function () {\n\n if ( 'performance' in window == false ) {\n window.performance = {};\n }\n\n var performance = window.performance;\n\n if ( 'now' in performance == false ) {\n\n var nowOffset = Date.now();\n\n if ( performance.timing && performance.timing.navigationStart ) {\n nowOffset = performance.timing.navigationStart;\n }\n\n performance.now = function now () {\n return Date.now() - nowOffset;\n };\n\n }\n\n if( !performance.mark ) {\n performance.mark = function(){}\n }\n\n if( !performance.measure ) {\n performance.measure = function(){}\n }\n\n} )();\n\nwindow.rStats = function rStats ( settings ) {\n\n function iterateKeys ( array, callback ) {\n var keys = Object.keys( array );\n for ( var j = 0, l = keys.length; j < l; j++ ) {\n callback( keys[ j ] );\n }\n }\n\n function importCSS ( url ) {\n\n var element = document.createElement( 'link' );\n element.href = url;\n element.rel = 'stylesheet';\n element.type = 'text/css';\n document.getElementsByTagName( 'head' )[ 0 ].appendChild( element );\n\n }\n\n var _settings = settings || {};\n var _colours = _settings.colours || [ '#850700', '#c74900', '#fcb300', '#284280', '#4c7c0c' ];\n\n var _cssFont = 'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300';\n var _cssRStats = ( _settings.CSSPath ? _settings.CSSPath : '' ) + 'rStats.css';\n\n var _css = _settings.css || [ _cssFont, _cssRStats ];\n _css.forEach(function (uri) {\n importCSS( uri );\n });\n\n if ( !_settings.values ) _settings.values = {};\n\n var _base, _div, _elHeight = 10, _elWidth = 200;\n var _perfCounters = {};\n\n\n function Graph ( _dom, _id, _defArg ) {\n\n var _def = _defArg || {};\n var _canvas = document.createElement( 'canvas' ),\n _ctx = _canvas.getContext( '2d' ),\n _max = 0,\n _current = 0;\n\n var c = _def.color ? _def.color : '#666666';\n\n var _dotCanvas = document.createElement( 'canvas' ),\n _dotCtx = _dotCanvas.getContext( '2d' );\n _dotCanvas.width = 1;\n _dotCanvas.height = 2 * _elHeight;\n _dotCtx.fillStyle = '#444444';\n _dotCtx.fillRect( 0, 0, 1, 2 * _elHeight );\n _dotCtx.fillStyle = c;\n _dotCtx.fillRect( 0, _elHeight, 1, _elHeight );\n _dotCtx.fillStyle = '#ffffff';\n _dotCtx.globalAlpha = 0.5;\n _dotCtx.fillRect( 0, _elHeight, 1, 1 );\n _dotCtx.globalAlpha = 1;\n\n var _alarmCanvas = document.createElement( 'canvas' ),\n _alarmCtx = _alarmCanvas.getContext( '2d' );\n _alarmCanvas.width = 1;\n _alarmCanvas.height = 2 * _elHeight;\n _alarmCtx.fillStyle = '#444444';\n _alarmCtx.fillRect( 0, 0, 1, 2 * _elHeight );\n _alarmCtx.fillStyle = '#b70000';\n _alarmCtx.fillRect( 0, _elHeight, 1, _elHeight );\n _alarmCtx.globalAlpha = 0.5;\n _alarmCtx.fillStyle = '#ffffff';\n _alarmCtx.fillRect( 0, _elHeight, 1, 1 );\n _alarmCtx.globalAlpha = 1;\n\n function _init () {\n\n _canvas.width = _elWidth;\n _canvas.height = _elHeight;\n _canvas.style.width = _canvas.width + 'px';\n _canvas.style.height = _canvas.height + 'px';\n _canvas.className = 'rs-canvas';\n _dom.appendChild( _canvas );\n\n _ctx.fillStyle = '#444444';\n _ctx.fillRect( 0, 0, _canvas.width, _canvas.height );\n\n }\n\n function _draw ( v, alarm ) {\n _current += ( v - _current ) * 0.1;\n _max *= 0.99;\n if ( _current > _max ) _max = _current;\n _ctx.drawImage( _canvas, 1, 0, _canvas.width - 1, _canvas.height, 0, 0, _canvas.width - 1, _canvas.height );\n if ( alarm ) {\n _ctx.drawImage( _alarmCanvas, _canvas.width - 1, _canvas.height - _current * _canvas.height / _max - _elHeight );\n } else {\n _ctx.drawImage( _dotCanvas, _canvas.width - 1, _canvas.height - _current * _canvas.height / _max - _elHeight );\n }\n }\n\n _init();\n\n return {\n draw: _draw\n };\n\n }\n\n function StackGraph ( _dom, _num ) {\n\n var _canvas = document.createElement( 'canvas' ),\n _ctx = _canvas.getContext( '2d' );\n\n function _init () {\n\n _canvas.width = _elWidth;\n _canvas.height = _elHeight * _num;\n _canvas.style.width = _canvas.width + 'px';\n _canvas.style.height = _canvas.height + 'px';\n _canvas.className = 'rs-canvas';\n _dom.appendChild( _canvas );\n\n _ctx.fillStyle = '#444444';\n _ctx.fillRect( 0, 0, _canvas.width, _canvas.height );\n\n }\n\n function _draw ( v ) {\n _ctx.drawImage( _canvas, 1, 0, _canvas.width - 1, _canvas.height, 0, 0, _canvas.width - 1, _canvas.height );\n var th = 0;\n iterateKeys( v, function ( j ) {\n var h = v[ j ] * _canvas.height;\n _ctx.fillStyle = _colours[ j ];\n _ctx.fillRect( _canvas.width - 1, th, 1, h );\n th += h;\n } );\n }\n\n _init();\n\n return {\n draw: _draw\n };\n\n }\n\n function PerfCounter ( id, group ) {\n\n var _id = id,\n _time,\n _value = 0,\n _total = 0,\n _averageValue = 0,\n _accumValue = 0,\n _accumStart = performance.now(),\n _accumSamples = 0,\n _dom = document.createElement( 'div' ),\n _spanId = document.createElement( 'span' ),\n _spanValue = document.createElement( 'div' ),\n _spanValueText = document.createTextNode( '' ),\n _def = _settings ? _settings.values[ _id.toLowerCase() ] : null,\n _graph = new Graph( _dom, _id, _def ),\n _started = false;\n\n _spanId.className = 'rs-counter-id';\n _spanId.textContent = ( _def && _def.caption ) ? _def.caption : _id;\n\n _spanValue.className = 'rs-counter-value';\n _spanValue.appendChild( _spanValueText );\n\n _dom.appendChild( _spanId );\n _dom.appendChild( _spanValue );\n if ( group ) group.div.appendChild( _dom );\n else _div.appendChild( _dom );\n\n _time = performance.now();\n\n function _average ( v ) {\n if ( _def && _def.average ) {\n _accumValue += v;\n _accumSamples++;\n var t = performance.now();\n if ( t - _accumStart >= ( _def.avgMs || 1000 ) ) {\n _averageValue = _accumValue / _accumSamples;\n _accumValue = 0;\n _accumStart = t;\n _accumSamples = 0;\n }\n }\n }\n\n function _start () {\n _time = performance.now();\n if( _settings.userTimingAPI ) performance.mark( _id + '-start' );\n _started = true;\n }\n\n function _end () {\n _value = performance.now() - _time;\n if( _settings.userTimingAPI ) {\n performance.mark( _id + '-end' );\n if( _started ) {\n performance.measure( _id, _id + '-start', _id + '-end' );\n }\n }\n _average( _value );\n }\n\n function _tick () {\n _end();\n _start();\n }\n\n function _draw () {\n var v = ( _def && _def.average ) ? _averageValue : _value;\n _spanValueText.nodeValue = Math.round( v * 100 ) / 100;\n var a = ( _def && ( ( _def.below && _value < _def.below ) || ( _def.over && _value > _def.over ) ) );\n _graph.draw( _value, a );\n _dom.className = a ? 'rs-counter-base alarm' : 'rs-counter-base';\n\n }\n\n function _frame () {\n var t = performance.now();\n var e = t - _time;\n _total++;\n if ( e > 1000 ) {\n if ( _def && _def.interpolate === false ) {\n _value = _total;\n } else {\n _value = _total * 1000 / e;\n }\n _total = 0;\n _time = t;\n _average( _value );\n }\n }\n\n function _set ( v ) {\n _value = v;\n _average( _value );\n }\n\n return {\n set: _set,\n start: _start,\n tick: _tick,\n end: _end,\n frame: _frame,\n value: function () {\n return _value;\n },\n draw: _draw\n };\n\n }\n\n function sample () {\n\n var _value = 0;\n\n function _set ( v ) {\n _value = v;\n }\n\n return {\n set: _set,\n value: function () {\n return _value;\n }\n };\n\n }\n\n function _perf ( idArg ) {\n\n var id = idArg.toLowerCase();\n if ( id === undefined ) id = 'default';\n if ( _perfCounters[ id ] ) return _perfCounters[ id ];\n\n var group = null;\n if ( _settings && _settings.groups ) {\n iterateKeys( _settings.groups, function ( j ) {\n var g = _settings.groups[ parseInt( j, 10 ) ];\n if ( !group && g.values.indexOf( id.toLowerCase() ) !== -1 ) {\n group = g;\n }\n } );\n }\n\n var p = new PerfCounter( id, group );\n _perfCounters[ id ] = p;\n return p;\n\n }\n\n function _init () {\n\n if ( _settings.plugins ) {\n if ( !_settings.values ) _settings.values = {};\n if ( !_settings.groups ) _settings.groups = [];\n if ( !_settings.fractions ) _settings.fractions = [];\n for ( var j = 0; j < _settings.plugins.length; j++ ) {\n _settings.plugins[ j ].attach( _perf );\n iterateKeys( _settings.plugins[ j ].values, function ( k ) {\n _settings.values[ k ] = _settings.plugins[ j ].values[ k ];\n } );\n _settings.groups = _settings.groups.concat( _settings.plugins[ j ].groups );\n _settings.fractions = _settings.fractions.concat( _settings.plugins[ j ].fractions );\n }\n } else {\n _settings.plugins = {};\n }\n\n _base = document.createElement( 'div' );\n _base.className = 'rs-base';\n _div = document.createElement( 'div' );\n _div.className = 'rs-container';\n _div.style.height = 'auto';\n _base.appendChild( _div );\n document.body.appendChild( _base );\n\n if ( !_settings ) return;\n\n if ( _settings.groups ) {\n iterateKeys( _settings.groups, function ( j ) {\n var g = _settings.groups[ parseInt( j, 10 ) ];\n var div = document.createElement( 'div' );\n div.className = 'rs-group';\n g.div = div;\n var h1 = document.createElement( 'h1' );\n h1.textContent = g.caption;\n h1.addEventListener( 'click', function ( e ) {\n this.classList.toggle( 'hidden' );\n e.preventDefault();\n }.bind( div ) );\n _div.appendChild( h1 );\n _div.appendChild( div );\n } );\n }\n\n if ( _settings.fractions ) {\n iterateKeys( _settings.fractions, function ( j ) {\n var f = _settings.fractions[ parseInt( j, 10 ) ];\n var div = document.createElement( 'div' );\n div.className = 'rs-fraction';\n var legend = document.createElement( 'div' );\n legend.className = 'rs-legend';\n\n var h = 0;\n iterateKeys( _settings.fractions[ j ].steps, function ( k ) {\n var p = document.createElement( 'p' );\n p.textContent = _settings.fractions[ j ].steps[ k ];\n p.style.color = _colours[ h ];\n legend.appendChild( p );\n h++;\n } );\n div.appendChild( legend );\n div.style.height = h * _elHeight + 'px';\n f.div = div;\n var graph = new StackGraph( div, h );\n f.graph = graph;\n _div.appendChild( div );\n } );\n }\n\n }\n\n function _update () {\n\n iterateKeys( _settings.plugins, function ( j ) {\n _settings.plugins[ j ].update();\n } );\n\n iterateKeys( _perfCounters, function ( j ) {\n _perfCounters[ j ].draw();\n } );\n\n if ( _settings && _settings.fractions ) {\n iterateKeys( _settings.fractions, function ( j ) {\n var f = _settings.fractions[ parseInt( j, 10 ) ];\n var v = [];\n var base = _perfCounters[ f.base.toLowerCase() ];\n if ( base ) {\n base = base.value();\n iterateKeys( _settings.fractions[ j ].steps, function ( k ) {\n var s = _settings.fractions[ j ].steps[ parseInt( k, 10 ) ].toLowerCase();\n var val = _perfCounters[ s ];\n if ( val ) {\n v.push( val.value() / base );\n }\n } );\n }\n f.graph.draw( v );\n } );\n }\n\n /*if( _height != _div.clientHeight ) {\n _height = _div.clientHeight;\n _base.style.height = _height + 2 * _elHeight + 'px';\n console.log( _base.clientHeight );\n }*/\n\n }\n\n _init();\n\n return function ( id ) {\n if ( id ) return _perf( id );\n return {\n element: _base,\n update: _update\n };\n };\n\n}\n\nif (typeof module === 'object') {\n module.exports = window.rStats;\n}\n\n},{}],218:[function(_dereq_,module,exports){\n// https://stackoverflow.com/a/36213464\nif (!String.prototype.startsWith) {\n String.prototype.startsWith = function(searchString, position){\n position = position || 0;\n return this.substr(position, searchString.length) === searchString;\n };\n}\n\n},{}],219:[function(_dereq_,module,exports){\n/*\n * Copyright 2015 Google Inc. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Util = {};\n\nUtil.base64 = function(mimeType, base64) {\n return 'data:' + mimeType + ';base64,' + base64;\n};\n\nUtil.isMobile = function() {\n var check = false;\n (function(a){if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);\n return check;\n};\n\nUtil.isIOS = function() {\n return /(iPad|iPhone|iPod)/g.test(navigator.userAgent);\n};\n\nUtil.isIFrame = function() {\n try {\n return window.self !== window.top;\n } catch (e) {\n return true;\n }\n};\n\nUtil.appendQueryParameter = function(url, key, value) {\n // Determine delimiter based on if the URL already GET parameters in it.\n var delimiter = (url.indexOf('?') < 0 ? '?' : '&');\n url += delimiter + key + '=' + value;\n return url;\n};\n\n// From http://goo.gl/4WX3tg\nUtil.getQueryParameter = function(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\n results = regex.exec(location.search);\n return results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n};\n\nUtil.isLandscapeMode = function() {\n return (window.orientation == 90 || window.orientation == -90);\n};\n\n\nmodule.exports = Util;\n\n},{}],220:[function(_dereq_,module,exports){\n/*\n * Copyright 2015 Google Inc. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Util = _dereq_('./util.js');\n\n/**\n * Android and iOS compatible wakelock implementation.\n *\n * Refactored thanks to dkovalev@.\n */\nfunction AndroidWakeLock() {\n var video = document.createElement('video');\n\n video.addEventListener('ended', function() {\n video.play();\n });\n\n this.request = function() {\n if (video.paused) {\n // Base64 version of videos_src/no-sleep-60s.webm.\n video.src = Util.base64('video/webm', 'GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAAH4xFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsggfG7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU2LjQwLjEwMVdBjUxhdmY1Ni40MC4xMDFzpJAGSJTMbsLpDt/ySkipgX1fRImIQO1MAAAAAAAWVK5rAQAAAAAAADuuAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDmDgQEj44OEO5rKAOABAAAAAAAABrCBsLqBkB9DtnUBAAAAAAAAo+eBAKOmgQAAgKJJg0IAAV4BHsAHBIODCoAACmH2MAAAZxgz4dPSTFi5JACjloED6ACmAECSnABMQAADYAAAWi0quoCjloEH0ACmAECSnABNwAADYAAAWi0quoCjloELuACmAECSnABNgAADYAAAWi0quoCjloEPoACmAECSnABNYAADYAAAWi0quoCjloETiACmAECSnABNIAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTnghdwo5aBAAAApgBAkpwATOAAA2AAAFotKrqAo5aBA+gApgBAkpwATMAAA2AAAFotKrqAo5aBB9AApgBAkpwATIAAA2AAAFotKrqAo5aBC7gApgBAkpwATEAAA2AAAFotKrqAo5aBD6AApgDAkpwAQ2AAA2AAAFotKrqAo5aBE4gApgBAkpwATCAAA2AAAFotKrqAH0O2dQEAAAAAAACU54Iu4KOWgQAAAKYAQJKcAEvAAANgAABaLSq6gKOWgQPoAKYAQJKcAEtgAANgAABaLSq6gKOWgQfQAKYAQJKcAEsAAANgAABaLSq6gKOWgQu4AKYAQJKcAEqAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEogAANgAABaLSq6gKOWgROIAKYAQJKcAEnAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCRlCjloEAAACmAECSnABJgAADYAAAWi0quoCjloED6ACmAECSnABJIAADYAAAWi0quoCjloEH0ACmAMCSnABDYAADYAAAWi0quoCjloELuACmAECSnABI4AADYAAAWi0quoCjloEPoACmAECSnABIoAADYAAAWi0quoCjloETiACmAECSnABIYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngl3Ao5aBAAAApgBAkpwASCAAA2AAAFotKrqAo5aBA+gApgBAkpwASAAAA2AAAFotKrqAo5aBB9AApgBAkpwAR8AAA2AAAFotKrqAo5aBC7gApgBAkpwAR4AAA2AAAFotKrqAo5aBD6AApgBAkpwAR2AAA2AAAFotKrqAo5aBE4gApgBAkpwARyAAA2AAAFotKrqAH0O2dQEAAAAAAACU54J1MKOWgQAAAKYAwJKcAENgAANgAABaLSq6gKOWgQPoAKYAQJKcAEbgAANgAABaLSq6gKOWgQfQAKYAQJKcAEagAANgAABaLSq6gKOWgQu4AKYAQJKcAEaAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEZAAANgAABaLSq6gKOWgROIAKYAQJKcAEYAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCjKCjloEAAACmAECSnABF4AADYAAAWi0quoCjloED6ACmAECSnABFwAADYAAAWi0quoCjloEH0ACmAECSnABFoAADYAAAWi0quoCjloELuACmAECSnABFgAADYAAAWi0quoCjloEPoACmAMCSnABDYAADYAAAWi0quoCjloETiACmAECSnABFYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngqQQo5aBAAAApgBAkpwARUAAA2AAAFotKrqAo5aBA+gApgBAkpwARSAAA2AAAFotKrqAo5aBB9AApgBAkpwARQAAA2AAAFotKrqAo5aBC7gApgBAkpwARQAAA2AAAFotKrqAo5aBD6AApgBAkpwAROAAA2AAAFotKrqAo5aBE4gApgBAkpwARMAAA2AAAFotKrqAH0O2dQEAAAAAAACU54K7gKOWgQAAAKYAQJKcAESgAANgAABaLSq6gKOWgQPoAKYAQJKcAESAAANgAABaLSq6gKOWgQfQAKYAwJKcAENgAANgAABaLSq6gKOWgQu4AKYAQJKcAERgAANgAABaLSq6gKOWgQ+gAKYAQJKcAERAAANgAABaLSq6gKOWgROIAKYAQJKcAEQgAANgAABaLSq6gB9DtnUBAAAAAAAAlOeC0vCjloEAAACmAECSnABEIAADYAAAWi0quoCjloED6ACmAECSnABEAAADYAAAWi0quoCjloEH0ACmAECSnABD4AADYAAAWi0quoCjloELuACmAECSnABDwAADYAAAWi0quoCjloEPoACmAECSnABDoAADYAAAWi0quoCjloETiACmAECSnABDgAADYAAAWi0quoAcU7trAQAAAAAAABG7j7OBALeK94EB8YIBd/CBAw==');\n video.play();\n }\n };\n\n this.release = function() {\n video.pause();\n video.src = '';\n };\n}\n\nfunction iOSWakeLock() {\n var timer = null;\n\n this.request = function() {\n if (!timer) {\n timer = setInterval(function() {\n window.location.href = '/';\n setTimeout(window.stop, 0);\n }, 15000);\n }\n }\n\n this.release = function() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n}\n\n\nfunction getWakeLock() {\n var userAgent = navigator.userAgent || navigator.vendor || window.opera;\n if (userAgent.match(/iPhone/i) || userAgent.match(/iPod/i)) {\n return iOSWakeLock;\n } else {\n return AndroidWakeLock;\n }\n}\n\nmodule.exports = getWakeLock();\n\n},{\"./util.js\":219}]},{},[177])(177)\n});\n//# sourceMappingURL=aframe-master.js.map\n","require('./src/controls');\nrequire('./src/loaders');\nrequire('./src/misc');\nrequire('./src/pathfinding');\nrequire('./src/primitives');\n","require('./checkpoint-controls');\nrequire('./gamepad-controls');\nrequire('./keyboard-controls');\nrequire('./touch-controls');\nrequire('./movement-controls');\nrequire('./trackpad-controls');\n","const EPS = 0.1;\n\nmodule.exports = AFRAME.registerComponent('checkpoint-controls', {\n schema: {\n enabled: {default: true},\n mode: {default: 'teleport', oneOf: ['teleport', 'animate']},\n animateSpeed: {default: 3.0}\n },\n\n init: function () {\n this.active = true;\n this.checkpoint = null;\n\n this.isNavMeshConstrained = false;\n\n this.offset = new THREE.Vector3();\n this.position = new THREE.Vector3();\n this.targetPosition = new THREE.Vector3();\n },\n\n play: function () { this.active = true; },\n pause: function () { this.active = false; },\n\n setCheckpoint: function (checkpoint) {\n const el = this.el;\n\n if (!this.active) return;\n if (this.checkpoint === checkpoint) return;\n\n if (this.checkpoint) {\n el.emit('navigation-end', {checkpoint: this.checkpoint});\n }\n\n this.checkpoint = checkpoint;\n this.sync();\n\n // Ignore new checkpoint if we're already there.\n if (this.position.distanceTo(this.targetPosition) < EPS) {\n this.checkpoint = null;\n return;\n }\n\n el.emit('navigation-start', {checkpoint: checkpoint});\n\n if (this.data.mode === 'teleport') {\n this.el.setAttribute('position', this.targetPosition);\n this.checkpoint = null;\n el.emit('navigation-end', {checkpoint: checkpoint});\n el.components['movement-controls'].updateNavLocation();\n }\n },\n\n isVelocityActive: function () {\n return !!(this.active && this.checkpoint);\n },\n\n getVelocity: function () {\n if (!this.active) return;\n\n const data = this.data;\n const offset = this.offset;\n const position = this.position;\n const targetPosition = this.targetPosition;\n const checkpoint = this.checkpoint;\n\n this.sync();\n if (position.distanceTo(targetPosition) < EPS) {\n this.checkpoint = null;\n this.el.emit('navigation-end', {checkpoint: checkpoint});\n return offset.set(0, 0, 0);\n }\n offset.setLength(data.animateSpeed);\n return offset;\n },\n\n sync: function () {\n const offset = this.offset;\n const position = this.position;\n const targetPosition = this.targetPosition;\n\n position.copy(this.el.getAttribute('position'));\n this.checkpoint.object3D.getWorldPosition(targetPosition);\n targetPosition.add(this.checkpoint.components.checkpoint.getOffset());\n offset.copy(targetPosition).sub(position);\n }\n});\n","/**\n * Gamepad controls for A-Frame.\n *\n * Stripped-down version of: https://github.com/donmccurdy/aframe-gamepad-controls\n *\n * For more information about the Gamepad API, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API\n */\n\nconst GamepadButton = require('../../lib/GamepadButton'),\n GamepadButtonEvent = require('../../lib/GamepadButtonEvent');\n\nconst JOYSTICK_EPS = 0.2;\n\nconst Hand = {\n LEFT: 'left',\n RIGHT: 'right'\n};\n\nconst Joystick = {\n MOVEMENT: 1,\n ROTATION: 2\n};\n\nmodule.exports = AFRAME.registerComponent('gamepad-controls', {\n\n /*******************************************************************\n * Statics\n */\n\n GamepadButton: GamepadButton,\n\n /*******************************************************************\n * Schema\n */\n\n schema: {\n // Enable/disable gamepad-controls\n enabled: { default: true },\n\n // Heading element for rotation\n camera: { default: '[camera]', type: 'selector' },\n\n // Rotation sensitivity\n rotationSensitivity: { default: 2.0 },\n },\n\n /*******************************************************************\n * Core\n */\n\n /**\n * Called once when component is attached. Generally for initial setup.\n */\n init: function () {\n const sceneEl = this.el.sceneEl;\n\n this.system = sceneEl.systems['tracked-controls-webxr'] || {controllers: []};\n\n this.prevTime = window.performance.now();\n\n // Button state\n this.buttons = {};\n\n // Rotation\n const rotation = this.el.object3D.rotation;\n this.pitch = new THREE.Object3D();\n this.pitch.rotation.x = THREE.Math.degToRad(rotation.x);\n this.yaw = new THREE.Object3D();\n this.yaw.position.y = 10;\n this.yaw.rotation.y = THREE.Math.degToRad(rotation.y);\n this.yaw.add(this.pitch);\n\n this._lookVector = new THREE.Vector2();\n this._moveVector = new THREE.Vector2();\n this._dpadVector = new THREE.Vector2();\n\n sceneEl.addBehavior(this);\n },\n\n /**\n * Called when component is attached and when component data changes.\n * Generally modifies the entity based on the data.\n */\n update: function () { this.tick(); },\n\n /**\n * Called on each iteration of main render loop.\n */\n tick: function (t, dt) {\n this.updateButtonState();\n this.updateRotation(dt);\n },\n\n /**\n * Called when a component is removed (e.g., via removeAttribute).\n * Generally undoes all modifications to the entity.\n */\n remove: function () { },\n\n /*******************************************************************\n * Movement\n */\n\n isVelocityActive: function () {\n if (!this.data.enabled || !this.isConnected()) return false;\n\n const dpad = this._dpadVector;\n const joystick = this._moveVector;\n\n this.getDpad(dpad);\n this.getJoystick(Joystick.MOVEMENT, joystick);\n\n const inputX = dpad.x || joystick.x;\n const inputY = dpad.y || joystick.y;\n\n return Math.abs(inputX) > JOYSTICK_EPS || Math.abs(inputY) > JOYSTICK_EPS;\n },\n\n getVelocityDelta: function () {\n const dpad = this._dpadVector;\n const joystick = this._moveVector;\n\n this.getDpad(dpad);\n this.getJoystick(Joystick.MOVEMENT, joystick);\n\n const inputX = dpad.x || joystick.x;\n const inputY = dpad.y || joystick.y;\n const dVelocity = new THREE.Vector3();\n\n if (Math.abs(inputX) > JOYSTICK_EPS) {\n dVelocity.x += inputX;\n }\n if (Math.abs(inputY) > JOYSTICK_EPS) {\n dVelocity.z += inputY;\n }\n\n return dVelocity;\n },\n\n /*******************************************************************\n * Rotation\n */\n\n isRotationActive: function () {\n if (!this.data.enabled || !this.isConnected()) return false;\n\n const joystick = this._lookVector;\n\n this.getJoystick(Joystick.ROTATION, joystick);\n\n return Math.abs(joystick.x) > JOYSTICK_EPS || Math.abs(joystick.y) > JOYSTICK_EPS;\n },\n\n updateRotation: function (dt) {\n if (!this.isRotationActive()) return;\n\n const data = this.data;\n const yaw = this.yaw;\n const pitch = this.pitch;\n const lookControls = data.camera.components['look-controls'];\n const hasLookControls = lookControls && lookControls.pitchObject && lookControls.yawObject;\n\n // Sync with look-controls pitch/yaw if available.\n if (hasLookControls) {\n pitch.rotation.copy(lookControls.pitchObject.rotation);\n yaw.rotation.copy(lookControls.yawObject.rotation);\n }\n\n const lookVector = this._lookVector;\n\n this.getJoystick(Joystick.ROTATION, lookVector);\n\n if (Math.abs(lookVector.x) <= JOYSTICK_EPS) lookVector.x = 0;\n if (Math.abs(lookVector.y) <= JOYSTICK_EPS) lookVector.y = 0;\n\n lookVector.multiplyScalar(data.rotationSensitivity * dt / 1000);\n yaw.rotation.y -= lookVector.x;\n pitch.rotation.x -= lookVector.y;\n pitch.rotation.x = Math.max(- Math.PI / 2, Math.min(Math.PI / 2, pitch.rotation.x));\n data.camera.object3D.rotation.set(pitch.rotation.x, yaw.rotation.y, 0);\n\n // Sync with look-controls pitch/yaw if available.\n if (hasLookControls) {\n lookControls.pitchObject.rotation.copy(pitch.rotation);\n lookControls.yawObject.rotation.copy(yaw.rotation);\n }\n },\n\n /*******************************************************************\n * Button events\n */\n\n updateButtonState: function () {\n const gamepad = this.getGamepad(Hand.RIGHT);\n if (this.data.enabled && gamepad) {\n\n // Fire DOM events for button state changes.\n for (var i = 0; i < gamepad.buttons.length; i++) {\n if (gamepad.buttons[i].pressed && !this.buttons[i]) {\n this.emit(new GamepadButtonEvent('gamepadbuttondown', i, gamepad.buttons[i]));\n } else if (!gamepad.buttons[i].pressed && this.buttons[i]) {\n this.emit(new GamepadButtonEvent('gamepadbuttonup', i, gamepad.buttons[i]));\n }\n this.buttons[i] = gamepad.buttons[i].pressed;\n }\n\n } else if (Object.keys(this.buttons)) {\n // Reset state if controls are disabled or controller is lost.\n this.buttons = {};\n }\n },\n\n emit: function (event) {\n // Emit original event.\n this.el.emit(event.type, event);\n\n // Emit convenience event, identifying button index.\n this.el.emit(\n event.type + ':' + event.index,\n new GamepadButtonEvent(event.type, event.index, event)\n );\n },\n\n /*******************************************************************\n * Gamepad state\n */\n\n /**\n * Returns the Gamepad instance attached to the component. If connected,\n * a proxy-controls component may provide access to Gamepad input from a\n * remote device.\n *\n * @param {string} handPreference\n * @return {Gamepad}\n */\n getGamepad: (function () {\n const _xrGamepads = [];\n const _empty = [];\n\n return function (handPreference) {\n // https://github.com/donmccurdy/aframe-proxy-controls\n const proxyControls = this.el.sceneEl.components['proxy-controls'];\n const proxyGamepad = proxyControls && proxyControls.isConnected()\n && proxyControls.getGamepad(0);\n if (proxyGamepad) return proxyGamepad;\n\n // https://www.w3.org/TR/webxr/#dom-xrinputsource-handedness\n _xrGamepads.length = 0;\n for (let i = 0; i < this.system.controllers.length; i++) {\n const xrController = this.system.controllers[i];\n const xrGamepad = xrController ? xrController.gamepad : null;\n _xrGamepads.push(xrGamepad);\n if (xrGamepad && xrGamepad.handedness === handPreference) return xrGamepad;\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hand\n const navGamepads = navigator.getGamepads ? navigator.getGamepads() : _empty;\n for (let i = 0; i < navGamepads.length; i++) {\n const navGamepad = navGamepads[i];\n if (navGamepad && navGamepad.hand === handPreference) return navGamepad;\n }\n\n return _xrGamepads[0] || navGamepads[0];\n };\n })(),\n\n /**\n * Returns the state of the given button.\n * @param {number} index The button (0-N) for which to find state.\n * @return {GamepadButton}\n */\n getButton: function (index) {\n return this.getGamepad(Hand.RIGHT).buttons[index];\n },\n\n /**\n * Returns state of the given axis. Axes are labelled 0-N, where 0-1 will\n * represent X/Y on the first joystick, and 2-3 X/Y on the second.\n * @param {number} index The axis (0-N) for which to find state.\n * @return {number} On the interval [-1,1].\n */\n getAxis: function (index) {\n return this.getGamepad(index > 1 ? Hand.RIGHT : Hand.LEFT).axes[index];\n },\n\n /**\n * Returns the state of the specified joystick as a THREE.Vector2.\n * @param {Joystick} role\n * @param {THREE.Vector2} target\n * @return {THREE.Vector2}\n */\n getJoystick: function (index, target) {\n const gamepad = this.getGamepad(index === Joystick.MOVEMENT ? Hand.LEFT : Hand.RIGHT);\n if (gamepad.mapping === 'xr-standard') {\n // See: https://github.com/donmccurdy/aframe-extras/issues/307\n switch (index) {\n case Joystick.MOVEMENT: return target.set(gamepad.axes[2], gamepad.axes[3]);\n case Joystick.ROTATION: return target.set(gamepad.axes[0], gamepad.axes[1]);\n }\n } else {\n switch (index) {\n case Joystick.MOVEMENT: return target.set(gamepad.axes[0], gamepad.axes[1]);\n case Joystick.ROTATION: return target.set(gamepad.axes[2], gamepad.axes[3]);\n }\n }\n throw new Error('Unexpected joystick index \"%d\".', index);\n },\n\n /**\n * Returns the state of the dpad as a THREE.Vector2.\n * @param {THREE.Vector2} target\n * @return {THREE.Vector2}\n */\n getDpad: function (target) {\n const gamepad = this.getGamepad(Hand.LEFT);\n if (!gamepad.buttons[GamepadButton.DPAD_RIGHT]) {\n return target.set(0, 0);\n }\n return target.set(\n (gamepad.buttons[GamepadButton.DPAD_RIGHT].pressed ? 1 : 0)\n + (gamepad.buttons[GamepadButton.DPAD_LEFT].pressed ? -1 : 0),\n (gamepad.buttons[GamepadButton.DPAD_UP].pressed ? -1 : 0)\n + (gamepad.buttons[GamepadButton.DPAD_DOWN].pressed ? 1 : 0)\n );\n },\n\n /**\n * Returns true if the gamepad is currently connected to the system.\n * @return {boolean}\n */\n isConnected: function () {\n const gamepad = this.getGamepad(Hand.LEFT);\n return !!(gamepad && gamepad.connected);\n },\n\n /**\n * Returns a string containing some information about the controller. Result\n * may vary across browsers, for a given controller.\n * @return {string}\n */\n getID: function () {\n return this.getGamepad(Hand.LEFT).id;\n }\n});\n","module.exports = Object.assign(function GamepadButton () {}, {\n\tFACE_1: 0,\n\tFACE_2: 1,\n\tFACE_3: 2,\n\tFACE_4: 3,\n\n\tL_SHOULDER_1: 4,\n\tR_SHOULDER_1: 5,\n\tL_SHOULDER_2: 6,\n\tR_SHOULDER_2: 7,\n\n\tSELECT: 8,\n\tSTART: 9,\n\n\tDPAD_UP: 12,\n\tDPAD_DOWN: 13,\n\tDPAD_LEFT: 14,\n\tDPAD_RIGHT: 15,\n\n\tVENDOR: 16,\n});\n","function GamepadButtonEvent (type, index, details) {\n this.type = type;\n this.index = index;\n this.pressed = details.pressed;\n this.value = details.value;\n}\n\nmodule.exports = GamepadButtonEvent;\n","require('../../lib/keyboard.polyfill');\n\nconst MAX_DELTA = 0.2,\n PROXY_FLAG = '__keyboard-controls-proxy';\n\nconst KeyboardEvent = window.KeyboardEvent;\n\n/**\n * Keyboard Controls component.\n *\n * Stripped-down version of: https://github.com/donmccurdy/aframe-keyboard-controls\n *\n * Bind keyboard events to components, or control your entities with the WASD keys.\n *\n * Why use KeyboardEvent.code? \"This is set to a string representing the key that was pressed to\n * generate the KeyboardEvent, without taking the current keyboard layout (e.g., QWERTY vs.\n * Dvorak), locale (e.g., English vs. French), or any modifier keys into account. This is useful\n * when you care about which physical key was pressed, rather thanwhich character it corresponds\n * to. For example, if you’re a writing a game, you might want a certain set of keys to move the\n * player in different directions, and that mapping should ideally be independent of keyboard\n * layout. See: https://developers.google.com/web/updates/2016/04/keyboardevent-keys-codes\n *\n * @namespace wasd-controls\n * keys the entity moves and if you release it will stop. Easing simulates friction.\n * to the entity when pressing the keys.\n * @param {bool} [enabled=true] - To completely enable or disable the controls\n */\nmodule.exports = AFRAME.registerComponent('keyboard-controls', {\n schema: {\n enabled: { default: true },\n debug: { default: false }\n },\n\n init: function () {\n this.dVelocity = new THREE.Vector3();\n this.localKeys = {};\n this.listeners = {\n keydown: this.onKeyDown.bind(this),\n keyup: this.onKeyUp.bind(this),\n blur: this.onBlur.bind(this)\n };\n this.attachEventListeners();\n },\n\n /*******************************************************************\n * Movement\n */\n\n isVelocityActive: function () {\n return this.data.enabled && !!Object.keys(this.getKeys()).length;\n },\n\n getVelocityDelta: function () {\n const data = this.data,\n keys = this.getKeys();\n\n this.dVelocity.set(0, 0, 0);\n if (data.enabled) {\n if (keys.KeyW || keys.ArrowUp) { this.dVelocity.z -= 1; }\n if (keys.KeyA || keys.ArrowLeft) { this.dVelocity.x -= 1; }\n if (keys.KeyS || keys.ArrowDown) { this.dVelocity.z += 1; }\n if (keys.KeyD || keys.ArrowRight) { this.dVelocity.x += 1; }\n }\n\n return this.dVelocity.clone();\n },\n\n /*******************************************************************\n * Events\n */\n\n play: function () {\n this.attachEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n },\n\n remove: function () {\n this.pause();\n },\n\n attachEventListeners: function () {\n window.addEventListener('keydown', this.listeners.keydown, false);\n window.addEventListener('keyup', this.listeners.keyup, false);\n window.addEventListener('blur', this.listeners.blur, false);\n },\n\n removeEventListeners: function () {\n window.removeEventListener('keydown', this.listeners.keydown);\n window.removeEventListener('keyup', this.listeners.keyup);\n window.removeEventListener('blur', this.listeners.blur);\n },\n\n onKeyDown: function (event) {\n if (AFRAME.utils.shouldCaptureKeyEvent(event)) {\n this.localKeys[event.code] = true;\n this.emit(event);\n }\n },\n\n onKeyUp: function (event) {\n if (AFRAME.utils.shouldCaptureKeyEvent(event)) {\n delete this.localKeys[event.code];\n this.emit(event);\n }\n },\n\n onBlur: function () {\n for (let code in this.localKeys) {\n if (this.localKeys.hasOwnProperty(code)) {\n delete this.localKeys[code];\n }\n }\n },\n\n emit: function (event) {\n // TODO - keydown only initially?\n // TODO - where the f is the spacebar\n\n // Emit original event.\n if (PROXY_FLAG in event) {\n // TODO - Method never triggered.\n this.el.emit(event.type, event);\n }\n\n // Emit convenience event, identifying key.\n this.el.emit(event.type + ':' + event.code, new KeyboardEvent(event.type, event));\n if (this.data.debug) console.log(event.type + ':' + event.code);\n },\n\n /*******************************************************************\n * Accessors\n */\n\n isPressed: function (code) {\n return code in this.getKeys();\n },\n\n getKeys: function () {\n if (this.isProxied()) {\n return this.el.sceneEl.components['proxy-controls'].getKeyboard();\n }\n return this.localKeys;\n },\n\n isProxied: function () {\n const proxyControls = this.el.sceneEl.components['proxy-controls'];\n return proxyControls && proxyControls.isConnected();\n }\n\n});\n","/**\n * Polyfill for the additional KeyboardEvent properties defined in the D3E and\n * D4E draft specifications, by @inexorabletash.\n *\n * See: https://github.com/inexorabletash/polyfill\n */\n(function(global) {\n var nativeKeyboardEvent = ('KeyboardEvent' in global);\n if (!nativeKeyboardEvent)\n global.KeyboardEvent = function KeyboardEvent() { throw TypeError('Illegal constructor'); };\n\n if (!('DOM_KEY_LOCATION_STANDARD' in global.KeyboardEvent)) global.KeyboardEvent.DOM_KEY_LOCATION_STANDARD = 0x00; // Default or unknown location\n if (!('DOM_KEY_LOCATION_LEFT' in global.KeyboardEvent)) global.KeyboardEvent.DOM_KEY_LOCATION_LEFT = 0x01; // e.g. Left Alt key\n if (!('DOM_KEY_LOCATION_RIGHT' in global.KeyboardEvent)) global.KeyboardEvent.DOM_KEY_LOCATION_RIGHT = 0x02; // e.g. Right Alt key\n if (!('DOM_KEY_LOCATION_NUMPAD' in global.KeyboardEvent)) global.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD = 0x03; // e.g. Numpad 0 or +\n\n var STANDARD = window.KeyboardEvent.DOM_KEY_LOCATION_STANDARD,\n LEFT = window.KeyboardEvent.DOM_KEY_LOCATION_LEFT,\n RIGHT = window.KeyboardEvent.DOM_KEY_LOCATION_RIGHT,\n NUMPAD = window.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;\n\n //--------------------------------------------------------------------\n //\n // Utilities\n //\n //--------------------------------------------------------------------\n\n function contains(s, ss) { return String(s).indexOf(ss) !== -1; }\n\n var os = (function() {\n if (contains(navigator.platform, 'Win')) { return 'win'; }\n if (contains(navigator.platform, 'Mac')) { return 'mac'; }\n if (contains(navigator.platform, 'CrOS')) { return 'cros'; }\n if (contains(navigator.platform, 'Linux')) { return 'linux'; }\n if (contains(navigator.userAgent, 'iPad') || contains(navigator.platform, 'iPod') || contains(navigator.platform, 'iPhone')) { return 'ios'; }\n return '';\n } ());\n\n var browser = (function() {\n if (contains(navigator.userAgent, 'Chrome/')) { return 'chrome'; }\n if (contains(navigator.vendor, 'Apple')) { return 'safari'; }\n if (contains(navigator.userAgent, 'MSIE')) { return 'ie'; }\n if (contains(navigator.userAgent, 'Gecko/')) { return 'moz'; }\n if (contains(navigator.userAgent, 'Opera/')) { return 'opera'; }\n return '';\n } ());\n\n var browser_os = browser + '-' + os;\n\n function mergeIf(baseTable, select, table) {\n if (browser_os === select || browser === select || os === select) {\n Object.keys(table).forEach(function(keyCode) {\n baseTable[keyCode] = table[keyCode];\n });\n }\n }\n\n function remap(o, key) {\n var r = {};\n Object.keys(o).forEach(function(k) {\n var item = o[k];\n if (key in item) {\n r[item[key]] = item;\n }\n });\n return r;\n }\n\n function invert(o) {\n var r = {};\n Object.keys(o).forEach(function(k) {\n r[o[k]] = k;\n });\n return r;\n }\n\n //--------------------------------------------------------------------\n //\n // Generic Mappings\n //\n //--------------------------------------------------------------------\n\n // \"keyInfo\" is a dictionary:\n // code: string - name from DOM Level 3 KeyboardEvent code Values\n // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3Events-code.html\n // location (optional): number - one of the DOM_KEY_LOCATION values\n // keyCap (optional): string - keyboard label in en-US locale\n // USB code Usage ID from page 0x07 unless otherwise noted (Informative)\n\n // Map of keyCode to keyInfo\n var keyCodeToInfoTable = {\n // 0x01 - VK_LBUTTON\n // 0x02 - VK_RBUTTON\n 0x03: { code: 'Cancel' }, // [USB: 0x9b] char \\x0018 ??? (Not in D3E)\n // 0x04 - VK_MBUTTON\n // 0x05 - VK_XBUTTON1\n // 0x06 - VK_XBUTTON2\n 0x06: { code: 'Help' }, // [USB: 0x75] ???\n // 0x07 - undefined\n 0x08: { code: 'Backspace' }, // [USB: 0x2a] Labelled Delete on Macintosh keyboards.\n 0x09: { code: 'Tab' }, // [USB: 0x2b]\n // 0x0A-0x0B - reserved\n 0X0C: { code: 'Clear' }, // [USB: 0x9c] NumPad Center (Not in D3E)\n 0X0D: { code: 'Enter' }, // [USB: 0x28]\n // 0x0E-0x0F - undefined\n\n 0x10: { code: 'Shift' },\n 0x11: { code: 'Control' },\n 0x12: { code: 'Alt' },\n 0x13: { code: 'Pause' }, // [USB: 0x48]\n 0x14: { code: 'CapsLock' }, // [USB: 0x39]\n 0x15: { code: 'KanaMode' }, // [USB: 0x88] - \"HangulMode\" for Korean layout\n 0x16: { code: 'HangulMode' }, // [USB: 0x90] 0x15 as well in MSDN VK table ???\n 0x17: { code: 'JunjaMode' }, // (Not in D3E)\n 0x18: { code: 'FinalMode' }, // (Not in D3E)\n 0x19: { code: 'KanjiMode' }, // [USB: 0x91] - \"HanjaMode\" for Korean layout\n // 0x1A - undefined\n 0x1B: { code: 'Escape' }, // [USB: 0x29]\n 0x1C: { code: 'Convert' }, // [USB: 0x8a]\n 0x1D: { code: 'NonConvert' }, // [USB: 0x8b]\n 0x1E: { code: 'Accept' }, // (Not in D3E)\n 0x1F: { code: 'ModeChange' }, // (Not in D3E)\n\n 0x20: { code: 'Space' }, // [USB: 0x2c]\n 0x21: { code: 'PageUp' }, // [USB: 0x4b]\n 0x22: { code: 'PageDown' }, // [USB: 0x4e]\n 0x23: { code: 'End' }, // [USB: 0x4d]\n 0x24: { code: 'Home' }, // [USB: 0x4a]\n 0x25: { code: 'ArrowLeft' }, // [USB: 0x50]\n 0x26: { code: 'ArrowUp' }, // [USB: 0x52]\n 0x27: { code: 'ArrowRight' }, // [USB: 0x4f]\n 0x28: { code: 'ArrowDown' }, // [USB: 0x51]\n 0x29: { code: 'Select' }, // (Not in D3E)\n 0x2A: { code: 'Print' }, // (Not in D3E)\n 0x2B: { code: 'Execute' }, // [USB: 0x74] (Not in D3E)\n 0x2C: { code: 'PrintScreen' }, // [USB: 0x46]\n 0x2D: { code: 'Insert' }, // [USB: 0x49]\n 0x2E: { code: 'Delete' }, // [USB: 0x4c]\n 0x2F: { code: 'Help' }, // [USB: 0x75] ???\n\n 0x30: { code: 'Digit0', keyCap: '0' }, // [USB: 0x27] 0)\n 0x31: { code: 'Digit1', keyCap: '1' }, // [USB: 0x1e] 1!\n 0x32: { code: 'Digit2', keyCap: '2' }, // [USB: 0x1f] 2@\n 0x33: { code: 'Digit3', keyCap: '3' }, // [USB: 0x20] 3#\n 0x34: { code: 'Digit4', keyCap: '4' }, // [USB: 0x21] 4$\n 0x35: { code: 'Digit5', keyCap: '5' }, // [USB: 0x22] 5%\n 0x36: { code: 'Digit6', keyCap: '6' }, // [USB: 0x23] 6^\n 0x37: { code: 'Digit7', keyCap: '7' }, // [USB: 0x24] 7&\n 0x38: { code: 'Digit8', keyCap: '8' }, // [USB: 0x25] 8*\n 0x39: { code: 'Digit9', keyCap: '9' }, // [USB: 0x26] 9(\n // 0x3A-0x40 - undefined\n\n 0x41: { code: 'KeyA', keyCap: 'a' }, // [USB: 0x04]\n 0x42: { code: 'KeyB', keyCap: 'b' }, // [USB: 0x05]\n 0x43: { code: 'KeyC', keyCap: 'c' }, // [USB: 0x06]\n 0x44: { code: 'KeyD', keyCap: 'd' }, // [USB: 0x07]\n 0x45: { code: 'KeyE', keyCap: 'e' }, // [USB: 0x08]\n 0x46: { code: 'KeyF', keyCap: 'f' }, // [USB: 0x09]\n 0x47: { code: 'KeyG', keyCap: 'g' }, // [USB: 0x0a]\n 0x48: { code: 'KeyH', keyCap: 'h' }, // [USB: 0x0b]\n 0x49: { code: 'KeyI', keyCap: 'i' }, // [USB: 0x0c]\n 0x4A: { code: 'KeyJ', keyCap: 'j' }, // [USB: 0x0d]\n 0x4B: { code: 'KeyK', keyCap: 'k' }, // [USB: 0x0e]\n 0x4C: { code: 'KeyL', keyCap: 'l' }, // [USB: 0x0f]\n 0x4D: { code: 'KeyM', keyCap: 'm' }, // [USB: 0x10]\n 0x4E: { code: 'KeyN', keyCap: 'n' }, // [USB: 0x11]\n 0x4F: { code: 'KeyO', keyCap: 'o' }, // [USB: 0x12]\n\n 0x50: { code: 'KeyP', keyCap: 'p' }, // [USB: 0x13]\n 0x51: { code: 'KeyQ', keyCap: 'q' }, // [USB: 0x14]\n 0x52: { code: 'KeyR', keyCap: 'r' }, // [USB: 0x15]\n 0x53: { code: 'KeyS', keyCap: 's' }, // [USB: 0x16]\n 0x54: { code: 'KeyT', keyCap: 't' }, // [USB: 0x17]\n 0x55: { code: 'KeyU', keyCap: 'u' }, // [USB: 0x18]\n 0x56: { code: 'KeyV', keyCap: 'v' }, // [USB: 0x19]\n 0x57: { code: 'KeyW', keyCap: 'w' }, // [USB: 0x1a]\n 0x58: { code: 'KeyX', keyCap: 'x' }, // [USB: 0x1b]\n 0x59: { code: 'KeyY', keyCap: 'y' }, // [USB: 0x1c]\n 0x5A: { code: 'KeyZ', keyCap: 'z' }, // [USB: 0x1d]\n 0x5B: { code: 'OSLeft', location: LEFT }, // [USB: 0xe3]\n 0x5C: { code: 'OSRight', location: RIGHT }, // [USB: 0xe7]\n 0x5D: { code: 'ContextMenu' }, // [USB: 0x65] Context Menu\n // 0x5E - reserved\n 0x5F: { code: 'Standby' }, // [USB: 0x82] Sleep\n\n 0x60: { code: 'Numpad0', keyCap: '0', location: NUMPAD }, // [USB: 0x62]\n 0x61: { code: 'Numpad1', keyCap: '1', location: NUMPAD }, // [USB: 0x59]\n 0x62: { code: 'Numpad2', keyCap: '2', location: NUMPAD }, // [USB: 0x5a]\n 0x63: { code: 'Numpad3', keyCap: '3', location: NUMPAD }, // [USB: 0x5b]\n 0x64: { code: 'Numpad4', keyCap: '4', location: NUMPAD }, // [USB: 0x5c]\n 0x65: { code: 'Numpad5', keyCap: '5', location: NUMPAD }, // [USB: 0x5d]\n 0x66: { code: 'Numpad6', keyCap: '6', location: NUMPAD }, // [USB: 0x5e]\n 0x67: { code: 'Numpad7', keyCap: '7', location: NUMPAD }, // [USB: 0x5f]\n 0x68: { code: 'Numpad8', keyCap: '8', location: NUMPAD }, // [USB: 0x60]\n 0x69: { code: 'Numpad9', keyCap: '9', location: NUMPAD }, // [USB: 0x61]\n 0x6A: { code: 'NumpadMultiply', keyCap: '*', location: NUMPAD }, // [USB: 0x55]\n 0x6B: { code: 'NumpadAdd', keyCap: '+', location: NUMPAD }, // [USB: 0x57]\n 0x6C: { code: 'NumpadComma', keyCap: ',', location: NUMPAD }, // [USB: 0x85]\n 0x6D: { code: 'NumpadSubtract', keyCap: '-', location: NUMPAD }, // [USB: 0x56]\n 0x6E: { code: 'NumpadDecimal', keyCap: '.', location: NUMPAD }, // [USB: 0x63]\n 0x6F: { code: 'NumpadDivide', keyCap: '/', location: NUMPAD }, // [USB: 0x54]\n\n 0x70: { code: 'F1' }, // [USB: 0x3a]\n 0x71: { code: 'F2' }, // [USB: 0x3b]\n 0x72: { code: 'F3' }, // [USB: 0x3c]\n 0x73: { code: 'F4' }, // [USB: 0x3d]\n 0x74: { code: 'F5' }, // [USB: 0x3e]\n 0x75: { code: 'F6' }, // [USB: 0x3f]\n 0x76: { code: 'F7' }, // [USB: 0x40]\n 0x77: { code: 'F8' }, // [USB: 0x41]\n 0x78: { code: 'F9' }, // [USB: 0x42]\n 0x79: { code: 'F10' }, // [USB: 0x43]\n 0x7A: { code: 'F11' }, // [USB: 0x44]\n 0x7B: { code: 'F12' }, // [USB: 0x45]\n 0x7C: { code: 'F13' }, // [USB: 0x68]\n 0x7D: { code: 'F14' }, // [USB: 0x69]\n 0x7E: { code: 'F15' }, // [USB: 0x6a]\n 0x7F: { code: 'F16' }, // [USB: 0x6b]\n\n 0x80: { code: 'F17' }, // [USB: 0x6c]\n 0x81: { code: 'F18' }, // [USB: 0x6d]\n 0x82: { code: 'F19' }, // [USB: 0x6e]\n 0x83: { code: 'F20' }, // [USB: 0x6f]\n 0x84: { code: 'F21' }, // [USB: 0x70]\n 0x85: { code: 'F22' }, // [USB: 0x71]\n 0x86: { code: 'F23' }, // [USB: 0x72]\n 0x87: { code: 'F24' }, // [USB: 0x73]\n // 0x88-0x8F - unassigned\n\n 0x90: { code: 'NumLock', location: NUMPAD }, // [USB: 0x53]\n 0x91: { code: 'ScrollLock' }, // [USB: 0x47]\n // 0x92-0x96 - OEM specific\n // 0x97-0x9F - unassigned\n\n // NOTE: 0xA0-0xA5 usually mapped to 0x10-0x12 in browsers\n 0xA0: { code: 'ShiftLeft', location: LEFT }, // [USB: 0xe1]\n 0xA1: { code: 'ShiftRight', location: RIGHT }, // [USB: 0xe5]\n 0xA2: { code: 'ControlLeft', location: LEFT }, // [USB: 0xe0]\n 0xA3: { code: 'ControlRight', location: RIGHT }, // [USB: 0xe4]\n 0xA4: { code: 'AltLeft', location: LEFT }, // [USB: 0xe2]\n 0xA5: { code: 'AltRight', location: RIGHT }, // [USB: 0xe6]\n\n 0xA6: { code: 'BrowserBack' }, // [USB: 0x0c/0x0224]\n 0xA7: { code: 'BrowserForward' }, // [USB: 0x0c/0x0225]\n 0xA8: { code: 'BrowserRefresh' }, // [USB: 0x0c/0x0227]\n 0xA9: { code: 'BrowserStop' }, // [USB: 0x0c/0x0226]\n 0xAA: { code: 'BrowserSearch' }, // [USB: 0x0c/0x0221]\n 0xAB: { code: 'BrowserFavorites' }, // [USB: 0x0c/0x0228]\n 0xAC: { code: 'BrowserHome' }, // [USB: 0x0c/0x0222]\n 0xAD: { code: 'VolumeMute' }, // [USB: 0x7f]\n 0xAE: { code: 'VolumeDown' }, // [USB: 0x81]\n 0xAF: { code: 'VolumeUp' }, // [USB: 0x80]\n\n 0xB0: { code: 'MediaTrackNext' }, // [USB: 0x0c/0x00b5]\n 0xB1: { code: 'MediaTrackPrevious' }, // [USB: 0x0c/0x00b6]\n 0xB2: { code: 'MediaStop' }, // [USB: 0x0c/0x00b7]\n 0xB3: { code: 'MediaPlayPause' }, // [USB: 0x0c/0x00cd]\n 0xB4: { code: 'LaunchMail' }, // [USB: 0x0c/0x018a]\n 0xB5: { code: 'MediaSelect' },\n 0xB6: { code: 'LaunchApp1' },\n 0xB7: { code: 'LaunchApp2' },\n // 0xB8-0xB9 - reserved\n 0xBA: { code: 'Semicolon', keyCap: ';' }, // [USB: 0x33] ;: (US Standard 101)\n 0xBB: { code: 'Equal', keyCap: '=' }, // [USB: 0x2e] =+\n 0xBC: { code: 'Comma', keyCap: ',' }, // [USB: 0x36] ,<\n 0xBD: { code: 'Minus', keyCap: '-' }, // [USB: 0x2d] -_\n 0xBE: { code: 'Period', keyCap: '.' }, // [USB: 0x37] .>\n 0xBF: { code: 'Slash', keyCap: '/' }, // [USB: 0x38] /? (US Standard 101)\n\n 0xC0: { code: 'Backquote', keyCap: '`' }, // [USB: 0x35] `~ (US Standard 101)\n // 0xC1-0xCF - reserved\n\n // 0xD0-0xD7 - reserved\n // 0xD8-0xDA - unassigned\n 0xDB: { code: 'BracketLeft', keyCap: '[' }, // [USB: 0x2f] [{ (US Standard 101)\n 0xDC: { code: 'Backslash', keyCap: '\\\\' }, // [USB: 0x31] \\| (US Standard 101)\n 0xDD: { code: 'BracketRight', keyCap: ']' }, // [USB: 0x30] ]} (US Standard 101)\n 0xDE: { code: 'Quote', keyCap: '\\'' }, // [USB: 0x34] '\" (US Standard 101)\n // 0xDF - miscellaneous/varies\n\n // 0xE0 - reserved\n // 0xE1 - OEM specific\n 0xE2: { code: 'IntlBackslash', keyCap: '\\\\' }, // [USB: 0x64] \\| (UK Standard 102)\n // 0xE3-0xE4 - OEM specific\n 0xE5: { code: 'Process' }, // (Not in D3E)\n // 0xE6 - OEM specific\n // 0xE7 - VK_PACKET\n // 0xE8 - unassigned\n // 0xE9-0xEF - OEM specific\n\n // 0xF0-0xF5 - OEM specific\n 0xF6: { code: 'Attn' }, // [USB: 0x9a] (Not in D3E)\n 0xF7: { code: 'CrSel' }, // [USB: 0xa3] (Not in D3E)\n 0xF8: { code: 'ExSel' }, // [USB: 0xa4] (Not in D3E)\n 0xF9: { code: 'EraseEof' }, // (Not in D3E)\n 0xFA: { code: 'Play' }, // (Not in D3E)\n 0xFB: { code: 'ZoomToggle' }, // (Not in D3E)\n // 0xFC - VK_NONAME - reserved\n // 0xFD - VK_PA1\n 0xFE: { code: 'Clear' } // [USB: 0x9c] (Not in D3E)\n };\n\n // No legacy keyCode, but listed in D3E:\n\n // code: usb\n // 'IntlHash': 0x070032,\n // 'IntlRo': 0x070087,\n // 'IntlYen': 0x070089,\n // 'NumpadBackspace': 0x0700bb,\n // 'NumpadClear': 0x0700d8,\n // 'NumpadClearEntry': 0x0700d9,\n // 'NumpadMemoryAdd': 0x0700d3,\n // 'NumpadMemoryClear': 0x0700d2,\n // 'NumpadMemoryRecall': 0x0700d1,\n // 'NumpadMemoryStore': 0x0700d0,\n // 'NumpadMemorySubtract': 0x0700d4,\n // 'NumpadParenLeft': 0x0700b6,\n // 'NumpadParenRight': 0x0700b7,\n\n //--------------------------------------------------------------------\n //\n // Browser/OS Specific Mappings\n //\n //--------------------------------------------------------------------\n\n mergeIf(keyCodeToInfoTable,\n 'moz', {\n 0x3B: { code: 'Semicolon', keyCap: ';' }, // [USB: 0x33] ;: (US Standard 101)\n 0x3D: { code: 'Equal', keyCap: '=' }, // [USB: 0x2e] =+\n 0x6B: { code: 'Equal', keyCap: '=' }, // [USB: 0x2e] =+\n 0x6D: { code: 'Minus', keyCap: '-' }, // [USB: 0x2d] -_\n 0xBB: { code: 'NumpadAdd', keyCap: '+', location: NUMPAD }, // [USB: 0x57]\n 0xBD: { code: 'NumpadSubtract', keyCap: '-', location: NUMPAD } // [USB: 0x56]\n });\n\n mergeIf(keyCodeToInfoTable,\n 'moz-mac', {\n 0x0C: { code: 'NumLock', location: NUMPAD }, // [USB: 0x53]\n 0xAD: { code: 'Minus', keyCap: '-' } // [USB: 0x2d] -_\n });\n\n mergeIf(keyCodeToInfoTable,\n 'moz-win', {\n 0xAD: { code: 'Minus', keyCap: '-' } // [USB: 0x2d] -_\n });\n\n mergeIf(keyCodeToInfoTable,\n 'chrome-mac', {\n 0x5D: { code: 'OSRight', location: RIGHT } // [USB: 0xe7]\n });\n\n // Windows via Bootcamp (!)\n if (0) {\n mergeIf(keyCodeToInfoTable,\n 'chrome-win', {\n 0xC0: { code: 'Quote', keyCap: '\\'' }, // [USB: 0x34] '\" (US Standard 101)\n 0xDE: { code: 'Backslash', keyCap: '\\\\' }, // [USB: 0x31] \\| (US Standard 101)\n 0xDF: { code: 'Backquote', keyCap: '`' } // [USB: 0x35] `~ (US Standard 101)\n });\n\n mergeIf(keyCodeToInfoTable,\n 'ie', {\n 0xC0: { code: 'Quote', keyCap: '\\'' }, // [USB: 0x34] '\" (US Standard 101)\n 0xDE: { code: 'Backslash', keyCap: '\\\\' }, // [USB: 0x31] \\| (US Standard 101)\n 0xDF: { code: 'Backquote', keyCap: '`' } // [USB: 0x35] `~ (US Standard 101)\n });\n }\n\n mergeIf(keyCodeToInfoTable,\n 'safari', {\n 0x03: { code: 'Enter' }, // [USB: 0x28] old Safari\n 0x19: { code: 'Tab' } // [USB: 0x2b] old Safari for Shift+Tab\n });\n\n mergeIf(keyCodeToInfoTable,\n 'ios', {\n 0x0A: { code: 'Enter', location: STANDARD } // [USB: 0x28]\n });\n\n mergeIf(keyCodeToInfoTable,\n 'safari-mac', {\n 0x5B: { code: 'OSLeft', location: LEFT }, // [USB: 0xe3]\n 0x5D: { code: 'OSRight', location: RIGHT }, // [USB: 0xe7]\n 0xE5: { code: 'KeyQ', keyCap: 'Q' } // [USB: 0x14] On alternate presses, Ctrl+Q sends this\n });\n\n //--------------------------------------------------------------------\n //\n // Identifier Mappings\n //\n //--------------------------------------------------------------------\n\n // Cases where newer-ish browsers send keyIdentifier which can be\n // used to disambiguate keys.\n\n // keyIdentifierTable[keyIdentifier] -> keyInfo\n\n var keyIdentifierTable = {};\n if ('cros' === os) {\n keyIdentifierTable['U+00A0'] = { code: 'ShiftLeft', location: LEFT };\n keyIdentifierTable['U+00A1'] = { code: 'ShiftRight', location: RIGHT };\n keyIdentifierTable['U+00A2'] = { code: 'ControlLeft', location: LEFT };\n keyIdentifierTable['U+00A3'] = { code: 'ControlRight', location: RIGHT };\n keyIdentifierTable['U+00A4'] = { code: 'AltLeft', location: LEFT };\n keyIdentifierTable['U+00A5'] = { code: 'AltRight', location: RIGHT };\n }\n if ('chrome-mac' === browser_os) {\n keyIdentifierTable['U+0010'] = { code: 'ContextMenu' };\n }\n if ('safari-mac' === browser_os) {\n keyIdentifierTable['U+0010'] = { code: 'ContextMenu' };\n }\n if ('ios' === os) {\n // These only generate keyup events\n keyIdentifierTable['U+0010'] = { code: 'Function' };\n\n keyIdentifierTable['U+001C'] = { code: 'ArrowLeft' };\n keyIdentifierTable['U+001D'] = { code: 'ArrowRight' };\n keyIdentifierTable['U+001E'] = { code: 'ArrowUp' };\n keyIdentifierTable['U+001F'] = { code: 'ArrowDown' };\n\n keyIdentifierTable['U+0001'] = { code: 'Home' }; // [USB: 0x4a] Fn + ArrowLeft\n keyIdentifierTable['U+0004'] = { code: 'End' }; // [USB: 0x4d] Fn + ArrowRight\n keyIdentifierTable['U+000B'] = { code: 'PageUp' }; // [USB: 0x4b] Fn + ArrowUp\n keyIdentifierTable['U+000C'] = { code: 'PageDown' }; // [USB: 0x4e] Fn + ArrowDown\n }\n\n //--------------------------------------------------------------------\n //\n // Location Mappings\n //\n //--------------------------------------------------------------------\n\n // Cases where newer-ish browsers send location/keyLocation which\n // can be used to disambiguate keys.\n\n // locationTable[location][keyCode] -> keyInfo\n var locationTable = [];\n locationTable[LEFT] = {\n 0x10: { code: 'ShiftLeft', location: LEFT }, // [USB: 0xe1]\n 0x11: { code: 'ControlLeft', location: LEFT }, // [USB: 0xe0]\n 0x12: { code: 'AltLeft', location: LEFT } // [USB: 0xe2]\n };\n locationTable[RIGHT] = {\n 0x10: { code: 'ShiftRight', location: RIGHT }, // [USB: 0xe5]\n 0x11: { code: 'ControlRight', location: RIGHT }, // [USB: 0xe4]\n 0x12: { code: 'AltRight', location: RIGHT } // [USB: 0xe6]\n };\n locationTable[NUMPAD] = {\n 0x0D: { code: 'NumpadEnter', location: NUMPAD } // [USB: 0x58]\n };\n\n mergeIf(locationTable[NUMPAD], 'moz', {\n 0x6D: { code: 'NumpadSubtract', location: NUMPAD }, // [USB: 0x56]\n 0x6B: { code: 'NumpadAdd', location: NUMPAD } // [USB: 0x57]\n });\n mergeIf(locationTable[LEFT], 'moz-mac', {\n 0xE0: { code: 'OSLeft', location: LEFT } // [USB: 0xe3]\n });\n mergeIf(locationTable[RIGHT], 'moz-mac', {\n 0xE0: { code: 'OSRight', location: RIGHT } // [USB: 0xe7]\n });\n mergeIf(locationTable[RIGHT], 'moz-win', {\n 0x5B: { code: 'OSRight', location: RIGHT } // [USB: 0xe7]\n });\n\n\n mergeIf(locationTable[RIGHT], 'mac', {\n 0x5D: { code: 'OSRight', location: RIGHT } // [USB: 0xe7]\n });\n\n mergeIf(locationTable[NUMPAD], 'chrome-mac', {\n 0x0C: { code: 'NumLock', location: NUMPAD } // [USB: 0x53]\n });\n\n mergeIf(locationTable[NUMPAD], 'safari-mac', {\n 0x0C: { code: 'NumLock', location: NUMPAD }, // [USB: 0x53]\n 0xBB: { code: 'NumpadAdd', location: NUMPAD }, // [USB: 0x57]\n 0xBD: { code: 'NumpadSubtract', location: NUMPAD }, // [USB: 0x56]\n 0xBE: { code: 'NumpadDecimal', location: NUMPAD }, // [USB: 0x63]\n 0xBF: { code: 'NumpadDivide', location: NUMPAD } // [USB: 0x54]\n });\n\n\n //--------------------------------------------------------------------\n //\n // Key Values\n //\n //--------------------------------------------------------------------\n\n // Mapping from `code` values to `key` values. Values defined at:\n // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3Events-key.html\n // Entries are only provided when `key` differs from `code`. If\n // printable, `shiftKey` has the shifted printable character. This\n // assumes US Standard 101 layout\n\n var codeToKeyTable = {\n // Modifier Keys\n ShiftLeft: { key: 'Shift' },\n ShiftRight: { key: 'Shift' },\n ControlLeft: { key: 'Control' },\n ControlRight: { key: 'Control' },\n AltLeft: { key: 'Alt' },\n AltRight: { key: 'Alt' },\n OSLeft: { key: 'OS' },\n OSRight: { key: 'OS' },\n\n // Whitespace Keys\n NumpadEnter: { key: 'Enter' },\n Space: { key: ' ' },\n\n // Printable Keys\n Digit0: { key: '0', shiftKey: ')' },\n Digit1: { key: '1', shiftKey: '!' },\n Digit2: { key: '2', shiftKey: '@' },\n Digit3: { key: '3', shiftKey: '#' },\n Digit4: { key: '4', shiftKey: '$' },\n Digit5: { key: '5', shiftKey: '%' },\n Digit6: { key: '6', shiftKey: '^' },\n Digit7: { key: '7', shiftKey: '&' },\n Digit8: { key: '8', shiftKey: '*' },\n Digit9: { key: '9', shiftKey: '(' },\n KeyA: { key: 'a', shiftKey: 'A' },\n KeyB: { key: 'b', shiftKey: 'B' },\n KeyC: { key: 'c', shiftKey: 'C' },\n KeyD: { key: 'd', shiftKey: 'D' },\n KeyE: { key: 'e', shiftKey: 'E' },\n KeyF: { key: 'f', shiftKey: 'F' },\n KeyG: { key: 'g', shiftKey: 'G' },\n KeyH: { key: 'h', shiftKey: 'H' },\n KeyI: { key: 'i', shiftKey: 'I' },\n KeyJ: { key: 'j', shiftKey: 'J' },\n KeyK: { key: 'k', shiftKey: 'K' },\n KeyL: { key: 'l', shiftKey: 'L' },\n KeyM: { key: 'm', shiftKey: 'M' },\n KeyN: { key: 'n', shiftKey: 'N' },\n KeyO: { key: 'o', shiftKey: 'O' },\n KeyP: { key: 'p', shiftKey: 'P' },\n KeyQ: { key: 'q', shiftKey: 'Q' },\n KeyR: { key: 'r', shiftKey: 'R' },\n KeyS: { key: 's', shiftKey: 'S' },\n KeyT: { key: 't', shiftKey: 'T' },\n KeyU: { key: 'u', shiftKey: 'U' },\n KeyV: { key: 'v', shiftKey: 'V' },\n KeyW: { key: 'w', shiftKey: 'W' },\n KeyX: { key: 'x', shiftKey: 'X' },\n KeyY: { key: 'y', shiftKey: 'Y' },\n KeyZ: { key: 'z', shiftKey: 'Z' },\n Numpad0: { key: '0' },\n Numpad1: { key: '1' },\n Numpad2: { key: '2' },\n Numpad3: { key: '3' },\n Numpad4: { key: '4' },\n Numpad5: { key: '5' },\n Numpad6: { key: '6' },\n Numpad7: { key: '7' },\n Numpad8: { key: '8' },\n Numpad9: { key: '9' },\n NumpadMultiply: { key: '*' },\n NumpadAdd: { key: '+' },\n NumpadComma: { key: ',' },\n NumpadSubtract: { key: '-' },\n NumpadDecimal: { key: '.' },\n NumpadDivide: { key: '/' },\n Semicolon: { key: ';', shiftKey: ':' },\n Equal: { key: '=', shiftKey: '+' },\n Comma: { key: ',', shiftKey: '<' },\n Minus: { key: '-', shiftKey: '_' },\n Period: { key: '.', shiftKey: '>' },\n Slash: { key: '/', shiftKey: '?' },\n Backquote: { key: '`', shiftKey: '~' },\n BracketLeft: { key: '[', shiftKey: '{' },\n Backslash: { key: '\\\\', shiftKey: '|' },\n BracketRight: { key: ']', shiftKey: '}' },\n Quote: { key: '\\'', shiftKey: '\"' },\n IntlBackslash: { key: '\\\\', shiftKey: '|' }\n };\n\n mergeIf(codeToKeyTable, 'mac', {\n OSLeft: { key: 'Meta' },\n OSRight: { key: 'Meta' }\n });\n\n // Corrections for 'key' names in older browsers (e.g. FF36-)\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.key#Key_values\n var keyFixTable = {\n Esc: 'Escape',\n Nonconvert: 'NonConvert',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Menu: 'ContextMenu',\n MediaNextTrack: 'MediaTrackNext',\n MediaPreviousTrack: 'MediaTrackPrevious',\n SelectMedia: 'MediaSelect',\n HalfWidth: 'Hankaku',\n FullWidth: 'Zenkaku',\n RomanCharacters: 'Romaji',\n Crsel: 'CrSel',\n Exsel: 'ExSel',\n Zoom: 'ZoomToggle'\n };\n\n //--------------------------------------------------------------------\n //\n // Exported Functions\n //\n //--------------------------------------------------------------------\n\n\n var codeTable = remap(keyCodeToInfoTable, 'code');\n\n try {\n var nativeLocation = nativeKeyboardEvent && ('location' in new KeyboardEvent(''));\n } catch (_) {}\n\n function keyInfoForEvent(event) {\n var keyCode = 'keyCode' in event ? event.keyCode : 'which' in event ? event.which : 0;\n\n var keyInfo = (function(){\n if (nativeLocation || 'keyLocation' in event) {\n var location = nativeLocation ? event.location : event.keyLocation;\n if (location && keyCode in locationTable[location]) {\n return locationTable[location][keyCode];\n }\n }\n if ('keyIdentifier' in event && event.keyIdentifier in keyIdentifierTable) {\n return keyIdentifierTable[event.keyIdentifier];\n }\n if (keyCode in keyCodeToInfoTable) {\n return keyCodeToInfoTable[keyCode];\n }\n return null;\n }());\n\n // TODO: Track these down and move to general tables\n if (0) {\n // TODO: Map these for newerish browsers?\n // TODO: iOS only?\n // TODO: Override with more common keyIdentifier name?\n switch (event.keyIdentifier) {\n case 'U+0010': keyInfo = { code: 'Function' }; break;\n case 'U+001C': keyInfo = { code: 'ArrowLeft' }; break;\n case 'U+001D': keyInfo = { code: 'ArrowRight' }; break;\n case 'U+001E': keyInfo = { code: 'ArrowUp' }; break;\n case 'U+001F': keyInfo = { code: 'ArrowDown' }; break;\n }\n }\n\n if (!keyInfo)\n return null;\n\n var key = (function() {\n var entry = codeToKeyTable[keyInfo.code];\n if (!entry) return keyInfo.code;\n return (event.shiftKey && 'shiftKey' in entry) ? entry.shiftKey : entry.key;\n }());\n\n return {\n code: keyInfo.code,\n key: key,\n location: keyInfo.location,\n keyCap: keyInfo.keyCap\n };\n }\n\n function queryKeyCap(code, locale) {\n code = String(code);\n if (!codeTable.hasOwnProperty(code)) return 'Undefined';\n if (locale && String(locale).toLowerCase() !== 'en-us') throw Error('Unsupported locale');\n var keyInfo = codeTable[code];\n return keyInfo.keyCap || keyInfo.code || 'Undefined';\n }\n\n if ('KeyboardEvent' in global && 'defineProperty' in Object) {\n (function() {\n function define(o, p, v) {\n if (p in o) return;\n Object.defineProperty(o, p, v);\n }\n\n define(KeyboardEvent.prototype, 'code', { get: function() {\n var keyInfo = keyInfoForEvent(this);\n return keyInfo ? keyInfo.code : '';\n }});\n\n // Fix for nonstandard `key` values (FF36-)\n if ('key' in KeyboardEvent.prototype) {\n var desc = Object.getOwnPropertyDescriptor(KeyboardEvent.prototype, 'key');\n Object.defineProperty(KeyboardEvent.prototype, 'key', { get: function() {\n var key = desc.get.call(this);\n return keyFixTable.hasOwnProperty(key) ? keyFixTable[key] : key;\n }});\n }\n\n define(KeyboardEvent.prototype, 'key', { get: function() {\n var keyInfo = keyInfoForEvent(this);\n return (keyInfo && 'key' in keyInfo) ? keyInfo.key : 'Unidentified';\n }});\n\n define(KeyboardEvent.prototype, 'location', { get: function() {\n var keyInfo = keyInfoForEvent(this);\n return (keyInfo && 'location' in keyInfo) ? keyInfo.location : STANDARD;\n }});\n\n define(KeyboardEvent.prototype, 'locale', { get: function() {\n return '';\n }});\n }());\n }\n\n if (!('queryKeyCap' in global.KeyboardEvent))\n global.KeyboardEvent.queryKeyCap = queryKeyCap;\n\n // Helper for IE8-\n global.identifyKey = function(event) {\n if ('code' in event)\n return;\n\n var keyInfo = keyInfoForEvent(event);\n event.code = keyInfo ? keyInfo.code : '';\n event.key = (keyInfo && 'key' in keyInfo) ? keyInfo.key : 'Unidentified';\n event.location = ('location' in event) ? event.location :\n ('keyLocation' in event) ? event.keyLocation :\n (keyInfo && 'location' in keyInfo) ? keyInfo.location : STANDARD;\n event.locale = '';\n };\n\n} (window));\n","/**\n * Touch-to-move-forward controls for mobile.\n */\nmodule.exports = AFRAME.registerComponent('touch-controls', {\n schema: {\n enabled: { default: true },\n reverseEnabled: { default: true }\n },\n\n init: function () {\n this.dVelocity = new THREE.Vector3();\n this.bindMethods();\n this.direction = 0;\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.dVelocity.set(0, 0, 0);\n },\n\n remove: function () {\n this.pause();\n },\n\n addEventListeners: function () {\n const sceneEl = this.el.sceneEl;\n const canvasEl = sceneEl.canvas;\n\n if (!canvasEl) {\n sceneEl.addEventListener('render-target-loaded', this.addEventListeners.bind(this));\n return;\n }\n\n canvasEl.addEventListener('touchstart', this.onTouchStart);\n canvasEl.addEventListener('touchend', this.onTouchEnd);\n },\n\n removeEventListeners: function () {\n const canvasEl = this.el.sceneEl && this.el.sceneEl.canvas;\n if (!canvasEl) { return; }\n\n canvasEl.removeEventListener('touchstart', this.onTouchStart);\n canvasEl.removeEventListener('touchend', this.onTouchEnd);\n },\n\n isVelocityActive: function () {\n return this.data.enabled && !!this.direction;\n },\n\n getVelocityDelta: function () {\n this.dVelocity.z = this.direction;\n return this.dVelocity.clone();\n },\n\n bindMethods: function () {\n this.onTouchStart = this.onTouchStart.bind(this);\n this.onTouchEnd = this.onTouchEnd.bind(this);\n },\n\n onTouchStart: function (e) {\n this.direction = -1;\n if (this.data.reverseEnabled && e.touches.length === 2) {\n this.direction = 1;\n }\n e.preventDefault();\n },\n\n onTouchEnd: function (e) {\n this.direction = 0;\n e.preventDefault();\n }\n});\n","/**\n * Movement Controls\n *\n * @author Don McCurdy <[email protected]>\n */\n\nconst COMPONENT_SUFFIX = '-controls',\n MAX_DELTA = 0.2, // ms\n EPS = 10e-6;\n\nmodule.exports = AFRAME.registerComponent('movement-controls', {\n\n /*******************************************************************\n * Schema\n */\n\n dependencies: ['rotation'],\n\n schema: {\n enabled: { default: true },\n controls: { default: ['gamepad', 'trackpad', 'keyboard', 'touch'] },\n speed: { default: 0.3, min: 0 },\n fly: { default: false },\n constrainToNavMesh: { default: false },\n camera: { default: '[movement-controls] [camera]', type: 'selector' }\n },\n\n /*******************************************************************\n * Lifecycle\n */\n\n init: function () {\n const el = this.el;\n\n this.velocityCtrl = null;\n\n this.velocity = new THREE.Vector3();\n this.heading = new THREE.Quaternion();\n\n // Navigation\n this.navGroup = null;\n this.navNode = null;\n\n if (el.sceneEl.hasLoaded) {\n this.injectControls();\n } else {\n el.sceneEl.addEventListener('loaded', this.injectControls.bind(this));\n }\n },\n\n update: function (prevData) {\n const el = this.el;\n const data = this.data;\n const nav = el.sceneEl.systems.nav;\n if (el.sceneEl.hasLoaded) {\n this.injectControls();\n }\n if (nav && data.constrainToNavMesh !== prevData.constrainToNavMesh) {\n data.constrainToNavMesh\n ? nav.addAgent(this)\n : nav.removeAgent(this);\n }\n },\n\n injectControls: function () {\n const data = this.data;\n var name;\n\n for (let i = 0; i < data.controls.length; i++) {\n name = data.controls[i] + COMPONENT_SUFFIX;\n if (!this.el.components[name]) {\n this.el.setAttribute(name, '');\n }\n }\n },\n\n updateNavLocation: function () {\n this.navGroup = null;\n this.navNode = null;\n },\n\n /*******************************************************************\n * Tick\n */\n\n tick: (function () {\n const start = new THREE.Vector3();\n const end = new THREE.Vector3();\n const clampedEnd = new THREE.Vector3();\n\n return function (t, dt) {\n if (!dt) return;\n\n const el = this.el;\n const data = this.data;\n\n if (!data.enabled) return;\n\n this.updateVelocityCtrl();\n const velocityCtrl = this.velocityCtrl;\n const velocity = this.velocity;\n\n if (!velocityCtrl) return;\n\n // Update velocity. If FPS is too low, reset.\n if (dt / 1000 > MAX_DELTA) {\n velocity.set(0, 0, 0);\n } else {\n this.updateVelocity(dt);\n }\n\n if (data.constrainToNavMesh\n && velocityCtrl.isNavMeshConstrained !== false) {\n\n if (velocity.lengthSq() < EPS) return;\n\n start.copy(el.object3D.position);\n end\n .copy(velocity)\n .multiplyScalar(dt / 1000)\n .add(start);\n\n const nav = el.sceneEl.systems.nav;\n this.navGroup = this.navGroup === null ? nav.getGroup(start) : this.navGroup;\n this.navNode = this.navNode || nav.getNode(start, this.navGroup);\n this.navNode = nav.clampStep(start, end, this.navGroup, this.navNode, clampedEnd);\n el.object3D.position.copy(clampedEnd);\n } else if (el.hasAttribute('velocity')) {\n el.setAttribute('velocity', velocity);\n } else {\n el.object3D.position.x += velocity.x * dt / 1000;\n el.object3D.position.y += velocity.y * dt / 1000;\n el.object3D.position.z += velocity.z * dt / 1000;\n }\n\n };\n }()),\n\n /*******************************************************************\n * Movement\n */\n\n updateVelocityCtrl: function () {\n const data = this.data;\n if (data.enabled) {\n for (let i = 0, l = data.controls.length; i < l; i++) {\n const control = this.el.components[data.controls[i] + COMPONENT_SUFFIX];\n if (control && control.isVelocityActive()) {\n this.velocityCtrl = control;\n return;\n }\n }\n this.velocityCtrl = null;\n }\n },\n\n updateVelocity: (function () {\n const vector2 = new THREE.Vector2();\n const quaternion = new THREE.Quaternion();\n\n return function (dt) {\n let dVelocity;\n const el = this.el;\n const control = this.velocityCtrl;\n const velocity = this.velocity;\n const data = this.data;\n\n if (control) {\n if (control.getVelocityDelta) {\n dVelocity = control.getVelocityDelta(dt);\n } else if (control.getVelocity) {\n velocity.copy(control.getVelocity());\n return;\n } else if (control.getPositionDelta) {\n velocity.copy(control.getPositionDelta(dt).multiplyScalar(1000 / dt));\n return;\n } else {\n throw new Error('Incompatible movement controls: ', control);\n }\n }\n\n if (el.hasAttribute('velocity') && !data.constrainToNavMesh) {\n velocity.copy(this.el.getAttribute('velocity'));\n }\n\n if (dVelocity && data.enabled) {\n const cameraEl = data.camera;\n\n // Rotate to heading\n quaternion.copy(cameraEl.object3D.quaternion);\n quaternion.premultiply(el.object3D.quaternion);\n dVelocity.applyQuaternion(quaternion);\n\n const factor = dVelocity.length();\n if (data.fly) {\n velocity.copy(dVelocity);\n velocity.multiplyScalar(this.data.speed * 16.66667);\n } else {\n vector2.set(dVelocity.x, dVelocity.z);\n vector2.setLength(factor * this.data.speed * 16.66667);\n velocity.x = vector2.x;\n velocity.z = vector2.y;\n }\n }\n };\n\n }())\n});\n","/**\n * 3dof (Gear VR, Daydream) controls for mobile.\n */\nmodule.exports = AFRAME.registerComponent('trackpad-controls', {\n schema: {\n enabled: { default: true },\n enableNegX: { default: true },\n enablePosX: { default: true },\n enableNegZ: { default: true },\n enablePosZ: { default: true },\n mode: { default: 'touch', oneOf: ['swipe', 'touch', 'press'] }\n\n },\n\n init: function () {\n this.dVelocity = new THREE.Vector3();\n this.zVel = 0;\n this.xVel = 0;\n this.bindMethods();\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.dVelocity.set(0, 0, 0);\n },\n\n remove: function () {\n this.pause();\n },\n\n addEventListeners: function () {\n const data = this.data;\n const sceneEl = this.el.sceneEl;\n\n sceneEl.addEventListener('axismove', this.onAxisMove);\n\n switch (data.mode) {\n case 'swipe':\n case 'touch':\n sceneEl.addEventListener('trackpadtouchstart', this.onTouchStart);\n sceneEl.addEventListener('trackpadtouchend', this.onTouchEnd);\n break;\n\n case 'press':\n sceneEl.addEventListener('trackpaddown', this.onTouchStart);\n sceneEl.addEventListener('trackpadup', this.onTouchEnd);\n break;\n }\n\n },\n\n removeEventListeners: function () {\n const sceneEl = this.el.sceneEl;\n\n sceneEl.removeEventListener('axismove', this.onAxisMove);\n sceneEl.removeEventListener('trackpadtouchstart', this.onTouchStart);\n sceneEl.removeEventListener('trackpadtouchend', this.onTouchEnd);\n sceneEl.removeEventListener('trackpaddown', this.onTouchStart);\n sceneEl.removeEventListener('trackpadup', this.onTouchEnd);\n },\n\n isVelocityActive: function () {\n return this.data.enabled && this.isMoving;\n },\n\n getVelocityDelta: function () {\n this.dVelocity.z = this.isMoving ? -this.zVel : 1;\n this.dVelocity.x = this.isMoving ? this.xVel : 1;\n return this.dVelocity.clone();\n },\n\n bindMethods: function () {\n this.onTouchStart = this.onTouchStart.bind(this);\n this.onTouchEnd = this.onTouchEnd.bind(this);\n this.onAxisMove = this.onAxisMove.bind(this);\n },\n\n onTouchStart: function (e) {\n switch(this.data.mode){\n case 'swipe':\n this.canRecordAxis = true;\n this.startingAxisData = [];\n break;\n case 'touch':\n this.isMoving = true;\n break;\n case 'press':\n this.isMoving = true;\n break;\n }\n\n e.preventDefault();\n },\n\n onTouchEnd: function (e) {\n if(this.data.mode == 'swipe') {\n this.startingAxisData = [];\n }\n\n this.isMoving = false;\n e.preventDefault();\n },\n\n onAxisMove: function(e){\n switch (this.data.mode) {\n case 'swipe':\n return this.handleSwipeAxis(e);\n case 'touch':\n case 'press':\n return this.handleTouchAxis(e);\n }\n },\n\n handleSwipeAxis: function(e) {\n const data = this.data;\n const axisData = e.detail.axis;\n\n if(this.startingAxisData.length === 0 && this.canRecordAxis){\n this.canRecordAxis = false;\n this.startingAxisData[0] = axisData[0];\n this.startingAxisData[1] = axisData[1];\n }\n\n if(this.startingAxisData.length > 0){\n let velX = 0;\n let velZ = 0;\n\n if (data.enableNegX && axisData[0] < this.startingAxisData[0]) {\n velX = -1;\n }\n\n if (data.enablePosX && axisData[0] > this.startingAxisData[0]) {\n velX = 1;\n }\n\n if (data.enablePosZ && axisData[1] > this.startingAxisData[1]) {\n velZ = -1;\n }\n\n if (data.enableNegZ && axisData[1] < this.startingAxisData[1]) {\n velZ = 1;\n }\n\n const absChangeZ = Math.abs(this.startingAxisData[1] - axisData[1]);\n const absChangeX = Math.abs(this.startingAxisData[0] - axisData[0]);\n\n if (absChangeX > absChangeZ) {\n this.zVel = 0;\n this.xVel = velX;\n this.isMoving = true;\n } else {\n this.xVel = 0;\n this.zVel = velZ;\n this.isMoving = true;\n }\n\n }\n },\n\n handleTouchAxis: function(e) {\n const data = this.data;\n const axisData = e.detail.axis;\n\n let velX = 0;\n let velZ = 0;\n\n if (data.enableNegX && axisData[0] < 0) {\n velX = -1;\n }\n\n if (data.enablePosX && axisData[0] > 0) {\n velX = 1;\n }\n\n if (data.enablePosZ && axisData[1] > 0) {\n velZ = -1;\n }\n\n if (data.enableNegZ && axisData[1] < 0) {\n velZ = 1;\n }\n\n if (Math.abs(axisData[0]) > Math.abs(axisData[1])) {\n this.zVel = 0;\n this.xVel = velX;\n } else {\n this.xVel = 0;\n this.zVel = velZ;\n }\n\n }\n\n});\n\n","require('./animation-mixer');\nrequire('./collada-model-legacy');\nrequire('./fbx-model');\nrequire('./gltf-model-legacy');\nrequire('./object-model');\n","const LoopMode = {\n once: THREE.LoopOnce,\n repeat: THREE.LoopRepeat,\n pingpong: THREE.LoopPingPong\n};\n\n/**\n * animation-mixer\n *\n * Player for animation clips. Intended to be compatible with any model format that supports\n * skeletal or morph animations through THREE.AnimationMixer.\n * See: https://threejs.org/docs/?q=animation#Reference/Animation/AnimationMixer\n */\nmodule.exports = AFRAME.registerComponent('animation-mixer', {\n schema: {\n clip: {default: '*'},\n duration: {default: 0},\n clampWhenFinished: {default: false, type: 'boolean'},\n crossFadeDuration: {default: 0},\n loop: {default: 'repeat', oneOf: Object.keys(LoopMode)},\n repetitions: {default: Infinity, min: 0},\n timeScale: {default: 1}\n },\n\n init: function () {\n /** @type {THREE.Mesh} */\n this.model = null;\n /** @type {THREE.AnimationMixer} */\n this.mixer = null;\n /** @type {Array<THREE.AnimationAction>} */\n this.activeActions = [];\n\n const model = this.el.getObject3D('mesh');\n\n if (model) {\n this.load(model);\n } else {\n this.el.addEventListener('model-loaded', (e) => {\n this.load(e.detail.model);\n });\n }\n },\n\n load: function (model) {\n const el = this.el;\n this.model = model;\n this.mixer = new THREE.AnimationMixer(model);\n this.mixer.addEventListener('loop', (e) => {\n el.emit('animation-loop', {action: e.action, loopDelta: e.loopDelta});\n });\n this.mixer.addEventListener('finished', (e) => {\n el.emit('animation-finished', {action: e.action, direction: e.direction});\n });\n if (this.data.clip) this.update({});\n },\n\n remove: function () {\n if (this.mixer) this.mixer.stopAllAction();\n },\n\n update: function (prevData) {\n if (!prevData) return;\n\n const data = this.data;\n const changes = AFRAME.utils.diff(data, prevData);\n\n // If selected clips have changed, restart animation.\n if ('clip' in changes) {\n this.stopAction();\n if (data.clip) this.playAction();\n return;\n }\n\n // Otherwise, modify running actions.\n this.activeActions.forEach((action) => {\n if ('duration' in changes && data.duration) {\n action.setDuration(data.duration);\n }\n if ('clampWhenFinished' in changes) {\n action.clampWhenFinished = data.clampWhenFinished;\n }\n if ('loop' in changes || 'repetitions' in changes) {\n action.setLoop(LoopMode[data.loop], data.repetitions);\n }\n if ('timeScale' in changes) {\n action.setEffectiveTimeScale(data.timeScale);\n }\n });\n },\n\n stopAction: function () {\n const data = this.data;\n for (let i = 0; i < this.activeActions.length; i++) {\n data.crossFadeDuration\n ? this.activeActions[i].fadeOut(data.crossFadeDuration)\n : this.activeActions[i].stop();\n }\n this.activeActions.length = 0;\n },\n\n playAction: function () {\n if (!this.mixer) return;\n\n const model = this.model,\n data = this.data,\n clips = model.animations || (model.geometry || {}).animations || [];\n\n if (!clips.length) return;\n\n const re = wildcardToRegExp(data.clip);\n\n for (let clip, i = 0; (clip = clips[i]); i++) {\n if (clip.name.match(re)) {\n const action = this.mixer.clipAction(clip, model);\n action.enabled = true;\n action.clampWhenFinished = data.clampWhenFinished;\n if (data.duration) action.setDuration(data.duration);\n if (data.timeScale !== 1) action.setEffectiveTimeScale(data.timeScale);\n action\n .setLoop(LoopMode[data.loop], data.repetitions)\n .fadeIn(data.crossFadeDuration)\n .play();\n this.activeActions.push(action);\n }\n }\n },\n\n tick: function (t, dt) {\n if (this.mixer && !isNaN(dt)) this.mixer.update(dt / 1000);\n }\n});\n\n/**\n * Creates a RegExp from the given string, converting asterisks to .* expressions,\n * and escaping all other characters.\n */\nfunction wildcardToRegExp (s) {\n return new RegExp('^' + s.split(/\\*+/).map(regExpEscape).join('.*') + '$');\n}\n\n/**\n * RegExp-escapes all characters in the given string.\n */\nfunction regExpEscape (s) {\n return s.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n}\n","THREE.ColladaLoader = require('../../lib/ColladaLoader');\n\n/**\n * collada-model-legacy\n *\n * Loader for COLLADA (.dae) format.\n */\nmodule.exports.Component = AFRAME.registerComponent('collada-model-legacy', {\n schema: {type: 'asset'},\n\n init: function () {\n this.model = null;\n this.loader = new THREE.ColladaLoader();\n },\n\n update: function () {\n var self = this;\n var el = this.el;\n var src = this.data;\n var rendererSystem = this.el.sceneEl.systems.renderer;\n\n if (!src) { return; }\n\n this.remove();\n\n this.loader.load(src, function (colladaModel) {\n self.model = colladaModel.scene;\n self.model.traverse(function (object) {\n if (object.isMesh) {\n var material = object.material;\n if (material.color) rendererSystem.applyColorCorrection(material.color);\n if (material.map) rendererSystem.applyColorCorrection(material.map);\n if (material.emissive) rendererSystem.applyColorCorrection(material.emissive);\n if (material.emissiveMap) rendererSystem.applyColorCorrection(material.emissiveMap);\n }\n });\n el.setObject3D('mesh', self.model);\n el.emit('model-loaded', {format: 'collada', model: self.model});\n });\n },\n\n remove: function () {\n if (!this.model) { return; }\n this.el.removeObject3D('mesh');\n }\n});\n","/**\n * @author mrdoob / http://mrdoob.com/\n * @author Mugen87 / https://github.com/Mugen87\n */\n\nmodule.exports = THREE.ColladaLoader = function ( manager ) {\n\n this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;\n\n};\n\nTHREE.ColladaLoader.prototype = {\n\n constructor: THREE.ColladaLoader,\n\n crossOrigin: 'anonymous',\n\n load: function ( url, onLoad, onProgress, onError ) {\n\n var scope = this;\n\n var path = ( scope.path === undefined ) ? THREE.LoaderUtils.extractUrlBase( url ) : scope.path;\n\n var loader = new THREE.FileLoader( scope.manager );\n loader.setPath( scope.path );\n loader.load( url, function ( text ) {\n\n onLoad( scope.parse( text, path ) );\n\n }, onProgress, onError );\n\n },\n\n setPath: function ( value ) {\n\n this.path = value;\n return this;\n\n },\n\n setResourcePath: function ( value ) {\n\n this.resourcePath = value;\n return this;\n\n },\n\n options: {\n\n set convertUpAxis( value ) {\n\n console.warn( 'THREE.ColladaLoader: options.convertUpAxis() has been removed. Up axis is converted automatically.' );\n\n }\n\n },\n\n setCrossOrigin: function ( value ) {\n\n this.crossOrigin = value;\n return this;\n\n },\n\n parse: function ( text, path ) {\n\n function getElementsByTagName( xml, name ) {\n\n // Non recursive xml.getElementsByTagName() ...\n\n var array = [];\n var childNodes = xml.childNodes;\n\n for ( var i = 0, l = childNodes.length; i < l; i ++ ) {\n\n var child = childNodes[ i ];\n\n if ( child.nodeName === name ) {\n\n array.push( child );\n\n }\n\n }\n\n return array;\n\n }\n\n function parseStrings( text ) {\n\n if ( text.length === 0 ) return [];\n\n var parts = text.trim().split( /\\s+/ );\n var array = new Array( parts.length );\n\n for ( var i = 0, l = parts.length; i < l; i ++ ) {\n\n array[ i ] = parts[ i ];\n\n }\n\n return array;\n\n }\n\n function parseFloats( text ) {\n\n if ( text.length === 0 ) return [];\n\n var parts = text.trim().split( /\\s+/ );\n var array = new Array( parts.length );\n\n for ( var i = 0, l = parts.length; i < l; i ++ ) {\n\n array[ i ] = parseFloat( parts[ i ] );\n\n }\n\n return array;\n\n }\n\n function parseInts( text ) {\n\n if ( text.length === 0 ) return [];\n\n var parts = text.trim().split( /\\s+/ );\n var array = new Array( parts.length );\n\n for ( var i = 0, l = parts.length; i < l; i ++ ) {\n\n array[ i ] = parseInt( parts[ i ] );\n\n }\n\n return array;\n\n }\n\n function parseId( text ) {\n\n return text.substring( 1 );\n\n }\n\n function generateId() {\n\n return 'three_default_' + ( count ++ );\n\n }\n\n function isEmpty( object ) {\n\n return Object.keys( object ).length === 0;\n\n }\n\n // asset\n\n function parseAsset( xml ) {\n\n return {\n unit: parseAssetUnit( getElementsByTagName( xml, 'unit' )[ 0 ] ),\n upAxis: parseAssetUpAxis( getElementsByTagName( xml, 'up_axis' )[ 0 ] )\n };\n\n }\n\n function parseAssetUnit( xml ) {\n\n if ( ( xml !== undefined ) && ( xml.hasAttribute( 'meter' ) === true ) ) {\n\n return parseFloat( xml.getAttribute( 'meter' ) );\n\n } else {\n\n return 1; // default 1 meter\n\n }\n\n }\n\n function parseAssetUpAxis( xml ) {\n\n return xml !== undefined ? xml.textContent : 'Y_UP';\n\n }\n\n // library\n\n function parseLibrary( xml, libraryName, nodeName, parser ) {\n\n var library = getElementsByTagName( xml, libraryName )[ 0 ];\n\n if ( library !== undefined ) {\n\n var elements = getElementsByTagName( library, nodeName );\n\n for ( var i = 0; i < elements.length; i ++ ) {\n\n parser( elements[ i ] );\n\n }\n\n }\n\n }\n\n function buildLibrary( data, builder ) {\n\n for ( var name in data ) {\n\n var object = data[ name ];\n object.build = builder( data[ name ] );\n\n }\n\n }\n\n // get\n\n function getBuild( data, builder ) {\n\n if ( data.build !== undefined ) return data.build;\n\n data.build = builder( data );\n\n return data.build;\n\n }\n\n // animation\n\n function parseAnimation( xml ) {\n\n var data = {\n sources: {},\n samplers: {},\n channels: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n var id;\n\n switch ( child.nodeName ) {\n\n case 'source':\n id = child.getAttribute( 'id' );\n data.sources[ id ] = parseSource( child );\n break;\n\n case 'sampler':\n id = child.getAttribute( 'id' );\n data.samplers[ id ] = parseAnimationSampler( child );\n break;\n\n case 'channel':\n id = child.getAttribute( 'target' );\n data.channels[ id ] = parseAnimationChannel( child );\n break;\n\n default:\n console.log( child );\n\n }\n\n }\n\n library.animations[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseAnimationSampler( xml ) {\n\n var data = {\n inputs: {},\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'input':\n var id = parseId( child.getAttribute( 'source' ) );\n var semantic = child.getAttribute( 'semantic' );\n data.inputs[ semantic ] = id;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseAnimationChannel( xml ) {\n\n var data = {};\n\n var target = xml.getAttribute( 'target' );\n\n // parsing SID Addressing Syntax\n\n var parts = target.split( '/' );\n\n var id = parts.shift();\n var sid = parts.shift();\n\n // check selection syntax\n\n var arraySyntax = ( sid.indexOf( '(' ) !== - 1 );\n var memberSyntax = ( sid.indexOf( '.' ) !== - 1 );\n\n if ( memberSyntax ) {\n\n // member selection access\n\n parts = sid.split( '.' );\n sid = parts.shift();\n data.member = parts.shift();\n\n } else if ( arraySyntax ) {\n\n // array-access syntax. can be used to express fields in one-dimensional vectors or two-dimensional matrices.\n\n var indices = sid.split( '(' );\n sid = indices.shift();\n\n for ( var i = 0; i < indices.length; i ++ ) {\n\n indices[ i ] = parseInt( indices[ i ].replace( /\\)/, '' ) );\n\n }\n\n data.indices = indices;\n\n }\n\n data.id = id;\n data.sid = sid;\n\n data.arraySyntax = arraySyntax;\n data.memberSyntax = memberSyntax;\n\n data.sampler = parseId( xml.getAttribute( 'source' ) );\n\n return data;\n\n }\n\n function buildAnimation( data ) {\n\n var tracks = [];\n\n var channels = data.channels;\n var samplers = data.samplers;\n var sources = data.sources;\n\n for ( var target in channels ) {\n\n if ( channels.hasOwnProperty( target ) ) {\n\n var channel = channels[ target ];\n var sampler = samplers[ channel.sampler ];\n\n var inputId = sampler.inputs.INPUT;\n var outputId = sampler.inputs.OUTPUT;\n\n var inputSource = sources[ inputId ];\n var outputSource = sources[ outputId ];\n\n var animation = buildAnimationChannel( channel, inputSource, outputSource );\n\n createKeyframeTracks( animation, tracks );\n\n }\n\n }\n\n return tracks;\n\n }\n\n function getAnimation( id ) {\n\n return getBuild( library.animations[ id ], buildAnimation );\n\n }\n\n function buildAnimationChannel( channel, inputSource, outputSource ) {\n\n var node = library.nodes[ channel.id ];\n var object3D = getNode( node.id );\n\n var transform = node.transforms[ channel.sid ];\n var defaultMatrix = node.matrix.clone().transpose();\n\n var time, stride;\n var i, il, j, jl;\n\n var data = {};\n\n // the collada spec allows the animation of data in various ways.\n // depending on the transform type (matrix, translate, rotate, scale), we execute different logic\n\n switch ( transform ) {\n\n case 'matrix':\n\n for ( i = 0, il = inputSource.array.length; i < il; i ++ ) {\n\n time = inputSource.array[ i ];\n stride = i * outputSource.stride;\n\n if ( data[ time ] === undefined ) data[ time ] = {};\n\n if ( channel.arraySyntax === true ) {\n\n var value = outputSource.array[ stride ];\n var index = channel.indices[ 0 ] + 4 * channel.indices[ 1 ];\n\n data[ time ][ index ] = value;\n\n } else {\n\n for ( j = 0, jl = outputSource.stride; j < jl; j ++ ) {\n\n data[ time ][ j ] = outputSource.array[ stride + j ];\n\n }\n\n }\n\n }\n\n break;\n\n case 'translate':\n console.warn( 'THREE.ColladaLoader: Animation transform type \"%s\" not yet implemented.', transform );\n break;\n\n case 'rotate':\n console.warn( 'THREE.ColladaLoader: Animation transform type \"%s\" not yet implemented.', transform );\n break;\n\n case 'scale':\n console.warn( 'THREE.ColladaLoader: Animation transform type \"%s\" not yet implemented.', transform );\n break;\n\n }\n\n var keyframes = prepareAnimationData( data, defaultMatrix );\n\n var animation = {\n name: object3D.uuid,\n keyframes: keyframes\n };\n\n return animation;\n\n }\n\n function prepareAnimationData( data, defaultMatrix ) {\n\n var keyframes = [];\n\n // transfer data into a sortable array\n\n for ( var time in data ) {\n\n keyframes.push( { time: parseFloat( time ), value: data[ time ] } );\n\n }\n\n // ensure keyframes are sorted by time\n\n keyframes.sort( ascending );\n\n // now we clean up all animation data, so we can use them for keyframe tracks\n\n for ( var i = 0; i < 16; i ++ ) {\n\n transformAnimationData( keyframes, i, defaultMatrix.elements[ i ] );\n\n }\n\n return keyframes;\n\n // array sort function\n\n function ascending( a, b ) {\n\n return a.time - b.time;\n\n }\n\n }\n\n var position = new THREE.Vector3();\n var scale = new THREE.Vector3();\n var quaternion = new THREE.Quaternion();\n\n function createKeyframeTracks( animation, tracks ) {\n\n var keyframes = animation.keyframes;\n var name = animation.name;\n\n var times = [];\n var positionData = [];\n var quaternionData = [];\n var scaleData = [];\n\n for ( var i = 0, l = keyframes.length; i < l; i ++ ) {\n\n var keyframe = keyframes[ i ];\n\n var time = keyframe.time;\n var value = keyframe.value;\n\n matrix.fromArray( value ).transpose();\n matrix.decompose( position, quaternion, scale );\n\n times.push( time );\n positionData.push( position.x, position.y, position.z );\n quaternionData.push( quaternion.x, quaternion.y, quaternion.z, quaternion.w );\n scaleData.push( scale.x, scale.y, scale.z );\n\n }\n\n if ( positionData.length > 0 ) tracks.push( new THREE.VectorKeyframeTrack( name + '.position', times, positionData ) );\n if ( quaternionData.length > 0 ) tracks.push( new THREE.QuaternionKeyframeTrack( name + '.quaternion', times, quaternionData ) );\n if ( scaleData.length > 0 ) tracks.push( new THREE.VectorKeyframeTrack( name + '.scale', times, scaleData ) );\n\n return tracks;\n\n }\n\n function transformAnimationData( keyframes, property, defaultValue ) {\n\n var keyframe;\n\n var empty = true;\n var i, l;\n\n // check, if values of a property are missing in our keyframes\n\n for ( i = 0, l = keyframes.length; i < l; i ++ ) {\n\n keyframe = keyframes[ i ];\n\n if ( keyframe.value[ property ] === undefined ) {\n\n keyframe.value[ property ] = null; // mark as missing\n\n } else {\n\n empty = false;\n\n }\n\n }\n\n if ( empty === true ) {\n\n // no values at all, so we set a default value\n\n for ( i = 0, l = keyframes.length; i < l; i ++ ) {\n\n keyframe = keyframes[ i ];\n\n keyframe.value[ property ] = defaultValue;\n\n }\n\n } else {\n\n // filling gaps\n\n createMissingKeyframes( keyframes, property );\n\n }\n\n }\n\n function createMissingKeyframes( keyframes, property ) {\n\n var prev, next;\n\n for ( var i = 0, l = keyframes.length; i < l; i ++ ) {\n\n var keyframe = keyframes[ i ];\n\n if ( keyframe.value[ property ] === null ) {\n\n prev = getPrev( keyframes, i, property );\n next = getNext( keyframes, i, property );\n\n if ( prev === null ) {\n\n keyframe.value[ property ] = next.value[ property ];\n continue;\n\n }\n\n if ( next === null ) {\n\n keyframe.value[ property ] = prev.value[ property ];\n continue;\n\n }\n\n interpolate( keyframe, prev, next, property );\n\n }\n\n }\n\n }\n\n function getPrev( keyframes, i, property ) {\n\n while ( i >= 0 ) {\n\n var keyframe = keyframes[ i ];\n\n if ( keyframe.value[ property ] !== null ) return keyframe;\n\n i --;\n\n }\n\n return null;\n\n }\n\n function getNext( keyframes, i, property ) {\n\n while ( i < keyframes.length ) {\n\n var keyframe = keyframes[ i ];\n\n if ( keyframe.value[ property ] !== null ) return keyframe;\n\n i ++;\n\n }\n\n return null;\n\n }\n\n function interpolate( key, prev, next, property ) {\n\n if ( ( next.time - prev.time ) === 0 ) {\n\n key.value[ property ] = prev.value[ property ];\n return;\n\n }\n\n key.value[ property ] = ( ( key.time - prev.time ) * ( next.value[ property ] - prev.value[ property ] ) / ( next.time - prev.time ) ) + prev.value[ property ];\n\n }\n\n // animation clips\n\n function parseAnimationClip( xml ) {\n\n var data = {\n name: xml.getAttribute( 'id' ) || 'default',\n start: parseFloat( xml.getAttribute( 'start' ) || 0 ),\n end: parseFloat( xml.getAttribute( 'end' ) || 0 ),\n animations: []\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'instance_animation':\n data.animations.push( parseId( child.getAttribute( 'url' ) ) );\n break;\n\n }\n\n }\n\n library.clips[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function buildAnimationClip( data ) {\n\n var tracks = [];\n\n var name = data.name;\n var duration = ( data.end - data.start ) || - 1;\n var animations = data.animations;\n\n for ( var i = 0, il = animations.length; i < il; i ++ ) {\n\n var animationTracks = getAnimation( animations[ i ] );\n\n for ( var j = 0, jl = animationTracks.length; j < jl; j ++ ) {\n\n tracks.push( animationTracks[ j ] );\n\n }\n\n }\n\n return new THREE.AnimationClip( name, duration, tracks );\n\n }\n\n function getAnimationClip( id ) {\n\n return getBuild( library.clips[ id ], buildAnimationClip );\n\n }\n\n // controller\n\n function parseController( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'skin':\n // there is exactly one skin per controller\n data.id = parseId( child.getAttribute( 'source' ) );\n data.skin = parseSkin( child );\n break;\n\n case 'morph':\n data.id = parseId( child.getAttribute( 'source' ) );\n console.warn( 'THREE.ColladaLoader: Morph target animation not supported yet.' );\n break;\n\n }\n\n }\n\n library.controllers[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseSkin( xml ) {\n\n var data = {\n sources: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'bind_shape_matrix':\n data.bindShapeMatrix = parseFloats( child.textContent );\n break;\n\n case 'source':\n var id = child.getAttribute( 'id' );\n data.sources[ id ] = parseSource( child );\n break;\n\n case 'joints':\n data.joints = parseJoints( child );\n break;\n\n case 'vertex_weights':\n data.vertexWeights = parseVertexWeights( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseJoints( xml ) {\n\n var data = {\n inputs: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'input':\n var semantic = child.getAttribute( 'semantic' );\n var id = parseId( child.getAttribute( 'source' ) );\n data.inputs[ semantic ] = id;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseVertexWeights( xml ) {\n\n var data = {\n inputs: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'input':\n var semantic = child.getAttribute( 'semantic' );\n var id = parseId( child.getAttribute( 'source' ) );\n var offset = parseInt( child.getAttribute( 'offset' ) );\n data.inputs[ semantic ] = { id: id, offset: offset };\n break;\n\n case 'vcount':\n data.vcount = parseInts( child.textContent );\n break;\n\n case 'v':\n data.v = parseInts( child.textContent );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildController( data ) {\n\n var build = {\n id: data.id\n };\n\n var geometry = library.geometries[ build.id ];\n\n if ( data.skin !== undefined ) {\n\n build.skin = buildSkin( data.skin );\n\n // we enhance the 'sources' property of the corresponding geometry with our skin data\n\n geometry.sources.skinIndices = build.skin.indices;\n geometry.sources.skinWeights = build.skin.weights;\n\n }\n\n return build;\n\n }\n\n function buildSkin( data ) {\n\n var BONE_LIMIT = 4;\n\n var build = {\n joints: [], // this must be an array to preserve the joint order\n indices: {\n array: [],\n stride: BONE_LIMIT\n },\n weights: {\n array: [],\n stride: BONE_LIMIT\n }\n };\n\n var sources = data.sources;\n var vertexWeights = data.vertexWeights;\n\n var vcount = vertexWeights.vcount;\n var v = vertexWeights.v;\n var jointOffset = vertexWeights.inputs.JOINT.offset;\n var weightOffset = vertexWeights.inputs.WEIGHT.offset;\n\n var jointSource = data.sources[ data.joints.inputs.JOINT ];\n var inverseSource = data.sources[ data.joints.inputs.INV_BIND_MATRIX ];\n\n var weights = sources[ vertexWeights.inputs.WEIGHT.id ].array;\n var stride = 0;\n\n var i, j, l;\n\n // procces skin data for each vertex\n\n for ( i = 0, l = vcount.length; i < l; i ++ ) {\n\n var jointCount = vcount[ i ]; // this is the amount of joints that affect a single vertex\n var vertexSkinData = [];\n\n for ( j = 0; j < jointCount; j ++ ) {\n\n var skinIndex = v[ stride + jointOffset ];\n var weightId = v[ stride + weightOffset ];\n var skinWeight = weights[ weightId ];\n\n vertexSkinData.push( { index: skinIndex, weight: skinWeight } );\n\n stride += 2;\n\n }\n\n // we sort the joints in descending order based on the weights.\n // this ensures, we only procced the most important joints of the vertex\n\n vertexSkinData.sort( descending );\n\n // now we provide for each vertex a set of four index and weight values.\n // the order of the skin data matches the order of vertices\n\n for ( j = 0; j < BONE_LIMIT; j ++ ) {\n\n var d = vertexSkinData[ j ];\n\n if ( d !== undefined ) {\n\n build.indices.array.push( d.index );\n build.weights.array.push( d.weight );\n\n } else {\n\n build.indices.array.push( 0 );\n build.weights.array.push( 0 );\n\n }\n\n }\n\n }\n\n // setup bind matrix\n\n if ( data.bindShapeMatrix ) {\n\n build.bindMatrix = new THREE.Matrix4().fromArray( data.bindShapeMatrix ).transpose();\n\n } else {\n\n build.bindMatrix = new THREE.Matrix4().identity();\n\n }\n\n // process bones and inverse bind matrix data\n\n for ( i = 0, l = jointSource.array.length; i < l; i ++ ) {\n\n var name = jointSource.array[ i ];\n var boneInverse = new THREE.Matrix4().fromArray( inverseSource.array, i * inverseSource.stride ).transpose();\n\n build.joints.push( { name: name, boneInverse: boneInverse } );\n\n }\n\n return build;\n\n // array sort function\n\n function descending( a, b ) {\n\n return b.weight - a.weight;\n\n }\n\n }\n\n function getController( id ) {\n\n return getBuild( library.controllers[ id ], buildController );\n\n }\n\n // image\n\n function parseImage( xml ) {\n\n var data = {\n init_from: getElementsByTagName( xml, 'init_from' )[ 0 ].textContent\n };\n\n library.images[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function buildImage( data ) {\n\n if ( data.build !== undefined ) return data.build;\n\n return data.init_from;\n\n }\n\n function getImage( id ) {\n\n var data = library.images[ id ];\n\n if ( data !== undefined ) {\n\n return getBuild( data, buildImage );\n\n }\n\n console.warn( 'THREE.ColladaLoader: Couldn\\'t find image with ID:', id );\n\n return null;\n\n }\n\n // effect\n\n function parseEffect( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'profile_COMMON':\n data.profile = parseEffectProfileCOMMON( child );\n break;\n\n }\n\n }\n\n library.effects[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseEffectProfileCOMMON( xml ) {\n\n var data = {\n surfaces: {},\n samplers: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'newparam':\n parseEffectNewparam( child, data );\n break;\n\n case 'technique':\n data.technique = parseEffectTechnique( child );\n break;\n\n case 'extra':\n data.extra = parseEffectExtra( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectNewparam( xml, data ) {\n\n var sid = xml.getAttribute( 'sid' );\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'surface':\n data.surfaces[ sid ] = parseEffectSurface( child );\n break;\n\n case 'sampler2D':\n data.samplers[ sid ] = parseEffectSampler( child );\n break;\n\n }\n\n }\n\n }\n\n function parseEffectSurface( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'init_from':\n data.init_from = child.textContent;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectSampler( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'source':\n data.source = child.textContent;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectTechnique( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'constant':\n case 'lambert':\n case 'blinn':\n case 'phong':\n data.type = child.nodeName;\n data.parameters = parseEffectParameters( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectParameters( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'emission':\n case 'diffuse':\n case 'specular':\n case 'bump':\n case 'ambient':\n case 'shininess':\n case 'transparency':\n data[ child.nodeName ] = parseEffectParameter( child );\n break;\n case 'transparent':\n data[ child.nodeName ] = {\n opaque: child.getAttribute( 'opaque' ),\n data: parseEffectParameter( child )\n };\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectParameter( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'color':\n data[ child.nodeName ] = parseFloats( child.textContent );\n break;\n\n case 'float':\n data[ child.nodeName ] = parseFloat( child.textContent );\n break;\n\n case 'texture':\n data[ child.nodeName ] = { id: child.getAttribute( 'texture' ), extra: parseEffectParameterTexture( child ) };\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectParameterTexture( xml ) {\n\n var data = {\n technique: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'extra':\n parseEffectParameterTextureExtra( child, data );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectParameterTextureExtra( xml, data ) {\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique':\n parseEffectParameterTextureExtraTechnique( child, data );\n break;\n\n }\n\n }\n\n }\n\n function parseEffectParameterTextureExtraTechnique( xml, data ) {\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'repeatU':\n case 'repeatV':\n case 'offsetU':\n case 'offsetV':\n data.technique[ child.nodeName ] = parseFloat( child.textContent );\n break;\n\n case 'wrapU':\n case 'wrapV':\n\n // some files have values for wrapU/wrapV which become NaN via parseInt\n\n if ( child.textContent.toUpperCase() === 'TRUE' ) {\n\n data.technique[ child.nodeName ] = 1;\n\n } else if ( child.textContent.toUpperCase() === 'FALSE' ) {\n\n data.technique[ child.nodeName ] = 0;\n\n } else {\n\n data.technique[ child.nodeName ] = parseInt( child.textContent );\n\n }\n\n break;\n\n }\n\n }\n\n }\n\n function parseEffectExtra( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique':\n data.technique = parseEffectExtraTechnique( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectExtraTechnique( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'double_sided':\n data[ child.nodeName ] = parseInt( child.textContent );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildEffect( data ) {\n\n return data;\n\n }\n\n function getEffect( id ) {\n\n return getBuild( library.effects[ id ], buildEffect );\n\n }\n\n // material\n\n function parseMaterial( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' )\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'instance_effect':\n data.url = parseId( child.getAttribute( 'url' ) );\n break;\n\n }\n\n }\n\n library.materials[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function getTextureLoader( image ) {\n\n var loader;\n\n var extension = image.slice( ( image.lastIndexOf( '.' ) - 1 >>> 0 ) + 2 ); // http://www.jstips.co/en/javascript/get-file-extension/\n extension = extension.toLowerCase();\n\n switch ( extension ) {\n\n case 'tga':\n loader = tgaLoader;\n break;\n\n default:\n loader = textureLoader;\n\n }\n\n return loader;\n\n }\n\n function buildMaterial( data ) {\n\n var effect = getEffect( data.url );\n var technique = effect.profile.technique;\n var extra = effect.profile.extra;\n\n var material;\n\n switch ( technique.type ) {\n\n case 'phong':\n case 'blinn':\n material = new THREE.MeshPhongMaterial();\n break;\n\n case 'lambert':\n material = new THREE.MeshLambertMaterial();\n break;\n\n default:\n material = new THREE.MeshBasicMaterial();\n break;\n\n }\n\n material.name = data.name;\n\n function getTexture( textureObject ) {\n\n var sampler = effect.profile.samplers[ textureObject.id ];\n var image = null;\n\n // get image\n\n if ( sampler !== undefined ) {\n\n var surface = effect.profile.surfaces[ sampler.source ];\n image = getImage( surface.init_from );\n\n } else {\n\n console.warn( 'THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530).' );\n image = getImage( textureObject.id );\n\n }\n\n // create texture if image is avaiable\n\n if ( image !== null ) {\n\n var loader = getTextureLoader( image );\n\n if ( loader !== undefined ) {\n\n var texture = loader.load( image );\n\n var extra = textureObject.extra;\n\n if ( extra !== undefined && extra.technique !== undefined && isEmpty( extra.technique ) === false ) {\n\n var technique = extra.technique;\n\n texture.wrapS = technique.wrapU ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;\n texture.wrapT = technique.wrapV ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;\n\n texture.offset.set( technique.offsetU || 0, technique.offsetV || 0 );\n texture.repeat.set( technique.repeatU || 1, technique.repeatV || 1 );\n\n } else {\n\n texture.wrapS = THREE.RepeatWrapping;\n texture.wrapT = THREE.RepeatWrapping;\n\n }\n\n return texture;\n\n } else {\n\n console.warn( 'THREE.ColladaLoader: Loader for texture %s not found.', image );\n\n return null;\n\n }\n\n } else {\n\n console.warn( 'THREE.ColladaLoader: Couldn\\'t create texture with ID:', textureObject.id );\n\n return null;\n\n }\n\n }\n\n var parameters = technique.parameters;\n\n for ( var key in parameters ) {\n\n var parameter = parameters[ key ];\n\n switch ( key ) {\n\n case 'diffuse':\n if ( parameter.color ) material.color.fromArray( parameter.color );\n if ( parameter.texture ) material.map = getTexture( parameter.texture );\n break;\n case 'specular':\n if ( parameter.color && material.specular ) material.specular.fromArray( parameter.color );\n if ( parameter.texture ) material.specularMap = getTexture( parameter.texture );\n break;\n case 'bump':\n if ( parameter.texture ) material.normalMap = getTexture( parameter.texture );\n break;\n case 'ambient':\n if ( parameter.texture ) material.lightMap = getTexture( parameter.texture );\n break;\n case 'shininess':\n if ( parameter.float && material.shininess ) material.shininess = parameter.float;\n break;\n case 'emission':\n if ( parameter.color && material.emissive ) material.emissive.fromArray( parameter.color );\n if ( parameter.texture ) material.emissiveMap = getTexture( parameter.texture );\n break;\n\n }\n\n }\n\n //\n\n var transparent = parameters[ 'transparent' ];\n var transparency = parameters[ 'transparency' ];\n\n // <transparency> does not exist but <transparent>\n\n if ( transparency === undefined && transparent ) {\n\n transparency = {\n float: 1\n };\n\n }\n\n // <transparent> does not exist but <transparency>\n\n if ( transparent === undefined && transparency ) {\n\n transparent = {\n opaque: 'A_ONE',\n data: {\n color: [ 1, 1, 1, 1 ]\n } };\n\n }\n\n if ( transparent && transparency ) {\n\n // handle case if a texture exists but no color\n\n if ( transparent.data.texture ) {\n\n // we do not set an alpha map (see #13792)\n\n material.transparent = true;\n\n } else {\n\n var color = transparent.data.color;\n\n switch ( transparent.opaque ) {\n\n case 'A_ONE':\n material.opacity = color[ 3 ] * transparency.float;\n break;\n case 'RGB_ZERO':\n material.opacity = 1 - ( color[ 0 ] * transparency.float );\n break;\n case 'A_ZERO':\n material.opacity = 1 - ( color[ 3 ] * transparency.float );\n break;\n case 'RGB_ONE':\n material.opacity = color[ 0 ] * transparency.float;\n break;\n default:\n console.warn( 'THREE.ColladaLoader: Invalid opaque type \"%s\" of transparent tag.', transparent.opaque );\n\n }\n\n if ( material.opacity < 1 ) material.transparent = true;\n\n }\n\n }\n\n //\n\n if ( extra !== undefined && extra.technique !== undefined && extra.technique.double_sided === 1 ) {\n\n material.side = THREE.DoubleSide;\n\n }\n\n return material;\n\n }\n\n function getMaterial( id ) {\n\n return getBuild( library.materials[ id ], buildMaterial );\n\n }\n\n // camera\n\n function parseCamera( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' )\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'optics':\n data.optics = parseCameraOptics( child );\n break;\n\n }\n\n }\n\n library.cameras[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseCameraOptics( xml ) {\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n switch ( child.nodeName ) {\n\n case 'technique_common':\n return parseCameraTechnique( child );\n\n }\n\n }\n\n return {};\n\n }\n\n function parseCameraTechnique( xml ) {\n\n var data = {};\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n switch ( child.nodeName ) {\n\n case 'perspective':\n case 'orthographic':\n\n data.technique = child.nodeName;\n data.parameters = parseCameraParameters( child );\n\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseCameraParameters( xml ) {\n\n var data = {};\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n switch ( child.nodeName ) {\n\n case 'xfov':\n case 'yfov':\n case 'xmag':\n case 'ymag':\n case 'znear':\n case 'zfar':\n case 'aspect_ratio':\n data[ child.nodeName ] = parseFloat( child.textContent );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildCamera( data ) {\n\n var camera;\n\n switch ( data.optics.technique ) {\n\n case 'perspective':\n camera = new THREE.PerspectiveCamera(\n data.optics.parameters.yfov,\n data.optics.parameters.aspect_ratio,\n data.optics.parameters.znear,\n data.optics.parameters.zfar\n );\n break;\n\n case 'orthographic':\n var ymag = data.optics.parameters.ymag;\n var xmag = data.optics.parameters.xmag;\n var aspectRatio = data.optics.parameters.aspect_ratio;\n\n xmag = ( xmag === undefined ) ? ( ymag * aspectRatio ) : xmag;\n ymag = ( ymag === undefined ) ? ( xmag / aspectRatio ) : ymag;\n\n xmag *= 0.5;\n ymag *= 0.5;\n\n camera = new THREE.OrthographicCamera(\n - xmag, xmag, ymag, - ymag, // left, right, top, bottom\n data.optics.parameters.znear,\n data.optics.parameters.zfar\n );\n break;\n\n default:\n camera = new THREE.PerspectiveCamera();\n break;\n\n }\n\n camera.name = data.name;\n\n return camera;\n\n }\n\n function getCamera( id ) {\n\n var data = library.cameras[ id ];\n\n if ( data !== undefined ) {\n\n return getBuild( data, buildCamera );\n\n }\n\n console.warn( 'THREE.ColladaLoader: Couldn\\'t find camera with ID:', id );\n\n return null;\n\n }\n\n // light\n\n function parseLight( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique_common':\n data = parseLightTechnique( child );\n break;\n\n }\n\n }\n\n library.lights[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseLightTechnique( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'directional':\n case 'point':\n case 'spot':\n case 'ambient':\n\n data.technique = child.nodeName;\n data.parameters = parseLightParameters( child );\n\n }\n\n }\n\n return data;\n\n }\n\n function parseLightParameters( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'color':\n var array = parseFloats( child.textContent );\n data.color = new THREE.Color().fromArray( array );\n break;\n\n case 'falloff_angle':\n data.falloffAngle = parseFloat( child.textContent );\n break;\n\n case 'quadratic_attenuation':\n var f = parseFloat( child.textContent );\n data.distance = f ? Math.sqrt( 1 / f ) : 0;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildLight( data ) {\n\n var light;\n\n switch ( data.technique ) {\n\n case 'directional':\n light = new THREE.DirectionalLight();\n break;\n\n case 'point':\n light = new THREE.PointLight();\n break;\n\n case 'spot':\n light = new THREE.SpotLight();\n break;\n\n case 'ambient':\n light = new THREE.AmbientLight();\n break;\n\n }\n\n if ( data.parameters.color ) light.color.copy( data.parameters.color );\n if ( data.parameters.distance ) light.distance = data.parameters.distance;\n\n return light;\n\n }\n\n function getLight( id ) {\n\n var data = library.lights[ id ];\n\n if ( data !== undefined ) {\n\n return getBuild( data, buildLight );\n\n }\n\n console.warn( 'THREE.ColladaLoader: Couldn\\'t find light with ID:', id );\n\n return null;\n\n }\n\n // geometry\n\n function parseGeometry( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ),\n sources: {},\n vertices: {},\n primitives: []\n };\n\n var mesh = getElementsByTagName( xml, 'mesh' )[ 0 ];\n\n // the following tags inside geometry are not supported yet (see https://github.com/mrdoob/three.js/pull/12606): convex_mesh, spline, brep\n if ( mesh === undefined ) return;\n\n for ( var i = 0; i < mesh.childNodes.length; i ++ ) {\n\n var child = mesh.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n var id = child.getAttribute( 'id' );\n\n switch ( child.nodeName ) {\n\n case 'source':\n data.sources[ id ] = parseSource( child );\n break;\n\n case 'vertices':\n // data.sources[ id ] = data.sources[ parseId( getElementsByTagName( child, 'input' )[ 0 ].getAttribute( 'source' ) ) ];\n data.vertices = parseGeometryVertices( child );\n break;\n\n case 'polygons':\n console.warn( 'THREE.ColladaLoader: Unsupported primitive type: ', child.nodeName );\n break;\n\n case 'lines':\n case 'linestrips':\n case 'polylist':\n case 'triangles':\n data.primitives.push( parseGeometryPrimitive( child ) );\n break;\n\n default:\n console.log( child );\n\n }\n\n }\n\n library.geometries[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseSource( xml ) {\n\n var data = {\n array: [],\n stride: 3\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'float_array':\n data.array = parseFloats( child.textContent );\n break;\n\n case 'Name_array':\n data.array = parseStrings( child.textContent );\n break;\n\n case 'technique_common':\n var accessor = getElementsByTagName( child, 'accessor' )[ 0 ];\n\n if ( accessor !== undefined ) {\n\n data.stride = parseInt( accessor.getAttribute( 'stride' ) );\n\n }\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseGeometryVertices( xml ) {\n\n var data = {};\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n data[ child.getAttribute( 'semantic' ) ] = parseId( child.getAttribute( 'source' ) );\n\n }\n\n return data;\n\n }\n\n function parseGeometryPrimitive( xml ) {\n\n var primitive = {\n type: xml.nodeName,\n material: xml.getAttribute( 'material' ),\n count: parseInt( xml.getAttribute( 'count' ) ),\n inputs: {},\n stride: 0,\n hasUV: false\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'input':\n var id = parseId( child.getAttribute( 'source' ) );\n var semantic = child.getAttribute( 'semantic' );\n var offset = parseInt( child.getAttribute( 'offset' ) );\n var set = parseInt( child.getAttribute( 'set' ) );\n var inputname = ( set > 0 ? semantic + set : semantic );\n primitive.inputs[ inputname ] = { id: id, offset: offset };\n primitive.stride = Math.max( primitive.stride, offset + 1 );\n if ( semantic === 'TEXCOORD' ) primitive.hasUV = true;\n break;\n\n case 'vcount':\n primitive.vcount = parseInts( child.textContent );\n break;\n\n case 'p':\n primitive.p = parseInts( child.textContent );\n break;\n\n }\n\n }\n\n return primitive;\n\n }\n\n function groupPrimitives( primitives ) {\n\n var build = {};\n\n for ( var i = 0; i < primitives.length; i ++ ) {\n\n var primitive = primitives[ i ];\n\n if ( build[ primitive.type ] === undefined ) build[ primitive.type ] = [];\n\n build[ primitive.type ].push( primitive );\n\n }\n\n return build;\n\n }\n\n function checkUVCoordinates( primitives ) {\n\n var count = 0;\n\n for ( var i = 0, l = primitives.length; i < l; i ++ ) {\n\n var primitive = primitives[ i ];\n\n if ( primitive.hasUV === true ) {\n\n count ++;\n\n }\n\n }\n\n if ( count > 0 && count < primitives.length ) {\n\n primitives.uvsNeedsFix = true;\n\n }\n\n }\n\n function buildGeometry( data ) {\n\n var build = {};\n\n var sources = data.sources;\n var vertices = data.vertices;\n var primitives = data.primitives;\n\n if ( primitives.length === 0 ) return {};\n\n // our goal is to create one buffer geometry for a single type of primitives\n // first, we group all primitives by their type\n\n var groupedPrimitives = groupPrimitives( primitives );\n\n for ( var type in groupedPrimitives ) {\n\n var primitiveType = groupedPrimitives[ type ];\n\n // second, ensure consistent uv coordinates for each type of primitives (polylist,triangles or lines)\n\n checkUVCoordinates( primitiveType );\n\n // third, create a buffer geometry for each type of primitives\n\n build[ type ] = buildGeometryType( primitiveType, sources, vertices );\n\n }\n\n return build;\n\n }\n\n function buildGeometryType( primitives, sources, vertices ) {\n\n var build = {};\n\n var position = { array: [], stride: 0 };\n var normal = { array: [], stride: 0 };\n var uv = { array: [], stride: 0 };\n var uv2 = { array: [], stride: 0 };\n var color = { array: [], stride: 0 };\n\n var skinIndex = { array: [], stride: 4 };\n var skinWeight = { array: [], stride: 4 };\n\n var geometry = new THREE.BufferGeometry();\n\n var materialKeys = [];\n\n var start = 0;\n\n for ( var p = 0; p < primitives.length; p ++ ) {\n\n var primitive = primitives[ p ];\n var inputs = primitive.inputs;\n\n // groups\n\n var count = 0;\n\n switch ( primitive.type ) {\n\n case 'lines':\n case 'linestrips':\n count = primitive.count * 2;\n break;\n\n case 'triangles':\n count = primitive.count * 3;\n break;\n\n case 'polylist':\n\n for ( var g = 0; g < primitive.count; g ++ ) {\n\n var vc = primitive.vcount[ g ];\n\n switch ( vc ) {\n\n case 3:\n count += 3; // single triangle\n break;\n\n case 4:\n count += 6; // quad, subdivided into two triangles\n break;\n\n default:\n count += ( vc - 2 ) * 3; // polylist with more than four vertices\n break;\n\n }\n\n }\n\n break;\n\n default:\n console.warn( 'THREE.ColladaLoader: Unknow primitive type:', primitive.type );\n\n }\n\n geometry.addGroup( start, count, p );\n start += count;\n\n // material\n\n if ( primitive.material ) {\n\n materialKeys.push( primitive.material );\n\n }\n\n // geometry data\n\n for ( var name in inputs ) {\n\n var input = inputs[ name ];\n\n switch ( name ) {\n\n case 'VERTEX':\n for ( var key in vertices ) {\n\n var id = vertices[ key ];\n\n switch ( key ) {\n\n case 'POSITION':\n var prevLength = position.array.length;\n buildGeometryData( primitive, sources[ id ], input.offset, position.array );\n position.stride = sources[ id ].stride;\n\n if ( sources.skinWeights && sources.skinIndices ) {\n\n buildGeometryData( primitive, sources.skinIndices, input.offset, skinIndex.array );\n buildGeometryData( primitive, sources.skinWeights, input.offset, skinWeight.array );\n\n }\n\n // see #3803\n\n if ( primitive.hasUV === false && primitives.uvsNeedsFix === true ) {\n\n var count = ( position.array.length - prevLength ) / position.stride;\n\n for ( var i = 0; i < count; i ++ ) {\n\n // fill missing uv coordinates\n\n uv.array.push( 0, 0 );\n\n }\n\n }\n break;\n\n case 'NORMAL':\n buildGeometryData( primitive, sources[ id ], input.offset, normal.array );\n normal.stride = sources[ id ].stride;\n break;\n\n case 'COLOR':\n buildGeometryData( primitive, sources[ id ], input.offset, color.array );\n color.stride = sources[ id ].stride;\n break;\n\n case 'TEXCOORD':\n buildGeometryData( primitive, sources[ id ], input.offset, uv.array );\n uv.stride = sources[ id ].stride;\n break;\n\n case 'TEXCOORD1':\n buildGeometryData( primitive, sources[ id ], input.offset, uv2.array );\n uv.stride = sources[ id ].stride;\n break;\n\n default:\n console.warn( 'THREE.ColladaLoader: Semantic \"%s\" not handled in geometry build process.', key );\n\n }\n\n }\n break;\n\n case 'NORMAL':\n buildGeometryData( primitive, sources[ input.id ], input.offset, normal.array );\n normal.stride = sources[ input.id ].stride;\n break;\n\n case 'COLOR':\n buildGeometryData( primitive, sources[ input.id ], input.offset, color.array );\n color.stride = sources[ input.id ].stride;\n break;\n\n case 'TEXCOORD':\n buildGeometryData( primitive, sources[ input.id ], input.offset, uv.array );\n uv.stride = sources[ input.id ].stride;\n break;\n\n case 'TEXCOORD1':\n buildGeometryData( primitive, sources[ input.id ], input.offset, uv2.array );\n uv2.stride = sources[ input.id ].stride;\n break;\n\n }\n\n }\n\n }\n\n // build geometry\n\n if ( position.array.length > 0 ) geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( position.array, position.stride ) );\n if ( normal.array.length > 0 ) geometry.addAttribute( 'normal', new THREE.Float32BufferAttribute( normal.array, normal.stride ) );\n if ( color.array.length > 0 ) geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( color.array, color.stride ) );\n if ( uv.array.length > 0 ) geometry.addAttribute( 'uv', new THREE.Float32BufferAttribute( uv.array, uv.stride ) );\n if ( uv2.array.length > 0 ) geometry.addAttribute( 'uv2', new THREE.Float32BufferAttribute( uv2.array, uv2.stride ) );\n\n if ( skinIndex.array.length > 0 ) geometry.addAttribute( 'skinIndex', new THREE.Float32BufferAttribute( skinIndex.array, skinIndex.stride ) );\n if ( skinWeight.array.length > 0 ) geometry.addAttribute( 'skinWeight', new THREE.Float32BufferAttribute( skinWeight.array, skinWeight.stride ) );\n\n build.data = geometry;\n build.type = primitives[ 0 ].type;\n build.materialKeys = materialKeys;\n\n return build;\n\n }\n\n function buildGeometryData( primitive, source, offset, array ) {\n\n var indices = primitive.p;\n var stride = primitive.stride;\n var vcount = primitive.vcount;\n\n function pushVector( i ) {\n\n var index = indices[ i + offset ] * sourceStride;\n var length = index + sourceStride;\n\n for ( ; index < length; index ++ ) {\n\n array.push( sourceArray[ index ] );\n\n }\n\n }\n\n var sourceArray = source.array;\n var sourceStride = source.stride;\n\n if ( primitive.vcount !== undefined ) {\n\n var index = 0;\n\n for ( var i = 0, l = vcount.length; i < l; i ++ ) {\n\n var count = vcount[ i ];\n\n if ( count === 4 ) {\n\n var a = index + stride * 0;\n var b = index + stride * 1;\n var c = index + stride * 2;\n var d = index + stride * 3;\n\n pushVector( a ); pushVector( b ); pushVector( d );\n pushVector( b ); pushVector( c ); pushVector( d );\n\n } else if ( count === 3 ) {\n\n var a = index + stride * 0;\n var b = index + stride * 1;\n var c = index + stride * 2;\n\n pushVector( a ); pushVector( b ); pushVector( c );\n\n } else if ( count > 4 ) {\n\n for ( var k = 1, kl = ( count - 2 ); k <= kl; k ++ ) {\n\n var a = index + stride * 0;\n var b = index + stride * k;\n var c = index + stride * ( k + 1 );\n\n pushVector( a ); pushVector( b ); pushVector( c );\n\n }\n\n }\n\n index += stride * count;\n\n }\n\n } else {\n\n for ( var i = 0, l = indices.length; i < l; i += stride ) {\n\n pushVector( i );\n\n }\n\n }\n\n }\n\n function getGeometry( id ) {\n\n return getBuild( library.geometries[ id ], buildGeometry );\n\n }\n\n // kinematics\n\n function parseKinematicsModel( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ) || '',\n joints: {},\n links: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique_common':\n parseKinematicsTechniqueCommon( child, data );\n break;\n\n }\n\n }\n\n library.kinematicsModels[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function buildKinematicsModel( data ) {\n\n if ( data.build !== undefined ) return data.build;\n\n return data;\n\n }\n\n function getKinematicsModel( id ) {\n\n return getBuild( library.kinematicsModels[ id ], buildKinematicsModel );\n\n }\n\n function parseKinematicsTechniqueCommon( xml, data ) {\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'joint':\n data.joints[ child.getAttribute( 'sid' ) ] = parseKinematicsJoint( child );\n break;\n\n case 'link':\n data.links.push( parseKinematicsLink( child ) );\n break;\n\n }\n\n }\n\n }\n\n function parseKinematicsJoint( xml ) {\n\n var data;\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'prismatic':\n case 'revolute':\n data = parseKinematicsJointParameter( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseKinematicsJointParameter( xml, data ) {\n\n var data = {\n sid: xml.getAttribute( 'sid' ),\n name: xml.getAttribute( 'name' ) || '',\n axis: new THREE.Vector3(),\n limits: {\n min: 0,\n max: 0\n },\n type: xml.nodeName,\n static: false,\n zeroPosition: 0,\n middlePosition: 0\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'axis':\n var array = parseFloats( child.textContent );\n data.axis.fromArray( array );\n break;\n case 'limits':\n var max = child.getElementsByTagName( 'max' )[ 0 ];\n var min = child.getElementsByTagName( 'min' )[ 0 ];\n\n data.limits.max = parseFloat( max.textContent );\n data.limits.min = parseFloat( min.textContent );\n break;\n\n }\n\n }\n\n // if min is equal to or greater than max, consider the joint static\n\n if ( data.limits.min >= data.limits.max ) {\n\n data.static = true;\n\n }\n\n // calculate middle position\n\n data.middlePosition = ( data.limits.min + data.limits.max ) / 2.0;\n\n return data;\n\n }\n\n function parseKinematicsLink( xml ) {\n\n var data = {\n sid: xml.getAttribute( 'sid' ),\n name: xml.getAttribute( 'name' ) || '',\n attachments: [],\n transforms: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'attachment_full':\n data.attachments.push( parseKinematicsAttachment( child ) );\n break;\n\n case 'matrix':\n case 'translate':\n case 'rotate':\n data.transforms.push( parseKinematicsTransform( child ) );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseKinematicsAttachment( xml ) {\n\n var data = {\n joint: xml.getAttribute( 'joint' ).split( '/' ).pop(),\n transforms: [],\n links: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'link':\n data.links.push( parseKinematicsLink( child ) );\n break;\n\n case 'matrix':\n case 'translate':\n case 'rotate':\n data.transforms.push( parseKinematicsTransform( child ) );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseKinematicsTransform( xml ) {\n\n var data = {\n type: xml.nodeName\n };\n\n var array = parseFloats( xml.textContent );\n\n switch ( data.type ) {\n\n case 'matrix':\n data.obj = new THREE.Matrix4();\n data.obj.fromArray( array ).transpose();\n break;\n\n case 'translate':\n data.obj = new THREE.Vector3();\n data.obj.fromArray( array );\n break;\n\n case 'rotate':\n data.obj = new THREE.Vector3();\n data.obj.fromArray( array );\n data.angle = THREE.Math.degToRad( array[ 3 ] );\n break;\n\n }\n\n return data;\n\n }\n\n // physics\n\n function parsePhysicsModel( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ) || '',\n rigidBodies: {}\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'rigid_body':\n data.rigidBodies[ child.getAttribute( 'name' ) ] = {};\n parsePhysicsRigidBody( child, data.rigidBodies[ child.getAttribute( 'name' ) ] );\n break;\n\n }\n\n }\n\n library.physicsModels[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parsePhysicsRigidBody( xml, data ) {\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique_common':\n parsePhysicsTechniqueCommon( child, data );\n break;\n\n }\n\n }\n\n }\n\n function parsePhysicsTechniqueCommon( xml, data ) {\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'inertia':\n data.inertia = parseFloats( child.textContent );\n break;\n\n case 'mass':\n data.mass = parseFloats( child.textContent )[ 0 ];\n break;\n\n }\n\n }\n\n }\n\n // scene\n\n function parseKinematicsScene( xml ) {\n\n var data = {\n bindJointAxis: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'bind_joint_axis':\n data.bindJointAxis.push( parseKinematicsBindJointAxis( child ) );\n break;\n\n }\n\n }\n\n library.kinematicsScenes[ parseId( xml.getAttribute( 'url' ) ) ] = data;\n\n }\n\n function parseKinematicsBindJointAxis( xml ) {\n\n var data = {\n target: xml.getAttribute( 'target' ).split( '/' ).pop()\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'axis':\n var param = child.getElementsByTagName( 'param' )[ 0 ];\n data.axis = param.textContent;\n var tmpJointIndex = data.axis.split( 'inst_' ).pop().split( 'axis' )[ 0 ];\n data.jointIndex = tmpJointIndex.substr( 0, tmpJointIndex.length - 1 );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildKinematicsScene( data ) {\n\n if ( data.build !== undefined ) return data.build;\n\n return data;\n\n }\n\n function getKinematicsScene( id ) {\n\n return getBuild( library.kinematicsScenes[ id ], buildKinematicsScene );\n\n }\n\n function setupKinematics() {\n\n var kinematicsModelId = Object.keys( library.kinematicsModels )[ 0 ];\n var kinematicsSceneId = Object.keys( library.kinematicsScenes )[ 0 ];\n var visualSceneId = Object.keys( library.visualScenes )[ 0 ];\n\n if ( kinematicsModelId === undefined || kinematicsSceneId === undefined ) return;\n\n var kinematicsModel = getKinematicsModel( kinematicsModelId );\n var kinematicsScene = getKinematicsScene( kinematicsSceneId );\n var visualScene = getVisualScene( visualSceneId );\n\n var bindJointAxis = kinematicsScene.bindJointAxis;\n var jointMap = {};\n\n for ( var i = 0, l = bindJointAxis.length; i < l; i ++ ) {\n\n var axis = bindJointAxis[ i ];\n\n // the result of the following query is an element of type 'translate', 'rotate','scale' or 'matrix'\n\n var targetElement = collada.querySelector( '[sid=\"' + axis.target + '\"]' );\n\n if ( targetElement ) {\n\n // get the parent of the transfrom element\n\n var parentVisualElement = targetElement.parentElement;\n\n // connect the joint of the kinematics model with the element in the visual scene\n\n connect( axis.jointIndex, parentVisualElement );\n\n }\n\n }\n\n function connect( jointIndex, visualElement ) {\n\n var visualElementName = visualElement.getAttribute( 'name' );\n var joint = kinematicsModel.joints[ jointIndex ];\n\n visualScene.traverse( function ( object ) {\n\n if ( object.name === visualElementName ) {\n\n jointMap[ jointIndex ] = {\n object: object,\n transforms: buildTransformList( visualElement ),\n joint: joint,\n position: joint.zeroPosition\n };\n\n }\n\n } );\n\n }\n\n var m0 = new THREE.Matrix4();\n\n kinematics = {\n\n joints: kinematicsModel && kinematicsModel.joints,\n\n getJointValue: function ( jointIndex ) {\n\n var jointData = jointMap[ jointIndex ];\n\n if ( jointData ) {\n\n return jointData.position;\n\n } else {\n\n console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' doesn\\'t exist.' );\n\n }\n\n },\n\n setJointValue: function ( jointIndex, value ) {\n\n var jointData = jointMap[ jointIndex ];\n\n if ( jointData ) {\n\n var joint = jointData.joint;\n\n if ( value > joint.limits.max || value < joint.limits.min ) {\n\n console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' value ' + value + ' outside of limits (min: ' + joint.limits.min + ', max: ' + joint.limits.max + ').' );\n\n } else if ( joint.static ) {\n\n console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' is static.' );\n\n } else {\n\n var object = jointData.object;\n var axis = joint.axis;\n var transforms = jointData.transforms;\n\n matrix.identity();\n\n // each update, we have to apply all transforms in the correct order\n\n for ( var i = 0; i < transforms.length; i ++ ) {\n\n var transform = transforms[ i ];\n\n // if there is a connection of the transform node with a joint, apply the joint value\n\n if ( transform.sid && transform.sid.indexOf( jointIndex ) !== - 1 ) {\n\n switch ( joint.type ) {\n\n case 'revolute':\n matrix.multiply( m0.makeRotationAxis( axis, THREE.Math.degToRad( value ) ) );\n break;\n\n case 'prismatic':\n matrix.multiply( m0.makeTranslation( axis.x * value, axis.y * value, axis.z * value ) );\n break;\n\n default:\n console.warn( 'THREE.ColladaLoader: Unknown joint type: ' + joint.type );\n break;\n\n }\n\n } else {\n\n switch ( transform.type ) {\n\n case 'matrix':\n matrix.multiply( transform.obj );\n break;\n\n case 'translate':\n matrix.multiply( m0.makeTranslation( transform.obj.x, transform.obj.y, transform.obj.z ) );\n break;\n\n case 'scale':\n matrix.scale( transform.obj );\n break;\n\n case 'rotate':\n matrix.multiply( m0.makeRotationAxis( transform.obj, transform.angle ) );\n break;\n\n }\n\n }\n\n }\n\n object.matrix.copy( matrix );\n object.matrix.decompose( object.position, object.quaternion, object.scale );\n\n jointMap[ jointIndex ].position = value;\n\n }\n\n } else {\n\n console.log( 'THREE.ColladaLoader: ' + jointIndex + ' does not exist.' );\n\n }\n\n }\n\n };\n\n }\n\n function buildTransformList( node ) {\n\n var transforms = [];\n\n var xml = collada.querySelector( '[id=\"' + node.id + '\"]' );\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'matrix':\n var array = parseFloats( child.textContent );\n var matrix = new THREE.Matrix4().fromArray( array ).transpose();\n transforms.push( {\n sid: child.getAttribute( 'sid' ),\n type: child.nodeName,\n obj: matrix\n } );\n break;\n\n case 'translate':\n case 'scale':\n var array = parseFloats( child.textContent );\n var vector = new THREE.Vector3().fromArray( array );\n transforms.push( {\n sid: child.getAttribute( 'sid' ),\n type: child.nodeName,\n obj: vector\n } );\n break;\n\n case 'rotate':\n var array = parseFloats( child.textContent );\n var vector = new THREE.Vector3().fromArray( array );\n var angle = THREE.Math.degToRad( array[ 3 ] );\n transforms.push( {\n sid: child.getAttribute( 'sid' ),\n type: child.nodeName,\n obj: vector,\n angle: angle\n } );\n break;\n\n }\n\n }\n\n return transforms;\n\n }\n\n // nodes\n\n function prepareNodes( xml ) {\n\n var elements = xml.getElementsByTagName( 'node' );\n\n // ensure all node elements have id attributes\n\n for ( var i = 0; i < elements.length; i ++ ) {\n\n var element = elements[ i ];\n\n if ( element.hasAttribute( 'id' ) === false ) {\n\n element.setAttribute( 'id', generateId() );\n\n }\n\n }\n\n }\n\n var matrix = new THREE.Matrix4();\n var vector = new THREE.Vector3();\n\n function parseNode( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ) || '',\n type: xml.getAttribute( 'type' ),\n id: xml.getAttribute( 'id' ),\n sid: xml.getAttribute( 'sid' ),\n matrix: new THREE.Matrix4(),\n nodes: [],\n instanceCameras: [],\n instanceControllers: [],\n instanceLights: [],\n instanceGeometries: [],\n instanceNodes: [],\n transforms: {}\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'node':\n data.nodes.push( child.getAttribute( 'id' ) );\n parseNode( child );\n break;\n\n case 'instance_camera':\n data.instanceCameras.push( parseId( child.getAttribute( 'url' ) ) );\n break;\n\n case 'instance_controller':\n data.instanceControllers.push( parseNodeInstance( child ) );\n break;\n\n case 'instance_light':\n data.instanceLights.push( parseId( child.getAttribute( 'url' ) ) );\n break;\n\n case 'instance_geometry':\n data.instanceGeometries.push( parseNodeInstance( child ) );\n break;\n\n case 'instance_node':\n data.instanceNodes.push( parseId( child.getAttribute( 'url' ) ) );\n break;\n\n case 'matrix':\n var array = parseFloats( child.textContent );\n data.matrix.multiply( matrix.fromArray( array ).transpose() );\n data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName;\n break;\n\n case 'translate':\n var array = parseFloats( child.textContent );\n vector.fromArray( array );\n data.matrix.multiply( matrix.makeTranslation( vector.x, vector.y, vector.z ) );\n data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName;\n break;\n\n case 'rotate':\n var array = parseFloats( child.textContent );\n var angle = THREE.Math.degToRad( array[ 3 ] );\n data.matrix.multiply( matrix.makeRotationAxis( vector.fromArray( array ), angle ) );\n data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName;\n break;\n\n case 'scale':\n var array = parseFloats( child.textContent );\n data.matrix.scale( vector.fromArray( array ) );\n data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName;\n break;\n\n case 'extra':\n break;\n\n default:\n console.log( child );\n\n }\n\n }\n\n if ( hasNode( data.id ) ) {\n\n console.warn( 'THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.', data.id );\n\n } else {\n\n library.nodes[ data.id ] = data;\n\n }\n\n return data;\n\n }\n\n function parseNodeInstance( xml ) {\n\n var data = {\n id: parseId( xml.getAttribute( 'url' ) ),\n materials: {},\n skeletons: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n switch ( child.nodeName ) {\n\n case 'bind_material':\n var instances = child.getElementsByTagName( 'instance_material' );\n\n for ( var j = 0; j < instances.length; j ++ ) {\n\n var instance = instances[ j ];\n var symbol = instance.getAttribute( 'symbol' );\n var target = instance.getAttribute( 'target' );\n\n data.materials[ symbol ] = parseId( target );\n\n }\n\n break;\n\n case 'skeleton':\n data.skeletons.push( parseId( child.textContent ) );\n break;\n\n default:\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildSkeleton( skeletons, joints ) {\n\n var boneData = [];\n var sortedBoneData = [];\n\n var i, j, data;\n\n // a skeleton can have multiple root bones. collada expresses this\n // situtation with multiple \"skeleton\" tags per controller instance\n\n for ( i = 0; i < skeletons.length; i ++ ) {\n\n var skeleton = skeletons[ i ];\n\n var root;\n\n if ( hasNode( skeleton ) ) {\n\n root = getNode( skeleton );\n buildBoneHierarchy( root, joints, boneData );\n\n } else if ( hasVisualScene( skeleton ) ) {\n\n // handle case where the skeleton refers to the visual scene (#13335)\n\n var visualScene = library.visualScenes[ skeleton ];\n var children = visualScene.children;\n\n for ( var j = 0; j < children.length; j ++ ) {\n\n var child = children[ j ];\n\n if ( child.type === 'JOINT' ) {\n\n var root = getNode( child.id );\n buildBoneHierarchy( root, joints, boneData );\n\n }\n\n }\n\n } else {\n\n console.error( 'THREE.ColladaLoader: Unable to find root bone of skeleton with ID:', skeleton );\n\n }\n\n }\n\n // sort bone data (the order is defined in the corresponding controller)\n\n for ( i = 0; i < joints.length; i ++ ) {\n\n for ( j = 0; j < boneData.length; j ++ ) {\n\n data = boneData[ j ];\n\n if ( data.bone.name === joints[ i ].name ) {\n\n sortedBoneData[ i ] = data;\n data.processed = true;\n break;\n\n }\n\n }\n\n }\n\n // add unprocessed bone data at the end of the list\n\n for ( i = 0; i < boneData.length; i ++ ) {\n\n data = boneData[ i ];\n\n if ( data.processed === false ) {\n\n sortedBoneData.push( data );\n data.processed = true;\n\n }\n\n }\n\n // setup arrays for skeleton creation\n\n var bones = [];\n var boneInverses = [];\n\n for ( i = 0; i < sortedBoneData.length; i ++ ) {\n\n data = sortedBoneData[ i ];\n\n bones.push( data.bone );\n boneInverses.push( data.boneInverse );\n\n }\n\n return new THREE.Skeleton( bones, boneInverses );\n\n }\n\n function buildBoneHierarchy( root, joints, boneData ) {\n\n // setup bone data from visual scene\n\n root.traverse( function ( object ) {\n\n if ( object.isBone === true ) {\n\n var boneInverse;\n\n // retrieve the boneInverse from the controller data\n\n for ( var i = 0; i < joints.length; i ++ ) {\n\n var joint = joints[ i ];\n\n if ( joint.name === object.name ) {\n\n boneInverse = joint.boneInverse;\n break;\n\n }\n\n }\n\n if ( boneInverse === undefined ) {\n\n // Unfortunately, there can be joints in the visual scene that are not part of the\n // corresponding controller. In this case, we have to create a dummy boneInverse matrix\n // for the respective bone. This bone won't affect any vertices, because there are no skin indices\n // and weights defined for it. But we still have to add the bone to the sorted bone list in order to\n // ensure a correct animation of the model.\n\n boneInverse = new THREE.Matrix4();\n\n }\n\n boneData.push( { bone: object, boneInverse: boneInverse, processed: false } );\n\n }\n\n } );\n\n }\n\n function buildNode( data ) {\n\n var objects = [];\n\n var matrix = data.matrix;\n var nodes = data.nodes;\n var type = data.type;\n var instanceCameras = data.instanceCameras;\n var instanceControllers = data.instanceControllers;\n var instanceLights = data.instanceLights;\n var instanceGeometries = data.instanceGeometries;\n var instanceNodes = data.instanceNodes;\n\n // nodes\n\n for ( var i = 0, l = nodes.length; i < l; i ++ ) {\n\n objects.push( getNode( nodes[ i ] ) );\n\n }\n\n // instance cameras\n\n for ( var i = 0, l = instanceCameras.length; i < l; i ++ ) {\n\n var instanceCamera = getCamera( instanceCameras[ i ] );\n\n if ( instanceCamera !== null ) {\n\n objects.push( instanceCamera.clone() );\n\n }\n\n }\n\n // instance controllers\n\n for ( var i = 0, l = instanceControllers.length; i < l; i ++ ) {\n\n var instance = instanceControllers[ i ];\n var controller = getController( instance.id );\n var geometries = getGeometry( controller.id );\n var newObjects = buildObjects( geometries, instance.materials );\n\n var skeletons = instance.skeletons;\n var joints = controller.skin.joints;\n\n var skeleton = buildSkeleton( skeletons, joints );\n\n for ( var j = 0, jl = newObjects.length; j < jl; j ++ ) {\n\n var object = newObjects[ j ];\n\n if ( object.isSkinnedMesh ) {\n\n object.bind( skeleton, controller.skin.bindMatrix );\n object.normalizeSkinWeights();\n\n }\n\n objects.push( object );\n\n }\n\n }\n\n // instance lights\n\n for ( var i = 0, l = instanceLights.length; i < l; i ++ ) {\n\n var instanceLight = getLight( instanceLights[ i ] );\n\n if ( instanceLight !== null ) {\n\n objects.push( instanceLight.clone() );\n\n }\n\n }\n\n // instance geometries\n\n for ( var i = 0, l = instanceGeometries.length; i < l; i ++ ) {\n\n var instance = instanceGeometries[ i ];\n\n // a single geometry instance in collada can lead to multiple object3Ds.\n // this is the case when primitives are combined like triangles and lines\n\n var geometries = getGeometry( instance.id );\n var newObjects = buildObjects( geometries, instance.materials );\n\n for ( var j = 0, jl = newObjects.length; j < jl; j ++ ) {\n\n objects.push( newObjects[ j ] );\n\n }\n\n }\n\n // instance nodes\n\n for ( var i = 0, l = instanceNodes.length; i < l; i ++ ) {\n\n objects.push( getNode( instanceNodes[ i ] ).clone() );\n\n }\n\n var object;\n\n if ( nodes.length === 0 && objects.length === 1 ) {\n\n object = objects[ 0 ];\n\n } else {\n\n object = ( type === 'JOINT' ) ? new THREE.Bone() : new THREE.Group();\n\n for ( var i = 0; i < objects.length; i ++ ) {\n\n object.add( objects[ i ] );\n\n }\n\n }\n\n if ( object.name === '' ) {\n\n object.name = ( type === 'JOINT' ) ? data.sid : data.name;\n\n }\n\n object.matrix.copy( matrix );\n object.matrix.decompose( object.position, object.quaternion, object.scale );\n\n return object;\n\n }\n\n var fallbackMaterial = new THREE.MeshBasicMaterial( { color: 0xff00ff } );\n\n function resolveMaterialBinding( keys, instanceMaterials ) {\n\n var materials = [];\n\n for ( var i = 0, l = keys.length; i < l; i ++ ) {\n\n var id = instanceMaterials[ keys[ i ] ];\n\n if ( id === undefined ) {\n\n console.warn( 'THREE.ColladaLoader: Material with key %s not found. Apply fallback material.', keys[ i ] );\n materials.push( fallbackMaterial );\n\n } else {\n\n materials.push( getMaterial( id ) );\n\n }\n\n }\n\n return materials;\n\n }\n\n function buildObjects( geometries, instanceMaterials ) {\n\n var objects = [];\n\n for ( var type in geometries ) {\n\n var geometry = geometries[ type ];\n\n var materials = resolveMaterialBinding( geometry.materialKeys, instanceMaterials );\n\n // handle case if no materials are defined\n\n if ( materials.length === 0 ) {\n\n if ( type === 'lines' || type === 'linestrips' ) {\n\n materials.push( new THREE.LineBasicMaterial() );\n\n } else {\n\n materials.push( new THREE.MeshPhongMaterial() );\n\n }\n\n }\n\n // regard skinning\n\n var skinning = ( geometry.data.attributes.skinIndex !== undefined );\n\n if ( skinning ) {\n\n for ( var i = 0, l = materials.length; i < l; i ++ ) {\n\n materials[ i ].skinning = true;\n\n }\n\n }\n\n // choose between a single or multi materials (material array)\n\n var material = ( materials.length === 1 ) ? materials[ 0 ] : materials;\n\n // now create a specific 3D object\n\n var object;\n\n switch ( type ) {\n\n case 'lines':\n object = new THREE.LineSegments( geometry.data, material );\n break;\n\n case 'linestrips':\n object = new THREE.Line( geometry.data, material );\n break;\n\n case 'triangles':\n case 'polylist':\n if ( skinning ) {\n\n object = new THREE.SkinnedMesh( geometry.data, material );\n\n } else {\n\n object = new THREE.Mesh( geometry.data, material );\n\n }\n break;\n\n }\n\n objects.push( object );\n\n }\n\n return objects;\n\n }\n\n function hasNode( id ) {\n\n return library.nodes[ id ] !== undefined;\n\n }\n\n function getNode( id ) {\n\n return getBuild( library.nodes[ id ], buildNode );\n\n }\n\n // visual scenes\n\n function parseVisualScene( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ),\n children: []\n };\n\n prepareNodes( xml );\n\n var elements = getElementsByTagName( xml, 'node' );\n\n for ( var i = 0; i < elements.length; i ++ ) {\n\n data.children.push( parseNode( elements[ i ] ) );\n\n }\n\n library.visualScenes[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function buildVisualScene( data ) {\n\n var group = new THREE.Group();\n group.name = data.name;\n\n var children = data.children;\n\n for ( var i = 0; i < children.length; i ++ ) {\n\n var child = children[ i ];\n\n group.add( getNode( child.id ) );\n\n }\n\n return group;\n\n }\n\n function hasVisualScene( id ) {\n\n return library.visualScenes[ id ] !== undefined;\n\n }\n\n function getVisualScene( id ) {\n\n return getBuild( library.visualScenes[ id ], buildVisualScene );\n\n }\n\n // scenes\n\n function parseScene( xml ) {\n\n var instance = getElementsByTagName( xml, 'instance_visual_scene' )[ 0 ];\n return getVisualScene( parseId( instance.getAttribute( 'url' ) ) );\n\n }\n\n function setupAnimations() {\n\n var clips = library.clips;\n\n if ( isEmpty( clips ) === true ) {\n\n if ( isEmpty( library.animations ) === false ) {\n\n // if there are animations but no clips, we create a default clip for playback\n\n var tracks = [];\n\n for ( var id in library.animations ) {\n\n var animationTracks = getAnimation( id );\n\n for ( var i = 0, l = animationTracks.length; i < l; i ++ ) {\n\n tracks.push( animationTracks[ i ] );\n\n }\n\n }\n\n animations.push( new THREE.AnimationClip( 'default', - 1, tracks ) );\n\n }\n\n } else {\n\n for ( var id in clips ) {\n\n animations.push( getAnimationClip( id ) );\n\n }\n\n }\n\n }\n\n if ( text.length === 0 ) {\n\n return { scene: new THREE.Scene() };\n\n }\n\n var xml = new DOMParser().parseFromString( text, 'application/xml' );\n\n var collada = getElementsByTagName( xml, 'COLLADA' )[ 0 ];\n\n // metadata\n\n var version = collada.getAttribute( 'version' );\n console.log( 'THREE.ColladaLoader: File version', version );\n\n var asset = parseAsset( getElementsByTagName( collada, 'asset' )[ 0 ] );\n var textureLoader = new THREE.TextureLoader( this.manager );\n textureLoader.setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin );\n\n var tgaLoader;\n\n if ( THREE.TGALoader ) {\n\n tgaLoader = new THREE.TGALoader( this.manager );\n tgaLoader.setPath( this.resourcePath || path );\n\n }\n\n //\n\n var animations = [];\n var kinematics = {};\n var count = 0;\n\n //\n\n var library = {\n animations: {},\n clips: {},\n controllers: {},\n images: {},\n effects: {},\n materials: {},\n cameras: {},\n lights: {},\n geometries: {},\n nodes: {},\n visualScenes: {},\n kinematicsModels: {},\n physicsModels: {},\n kinematicsScenes: {}\n };\n\n parseLibrary( collada, 'library_animations', 'animation', parseAnimation );\n parseLibrary( collada, 'library_animation_clips', 'animation_clip', parseAnimationClip );\n parseLibrary( collada, 'library_controllers', 'controller', parseController );\n parseLibrary( collada, 'library_images', 'image', parseImage );\n parseLibrary( collada, 'library_effects', 'effect', parseEffect );\n parseLibrary( collada, 'library_materials', 'material', parseMaterial );\n parseLibrary( collada, 'library_cameras', 'camera', parseCamera );\n parseLibrary( collada, 'library_lights', 'light', parseLight );\n parseLibrary( collada, 'library_geometries', 'geometry', parseGeometry );\n parseLibrary( collada, 'library_nodes', 'node', parseNode );\n parseLibrary( collada, 'library_visual_scenes', 'visual_scene', parseVisualScene );\n parseLibrary( collada, 'library_kinematics_models', 'kinematics_model', parseKinematicsModel );\n parseLibrary( collada, 'library_physics_models', 'physics_model', parsePhysicsModel );\n parseLibrary( collada, 'scene', 'instance_kinematics_scene', parseKinematicsScene );\n\n buildLibrary( library.animations, buildAnimation );\n buildLibrary( library.clips, buildAnimationClip );\n buildLibrary( library.controllers, buildController );\n buildLibrary( library.images, buildImage );\n buildLibrary( library.effects, buildEffect );\n buildLibrary( library.materials, buildMaterial );\n buildLibrary( library.cameras, buildCamera );\n buildLibrary( library.lights, buildLight );\n buildLibrary( library.geometries, buildGeometry );\n buildLibrary( library.visualScenes, buildVisualScene );\n\n setupAnimations();\n setupKinematics();\n\n var scene = parseScene( getElementsByTagName( collada, 'scene' )[ 0 ] );\n\n if ( asset.upAxis === 'Z_UP' ) {\n\n scene.quaternion.setFromEuler( new THREE.Euler( - Math.PI / 2, 0, 0 ) );\n\n }\n\n scene.scale.multiplyScalar( asset.unit );\n\n return {\n animations: animations,\n kinematics: kinematics,\n library: library,\n scene: scene\n };\n\n }\n\n};\n","THREE.FBXLoader = require('../../lib/FBXLoader');\n\n/**\n * fbx-model\n *\n * Loader for FBX format. Supports ASCII, but *not* binary, models.\n */\nmodule.exports = AFRAME.registerComponent('fbx-model', {\n schema: {\n src: { type: 'asset' },\n crossorigin: { default: '' }\n },\n\n init: function () {\n this.model = null;\n },\n\n update: function () {\n const data = this.data;\n if (!data.src) return;\n\n this.remove();\n const loader = new THREE.FBXLoader();\n if (data.crossorigin) loader.setCrossOrigin(data.crossorigin);\n loader.load(data.src, this.load.bind(this));\n },\n\n load: function (model) {\n this.model = model;\n this.el.setObject3D('mesh', model);\n this.el.emit('model-loaded', {format: 'fbx', model: model});\n },\n\n remove: function () {\n if (this.model) this.el.removeObject3D('mesh');\n }\n});\n","/**\n * @author Kyle-Larson https://github.com/Kyle-Larson\n * @author Takahiro https://github.com/takahirox\n * @author Lewy Blue https://github.com/looeee\n *\n * Loader loads FBX file and generates Group representing FBX scene.\n * Requires FBX file to be >= 7.0 and in ASCII or >= 6400 in Binary format\n * Versions lower than this may load but will probably have errors\n *\n * Needs Support:\n * Morph normals / blend shape normals\n *\n * FBX format references:\n * \thttps://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure\n * \thttp://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_index_html (C++ SDK reference)\n *\n * \tBinary format specification:\n *\t\thttps://code.blender.org/2013/08/fbx-binary-file-format-specification/\n */\n\n\nmodule.exports = THREE.FBXLoader = ( function () {\n\n\tvar fbxTree;\n\tvar connections;\n\tvar sceneGraph;\n\n\tfunction FBXLoader( manager ) {\n\n\t\tthis.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;\n\n\t}\n\n\tFBXLoader.prototype = {\n\n\t\tconstructor: FBXLoader,\n\n\t\tcrossOrigin: 'anonymous',\n\n\t\tload: function ( url, onLoad, onProgress, onError ) {\n\t\t\tvar self = this;\n\n\t\t\tvar resourceDirectory = THREE.LoaderUtils.extractUrlBase( url );\n\n\t\t\tvar loader = new THREE.FileLoader( this.manager );\n\t\t\tloader.setResponseType( 'arraybuffer' );\n\t\t\tloader.load( url, function ( buffer ) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tvar scene = self.parse( buffer, resourceDirectory );\n\t\t\t\t\tonLoad( scene );\n\n\t\t\t\t} catch ( error ) {\n\n\t\t\t\t\tsetTimeout( function () {\n\n\t\t\t\t\t\tif ( onError ) onError( error );\n\n\t\t\t\t\t\tself.manager.itemError( url );\n\n\t\t\t\t\t}, 0 );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, onError );\n\t\t},\n\n\t\tsetCrossOrigin: function ( value ) {\n\n\t\t\tthis.crossOrigin = value;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tparse: function ( FBXBuffer, resourceDirectory ) {\n\n\t\t\tif ( isFbxFormatBinary( FBXBuffer ) ) {\n\n\t\t\t\tfbxTree = new BinaryParser().parse( FBXBuffer );\n\n\t\t\t} else {\n\n\t\t\t\tvar FBXText = convertArrayBufferToString( FBXBuffer );\n\n\t\t\t\tif ( ! isFbxFormatASCII( FBXText ) ) {\n\n\t\t\t\t\tthrow new Error( 'THREE.FBXLoader: Unknown format.' );\n\n\t\t\t\t}\n\n\t\t\t\tif ( getFbxVersion( FBXText ) < 7000 ) {\n\n\t\t\t\t\tthrow new Error( 'THREE.FBXLoader: FBX version not supported, FileVersion: ' + getFbxVersion( FBXText ) );\n\n\t\t\t\t}\n\n\t\t\t\tfbxTree = new TextParser().parse( FBXText );\n\n\t\t\t}\n\n\t\t\t//console.log( FBXTree );\n\n\t\t\tvar textureLoader = new THREE.TextureLoader( this.manager ).setPath( resourceDirectory ).setCrossOrigin( this.crossOrigin );\n\n\t\t\treturn new FBXTreeParser( textureLoader ).parse( fbxTree );\n\n\t\t}\n\n\t};\n\n\t// Parse the FBXTree object returned by the BinaryParser or TextParser and return a THREE.Group\n\tfunction FBXTreeParser( textureLoader ) {\n\n\t\tthis.textureLoader = textureLoader;\n\n\t}\n\n\tFBXTreeParser.prototype = {\n\n\t\tconstructor: FBXTreeParser,\n\n\t\tparse: function () {\n\n\t\t\tconnections = this.parseConnections();\n\n\t\t\tvar images = this.parseImages();\n\t\t\tvar textures = this.parseTextures( images );\n\t\t\tvar materials = this.parseMaterials( textures );\n\t\t\tvar deformers = this.parseDeformers();\n\t\t\tvar geometryMap = new GeometryParser().parse( deformers );\n\n\t\t\tthis.parseScene( deformers, geometryMap, materials );\n\n\t\t\treturn sceneGraph;\n\n\t\t},\n\n\t\t// Parses FBXTree.Connections which holds parent-child connections between objects (e.g. material -> texture, model->geometry )\n\t\t// and details the connection type\n\t\tparseConnections: function () {\n\n\t\t\tvar connectionMap = new Map();\n\n\t\t\tif ( 'Connections' in fbxTree ) {\n\n\t\t\t\tvar rawConnections = fbxTree.Connections.connections;\n\n\t\t\t\trawConnections.forEach( function ( rawConnection ) {\n\n\t\t\t\t\tvar fromID = rawConnection[ 0 ];\n\t\t\t\t\tvar toID = rawConnection[ 1 ];\n\t\t\t\t\tvar relationship = rawConnection[ 2 ];\n\n\t\t\t\t\tif ( ! connectionMap.has( fromID ) ) {\n\n\t\t\t\t\t\tconnectionMap.set( fromID, {\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tchildren: []\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar parentRelationship = { ID: toID, relationship: relationship };\n\t\t\t\t\tconnectionMap.get( fromID ).parents.push( parentRelationship );\n\n\t\t\t\t\tif ( ! connectionMap.has( toID ) ) {\n\n\t\t\t\t\t\tconnectionMap.set( toID, {\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tchildren: []\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar childRelationship = { ID: fromID, relationship: relationship };\n\t\t\t\t\tconnectionMap.get( toID ).children.push( childRelationship );\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\treturn connectionMap;\n\n\t\t},\n\n\t\t// Parse FBXTree.Objects.Video for embedded image data\n\t\t// These images are connected to textures in FBXTree.Objects.Textures\n\t\t// via FBXTree.Connections.\n\t\tparseImages: function () {\n\n\t\t\tvar images = {};\n\t\t\tvar blobs = {};\n\n\t\t\tif ( 'Video' in fbxTree.Objects ) {\n\n\t\t\t\tvar videoNodes = fbxTree.Objects.Video;\n\n\t\t\t\tfor ( var nodeID in videoNodes ) {\n\n\t\t\t\t\tvar videoNode = videoNodes[ nodeID ];\n\n\t\t\t\t\tvar id = parseInt( nodeID );\n\n\t\t\t\t\timages[ id ] = videoNode.RelativeFilename || videoNode.Filename;\n\n\t\t\t\t\t// raw image data is in videoNode.Content\n\t\t\t\t\tif ( 'Content' in videoNode ) {\n\n\t\t\t\t\t\tvar arrayBufferContent = ( videoNode.Content instanceof ArrayBuffer ) && ( videoNode.Content.byteLength > 0 );\n\t\t\t\t\t\tvar base64Content = ( typeof videoNode.Content === 'string' ) && ( videoNode.Content !== '' );\n\n\t\t\t\t\t\tif ( arrayBufferContent || base64Content ) {\n\n\t\t\t\t\t\t\tvar image = this.parseImage( videoNodes[ nodeID ] );\n\n\t\t\t\t\t\t\tblobs[ videoNode.RelativeFilename || videoNode.Filename ] = image;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( var id in images ) {\n\n\t\t\t\tvar filename = images[ id ];\n\n\t\t\t\tif ( blobs[ filename ] !== undefined ) images[ id ] = blobs[ filename ];\n\t\t\t\telse images[ id ] = images[ id ].split( '\\\\' ).pop();\n\n\t\t\t}\n\n\t\t\treturn images;\n\n\t\t},\n\n\t\t// Parse embedded image data in FBXTree.Video.Content\n\t\tparseImage: function ( videoNode ) {\n\n\t\t\tvar content = videoNode.Content;\n\t\t\tvar fileName = videoNode.RelativeFilename || videoNode.Filename;\n\t\t\tvar extension = fileName.slice( fileName.lastIndexOf( '.' ) + 1 ).toLowerCase();\n\n\t\t\tvar type;\n\n\t\t\tswitch ( extension ) {\n\n\t\t\t\tcase 'bmp':\n\n\t\t\t\t\ttype = 'image/bmp';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'jpg':\n\t\t\t\tcase 'jpeg':\n\n\t\t\t\t\ttype = 'image/jpeg';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'png':\n\n\t\t\t\t\ttype = 'image/png';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tif':\n\n\t\t\t\t\ttype = 'image/tiff';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tga':\n\n\t\t\t\t\tif ( typeof THREE.TGALoader !== 'function' ) {\n\n\t\t\t\t\t\tconsole.warn( 'FBXLoader: THREE.TGALoader is required to load TGA textures' );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( THREE.Loader.Handlers.get( '.tga' ) === null ) {\n\n\t\t\t\t\t\t\tTHREE.Loader.Handlers.add( /\\.tga$/i, new THREE.TGALoader() );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttype = 'image/tga';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tconsole.warn( 'FBXLoader: Image type \"' + extension + '\" is not supported.' );\n\t\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif ( typeof content === 'string' ) { // ASCII format\n\n\t\t\t\treturn 'data:' + type + ';base64,' + content;\n\n\t\t\t} else { // Binary Format\n\n\t\t\t\tvar array = new Uint8Array( content );\n\t\t\t\treturn window.URL.createObjectURL( new Blob( [ array ], { type: type } ) );\n\n\t\t\t}\n\n\t\t},\n\n\t\t// Parse nodes in FBXTree.Objects.Texture\n\t\t// These contain details such as UV scaling, cropping, rotation etc and are connected\n\t\t// to images in FBXTree.Objects.Video\n\t\tparseTextures: function ( images ) {\n\n\t\t\tvar textureMap = new Map();\n\n\t\t\tif ( 'Texture' in fbxTree.Objects ) {\n\n\t\t\t\tvar textureNodes = fbxTree.Objects.Texture;\n\t\t\t\tfor ( var nodeID in textureNodes ) {\n\n\t\t\t\t\tvar texture = this.parseTexture( textureNodes[ nodeID ], images );\n\t\t\t\t\ttextureMap.set( parseInt( nodeID ), texture );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn textureMap;\n\n\t\t},\n\n\t\t// Parse individual node in FBXTree.Objects.Texture\n\t\tparseTexture: function ( textureNode, images ) {\n\n\t\t\tvar texture = this.loadTexture( textureNode, images );\n\n\t\t\ttexture.ID = textureNode.id;\n\n\t\t\ttexture.name = textureNode.attrName;\n\n\t\t\tvar wrapModeU = textureNode.WrapModeU;\n\t\t\tvar wrapModeV = textureNode.WrapModeV;\n\n\t\t\tvar valueU = wrapModeU !== undefined ? wrapModeU.value : 0;\n\t\t\tvar valueV = wrapModeV !== undefined ? wrapModeV.value : 0;\n\n\t\t\t// http://download.autodesk.com/us/fbx/SDKdocs/FBX_SDK_Help/files/fbxsdkref/class_k_fbx_texture.html#889640e63e2e681259ea81061b85143a\n\t\t\t// 0: repeat(default), 1: clamp\n\n\t\t\ttexture.wrapS = valueU === 0 ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;\n\t\t\ttexture.wrapT = valueV === 0 ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;\n\n\t\t\tif ( 'Scaling' in textureNode ) {\n\n\t\t\t\tvar values = textureNode.Scaling.value;\n\n\t\t\t\ttexture.repeat.x = values[ 0 ];\n\t\t\t\ttexture.repeat.y = values[ 1 ];\n\n\t\t\t}\n\n\t\t\treturn texture;\n\n\t\t},\n\n\t\t// load a texture specified as a blob or data URI, or via an external URL using THREE.TextureLoader\n\t\tloadTexture: function ( textureNode, images ) {\n\n\t\t\tvar fileName;\n\n\t\t\tvar currentPath = this.textureLoader.path;\n\n\t\t\tvar children = connections.get( textureNode.id ).children;\n\n\t\t\tif ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) {\n\n\t\t\t\tfileName = images[ children[ 0 ].ID ];\n\n\t\t\t\tif ( fileName.indexOf( 'blob:' ) === 0 || fileName.indexOf( 'data:' ) === 0 ) {\n\n\t\t\t\t\tthis.textureLoader.setPath( undefined );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar texture;\n\n\t\t\tvar extension = textureNode.FileName.slice( - 3 ).toLowerCase();\n\n\t\t\tif ( extension === 'tga' ) {\n\n\t\t\t\tvar loader = THREE.Loader.Handlers.get( '.tga' );\n\n\t\t\t\tif ( loader === null ) {\n\n\t\t\t\t\tconsole.warn( 'FBXLoader: TGALoader not found, creating empty placeholder texture for', fileName );\n\t\t\t\t\ttexture = new THREE.Texture();\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttexture = loader.load( fileName );\n\n\t\t\t\t}\n\n\t\t\t} else if ( extension === 'psd' ) {\n\n\t\t\t\tconsole.warn( 'FBXLoader: PSD textures are not supported, creating empty placeholder texture for', fileName );\n\t\t\t\ttexture = new THREE.Texture();\n\n\t\t\t} else {\n\n\t\t\t\ttexture = this.textureLoader.load( fileName );\n\n\t\t\t}\n\n\t\t\tthis.textureLoader.setPath( currentPath );\n\n\t\t\treturn texture;\n\n\t\t},\n\n\t\t// Parse nodes in FBXTree.Objects.Material\n\t\tparseMaterials: function ( textureMap ) {\n\n\t\t\tvar materialMap = new Map();\n\n\t\t\tif ( 'Material' in fbxTree.Objects ) {\n\n\t\t\t\tvar materialNodes = fbxTree.Objects.Material;\n\n\t\t\t\tfor ( var nodeID in materialNodes ) {\n\n\t\t\t\t\tvar material = this.parseMaterial( materialNodes[ nodeID ], textureMap );\n\n\t\t\t\t\tif ( material !== null ) materialMap.set( parseInt( nodeID ), material );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn materialMap;\n\n\t\t},\n\n\t\t// Parse single node in FBXTree.Objects.Material\n\t\t// Materials are connected to texture maps in FBXTree.Objects.Textures\n\t\t// FBX format currently only supports Lambert and Phong shading models\n\t\tparseMaterial: function ( materialNode, textureMap ) {\n\n\t\t\tvar ID = materialNode.id;\n\t\t\tvar name = materialNode.attrName;\n\t\t\tvar type = materialNode.ShadingModel;\n\n\t\t\t// Case where FBX wraps shading model in property object.\n\t\t\tif ( typeof type === 'object' ) {\n\n\t\t\t\ttype = type.value;\n\n\t\t\t}\n\n\t\t\t// Ignore unused materials which don't have any connections.\n\t\t\tif ( ! connections.has( ID ) ) return null;\n\n\t\t\tvar parameters = this.parseParameters( materialNode, textureMap, ID );\n\n\t\t\tvar material;\n\n\t\t\tswitch ( type.toLowerCase() ) {\n\n\t\t\t\tcase 'phong':\n\t\t\t\t\tmaterial = new THREE.MeshPhongMaterial();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'lambert':\n\t\t\t\t\tmaterial = new THREE.MeshLambertMaterial();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: unknown material type \"%s\". Defaulting to MeshPhongMaterial.', type );\n\t\t\t\t\tmaterial = new THREE.MeshPhongMaterial( { color: 0x3300ff } );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tmaterial.setValues( parameters );\n\t\t\tmaterial.name = name;\n\n\t\t\treturn material;\n\n\t\t},\n\n\t\t// Parse FBX material and return parameters suitable for a three.js material\n\t\t// Also parse the texture map and return any textures associated with the material\n\t\tparseParameters: function ( materialNode, textureMap, ID ) {\n\n\t\t\tvar parameters = {};\n\n\t\t\tif ( materialNode.BumpFactor ) {\n\n\t\t\t\tparameters.bumpScale = materialNode.BumpFactor.value;\n\n\t\t\t}\n\t\t\tif ( materialNode.Diffuse ) {\n\n\t\t\t\tparameters.color = new THREE.Color().fromArray( materialNode.Diffuse.value );\n\n\t\t\t} else if ( materialNode.DiffuseColor && materialNode.DiffuseColor.type === 'Color' ) {\n\n\t\t\t\t// The blender exporter exports diffuse here instead of in materialNode.Diffuse\n\t\t\t\tparameters.color = new THREE.Color().fromArray( materialNode.DiffuseColor.value );\n\n\t\t\t}\n\t\t\tif ( materialNode.DisplacementFactor ) {\n\n\t\t\t\tparameters.displacementScale = materialNode.DisplacementFactor.value;\n\n\t\t\t}\n\t\t\tif ( materialNode.Emissive ) {\n\n\t\t\t\tparameters.emissive = new THREE.Color().fromArray( materialNode.Emissive.value );\n\n\t\t\t} else if ( materialNode.EmissiveColor && materialNode.EmissiveColor.type === 'Color' ) {\n\n\t\t\t\t// The blender exporter exports emissive color here instead of in materialNode.Emissive\n\t\t\t\tparameters.emissive = new THREE.Color().fromArray( materialNode.EmissiveColor.value );\n\n\t\t\t}\n\t\t\tif ( materialNode.EmissiveFactor ) {\n\n\t\t\t\tparameters.emissiveIntensity = parseFloat( materialNode.EmissiveFactor.value );\n\n\t\t\t}\n\t\t\tif ( materialNode.Opacity ) {\n\n\t\t\t\tparameters.opacity = parseFloat( materialNode.Opacity.value );\n\n\t\t\t}\n\t\t\tif ( parameters.opacity < 1.0 ) {\n\n\t\t\t\tparameters.transparent = true;\n\n\t\t\t}\n\t\t\tif ( materialNode.ReflectionFactor ) {\n\n\t\t\t\tparameters.reflectivity = materialNode.ReflectionFactor.value;\n\n\t\t\t}\n\t\t\tif ( materialNode.Shininess ) {\n\n\t\t\t\tparameters.shininess = materialNode.Shininess.value;\n\n\t\t\t}\n\t\t\tif ( materialNode.Specular ) {\n\n\t\t\t\tparameters.specular = new THREE.Color().fromArray( materialNode.Specular.value );\n\n\t\t\t} else if ( materialNode.SpecularColor && materialNode.SpecularColor.type === 'Color' ) {\n\n\t\t\t\t// The blender exporter exports specular color here instead of in materialNode.Specular\n\t\t\t\tparameters.specular = new THREE.Color().fromArray( materialNode.SpecularColor.value );\n\n\t\t\t}\n\n\t\t\tvar self = this;\n\t\t\tconnections.get( ID ).children.forEach( function ( child ) {\n\n\t\t\t\tvar type = child.relationship;\n\n\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\tcase 'Bump':\n\t\t\t\t\t\tparameters.bumpMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'DiffuseColor':\n\t\t\t\t\t\tparameters.map = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'DisplacementColor':\n\t\t\t\t\t\tparameters.displacementMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\tcase 'EmissiveColor':\n\t\t\t\t\t\tparameters.emissiveMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'NormalMap':\n\t\t\t\t\t\tparameters.normalMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'ReflectionColor':\n\t\t\t\t\t\tparameters.envMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tparameters.envMap.mapping = THREE.EquirectangularReflectionMapping;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'SpecularColor':\n\t\t\t\t\t\tparameters.specularMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TransparentColor':\n\t\t\t\t\t\tparameters.alphaMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tparameters.transparent = true;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'AmbientColor':\n\t\t\t\t\tcase 'ShininessExponent': // AKA glossiness map\n\t\t\t\t\tcase 'SpecularFactor': // AKA specularLevel\n\t\t\t\t\tcase 'VectorDisplacementColor': // NOTE: Seems to be a copy of DisplacementColor\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: %s map is not supported in three.js, skipping texture.', type );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn parameters;\n\n\t\t},\n\n\t\t// get a texture from the textureMap for use by a material.\n\t\tgetTexture: function ( textureMap, id ) {\n\n\t\t\t// if the texture is a layered texture, just use the first layer and issue a warning\n\t\t\tif ( 'LayeredTexture' in fbxTree.Objects && id in fbxTree.Objects.LayeredTexture ) {\n\n\t\t\t\tconsole.warn( 'THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer.' );\n\t\t\t\tid = connections.get( id ).children[ 0 ].ID;\n\n\t\t\t}\n\n\t\t\treturn textureMap.get( id );\n\n\t\t},\n\n\t\t// Parse nodes in FBXTree.Objects.Deformer\n\t\t// Deformer node can contain skinning or Vertex Cache animation data, however only skinning is supported here\n\t\t// Generates map of Skeleton-like objects for use later when generating and binding skeletons.\n\t\tparseDeformers: function () {\n\n\t\t\tvar skeletons = {};\n\t\t\tvar morphTargets = {};\n\n\t\t\tif ( 'Deformer' in fbxTree.Objects ) {\n\n\t\t\t\tvar DeformerNodes = fbxTree.Objects.Deformer;\n\n\t\t\t\tfor ( var nodeID in DeformerNodes ) {\n\n\t\t\t\t\tvar deformerNode = DeformerNodes[ nodeID ];\n\n\t\t\t\t\tvar relationships = connections.get( parseInt( nodeID ) );\n\n\t\t\t\t\tif ( deformerNode.attrType === 'Skin' ) {\n\n\t\t\t\t\t\tvar skeleton = this.parseSkeleton( relationships, DeformerNodes );\n\t\t\t\t\t\tskeleton.ID = nodeID;\n\n\t\t\t\t\t\tif ( relationships.parents.length > 1 ) console.warn( 'THREE.FBXLoader: skeleton attached to more than one geometry is not supported.' );\n\t\t\t\t\t\tskeleton.geometryID = relationships.parents[ 0 ].ID;\n\n\t\t\t\t\t\tskeletons[ nodeID ] = skeleton;\n\n\t\t\t\t\t} else if ( deformerNode.attrType === 'BlendShape' ) {\n\n\t\t\t\t\t\tvar morphTarget = {\n\t\t\t\t\t\t\tid: nodeID,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tmorphTarget.rawTargets = this.parseMorphTargets( relationships, DeformerNodes );\n\t\t\t\t\t\tmorphTarget.id = nodeID;\n\n\t\t\t\t\t\tif ( relationships.parents.length > 1 ) console.warn( 'THREE.FBXLoader: morph target attached to more than one geometry is not supported.' );\n\n\t\t\t\t\t\tmorphTargets[ nodeID ] = morphTarget;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn {\n\n\t\t\t\tskeletons: skeletons,\n\t\t\t\tmorphTargets: morphTargets,\n\n\t\t\t};\n\n\t\t},\n\n\t\t// Parse single nodes in FBXTree.Objects.Deformer\n\t\t// The top level skeleton node has type 'Skin' and sub nodes have type 'Cluster'\n\t\t// Each skin node represents a skeleton and each cluster node represents a bone\n\t\tparseSkeleton: function ( relationships, deformerNodes ) {\n\n\t\t\tvar rawBones = [];\n\n\t\t\trelationships.children.forEach( function ( child ) {\n\n\t\t\t\tvar boneNode = deformerNodes[ child.ID ];\n\n\t\t\t\tif ( boneNode.attrType !== 'Cluster' ) return;\n\n\t\t\t\tvar rawBone = {\n\n\t\t\t\t\tID: child.ID,\n\t\t\t\t\tindices: [],\n\t\t\t\t\tweights: [],\n\t\t\t\t\ttransform: new THREE.Matrix4().fromArray( boneNode.Transform.a ),\n\t\t\t\t\ttransformLink: new THREE.Matrix4().fromArray( boneNode.TransformLink.a ),\n\t\t\t\t\tlinkMode: boneNode.Mode,\n\n\t\t\t\t};\n\n\t\t\t\tif ( 'Indexes' in boneNode ) {\n\n\t\t\t\t\trawBone.indices = boneNode.Indexes.a;\n\t\t\t\t\trawBone.weights = boneNode.Weights.a;\n\n\t\t\t\t}\n\n\t\t\t\trawBones.push( rawBone );\n\n\t\t\t} );\n\n\t\t\treturn {\n\n\t\t\t\trawBones: rawBones,\n\t\t\t\tbones: []\n\n\t\t\t};\n\n\t\t},\n\n\t\t// The top level morph deformer node has type \"BlendShape\" and sub nodes have type \"BlendShapeChannel\"\n\t\tparseMorphTargets: function ( relationships, deformerNodes ) {\n\n\t\t\tvar rawMorphTargets = [];\n\n\t\t\tfor ( var i = 0; i < relationships.children.length; i ++ ) {\n\n\t\t\t\tif ( i === 8 ) {\n\n\t\t\t\t\tconsole.warn( 'FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.' );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tvar child = relationships.children[ i ];\n\n\t\t\t\tvar morphTargetNode = deformerNodes[ child.ID ];\n\n\t\t\t\tvar rawMorphTarget = {\n\n\t\t\t\t\tname: morphTargetNode.attrName,\n\t\t\t\t\tinitialWeight: morphTargetNode.DeformPercent,\n\t\t\t\t\tid: morphTargetNode.id,\n\t\t\t\t\tfullWeights: morphTargetNode.FullWeights.a\n\n\t\t\t\t};\n\n\t\t\t\tif ( morphTargetNode.attrType !== 'BlendShapeChannel' ) return;\n\n\t\t\t\tvar targetRelationships = connections.get( parseInt( child.ID ) );\n\n\t\t\t\ttargetRelationships.children.forEach( function ( child ) {\n\n\t\t\t\t\tif ( child.relationship === undefined ) rawMorphTarget.geoID = child.ID;\n\n\t\t\t\t} );\n\n\t\t\t\trawMorphTargets.push( rawMorphTarget );\n\n\t\t\t}\n\n\t\t\treturn rawMorphTargets;\n\n\t\t},\n\n\t\t// create the main THREE.Group() to be returned by the loader\n\t\tparseScene: function ( deformers, geometryMap, materialMap ) {\n\n\t\t\tsceneGraph = new THREE.Group();\n\n\t\t\tvar modelMap = this.parseModels( deformers.skeletons, geometryMap, materialMap );\n\n\t\t\tvar modelNodes = fbxTree.Objects.Model;\n\n\t\t\tvar self = this;\n\t\t\tmodelMap.forEach( function ( model ) {\n\n\t\t\t\tvar modelNode = modelNodes[ model.ID ];\n\t\t\t\tself.setLookAtProperties( model, modelNode );\n\n\t\t\t\tvar parentConnections = connections.get( model.ID ).parents;\n\n\t\t\t\tparentConnections.forEach( function ( connection ) {\n\n\t\t\t\t\tvar parent = modelMap.get( connection.ID );\n\t\t\t\t\tif ( parent !== undefined ) parent.add( model );\n\n\t\t\t\t} );\n\n\t\t\t\tif ( model.parent === null ) {\n\n\t\t\t\t\tsceneGraph.add( model );\n\n\t\t\t\t}\n\n\n\t\t\t} );\n\n\t\t\tthis.bindSkeleton( deformers.skeletons, geometryMap, modelMap );\n\n\t\t\tthis.createAmbientLight();\n\n\t\t\tthis.setupMorphMaterials();\n\n\t\t\tvar animations = new AnimationParser().parse();\n\n\t\t\t// if all the models where already combined in a single group, just return that\n\t\t\tif ( sceneGraph.children.length === 1 && sceneGraph.children[ 0 ].isGroup ) {\n\n\t\t\t\tsceneGraph.children[ 0 ].animations = animations;\n\t\t\t\tsceneGraph = sceneGraph.children[ 0 ];\n\n\t\t\t}\n\n\t\t\tsceneGraph.animations = animations;\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.Model\n\t\tparseModels: function ( skeletons, geometryMap, materialMap ) {\n\n\t\t\tvar modelMap = new Map();\n\t\t\tvar modelNodes = fbxTree.Objects.Model;\n\n\t\t\tfor ( var nodeID in modelNodes ) {\n\n\t\t\t\tvar id = parseInt( nodeID );\n\t\t\t\tvar node = modelNodes[ nodeID ];\n\t\t\t\tvar relationships = connections.get( id );\n\n\t\t\t\tvar model = this.buildSkeleton( relationships, skeletons, id, node.attrName );\n\n\t\t\t\tif ( ! model ) {\n\n\t\t\t\t\tswitch ( node.attrType ) {\n\n\t\t\t\t\t\tcase 'Camera':\n\t\t\t\t\t\t\tmodel = this.createCamera( relationships );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'Light':\n\t\t\t\t\t\t\tmodel = this.createLight( relationships );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'Mesh':\n\t\t\t\t\t\t\tmodel = this.createMesh( relationships, geometryMap, materialMap );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'NurbsCurve':\n\t\t\t\t\t\t\tmodel = this.createCurve( relationships, geometryMap );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'LimbNode': // usually associated with a Bone, however if a Bone was not created we'll make a Group instead\n\t\t\t\t\t\tcase 'Null':\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tmodel = new THREE.Group();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.name = THREE.PropertyBinding.sanitizeNodeName( node.attrName );\n\t\t\t\t\tmodel.ID = id;\n\n\t\t\t\t}\n\n\t\t\t\tthis.setModelTransforms( model, node );\n\t\t\t\tmodelMap.set( id, model );\n\n\t\t\t}\n\n\t\t\treturn modelMap;\n\n\t\t},\n\n\t\tbuildSkeleton: function ( relationships, skeletons, id, name ) {\n\n\t\t\tvar bone = null;\n\n\t\t\trelationships.parents.forEach( function ( parent ) {\n\n\t\t\t\tfor ( var ID in skeletons ) {\n\n\t\t\t\t\tvar skeleton = skeletons[ ID ];\n\n\t\t\t\t\tskeleton.rawBones.forEach( function ( rawBone, i ) {\n\n\t\t\t\t\t\tif ( rawBone.ID === parent.ID ) {\n\n\t\t\t\t\t\t\tvar subBone = bone;\n\t\t\t\t\t\t\tbone = new THREE.Bone();\n\t\t\t\t\t\t\tbone.matrixWorld.copy( rawBone.transformLink );\n\n\t\t\t\t\t\t\t// set name and id here - otherwise in cases where \"subBone\" is created it will not have a name / id\n\t\t\t\t\t\t\tbone.name = THREE.PropertyBinding.sanitizeNodeName( name );\n\t\t\t\t\t\t\tbone.ID = id;\n\n\t\t\t\t\t\t\tskeleton.bones[ i ] = bone;\n\n\t\t\t\t\t\t\t// In cases where a bone is shared between multiple meshes\n\t\t\t\t\t\t\t// duplicate the bone here and and it as a child of the first bone\n\t\t\t\t\t\t\tif ( subBone !== null ) {\n\n\t\t\t\t\t\t\t\tbone.add( subBone );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn bone;\n\n\t\t},\n\n\t\t// create a THREE.PerspectiveCamera or THREE.OrthographicCamera\n\t\tcreateCamera: function ( relationships ) {\n\n\t\t\tvar model;\n\t\t\tvar cameraAttribute;\n\n\t\t\trelationships.children.forEach( function ( child ) {\n\n\t\t\t\tvar attr = fbxTree.Objects.NodeAttribute[ child.ID ];\n\n\t\t\t\tif ( attr !== undefined ) {\n\n\t\t\t\t\tcameraAttribute = attr;\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\tif ( cameraAttribute === undefined ) {\n\n\t\t\t\tmodel = new THREE.Object3D();\n\n\t\t\t} else {\n\n\t\t\t\tvar type = 0;\n\t\t\t\tif ( cameraAttribute.CameraProjectionType !== undefined && cameraAttribute.CameraProjectionType.value === 1 ) {\n\n\t\t\t\t\ttype = 1;\n\n\t\t\t\t}\n\n\t\t\t\tvar nearClippingPlane = 1;\n\t\t\t\tif ( cameraAttribute.NearPlane !== undefined ) {\n\n\t\t\t\t\tnearClippingPlane = cameraAttribute.NearPlane.value / 1000;\n\n\t\t\t\t}\n\n\t\t\t\tvar farClippingPlane = 1000;\n\t\t\t\tif ( cameraAttribute.FarPlane !== undefined ) {\n\n\t\t\t\t\tfarClippingPlane = cameraAttribute.FarPlane.value / 1000;\n\n\t\t\t\t}\n\n\n\t\t\t\tvar width = window.innerWidth;\n\t\t\t\tvar height = window.innerHeight;\n\n\t\t\t\tif ( cameraAttribute.AspectWidth !== undefined && cameraAttribute.AspectHeight !== undefined ) {\n\n\t\t\t\t\twidth = cameraAttribute.AspectWidth.value;\n\t\t\t\t\theight = cameraAttribute.AspectHeight.value;\n\n\t\t\t\t}\n\n\t\t\t\tvar aspect = width / height;\n\n\t\t\t\tvar fov = 45;\n\t\t\t\tif ( cameraAttribute.FieldOfView !== undefined ) {\n\n\t\t\t\t\tfov = cameraAttribute.FieldOfView.value;\n\n\t\t\t\t}\n\n\t\t\t\tvar focalLength = cameraAttribute.FocalLength ? cameraAttribute.FocalLength.value : null;\n\n\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\tcase 0: // Perspective\n\t\t\t\t\t\tmodel = new THREE.PerspectiveCamera( fov, aspect, nearClippingPlane, farClippingPlane );\n\t\t\t\t\t\tif ( focalLength !== null ) model.setFocalLength( focalLength );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 1: // Orthographic\n\t\t\t\t\t\tmodel = new THREE.OrthographicCamera( - width / 2, width / 2, height / 2, - height / 2, nearClippingPlane, farClippingPlane );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: Unknown camera type ' + type + '.' );\n\t\t\t\t\t\tmodel = new THREE.Object3D();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn model;\n\n\t\t},\n\n\t\t// Create a THREE.DirectionalLight, THREE.PointLight or THREE.SpotLight\n\t\tcreateLight: function ( relationships ) {\n\n\t\t\tvar model;\n\t\t\tvar lightAttribute;\n\n\t\t\trelationships.children.forEach( function ( child ) {\n\n\t\t\t\tvar attr = fbxTree.Objects.NodeAttribute[ child.ID ];\n\n\t\t\t\tif ( attr !== undefined ) {\n\n\t\t\t\t\tlightAttribute = attr;\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\tif ( lightAttribute === undefined ) {\n\n\t\t\t\tmodel = new THREE.Object3D();\n\n\t\t\t} else {\n\n\t\t\t\tvar type;\n\n\t\t\t\t// LightType can be undefined for Point lights\n\t\t\t\tif ( lightAttribute.LightType === undefined ) {\n\n\t\t\t\t\ttype = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttype = lightAttribute.LightType.value;\n\n\t\t\t\t}\n\n\t\t\t\tvar color = 0xffffff;\n\n\t\t\t\tif ( lightAttribute.Color !== undefined ) {\n\n\t\t\t\t\tcolor = new THREE.Color().fromArray( lightAttribute.Color.value );\n\n\t\t\t\t}\n\n\t\t\t\tvar intensity = ( lightAttribute.Intensity === undefined ) ? 1 : lightAttribute.Intensity.value / 100;\n\n\t\t\t\t// light disabled\n\t\t\t\tif ( lightAttribute.CastLightOnObject !== undefined && lightAttribute.CastLightOnObject.value === 0 ) {\n\n\t\t\t\t\tintensity = 0;\n\n\t\t\t\t}\n\n\t\t\t\tvar distance = 0;\n\t\t\t\tif ( lightAttribute.FarAttenuationEnd !== undefined ) {\n\n\t\t\t\t\tif ( lightAttribute.EnableFarAttenuation !== undefined && lightAttribute.EnableFarAttenuation.value === 0 ) {\n\n\t\t\t\t\t\tdistance = 0;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdistance = lightAttribute.FarAttenuationEnd.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// TODO: could this be calculated linearly from FarAttenuationStart to FarAttenuationEnd?\n\t\t\t\tvar decay = 1;\n\n\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\tcase 0: // Point\n\t\t\t\t\t\tmodel = new THREE.PointLight( color, intensity, distance, decay );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 1: // Directional\n\t\t\t\t\t\tmodel = new THREE.DirectionalLight( color, intensity );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 2: // Spot\n\t\t\t\t\t\tvar angle = Math.PI / 3;\n\n\t\t\t\t\t\tif ( lightAttribute.InnerAngle !== undefined ) {\n\n\t\t\t\t\t\t\tangle = THREE.Math.degToRad( lightAttribute.InnerAngle.value );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar penumbra = 0;\n\t\t\t\t\t\tif ( lightAttribute.OuterAngle !== undefined ) {\n\n\t\t\t\t\t\t// TODO: this is not correct - FBX calculates outer and inner angle in degrees\n\t\t\t\t\t\t// with OuterAngle > InnerAngle && OuterAngle <= Math.PI\n\t\t\t\t\t\t// while three.js uses a penumbra between (0, 1) to attenuate the inner angle\n\t\t\t\t\t\t\tpenumbra = THREE.Math.degToRad( lightAttribute.OuterAngle.value );\n\t\t\t\t\t\t\tpenumbra = Math.max( penumbra, 1 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmodel = new THREE.SpotLight( color, intensity, distance, angle, penumbra, decay );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: Unknown light type ' + lightAttribute.LightType.value + ', defaulting to a THREE.PointLight.' );\n\t\t\t\t\t\tmodel = new THREE.PointLight( color, intensity );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tif ( lightAttribute.CastShadows !== undefined && lightAttribute.CastShadows.value === 1 ) {\n\n\t\t\t\t\tmodel.castShadow = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn model;\n\n\t\t},\n\n\t\tcreateMesh: function ( relationships, geometryMap, materialMap ) {\n\n\t\t\tvar model;\n\t\t\tvar geometry = null;\n\t\t\tvar material = null;\n\t\t\tvar materials = [];\n\n\t\t\t// get geometry and materials(s) from connections\n\t\t\trelationships.children.forEach( function ( child ) {\n\n\t\t\t\tif ( geometryMap.has( child.ID ) ) {\n\n\t\t\t\t\tgeometry = geometryMap.get( child.ID );\n\n\t\t\t\t}\n\n\t\t\t\tif ( materialMap.has( child.ID ) ) {\n\n\t\t\t\t\tmaterials.push( materialMap.get( child.ID ) );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\tif ( materials.length > 1 ) {\n\n\t\t\t\tmaterial = materials;\n\n\t\t\t} else if ( materials.length > 0 ) {\n\n\t\t\t\tmaterial = materials[ 0 ];\n\n\t\t\t} else {\n\n\t\t\t\tmaterial = new THREE.MeshPhongMaterial( { color: 0xcccccc } );\n\t\t\t\tmaterials.push( material );\n\n\t\t\t}\n\n\t\t\tif ( 'color' in geometry.attributes ) {\n\n\t\t\t\tmaterials.forEach( function ( material ) {\n\n\t\t\t\t\tmaterial.vertexColors = THREE.VertexColors;\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tif ( geometry.FBX_Deformer ) {\n\n\t\t\t\tmaterials.forEach( function ( material ) {\n\n\t\t\t\t\tmaterial.skinning = true;\n\n\t\t\t\t} );\n\n\t\t\t\tmodel = new THREE.SkinnedMesh( geometry, material );\n\n\t\t\t} else {\n\n\t\t\t\tmodel = new THREE.Mesh( geometry, material );\n\n\t\t\t}\n\n\t\t\treturn model;\n\n\t\t},\n\n\t\tcreateCurve: function ( relationships, geometryMap ) {\n\n\t\t\tvar geometry = relationships.children.reduce( function ( geo, child ) {\n\n\t\t\t\tif ( geometryMap.has( child.ID ) ) geo = geometryMap.get( child.ID );\n\n\t\t\t\treturn geo;\n\n\t\t\t}, null );\n\n\t\t\t// FBX does not list materials for Nurbs lines, so we'll just put our own in here.\n\t\t\tvar material = new THREE.LineBasicMaterial( { color: 0x3300ff, linewidth: 1 } );\n\t\t\treturn new THREE.Line( geometry, material );\n\n\t\t},\n\n\t\t// parse the model node for transform details and apply them to the model\n\t\tsetModelTransforms: function ( model, modelNode ) {\n\n\t\t\tvar transformData = {};\n\n\t\t\tif ( 'RotationOrder' in modelNode ) transformData.eulerOrder = parseInt( modelNode.RotationOrder.value );\n\t\t\tif ( 'Lcl_Translation' in modelNode ) transformData.translation = modelNode.Lcl_Translation.value;\n\t\t\tif ( 'RotationOffset' in modelNode ) transformData.rotationOffset = modelNode.RotationOffset.value;\n\t\t\tif ( 'Lcl_Rotation' in modelNode ) transformData.rotation = modelNode.Lcl_Rotation.value;\n\t\t\tif ( 'PreRotation' in modelNode ) transformData.preRotation = modelNode.PreRotation.value;\n\t\t\tif ( 'PostRotation' in modelNode ) transformData.postRotation = modelNode.PostRotation.value;\n\t\t\tif ( 'Lcl_Scaling' in modelNode ) transformData.scale = modelNode.Lcl_Scaling.value;\n\n\t\t\tvar transform = generateTransform( transformData );\n\n\t\t\tmodel.applyMatrix( transform );\n\n\t\t},\n\n\t\tsetLookAtProperties: function ( model, modelNode ) {\n\n\t\t\tif ( 'LookAtProperty' in modelNode ) {\n\n\t\t\t\tvar children = connections.get( model.ID ).children;\n\n\t\t\t\tchildren.forEach( function ( child ) {\n\n\t\t\t\t\tif ( child.relationship === 'LookAtProperty' ) {\n\n\t\t\t\t\t\tvar lookAtTarget = fbxTree.Objects.Model[ child.ID ];\n\n\t\t\t\t\t\tif ( 'Lcl_Translation' in lookAtTarget ) {\n\n\t\t\t\t\t\t\tvar pos = lookAtTarget.Lcl_Translation.value;\n\n\t\t\t\t\t\t\t// DirectionalLight, SpotLight\n\t\t\t\t\t\t\tif ( model.target !== undefined ) {\n\n\t\t\t\t\t\t\t\tmodel.target.position.fromArray( pos );\n\t\t\t\t\t\t\t\tsceneGraph.add( model.target );\n\n\t\t\t\t\t\t\t} else { // Cameras and other Object3Ds\n\n\t\t\t\t\t\t\t\tmodel.lookAt( new THREE.Vector3().fromArray( pos ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t},\n\n\t\tbindSkeleton: function ( skeletons, geometryMap, modelMap ) {\n\n\t\t\tvar bindMatrices = this.parsePoseNodes();\n\n\t\t\tfor ( var ID in skeletons ) {\n\n\t\t\t\tvar skeleton = skeletons[ ID ];\n\n\t\t\t\tvar parents = connections.get( parseInt( skeleton.ID ) ).parents;\n\n\t\t\t\tparents.forEach( function ( parent ) {\n\n\t\t\t\t\tif ( geometryMap.has( parent.ID ) ) {\n\n\t\t\t\t\t\tvar geoID = parent.ID;\n\t\t\t\t\t\tvar geoRelationships = connections.get( geoID );\n\n\t\t\t\t\t\tgeoRelationships.parents.forEach( function ( geoConnParent ) {\n\n\t\t\t\t\t\t\tif ( modelMap.has( geoConnParent.ID ) ) {\n\n\t\t\t\t\t\t\t\tvar model = modelMap.get( geoConnParent.ID );\n\n\t\t\t\t\t\t\t\tmodel.bind( new THREE.Skeleton( skeleton.bones ), bindMatrices[ geoConnParent.ID ] );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t},\n\n\t\tparsePoseNodes: function () {\n\n\t\t\tvar bindMatrices = {};\n\n\t\t\tif ( 'Pose' in fbxTree.Objects ) {\n\n\t\t\t\tvar BindPoseNode = fbxTree.Objects.Pose;\n\n\t\t\t\tfor ( var nodeID in BindPoseNode ) {\n\n\t\t\t\t\tif ( BindPoseNode[ nodeID ].attrType === 'BindPose' ) {\n\n\t\t\t\t\t\tvar poseNodes = BindPoseNode[ nodeID ].PoseNode;\n\n\t\t\t\t\t\tif ( Array.isArray( poseNodes ) ) {\n\n\t\t\t\t\t\t\tposeNodes.forEach( function ( poseNode ) {\n\n\t\t\t\t\t\t\t\tbindMatrices[ poseNode.Node ] = new THREE.Matrix4().fromArray( poseNode.Matrix.a );\n\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tbindMatrices[ poseNodes.Node ] = new THREE.Matrix4().fromArray( poseNodes.Matrix.a );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn bindMatrices;\n\n\t\t},\n\n\t\t// Parse ambient color in FBXTree.GlobalSettings - if it's not set to black (default), create an ambient light\n\t\tcreateAmbientLight: function () {\n\n\t\t\tif ( 'GlobalSettings' in fbxTree && 'AmbientColor' in fbxTree.GlobalSettings ) {\n\n\t\t\t\tvar ambientColor = fbxTree.GlobalSettings.AmbientColor.value;\n\t\t\t\tvar r = ambientColor[ 0 ];\n\t\t\t\tvar g = ambientColor[ 1 ];\n\t\t\t\tvar b = ambientColor[ 2 ];\n\n\t\t\t\tif ( r !== 0 || g !== 0 || b !== 0 ) {\n\n\t\t\t\t\tvar color = new THREE.Color( r, g, b );\n\t\t\t\t\tsceneGraph.add( new THREE.AmbientLight( color, 1 ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t\tsetupMorphMaterials: function () {\n\n\t\t\tsceneGraph.traverse( function ( child ) {\n\n\t\t\t\tif ( child.isMesh ) {\n\n\t\t\t\t\tif ( child.geometry.morphAttributes.position || child.geometry.morphAttributes.normal ) {\n\n\t\t\t\t\t\tvar uuid = child.uuid;\n\t\t\t\t\t\tvar matUuid = child.material.uuid;\n\n\t\t\t\t\t\t// if a geometry has morph targets, it cannot share the material with other geometries\n\t\t\t\t\t\tvar sharedMat = false;\n\n\t\t\t\t\t\tsceneGraph.traverse( function ( child ) {\n\n\t\t\t\t\t\t\tif ( child.isMesh ) {\n\n\t\t\t\t\t\t\t\tif ( child.material.uuid === matUuid && child.uuid !== uuid ) sharedMat = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\tif ( sharedMat === true ) child.material = child.material.clone();\n\n\t\t\t\t\t\tchild.material.morphTargets = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t},\n\n\t};\n\n\t// parse Geometry data from FBXTree and return map of BufferGeometries\n\tfunction GeometryParser() {}\n\n\tGeometryParser.prototype = {\n\n\t\tconstructor: GeometryParser,\n\n\t\t// Parse nodes in FBXTree.Objects.Geometry\n\t\tparse: function ( deformers ) {\n\n\t\t\tvar geometryMap = new Map();\n\n\t\t\tif ( 'Geometry' in fbxTree.Objects ) {\n\n\t\t\t\tvar geoNodes = fbxTree.Objects.Geometry;\n\n\t\t\t\tfor ( var nodeID in geoNodes ) {\n\n\t\t\t\t\tvar relationships = connections.get( parseInt( nodeID ) );\n\t\t\t\t\tvar geo = this.parseGeometry( relationships, geoNodes[ nodeID ], deformers );\n\n\t\t\t\t\tgeometryMap.set( parseInt( nodeID ), geo );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn geometryMap;\n\n\t\t},\n\n\t\t// Parse single node in FBXTree.Objects.Geometry\n\t\tparseGeometry: function ( relationships, geoNode, deformers ) {\n\n\t\t\tswitch ( geoNode.attrType ) {\n\n\t\t\t\tcase 'Mesh':\n\t\t\t\t\treturn this.parseMeshGeometry( relationships, geoNode, deformers );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'NurbsCurve':\n\t\t\t\t\treturn this.parseNurbsGeometry( geoNode );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t},\n\n\t\t// Parse single node mesh geometry in FBXTree.Objects.Geometry\n\t\tparseMeshGeometry: function ( relationships, geoNode, deformers ) {\n\n\t\t\tvar skeletons = deformers.skeletons;\n\t\t\tvar morphTargets = deformers.morphTargets;\n\n\t\t\tvar modelNodes = relationships.parents.map( function ( parent ) {\n\n\t\t\t\treturn fbxTree.Objects.Model[ parent.ID ];\n\n\t\t\t} );\n\n\t\t\t// don't create geometry if it is not associated with any models\n\t\t\tif ( modelNodes.length === 0 ) return;\n\n\t\t\tvar skeleton = relationships.children.reduce( function ( skeleton, child ) {\n\n\t\t\t\tif ( skeletons[ child.ID ] !== undefined ) skeleton = skeletons[ child.ID ];\n\n\t\t\t\treturn skeleton;\n\n\t\t\t}, null );\n\n\t\t\tvar morphTarget = relationships.children.reduce( function ( morphTarget, child ) {\n\n\t\t\t\tif ( morphTargets[ child.ID ] !== undefined ) morphTarget = morphTargets[ child.ID ];\n\n\t\t\t\treturn morphTarget;\n\n\t\t\t}, null );\n\n\t\t\t// TODO: if there is more than one model associated with the geometry, AND the models have\n\t\t\t// different geometric transforms, then this will cause problems\n\t\t\t// if ( modelNodes.length > 1 ) { }\n\n\t\t\t// For now just assume one model and get the preRotations from that\n\t\t\tvar modelNode = modelNodes[ 0 ];\n\n\t\t\tvar transformData = {};\n\n\t\t\tif ( 'RotationOrder' in modelNode ) transformData.eulerOrder = modelNode.RotationOrder.value;\n\t\t\tif ( 'GeometricTranslation' in modelNode ) transformData.translation = modelNode.GeometricTranslation.value;\n\t\t\tif ( 'GeometricRotation' in modelNode ) transformData.rotation = modelNode.GeometricRotation.value;\n\t\t\tif ( 'GeometricScaling' in modelNode ) transformData.scale = modelNode.GeometricScaling.value;\n\n\t\t\tvar transform = generateTransform( transformData );\n\n\t\t\treturn this.genGeometry( geoNode, skeleton, morphTarget, transform );\n\n\t\t},\n\n\t\t// Generate a THREE.BufferGeometry from a node in FBXTree.Objects.Geometry\n\t\tgenGeometry: function ( geoNode, skeleton, morphTarget, preTransform ) {\n\n\t\t\tvar geo = new THREE.BufferGeometry();\n\t\t\tif ( geoNode.attrName ) geo.name = geoNode.attrName;\n\n\t\t\tvar geoInfo = this.parseGeoNode( geoNode, skeleton );\n\t\t\tvar buffers = this.genBuffers( geoInfo );\n\n\t\t\tvar positionAttribute = new THREE.Float32BufferAttribute( buffers.vertex, 3 );\n\n\t\t\tpreTransform.applyToBufferAttribute( positionAttribute );\n\n\t\t\tgeo.addAttribute( 'position', positionAttribute );\n\n\t\t\tif ( buffers.colors.length > 0 ) {\n\n\t\t\t\tgeo.addAttribute( 'color', new THREE.Float32BufferAttribute( buffers.colors, 3 ) );\n\n\t\t\t}\n\n\t\t\tif ( skeleton ) {\n\n\t\t\t\tgeo.addAttribute( 'skinIndex', new THREE.Uint16BufferAttribute( buffers.weightsIndices, 4 ) );\n\n\t\t\t\tgeo.addAttribute( 'skinWeight', new THREE.Float32BufferAttribute( buffers.vertexWeights, 4 ) );\n\n\t\t\t\t// used later to bind the skeleton to the model\n\t\t\t\tgeo.FBX_Deformer = skeleton;\n\n\t\t\t}\n\n\t\t\tif ( buffers.normal.length > 0 ) {\n\n\t\t\t\tvar normalAttribute = new THREE.Float32BufferAttribute( buffers.normal, 3 );\n\n\t\t\t\tvar normalMatrix = new THREE.Matrix3().getNormalMatrix( preTransform );\n\t\t\t\tnormalMatrix.applyToBufferAttribute( normalAttribute );\n\n\t\t\t\tgeo.addAttribute( 'normal', normalAttribute );\n\n\t\t\t}\n\n\t\t\tbuffers.uvs.forEach( function ( uvBuffer, i ) {\n\n\t\t\t\t// subsequent uv buffers are called 'uv1', 'uv2', ...\n\t\t\t\tvar name = 'uv' + ( i + 1 ).toString();\n\n\t\t\t\t// the first uv buffer is just called 'uv'\n\t\t\t\tif ( i === 0 ) {\n\n\t\t\t\t\tname = 'uv';\n\n\t\t\t\t}\n\n\t\t\t\tgeo.addAttribute( name, new THREE.Float32BufferAttribute( buffers.uvs[ i ], 2 ) );\n\n\t\t\t} );\n\n\t\t\tif ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) {\n\n\t\t\t\t// Convert the material indices of each vertex into rendering groups on the geometry.\n\t\t\t\tvar prevMaterialIndex = buffers.materialIndex[ 0 ];\n\t\t\t\tvar startIndex = 0;\n\n\t\t\t\tbuffers.materialIndex.forEach( function ( currentIndex, i ) {\n\n\t\t\t\t\tif ( currentIndex !== prevMaterialIndex ) {\n\n\t\t\t\t\t\tgeo.addGroup( startIndex, i - startIndex, prevMaterialIndex );\n\n\t\t\t\t\t\tprevMaterialIndex = currentIndex;\n\t\t\t\t\t\tstartIndex = i;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\t// the loop above doesn't add the last group, do that here.\n\t\t\t\tif ( geo.groups.length > 0 ) {\n\n\t\t\t\t\tvar lastGroup = geo.groups[ geo.groups.length - 1 ];\n\t\t\t\t\tvar lastIndex = lastGroup.start + lastGroup.count;\n\n\t\t\t\t\tif ( lastIndex !== buffers.materialIndex.length ) {\n\n\t\t\t\t\t\tgeo.addGroup( lastIndex, buffers.materialIndex.length - lastIndex, prevMaterialIndex );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// case where there are multiple materials but the whole geometry is only\n\t\t\t\t// using one of them\n\t\t\t\tif ( geo.groups.length === 0 ) {\n\n\t\t\t\t\tgeo.addGroup( 0, buffers.materialIndex.length, buffers.materialIndex[ 0 ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.addMorphTargets( geo, geoNode, morphTarget, preTransform );\n\n\t\t\treturn geo;\n\n\t\t},\n\n\t\tparseGeoNode: function ( geoNode, skeleton ) {\n\n\t\t\tvar geoInfo = {};\n\n\t\t\tgeoInfo.vertexPositions = ( geoNode.Vertices !== undefined ) ? geoNode.Vertices.a : [];\n\t\t\tgeoInfo.vertexIndices = ( geoNode.PolygonVertexIndex !== undefined ) ? geoNode.PolygonVertexIndex.a : [];\n\n\t\t\tif ( geoNode.LayerElementColor ) {\n\n\t\t\t\tgeoInfo.color = this.parseVertexColors( geoNode.LayerElementColor[ 0 ] );\n\n\t\t\t}\n\n\t\t\tif ( geoNode.LayerElementMaterial ) {\n\n\t\t\t\tgeoInfo.material = this.parseMaterialIndices( geoNode.LayerElementMaterial[ 0 ] );\n\n\t\t\t}\n\n\t\t\tif ( geoNode.LayerElementNormal ) {\n\n\t\t\t\tgeoInfo.normal = this.parseNormals( geoNode.LayerElementNormal[ 0 ] );\n\n\t\t\t}\n\n\t\t\tif ( geoNode.LayerElementUV ) {\n\n\t\t\t\tgeoInfo.uv = [];\n\n\t\t\t\tvar i = 0;\n\t\t\t\twhile ( geoNode.LayerElementUV[ i ] ) {\n\n\t\t\t\t\tgeoInfo.uv.push( this.parseUVs( geoNode.LayerElementUV[ i ] ) );\n\t\t\t\t\ti ++;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tgeoInfo.weightTable = {};\n\n\t\t\tif ( skeleton !== null ) {\n\n\t\t\t\tgeoInfo.skeleton = skeleton;\n\n\t\t\t\tskeleton.rawBones.forEach( function ( rawBone, i ) {\n\n\t\t\t\t\t// loop over the bone's vertex indices and weights\n\t\t\t\t\trawBone.indices.forEach( function ( index, j ) {\n\n\t\t\t\t\t\tif ( geoInfo.weightTable[ index ] === undefined ) geoInfo.weightTable[ index ] = [];\n\n\t\t\t\t\t\tgeoInfo.weightTable[ index ].push( {\n\n\t\t\t\t\t\t\tid: i,\n\t\t\t\t\t\t\tweight: rawBone.weights[ j ],\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t} );\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\treturn geoInfo;\n\n\t\t},\n\n\t\tgenBuffers: function ( geoInfo ) {\n\n\t\t\tvar buffers = {\n\t\t\t\tvertex: [],\n\t\t\t\tnormal: [],\n\t\t\t\tcolors: [],\n\t\t\t\tuvs: [],\n\t\t\t\tmaterialIndex: [],\n\t\t\t\tvertexWeights: [],\n\t\t\t\tweightsIndices: [],\n\t\t\t};\n\n\t\t\tvar polygonIndex = 0;\n\t\t\tvar faceLength = 0;\n\t\t\tvar displayedWeightsWarning = false;\n\n\t\t\t// these will hold data for a single face\n\t\t\tvar facePositionIndexes = [];\n\t\t\tvar faceNormals = [];\n\t\t\tvar faceColors = [];\n\t\t\tvar faceUVs = [];\n\t\t\tvar faceWeights = [];\n\t\t\tvar faceWeightIndices = [];\n\n\t\t\tvar self = this;\n\t\t\tgeoInfo.vertexIndices.forEach( function ( vertexIndex, polygonVertexIndex ) {\n\n\t\t\t\tvar endOfFace = false;\n\n\t\t\t\t// Face index and vertex index arrays are combined in a single array\n\t\t\t\t// A cube with quad faces looks like this:\n\t\t\t\t// PolygonVertexIndex: *24 {\n\t\t\t\t// a: 0, 1, 3, -3, 2, 3, 5, -5, 4, 5, 7, -7, 6, 7, 1, -1, 1, 7, 5, -4, 6, 0, 2, -5\n\t\t\t\t// }\n\t\t\t\t// Negative numbers mark the end of a face - first face here is 0, 1, 3, -3\n\t\t\t\t// to find index of last vertex bit shift the index: ^ - 1\n\t\t\t\tif ( vertexIndex < 0 ) {\n\n\t\t\t\t\tvertexIndex = vertexIndex ^ - 1; // equivalent to ( x * -1 ) - 1\n\t\t\t\t\tendOfFace = true;\n\n\t\t\t\t}\n\n\t\t\t\tvar weightIndices = [];\n\t\t\t\tvar weights = [];\n\n\t\t\t\tfacePositionIndexes.push( vertexIndex * 3, vertexIndex * 3 + 1, vertexIndex * 3 + 2 );\n\n\t\t\t\tif ( geoInfo.color ) {\n\n\t\t\t\t\tvar data = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.color );\n\n\t\t\t\t\tfaceColors.push( data[ 0 ], data[ 1 ], data[ 2 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.skeleton ) {\n\n\t\t\t\t\tif ( geoInfo.weightTable[ vertexIndex ] !== undefined ) {\n\n\t\t\t\t\t\tgeoInfo.weightTable[ vertexIndex ].forEach( function ( wt ) {\n\n\t\t\t\t\t\t\tweights.push( wt.weight );\n\t\t\t\t\t\t\tweightIndices.push( wt.id );\n\n\t\t\t\t\t\t} );\n\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( weights.length > 4 ) {\n\n\t\t\t\t\t\tif ( ! displayedWeightsWarning ) {\n\n\t\t\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights.' );\n\t\t\t\t\t\t\tdisplayedWeightsWarning = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar wIndex = [ 0, 0, 0, 0 ];\n\t\t\t\t\t\tvar Weight = [ 0, 0, 0, 0 ];\n\n\t\t\t\t\t\tweights.forEach( function ( weight, weightIndex ) {\n\n\t\t\t\t\t\t\tvar currentWeight = weight;\n\t\t\t\t\t\t\tvar currentIndex = weightIndices[ weightIndex ];\n\n\t\t\t\t\t\t\tWeight.forEach( function ( comparedWeight, comparedWeightIndex, comparedWeightArray ) {\n\n\t\t\t\t\t\t\t\tif ( currentWeight > comparedWeight ) {\n\n\t\t\t\t\t\t\t\t\tcomparedWeightArray[ comparedWeightIndex ] = currentWeight;\n\t\t\t\t\t\t\t\t\tcurrentWeight = comparedWeight;\n\n\t\t\t\t\t\t\t\t\tvar tmp = wIndex[ comparedWeightIndex ];\n\t\t\t\t\t\t\t\t\twIndex[ comparedWeightIndex ] = currentIndex;\n\t\t\t\t\t\t\t\t\tcurrentIndex = tmp;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\tweightIndices = wIndex;\n\t\t\t\t\t\tweights = Weight;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// if the weight array is shorter than 4 pad with 0s\n\t\t\t\t\twhile ( weights.length < 4 ) {\n\n\t\t\t\t\t\tweights.push( 0 );\n\t\t\t\t\t\tweightIndices.push( 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( var i = 0; i < 4; ++ i ) {\n\n\t\t\t\t\t\tfaceWeights.push( weights[ i ] );\n\t\t\t\t\t\tfaceWeightIndices.push( weightIndices[ i ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.normal ) {\n\n\t\t\t\t\tvar data = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.normal );\n\n\t\t\t\t\tfaceNormals.push( data[ 0 ], data[ 1 ], data[ 2 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) {\n\n\t\t\t\t\tvar materialIndex = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.material )[ 0 ];\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.uv ) {\n\n\t\t\t\t\tgeoInfo.uv.forEach( function ( uv, i ) {\n\n\t\t\t\t\t\tvar data = getData( polygonVertexIndex, polygonIndex, vertexIndex, uv );\n\n\t\t\t\t\t\tif ( faceUVs[ i ] === undefined ) {\n\n\t\t\t\t\t\t\tfaceUVs[ i ] = [];\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfaceUVs[ i ].push( data[ 0 ] );\n\t\t\t\t\t\tfaceUVs[ i ].push( data[ 1 ] );\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t\tfaceLength ++;\n\n\t\t\t\tif ( endOfFace ) {\n\n\t\t\t\t\tself.genFace( buffers, geoInfo, facePositionIndexes, materialIndex, faceNormals, faceColors, faceUVs, faceWeights, faceWeightIndices, faceLength );\n\n\t\t\t\t\tpolygonIndex ++;\n\t\t\t\t\tfaceLength = 0;\n\n\t\t\t\t\t// reset arrays for the next face\n\t\t\t\t\tfacePositionIndexes = [];\n\t\t\t\t\tfaceNormals = [];\n\t\t\t\t\tfaceColors = [];\n\t\t\t\t\tfaceUVs = [];\n\t\t\t\t\tfaceWeights = [];\n\t\t\t\t\tfaceWeightIndices = [];\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn buffers;\n\n\t\t},\n\n\t\t// Generate data for a single face in a geometry. If the face is a quad then split it into 2 tris\n\t\tgenFace: function ( buffers, geoInfo, facePositionIndexes, materialIndex, faceNormals, faceColors, faceUVs, faceWeights, faceWeightIndices, faceLength ) {\n\n\t\t\tfor ( var i = 2; i < faceLength; i ++ ) {\n\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 0 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 1 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 2 ] ] );\n\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 + 1 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 + 2 ] ] );\n\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 + 1 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 + 2 ] ] );\n\n\t\t\t\tif ( geoInfo.skeleton ) {\n\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ 0 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ 1 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ 2 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ 3 ] );\n\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 1 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 2 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 3 ] );\n\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ i * 4 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ i * 4 + 1 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ i * 4 + 2 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ i * 4 + 3 ] );\n\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ 0 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ 1 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ 2 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ 3 ] );\n\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 1 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 2 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 3 ] );\n\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ i * 4 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ i * 4 + 1 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ i * 4 + 2 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ i * 4 + 3 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.color ) {\n\n\t\t\t\t\tbuffers.colors.push( faceColors[ 0 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ 1 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ 2 ] );\n\n\t\t\t\t\tbuffers.colors.push( faceColors[ ( i - 1 ) * 3 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ ( i - 1 ) * 3 + 1 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ ( i - 1 ) * 3 + 2 ] );\n\n\t\t\t\t\tbuffers.colors.push( faceColors[ i * 3 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ i * 3 + 1 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ i * 3 + 2 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) {\n\n\t\t\t\t\tbuffers.materialIndex.push( materialIndex );\n\t\t\t\t\tbuffers.materialIndex.push( materialIndex );\n\t\t\t\t\tbuffers.materialIndex.push( materialIndex );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.normal ) {\n\n\t\t\t\t\tbuffers.normal.push( faceNormals[ 0 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ 1 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ 2 ] );\n\n\t\t\t\t\tbuffers.normal.push( faceNormals[ ( i - 1 ) * 3 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ ( i - 1 ) * 3 + 1 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ ( i - 1 ) * 3 + 2 ] );\n\n\t\t\t\t\tbuffers.normal.push( faceNormals[ i * 3 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ i * 3 + 1 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ i * 3 + 2 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.uv ) {\n\n\t\t\t\t\tgeoInfo.uv.forEach( function ( uv, j ) {\n\n\t\t\t\t\t\tif ( buffers.uvs[ j ] === undefined ) buffers.uvs[ j ] = [];\n\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ 0 ] );\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ 1 ] );\n\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ ( i - 1 ) * 2 ] );\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ ( i - 1 ) * 2 + 1 ] );\n\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ i * 2 ] );\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ i * 2 + 1 ] );\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t\taddMorphTargets: function ( parentGeo, parentGeoNode, morphTarget, preTransform ) {\n\n\t\t\tif ( morphTarget === null ) return;\n\n\t\t\tparentGeo.morphAttributes.position = [];\n\t\t\tparentGeo.morphAttributes.normal = [];\n\n\t\t\tvar self = this;\n\t\t\tmorphTarget.rawTargets.forEach( function ( rawTarget ) {\n\n\t\t\t\tvar morphGeoNode = fbxTree.Objects.Geometry[ rawTarget.geoID ];\n\n\t\t\t\tif ( morphGeoNode !== undefined ) {\n\n\t\t\t\t\tself.genMorphGeometry( parentGeo, parentGeoNode, morphGeoNode, preTransform );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t},\n\n\t\t// a morph geometry node is similar to a standard node, and the node is also contained\n\t\t// in FBXTree.Objects.Geometry, however it can only have attributes for position, normal\n\t\t// and a special attribute Index defining which vertices of the original geometry are affected\n\t\t// Normal and position attributes only have data for the vertices that are affected by the morph\n\t\tgenMorphGeometry: function ( parentGeo, parentGeoNode, morphGeoNode, preTransform ) {\n\n\t\t\tvar morphGeo = new THREE.BufferGeometry();\n\t\t\tif ( morphGeoNode.attrName ) morphGeo.name = morphGeoNode.attrName;\n\n\t\t\tvar vertexIndices = ( parentGeoNode.PolygonVertexIndex !== undefined ) ? parentGeoNode.PolygonVertexIndex.a : [];\n\n\t\t\t// make a copy of the parent's vertex positions\n\t\t\tvar vertexPositions = ( parentGeoNode.Vertices !== undefined ) ? parentGeoNode.Vertices.a.slice() : [];\n\n\t\t\tvar morphPositions = ( morphGeoNode.Vertices !== undefined ) ? morphGeoNode.Vertices.a : [];\n\t\t\tvar indices = ( morphGeoNode.Indexes !== undefined ) ? morphGeoNode.Indexes.a : [];\n\n\t\t\tfor ( var i = 0; i < indices.length; i ++ ) {\n\n\t\t\t\tvar morphIndex = indices[ i ] * 3;\n\n\t\t\t\t// FBX format uses blend shapes rather than morph targets. This can be converted\n\t\t\t\t// by additively combining the blend shape positions with the original geometry's positions\n\t\t\t\tvertexPositions[ morphIndex ] += morphPositions[ i * 3 ];\n\t\t\t\tvertexPositions[ morphIndex + 1 ] += morphPositions[ i * 3 + 1 ];\n\t\t\t\tvertexPositions[ morphIndex + 2 ] += morphPositions[ i * 3 + 2 ];\n\n\t\t\t}\n\n\t\t\t// TODO: add morph normal support\n\t\t\tvar morphGeoInfo = {\n\t\t\t\tvertexIndices: vertexIndices,\n\t\t\t\tvertexPositions: vertexPositions,\n\t\t\t};\n\n\t\t\tvar morphBuffers = this.genBuffers( morphGeoInfo );\n\n\t\t\tvar positionAttribute = new THREE.Float32BufferAttribute( morphBuffers.vertex, 3 );\n\t\t\tpositionAttribute.name = morphGeoNode.attrName;\n\n\t\t\tpreTransform.applyToBufferAttribute( positionAttribute );\n\n\t\t\tparentGeo.morphAttributes.position.push( positionAttribute );\n\n\t\t},\n\n\t\t// Parse normal from FBXTree.Objects.Geometry.LayerElementNormal if it exists\n\t\tparseNormals: function ( NormalNode ) {\n\n\t\t\tvar mappingType = NormalNode.MappingInformationType;\n\t\t\tvar referenceType = NormalNode.ReferenceInformationType;\n\t\t\tvar buffer = NormalNode.Normals.a;\n\t\t\tvar indexBuffer = [];\n\t\t\tif ( referenceType === 'IndexToDirect' ) {\n\n\t\t\t\tif ( 'NormalIndex' in NormalNode ) {\n\n\t\t\t\t\tindexBuffer = NormalNode.NormalIndex.a;\n\n\t\t\t\t} else if ( 'NormalsIndex' in NormalNode ) {\n\n\t\t\t\t\tindexBuffer = NormalNode.NormalsIndex.a;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdataSize: 3,\n\t\t\t\tbuffer: buffer,\n\t\t\t\tindices: indexBuffer,\n\t\t\t\tmappingType: mappingType,\n\t\t\t\treferenceType: referenceType\n\t\t\t};\n\n\t\t},\n\n\t\t// Parse UVs from FBXTree.Objects.Geometry.LayerElementUV if it exists\n\t\tparseUVs: function ( UVNode ) {\n\n\t\t\tvar mappingType = UVNode.MappingInformationType;\n\t\t\tvar referenceType = UVNode.ReferenceInformationType;\n\t\t\tvar buffer = UVNode.UV.a;\n\t\t\tvar indexBuffer = [];\n\t\t\tif ( referenceType === 'IndexToDirect' ) {\n\n\t\t\t\tindexBuffer = UVNode.UVIndex.a;\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdataSize: 2,\n\t\t\t\tbuffer: buffer,\n\t\t\t\tindices: indexBuffer,\n\t\t\t\tmappingType: mappingType,\n\t\t\t\treferenceType: referenceType\n\t\t\t};\n\n\t\t},\n\n\t\t// Parse Vertex Colors from FBXTree.Objects.Geometry.LayerElementColor if it exists\n\t\tparseVertexColors: function ( ColorNode ) {\n\n\t\t\tvar mappingType = ColorNode.MappingInformationType;\n\t\t\tvar referenceType = ColorNode.ReferenceInformationType;\n\t\t\tvar buffer = ColorNode.Colors.a;\n\t\t\tvar indexBuffer = [];\n\t\t\tif ( referenceType === 'IndexToDirect' ) {\n\n\t\t\t\tindexBuffer = ColorNode.ColorIndex.a;\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdataSize: 4,\n\t\t\t\tbuffer: buffer,\n\t\t\t\tindices: indexBuffer,\n\t\t\t\tmappingType: mappingType,\n\t\t\t\treferenceType: referenceType\n\t\t\t};\n\n\t\t},\n\n\t\t// Parse mapping and material data in FBXTree.Objects.Geometry.LayerElementMaterial if it exists\n\t\tparseMaterialIndices: function ( MaterialNode ) {\n\n\t\t\tvar mappingType = MaterialNode.MappingInformationType;\n\t\t\tvar referenceType = MaterialNode.ReferenceInformationType;\n\n\t\t\tif ( mappingType === 'NoMappingInformation' ) {\n\n\t\t\t\treturn {\n\t\t\t\t\tdataSize: 1,\n\t\t\t\t\tbuffer: [ 0 ],\n\t\t\t\t\tindices: [ 0 ],\n\t\t\t\t\tmappingType: 'AllSame',\n\t\t\t\t\treferenceType: referenceType\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t\tvar materialIndexBuffer = MaterialNode.Materials.a;\n\n\t\t\t// Since materials are stored as indices, there's a bit of a mismatch between FBX and what\n\t\t\t// we expect.So we create an intermediate buffer that points to the index in the buffer,\n\t\t\t// for conforming with the other functions we've written for other data.\n\t\t\tvar materialIndices = [];\n\n\t\t\tfor ( var i = 0; i < materialIndexBuffer.length; ++ i ) {\n\n\t\t\t\tmaterialIndices.push( i );\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdataSize: 1,\n\t\t\t\tbuffer: materialIndexBuffer,\n\t\t\t\tindices: materialIndices,\n\t\t\t\tmappingType: mappingType,\n\t\t\t\treferenceType: referenceType\n\t\t\t};\n\n\t\t},\n\n\t\t// Generate a NurbGeometry from a node in FBXTree.Objects.Geometry\n\t\tparseNurbsGeometry: function ( geoNode ) {\n\n\t\t\tif ( THREE.NURBSCurve === undefined ) {\n\n\t\t\t\tconsole.error( 'THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry.' );\n\t\t\t\treturn new THREE.BufferGeometry();\n\n\t\t\t}\n\n\t\t\tvar order = parseInt( geoNode.Order );\n\n\t\t\tif ( isNaN( order ) ) {\n\n\t\t\t\tconsole.error( 'THREE.FBXLoader: Invalid Order %s given for geometry ID: %s', geoNode.Order, geoNode.id );\n\t\t\t\treturn new THREE.BufferGeometry();\n\n\t\t\t}\n\n\t\t\tvar degree = order - 1;\n\n\t\t\tvar knots = geoNode.KnotVector.a;\n\t\t\tvar controlPoints = [];\n\t\t\tvar pointsValues = geoNode.Points.a;\n\n\t\t\tfor ( var i = 0, l = pointsValues.length; i < l; i += 4 ) {\n\n\t\t\t\tcontrolPoints.push( new THREE.Vector4().fromArray( pointsValues, i ) );\n\n\t\t\t}\n\n\t\t\tvar startKnot, endKnot;\n\n\t\t\tif ( geoNode.Form === 'Closed' ) {\n\n\t\t\t\tcontrolPoints.push( controlPoints[ 0 ] );\n\n\t\t\t} else if ( geoNode.Form === 'Periodic' ) {\n\n\t\t\t\tstartKnot = degree;\n\t\t\t\tendKnot = knots.length - 1 - startKnot;\n\n\t\t\t\tfor ( var i = 0; i < degree; ++ i ) {\n\n\t\t\t\t\tcontrolPoints.push( controlPoints[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar curve = new THREE.NURBSCurve( degree, knots, controlPoints, startKnot, endKnot );\n\t\t\tvar vertices = curve.getPoints( controlPoints.length * 7 );\n\n\t\t\tvar positions = new Float32Array( vertices.length * 3 );\n\n\t\t\tvertices.forEach( function ( vertex, i ) {\n\n\t\t\t\tvertex.toArray( positions, i * 3 );\n\n\t\t\t} );\n\n\t\t\tvar geometry = new THREE.BufferGeometry();\n\t\t\tgeometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );\n\n\t\t\treturn geometry;\n\n\t\t},\n\n\t};\n\n\t// parse animation data from FBXTree\n\tfunction AnimationParser() {}\n\n\tAnimationParser.prototype = {\n\n\t\tconstructor: AnimationParser,\n\n\t\t// take raw animation clips and turn them into three.js animation clips\n\t\tparse: function () {\n\n\t\t\tvar animationClips = [];\n\n\n\t\t\tvar rawClips = this.parseClips();\n\n\t\t\tif ( rawClips === undefined ) return animationClips;\n\n\t\t\tfor ( var key in rawClips ) {\n\n\t\t\t\tvar rawClip = rawClips[ key ];\n\n\t\t\t\tvar clip = this.addClip( rawClip );\n\n\t\t\t\tanimationClips.push( clip );\n\n\t\t\t}\n\n\t\t\treturn animationClips;\n\n\t\t},\n\n\t\tparseClips: function () {\n\n\t\t\t// since the actual transformation data is stored in FBXTree.Objects.AnimationCurve,\n\t\t\t// if this is undefined we can safely assume there are no animations\n\t\t\tif ( fbxTree.Objects.AnimationCurve === undefined ) return undefined;\n\n\t\t\tvar curveNodesMap = this.parseAnimationCurveNodes();\n\n\t\t\tthis.parseAnimationCurves( curveNodesMap );\n\n\t\t\tvar layersMap = this.parseAnimationLayers( curveNodesMap );\n\t\t\tvar rawClips = this.parseAnimStacks( layersMap );\n\n\t\t\treturn rawClips;\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.AnimationCurveNode\n\t\t// each AnimationCurveNode holds data for an animation transform for a model (e.g. left arm rotation )\n\t\t// and is referenced by an AnimationLayer\n\t\tparseAnimationCurveNodes: function () {\n\n\t\t\tvar rawCurveNodes = fbxTree.Objects.AnimationCurveNode;\n\n\t\t\tvar curveNodesMap = new Map();\n\n\t\t\tfor ( var nodeID in rawCurveNodes ) {\n\n\t\t\t\tvar rawCurveNode = rawCurveNodes[ nodeID ];\n\n\t\t\t\tif ( rawCurveNode.attrName.match( /S|R|T|DeformPercent/ ) !== null ) {\n\n\t\t\t\t\tvar curveNode = {\n\n\t\t\t\t\t\tid: rawCurveNode.id,\n\t\t\t\t\t\tattr: rawCurveNode.attrName,\n\t\t\t\t\t\tcurves: {},\n\n\t\t\t\t\t};\n\n\t\t\t\t\tcurveNodesMap.set( curveNode.id, curveNode );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn curveNodesMap;\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.AnimationCurve and connect them up to\n\t\t// previously parsed AnimationCurveNodes. Each AnimationCurve holds data for a single animated\n\t\t// axis ( e.g. times and values of x rotation)\n\t\tparseAnimationCurves: function ( curveNodesMap ) {\n\n\t\t\tvar rawCurves = fbxTree.Objects.AnimationCurve;\n\n\t\t\t// TODO: Many values are identical up to roundoff error, but won't be optimised\n\t\t\t// e.g. position times: [0, 0.4, 0. 8]\n\t\t\t// position values: [7.23538335023477e-7, 93.67518615722656, -0.9982695579528809, 7.23538335023477e-7, 93.67518615722656, -0.9982695579528809, 7.235384487103147e-7, 93.67520904541016, -0.9982695579528809]\n\t\t\t// clearly, this should be optimised to\n\t\t\t// times: [0], positions [7.23538335023477e-7, 93.67518615722656, -0.9982695579528809]\n\t\t\t// this shows up in nearly every FBX file, and generally time array is length > 100\n\n\t\t\tfor ( var nodeID in rawCurves ) {\n\n\t\t\t\tvar animationCurve = {\n\n\t\t\t\t\tid: rawCurves[ nodeID ].id,\n\t\t\t\t\ttimes: rawCurves[ nodeID ].KeyTime.a.map( convertFBXTimeToSeconds ),\n\t\t\t\t\tvalues: rawCurves[ nodeID ].KeyValueFloat.a,\n\n\t\t\t\t};\n\n\t\t\t\tvar relationships = connections.get( animationCurve.id );\n\n\t\t\t\tif ( relationships !== undefined ) {\n\n\t\t\t\t\tvar animationCurveID = relationships.parents[ 0 ].ID;\n\t\t\t\t\tvar animationCurveRelationship = relationships.parents[ 0 ].relationship;\n\n\t\t\t\t\tif ( animationCurveRelationship.match( /X/ ) ) {\n\n\t\t\t\t\t\tcurveNodesMap.get( animationCurveID ).curves[ 'x' ] = animationCurve;\n\n\t\t\t\t\t} else if ( animationCurveRelationship.match( /Y/ ) ) {\n\n\t\t\t\t\t\tcurveNodesMap.get( animationCurveID ).curves[ 'y' ] = animationCurve;\n\n\t\t\t\t\t} else if ( animationCurveRelationship.match( /Z/ ) ) {\n\n\t\t\t\t\t\tcurveNodesMap.get( animationCurveID ).curves[ 'z' ] = animationCurve;\n\n\t\t\t\t\t} else if ( animationCurveRelationship.match( /d|DeformPercent/ ) && curveNodesMap.has( animationCurveID ) ) {\n\n\t\t\t\t\t\tcurveNodesMap.get( animationCurveID ).curves[ 'morph' ] = animationCurve;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.AnimationLayer. Each layers holds references\n\t\t// to various AnimationCurveNodes and is referenced by an AnimationStack node\n\t\t// note: theoretically a stack can have multiple layers, however in practice there always seems to be one per stack\n\t\tparseAnimationLayers: function ( curveNodesMap ) {\n\n\t\t\tvar rawLayers = fbxTree.Objects.AnimationLayer;\n\n\t\t\tvar layersMap = new Map();\n\n\t\t\tfor ( var nodeID in rawLayers ) {\n\n\t\t\t\tvar layerCurveNodes = [];\n\n\t\t\t\tvar connection = connections.get( parseInt( nodeID ) );\n\n\t\t\t\tif ( connection !== undefined ) {\n\n\t\t\t\t\t// all the animationCurveNodes used in the layer\n\t\t\t\t\tvar children = connection.children;\n\n\t\t\t\t\tvar self = this;\n\t\t\t\t\tchildren.forEach( function ( child, i ) {\n\n\t\t\t\t\t\tif ( curveNodesMap.has( child.ID ) ) {\n\n\t\t\t\t\t\t\tvar curveNode = curveNodesMap.get( child.ID );\n\n\t\t\t\t\t\t\t// check that the curves are defined for at least one axis, otherwise ignore the curveNode\n\t\t\t\t\t\t\tif ( curveNode.curves.x !== undefined || curveNode.curves.y !== undefined || curveNode.curves.z !== undefined ) {\n\n\t\t\t\t\t\t\t\tif ( layerCurveNodes[ i ] === undefined ) {\n\n\t\t\t\t\t\t\t\t\tvar modelID;\n\n\t\t\t\t\t\t\t\t\tconnections.get( child.ID ).parents.forEach( function ( parent ) {\n\n\t\t\t\t\t\t\t\t\t\tif ( parent.relationship !== undefined ) modelID = parent.ID;\n\n\t\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t\tvar rawModel = fbxTree.Objects.Model[ modelID.toString() ];\n\n\t\t\t\t\t\t\t\t\tvar node = {\n\n\t\t\t\t\t\t\t\t\t\tmodelName: THREE.PropertyBinding.sanitizeNodeName( rawModel.attrName ),\n\t\t\t\t\t\t\t\t\t\tinitialPosition: [ 0, 0, 0 ],\n\t\t\t\t\t\t\t\t\t\tinitialRotation: [ 0, 0, 0 ],\n\t\t\t\t\t\t\t\t\t\tinitialScale: [ 1, 1, 1 ],\n\t\t\t\t\t\t\t\t\t\ttransform: self.getModelAnimTransform( rawModel ),\n\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\t// if the animated model is pre rotated, we'll have to apply the pre rotations to every\n\t\t\t\t\t\t\t\t\t// animation value as well\n\t\t\t\t\t\t\t\t\tif ( 'PreRotation' in rawModel ) node.preRotations = rawModel.PreRotation.value;\n\t\t\t\t\t\t\t\t\tif ( 'PostRotation' in rawModel ) node.postRotations = rawModel.PostRotation.value;\n\n\t\t\t\t\t\t\t\t\tlayerCurveNodes[ i ] = node;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tlayerCurveNodes[ i ][ curveNode.attr ] = curveNode;\n\n\t\t\t\t\t\t\t} else if ( curveNode.curves.morph !== undefined ) {\n\n\t\t\t\t\t\t\t\tif ( layerCurveNodes[ i ] === undefined ) {\n\n\t\t\t\t\t\t\t\t\tvar deformerID;\n\n\t\t\t\t\t\t\t\t\tconnections.get( child.ID ).parents.forEach( function ( parent ) {\n\n\t\t\t\t\t\t\t\t\t\tif ( parent.relationship !== undefined ) deformerID = parent.ID;\n\n\t\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t\tvar morpherID = connections.get( deformerID ).parents[ 0 ].ID;\n\t\t\t\t\t\t\t\t\tvar geoID = connections.get( morpherID ).parents[ 0 ].ID;\n\n\t\t\t\t\t\t\t\t\t// assuming geometry is not used in more than one model\n\t\t\t\t\t\t\t\t\tvar modelID = connections.get( geoID ).parents[ 0 ].ID;\n\n\t\t\t\t\t\t\t\t\tvar rawModel = fbxTree.Objects.Model[ modelID ];\n\n\t\t\t\t\t\t\t\t\tvar node = {\n\n\t\t\t\t\t\t\t\t\t\tmodelName: THREE.PropertyBinding.sanitizeNodeName( rawModel.attrName ),\n\t\t\t\t\t\t\t\t\t\tmorphName: fbxTree.Objects.Deformer[ deformerID ].attrName,\n\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\tlayerCurveNodes[ i ] = node;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tlayerCurveNodes[ i ][ curveNode.attr ] = curveNode;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t\tlayersMap.set( parseInt( nodeID ), layerCurveNodes );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn layersMap;\n\n\t\t},\n\n\t\tgetModelAnimTransform: function ( modelNode ) {\n\n\t\t\tvar transformData = {};\n\n\t\t\tif ( 'RotationOrder' in modelNode ) transformData.eulerOrder = parseInt( modelNode.RotationOrder.value );\n\n\t\t\tif ( 'Lcl_Translation' in modelNode ) transformData.translation = modelNode.Lcl_Translation.value;\n\t\t\tif ( 'RotationOffset' in modelNode ) transformData.rotationOffset = modelNode.RotationOffset.value;\n\n\t\t\tif ( 'Lcl_Rotation' in modelNode ) transformData.rotation = modelNode.Lcl_Rotation.value;\n\t\t\tif ( 'PreRotation' in modelNode ) transformData.preRotation = modelNode.PreRotation.value;\n\n\t\t\tif ( 'PostRotation' in modelNode ) transformData.postRotation = modelNode.PostRotation.value;\n\n\t\t\tif ( 'Lcl_Scaling' in modelNode ) transformData.scale = modelNode.Lcl_Scaling.value;\n\n\t\t\treturn generateTransform( transformData );\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.AnimationStack. These are the top level node in the animation\n\t\t// hierarchy. Each Stack node will be used to create a THREE.AnimationClip\n\t\tparseAnimStacks: function ( layersMap ) {\n\n\t\t\tvar rawStacks = fbxTree.Objects.AnimationStack;\n\n\t\t\t// connect the stacks (clips) up to the layers\n\t\t\tvar rawClips = {};\n\n\t\t\tfor ( var nodeID in rawStacks ) {\n\n\t\t\t\tvar children = connections.get( parseInt( nodeID ) ).children;\n\n\t\t\t\tif ( children.length > 1 ) {\n\n\t\t\t\t\t// it seems like stacks will always be associated with a single layer. But just in case there are files\n\t\t\t\t\t// where there are multiple layers per stack, we'll display a warning\n\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.' );\n\n\t\t\t\t}\n\n\t\t\t\tvar layer = layersMap.get( children[ 0 ].ID );\n\n\t\t\t\trawClips[ nodeID ] = {\n\n\t\t\t\t\tname: rawStacks[ nodeID ].attrName,\n\t\t\t\t\tlayer: layer,\n\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t\treturn rawClips;\n\n\t\t},\n\n\t\taddClip: function ( rawClip ) {\n\n\t\t\tvar tracks = [];\n\n\t\t\tvar self = this;\n\t\t\trawClip.layer.forEach( function ( rawTracks ) {\n\n\t\t\t\ttracks = tracks.concat( self.generateTracks( rawTracks ) );\n\n\t\t\t} );\n\n\t\t\treturn new THREE.AnimationClip( rawClip.name, - 1, tracks );\n\n\t\t},\n\n\t\tgenerateTracks: function ( rawTracks ) {\n\n\t\t\tvar tracks = [];\n\n\t\t\tvar initialPosition = new THREE.Vector3();\n\t\t\tvar initialRotation = new THREE.Quaternion();\n\t\t\tvar initialScale = new THREE.Vector3();\n\n\t\t\tif ( rawTracks.transform ) rawTracks.transform.decompose( initialPosition, initialRotation, initialScale );\n\n\t\t\tinitialPosition = initialPosition.toArray();\n\t\t\tinitialRotation = new THREE.Euler().setFromQuaternion( initialRotation ).toArray(); // todo: euler order\n\t\t\tinitialScale = initialScale.toArray();\n\n\t\t\tif ( rawTracks.T !== undefined && Object.keys( rawTracks.T.curves ).length > 0 ) {\n\n\t\t\t\tvar positionTrack = this.generateVectorTrack( rawTracks.modelName, rawTracks.T.curves, initialPosition, 'position' );\n\t\t\t\tif ( positionTrack !== undefined ) tracks.push( positionTrack );\n\n\t\t\t}\n\n\t\t\tif ( rawTracks.R !== undefined && Object.keys( rawTracks.R.curves ).length > 0 ) {\n\n\t\t\t\tvar rotationTrack = this.generateRotationTrack( rawTracks.modelName, rawTracks.R.curves, initialRotation, rawTracks.preRotations, rawTracks.postRotations );\n\t\t\t\tif ( rotationTrack !== undefined ) tracks.push( rotationTrack );\n\n\t\t\t}\n\n\t\t\tif ( rawTracks.S !== undefined && Object.keys( rawTracks.S.curves ).length > 0 ) {\n\n\t\t\t\tvar scaleTrack = this.generateVectorTrack( rawTracks.modelName, rawTracks.S.curves, initialScale, 'scale' );\n\t\t\t\tif ( scaleTrack !== undefined ) tracks.push( scaleTrack );\n\n\t\t\t}\n\n\t\t\tif ( rawTracks.DeformPercent !== undefined ) {\n\n\t\t\t\tvar morphTrack = this.generateMorphTrack( rawTracks );\n\t\t\t\tif ( morphTrack !== undefined ) tracks.push( morphTrack );\n\n\t\t\t}\n\n\t\t\treturn tracks;\n\n\t\t},\n\n\t\tgenerateVectorTrack: function ( modelName, curves, initialValue, type ) {\n\n\t\t\tvar times = this.getTimesForAllAxes( curves );\n\t\t\tvar values = this.getKeyframeTrackValues( times, curves, initialValue );\n\n\t\t\treturn new THREE.VectorKeyframeTrack( modelName + '.' + type, times, values );\n\n\t\t},\n\n\t\tgenerateRotationTrack: function ( modelName, curves, initialValue, preRotations, postRotations ) {\n\n\t\t\tif ( curves.x !== undefined ) {\n\n\t\t\t\tthis.interpolateRotations( curves.x );\n\t\t\t\tcurves.x.values = curves.x.values.map( THREE.Math.degToRad );\n\n\t\t\t}\n\t\t\tif ( curves.y !== undefined ) {\n\n\t\t\t\tthis.interpolateRotations( curves.y );\n\t\t\t\tcurves.y.values = curves.y.values.map( THREE.Math.degToRad );\n\n\t\t\t}\n\t\t\tif ( curves.z !== undefined ) {\n\n\t\t\t\tthis.interpolateRotations( curves.z );\n\t\t\t\tcurves.z.values = curves.z.values.map( THREE.Math.degToRad );\n\n\t\t\t}\n\n\t\t\tvar times = this.getTimesForAllAxes( curves );\n\t\t\tvar values = this.getKeyframeTrackValues( times, curves, initialValue );\n\n\t\t\tif ( preRotations !== undefined ) {\n\n\t\t\t\tpreRotations = preRotations.map( THREE.Math.degToRad );\n\t\t\t\tpreRotations.push( 'ZYX' );\n\n\t\t\t\tpreRotations = new THREE.Euler().fromArray( preRotations );\n\t\t\t\tpreRotations = new THREE.Quaternion().setFromEuler( preRotations );\n\n\t\t\t}\n\n\t\t\tif ( postRotations !== undefined ) {\n\n\t\t\t\tpostRotations = postRotations.map( THREE.Math.degToRad );\n\t\t\t\tpostRotations.push( 'ZYX' );\n\n\t\t\t\tpostRotations = new THREE.Euler().fromArray( postRotations );\n\t\t\t\tpostRotations = new THREE.Quaternion().setFromEuler( postRotations ).inverse();\n\n\t\t\t}\n\n\t\t\tvar quaternion = new THREE.Quaternion();\n\t\t\tvar euler = new THREE.Euler();\n\n\t\t\tvar quaternionValues = [];\n\n\t\t\tfor ( var i = 0; i < values.length; i += 3 ) {\n\n\t\t\t\teuler.set( values[ i ], values[ i + 1 ], values[ i + 2 ], 'ZYX' );\n\n\t\t\t\tquaternion.setFromEuler( euler );\n\n\t\t\t\tif ( preRotations !== undefined ) quaternion.premultiply( preRotations );\n\t\t\t\tif ( postRotations !== undefined ) quaternion.multiply( postRotations );\n\n\t\t\t\tquaternion.toArray( quaternionValues, ( i / 3 ) * 4 );\n\n\t\t\t}\n\n\t\t\treturn new THREE.QuaternionKeyframeTrack( modelName + '.quaternion', times, quaternionValues );\n\n\t\t},\n\n\t\tgenerateMorphTrack: function ( rawTracks ) {\n\n\t\t\tvar curves = rawTracks.DeformPercent.curves.morph;\n\t\t\tvar values = curves.values.map( function ( val ) {\n\n\t\t\t\treturn val / 100;\n\n\t\t\t} );\n\n\t\t\tvar morphNum = sceneGraph.getObjectByName( rawTracks.modelName ).morphTargetDictionary[ rawTracks.morphName ];\n\n\t\t\treturn new THREE.NumberKeyframeTrack( rawTracks.modelName + '.morphTargetInfluences[' + morphNum + ']', curves.times, values );\n\n\t\t},\n\n\t\t// For all animated objects, times are defined separately for each axis\n\t\t// Here we'll combine the times into one sorted array without duplicates\n\t\tgetTimesForAllAxes: function ( curves ) {\n\n\t\t\tvar times = [];\n\n\t\t\t// first join together the times for each axis, if defined\n\t\t\tif ( curves.x !== undefined ) times = times.concat( curves.x.times );\n\t\t\tif ( curves.y !== undefined ) times = times.concat( curves.y.times );\n\t\t\tif ( curves.z !== undefined ) times = times.concat( curves.z.times );\n\n\t\t\t// then sort them and remove duplicates\n\t\t\ttimes = times.sort( function ( a, b ) {\n\n\t\t\t\treturn a - b;\n\n\t\t\t} ).filter( function ( elem, index, array ) {\n\n\t\t\t\treturn array.indexOf( elem ) == index;\n\n\t\t\t} );\n\n\t\t\treturn times;\n\n\t\t},\n\n\t\tgetKeyframeTrackValues: function ( times, curves, initialValue ) {\n\n\t\t\tvar prevValue = initialValue;\n\n\t\t\tvar values = [];\n\n\t\t\tvar xIndex = - 1;\n\t\t\tvar yIndex = - 1;\n\t\t\tvar zIndex = - 1;\n\n\t\t\ttimes.forEach( function ( time ) {\n\n\t\t\t\tif ( curves.x ) xIndex = curves.x.times.indexOf( time );\n\t\t\t\tif ( curves.y ) yIndex = curves.y.times.indexOf( time );\n\t\t\t\tif ( curves.z ) zIndex = curves.z.times.indexOf( time );\n\n\t\t\t\t// if there is an x value defined for this frame, use that\n\t\t\t\tif ( xIndex !== - 1 ) {\n\n\t\t\t\t\tvar xValue = curves.x.values[ xIndex ];\n\t\t\t\t\tvalues.push( xValue );\n\t\t\t\t\tprevValue[ 0 ] = xValue;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// otherwise use the x value from the previous frame\n\t\t\t\t\tvalues.push( prevValue[ 0 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( yIndex !== - 1 ) {\n\n\t\t\t\t\tvar yValue = curves.y.values[ yIndex ];\n\t\t\t\t\tvalues.push( yValue );\n\t\t\t\t\tprevValue[ 1 ] = yValue;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tvalues.push( prevValue[ 1 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( zIndex !== - 1 ) {\n\n\t\t\t\t\tvar zValue = curves.z.values[ zIndex ];\n\t\t\t\t\tvalues.push( zValue );\n\t\t\t\t\tprevValue[ 2 ] = zValue;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tvalues.push( prevValue[ 2 ] );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn values;\n\n\t\t},\n\n\t\t// Rotations are defined as Euler angles which can have values of any size\n\t\t// These will be converted to quaternions which don't support values greater than\n\t\t// PI, so we'll interpolate large rotations\n\t\tinterpolateRotations: function ( curve ) {\n\n\t\t\tfor ( var i = 1; i < curve.values.length; i ++ ) {\n\n\t\t\t\tvar initialValue = curve.values[ i - 1 ];\n\t\t\t\tvar valuesSpan = curve.values[ i ] - initialValue;\n\n\t\t\t\tvar absoluteSpan = Math.abs( valuesSpan );\n\n\t\t\t\tif ( absoluteSpan >= 180 ) {\n\n\t\t\t\t\tvar numSubIntervals = absoluteSpan / 180;\n\n\t\t\t\t\tvar step = valuesSpan / numSubIntervals;\n\t\t\t\t\tvar nextValue = initialValue + step;\n\n\t\t\t\t\tvar initialTime = curve.times[ i - 1 ];\n\t\t\t\t\tvar timeSpan = curve.times[ i ] - initialTime;\n\t\t\t\t\tvar interval = timeSpan / numSubIntervals;\n\t\t\t\t\tvar nextTime = initialTime + interval;\n\n\t\t\t\t\tvar interpolatedTimes = [];\n\t\t\t\t\tvar interpolatedValues = [];\n\n\t\t\t\t\twhile ( nextTime < curve.times[ i ] ) {\n\n\t\t\t\t\t\tinterpolatedTimes.push( nextTime );\n\t\t\t\t\t\tnextTime += interval;\n\n\t\t\t\t\t\tinterpolatedValues.push( nextValue );\n\t\t\t\t\t\tnextValue += step;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcurve.times = inject( curve.times, i, interpolatedTimes );\n\t\t\t\t\tcurve.values = inject( curve.values, i, interpolatedValues );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t};\n\n\t// parse an FBX file in ASCII format\n\tfunction TextParser() {}\n\n\tTextParser.prototype = {\n\n\t\tconstructor: TextParser,\n\n\t\tgetPrevNode: function () {\n\n\t\t\treturn this.nodeStack[ this.currentIndent - 2 ];\n\n\t\t},\n\n\t\tgetCurrentNode: function () {\n\n\t\t\treturn this.nodeStack[ this.currentIndent - 1 ];\n\n\t\t},\n\n\t\tgetCurrentProp: function () {\n\n\t\t\treturn this.currentProp;\n\n\t\t},\n\n\t\tpushStack: function ( node ) {\n\n\t\t\tthis.nodeStack.push( node );\n\t\t\tthis.currentIndent += 1;\n\n\t\t},\n\n\t\tpopStack: function () {\n\n\t\t\tthis.nodeStack.pop();\n\t\t\tthis.currentIndent -= 1;\n\n\t\t},\n\n\t\tsetCurrentProp: function ( val, name ) {\n\n\t\t\tthis.currentProp = val;\n\t\t\tthis.currentPropName = name;\n\n\t\t},\n\n\t\tparse: function ( text ) {\n\n\t\t\tthis.currentIndent = 0;\n\t\t\tconsole.log(\"FBXTree: \", FBXTree);\n\t\t\tthis.allNodes = new FBXTree();\n\t\t\tthis.nodeStack = [];\n\t\t\tthis.currentProp = [];\n\t\t\tthis.currentPropName = '';\n\n\t\t\tvar self = this;\n\n\t\t\tvar split = text.split( /[\\r\\n]+/ );\n\n\t\t\tsplit.forEach( function ( line, i ) {\n\n\t\t\t\tvar matchComment = line.match( /^[\\s\\t]*;/ );\n\t\t\t\tvar matchEmpty = line.match( /^[\\s\\t]*$/ );\n\n\t\t\t\tif ( matchComment || matchEmpty ) return;\n\n\t\t\t\tvar matchBeginning = line.match( '^\\\\t{' + self.currentIndent + '}(\\\\w+):(.*){', '' );\n\t\t\t\tvar matchProperty = line.match( '^\\\\t{' + ( self.currentIndent ) + '}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)' );\n\t\t\t\tvar matchEnd = line.match( '^\\\\t{' + ( self.currentIndent - 1 ) + '}}' );\n\n\t\t\t\tif ( matchBeginning ) {\n\n\t\t\t\t\tself.parseNodeBegin( line, matchBeginning );\n\n\t\t\t\t} else if ( matchProperty ) {\n\n\t\t\t\t\tself.parseNodeProperty( line, matchProperty, split[ ++ i ] );\n\n\t\t\t\t} else if ( matchEnd ) {\n\n\t\t\t\t\tself.popStack();\n\n\t\t\t\t} else if ( line.match( /^[^\\s\\t}]/ ) ) {\n\n\t\t\t\t\t// large arrays are split over multiple lines terminated with a ',' character\n\t\t\t\t\t// if this is encountered the line needs to be joined to the previous line\n\t\t\t\t\tself.parseNodePropertyContinued( line );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn this.allNodes;\n\n\t\t},\n\n\t\tparseNodeBegin: function ( line, property ) {\n\n\t\t\tvar nodeName = property[ 1 ].trim().replace( /^\"/, '' ).replace( /\"$/, '' );\n\n\t\t\tvar nodeAttrs = property[ 2 ].split( ',' ).map( function ( attr ) {\n\n\t\t\t\treturn attr.trim().replace( /^\"/, '' ).replace( /\"$/, '' );\n\n\t\t\t} );\n\n\t\t\tvar node = { name: nodeName };\n\t\t\tvar attrs = this.parseNodeAttr( nodeAttrs );\n\n\t\t\tvar currentNode = this.getCurrentNode();\n\n\t\t\t// a top node\n\t\t\tif ( this.currentIndent === 0 ) {\n\n\t\t\t\tthis.allNodes.add( nodeName, node );\n\n\t\t\t} else { // a subnode\n\n\t\t\t\t// if the subnode already exists, append it\n\t\t\t\tif ( nodeName in currentNode ) {\n\n\t\t\t\t// special case Pose needs PoseNodes as an array\n\t\t\t\t\tif ( nodeName === 'PoseNode' ) {\n\n\t\t\t\t\t\tcurrentNode.PoseNode.push( node );\n\n\t\t\t\t\t} else if ( currentNode[ nodeName ].id !== undefined ) {\n\n\t\t\t\t\t\tcurrentNode[ nodeName ] = {};\n\t\t\t\t\t\tcurrentNode[ nodeName ][ currentNode[ nodeName ].id ] = currentNode[ nodeName ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( attrs.id !== '' ) currentNode[ nodeName ][ attrs.id ] = node;\n\n\t\t\t\t} else if ( typeof attrs.id === 'number' ) {\n\n\t\t\t\t\tcurrentNode[ nodeName ] = {};\n\t\t\t\t\tcurrentNode[ nodeName ][ attrs.id ] = node;\n\n\t\t\t\t} else if ( nodeName !== 'Properties70' ) {\n\n\t\t\t\t\tif ( nodeName === 'PoseNode' )\tcurrentNode[ nodeName ] = [ node ];\n\t\t\t\t\telse currentNode[ nodeName ] = node;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( typeof attrs.id === 'number' ) node.id = attrs.id;\n\t\t\tif ( attrs.name !== '' ) node.attrName = attrs.name;\n\t\t\tif ( attrs.type !== '' ) node.attrType = attrs.type;\n\n\t\t\tthis.pushStack( node );\n\n\t\t},\n\n\t\tparseNodeAttr: function ( attrs ) {\n\n\t\t\tvar id = attrs[ 0 ];\n\n\t\t\tif ( attrs[ 0 ] !== '' ) {\n\n\t\t\t\tid = parseInt( attrs[ 0 ] );\n\n\t\t\t\tif ( isNaN( id ) ) {\n\n\t\t\t\t\tid = attrs[ 0 ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar name = '', type = '';\n\n\t\t\tif ( attrs.length > 1 ) {\n\n\t\t\t\tname = attrs[ 1 ].replace( /^(\\w+)::/, '' );\n\t\t\t\ttype = attrs[ 2 ];\n\n\t\t\t}\n\n\t\t\treturn { id: id, name: name, type: type };\n\n\t\t},\n\n\t\tparseNodeProperty: function ( line, property, contentLine ) {\n\n\t\t\tvar propName = property[ 1 ].replace( /^\"/, '' ).replace( /\"$/, '' ).trim();\n\t\t\tvar propValue = property[ 2 ].replace( /^\"/, '' ).replace( /\"$/, '' ).trim();\n\n\t\t\t// for special case: base64 image data follows \"Content: ,\" line\n\t\t\t//\tContent: ,\n\t\t\t//\t \"/9j/4RDaRXhpZgAATU0A...\"\n\t\t\tif ( propName === 'Content' && propValue === ',' ) {\n\n\t\t\t\tpropValue = contentLine.replace( /\"/g, '' ).replace( /,$/, '' ).trim();\n\n\t\t\t}\n\n\t\t\tvar currentNode = this.getCurrentNode();\n\t\t\tvar parentName = currentNode.name;\n\n\t\t\tif ( parentName === 'Properties70' ) {\n\n\t\t\t\tthis.parseNodeSpecialProperty( line, propName, propValue );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t// Connections\n\t\t\tif ( propName === 'C' ) {\n\n\t\t\t\tvar connProps = propValue.split( ',' ).slice( 1 );\n\t\t\t\tvar from = parseInt( connProps[ 0 ] );\n\t\t\t\tvar to = parseInt( connProps[ 1 ] );\n\n\t\t\t\tvar rest = propValue.split( ',' ).slice( 3 );\n\n\t\t\t\trest = rest.map( function ( elem ) {\n\n\t\t\t\t\treturn elem.trim().replace( /^\"/, '' );\n\n\t\t\t\t} );\n\n\t\t\t\tpropName = 'connections';\n\t\t\t\tpropValue = [ from, to ];\n\t\t\t\tappend( propValue, rest );\n\n\t\t\t\tif ( currentNode[ propName ] === undefined ) {\n\n\t\t\t\t\tcurrentNode[ propName ] = [];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Node\n\t\t\tif ( propName === 'Node' ) currentNode.id = propValue;\n\n\t\t\t// connections\n\t\t\tif ( propName in currentNode && Array.isArray( currentNode[ propName ] ) ) {\n\n\t\t\t\tcurrentNode[ propName ].push( propValue );\n\n\t\t\t} else {\n\n\t\t\t\tif ( propName !== 'a' ) currentNode[ propName ] = propValue;\n\t\t\t\telse currentNode.a = propValue;\n\n\t\t\t}\n\n\t\t\tthis.setCurrentProp( currentNode, propName );\n\n\t\t\t// convert string to array, unless it ends in ',' in which case more will be added to it\n\t\t\tif ( propName === 'a' && propValue.slice( - 1 ) !== ',' ) {\n\n\t\t\t\tcurrentNode.a = parseNumberArray( propValue );\n\n\t\t\t}\n\n\t\t},\n\n\t\tparseNodePropertyContinued: function ( line ) {\n\n\t\t\tvar currentNode = this.getCurrentNode();\n\n\t\t\tcurrentNode.a += line;\n\n\t\t\t// if the line doesn't end in ',' we have reached the end of the property value\n\t\t\t// so convert the string to an array\n\t\t\tif ( line.slice( - 1 ) !== ',' ) {\n\n\t\t\t\tcurrentNode.a = parseNumberArray( currentNode.a );\n\n\t\t\t}\n\n\t\t},\n\n\t\t// parse \"Property70\"\n\t\tparseNodeSpecialProperty: function ( line, propName, propValue ) {\n\n\t\t\t// split this\n\t\t\t// P: \"Lcl Scaling\", \"Lcl Scaling\", \"\", \"A\",1,1,1\n\t\t\t// into array like below\n\t\t\t// [\"Lcl Scaling\", \"Lcl Scaling\", \"\", \"A\", \"1,1,1\" ]\n\t\t\tvar props = propValue.split( '\",' ).map( function ( prop ) {\n\n\t\t\t\treturn prop.trim().replace( /^\\\"/, '' ).replace( /\\s/, '_' );\n\n\t\t\t} );\n\n\t\t\tvar innerPropName = props[ 0 ];\n\t\t\tvar innerPropType1 = props[ 1 ];\n\t\t\tvar innerPropType2 = props[ 2 ];\n\t\t\tvar innerPropFlag = props[ 3 ];\n\t\t\tvar innerPropValue = props[ 4 ];\n\n\t\t\t// cast values where needed, otherwise leave as strings\n\t\t\tswitch ( innerPropType1 ) {\n\n\t\t\t\tcase 'int':\n\t\t\t\tcase 'enum':\n\t\t\t\tcase 'bool':\n\t\t\t\tcase 'ULongLong':\n\t\t\t\tcase 'double':\n\t\t\t\tcase 'Number':\n\t\t\t\tcase 'FieldOfView':\n\t\t\t\t\tinnerPropValue = parseFloat( innerPropValue );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Color':\n\t\t\t\tcase 'ColorRGB':\n\t\t\t\tcase 'Vector3D':\n\t\t\t\tcase 'Lcl_Translation':\n\t\t\t\tcase 'Lcl_Rotation':\n\t\t\t\tcase 'Lcl_Scaling':\n\t\t\t\t\tinnerPropValue = parseNumberArray( innerPropValue );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t// CAUTION: these props must append to parent's parent\n\t\t\tthis.getPrevNode()[ innerPropName ] = {\n\n\t\t\t\t'type': innerPropType1,\n\t\t\t\t'type2': innerPropType2,\n\t\t\t\t'flag': innerPropFlag,\n\t\t\t\t'value': innerPropValue\n\n\t\t\t};\n\n\t\t\tthis.setCurrentProp( this.getPrevNode(), innerPropName );\n\n\t\t},\n\n\t};\n\n\t// Parse an FBX file in Binary format\n\tfunction BinaryParser() {}\n\n\tBinaryParser.prototype = {\n\n\t\tconstructor: BinaryParser,\n\n\t\tparse: function ( buffer ) {\n\n\t\t\tvar reader = new BinaryReader( buffer );\n\t\t\treader.skip( 23 ); // skip magic 23 bytes\n\n\t\t\tvar version = reader.getUint32();\n\n\t\t\tconsole.log( 'THREE.FBXLoader: FBX binary version: ' + version );\n\n\t\t\tvar allNodes = new FBXTree();\n\n\t\t\twhile ( ! this.endOfContent( reader ) ) {\n\n\t\t\t\tvar node = this.parseNode( reader, version );\n\t\t\t\tif ( node !== null ) allNodes.add( node.name, node );\n\n\t\t\t}\n\n\t\t\treturn allNodes;\n\n\t\t},\n\n\t\t// Check if reader has reached the end of content.\n\t\tendOfContent: function ( reader ) {\n\n\t\t\t// footer size: 160bytes + 16-byte alignment padding\n\t\t\t// - 16bytes: magic\n\t\t\t// - padding til 16-byte alignment (at least 1byte?)\n\t\t\t//\t(seems like some exporters embed fixed 15 or 16bytes?)\n\t\t\t// - 4bytes: magic\n\t\t\t// - 4bytes: version\n\t\t\t// - 120bytes: zero\n\t\t\t// - 16bytes: magic\n\t\t\tif ( reader.size() % 16 === 0 ) {\n\n\t\t\t\treturn ( ( reader.getOffset() + 160 + 16 ) & ~ 0xf ) >= reader.size();\n\n\t\t\t} else {\n\n\t\t\t\treturn reader.getOffset() + 160 + 16 >= reader.size();\n\n\t\t\t}\n\n\t\t},\n\n\t\t// recursively parse nodes until the end of the file is reached\n\t\tparseNode: function ( reader, version ) {\n\n\t\t\tvar node = {};\n\n\t\t\t// The first three data sizes depends on version.\n\t\t\tvar endOffset = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();\n\t\t\tvar numProperties = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();\n\n\t\t\t// note: do not remove this even if you get a linter warning as it moves the buffer forward\n\t\t\tvar propertyListLen = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();\n\n\t\t\tvar nameLen = reader.getUint8();\n\t\t\tvar name = reader.getString( nameLen );\n\n\t\t\t// Regards this node as NULL-record if endOffset is zero\n\t\t\tif ( endOffset === 0 ) return null;\n\n\t\t\tvar propertyList = [];\n\n\t\t\tfor ( var i = 0; i < numProperties; i ++ ) {\n\n\t\t\t\tpropertyList.push( this.parseProperty( reader ) );\n\n\t\t\t}\n\n\t\t\t// Regards the first three elements in propertyList as id, attrName, and attrType\n\t\t\tvar id = propertyList.length > 0 ? propertyList[ 0 ] : '';\n\t\t\tvar attrName = propertyList.length > 1 ? propertyList[ 1 ] : '';\n\t\t\tvar attrType = propertyList.length > 2 ? propertyList[ 2 ] : '';\n\n\t\t\t// check if this node represents just a single property\n\t\t\t// like (name, 0) set or (name2, [0, 1, 2]) set of {name: 0, name2: [0, 1, 2]}\n\t\t\tnode.singleProperty = ( numProperties === 1 && reader.getOffset() === endOffset ) ? true : false;\n\n\t\t\twhile ( endOffset > reader.getOffset() ) {\n\n\t\t\t\tvar subNode = this.parseNode( reader, version );\n\n\t\t\t\tif ( subNode !== null ) this.parseSubNode( name, node, subNode );\n\n\t\t\t}\n\n\t\t\tnode.propertyList = propertyList; // raw property list used by parent\n\n\t\t\tif ( typeof id === 'number' ) node.id = id;\n\t\t\tif ( attrName !== '' ) node.attrName = attrName;\n\t\t\tif ( attrType !== '' ) node.attrType = attrType;\n\t\t\tif ( name !== '' ) node.name = name;\n\n\t\t\treturn node;\n\n\t\t},\n\n\t\tparseSubNode: function ( name, node, subNode ) {\n\n\t\t\t// special case: child node is single property\n\t\t\tif ( subNode.singleProperty === true ) {\n\n\t\t\t\tvar value = subNode.propertyList[ 0 ];\n\n\t\t\t\tif ( Array.isArray( value ) ) {\n\n\t\t\t\t\tnode[ subNode.name ] = subNode;\n\n\t\t\t\t\tsubNode.a = value;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tnode[ subNode.name ] = value;\n\n\t\t\t\t}\n\n\t\t\t} else if ( name === 'Connections' && subNode.name === 'C' ) {\n\n\t\t\t\tvar array = [];\n\n\t\t\t\tsubNode.propertyList.forEach( function ( property, i ) {\n\n\t\t\t\t\t// first Connection is FBX type (OO, OP, etc.). We'll discard these\n\t\t\t\t\tif ( i !== 0 ) array.push( property );\n\n\t\t\t\t} );\n\n\t\t\t\tif ( node.connections === undefined ) {\n\n\t\t\t\t\tnode.connections = [];\n\n\t\t\t\t}\n\n\t\t\t\tnode.connections.push( array );\n\n\t\t\t} else if ( subNode.name === 'Properties70' ) {\n\n\t\t\t\tvar keys = Object.keys( subNode );\n\n\t\t\t\tkeys.forEach( function ( key ) {\n\n\t\t\t\t\tnode[ key ] = subNode[ key ];\n\n\t\t\t\t} );\n\n\t\t\t} else if ( name === 'Properties70' && subNode.name === 'P' ) {\n\n\t\t\t\tvar innerPropName = subNode.propertyList[ 0 ];\n\t\t\t\tvar innerPropType1 = subNode.propertyList[ 1 ];\n\t\t\t\tvar innerPropType2 = subNode.propertyList[ 2 ];\n\t\t\t\tvar innerPropFlag = subNode.propertyList[ 3 ];\n\t\t\t\tvar innerPropValue;\n\n\t\t\t\tif ( innerPropName.indexOf( 'Lcl ' ) === 0 ) innerPropName = innerPropName.replace( 'Lcl ', 'Lcl_' );\n\t\t\t\tif ( innerPropType1.indexOf( 'Lcl ' ) === 0 ) innerPropType1 = innerPropType1.replace( 'Lcl ', 'Lcl_' );\n\n\t\t\t\tif ( innerPropType1 === 'Color' || innerPropType1 === 'ColorRGB' || innerPropType1 === 'Vector' || innerPropType1 === 'Vector3D' || innerPropType1.indexOf( 'Lcl_' ) === 0 ) {\n\n\t\t\t\t\tinnerPropValue = [\n\t\t\t\t\t\tsubNode.propertyList[ 4 ],\n\t\t\t\t\t\tsubNode.propertyList[ 5 ],\n\t\t\t\t\t\tsubNode.propertyList[ 6 ]\n\t\t\t\t\t];\n\n\t\t\t\t} else {\n\n\t\t\t\t\tinnerPropValue = subNode.propertyList[ 4 ];\n\n\t\t\t\t}\n\n\t\t\t\t// this will be copied to parent, see above\n\t\t\t\tnode[ innerPropName ] = {\n\n\t\t\t\t\t'type': innerPropType1,\n\t\t\t\t\t'type2': innerPropType2,\n\t\t\t\t\t'flag': innerPropFlag,\n\t\t\t\t\t'value': innerPropValue\n\n\t\t\t\t};\n\n\t\t\t} else if ( node[ subNode.name ] === undefined ) {\n\n\t\t\t\tif ( typeof subNode.id === 'number' ) {\n\n\t\t\t\t\tnode[ subNode.name ] = {};\n\t\t\t\t\tnode[ subNode.name ][ subNode.id ] = subNode;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tnode[ subNode.name ] = subNode;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( subNode.name === 'PoseNode' ) {\n\n\t\t\t\t\tif ( ! Array.isArray( node[ subNode.name ] ) ) {\n\n\t\t\t\t\t\tnode[ subNode.name ] = [ node[ subNode.name ] ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\tnode[ subNode.name ].push( subNode );\n\n\t\t\t\t} else if ( node[ subNode.name ][ subNode.id ] === undefined ) {\n\n\t\t\t\t\tnode[ subNode.name ][ subNode.id ] = subNode;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t\tparseProperty: function ( reader ) {\n\n\t\t\tvar type = reader.getString( 1 );\n\n\t\t\tswitch ( type ) {\n\n\t\t\t\tcase 'C':\n\t\t\t\t\treturn reader.getBoolean();\n\n\t\t\t\tcase 'D':\n\t\t\t\t\treturn reader.getFloat64();\n\n\t\t\t\tcase 'F':\n\t\t\t\t\treturn reader.getFloat32();\n\n\t\t\t\tcase 'I':\n\t\t\t\t\treturn reader.getInt32();\n\n\t\t\t\tcase 'L':\n\t\t\t\t\treturn reader.getInt64();\n\n\t\t\t\tcase 'R':\n\t\t\t\t\tvar length = reader.getUint32();\n\t\t\t\t\treturn reader.getArrayBuffer( length );\n\n\t\t\t\tcase 'S':\n\t\t\t\t\tvar length = reader.getUint32();\n\t\t\t\t\treturn reader.getString( length );\n\n\t\t\t\tcase 'Y':\n\t\t\t\t\treturn reader.getInt16();\n\n\t\t\t\tcase 'b':\n\t\t\t\tcase 'c':\n\t\t\t\tcase 'd':\n\t\t\t\tcase 'f':\n\t\t\t\tcase 'i':\n\t\t\t\tcase 'l':\n\n\t\t\t\t\tvar arrayLength = reader.getUint32();\n\t\t\t\t\tvar encoding = reader.getUint32(); // 0: non-compressed, 1: compressed\n\t\t\t\t\tvar compressedLength = reader.getUint32();\n\n\t\t\t\t\tif ( encoding === 0 ) {\n\n\t\t\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\t\t\treturn reader.getBooleanArray( arrayLength );\n\n\t\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\t\treturn reader.getFloat64Array( arrayLength );\n\n\t\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\t\treturn reader.getFloat32Array( arrayLength );\n\n\t\t\t\t\t\t\tcase 'i':\n\t\t\t\t\t\t\t\treturn reader.getInt32Array( arrayLength );\n\n\t\t\t\t\t\t\tcase 'l':\n\t\t\t\t\t\t\t\treturn reader.getInt64Array( arrayLength );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof Zlib === 'undefined' ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js' );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar inflate = new Zlib.Inflate( new Uint8Array( reader.getArrayBuffer( compressedLength ) ) ); // eslint-disable-line no-undef\n\t\t\t\t\tvar reader2 = new BinaryReader( inflate.decompress().buffer );\n\n\t\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\t\treturn reader2.getBooleanArray( arrayLength );\n\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\treturn reader2.getFloat64Array( arrayLength );\n\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\treturn reader2.getFloat32Array( arrayLength );\n\n\t\t\t\t\t\tcase 'i':\n\t\t\t\t\t\t\treturn reader2.getInt32Array( arrayLength );\n\n\t\t\t\t\t\tcase 'l':\n\t\t\t\t\t\t\treturn reader2.getInt64Array( arrayLength );\n\n\t\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'THREE.FBXLoader: Unknown property type ' + type );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\tfunction BinaryReader( buffer, littleEndian ) {\n\n\t\tthis.dv = new DataView( buffer );\n\t\tthis.offset = 0;\n\t\tthis.littleEndian = ( littleEndian !== undefined ) ? littleEndian : true;\n\n\t}\n\n\tBinaryReader.prototype = {\n\n\t\tconstructor: BinaryReader,\n\n\t\tgetOffset: function () {\n\n\t\t\treturn this.offset;\n\n\t\t},\n\n\t\tsize: function () {\n\n\t\t\treturn this.dv.buffer.byteLength;\n\n\t\t},\n\n\t\tskip: function ( length ) {\n\n\t\t\tthis.offset += length;\n\n\t\t},\n\n\t\t// seems like true/false representation depends on exporter.\n\t\t// true: 1 or 'Y'(=0x59), false: 0 or 'T'(=0x54)\n\t\t// then sees LSB.\n\t\tgetBoolean: function () {\n\n\t\t\treturn ( this.getUint8() & 1 ) === 1;\n\n\t\t},\n\n\t\tgetBooleanArray: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getBoolean() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\tgetUint8: function () {\n\n\t\t\tvar value = this.dv.getUint8( this.offset );\n\t\t\tthis.offset += 1;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetInt16: function () {\n\n\t\t\tvar value = this.dv.getInt16( this.offset, this.littleEndian );\n\t\t\tthis.offset += 2;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetInt32: function () {\n\n\t\t\tvar value = this.dv.getInt32( this.offset, this.littleEndian );\n\t\t\tthis.offset += 4;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetInt32Array: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getInt32() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\tgetUint32: function () {\n\n\t\t\tvar value = this.dv.getUint32( this.offset, this.littleEndian );\n\t\t\tthis.offset += 4;\n\t\t\treturn value;\n\n\t\t},\n\n\t\t// JavaScript doesn't support 64-bit integer so calculate this here\n\t\t// 1 << 32 will return 1 so using multiply operation instead here.\n\t\t// There's a possibility that this method returns wrong value if the value\n\t\t// is out of the range between Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER.\n\t\t// TODO: safely handle 64-bit integer\n\t\tgetInt64: function () {\n\n\t\t\tvar low, high;\n\n\t\t\tif ( this.littleEndian ) {\n\n\t\t\t\tlow = this.getUint32();\n\t\t\t\thigh = this.getUint32();\n\n\t\t\t} else {\n\n\t\t\t\thigh = this.getUint32();\n\t\t\t\tlow = this.getUint32();\n\n\t\t\t}\n\n\t\t\t// calculate negative value\n\t\t\tif ( high & 0x80000000 ) {\n\n\t\t\t\thigh = ~ high & 0xFFFFFFFF;\n\t\t\t\tlow = ~ low & 0xFFFFFFFF;\n\n\t\t\t\tif ( low === 0xFFFFFFFF ) high = ( high + 1 ) & 0xFFFFFFFF;\n\n\t\t\t\tlow = ( low + 1 ) & 0xFFFFFFFF;\n\n\t\t\t\treturn - ( high * 0x100000000 + low );\n\n\t\t\t}\n\n\t\t\treturn high * 0x100000000 + low;\n\n\t\t},\n\n\t\tgetInt64Array: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getInt64() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\t// Note: see getInt64() comment\n\t\tgetUint64: function () {\n\n\t\t\tvar low, high;\n\n\t\t\tif ( this.littleEndian ) {\n\n\t\t\t\tlow = this.getUint32();\n\t\t\t\thigh = this.getUint32();\n\n\t\t\t} else {\n\n\t\t\t\thigh = this.getUint32();\n\t\t\t\tlow = this.getUint32();\n\n\t\t\t}\n\n\t\t\treturn high * 0x100000000 + low;\n\n\t\t},\n\n\t\tgetFloat32: function () {\n\n\t\t\tvar value = this.dv.getFloat32( this.offset, this.littleEndian );\n\t\t\tthis.offset += 4;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetFloat32Array: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getFloat32() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\tgetFloat64: function () {\n\n\t\t\tvar value = this.dv.getFloat64( this.offset, this.littleEndian );\n\t\t\tthis.offset += 8;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetFloat64Array: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getFloat64() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\tgetArrayBuffer: function ( size ) {\n\n\t\t\tvar value = this.dv.buffer.slice( this.offset, this.offset + size );\n\t\t\tthis.offset += size;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetString: function ( size ) {\n\n\t\t\t// note: safari 9 doesn't support Uint8Array.indexOf; create intermediate array instead\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta[ i ] = this.getUint8();\n\n\t\t\t}\n\n\t\t\tvar nullByte = a.indexOf( 0 );\n\t\t\tif ( nullByte >= 0 ) a = a.slice( 0, nullByte );\n\n\t\t\treturn THREE.LoaderUtils.decodeText( new Uint8Array( a ) );\n\n\t\t}\n\n\t};\n\n\t// FBXTree holds a representation of the FBX data, returned by the TextParser ( FBX ASCII format)\n\t// and BinaryParser( FBX Binary format)\n\tfunction FBXTree() {}\n\n\tFBXTree.prototype = {\n\n\t\tconstructor: FBXTree,\n\n\t\tadd: function ( key, val ) {\n\n\t\t\tthis[ key ] = val;\n\n\t\t},\n\n\t};\n\n\t// ************** UTILITY FUNCTIONS **************\n\n\tfunction isFbxFormatBinary( buffer ) {\n\n\t\tvar CORRECT = 'Kaydara FBX Binary \\0';\n\n\t\treturn buffer.byteLength >= CORRECT.length && CORRECT === convertArrayBufferToString( buffer, 0, CORRECT.length );\n\n\t}\n\n\tfunction isFbxFormatASCII( text ) {\n\n\t\tvar CORRECT = [ 'K', 'a', 'y', 'd', 'a', 'r', 'a', '\\\\', 'F', 'B', 'X', '\\\\', 'B', 'i', 'n', 'a', 'r', 'y', '\\\\', '\\\\' ];\n\n\t\tvar cursor = 0;\n\n\t\tfunction read( offset ) {\n\n\t\t\tvar result = text[ offset - 1 ];\n\t\t\ttext = text.slice( cursor + offset );\n\t\t\tcursor ++;\n\t\t\treturn result;\n\n\t\t}\n\n\t\tfor ( var i = 0; i < CORRECT.length; ++ i ) {\n\n\t\t\tvar num = read( 1 );\n\t\t\tif ( num === CORRECT[ i ] ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfunction getFbxVersion( text ) {\n\n\t\tvar versionRegExp = /FBXVersion: (\\d+)/;\n\t\tvar match = text.match( versionRegExp );\n\t\tif ( match ) {\n\n\t\t\tvar version = parseInt( match[ 1 ] );\n\t\t\treturn version;\n\n\t\t}\n\t\tthrow new Error( 'THREE.FBXLoader: Cannot find the version number for the file given.' );\n\n\t}\n\n\t// Converts FBX ticks into real time seconds.\n\tfunction convertFBXTimeToSeconds( time ) {\n\n\t\treturn time / 46186158000;\n\n\t}\n\n\tvar dataArray = [];\n\n\t// extracts the data from the correct position in the FBX array based on indexing type\n\tfunction getData( polygonVertexIndex, polygonIndex, vertexIndex, infoObject ) {\n\n\t\tvar index;\n\n\t\tswitch ( infoObject.mappingType ) {\n\n\t\t\tcase 'ByPolygonVertex' :\n\t\t\t\tindex = polygonVertexIndex;\n\t\t\t\tbreak;\n\t\t\tcase 'ByPolygon' :\n\t\t\t\tindex = polygonIndex;\n\t\t\t\tbreak;\n\t\t\tcase 'ByVertice' :\n\t\t\t\tindex = vertexIndex;\n\t\t\t\tbreak;\n\t\t\tcase 'AllSame' :\n\t\t\t\tindex = infoObject.indices[ 0 ];\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tconsole.warn( 'THREE.FBXLoader: unknown attribute mapping type ' + infoObject.mappingType );\n\n\t\t}\n\n\t\tif ( infoObject.referenceType === 'IndexToDirect' ) index = infoObject.indices[ index ];\n\n\t\tvar from = index * infoObject.dataSize;\n\t\tvar to = from + infoObject.dataSize;\n\n\t\treturn slice( dataArray, infoObject.buffer, from, to );\n\n\t}\n\n\tvar tempMat = new THREE.Matrix4();\n\tvar tempEuler = new THREE.Euler();\n\tvar tempVec = new THREE.Vector3();\n\tvar translation = new THREE.Vector3();\n\tvar rotation = new THREE.Matrix4();\n\n\t// generate transformation from FBX transform data\n\t// ref: https://help.autodesk.com/view/FBX/2017/ENU/?guid=__files_GUID_10CDD63C_79C1_4F2D_BB28_AD2BE65A02ED_htm\n\t// transformData = {\n\t//\t eulerOrder: int,\n\t//\t translation: [],\n\t// rotationOffset: [],\n\t//\t preRotation\n\t//\t rotation\n\t//\t postRotation\n\t// scale\n\t// }\n\t// all entries are optional\n\tfunction generateTransform( transformData ) {\n\n\t\tvar transform = new THREE.Matrix4();\n\t\ttranslation.set( 0, 0, 0 );\n\t\trotation.identity();\n\n\t\tvar order = ( transformData.eulerOrder ) ? getEulerOrder( transformData.eulerOrder ) : getEulerOrder( 0 );\n\n\t\tif ( transformData.translation ) translation.fromArray( transformData.translation );\n\t\tif ( transformData.rotationOffset ) translation.add( tempVec.fromArray( transformData.rotationOffset ) );\n\n\t\tif ( transformData.rotation ) {\n\n\t\t\tvar array = transformData.rotation.map( THREE.Math.degToRad );\n\t\t\tarray.push( order );\n\t\t\trotation.makeRotationFromEuler( tempEuler.fromArray( array ) );\n\n\t\t}\n\n\t\tif ( transformData.preRotation ) {\n\n\t\t\tvar array = transformData.preRotation.map( THREE.Math.degToRad );\n\t\t\tarray.push( order );\n\t\t\ttempMat.makeRotationFromEuler( tempEuler.fromArray( array ) );\n\n\t\t\trotation.premultiply( tempMat );\n\n\t\t}\n\n\t\tif ( transformData.postRotation ) {\n\n\t\t\tvar array = transformData.postRotation.map( THREE.Math.degToRad );\n\t\t\tarray.push( order );\n\t\t\ttempMat.makeRotationFromEuler( tempEuler.fromArray( array ) );\n\n\t\t\ttempMat.getInverse( tempMat );\n\n\t\t\trotation.multiply( tempMat );\n\n\t\t}\n\n\t\tif ( transformData.scale ) transform.scale( tempVec.fromArray( transformData.scale ) );\n\n\t\ttransform.setPosition( translation );\n\t\ttransform.multiply( rotation );\n\n\t\treturn transform;\n\n\t}\n\n\t// Returns the three.js intrinsic Euler order corresponding to FBX extrinsic Euler order\n\t// ref: http://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_class_fbx_euler_html\n\tfunction getEulerOrder( order ) {\n\n\t\tvar enums = [\n\t\t\t'ZYX', // -> XYZ extrinsic\n\t\t\t'YZX', // -> XZY extrinsic\n\t\t\t'XZY', // -> YZX extrinsic\n\t\t\t'ZXY', // -> YXZ extrinsic\n\t\t\t'YXZ', // -> ZXY extrinsic\n\t\t\t'XYZ', // -> ZYX extrinsic\n\t\t//'SphericXYZ', // not possible to support\n\t\t];\n\n\t\tif ( order === 6 ) {\n\n\t\t\tconsole.warn( 'THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.' );\n\t\t\treturn enums[ 0 ];\n\n\t\t}\n\n\t\treturn enums[ order ];\n\n\t}\n\n\t// Parses comma separated list of numbers and returns them an array.\n\t// Used internally by the TextParser\n\tfunction parseNumberArray( value ) {\n\n\t\tvar array = value.split( ',' ).map( function ( val ) {\n\n\t\t\treturn parseFloat( val );\n\n\t\t} );\n\n\t\treturn array;\n\n\t}\n\n\tfunction convertArrayBufferToString( buffer, from, to ) {\n\n\t\tif ( from === undefined ) from = 0;\n\t\tif ( to === undefined ) to = buffer.byteLength;\n\n\t\treturn THREE.LoaderUtils.decodeText( new Uint8Array( buffer, from, to ) );\n\n\t}\n\n\tfunction append( a, b ) {\n\n\t\tfor ( var i = 0, j = a.length, l = b.length; i < l; i ++, j ++ ) {\n\n\t\t\ta[ j ] = b[ i ];\n\n\t\t}\n\n\t}\n\n\tfunction slice( a, b, from, to ) {\n\n\t\tfor ( var i = from, j = 0; i < to; i ++, j ++ ) {\n\n\t\t\ta[ j ] = b[ i ];\n\n\t\t}\n\n\t\treturn a;\n\n\t}\n\n\t// inject array a2 into array a1 at index\n\tfunction inject( a1, index, a2 ) {\n\n\t\treturn a1.slice( 0, index ).concat( a2 ).concat( a1.slice( index ) );\n\n\t}\n\n\treturn FBXLoader;\n\n} )();\n","const fetchScript = require('../../lib/fetch-script')();\n\nconst LOADER_SRC = 'https://cdn.jsdelivr.net/gh/mrdoob/three.js@r86/examples/js/loaders/GLTFLoader.js';\n\nconst loadLoader = (function () {\n let promise;\n return function () {\n promise = promise || fetchScript(LOADER_SRC);\n return promise;\n };\n}());\n\n/**\n * Legacy loader for glTF 1.0 models.\n * Asynchronously loads THREE.GLTFLoader from jsdelivr.\n */\nmodule.exports = AFRAME.registerComponent('gltf-model-legacy', {\n schema: {type: 'model'},\n\n init: function () {\n this.model = null;\n this.loader = null;\n this.loaderPromise = loadLoader().then(() => {\n this.loader = new THREE.GLTFLoader();\n this.loader.setCrossOrigin('Anonymous');\n });\n },\n\n update: function () {\n const self = this;\n const el = this.el;\n const src = this.data;\n\n if (!src) { return; }\n\n this.remove();\n\n this.loaderPromise.then(() => {\n this.loader.load(src, function gltfLoaded (gltfModel) {\n self.model = gltfModel.scene;\n self.model.animations = gltfModel.animations;\n el.setObject3D('mesh', self.model);\n el.emit('model-loaded', {format: 'gltf', model: self.model});\n });\n });\n },\n\n remove: function () {\n if (!this.model) { return; }\n this.el.removeObject3D('mesh');\n }\n});\n","/**\n * Source: https://github.com/Adobe-Marketing-Cloud/fetch-script\n */\n\nfunction getScriptId() {\n return 'script_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);\n}\n\nfunction createScript(url, id) {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.id = id;\n script.src = url;\n\n return script;\n}\n\nfunction removeScript(id) {\n const script = document.getElementById(id);\n const parent = script.parentNode;\n\n try {\n parent && parent.removeChild(script);\n } catch (e) {\n // ignore\n }\n}\n\nfunction appendScript(script) {\n const firstScript = document.getElementsByTagName('script')[0];\n firstScript.parentNode.insertBefore(script, firstScript);\n}\n\nfunction fetchScriptInternal(url, options, Promise) {\n return new Promise(function(resolve, reject) {\n const timeout = options.timeout || 5000;\n const scriptId = getScriptId();\n const script = createScript(url, scriptId);\n\n const timeoutId = setTimeout(function() {\n reject(new Error('Script request to ' + url + ' timed out'));\n\n removeScript(scriptId);\n }, timeout);\n\n const disableTimeout = function(timeoutId) { clearTimeout(timeoutId); };\n\n script.addEventListener('load', function(e) {\n resolve({ok: true});\n\n disableTimeout(timeoutId);\n removeScript(scriptId);\n });\n\n script.addEventListener('error', function(e) {\n reject(new Error('Script request to ' + url + ' failed ' + e));\n\n disableTimeout(timeoutId);\n removeScript(scriptId);\n });\n\n appendScript(script);\n });\n}\n\nfunction fetchScript(settings) {\n settings = settings || {};\n return function (url, options) {\n options = options || {};\n return fetchScriptInternal(url, options, settings.Promise || Promise);\n };\n}\n\nmodule.exports = fetchScript;\n","/**\n * object-model\n *\n * Loader for THREE.js JSON format. Somewhat confusingly, there are two different THREE.js formats,\n * both having the .json extension. This loader supports only THREE.ObjectLoader, which typically\n * includes multiple meshes or an entire scene.\n *\n * Check the console for errors, if in doubt. You may need to use `json-model` or\n * `blend-character-model` for some .js and .json files.\n *\n * See: https://clara.io/learn/user-guide/data_exchange/threejs_export\n */\nmodule.exports = AFRAME.registerComponent('object-model', {\n schema: {\n src: { type: 'asset' },\n crossorigin: { default: '' }\n },\n\n init: function () {\n this.model = null;\n },\n\n update: function () {\n let loader;\n const data = this.data;\n if (!data.src) return;\n\n this.remove();\n loader = new THREE.ObjectLoader();\n if (data.crossorigin) loader.setCrossOrigin(data.crossorigin);\n loader.load(data.src, (object) => {\n\n // Enable skinning, if applicable.\n object.traverse((o) => {\n if (o instanceof THREE.SkinnedMesh && o.material) {\n o.material.skinning = !!((o.geometry && o.geometry.bones) || []).length;\n }\n });\n\n this.load(object);\n });\n },\n\n load: function (model) {\n this.model = model;\n this.el.setObject3D('mesh', model);\n this.el.emit('model-loaded', {format: 'json', model: model});\n },\n\n remove: function () {\n if (this.model) this.el.removeObject3D('mesh');\n }\n});\n","require('./checkpoint');\nrequire('./cube-env-map');\nrequire('./grab');\nrequire('./jump-ability');\nrequire('./kinematic-body');\nrequire('./mesh-smooth');\nrequire('./normal-material');\nrequire('./sphere-collider');\n","module.exports = AFRAME.registerComponent('checkpoint', {\n schema: {\n offset: {default: {x: 0, y: 0, z: 0}, type: 'vec3'}\n },\n\n init: function () {\n this.active = false;\n this.targetEl = null;\n this.fire = this.fire.bind(this);\n this.offset = new THREE.Vector3();\n },\n\n update: function () {\n this.offset.copy(this.data.offset);\n },\n\n play: function () { this.el.addEventListener('click', this.fire); },\n pause: function () { this.el.removeEventListener('click', this.fire); },\n remove: function () { this.pause(); },\n\n fire: function () {\n const targetEl = this.el.sceneEl.querySelector('[checkpoint-controls]');\n if (!targetEl) {\n throw new Error('No `checkpoint-controls` component found.');\n }\n targetEl.components['checkpoint-controls'].setCheckpoint(this.el);\n },\n\n getOffset: function () {\n return this.offset.copy(this.data.offset);\n }\n});\n","/**\n * @param {Array<THREE.Material>|THREE.Material} material\n * @return {Array<THREE.Material>}\n */\nfunction ensureMaterialArray (material) {\n if (!material) {\n return [];\n } else if (Array.isArray(material)) {\n return material;\n } else if (material.materials) {\n return material.materials;\n } else {\n return [material];\n }\n}\n\n/**\n * @param {THREE.Object3D} mesh\n * @param {Array<string>} materialNames\n * @param {THREE.Texture} envMap\n * @param {number} reflectivity [description]\n */\nfunction applyEnvMap (mesh, materialNames, envMap, reflectivity) {\n if (!mesh) return;\n\n materialNames = materialNames || [];\n\n mesh.traverse((node) => {\n\n if (!node.isMesh) return;\n\n const meshMaterials = ensureMaterialArray(node.material);\n\n meshMaterials.forEach((material) => {\n\n if (material && !('envMap' in material)) return;\n if (materialNames.length && materialNames.indexOf(material.name) === -1) return;\n\n material.envMap = envMap;\n material.reflectivity = reflectivity;\n material.needsUpdate = true;\n\n });\n\n });\n}\n\n/**\n * Specifies an envMap on an entity, without replacing any existing material\n * properties.\n */\nmodule.exports = AFRAME.registerComponent('cube-env-map', {\n multiple: true,\n\n schema: {\n path: {default: ''},\n extension: {default: 'jpg', oneOf: ['jpg', 'png']},\n format: {default: 'RGBFormat', oneOf: ['RGBFormat', 'RGBAFormat']},\n enableBackground: {default: false},\n reflectivity: {default: 1, min: 0, max: 1},\n materials: {default: []}\n },\n\n init: function () {\n const data = this.data;\n\n this.texture = new THREE.CubeTextureLoader().load([\n data.path + 'posx.' + data.extension, data.path + 'negx.' + data.extension,\n data.path + 'posy.' + data.extension, data.path + 'negy.' + data.extension,\n data.path + 'posz.' + data.extension, data.path + 'negz.' + data.extension\n ]);\n this.texture.format = THREE[data.format];\n\n this.object3dsetHandler = () => {\n const mesh = this.el.getObject3D('mesh');\n const data = this.data;\n applyEnvMap(mesh, data.materials, this.texture, data.reflectivity);\n };\n this.el.addEventListener('object3dset', this.object3dsetHandler);\n },\n\n update: function (oldData) {\n const data = this.data;\n const mesh = this.el.getObject3D('mesh');\n\n let addedMaterialNames = [];\n let removedMaterialNames = [];\n\n if (data.materials.length) {\n if (oldData.materials) {\n addedMaterialNames = data.materials.filter((name) => !oldData.materials.includes(name));\n removedMaterialNames = oldData.materials.filter((name) => !data.materials.includes(name));\n } else {\n addedMaterialNames = data.materials;\n }\n }\n if (addedMaterialNames.length) {\n applyEnvMap(mesh, addedMaterialNames, this.texture, data.reflectivity);\n }\n if (removedMaterialNames.length) {\n applyEnvMap(mesh, removedMaterialNames, null, 1);\n }\n\n if (oldData.materials && data.reflectivity !== oldData.reflectivity) {\n const maintainedMaterialNames = data.materials\n .filter((name) => oldData.materials.includes(name));\n if (maintainedMaterialNames.length) {\n applyEnvMap(mesh, maintainedMaterialNames, this.texture, data.reflectivity);\n }\n }\n\n if (this.data.enableBackground && !oldData.enableBackground) {\n this.setBackground(this.texture);\n } else if (!this.data.enableBackground && oldData.enableBackground) {\n this.setBackground(null);\n }\n },\n\n remove: function () {\n this.el.removeEventListener('object3dset', this.object3dsetHandler);\n const mesh = this.el.getObject3D('mesh');\n const data = this.data;\n\n applyEnvMap(mesh, data.materials, null, 1);\n if (data.enableBackground) this.setBackground(null);\n },\n\n setBackground: function (texture) {\n this.el.sceneEl.object3D.background = texture;\n }\n});\n","/* global CANNON */\n\n/**\n * Based on aframe/examples/showcase/tracked-controls.\n *\n * Handles events coming from the hand-controls.\n * Determines if the entity is grabbed or released.\n * Updates its position to move along the controller.\n */\nmodule.exports = AFRAME.registerComponent('grab', {\n init: function () {\n this.system = this.el.sceneEl.systems.physics;\n\n this.GRABBED_STATE = 'grabbed';\n\n this.grabbing = false;\n this.hitEl = /** @type {AFRAME.Element} */ null;\n this.physics = /** @type {AFRAME.System} */ this.el.sceneEl.systems.physics;\n this.constraint = /** @type {CANNON.Constraint} */ null;\n\n // Bind event handlers\n this.onHit = this.onHit.bind(this);\n this.onGripOpen = this.onGripOpen.bind(this);\n this.onGripClose = this.onGripClose.bind(this);\n },\n\n play: function () {\n const el = this.el;\n el.addEventListener('hit', this.onHit);\n el.addEventListener('gripdown', this.onGripClose);\n el.addEventListener('gripup', this.onGripOpen);\n el.addEventListener('trackpaddown', this.onGripClose);\n el.addEventListener('trackpadup', this.onGripOpen);\n el.addEventListener('triggerdown', this.onGripClose);\n el.addEventListener('triggerup', this.onGripOpen);\n },\n\n pause: function () {\n const el = this.el;\n el.removeEventListener('hit', this.onHit);\n el.removeEventListener('gripdown', this.onGripClose);\n el.removeEventListener('gripup', this.onGripOpen);\n el.removeEventListener('trackpaddown', this.onGripClose);\n el.removeEventListener('trackpadup', this.onGripOpen);\n el.removeEventListener('triggerdown', this.onGripClose);\n el.removeEventListener('triggerup', this.onGripOpen);\n },\n\n onGripClose: function () {\n this.grabbing = true;\n },\n\n onGripOpen: function () {\n const hitEl = this.hitEl;\n this.grabbing = false;\n if (!hitEl) { return; }\n hitEl.removeState(this.GRABBED_STATE);\n this.hitEl = undefined;\n this.system.removeConstraint(this.constraint);\n this.constraint = null;\n },\n\n onHit: function (evt) {\n const hitEl = evt.detail.el;\n // If the element is already grabbed (it could be grabbed by another controller).\n // If the hand is not grabbing the element does not stick.\n // If we're already grabbing something you can't grab again.\n if (!hitEl || hitEl.is(this.GRABBED_STATE) || !this.grabbing || this.hitEl) { return; }\n hitEl.addState(this.GRABBED_STATE);\n this.hitEl = hitEl;\n this.constraint = new CANNON.LockConstraint(this.el.body, hitEl.body);\n this.system.addConstraint(this.constraint);\n }\n});\n","const ACCEL_G = -9.8, // m/s^2\n EASING = -15; // m/s^2\n\n/**\n * Jump ability.\n */\nmodule.exports = AFRAME.registerComponent('jump-ability', {\n dependencies: ['velocity'],\n\n /* Schema\n ——————————————————————————————————————————————*/\n\n schema: {\n on: { default: 'keydown:Space gamepadbuttondown:0' },\n playerHeight: { default: 1.764 },\n maxJumps: { default: 1 },\n distance: { default: 5 },\n debug: { default: false }\n },\n\n init: function () {\n this.velocity = 0;\n this.numJumps = 0;\n\n const beginJump = this.beginJump.bind(this),\n events = this.data.on.split(' ');\n this.bindings = {};\n for (let i = 0; i < events.length; i++) {\n this.bindings[events[i]] = beginJump;\n this.el.addEventListener(events[i], beginJump);\n }\n this.bindings.collide = this.onCollide.bind(this);\n this.el.addEventListener('collide', this.bindings.collide);\n },\n\n remove: function () {\n for (var event in this.bindings) {\n if (this.bindings.hasOwnProperty(event)) {\n this.el.removeEventListener(event, this.bindings[event]);\n delete this.bindings[event];\n }\n }\n this.el.removeEventListener('collide', this.bindings.collide);\n delete this.bindings.collide;\n },\n\n beginJump: function () {\n if (this.numJumps < this.data.maxJumps) {\n const data = this.data,\n initialVelocity = Math.sqrt(-2 * data.distance * (ACCEL_G + EASING)),\n v = this.el.getAttribute('velocity');\n this.el.setAttribute('velocity', {x: v.x, y: initialVelocity, z: v.z});\n this.numJumps++;\n this.el.emit('jumpstart');\n }\n },\n\n onCollide: function () {\n if (this.numJumps > 0) this.el.emit('jumpend');\n this.numJumps = 0;\n }\n});\n","/* global CANNON */\n\n/**\n * Kinematic body.\n *\n * Managed dynamic body, which moves but is not affected (directly) by the\n * physics engine. This is not a true kinematic body, in the sense that we are\n * letting the physics engine _compute_ collisions against it and selectively\n * applying those collisions to the object. The physics engine does not decide\n * the position/velocity/rotation of the element.\n *\n * Used for the camera object, because full physics simulation would create\n * movement that feels unnatural to the player. Bipedal movement does not\n * translate nicely to rigid body physics.\n *\n * See: http://www.learn-cocos2d.com/2013/08/physics-engine-platformer-terrible-idea/\n * And: http://oxleygamedev.blogspot.com/2011/04/player-physics-part-2.html\n */\nconst EPS = 0.000001;\n\nmodule.exports = AFRAME.registerComponent('kinematic-body', {\n dependencies: ['velocity'],\n\n /*******************************************************************\n * Schema\n */\n\n schema: {\n mass: { default: 5 },\n radius: { default: 1.3 },\n linearDamping: { default: 0.05 },\n enableSlopes: { default: true },\n enableJumps: { default: false },\n },\n\n /*******************************************************************\n * Lifecycle\n */\n\n init: function () {\n this.system = this.el.sceneEl.systems.physics;\n this.system.addComponent(this);\n\n const el = this.el,\n data = this.data,\n position = (new CANNON.Vec3()).copy(el.object3D.getWorldPosition(new THREE.Vector3()));\n\n this.body = new CANNON.Body({\n material: this.system.getMaterial('staticMaterial'),\n position: position,\n mass: data.mass,\n linearDamping: data.linearDamping,\n fixedRotation: true\n });\n this.body.addShape(\n new CANNON.Sphere(data.radius),\n new CANNON.Vec3(0, data.radius, 0)\n );\n\n this.body.el = this.el;\n this.el.body = this.body;\n this.system.addBody(this.body);\n\n if (el.hasAttribute('wasd-controls')) {\n console.warn('[kinematic-body] Not compatible with wasd-controls, use movement-controls.');\n }\n },\n\n remove: function () {\n this.system.removeBody(this.body);\n this.system.removeComponent(this);\n delete this.el.body;\n },\n\n /*******************************************************************\n * Update\n */\n\n /**\n * Checks CANNON.World for collisions and attempts to apply them to the\n * element automatically, in a player-friendly way.\n *\n * There's extra logic for horizontal surfaces here. The basic requirements:\n * (1) Only apply gravity when not in contact with _any_ horizontal surface.\n * (2) When moving, project the velocity against exactly one ground surface.\n * If in contact with two ground surfaces (e.g. ground + ramp), choose\n * the one that collides with current velocity, if any.\n */\n beforeStep: function (t, dt) {\n if (!dt) return;\n\n const el = this.el;\n const data = this.data\n const body = this.body;\n\n if (!data.enableJumps) body.velocity.set(0, 0, 0);\n body.position.copy(el.getAttribute('position'));\n },\n\n step: (function () {\n const velocity = new THREE.Vector3(),\n normalizedVelocity = new THREE.Vector3(),\n currentSurfaceNormal = new THREE.Vector3(),\n groundNormal = new THREE.Vector3();\n\n return function (t, dt) {\n if (!dt) return;\n\n let body = this.body,\n data = this.data,\n didCollide = false,\n height, groundHeight = -Infinity,\n groundBody,\n contacts = this.system.getContacts();\n\n dt = Math.min(dt, this.system.data.maxInterval * 1000);\n\n groundNormal.set(0, 0, 0);\n velocity.copy(this.el.getAttribute('velocity'));\n body.velocity.copy(velocity);\n\n for (var i = 0, contact; contact = contacts[i]; i++) {\n // 1. Find any collisions involving this element. Get the contact\n // normal, and make sure it's oriented _out_ of the other object and\n // enabled (body.collisionReponse is true for both bodies)\n if (!contact.enabled) { continue; }\n if (body.id === contact.bi.id) {\n contact.ni.negate(currentSurfaceNormal);\n } else if (body.id === contact.bj.id) {\n currentSurfaceNormal.copy(contact.ni);\n } else {\n continue;\n }\n\n didCollide = body.velocity.dot(currentSurfaceNormal) < -EPS;\n if (didCollide && currentSurfaceNormal.y <= 0.5) {\n // 2. If current trajectory attempts to move _through_ another\n // object, project the velocity against the collision plane to\n // prevent passing through.\n velocity.projectOnPlane(currentSurfaceNormal);\n } else if (currentSurfaceNormal.y > 0.5) {\n // 3. If in contact with something roughly horizontal (+/- 45º) then\n // consider that the current ground. Only the highest qualifying\n // ground is retained.\n height = body.id === contact.bi.id\n ? Math.abs(contact.rj.y + contact.bj.position.y)\n : Math.abs(contact.ri.y + contact.bi.position.y);\n if (height > groundHeight) {\n groundHeight = height;\n groundNormal.copy(currentSurfaceNormal);\n groundBody = body.id === contact.bi.id ? contact.bj : contact.bi;\n }\n }\n }\n\n normalizedVelocity.copy(velocity).normalize();\n if (groundBody && (!data.enableJumps || normalizedVelocity.y < 0.5)) {\n if (!data.enableSlopes) {\n groundNormal.set(0, 1, 0);\n } else if (groundNormal.y < 1 - EPS) {\n groundNormal.copy(this.raycastToGround(groundBody, groundNormal));\n }\n\n // 4. Project trajectory onto the top-most ground object, unless\n // trajectory is > 45º.\n velocity.projectOnPlane(groundNormal);\n\n } else if (this.system.driver.world) {\n // 5. If not in contact with anything horizontal, apply world gravity.\n // TODO - Why is the 4x scalar necessary.\n // NOTE: Does not work if physics runs on a worker.\n velocity.add(this.system.driver.world.gravity.scale(dt * 4.0 / 1000));\n }\n\n body.velocity.copy(velocity);\n this.el.setAttribute('velocity', body.velocity);\n this.el.setAttribute('position', body.position);\n };\n }()),\n\n /**\n * When walking on complex surfaces (trimeshes, borders between two shapes),\n * the collision normals returned for the player sphere can be very\n * inconsistent. To address this, raycast straight down, find the collision\n * normal, and return whichever normal is more vertical.\n * @param {CANNON.Body} groundBody\n * @param {CANNON.Vec3} groundNormal\n * @return {CANNON.Vec3}\n */\n raycastToGround: function (groundBody, groundNormal) {\n let ray,\n hitNormal,\n vFrom = this.body.position,\n vTo = this.body.position.clone();\n\n ray = new CANNON.Ray(vFrom, vTo);\n ray._updateDirection(); // TODO - Report bug.\n ray.intersectBody(groundBody);\n\n if (!ray.hasHit) return groundNormal;\n\n // Compare ABS, in case we're projecting against the inside of the face.\n hitNormal = ray.result.hitNormalWorld;\n return Math.abs(hitNormal.y) > Math.abs(groundNormal.y) ? hitNormal : groundNormal;\n }\n});\n","/**\n * Apply this component to models that looks \"blocky\", to have Three.js compute\n * vertex normals on the fly for a \"smoother\" look.\n */\nmodule.exports = AFRAME.registerComponent('mesh-smooth', {\n init: function () {\n this.el.addEventListener('model-loaded', (e) => {\n e.detail.model.traverse((node) => {\n if (node.isMesh) node.geometry.computeVertexNormals();\n });\n });\n }\n});\n","/**\n * Recursively applies a MeshNormalMaterial to the entity, such that\n * face colors are determined by their orientation. Helpful for\n * debugging geometry\n */\nmodule.exports = AFRAME.registerComponent('normal-material', {\n init: function () {\n this.material = new THREE.MeshNormalMaterial({flatShading: true});\n this.applyMaterial = this.applyMaterial.bind(this);\n this.el.addEventListener('object3dset', this.applyMaterial);\n },\n\n remove: function () {\n this.el.removeEventListener('object3dset', this.applyMaterial);\n },\n\n applyMaterial: function () {\n this.el.object3D.traverse((node) => {\n if (node.isMesh) node.material = this.material;\n });\n }\n});\n","/**\n * Based on aframe/examples/showcase/tracked-controls.\n *\n * Implement bounding sphere collision detection for entities with a mesh.\n * Sets the specified state on the intersected entities.\n *\n * @property {string} objects - Selector of the entities to test for collision.\n * @property {string} state - State to set on collided entities.\n *\n */\nmodule.exports = AFRAME.registerComponent('sphere-collider', {\n schema: {\n objects: {default: ''},\n state: {default: 'collided'},\n radius: {default: 0.05},\n watch: {default: true}\n },\n\n init: function () {\n /** @type {MutationObserver} */\n this.observer = null;\n /** @type {Array<Element>} Elements to watch for collisions. */\n this.els = [];\n /** @type {Array<Element>} Elements currently in collision state. */\n this.collisions = [];\n\n this.handleHit = this.handleHit.bind(this);\n this.handleHitEnd = this.handleHitEnd.bind(this);\n },\n\n remove: function () {\n this.pause();\n },\n\n play: function () {\n const sceneEl = this.el.sceneEl;\n\n if (this.data.watch) {\n this.observer = new MutationObserver(this.update.bind(this, null));\n this.observer.observe(sceneEl, {childList: true, subtree: true});\n }\n },\n\n pause: function () {\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n },\n\n /**\n * Update list of entities to test for collision.\n */\n update: function () {\n const data = this.data;\n let objectEls;\n\n // Push entities into list of els to intersect.\n if (data.objects) {\n objectEls = this.el.sceneEl.querySelectorAll(data.objects);\n } else {\n // If objects not defined, intersect with everything.\n objectEls = this.el.sceneEl.children;\n }\n // Convert from NodeList to Array\n this.els = Array.prototype.slice.call(objectEls);\n },\n\n tick: (function () {\n const position = new THREE.Vector3(),\n meshPosition = new THREE.Vector3(),\n colliderScale = new THREE.Vector3(),\n size = new THREE.Vector3(),\n box = new THREE.Box3(),\n distanceMap = new Map();\n return function () {\n const el = this.el,\n data = this.data,\n mesh = el.getObject3D('mesh'),\n collisions = [];\n let colliderRadius;\n\n if (!mesh) { return; }\n\n distanceMap.clear();\n el.object3D.getWorldPosition(position);\n el.object3D.getWorldScale(colliderScale);\n colliderRadius = data.radius * scaleFactor(colliderScale);\n // Update collision list.\n this.els.forEach(intersect);\n\n // Emit events and add collision states, in order of distance.\n collisions\n .sort((a, b) => distanceMap.get(a) > distanceMap.get(b) ? 1 : -1)\n .forEach(this.handleHit);\n\n // Remove collision state from current element.\n if (collisions.length === 0) { el.emit('hit', {el: null}); }\n\n // Remove collision state from other elements.\n this.collisions\n .filter((el) => !distanceMap.has(el))\n .forEach(this.handleHitEnd);\n\n // Store new collisions\n this.collisions = collisions;\n\n // Bounding sphere collision detection\n function intersect (el) {\n let radius, mesh, distance, extent;\n\n if (!el.isEntity) { return; }\n\n mesh = el.getObject3D('mesh');\n\n if (!mesh) { return; }\n\n box.setFromObject(mesh).getSize(size);\n extent = Math.max(size.x, size.y, size.z) / 2;\n radius = Math.sqrt(2 * extent * extent);\n box.getCenter(meshPosition);\n\n if (!radius) { return; }\n\n distance = position.distanceTo(meshPosition);\n if (distance < radius + colliderRadius) {\n collisions.push(el);\n distanceMap.set(el, distance);\n }\n }\n // use max of scale factors to maintain bounding sphere collision\n function scaleFactor (scaleVec) {\n return Math.max.apply(null, scaleVec.toArray());\n }\n };\n })(),\n\n handleHit: function (targetEl) {\n targetEl.emit('hit');\n targetEl.addState(this.data.state);\n this.el.emit('hit', {el: targetEl});\n },\n handleHitEnd: function (targetEl) {\n targetEl.emit('hitend');\n targetEl.removeState(this.data.state);\n this.el.emit('hitend', {el: targetEl});\n }\n});\n","require('./nav-mesh');\nrequire('./nav-agent');\nrequire('./system');\n","/**\n * nav-mesh\n *\n * Waits for a mesh to be loaded on the current entity, then sets it as the\n * nav mesh in the pathfinding system.\n */\nmodule.exports = AFRAME.registerComponent('nav-mesh', {\n init: function () {\n this.system = this.el.sceneEl.systems.nav;\n this.hasLoadedNavMesh = false;\n this.el.addEventListener('object3dset', this.loadNavMesh.bind(this));\n },\n\n play: function () {\n if (!this.hasLoadedNavMesh) this.loadNavMesh();\n },\n\n loadNavMesh: function () {\n const object = this.el.getObject3D('mesh');\n const scene = this.el.sceneEl.object3D;\n\n if (!object) return;\n\n let navMesh;\n object.traverse((node) => {\n if (node.isMesh) navMesh = node;\n });\n\n if (!navMesh) return;\n\n const navMeshGeometry = navMesh.geometry.isBufferGeometry\n ? new THREE.Geometry().fromBufferGeometry(navMesh.geometry)\n : navMesh.geometry.clone();\n\n scene.updateMatrixWorld();\n navMeshGeometry.applyMatrix(navMesh.matrixWorld);\n this.system.setNavMeshGeometry(navMeshGeometry);\n\n this.hasLoadedNavMesh = true;\n }\n});\n","module.exports = AFRAME.registerComponent('nav-agent', {\n schema: {\n destination: {type: 'vec3'},\n active: {default: false},\n speed: {default: 2}\n },\n init: function () {\n this.system = this.el.sceneEl.systems.nav;\n this.system.addAgent(this);\n this.group = null;\n this.path = [];\n this.raycaster = new THREE.Raycaster();\n },\n remove: function () {\n this.system.removeAgent(this);\n },\n update: function () {\n this.path.length = 0;\n },\n updateNavLocation: function () {\n this.group = null;\n this.path = [];\n },\n tick: (function () {\n const vDest = new THREE.Vector3();\n const vDelta = new THREE.Vector3();\n const vNext = new THREE.Vector3();\n\n return function (t, dt) {\n const el = this.el;\n const data = this.data;\n const raycaster = this.raycaster;\n const speed = data.speed * dt / 1000;\n\n if (!data.active) return;\n\n // Use PatrolJS pathfinding system to get shortest path to target.\n if (!this.path.length) {\n const position = this.el.object3D.position;\n this.group = this.group || this.system.getGroup(position);\n this.path = this.system.getPath(position, vDest.copy(data.destination), this.group) || [];\n el.emit('navigation-start');\n }\n\n // If no path is found, exit.\n if (!this.path.length) {\n console.warn('[nav] Unable to find path to %o.', data.destination);\n this.el.setAttribute('nav-agent', {active: false});\n el.emit('navigation-end');\n return;\n }\n\n // Current segment is a vector from current position to next waypoint.\n const vCurrent = el.object3D.position;\n const vWaypoint = this.path[0];\n vDelta.subVectors(vWaypoint, vCurrent);\n\n const distance = vDelta.length();\n let gazeTarget;\n\n if (distance < speed) {\n // If <1 step from current waypoint, discard it and move toward next.\n this.path.shift();\n\n // After discarding the last waypoint, exit pathfinding.\n if (!this.path.length) {\n this.el.setAttribute('nav-agent', {active: false});\n el.emit('navigation-end');\n return;\n }\n\n vNext.copy(vCurrent);\n gazeTarget = this.path[0];\n } else {\n // If still far away from next waypoint, find next position for\n // the current frame.\n vNext.copy(vDelta.setLength(speed)).add(vCurrent);\n gazeTarget = vWaypoint;\n }\n\n // Look at the next waypoint.\n gazeTarget.y = vCurrent.y;\n el.object3D.lookAt(gazeTarget);\n\n // Raycast against the nav mesh, to keep the agent moving along the\n // ground, not traveling in a straight line from higher to lower waypoints.\n raycaster.ray.origin.copy(vNext);\n raycaster.ray.origin.y += 1.5;\n raycaster.ray.direction.y = -1;\n const intersections = raycaster.intersectObject(this.system.getNavMesh());\n\n if (!intersections.length) {\n // Raycasting failed. Step toward the waypoint and hope for the best.\n vCurrent.copy(vNext);\n } else {\n // Re-project next position onto nav mesh.\n vDelta.subVectors(intersections[0].point, vCurrent);\n vCurrent.add(vDelta.setLength(speed));\n }\n\n };\n }())\n});\n","const { Pathfinding } = require('three-pathfinding');\n\nconst pathfinder = new Pathfinding();\nconst ZONE = 'level';\n\n/**\n * nav\n *\n * Pathfinding system, using PatrolJS.\n */\nmodule.exports = AFRAME.registerSystem('nav', {\n init: function () {\n this.navMesh = null;\n this.agents = new Set();\n },\n\n /**\n * @param {THREE.Geometry} geometry\n */\n setNavMeshGeometry: function (geometry) {\n this.navMesh = new THREE.Mesh(geometry);\n pathfinder.setZoneData(ZONE, Pathfinding.createZone(geometry));\n Array.from(this.agents).forEach((agent) => agent.updateNavLocation());\n },\n\n /**\n * @return {THREE.Mesh}\n */\n getNavMesh: function () {\n return this.navMesh;\n },\n\n /**\n * @param {NavAgent} ctrl\n */\n addAgent: function (ctrl) {\n this.agents.add(ctrl);\n },\n\n /**\n * @param {NavAgent} ctrl\n */\n removeAgent: function (ctrl) {\n this.agents.delete(ctrl);\n },\n\n /**\n * @param {THREE.Vector3} start\n * @param {THREE.Vector3} end\n * @param {number} groupID\n * @return {Array<THREE.Vector3>}\n */\n getPath: function (start, end, groupID) {\n return this.navMesh\n ? pathfinder.findPath(start, end, ZONE, groupID)\n : null;\n },\n\n /**\n * @param {THREE.Vector3} position\n * @return {number}\n */\n getGroup: function (position) {\n return this.navMesh\n ? pathfinder.getGroup(ZONE, position)\n : null;\n },\n\n /**\n * @param {THREE.Vector3} position\n * @param {number} groupID\n * @return {Node}\n */\n getNode: function (position, groupID) {\n return this.navMesh\n ? pathfinder.getClosestNode(position, ZONE, groupID, true)\n : null;\n },\n\n /**\n * @param {THREE.Vector3} start Starting position.\n * @param {THREE.Vector3} end Desired ending position.\n * @param {number} groupID\n * @param {Node} node\n * @param {THREE.Vector3} endTarget (Output) Adjusted step end position.\n * @return {Node} Current node, after step is taken.\n */\n clampStep: function (start, end, groupID, node, endTarget) {\n if (!this.navMesh) {\n endTarget.copy(end);\n return null;\n } else if (!node) {\n endTarget.copy(end);\n return this.getNode(end, groupID);\n }\n return pathfinder.clampStep(start, end, node, ZONE, groupID, endTarget);\n }\n});\n","var e=function(){};e.computeCentroids=function(e){var t,n,r;for(t=0,n=e.faces.length;t<n;t++)(r=e.faces[t]).centroid=new THREE.Vector3(0,0,0),r.centroid.add(e.vertices[r.a]),r.centroid.add(e.vertices[r.b]),r.centroid.add(e.vertices[r.c]),r.centroid.divideScalar(3)},e.roundNumber=function(e,t){return Number(e.toFixed(t))},e.sample=function(e){return e[Math.floor(Math.random()*e.length)]},e.mergeVertexIds=function(e,t){var n=[];if(e.forEach(function(e){t.indexOf(e)>=0&&n.push(e)}),n.length<2)return[];n.includes(e[0])&&n.includes(e[e.length-1])&&e.push(e.shift()),n.includes(t[0])&&n.includes(t[t.length-1])&&t.push(t.shift()),n=[],e.forEach(function(e){t.includes(e)&&n.push(e)});for(var r=n[1],o=n[0],i=e.slice();i[0]!==r;)i.push(i.shift());for(var s=0,u=t.slice();u[0]!==o;)if(u.push(u.shift()),s++>10)throw new Error(\"Unexpected state\");return u.shift(),u.pop(),i=i.concat(u)},e.setPolygonCentroid=function(e,t){var n=new THREE.Vector3,r=t.vertices;e.vertexIds.forEach(function(e){n.add(r[e])}),n.divideScalar(e.vertexIds.length),e.centroid.copy(n)},e.cleanPolygon=function(e,t){for(var n=[],r=t.vertices,o=0;o<e.vertexIds.length;o++){var i,s,u,c=r[e.vertexIds[o]];0===o?(i=e.vertexIds[1],s=e.vertexIds[e.vertexIds.length-1]):o===e.vertexIds.length-1?(i=e.vertexIds[0],s=e.vertexIds[e.vertexIds.length-2]):(i=e.vertexIds[o+1],s=e.vertexIds[o-1]),u=r[s];var h=r[i].clone().sub(c),a=u.clone().sub(c),d=h.angleTo(a);if(d>Math.PI-.01&&d<Math.PI+.01){var f=[];e.neighbours.forEach(function(t){t.vertexIds.includes(e.vertexIds[o])||f.push(t)}),e.neighbours=f}else n.push(e.vertexIds[o])}e.vertexIds=n,this.setPolygonCentroid(e,t)},e.isConvex=function(e,t){var n=t.vertices;if(e.vertexIds.length<3)return!1;for(var r=!0,o=[],i=0;i<e.vertexIds.length;i++){var s,u,c=n[e.vertexIds[i]];0===i?(s=n[e.vertexIds[1]],u=n[e.vertexIds[e.vertexIds.length-1]]):i===e.vertexIds.length-1?(s=n[e.vertexIds[0]],u=n[e.vertexIds[e.vertexIds.length-2]]):(s=n[e.vertexIds[i+1]],u=n[e.vertexIds[i-1]]);var h=s.clone().sub(c),a=u.clone().sub(c),d=h.angleTo(a);if(d===Math.PI||0===d)return!1;var f=h.cross(a).y;o.push(f)}return o.forEach(function(e){0===e&&(r=!1)}),o.forEach(o[0]>0?function(e){e<0&&(r=!1)}:function(e){e>0&&(r=!1)}),r},e.distanceToSquared=function(e,t){var n=e.x-t.x,r=e.y-t.y,o=e.z-t.z;return n*n+r*r+o*o},e.isPointInPoly=function(e,t){for(var n=!1,r=-1,o=e.length,i=o-1;++r<o;i=r)(e[r].z<=t.z&&t.z<e[i].z||e[i].z<=t.z&&t.z<e[r].z)&&t.x<(e[i].x-e[r].x)*(t.z-e[r].z)/(e[i].z-e[r].z)+e[r].x&&(n=!n);return n},e.isVectorInPolygon=function(e,t,n){var r=1e5,o=-1e5,i=[];return t.vertexIds.forEach(function(e){r=Math.min(n[e].y,r),o=Math.max(n[e].y,o),i.push(n[e])}),!!(e.y<o+.5&&e.y>r-.5&&this.isPointInPoly(i,e))},e.triarea2=function(e,t,n){return(n.x-e.x)*(t.z-e.z)-(t.x-e.x)*(n.z-e.z)},e.vequal=function(e,t){return this.distanceToSquared(e,t)<1e-5};var t=function(e){this.content=[],this.scoreFunction=e};t.prototype.push=function(e){this.content.push(e),this.sinkDown(this.content.length-1)},t.prototype.pop=function(){var e=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.bubbleUp(0)),e},t.prototype.remove=function(e){var t=this.content.indexOf(e),n=this.content.pop();t!==this.content.length-1&&(this.content[t]=n,this.scoreFunction(n)<this.scoreFunction(e)?this.sinkDown(t):this.bubbleUp(t))},t.prototype.size=function(){return this.content.length},t.prototype.rescoreElement=function(e){this.sinkDown(this.content.indexOf(e))},t.prototype.sinkDown=function(e){for(var t=this.content[e];e>0;){var n=(e+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(t)<this.scoreFunction(r)))break;this.content[n]=t,this.content[e]=r,e=n}},t.prototype.bubbleUp=function(e){for(var t=this.content.length,n=this.content[e],r=this.scoreFunction(n);;){var o=e+1<<1,i=o-1,s=null,u=void 0;if(i<t)(u=this.scoreFunction(this.content[i]))<r&&(s=i);if(o<t)this.scoreFunction(this.content[o])<(null===s?r:u)&&(s=o);if(null===s)break;this.content[e]=this.content[s],this.content[s]=n,e=s}};var n=function(){};n.init=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.f=0,n.g=0,n.h=0,n.cost=1,n.visited=!1,n.closed=!1,n.parent=null}},n.cleanUp=function(e){for(var t=0;t<e.length;t++){var n=e[t];delete n.f,delete n.g,delete n.h,delete n.cost,delete n.visited,delete n.closed,delete n.parent}},n.heap=function(){return new t(function(e){return e.f})},n.search=function(e,t,n){this.init(e);var r=this.heap();for(r.push(t);r.size()>0;){var o=r.pop();if(o===n){for(var i=o,s=[];i.parent;)s.push(i),i=i.parent;return this.cleanUp(s),s.reverse()}o.closed=!0;for(var u=this.neighbours(e,o),c=0,h=u.length;c<h;c++){var a=u[c];if(!a.closed){var d=o.g+a.cost,f=a.visited;if(!f||d<a.g){if(a.visited=!0,a.parent=o,!a.centroid||!n.centroid)throw new Error(\"Unexpected state\");a.h=a.h||this.heuristic(a.centroid,n.centroid),a.g=d,a.f=a.g+a.h,f?r.rescoreElement(a):r.push(a)}}}}return[]},n.heuristic=function(t,n){return e.distanceToSquared(t,n)},n.neighbours=function(e,t){for(var n=[],r=0;r<t.neighbours.length;r++)n.push(e[t.neighbours[r]]);return n};var r=1,o=function(){};o.buildZone=function(t){var n=this,r=this._buildNavigationMesh(t),o={};r.vertices.forEach(function(t){t.x=e.roundNumber(t.x,2),t.y=e.roundNumber(t.y,2),t.z=e.roundNumber(t.z,2)}),o.vertices=r.vertices;var i=this._buildPolygonGroups(r);o.groups=[];var s=function(e,t){for(var n=0;n<e.length;n++)if(t===e[n])return n};return i.forEach(function(t){var r=[];t.forEach(function(o){var i=o.neighbours.map(function(e){return s(t,e)}),u=o.neighbours.map(function(e){return n._getSharedVerticesInOrder(o,e)});o.centroid.x=e.roundNumber(o.centroid.x,2),o.centroid.y=e.roundNumber(o.centroid.y,2),o.centroid.z=e.roundNumber(o.centroid.z,2),r.push({id:s(t,o),neighbours:i,vertexIds:o.vertexIds,centroid:o.centroid,portals:u})}),o.groups.push(r)}),o},o._buildNavigationMesh=function(t){return e.computeCentroids(t),t.mergeVertices(),this._buildPolygonsFromGeometry(t)},o._buildPolygonGroups=function(e){var t=[],n=0,r=function(e){e.neighbours.forEach(function(t){void 0===t.group&&(t.group=e.group,r(t))})};return e.polygons.forEach(function(e){void 0===e.group&&(e.group=n++,r(e)),t[e.group]||(t[e.group]=[]),t[e.group].push(e)}),t},o._buildPolygonNeighbours=function(e,t,n){var r=new Set,o=n.get(e.vertexIds[0]),i=n.get(e.vertexIds[1]),s=n.get(e.vertexIds[2]);o.forEach(function(e){(i.has(e)||s.has(e))&&r.add(t.polygons[e])}),i.forEach(function(e){s.has(e)&&r.add(t.polygons[e])}),e.neighbours=Array.from(r)},o._buildPolygonsFromGeometry=function(e){for(var t=this,n=[],o=e.vertices,i=e.faceVertexUvs,s=new Map,u=0;u<o.length;u++)s.set(u,new Set);e.faces.forEach(function(e){n.push({id:r++,vertexIds:[e.a,e.b,e.c],centroid:e.centroid,normal:e.normal,neighbours:[]}),s.get(e.a).add(n.length-1),s.get(e.b).add(n.length-1),s.get(e.c).add(n.length-1)});var c={polygons:n,vertices:o,faceVertexUvs:i};return n.forEach(function(e){t._buildPolygonNeighbours(e,c,s)}),c},o._getSharedVerticesInOrder=function(e,t){var n=e.vertexIds,r=t.vertexIds,o=new Set;if(n.forEach(function(e){r.includes(e)&&o.add(e)}),o.size<2)return[];o.has(n[0])&&o.has(n[n.length-1])&&n.push(n.shift()),o.has(r[0])&&o.has(r[r.length-1])&&r.push(r.shift());var i=[];return n.forEach(function(e){r.includes(e)&&i.push(e)}),i};var i=function(){this.portals=[]};i.prototype.push=function(e,t){void 0===t&&(t=e),this.portals.push({left:e,right:t})},i.prototype.stringPull=function(){var t,n,r,o=this.portals,i=[],s=0,u=0,c=0;n=o[0].left,r=o[0].right,i.push(t=o[0].left);for(var h=1;h<o.length;h++){var a=o[h].left,d=o[h].right;if(e.triarea2(t,r,d)<=0){if(!(e.vequal(t,r)||e.triarea2(t,n,d)>0)){i.push(n),n=t=n,r=t,u=s=u,c=s,h=s;continue}r=d,c=h}if(e.triarea2(t,n,a)>=0){if(!(e.vequal(t,n)||e.triarea2(t,r,a)<0)){i.push(r),n=t=r,r=t,u=s=c,c=s,h=s;continue}n=a,u=h}}return 0!==i.length&&e.vequal(i[i.length-1],o[o.length-1].left)||i.push(o[o.length-1].left),this.path=i,i};var s,u,c,h,a,d,f=function(){this.zones={}};f.createZone=function(e){return o.buildZone(e)},f.prototype.setZoneData=function(e,t){this.zones[e]=t},f.prototype.getGroup=function(t,n){if(!this.zones[t])return null;var r=null,o=Math.pow(50,2);return this.zones[t].groups.forEach(function(t,i){t.forEach(function(t){var s=e.distanceToSquared(t.centroid,n);s<o&&(r=i,o=s)})}),r},f.prototype.getRandomNode=function(t,n,r,o){if(!this.zones[t])return new THREE.Vector3;r=r||null,o=o||0;var i=[];return this.zones[t].groups[n].forEach(function(t){r&&o?e.distanceToSquared(r,t.centroid)<o*o&&i.push(t.centroid):i.push(t.centroid)}),e.sample(i)||new THREE.Vector3},f.prototype.getClosestNode=function(t,n,r,o){void 0===o&&(o=!1);var i=this.zones[n].vertices,s=null,u=Infinity;return this.zones[n].groups[r].forEach(function(n){var r=e.distanceToSquared(n.centroid,t);r<u&&(!o||e.isVectorInPolygon(t,n,i))&&(s=n,u=r)}),s},f.prototype.findPath=function(e,t,r,o){var s=this.zones[r].groups[o],u=this.zones[r].vertices,c=this.getClosestNode(e,r,o),h=this.getClosestNode(t,r,o,!0);if(!c||!h)return null;var a=n.search(s,c,h),d=function(e,t){for(var n=0;n<e.neighbours.length;n++)if(e.neighbours[n]===t.id)return e.portals[n]},f=new i;f.push(e);for(var l=0;l<a.length;l++){var v=a[l+1];if(v){var p=d(a[l],v);f.push(u[p[0]],u[p[1]])}}f.push(t),f.stringPull();var g=f.path.map(function(e){return new THREE.Vector3(e.x,e.y,e.z)});return g.shift(),g},f.prototype.clampStep=(c=new THREE.Vector3,h=new THREE.Plane,a=new THREE.Triangle,d=new THREE.Vector3,function(e,t,n,r,o,i){var f=this.zones[r].vertices,l=this.zones[r].groups[o],v=[n],p={};p[n.id]=0,s=void 0,d.set(0,0,0),u=Infinity,h.setFromCoplanarPoints(f[n.vertexIds[0]],f[n.vertexIds[1]],f[n.vertexIds[2]]),h.projectPoint(t,c),t.copy(c);for(var g=v.pop();g;g=v.pop()){a.set(f[g.vertexIds[0]],f[g.vertexIds[1]],f[g.vertexIds[2]]),a.closestPointToPoint(t,c),c.distanceToSquared(t)<u&&(s=g,d.copy(c),u=c.distanceToSquared(t));var x=p[g];if(!(x>2))for(var I=0;I<g.neighbours.length;I++){var b=l[g.neighbours[I]];b.id in p||(v.push(b),p[b.id]=x+1)}}return i.copy(d),s});export{f as Pathfinding};\n//# sourceMappingURL=three-pathfinding.module.js.map\n","require('./a-grid');\nrequire('./a-hexgrid');\nrequire('./a-ocean');\nrequire('./a-tube');\n","/**\n * Flat grid.\n *\n * Defaults to 75x75.\n */\nmodule.exports = AFRAME.registerPrimitive('a-grid', {\n defaultComponents: {\n geometry: {\n primitive: 'plane',\n width: 75,\n height: 75\n },\n rotation: {x: -90, y: 0, z: 0},\n material: {\n src: 'url(https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/assets/grid.png)',\n repeat: '75 75'\n }\n },\n mappings: {\n width: 'geometry.width',\n height: 'geometry.height',\n src: 'material.src'\n }\n});\n","const vg = require('../../lib/hex-grid.min.js');\nconst defaultHexGrid = require('../../lib/default-hex-grid');\n\n/**\n * Hex grid.\n */\nmodule.exports.Primitive = AFRAME.registerPrimitive('a-hexgrid', {\n defaultComponents: {\n 'hexgrid': {}\n },\n mappings: {\n src: 'hexgrid.src'\n }\n});\n\nmodule.exports.Component = AFRAME.registerComponent('hexgrid', {\n dependencies: ['material'],\n schema: {\n src: {type: 'asset'}\n },\n init: function () {\n const data = this.data;\n if (data.src) {\n fetch(data.src)\n .then((response) => response.json())\n .then((json) => this.addMesh(json));\n } else {\n this.addMesh(defaultHexGrid);\n }\n },\n addMesh: function (json) {\n const grid = new vg.HexGrid();\n grid.fromJSON(json);\n const board = new vg.Board(grid);\n board.generateTilemap();\n this.el.setObject3D('mesh', board.group);\n this.addMaterial();\n },\n addMaterial: function () {\n const materialComponent = this.el.components.material;\n const material = (materialComponent || {}).material;\n if (!material) return;\n this.el.object3D.traverse((node) => {\n if (node.isMesh) {\n node.material = material;\n }\n });\n },\n remove: function () {\n this.el.removeObject3D('mesh');\n }\n});\n","var vg=module.exports={VERSION:\"0.1.1\",PI:Math.PI,TAU:2*Math.PI,DEG_TO_RAD:.0174532925,RAD_TO_DEG:57.2957795,SQRT3:Math.sqrt(3),TILE:\"tile\",ENT:\"entity\",STR:\"structure\",HEX:\"hex\",SQR:\"square\",ABS:\"abstract\"};vg.Board=function(e,t){if(!e)throw new Error(\"You must pass in a grid system for the board to use.\");this.tiles=[],this.tileGroup=null,this.group=new THREE.Object3D,this.grid=null,this.overlay=null,this.finder=new vg.AStarFinder(t),vg.Loader.init(),this.setGrid(e)},vg.Board.prototype={setEntityOnTile:function(e,t){var i=this.grid.cellToPixel(t.cell);e.position.copy(i),e.position.y+=e.heightOffset||0,e.tile&&(e.tile.entity=null),e.tile=t,t.entity=e},addTile:function(e){var t=this.tiles.indexOf(e);-1===t&&(this.tiles.push(e),this.snapTileToGrid(e),e.position.y=0,this.tileGroup.add(e.mesh),this.grid.add(e.cell),e.cell.tile=e)},removeTile:function(e){if(e){var t=this.tiles.indexOf(e);this.grid.remove(e.cell),-1!==t&&this.tiles.splice(t,1),e.dispose()}},removeAllTiles:function(){if(this.tileGroup)for(var e=this.tileGroup.children,t=0;t<e.length;t++)this.tileGroup.remove(e[t])},getTileAtCell:function(e){var t=this.grid.cellToHash(e);return e.tile||(\"undefined\"!=typeof this.grid.cells[t]?this.grid.cells[t].tile:null)},snapToGrid:function(e){var t=this.grid.pixelToCell(e);e.copy(this.grid.cellToPixel(t))},snapTileToGrid:function(e){if(e.cell)e.position.copy(this.grid.cellToPixel(e.cell));else{var t=this.grid.pixelToCell(e.position);e.position.copy(this.grid.cellToPixel(t))}return e},getRandomTile:function(){var e=vg.Tools.randomInt(0,this.tiles.length-1);return this.tiles[e]},findPath:function(e,t,i){return this.finder.findPath(e.cell,t.cell,i,this.grid)},setGrid:function(e){this.group.remove(this.tileGroup),this.grid&&e!==this.grid&&(this.removeAllTiles(),this.tiles.forEach(function(e){this.grid.remove(e.cell),e.dispose()}),this.grid.dispose()),this.grid=e,this.tiles=[],this.tileGroup=new THREE.Object3D,this.group.add(this.tileGroup)},generateOverlay:function(e){var t=new THREE.LineBasicMaterial({color:0,opacity:.3});this.overlay&&this.group.remove(this.overlay),this.overlay=new THREE.Object3D,this.grid.generateOverlay(e,this.overlay,t),this.group.add(this.overlay)},generateTilemap:function(e){this.reset();var t=this.grid.generateTiles(e);this.tiles=t,this.tileGroup=new THREE.Object3D;for(var i=0;i<t.length;i++)this.tileGroup.add(t[i].mesh);this.group.add(this.tileGroup)},reset:function(){this.removeAllTiles(),this.tileGroup&&this.group.remove(this.tileGroup)}},vg.Board.prototype.constructor=vg.Board,vg.Cell=function(e,t,i,s){this.q=e||0,this.r=t||0,this.s=i||0,this.h=s||1,this.tile=null,this.userData={},this.walkable=!0,this._calcCost=0,this._priority=0,this._visited=!1,this._parent=null,this.uniqueID=vg.LinkedList.generateID()},vg.Cell.prototype={set:function(e,t,i){return this.q=e,this.r=t,this.s=i,this},copy:function(e){return this.q=e.q,this.r=e.r,this.s=e.s,this.h=e.h,this.tile=e.tile||null,this.userData=e.userData||{},this.walkable=e.walkable,this},add:function(e){return this.q+=e.q,this.r+=e.r,this.s+=e.s,this},equals:function(e){return this.q===e.q&&this.r===e.r&&this.s===e.s}},vg.Cell.prototype.constructor=vg.Cell,vg.HexGrid=function(e){e=e||{},this.type=vg.HEX,this.size=5,this.cellSize=\"undefined\"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t,i=[];for(t=0;6>t;t++)i.push(this._createVertex(t));for(this.cellShape=new THREE.Shape,this.cellShape.moveTo(i[0].x,i[0].y),t=1;6>t;t++)this.cellShape.lineTo(i[t].x,i[t].y);this.cellShape.lineTo(i[0].x,i[0].y),this.cellShape.autoClose=!0,this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=i,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._cellWidth=2*this.cellSize,this._cellLength=.5*vg.SQRT3*this._cellWidth,this._hashDelimeter=\".\",this._directions=[new vg.Cell(1,-1,0),new vg.Cell(1,0,-1),new vg.Cell(0,1,-1),new vg.Cell(-1,1,0),new vg.Cell(-1,0,1),new vg.Cell(0,-1,1)],this._diagonals=[new vg.Cell(2,-1,-1),new vg.Cell(1,1,-2),new vg.Cell(-1,2,-1),new vg.Cell(-2,1,1),new vg.Cell(-1,-1,2),new vg.Cell(1,-2,1)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new vg.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},vg.HexGrid.TWO_THIRDS=2/3,vg.HexGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._cellWidth*.75,this._vec3.y=e.h,this._vec3.z=-((e.s-e.r)*this._cellLength*.5),this._vec3},pixelToCell:function(e){var t=e.x*(vg.HexGrid.TWO_THIRDS/this.cellSize),i=(-e.x/3+vg.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,i,-t-i),this._cubeRound(this._cel)},getCellAt:function(e){var t=e.x*(vg.HexGrid.TWO_THIRDS/this.cellSize),i=(-e.x/3+vg.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,i,-t-i),this._cubeRound(this._cel),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,i){var s,n,l=this._directions.length;for(this._list.length=0,s=0;l>s;s++)this._cel.copy(e),this._cel.add(this._directions[s]),n=this.cells[this.cellToHash(this._cel)],!n||i&&!i(e,n)||this._list.push(n);if(t)for(s=0;l>s;s++)this._cel.copy(e),this._cel.add(this._diagonals[s]),n=this.cells[this.cellToHash(this._cel)],!n||i&&!i(e,n)||this._list.push(n);return this._list},getRandomCell:function(){var e,t=0,i=vg.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===i)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r+this._hashDelimeter+e.s},distance:function(e,t){var i=Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r),Math.abs(e.s-t.s));return i+=t.h-e.h},clearPath:function(){var e,t;for(e in this.cells)t=this.cells[e],t._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,i){var s=Math.abs(e.h);1>s&&(s=1);var n=this._geoCache[s];n||(this.extrudeSettings.amount=s,n=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[s]=n);var l=new vg.Tile({size:this.cellSize,scale:t,cell:e,geometry:n,material:i});return e.tile=l,l},generateTiles:function(e){e=e||{};var t=[],i={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};i=vg.Tools.merge(i,e),this.cellSize=i.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*vg.SQRT3*this._cellWidth,this.autogenerated=!0,this.extrudeSettings=i.extrudeSettings;var s,n,l;for(s in this.cells)l=this.cells[s],n=this.generateTile(l,i.tileScale,i.material),n.position.copy(this.cellToPixel(l)),n.position.y=0,t.push(n);return t},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,vg.PI/2),t},generate:function(e){e=e||{},this.size=\"undefined\"==typeof e.size?this.size:e.size;var t,i,s,n;for(t=-this.size;t<this.size+1;t++)for(i=-this.size;i<this.size+1;i++)s=-t-i,Math.abs(t)<=this.size&&Math.abs(i)<=this.size&&Math.abs(s)<=this.size&&(n=new vg.Cell(t,i,s),this.add(n))},generateOverlay:function(e,t,i){var s,n,l,r=this.cellShape.createPointsGeometry();for(s=-e;e+1>s;s++)for(n=-e;e+1>n;n++)if(l=-s-n,Math.abs(s)<=e&&Math.abs(n)<=e&&Math.abs(l)<=e){this._cel.set(s,n,l);var h=new THREE.Line(r,i);h.position.copy(this.cellToPixel(this._cel)),h.rotation.x=90*vg.DEG_TO_RAD,t.add(h)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,i){var s=this;vg.Tools.getJSON({url:e,callback:function(e){s.fromJSON(e),t.call(i||null,e)},cache:!1,scope:s})},fromJSON:function(e){var t,i,s=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*vg.SQRT3*this._cellWidth,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<s.length;t++)i=new vg.Cell,i.copy(s[t]),this.add(i)},toJSON:function(){var e,t,i={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},s=[];for(t in this.cells)e=this.cells[t],s.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return i.cells=s,i},_createVertex:function(e){var t=vg.TAU/6*e;return new THREE.Vector3(this.cellSize*Math.cos(t),this.cellSize*Math.sin(t),0)},_cubeRound:function(e){var t=Math.round(e.q),i=Math.round(e.r),s=Math.round(e.s),n=Math.abs(t-e.q),l=Math.abs(i-e.r),r=Math.abs(s-e.s);return n>l&&n>r?t=-i-s:l>r?i=-t-s:s=-t-i,this._cel.set(t,i,s)}},vg.HexGrid.prototype.constructor=vg.HexGrid,vg.SqrGrid=function(e){e=e||{},this.type=vg.SQR,this.size=5,this.cellSize=\"undefined\"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t=[];t.push(new THREE.Vector3),t.push(new THREE.Vector3(-this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,-this.cellSize)),this.cellShape=new THREE.Shape,this.cellShape.moveTo(-this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,-this.cellSize),this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=t,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._fullCellSize=2*this.cellSize,this._hashDelimeter=\".\",this._directions=[new vg.Cell(1,0,0),new vg.Cell(0,-1,0),new vg.Cell(-1,0,0),new vg.Cell(0,1,0)],this._diagonals=[new vg.Cell(-1,-1,0),new vg.Cell(-1,1,0),new vg.Cell(1,1,0),new vg.Cell(1,-1,0)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new vg.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},vg.SqrGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._fullCellSize,this._vec3.y=e.h,this._vec3.z=e.r*this._fullCellSize,this._vec3},pixelToCell:function(e){var t=Math.round(e.x/this._fullCellSize),i=Math.round(e.z/this._fullCellSize);return this._cel.set(t,i,0)},getCellAt:function(e){var t=Math.round(e.x/this._fullCellSize),i=Math.round(e.z/this._fullCellSize);return this._cel.set(t,i),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,i){var s,n,l=this._directions.length;for(this._list.length=0,s=0;l>s;s++)this._cel.copy(e),this._cel.add(this._directions[s]),n=this.cells[this.cellToHash(this._cel)],!n||i&&!i(e,n)||this._list.push(n);if(t)for(s=0;l>s;s++)this._cel.copy(e),this._cel.add(this._diagonals[s]),n=this.cells[this.cellToHash(this._cel)],!n||i&&!i(e,n)||this._list.push(n);return this._list},getRandomCell:function(){var e,t=0,i=vg.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===i)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r},distance:function(e,t){var i=Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r));return i+=t.h-e.h},clearPath:function(){var e,t;for(e in this.cells)t=this.cells[e],t._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,i){var s=Math.abs(e.h);1>s&&(s=1);var n=this._geoCache[s];n||(this.extrudeSettings.amount=s,n=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[s]=n);var l=new vg.Tile({size:this.cellSize,scale:t,cell:e,geometry:n,material:i});return e.tile=l,l},generateTiles:function(e){e=e||{};var t=[],i={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};i=vg.Tools.merge(i,e),this.cellSize=i.cellSize,this._fullCellSize=2*this.cellSize,this.autogenerated=!0,this.extrudeSettings=i.extrudeSettings;var s,n,l;for(s in this.cells)l=this.cells[s],n=this.generateTile(l,i.tileScale,i.material),n.position.copy(this.cellToPixel(l)),n.position.y=0,t.push(n);return t},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,vg.PI/2),t},generate:function(e){e=e||{},this.size=\"undefined\"==typeof e.size?this.size:e.size;var t,i,s,n=Math.ceil(this.size/2);for(t=-n;n>t;t++)for(i=-n;n>i;i++)s=new vg.Cell(t,i+1),this.add(s)},generateOverlay:function(e,t,i){var s,n,l=Math.ceil(e/2);for(s=-l;l>s;s++)for(n=-l;l>n;n++){this._cel.set(s,n);var r=new THREE.Line(this.cellGeo,i);r.position.copy(this.cellToPixel(this._cel)),r.rotation.x=90*vg.DEG_TO_RAD,t.add(r)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,i){vg.Tools.getJSON({url:e,callback:function(e){this.fromJSON(e),t.call(i||null,e)},cache:!1,scope:this})},fromJSON:function(e){var t,i,s=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._fullCellSize=2*this.cellSize,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<s.length;t++)i=new vg.Cell,i.copy(s[t]),this.add(i)},toJSON:function(){var e,t,i={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},s=[];for(t in this.cells)e=this.cells[t],s.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return i.cells=s,i}},vg.SqrGrid.prototype.constructor=vg.SqrGrid,vg.Tile=function(e){e=e||{};var t={cell:null,geometry:null,material:null};if(t=vg.Tools.merge(t,e),!t.cell||!t.geometry)throw new Error(\"Missing vg.Tile configuration\");this.cell=t.cell,this.cell.tile&&this.cell.tile!==this&&this.cell.tile.dispose(),this.cell.tile=this,this.uniqueID=vg.Tools.generateID(),this.geometry=t.geometry,this.material=t.material,this.material||(this.material=new THREE.MeshPhongMaterial({color:vg.Tools.randomizeRGB(\"30, 30, 30\",13)})),this.objectType=vg.TILE,this.entity=null,this.userData={},this.selected=!1,this.highlight=\"0x0084cc\",this.mesh=new THREE.Mesh(this.geometry,this.material),this.mesh.userData.structure=this,this.position=this.mesh.position,this.rotation=this.mesh.rotation,this.rotation.x=-90*vg.DEG_TO_RAD,this.mesh.scale.set(t.scale,t.scale,1),this.material.emissive?this._emissive=this.material.emissive.getHex():this._emissive=null},vg.Tile.prototype={select:function(){return this.material.emissive&&this.material.emissive.setHex(this.highlight),this.selected=!0,this},deselect:function(){return null!==this._emissive&&this.material.emissive&&this.material.emissive.setHex(this._emissive),this.selected=!1,this},toggle:function(){return this.selected?this.deselect():this.select(),this},dispose:function(){this.cell&&this.cell.tile&&(this.cell.tile=null),this.cell=null,this.position=null,this.rotation=null,this.mesh.parent&&this.mesh.parent.remove(this.mesh),this.mesh.userData.structure=null,this.mesh=null,this.material=null,this.userData=null,this.entity=null,this.geometry=null,this._emissive=null}},vg.Tile.prototype.constructor=vg.Tile,function(){var e=function(){this.obj=null,this.next=null,this.prev=null,this.free=!0},t=function(){this.first=null,this.last=null,this.length=0,this.objToNodeMap={},this.uniqueID=Date.now()+\"\"+Math.floor(1e3*Math.random()),this.sortArray=[]};t.generateID=function(){return Math.random().toString(36).slice(2)+Date.now()},t.prototype={getNode:function(e){return this.objToNodeMap[e.uniqueID]},addNode:function(i){var s=new e;if(!i.uniqueID)try{i.uniqueID=t.generateID()}catch(n){return console.error(\"[LinkedList.addNode] obj passed is immutable: cannot attach necessary identifier\"),null}return s.obj=i,s.free=!1,this.objToNodeMap[i.uniqueID]=s,s},swapObjects:function(e,t){this.objToNodeMap[e.obj.uniqueID]=null,this.objToNodeMap[t.uniqueID]=e,e.obj=t},add:function(e){var t=this.objToNodeMap[e.uniqueID];if(t){if(t.free===!1)return;t.obj=e,t.free=!1,t.next=null,t.prev=null}else t=this.addNode(e);if(this.first){if(!this.last)throw new Error(\"[LinkedList.add] No last in the list -- that shouldn't happen here\");this.last.next=t,t.prev=this.last,this.last=t,t.next=null}else this.first=t,this.last=t,t.next=null,t.prev=null;this.length++,this.showDebug&&this.dump(\"after add\")},has:function(e){return!!this.objToNodeMap[e.uniqueID]},moveUp:function(e){this.dump(\"before move up\");var t=this.getNode(e);if(!t)throw\"Oops, trying to move an object that isn't in the list\";if(t.prev){var i=t.prev,s=i.prev;t==this.last&&(this.last=i);var n=t.next;s&&(s.next=t),t.next=i,t.prev=i.prev,i.next=n,i.prev=t,this.first==i&&(this.first=t)}},moveDown:function(e){var t=this.getNode(e);if(!t)throw\"Oops, trying to move an object that isn't in the list\";if(t.next){var i=t.next;this.moveUp(i.obj),this.last==i&&(this.last=t)}},sort:function(e){var t,i,s=this.sortArray,n=this.first;for(s.length=0;n;)s.push(n.obj),n=n.next;for(this.clear(),s.sort(e),i=s.length,t=0;i>t;t++)this.add(s[t])},remove:function(e){var t=this.getNode(e);return!t||t.free?!1:(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.prev||(this.first=t.next),t.next||(this.last=t.prev),t.free=!0,t.prev=null,t.next=null,this.length--,!0)},shift:function(){var e=this.first;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.first=e.next,e.next||(this.last=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},pop:function(){var e=this.last;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.last=e.prev,e.prev||(this.first=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},concat:function(e){for(var t=e.first;t;)this.add(t.obj),t=t.next},clear:function(){for(var e=this.first;e;)e.free=!0,e=e.next;this.first=null,this.length=0},dispose:function(){for(var e=this.first;e;)e.obj=null,e=e.next;this.first=null,this.objToNodeMap=null},dump:function(e){console.log(\"====================\"+e+\"=====================\");for(var t=this.first;t;)console.log(\"{\"+t.obj.toString()+\"} previous=\"+(t.prev?t.prev.obj:\"NULL\")),t=t.next();console.log(\"===================================\"),console.log(\"Last: {\"+(this.last?this.last.obj:\"NULL\")+\"} First: {\"+(this.first?this.first.obj:\"NULL\")+\"}\")}},t.prototype.constructor=t,vg.LinkedList=t}(),function(){var e=function(e,t,i,s,n){this._listener=t,this.isOnce=i,this.context=s,this.signal=e,this._priority=n||0};e.prototype={active:!0,params:null,execute:function(e){var t,i;return this.active&&this._listener&&(i=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,i),this.isOnce&&this.detach()),t},detach:function(){return this.isBound()?this.signal.remove(this._listener,this.context):null},isBound:function(){return!!this.signal&&!!this._listener},_destroy:function(){delete this.signal,delete this._listener,delete this.context},toString:function(){return\"[SignalBinding isOnce:\"+this.isOnce+\", isBound:\"+this.isBound()+\", active:\"+this.active+\"]\"}},e.prototype.constructor=e;var t=function(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){t.prototype.dispatch.apply(e,arguments)}};t.prototype={memorize:!1,_shouldPropagate:!0,active:!0,validateListener:function(e,t){if(\"function\"!=typeof e)throw new Error(\"Signal: listener is a required param of {fn}() and should be a Function.\".replace(\"{fn}\",t))},_registerListener:function(t,i,s,n){var l,r=this._indexOfListener(t,s);if(-1!==r){if(l=this._bindings[r],l.isOnce!==i)throw new Error(\"You cannot add\"+(i?\"\":\"Once\")+\"() then add\"+(i?\"Once\":\"\")+\"() the same listener without removing the relationship first.\")}else l=new e(this,t,i,s,n),this._addBinding(l);return this.memorize&&this._prevParams&&l.execute(this._prevParams),l},_addBinding:function(e){var t=this._bindings.length;do t--;while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var i,s=this._bindings.length;s--;)if(i=this._bindings[s],i._listener===e&&i.context===t)return s;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,i){return this.validateListener(e,\"add\"),this._registerListener(e,!1,t,i)},addOnce:function(e,t,i){return this.validateListener(e,\"addOnce\"),this._registerListener(e,!0,t,i)},remove:function(e,t){this.validateListener(e,\"remove\");var i=this._indexOfListener(e,t);return-1!==i&&(this._bindings[i]._destroy(),this._bindings.splice(i,1)),e},removeAll:function(e){\"undefined\"==typeof e&&(e=null);for(var t=this._bindings.length;t--;)e?this._bindings[t].context===e&&(this._bindings[t]._destroy(),this._bindings.splice(t,1)):this._bindings[t]._destroy();e||(this._bindings.length=0)},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(){if(this.active){var e,t=Array.prototype.slice.call(arguments),i=this._bindings.length;if(this.memorize&&(this._prevParams=t),i){e=this._bindings.slice(),this._shouldPropagate=!0;do i--;while(e[i]&&this._shouldPropagate&&e[i].execute(t)!==!1)}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return\"[Signal active:\"+this.active+\" numListeners:\"+this.getNumListeners()+\"]\"}},t.prototype.constructor=t,vg.Signal=t}(),vg.AStarFinder=function(e){e=e||{};var t={allowDiagonal:!1,heuristicFilter:null};t=vg.Tools.merge(t,e),this.allowDiagonal=t.allowDiagonal,this.heuristicFilter=t.heuristicFilter,this.list=new vg.LinkedList},vg.AStarFinder.prototype={findPath:function(e,t,i,s){var n,l,r,h,o,a;for(i=i||this.heuristicFilter,s.clearPath(),this.list.clear(),this.list.add(e);this.list.length>0;){if(this.list.sort(this.compare),n=this.list.shift(),n._visited=!0,n===t)return vg.PathUtil.backtrace(t);for(r=s.getNeighbors(n,this.allowDiagonal,i),o=0,a=r.length;a>o;o++)if(h=r[o],h.walkable&&(l=n._calcCost+s.distance(n,h),!h._visited||l<h._calcCost)){if(h._visited=!0,h._parent=n,h._calcCost=l,h._priority=l+s.distance(t,h),h===t)return vg.PathUtil.backtrace(t);this.list.add(h)}}return null},compare:function(e,t){return e._priority-t._priority}},vg.AStarFinder.prototype.constructor=vg.AStarFinder,vg.PathUtil={backtrace:function(e){for(var t=[e];e._parent;)e=e._parent,t.push(e);return t.reverse()},biBacktrace:function(e,t){var i=this.backtrace(e),s=this.backtrace(t);return i.concat(s.reverse())},pathLength:function(e){var t,i,s,n,l,r=0;for(t=1;t<e.length;++t)i=e[t-1],s=e[t],n=i[0]-s[0],l=i[1]-s[1],r+=Math.sqrt(n*n+l*l);return r},interpolate:function(e,t,i,s){var n,l,r,h,o,a,c=Math.abs,u=[];for(r=c(i-e),h=c(s-t),n=i>e?1:-1,l=s>t?1:-1,o=r-h;e!==i||t!==s;)u.push([e,t]),a=2*o,a>-h&&(o-=h,e+=n),r>a&&(o+=r,t+=l);return u},expandPath:function(e){var t,i,s,n,l,r,h=[],o=e.length;if(2>o)return h;for(l=0;o-1>l;++l)for(t=e[l],i=e[l+1],s=this.interpolate(t[0],t[1],i[0],i[1]),n=s.length,r=0;n-1>r;++r)h.push(s[r]);return h.push(e[o-1]),h},smoothenPath:function(e,t){var i,s,n,l,r,h,o,a,c,u,d,g,p=t.length,v=t[0][0],f=t[0][1],m=t[p-1][0],_=t[p-1][1];for(i=v,s=f,r=[[i,s]],o=2;p>o;++o){for(c=t[o],n=c[0],l=c[1],u=this.interpolate(i,s,n,l),g=!1,a=1;a<u.length;++a)if(d=u[a],!e.isWalkableAt(d[0],d[1])){g=!0;break}g&&(h=t[o-1],r.push(h),i=h[0],s=h[1])}return r.push([m,_]),r},compressPath:function(e){if(e.length<3)return e;var t,i,s,n,l,r,h=[],o=e[0][0],a=e[0][1],c=e[1][0],u=e[1][1],d=c-o,g=u-a;for(l=Math.sqrt(d*d+g*g),d/=l,g/=l,h.push([o,a]),r=2;r<e.length;r++)t=c,i=u,s=d,n=g,c=e[r][0],u=e[r][1],d=c-t,g=u-i,l=Math.sqrt(d*d+g*g),d/=l,g/=l,(d!==s||g!==n)&&h.push([t,i]);return h.push([c,u]),h}},vg.Loader={manager:null,imageLoader:null,crossOrigin:!1,init:function(e){this.crossOrigin=e||!1,this.manager=new THREE.LoadingManager(function(){},function(){},function(){console.warn(\"Error loading images\")}),this.imageLoader=new THREE.ImageLoader(this.manager),this.imageLoader.crossOrigin=e},loadTexture:function(e,t,i,s){var n=new THREE.Texture(null,t);return this.imageLoader.load(e,function(e){n.image=e,n.needsUpdate=!0,i&&i(n)},null,function(e){s&&s(e)}),n.sourceFile=e,n}},vg.MouseCaster=function(e,t,i){this.down=!1,this.rightDown=!1,this.pickedObject=null,this.selectedObject=null,this.allHits=null,this.active=!0,this.shift=!1,this.ctrl=!1,this.wheel=0,this.position=new THREE.Vector3,this.screenPosition=new THREE.Vector2,this.signal=new vg.Signal,this.group=e,this._camera=t,this._raycaster=new THREE.Raycaster,this._preventDefault=!1,i=i||document,i.addEventListener(\"mousemove\",this._onDocumentMouseMove.bind(this),!1),i.addEventListener(\"mousedown\",this._onDocumentMouseDown.bind(this),!1),i.addEventListener(\"mouseup\",this._onDocumentMouseUp.bind(this),!1),i.addEventListener(\"mousewheel\",this._onMouseWheel.bind(this),!1),i.addEventListener(\"DOMMouseScroll\",this._onMouseWheel.bind(this),!1)},vg.MouseCaster.OVER=\"over\",vg.MouseCaster.OUT=\"out\",vg.MouseCaster.DOWN=\"down\",vg.MouseCaster.UP=\"up\",vg.MouseCaster.CLICK=\"click\",vg.MouseCaster.WHEEL=\"wheel\",vg.MouseCaster.prototype={update:function(){if(this.active){this._raycaster.setFromCamera(this.screenPosition,this._camera);var e,t,i=this._raycaster.intersectObject(this.group,!0);i.length>0?(e=i[0],t=e.object.userData.structure,this.pickedObject!=t&&(this.pickedObject&&this.signal.dispatch(vg.MouseCaster.OUT,this.pickedObject),this.pickedObject=t,this.selectedObject=null,this.signal.dispatch(vg.MouseCaster.OVER,this.pickedObject)),this.position.copy(e.point),this.screenPosition.z=e.distance):(this.pickedObject&&this.signal.dispatch(vg.MouseCaster.OUT,this.pickedObject),this.pickedObject=null,this.selectedObject=null),this.allHits=i}},preventDefault:function(){this._preventDefault=!0},_onDocumentMouseDown:function(e){return e=e||window.event,e.preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.pickedObject&&(this.selectedObject=this.pickedObject),this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.down=1===e.which,this.rightDown=3===e.which,void this.signal.dispatch(vg.MouseCaster.DOWN,this.pickedObject))},_onDocumentMouseUp:function(e){return e.preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.signal.dispatch(vg.MouseCaster.UP,this.pickedObject),this.selectedObject&&this.pickedObject&&this.selectedObject.uniqueID===this.pickedObject.uniqueID&&this.signal.dispatch(vg.MouseCaster.CLICK,this.pickedObject),this.down=1===e.which?!1:this.down,void(this.rightDown=3===e.which?!1:this.rightDown))},_onDocumentMouseMove:function(e){e.preventDefault(),this.screenPosition.x=e.clientX/window.innerWidth*2-1,this.screenPosition.y=2*-(e.clientY/window.innerHeight)+1},_onMouseWheel:function(e){if(this.active){e.preventDefault(),e.stopPropagation();var t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),t>0?this.wheel++:this.wheel--,this.signal.dispatch(vg.MouseCaster.WHEEL,this.wheel)}}},vg.MouseCaster.prototype.constructor=vg.MouseCaster,vg.Scene=function(e,t){var i={element:document.body,alpha:!0,antialias:!0,clearColor:\"#fff\",sortObjects:!1,fog:null,light:new THREE.DirectionalLight(16777215),lightPosition:null,cameraType:\"PerspectiveCamera\",cameraPosition:null,orthoZoom:4},s={minDistance:100,maxDistance:1e3,zoomSpeed:2,noZoom:!1};if(i=vg.Tools.merge(i,e),\"boolean\"!=typeof t&&(s=vg.Tools.merge(s,t)),this.renderer=new THREE.WebGLRenderer({alpha:i.alpha,antialias:i.antialias}),this.renderer.setClearColor(i.clearColor,0),this.renderer.sortObjects=i.sortObjects,this.width=window.innerWidth,this.height=window.innerHeight,this.orthoZoom=i.orthoZoom,this.container=new THREE.Scene,this.container.fog=i.fog,this.container.add(new THREE.AmbientLight(14540253)),i.lightPosition||i.light.position.set(-1,1,-1).normalize(),this.container.add(i.light),\"OrthographicCamera\"===i.cameraType){var n=window.innerWidth/this.orthoZoom,l=window.innerHeight/this.orthoZoom;this.camera=new THREE.OrthographicCamera(n/-2,n/2,l/2,l/-2,1,5e3)}else this.camera=new THREE.PerspectiveCamera(50,this.width/this.height,1,5e3);this.contolled=!!t,this.contolled&&(this.controls=new THREE.OrbitControls(this.camera,this.renderer.domElement),this.controls.minDistance=s.minDistance,this.controls.maxDistance=s.maxDistance,this.controls.zoomSpeed=s.zoomSpeed,this.controls.noZoom=s.noZoom),i.cameraPosition&&this.camera.position.copy(i.cameraPosition),window.addEventListener(\"resize\",function(){if(this.width=window.innerWidth,this.height=window.innerHeight,\"OrthographicCamera\"===this.camera.type){var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2}else this.camera.aspect=this.width/this.height;this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height)}.bind(this),!1),this.attachTo(i.element)},vg.Scene.prototype={attachTo:function(e){e.style.width=this.width+\"px\",e.style.height=this.height+\"px\",this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),e.appendChild(this.renderer.domElement)},add:function(e){this.container.add(e)},remove:function(e){this.container.remove(e)},render:function(){this.contolled&&this.controls.update(),this.renderer.render(this.container,this.camera)},updateOrthoZoom:function(){if(this.orthoZoom<=0)return void(this.orthoZoom=0);var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2,this.camera.updateProjectionMatrix()},focusOn:function(e){this.camera.lookAt(e.position)}},vg.Scene.prototype.constructor=vg.Scene,vg.SelectionManager=function(e){this.mouse=e,this.onSelect=new vg.Signal,this.onDeselect=new vg.Signal,this.selected=null,this.toggleSelection=!1,this.mouse.signal.add(this.onMouse,this)},vg.SelectionManager.prototype={select:function(e,t){e&&(t=t||!0,this.selected!==e&&this.clearSelection(t),e.selected?this.toggleSelection&&(t&&this.onDeselect.dispatch(e),e.deselect()):e.select(),this.selected=e,t&&this.onSelect.dispatch(e))},clearSelection:function(e){e=e||!0,this.selected&&(e&&this.onDeselect.dispatch(this.selected),this.selected.deselect()),this.selected=null},onMouse:function(e,t){switch(e){case vg.MouseCaster.DOWN:t||this.clearSelection();break;case vg.MouseCaster.CLICK:this.select(t)}}},vg.SelectionManager.prototype.constructor=vg.SelectionManager,vg.Tools={clamp:function(e,t,i){return Math.max(t,Math.min(i,e))},sign:function(e){return e&&e/Math.abs(e)},random:function(e,t){return 1===arguments.length?Math.random()*e-.5*e:Math.random()*(t-e)+e},randomInt:function(e,t){return 1===arguments.length?Math.random()*e-.5*e|0:Math.random()*(t-e+1)+e|0},normalize:function(e,t,i){return(e-t)/(i-t)},getShortRotation:function(e){return e%=this.TAU,e>this.PI?e-=this.TAU:e<-this.PI&&(e+=this.TAU),e},generateID:function(){return Math.random().toString(36).slice(2)+Date.now()},isPlainObject:function(e){if(\"object\"!=typeof e||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!Object.prototype.hasOwnProperty.call(e.constructor.prototype,\"isPrototypeOf\"))return!1}catch(t){return!1}return!0},merge:function(e,t){var i=this,s=Array.isArray(t),n=s&&[]||{};return s?(e=e||[],n=n.concat(e),t.forEach(function(t,s){\"undefined\"==typeof n[s]?n[s]=t:i.isPlainObject(t)?n[s]=i.merge(e[s],t):-1===e.indexOf(t)&&n.push(t)}),n):(e&&i.isPlainObject(e)&&Object.keys(e).forEach(function(t){n[t]=e[t];\n}),Object.keys(t).forEach(function(s){t[s]&&i.isPlainObject(t[s])&&e[s]?n[s]=i.merge(e[s],t[s]):n[s]=t[s]}),n)},now:function(){return window.nwf?window.nwf.system.Performance.elapsedTime:window.performance.now()},empty:function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},radixSort:function(e,t,i,s){if(t=t||0,i=i||e.length,s=s||31,!(t>=i-1||0>s)){for(var n=t,l=i,r=1<<s;l>n;)if(e[n]&r){--l;var h=e[n];e[n]=e[l],e[l]=h}else++n;this.radixSort(e,t,l,s-1),this.radixSort(e,l,i,s-1)}},randomizeRGB:function(e,t){var i,s,n=e.split(\",\"),l=\"rgb(\";for(t=this.randomInt(t),i=0;3>i;i++)s=parseInt(n[i])+t,0>s?s=0:s>255&&(s=255),l+=s+\",\";return l=l.substring(0,l.length-1),l+=\")\"},getJSON:function(e){var t=new XMLHttpRequest,i=\"undefined\"==typeof e.cache?!1:e.cache,s=i?e.url:e.url+\"?t=\"+Math.floor(1e4*Math.random())+Date.now();t.onreadystatechange=function(){if(200===this.status){var t=null;try{t=JSON.parse(this.responseText)}catch(i){return}return void e.callback.call(e.scope||null,t)}0!==this.status&&console.warn(\"[Tools.getJSON] Error: \"+this.status+\" (\"+this.statusText+\") :: \"+e.url)},t.open(\"GET\",s,!0),t.setRequestHeader(\"Accept\",\"application/json\"),t.setRequestHeader(\"Content-Type\",\"application/json\"),t.send(\"\")}};\n//# sourceMappingURL=hex-grid.min.js.map\n","module.exports = {\n \"size\": 5,\n \"cellSize\": 10,\n \"extrudeSettings\": {\n \"amount\": 1,\n \"bevelEnabled\": true,\n \"bevelSegments\": 1,\n \"steps\": 1,\n \"bevelSize\": 0.5,\n \"bevelThickness\": 0.5\n },\n \"autogenerated\": true,\n \"cells\": [\n {\n \"q\": -1,\n \"r\": 0,\n \"s\": 1,\n \"h\": 1,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 0,\n \"r\": -1,\n \"s\": 1,\n \"h\": 1,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 0,\n \"r\": 0,\n \"s\": 0,\n \"h\": 1,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 1,\n \"r\": -1,\n \"s\": 0,\n \"h\": 1,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": -1,\n \"r\": 1,\n \"s\": 0,\n \"h\": 0,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 0,\n \"r\": 1,\n \"s\": -1,\n \"h\": 0,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 1,\n \"r\": 0,\n \"s\": -1,\n \"h\": 0,\n \"walkable\": true,\n \"userData\": {}\n }]\n};\n","/**\n * Flat-shaded ocean primitive.\n *\n * Based on a Codrops tutorial:\n * http://tympanus.net/codrops/2016/04/26/the-aviator-animating-basic-3d-scene-threejs/\n */\nmodule.exports.Primitive = AFRAME.registerPrimitive('a-ocean', {\n defaultComponents: {\n ocean: {},\n rotation: {x: -90, y: 0, z: 0}\n },\n mappings: {\n width: 'ocean.width',\n depth: 'ocean.depth',\n density: 'ocean.density',\n amplitude: 'ocean.amplitude',\n amplitudeVariance: 'ocean.amplitudeVariance',\n speed: 'ocean.speed',\n speedVariance: 'ocean.speedVariance',\n color: 'ocean.color',\n opacity: 'ocean.opacity'\n }\n});\n\nmodule.exports.Component = AFRAME.registerComponent('ocean', {\n schema: {\n // Dimensions of the ocean area.\n width: {default: 10, min: 0},\n depth: {default: 10, min: 0},\n\n // Density of waves.\n density: {default: 10},\n\n // Wave amplitude and variance.\n amplitude: {default: 0.1},\n amplitudeVariance: {default: 0.3},\n\n // Wave speed and variance.\n speed: {default: 1},\n speedVariance: {default: 2},\n\n // Material.\n color: {default: '#7AD2F7', type: 'color'},\n opacity: {default: 0.8}\n },\n\n /**\n * Use play() instead of init(), because component mappings – unavailable as dependencies – are\n * not guaranteed to have parsed when this component is initialized.\n */\n play: function () {\n const el = this.el,\n data = this.data;\n let material = el.components.material;\n\n const geometry = new THREE.PlaneGeometry(data.width, data.depth, data.density, data.density);\n geometry.mergeVertices();\n this.waves = [];\n for (let v, i = 0, l = geometry.vertices.length; i < l; i++) {\n v = geometry.vertices[i];\n this.waves.push({\n z: v.z,\n ang: Math.random() * Math.PI * 2,\n amp: data.amplitude + Math.random() * data.amplitudeVariance,\n speed: (data.speed + Math.random() * data.speedVariance) / 1000 // radians / frame\n });\n }\n\n if (!material) {\n material = {};\n material.material = new THREE.MeshPhongMaterial({\n color: data.color,\n transparent: data.opacity < 1,\n opacity: data.opacity,\n shading: THREE.FlatShading,\n });\n }\n\n this.mesh = new THREE.Mesh(geometry, material.material);\n el.setObject3D('mesh', this.mesh);\n },\n\n remove: function () {\n this.el.removeObject3D('mesh');\n },\n\n tick: function (t, dt) {\n if (!dt) return;\n\n const verts = this.mesh.geometry.vertices;\n for (let v, vprops, i = 0; (v = verts[i]); i++){\n vprops = this.waves[i];\n v.z = vprops.z + Math.sin(vprops.ang) * vprops.amp;\n vprops.ang += vprops.speed * dt;\n }\n this.mesh.geometry.verticesNeedUpdate = true;\n }\n});\n","/**\n * Tube following a custom path.\n *\n * Usage:\n *\n * ```html\n * <a-tube path=\"5 0 5, 5 0 -5, -5 0 -5\" radius=\"0.5\"></a-tube>\n * ```\n */\nmodule.exports.Primitive = AFRAME.registerPrimitive('a-tube', {\n defaultComponents: {\n tube: {},\n },\n mappings: {\n path: 'tube.path',\n segments: 'tube.segments',\n radius: 'tube.radius',\n 'radial-segments': 'tube.radialSegments',\n closed: 'tube.closed'\n }\n});\n\nmodule.exports.Component = AFRAME.registerComponent('tube', {\n schema: {\n path: {default: []},\n segments: {default: 64},\n radius: {default: 1},\n radialSegments: {default: 8},\n closed: {default: false}\n },\n\n init: function () {\n const el = this.el,\n data = this.data;\n let material = el.components.material;\n\n if (!data.path.length) {\n console.error('[a-tube] `path` property expected but not found.');\n return;\n }\n\n const curve = new THREE.CatmullRomCurve3(data.path.map(function (point) {\n point = point.split(' ');\n return new THREE.Vector3(Number(point[0]), Number(point[1]), Number(point[2]));\n }));\n const geometry = new THREE.TubeGeometry(\n curve, data.segments, data.radius, data.radialSegments, data.closed\n );\n\n if (!material) {\n material = {};\n material.material = new THREE.MeshPhongMaterial();\n }\n\n this.mesh = new THREE.Mesh(geometry, material.material);\n this.el.setObject3D('mesh', this.mesh);\n },\n\n update: function (prevData) {\n if (!Object.keys(prevData).length) return;\n\n this.remove();\n this.init();\n },\n\n remove: function () {\n if (this.mesh) this.el.removeObject3D('mesh');\n }\n});\n","\nconst createPatternBuilder = require('./createPatternBuilder');\n\nmodule.exports = generateCreateBodyFunction;\nmodule.exports.generateCreateBodyFunctionBody = generateCreateBodyFunctionBody;\n\n// InlineTransform: getVectorCode\nmodule.exports.getVectorCode = getVectorCode;\n// InlineTransform: getBodyCode\nmodule.exports.getBodyCode = getBodyCode;\n// InlineTransformExport: module.exports = function() { return Body; }\n\nfunction generateCreateBodyFunction(dimension, debugSetters) {\n let code = generateCreateBodyFunctionBody(dimension, debugSetters);\n let {Body} = (new Function(code))();\n return Body;\n}\n\nfunction generateCreateBodyFunctionBody(dimension, debugSetters) {\n let code = `\n${getVectorCode(dimension, debugSetters)}\n${getBodyCode(dimension, debugSetters)}\nreturn {Body: Body, Vector: Vector};\n`;\n return code;\n}\n\nfunction getBodyCode(dimension) {\n let pattern = createPatternBuilder(dimension);\n let variableList = pattern('{var}', {join: ', '});\n return `\nfunction Body(${variableList}) {\n this.isPinned = false;\n this.pos = new Vector(${variableList});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${variableList}) {\n ${pattern('this.pos.{var} = {var} || 0;', {indent: 2})}\n};`;\n}\n\nfunction getVectorCode(dimension, debugSetters) {\n let pattern = createPatternBuilder(dimension);\n let setters = '';\n if (debugSetters) {\n setters = `${pattern(\"\\n\\\n var v{var};\\n\\\nObject.defineProperty(this, '{var}', {\\n\\\n set: function(v) { \\n\\\n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\\n\\\n v{var} = v; \\n\\\n },\\n\\\n get: function() { return v{var}; }\\n\\\n});\")}`;\n }\n\n let variableList = pattern('{var}', {join: ', '});\n return `function Vector(${variableList}) {\n ${setters}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${pattern('if (!Number.isFinite(v.{var})) throw new Error(\"Expected value is not a finite number at Vector constructor ({var})\");', {indent: 4})}\n ${pattern('this.{var} = v.{var};', {indent: 4})}\n } else {\n ${pattern('this.{var} = typeof {var} === \"number\" ? {var} : 0;', {indent: 4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${pattern('this.{var} = ', {join: ''})}0;\n };`;\n}","const createPatternBuilder = require('./createPatternBuilder');\nconst getVariableName = require('./getVariableName');\n\nmodule.exports = generateQuadTreeFunction;\nmodule.exports.generateQuadTreeFunctionBody = generateQuadTreeFunctionBody;\n\n// These exports are for InlineTransform tool.\n// InlineTransform: getInsertStackCode\nmodule.exports.getInsertStackCode = getInsertStackCode;\n// InlineTransform: getQuadNodeCode\nmodule.exports.getQuadNodeCode = getQuadNodeCode;\n// InlineTransform: isSamePosition\nmodule.exports.isSamePosition = isSamePosition;\n// InlineTransform: getChildBodyCode\nmodule.exports.getChildBodyCode = getChildBodyCode;\n// InlineTransform: setChildBodyCode\nmodule.exports.setChildBodyCode = setChildBodyCode;\n\nfunction generateQuadTreeFunction(dimension) {\n let code = generateQuadTreeFunctionBody(dimension);\n return (new Function(code))();\n}\n\nfunction generateQuadTreeFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n let quadCount = Math.pow(2, dimension);\n\n let code = `\n${getInsertStackCode()}\n${getQuadNodeCode(dimension)}\n${isSamePosition(dimension)}\n${getChildBodyCode(dimension)}\n${setChildBodyCode(dimension)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${assignQuads(' node.')}\n node.body = null;\n node.mass = ${pattern('node.mass_{var} = ', {join: ''})}0;\n ${pattern('node.min_{var} = node.max_{var} = ', {join: ''})}0;\n } else {\n node = new QuadNode();\n nodesCache[currentInCache] = node;\n }\n\n ++currentInCache;\n return node;\n }\n\n function update(sourceBody) {\n var queue = updateQueue;\n var v;\n ${pattern('var d{var};', {indent: 4})}\n var r; \n ${pattern('var f{var} = 0;', {indent: 4})}\n var queueLength = 1;\n var shiftIdx = 0;\n var pushIdx = 1;\n\n queue[0] = root;\n\n while (queueLength) {\n var node = queue[shiftIdx];\n var body = node.body;\n\n queueLength -= 1;\n shiftIdx += 1;\n var differentBody = (body !== sourceBody);\n if (body && differentBody) {\n // If the current node is a leaf node (and it is not source body),\n // calculate the force exerted by the current node on body, and add this\n // amount to body's net force.\n ${pattern('d{var} = body.pos.{var} - sourceBody.pos.{var};', {indent: 8})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n\n if (r === 0) {\n // Poor man's protection against zero distance.\n ${pattern('d{var} = (random.nextDouble() - 0.5) / 50;', {indent: 10})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n }\n\n // This is standard gravitation force calculation but we divide\n // by r^3 to save two operations when normalizing force vector.\n v = gravity * body.mass * sourceBody.mass / (r * r * r);\n ${pattern('f{var} += v * d{var};', {indent: 8})}\n } else if (differentBody) {\n // Otherwise, calculate the ratio s / r, where s is the width of the region\n // represented by the internal node, and r is the distance between the body\n // and the node's center-of-mass\n ${pattern('d{var} = node.mass_{var} / node.mass - sourceBody.pos.{var};', {indent: 8})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n\n if (r === 0) {\n // Sorry about code duplication. I don't want to create many functions\n // right away. Just want to see performance first.\n ${pattern('d{var} = (random.nextDouble() - 0.5) / 50;', {indent: 10})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n }\n // If s / r < θ, treat this internal node as a single body, and calculate the\n // force it exerts on sourceBody, and add this amount to sourceBody's net force.\n if ((node.max_${getVariableName(0)} - node.min_${getVariableName(0)}) / r < theta) {\n // in the if statement above we consider node's width only\n // because the region was made into square during tree creation.\n // Thus there is no difference between using width or height.\n v = gravity * node.mass * sourceBody.mass / (r * r * r);\n ${pattern('f{var} += v * d{var};', {indent: 10})}\n } else {\n // Otherwise, run the procedure recursively on each of the current node's children.\n\n // I intentionally unfolded this loop, to save several CPU cycles.\n${runRecursiveOnChildren()}\n }\n }\n }\n\n ${pattern('sourceBody.force.{var} += f{var};', {indent: 4})}\n }\n\n function insertBodies(bodies) {\n ${pattern('var {var}min = Number.MAX_VALUE;', {indent: 4})}\n ${pattern('var {var}max = Number.MIN_VALUE;', {indent: 4})}\n var i = bodies.length;\n\n // To reduce quad tree depth we are looking for exact bounding box of all particles.\n while (i--) {\n var pos = bodies[i].pos;\n ${pattern('if (pos.{var} < {var}min) {var}min = pos.{var};', {indent: 6})}\n ${pattern('if (pos.{var} > {var}max) {var}max = pos.{var};', {indent: 6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${pattern('if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;', {indent: 4})}\n\n currentInCache = 0;\n root = newNode();\n ${pattern('root.min_{var} = {var}min;', {indent: 4})}\n ${pattern('root.max_{var} = {var}min + maxSideLength;', {indent: 4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${pattern('var {var} = body.pos.{var};', {indent: 8})}\n node.mass += body.mass;\n ${pattern('node.mass_{var} += body.mass * {var};', {indent: 8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${pattern('var min_{var} = node.min_{var};', {indent: 8})}\n ${pattern('var max_{var} = (min_{var} + node.max_{var}) / 2;', {indent: 8})}\n\n${assignInsertionQuadIndex(8)}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${pattern('child.min_{var} = min_{var};', {indent: 10})}\n ${pattern('child.max_{var} = max_{var};', {indent: 10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${pattern('var d{var} = (node.max_{var} - node.min_{var}) * offset;', {indent: 12})}\n\n ${pattern('oldBody.pos.{var} = node.min_{var} + d{var};', {indent: 12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`;\n return code;\n\n\n function assignInsertionQuadIndex(indentCount) {\n let insertionCode = [];\n let indent = Array(indentCount + 1).join(' ');\n for (let i = 0; i < dimension; ++i) {\n insertionCode.push(indent + `if (${getVariableName(i)} > max_${getVariableName(i)}) {`);\n insertionCode.push(indent + ` quadIdx = quadIdx + ${Math.pow(2, i)};`);\n insertionCode.push(indent + ` min_${getVariableName(i)} = max_${getVariableName(i)};`);\n insertionCode.push(indent + ` max_${getVariableName(i)} = node.max_${getVariableName(i)};`);\n insertionCode.push(indent + `}`);\n }\n return insertionCode.join('\\n');\n // if (x > max_x) { // somewhere in the eastern part.\n // quadIdx = quadIdx + 1;\n // left = right;\n // right = node.right;\n // }\n }\n\n function runRecursiveOnChildren() {\n let indent = Array(11).join(' ');\n let recursiveCode = [];\n for (let i = 0; i < quadCount; ++i) {\n recursiveCode.push(indent + `if (node.quad${i}) {`);\n recursiveCode.push(indent + ` queue[pushIdx] = node.quad${i};`);\n recursiveCode.push(indent + ` queueLength += 1;`);\n recursiveCode.push(indent + ` pushIdx += 1;`);\n recursiveCode.push(indent + `}`);\n }\n return recursiveCode.join('\\n');\n // if (node.quad0) {\n // queue[pushIdx] = node.quad0;\n // queueLength += 1;\n // pushIdx += 1;\n // }\n }\n\n function assignQuads(indent) {\n // this.quad0 = null;\n // this.quad1 = null;\n // this.quad2 = null;\n // this.quad3 = null;\n let quads = [];\n for (let i = 0; i < quadCount; ++i) {\n quads.push(`${indent}quad${i} = null;`);\n }\n return quads.join('\\n');\n }\n}\n\nfunction isSamePosition(dimension) {\n let pattern = createPatternBuilder(dimension);\n return `\n function isSamePosition(point1, point2) {\n ${pattern('var d{var} = Math.abs(point1.{var} - point2.{var});', {indent: 2})}\n \n return ${pattern('d{var} < 1e-8', {join: ' && '})};\n } \n`;\n}\n\nfunction setChildBodyCode(dimension) {\n var quadCount = Math.pow(2, dimension);\n return `\nfunction setChild(node, idx, child) {\n ${setChildBody()}\n}`;\n function setChildBody() {\n let childBody = [];\n for (let i = 0; i < quadCount; ++i) {\n let prefix = (i === 0) ? ' ' : ' else ';\n childBody.push(`${prefix}if (idx === ${i}) node.quad${i} = child;`);\n }\n\n return childBody.join('\\n');\n // if (idx === 0) node.quad0 = child;\n // else if (idx === 1) node.quad1 = child;\n // else if (idx === 2) node.quad2 = child;\n // else if (idx === 3) node.quad3 = child;\n }\n}\n\nfunction getChildBodyCode(dimension) {\n return `function getChild(node, idx) {\n${getChildBody()}\n return null;\n}`;\n\n function getChildBody() {\n let childBody = [];\n let quadCount = Math.pow(2, dimension);\n for (let i = 0; i < quadCount; ++i) {\n childBody.push(` if (idx === ${i}) return node.quad${i};`);\n }\n\n return childBody.join('\\n');\n // if (idx === 0) return node.quad0;\n // if (idx === 1) return node.quad1;\n // if (idx === 2) return node.quad2;\n // if (idx === 3) return node.quad3;\n }\n}\n\nfunction getQuadNodeCode(dimension) {\n let pattern = createPatternBuilder(dimension);\n let quadCount = Math.pow(2, dimension);\n var quadNodeCode = `\nfunction QuadNode() {\n // body stored inside this node. In quad tree only leaf nodes (by construction)\n // contain bodies:\n this.body = null;\n\n // Child nodes are stored in quads. Each quad is presented by number:\n // 0 | 1\n // -----\n // 2 | 3\n${assignQuads(' this.')}\n\n // Total mass of current node\n this.mass = 0;\n\n // Center of mass coordinates\n ${pattern('this.mass_{var} = 0;', {indent: 2})}\n\n // bounding box coordinates\n ${pattern('this.min_{var} = 0;', {indent: 2})}\n ${pattern('this.max_{var} = 0;', {indent: 2})}\n}\n`;\n return quadNodeCode;\n\n function assignQuads(indent) {\n // this.quad0 = null;\n // this.quad1 = null;\n // this.quad2 = null;\n // this.quad3 = null;\n let quads = [];\n for (let i = 0; i < quadCount; ++i) {\n quads.push(`${indent}quad${i} = null;`);\n }\n return quads.join('\\n');\n }\n}\n\nfunction getInsertStackCode() {\n return `\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n`;\n}","\nmodule.exports = generateBoundsFunction;\nmodule.exports.generateFunctionBody = generateBoundsFunctionBody;\n\nconst createPatternBuilder = require('./createPatternBuilder');\n\nfunction generateBoundsFunction(dimension) {\n let code = generateBoundsFunctionBody(dimension);\n return new Function('bodies', 'settings', 'random', code);\n}\n\nfunction generateBoundsFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n\n let code = `\n var boundingBox = {\n ${pattern('min_{var}: 0, max_{var}: 0,', {indent: 4})}\n };\n\n return {\n box: boundingBox,\n\n update: updateBoundingBox,\n\n reset: resetBoundingBox,\n\n getBestNewPosition: function (neighbors) {\n var ${pattern('base_{var} = 0', {join: ', '})};\n\n if (neighbors.length) {\n for (var i = 0; i < neighbors.length; ++i) {\n let neighborPos = neighbors[i].pos;\n ${pattern('base_{var} += neighborPos.{var};', {indent: 10})}\n }\n\n ${pattern('base_{var} /= neighbors.length;', {indent: 8})}\n } else {\n ${pattern('base_{var} = (boundingBox.min_{var} + boundingBox.max_{var}) / 2;', {indent: 8})}\n }\n\n var springLength = settings.springLength;\n return {\n ${pattern('{var}: base_{var} + (random.nextDouble() - 0.5) * springLength,', {indent: 8})}\n };\n }\n };\n\n function updateBoundingBox() {\n var i = bodies.length;\n if (i === 0) return; // No bodies - no borders.\n\n ${pattern('var max_{var} = -Infinity;', {indent: 4})}\n ${pattern('var min_{var} = Infinity;', {indent: 4})}\n\n while(i--) {\n // this is O(n), it could be done faster with quadtree, if we check the root node bounds\n var bodyPos = bodies[i].pos;\n ${pattern('if (bodyPos.{var} < min_{var}) min_{var} = bodyPos.{var};', {indent: 6})}\n ${pattern('if (bodyPos.{var} > max_{var}) max_{var} = bodyPos.{var};', {indent: 6})}\n }\n\n ${pattern('boundingBox.min_{var} = min_{var};', {indent: 4})}\n ${pattern('boundingBox.max_{var} = max_{var};', {indent: 4})}\n }\n\n function resetBoundingBox() {\n ${pattern('boundingBox.min_{var} = boundingBox.max_{var} = 0;', {indent: 4})}\n }\n`;\n return code;\n}\n","const createPatternBuilder = require('./createPatternBuilder');\n\nmodule.exports = generateCreateDragForceFunction;\nmodule.exports.generateCreateDragForceFunctionBody = generateCreateDragForceFunctionBody;\n\nfunction generateCreateDragForceFunction(dimension) {\n let code = generateCreateDragForceFunctionBody(dimension);\n return new Function('options', code);\n}\n\nfunction generateCreateDragForceFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n let code = `\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ${pattern('body.force.{var} -= options.dragCoefficient * body.velocity.{var};', {indent: 6})}\n }\n };\n`;\n return code;\n}\n","const createPatternBuilder = require('./createPatternBuilder');\n\nmodule.exports = generateCreateSpringForceFunction;\nmodule.exports.generateCreateSpringForceFunctionBody = generateCreateSpringForceFunctionBody;\n\nfunction generateCreateSpringForceFunction(dimension) {\n let code = generateCreateSpringForceFunctionBody(dimension);\n return new Function('options', 'random', code);\n}\n\nfunction generateCreateSpringForceFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n let code = `\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ${pattern('var d{var} = body2.pos.{var} - body1.pos.{var};', {indent: 6})}\n var r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n\n if (r === 0) {\n ${pattern('d{var} = (random.nextDouble() - 0.5) / 50;', {indent: 8})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ${pattern('body1.force.{var} += coefficient * d{var}', {indent: 6})};\n body1.springCount += 1;\n body1.springLength += r;\n\n ${pattern('body2.force.{var} -= coefficient * d{var}', {indent: 6})};\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n`;\n return code;\n}\n","const createPatternBuilder = require('./createPatternBuilder');\n\nmodule.exports = generateIntegratorFunction;\nmodule.exports.generateIntegratorFunctionBody = generateIntegratorFunctionBody;\n\nfunction generateIntegratorFunction(dimension) {\n let code = generateIntegratorFunctionBody(dimension);\n return new Function('bodies', 'timeStep', 'adaptiveTimeStepWeight', code);\n}\n\nfunction generateIntegratorFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n let code = `\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${pattern('var d{var} = 0, t{var} = 0;', {indent: 2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${pattern('body.velocity.{var} += coeff * body.force.{var};', {indent: 4})}\n ${pattern('var v{var} = body.velocity.{var};', {indent: 4})}\n var v = Math.sqrt(${pattern('v{var} * v{var}', {join: ' + '})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${pattern('body.velocity.{var} = v{var} / v;', {indent: 6})}\n }\n\n ${pattern('d{var} = timeStep * body.velocity.{var};', {indent: 4})}\n\n ${pattern('body.pos.{var} += d{var};', {indent: 4})}\n\n ${pattern('t{var} += Math.abs(d{var});', {indent: 4})}\n }\n\n return (${pattern('t{var} * t{var}', {join: ' + '})})/length;\n`;\n return code;\n}\n","module.exports = Spring;\n\n/**\n * Represents a physical spring. Spring connects two bodies, has rest length\n * stiffness coefficient and optional weight\n */\nfunction Spring(fromBody, toBody, length, springCoefficient) {\n this.from = fromBody;\n this.to = toBody;\n this.length = length;\n this.coefficient = springCoefficient;\n}\n","module.exports = merge;\n\n/**\n * Augments `target` with properties in `options`. Does not override\n * target's properties if they are defined and matches expected type in \n * options\n *\n * @returns {Object} merged object\n */\nfunction merge(target, options) {\n var key;\n if (!target) { target = {}; }\n if (options) {\n for (key in options) {\n if (options.hasOwnProperty(key)) {\n var targetHasIt = target.hasOwnProperty(key),\n optionsValueType = typeof options[key],\n shouldReplace = !targetHasIt || (typeof target[key] !== optionsValueType);\n\n if (shouldReplace) {\n target[key] = options[key];\n } else if (optionsValueType === 'object') {\n // go deep, don't care about loops here, we are simple API!:\n target[key] = merge(target[key], options[key]);\n }\n }\n }\n }\n\n return target;\n}\n","module.exports = random;\n\n// TODO: Deprecate?\nmodule.exports.random = random,\nmodule.exports.randomIterator = randomIterator\n\n/**\n * Creates seeded PRNG with two methods:\n * next() and nextDouble()\n */\nfunction random(inputSeed) {\n var seed = typeof inputSeed === 'number' ? inputSeed : (+new Date());\n return new Generator(seed)\n}\n\nfunction Generator(seed) {\n this.seed = seed;\n}\n\n/**\n * Generates random integer number in the range from 0 (inclusive) to maxValue (exclusive)\n *\n * @param maxValue Number REQUIRED. Omitting this number will result in NaN values from PRNG.\n */\nGenerator.prototype.next = next;\n\n/**\n * Generates random double number in the range from 0 (inclusive) to 1 (exclusive)\n * This function is the same as Math.random() (except that it could be seeded)\n */\nGenerator.prototype.nextDouble = nextDouble;\n\n/**\n * Returns a random real number from uniform distribution in [0, 1)\n */\nGenerator.prototype.uniform = nextDouble;\n\n/**\n * Returns a random real number from a Gaussian distribution\n * with 0 as a mean, and 1 as standard deviation u ~ N(0,1)\n */\nGenerator.prototype.gaussian = gaussian;\n\nfunction gaussian() {\n // use the polar form of the Box-Muller transform\n // based on https://introcs.cs.princeton.edu/java/23recursion/StdRandom.java\n var r, x, y;\n do {\n x = this.nextDouble() * 2 - 1;\n y = this.nextDouble() * 2 - 1;\n r = x * x + y * y;\n } while (r >= 1 || r === 0);\n\n return x * Math.sqrt(-2 * Math.log(r)/r);\n}\n\n/**\n * See https://twitter.com/anvaka/status/1296182534150135808\n */\nGenerator.prototype.levy = levy;\n\nfunction levy() {\n var beta = 3 / 2;\n var sigma = Math.pow(\n gamma( 1 + beta ) * Math.sin(Math.PI * beta / 2) / \n (gamma((1 + beta) / 2) * beta * Math.pow(2, (beta - 1) / 2)),\n 1/beta\n );\n return this.gaussian() * sigma / Math.pow(Math.abs(this.gaussian()), 1/beta);\n}\n\n// gamma function approximation\nfunction gamma(z) {\n return Math.sqrt(2 * Math.PI / z) * Math.pow((1 / Math.E) * (z + 1 / (12 * z - 1 / (10 * z))), z);\n}\n\nfunction nextDouble() {\n var seed = this.seed;\n // Robert Jenkins' 32 bit integer hash function.\n seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff;\n seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff;\n seed = ((seed + 0x165667b1) + (seed << 5)) & 0xffffffff;\n seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff;\n seed = ((seed + 0xfd7046c5) + (seed << 3)) & 0xffffffff;\n seed = ((seed ^ 0xb55a4f09) ^ (seed >>> 16)) & 0xffffffff;\n this.seed = seed;\n return (seed & 0xfffffff) / 0x10000000;\n}\n\nfunction next(maxValue) {\n return Math.floor(this.nextDouble() * maxValue);\n}\n\n/*\n * Creates iterator over array, which returns items of array in random order\n * Time complexity is guaranteed to be O(n);\n */\nfunction randomIterator(array, customRandom) {\n var localRandom = customRandom || random();\n if (typeof localRandom.next !== 'function') {\n throw new Error('customRandom does not match expected API: next() function is missing');\n }\n\n return {\n forEach: forEach,\n\n /**\n * Shuffles array randomly, in place.\n */\n shuffle: shuffle\n };\n\n function shuffle() {\n var i, j, t;\n for (i = array.length - 1; i > 0; --i) {\n j = localRandom.next(i + 1); // i inclusive\n t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n\n return array;\n }\n\n function forEach(callback) {\n var i, j, t;\n for (i = array.length - 1; i > 0; --i) {\n j = localRandom.next(i + 1); // i inclusive\n t = array[j];\n array[j] = array[i];\n array[i] = t;\n\n callback(t);\n }\n\n if (array.length) {\n callback(array[0]);\n }\n }\n}","var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");var _interopRequireWildcard=require(\"@babel/runtime/helpers/interopRequireWildcard\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));var _extends2=_interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));var _defineProperty2=_interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));var _slicedToArray2=_interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));var _objectWithoutProperties2=_interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));var _react=_interopRequireWildcard(require(\"react\"));var _reactNative=require(\"react-native\");var _jsxFileName=\"/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/RNCSliderNativeComponent.web.js\";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(source,true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(source).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var RCTSliderWebComponent=_react.default.forwardRef(function(_ref,forwardedRef){var initialValue=_ref.value,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?0:_ref$maximumValue,_ref$step=_ref.step,step=_ref$step===void 0?1:_ref$step,_ref$minimumTrackTint=_ref.minimumTrackTintColor,minimumTrackTintColor=_ref$minimumTrackTint===void 0?'#009688':_ref$minimumTrackTint,_ref$maximumTrackTint=_ref.maximumTrackTintColor,maximumTrackTintColor=_ref$maximumTrackTint===void 0?'#939393':_ref$maximumTrackTint,_ref$thumbTintColor=_ref.thumbTintColor,thumbTintColor=_ref$thumbTintColor===void 0?'#009688':_ref$thumbTintColor,_ref$thumbStyle=_ref.thumbStyle,thumbStyle=_ref$thumbStyle===void 0?{}:_ref$thumbStyle,_ref$style=_ref.style,style=_ref$style===void 0?[]:_ref$style,_ref$inverted=_ref.inverted,inverted=_ref$inverted===void 0?false:_ref$inverted,_ref$enabled=_ref.enabled,enabled=_ref$enabled===void 0?true:_ref$enabled,_ref$trackHeight=_ref.trackHeight,trackHeight=_ref$trackHeight===void 0?4:_ref$trackHeight,_ref$thumbSize=_ref.thumbSize,thumbSize=_ref$thumbSize===void 0?20:_ref$thumbSize,_ref$onRNCSliderSlidi=_ref.onRNCSliderSlidingStart,onRNCSliderSlidingStart=_ref$onRNCSliderSlidi===void 0?function(){}:_ref$onRNCSliderSlidi,_ref$onRNCSliderSlidi2=_ref.onRNCSliderSlidingComplete,onRNCSliderSlidingComplete=_ref$onRNCSliderSlidi2===void 0?function(){}:_ref$onRNCSliderSlidi2,_ref$onRNCSliderValue=_ref.onRNCSliderValueChange,onRNCSliderValueChange=_ref$onRNCSliderValue===void 0?function(){}:_ref$onRNCSliderValue,others=(0,_objectWithoutProperties2.default)(_ref,[\"value\",\"minimumValue\",\"maximumValue\",\"step\",\"minimumTrackTintColor\",\"maximumTrackTintColor\",\"thumbTintColor\",\"thumbStyle\",\"style\",\"inverted\",\"enabled\",\"trackHeight\",\"thumbSize\",\"onRNCSliderSlidingStart\",\"onRNCSliderSlidingComplete\",\"onRNCSliderValueChange\"]);var onValueChange=(0,_react.useCallback)(function(value){onRNCSliderValueChange&&onRNCSliderValueChange({nativeEvent:{fromUser:true,value:value}});},[onRNCSliderValueChange]);var onSlidingStart=(0,_react.useCallback)(function(value){onRNCSliderSlidingStart&&onRNCSliderSlidingStart({nativeEvent:{fromUser:true,value:value}});},[onRNCSliderSlidingStart]);var onSlidingComplete=(0,_react.useCallback)(function(value){onRNCSliderSlidingComplete&&onRNCSliderSlidingComplete({nativeEvent:{fromUser:true,value:value}});},[onRNCSliderSlidingComplete]);var containerSize=_react.default.useRef({width:0,height:0});var containerRef=forwardedRef||_react.default.createRef();var _React$useState=_react.default.useState(initialValue||minimumValue),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];_react.default.useLayoutEffect(function(){return _updateValue(initialValue);},[initialValue,_updateValue]);var percentageValue=(value-minimumValue)/(maximumValue-minimumValue);var minPercent=percentageValue;var maxPercent=1-percentageValue;var containerStyle=_reactNative.StyleSheet.compose({flexGrow:1,flexShrink:1,flexBasis:'auto',flexDirection:'row',userSelect:'none',alignItems:'center',cursor:'pointer'},style);var trackStyle={height:trackHeight,borderRadius:trackHeight/2,userSelect:'none'};var minimumTrackStyle=_objectSpread({},trackStyle,{backgroundColor:minimumTrackTintColor,flexGrow:minPercent*100});var maximumTrackStyle=_objectSpread({},trackStyle,{backgroundColor:maximumTrackTintColor,flexGrow:maxPercent*100});var thumbViewStyle=_reactNative.StyleSheet.compose({width:thumbSize,height:thumbSize,backgroundColor:thumbTintColor,zIndex:1,borderRadius:thumbSize/2,overflow:'hidden',userSelect:'none'},thumbStyle);var decimalPrecision=_react.default.useRef(calculatePrecision(minimumValue,maximumValue,step));_react.default.useEffect(function(){decimalPrecision.current=calculatePrecision(minimumValue,maximumValue,step);},[maximumValue,minimumValue,step]);var _updateValue=(0,_react.useCallback)(function(newValue){var hardRounded=decimalPrecision.current<20?Number.parseFloat(newValue.toFixed(decimalPrecision.current)):newValue;var withinBounds=Math.max(minimumValue,Math.min(hardRounded,maximumValue));if(value!==withinBounds){setValue(withinBounds);onValueChange(withinBounds);}},[minimumValue,maximumValue,value,onValueChange]);var onTouchEnd=function onTouchEnd(){onSlidingComplete(value);};var onMove=function onMove(event){var x=event.nativeEvent.locationX;var width=containerSize.current?containerSize.current.width:1;var newValue=inverted?maximumValue-(maximumValue-minimumValue)*x/width:minimumValue+(maximumValue-minimumValue)*x/width;var roundedValue=step?Math.round(newValue/step)*step:newValue;_updateValue(roundedValue);};var accessibilityActions=function accessibilityActions(event){var tenth=(maximumValue-minimumValue)/10;switch(event.nativeEvent.actionName){case'increment':_updateValue(value+(step||tenth));break;case'decrement':_updateValue(value-(step||tenth));break;}};var handleAccessibilityKeys=function handleAccessibilityKeys(key){switch(key){case'ArrowUp':case'ArrowRight':accessibilityActions({nativeEvent:{actionName:'increment'}});break;case'ArrowDown':case'ArrowLeft':accessibilityActions({nativeEvent:{actionName:'decrement'}});break;}};_react.default.useImperativeHandle(forwardedRef,function(){return{updateValue:function updateValue(val){_updateValue(val);}};},[_updateValue]);return _react.default.createElement(_reactNative.View,(0,_extends2.default)({ref:containerRef,onLayout:function onLayout(_ref2){var nativeEvent=_ref2.nativeEvent;return containerSize.current=nativeEvent.layout;},accessibilityActions:[{name:'increment',label:'increment'},{name:'decrement',label:'decrement'}],onAccessibilityAction:accessibilityActions,accessible:true,accessibleValue:value,accessibilityRole:'adjustable',style:containerStyle,onStartShouldSetResponder:function onStartShouldSetResponder(){return enabled;},onMoveShouldSetResponder:function onMoveShouldSetResponder(){return enabled;},onResponderGrant:function onResponderGrant(){return onSlidingStart(value);},onResponderRelease:onTouchEnd,onResponderMove:onMove,onKeyDown:function onKeyDown(_ref3){var key=_ref3.nativeEvent.key;return handleAccessibilityKeys(key);}},others,{__source:{fileName:_jsxFileName,lineNumber:324}}),_react.default.createElement(_reactNative.View,{pointerEvents:\"none\",style:minimumTrackStyle,__source:{fileName:_jsxFileName,lineNumber:345}}),_react.default.createElement(_reactNative.View,{pointerEvents:\"none\",style:thumbViewStyle,__source:{fileName:_jsxFileName,lineNumber:346}}),_react.default.createElement(_reactNative.View,{pointerEvents:\"none\",style:maximumTrackStyle,__source:{fileName:_jsxFileName,lineNumber:347}}));});function calculatePrecision(minimumValue,maximumValue,step){if(!step){return Infinity;}else{var decimals=[minimumValue,maximumValue,step].map(function(value){return((value+'').split('.').pop()||'').length;});return Math.max.apply(Math,(0,_toConsumableArray2.default)(decimals));}}RCTSliderWebComponent.displayName='RTCSliderWebComponent';var _default=RCTSliderWebComponent;exports.default=_default;","var _typeof = require(\"@babel/runtime/helpers/typeof\")[\"default\"];\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\n\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nmodule.exports = _interopRequireWildcard;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nmodule.exports = _isNativeFunction;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct.js\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","var _concat = /*#__PURE__*/require('./internal/_concat');\n\nvar _createPartialApplicator = /*#__PURE__*/require('./internal/_createPartialApplicator');\n\n/**\n * Takes a function `f` and a list of arguments, and returns a function `g`.\n * When applied, `g` returns the result of applying `f` to the arguments\n * provided initially followed by the arguments provided to `g`.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Function\n * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x)\n * @param {Function} f\n * @param {Array} args\n * @return {Function}\n * @see R.partialRight\n * @example\n *\n * var multiply2 = (a, b) => a * b;\n * var double = R.partial(multiply2, [2]);\n * double(2); //=> 4\n *\n * var greet = (salutation, title, firstName, lastName) =>\n * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!';\n *\n * var sayHello = R.partial(greet, ['Hello']);\n * var sayHelloToMs = R.partial(sayHello, ['Ms.']);\n * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!'\n * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d)\n */\n\n\nvar partial = /*#__PURE__*/_createPartialApplicator(_concat);\nmodule.exports = partial;","/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nfunction _concat(set1, set2) {\n set1 = set1 || [];\n set2 = set2 || [];\n var idx;\n var len1 = set1.length;\n var len2 = set2.length;\n var result = [];\n\n idx = 0;\n while (idx < len1) {\n result[result.length] = set1[idx];\n idx += 1;\n }\n idx = 0;\n while (idx < len2) {\n result[result.length] = set2[idx];\n idx += 1;\n }\n return result;\n}\nmodule.exports = _concat;","var _arity = /*#__PURE__*/require('./_arity');\n\nvar _curry2 = /*#__PURE__*/require('./_curry2');\n\nfunction _createPartialApplicator(concat) {\n return _curry2(function (fn, args) {\n return _arity(Math.max(0, fn.length - args.length), function () {\n return fn.apply(this, concat(args, arguments));\n });\n });\n}\nmodule.exports = _createPartialApplicator;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar curryN = /*#__PURE__*/require('./curryN');\n\n/**\n * Returns a curried equivalent of the provided function. The curried function\n * has two unusual capabilities. First, its arguments needn't be provided one\n * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (* -> a) -> (* -> a)\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curryN\n * @example\n *\n * var addFourNumbers = (a, b, c, d) => a + b + c + d;\n *\n * var curriedAddFourNumbers = R.curry(addFourNumbers);\n * var f = curriedAddFourNumbers(1, 2);\n * var g = f(3);\n * g(4); //=> 10\n */\n\n\nvar curry = /*#__PURE__*/_curry1(function curry(fn) {\n return curryN(fn.length, fn);\n});\nmodule.exports = curry;","var _arity = /*#__PURE__*/require('./_arity');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curryN(length, received, fn) {\n return function () {\n var combined = [];\n var argsIdx = 0;\n var left = length;\n var combinedIdx = 0;\n while (combinedIdx < received.length || argsIdx < arguments.length) {\n var result;\n if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {\n result = received[combinedIdx];\n } else {\n result = arguments[argsIdx];\n argsIdx += 1;\n }\n combined[combinedIdx] = result;\n if (!_isPlaceholder(result)) {\n left -= 1;\n }\n combinedIdx += 1;\n }\n return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn));\n };\n}\nmodule.exports = _curryN;","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _pipeP = /*#__PURE__*/require('./internal/_pipeP');\n\nvar reduce = /*#__PURE__*/require('./reduce');\n\nvar tail = /*#__PURE__*/require('./tail');\n\n/**\n * Performs left-to-right composition of one or more Promise-returning\n * functions. The leftmost function may have any arity; the remaining functions\n * must be unary.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Function\n * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.composeP\n * @example\n *\n * // followersForUser :: String -> Promise [User]\n * var followersForUser = R.pipeP(db.getUserById, db.getFollowers);\n */\n\n\nfunction pipeP() {\n if (arguments.length === 0) {\n throw new Error('pipeP requires at least one argument');\n }\n return _arity(arguments[0].length, reduce(_pipeP, arguments[0], tail(arguments)));\n}\nmodule.exports = pipeP;","function _pipeP(f, g) {\n return function () {\n var ctx = this;\n return f.apply(ctx, arguments).then(function (x) {\n return g.call(ctx, x);\n });\n };\n}\nmodule.exports = _pipeP;","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _isArray = /*#__PURE__*/require('./_isArray');\n\nvar _isString = /*#__PURE__*/require('./_isString');\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n */\n\n\nvar _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n if (!x) {\n return false;\n }\n if (typeof x !== 'object') {\n return false;\n }\n if (_isString(x)) {\n return false;\n }\n if (x.nodeType === 1) {\n return !!x.length;\n }\n if (x.length === 0) {\n return true;\n }\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n return false;\n});\nmodule.exports = _isArrayLike;","function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}\nmodule.exports = _isString;","var XWrap = /*#__PURE__*/function () {\n function XWrap(fn) {\n this.f = fn;\n }\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n\n return XWrap;\n}();\n\nfunction _xwrap(fn) {\n return new XWrap(fn);\n}\nmodule.exports = _xwrap;","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * var log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\n\n\nvar bind = /*#__PURE__*/_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\nmodule.exports = bind;","var _checkForMethod = /*#__PURE__*/require('./internal/_checkForMethod');\n\nvar _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar slice = /*#__PURE__*/require('./slice');\n\n/**\n * Returns all but the first element of the given list or string (or object\n * with a `tail` method).\n *\n * Dispatches to the `slice` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.head, R.init, R.last\n * @example\n *\n * R.tail([1, 2, 3]); //=> [2, 3]\n * R.tail([1, 2]); //=> [2]\n * R.tail([1]); //=> []\n * R.tail([]); //=> []\n *\n * R.tail('abc'); //=> 'bc'\n * R.tail('ab'); //=> 'b'\n * R.tail('a'); //=> ''\n * R.tail(''); //=> ''\n */\n\n\nvar tail = /*#__PURE__*/_curry1( /*#__PURE__*/_checkForMethod('tail', /*#__PURE__*/slice(1, Infinity)));\nmodule.exports = tail;","var _checkForMethod = /*#__PURE__*/require('./internal/_checkForMethod');\n\nvar _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\n/**\n * Returns the elements of the given list or string (or object with a `slice`\n * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).\n *\n * Dispatches to the `slice` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @sig Number -> Number -> String -> String\n * @param {Number} fromIndex The start index (inclusive).\n * @param {Number} toIndex The end index (exclusive).\n * @param {*} list\n * @return {*}\n * @example\n *\n * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']\n * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']\n * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(0, 3, 'ramda'); //=> 'ram'\n */\n\n\nvar slice = /*#__PURE__*/_curry3( /*#__PURE__*/_checkForMethod('slice', function slice(fromIndex, toIndex, list) {\n return Array.prototype.slice.call(list, fromIndex, toIndex);\n}));\nmodule.exports = slice;","var _has = /*#__PURE__*/require('./_has');\n\nvar toString = Object.prototype.toString;\nvar _isArguments = function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n};\n\nmodule.exports = _isArguments;","var _checkForMethod = /*#__PURE__*/require('./internal/_checkForMethod');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Iterate over an input `list`, calling a provided function `fn` for each\n * element in the list.\n *\n * `fn` receives one argument: *(value)*.\n *\n * Note: `R.forEach` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.forEach` method. For more\n * details on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description\n *\n * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns\n * the original array. In some libraries this function is named `each`.\n *\n * Dispatches to the `forEach` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> *) -> [a] -> [a]\n * @param {Function} fn The function to invoke. Receives one argument, `value`.\n * @param {Array} list The list to iterate over.\n * @return {Array} The original list.\n * @see R.addIndex\n * @example\n *\n * var printXPlusFive = x => console.log(x + 5);\n * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3]\n * // logs 6\n * // logs 7\n * // logs 8\n * @symb R.forEach(f, [a, b, c]) = [a, b, c]\n */\n\n\nvar forEach = /*#__PURE__*/_curry2( /*#__PURE__*/_checkForMethod('forEach', function forEach(fn, list) {\n var len = list.length;\n var idx = 0;\n while (idx < len) {\n fn(list[idx]);\n idx += 1;\n }\n return list;\n}));\nmodule.exports = forEach;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns a new object that does not contain a `prop` property.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Object\n * @sig String -> {k: v} -> {k: v}\n * @param {String} prop The name of the property to dissociate\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original but without the specified property\n * @see R.assoc\n * @example\n *\n * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3}\n */\n\n\nvar dissoc = /*#__PURE__*/_curry2(function dissoc(prop, obj) {\n var result = {};\n for (var p in obj) {\n result[p] = obj[p];\n }\n delete result[prop];\n return result;\n});\nmodule.exports = dissoc;","var _assign = /*#__PURE__*/require('./internal/_assign');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @example\n *\n * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * var resetToDefault = R.merge(R.__, {x: 0});\n * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2}\n * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 }\n */\n\n\nvar merge = /*#__PURE__*/_curry2(function merge(l, r) {\n return _assign({}, l, r);\n});\nmodule.exports = merge;","var _objectAssign = /*#__PURE__*/require('./_objectAssign');\n\nmodule.exports = typeof Object.assign === 'function' ? Object.assign : _objectAssign;","var _has = /*#__PURE__*/require('./_has');\n\n// Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\n\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n while (idx < length) {\n var source = arguments[idx];\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n idx += 1;\n }\n return output;\n}\nmodule.exports = _objectAssign;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar path = /*#__PURE__*/require('./path');\n\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig s -> {s: a} -> a | Undefined\n * @param {String} p The property name\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n */\n\nvar prop = /*#__PURE__*/_curry2(function prop(p, obj) {\n return path([p], obj);\n});\nmodule.exports = prop;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Retrieve the value at a given path.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> {a} -> a | Undefined\n * @param {Array} path The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path`.\n * @see R.prop\n * @example\n *\n * R.path(['a', 'b'], {a: {b: 2}}); //=> 2\n * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined\n */\n\n\nvar path = /*#__PURE__*/_curry2(function path(paths, obj) {\n var val = obj;\n var idx = 0;\n while (idx < paths.length) {\n if (val == null) {\n return;\n }\n val = val[paths[idx]];\n idx += 1;\n }\n return val;\n});\nmodule.exports = path;","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar curryN = /*#__PURE__*/require('./curryN');\n\n/**\n * Creates a function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *)\n * @param {Function} condition A predicate function\n * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value.\n * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value.\n * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n * @see R.unless, R.when\n * @example\n *\n * var incCount = R.ifElse(\n * R.has('count'),\n * R.over(R.lensProp('count'), R.inc),\n * R.assoc('count', 1)\n * );\n * incCount({}); //=> { count: 1 }\n * incCount({ count: 1 }); //=> { count: 2 }\n */\n\n\nvar ifElse = /*#__PURE__*/_curry3(function ifElse(condition, onTrue, onFalse) {\n return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() {\n return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments);\n });\n});\nmodule.exports = ifElse;","var _contains = /*#__PURE__*/require('./internal/_contains');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n * R.contains(3, [1, 2, 3]); //=> true\n * R.contains(4, [1, 2, 3]); //=> false\n * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n * R.contains([42], [[42]]); //=> true\n */\n\n\nvar contains = /*#__PURE__*/_curry2(_contains);\nmodule.exports = contains;","var _indexOf = /*#__PURE__*/require('./_indexOf');\n\nfunction _contains(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}\nmodule.exports = _contains;","var equals = /*#__PURE__*/require('../equals');\n\nfunction _indexOf(list, a, idx) {\n var inf, item;\n // Array.prototype.indexOf doesn't exist below IE9\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n while (idx < list.length) {\n item = list[idx];\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n }\n // non-zero numbers can utilise Set\n return list.indexOf(a, idx);\n\n // all these types can utilise Set\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n }\n }\n // anything else not covered above, defer to R.equals\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n}\nmodule.exports = _indexOf;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar _equals = /*#__PURE__*/require('./internal/_equals');\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * var a = {}; a.v = a;\n * var b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\n\n\nvar equals = /*#__PURE__*/_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\nmodule.exports = equals;","var _arrayFromIterator = /*#__PURE__*/require('./_arrayFromIterator');\n\nvar _containsWith = /*#__PURE__*/require('./_containsWith');\n\nvar _functionName = /*#__PURE__*/require('./_functionName');\n\nvar _has = /*#__PURE__*/require('./_has');\n\nvar identical = /*#__PURE__*/require('../identical');\n\nvar keys = /*#__PURE__*/require('../keys');\n\nvar type = /*#__PURE__*/require('../type');\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparision of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n }\n\n // if *a* array contains any element that is not included in *b*\n return !_containsWith(function (b, aItem) {\n return !_containsWith(eq, aItem, b);\n }, b, a);\n}\n\nfunction _equals(a, b, stackA, stackB) {\n if (identical(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (a == null || b == null) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n break;\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && identical(a.valueOf(), b.valueOf()))) {\n return false;\n }\n break;\n case 'Date':\n if (!identical(a.valueOf(), b.valueOf())) {\n return false;\n }\n break;\n case 'Error':\n return a.name === b.name && a.message === b.message;\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n break;\n }\n\n var idx = stackA.length - 1;\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n\n idx = keysA.length - 1;\n while (idx >= 0) {\n var key = keysA[idx];\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n idx -= 1;\n }\n return true;\n}\nmodule.exports = _equals;","function _arrayFromIterator(iter) {\n var list = [];\n var next;\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n return list;\n}\nmodule.exports = _arrayFromIterator;","function _containsWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n idx += 1;\n }\n return false;\n}\nmodule.exports = _containsWith;","function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}\nmodule.exports = _functionName;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns true if its arguments are identical, false otherwise. Values are\n * identical if they reference the same memory. `NaN` is identical to `NaN`;\n * `0` and `-0` are not identical.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> a -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * var o = {};\n * R.identical(o, o); //=> true\n * R.identical(1, 1); //=> true\n * R.identical(1, '1'); //=> false\n * R.identical([], []); //=> false\n * R.identical(0, -0); //=> false\n * R.identical(NaN, NaN); //=> true\n */\n\n\nvar identical = /*#__PURE__*/_curry2(function identical(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n});\nmodule.exports = identical;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\n\n\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nmodule.exports = type;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns `true` if the first argument is greater than or equal to the second;\n * `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> Boolean\n * @param {Number} a\n * @param {Number} b\n * @return {Boolean}\n * @see R.lte\n * @example\n *\n * R.gte(2, 1); //=> true\n * R.gte(2, 2); //=> true\n * R.gte(2, 3); //=> false\n * R.gte('a', 'z'); //=> false\n * R.gte('z', 'a'); //=> true\n */\n\n\nvar gte = /*#__PURE__*/_curry2(function gte(a, b) {\n return a >= b;\n});\nmodule.exports = gte;","var always = /*#__PURE__*/require('./always');\n\n/**\n * A function that always returns `true`. Any passed in parameters are ignored.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig * -> Boolean\n * @param {*}\n * @return {Boolean}\n * @see R.always, R.F\n * @example\n *\n * R.T(); //=> true\n */\n\n\nvar T = /*#__PURE__*/always(true);\nmodule.exports = T;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * See if an object (`val`) is an instance of the supplied constructor. This\n * function will check up the inheritance chain, if any.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Type\n * @sig (* -> {*}) -> a -> Boolean\n * @param {Object} ctor A constructor\n * @param {*} val The value to test\n * @return {Boolean}\n * @example\n *\n * R.is(Object, {}); //=> true\n * R.is(Number, 1); //=> true\n * R.is(Object, 1); //=> false\n * R.is(String, 's'); //=> true\n * R.is(String, new String('')); //=> true\n * R.is(Object, new String('')); //=> true\n * R.is(Object, 's'); //=> false\n * R.is(Number, {}); //=> false\n */\n\n\nvar is = /*#__PURE__*/_curry2(function is(Ctor, val) {\n return val != null && val.constructor === Ctor || val instanceof Ctor;\n});\nmodule.exports = is;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar _identity = /*#__PURE__*/require('./internal/_identity');\n\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * var obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\n\n\nvar identity = /*#__PURE__*/_curry1(_identity);\nmodule.exports = identity;","function _identity(x) {\n return x;\n}\nmodule.exports = _identity;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\n\n\nvar isNil = /*#__PURE__*/_curry1(function isNil(x) {\n return x == null;\n});\nmodule.exports = isNil;","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar map = /*#__PURE__*/require('./map');\n\nvar max = /*#__PURE__*/require('./max');\n\nvar reduce = /*#__PURE__*/require('./reduce');\n\n/**\n * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.\n * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments\n * to `fn` are applied to each of the predicates in turn until one returns a\n * \"truthy\" value, at which point `fn` returns the result of applying its\n * arguments to the corresponding transformer. If none of the predicates\n * matches, `fn` returns undefined.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Logic\n * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *)\n * @param {Array} pairs A list of [predicate, transformer]\n * @return {Function}\n * @example\n *\n * var fn = R.cond([\n * [R.equals(0), R.always('water freezes at 0°C')],\n * [R.equals(100), R.always('water boils at 100°C')],\n * [R.T, temp => 'nothing special happens at ' + temp + '°C']\n * ]);\n * fn(0); //=> 'water freezes at 0°C'\n * fn(50); //=> 'nothing special happens at 50°C'\n * fn(100); //=> 'water boils at 100°C'\n */\n\n\nvar cond = /*#__PURE__*/_curry1(function cond(pairs) {\n var arity = reduce(max, 0, map(function (pair) {\n return pair[0].length;\n }, pairs));\n return _arity(arity, function () {\n var idx = 0;\n while (idx < pairs.length) {\n if (pairs[idx][0].apply(this, arguments)) {\n return pairs[idx][1].apply(this, arguments);\n }\n idx += 1;\n }\n });\n});\nmodule.exports = cond;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar _dispatchable = /*#__PURE__*/require('./internal/_dispatchable');\n\nvar _map = /*#__PURE__*/require('./internal/_map');\n\nvar _reduce = /*#__PURE__*/require('./internal/_reduce');\n\nvar _xmap = /*#__PURE__*/require('./internal/_xmap');\n\nvar curryN = /*#__PURE__*/require('./curryN');\n\nvar keys = /*#__PURE__*/require('./keys');\n\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex\n * @example\n *\n * var double = x => x * 2;\n *\n * R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\n\n\nvar map = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {\n switch (Object.prototype.toString.call(functor)) {\n case '[object Function]':\n return curryN(functor.length, function () {\n return fn.call(this, functor.apply(this, arguments));\n });\n case '[object Object]':\n return _reduce(function (acc, key) {\n acc[key] = fn(functor[key]);\n return acc;\n }, {}, keys(functor));\n default:\n return _map(fn, functor);\n }\n}));\nmodule.exports = map;","var _isArray = /*#__PURE__*/require('./_isArray');\n\nvar _isTransformer = /*#__PURE__*/require('./_isTransformer');\n\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer [xf] to return a new transformer (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} xf transducer to initialize if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\n\n\nfunction _dispatchable(methodNames, xf, fn) {\n return function () {\n if (arguments.length === 0) {\n return fn();\n }\n var args = Array.prototype.slice.call(arguments, 0);\n var obj = args.pop();\n if (!_isArray(obj)) {\n var idx = 0;\n while (idx < methodNames.length) {\n if (typeof obj[methodNames[idx]] === 'function') {\n return obj[methodNames[idx]].apply(obj, args);\n }\n idx += 1;\n }\n if (_isTransformer(obj)) {\n var transducer = xf.apply(null, args);\n return transducer(obj);\n }\n }\n return fn.apply(this, arguments);\n };\n}\nmodule.exports = _dispatchable;","function _isTransformer(obj) {\n return typeof obj['@@transducer/step'] === 'function';\n}\nmodule.exports = _isTransformer;","function _map(fn, functor) {\n var idx = 0;\n var len = functor.length;\n var result = Array(len);\n while (idx < len) {\n result[idx] = fn(functor[idx]);\n idx += 1;\n }\n return result;\n}\nmodule.exports = _map;","var _curry2 = /*#__PURE__*/require('./_curry2');\n\nvar _xfBase = /*#__PURE__*/require('./_xfBase');\n\nvar XMap = /*#__PURE__*/function () {\n\n function XMap(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n XMap.prototype['@@transducer/init'] = _xfBase.init;\n XMap.prototype['@@transducer/result'] = _xfBase.result;\n XMap.prototype['@@transducer/step'] = function (result, input) {\n return this.xf['@@transducer/step'](result, this.f(input));\n };\n\n return XMap;\n}();\n\nvar _xmap = /*#__PURE__*/_curry2(function _xmap(f, xf) {\n return new XMap(f, xf);\n});\nmodule.exports = _xmap;","module.exports = {\n init: function () {\n return this.xf['@@transducer/init']();\n },\n result: function (result) {\n return this.xf['@@transducer/result'](result);\n }\n};","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns the larger of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.maxBy, R.min\n * @example\n *\n * R.max(789, 123); //=> 789\n * R.max('a', 'b'); //=> 'b'\n */\n\n\nvar max = /*#__PURE__*/_curry2(function max(a, b) {\n return b > a ? b : a;\n});\nmodule.exports = max;","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLigf0exn/mkxuQjmELAAAAAD5Eq5atP6+rZeuPhGz9kZCtPxKy9fs6Zuuf60CfPn369OnTp0+fPn369OnTfx36X1vh+nO6/pytL+D1BCexy+iNhFPt6/dIOEiQIEGCBAkSJEiQ8B0k+PwoQYKhP2OXAYOvRo+vD38bvwcAAACABXF8ILs1PQqpAAAAAElFTkSuQmCC\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAB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jAtMDEtMDNUMTA6Mjg6NTIrMDA6MDD7fVVWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAxLTAzVDEwOjI4OjUyKzAwOjAwiiDt6gAAAABJRU5ErkJggg==\"","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\n\nvar reverseNames = {};\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (colorNames.hasOwnProperty(name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar keyword = /(\\D+)/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\n\t\tif (!rgb) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = (parseFloat(match[1]) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = num.toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator' ?\n\t\t\t\t'[]=' :\n\t\t\t\t'=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tcase 'bracket-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[\\])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null ?\n\t\t\t\t\t[] :\n\t\t\t\t\tvalue.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], arrayValue);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${encode(object.fragmentIdentifier, options)}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"node not found: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n nDim,\n count,\n bias,\n random,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x = 0, y = 0, z = 0, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle(random);\n if (nDim > 1) { y = target.y + target.vy - source.y - source.vy || jiggle(random); }\n if (nDim > 2) { z = target.z + target.vz - source.z - source.vz || jiggle(random); }\n l = Math.sqrt(x * x + y * y + z * z);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l, z *= l;\n\n target.vx -= x * (b = bias[i]);\n if (nDim > 1) { target.vy -= y * b; }\n if (nDim > 2) { target.vz -= z * b; }\n\n source.vx += x * (b = 1 - b);\n if (nDim > 1) { source.vy += y * b; }\n if (nDim > 2) { source.vz += z * b; }\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_nodes, ...args) {\n nodes = _nodes;\n random = args.find(arg => typeof arg === 'function') || Math.random;\n nDim = args.find(arg => [1, 2, 3].includes(arg)) || 2;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n","import {binarytree} from \"d3-binarytree\";\nimport {quadtree} from \"d3-quadtree\";\nimport {octree} from \"d3-octree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y, z} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n nDim,\n node,\n random,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i,\n n = nodes.length,\n tree =\n (nDim === 1 ? binarytree(nodes, x)\n :(nDim === 2 ? quadtree(nodes, x, y)\n :(nDim === 3 ? octree(nodes, x, y, z)\n :null\n ))).visitAfter(accumulate);\n\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(treeNode) {\n var strength = 0, q, c, weight = 0, x, y, z, i;\n var numChildren = treeNode.length;\n\n // For internal nodes, accumulate forces from children.\n if (numChildren) {\n for (x = y = z = i = 0; i < numChildren; ++i) {\n if ((q = treeNode[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * (q.x || 0), y += c * (q.y || 0), z += c * (q.z || 0);\n }\n }\n strength *= Math.sqrt(4 / numChildren); // scale accumulated strength according to number of dimensions\n\n treeNode.x = x / weight;\n if (nDim > 1) { treeNode.y = y / weight; }\n if (nDim > 2) { treeNode.z = z / weight; }\n }\n\n // For leaf nodes, accumulate forces from coincident nodes.\n else {\n q = treeNode;\n q.x = q.data.x;\n if (nDim > 1) { q.y = q.data.y; }\n if (nDim > 2) { q.z = q.data.z; }\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n treeNode.value = strength;\n }\n\n function apply(treeNode, x1, arg1, arg2, arg3) {\n if (!treeNode.value) return true;\n var x2 = [arg1, arg2, arg3][nDim-1];\n\n var x = treeNode.x - node.x,\n y = (nDim > 1 ? treeNode.y - node.y : 0),\n z = (nDim > 2 ? treeNode.z - node.z : 0),\n w = x2 - x1,\n l = x * x + y * y + z * z;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (nDim > 1 && y === 0) y = jiggle(random), l += y * y;\n if (nDim > 2 && z === 0) z = jiggle(random), l += z * z;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * treeNode.value * alpha / l;\n if (nDim > 1) { node.vy += y * treeNode.value * alpha / l; }\n if (nDim > 2) { node.vz += z * treeNode.value * alpha / l; }\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (treeNode.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (treeNode.data !== node || treeNode.next) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (nDim > 1 && y === 0) y = jiggle(random), l += y * y;\n if (nDim > 2 && z === 0) z = jiggle(random), l += z * z;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (treeNode.data !== node) {\n w = strengths[treeNode.data.index] * alpha / l;\n node.vx += x * w;\n if (nDim > 1) { node.vy += y * w; }\n if (nDim > 2) { node.vz += z * w; }\n } while (treeNode = treeNode.next);\n }\n\n force.initialize = function(_nodes, ...args) {\n nodes = _nodes;\n random = args.find(arg => typeof arg === 'function') || Math.random;\n nDim = args.find(arg => [1, 2, 3].includes(arg)) || 2;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n","export default function(x, y, z) {\n var nodes, strength = 1;\n\n if (x == null) x = 0;\n if (y == null) y = 0;\n if (z == null) z = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0,\n sz = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x || 0, sy += node.y || 0, sz += node.z || 0;\n }\n\n for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, sz = (sz / n - z) * strength, i = 0; i < n; ++i) {\n node = nodes[i];\n if (sx) { node.x -= sx }\n if (sy) { node.y -= sy; }\n if (sz) { node.z -= sz; }\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.z = function(_) {\n return arguments.length ? (z = +_, force) : z;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(radius, x, y, z) {\n var nodes,\n nDim,\n strength = constant(0.1),\n strengths,\n radiuses;\n\n if (typeof radius !== \"function\") radius = constant(+radius);\n if (x == null) x = 0;\n if (y == null) y = 0;\n if (z == null) z = 0;\n\n function force(alpha) {\n for (var i = 0, n = nodes.length; i < n; ++i) {\n var node = nodes[i],\n dx = node.x - x || 1e-6,\n dy = (node.y || 0) - y || 1e-6,\n dz = (node.z || 0) - z || 1e-6,\n r = Math.sqrt(dx * dx + dy * dy + dz * dz),\n k = (radiuses[i] - r) * strengths[i] * alpha / r;\n node.vx += dx * k;\n if (nDim>1) { node.vy += dy * k; }\n if (nDim>2) { node.vz += dz * k; }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n radiuses = new Array(n);\n for (i = 0; i < n; ++i) {\n radiuses[i] = +radius(nodes[i], i, nodes);\n strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(initNodes, ...args) {\n nodes = initNodes;\n nDim = args.find(arg => [1, 2, 3].includes(arg)) || 2;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.z = function(_) {\n return arguments.length ? (z = +_, force) : z;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(x) {\n var strength = constant(0.1),\n nodes,\n strengths,\n xz;\n\n if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n xz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(y) {\n var strength = constant(0.1),\n nodes,\n strengths,\n yz;\n\n if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n yz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(z) {\n var strength = constant(0.1),\n nodes,\n strengths,\n zz;\n\n if (typeof z !== \"function\") z = constant(z == null ? 0 : +z);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vz += (zz[i] - node.z) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n zz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(zz[i] = +z(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.z = function(_) {\n return arguments.length ? (z = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : z;\n };\n\n return force;\n}\n","import {binarytree} from \"d3-binarytree\";\nimport {quadtree} from \"d3-quadtree\";\nimport {octree} from \"d3-octree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nfunction z(d) {\n return d.z + d.vz;\n}\n\nexport default function(radius) {\n var nodes,\n nDim,\n radii,\n random,\n strength = 1,\n iterations = 1;\n\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i, n = nodes.length,\n tree,\n node,\n xi,\n yi,\n zi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree =\n (nDim === 1 ? binarytree(nodes, x)\n :(nDim === 2 ? quadtree(nodes, x, y)\n :(nDim === 3 ? octree(nodes, x, y, z)\n :null\n ))).visitAfter(prepare);\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n if (nDim > 1) { yi = node.y + node.vy; }\n if (nDim > 2) { zi = node.z + node.vz; }\n tree.visit(apply);\n }\n }\n\n function apply(treeNode, arg1, arg2, arg3, arg4, arg5, arg6) {\n var args = [arg1, arg2, arg3, arg4, arg5, arg6];\n var x0 = args[0],\n y0 = args[1],\n z0 = args[2],\n x1 = args[nDim],\n y1 = args[nDim+1],\n z1 = args[nDim+2];\n\n var data = treeNode.data, rj = treeNode.r, r = ri + rj;\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = (nDim > 1 ? yi - data.y - data.vy : 0),\n z = (nDim > 2 ? zi - data.z - data.vz : 0),\n l = x * x + y * y + z * z;\n if (l < r * r) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (nDim > 1 && y === 0) y = jiggle(random), l += y * y;\n if (nDim > 2 && z === 0) z = jiggle(random), l += z * z;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n if (nDim > 1) { node.vy += (y *= l) * r; }\n if (nDim > 2) { node.vz += (z *= l) * r; }\n\n data.vx -= x * (r = 1 - r);\n if (nDim > 1) { data.vy -= y * r; }\n if (nDim > 2) { data.vz -= z * r; }\n }\n }\n return;\n }\n return x0 > xi + r || x1 < xi - r\n || (nDim > 1 && (y0 > yi + r || y1 < yi - r))\n || (nDim > 2 && (z0 > zi + r || z1 < zi - r));\n }\n }\n\n function prepare(treeNode) {\n if (treeNode.data) return treeNode.r = radii[treeNode.data.index];\n for (var i = treeNode.r = 0; i < Math.pow(2, nDim); ++i) {\n if (treeNode[i] && treeNode[i].r > treeNode.r) {\n treeNode.r = treeNode[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n radii = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n\n force.initialize = function(_nodes, ...args) {\n nodes = _nodes;\n random = args.find(arg => typeof arg === 'function') || Math.random;\n nDim = args.find(arg => [1, 2, 3].includes(arg)) || 2;\n initialize();\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}\n","import Platform from '../Platform';\nimport { CodedError } from './CodedError';\n\n/**\n * A class for errors to be thrown when a property is accessed which is\n * unavailable, unsupported, or not currently implemented on the running\n * platform.\n */\nexport class UnavailabilityError extends CodedError {\n constructor(moduleName: string, propertyName: string) {\n super(\n 'ERR_UNAVAILABLE',\n `The method or property ${moduleName}.${propertyName} is not available on ${Platform.OS}, are you sure you've linked all the native dependencies properly?`\n );\n }\n}\n","import { EdgeInsets, Metrics } from './SafeArea.types';\n\nexport const initialWindowMetrics: Metrics | null = null;\n\n/**\n * @deprecated\n */\nexport const initialWindowSafeAreaInsets: EdgeInsets | null = null;\n","import * as React from 'react';\nimport { Animated, View, Platform, ViewProps } from 'react-native';\n\nlet Screens: typeof import('react-native-screens') | undefined;\n\ntry {\n Screens = require('react-native-screens');\n} catch (e) {\n // Ignore\n}\n\n// The web implementation in react-native-screens seems buggy.\n// The view doesn't become visible after coming back in some cases.\n// So we use our custom implementation.\nclass WebScreen extends React.Component<\n ViewProps & {\n active: number;\n children: React.ReactNode;\n }\n> {\n render() {\n const { active, style, ...rest } = this.props;\n\n return (\n <View\n // @ts-expect-error: hidden exists on web, but not in React Native\n hidden={!active}\n style={[style, { display: active ? 'flex' : 'none' }]}\n {...rest}\n />\n );\n }\n}\n\nconst AnimatedWebScreen = Animated.createAnimatedComponent(WebScreen);\n\n// @ts-ignore\nexport const shouldUseActivityState = Screens?.shouldUseActivityState;\n\nexport const MaybeScreenContainer = ({\n enabled,\n ...rest\n}: ViewProps & {\n enabled: boolean;\n children: React.ReactNode;\n}) => {\n if (enabled && Platform.OS !== 'web' && Screens?.screensEnabled()) {\n return (\n // @ts-ignore\n <Screens.ScreenContainer enabled={enabled} {...rest} />\n );\n }\n\n return <View {...rest} />;\n};\n\nexport const MaybeScreen = ({\n enabled,\n active,\n ...rest\n}: ViewProps & {\n enabled: boolean;\n active: 0 | 1 | 2 | Animated.AnimatedInterpolation;\n children: React.ReactNode;\n}) => {\n if (enabled && Platform.OS === 'web') {\n return <AnimatedWebScreen active={active} {...rest} />;\n }\n\n if (enabled && Screens?.screensEnabled()) {\n if (shouldUseActivityState) {\n return (\n // @ts-expect-error: there was an `active` prop and no `activityState` in older version and stackPresentation was required\n <Screens.Screen enabled={enabled} activityState={active} {...rest} />\n );\n } else {\n return (\n // @ts-expect-error: there was an `active` prop and no `activityState` in older version and stackPresentation was required\n <Screens.Screen enabled={enabled} active={active} {...rest} />\n );\n }\n }\n\n return <View {...rest} />;\n};\n","import * as React from 'react';\nimport { View } from 'react-native';\nimport type { PanGestureHandlerProperties } from 'react-native-gesture-handler';\n\nconst Dummy: any = ({ children }: { children: React.ReactNode }) => (\n <>{children}</>\n);\n\nexport const PanGestureHandler = Dummy as React.ComponentType<\n PanGestureHandlerProperties\n>;\n\nexport const GestureHandlerRootView = View;\n\nexport const GestureState = {\n UNDETERMINED: 0,\n FAILED: 1,\n BEGAN: 2,\n CANCELLED: 3,\n ACTIVE: 4,\n END: 5,\n};\n\nexport type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';\n","/**\n * Use a stub for MaskedView on all Platforms that don't support it.\n */\nimport type * as React from 'react';\n\ntype Props = {\n maskElement: React.ReactElement;\n children: React.ReactElement;\n};\n\nexport default function MaskedView({ children }: Props) {\n return children;\n}\n","/**\n * TouchableItem provides an abstraction on top of TouchableNativeFeedback and\n * TouchableOpacity to handle platform differences.\n *\n * On Android, you can pass the props of TouchableNativeFeedback.\n * On other platforms, you can pass the props of TouchableOpacity.\n */\nimport * as React from 'react';\nimport {\n Platform,\n TouchableNativeFeedback,\n TouchableOpacity,\n View,\n ViewProps,\n} from 'react-native';\n\nexport type Props = ViewProps & {\n pressColor?: string;\n disabled?: boolean;\n borderless?: boolean;\n delayPressIn?: number;\n onPress?: () => void;\n children: React.ReactNode;\n};\n\nconst ANDROID_VERSION_LOLLIPOP = 21;\n\nexport default function TouchableItem({\n borderless = false,\n pressColor = 'rgba(0, 0, 0, .32)',\n style,\n children,\n ...rest\n}: Props) {\n /*\n * TouchableNativeFeedback.Ripple causes a crash on old Android versions,\n * therefore only enable it on Android Lollipop and above.\n *\n * All touchables on Android should have the ripple effect according to\n * platform design guidelines.\n * We need to pass the background prop to specify a borderless ripple effect.\n */\n if (\n Platform.OS === 'android' &&\n Platform.Version >= ANDROID_VERSION_LOLLIPOP\n ) {\n return (\n <TouchableNativeFeedback\n {...rest}\n useForeground={TouchableNativeFeedback.canUseNativeForeground()}\n background={TouchableNativeFeedback.Ripple(pressColor, borderless)}\n >\n <View style={style}>{React.Children.only(children)}</View>\n </TouchableNativeFeedback>\n );\n } else {\n return (\n <TouchableOpacity style={style} {...rest}>\n {children}\n </TouchableOpacity>\n );\n }\n}\n","import * as React from 'react';\nimport {\n Animated,\n I18nManager,\n Image,\n View,\n Platform,\n StyleSheet,\n LayoutChangeEvent,\n} from 'react-native';\nimport { useTheme } from '@react-navigation/native';\nimport MaskedView from '../MaskedView';\nimport TouchableItem from '../TouchableItem';\nimport type { StackHeaderLeftButtonProps } from '../../types';\n\ntype Props = StackHeaderLeftButtonProps;\n\nexport default function HeaderBackButton({\n disabled,\n allowFontScaling,\n backImage,\n label,\n labelStyle,\n labelVisible = Platform.OS === 'ios',\n onLabelLayout,\n onPress,\n pressColorAndroid: customPressColorAndroid,\n screenLayout,\n tintColor: customTintColor,\n titleLayout,\n truncatedLabel = 'Back',\n accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',\n style,\n}: Props) {\n const { dark, colors } = useTheme();\n\n const [initialLabelWidth, setInitialLabelWidth] = React.useState<\n undefined | number\n >(undefined);\n\n const tintColor =\n customTintColor !== undefined\n ? customTintColor\n : Platform.select({\n ios: colors.primary,\n default: colors.text,\n });\n\n const pressColorAndroid =\n customPressColorAndroid !== undefined\n ? customPressColorAndroid\n : dark\n ? 'rgba(255, 255, 255, .32)'\n : 'rgba(0, 0, 0, .32)';\n\n const handleLabelLayout = (e: LayoutChangeEvent) => {\n onLabelLayout?.(e);\n\n setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width);\n };\n\n const shouldTruncateLabel = () => {\n return (\n !label ||\n (initialLabelWidth &&\n titleLayout &&\n screenLayout &&\n (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26)\n );\n };\n\n const renderBackImage = () => {\n if (backImage) {\n return backImage({ tintColor });\n } else {\n return (\n <Image\n style={[\n styles.icon,\n Boolean(labelVisible) && styles.iconWithLabel,\n Boolean(tintColor) && { tintColor },\n ]}\n source={require('../assets/back-icon.png')}\n fadeDuration={0}\n />\n );\n }\n };\n\n const renderLabel = () => {\n const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label;\n\n if (!labelVisible || leftLabelText === undefined) {\n return null;\n }\n\n const labelElement = (\n <View\n style={\n screenLayout\n ? // We make the button extend till the middle of the screen\n // Otherwise it appears to cut off when translating\n [styles.labelWrapper, { minWidth: screenLayout.width / 2 - 27 }]\n : null\n }\n >\n <Animated.Text\n accessible={false}\n onLayout={\n // This measurement is used to determine if we should truncate the label when it doesn't fit\n // Only measure it when label is not truncated because we want the measurement of full label\n leftLabelText === label ? handleLabelLayout : undefined\n }\n style={[\n styles.label,\n tintColor ? { color: tintColor } : null,\n labelStyle,\n ]}\n numberOfLines={1}\n allowFontScaling={!!allowFontScaling}\n >\n {leftLabelText}\n </Animated.Text>\n </View>\n );\n\n if (backImage || Platform.OS !== 'ios') {\n // When a custom backimage is specified, we can't mask the label\n // Otherwise there might be weird effect due to our mask not being the same as the image\n return labelElement;\n }\n\n return (\n <MaskedView\n maskElement={\n <View style={styles.iconMaskContainer}>\n <Image\n source={require('../assets/back-icon-mask.png')}\n style={styles.iconMask}\n />\n <View style={styles.iconMaskFillerRect} />\n </View>\n }\n >\n {labelElement}\n </MaskedView>\n );\n };\n\n const handlePress = () => onPress && requestAnimationFrame(onPress);\n\n return (\n <TouchableItem\n disabled={disabled}\n accessible\n accessibilityRole=\"button\"\n accessibilityComponentType=\"button\"\n accessibilityLabel={accessibilityLabel}\n accessibilityTraits=\"button\"\n testID=\"header-back\"\n delayPressIn={0}\n onPress={disabled ? undefined : handlePress}\n pressColor={pressColorAndroid}\n style={[styles.container, disabled && styles.disabled, style]}\n hitSlop={Platform.select({\n ios: undefined,\n default: { top: 16, right: 16, bottom: 16, left: 16 },\n })}\n borderless\n >\n <React.Fragment>\n {renderBackImage()}\n {renderLabel()}\n </React.Fragment>\n </TouchableItem>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n ...Platform.select({\n ios: null,\n default: {\n marginVertical: 3,\n marginHorizontal: 11,\n },\n }),\n },\n disabled: {\n opacity: 0.5,\n },\n label: {\n fontSize: 17,\n // Title and back label are a bit different width due to title being bold\n // Adjusting the letterSpacing makes them coincide better\n letterSpacing: 0.35,\n },\n labelWrapper: {\n // These styles will make sure that the label doesn't fill the available space\n // Otherwise it messes with the measurement of the label\n flexDirection: 'row',\n alignItems: 'flex-start',\n },\n icon: Platform.select({\n ios: {\n height: 21,\n width: 13,\n marginLeft: 8,\n marginRight: 22,\n marginVertical: 12,\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n default: {\n height: 24,\n width: 24,\n margin: 3,\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n }),\n iconWithLabel:\n Platform.OS === 'ios'\n ? {\n marginRight: 6,\n }\n : {},\n iconMaskContainer: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n iconMaskFillerRect: {\n flex: 1,\n backgroundColor: '#000',\n },\n iconMask: {\n height: 21,\n width: 13,\n marginLeft: -14.5,\n marginVertical: 12,\n alignSelf: 'center',\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n});\n","import * as React from 'react';\nimport {\n Animated,\n StyleSheet,\n Platform,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport { useTheme } from '@react-navigation/native';\n\ntype Props = ViewProps & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children?: React.ReactNode;\n};\n\nexport default function HeaderBackground({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border,\n },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth,\n },\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n }),\n },\n});\n","import * as React from 'react';\n\nconst HeaderShownContext = React.createContext(false);\n\nexport default HeaderShownContext;\n","export default function memoize<Result, Deps extends readonly any[]>(\n callback: (...deps: Deps) => Result\n) {\n let previous: Deps | undefined;\n let result: Result | undefined;\n\n return (...dependencies: Deps): Result => {\n let hasChanged = false;\n\n if (previous) {\n if (previous.length !== dependencies.length) {\n hasChanged = true;\n } else {\n for (let i = 0; i < previous.length; i++) {\n if (previous[i] !== dependencies[i]) {\n hasChanged = true;\n break;\n }\n }\n }\n } else {\n hasChanged = true;\n }\n\n previous = dependencies;\n\n if (hasChanged || result === undefined) {\n result = callback(...dependencies);\n }\n\n return result;\n };\n}\n","import * as React from 'react';\nimport {\n Animated,\n View,\n StyleSheet,\n LayoutChangeEvent,\n Platform,\n ViewStyle,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\nimport type { Route } from '@react-navigation/native';\nimport HeaderBackButton from './HeaderBackButton';\nimport HeaderBackground from './HeaderBackground';\nimport HeaderShownContext from '../../utils/HeaderShownContext';\nimport memoize from '../../utils/memoize';\nimport type {\n Layout,\n StackHeaderStyleInterpolator,\n StackHeaderLeftButtonProps,\n StackHeaderTitleProps,\n StackHeaderOptions,\n Scene,\n} from '../../types';\n\ntype Props = StackHeaderOptions & {\n headerTitle: (props: StackHeaderTitleProps) => React.ReactNode;\n layout: Layout;\n insets: EdgeInsets;\n onGoBack?: () => void;\n title?: string;\n leftLabel?: string;\n scene: Scene<Route<string>>;\n styleInterpolator: StackHeaderStyleInterpolator;\n};\n\nconst warnIfHeaderStylesDefined = (styles: Record<string, any>) => {\n Object.keys(styles).forEach((styleProp) => {\n const value = styles[styleProp];\n\n if (styleProp === 'position' && value === 'absolute') {\n console.warn(\n \"position: 'absolute' is not supported on headerStyle. If you would like to render content under the header, use the 'headerTransparent' navigationOption.\"\n );\n } else if (value !== undefined) {\n console.warn(\n `${styleProp} was given a value of ${value}, this has no effect on headerStyle.`\n );\n }\n });\n};\n\nexport const getDefaultHeaderHeight = (\n layout: Layout,\n statusBarHeight: number\n): number => {\n const isLandscape = layout.width > layout.height;\n\n let headerHeight;\n\n if (Platform.OS === 'ios') {\n if (isLandscape && !Platform.isPad) {\n headerHeight = 32;\n } else {\n headerHeight = 44;\n }\n } else if (Platform.OS === 'android') {\n headerHeight = 56;\n } else {\n headerHeight = 64;\n }\n\n return headerHeight + statusBarHeight;\n};\n\nexport default function HeaderSegment(props: Props) {\n const [leftLabelLayout, setLeftLabelLayout] = React.useState<\n Layout | undefined\n >(undefined);\n\n const [titleLayout, setTitleLayout] = React.useState<Layout | undefined>(\n undefined\n );\n\n const isParentHeaderShown = React.useContext(HeaderShownContext);\n\n const handleTitleLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n setTitleLayout((titleLayout) => {\n if (\n titleLayout &&\n height === titleLayout.height &&\n width === titleLayout.width\n ) {\n return titleLayout;\n }\n\n return { height, width };\n });\n };\n\n const handleLeftLabelLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n if (\n leftLabelLayout &&\n height === leftLabelLayout.height &&\n width === leftLabelLayout.width\n ) {\n return;\n }\n\n setLeftLabelLayout({ height, width });\n };\n\n const getInterpolatedStyle = memoize(\n (\n styleInterpolator: StackHeaderStyleInterpolator,\n layout: Layout,\n current: Animated.AnimatedInterpolation,\n next: Animated.AnimatedInterpolation | undefined,\n titleLayout: Layout | undefined,\n leftLabelLayout: Layout | undefined,\n headerHeight: number\n ) =>\n styleInterpolator({\n current: { progress: current },\n next: next && { progress: next },\n layouts: {\n header: {\n height: headerHeight,\n width: layout.width,\n },\n screen: layout,\n title: titleLayout,\n leftLabel: leftLabelLayout,\n },\n })\n );\n\n const {\n scene,\n layout,\n insets,\n title: currentTitle,\n leftLabel: previousTitle,\n onGoBack,\n headerTitle,\n headerTitleAlign = Platform.select({\n ios: 'center',\n default: 'left',\n }),\n headerLeft: left = onGoBack\n ? (props: StackHeaderLeftButtonProps) => <HeaderBackButton {...props} />\n : undefined,\n headerTransparent,\n headerTintColor,\n headerBackground,\n headerRight: right,\n headerBackImage: backImage,\n headerBackTitle: leftLabel,\n headerBackTitleVisible,\n headerTruncatedBackTitle: truncatedLabel,\n headerPressColorAndroid: pressColorAndroid,\n headerBackAccessibilityLabel: backAccessibilityLabel,\n headerBackAllowFontScaling: backAllowFontScaling,\n headerTitleAllowFontScaling: titleAllowFontScaling,\n headerTitleStyle: customTitleStyle,\n headerBackTitleStyle: customLeftLabelStyle,\n headerLeftContainerStyle: leftContainerStyle,\n headerRightContainerStyle: rightContainerStyle,\n headerTitleContainerStyle: titleContainerStyle,\n headerStyle: customHeaderStyle,\n headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,\n styleInterpolator,\n } = props;\n\n const defaultHeight = getDefaultHeaderHeight(layout, headerStatusBarHeight);\n\n const {\n height = defaultHeight,\n minHeight,\n maxHeight,\n backgroundColor,\n borderBottomColor,\n borderBottomEndRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius,\n borderBottomStartRadius,\n borderBottomWidth,\n borderColor,\n borderEndColor,\n borderEndWidth,\n borderLeftColor,\n borderLeftWidth,\n borderRadius,\n borderRightColor,\n borderRightWidth,\n borderStartColor,\n borderStartWidth,\n borderStyle,\n borderTopColor,\n borderTopEndRadius,\n borderTopLeftRadius,\n borderTopRightRadius,\n borderTopStartRadius,\n borderTopWidth,\n borderWidth,\n // @ts-expect-error: web support for shadow\n boxShadow,\n elevation,\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n opacity,\n transform,\n ...unsafeStyles\n } = StyleSheet.flatten(customHeaderStyle || {}) as ViewStyle;\n\n if (process.env.NODE_ENV !== 'production') {\n warnIfHeaderStylesDefined(unsafeStyles);\n }\n\n const safeStyles: ViewStyle = {\n backgroundColor,\n borderBottomColor,\n borderBottomEndRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius,\n borderBottomStartRadius,\n borderBottomWidth,\n borderColor,\n borderEndColor,\n borderEndWidth,\n borderLeftColor,\n borderLeftWidth,\n borderRadius,\n borderRightColor,\n borderRightWidth,\n borderStartColor,\n borderStartWidth,\n borderStyle,\n borderTopColor,\n borderTopEndRadius,\n borderTopLeftRadius,\n borderTopRightRadius,\n borderTopStartRadius,\n borderTopWidth,\n borderWidth,\n // @ts-expect-error: boxShadow is only for Web\n boxShadow,\n elevation,\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n opacity,\n transform,\n };\n\n // Setting a property to undefined triggers default style\n // So we need to filter them out\n // Users can use `null` instead\n for (const styleProp in safeStyles) {\n // @ts-expect-error: typescript wrongly complains that styleProp cannot be used to index safeStyles\n if (safeStyles[styleProp] === undefined) {\n // @ts-expect-error\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete safeStyles[styleProp];\n }\n }\n\n const {\n titleStyle,\n leftButtonStyle,\n leftLabelStyle,\n rightButtonStyle,\n backgroundStyle,\n } = getInterpolatedStyle(\n styleInterpolator,\n layout,\n scene.progress.current,\n scene.progress.next,\n titleLayout,\n previousTitle ? leftLabelLayout : undefined,\n typeof height === 'number' ? height : defaultHeight\n );\n\n const leftButton = left\n ? left({\n backImage,\n pressColorAndroid,\n accessibilityLabel: backAccessibilityLabel,\n allowFontScaling: backAllowFontScaling,\n onPress: onGoBack,\n labelVisible: headerBackTitleVisible,\n label: leftLabel !== undefined ? leftLabel : previousTitle,\n truncatedLabel,\n labelStyle: [leftLabelStyle, customLeftLabelStyle],\n onLabelLayout: handleLeftLabelLayout,\n screenLayout: layout,\n titleLayout,\n tintColor: headerTintColor,\n canGoBack: Boolean(onGoBack),\n })\n : null;\n\n const rightButton = right ? right({ tintColor: headerTintColor }) : null;\n\n return (\n <React.Fragment>\n <Animated.View\n pointerEvents=\"box-none\"\n style={[StyleSheet.absoluteFill, { zIndex: 0 }, backgroundStyle]}\n >\n {headerBackground ? (\n headerBackground({ style: safeStyles })\n ) : headerTransparent ? null : (\n <HeaderBackground style={safeStyles} />\n )}\n </Animated.View>\n <Animated.View\n pointerEvents=\"box-none\"\n style={[{ height, minHeight, maxHeight, opacity, transform }]}\n >\n <View pointerEvents=\"none\" style={{ height: headerStatusBarHeight }} />\n <View pointerEvents=\"box-none\" style={styles.content}>\n {leftButton ? (\n <Animated.View\n pointerEvents=\"box-none\"\n style={[\n styles.left,\n { left: insets.left },\n leftButtonStyle,\n leftContainerStyle,\n ]}\n >\n {leftButton}\n </Animated.View>\n ) : null}\n <Animated.View\n pointerEvents=\"box-none\"\n style={[\n headerTitleAlign === 'left'\n ? {\n position: 'absolute',\n left: (leftButton ? 72 : 16) + insets.left,\n right: (rightButton ? 72 : 16) + insets.right,\n }\n : {\n marginHorizontal:\n (leftButton ? 32 : 16) +\n (leftButton && headerBackTitleVisible !== false\n ? 40\n : 0) +\n Math.max(insets.left, insets.right),\n },\n titleStyle,\n titleContainerStyle,\n ]}\n >\n {headerTitle({\n children: currentTitle,\n onLayout: handleTitleLayout,\n allowFontScaling: titleAllowFontScaling,\n tintColor: headerTintColor,\n style: customTitleStyle,\n })}\n </Animated.View>\n {rightButton ? (\n <Animated.View\n pointerEvents=\"box-none\"\n style={[\n styles.right,\n { right: insets.right },\n rightButtonStyle,\n rightContainerStyle,\n ]}\n >\n {rightButton}\n </Animated.View>\n ) : null}\n </View>\n </Animated.View>\n </React.Fragment>\n );\n}\n\nconst styles = StyleSheet.create({\n content: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n },\n left: {\n position: 'absolute',\n left: 0,\n top: 0,\n bottom: 0,\n justifyContent: 'center',\n alignItems: 'flex-start',\n },\n right: {\n position: 'absolute',\n right: 0,\n top: 0,\n bottom: 0,\n justifyContent: 'center',\n alignItems: 'flex-end',\n },\n});\n","import * as React from 'react';\nimport { View, ViewProps, StyleSheet } from 'react-native';\n\ntype Props = ViewProps & {\n enabled: boolean;\n layout: { width: number; height: number };\n children: React.ReactNode;\n};\n\n// This component will render a page which overflows the screen\n// if the container fills the body by comparing the size\n// This lets the document.body handle scrolling of the content\n// It's necessary for mobile browsers to be able to hide address bar on scroll\nexport default React.forwardRef<View, Props>(function CardSheet(\n { enabled, layout, style, ...rest },\n ref\n) {\n const [fill, setFill] = React.useState(false);\n\n React.useEffect(() => {\n if (typeof document === 'undefined' || !document.body) {\n // Only run when DOM is available\n return;\n }\n\n const width = document.body.clientWidth;\n const height = document.body.clientHeight;\n\n setFill(width === layout.width && height === layout.height);\n }, [layout.height, layout.width]);\n\n return (\n <View\n {...rest}\n ref={ref}\n style={[enabled && fill ? styles.page : styles.card, style]}\n />\n );\n});\n\nconst styles = StyleSheet.create({\n page: {\n minHeight: '100%',\n },\n card: {\n flex: 1,\n overflow: 'hidden',\n },\n});\n","import * as React from 'react';\nimport type { StackCardInterpolationProps } from '../types';\n\nexport default React.createContext<StackCardInterpolationProps | undefined>(\n undefined\n);\n","import { I18nManager } from 'react-native';\nimport type { GestureDirection } from '../types';\n\nexport default function getInvertedMultiplier(\n gestureDirection: GestureDirection\n): 1 | -1 {\n switch (gestureDirection) {\n case 'vertical':\n return 1;\n case 'vertical-inverted':\n return -1;\n case 'horizontal':\n return I18nManager.isRTL ? -1 : 1;\n case 'horizontal-inverted':\n return I18nManager.isRTL ? 1 : -1;\n }\n}\n","import getInvertedMultiplier from './getInvertedMultiplier';\nimport type { GestureDirection, Layout } from '../types';\n\nexport default function getDistanceForDirection(\n layout: Layout,\n gestureDirection: GestureDirection\n): number {\n const multiplier = getInvertedMultiplier(gestureDirection);\n\n switch (gestureDirection) {\n case 'vertical':\n case 'vertical-inverted':\n return layout.height * multiplier;\n case 'horizontal':\n case 'horizontal-inverted':\n return layout.width * multiplier;\n }\n}\n","import * as React from 'react';\nimport {\n Animated,\n View,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n Platform,\n InteractionManager,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\nimport Color from 'color';\n\nimport CardSheet from './CardSheet';\nimport {\n PanGestureHandler,\n GestureState,\n PanGestureHandlerGestureEvent,\n} from '../GestureHandler';\nimport CardAnimationContext from '../../utils/CardAnimationContext';\nimport getDistanceForDirection from '../../utils/getDistanceForDirection';\nimport getInvertedMultiplier from '../../utils/getInvertedMultiplier';\nimport memoize from '../../utils/memoize';\nimport type {\n TransitionSpec,\n StackCardStyleInterpolator,\n GestureDirection,\n Layout,\n} from '../../types';\n\ntype Props = ViewProps & {\n index: number;\n closing: boolean;\n next?: Animated.AnimatedInterpolation;\n current: Animated.AnimatedInterpolation;\n gesture: Animated.Value;\n layout: Layout;\n insets: EdgeInsets;\n pageOverflowEnabled: boolean;\n gestureDirection: GestureDirection;\n onOpen: () => void;\n onClose: () => void;\n onTransition?: (props: { closing: boolean; gesture: boolean }) => void;\n onGestureBegin?: () => void;\n onGestureCanceled?: () => void;\n onGestureEnd?: () => void;\n children: React.ReactNode;\n overlay: (props: {\n style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n }) => React.ReactNode;\n overlayEnabled: boolean;\n shadowEnabled: boolean;\n gestureEnabled: boolean;\n gestureResponseDistance?: {\n vertical?: number;\n horizontal?: number;\n };\n gestureVelocityImpact: number;\n transitionSpec: {\n open: TransitionSpec;\n close: TransitionSpec;\n };\n styleInterpolator: StackCardStyleInterpolator;\n containerStyle?: StyleProp<ViewStyle>;\n contentStyle?: StyleProp<ViewStyle>;\n};\n\nconst GESTURE_VELOCITY_IMPACT = 0.3;\n\nconst TRUE = 1;\nconst FALSE = 0;\n\n/**\n * The distance of touch start from the edge of the screen where the gesture will be recognized\n */\nconst GESTURE_RESPONSE_DISTANCE_HORIZONTAL = 50;\nconst GESTURE_RESPONSE_DISTANCE_VERTICAL = 135;\n\nconst useNativeDriver = Platform.OS !== 'web';\n\nconst hasOpacityStyle = (style: any) => {\n if (style) {\n const flattenedStyle = StyleSheet.flatten(style);\n return flattenedStyle.opacity != null;\n }\n\n return false;\n};\n\nexport default class Card extends React.Component<Props> {\n static defaultProps = {\n overlayEnabled: Platform.OS !== 'ios',\n shadowEnabled: true,\n gestureEnabled: true,\n gestureVelocityImpact: GESTURE_VELOCITY_IMPACT,\n overlay: ({\n style,\n }: {\n style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n }) =>\n style ? (\n <Animated.View pointerEvents=\"none\" style={[styles.overlay, style]} />\n ) : null,\n };\n\n componentDidMount() {\n this.animate({ closing: this.props.closing });\n this.isCurrentlyMounted = true;\n }\n\n componentDidUpdate(prevProps: Props) {\n const { layout, gestureDirection, closing } = this.props;\n const { width, height } = layout;\n\n if (width !== prevProps.layout.width) {\n this.layout.width.setValue(width);\n }\n\n if (height !== prevProps.layout.height) {\n this.layout.height.setValue(height);\n }\n\n if (gestureDirection !== prevProps.gestureDirection) {\n this.inverted.setValue(getInvertedMultiplier(gestureDirection));\n }\n\n const toValue = this.getAnimateToValue(this.props);\n\n if (\n this.getAnimateToValue(prevProps) !== toValue ||\n this.lastToValue !== toValue\n ) {\n // We need to trigger the animation when route was closed\n // Thr route might have been closed by a `POP` action or by a gesture\n // When route was closed due to a gesture, the animation would've happened already\n // It's still important to trigger the animation so that `onClose` is called\n // If `onClose` is not called, cleanup step won't be performed for gestures\n this.animate({ closing });\n }\n }\n\n componentWillUnmount() {\n this.isCurrentlyMounted = false;\n this.handleEndInteraction();\n }\n\n private isCurrentlyMounted = false;\n\n private isClosing = new Animated.Value(FALSE);\n\n private inverted = new Animated.Value(\n getInvertedMultiplier(this.props.gestureDirection)\n );\n\n private layout = {\n width: new Animated.Value(this.props.layout.width),\n height: new Animated.Value(this.props.layout.height),\n };\n\n private isSwiping = new Animated.Value(FALSE);\n\n private interactionHandle: number | undefined;\n\n private pendingGestureCallback: number | undefined;\n\n private lastToValue: number | undefined;\n\n private animate = ({\n closing,\n velocity,\n }: {\n closing: boolean;\n velocity?: number;\n }) => {\n const {\n gesture,\n transitionSpec,\n onOpen,\n onClose,\n onTransition,\n } = this.props;\n\n const toValue = this.getAnimateToValue({\n ...this.props,\n closing,\n });\n\n this.lastToValue = toValue;\n\n const spec = closing ? transitionSpec.close : transitionSpec.open;\n\n const animation =\n spec.animation === 'spring' ? Animated.spring : Animated.timing;\n\n this.setPointerEventsEnabled(!closing);\n this.handleStartInteraction();\n\n clearTimeout(this.pendingGestureCallback);\n\n onTransition?.({ closing, gesture: velocity !== undefined });\n animation(gesture, {\n ...spec.config,\n velocity,\n toValue,\n useNativeDriver,\n isInteraction: false,\n }).start(({ finished }) => {\n this.handleEndInteraction();\n\n clearTimeout(this.pendingGestureCallback);\n\n if (finished) {\n if (closing) {\n onClose();\n } else {\n onOpen();\n }\n\n if (this.isCurrentlyMounted) {\n // Make sure to re-open screen if it wasn't removed\n this.forceUpdate();\n }\n }\n });\n };\n\n private getAnimateToValue = ({\n closing,\n layout,\n gestureDirection,\n }: {\n closing?: boolean;\n layout: Layout;\n gestureDirection: GestureDirection;\n }) => {\n if (!closing) {\n return 0;\n }\n\n return getDistanceForDirection(layout, gestureDirection);\n };\n\n private setPointerEventsEnabled = (enabled: boolean) => {\n const pointerEvents = enabled ? 'box-none' : 'none';\n\n this.contentRef.current?.setNativeProps({ pointerEvents });\n };\n\n private handleStartInteraction = () => {\n if (this.interactionHandle === undefined) {\n this.interactionHandle = InteractionManager.createInteractionHandle();\n }\n };\n\n private handleEndInteraction = () => {\n if (this.interactionHandle !== undefined) {\n InteractionManager.clearInteractionHandle(this.interactionHandle);\n this.interactionHandle = undefined;\n }\n };\n\n private handleGestureStateChange = ({\n nativeEvent,\n }: PanGestureHandlerGestureEvent) => {\n const {\n layout,\n onClose,\n onGestureBegin,\n onGestureCanceled,\n onGestureEnd,\n gestureDirection,\n gestureVelocityImpact,\n } = this.props;\n\n switch (nativeEvent.state) {\n case GestureState.BEGAN:\n this.isSwiping.setValue(TRUE);\n this.handleStartInteraction();\n onGestureBegin?.();\n break;\n case GestureState.CANCELLED: {\n this.isSwiping.setValue(FALSE);\n this.handleEndInteraction();\n\n const velocity =\n gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ? nativeEvent.velocityY\n : nativeEvent.velocityX;\n\n this.animate({ closing: this.props.closing, velocity });\n\n onGestureCanceled?.();\n break;\n }\n case GestureState.END: {\n this.isSwiping.setValue(FALSE);\n\n let distance;\n let translation;\n let velocity;\n\n if (\n gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ) {\n distance = layout.height;\n translation = nativeEvent.translationY;\n velocity = nativeEvent.velocityY;\n } else {\n distance = layout.width;\n translation = nativeEvent.translationX;\n velocity = nativeEvent.velocityX;\n }\n\n const closing =\n (translation + velocity * gestureVelocityImpact) *\n getInvertedMultiplier(gestureDirection) >\n distance / 2\n ? velocity !== 0 || translation !== 0\n : this.props.closing;\n\n this.animate({ closing, velocity });\n\n if (closing) {\n // We call onClose with a delay to make sure that the animation has already started\n // This will make sure that the state update caused by this doesn't affect start of animation\n this.pendingGestureCallback = (setTimeout(() => {\n onClose();\n\n // Trigger an update after we dispatch the action to remove the screen\n // This will make sure that we check if the screen didn't get removed so we can cancel the animation\n this.forceUpdate();\n }, 32) as any) as number;\n }\n\n onGestureEnd?.();\n break;\n }\n }\n };\n\n // Memoize this to avoid extra work on re-render\n private getInterpolatedStyle = memoize(\n (\n styleInterpolator: StackCardStyleInterpolator,\n index: number,\n current: Animated.AnimatedInterpolation,\n next: Animated.AnimatedInterpolation | undefined,\n layout: Layout,\n insetTop: number,\n insetRight: number,\n insetBottom: number,\n insetLeft: number\n ) =>\n styleInterpolator({\n index,\n current: { progress: current },\n next: next && { progress: next },\n closing: this.isClosing,\n swiping: this.isSwiping,\n inverted: this.inverted,\n layouts: {\n screen: layout,\n },\n insets: {\n top: insetTop,\n right: insetRight,\n bottom: insetBottom,\n left: insetLeft,\n },\n })\n );\n\n // Keep track of the animation context when deps changes.\n private getCardAnimationContext = memoize(\n (\n index: number,\n current: Animated.AnimatedInterpolation,\n next: Animated.AnimatedInterpolation | undefined,\n layout: Layout,\n insetTop: number,\n insetRight: number,\n insetBottom: number,\n insetLeft: number\n ) => ({\n index,\n current: { progress: current },\n next: next && { progress: next },\n closing: this.isClosing,\n swiping: this.isSwiping,\n inverted: this.inverted,\n layouts: {\n screen: layout,\n },\n insets: {\n top: insetTop,\n right: insetRight,\n bottom: insetBottom,\n left: insetLeft,\n },\n })\n );\n\n private gestureActivationCriteria() {\n const { layout, gestureDirection, gestureResponseDistance } = this.props;\n\n const distance =\n gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ? gestureResponseDistance?.vertical !== undefined\n ? gestureResponseDistance.vertical\n : GESTURE_RESPONSE_DISTANCE_VERTICAL\n : gestureResponseDistance?.horizontal !== undefined\n ? gestureResponseDistance.horizontal\n : GESTURE_RESPONSE_DISTANCE_HORIZONTAL;\n\n if (gestureDirection === 'vertical') {\n return {\n maxDeltaX: 15,\n minOffsetY: 5,\n hitSlop: { bottom: -layout.height + distance },\n };\n } else if (gestureDirection === 'vertical-inverted') {\n return {\n maxDeltaX: 15,\n minOffsetY: -5,\n hitSlop: { top: -layout.height + distance },\n };\n } else {\n const hitSlop = -layout.width + distance;\n const invertedMultiplier = getInvertedMultiplier(gestureDirection);\n\n if (invertedMultiplier === 1) {\n return {\n minOffsetX: 5,\n maxDeltaY: 20,\n hitSlop: { right: hitSlop },\n };\n } else {\n return {\n minOffsetX: -5,\n maxDeltaY: 20,\n hitSlop: { left: hitSlop },\n };\n }\n }\n }\n\n private contentRef = React.createRef<View>();\n\n render() {\n const {\n styleInterpolator,\n index,\n current,\n gesture,\n next,\n layout,\n insets,\n overlay,\n overlayEnabled,\n shadowEnabled,\n gestureEnabled,\n gestureDirection,\n pageOverflowEnabled,\n children,\n containerStyle: customContainerStyle,\n contentStyle,\n ...rest\n } = this.props;\n\n const interpolatedStyle = this.getInterpolatedStyle(\n styleInterpolator,\n index,\n current,\n next,\n layout,\n insets.top,\n insets.right,\n insets.bottom,\n insets.left\n );\n\n const animationContext = this.getCardAnimationContext(\n index,\n current,\n next,\n layout,\n insets.top,\n insets.right,\n insets.bottom,\n insets.left\n );\n\n const {\n containerStyle,\n cardStyle,\n overlayStyle,\n shadowStyle,\n } = interpolatedStyle;\n\n const handleGestureEvent = gestureEnabled\n ? Animated.event(\n [\n {\n nativeEvent:\n gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ? { translationY: gesture }\n : { translationX: gesture },\n },\n ],\n { useNativeDriver }\n )\n : undefined;\n\n const { backgroundColor } = StyleSheet.flatten(contentStyle || {});\n const isTransparent =\n typeof backgroundColor === 'string'\n ? Color(backgroundColor).alpha() === 0\n : false;\n\n return (\n <CardAnimationContext.Provider value={animationContext}>\n <Animated.View\n style={{\n // This is a dummy style that doesn't actually change anything visually.\n // Animated needs the animated value to be used somewhere, otherwise things don't update properly.\n // If we disable animations and hide header, it could end up making the value unused.\n // So we have this dummy style that will always be used regardless of what else changed.\n opacity: current,\n }}\n // Make sure that this view isn't removed. If this view is removed, our style with animated value won't apply\n collapsable={false}\n />\n <View pointerEvents=\"box-none\" {...rest}>\n {overlayEnabled ? (\n <View pointerEvents=\"box-none\" style={StyleSheet.absoluteFill}>\n {overlay({ style: overlayStyle })}\n </View>\n ) : null}\n <Animated.View\n needsOffscreenAlphaCompositing={hasOpacityStyle(containerStyle)}\n style={[styles.container, containerStyle, customContainerStyle]}\n pointerEvents=\"box-none\"\n >\n <PanGestureHandler\n enabled={layout.width !== 0 && gestureEnabled}\n onGestureEvent={handleGestureEvent}\n onHandlerStateChange={this.handleGestureStateChange}\n {...this.gestureActivationCriteria()}\n >\n <Animated.View style={[styles.container, cardStyle]}>\n {shadowEnabled && shadowStyle && !isTransparent ? (\n <Animated.View\n style={[\n styles.shadow,\n gestureDirection === 'horizontal'\n ? [styles.shadowHorizontal, styles.shadowLeft]\n : gestureDirection === 'horizontal-inverted'\n ? [styles.shadowHorizontal, styles.shadowRight]\n : gestureDirection === 'vertical'\n ? [styles.shadowVertical, styles.shadowTop]\n : [styles.shadowVertical, styles.shadowBottom],\n { backgroundColor },\n shadowStyle,\n ]}\n pointerEvents=\"none\"\n />\n ) : null}\n <CardSheet\n ref={this.contentRef}\n enabled={pageOverflowEnabled}\n layout={layout}\n style={contentStyle}\n >\n {children}\n </CardSheet>\n </Animated.View>\n </PanGestureHandler>\n </Animated.View>\n </View>\n </CardAnimationContext.Provider>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n overlay: {\n flex: 1,\n backgroundColor: '#000',\n },\n shadow: {\n position: 'absolute',\n shadowRadius: 5,\n shadowColor: '#000',\n shadowOpacity: 0.3,\n },\n shadowHorizontal: {\n top: 0,\n bottom: 0,\n width: 3,\n shadowOffset: { width: -1, height: 1 },\n },\n shadowLeft: {\n left: 0,\n },\n shadowRight: {\n right: 0,\n },\n shadowVertical: {\n left: 0,\n right: 0,\n height: 3,\n shadowOffset: { width: 1, height: -1 },\n },\n shadowTop: {\n top: 0,\n },\n shadowBottom: {\n bottom: 0,\n },\n});\n","import * as React from 'react';\n\nexport default React.createContext<number | undefined>(undefined);\n","import * as React from 'react';\nimport type { Route } from '@react-navigation/native';\nimport type { Scene } from '../types';\n\nconst PreviousSceneContext = React.createContext<\n Scene<Route<string>> | undefined\n>(undefined);\n\nexport default PreviousSceneContext;\n","import * as React from 'react';\nimport { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';\nimport { Route, useTheme } from '@react-navigation/native';\nimport type { Props as HeaderContainerProps } from '../Header/HeaderContainer';\nimport Card from './Card';\nimport HeaderHeightContext from '../../utils/HeaderHeightContext';\nimport HeaderShownContext from '../../utils/HeaderShownContext';\nimport PreviousSceneContext from '../../utils/PreviousSceneContext';\nimport type {\n Scene,\n Layout,\n StackHeaderMode,\n StackCardMode,\n TransitionPreset,\n} from '../../types';\n\ntype Props = TransitionPreset & {\n index: number;\n active: boolean;\n focused: boolean;\n closing: boolean;\n layout: Layout;\n gesture: Animated.Value;\n scene: Scene<Route<string>>;\n safeAreaInsetTop: number;\n safeAreaInsetRight: number;\n safeAreaInsetBottom: number;\n safeAreaInsetLeft: number;\n cardOverlay?: (props: {\n style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n }) => React.ReactNode;\n cardOverlayEnabled?: boolean;\n cardShadowEnabled?: boolean;\n cardStyle?: StyleProp<ViewStyle>;\n getPreviousScene: (props: {\n route: Route<string>;\n }) => Scene<Route<string>> | undefined;\n getFocusedRoute: () => Route<string>;\n renderHeader: (props: HeaderContainerProps) => React.ReactNode;\n renderScene: (props: { route: Route<string> }) => React.ReactNode;\n onOpenRoute: (props: { route: Route<string> }) => void;\n onCloseRoute: (props: { route: Route<string> }) => void;\n onTransitionStart?: (\n props: { route: Route<string> },\n closing: boolean\n ) => void;\n onTransitionEnd?: (props: { route: Route<string> }, closing: boolean) => void;\n onPageChangeStart?: () => void;\n onPageChangeConfirm?: (force: boolean) => void;\n onPageChangeCancel?: () => void;\n onGestureStart?: (props: { route: Route<string> }) => void;\n onGestureEnd?: (props: { route: Route<string> }) => void;\n onGestureCancel?: (props: { route: Route<string> }) => void;\n gestureEnabled?: boolean;\n gestureResponseDistance?: {\n vertical?: number;\n horizontal?: number;\n };\n gestureVelocityImpact?: number;\n mode: StackCardMode;\n headerMode: StackHeaderMode;\n headerShown: boolean;\n hasAbsoluteHeader: boolean;\n headerHeight: number;\n onHeaderHeightChange: (props: {\n route: Route<string>;\n height: number;\n }) => void;\n isParentHeaderShown: boolean;\n};\n\nconst EPSILON = 0.1;\n\nfunction CardContainer({\n active,\n cardOverlay,\n cardOverlayEnabled,\n cardShadowEnabled,\n cardStyle,\n cardStyleInterpolator,\n closing,\n gesture,\n focused,\n gestureDirection,\n gestureEnabled,\n gestureResponseDistance,\n gestureVelocityImpact,\n getPreviousScene,\n getFocusedRoute,\n mode,\n headerMode,\n headerShown,\n headerStyleInterpolator,\n hasAbsoluteHeader,\n headerHeight,\n onHeaderHeightChange,\n isParentHeaderShown,\n index,\n layout,\n onCloseRoute,\n onOpenRoute,\n onPageChangeCancel,\n onPageChangeConfirm,\n onPageChangeStart,\n onGestureCancel,\n onGestureEnd,\n onGestureStart,\n onTransitionEnd,\n onTransitionStart,\n renderHeader,\n renderScene,\n safeAreaInsetBottom,\n safeAreaInsetLeft,\n safeAreaInsetRight,\n safeAreaInsetTop,\n scene,\n transitionSpec,\n}: Props) {\n const handleOpen = () => {\n const { route } = scene;\n\n onTransitionEnd?.({ route }, false);\n onOpenRoute({ route });\n };\n\n const handleClose = () => {\n const { route } = scene;\n\n onTransitionEnd?.({ route }, true);\n onCloseRoute({ route });\n };\n\n const handleGestureBegin = () => {\n const { route } = scene;\n\n onPageChangeStart?.();\n onGestureStart?.({ route });\n };\n\n const handleGestureCanceled = () => {\n const { route } = scene;\n\n onPageChangeCancel?.();\n onGestureCancel?.({ route });\n };\n\n const handleGestureEnd = () => {\n const { route } = scene;\n\n onGestureEnd?.({ route });\n };\n\n const handleTransition = ({\n closing,\n gesture,\n }: {\n closing: boolean;\n gesture: boolean;\n }) => {\n const { route } = scene;\n\n if (!gesture) {\n onPageChangeConfirm?.(true);\n } else if (active && closing) {\n onPageChangeConfirm?.(false);\n } else {\n onPageChangeCancel?.();\n }\n\n onTransitionStart?.({ route }, closing);\n };\n\n const insets = {\n top: safeAreaInsetTop,\n right: safeAreaInsetRight,\n bottom: safeAreaInsetBottom,\n left: safeAreaInsetLeft,\n };\n\n const { colors } = useTheme();\n\n const [pointerEvents, setPointerEvents] = React.useState<'box-none' | 'none'>(\n 'box-none'\n );\n\n React.useEffect(() => {\n // @ts-expect-error: AnimatedInterpolation optionally has addListener, but the type defs don't think so\n const listener = scene.progress.next?.addListener?.(\n ({ value }: { value: number }) => {\n setPointerEvents(value <= EPSILON ? 'box-none' : 'none');\n }\n );\n\n return () => {\n if (listener) {\n // @ts-expect-error: AnimatedInterpolation optionally has removedListener, but the type defs don't think so\n scene.progress.next?.removeListener?.(listener);\n }\n };\n }, [pointerEvents, scene.progress.next]);\n\n const isCurrentHeaderShown = headerMode !== 'none' && headerShown !== false;\n const previousScene = getPreviousScene({ route: scene.route });\n\n return (\n <Card\n index={index}\n gestureDirection={gestureDirection}\n layout={layout}\n insets={insets}\n gesture={gesture}\n current={scene.progress.current}\n next={scene.progress.next}\n closing={closing}\n onOpen={handleOpen}\n onClose={handleClose}\n overlay={cardOverlay}\n overlayEnabled={cardOverlayEnabled}\n shadowEnabled={cardShadowEnabled}\n onTransition={handleTransition}\n onGestureBegin={handleGestureBegin}\n onGestureCanceled={handleGestureCanceled}\n onGestureEnd={handleGestureEnd}\n gestureEnabled={gestureEnabled}\n gestureResponseDistance={gestureResponseDistance}\n gestureVelocityImpact={gestureVelocityImpact}\n transitionSpec={transitionSpec}\n styleInterpolator={cardStyleInterpolator}\n accessibilityElementsHidden={!focused}\n importantForAccessibility={focused ? 'auto' : 'no-hide-descendants'}\n pointerEvents={active ? 'box-none' : pointerEvents}\n pageOverflowEnabled={headerMode === 'screen' && mode === 'card'}\n containerStyle={hasAbsoluteHeader ? { marginTop: headerHeight } : null}\n contentStyle={[{ backgroundColor: colors.background }, cardStyle]}\n style={[\n {\n // This is necessary to avoid unfocused larger pages increasing scroll area\n // The issue can be seen on the web when a smaller screen is pushed over a larger one\n overflow: active ? undefined : 'hidden',\n },\n StyleSheet.absoluteFill,\n ]}\n >\n <View style={styles.container}>\n <View style={styles.scene}>\n <PreviousSceneContext.Provider value={previousScene}>\n <HeaderShownContext.Provider\n value={isParentHeaderShown || isCurrentHeaderShown}\n >\n <HeaderHeightContext.Provider value={headerHeight}>\n {renderScene({ route: scene.route })}\n </HeaderHeightContext.Provider>\n </HeaderShownContext.Provider>\n </PreviousSceneContext.Provider>\n </View>\n {headerMode === 'screen'\n ? renderHeader({\n mode: 'screen',\n layout,\n insets,\n scenes: [previousScene, scene],\n getPreviousScene,\n getFocusedRoute,\n gestureDirection,\n styleInterpolator: headerStyleInterpolator,\n onContentHeightChange: onHeaderHeightChange,\n })\n : null}\n </View>\n </Card>\n );\n}\n\nexport default React.memo(CardContainer);\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n flexDirection: 'column-reverse',\n },\n scene: {\n flex: 1,\n },\n});\n","import { Dimensions, Platform, StatusBar } from 'react-native';\n\nexport function isIphoneX() {\n const dimen = Dimensions.get('window');\n return (\n Platform.OS === 'ios' &&\n !Platform.isPad &&\n !Platform.isTVOS &&\n ((dimen.height === 780 || dimen.width === 780)\n || (dimen.height === 812 || dimen.width === 812)\n || (dimen.height === 844 || dimen.width === 844)\n || (dimen.height === 896 || dimen.width === 896)\n || (dimen.height === 926 || dimen.width === 926))\n );\n}\n\nexport function ifIphoneX(iphoneXStyle, regularStyle) {\n if (isIphoneX()) {\n return iphoneXStyle;\n }\n return regularStyle;\n}\n\nexport function getStatusBarHeight(safe) {\n return Platform.select({\n ios: ifIphoneX(safe ? 44 : 30, 20),\n android: StatusBar.currentHeight,\n default: 0\n });\n}\n\nexport function getBottomSpace() {\n return isIphoneX() ? 34 : 0;\n}\n","import { Animated } from 'react-native';\n\nconst { add, multiply } = Animated;\n\n/**\n * Use an Animated Node based on a condition. Similar to Reanimated's `cond`.\n *\n * @param condition Animated Node representing the condition, must be 0 or 1, 1 means `true`, 0 means `false`\n * @param main Animated Node to use if the condition is `true`\n * @param fallback Animated Node to use if the condition is `false`\n */\nexport default function conditional(\n condition: Animated.AnimatedInterpolation,\n main: Animated.AnimatedInterpolation,\n fallback: Animated.AnimatedInterpolation\n) {\n // To implement this behavior, we multiply the main node with the condition.\n // So if condition is 0, result will be 0, and if condition is 1, result will be main node.\n // Then we multiple reverse of the condition (0 if condition is 1) with the fallback.\n // So if condition is 0, result will be fallback node, and if condition is 1, result will be 0,\n // This way, one of them will always be 0, and other one will be the value we need.\n // In the end we add them both together, 0 + value we need = value we need\n return add(\n multiply(condition, main),\n multiply(\n condition.interpolate({\n inputRange: [0, 1],\n outputRange: [1, 0],\n }),\n fallback\n )\n );\n}\n","import { Animated } from 'react-native';\nimport { isIphoneX } from 'react-native-iphone-x-helper';\nimport conditional from '../utils/conditional';\nimport type {\n StackCardInterpolationProps,\n StackCardInterpolatedStyle,\n} from '../types';\n\nconst { add, multiply } = Animated;\n\n/**\n * Standard iOS-style slide in from the right.\n */\nexport function forHorizontalIOS({\n current,\n next,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateFocused = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.width, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const translateUnfocused = next\n ? multiply(\n next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, screen.width * -0.3],\n extrapolate: 'clamp',\n }),\n inverted\n )\n : 0;\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.07],\n extrapolate: 'clamp',\n });\n\n const shadowOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.3],\n extrapolate: 'clamp',\n });\n\n return {\n cardStyle: {\n transform: [\n // Translation for the animation of the current card\n { translateX: translateFocused },\n // Translation for the animation of the card on top of this\n { translateX: translateUnfocused },\n ],\n },\n overlayStyle: { opacity: overlayOpacity },\n shadowStyle: { shadowOpacity },\n };\n}\n\n/**\n * Standard iOS-style slide in from the bottom (used for modals).\n */\nexport function forVerticalIOS({\n current,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n return {\n cardStyle: {\n transform: [\n // Translation for the animation of the current card\n { translateY },\n ],\n },\n };\n}\n\n/**\n * Standard iOS-style modal animation in iOS 13.\n */\nexport function forModalPresentationIOS({\n index,\n current,\n next,\n inverted,\n layouts: { screen },\n insets,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const isLandscape = screen.width > screen.height;\n const topOffset = isLandscape ? 0 : 10;\n const statusBarHeight = insets.top;\n const aspectRatio = screen.height / screen.width;\n\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateY = multiply(\n progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [\n screen.height,\n index === 0 ? 0 : topOffset,\n (index === 0 ? statusBarHeight : 0) - topOffset * aspectRatio,\n ],\n }),\n inverted\n );\n\n const overlayOpacity = progress.interpolate({\n inputRange: [0, 1, 1.0001, 2],\n outputRange: [0, 0.3, 1, 1],\n });\n\n const scale = isLandscape\n ? 1\n : progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [\n 1,\n 1,\n screen.width ? 1 - (topOffset * 2) / screen.width : 1,\n ],\n });\n\n const borderRadius = isLandscape\n ? 0\n : index === 0\n ? progress.interpolate({\n inputRange: [0, 1, 1.0001, 2],\n outputRange: [0, 0, isIphoneX() ? 38 : 0, 10],\n })\n : 10;\n\n return {\n cardStyle: {\n overflow: 'hidden',\n borderTopLeftRadius: borderRadius,\n borderTopRightRadius: borderRadius,\n marginTop: index === 0 ? 0 : statusBarHeight,\n marginBottom: index === 0 ? 0 : topOffset,\n transform: [{ translateY }, { scale }],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Standard Android-style fade in from the bottom for Android Oreo.\n */\nexport function forFadeFromBottomAndroid({\n current,\n inverted,\n layouts: { screen },\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * 0.08, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const opacity = conditional(\n closing,\n current.progress,\n current.progress.interpolate({\n inputRange: [0, 0.5, 0.9, 1],\n outputRange: [0, 0.25, 0.7, 1],\n })\n );\n\n return {\n cardStyle: {\n opacity,\n transform: [{ translateY }],\n },\n };\n}\n\n/**\n * Standard Android-style reveal from the bottom for Android Pie.\n */\nexport function forRevealFromBottomAndroid({\n current,\n next,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const containerTranslateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const cardTranslateYFocused = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * (95.9 / 100) * -1, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const cardTranslateYUnfocused = next\n ? multiply(\n next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, screen.height * (2 / 100) * -1],\n extrapolate: 'clamp',\n }),\n inverted\n )\n : 0;\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 0.36, 1],\n outputRange: [0, 0.1, 0.1],\n extrapolate: 'clamp',\n });\n\n return {\n containerStyle: {\n overflow: 'hidden',\n transform: [{ translateY: containerTranslateY }],\n },\n cardStyle: {\n transform: [\n { translateY: cardTranslateYFocused },\n { translateY: cardTranslateYUnfocused },\n ],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Standard Android-style reveal from the bottom for Android Q.\n */\nexport function forScaleFromCenterAndroid({\n current,\n next,\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const opacity = progress.interpolate({\n inputRange: [0, 0.75, 0.875, 1, 1.0825, 1.2075, 2],\n outputRange: [0, 0, 1, 1, 1, 1, 0],\n });\n\n const scale = conditional(\n closing,\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0.9, 1],\n extrapolate: 'clamp',\n }),\n progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [0.85, 1, 1.1],\n })\n );\n\n return {\n containerStyle: {\n opacity,\n transform: [{ scale }],\n },\n };\n}\n\nexport function forNoAnimation(): StackCardInterpolatedStyle {\n return {};\n}\n","import { Animated, I18nManager } from 'react-native';\nimport type {\n StackHeaderInterpolationProps,\n StackHeaderInterpolatedStyle,\n} from '../types';\n\nconst { add } = Animated;\n\n/**\n * Standard UIKit style animation for the header where the title fades into the back button label.\n */\nexport function forUIKit({\n current,\n next,\n layouts,\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const defaultOffset = 100;\n const leftSpacing = 27;\n\n // The title and back button title should cross-fade to each other\n // When screen is fully open, the title should be in center, and back title should be on left\n // When screen is closing, the previous title will animate to back title's position\n // And back title will animate to title's position\n // We achieve this by calculating the offsets needed to translate title to back title's position and vice-versa\n const leftLabelOffset = layouts.leftLabel\n ? (layouts.screen.width - layouts.leftLabel.width) / 2 - leftSpacing\n : defaultOffset;\n const titleLeftOffset = layouts.title\n ? (layouts.screen.width - layouts.title.width) / 2 - leftSpacing\n : defaultOffset;\n\n // When the current title is animating to right, it is centered in the right half of screen in middle of transition\n // The back title also animates in from this position\n const rightOffset = layouts.screen.width / 4;\n\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n return {\n leftButtonStyle: {\n opacity: progress.interpolate({\n inputRange: [0.3, 1, 1.5],\n outputRange: [0, 1, 0],\n }),\n },\n leftLabelStyle: {\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.isRTL\n ? [-rightOffset, 0, leftLabelOffset]\n : [leftLabelOffset, 0, -rightOffset],\n }),\n },\n ],\n },\n rightButtonStyle: {\n opacity: progress.interpolate({\n inputRange: [0.3, 1, 1.5],\n outputRange: [0, 1, 0],\n }),\n },\n titleStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 0.4, 1, 1.5],\n outputRange: [0, 0.1, 1, 0],\n }),\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0.5, 1, 2],\n outputRange: I18nManager.isRTL\n ? [-titleLeftOffset, 0, rightOffset]\n : [rightOffset, 0, -titleLeftOffset],\n }),\n },\n ],\n },\n backgroundStyle: {\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.isRTL\n ? [-layouts.screen.width, 0, layouts.screen.width]\n : [layouts.screen.width, 0, -layouts.screen.width],\n }),\n },\n ],\n },\n };\n}\n\n/**\n * Simple fade animation for the header elements.\n */\nexport function forFade({\n current,\n next,\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const opacity = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [0, 1, 0],\n });\n\n return {\n leftButtonStyle: { opacity },\n rightButtonStyle: { opacity },\n titleStyle: { opacity },\n backgroundStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 1, 1.9, 2],\n outputRange: [0, 1, 1, 0],\n }),\n },\n };\n}\n\n/**\n * Simple translate animation to translate the header to left.\n */\nexport function forSlideLeft({\n current,\n next,\n layouts: { screen },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateX = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.isRTL\n ? [-screen.width, 0, screen.width]\n : [screen.width, 0, -screen.width],\n });\n\n const transform = [{ translateX }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\n/**\n * Simple translate animation to translate the header to right.\n */\nexport function forSlideRight({\n current,\n next,\n layouts: { screen },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateX = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.isRTL\n ? [screen.width, 0, -screen.width]\n : [-screen.width, 0, screen.width],\n });\n\n const transform = [{ translateX }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\n/**\n * Simple translate animation to translate the header to slide up.\n */\nexport function forSlideUp({\n current,\n next,\n layouts: { header },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateY = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [-header.height, 0, -header.height],\n });\n\n const transform = [{ translateY }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\nexport function forNoAnimation(): StackHeaderInterpolatedStyle {\n return {};\n}\n","import { Easing } from 'react-native';\nimport type { TransitionSpec } from '../types';\n\n/**\n * Exact values from UINavigationController's animation configuration.\n */\nexport const TransitionIOSSpec: TransitionSpec = {\n animation: 'spring',\n config: {\n stiffness: 1000,\n damping: 500,\n mass: 3,\n overshootClamping: true,\n restDisplacementThreshold: 10,\n restSpeedThreshold: 10,\n },\n};\n\n/**\n * Configuration for activity open animation from Android Nougat.\n * See http://aosp.opersys.com/xref/android-7.1.2_r37/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml\n */\nexport const FadeInFromBottomAndroidSpec: TransitionSpec = {\n animation: 'timing',\n config: {\n duration: 350,\n easing: Easing.out(Easing.poly(5)),\n },\n};\n\n/**\n * Configuration for activity close animation from Android Nougat.\n * See http://aosp.opersys.com/xref/android-7.1.2_r37/xref/frameworks/base/core/res/res/anim/activity_close_exit.xml\n */\nexport const FadeOutToBottomAndroidSpec: TransitionSpec = {\n animation: 'timing',\n config: {\n duration: 150,\n easing: Easing.in(Easing.linear),\n },\n};\n\n/**\n * Approximate configuration for activity open animation from Android Pie.\n * See http://aosp.opersys.com/xref/android-9.0.0_r47/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml\n */\nexport const RevealFromBottomAndroidSpec: TransitionSpec = {\n animation: 'timing',\n config: {\n duration: 425,\n // This is super rough approximation of the path used for the curve by android\n // See http://aosp.opersys.com/xref/android-9.0.0_r47/xref/frameworks/base/core/res/res/interpolator/fast_out_extra_slow_in.xml\n easing: Easing.bezier(0.35, 0.45, 0, 1),\n },\n};\n\n/**\n * Approximate configuration for activity open animation from Android Q.\n * See http://aosp.opersys.com/xref/android-10.0.0_r2/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml\n */\nexport const ScaleFromCenterAndroidSpec: TransitionSpec = {\n animation: 'timing',\n config: {\n duration: 400,\n // This is super rough approximation of the path used for the curve by android\n // See http://aosp.opersys.com/xref/android-10.0.0_r2/xref/frameworks/base/core/res/res/interpolator/fast_out_extra_slow_in.xml\n easing: Easing.bezier(0.35, 0.45, 0, 1),\n },\n};\n","import { Platform } from 'react-native';\nimport {\n forHorizontalIOS,\n forVerticalIOS,\n forScaleFromCenterAndroid,\n forRevealFromBottomAndroid,\n forFadeFromBottomAndroid,\n forModalPresentationIOS,\n} from './CardStyleInterpolators';\nimport { forFade } from './HeaderStyleInterpolators';\nimport {\n TransitionIOSSpec,\n ScaleFromCenterAndroidSpec,\n RevealFromBottomAndroidSpec,\n FadeOutToBottomAndroidSpec,\n FadeInFromBottomAndroidSpec,\n} from './TransitionSpecs';\nimport type { TransitionPreset } from '../types';\n\nconst ANDROID_VERSION_PIE = 28;\nconst ANDROID_VERSION_10 = 29;\n\n/**\n * Standard iOS navigation transition.\n */\nexport const SlideFromRightIOS: TransitionPreset = {\n gestureDirection: 'horizontal',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forHorizontalIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard iOS navigation transition for modals.\n */\nexport const ModalSlideFromBottomIOS: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forVerticalIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard iOS modal presentation style (introduced in iOS 13).\n */\nexport const ModalPresentationIOS: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forModalPresentationIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android < 9 (Oreo).\n */\nexport const FadeFromBottomAndroid: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: FadeInFromBottomAndroidSpec,\n close: FadeOutToBottomAndroidSpec,\n },\n cardStyleInterpolator: forFadeFromBottomAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android 9 (Pie).\n */\nexport const RevealFromBottomAndroid: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: RevealFromBottomAndroidSpec,\n close: RevealFromBottomAndroidSpec,\n },\n cardStyleInterpolator: forRevealFromBottomAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android 10 (Q).\n */\nexport const ScaleFromCenterAndroid: TransitionPreset = {\n gestureDirection: 'horizontal',\n transitionSpec: {\n open: ScaleFromCenterAndroidSpec,\n close: ScaleFromCenterAndroidSpec,\n },\n cardStyleInterpolator: forScaleFromCenterAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Default navigation transition for the current platform.\n */\nexport const DefaultTransition = Platform.select({\n ios: SlideFromRightIOS,\n android:\n Platform.Version >= ANDROID_VERSION_10\n ? ScaleFromCenterAndroid\n : Platform.Version >= ANDROID_VERSION_PIE\n ? RevealFromBottomAndroid\n : FadeFromBottomAndroid,\n default: ScaleFromCenterAndroid,\n});\n\n/**\n * Default modal transition for the current platform.\n */\nexport const ModalTransition = Platform.select({\n ios: ModalSlideFromBottomIOS,\n default: DefaultTransition,\n});\n","import * as React from 'react';\nimport {\n Animated,\n StyleSheet,\n LayoutChangeEvent,\n Dimensions,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\nimport type {\n ParamListBase,\n Route,\n StackNavigationState,\n} from '@react-navigation/native';\n\nimport {\n MaybeScreenContainer,\n MaybeScreen,\n shouldUseActivityState,\n} from '../Screens';\nimport { getDefaultHeaderHeight } from '../Header/HeaderSegment';\nimport type { Props as HeaderContainerProps } from '../Header/HeaderContainer';\nimport CardContainer from './CardContainer';\nimport {\n DefaultTransition,\n ModalTransition,\n} from '../../TransitionConfigs/TransitionPresets';\nimport { forNoAnimation as forNoAnimationHeader } from '../../TransitionConfigs/HeaderStyleInterpolators';\nimport { forNoAnimation as forNoAnimationCard } from '../../TransitionConfigs/CardStyleInterpolators';\nimport getDistanceForDirection from '../../utils/getDistanceForDirection';\nimport type {\n Layout,\n StackHeaderMode,\n StackCardMode,\n Scene,\n StackDescriptorMap,\n StackNavigationOptions,\n StackDescriptor,\n} from '../../types';\n\ntype GestureValues = {\n [key: string]: Animated.Value;\n};\n\ntype Props = {\n mode: StackCardMode;\n insets: EdgeInsets;\n state: StackNavigationState<ParamListBase>;\n descriptors: StackDescriptorMap;\n routes: Route<string>[];\n openingRouteKeys: string[];\n closingRouteKeys: string[];\n onOpenRoute: (props: { route: Route<string> }) => void;\n onCloseRoute: (props: { route: Route<string> }) => void;\n getPreviousRoute: (props: {\n route: Route<string>;\n }) => Route<string> | undefined;\n getGesturesEnabled: (props: { route: Route<string> }) => boolean;\n renderHeader: (props: HeaderContainerProps) => React.ReactNode;\n renderScene: (props: { route: Route<string> }) => React.ReactNode;\n headerMode: StackHeaderMode;\n isParentHeaderShown: boolean;\n onTransitionStart: (\n props: { route: Route<string> },\n closing: boolean\n ) => void;\n onTransitionEnd: (props: { route: Route<string> }, closing: boolean) => void;\n onPageChangeStart?: () => void;\n onPageChangeConfirm?: (force: boolean) => void;\n onPageChangeCancel?: () => void;\n onGestureStart?: (props: { route: Route<string> }) => void;\n onGestureEnd?: (props: { route: Route<string> }) => void;\n onGestureCancel?: (props: { route: Route<string> }) => void;\n detachInactiveScreens?: boolean;\n};\n\ntype State = {\n routes: Route<string>[];\n descriptors: StackDescriptorMap;\n scenes: Scene<Route<string>>[];\n gestures: GestureValues;\n layout: Layout;\n headerHeights: Record<string, number>;\n};\n\nconst EPSILON = 0.01;\n\nconst STATE_INACTIVE = 0;\nconst STATE_TRANSITIONING_OR_BELOW_TOP = 1;\nconst STATE_ON_TOP = 2;\n\nconst FALLBACK_DESCRIPTOR = Object.freeze({ options: {} });\n\nconst getHeaderHeights = (\n routes: Route<string>[],\n insets: EdgeInsets,\n isParentHeaderShown: boolean,\n descriptors: StackDescriptorMap,\n layout: Layout,\n previous: Record<string, number>\n) => {\n return routes.reduce<Record<string, number>>((acc, curr) => {\n const { options = {} } = descriptors[curr.key] || {};\n const style: any = StyleSheet.flatten(options.headerStyle || {});\n\n const height =\n typeof style.height === 'number' ? style.height : previous[curr.key];\n\n const safeAreaInsets = {\n ...insets,\n ...options.safeAreaInsets,\n };\n\n const {\n headerStatusBarHeight = isParentHeaderShown ? 0 : safeAreaInsets.top,\n } = options;\n\n acc[curr.key] =\n typeof height === 'number'\n ? height\n : getDefaultHeaderHeight(layout, headerStatusBarHeight);\n\n return acc;\n }, {});\n};\n\nconst getDistanceFromOptions = (\n mode: StackCardMode,\n layout: Layout,\n descriptor?: StackDescriptor\n) => {\n const {\n gestureDirection = mode === 'modal'\n ? ModalTransition.gestureDirection\n : DefaultTransition.gestureDirection,\n } = descriptor?.options || {};\n\n return getDistanceForDirection(layout, gestureDirection);\n};\n\nconst getProgressFromGesture = (\n mode: StackCardMode,\n gesture: Animated.Value,\n layout: Layout,\n descriptor?: StackDescriptor\n) => {\n const distance = getDistanceFromOptions(\n mode,\n {\n // Make sure that we have a non-zero distance, otherwise there will be incorrect progress\n // This causes blank screen on web if it was previously inside container with display: none\n width: Math.max(1, layout.width),\n height: Math.max(1, layout.height),\n },\n descriptor\n );\n\n if (distance > 0) {\n return gesture.interpolate({\n inputRange: [0, distance],\n outputRange: [1, 0],\n });\n }\n\n return gesture.interpolate({\n inputRange: [distance, 0],\n outputRange: [0, 1],\n });\n};\n\nexport default class CardStack extends React.Component<Props, State> {\n static getDerivedStateFromProps(props: Props, state: State) {\n if (\n props.routes === state.routes &&\n props.descriptors === state.descriptors\n ) {\n return null;\n }\n\n const gestures = props.routes.reduce<GestureValues>((acc, curr) => {\n const descriptor = props.descriptors[curr.key];\n const { animationEnabled } = descriptor?.options || {};\n\n acc[curr.key] =\n state.gestures[curr.key] ||\n new Animated.Value(\n props.openingRouteKeys.includes(curr.key) &&\n animationEnabled !== false\n ? getDistanceFromOptions(props.mode, state.layout, descriptor)\n : 0\n );\n\n return acc;\n }, {});\n\n return {\n routes: props.routes,\n scenes: props.routes.map((route, index, self) => {\n const previousRoute = self[index - 1];\n const nextRoute = self[index + 1];\n\n const oldScene = state.scenes[index];\n\n const currentGesture = gestures[route.key];\n const previousGesture = previousRoute\n ? gestures[previousRoute.key]\n : undefined;\n const nextGesture = nextRoute ? gestures[nextRoute.key] : undefined;\n\n const descriptor =\n props.descriptors[route.key] ||\n state.descriptors[route.key] ||\n (oldScene ? oldScene.descriptor : FALLBACK_DESCRIPTOR);\n\n const nextDescriptor =\n props.descriptors[nextRoute?.key] ||\n state.descriptors[nextRoute?.key];\n\n const previousDescriptor =\n props.descriptors[previousRoute?.key] ||\n state.descriptors[previousRoute?.key];\n\n const scene = {\n route,\n descriptor,\n progress: {\n current: getProgressFromGesture(\n props.mode,\n currentGesture,\n state.layout,\n descriptor\n ),\n next: nextGesture\n ? getProgressFromGesture(\n props.mode,\n nextGesture,\n state.layout,\n nextDescriptor\n )\n : undefined,\n previous: previousGesture\n ? getProgressFromGesture(\n props.mode,\n previousGesture,\n state.layout,\n previousDescriptor\n )\n : undefined,\n },\n __memo: [\n route,\n state.layout,\n descriptor,\n nextDescriptor,\n previousDescriptor,\n currentGesture,\n nextGesture,\n previousGesture,\n ],\n };\n\n if (\n oldScene &&\n scene.__memo.every((it, i) => {\n // @ts-expect-error: we haven't added __memo to the annotation to prevent usage elsewhere\n return oldScene.__memo[i] === it;\n })\n ) {\n return oldScene;\n }\n\n return scene;\n }),\n gestures,\n descriptors: props.descriptors,\n headerHeights: getHeaderHeights(\n props.routes,\n props.insets,\n props.isParentHeaderShown,\n state.descriptors,\n state.layout,\n state.headerHeights\n ),\n };\n }\n\n constructor(props: Props) {\n super(props);\n\n const { height = 0, width = 0 } = Dimensions.get('window');\n\n this.state = {\n routes: [],\n scenes: [],\n gestures: {},\n layout: { height, width },\n descriptors: this.props.descriptors,\n // Used when card's header is null and mode is float to make transition\n // between screens with headers and those without headers smooth.\n // This is not a great heuristic here. We don't know synchronously\n // on mount what the header height is so we have just used the most\n // common cases here.\n headerHeights: {},\n };\n }\n\n private handleLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n const layout = { width, height };\n\n this.setState((state, props) => {\n if (height === state.layout.height && width === state.layout.width) {\n return null;\n }\n\n return {\n layout,\n headerHeights: getHeaderHeights(\n props.routes,\n props.insets,\n props.isParentHeaderShown,\n state.descriptors,\n layout,\n state.headerHeights\n ),\n };\n });\n };\n\n private handleHeaderLayout = ({\n route,\n height,\n }: {\n route: Route<string>;\n height: number;\n }) => {\n this.setState(({ headerHeights }) => {\n const previousHeight = headerHeights[route.key];\n\n if (previousHeight === height) {\n return null;\n }\n\n return {\n headerHeights: {\n ...headerHeights,\n [route.key]: height,\n },\n };\n });\n };\n\n private getFocusedRoute = () => {\n const { state } = this.props;\n\n return state.routes[state.index];\n };\n\n private getPreviousScene = ({ route }: { route: Route<string> }) => {\n const { getPreviousRoute } = this.props;\n const { scenes } = this.state;\n\n const previousRoute = getPreviousRoute({ route });\n\n if (previousRoute) {\n const previousScene = scenes.find(\n (scene) => scene.route.key === previousRoute.key\n );\n\n return previousScene;\n }\n\n return undefined;\n };\n\n render() {\n const {\n mode,\n insets,\n descriptors,\n state,\n routes,\n closingRouteKeys,\n onOpenRoute,\n onCloseRoute,\n getGesturesEnabled,\n renderHeader,\n renderScene,\n headerMode,\n isParentHeaderShown,\n onTransitionStart,\n onTransitionEnd,\n onPageChangeStart,\n onPageChangeConfirm,\n onPageChangeCancel,\n onGestureStart,\n onGestureEnd,\n onGestureCancel,\n // Enable on new versions of `react-native-screens`\n // On older versions of `react-native-screens`, there's an issue with screens not being responsive to user interaction.\n detachInactiveScreens = shouldUseActivityState,\n } = this.props;\n\n const { scenes, layout, gestures, headerHeights } = this.state;\n\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor ? focusedDescriptor.options : {};\n const focusedHeaderHeight = headerHeights[focusedRoute.key];\n\n let defaultTransitionPreset =\n mode === 'modal' ? ModalTransition : DefaultTransition;\n\n if (headerMode === 'screen') {\n defaultTransitionPreset = {\n ...defaultTransitionPreset,\n headerStyleInterpolator: forNoAnimationHeader,\n };\n }\n\n const {\n top = insets.top,\n right = insets.right,\n bottom = insets.bottom,\n left = insets.left,\n } = focusedOptions.safeAreaInsets || {};\n\n let activeScreensLimit = 1;\n\n for (let i = scenes.length - 1; i >= 0; i--) {\n const {\n // By default, we don't want to detach the previous screen of the active one for modals\n detachPreviousScreen = mode === 'modal'\n ? i !== scenes.length - 1\n : true,\n } = scenes[i].descriptor.options;\n\n if (detachPreviousScreen === false) {\n activeScreensLimit++;\n } else {\n break;\n }\n }\n\n const isFloatHeaderAbsolute =\n headerMode === 'float'\n ? this.state.scenes.slice(-2).some((scene) => {\n const { descriptor } = scene;\n const options = descriptor ? descriptor.options : {};\n const { headerTransparent, headerShown = true } = options;\n\n if (headerTransparent || headerShown === false) {\n return true;\n }\n\n return false;\n })\n : false;\n\n const floatingHeader =\n headerMode === 'float' ? (\n <React.Fragment key=\"header\">\n {renderHeader({\n mode: 'float',\n layout,\n insets: { top, right, bottom, left },\n scenes,\n getPreviousScene: this.getPreviousScene,\n getFocusedRoute: this.getFocusedRoute,\n onContentHeightChange: this.handleHeaderLayout,\n gestureDirection:\n focusedOptions.gestureDirection !== undefined\n ? focusedOptions.gestureDirection\n : defaultTransitionPreset.gestureDirection,\n styleInterpolator:\n focusedOptions.headerStyleInterpolator !== undefined\n ? focusedOptions.headerStyleInterpolator\n : defaultTransitionPreset.headerStyleInterpolator,\n style: [\n styles.floating,\n isFloatHeaderAbsolute && [\n // Without this, the header buttons won't be touchable on Android when headerTransparent: true\n { height: focusedHeaderHeight },\n styles.absolute,\n ],\n ],\n })}\n </React.Fragment>\n ) : null;\n\n return (\n <React.Fragment>\n {isFloatHeaderAbsolute ? null : floatingHeader}\n <MaybeScreenContainer\n enabled={detachInactiveScreens}\n style={styles.container}\n onLayout={this.handleLayout}\n >\n {routes.map((route, index, self) => {\n const focused = focusedRoute.key === route.key;\n const gesture = gestures[route.key];\n const scene = scenes[index];\n\n // For the screens that shouldn't be active, the value is 0\n // For those that should be active, but are not the top screen, the value is 1\n // For those on top of the stack and with interaction enabled, the value is 2\n // For the old implementation, it stays the same it was\n let isScreenActive: Animated.AnimatedInterpolation | 2 | 1 | 0 = 1;\n\n if (shouldUseActivityState) {\n if (index < self.length - activeScreensLimit - 1) {\n // screen should be inactive because it is too deep in the stack\n isScreenActive = STATE_INACTIVE;\n } else {\n const sceneForActivity = scenes[self.length - 1];\n const outputValue =\n index === self.length - 1\n ? STATE_ON_TOP // the screen is on top after the transition\n : index >= self.length - activeScreensLimit\n ? STATE_TRANSITIONING_OR_BELOW_TOP // the screen should stay active after the transition, it is not on top but is in activeLimit\n : STATE_INACTIVE; // the screen should be active only during the transition, it is at the edge of activeLimit\n isScreenActive = sceneForActivity\n ? sceneForActivity.progress.current.interpolate({\n inputRange: [0, 1 - EPSILON, 1],\n outputRange: [1, 1, outputValue],\n extrapolate: 'clamp',\n })\n : STATE_TRANSITIONING_OR_BELOW_TOP;\n }\n } else {\n isScreenActive = scene.progress.next\n ? scene.progress.next.interpolate({\n inputRange: [0, 1 - EPSILON, 1],\n outputRange: [1, 1, 0],\n extrapolate: 'clamp',\n })\n : 1;\n }\n\n const {\n safeAreaInsets,\n headerShown = true,\n headerTransparent,\n cardShadowEnabled,\n cardOverlayEnabled,\n cardOverlay,\n cardStyle,\n animationEnabled,\n gestureResponseDistance,\n gestureVelocityImpact,\n gestureDirection = defaultTransitionPreset.gestureDirection,\n transitionSpec = defaultTransitionPreset.transitionSpec,\n cardStyleInterpolator = animationEnabled === false\n ? forNoAnimationCard\n : defaultTransitionPreset.cardStyleInterpolator,\n headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,\n } = scene.descriptor\n ? scene.descriptor.options\n : ({} as StackNavigationOptions);\n\n let transitionConfig = {\n gestureDirection,\n transitionSpec,\n cardStyleInterpolator,\n headerStyleInterpolator,\n };\n\n // When a screen is not the last, it should use next screen's transition config\n // Many transitions also animate the previous screen, so using 2 different transitions doesn't look right\n // For example combining a slide and a modal transition would look wrong otherwise\n // With this approach, combining different transition styles in the same navigator mostly looks right\n // This will still be broken when 2 transitions have different idle state (e.g. modal presentation),\n // but majority of the transitions look alright\n if (index !== self.length - 1) {\n const nextScene = scenes[index + 1];\n\n if (nextScene) {\n const {\n animationEnabled,\n gestureDirection = defaultTransitionPreset.gestureDirection,\n transitionSpec = defaultTransitionPreset.transitionSpec,\n cardStyleInterpolator = animationEnabled === false\n ? forNoAnimationCard\n : defaultTransitionPreset.cardStyleInterpolator,\n headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,\n } = nextScene.descriptor\n ? nextScene.descriptor.options\n : ({} as StackNavigationOptions);\n\n transitionConfig = {\n gestureDirection,\n transitionSpec,\n cardStyleInterpolator,\n headerStyleInterpolator,\n };\n }\n }\n\n const {\n top: safeAreaInsetTop = insets.top,\n right: safeAreaInsetRight = insets.right,\n bottom: safeAreaInsetBottom = insets.bottom,\n left: safeAreaInsetLeft = insets.left,\n } = safeAreaInsets || {};\n\n const headerHeight =\n headerMode !== 'none' && headerShown !== false\n ? headerHeights[route.key]\n : 0;\n\n return (\n <MaybeScreen\n key={route.key}\n style={StyleSheet.absoluteFill}\n enabled={detachInactiveScreens}\n active={isScreenActive}\n pointerEvents=\"box-none\"\n >\n <CardContainer\n index={index}\n active={index === self.length - 1}\n focused={focused}\n closing={closingRouteKeys.includes(route.key)}\n layout={layout}\n gesture={gesture}\n scene={scene}\n safeAreaInsetTop={safeAreaInsetTop}\n safeAreaInsetRight={safeAreaInsetRight}\n safeAreaInsetBottom={safeAreaInsetBottom}\n safeAreaInsetLeft={safeAreaInsetLeft}\n cardOverlay={cardOverlay}\n cardOverlayEnabled={cardOverlayEnabled}\n cardShadowEnabled={cardShadowEnabled}\n cardStyle={cardStyle}\n onPageChangeStart={onPageChangeStart}\n onPageChangeConfirm={onPageChangeConfirm}\n onPageChangeCancel={onPageChangeCancel}\n onGestureStart={onGestureStart}\n onGestureCancel={onGestureCancel}\n onGestureEnd={onGestureEnd}\n gestureResponseDistance={gestureResponseDistance}\n headerHeight={headerHeight}\n isParentHeaderShown={isParentHeaderShown}\n onHeaderHeightChange={this.handleHeaderLayout}\n getPreviousScene={this.getPreviousScene}\n getFocusedRoute={this.getFocusedRoute}\n mode={mode}\n headerMode={headerMode}\n headerShown={headerShown}\n hasAbsoluteHeader={\n isFloatHeaderAbsolute && !headerTransparent\n }\n renderHeader={renderHeader}\n renderScene={renderScene}\n onOpenRoute={onOpenRoute}\n onCloseRoute={onCloseRoute}\n onTransitionStart={onTransitionStart}\n onTransitionEnd={onTransitionEnd}\n gestureEnabled={index !== 0 && getGesturesEnabled({ route })}\n gestureVelocityImpact={gestureVelocityImpact}\n {...transitionConfig}\n />\n </MaybeScreen>\n );\n })}\n </MaybeScreenContainer>\n {isFloatHeaderAbsolute ? floatingHeader : null}\n </React.Fragment>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n absolute: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n },\n floating: {\n zIndex: 1,\n },\n});\n","import * as React from 'react';\nimport { TextInput, Keyboard, HostComponent } from 'react-native';\n\ntype Props = {\n enabled: boolean;\n children: (props: {\n onPageChangeStart: () => void;\n onPageChangeConfirm: (force: boolean) => void;\n onPageChangeCancel: () => void;\n }) => React.ReactNode;\n};\n\ntype InputRef = React.ElementRef<HostComponent<unknown>> | undefined;\n\nexport default class KeyboardManager extends React.Component<Props> {\n componentWillUnmount() {\n this.clearKeyboardTimeout();\n }\n\n // Numeric id of the previously focused text input\n // When a gesture didn't change the tab, we can restore the focused input with this\n private previouslyFocusedTextInput: InputRef = undefined;\n private startTimestamp: number = 0;\n private keyboardTimeout: any;\n\n private clearKeyboardTimeout = () => {\n if (this.keyboardTimeout !== undefined) {\n clearTimeout(this.keyboardTimeout);\n this.keyboardTimeout = undefined;\n }\n };\n\n private handlePageChangeStart = () => {\n if (!this.props.enabled) {\n return;\n }\n\n this.clearKeyboardTimeout();\n\n // @ts-expect-error: blurTextInput accepts both number and ref, but types say only ref\n const input: InputRef = TextInput.State.currentlyFocusedInput\n ? TextInput.State.currentlyFocusedInput()\n : TextInput.State.currentlyFocusedField();\n\n // When a page change begins, blur the currently focused input\n TextInput.State.blurTextInput(input);\n\n // Store the id of this input so we can refocus it if change was cancelled\n this.previouslyFocusedTextInput = input;\n\n // Store timestamp for touch start\n this.startTimestamp = Date.now();\n };\n\n private handlePageChangeConfirm = (force: boolean) => {\n if (!this.props.enabled) {\n return;\n }\n\n this.clearKeyboardTimeout();\n\n if (force) {\n // Always dismiss input, even if we don't have a ref to it\n // We might not have the ref if onPageChangeStart was never called\n // This can happen if page change was not from a gesture\n Keyboard.dismiss();\n } else {\n const input = this.previouslyFocusedTextInput;\n\n if (input) {\n // Dismiss the keyboard only if an input was a focused before\n // This makes sure we don't dismiss input on going back and focusing an input\n TextInput.State.blurTextInput(input);\n }\n }\n\n // Cleanup the ID on successful page change\n this.previouslyFocusedTextInput = undefined;\n };\n\n private handlePageChangeCancel = () => {\n if (!this.props.enabled) {\n return;\n }\n\n this.clearKeyboardTimeout();\n\n // The page didn't change, we should restore the focus of text input\n const input = this.previouslyFocusedTextInput;\n\n if (input) {\n // If the interaction was super short we should make sure keyboard won't hide again.\n\n // Too fast input refocus will result only in keyboard flashing on screen and hiding right away.\n // During first ~100ms keyboard will be dismissed no matter what,\n // so we have to make sure it won't interrupt input refocus logic.\n // That's why when the interaction is shorter than 100ms we add delay so it won't hide once again.\n // Subtracting timestamps makes us sure the delay is executed only when needed.\n if (Date.now() - this.startTimestamp < 100) {\n this.keyboardTimeout = setTimeout(() => {\n TextInput.State.focusTextInput(input);\n this.previouslyFocusedTextInput = undefined;\n }, 100);\n } else {\n TextInput.State.focusTextInput(input);\n this.previouslyFocusedTextInput = undefined;\n }\n }\n };\n\n render() {\n return this.props.children({\n onPageChangeStart: this.handlePageChangeStart,\n onPageChangeConfirm: this.handlePageChangeConfirm,\n onPageChangeCancel: this.handlePageChangeCancel,\n });\n }\n}\n","import * as React from 'react';\nimport {\n Animated,\n StyleSheet,\n Platform,\n TextProps,\n StyleProp,\n TextStyle,\n} from 'react-native';\nimport { useTheme } from '@react-navigation/native';\n\ntype Props = Omit<TextProps, 'style'> & {\n tintColor?: string;\n children?: string;\n style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;\n};\n\nexport default function HeaderTitle({ tintColor, style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.Text\n accessibilityRole=\"header\"\n aria-level=\"1\"\n numberOfLines={1}\n {...rest}\n style={[\n styles.title,\n { color: tintColor === undefined ? colors.text : tintColor },\n style,\n ]}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n title: Platform.select({\n ios: {\n fontSize: 17,\n fontWeight: '600',\n },\n android: {\n fontSize: 20,\n fontFamily: 'sans-serif-medium',\n fontWeight: 'normal',\n },\n default: {\n fontSize: 18,\n fontWeight: '500',\n },\n }),\n});\n","import * as React from 'react';\nimport { StackActions } from '@react-navigation/native';\n\nimport HeaderSegment from './HeaderSegment';\nimport HeaderTitle from './HeaderTitle';\nimport debounce from '../../utils/debounce';\nimport type { StackHeaderProps, StackHeaderTitleProps } from '../../types';\n\nexport default React.memo(function Header(props: StackHeaderProps) {\n const {\n scene,\n previous,\n layout,\n insets,\n navigation,\n styleInterpolator,\n } = props;\n const { options } = scene.descriptor;\n const title =\n typeof options.headerTitle !== 'function' &&\n options.headerTitle !== undefined\n ? options.headerTitle\n : options.title !== undefined\n ? options.title\n : scene.route.name;\n\n let leftLabel;\n\n // The label for the left back button shows the title of the previous screen\n // If a custom label is specified, we use it, otherwise use previous screen's title\n if (options.headerBackTitle !== undefined) {\n leftLabel = options.headerBackTitle;\n } else if (previous) {\n const o = previous.descriptor.options;\n\n leftLabel =\n typeof o.headerTitle !== 'function' && o.headerTitle !== undefined\n ? o.headerTitle\n : o.title !== undefined\n ? o.title\n : previous.route.name;\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const goBack = React.useCallback(\n debounce(() => {\n if (navigation.isFocused() && navigation.canGoBack()) {\n navigation.dispatch({\n ...StackActions.pop(),\n source: scene.route.key,\n });\n }\n }, 50),\n [navigation, scene.route.key]\n );\n\n return (\n <HeaderSegment\n {...options}\n insets={insets}\n layout={layout}\n scene={scene}\n title={title}\n leftLabel={leftLabel}\n headerTitle={\n typeof options.headerTitle !== 'function'\n ? (props: StackHeaderTitleProps) => <HeaderTitle {...props} />\n : options.headerTitle\n }\n onGoBack={previous ? goBack : undefined}\n styleInterpolator={styleInterpolator}\n />\n );\n});\n","export default function debounce<T extends (...args: any[]) => void>(\n func: T,\n duration: number\n): T {\n let timeout: NodeJS.Timeout | number | undefined;\n\n return function (this: any, ...args) {\n if (!timeout) {\n // eslint-disable-next-line babel/no-invalid-this\n func.apply(this, args);\n\n timeout = setTimeout(() => {\n timeout = undefined;\n }, duration);\n }\n } as T;\n}\n","import * as React from 'react';\nimport { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';\nimport {\n NavigationContext,\n NavigationRouteContext,\n Route,\n ParamListBase,\n} from '@react-navigation/native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\n\nimport Header from './Header';\nimport {\n forSlideLeft,\n forSlideUp,\n forNoAnimation,\n forSlideRight,\n} from '../../TransitionConfigs/HeaderStyleInterpolators';\nimport PreviousSceneContext from '../../utils/PreviousSceneContext';\nimport type {\n Layout,\n Scene,\n StackHeaderStyleInterpolator,\n StackNavigationProp,\n GestureDirection,\n} from '../../types';\n\nexport type Props = {\n mode: 'float' | 'screen';\n layout: Layout;\n insets: EdgeInsets;\n scenes: (Scene<Route<string>> | undefined)[];\n getPreviousScene: (props: {\n route: Route<string>;\n }) => Scene<Route<string>> | undefined;\n getFocusedRoute: () => Route<string>;\n onContentHeightChange?: (props: {\n route: Route<string>;\n height: number;\n }) => void;\n styleInterpolator: StackHeaderStyleInterpolator;\n gestureDirection: GestureDirection;\n style?: StyleProp<ViewStyle>;\n};\n\nexport default function HeaderContainer({\n mode,\n scenes,\n layout,\n insets,\n getPreviousScene,\n getFocusedRoute,\n onContentHeightChange,\n gestureDirection,\n styleInterpolator,\n style,\n}: Props) {\n const focusedRoute = getFocusedRoute();\n const parentPreviousScene = React.useContext(PreviousSceneContext);\n\n return (\n <Animated.View pointerEvents=\"box-none\" style={style}>\n {scenes.slice(-3).map((scene, i, self) => {\n if ((mode === 'screen' && i !== self.length - 1) || !scene) {\n return null;\n }\n\n const { header, headerShown = true, headerTransparent } =\n scene.descriptor.options || {};\n\n if (!headerShown) {\n return null;\n }\n\n const isFocused = focusedRoute.key === scene.route.key;\n const previous =\n getPreviousScene({ route: scene.route }) ?? parentPreviousScene;\n\n // If the screen is next to a headerless screen, we need to make the header appear static\n // This makes the header look like it's moving with the screen\n const previousScene = self[i - 1];\n const nextScene = self[i + 1];\n\n const { headerShown: previousHeaderShown = true } =\n previousScene?.descriptor.options || {};\n\n const { headerShown: nextHeaderShown = true } =\n nextScene?.descriptor.options || {};\n\n const isHeaderStatic =\n (previousHeaderShown === false &&\n // We still need to animate when coming back from next scene\n // A hacky way to check this is if the next scene exists\n !nextScene) ||\n nextHeaderShown === false;\n\n const props = {\n mode,\n layout,\n insets,\n scene,\n previous,\n navigation: scene.descriptor.navigation as StackNavigationProp<\n ParamListBase\n >,\n styleInterpolator:\n mode === 'float'\n ? isHeaderStatic\n ? gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ? forSlideUp\n : gestureDirection === 'horizontal-inverted'\n ? forSlideRight\n : forSlideLeft\n : styleInterpolator\n : forNoAnimation,\n };\n\n return (\n <NavigationContext.Provider\n key={scene.route.key}\n value={scene.descriptor.navigation}\n >\n <NavigationRouteContext.Provider value={scene.route}>\n <View\n onLayout={\n onContentHeightChange\n ? (e) => {\n const { height } = e.nativeEvent.layout;\n\n onContentHeightChange({\n route: scene.route,\n height,\n });\n }\n : undefined\n }\n pointerEvents={isFocused ? 'box-none' : 'none'}\n accessibilityElementsHidden={!isFocused}\n importantForAccessibility={\n isFocused ? 'auto' : 'no-hide-descendants'\n }\n style={\n // Avoid positioning the focused header absolutely\n // Otherwise accessibility tools don't seem to be able to find it\n (mode === 'float' && !isFocused) || headerTransparent\n ? styles.header\n : null\n }\n >\n {header !== undefined ? header(props) : <Header {...props} />}\n </View>\n </NavigationRouteContext.Provider>\n </NavigationContext.Provider>\n );\n })}\n </Animated.View>\n );\n}\n\nconst styles = StyleSheet.create({\n header: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n },\n});\n","import * as React from 'react';\nimport {\n SafeAreaProvider,\n SafeAreaConsumer,\n initialWindowSafeAreaInsets,\n} from 'react-native-safe-area-context';\nimport {\n getStatusBarHeight,\n getBottomSpace,\n} from 'react-native-iphone-x-helper';\n\n// The provider component for safe area initializes asynchornously\n// Until the insets are available, there'll be blank screen\n// To avoid the blank screen, we specify some initial values\nconst initialSafeAreaInsets = {\n // Approximate values which are good enough for most cases\n top: getStatusBarHeight(true),\n bottom: getBottomSpace(),\n right: 0,\n left: 0,\n // If we are on a newer version of the library, we can get the correct window insets\n // The component might not be filling the window, but this is good enough for most cases\n ...initialWindowSafeAreaInsets,\n};\n\ntype Props = {\n children: React.ReactNode;\n};\n\nexport default function SafeAreaProviderCompat({ children }: Props) {\n return (\n <SafeAreaConsumer>\n {(insets) => {\n if (insets) {\n // If we already have insets, don't wrap the stack in another safe area provider\n // This avoids an issue with updates at the cost of potentially incorrect values\n // https://github.com/react-navigation/react-navigation/issues/174\n return children;\n }\n\n return (\n <SafeAreaProvider initialSafeAreaInsets={initialSafeAreaInsets}>\n {children}\n </SafeAreaProvider>\n );\n }}\n </SafeAreaConsumer>\n );\n}\n","import * as React from 'react';\nimport { View, Platform, StyleSheet } from 'react-native';\nimport { SafeAreaConsumer, EdgeInsets } from 'react-native-safe-area-context';\nimport {\n NavigationHelpersContext,\n StackActions,\n StackNavigationState,\n Route,\n ParamListBase,\n} from '@react-navigation/native';\n\nimport { GestureHandlerRootView } from '../GestureHandler';\nimport CardStack from './CardStack';\nimport KeyboardManager from '../KeyboardManager';\nimport HeaderContainer, {\n Props as HeaderContainerProps,\n} from '../Header/HeaderContainer';\nimport SafeAreaProviderCompat from '../SafeAreaProviderCompat';\nimport type {\n StackNavigationHelpers,\n StackNavigationConfig,\n StackDescriptorMap,\n} from '../../types';\nimport HeaderShownContext from '../../utils/HeaderShownContext';\n\ntype Props = StackNavigationConfig & {\n state: StackNavigationState<ParamListBase>;\n navigation: StackNavigationHelpers;\n descriptors: StackDescriptorMap;\n};\n\ntype State = {\n // Local copy of the routes which are actually rendered\n routes: Route<string>[];\n // Previous routes, to compare whether routes have changed or not\n previousRoutes: Route<string>[];\n // Previous descriptors, to compare whether descriptors have changed or not\n previousDescriptors: StackDescriptorMap;\n // List of routes being opened, we need to animate pushing of these new routes\n openingRouteKeys: string[];\n // List of routes being closed, we need to animate popping of these routes\n closingRouteKeys: string[];\n // List of routes being replaced, we need to keep a copy until the new route animates in\n replacingRouteKeys: string[];\n // Since the local routes can vary from the routes from props, we need to keep the descriptors for old routes\n // Otherwise we won't be able to access the options for routes that were removed\n descriptors: StackDescriptorMap;\n};\n\nconst GestureHandlerWrapper = GestureHandlerRootView ?? View;\n\n/**\n * Compare two arrays with primitive values as the content.\n * We need to make sure that both values and order match.\n */\nconst isArrayEqual = (a: any[], b: any[]) =>\n a.length === b.length && a.every((it, index) => it === b[index]);\n\nexport default class StackView extends React.Component<Props, State> {\n static getDerivedStateFromProps(\n props: Readonly<Props>,\n state: Readonly<State>\n ) {\n // If there was no change in routes, we don't need to compute anything\n if (\n (props.state.routes === state.previousRoutes ||\n isArrayEqual(\n props.state.routes.map((r) => r.key),\n state.previousRoutes.map((r) => r.key)\n )) &&\n state.routes.length\n ) {\n let routes = state.routes;\n let previousRoutes = state.previousRoutes;\n let descriptors = props.descriptors;\n let previousDescriptors = state.previousDescriptors;\n\n if (props.descriptors !== state.previousDescriptors) {\n descriptors = state.routes.reduce<StackDescriptorMap>((acc, route) => {\n acc[route.key] =\n props.descriptors[route.key] || state.descriptors[route.key];\n\n return acc;\n }, {});\n\n previousDescriptors = props.descriptors;\n }\n\n if (props.state.routes !== state.previousRoutes) {\n // if any route objects have changed, we should update them\n const map = props.state.routes.reduce<Record<string, Route<string>>>(\n (acc, route) => {\n acc[route.key] = route;\n return acc;\n },\n {}\n );\n\n routes = state.routes.map((route) => map[route.key] || route);\n previousRoutes = props.state.routes;\n }\n\n return {\n routes,\n previousRoutes,\n descriptors,\n previousDescriptors,\n };\n }\n\n // Here we determine which routes were added or removed to animate them\n // We keep a copy of the route being removed in local state to be able to animate it\n\n let routes =\n props.state.index < props.state.routes.length - 1\n ? // Remove any extra routes from the state\n // The last visible route should be the focused route, i.e. at current index\n props.state.routes.slice(0, props.state.index + 1)\n : props.state.routes;\n\n // Now we need to determine which routes were added and removed\n let {\n openingRouteKeys,\n closingRouteKeys,\n replacingRouteKeys,\n previousRoutes,\n } = state;\n\n const previousFocusedRoute = previousRoutes[previousRoutes.length - 1] as\n | Route<string>\n | undefined;\n const nextFocusedRoute = routes[routes.length - 1];\n\n const isAnimationEnabled = (key: string) => {\n const descriptor = props.descriptors[key] || state.descriptors[key];\n\n return descriptor ? descriptor.options.animationEnabled !== false : true;\n };\n\n const getAnimationTypeForReplace = (key: string) => {\n const descriptor = props.descriptors[key] || state.descriptors[key];\n\n return descriptor.options.animationTypeForReplace ?? 'push';\n };\n\n if (\n previousFocusedRoute &&\n previousFocusedRoute.key !== nextFocusedRoute.key\n ) {\n // We only need to animate routes if the focused route changed\n // Animating previous routes won't be visible coz the focused route is on top of everything\n\n if (!previousRoutes.some((r) => r.key === nextFocusedRoute.key)) {\n // A new route has come to the focus, we treat this as a push\n // A replace can also trigger this, the animation should look like push\n\n if (\n isAnimationEnabled(nextFocusedRoute.key) &&\n !openingRouteKeys.includes(nextFocusedRoute.key)\n ) {\n // In this case, we need to animate pushing the focused route\n // We don't care about animating any other added routes because they won't be visible\n openingRouteKeys = [...openingRouteKeys, nextFocusedRoute.key];\n\n closingRouteKeys = closingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n replacingRouteKeys = replacingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n\n if (!routes.some((r) => r.key === previousFocusedRoute.key)) {\n // The previous focused route isn't present in state, we treat this as a replace\n\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n if (getAnimationTypeForReplace(nextFocusedRoute.key) === 'pop') {\n closingRouteKeys = [\n ...closingRouteKeys,\n previousFocusedRoute.key,\n ];\n\n // By default, new routes have a push animation, so we add it to `openingRouteKeys` before\n // But since user configured it to animate the old screen like a pop, we need to add this without animation\n // So remove it from `openingRouteKeys` which will remove the animation\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n\n // Keep the route being removed at the end to animate it out\n routes = [...routes, previousFocusedRoute];\n } else {\n replacingRouteKeys = [\n ...replacingRouteKeys,\n previousFocusedRoute.key,\n ];\n\n closingRouteKeys = closingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n // Keep the old route in the state because it's visible under the new route, and removing it will feel abrupt\n // We need to insert it just before the focused one (the route being pushed)\n // After the push animation is completed, routes being replaced will be removed completely\n routes = routes.slice();\n routes.splice(routes.length - 1, 0, previousFocusedRoute);\n }\n }\n }\n } else if (!routes.some((r) => r.key === previousFocusedRoute.key)) {\n // The previously focused route was removed, we treat this as a pop\n\n if (\n isAnimationEnabled(previousFocusedRoute.key) &&\n !closingRouteKeys.includes(previousFocusedRoute.key)\n ) {\n closingRouteKeys = [...closingRouteKeys, previousFocusedRoute.key];\n\n // Sometimes a route can be closed before the opening animation finishes\n // So we also need to remove it from the opening list\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n replacingRouteKeys = replacingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n // Keep a copy of route being removed in the state to be able to animate it\n routes = [...routes, previousFocusedRoute];\n }\n } else {\n // Looks like some routes were re-arranged and no focused routes were added/removed\n // i.e. the currently focused route already existed and the previously focused route still exists\n // We don't know how to animate this\n }\n } else if (replacingRouteKeys.length || closingRouteKeys.length) {\n // Keep the routes we are closing or replacing if animation is enabled for them\n routes = routes.slice();\n routes.splice(\n routes.length - 1,\n 0,\n ...state.routes.filter(({ key }) =>\n isAnimationEnabled(key)\n ? replacingRouteKeys.includes(key) || closingRouteKeys.includes(key)\n : false\n )\n );\n }\n\n if (!routes.length) {\n throw new Error(\n 'There should always be at least one route in the navigation state.'\n );\n }\n\n const descriptors = routes.reduce<StackDescriptorMap>((acc, route) => {\n acc[route.key] =\n props.descriptors[route.key] || state.descriptors[route.key];\n\n return acc;\n }, {});\n\n return {\n routes,\n previousRoutes: props.state.routes,\n previousDescriptors: props.descriptors,\n openingRouteKeys,\n closingRouteKeys,\n replacingRouteKeys,\n descriptors,\n };\n }\n\n state: State = {\n routes: [],\n previousRoutes: [],\n previousDescriptors: {},\n openingRouteKeys: [],\n closingRouteKeys: [],\n replacingRouteKeys: [],\n descriptors: {},\n };\n\n private getGesturesEnabled = ({ route }: { route: Route<string> }) => {\n const descriptor = this.state.descriptors[route.key];\n\n if (descriptor) {\n const { gestureEnabled, animationEnabled } = descriptor.options;\n\n if (animationEnabled === false) {\n // When animation is disabled, also disable gestures\n // The gesture to dismiss a route will look weird when not animated\n return false;\n }\n\n return gestureEnabled !== false;\n }\n\n return false;\n };\n\n private getPreviousRoute = ({ route }: { route: Route<string> }) => {\n const { closingRouteKeys, replacingRouteKeys } = this.state;\n const routes = this.state.routes.filter(\n (r) =>\n r.key === route.key ||\n (!closingRouteKeys.includes(r.key) &&\n !replacingRouteKeys.includes(r.key))\n );\n\n const index = routes.findIndex((r) => r.key === route.key);\n\n return routes[index - 1];\n };\n\n private renderScene = ({ route }: { route: Route<string> }) => {\n const descriptor =\n this.state.descriptors[route.key] || this.props.descriptors[route.key];\n\n if (!descriptor) {\n return null;\n }\n\n return descriptor.render();\n };\n\n private renderHeader = (props: HeaderContainerProps) => {\n return <HeaderContainer {...props} />;\n };\n\n private handleOpenRoute = ({ route }: { route: Route<string> }) => {\n const { state, navigation } = this.props;\n const { closingRouteKeys, replacingRouteKeys } = this.state;\n\n if (\n closingRouteKeys.some((key) => key === route.key) &&\n replacingRouteKeys.every((key) => key !== route.key) &&\n state.routeNames.includes(route.name) &&\n !state.routes.some((r) => r.key === route.key)\n ) {\n // If route isn't present in current state, but was closing, assume that a close animation was cancelled\n // So we need to add this route back to the state\n navigation.navigate(route);\n } else {\n this.setState((state) => ({\n routes: state.replacingRouteKeys.length\n ? state.routes.filter(\n (r) => !state.replacingRouteKeys.includes(r.key)\n )\n : state.routes,\n openingRouteKeys: state.openingRouteKeys.filter(\n (key) => key !== route.key\n ),\n closingRouteKeys: state.closingRouteKeys.filter(\n (key) => key !== route.key\n ),\n replacingRouteKeys: [],\n }));\n }\n };\n\n private handleCloseRoute = ({ route }: { route: Route<string> }) => {\n const { state, navigation } = this.props;\n\n if (state.routes.some((r) => r.key === route.key)) {\n // If a route exists in state, trigger a pop\n // This will happen in when the route was closed from the card component\n // e.g. When the close animation triggered from a gesture ends\n navigation.dispatch({\n ...StackActions.pop(),\n source: route.key,\n target: state.key,\n });\n } else {\n // We need to clean up any state tracking the route and pop it immediately\n this.setState((state) => ({\n routes: state.routes.filter((r) => r.key !== route.key),\n openingRouteKeys: state.openingRouteKeys.filter(\n (key) => key !== route.key\n ),\n closingRouteKeys: state.closingRouteKeys.filter(\n (key) => key !== route.key\n ),\n }));\n }\n };\n\n private handleTransitionStart = (\n { route }: { route: Route<string> },\n closing: boolean\n ) =>\n this.props.navigation.emit({\n type: 'transitionStart',\n data: { closing },\n target: route.key,\n });\n\n private handleTransitionEnd = (\n { route }: { route: Route<string> },\n closing: boolean\n ) =>\n this.props.navigation.emit({\n type: 'transitionEnd',\n data: { closing },\n target: route.key,\n });\n\n private handleGestureStart = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureStart',\n target: route.key,\n });\n };\n\n private handleGestureEnd = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureEnd',\n target: route.key,\n });\n };\n\n private handleGestureCancel = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureCancel',\n target: route.key,\n });\n };\n\n render() {\n const {\n state,\n navigation,\n keyboardHandlingEnabled,\n mode = 'card',\n headerMode = mode === 'card' && Platform.OS === 'ios'\n ? 'float'\n : 'screen',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n descriptors: _,\n ...rest\n } = this.props;\n\n const {\n routes,\n descriptors,\n openingRouteKeys,\n closingRouteKeys,\n } = this.state;\n\n return (\n <NavigationHelpersContext.Provider value={navigation}>\n <GestureHandlerWrapper style={styles.container}>\n <SafeAreaProviderCompat>\n <SafeAreaConsumer>\n {(insets) => (\n <KeyboardManager enabled={keyboardHandlingEnabled !== false}>\n {(props) => (\n <HeaderShownContext.Consumer>\n {(isParentHeaderShown) => (\n <CardStack\n mode={mode}\n insets={insets as EdgeInsets}\n isParentHeaderShown={isParentHeaderShown}\n getPreviousRoute={this.getPreviousRoute}\n getGesturesEnabled={this.getGesturesEnabled}\n routes={routes}\n openingRouteKeys={openingRouteKeys}\n closingRouteKeys={closingRouteKeys}\n onOpenRoute={this.handleOpenRoute}\n onCloseRoute={this.handleCloseRoute}\n onTransitionStart={this.handleTransitionStart}\n onTransitionEnd={this.handleTransitionEnd}\n renderHeader={this.renderHeader}\n renderScene={this.renderScene}\n headerMode={headerMode}\n state={state}\n descriptors={descriptors}\n onGestureStart={this.handleGestureStart}\n onGestureEnd={this.handleGestureEnd}\n onGestureCancel={this.handleGestureCancel}\n {...rest}\n {...props}\n />\n )}\n </HeaderShownContext.Consumer>\n )}\n </KeyboardManager>\n )}\n </SafeAreaConsumer>\n </SafeAreaProviderCompat>\n </GestureHandlerWrapper>\n </NavigationHelpersContext.Provider>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n","import * as React from 'react';\nimport { Platform } from 'react-native';\nimport {\n useNavigationBuilder,\n createNavigatorFactory,\n DefaultNavigatorOptions,\n EventArg,\n StackRouter,\n StackRouterOptions,\n StackNavigationState,\n StackActions,\n ParamListBase,\n StackActionHelpers,\n} from '@react-navigation/native';\nimport StackView from '../views/Stack/StackView';\nimport type {\n StackNavigationConfig,\n StackNavigationOptions,\n StackNavigationEventMap,\n} from '../types';\n\ntype Props = DefaultNavigatorOptions<StackNavigationOptions> &\n StackRouterOptions &\n StackNavigationConfig;\n\nfunction StackNavigator({\n initialRouteName,\n children,\n screenOptions,\n ...rest\n}: Props) {\n const defaultOptions = {\n gestureEnabled: Platform.OS === 'ios',\n animationEnabled:\n Platform.OS !== 'web' &&\n Platform.OS !== 'windows' &&\n Platform.OS !== 'macos',\n };\n\n const { state, descriptors, navigation } = useNavigationBuilder<\n StackNavigationState<ParamListBase>,\n StackRouterOptions,\n StackActionHelpers<ParamListBase>,\n StackNavigationOptions,\n StackNavigationEventMap\n >(StackRouter, {\n initialRouteName,\n children,\n screenOptions:\n typeof screenOptions === 'function'\n ? (...args) => ({\n ...defaultOptions,\n ...screenOptions(...args),\n })\n : {\n ...defaultOptions,\n ...screenOptions,\n },\n });\n\n React.useEffect(\n () =>\n navigation.addListener?.('tabPress', (e) => {\n const isFocused = navigation.isFocused();\n\n // Run the operation in the next frame so we're sure all listeners have been run\n // This is necessary to know if preventDefault() has been called\n requestAnimationFrame(() => {\n if (\n state.index > 0 &&\n isFocused &&\n !(e as EventArg<'tabPress', true>).defaultPrevented\n ) {\n // When user taps on already focused tab and we're inside the tab,\n // reset the stack to replicate native behaviour\n navigation.dispatch({\n ...StackActions.popToTop(),\n target: state.key,\n });\n }\n });\n }),\n [navigation, state.index, state.key]\n );\n\n return (\n <StackView\n {...rest}\n state={state}\n descriptors={descriptors}\n navigation={navigation}\n />\n );\n}\n\nexport default createNavigatorFactory<\n StackNavigationState<ParamListBase>,\n StackNavigationOptions,\n StackNavigationEventMap,\n typeof StackNavigator\n>(StackNavigator);\n","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(value);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import * as React from 'react';\nimport { View } from 'react-native';\nimport { NativeSafeAreaProviderProps } from './SafeArea.types';\n\n/**\n * TODO:\n * Currently insets and frame are based on the window and are not\n * relative to the provider view. This is inconsistent with iOS and Android.\n * However in most cases if the provider view covers the screen this is not\n * an issue.\n */\n\nconst CSSTransitions: Record<string, string> = {\n WebkitTransition: 'webkitTransitionEnd',\n Transition: 'transitionEnd',\n MozTransition: 'transitionend',\n MSTransition: 'msTransitionEnd',\n OTransition: 'oTransitionEnd',\n};\n\nexport default function NativeSafeAreaView({\n children,\n style,\n onInsetsChange,\n}: NativeSafeAreaProviderProps) {\n React.useEffect(() => {\n // Skip for SSR.\n if (typeof document === 'undefined') {\n return;\n }\n\n const element = createContextElement();\n document.body.appendChild(element);\n const onEnd = () => {\n const {\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n } = window.getComputedStyle(element);\n\n const insets = {\n top: paddingTop ? parseInt(paddingTop, 10) : 0,\n bottom: paddingBottom ? parseInt(paddingBottom, 10) : 0,\n left: paddingLeft ? parseInt(paddingLeft, 10) : 0,\n right: paddingRight ? parseInt(paddingRight, 10) : 0,\n };\n const frame = {\n x: 0,\n y: 0,\n width: document.documentElement.offsetWidth,\n height: document.documentElement.offsetHeight,\n };\n // @ts-ignore: missing properties\n onInsetsChange({ nativeEvent: { insets, frame } });\n };\n element.addEventListener(getSupportedTransitionEvent(), onEnd);\n onEnd();\n return () => {\n document.body.removeChild(element);\n element.removeEventListener(getSupportedTransitionEvent(), onEnd);\n };\n }, [onInsetsChange]);\n\n return <View style={style}>{children}</View>;\n}\n\nlet _supportedTransitionEvent: string | null = null;\nfunction getSupportedTransitionEvent(): string {\n if (_supportedTransitionEvent !== null) {\n return _supportedTransitionEvent;\n }\n const element = document.createElement('invalidtype');\n\n _supportedTransitionEvent = CSSTransitions.Transition;\n for (const key in CSSTransitions) {\n if (element.style[key as keyof CSSStyleDeclaration] !== undefined) {\n _supportedTransitionEvent = CSSTransitions[key];\n break;\n }\n }\n return _supportedTransitionEvent;\n}\n\ntype CssEnv = 'constant' | 'env';\n\nlet _supportedEnv: CssEnv | null = null;\nfunction getSupportedEnv(): CssEnv {\n if (_supportedEnv !== null) {\n return _supportedEnv;\n }\n const { CSS } = window;\n if (\n CSS &&\n CSS.supports &&\n CSS.supports('top: constant(safe-area-inset-top)')\n ) {\n _supportedEnv = 'constant';\n } else {\n _supportedEnv = 'env';\n }\n return _supportedEnv;\n}\n\nfunction getInset(side: string): string {\n return `${getSupportedEnv()}(safe-area-inset-${side})`;\n}\n\nfunction createContextElement(): HTMLElement {\n const element = document.createElement('div');\n const { style } = element;\n style.position = 'fixed';\n style.left = '0';\n style.top = '0';\n style.width = '0';\n style.height = '0';\n style.zIndex = '-1';\n style.overflow = 'hidden';\n style.visibility = 'hidden';\n // Bacon: Anything faster than this and the callback will be invoked too early with the wrong insets\n style.transitionDuration = '0.05s';\n style.transitionProperty = 'padding';\n style.transitionDelay = '0s';\n style.paddingTop = getInset('top');\n style.paddingBottom = getInset('bottom');\n style.paddingLeft = getInset('left');\n style.paddingRight = getInset('right');\n return element;\n}\n","import * as React from 'react';\nimport { Dimensions, StyleProp, StyleSheet, ViewStyle } from 'react-native';\nimport NativeSafeAreaProvider from './NativeSafeAreaProvider';\nimport { EdgeInsets, InsetChangedEvent, Metrics, Rect } from './SafeArea.types';\n\nexport const SafeAreaInsetsContext = React.createContext<EdgeInsets | null>(\n null,\n);\n\nexport const SafeAreaFrameContext = React.createContext<Rect | null>(null);\n\nexport interface SafeAreaViewProps {\n children?: React.ReactNode;\n initialMetrics?: Metrics | null;\n /**\n * @deprecated\n */\n initialSafeAreaInsets?: EdgeInsets | null;\n style?: StyleProp<ViewStyle>;\n}\n\nexport function SafeAreaProvider({\n children,\n initialMetrics,\n initialSafeAreaInsets,\n style,\n}: SafeAreaViewProps) {\n const parentInsets = useParentSafeAreaInsets();\n const parentFrame = useParentSafeAreaFrame();\n const [insets, setInsets] = React.useState<EdgeInsets | null>(\n initialMetrics?.insets ?? initialSafeAreaInsets ?? parentInsets ?? null,\n );\n const [frame, setFrame] = React.useState<Rect>(\n initialMetrics?.frame ??\n parentFrame ?? {\n // Backwards compat so we render anyway if we don't have frame.\n x: 0,\n y: 0,\n width: Dimensions.get('window').width,\n height: Dimensions.get('window').height,\n },\n );\n const onInsetsChange = React.useCallback(\n (event: InsetChangedEvent) => {\n const {\n nativeEvent: { frame: nextFrame, insets: nextInsets },\n } = event;\n\n if (\n // Backwards compat with old native code that won't send frame.\n nextFrame &&\n (nextFrame.height !== frame.height ||\n nextFrame.width !== frame.width ||\n nextFrame.x !== frame.x ||\n nextFrame.y !== frame.y)\n ) {\n setFrame(nextFrame);\n }\n\n if (\n !insets ||\n nextInsets.bottom !== insets.bottom ||\n nextInsets.left !== insets.left ||\n nextInsets.right !== insets.right ||\n nextInsets.top !== insets.top\n ) {\n setInsets(nextInsets);\n }\n },\n [frame, insets],\n );\n\n return (\n <NativeSafeAreaProvider\n style={[styles.fill, style]}\n onInsetsChange={onInsetsChange}\n >\n {insets != null ? (\n <SafeAreaFrameContext.Provider value={frame}>\n <SafeAreaInsetsContext.Provider value={insets}>\n {children}\n </SafeAreaInsetsContext.Provider>\n </SafeAreaFrameContext.Provider>\n ) : null}\n </NativeSafeAreaProvider>\n );\n}\n\nconst styles = StyleSheet.create({\n fill: { flex: 1 },\n});\n\nfunction useParentSafeAreaInsets(): EdgeInsets | null {\n return React.useContext(SafeAreaInsetsContext);\n}\n\nfunction useParentSafeAreaFrame(): Rect | null {\n return React.useContext(SafeAreaFrameContext);\n}\n\nexport function useSafeAreaInsets(): EdgeInsets {\n const safeArea = React.useContext(SafeAreaInsetsContext);\n if (safeArea == null) {\n throw new Error(\n 'No safe area insets value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.',\n );\n }\n return safeArea;\n}\n\nexport function useSafeAreaFrame(): Rect {\n const frame = React.useContext(SafeAreaFrameContext);\n if (frame == null) {\n throw new Error(\n 'No safe area frame value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.',\n );\n }\n return frame;\n}\n\nexport function withSafeAreaInsets<T>(\n WrappedComponent: React.ComponentType<T>,\n) {\n return React.forwardRef((props: T, ref: React.Ref<T>) => (\n <SafeAreaConsumer>\n {(insets) => <WrappedComponent {...props} insets={insets} ref={ref} />}\n </SafeAreaConsumer>\n ));\n}\n\n/**\n * @deprecated\n */\nexport function useSafeArea(): EdgeInsets {\n return useSafeAreaInsets();\n}\n\n/**\n * @deprecated\n */\nexport const SafeAreaConsumer = SafeAreaInsetsContext.Consumer;\n\n/**\n * @deprecated\n */\nexport const SafeAreaContext = SafeAreaInsetsContext;\n","import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n","export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/web-build/static/js/app.f9550138.chunk.js b/web-build/static/js/app.f9550138.chunk.js
deleted file mode 100644
index f1b5982..0000000
--- a/web-build/static/js/app.f9550138.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(this.webpackJsonp=this.webpackJsonp||[]).push([[0],{222:function(e){e.exports=JSON.parse('{"common":{"ok":"OK!","cancel":"Cancel","back":"Back"},"errors":{"invalidEmail":"Invalid email address."},"welcomeScreen":{"poweredBy":"POWERED BY IGNITE","readyForLaunch":"Ready for launch.","continue":"CONTINUE"},"demoScreen":{"howTo":"HOW TO","title":"What\u2019s In This Stack?","tagLine":"Congratulations, you\u2019ve got a very advanced React Native app template here. Take advantage of this boilerplate!","reactotron":"Demo Reactotron","demoList":"Demo List","androidReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running, run adb reverse tcp:9090 tcp:9090 from your terminal, and reload the app.","iosReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","macosReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","webReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","windowsReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app."},"demoListScreen":{"title":"Demo List"},"storybook":{"placeholder":"Placeholder","field":"Field"}}')},223:function(e){e.exports=JSON.parse('{"common":{"ok":"OK \ud83c\uddef\ud83c\uddf5","cancel":"Cancel \ud83c\uddef\ud83c\uddf5","back":"Back \ud83c\uddef\ud83c\uddf5"}}')},264:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"loadString",(function(){return v})),n.d(r,"saveString",(function(){return O})),n.d(r,"load",(function(){return E})),n.d(r,"save",(function(){return k})),n.d(r,"remove",(function(){return x})),n.d(r,"clear",(function(){return w}));var a=n(8),o=n.n(a),i=n(7),c=n.n(i),l=n(266),s=n(97),u=n.n(s),d=n(222),p=n(223);function f(e,t){return e?u.a.t(e,t):null}u.a.fallbacks=!0,u.a.translations={en:d,ja:p},u.a.locale=l.a||"en",n(181).a.ignoreLogs(["Require cycle:"]);var h=n(0),g=n.n(h),m=n(476),b=n(473),y=n(67);function v(e){return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.awrap(y.a.getItem(e));case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",null);case 9:case"end":return t.stop()}}),null,null,[[0,6]],Promise)}function O(e,t){return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(y.a.setItem(e,t));case 3:return n.abrupt("return",!0);case 6:return n.prev=6,n.t0=n.catch(0),n.abrupt("return",!1);case 9:case"end":return n.stop()}}),null,null,[[0,6]],Promise)}function E(e){var t;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(y.a.getItem(e));case 3:return t=n.sent,n.abrupt("return",JSON.parse(t));case 7:return n.prev=7,n.t0=n.catch(0),n.abrupt("return",null);case 10:case"end":return n.stop()}}),null,null,[[0,7]],Promise)}function k(e,t){return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(y.a.setItem(e,JSON.stringify(t)));case 3:return n.abrupt("return",!0);case 6:return n.prev=6,n.t0=n.catch(0),n.abrupt("return",!1);case 9:case"end":return n.stop()}}),null,null,[[0,6]],Promise)}function x(e){return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.awrap(y.a.removeItem(e));case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),null,null,[[0,5]],Promise)}function w(){return c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.a.awrap(y.a.clear());case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),null,null,[[0,5]],Promise)}var S=n(474),j=n(6),A=n.n(j),C=n(3),P=n(122),D=n(30),R=n(50),I=n(19),B=n.n(I),V=n(17),T=n.n(V),z=n(58),L={black:"#1d1d1d",white:"#ffffff",offWhite:"#e6e6e6",orange:"#FBA928",orangeDarker:"#EB9918",lightGrey:"#939AA4",lighterGrey:"#CDD4DA",angry:"#dd3333",deepPurple:"#5D2555"},F={palette:L,transparent:"rgba(0, 0, 0, 0)",background:L.white,primary:L.orange,primaryDarker:L.orangeDarker,line:L.offWhite,text:L.white,dim:L.lightGrey,error:L.angry,storybookDarkBg:L.black,storybookTextColor:L.black},N=[0,4,8,12,16,24,32,48,64],H=n(9),W={primary:H.a.select({ios:"Helvetica",android:"normal"}),secondary:H.a.select({ios:"Arial",android:"sans-serif"}),code:H.a.select({ios:"Courier",android:"monospace"})};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G={fontFamily:W.primary,color:F.text,fontSize:15},K={default:G,bold:U(U({},G),{},{fontWeight:"bold"}),header:U(U({},G),{},{fontSize:24,fontWeight:"bold"}),fieldLabel:U(U({},G),{},{fontSize:13,color:F.dim}),secondary:U(U({},G),{},{fontSize:9,color:F.dim})},Q=["preset","tx","txOptions","text","children","style"];function Y(e){var t=e.preset,n=void 0===t?"default":t,r=e.tx,a=e.txOptions,o=e.text,i=e.children,c=e.style,l=T()(e,Q),s=r&&f(r,a)||o||i,u=[K[n]||K.default,c];return h.createElement(z.a,B()({},l,{style:u}),s)}var J=n(38);function X(e){var t=Object(h.useState)({width:0,height:0}),n=o()(t,2),r=n[0],a=n[1];return Object(h.useLayoutEffect)((function(){var t;if(null!=(t=e.source)&&t.uri)J.a.getSize(e.source.uri,(function(e,t){a({width:e,height:t})}));else if("web"===H.a.OS)J.a.getSize(e.source,(function(e,t){a({width:e,height:t})}));else{var n=J.a.resolveAssetSource(e.source),r=n.width,o=n.height;a({width:r,height:o})}}),[]),g.a.createElement(J.a,B()({},e,{style:[r,e.style]}))}var _={back:n(308),bullet:n(309)},Z={resizeMode:"contain"};function q(e){var t=e.style,n=e.icon,r=e.containerStyle;return h.createElement(C.a,{style:r},h.createElement(X,{style:[Z,t],source:_[n]}))}var $={flexDirection:"row",marginTop:N[4],paddingBottom:N[4],borderBottomWidth:1,borderBottomColor:"#3A3048"},ee={marginRight:N[4]-1,marginTop:N[2]},te={width:8,height:8},ne={flex:1,fontFamily:W.primary,color:"#BAB6C8",fontSize:15,lineHeight:22};function re(e){return h.createElement(C.a,{style:$},h.createElement(q,{icon:"bullet",containerStyle:ee,style:te}),h.createElement(Y,{style:ne,text:e.text}))}var ae=n(48);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce={paddingVertical:N[2],paddingHorizontal:N[2],borderRadius:4,justifyContent:"center",alignItems:"center"},le={paddingHorizontal:N[3]},se={primary:ie(ie({},ce),{},{backgroundColor:F.palette.orange}),link:ie(ie({},ce),{},{paddingHorizontal:0,paddingVertical:0,alignItems:"flex-start"})},ue={primary:ie(ie({},le),{},{fontSize:9,color:F.palette.white}),link:ie(ie({},le),{},{color:F.text,paddingHorizontal:0,paddingVertical:0})},de=["preset","tx","text","style","textStyle","children"];function pe(e){var t=e.preset,n=void 0===t?"primary":t,r=e.tx,a=e.text,o=e.style,i=e.textStyle,c=e.children,l=T()(e,de),s=[se[n]||se.primary,o],u=[ue[n]||ue.primary,i],d=c||h.createElement(Y,{tx:r,text:a,style:u});return h.createElement(ae.a,B()({style:s},l),d)}function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ge={width:16,height:16};he(he({},ge),{},{marginTop:2,justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:F.primaryDarker,borderRadius:1});function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ye={borderWidth:1,borderColor:F.line,padding:N[2]};be(be({},ye),{},{borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:0}),be(be({},ye),{},{borderBottomWidth:0}),be(be({},ye),{},{borderBottomLeftRadius:8,borderBottomRightRadius:8}),be(be({},ye),{},{borderRadius:8}),be({},ye),be(be({},ye),{},{borderColor:F.transparent});var ve={flexDirection:"row",paddingHorizontal:N[4],alignItems:"center",paddingTop:N[5],paddingBottom:N[5],justifyContent:"flex-start"},Oe={textAlign:"center"},Ee={flex:1,justifyContent:"center"},ke={width:32},xe={width:32};function we(e){var t=e.onLeftPress,n=e.onRightPress,r=e.rightIcon,a=e.leftIcon,o=e.headerText,i=e.headerTx,c=e.style,l=e.titleStyle,s=o||i&&f(i)||"";return g.a.createElement(C.a,{style:[ve,c]},a?g.a.createElement(pe,{preset:"link",onPress:t},g.a.createElement(q,{icon:a})):g.a.createElement(C.a,{style:ke}),g.a.createElement(C.a,{style:Ee},g.a.createElement(Y,{style:[Oe,l],text:s})),r?g.a.createElement(pe,{preset:"link",onPress:n},g.a.createElement(q,{icon:r})):g.a.createElement(C.a,{style:xe}))}var Se=n(101),je=n(53),Ae=n(78),Ce={none:0},Pe={fixed:{outer:{backgroundColor:F.background,flex:1,height:"100%"},inner:{justifyContent:"flex-start",alignItems:"stretch",height:"100%",width:"100%"}},scroll:{outer:{backgroundColor:F.background,flex:1,height:"100%"},inner:{justifyContent:"flex-start",alignItems:"stretch"}}};var De="ios"===H.a.OS;function Re(e){var t=Object(m.c)(),n=Pe.fixed,r=e.style||{},a=e.backgroundColor?{backgroundColor:e.backgroundColor}:{},o={paddingTop:e.unsafe?0:t.top};return h.createElement(Se.a,{style:[n.outer,a],behavior:De?"padding":void 0,keyboardVerticalOffset:Ce[e.keyboardOffset||"none"]},h.createElement(Ae.a,{barStyle:e.statusBar||"light-content"}),h.createElement(C.a,{style:[n.inner,r,o]},e.children))}function Ie(e){var t=Object(m.c)(),n=Pe.scroll,r=e.style||{},a=e.backgroundColor?{backgroundColor:e.backgroundColor}:{},o={paddingTop:e.unsafe?0:t.top};return h.createElement(Se.a,{style:[n.outer,a],behavior:De?"padding":void 0,keyboardVerticalOffset:Ce[e.keyboardOffset||"none"]},h.createElement(Ae.a,{barStyle:e.statusBar||"light-content"}),h.createElement(C.a,{style:[n.outer,a,o]},h.createElement(je.a,{style:[n.outer,a],contentContainerStyle:[n.inner,r],keyboardShouldPersistTaps:e.keyboardShouldPersistTaps||"handled"},e.children)))}function Be(e){return(t=e.preset)&&Pe[t]&&"fixed"!==t?h.createElement(Ie,e):h.createElement(Re,e);var t}n(12),n(14),n(118),F.palette.offWhite;n(60),F.palette.white;function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ze={stretch:Te(Te({},{position:"absolute",top:0,left:0,bottom:0,right:0}),{},{resizeMode:"stretch",width:null,height:null})},Le=n(314);function Fe(e){var t=e.preset,n=void 0===t?"stretch":t,r=e.style,a=e.backgroundImage,o=[ze[n]||ze.stretch,r],i=a||Le;return g.a.createElement(X,{source:i,style:o})}var Ne=n(20),He=n.n(Ne),We=n(145),Me=n(170),Ue=n(468),Ge=n(469),Ke=n(470),Qe=n(471),Ye=n(251);function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _e={justifyContent:"center"},Ze=Object(R.a)((function(e){var t=e.style,n=e.physics,r=e.setPhysics,a=e.gData,i=(e.nodeIds,Object(We.a)([_e,t]),Object(h.useRef)());Object(h.useEffect)((function(){var e=i.current;n.gravityOn?(e.d3Force("x",Ue.a().strength(n.gravity)),e.d3Force("y",Ge.a().strength(n.gravity)),n.threedim?n.galaxy?(e.d3Force("y",Ge.a().strength(n.gravity/5)),e.d3Force("z",Ke.a().strength(n.gravity/5))):(e.d3Force("y",Ge.a().strength(n.gravity)),e.d3Force("z",Ke.a().strength(n.gravity))):e.d3Force("z",null)):(e.d3Force("x",null),e.d3Force("y",null),n.threedim&&e.d3Force("z",null)),e.d3Force("link").strength(n.linkStrength),e.d3Force("link").iterations(n.linkIts),n.collision?e.d3Force("collide",Qe.a().radius(20)):e.d3Force("collide",null),e.d3Force("charge").strength(n.charge)}));Object(h.useCallback)((function(e){e.collapsed=!e.collapsed,setPrunedTree(getPrunedTree())}),[]);var c=Object(h.useState)(new Set),l=o()(c,2),s=l[0],u=l[1],d=Object(h.useState)(new Set),p=o()(d,2),f=p[0],g=p[1],m=Object(h.useState)(null),b=o()(m,2),y=(b[0],b[1]),v=function(){u(s),g(f)},O=function(e){s.clear(),f.clear(),S(null),v()},E=function(e){console.log("hover"),w||(s.clear(),f.clear(),e&&(s.add(e),e.neighbors.forEach((function(e){return s.add(e)})),e.links.forEach((function(e){return f.add(e)}))),y(e||null),v())};Object(h.useEffect)((function(){!n.threedim&&i.current.d3ReheatSimulation()}),[n]);var k=Object(h.useState)({}),x=o()(k,2),w=x[0],S=x[1],j=Object(h.useState)(0),A=o()(j,2),P=A[0],D=A[1],R=Object(h.useState)({nodes:[],links:[]}),I=o()(R,2),B=I[0],V=I[1];Object(h.useEffect)((function(){B.nodes.length&&!n.local&&r(Xe(Xe({},n),{},{local:!0}))}),[B]);var T=function(e,t){s.clear(),f.clear(),console.log(B),t.timeStamp-P<400&&function(e){console.log(B),B.nodes.length&&V({nodes:[],links:[]});var t=B;console.log(t.nodes),e.local||(t={nodes:[],links:[]},console.log("length is 0"),e.local=!0,t.nodes.push(e)),e.links.length&&e.links.forEach((function(n){if(!n.local){console.log("0"),n.local=!0,t.links.push(n),console.log(n);var r=a.nodes[n.targetIndex],o=a.nodes[n.sourceIndex];r.id!==o.id&&(r.id===e.id?(console.log("1. I am the target, the source is "),console.log(o),o.local?console.log("2.5 The source is already local"):(console.log("2. The source is not local"),o.local=!0,t.nodes.push(o))):(console.log("3. I am the source"),r.local?console.log("The target is already local"):(console.log("4. The target is not local."),r.local=!0,t.nodes.push(r))))}})),V(t)}(e),e&&(s.add(e),e.neighbors.forEach((function(e){return s.add(e)})),e.links.forEach((function(e){return f.add(e)}))),S(e||null),v(),D(t.timeStamp)};return h.createElement(C.a,null,n.threedim?h.createElement(Me.b,{ref:i,graphData:n.local?B:a,nodeAutoColorBy:n.colorful?"id":void 0,nodeColor:n.colorful?void 0:function(e){return 0===s.size?"rgb(100, 100, 100, 1)":s.has(e)?"purple":"rgb(50, 50, 50, 0.5)"},linkAutoColorBy:n.colorful?"target":void 0,linkColor:n.colorful?void 0:function(e){return 0===f.size?"rgb(50, 50, 50, 0.8)":f.has(e)?"purple":"rgb(50, 50, 50, 0.2)"},linkDirectionalParticles:n.particles,nodeLabel:function(e){return e.title},linkWidth:function(e){return f.has(e)?3*n.linkWidth:n.linkWidth},linkOpacity:n.linkOpacity,nodeRelSize:n.nodeRel,nodeVal:function(e){return s.has(e)?3*e.neighbors.length:2*e.neighbors.length},linkDirectionalParticleWidth:n.particleWidth,onNodeHover:n.hover?E:null,d3AlphaDecay:n.alphaDecay,d3AlphaMin:n.alphaTarget,d3VelocityDecay:n.velocityDecay,nodeThreeObject:n.labels?function(e){if(s.has(e)){console.log(e.title);var t=new Ye.a(e.title.substring(0,30));return console.log("didnt crash here 2"),t.color="#ffffff",t.textHeight=8,t}}:void 0,nodeThreeObjectExtend:!0,onNodeClick:T,onBackgroundClick:O}):h.createElement(Me.a,{ref:i,graphData:n.local?B:a,nodeColor:n.colorful?function(e){return 1===e.neighbors.length||2===e.neighbors.length?["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][e.neighbors[0].index%11]:["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][e.index%11]}:function(e){return 0===s.size?"rgb(100, 100, 100, 1)":s.has(e)?"purple":"rgb(50, 50, 50, 0.5)"},linkColor:n.colorful?function(e){return["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][a.nodes[e.sourceIndex].index%11]}:function(e){return 0===f.size?"rgb(50, 50, 50, 0.8)":f.has(e)?"purple":"rgb(50, 50, 50, 0.2)"},linkDirectionalParticles:n.particles,onNodeClick:T,nodeLabel:function(e){return e.title},linkWidth:function(e){return f.has(e)?3*n.linkWidth:n.linkWidth},linkOpacity:n.linkOpacity,nodeRelSize:n.nodeRel,nodeVal:function(e){return s.has(e)?e.neighbors.length+5:e.neighbors.length+3},linkDirectionalParticleWidth:n.particleWidth,nodeCanvasObject:function(e,t,r){if(n.labels&&(r>n.labelScale||s.has(e))){var a=e.title.substring(0,Math.min(e.title.length,30)),o=12/r;t.font=o+"px Sans-Serif";var i=[1.1*t.measureText(a).width,o].map((function(e){return e+.5*o})),c=Math.min(3*(r-n.labelScale)/n.labelScale,1);t.fillStyle="rgba(20, 20, 20, "+(0===s.size?.5*c:s.has(e)?.5:.15*c)+")",t.fillRect.apply(t,[e.x-i[0]/2,e.y-i[1]/2].concat(He()(i))),t.textAlign="center",t.textBaseline="middle",t.fillStyle="rgb(255, 255, 255, "+(0===s.size?c:s.has(e)?1:.3*c)+")",t.fillText(a,e.x,e.y),e.__bckgDimensions=i}},nodeCanvasObjectMode:function(){return"after"},onNodeHover:n.hover?E:null,d3AlphaDecay:n.alphaDecay,d3AlphaMin:n.alphaTarget,d3VelocityDecay:n.velocityDecay,onBackgroundClick:O}))})),qe=n(62),$e=n(5),et=n(45),tt=n.n(et),nt=n(268),rt=n(171),at=n(172);function ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ct=Object(R.a)((function(e){e.style;var t=e.physics,n=e.setPhysics,r=[{title:"Physics",content:h.createElement(C.a,null,h.createElement(Y,{preset:"fieldLabel",text:"Gravity"}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.gravityOn,onValueChange:function(){n(it(it({},t),{},{gravityOn:!t.gravityOn}))}}),h.createElement(Y,{preset:"fieldLabel",text:"Gravity: "+t.gravity}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:1,onValueChange:function(e){n(it(it({},t),{},{gravity:e}))},value:t.gravity,step:.01}),h.createElement(Y,{preset:"fieldLabel",text:"Repulsive force: "+t.charge}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:-400,maximumValue:100,onValueChange:function(e){n(it(it({},t),{},{charge:e}))},value:t.charge,step:1}),h.createElement(Y,{preset:"fieldLabel",text:"Link Force: "+t.linkStrength}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:2,onValueChange:function(e){n(it(it({},t),{},{linkStrength:e}))},value:t.linkStrength,step:.01}),h.createElement(Y,{preset:"fieldLabel",text:"'Link Iterations': "+t.linkIts}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:1,maximumValue:10,onValueChange:function(e){n(it(it({},t),{},{linkIts:e}))},value:t.linkIts,step:1}),h.createElement(Y,{preset:"fieldLabel",text:"Collision"}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.collision,onValueChange:function(){n(it(it({},t),{},{collision:!t.collision}))}}),h.createElement(Y,{preset:"fieldLabel",text:"Alhpa Decay: "+t.alphaDecay}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:1,onValueChange:function(e){n(it(it({},t),{},{alphaDecay:e}))},value:t.alphaDecay,step:.01}),h.createElement(Y,{preset:"fieldLabel",text:"Alhpa Target: "+t.alphaTarget}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:1,onValueChange:function(e){n(it(it({},t),{},{alphaTarget:e}))},value:t.alphaTarget,step:.1}),h.createElement(Y,{preset:"fieldLabel",text:"Viscosity: "+t.velocityDecay}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:1,onValueChange:function(e){n(it(it({},t),{},{velocityDecay:e}))},value:t.velocityDecay,step:.01}),h.createElement(Y,{preset:"fieldLabel",text:"Galaxy Mode (3D-only)"}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.galaxy,onValueChange:function(){n(it(it({},t),{},{galaxy:!t.galaxy}))}}))},{title:"Visual",content:h.createElement(C.a,null,h.createElement(Y,{preset:"fieldLabel",text:"Colorful"}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.colorful,onValueChange:function(){n(it(it({},t),{},{colorful:!t.colorful}))}}),h.createElement(Y,{preset:"fieldLabel",text:"Hover highlight"}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.hover,onValueChange:function(){n(it(it({},t),{},{hover:!t.hover}))}}),h.createElement(Y,{preset:"fieldLabel",text:"Line Opacity: "+t.linkOpacity}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:1,onValueChange:function(e){n(it(it({},t),{},{linkOpacity:e}))},value:t.linkOpacity,step:.01}),h.createElement(Y,{preset:"fieldLabel",text:"Line width: "+t.linkWidth}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:.1,maximumValue:10,onValueChange:function(e){n(it(it({},t),{},{linkWidth:e}))},value:t.linkWidth,step:.1}),h.createElement(Y,{preset:"fieldLabel",text:"Node size: "+t.nodeRel}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:1,maximumValue:10,onValueChange:function(e){n(it(it({},t),{},{nodeRel:e}))},value:t.nodeRel,step:.01}),h.createElement(Y,{preset:"fieldLabel",text:"Particles: "+t.particles}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:10,onValueChange:function(e){n(it(it({},t),{},{particles:e}))},value:t.particles,step:1}),h.createElement(Y,{preset:"fieldLabel",text:"Particle Size: "+t.particleWidth}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:1,maximumValue:10,onValueChange:function(e){n(it(it({},t),{},{particleWidth:e}))},value:t.particleWidth,step:.1}),h.createElement(Y,{preset:"fieldLabel",text:"Labels"}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.labels,onValueChange:function(){n(it(it({},t),{},{labels:!t.labels}))}}),h.createElement(Y,{preset:"fieldLabel",text:"Scale when labels become visible: "+t.labelScale}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:.1,maximumValue:5,onValueChange:function(e){n(it(it({},t),{},{labelScale:e}))},value:t.labelScale,step:.1}))},{title:"Modes",content:h.createElement(C.a,null,h.createElement(Y,{preset:"fieldLabel",text:"Expandable Graph"}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.collapse,onValueChange:function(){n(it(it({},t),{},{collapse:!t.collapse}))}}),h.createElement(Y,{preset:"fieldLabel",text:"Change starting point: "+t.rootId}),h.createElement(tt.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:600,onValueChange:function(e){n(it(it({},t),{},{rootId:e}))},value:t.rootId,step:1}),h.createElement(Y,{preset:"fieldLabel",text:"3D"}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.threedim,onValueChange:function(){n(it(it({},t),{},{threedim:!t.threedim}))}}),h.createElement(qe.a,{style:{width:"5",height:20,marginVertical:10},value:t.local,onValueChange:function(){n(it(it({},t),{},{local:!t.local}))}}))}],a=Object(h.useState)([]),i=o()(a,2),c=i[0],l=i[1],s=Object(h.useState)(!0),u=o()(s,2),d=u[0],p=u[1];return d?h.createElement(C.a,{style:lt.container},h.createElement(C.a,{style:{height:30,width:"100%",backgroundColor:"rgb(20,20,20)"}},h.createElement(ae.a,{style:{width:30,color:"#ffffff",textAlign:"center",marginLeft:"auto",padding:5},onPress:function(){p(!1)}},h.createElement(at.a,{name:"close-circle",color:"#ffffff",size:20}))),h.createElement(je.a,null,h.createElement(nt.a,{activeSections:c,sections:r,touchAbleComponent:ae.a,expandMultiple:!0,renderHeader:function(e,t,n){return h.createElement(rt.a,{duration:400,style:[lt.header,n?lt.active:lt.inactive],transition:"backgroundColor"},h.createElement(Y,{style:lt.headerText},e.title))},renderContent:function(e,t,n){return h.createElement(rt.a,{duration:400,style:[lt.content,n?lt.active:lt.inactive],transition:"backgroundColor"},e.content)},duration:200,onChange:function(e){l(e.includes(void 0)?[]:e)},renderAsFlatList:!1}))):h.createElement(ae.a,{onPress:function(){p(!0)},style:{position:"absolute",top:50,left:50,width:30,color:"#ffffff",zIndex:100}},h.createElement(at.a,{name:"cog",color:"#ffffff",size:30}))})),lt=$e.a.create({container:{flex:1,backgroundColor:"rgb(20,20,20)",position:"absolute",zIndex:100,left:50,top:50,width:250,borderRadius:5,borderStyle:"solid",maxHeight:"70%",paddingBottom:20},title:{textAlign:"left",fontSize:22,fontWeight:"300",marginBottom:20,paddingLeft:20},header:{backgroundColor:"#111111",padding:10,paddingBottom:20,textAlign:"left"},headerText:{textAlign:"left",paddingLeft:30,fontSize:16,fontWeight:"500"},content:{padding:20,paddingLeft:60,backgroundColor:"#000000"},active:{backgroundColor:"rgba(0,0,0,1)"},inactive:{backgroundColor:"rgba(20,20,20,1)"},selectors:{marginBottom:10,flexDirection:"row",justifyContent:"center"},selector:{backgroundColor:"#111111",padding:10},activeSelector:{fontWeight:"bold"},selectTitle:{fontSize:14,fontWeight:"500",padding:10},multipleToggle:{flexDirection:"row",justifyContent:"center",marginVertical:30,alignItems:"center"},multipleToggle__title:{fontSize:16,marginRight:8}}),st={justifyContent:"center"},ut={fontFamily:W.primary,fontSize:14,color:F.primary};Object(R.a)((function(e){var t=e.style,n=Object(We.a)([st,t]);return h.createElement(C.a,{style:n},h.createElement(Y,{style:ut},"Hello"))}));function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ft=n(374),ht={flex:1},gt={backgroundColor:F.transparent,paddingHorizontal:N[4]},mt={color:F.palette.white,fontFamily:W.primary},bt={fontWeight:"bold"},yt={paddingTop:N[3],paddingBottom:N[4]+N[1],paddingHorizontal:0},vt=pt(pt(pt({},mt),bt),{},{fontSize:12,lineHeight:15,textAlign:"center",letterSpacing:1.5}),Ot=pt(pt({},mt),{},{textAlign:"center"}),Et=pt(pt(pt({},mt),bt),{},{fontSize:28,lineHeight:38,textAlign:"center"}),kt=pt(pt(pt({},mt),bt),{},{fontSize:26,fontStyle:"italic"}),xt={alignSelf:"center",marginVertical:N[5],maxWidth:"100%",width:343,height:230},wt=pt(pt({},mt),{},{color:"#BAB6C8",fontSize:15,lineHeight:22,marginBottom:N[5]}),St={paddingVertical:N[4],paddingHorizontal:N[4],backgroundColor:F.palette.deepPurple},jt=pt(pt(pt({},mt),bt),{},{fontSize:13,letterSpacing:2}),At={backgroundColor:"#20162D"},Ct={paddingVertical:N[4],paddingHorizontal:N[4]},Pt=(Object(R.a)((function(){var e=Object(D.useNavigation)();return g.a.createElement(C.a,{testID:"WelcomeScreen",style:ht},g.a.createElement(Fe,null),g.a.createElement(Be,{style:gt,preset:"scroll",backgroundColor:F.transparent},g.a.createElement(we,{headerTx:"welcomeScreen.poweredBy",style:yt,titleStyle:vt}),g.a.createElement(Y,{style:Ot},g.a.createElement(Y,{style:Et,text:"Your new app, "}),g.a.createElement(Y,{style:kt,text:"almost"}),g.a.createElement(Y,{style:Et,text:"!"})),g.a.createElement(Y,{style:Et,preset:"header",tx:"welcomeScreen.readyForLaunch"}),g.a.createElement(X,{source:ft,style:xt}),g.a.createElement(Y,{style:wt},"This probably isn't what your app is going to look like. Unless your designer handed you this screen and, in that case, congrats! You're ready to ship."),g.a.createElement(Y,{style:wt},"For everyone else, this is where you'll see a live preview of your fully functioning app using Ignite.")),g.a.createElement(P.a,{style:At},g.a.createElement(C.a,{style:Ct},g.a.createElement(pe,{testID:"next-screen-button",style:St,textStyle:jt,tx:"welcomeScreen.continue",onPress:function(){return e.navigate("demo")}}))))})),n(21)),Dt=n.n(Pt),Rt=n(23),It=n.n(Rt),Bt=n(262);function Vt(e){switch(e.problem){case"CONNECTION_ERROR":case"NETWORK_ERROR":return{kind:"cannot-connect",temporary:!0};case"TIMEOUT_ERROR":return{kind:"timeout",temporary:!0};case"SERVER_ERROR":return{kind:"server"};case"UNKNOWN_ERROR":return{kind:"unknown",temporary:!0};case"CLIENT_ERROR":switch(e.status){case 401:return{kind:"unauthorized"};case 403:return{kind:"forbidden"};case 404:return{kind:"not-found"};default:return{kind:"rejected"}}case"CANCEL_ERROR":return null}return null}var Tt={url:"http://example.com",timeout:1e4},zt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tt;Dt()(this,e),this.config=t}return It()(e,[{key:"setup",value:function(){this.apisauce=Object(Bt.create)({baseURL:this.config.url,timeout:this.config.timeout,headers:{Accept:"application/json"}})}},{key:"getUsers",value:function(){var e,t,n,r,a;return c.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,c.a.awrap(this.apisauce.get("/users"));case 2:if((e=o.sent).ok){o.next=7;break}if(!(t=Vt(e))){o.next=7;break}return o.abrupt("return",t);case 7:return n=function(e){return{id:e.id,name:e.name}},o.prev=8,r=e.data,a=r.map(n),o.abrupt("return",{kind:"ok",users:a});case 14:return o.prev=14,o.t0=o.catch(8),o.abrupt("return",{kind:"bad-data"});case 17:case"end":return o.stop()}}),null,this,[[8,14]],Promise)}},{key:"getUser",value:function(e){var t,n,r;return c.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,c.a.awrap(this.apisauce.get("/users/"+e));case 2:if((t=a.sent).ok){a.next=7;break}if(!(n=Vt(t))){a.next=7;break}return a.abrupt("return",n);case 7:return a.prev=7,r={id:t.data.id,name:t.data.name},a.abrupt("return",{kind:"ok",user:r});case 12:return a.prev=12,a.t0=a.catch(7),a.abrupt("return",{kind:"bad-data"});case 15:case"end":return a.stop()}}),null,this,[[7,12]],Promise)}}]),e}();function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nt=n(441),Ht=n(442),Wt={flex:1},Mt={backgroundColor:F.transparent,paddingHorizontal:N[4]},Ut={paddingVertical:N[4],paddingHorizontal:N[4],backgroundColor:F.palette.deepPurple},Gt={fontWeight:"bold"},Kt=Ft(Ft({},Gt),{},{fontSize:13,letterSpacing:2}),Qt={paddingTop:N[3],paddingBottom:N[5]-1,paddingHorizontal:0},Yt=Ft(Ft({},Gt),{},{fontSize:12,lineHeight:15,textAlign:"center",letterSpacing:1.5}),Jt=Ft(Ft({},Gt),{},{fontSize:28,lineHeight:38,textAlign:"center",marginBottom:N[5]}),Xt={color:"#BAB6C8",fontSize:15,lineHeight:22,marginBottom:N[4]+N[1]},_t={marginVertical:N[6],alignSelf:"center",width:180,height:100},Zt={flexDirection:"row",alignItems:"center",alignSelf:"center"},qt={color:"#BAB6C8",fontSize:15,lineHeight:22},$t={marginHorizontal:N[2],width:10,height:10,resizeMode:"contain"},en={color:"#BAB6C8",fontSize:12,lineHeight:15,marginVertical:N[2]},tn=H.a.select({ios:"Cmd + D",android:"Cmd/Ctrl + M"}),nn=(Object(R.a)((function(){var e=Object(D.useNavigation)(),t=g.a.useMemo((function(){return function(){var e;return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return console.tron.log("Your Friendly tron log message"),console.tron.logImportant("I am important"),console.tron.display({name:"DISPLAY",value:{numbers:1,strings:"strings",booleans:!0,arrays:[1,2,3],objects:{deeper:{deeper:{yay:"\ud83d\udc7e"}}},functionNames:function(){}},preview:"More control with display()",important:!0,image:{uri:"https://avatars2.githubusercontent.com/u/3902527?s=200&u=a0d16b13ed719f35d95ca0f4440f5d07c32c349a&v=4"}}),(e=new zt).setup(),e.getUser("1"),t.next=8,c.a.awrap(k("Cool Name","Boaty McBoatface"));case 8:case"end":return t.stop()}}),null,null,null,Promise)}}),[]);return g.a.createElement(C.a,{testID:"DemoScreen",style:Wt},g.a.createElement(Fe,null),g.a.createElement(Be,{style:Mt,preset:"scroll",backgroundColor:F.transparent},g.a.createElement(we,{headerTx:"demoScreen.howTo",leftIcon:"back",onLeftPress:function(){return e.goBack()},style:Qt,titleStyle:Yt}),g.a.createElement(Y,{style:Jt,preset:"header",tx:"demoScreen.title"}),g.a.createElement(Y,{style:Xt,tx:"demoScreen.tagLine"}),g.a.createElement(re,{text:"Integrated here, Navigation with State, TypeScript, Storybook, Solidarity, and i18n."}),g.a.createElement(re,{text:"To run Storybook, press "+tn+' or shake the device to show the developer menu, then select "Toggle Storybook"'}),g.a.createElement(re,{text:"Load up Reactotron! You can inspect your app, view the events, interact, and so much more!"}),g.a.createElement(C.a,null,g.a.createElement(pe,{style:Ut,textStyle:Kt,tx:"demoScreen.reactotron",onPress:t}),g.a.createElement(Y,{style:en,tx:"demoScreen."+H.a.OS+"ReactotronHint"})),g.a.createElement(pe,{style:Ut,textStyle:Kt,tx:"demoScreen.demoList",onPress:function(){return e.navigate("demoList")}}),g.a.createElement(X,{source:Nt,style:_t}),g.a.createElement(C.a,{style:Zt},g.a.createElement(Y,{style:qt,text:"Made with"}),g.a.createElement(X,{source:Ht,style:$t}),g.a.createElement(Y,{style:qt,text:"by Infinite Red"}))))})),n(72)),rn=n(31),an=rn.d.model("Character").props({id:rn.d.identifierNumber,name:rn.d.maybe(rn.d.string),status:rn.d.maybe(rn.d.string),image:rn.d.maybe(rn.d.string)}),on=function(){function e(t){Dt()(this,e),this.api=t}return It()(e,[{key:"getCharacters",value:function(){var e,t,n;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.a.awrap(this.api.apisauce.get("https://raw.githubusercontent.com/infinitered/ignite/master/data/rick-and-morty.json",{amount:50}));case 3:if((e=r.sent).ok){r.next=8;break}if(!(t=Vt(e))){r.next=8;break}return r.abrupt("return",t);case 8:return n=e.data.results,r.abrupt("return",{kind:"ok",characters:n});case 12:return r.prev=12,r.t0=r.catch(0),r.abrupt("return",{kind:"bad-data"});case 16:case"end":return r.stop()}}),null,this,[[0,12]],Promise)}}]),e}(),cn=rn.d.model("CharacterStore").props({characters:rn.d.optional(rn.d.array(an),[])}).extend((function(e){return{views:{get environment(){return Object(rn.a)(e)}}}})).actions((function(e){return{saveCharacters:function(t){e.characters.replace(t)}}})).actions((function(e){return{getCharacters:function(){var t,n;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return t=new on(e.environment.api),r.next=3,c.a.awrap(t.getCharacters());case 3:"ok"===(n=r.sent).kind&&e.saveCharacters(n.characters);case 5:case"end":return r.stop()}}),null,null,null,Promise)}}})),ln=rn.d.model("RootStore").props({characterStore:rn.d.optional(cn,{})}),sn=Object(h.createContext)({}),un=sn.Provider,dn=function(){function e(){Dt()(this,e),this.api=new zt}return It()(e,[{key:"setup",value:function(){return c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:e.next=3;break;case 3:return e.next=5,c.a.awrap(this.api.setup());case 5:case"end":return e.stop()}}),null,this,null,Promise)}}]),e}();function pn(){var e;return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new dn,t.next=3,c.a.awrap(e.setup());case 3:return t.abrupt("return",e);case 4:case"end":return t.stop()}}),null,null,null,Promise)}function fn(){var e,t,n;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,c.a.awrap(pn());case 2:return n=r.sent,r.prev=3,r.next=6,c.a.awrap(E("root"));case 6:if(r.t0=r.sent,r.t0){r.next=9;break}r.t0={};case 9:t=r.t0,e=ln.create(t,n),r.next=17;break;case 13:r.prev=13,r.t1=r.catch(3),e=ln.create({},n);case 17:return Object(rn.c)(e,(function(e){return k("root",e)})),r.abrupt("return",e);case 20:case"end":return r.stop()}}),null,null,[[3,13]],Promise)}var hn={flex:1},gn={backgroundColor:F.transparent},mn={paddingBottom:N[5]-1,paddingHorizontal:N[4],paddingTop:N[3]},bn={fontSize:12,fontWeight:"bold",letterSpacing:1.5,lineHeight:15,textAlign:"center"},yn={alignItems:"center",flexDirection:"row",padding:10},vn={borderRadius:35,height:65,width:65},On={marginLeft:10},En={paddingHorizontal:N[4]},kn=(Object(R.a)((function(){var e=Object(D.useNavigation)(),t=Object(h.useContext)(sn).characterStore,n=t.characters;return Object(h.useEffect)((function(){c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.a.awrap(t.getCharacters());case 2:case"end":return e.stop()}}),null,null,null,Promise)}),[]),g.a.createElement(C.a,{testID:"DemoListScreen",style:hn},g.a.createElement(Fe,null),g.a.createElement(Be,{style:gn,preset:"fixed",backgroundColor:F.transparent},g.a.createElement(we,{headerTx:"demoListScreen.title",leftIcon:"back",onLeftPress:function(){return e.goBack()},style:mn,titleStyle:bn}),g.a.createElement(nn.a,{contentContainerStyle:En,data:He()(n),keyExtractor:function(e){return String(e.id)},renderItem:function(e){var t=e.item;return g.a.createElement(C.a,{style:yn},g.a.createElement(X,{source:{uri:t.image},style:vn}),g.a.createElement(Y,{style:On},t.name," (",t.status,")"))}})))})),n(163)),xn=n.n(kn),wn={backgroundColor:F.palette.black,flex:1},Sn=Object(R.a)((function(){var e=Object(h.useState)({}),t=o()(e,2),n=t[0],r=t[1],a=Object(h.useState)(),i=o()(a,2),l=i[0],s=i[1],u=Object(h.useState)([]),d=o()(u,2),p=d[0],f=d[1],m={charge:-350,collision:!0,linkStrength:.1,linkIts:1,collapse:!1,threedim:!1,particles:2,linkOpacity:1,linkWidth:1,particleWidth:4,nodeRel:4,labels:!0,labelScale:1.5,alphaDecay:.16,alphaTarget:0,velocityDecay:.25,gravity:.5,gravityOn:!0,hover:!0,colorful:!0,galaxy:!0,rootId:0,local:!1};Object(h.useEffect)((function(){e&&clearTimeout(e);var e=setTimeout((function(){!function(e){var t;c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,t=JSON.stringify(e),console.log(t+" "+e),n.next=5,c.a.awrap(y.a.setItem("@physics",t));case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),console.log(n.t0);case 10:case"end":return n.stop()}}),null,null,[[0,7]],Promise)}(n)}),1e3);return function(){return clearTimeout(e)}}),[n]);return Object(h.useEffect)((function(){(function(){var e,t;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(y.a.getItem("@physics"));case 3:if(null===(e=n.sent)){n.next=14;break}if(t=JSON.parse(e),Object.keys(t).length!==Object.keys(m).length){n.next=11;break}return t.local=!1,n.abrupt("return",t);case 11:return n.abrupt("return",m);case 12:n.next=15;break;case 14:return n.abrupt("return",m);case 15:n.next=20;break;case 17:n.prev=17,n.t0=n.catch(0),console.log(n.t0);case 20:case"end":return n.stop()}}),null,null,[[0,17]],Promise)})().then((function(e){return r(e)})),xn.a.get("http://localhost:35901/graph").then((function(e){var t=function(e){var t=[];return e.nodes.forEach((function(e,n){t.push(e.id),e.index=n})),f(t),t}(e.data);f(t),console.log(p);var n=function(e){var t=[];return e.links.forEach((function(n,r){for(var a,o,i=0;i<e.nodes.length;i++){var c=e.nodes[i];!c.neighbors&&(c.neighbors=[]),!c.links&&(c.links=[]),!r&&(c.local=!1),n.target===e.nodes[i].id?(c.links.push(n),a=[c,i],n.target!==n.source&&t.push(n)):n.source===e.nodes[i].id&&(c.links.push(n),o=[c,i])}a&&o&&(e.nodes[a[1]].neighbors.push(o[0]),e.nodes[o[1]].neighbors.push(a[0]),n.sourceIndex=o[1],n.targetIndex=a[1],n.index=[r],n.local=!1)})),e.links=t,e}(e.data);console.log(n),s(n)})).catch((function(e){console.log(e),console.log("Couldn't get data.")}))}),[]),l?g.a.createElement(Be,{style:wn,preset:"scroll"},g.a.createElement(ct,{physics:n,setPhysics:r}),g.a.createElement(Ze,{setPhysics:r,physics:n,gData:l,nodeIds:p})):null})),jn=Object(S.a)();function An(){return g.a.createElement(jn.Navigator,{screenOptions:{cardStyle:{backgroundColor:"transparent"},headerShown:!1}},g.a.createElement(jn.Screen,{name:"graph",component:Sn}))}var Cn=["welcome"],Pn=function(e){return Cn.includes(e)},Dn=n(221),Rn=Object(S.a)(),In=function(){return g.a.createElement(Rn.Navigator,{screenOptions:{cardStyle:{backgroundColor:F.palette.deepPurple},headerShown:!1}},g.a.createElement(Rn.Screen,{name:"mainStack",component:An,options:{headerShown:!1}}))},Bn=g.a.forwardRef((function(e,t){return g.a.createElement(Dn.a,B()({},e,{ref:t}),g.a.createElement(In,null))}));Bn.displayName="RootNavigator";var Vn=n(80),Tn={navigate:function(e){},goBack:function(){},resetRoot:function(e){},getRootState:function(){return{}}};function zn(e){var t=e.routes[e.index];return t.state?zn(t.state):t.name}n(454);var Ln=function(e){var t=Object(h.useState)(null),n=o()(t,2),r=n[0],a=(n[1],Object(h.useState)({})),i=o()(a,2),c=i[0];i[1];return Object(h.useEffect)((function(){0}),[]),Object(h.useEffect)((function(){0}),[window.location.search]),null!=c&&c.storybook?r?g.a.createElement(r,null):null:e.children},Fn=n(164);Object(Fn.enableScreens)();var Nn=function(){var e=Object(h.useRef)(null),t=Object(h.useState)(void 0),n=o()(t,2),a=n[0],i=n[1];!function(e){var t=function(t){Tn[t]=function(){var n;if(e.current)return(n=e.current)[t].apply(n,arguments)}};for(var n in Tn)t(n)}(e),function(e,t){var n=Object(h.useRef)(t);Object(h.useEffect)((function(){n.current=t}),[t]),Object(h.useEffect)((function(){var t=function(){var t=e.current;if(null==t)return!1;var r=zn(t.getRootState());return!n.current(r)&&(!!t.canGoBack()&&(t.goBack(),!0))};return Vn.a.addEventListener("hardwareBackPress",t),function(){return Vn.a.removeEventListener("hardwareBackPress",t)}}),[e])}(e,Pn);var l=function(e,t){var n=Object(h.useState)(),r=o()(n,2),a=r[0],i=r[1],l=Object(h.useState)(!0),s=o()(l,2),u=s[0],d=s[1],p=Object(h.useRef)(),f=function(){var n;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.a.awrap(e.load(t));case 3:(n=r.sent)&&i(n);case 5:return r.prev=5,d(!1),r.finish(5);case 8:case"end":return r.stop()}}),null,null,[[0,,5,8]],Promise)};return Object(h.useEffect)((function(){u&&f()}),[u]),{onNavigationStateChange:function(n){p.current;var r=zn(n);p.current=r,e.save(t,n)},restoreState:f,initialNavigationState:a}}(r,"NAVIGATION_STATE"),s=l.initialNavigationState,u=l.onNavigationStateChange;return Object(h.useEffect)((function(){c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.a.awrap(c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),null,null,null,Promise));case 2:fn().then(i);case 3:case"end":return e.stop()}}),null,null,null,Promise)}),[]),a?g.a.createElement(Ln,null,g.a.createElement(un,{value:a},g.a.createElement(m.b,{initialMetrics:b.a},g.a.createElement(Bn,{ref:e,initialState:s,onStateChange:u})))):null},Hn=n(265);Object(Hn.a)(Nn);t.a=Nn},289:function(e,t,n){n(290),e.exports=n(291)},308:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAQNJREFUKBWdk8EOwUAQhme2InFy9yB1cSTReAIOPIeEEyKObs4knkBS2pNbK57A3cETcKBjtmKzJd0mO5fO9p//63Q6BciJ0D83wn3cyZHV7ZLKtISNPUqeawB8EFEVEV+anElF5sSHj5nYDI4AmpnM0pvpQDcjinHTc+eyyBT4FX/NLc+dfjXTNQXYmiUYAz/uAtGGc35nsSOgwPREXeP5RBj60ZUIatzKnQAqekFRzp5biSlL/lQLbqaMCAc2XYqMSkdx/MzAP42IkgkLLxTYb7XrW1VUkKQAWRNaQhTAFpIB2ED+VlkukNxChjmQ0IoH7EhwXvwBZGEKEThAAcOif+ENKNR3psyHynYAAAAASUVORK5CYII="},309:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAIZJREFUGBljZACC/w4OMgy/fnUxMDI6gPgM//8fYGBjK2M8cOAJI1TyIlBYCCyJIN4BFekzgXWCJBkZtwMFZMEYxAaJAU1l/G9t/QxopCRIAmQkyACoqY+Bmp4zIUzEzmICOwgk9/v3LJBOsG4gG6wc6FjCjgTbC3QtUMdykJ1gDGIDxUByAK6uPrQ53B7lAAAAAElFTkSuQmCC"},314:function(e,t,n){e.exports=n.p+"static/media/bg.27c56310.png"},374:function(e,t,n){e.exports=n.p+"static/media/bowser.4ba9aedf.png"},441:function(e,t,n){e.exports=n.p+"static/media/logo-ignite.5c0bc1b0.png"},442:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAIZJREFUGBljYACC////5wHxIyB+AsRFQNwPxG+A+BIQ+4DUgBTFADE+8Bco6QFSeB2fKqjcASagofxgo/ET7CCFq/CrAcsuAVktAMTX8Fi/EyjHAlYOZMgD8X0gRgfHgAK8KDYCBaSBGNnk3UA+N4oiGAcoIQLEZ4F4HRCzw8Sx0kAFzNgkAGi11d75H7oeAAAAAElFTkSuQmCC"}},[[289,1,2]]]);
-//# sourceMappingURL=app.f9550138.chunk.js.map \ No newline at end of file
diff --git a/web-build/static/js/app.f9550138.chunk.js.map b/web-build/static/js/app.f9550138.chunk.js.map
deleted file mode 100644
index fc49af8..0000000
--- a/web-build/static/js/app.f9550138.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["app/i18n/translate.ts","app/i18n/i18n.ts","app/utils/ignore-warnings.ts","app/utils/storage/storage.ts","app/theme/palette.ts","app/theme/color.ts","app/theme/spacing.ts","app/theme/typography.ts","app/components/text/text.presets.ts","app/components/text/text.tsx","app/components/auto-image/auto-image.tsx","app/components/icon/icons/index.ts","app/components/icon/icon.tsx","app/components/bullet-item/bullet-item.tsx","app/components/button/button.presets.ts","app/components/button/button.tsx","app/components/checkbox/checkbox.tsx","app/components/form-row/form-row.presets.ts","app/components/header/header.tsx","app/components/screen/screen.presets.ts","app/components/screen/screen.tsx","app/components/switch/switch.tsx","app/components/text-field/text-field.tsx","app/components/wallpaper/wallpaper.presets.ts","app/components/wallpaper/wallpaper.tsx","app/components/graph/graph.tsx","app/components/tweaks/tweaks.tsx","app/components/local/local.tsx","app/screens/welcome/welcome-screen.tsx","app/services/api/api-problem.ts","app/services/api/api-config.ts","app/services/api/api.ts","app/screens/demo/demo-screen.tsx","app/models/character/character.ts","app/services/api/character-api.ts","app/models/character-store/character-store.ts","app/models/extensions/with-environment.ts","app/models/root-store/root-store.ts","app/models/root-store/root-store-context.ts","app/models/environment.ts","app/models/root-store/setup-root-store.ts","app/screens/demo/demo-list-screen.tsx","app/screens/graph/graph-screen.tsx","app/navigators/main-navigator.tsx","app/navigators/root-navigator.tsx","app/navigators/navigation-utilities.tsx","storybook/toggle-storybook.web.tsx","app/app.tsx","app/theme/fonts/index.ts","App.js","app/components/icon/icons/arrow-left.png","app/components/icon/icons/bullet.png","app/components/wallpaper/bg.png","app/screens/welcome/bowser.png","app/screens/demo/logo-ignite.png","app/screens/demo/heart.png"],"names":["translate","key","options","i18n","t","fallbacks","translations","en","ja","locale","Localization","LogBox","ignoreLogs","loadString","a","async","AsyncStorage","getItem","saveString","value","setItem","load","almostThere","JSON","parse","save","stringify","remove","removeItem","clear","palette","black","white","offWhite","orange","orangeDarker","lightGrey","lighterGrey","angry","deepPurple","color","transparent","background","primary","primaryDarker","line","text","dim","error","storybookDarkBg","storybookTextColor","spacing","typography","Platform","select","ios","android","secondary","code","BASE","fontFamily","fontSize","presets","default","bold","fontWeight","header","fieldLabel","Text","props","preset","tx","txOptions","children","styleOverride","style","rest","content","styles","AutoImage","useState","width","height","imageSize","setImageSize","useLayoutEffect","source","uri","RNImage","getSize","OS","resolveAssetSource","icons","back","require","bullet","ROOT","resizeMode","Icon","icon","containerStyle","View","BULLET_ITEM","flexDirection","marginTop","paddingBottom","borderBottomWidth","borderBottomColor","BULLET_CONTAINER","marginRight","BULLET","BULLET_TEXT","flex","lineHeight","BulletItem","BASE_VIEW","paddingVertical","paddingHorizontal","borderRadius","justifyContent","alignItems","BASE_TEXT","viewPresets","backgroundColor","link","textPresets","Button","textStyleOverride","textStyle","viewStyles","textStyles","TouchableOpacity","DIMENSIONS","borderWidth","borderColor","padding","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","paddingTop","TITLE","textAlign","TITLE_MIDDLE","LEFT","RIGHT","Header","onLeftPress","onRightPress","rightIcon","leftIcon","headerText","headerTx","titleStyle","onPress","offsets","none","fixed","outer","inner","scroll","isIos","ScreenWithoutScrolling","insets","useSafeAreaInsets","backgroundStyle","insetStyle","unsafe","top","KeyboardAvoidingView","behavior","undefined","keyboardVerticalOffset","keyboardOffset","StatusBar","barStyle","statusBar","ScreenWithScrolling","ScrollView","contentContainerStyle","keyboardShouldPersistTaps","Screen","stretch","position","left","bottom","right","defaultImage","Wallpaper","backgroundImage","CONTAINER","Graph","observer","physics","setPhysics","gData","fgRef","nodeIds","flatten","useRef","useEffect","fg","current","gravityOn","d3Force","d3","strength","gravity","threedim","galaxy","linkStrength","iterations","linkIts","collision","radius","charge","useCallback","node","collapsed","setPrunedTree","getPrunedTree","Set","highlightNodes","setHighlightNodes","highlightLinks","setHighlightLinks","setHoverNode","updateHighlight","handleBackgroundClick","event","setSelectedNode","handleNodeHover","console","log","selectedNode","add","neighbors","forEach","neighbor","links","d3ReheatSimulation","doubleClick","setDoubleClick","nodes","localGraphData","setLocalGraphData","length","local","selectClick","timeStamp","g","push","neighborLink","targetNode","targetIndex","sourceNode","sourceIndex","id","getLocalGraphData","ref","graphData","nodeAutoColorBy","colorful","nodeColor","size","has","linkAutoColorBy","linkColor","linkDirectionalParticles","particles","nodeLabel","title","linkWidth","linkOpacity","nodeRelSize","nodeRel","nodeVal","linkDirectionalParticleWidth","particleWidth","onNodeHover","hover","d3AlphaDecay","alphaDecay","d3AlphaMin","alphaTarget","d3VelocityDecay","velocityDecay","nodeThreeObject","labels","sprite","SpriteText","substring","textHeight","nodeThreeObjectExtend","onNodeClick","onBackgroundClick","index","nodeCanvasObject","ctx","globalScale","labelScale","label","Math","min","font","bckgDimensions","measureText","map","n","fadeFactor","fillStyle","fillRect","x","y","textBaseline","fillText","__bckgDimensions","nodeCanvasObjectMode","Tweaks","marginVertical","onValueChange","minimumValue","maximumValue","step","collapse","rootId","activeSections","setActiveSections","tweaks","setTweaks","container","marginLeft","name","Accordion","sections","touchAbleComponent","expandMultiple","renderHeader","section","_","isActive","duration","active","inactive","transition","renderContent","onChange","includes","renderAsFlatList","zIndex","StyleSheet","create","borderStyle","maxHeight","marginBottom","paddingLeft","selectors","selector","activeSelector","selectTitle","multipleToggle","multipleToggle__title","TEXT","bowserLogo","FULL","BOLD","HEADER","HEADER_TITLE","letterSpacing","TITLE_WRAPPER","ALMOST","fontStyle","BOWSER","alignSelf","maxWidth","CONTENT","CONTINUE","CONTINUE_TEXT","FOOTER","FOOTER_CONTENT","navigation","useNavigation","testID","SafeAreaView","navigate","getGeneralApiProblem","response","problem","kind","temporary","status","DEFAULT_API_CONFIG","url","timeout","Api","config","this","apisauce","baseURL","headers","Accept","get","ok","convertUser","raw","rawUsers","data","resultUsers","users","resultUser","user","logoIgnite","heart","DEMO","DEMO_TEXT","TAGLINE","IGNITE","LOVE_WRAPPER","LOVE","HEART","marginHorizontal","HINT","platformCommand","demoReactotron","React","useMemo","tron","logImportant","display","numbers","strings","booleans","arrays","objects","deeper","yay","functionNames","preview","important","image","demo","setup","getUser","goBack","CharacterModel","types","model","identifierNumber","maybe","string","CharacterApi","api","amount","characters","results","CharacterStoreModel","optional","array","extend","self","views","getEnv","actions","saveCharacters","characterSnapshots","replace","getCharacters","characterApi","environment","result","RootStoreModel","characterStore","RootStoreContext","createContext","RootStoreProvider","Provider","Environment","createEnvironment","env","setupRootStore","storage","rootStore","onSnapshot","snapshot","LIST_CONTAINER","IMAGE","LIST_TEXT","FLAT_LIST","useContext","FlatList","keyExtractor","item","String","renderItem","GraphScreen","setGraphData","setNodeIds","physicsInit","timer","clearTimeout","setTimeout","jsonVal","storeData","valueJson","Object","keys","getData","then","axios","dataa","nods","temp","i","getNodesById","cleanData","cleanLinks","j","target","sanitizeGraph","catch","e","Stack","createStackNavigator","MainNavigator","Navigator","screenOptions","cardStyle","headerShown","component","exitRoutes","canExit","routeName","RootStack","RootNavigator","forwardRef","NavigationContainer","displayName","RootNavigation","resetRoot","state","getRootState","getActiveRouteName","route","routes","ToggleStorybook","StorybookUIRoot","queryParams","__DEV__","window","location","search","storybook","enableScreens","App","navigationRef","setRootStore","method","setRootNavigation","canExitRef","onBackPress","canGoBack","BackHandler","addEventListener","removeEventListener","useBackButtonHandler","persistenceKey","initialNavigationState","setInitialNavigationState","isRestoringNavigationState","setIsRestoringNavigationState","routeNameRef","restoreState","onNavigationStateChange","currentRouteName","useNavigationPersistence","initialMetrics","initialWindowMetrics","initialState","onStateChange","registerRootComponent","module","exports"],"mappings":"owDAQO,SAASA,EAAUC,EAAgBC,GACxC,OAAOD,EAAME,IAAKC,EAAEH,EAAKC,GAAW,KCJtCC,IAAKE,WAAY,EACjBF,IAAKG,aAAe,CAAEC,KAAIC,MAE1BL,IAAKM,OAASC,KAAuB,K,OCDrCC,EAAOC,WAAW,CAChB,mB,8CCDK,SAAeC,EAAWZ,GAA1B,SAAAa,EAAAC,OAAA,2EAAAD,EAAA,MAEUE,IAAaC,QAAQhB,IAF/B,iGAKI,MALJ,+DAeA,SAAeiB,EAAWjB,EAAakB,GAAvC,SAAAL,EAAAC,OAAA,2EAAAD,EAAA,MAEGE,IAAaI,QAAQnB,EAAKkB,IAF7B,iCAGI,GAHJ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B,uBAKjB8B,GAA8B,GALb,+EAarB,OAJAjX,qBAAU,WACJgX,GAA4BG,MAC/B,CAACH,IAEG,CAAEI,wBA7BuB,SAACjC,GACL+B,EAAahX,QAAvC,IACMmX,EAAmBhC,GAAmBF,GAQ5C+B,EAAahX,QAAUmX,EAGvB7F,EAAQvc,KAAK4hB,EAAgB1B,IAgBGgC,eAAcL,0BEhFYQ,CAC1D9F,EAZsC,oBAWhCsF,EAAR,EAAQA,uBAAwBM,EAAhC,EAAgCA,wBAiBhC,OAXApX,qBAAU,WACN,EAAA1L,EAAAC,OAAA,kEAAAD,EAAA,MClDmB,EAAAA,EAAAC,OAAA,sGDkDnB,OAEAgd,KAAiB4B,KAAKgD,GAFtB,8DAID,IAME1E,EAIH,kBAAC,GAAD,KACE,kBAACP,GAAD,CAAmBvc,MAAO8c,GACxB,kBAAC,IAAD,CAAkB8F,eAAgBC,KAChC,kBAAC3C,GAAD,CACElR,IAAKuS,EACLuB,aAAcX,EACdY,cAAeN,OAVF,M,UE1DzBO,aAAsB1B,IACPA,Q,+DCLf2B,EAAOC,QAAU,kd,kBCAjBD,EAAOC,QAAU,0S,oBCAjBD,EAAOC,QAAU,IAA0B,gC,oBCA3CD,EAAOC,QAAU,IAA0B,oC,oBCA3CD,EAAOC,QAAU,IAA0B,yC,kBCA3CD,EAAOC,QAAU,2S","file":"static/js/app.f9550138.chunk.js","sourcesContent":["import i18n from \"i18n-js\"\nimport { TxKeyPath } from \"./i18n\"\n\n/**\n * Translates text.\n *\n * @param key The i18n key.\n */\nexport function translate(key: TxKeyPath, options?: i18n.TranslateOptions) {\n return key ? i18n.t(key, options) : null\n}\n","import * as Localization from \"expo-localization\"\nimport i18n from \"i18n-js\"\nimport en from \"./en.json\"\nimport ja from \"./ja.json\"\n\ni18n.fallbacks = true\ni18n.translations = { en, ja }\n\ni18n.locale = Localization.locale || \"en\"\n\n/**\n * Builds up valid keypaths for translations.\n * Update to your default locale of choice if not English.\n */\ntype DefaultLocale = typeof en\nexport type TxKeyPath = RecursiveKeyOf<DefaultLocale>\n\ntype RecursiveKeyOf<TObj extends Record<string, any>> = {\n [TKey in keyof TObj & string]: TObj[TKey] extends Record<string, any>\n ? `${TKey}` | `${TKey}.${RecursiveKeyOf<TObj[TKey]>}`\n : `${TKey}`\n}[keyof TObj & string]\n","/**\n * Ignore some yellowbox warnings. Some of these are for deprecated functions\n * that we haven't gotten around to replacing yet.\n */\nimport { LogBox } from \"react-native\"\n\n// prettier-ignore\nLogBox.ignoreLogs([\n \"Require cycle:\",\n])\n","import AsyncStorage from \"@react-native-async-storage/async-storage\"\n\n/**\n * Loads a string from storage.\n *\n * @param key The key to fetch.\n */\nexport async function loadString(key: string): Promise<string | null> {\n try {\n return await AsyncStorage.getItem(key)\n } catch {\n // not sure why this would fail... even reading the RN docs I'm unclear\n return null\n }\n}\n\n/**\n * Saves a string to storage.\n *\n * @param key The key to fetch.\n * @param value The value to store.\n */\nexport async function saveString(key: string, value: string): Promise<boolean> {\n try {\n await AsyncStorage.setItem(key, value)\n return true\n } catch {\n return false\n }\n}\n\n/**\n * Loads something from storage and runs it thru JSON.parse.\n *\n * @param key The key to fetch.\n */\nexport async function load(key: string): Promise<any | null> {\n try {\n const almostThere = await AsyncStorage.getItem(key)\n return JSON.parse(almostThere)\n } catch {\n return null\n }\n}\n\n/**\n * Saves an object to storage.\n *\n * @param key The key to fetch.\n * @param value The value to store.\n */\nexport async function save(key: string, value: any): Promise<boolean> {\n try {\n await AsyncStorage.setItem(key, JSON.stringify(value))\n return true\n } catch {\n return false\n }\n}\n\n/**\n * Removes something from storage.\n *\n * @param key The key to kill.\n */\nexport async function remove(key: string): Promise<void> {\n try {\n await AsyncStorage.removeItem(key)\n } catch {}\n}\n\n/**\n * Burn it all to the ground.\n */\nexport async function clear(): Promise<void> {\n try {\n await AsyncStorage.clear()\n } catch {}\n}\n","export const palette = {\n black: \"#1d1d1d\",\n white: \"#ffffff\",\n offWhite: \"#e6e6e6\",\n orange: \"#FBA928\",\n orangeDarker: \"#EB9918\",\n lightGrey: \"#939AA4\",\n lighterGrey: \"#CDD4DA\",\n angry: \"#dd3333\",\n deepPurple: \"#5D2555\",\n}\n","import { palette } from \"./palette\"\n\n/**\n * Roles for colors. Prefer using these over the palette. It makes it easier\n * to change things.\n *\n * The only roles we need to place in here are the ones that span through the app.\n *\n * If you have a specific use-case, like a spinner color. It makes more sense to\n * put that in the <Spinner /> component.\n */\nexport const color = {\n /**\n * The palette is available to use, but prefer using the name.\n */\n palette,\n /**\n * A helper for making something see-thru. Use sparingly as many layers of transparency\n * can cause older Android devices to slow down due to the excessive compositing required\n * by their under-powered GPUs.\n */\n transparent: \"rgba(0, 0, 0, 0)\",\n /**\n * The screen background.\n */\n background: palette.white,\n /**\n * The main tinting color.\n */\n primary: palette.orange,\n /**\n * The main tinting color, but darker.\n */\n primaryDarker: palette.orangeDarker,\n /**\n * A subtle color used for borders and lines.\n */\n line: palette.offWhite,\n /**\n * The default color of text in many components.\n */\n text: palette.white,\n /**\n * Secondary information.\n */\n dim: palette.lightGrey,\n /**\n * Error messages and icons.\n */\n error: palette.angry,\n\n /**\n * Storybook background for Text stories, or any stories where\n * the text color is color.text, which is white by default, and does not show\n * in Stories against the default white background\n */\n storybookDarkBg: palette.black,\n\n /**\n * Storybook text color for stories that display Text components against the\n * white background\n */\n storybookTextColor: palette.black,\n}\n","/**\n * NOTE TO DEVS:\n *\n * Spacing should be consistent and whitespace thought of as a first class technique up\n * there with color and typefaces.\n *\n * Which type of scale you use is based on the design.\n *\n * If you've got simpler app, you may only need 6 items. Or maybe you want a spacing scale\n * to be named:\n *\n * export const spacing = {\n * tiny: 4,\n * small: 8,\n * medium: 12,\n * large: 24,\n * huge: 64\n * }\n *\n * Whatever you choose, try to stick with these, and not freestyle it everywhere.\n *\n * Feel free to delete this block.\n */\n\n/**\n * The available spacing.\n *\n * Here's the rough guideline. Customize this for you usage. It's ok to put exceptions\n * within the components themselves if they are truly exceptions.\n *\n * 0 = none - nothing. only here to bust out of a zero-based array.\n * 1 = tiny - elements contextually close to each other\n * 2 = smaller - for groups of closely related items or perhaps borders\n * 3 = small - ?\n * 4 = medium - ?\n * 5 = medium+ - ?\n * 6 = large - between groups of content that aren't related?\n * 7 = huge - ?\n * 8 = massive - an uncomfortable amount of whitespace\n */\nexport const spacing = [0, 4, 8, 12, 16, 24, 32, 48, 64]\n","import { Platform } from \"react-native\"\n\n/**\n * You can find a list of available fonts on both iOS and Android here:\n * https://github.com/react-native-training/react-native-fonts\n *\n * If you're interested in adding a custom font to your project,\n * check out the readme file in ./assets/fonts/ then come back here\n * and enter your new font name. Remember the Android font name\n * is probably different than iOS.\n * More on that here:\n * https://github.com/lendup/react-native-cross-platform-text\n *\n * The various styles of fonts are defined in the <Text /> component.\n */\nexport const typography = {\n /**\n * The primary font. Used in most places.\n */\n primary: Platform.select({ ios: \"Helvetica\", android: \"normal\" }),\n\n /**\n * An alternate font used for perhaps titles and stuff.\n */\n secondary: Platform.select({ ios: \"Arial\", android: \"sans-serif\" }),\n\n /**\n * Lets get fancy with a monospace font!\n */\n code: Platform.select({ ios: \"Courier\", android: \"monospace\" }),\n}\n","import { TextStyle } from \"react-native\"\nimport { color, typography } from \"../../theme\"\n\n/**\n * All text will start off looking like this.\n */\nconst BASE: TextStyle = {\n fontFamily: typography.primary,\n color: color.text,\n fontSize: 15,\n}\n\n/**\n * All the variations of text styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const presets = {\n /**\n * The default text styles.\n */\n default: BASE,\n\n /**\n * A bold version of the default text.\n */\n bold: { ...BASE, fontWeight: \"bold\" } as TextStyle,\n\n /**\n * Large headers.\n */\n header: { ...BASE, fontSize: 24, fontWeight: \"bold\" } as TextStyle,\n\n /**\n * Field labels that appear on forms above the inputs.\n */\n fieldLabel: { ...BASE, fontSize: 13, color: color.dim } as TextStyle,\n\n /**\n * A smaller piece of secondard information.\n */\n secondary: { ...BASE, fontSize: 9, color: color.dim } as TextStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type TextPresets = keyof typeof presets\n","import * as React from \"react\"\nimport { Text as ReactNativeText } from \"react-native\"\nimport { presets } from \"./text.presets\"\nimport { TextProps } from \"./text.props\"\nimport { translate } from \"../../i18n\"\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Text(props: TextProps) {\n // grab the props\n const { preset = \"default\", tx, txOptions, text, children, style: styleOverride, ...rest } = props\n\n // figure out which content to use\n const i18nText = tx && translate(tx, txOptions)\n const content = i18nText || text || children\n\n const style = presets[preset] || presets.default\n const styles = [style, styleOverride]\n\n return (\n <ReactNativeText {...rest} style={styles}>\n {content}\n </ReactNativeText>\n )\n}\n","import React, { useLayoutEffect, useState } from \"react\"\nimport {\n Image as RNImage,\n ImageProps as DefaultImageProps,\n ImageURISource,\n Platform,\n} from \"react-native\"\n\ntype ImageProps = DefaultImageProps & {\n source: ImageURISource\n}\n\n/**\n * An Image wrapper component that autosizes itself to the size of the actual image.\n * You can always override by passing a width and height in the style.\n * If passing only one of width/height this image component will use the actual\n * size of the other dimension.\n *\n * This component isn't required, but is provided as a convenience so that\n * we don't have to remember to explicitly set image sizes on every image instance.\n *\n * To use as a stand-in replacement import { AutoImage as Image } and remove the\n * Image import from react-native. Now all images in that file are handled by this\n * component and are web-ready if not explicitly sized in the style property.\n */\nexport function AutoImage(props: ImageProps) {\n const [imageSize, setImageSize] = useState({ width: 0, height: 0 })\n\n useLayoutEffect(() => {\n if (props.source?.uri) {\n RNImage.getSize(props.source.uri as any, (width, height) => {\n setImageSize({ width, height })\n })\n } else if (Platform.OS === \"web\") {\n // web requires a different method to get it's size\n RNImage.getSize(props.source as any, (width, height) => {\n setImageSize({ width, height })\n })\n } else {\n const { width, height } = RNImage.resolveAssetSource(props.source)\n setImageSize({ width, height })\n }\n }, [])\n\n return <RNImage {...props} style={[imageSize, props.style]} />\n}\n","export const icons = {\n back: require(\"./arrow-left.png\"),\n bullet: require(\"./bullet.png\"),\n}\n\nexport type IconTypes = keyof typeof icons\n","import * as React from \"react\"\nimport { View, ImageStyle } from \"react-native\"\nimport { AutoImage as Image } from \"../auto-image/auto-image\"\nimport { IconProps } from \"./icon.props\"\nimport { icons } from \"./icons\"\n\nconst ROOT: ImageStyle = {\n resizeMode: \"contain\",\n}\n\nexport function Icon(props: IconProps) {\n const { style: styleOverride, icon, containerStyle } = props\n\n return (\n <View style={containerStyle}>\n <Image style={[ROOT, styleOverride]} source={icons[icon]} />\n </View>\n )\n}\n","import * as React from \"react\"\nimport { View, ViewStyle, ImageStyle, TextStyle } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { Icon } from \"../icon/icon\"\nimport { spacing, typography } from \"../../theme\"\n\nconst BULLET_ITEM: ViewStyle = {\n flexDirection: \"row\",\n marginTop: spacing[4],\n paddingBottom: spacing[4],\n borderBottomWidth: 1,\n borderBottomColor: \"#3A3048\",\n}\nconst BULLET_CONTAINER: ViewStyle = {\n marginRight: spacing[4] - 1,\n marginTop: spacing[2],\n}\nconst BULLET: ImageStyle = {\n width: 8,\n height: 8,\n}\nconst BULLET_TEXT: TextStyle = {\n flex: 1,\n fontFamily: typography.primary,\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n}\n\nexport interface BulletItemProps {\n text: string\n}\n\nexport function BulletItem(props: BulletItemProps) {\n return (\n <View style={BULLET_ITEM}>\n <Icon icon=\"bullet\" containerStyle={BULLET_CONTAINER} style={BULLET} />\n <Text style={BULLET_TEXT} text={props.text} />\n </View>\n )\n}\n","import { ViewStyle, TextStyle } from \"react-native\"\nimport { color, spacing } from \"../../theme\"\n\n/**\n * All text will start off looking like this.\n */\nconst BASE_VIEW: ViewStyle = {\n paddingVertical: spacing[2],\n paddingHorizontal: spacing[2],\n borderRadius: 4,\n justifyContent: \"center\",\n alignItems: \"center\",\n}\n\nconst BASE_TEXT: TextStyle = {\n paddingHorizontal: spacing[3],\n}\n\n/**\n * All the variations of text styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const viewPresets: Record<string, ViewStyle> = {\n /**\n * A smaller piece of secondard information.\n */\n primary: { ...BASE_VIEW, backgroundColor: color.palette.orange } as ViewStyle,\n\n /**\n * A button without extras.\n */\n link: {\n ...BASE_VIEW,\n paddingHorizontal: 0,\n paddingVertical: 0,\n alignItems: \"flex-start\",\n } as ViewStyle,\n}\n\nexport const textPresets: Record<ButtonPresetNames, TextStyle> = {\n primary: { ...BASE_TEXT, fontSize: 9, color: color.palette.white } as TextStyle,\n link: {\n ...BASE_TEXT,\n color: color.text,\n paddingHorizontal: 0,\n paddingVertical: 0,\n } as TextStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type ButtonPresetNames = keyof typeof viewPresets\n","import * as React from \"react\"\nimport { TouchableOpacity } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { viewPresets, textPresets } from \"./button.presets\"\nimport { ButtonProps } from \"./button.props\"\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Button(props: ButtonProps) {\n // grab the props\n const {\n preset = \"primary\",\n tx,\n text,\n style: styleOverride,\n textStyle: textStyleOverride,\n children,\n ...rest\n } = props\n\n const viewStyle = viewPresets[preset] || viewPresets.primary\n const viewStyles = [viewStyle, styleOverride]\n const textStyle = textPresets[preset] || textPresets.primary\n const textStyles = [textStyle, textStyleOverride]\n\n const content = children || <Text tx={tx} text={text} style={textStyles} />\n\n return (\n <TouchableOpacity style={viewStyles} {...rest}>\n {content}\n </TouchableOpacity>\n )\n}\n","import * as React from \"react\"\nimport { TextStyle, TouchableOpacity, View, ViewStyle } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { color, spacing } from \"../../theme\"\nimport { CheckboxProps } from \"./checkbox.props\"\n\nconst ROOT: ViewStyle = {\n flexDirection: \"row\",\n paddingVertical: spacing[1],\n alignSelf: \"flex-start\",\n}\n\nconst DIMENSIONS = { width: 16, height: 16 }\n\nconst OUTLINE: ViewStyle = {\n ...DIMENSIONS,\n marginTop: 2, // finicky and will depend on font/line-height/baseline/weather\n justifyContent: \"center\",\n alignItems: \"center\",\n borderWidth: 1,\n borderColor: color.primaryDarker,\n borderRadius: 1,\n}\n\nconst FILL: ViewStyle = {\n width: DIMENSIONS.width - 4,\n height: DIMENSIONS.height - 4,\n backgroundColor: color.primary,\n}\n\nconst LABEL: TextStyle = { paddingLeft: spacing[2] }\n\nexport function Checkbox(props: CheckboxProps) {\n const numberOfLines = props.multiline ? 0 : 1\n\n const rootStyle = [ROOT, props.style]\n const outlineStyle = [OUTLINE, props.outlineStyle]\n const fillStyle = [FILL, props.fillStyle]\n\n const onPress = props.onToggle ? () => props.onToggle && props.onToggle(!props.value) : null\n\n return (\n <TouchableOpacity\n activeOpacity={1}\n disabled={!props.onToggle}\n onPress={onPress}\n style={rootStyle}\n >\n <View style={outlineStyle}>{props.value && <View style={fillStyle} />}</View>\n <Text text={props.text} tx={props.tx} numberOfLines={numberOfLines} style={LABEL} />\n </TouchableOpacity>\n )\n}\n","import { ViewStyle } from \"react-native\"\nimport { color, spacing } from \"../../theme\"\n\n/**\n * The size of the border radius.\n */\nconst RADIUS = 8\n\n/**\n * The default style of the container.\n */\nconst ROOT: ViewStyle = {\n borderWidth: 1,\n borderColor: color.line,\n padding: spacing[2],\n}\n\n/**\n * What each of the presets look like.\n */\nexport const PRESETS = {\n /**\n * Rounded borders on the the top only.\n */\n top: {\n ...ROOT,\n borderTopLeftRadius: RADIUS,\n borderTopRightRadius: RADIUS,\n borderBottomWidth: 0,\n },\n /**\n * No rounded borders.\n */\n middle: {\n ...ROOT,\n borderBottomWidth: 0,\n },\n /**\n * Rounded borders on the bottom.\n */\n bottom: {\n ...ROOT,\n borderBottomLeftRadius: RADIUS,\n borderBottomRightRadius: RADIUS,\n },\n /**\n * Rounded borders everywhere.\n */\n soloRound: {\n ...ROOT,\n borderRadius: RADIUS,\n },\n /**\n * Straight borders everywhere.\n */\n soloStraight: {\n ...ROOT,\n },\n /**\n * Transparent borders useful to keep things lined up.\n */\n clear: {\n ...ROOT,\n borderColor: color.transparent,\n },\n}\n\n/**\n * The names of the presets supported by FormRow.\n */\nexport type FormRowPresets = keyof typeof PRESETS\n","import React from \"react\"\nimport { View, ViewStyle, TextStyle } from \"react-native\"\nimport { HeaderProps } from \"./header.props\"\nimport { Button } from \"../button/button\"\nimport { Text } from \"../text/text\"\nimport { Icon } from \"../icon/icon\"\nimport { spacing } from \"../../theme\"\nimport { translate } from \"../../i18n/\"\n\n// static styles\nconst ROOT: ViewStyle = {\n flexDirection: \"row\",\n paddingHorizontal: spacing[4],\n alignItems: \"center\",\n paddingTop: spacing[5],\n paddingBottom: spacing[5],\n justifyContent: \"flex-start\",\n}\nconst TITLE: TextStyle = { textAlign: \"center\" }\nconst TITLE_MIDDLE: ViewStyle = { flex: 1, justifyContent: \"center\" }\nconst LEFT: ViewStyle = { width: 32 }\nconst RIGHT: ViewStyle = { width: 32 }\n\n/**\n * Header that appears on many screens. Will hold navigation buttons and screen title.\n */\nexport function Header(props: HeaderProps) {\n const {\n onLeftPress,\n onRightPress,\n rightIcon,\n leftIcon,\n headerText,\n headerTx,\n style,\n titleStyle,\n } = props\n const header = headerText || (headerTx && translate(headerTx)) || \"\"\n\n return (\n <View style={[ROOT, style]}>\n {leftIcon ? (\n <Button preset=\"link\" onPress={onLeftPress}>\n <Icon icon={leftIcon} />\n </Button>\n ) : (\n <View style={LEFT} />\n )}\n <View style={TITLE_MIDDLE}>\n <Text style={[TITLE, titleStyle]} text={header} />\n </View>\n {rightIcon ? (\n <Button preset=\"link\" onPress={onRightPress}>\n <Icon icon={rightIcon} />\n </Button>\n ) : (\n <View style={RIGHT} />\n )}\n </View>\n )\n}\n","import { ViewStyle } from \"react-native\"\nimport { color } from \"../../theme\"\n\n/**\n * All screen keyboard offsets.\n */\nexport const offsets = {\n none: 0,\n}\n\n/**\n * The variations of keyboard offsets.\n */\nexport type KeyboardOffsets = keyof typeof offsets\n\n/**\n * All the variations of screens.\n */\nexport const presets = {\n /**\n * No scrolling. Suitable for full-screen carousels and components\n * which have built-in scrolling like FlatList.\n */\n fixed: {\n outer: {\n backgroundColor: color.background,\n flex: 1,\n height: \"100%\",\n } as ViewStyle,\n inner: {\n justifyContent: \"flex-start\",\n alignItems: \"stretch\",\n height: \"100%\",\n width: \"100%\",\n } as ViewStyle,\n },\n\n /**\n * Scrolls. Suitable for forms or other things requiring a keyboard.\n *\n * Pick this one if you don't know which one you want yet.\n */\n scroll: {\n outer: {\n backgroundColor: color.background,\n flex: 1,\n height: \"100%\",\n } as ViewStyle,\n inner: { justifyContent: \"flex-start\", alignItems: \"stretch\" } as ViewStyle,\n },\n}\n\n/**\n * The variations of screens.\n */\nexport type ScreenPresets = keyof typeof presets\n\n/**\n * Is this preset a non-scrolling one?\n *\n * @param preset The preset to check\n */\nexport function isNonScrolling(preset?: ScreenPresets) {\n // any of these things will make you scroll\n return !preset || !presets[preset] || preset === \"fixed\"\n}\n","import * as React from \"react\"\nimport { KeyboardAvoidingView, Platform, ScrollView, StatusBar, View } from \"react-native\"\nimport { useSafeAreaInsets } from \"react-native-safe-area-context\"\nimport { ScreenProps } from \"./screen.props\"\nimport { isNonScrolling, offsets, presets } from \"./screen.presets\"\n\nconst isIos = Platform.OS === \"ios\"\n\nfunction ScreenWithoutScrolling(props: ScreenProps) {\n const insets = useSafeAreaInsets()\n const preset = presets.fixed\n const style = props.style || {}\n const backgroundStyle = props.backgroundColor ? { backgroundColor: props.backgroundColor } : {}\n const insetStyle = { paddingTop: props.unsafe ? 0 : insets.top }\n\n return (\n <KeyboardAvoidingView\n style={[preset.outer, backgroundStyle]}\n behavior={isIos ? \"padding\" : undefined}\n keyboardVerticalOffset={offsets[props.keyboardOffset || \"none\"]}\n >\n <StatusBar barStyle={props.statusBar || \"light-content\"} />\n <View style={[preset.inner, style, insetStyle]}>{props.children}</View>\n </KeyboardAvoidingView>\n )\n}\n\nfunction ScreenWithScrolling(props: ScreenProps) {\n const insets = useSafeAreaInsets()\n const preset = presets.scroll\n const style = props.style || {}\n const backgroundStyle = props.backgroundColor ? { backgroundColor: props.backgroundColor } : {}\n const insetStyle = { paddingTop: props.unsafe ? 0 : insets.top }\n\n return (\n <KeyboardAvoidingView\n style={[preset.outer, backgroundStyle]}\n behavior={isIos ? \"padding\" : undefined}\n keyboardVerticalOffset={offsets[props.keyboardOffset || \"none\"]}\n >\n <StatusBar barStyle={props.statusBar || \"light-content\"} />\n <View style={[preset.outer, backgroundStyle, insetStyle]}>\n <ScrollView\n style={[preset.outer, backgroundStyle]}\n contentContainerStyle={[preset.inner, style]}\n keyboardShouldPersistTaps={props.keyboardShouldPersistTaps || \"handled\"}\n >\n {props.children}\n </ScrollView>\n </View>\n </KeyboardAvoidingView>\n )\n}\n\n/**\n * The starting component on every screen in the app.\n *\n * @param props The screen props\n */\nexport function Screen(props: ScreenProps) {\n if (isNonScrolling(props.preset)) {\n return <ScreenWithoutScrolling {...props} />\n } else {\n return <ScreenWithScrolling {...props} />\n }\n}\n","import React from \"react\"\nimport { ViewStyle, Animated, Easing, TouchableWithoutFeedback } from \"react-native\"\nimport { color } from \"../../theme\"\nimport { SwitchProps } from \"./switch.props\"\n\n// dimensions\nconst THUMB_SIZE = 30\nconst WIDTH = 56\nconst MARGIN = 2\nconst OFF_POSITION = -0.5\nconst ON_POSITION = WIDTH - THUMB_SIZE - MARGIN\nconst BORDER_RADIUS = (THUMB_SIZE * 3) / 4\n\n// colors\nconst ON_COLOR = color.primary\nconst OFF_COLOR = color.palette.offWhite\nconst BORDER_ON_COLOR = ON_COLOR\nconst BORDER_OFF_COLOR = \"rgba(0, 0, 0, 0.1)\"\n\n// animation\nconst DURATION = 250\n\n// the track always has these props\nconst TRACK = {\n height: THUMB_SIZE + MARGIN,\n width: WIDTH,\n borderRadius: BORDER_RADIUS,\n borderWidth: MARGIN / 2,\n backgroundColor: color.background,\n}\n\n// the thumb always has these props\nconst THUMB: ViewStyle = {\n position: \"absolute\",\n width: THUMB_SIZE,\n height: THUMB_SIZE,\n borderColor: BORDER_OFF_COLOR,\n borderRadius: THUMB_SIZE / 2,\n borderWidth: MARGIN / 2,\n backgroundColor: color.background,\n shadowColor: BORDER_OFF_COLOR,\n shadowOffset: { width: 1, height: 2 },\n shadowOpacity: 1,\n shadowRadius: 2,\n elevation: 2,\n}\n\nconst makeAnimatedValue = (switchOn) => new Animated.Value(switchOn ? 1 : 0)\n\nexport function Switch(props: SwitchProps) {\n const [timer] = React.useState<Animated.Value>(makeAnimatedValue(props.value))\n const startAnimation = React.useMemo(\n () => (newValue: boolean) => {\n const toValue = newValue ? 1 : 0\n const easing = Easing.out(Easing.circle)\n Animated.timing(timer, {\n toValue,\n duration: DURATION,\n easing,\n useNativeDriver: true,\n }).start()\n },\n [timer],\n )\n\n const [previousValue, setPreviousValue] = React.useState<boolean>(props.value)\n React.useEffect(() => {\n if (props.value !== previousValue) {\n startAnimation(props.value)\n setPreviousValue(props.value)\n }\n }, [props.value])\n\n const handlePress = React.useMemo(() => () => props.onToggle && props.onToggle(!props.value), [\n props.onToggle,\n props.value,\n ])\n\n if (!timer) {\n return null\n }\n\n const translateX = timer.interpolate({\n inputRange: [0, 1],\n outputRange: [OFF_POSITION, ON_POSITION],\n })\n\n const style = props.style\n\n const trackStyle = [\n TRACK,\n {\n backgroundColor: props.value ? ON_COLOR : OFF_COLOR,\n borderColor: props.value ? BORDER_ON_COLOR : BORDER_OFF_COLOR,\n },\n props.value ? props.trackOnStyle : props.trackOffStyle,\n ]\n\n const thumbStyle = [\n THUMB,\n {\n transform: [{ translateX }],\n },\n props.value ? props.thumbOnStyle : props.thumbOffStyle,\n ]\n\n return (\n <TouchableWithoutFeedback onPress={handlePress} style={style}>\n <Animated.View style={trackStyle}>\n <Animated.View style={thumbStyle} />\n </Animated.View>\n </TouchableWithoutFeedback>\n )\n}\n","import React from \"react\"\nimport { StyleProp, TextInput, TextInputProps, TextStyle, View, ViewStyle } from \"react-native\"\nimport { color, spacing, typography } from \"../../theme\"\nimport { translate, TxKeyPath } from \"../../i18n\"\nimport { Text } from \"../text/text\"\n\n// the base styling for the container\nconst CONTAINER: ViewStyle = {\n paddingVertical: spacing[3],\n}\n\n// the base styling for the TextInput\nconst INPUT: TextStyle = {\n fontFamily: typography.primary,\n color: color.text,\n minHeight: 44,\n fontSize: 18,\n backgroundColor: color.palette.white,\n}\n\n// currently we have no presets, but that changes quickly when you build your app.\nconst PRESETS: { [name: string]: ViewStyle } = {\n default: {},\n}\n\nexport interface TextFieldProps extends TextInputProps {\n /**\n * The placeholder i18n key.\n */\n placeholderTx?: TxKeyPath\n\n /**\n * The Placeholder text if no placeholderTx is provided.\n */\n placeholder?: string\n\n /**\n * The label i18n key.\n */\n labelTx?: TxKeyPath\n\n /**\n * The label text if no labelTx is provided.\n */\n label?: string\n\n /**\n * Optional container style overrides useful for margins & padding.\n */\n style?: StyleProp<ViewStyle>\n\n /**\n * Optional style overrides for the input.\n */\n inputStyle?: StyleProp<TextStyle>\n\n /**\n * Various look & feels.\n */\n preset?: keyof typeof PRESETS\n\n forwardedRef?: any\n}\n\n/**\n * A component which has a label and an input together.\n */\nexport function TextField(props: TextFieldProps) {\n const {\n placeholderTx,\n placeholder,\n labelTx,\n label,\n preset = \"default\",\n style: styleOverride,\n inputStyle: inputStyleOverride,\n forwardedRef,\n ...rest\n } = props\n\n const containerStyles = [CONTAINER, PRESETS[preset], styleOverride]\n const inputStyles = [INPUT, inputStyleOverride]\n const actualPlaceholder = placeholderTx ? translate(placeholderTx) : placeholder\n\n return (\n <View style={containerStyles}>\n <Text preset=\"fieldLabel\" tx={labelTx} text={label} />\n <TextInput\n placeholder={actualPlaceholder}\n placeholderTextColor={color.palette.lighterGrey}\n underlineColorAndroid={color.transparent}\n {...rest}\n style={inputStyles}\n ref={forwardedRef}\n />\n </View>\n )\n}\n","import { ImageStyle } from \"react-native\"\n\n/**\n * All wallpaper will start off looking like this.\n */\nconst BASE: ImageStyle = {\n position: \"absolute\",\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n}\n\n/**\n * All the variations of wallpaper styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const presets = {\n /**\n * The default wallpaper styles.\n */\n stretch: {\n ...BASE,\n resizeMode: \"stretch\",\n width: null, // Have to set these to null because android ¯\\_(ツ)_/¯\n height: null,\n } as ImageStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type WallpaperPresets = keyof typeof presets\n","import React from \"react\"\nimport { AutoImage as Image } from \"../auto-image/auto-image\"\nimport { presets } from \"./wallpaper.presets\"\nimport { WallpaperProps } from \"./wallpaper.props\"\n\nconst defaultImage = require(\"./bg.png\")\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Wallpaper(props: WallpaperProps) {\n // grab the props\n const { preset = \"stretch\", style: styleOverride, backgroundImage } = props\n\n // assemble the style\n const presetToUse = presets[preset] || presets.stretch\n const styles = [presetToUse, styleOverride]\n\n // figure out which image to use\n const source = backgroundImage || defaultImage\n\n return <Image source={source} style={styles} />\n}\n","import * as React from \"react\"\nimport { useState, useEffect, useRef, useMemo, useCallback } from \"react\"\nimport { StyleProp, TextStyle, View, ViewStyle } from \"react-native\"\nimport { observer } from \"mobx-react-lite\"\nimport { color, typography } from \"../../theme\"\nimport { Text } from \"../\"\nimport { flatten } from \"ramda\"\n\n//import data from \"../../data/miserables.json\"\n//import genRandomTree from \"../../data/randomdata\";\nimport rando from \"../../data/rando.json\"\n\nimport { ForceGraph2D, ForceGraph3D, ForceGraphVR, ForceGraphAR } from \"react-force-graph\"\nimport * as d3 from \"d3-force-3d\"\n//import * as three from \"three\"\nimport SpriteText from \"three-spritetext\"\n\nconst CONTAINER: ViewStyle = {\n justifyContent: \"center\",\n}\n\nconst TEXT: TextStyle = {\n fontFamily: typography.primary,\n fontSize: 14,\n color: color.primary,\n}\n\nexport interface GraphProps {\n /**\n * An optional style override useful for padding & margin.\n */\n style?: StyleProp<ViewStyle>\n physics\n gData\n setPhysics\n nodeIds: string[]\n}\n\n/**\n * Describe your component here\n */\nexport const Graph = observer(function Graph(props: GraphProps): JSX.Element {\n const { style, physics, setPhysics, gData, nodeIds } = props\n const styles = flatten([CONTAINER, style])\n\n const fgRef = useRef()\n\n const GROUPS: number = 12\n const NODE_R: number = 8\n //const gData = genRandomTree(200);\n\n //const [charge, setCharge] = useState(-30);\n //const [link, setLink] = useState(-30);\n\n useEffect(() => {\n const fg = fgRef.current\n //fg.d3Force('center').strength(0.05);\n if (physics.gravityOn) {\n fg.d3Force(\"x\", d3.forceX().strength(physics.gravity))\n fg.d3Force(\"y\", d3.forceY().strength(physics.gravity))\n if (physics.threedim) {\n if (physics.galaxy) {\n fg.d3Force(\"y\", d3.forceY().strength(physics.gravity / 5))\n fg.d3Force(\"z\", d3.forceZ().strength(physics.gravity / 5))\n } else {\n fg.d3Force(\"y\", d3.forceY().strength(physics.gravity))\n fg.d3Force(\"z\", d3.forceZ().strength(physics.gravity))\n }\n } else {\n fg.d3Force(\"z\", null)\n }\n } else {\n fg.d3Force(\"x\", null)\n fg.d3Force(\"y\", null)\n physics.threedim ? fg.d3Force(\"z\", null) : null\n }\n fg.d3Force(\"link\").strength(physics.linkStrength)\n fg.d3Force(\"link\").iterations(physics.linkIts)\n physics.collision\n ? fg.d3Force(\"collide\", d3.forceCollide().radius(20))\n : fg.d3Force(\"collide\", null)\n fg.d3Force(\"charge\").strength(physics.charge)\n })\n\n // For the expandable version of the graph\n\n /* const nodesById = useMemo(() => {\n * const nodesById = Object.fromEntries(gData.nodes.map((node) => [node.index, node]))\n * console.log(nodesById)\n * // link parent/children\n * gData.nodes.forEach((node) => {\n * typeof physics.rootId === \"number\"\n * ? (node.collapsed = node.index !== physics.rootId)\n * : (node.collapsed = node.id !== physics.rootId)\n * node.childLinks = []\n * })\n * gData.links.forEach((link) => nodesById[link.sourceIndex].childLinks.push(link))\n * return nodesById\n * }, [gData])\n * const getPrunedTree = useCallback(() => {\n * const visibleNodes = []\n * const visibleLinks = []\n * ;(function traverseTree(node = nodesById[physics.rootId]) {\n * visibleNodes.push(node)\n * if (node.collapsed) return\n * visibleLinks.push(...node.childLinks)\n * node.childLinks\n * .map((link) =>\n * typeof link.targetIndex === \"object\" ? link.targetIndex : nodesById[link.targetIndex],\n * ) // get child node\n * .forEach(traverseTree)\n * })()\n\n * return { nodes: visibleNodes, links: visibleLinks }\n * }, [nodesById])\n * const [prunedTree, setPrunedTree] = useState(getPrunedTree())\n */\n const handleNodeClick = useCallback((node) => {\n node.collapsed = !node.collapsed // toggle collapse state\n setPrunedTree(getPrunedTree())\n }, [])\n\n //highlighting\n const [highlightNodes, setHighlightNodes] = useState(new Set())\n const [highlightLinks, setHighlightLinks] = useState(new Set())\n const [hoverNode, setHoverNode] = useState(null)\n\n const updateHighlight = () => {\n setHighlightNodes(highlightNodes)\n setHighlightLinks(highlightLinks)\n }\n\n const handleBackgroundClick = (event) => {\n highlightNodes.clear()\n highlightLinks.clear()\n\n setSelectedNode(null)\n updateHighlight()\n }\n\n const handleNodeHover = (node) => {\n console.log(\"hover\")\n if (!selectedNode) {\n highlightNodes.clear()\n highlightLinks.clear()\n if (node) {\n highlightNodes.add(node)\n node.neighbors.forEach((neighbor) => highlightNodes.add(neighbor))\n node.links.forEach((link) => highlightLinks.add(link))\n }\n\n setHoverNode(node || null)\n updateHighlight()\n }\n }\n\n const handleLinkHover = (link) => {\n highlightNodes.clear()\n highlightLinks.clear()\n\n if (link) {\n highlightLinks.add(link)\n highlightNodes.add(link.source)\n highlightNodes.add(link.target)\n }\n\n updateHighlight()\n }\n\n // Normally the graph doesn't update when you just change the physics parameters\n // This forces the graph to make a small update when you do\n useEffect(() => {\n !physics.threedim && fgRef.current.d3ReheatSimulation()\n }, [physics])\n /* const paintRing = useCallback((node, ctx) => {\n * // add ring just for highlighted nodes\n * ctx.beginPath();\n * ctx.arc(node.x, node.y, NODE_R * 1.4, 0, 2 * Math.PI, false);\n * ctx.fillStyle = node === hoverNode ? 'red' : 'orange';\n * ctx.fill();\n * }, [hoverNode]);\n */\n\n /* autoPauseRedraw={false}\nlinkWidth={link => highlightLinks.has(link) ? 5 : 1}\nlinkDirectionalParticles={4}\nlinkDirectionalParticleWidth={link => highlightLinks.has(link) ? 4 : 0}\nnodeCanvasObjectMode={node => highlightNodes.has(node) ? 'before' : undefined}\nnodeCanvasObject={paintRing}\nonNodeHover={handleNodeHover}\nonLinkHover={handleLinkHover}\n nodeRelSize={NODE_R} */\n\n //nodeColor={(node) =>\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n //}\n\n const [selectedNode, setSelectedNode] = useState({})\n\n //shitty handler to check for doubleClicks\n const [doubleClick, setDoubleClick] = useState(0)\n const [localGraphData, setLocalGraphData] = useState({ nodes: [], links: [] })\n\n useEffect(() => {\n localGraphData.nodes.length && !physics.local && setPhysics({ ...physics, local: true })\n }, [localGraphData])\n\n const getLocalGraphData = (node) => {\n console.log(localGraphData)\n localGraphData.nodes.length ? setLocalGraphData({ nodes: [], links: [] }) : null\n let g = localGraphData\n console.log(g.nodes)\n if (!node.local) {\n g = { nodes: [], links: [] }\n console.log(\"length is 0\")\n node.local = true //keep track of these boys\n g.nodes.push(node) //only add the clicked node if its the first\n }\n node.links.length &&\n node.links.forEach((neighborLink) => {\n if (!neighborLink.local) {\n console.log(\"0\")\n neighborLink.local = true\n g.links.push(neighborLink)\n console.log(neighborLink)\n const targetNode = gData.nodes[neighborLink.targetIndex]\n const sourceNode = gData.nodes[neighborLink.sourceIndex]\n if (targetNode.id !== sourceNode.id) {\n if (targetNode.id === node.id) {\n console.log(\"1. I am the target, the source is \")\n console.log(sourceNode)\n if (!sourceNode.local) {\n console.log(\"2. The source is not local\")\n sourceNode.local = true\n g.nodes.push(sourceNode)\n } else {\n console.log(\"2.5 The source is already local\")\n }\n } else {\n console.log(\"3. I am the source\")\n if (!targetNode.local) {\n console.log(\"4. The target is not local.\")\n targetNode.local = true\n g.nodes.push(targetNode)\n } else {\n console.log(\"The target is already local\")\n }\n }\n }\n }\n })\n setLocalGraphData(g)\n }\n\n const selectClick = (node, event) => {\n highlightNodes.clear()\n highlightLinks.clear()\n console.log(localGraphData)\n if (event.timeStamp - doubleClick < 400) {\n getLocalGraphData(node)\n }\n if (node) {\n highlightNodes.add(node)\n node.neighbors.forEach((neighbor) => highlightNodes.add(neighbor))\n node.links.forEach((link) => highlightLinks.add(link))\n }\n\n setSelectedNode(node || null)\n updateHighlight()\n setDoubleClick(event.timeStamp)\n }\n\n return (\n <View>\n {!physics.threedim ? (\n <ForceGraph2D\n ref={fgRef}\n //autoPauseRedraw={false}\n //graphData={gData}\n graphData={physics.local ? localGraphData : gData}\n //nodeAutoColorBy={physics.colorful ? (node)=>node.index%GROUPS : undefined}\n nodeColor={\n !physics.colorful\n ? (node) => {\n if (highlightNodes.size === 0) {\n return \"rgb(100, 100, 100, 1)\"\n } else {\n return highlightNodes.has(node) ? \"purple\" : \"rgb(50, 50, 50, 0.5)\"\n }\n }\n : (node) => {\n if (node.neighbors.length === 1 || node.neighbors.length === 2) {\n return [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][node.neighbors[0].index % 11]\n } else {\n return [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][node.index % 11]\n }\n }\n }\n //linkAutoColorBy={physics.colorful ? ((d) => gData.nodes[d.sourceIndex].id % GROUPS) : undefined}\n linkColor={\n !physics.colorful\n ? (link) => {\n if (highlightLinks.size === 0) {\n return \"rgb(50, 50, 50, 0.8)\"\n } else {\n return highlightLinks.has(link) ? \"purple\" : \"rgb(50, 50, 50, 0.2)\"\n }\n }\n : (link) =>\n [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][gData.nodes[link.sourceIndex].index % 11]\n }\n linkDirectionalParticles={physics.particles}\n onNodeClick={selectClick}\n nodeLabel={(node) => node.title}\n linkWidth={(link) =>\n highlightLinks.has(link) ? 3 * physics.linkWidth : physics.linkWidth\n }\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n nodeVal={(node) => {\n return highlightNodes.has(node) ? node.neighbors.length + 5 : node.neighbors.length + 3\n }}\n linkDirectionalParticleWidth={physics.particleWidth}\n nodeCanvasObject={(node, ctx, globalScale) => {\n if (physics.labels) {\n if (globalScale > physics.labelScale || highlightNodes.has(node)) {\n const label = node.title.substring(0, Math.min(node.title.length, 30))\n const fontSize = 12 / globalScale\n ctx.font = `${fontSize}px Sans-Serif`\n const textWidth = ctx.measureText(label).width\n const bckgDimensions = [textWidth * 1.1, fontSize].map((n) => n + fontSize * 0.5) // some padding\n const fadeFactor = Math.min(\n (3 * (globalScale - physics.labelScale)) / physics.labelScale,\n 1,\n )\n\n ctx.fillStyle =\n \"rgba(20, 20, 20, \" +\n (highlightNodes.size === 0\n ? 0.5 * fadeFactor\n : highlightNodes.has(node)\n ? 0.5\n : 0.15 * fadeFactor) +\n \")\"\n ctx.fillRect(\n node.x - bckgDimensions[0] / 2,\n node.y - bckgDimensions[1] / 2,\n ...bckgDimensions,\n )\n\n ctx.textAlign = \"center\"\n ctx.textBaseline = \"middle\"\n ctx.fillStyle =\n \"rgb(255, 255, 255, \" +\n (highlightNodes.size === 0\n ? fadeFactor\n : highlightNodes.has(node)\n ? 1\n : 0.3 * fadeFactor) +\n \")\"\n ctx.fillText(label, node.x, node.y)\n\n node.__bckgDimensions = bckgDimensions // to re-use in nodePointerAreaPaint\n }\n }\n }}\n nodeCanvasObjectMode={() => \"after\"}\n onNodeHover={physics.hover ? handleNodeHover : null}\n //onLinkHover={physics.hover ? handleLinkHover : null}\n d3AlphaDecay={physics.alphaDecay}\n d3AlphaMin={physics.alphaTarget}\n d3VelocityDecay={physics.velocityDecay}\n onBackgroundClick={handleBackgroundClick}\n />\n ) : (\n <ForceGraph3D\n ref={fgRef}\n graphData={!physics.local ? gData : localGraphData}\n //graphData={gData}\n nodeAutoColorBy={physics.colorful ? \"id\" : undefined}\n nodeColor={\n !physics.colorful\n ? (node) => {\n if (highlightNodes.size === 0) {\n return \"rgb(100, 100, 100, 1)\"\n } else {\n return highlightNodes.has(node) ? \"purple\" : \"rgb(50, 50, 50, 0.5)\"\n }\n }\n : undefined\n }\n linkAutoColorBy={physics.colorful ? \"target\" : undefined}\n //linkAutoColorBy={(d) => gData.nodes[d.source].id % GROUPS}\n linkColor={\n !physics.colorful\n ? (link) => {\n if (highlightLinks.size === 0) {\n return \"rgb(50, 50, 50, 0.8)\"\n } else {\n return highlightLinks.has(link) ? \"purple\" : \"rgb(50, 50, 50, 0.2)\"\n }\n }\n : undefined\n }\n linkDirectionalParticles={physics.particles}\n nodeLabel={(node) => node.title}\n linkWidth={(link) =>\n highlightLinks.has(link) ? 3 * physics.linkWidth : physics.linkWidth\n }\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n nodeVal={(node) =>\n highlightNodes.has(node) ? node.neighbors.length * 3 : node.neighbors.length * 2\n }\n linkDirectionalParticleWidth={physics.particleWidth}\n onNodeHover={physics.hover ? handleNodeHover : null}\n d3AlphaDecay={physics.alphaDecay}\n d3AlphaMin={physics.alphaTarget}\n d3VelocityDecay={physics.velocityDecay}\n nodeThreeObject={\n !physics.labels\n ? undefined\n : (node) => {\n if (highlightNodes.has(node)) {\n console.log(node.title)\n const sprite = new SpriteText(node.title.substring(0, 30))\n console.log(\"didnt crash here 2\")\n sprite.color = \"#ffffff\"\n sprite.textHeight = 8\n return sprite\n } else {\n return undefined\n }\n }\n }\n nodeThreeObjectExtend={true}\n onNodeClick={selectClick}\n onBackgroundClick={handleBackgroundClick}\n />\n )}\n </View>\n )\n})\n","import * as React from \"react\"\nimport { ScrollView, StyleProp, Switch, TextStyle, TouchableOpacity, View, ViewStyle, StyleSheet, Button } from \"react-native\"\nimport { observer } from \"mobx-react-lite\"\nimport { color, typography } from \"../../theme\"\nimport { Text } from \"../\"\nimport { flatten } from \"ramda\"\nimport Slider from \"@react-native-community/slider\"\nimport { useState } from \"react\"\nimport Accordion from 'react-native-collapsible/Accordion'\nimport * as Animatable from 'react-native-animatable'\nimport Icon from 'react-native-vector-icons/MaterialCommunityIcons'\n\nconst CONTAINER: ViewStyle = {\n justifyContent: \"center\",\n}\n\nconst TEXT: TextStyle = {\n fontFamily: typography.primary,\n fontSize: 14,\n color: color.primary,\n}\n\nexport interface TweaksProps {\n /**\n * An optional style override useful for padding & margin.\n */\n style?: StyleProp<ViewStyle>\n physics\n setPhysics\n}\n\n/**\n * Describe your component here\n */\nexport const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element {\n const { style, physics, setPhysics } = props\n // const styles = flatten([CONTAINER, style])\n\n const content = [\n {\n title: \"Physics\",\n content:\n <View>\n <Text preset=\"fieldLabel\" text=\"Gravity\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.gravityOn}\n onValueChange={() => { setPhysics({ ...physics, gravityOn: !physics.gravityOn }) }}\n />\n <Text preset=\"fieldLabel\" text={\"Gravity: \" + physics.gravity} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, gravity: value }) }}\n value={physics.gravity}\n step={0.01} />\n <Text preset=\"fieldLabel\" text={\"Repulsive force: \" + physics.charge} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={-400}\n maximumValue={100}\n onValueChange={(value) => { setPhysics({ ...physics, charge: value }) }}\n value={physics.charge}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Link Force: \" + physics.linkStrength} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={2}\n onValueChange={(value) => { setPhysics({ ...physics, linkStrength: value }) }}\n value={physics.linkStrength}\n step={0.01}\n />\n <Text preset=\"fieldLabel\" text={\"'Link Iterations': \" + physics.linkIts} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkIts: value }) }}\n value={physics.linkIts}\n step={1} />\n <Text preset=\"fieldLabel\" text=\"Collision\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collision}\n onValueChange={() => { setPhysics({ ...physics, collision: !physics.collision }) }}\n />\n <Text preset=\"fieldLabel\" text={\"Alhpa Decay: \" + physics.alphaDecay} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, alphaDecay: value }) }}\n value={physics.alphaDecay}\n step={.01} />\n <Text preset=\"fieldLabel\" text={\"Alhpa Target: \" + physics.alphaTarget} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, alphaTarget: value }) }}\n value={physics.alphaTarget}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"Viscosity: \" + physics.velocityDecay} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, velocityDecay: value }) }}\n value={physics.velocityDecay}\n step={0.01} />\n <Text preset=\"fieldLabel\" text={\"Galaxy Mode (3D-only)\"} />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.galaxy}\n onValueChange={() => { setPhysics({ ...physics, galaxy: !physics.galaxy }) }}\n />\n </View>,\n },\n {\n title: 'Visual',\n content:\n <View>\n <Text preset=\"fieldLabel\" text=\"Colorful\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.colorful}\n onValueChange={() => { setPhysics({ ...physics, colorful: !physics.colorful }) }}\n />\n <Text preset=\"fieldLabel\" text=\"Hover highlight\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.hover}\n onValueChange={() => { setPhysics({ ...physics, hover: !physics.hover }) }}\n />\n <Text preset=\"fieldLabel\" text={\"Line Opacity: \" + physics.linkOpacity} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, linkOpacity: value }) }}\n value={physics.linkOpacity}\n step={.01} />\n <Text preset=\"fieldLabel\" text={\"Line width: \" + physics.linkWidth} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={.1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkWidth: value }) }}\n value={physics.linkWidth}\n step={0.1} />\n <Text preset=\"fieldLabel\" text={\"Node size: \" + physics.nodeRel} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, nodeRel: value }) }}\n value={physics.nodeRel}\n step={.01} />\n <Text preset=\"fieldLabel\" text={\"Particles: \" + physics.particles} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, particles: value }) }}\n value={physics.particles}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Particle Size: \" + physics.particleWidth} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, particleWidth: value }) }}\n value={physics.particleWidth}\n step={.1} />\n <Text preset=\"fieldLabel\" text=\"Labels\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.labels}\n onValueChange={() => { setPhysics({ ...physics, labels: !physics.labels }) }}\n />\n <Text preset=\"fieldLabel\" text={\"Scale when labels become visible: \" + physics.labelScale} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0.1}\n maximumValue={5}\n onValueChange={(value) => { setPhysics({ ...physics, labelScale: value }) }}\n value={physics.labelScale}\n step={.1} />\n </View>,\n },\n {\n title: 'Modes',\n content:\n <View>\n <Text preset=\"fieldLabel\" text=\"Expandable Graph\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collapse}\n onValueChange={() => { setPhysics({ ...physics, collapse: !physics.collapse }) }}\n />\n <Text preset=\"fieldLabel\" text={\"Change starting point: \" + physics.rootId} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={600}\n onValueChange={(value) => { setPhysics({ ...physics, rootId: value }) }}\n value={physics.rootId}\n step={1} />\n <Text preset=\"fieldLabel\" text=\"3D\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.threedim}\n onValueChange={() => { setPhysics({ ...physics, threedim: !physics.threedim }) }}\n />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.local}\n onValueChange={() => { setPhysics({ ...physics, local: !physics.local }) }}\n />\n </View>\n },\n ];\n\n const [activeSections, setActiveSections] = useState([]);\n\n const setSections = (sections) => {\n setActiveSections(\n sections.includes(undefined) ? [] : sections\n );\n };\n\n const renderHeader = (section, _, isActive) => {\n return (\n <Animatable.View\n duration={400}\n style={[styles.header, isActive ? styles.active : styles.inactive]}\n transition=\"backgroundColor\"\n >\n <Text style={styles.headerText}>{section.title}</Text>\n </Animatable.View>\n );\n };\n\n const renderContent = (section, _, isActive) => {\n return (\n <Animatable.View\n duration={400}\n style={[styles.content, isActive ? styles.active : styles.inactive]}\n transition=\"backgroundColor\"\n >\n {section.content}\n </Animatable.View>\n );\n }\n const [tweaks, setTweaks] = useState(true);\n if (true) {\n if (tweaks) {\n return (\n <View style={styles.container}>\n <View style={{ height: 30, width: \"100%\", backgroundColor: \"rgb(20,20,20)\" }}>\n <TouchableOpacity style={{ width: 30, color: \"#ffffff\", textAlign: \"center\", marginLeft: \"auto\", padding: 5 }}\n onPress={() => { setTweaks(false) }}>\n <Icon name=\"close-circle\" color=\"#ffffff\" size={20} />\n </TouchableOpacity>\n </View>\n <ScrollView>\n <Accordion\n activeSections={activeSections}\n sections={content}\n touchAbleComponent={TouchableOpacity}\n expandMultiple={true}\n renderHeader={renderHeader}\n renderContent={renderContent}\n duration={200}\n onChange={setSections}\n renderAsFlatList={false}\n\n />\n </ScrollView>\n </View>\n );\n } else {\n return (\n <TouchableOpacity\n onPress={() => { setTweaks(true) }}\n style={{ position: \"absolute\", top: 50, left: 50, width: 30, color: \"#ffffff\", zIndex: 100 }}>\n <Icon name=\"cog\" color=\"#ffffff\" size={30} />\n </TouchableOpacity>\n )\n }\n } else {\n return (\n <View style={{ position: \"absolute\", top: \"5%\", left: \"5%\", zIndex: 100, width: 300, backgroundColor: \"#000000\", padding: 20 }}>\n <Text preset=\"bold\" text=\"Physics\" />\n <Text preset=\"fieldLabel\" text={\"Repulsive force: \" + physics.charge} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={-400}\n maximumValue={100}\n onValueChange={(value) => { setPhysics({ ...physics, charge: value }) }}\n value={physics.charge}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Link Force: \" + physics.linkStrength} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={2}\n onValueChange={(value) => { setPhysics({ ...physics, linkStrength: value }) }}\n value={physics.linkStrength}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"'Link Iterations': \" + physics.linkIts} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkIts: value }) }}\n value={physics.linkIts}\n step={1} />\n <Text preset=\"fieldLabel\" text=\"Collision\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collision}\n onValueChange={() => { setPhysics({ ...physics, collision: !physics.collision }) }}\n />\n <Text preset=\"bold\" text=\"Visual\" />\n <Text preset=\"fieldLabel\" text={\"Particles: \" + physics.particles} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={5}\n onValueChange={(value) => { setPhysics({ ...physics, particles: value }) }}\n value={physics.particles}\n step={1} />\n <Text preset=\"bold\" text=\"Modes\" />\n <Text preset=\"fieldLabel\" text=\"Expandable Graph\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collapse}\n onValueChange={() => { setPhysics({ ...physics, collapse: !physics.collapse }) }}\n />\n <Text preset=\"fieldLabel\" text=\"3D\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.threedim}\n onValueChange={() => { setPhysics({ ...physics, threedim: !physics.threedim }) }}\n />\n </View>\n );\n }\n})\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: 'rgb(20,20,20)',\n position: \"absolute\",\n zIndex: 100,\n left: 50,\n top: 50,\n width: 250,\n borderRadius: 5,\n borderStyle: \"solid\",\n maxHeight: \"70%\",\n paddingBottom: 20,\n },\n title: {\n textAlign: 'left',\n fontSize: 22,\n fontWeight: '300',\n marginBottom: 20,\n paddingLeft: 20,\n },\n header: {\n backgroundColor: '#111111',\n padding: 10,\n paddingBottom: 20,\n textAlign: \"left\",\n },\n headerText: {\n textAlign: 'left',\n paddingLeft: 30,\n fontSize: 16,\n fontWeight: '500',\n },\n content: {\n padding: 20,\n paddingLeft: 60,\n backgroundColor: '#000000',\n },\n active: {\n backgroundColor: 'rgba(0,0,0,1)',\n },\n inactive: {\n backgroundColor: 'rgba(20,20,20,1)',\n },\n selectors: {\n marginBottom: 10,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n selector: {\n backgroundColor: '#111111',\n padding: 10,\n },\n activeSelector: {\n fontWeight: 'bold',\n },\n selectTitle: {\n fontSize: 14,\n fontWeight: '500',\n padding: 10,\n },\n multipleToggle: {\n flexDirection: 'row',\n justifyContent: 'center',\n marginVertical: 30,\n alignItems: 'center',\n },\n multipleToggle__title: {\n fontSize: 16,\n marginRight: 8,\n },\n});\n","import * as React from \"react\"\nimport { StyleProp, TextStyle, View, ViewStyle } from \"react-native\"\nimport { observer } from \"mobx-react-lite\"\nimport { color, typography } from \"../../theme\"\nimport { Text } from \"../\"\nimport { flatten } from \"ramda\"\n\nconst CONTAINER: ViewStyle = {\n justifyContent: \"center\",\n}\n\nconst TEXT: TextStyle = {\n fontFamily: typography.primary,\n fontSize: 14,\n color: color.primary,\n}\n\nexport interface LocalProps {\n /**\n * An optional style override useful for padding & margin.\n */\n style?: StyleProp<ViewStyle>\n}\n\n/**\n * Describe your component here\n */\nexport const Local = observer(function Local(props: LocalProps) {\n const { style } = props\n const styles = flatten([CONTAINER, style])\n\n return (\n <View style={styles}>\n <Text style={TEXT}>Hello</Text>\n </View>\n )\n})\n","import React from \"react\"\nimport { View, ViewStyle, TextStyle, ImageStyle, SafeAreaView } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport { Button, Header, Screen, Text, Wallpaper, AutoImage as Image } from \"../../components\"\nimport { color, spacing, typography } from \"../../theme\"\nconst bowserLogo = require(\"./bowser.png\")\n\nconst FULL: ViewStyle = { flex: 1 }\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n paddingHorizontal: spacing[4],\n}\nconst TEXT: TextStyle = {\n color: color.palette.white,\n fontFamily: typography.primary,\n}\nconst BOLD: TextStyle = { fontWeight: \"bold\" }\nconst HEADER: TextStyle = {\n paddingTop: spacing[3],\n paddingBottom: spacing[4] + spacing[1],\n paddingHorizontal: 0,\n}\nconst HEADER_TITLE: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 12,\n lineHeight: 15,\n textAlign: \"center\",\n letterSpacing: 1.5,\n}\nconst TITLE_WRAPPER: TextStyle = {\n ...TEXT,\n textAlign: \"center\",\n}\nconst TITLE: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 28,\n lineHeight: 38,\n textAlign: \"center\",\n}\nconst ALMOST: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 26,\n fontStyle: \"italic\",\n}\nconst BOWSER: ImageStyle = {\n alignSelf: \"center\",\n marginVertical: spacing[5],\n maxWidth: \"100%\",\n width: 343,\n height: 230,\n}\nconst CONTENT: TextStyle = {\n ...TEXT,\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n marginBottom: spacing[5],\n}\nconst CONTINUE: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n backgroundColor: color.palette.deepPurple,\n}\nconst CONTINUE_TEXT: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 13,\n letterSpacing: 2,\n}\nconst FOOTER: ViewStyle = { backgroundColor: \"#20162D\" }\nconst FOOTER_CONTENT: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n}\n\nexport const WelcomeScreen = observer(function WelcomeScreen() {\n const navigation = useNavigation()\n const nextScreen = () => navigation.navigate(\"demo\")\n\n return (\n <View testID=\"WelcomeScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"scroll\" backgroundColor={color.transparent}>\n <Header headerTx=\"welcomeScreen.poweredBy\" style={HEADER} titleStyle={HEADER_TITLE} />\n <Text style={TITLE_WRAPPER}>\n <Text style={TITLE} text=\"Your new app, \" />\n <Text style={ALMOST} text=\"almost\" />\n <Text style={TITLE} text=\"!\" />\n </Text>\n <Text style={TITLE} preset=\"header\" tx=\"welcomeScreen.readyForLaunch\" />\n <Image source={bowserLogo} style={BOWSER} />\n <Text style={CONTENT}>\n This probably isn't what your app is going to look like. Unless your designer handed you\n this screen and, in that case, congrats! You're ready to ship.\n </Text>\n <Text style={CONTENT}>\n For everyone else, this is where you'll see a live preview of your fully functioning app\n using Ignite.\n </Text>\n </Screen>\n <SafeAreaView style={FOOTER}>\n <View style={FOOTER_CONTENT}>\n <Button\n testID=\"next-screen-button\"\n style={CONTINUE}\n textStyle={CONTINUE_TEXT}\n tx=\"welcomeScreen.continue\"\n onPress={nextScreen}\n />\n </View>\n </SafeAreaView>\n </View>\n )\n})\n","import { ApiResponse } from \"apisauce\"\n\nexport type GeneralApiProblem =\n /**\n * Times up.\n */\n | { kind: \"timeout\"; temporary: true }\n /**\n * Cannot connect to the server for some reason.\n */\n | { kind: \"cannot-connect\"; temporary: true }\n /**\n * The server experienced a problem. Any 5xx error.\n */\n | { kind: \"server\" }\n /**\n * We're not allowed because we haven't identified ourself. This is 401.\n */\n | { kind: \"unauthorized\" }\n /**\n * We don't have access to perform that request. This is 403.\n */\n | { kind: \"forbidden\" }\n /**\n * Unable to find that resource. This is a 404.\n */\n | { kind: \"not-found\" }\n /**\n * All other 4xx series errors.\n */\n | { kind: \"rejected\" }\n /**\n * Something truly unexpected happened. Most likely can try again. This is a catch all.\n */\n | { kind: \"unknown\"; temporary: true }\n /**\n * The data we received is not in the expected format.\n */\n | { kind: \"bad-data\" }\n\n/**\n * Attempts to get a common cause of problems from an api response.\n *\n * @param response The api response.\n */\nexport function getGeneralApiProblem(response: ApiResponse<any>): GeneralApiProblem | void {\n switch (response.problem) {\n case \"CONNECTION_ERROR\":\n return { kind: \"cannot-connect\", temporary: true }\n case \"NETWORK_ERROR\":\n return { kind: \"cannot-connect\", temporary: true }\n case \"TIMEOUT_ERROR\":\n return { kind: \"timeout\", temporary: true }\n case \"SERVER_ERROR\":\n return { kind: \"server\" }\n case \"UNKNOWN_ERROR\":\n return { kind: \"unknown\", temporary: true }\n case \"CLIENT_ERROR\":\n switch (response.status) {\n case 401:\n return { kind: \"unauthorized\" }\n case 403:\n return { kind: \"forbidden\" }\n case 404:\n return { kind: \"not-found\" }\n default:\n return { kind: \"rejected\" }\n }\n case \"CANCEL_ERROR\":\n return null\n }\n\n return null\n}\n","// Use this import if you want to use \"env.js\" file\n// const { API_URL } = require(\"../../config/env\")\n// Or just specify it directly like this:\nconst API_URL = \"http://example.com\"\n\n/**\n * The options used to configure the API.\n */\nexport interface ApiConfig {\n /**\n * The URL of the api.\n */\n url: string\n\n /**\n * Milliseconds before we timeout the request.\n */\n timeout: number\n}\n\n/**\n * The default configuration for the app.\n */\nexport const DEFAULT_API_CONFIG: ApiConfig = {\n url: API_URL || \"https://jsonplaceholder.typicode.com\",\n timeout: 10000,\n}\n","import { ApisauceInstance, create, ApiResponse } from \"apisauce\"\nimport { getGeneralApiProblem } from \"./api-problem\"\nimport { ApiConfig, DEFAULT_API_CONFIG } from \"./api-config\"\nimport * as Types from \"./api.types\"\n\n/**\n * Manages all requests to the API.\n */\nexport class Api {\n /**\n * The underlying apisauce instance which performs the requests.\n */\n apisauce: ApisauceInstance\n\n /**\n * Configurable options.\n */\n config: ApiConfig\n\n /**\n * Creates the api.\n *\n * @param config The configuration to use.\n */\n constructor(config: ApiConfig = DEFAULT_API_CONFIG) {\n this.config = config\n }\n\n /**\n * Sets up the API. This will be called during the bootup\n * sequence and will happen before the first React component\n * is mounted.\n *\n * Be as quick as possible in here.\n */\n setup() {\n // construct the apisauce instance\n this.apisauce = create({\n baseURL: this.config.url,\n timeout: this.config.timeout,\n headers: {\n Accept: \"application/json\",\n },\n })\n }\n\n /**\n * Gets a list of users.\n */\n async getUsers(): Promise<Types.GetUsersResult> {\n // make the api call\n const response: ApiResponse<any> = await this.apisauce.get(`/users`)\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n const convertUser = (raw) => {\n return {\n id: raw.id,\n name: raw.name,\n }\n }\n\n // transform the data into the format we are expecting\n try {\n const rawUsers = response.data\n const resultUsers: Types.User[] = rawUsers.map(convertUser)\n return { kind: \"ok\", users: resultUsers }\n } catch {\n return { kind: \"bad-data\" }\n }\n }\n\n /**\n * Gets a single user by ID\n */\n\n async getUser(id: string): Promise<Types.GetUserResult> {\n // make the api call\n const response: ApiResponse<any> = await this.apisauce.get(`/users/${id}`)\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n // transform the data into the format we are expecting\n try {\n const resultUser: Types.User = {\n id: response.data.id,\n name: response.data.name,\n }\n return { kind: \"ok\", user: resultUser }\n } catch {\n return { kind: \"bad-data\" }\n }\n }\n}\n","import React from \"react\"\nimport { ImageStyle, Platform, TextStyle, View, ViewStyle } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport {\n BulletItem,\n Button,\n Header,\n Text,\n Screen,\n Wallpaper,\n AutoImage as Image,\n} from \"../../components\"\nimport { color, spacing } from \"../../theme\"\nimport { Api } from \"../../services/api\"\nimport { save } from \"../../utils/storage\"\nexport const logoIgnite = require(\"./logo-ignite.png\")\nexport const heart = require(\"./heart.png\")\n\nconst FULL: ViewStyle = { flex: 1 }\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n paddingHorizontal: spacing[4],\n}\nconst DEMO: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n backgroundColor: color.palette.deepPurple,\n}\nconst BOLD: TextStyle = { fontWeight: \"bold\" }\nconst DEMO_TEXT: TextStyle = {\n ...BOLD,\n fontSize: 13,\n letterSpacing: 2,\n}\nconst HEADER: TextStyle = {\n paddingTop: spacing[3],\n paddingBottom: spacing[5] - 1,\n paddingHorizontal: 0,\n}\nconst HEADER_TITLE: TextStyle = {\n ...BOLD,\n fontSize: 12,\n lineHeight: 15,\n textAlign: \"center\",\n letterSpacing: 1.5,\n}\nconst TITLE: TextStyle = {\n ...BOLD,\n fontSize: 28,\n lineHeight: 38,\n textAlign: \"center\",\n marginBottom: spacing[5],\n}\nconst TAGLINE: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n marginBottom: spacing[4] + spacing[1],\n}\nconst IGNITE: ImageStyle = {\n marginVertical: spacing[6],\n alignSelf: \"center\",\n width: 180,\n height: 100,\n}\nconst LOVE_WRAPPER: ViewStyle = {\n flexDirection: \"row\",\n alignItems: \"center\",\n alignSelf: \"center\",\n}\nconst LOVE: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n}\nconst HEART: ImageStyle = {\n marginHorizontal: spacing[2],\n width: 10,\n height: 10,\n resizeMode: \"contain\",\n}\nconst HINT: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 12,\n lineHeight: 15,\n marginVertical: spacing[2],\n}\n\nconst platformCommand = Platform.select({\n ios: \"Cmd + D\",\n android: \"Cmd/Ctrl + M\",\n})\n\nexport const DemoScreen = observer(function DemoScreen() {\n const navigation = useNavigation()\n const goBack = () => navigation.goBack()\n\n const demoReactotron = React.useMemo(\n () => async () => {\n console.tron.log(\"Your Friendly tron log message\")\n console.tron.logImportant(\"I am important\")\n console.tron.display({\n name: \"DISPLAY\",\n value: {\n numbers: 1,\n strings: \"strings\",\n booleans: true,\n arrays: [1, 2, 3],\n objects: {\n deeper: {\n deeper: {\n yay: \"👾\",\n },\n },\n },\n functionNames: function hello() {\n /* dummy function */\n },\n },\n preview: \"More control with display()\",\n important: true,\n image: {\n uri:\n \"https://avatars2.githubusercontent.com/u/3902527?s=200&u=a0d16b13ed719f35d95ca0f4440f5d07c32c349a&v=4\",\n },\n })\n // make an API call for the demo\n // Don't do API like this, use store's API\n const demo = new Api()\n demo.setup()\n demo.getUser(\"1\")\n // Let's do some async storage stuff\n await save(\"Cool Name\", \"Boaty McBoatface\")\n },\n [],\n )\n\n return (\n <View testID=\"DemoScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"scroll\" backgroundColor={color.transparent}>\n <Header\n headerTx=\"demoScreen.howTo\"\n leftIcon=\"back\"\n onLeftPress={goBack}\n style={HEADER}\n titleStyle={HEADER_TITLE}\n />\n <Text style={TITLE} preset=\"header\" tx=\"demoScreen.title\" />\n <Text style={TAGLINE} tx=\"demoScreen.tagLine\" />\n <BulletItem text=\"Integrated here, Navigation with State, TypeScript, Storybook, Solidarity, and i18n.\" />\n <BulletItem\n text={`To run Storybook, press ${platformCommand} or shake the device to show the developer menu, then select \"Toggle Storybook\"`}\n />\n <BulletItem text=\"Load up Reactotron! You can inspect your app, view the events, interact, and so much more!\" />\n <View>\n <Button\n style={DEMO}\n textStyle={DEMO_TEXT}\n tx=\"demoScreen.reactotron\"\n onPress={demoReactotron}\n />\n <Text style={HINT} tx={`demoScreen.${Platform.OS}ReactotronHint` as const} />\n </View>\n <Button\n style={DEMO}\n textStyle={DEMO_TEXT}\n tx=\"demoScreen.demoList\"\n onPress={() => navigation.navigate(\"demoList\")}\n />\n <Image source={logoIgnite} style={IGNITE} />\n <View style={LOVE_WRAPPER}>\n <Text style={LOVE} text=\"Made with\" />\n <Image source={heart} style={HEART} />\n <Text style={LOVE} text=\"by Infinite Red\" />\n </View>\n </Screen>\n </View>\n )\n})\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\n\n/**\n * Rick and Morty character model.\n */\nexport const CharacterModel = types.model(\"Character\").props({\n id: types.identifierNumber,\n name: types.maybe(types.string),\n status: types.maybe(types.string),\n image: types.maybe(types.string),\n})\n\ntype CharacterType = Instance<typeof CharacterModel>\nexport interface Character extends CharacterType {}\ntype CharacterSnapshotType = SnapshotOut<typeof CharacterModel>\nexport interface CharacterSnapshot extends CharacterSnapshotType {}\nexport const createCharacterDefaultModel = () => types.optional(CharacterModel, {})\n","import { ApiResponse } from \"apisauce\"\nimport { Api } from \"./api\"\nimport { GetCharactersResult } from \"./api.types\"\nimport { getGeneralApiProblem } from \"./api-problem\"\n\nconst API_PAGE_SIZE = 50\n\nexport class CharacterApi {\n private api: Api\n\n constructor(api: Api) {\n this.api = api\n }\n\n async getCharacters(): Promise<GetCharactersResult> {\n try {\n // make the api call\n const response: ApiResponse<any> = await this.api.apisauce.get(\n \"https://raw.githubusercontent.com/infinitered/ignite/master/data/rick-and-morty.json\",\n { amount: API_PAGE_SIZE },\n )\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n const characters = response.data.results\n\n return { kind: \"ok\", characters }\n } catch (e) {\n __DEV__ && console.tron.log(e.message)\n return { kind: \"bad-data\" }\n }\n }\n}\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\nimport { CharacterModel, CharacterSnapshot } from \"../character/character\"\nimport { CharacterApi } from \"../../services/api/character-api\"\nimport { withEnvironment } from \"../extensions/with-environment\"\n\n/**\n * Example store containing Rick and Morty characters\n */\nexport const CharacterStoreModel = types\n .model(\"CharacterStore\")\n .props({\n characters: types.optional(types.array(CharacterModel), []),\n })\n .extend(withEnvironment)\n .actions((self) => ({\n saveCharacters: (characterSnapshots: CharacterSnapshot[]) => {\n self.characters.replace(characterSnapshots)\n },\n }))\n .actions((self) => ({\n getCharacters: async () => {\n const characterApi = new CharacterApi(self.environment.api)\n const result = await characterApi.getCharacters()\n\n if (result.kind === \"ok\") {\n self.saveCharacters(result.characters)\n } else {\n __DEV__ && console.tron.log(result.kind)\n }\n },\n }))\n\ntype CharacterStoreType = Instance<typeof CharacterStoreModel>\nexport interface CharacterStore extends CharacterStoreType {}\ntype CharacterStoreSnapshotType = SnapshotOut<typeof CharacterStoreModel>\nexport interface CharacterStoreSnapshot extends CharacterStoreSnapshotType {}\nexport const createCharacterStoreDefaultModel = () => types.optional(CharacterStoreModel, {})\n","import { getEnv, IStateTreeNode } from \"mobx-state-tree\"\nimport { Environment } from \"../environment\"\n\n/**\n * Adds a environment property to the node for accessing our\n * Environment in strongly typed.\n */\nexport const withEnvironment = (self: IStateTreeNode) => ({\n views: {\n /**\n * The environment.\n */\n get environment() {\n return getEnv<Environment>(self)\n },\n },\n})\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\nimport { CharacterStoreModel } from \"../character-store/character-store\"\n\n/**\n * A RootStore model.\n */\n// prettier-ignore\nexport const RootStoreModel = types.model(\"RootStore\").props({\n characterStore: types.optional(CharacterStoreModel, {} as any),\n})\n\n/**\n * The RootStore instance.\n */\nexport interface RootStore extends Instance<typeof RootStoreModel> {}\n\n/**\n * The data of a RootStore.\n */\nexport interface RootStoreSnapshot extends SnapshotOut<typeof RootStoreModel> {}\n","import { createContext, useContext } from \"react\"\nimport { RootStore } from \"./root-store\"\n\n/**\n * Create a context we can use to\n * - Provide access to our stores from our root component\n * - Consume stores in our screens (or other components, though it's\n * preferable to just connect screens)\n */\nconst RootStoreContext = createContext<RootStore>({} as RootStore)\n\n/**\n * The provider our root component will use to expose the root store\n */\nexport const RootStoreProvider = RootStoreContext.Provider\n\n/**\n * A hook that screens can use to gain access to our stores, with\n * `const { someStore, someOtherStore } = useStores()`,\n * or less likely: `const rootStore = useStores()`\n */\nexport const useStores = () => useContext(RootStoreContext)\n","import { Api } from \"../services/api\"\n\nlet ReactotronDev\nif (__DEV__) {\n const { Reactotron } = require(\"../services/reactotron\")\n ReactotronDev = Reactotron\n}\n\n/**\n * The environment is a place where services and shared dependencies between\n * models live. They are made available to every model via dependency injection.\n */\nexport class Environment {\n constructor() {\n // create each service\n if (__DEV__) {\n // dev-only services\n this.reactotron = new ReactotronDev()\n }\n this.api = new Api()\n }\n\n async setup() {\n // allow each service to setup\n if (__DEV__) {\n await this.reactotron.setup()\n }\n await this.api.setup()\n }\n\n /**\n * Reactotron is only available in dev.\n */\n reactotron: typeof ReactotronDev\n\n /**\n * Our api.\n */\n api: Api\n}\n","import { onSnapshot } from \"mobx-state-tree\"\nimport { RootStoreModel, RootStore } from \"./root-store\"\nimport { Environment } from \"../environment\"\nimport * as storage from \"../../utils/storage\"\n\n/**\n * The key we'll be saving our state as within async storage.\n */\nconst ROOT_STATE_STORAGE_KEY = \"root\"\n\n/**\n * Setup the environment that all the models will be sharing.\n *\n * The environment includes other functions that will be picked from some\n * of the models that get created later. This is how we loosly couple things\n * like events between models.\n */\nexport async function createEnvironment() {\n const env = new Environment()\n await env.setup()\n return env\n}\n\n/**\n * Setup the root state.\n */\nexport async function setupRootStore() {\n let rootStore: RootStore\n let data: any\n\n // prepare the environment that will be associated with the RootStore.\n const env = await createEnvironment()\n try {\n // load data from storage\n data = (await storage.load(ROOT_STATE_STORAGE_KEY)) || {}\n rootStore = RootStoreModel.create(data, env)\n } catch (e) {\n // if there's any problems loading, then let's at least fallback to an empty state\n // instead of crashing.\n rootStore = RootStoreModel.create({}, env)\n\n // but please inform us what happened\n __DEV__ && console.tron.error(e.message, null)\n }\n\n // reactotron logging\n if (__DEV__) {\n env.reactotron.setRootStore(rootStore, data)\n }\n\n // track changes & save to storage\n onSnapshot(rootStore, (snapshot) => storage.save(ROOT_STATE_STORAGE_KEY, snapshot))\n\n return rootStore\n}\n","import React, { useEffect } from \"react\"\nimport { FlatList, TextStyle, View, ViewStyle, ImageStyle } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport { Header, Screen, Text, Wallpaper, AutoImage as Image } from \"../../components\"\nimport { color, spacing } from \"../../theme\"\nimport { useStores } from \"../../models\"\n\nconst FULL: ViewStyle = {\n flex: 1,\n}\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n}\nconst HEADER: TextStyle = {\n paddingBottom: spacing[5] - 1,\n paddingHorizontal: spacing[4],\n paddingTop: spacing[3],\n}\nconst HEADER_TITLE: TextStyle = {\n fontSize: 12,\n fontWeight: \"bold\",\n letterSpacing: 1.5,\n lineHeight: 15,\n textAlign: \"center\",\n}\nconst LIST_CONTAINER: ViewStyle = {\n alignItems: \"center\",\n flexDirection: \"row\",\n padding: 10,\n}\nconst IMAGE: ImageStyle = {\n borderRadius: 35,\n height: 65,\n width: 65,\n}\nconst LIST_TEXT: TextStyle = {\n marginLeft: 10,\n}\nconst FLAT_LIST: ViewStyle = {\n paddingHorizontal: spacing[4],\n}\n\nexport const DemoListScreen = observer(function DemoListScreen() {\n const navigation = useNavigation()\n const goBack = () => navigation.goBack()\n\n const { characterStore } = useStores()\n const { characters } = characterStore\n\n useEffect(() => {\n async function fetchData() {\n await characterStore.getCharacters()\n }\n\n fetchData()\n }, [])\n\n return (\n <View testID=\"DemoListScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"fixed\" backgroundColor={color.transparent}>\n <Header\n headerTx=\"demoListScreen.title\"\n leftIcon=\"back\"\n onLeftPress={goBack}\n style={HEADER}\n titleStyle={HEADER_TITLE}\n />\n <FlatList\n contentContainerStyle={FLAT_LIST}\n data={[...characters]}\n keyExtractor={(item) => String(item.id)}\n renderItem={({ item }) => (\n <View style={LIST_CONTAINER}>\n <Image source={{ uri: item.image }} style={IMAGE} />\n <Text style={LIST_TEXT}>\n {item.name} ({item.status})\n </Text>\n </View>\n )}\n />\n </Screen>\n </View>\n )\n})\n","import React, { useEffect, useState } from \"react\"\nimport { observer } from \"mobx-react-lite\"\nimport { TouchableOpacity, ViewStyle } from \"react-native\"\nimport { Screen, Text } from \"../../components\"\n// import { useNavigation } from \"@react-navigation/native\"\n// import { useStores } from \"../../models\"\nimport { color } from \"../../theme\"\n\nimport { Graph } from \"../../components\"\nimport { Tweaks } from \"../../components\"\n\nimport genRandomTree from \"../../data/randomdata\"\n\nimport AsyncStorage from \"@react-native-async-storage/async-storage\"\n\nimport axios from \"axios\"\n\nimport rando from \"../../data/rando.json\"\n\nconst ROOT: ViewStyle = {\n backgroundColor: color.palette.black,\n flex: 1,\n}\n\nexport const GraphScreen = observer(function GraphScreen() {\n // Pull in one of our MST stores\n // const { someStore, anotherStore } = useStores()\n\n // Pull in navigation via hook\n // const navigation = useNavigation()\n\n const [physics, setPhysics] = useState({})\n const [graphData, setGraphData] = useState()\n const [nodeIds, setNodeIds] = useState([])\n // { \"nodes\": [{ \"id\": 1 }, { \"id\": 2 }], \"links\": [{ \"target\": 1, \"source\": 2 }] });\n const physicsInit = {\n charge: -350,\n collision: true,\n linkStrength: 0.1,\n linkIts: 1,\n collapse: false,\n threedim: false,\n particles: 2,\n linkOpacity: 1,\n linkWidth: 1,\n particleWidth: 4,\n nodeRel: 4,\n labels: true,\n labelScale: 1.5,\n alphaDecay: 0.16,\n alphaTarget: 0,\n velocityDecay: 0.25,\n gravity: 0.5,\n gravityOn: true,\n hover: true,\n colorful: true,\n galaxy: true,\n rootId: 0,\n local: false,\n }\n\n const getData = async () => {\n try {\n const value: string = await AsyncStorage.getItem(\"@physics\")\n if (value !== null) {\n const valueJson = JSON.parse(value)\n if (Object.keys(valueJson).length === Object.keys(physicsInit).length) {\n valueJson.local=false;\n return valueJson\n } else {\n return physicsInit\n }\n } else {\n return physicsInit\n }\n } catch (e) {\n console.log(e)\n }\n }\n const storeData = async (value) => {\n try {\n let jsonVal = JSON.stringify(value)\n console.log(jsonVal + \" \" + value)\n await AsyncStorage.setItem(\"@physics\", jsonVal)\n } catch (e) {\n console.log(e)\n }\n }\n\n // hook to save the current configuration of the physics tweaks\n // after it is updated\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n // set timer so the thing doesn't run every single slider tick\n const timer = setTimeout(() => {\n storeData(physics)\n }, 1000)\n return () => clearTimeout(timer)\n }, [physics])\n\n //\"ComponentOnMount\"\n // Get previous settings and the data from the org-roam-server\n const sanitizeGraph = (data) => {\n const cleanLinks = []\n data.links.forEach((link, j) => {\n let target\n let source\n for (let i = 0; i < data.nodes.length; i++) {\n let a = data.nodes[i]\n !a.neighbors && (a.neighbors = [])\n !a.links && (a.links = [])\n // the first time around,\n // index the node as not a part of the local graph\n !j && (a.local=false);\n if (link.target === data.nodes[i].id) {\n a.links.push(link)\n target = [a, i]\n link.target === link.source ? null : cleanLinks.push(link)\n } else if (link.source === data.nodes[i].id) {\n a.links.push(link)\n source = [a, i]\n }\n }\n if (target && source) {\n data.nodes[target[1]].neighbors.push(source[0])\n data.nodes[source[1]].neighbors.push(target[0])\n link.sourceIndex = source[1]\n link.targetIndex = target[1]\n link.index = [j]\n link.local = false;\n }\n })\n data.links = cleanLinks;\n return data;\n }\n\n const getNodesById = (data) => {\n let temp = []\n data.nodes.forEach((node, i) => {\n temp.push(node.id)\n node.index = i\n })\n setNodeIds(temp)\n\n return temp\n }\n\n useEffect(() => {\n getData().then((data) => setPhysics(data))\n axios\n .get(\"http://localhost:35901/graph\")\n .then((dataa) => {\n let nods = getNodesById(dataa.data)\n setNodeIds(nods)\n console.log(nodeIds)\n let cleanData = sanitizeGraph(dataa.data)\n console.log(cleanData)\n setGraphData(cleanData)\n })\n .catch((e) => {\n console.log(e)\n console.log(\"Couldn't get data.\")\n //setGraphData(rando);\n })\n }, [])\n if (!graphData) {\n return null\n } else {\n return (\n <Screen style={ROOT} preset=\"scroll\">\n <Tweaks physics={physics} setPhysics={setPhysics} />\n <Graph setPhysics={setPhysics} physics={physics} gData={graphData} nodeIds={nodeIds} />\n </Screen>\n )\n }\n})\n","/**\n * This is the navigator you will modify to display the logged-in screens of your app.\n * You can use RootNavigator to also display an auth flow or other user flows.\n *\n * You'll likely spend most of your time in this file.\n */\nimport React from \"react\"\nimport { createStackNavigator } from \"@react-navigation/stack\"\nimport { WelcomeScreen, DemoScreen, DemoListScreen, GraphScreen } from \"../screens\"\n\n/**\n * This type allows TypeScript to know what routes are defined in this navigator\n * as well as what properties (if any) they might take when navigating to them.\n *\n * If no params are allowed, pass through `undefined`. Generally speaking, we\n * recommend using your MobX-State-Tree store(s) to keep application state\n * rather than passing state through navigation params.\n *\n * For more information, see this documentation:\n * https://reactnavigation.org/docs/params/\n * https://reactnavigation.org/docs/typescript#type-checking-the-navigator\n */\nexport type PrimaryParamList = {\n welcome: undefined\n demo: undefined\n demoList: undefined\n graph: undefined\n}\n\n// Documentation: https://reactnavigation.org/docs/stack-navigator/\nconst Stack = createStackNavigator<PrimaryParamList>()\n\nexport function MainNavigator() {\n return (\n <Stack.Navigator\n screenOptions={{\n cardStyle: { backgroundColor: \"transparent\" },\n headerShown: false,\n }}\n >\n <Stack.Screen name=\"graph\" component={GraphScreen}/>\n </Stack.Navigator>\n )\n}\n\n/**\n <Stack.Screen name=\"welcome\" component={WelcomeScreen} />\n <Stack.Screen name=\"demo\" component={DemoScreen} />\n <Stack.Screen name=\"demoList\" component={DemoListScreen} />\n * A list of routes from which we're allowed to leave the app when\n * the user presses the back button on Android.\n *\n * Anything not on this list will be a standard `back` action in\n * react-navigation.\n *\n * `canExit` is used in ./app/app.tsx in the `useBackButtonHandler` hook.\n */\nconst exitRoutes = [\"welcome\"]\nexport const canExit = (routeName: string) => exitRoutes.includes(routeName)\n","/**\n * The root navigator is used to switch between major navigation flows of your app.\n * Generally speaking, it will contain an auth flow (registration, login, forgot password)\n * and a \"main\" flow (which is contained in your MainNavigator) which the user\n * will use once logged in.\n */\nimport React from \"react\"\nimport { NavigationContainer, NavigationContainerRef } from \"@react-navigation/native\"\nimport { createStackNavigator } from \"@react-navigation/stack\"\nimport { MainNavigator } from \"./main-navigator\"\nimport { color } from \"../theme\"\n\n/**\n * This type allows TypeScript to know what routes are defined in this navigator\n * as well as what properties (if any) they might take when navigating to them.\n *\n * We recommend using MobX-State-Tree store(s) to handle state rather than navigation params.\n *\n * For more information, see this documentation:\n * https://reactnavigation.org/docs/params/\n * https://reactnavigation.org/docs/typescript#type-checking-the-navigator\n */\nexport type RootParamList = {\n mainStack: undefined\n}\n\nconst Stack = createStackNavigator<RootParamList>()\n\nconst RootStack = () => {\n return (\n <Stack.Navigator\n screenOptions={{\n cardStyle: { backgroundColor: color.palette.deepPurple },\n headerShown: false,\n }}\n >\n <Stack.Screen\n name=\"mainStack\"\n component={MainNavigator}\n options={{\n headerShown: false,\n }}\n />\n </Stack.Navigator>\n )\n}\n\nexport const RootNavigator = React.forwardRef<\n NavigationContainerRef,\n Partial<React.ComponentProps<typeof NavigationContainer>>\n>((props, ref) => {\n return (\n <NavigationContainer {...props} ref={ref}>\n <RootStack />\n </NavigationContainer>\n )\n})\n\nRootNavigator.displayName = \"RootNavigator\"\n","import React, { useState, useEffect, useRef } from \"react\"\nimport { BackHandler } from \"react-native\"\nimport { PartialState, NavigationState, NavigationContainerRef } from \"@react-navigation/native\"\n\nexport const RootNavigation = {\n navigate(name: string) {\n name // eslint-disable-line no-unused-expressions\n },\n goBack() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n resetRoot(state?: PartialState<NavigationState> | NavigationState) {}, // eslint-disable-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function\n getRootState(): NavigationState {\n return {} as any\n },\n}\n\nexport const setRootNavigation = (ref: React.RefObject<NavigationContainerRef>) => {\n for (const method in RootNavigation) {\n RootNavigation[method] = (...args: any) => {\n if (ref.current) {\n return ref.current[method](...args)\n }\n }\n }\n}\n\n/**\n * Gets the current screen from any navigation state.\n */\nexport function getActiveRouteName(state: NavigationState | PartialState<NavigationState>) {\n const route = state.routes[state.index]\n\n // Found the active route -- return the name\n if (!route.state) return route.name\n\n // Recursive call to deal with nested routers\n return getActiveRouteName(route.state)\n}\n\n/**\n * Hook that handles Android back button presses and forwards those on to\n * the navigation or allows exiting the app.\n */\nexport function useBackButtonHandler(\n ref: React.RefObject<NavigationContainerRef>,\n canExit: (routeName: string) => boolean,\n) {\n const canExitRef = useRef(canExit)\n\n useEffect(() => {\n canExitRef.current = canExit\n }, [canExit])\n\n useEffect(() => {\n // We'll fire this when the back button is pressed on Android.\n const onBackPress = () => {\n const navigation = ref.current\n\n if (navigation == null) {\n return false\n }\n\n // grab the current route\n const routeName = getActiveRouteName(navigation.getRootState())\n\n // are we allowed to exit?\n if (canExitRef.current(routeName)) {\n // let the system know we've not handled this event\n return false\n }\n\n // we can't exit, so let's turn this into a back action\n if (navigation.canGoBack()) {\n navigation.goBack()\n\n return true\n }\n\n return false\n }\n\n // Subscribe when we come to life\n BackHandler.addEventListener(\"hardwareBackPress\", onBackPress)\n\n // Unsubscribe when we're done\n return () => BackHandler.removeEventListener(\"hardwareBackPress\", onBackPress)\n }, [ref])\n}\n\n/**\n * Custom hook for persisting navigation state.\n */\nexport function useNavigationPersistence(storage: any, persistenceKey: string) {\n const [initialNavigationState, setInitialNavigationState] = useState()\n const [isRestoringNavigationState, setIsRestoringNavigationState] = useState(true)\n\n const routeNameRef = useRef()\n const onNavigationStateChange = (state) => {\n const previousRouteName = routeNameRef.current\n const currentRouteName = getActiveRouteName(state)\n\n if (previousRouteName !== currentRouteName) {\n // track screens.\n __DEV__ && console.tron.log(currentRouteName)\n }\n\n // Save the current route name for later comparision\n routeNameRef.current = currentRouteName\n\n // Persist state to storage\n storage.save(persistenceKey, state)\n }\n\n const restoreState = async () => {\n try {\n const state = await storage.load(persistenceKey)\n if (state) setInitialNavigationState(state)\n } finally {\n setIsRestoringNavigationState(false)\n }\n }\n\n useEffect(() => {\n if (isRestoringNavigationState) restoreState()\n }, [isRestoringNavigationState])\n\n return { onNavigationStateChange, restoreState, initialNavigationState }\n}\n","import React, { useState, useEffect } from \"react\"\nimport * as QueryString from \"query-string\"\n\ninterface StorybookQueryParams {\n storybook?: boolean\n}\n\nexport const ToggleStorybook = (props) => {\n const [StorybookUIRoot, setStorybookUIRoot] = useState<any>(null)\n const [queryParams, setQueryParams] = useState<StorybookQueryParams>({})\n\n useEffect(() => {\n if (__DEV__) {\n // Load the storybook UI once\n setStorybookUIRoot(() => require(\"./storybook\").StorybookUIRoot)\n }\n }, [])\n\n useEffect(() => {\n if (__DEV__) {\n setQueryParams(QueryString.parse(window.location.search))\n }\n }, [window.location.search])\n\n if (queryParams?.storybook) {\n return StorybookUIRoot ? <StorybookUIRoot /> : null\n } else {\n return props.children\n }\n}\n","/**\n * Welcome to the main entry point of the app. In this file, we'll\n * be kicking off our app.\n *\n * Most of this file is boilerplate and you shouldn't need to modify\n * it very often. But take some time to look through and understand\n * what is going on here.\n *\n * The app navigation resides in ./app/navigators, so head over there\n * if you're interested in adding screens and navigators.\n */\nimport \"./i18n\"\nimport \"./utils/ignore-warnings\"\nimport React, { useState, useEffect, useRef } from \"react\"\nimport { NavigationContainerRef } from \"@react-navigation/native\"\nimport { SafeAreaProvider, initialWindowMetrics } from \"react-native-safe-area-context\"\nimport { initFonts } from \"./theme/fonts\" // expo\nimport * as storage from \"./utils/storage\"\nimport {\n useBackButtonHandler,\n RootNavigator,\n canExit,\n setRootNavigation,\n useNavigationPersistence,\n} from \"./navigators\"\nimport { RootStore, RootStoreProvider, setupRootStore } from \"./models\"\nimport { ToggleStorybook } from \"../storybook/toggle-storybook\"\n\n// This puts screens in a native ViewController or Activity. If you want fully native\n// stack navigation, use `createNativeStackNavigator` in place of `createStackNavigator`:\n// https://github.com/kmagiera/react-native-screens#using-native-stack-navigator\nimport { enableScreens } from \"react-native-screens\"\nenableScreens()\n\nexport const NAVIGATION_PERSISTENCE_KEY = \"NAVIGATION_STATE\"\n\n/**\n * This is the root component of our app.\n */\nfunction App() {\n const navigationRef = useRef<NavigationContainerRef>(null)\n const [rootStore, setRootStore] = useState<RootStore | undefined>(undefined)\n\n setRootNavigation(navigationRef)\n useBackButtonHandler(navigationRef, canExit)\n const { initialNavigationState, onNavigationStateChange } = useNavigationPersistence(\n storage,\n NAVIGATION_PERSISTENCE_KEY,\n )\n\n // Kick off initial async loading actions, like loading fonts and RootStore\n useEffect(() => {\n ;(async () => {\n await initFonts() // expo\n setupRootStore().then(setRootStore)\n })()\n }, [])\n\n // Before we show the app, we have to wait for our state to be ready.\n // In the meantime, don't render anything. This will be the background\n // color set in native by rootView's background color. You can replace\n // with your own loading component if you wish.\n if (!rootStore) return null\n\n // otherwise, we're ready to render the app\n return (\n <ToggleStorybook>\n <RootStoreProvider value={rootStore}>\n <SafeAreaProvider initialMetrics={initialWindowMetrics}>\n <RootNavigator\n ref={navigationRef}\n initialState={initialNavigationState}\n onStateChange={onNavigationStateChange}\n />\n </SafeAreaProvider>\n </RootStoreProvider>\n </ToggleStorybook>\n )\n}\n\nexport default App\n","// import * as Font from \"expo-font\"\n\nexport const initFonts = async () => {\n // Refer to ./assets/fonts/custom-fonts.md for instructions.\n // ...\n // Welcome back! Just uncomment this and replace/append with your font file names!\n // ⬇\n // await Font.loadAsync({\n // Montserrat: require(\"./Montserrat-Regular.ttf\"),\n // \"Montserrat-Regular\": require(\"./Montserrat-Regular.ttf\"),\n // })\n}\n","// This is the first file that ReactNative will run when it starts up.\nimport App from \"./app/app.tsx\"\nimport { registerRootComponent } from \"expo\"\n\nregisterRootComponent(App)\nexport default App\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAQNJREFUKBWdk8EOwUAQhme2InFy9yB1cSTReAIOPIeEEyKObs4knkBS2pNbK57A3cETcKBjtmKzJd0mO5fO9p//63Q6BciJ0D83wn3cyZHV7ZLKtISNPUqeawB8EFEVEV+anElF5sSHj5nYDI4AmpnM0pvpQDcjinHTc+eyyBT4FX/NLc+dfjXTNQXYmiUYAz/uAtGGc35nsSOgwPREXeP5RBj60ZUIatzKnQAqekFRzp5biSlL/lQLbqaMCAc2XYqMSkdx/MzAP42IkgkLLxTYb7XrW1VUkKQAWRNaQhTAFpIB2ED+VlkukNxChjmQ0IoH7EhwXvwBZGEKEThAAcOif+ENKNR3psyHynYAAAAASUVORK5CYII=\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAIZJREFUGBljZACC/w4OMgy/fnUxMDI6gPgM//8fYGBjK2M8cOAJI1TyIlBYCCyJIN4BFekzgXWCJBkZtwMFZMEYxAaJAU1l/G9t/QxopCRIAmQkyACoqY+Bmp4zIUzEzmICOwgk9/v3LJBOsG4gG6wc6FjCjgTbC3QtUMdykJ1gDGIDxUByAK6uPrQ53B7lAAAAAElFTkSuQmCC\"","module.exports = __webpack_public_path__ + \"static/media/bg.27c56310.png\";","module.exports = __webpack_public_path__ + \"static/media/bowser.4ba9aedf.png\";","module.exports = __webpack_public_path__ + \"static/media/logo-ignite.5c0bc1b0.png\";","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAIZJREFUGBljYACC////5wHxIyB+AsRFQNwPxG+A+BIQ+4DUgBTFADE+8Bco6QFSeB2fKqjcASagofxgo/ET7CCFq/CrAcsuAVktAMTX8Fi/EyjHAlYOZMgD8X0gRgfHgAK8KDYCBaSBGNnk3UA+N4oiGAcoIQLEZ4F4HRCzw8Sx0kAFzNgkAGi11d75H7oeAAAAAElFTkSuQmCC\""],"sourceRoot":""} \ No newline at end of file